Class MemberCreator

    • Constructor Detail

      • MemberCreator

        public MemberCreator​(String pathServiceSid,
                             String pathChannelSid,
                             String identity)
        Construct a new MemberCreator.
        Parameters:
        pathServiceSid - The SID of the Service to create the resource under
        pathChannelSid - The SID of the channel the new member belongs to
        identity - The `identity` value that identifies the new resource's User
    • Method Detail

      • setRoleSid

        public MemberCreator setRoleSid​(String roleSid)
        The SID of the [Role](https://www.twilio.com/docs/chat/rest/roles) to assign to the member. The default roles are those specified on the [Service](https://www.twilio.com/docs/chat/api/services)..
        Parameters:
        roleSid - The SID of the Role to assign to the member
        Returns:
        this
      • setLastConsumedMessageIndex

        public MemberCreator setLastConsumedMessageIndex​(Integer lastConsumedMessageIndex)
        The index of the last [Message](https://www.twilio.com/docs/chat/rest/messages) in the [Channel](https://www.twilio.com/docs/chat/channels) that the Member has read. This parameter should only be used when recreating a Member from a backup/separate source..
        Parameters:
        lastConsumedMessageIndex - The index of the last Message in the Channel the Member has read
        Returns:
        this
      • setLastConsumptionTimestamp

        public MemberCreator setLastConsumptionTimestamp​(org.joda.time.DateTime lastConsumptionTimestamp)
        The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp of the last [Message](https://www.twilio.com/docs/chat/rest/messages) read event for the Member within the [Channel](https://www.twilio.com/docs/chat/channels)..
        Parameters:
        lastConsumptionTimestamp - The ISO 8601 based timestamp string representing the datetime of the last Message read event for the member within the Channel
        Returns:
        this
      • setDateCreated

        public MemberCreator setDateCreated​(org.joda.time.DateTime dateCreated)
        The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was created. The default value is the current time set by the Chat service. Note that this parameter should only be used when a Member is being recreated from a backup/separate source..
        Parameters:
        dateCreated - The ISO 8601 date and time in GMT when the resource was created
        Returns:
        this
      • setDateUpdated

        public MemberCreator setDateUpdated​(org.joda.time.DateTime dateUpdated)
        The date, specified in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, to assign to the resource as the date it was last updated. The default value is `null`. Note that this parameter should only be used when a Member is being recreated from a backup/separate source and where a Member was previously updated..
        Parameters:
        dateUpdated - The ISO 8601 date and time in GMT when the resource was updated
        Returns:
        this
      • setAttributes

        public MemberCreator setAttributes​(String attributes)
        A valid JSON string that contains application-specific data..
        Parameters:
        attributes - A valid JSON string that contains application-specific data
        Returns:
        this
      • create

        public Member create​(TwilioRestClient client)
        Make the request to the Twilio API to perform the create.
        Specified by:
        create in class Creator<Member>
        Parameters:
        client - TwilioRestClient with which to make the request
        Returns:
        Created Member