Package com.twilio.rest.chat.v1.service
Class Role
- java.lang.Object
-
- com.twilio.base.Resource
-
- com.twilio.rest.chat.v1.service.Role
-
- All Implemented Interfaces:
Serializable
public class Role extends Resource
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Role.RoleType
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RoleCreator
creator(String pathServiceSid, String friendlyName, Role.RoleType type, List<String> permission)
Create a RoleCreator to execute create.static RoleDeleter
deleter(String pathServiceSid, String pathSid)
Create a RoleDeleter to execute delete.boolean
equals(Object o)
static RoleFetcher
fetcher(String pathServiceSid, 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 The SID of the Account that created the resource.org.joda.time.DateTime
getDateCreated()
Returns The The RFC 2822 date and time in GMT when the resource was created.org.joda.time.DateTime
getDateUpdated()
Returns The The RFC 2822 date and time in GMT when the resource was last updated.String
getFriendlyName()
Returns The The string that you assigned to describe the resource.List<String>
getPermissions()
Returns The An array of the permissions the role has been granted.String
getServiceSid()
Returns The The SID of the Service that the resource is associated with.String
getSid()
Returns The The unique string that identifies the resource.Role.RoleType
getType()
Returns The The type of role.URI
getUrl()
Returns The The absolute URL of the Role resource.int
hashCode()
static RoleReader
reader(String pathServiceSid)
Create a RoleReader to execute read.String
toString()
static RoleUpdater
updater(String pathServiceSid, String pathSid, List<String> permission)
Create a RoleUpdater to execute update.
-
-
-
Method Detail
-
fetcher
public static RoleFetcher fetcher(String pathServiceSid, String pathSid)
Create a RoleFetcher to execute fetch.- Parameters:
pathServiceSid
- The SID of the Service to fetch the resource frompathSid
- The unique string that identifies the resource- Returns:
- RoleFetcher capable of executing the fetch
-
deleter
public static RoleDeleter deleter(String pathServiceSid, String pathSid)
Create a RoleDeleter to execute delete.- Parameters:
pathServiceSid
- The SID of the Service to delete the resource frompathSid
- The unique string that identifies the resource- Returns:
- RoleDeleter capable of executing the delete
-
creator
public static RoleCreator creator(String pathServiceSid, String friendlyName, Role.RoleType type, List<String> permission)
Create a RoleCreator to execute create.- Parameters:
pathServiceSid
- The SID of the Service to create the resource underfriendlyName
- A string to describe the new resourcetype
- The type of rolepermission
- A permission the role should have- Returns:
- RoleCreator capable of executing the create
-
reader
public static RoleReader reader(String pathServiceSid)
Create a RoleReader to execute read.- Parameters:
pathServiceSid
- The SID of the Service to read the resources from- Returns:
- RoleReader capable of executing the read
-
updater
public static RoleUpdater updater(String pathServiceSid, String pathSid, List<String> permission)
Create a RoleUpdater to execute update.- Parameters:
pathServiceSid
- The SID of the Service to update the resource frompathSid
- The unique string that identifies the resourcepermission
- A permission the role should have- Returns:
- RoleUpdater capable of executing the update
-
fromJson
public static Role fromJson(String json, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Converts a JSON String into a Role object using the provided ObjectMapper.- Parameters:
json
- Raw JSON StringobjectMapper
- Jackson ObjectMapper- Returns:
- Role object represented by the provided JSON
-
fromJson
public static Role fromJson(InputStream json, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
Converts a JSON InputStream into a Role object using the provided ObjectMapper.- Parameters:
json
- Raw JSON InputStreamobjectMapper
- Jackson ObjectMapper- Returns:
- Role object represented by the provided JSON
-
getSid
public final String getSid()
Returns The The unique string that identifies the resource.- Returns:
- The unique string that identifies the resource
-
getAccountSid
public final String getAccountSid()
Returns The The SID of the Account that created the resource.- Returns:
- The SID of the Account that created the resource
-
getServiceSid
public final String getServiceSid()
Returns The The SID of the Service that the resource is associated with.- Returns:
- The SID of the Service that the resource is associated with
-
getFriendlyName
public final String getFriendlyName()
Returns The The string that you assigned to describe the resource.- Returns:
- The string that you assigned to describe the resource
-
getType
public final Role.RoleType getType()
Returns The The type of role.- Returns:
- The type of role
-
getPermissions
public final List<String> getPermissions()
Returns The An array of the permissions the role has been granted.- Returns:
- An array of the permissions the role has been granted
-
getDateCreated
public final org.joda.time.DateTime getDateCreated()
Returns The The RFC 2822 date and time in GMT when the resource was created.- Returns:
- The RFC 2822 date and time in GMT when the resource was created
-
getDateUpdated
public final org.joda.time.DateTime getDateUpdated()
Returns The The RFC 2822 date and time in GMT when the resource was last updated.- Returns:
- The RFC 2822 date and time in GMT when the resource was last updated
-
getUrl
public final URI getUrl()
Returns The The absolute URL of the Role resource.- Returns:
- The absolute URL of the Role resource
-
-