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 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 SID of the Account that created the resource.
|
ZonedDateTime |
getDateCreated()
Returns The RFC 2822 date and time in GMT when the resource was created.
|
ZonedDateTime |
getDateUpdated()
Returns The RFC 2822 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 |
getServiceSid()
Returns The SID of the Service that the resource is associated with.
|
String |
getSid()
Returns The unique string that identifies the resource.
|
Role.RoleType |
getType()
Returns The type of role.
|
URI |
getUrl()
Returns The absolute URL of the Role resource.
|
int |
hashCode() |
static RoleReader |
reader(String pathServiceSid)
Create a RoleReader to execute read.
|
static RoleUpdater |
updater(String pathServiceSid,
String pathSid,
List<String> permission)
Create a RoleUpdater to execute update.
|
public static RoleFetcher fetcher(String pathServiceSid, String pathSid)
pathServiceSid
- The SID of the Service to fetch the resource frompathSid
- The unique string that identifies the resourcepublic static RoleDeleter deleter(String pathServiceSid, String pathSid)
pathServiceSid
- The SID of the Service to delete the resource frompathSid
- The unique string that identifies the resourcepublic static RoleCreator creator(String pathServiceSid, String friendlyName, Role.RoleType type, List<String> permission)
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 havepublic static RoleReader reader(String pathServiceSid)
pathServiceSid
- The SID of the Service to read the resources frompublic static RoleUpdater updater(String pathServiceSid, String pathSid, List<String> permission)
pathServiceSid
- The SID of the Service to update the resource frompathSid
- The unique string that identifies the resourcepermission
- A permission the role should havepublic 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 getServiceSid()
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.