Class Role

    • 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 from
        pathSid - 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 from
        pathSid - 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 under
        friendlyName - A string to describe the new resource
        type - The type of role
        permission - 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 from
        pathSid - The unique string that identifies the resource
        permission - 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 String
        objectMapper - 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 InputStream
        objectMapper - 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
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object