public class Role extends Resource
Modifier and Type | Class and Description |
---|---|
static class |
Role.RoleType |
Modifier and Type | Method and Description |
---|---|
static RoleCreator |
creator(String pathChatServiceSid,
String friendlyName,
Role.RoleType type,
List<String> permission)
Create a RoleCreator to execute create.
|
static RoleDeleter |
deleter(String pathChatServiceSid,
String pathSid)
Create a RoleDeleter to execute delete.
|
boolean |
equals(Object o) |
static RoleFetcher |
fetcher(String pathChatServiceSid,
String pathSid)
Create a RoleFetcher to execute fetch.
|
static Role |
fromJson(InputStream json,
com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Converts a JSON InputStream into a Role object using the provided
ObjectMapper.
|
static Role |
fromJson(String json,
com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Converts a JSON String into a Role object using the provided ObjectMapper.
|
String |
getAccountSid()
Returns The SID of the Account that created the resource.
|
String |
getChatServiceSid()
Returns The SID of the Conversation Service that the resource is associated
with.
|
ZonedDateTime |
getDateCreated()
Returns The ISO 8601 date and time in GMT when the resource was created.
|
ZonedDateTime |
getDateUpdated()
Returns The ISO 8601 date and time in GMT when the resource was last updated.
|
String |
getFriendlyName()
Returns The string that you assigned to describe the resource.
|
List<String> |
getPermissions()
Returns An array of the permissions the role has been granted.
|
String |
getSid()
Returns The unique string that identifies the resource.
|
Role.RoleType |
getType()
Returns The type of role.
|
URI |
getUrl()
Returns An absolute URL for this user role..
|
int |
hashCode() |
static RoleReader |
reader(String pathChatServiceSid)
Create a RoleReader to execute read.
|
static RoleUpdater |
updater(String pathChatServiceSid,
String pathSid,
List<String> permission)
Create a RoleUpdater to execute update.
|
public static RoleCreator creator(String pathChatServiceSid, String friendlyName, Role.RoleType type, List<String> permission)
pathChatServiceSid
- The SID of the Conversation Service to create the
resource underfriendlyName
- A string to describe the new resourcetype
- The type of rolepermission
- A permission the role should havepublic static RoleUpdater updater(String pathChatServiceSid, String pathSid, List<String> permission)
pathChatServiceSid
- The SID of the Conversation Service to update the
resource frompathSid
- The SID of the Role resource to updatepermission
- A permission the role should havepublic static RoleDeleter deleter(String pathChatServiceSid, String pathSid)
pathChatServiceSid
- The SID of the Conversation Service to delete the
resource frompathSid
- The SID of the Role resource to deletepublic static RoleFetcher fetcher(String pathChatServiceSid, String pathSid)
pathChatServiceSid
- The SID of the Conversation Service to fetch the
resource frompathSid
- The SID of the Role resource to fetchpublic static RoleReader reader(String pathChatServiceSid)
pathChatServiceSid
- The SID of the Conversation Service to read the
resources frompublic static Role fromJson(String json, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
json
- Raw JSON StringobjectMapper
- Jackson ObjectMapperpublic static Role fromJson(InputStream json, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
json
- Raw JSON InputStreamobjectMapper
- Jackson ObjectMapperpublic final String getSid()
public final String getAccountSid()
public final String getChatServiceSid()
public final String getFriendlyName()
public final Role.RoleType getType()
public final List<String> getPermissions()
public final ZonedDateTime getDateCreated()
public final ZonedDateTime getDateUpdated()
public final URI getUrl()
Copyright © 2019 Twilio, Inc. All Rights Reserved.