##
#    This code was generated by
#    ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
#     |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
#     |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \
#
#    Twilio - Messaging
#    This is the public Twilio REST API.
#
#    NOTE: This class is auto generated by OpenAPI Generator.
#    https://openapi-generator.tech
#    Do not edit the class manually.
#


module Twilio
    module REST
        class Messaging < MessagingBase
            class V2 < Version
                class ChannelsSenderList < ListResource
                
                    class MessagingV2ChannelsSenderProfile
                            # @param [name]: [String] The name of the sender. Required for WhatsApp senders and must follow [Meta's display name guidelines](https://www.facebook.com/business/help/757569725593362).
                            # @param [about]: [String] The profile about text for the sender.
                            # @param [address]: [String] The address of the sender.
                            # @param [description]: [String] The description of the sender.
                            # @param [logo_url]: [String] The logo URL of the sender.
                            # @param [banner_url]: [String] The banner URL of the sender.
                            # @param [privacy_url]: [String] The privacy URL of the sender. Must be a publicly accessible HTTP or HTTPS URI associated with the sender. 
                            # @param [terms_of_service_url]: [String] The terms of service URL of the sender.
                            # @param [accent_color]: [String] The color theme of the sender. Must be in hex format and have at least a 4:5:1 contrast ratio against white.
                            # @param [vertical]: [String] The vertical of the sender. Allowed values are: - `Automotive` - `Beauty, Spa and Salon` - `Clothing and Apparel` - `Education` - `Entertainment` - `Event Planning and Service` - `Finance and Banking` - `Food and Grocery` - `Public Service` - `Hotel and Lodging` - `Medical and Health` - `Non-profit` - `Professional Services` - `Shopping and Retail` - `Travel and Transportation` - `Restaurant` - `Other` 
                            # @param [websites]: [Hash] The websites of the sender.
                            # @param [emails]: [Hash] The emails of the sender.
                            # @param [phone_numbers]: [Hash] The phone numbers of the sender.
                        attr_accessor :name, :about, :address, :description, :logo_url, :banner_url, :privacy_url, :terms_of_service_url, :accent_color, :vertical, :websites, :emails, :phone_numbers
                        def initialize(payload)
                                @name = payload["name"]
                                @about = payload["about"]
                                @address = payload["address"]
                                @description = payload["description"]
                                @logo_url = payload["logo_url"]
                                @banner_url = payload["banner_url"]
                                @privacy_url = payload["privacy_url"]
                                @terms_of_service_url = payload["terms_of_service_url"]
                                @accent_color = payload["accent_color"]
                                @vertical = payload["vertical"]
                                @websites = payload["websites"]
                                @emails = payload["emails"]
                                @phone_numbers = payload["phone_numbers"]
                        end
                        def to_json(options = {})
                        {
                                "name": @name,
                                "about": @about,
                                "address": @address,
                                "description": @description,
                                "logo_url": @logo_url,
                                "banner_url": @banner_url,
                                "privacy_url": @privacy_url,
                                "terms_of_service_url": @terms_of_service_url,
                                "accent_color": @accent_color,
                                "vertical": @vertical,
                                "websites": @websites,
                                "emails": @emails,
                                "phone_numbers": @phone_numbers,
                        }.to_json(options)
                        end
                    end

                    class MessagingV2ChannelsSenderProfileGenericResponseEmails
                            # @param [email]: [String] 
                            # @param [label]: [String] 
                        attr_accessor :email, :label
                        def initialize(payload)
                                @email = payload["email"]
                                @label = payload["label"]
                        end
                        def to_json(options = {})
                        {
                                "email": @email,
                                "label": @label,
                        }.to_json(options)
                        end
                    end

                    class MessagingV2ChannelsSenderProfileGenericResponsePhoneNumbers
                            # @param [phone_number]: [String] 
                            # @param [label]: [String] 
                        attr_accessor :phone_number, :label
                        def initialize(payload)
                                @phone_number = payload["phone_number"]
                                @label = payload["label"]
                        end
                        def to_json(options = {})
                        {
                                "phone_number": @phone_number,
                                "label": @label,
                        }.to_json(options)
                        end
                    end

                    class MessagingV2ChannelsSenderProfileGenericResponseWebsites
                            # @param [website]: [String] 
                            # @param [label]: [String] 
                        attr_accessor :website, :label
                        def initialize(payload)
                                @website = payload["website"]
                                @label = payload["label"]
                        end
                        def to_json(options = {})
                        {
                                "website": @website,
                                "label": @label,
                        }.to_json(options)
                        end
                    end

                    class MessagingV2ChannelsSenderRequestsCreate
                            # @param [sender_id]: [String] The ID of the sender in `whatsapp:<E.164_PHONE_NUMBER>` format.
                            # @param [configuration]: [ChannelsSenderList.MessagingV2ChannelsSenderConfiguration] 
                            # @param [webhook]: [ChannelsSenderList.MessagingV2ChannelsSenderWebhook] 
                            # @param [profile]: [ChannelsSenderList.MessagingV2ChannelsSenderProfile] 
                        attr_accessor :sender_id, :configuration, :webhook, :profile
                        def initialize(payload)
                                @sender_id = payload["sender_id"]
                                @configuration = payload["configuration"]
                                @webhook = payload["webhook"]
                                @profile = payload["profile"]
                        end
                        def to_json(options = {})
                        {
                                "sender_id": @sender_id,
                                "configuration": @configuration,
                                "webhook": @webhook,
                                "profile": @profile,
                        }.to_json(options)
                        end
                    end

                    class MessagingV2ChannelsSenderRequestsUpdate
                            # @param [configuration]: [ChannelsSenderList.MessagingV2ChannelsSenderConfiguration] 
                            # @param [webhook]: [ChannelsSenderList.MessagingV2ChannelsSenderWebhook] 
                            # @param [profile]: [ChannelsSenderList.MessagingV2ChannelsSenderProfile] 
                        attr_accessor :configuration, :webhook, :profile
                        def initialize(payload)
                                @configuration = payload["configuration"]
                                @webhook = payload["webhook"]
                                @profile = payload["profile"]
                        end
                        def to_json(options = {})
                        {
                                "configuration": @configuration,
                                "webhook": @webhook,
                                "profile": @profile,
                        }.to_json(options)
                        end
                    end

                    class MessagingV2RcsCarrier
                            # @param [name]: [String] The name of the carrier. For example, `Verizon` or `AT&T` for US.
                            # @param [status]: [MessagingV2RcsCarrierStatus] 
                        attr_accessor :name, :status
                        def initialize(payload)
                                @name = payload["name"]
                                @status = payload["status"]
                        end
                        def to_json(options = {})
                        {
                                "name": @name,
                                "status": @status,
                        }.to_json(options)
                        end
                    end

                    class MessagingV2RcsComplianceCountryResponse
                            # @param [country]: [String] The ISO 3166-1 alpha-2 country code.
                            # @param [registration_sid]: [String] The default compliance registration SID (e.g., from CR-Google) that applies to all countries unless overridden in the `countries` array. 
                            # @param [status]: [MessagingV2RcsCountryStatus] 
                            # @param [carriers]: [Array<MessagingV2RcsCarrier>] 
                        attr_accessor :country, :registration_sid, :status, :carriers
                        def initialize(payload)
                                @country = payload["country"]
                                @registration_sid = payload["registration_sid"]
                                @status = payload["status"]
                                @carriers = payload["carriers"]
                        end
                        def to_json(options = {})
                        {
                                "country": @country,
                                "registration_sid": @registration_sid,
                                "status": @status,
                                "carriers": @carriers,
                        }.to_json(options)
                        end
                    end


                    class MessagingV2ChannelsSenderProfile
                            # @param [name]: [String] The name of the sender. Required for WhatsApp senders and must follow [Meta's display name guidelines](https://www.facebook.com/business/help/757569725593362).
                            # @param [about]: [String] The profile about text for the sender.
                            # @param [address]: [String] The address of the sender.
                            # @param [description]: [String] The description of the sender.
                            # @param [logo_url]: [String] The logo URL of the sender.
                            # @param [banner_url]: [String] The banner URL of the sender.
                            # @param [privacy_url]: [String] The privacy URL of the sender. Must be a publicly accessible HTTP or HTTPS URI associated with the sender. 
                            # @param [terms_of_service_url]: [String] The terms of service URL of the sender.
                            # @param [accent_color]: [String] The color theme of the sender. Must be in hex format and have at least a 4:5:1 contrast ratio against white.
                            # @param [vertical]: [String] The vertical of the sender. Allowed values are: - `Automotive` - `Beauty, Spa and Salon` - `Clothing and Apparel` - `Education` - `Entertainment` - `Event Planning and Service` - `Finance and Banking` - `Food and Grocery` - `Public Service` - `Hotel and Lodging` - `Medical and Health` - `Non-profit` - `Professional Services` - `Shopping and Retail` - `Travel and Transportation` - `Restaurant` - `Other` 
                            # @param [websites]: [Hash] The websites of the sender.
                            # @param [emails]: [Hash] The emails of the sender.
                            # @param [phone_numbers]: [Hash] The phone numbers of the sender.
                        attr_accessor :name, :about, :address, :description, :logo_url, :banner_url, :privacy_url, :terms_of_service_url, :accent_color, :vertical, :websites, :emails, :phone_numbers
                        def initialize(payload)
                                @name = payload["name"]
                                @about = payload["about"]
                                @address = payload["address"]
                                @description = payload["description"]
                                @logo_url = payload["logo_url"]
                                @banner_url = payload["banner_url"]
                                @privacy_url = payload["privacy_url"]
                                @terms_of_service_url = payload["terms_of_service_url"]
                                @accent_color = payload["accent_color"]
                                @vertical = payload["vertical"]
                                @websites = payload["websites"]
                                @emails = payload["emails"]
                                @phone_numbers = payload["phone_numbers"]
                        end
                        def to_json(options = {})
                        {
                                "name": @name,
                                "about": @about,
                                "address": @address,
                                "description": @description,
                                "logo_url": @logo_url,
                                "banner_url": @banner_url,
                                "privacy_url": @privacy_url,
                                "terms_of_service_url": @terms_of_service_url,
                                "accent_color": @accent_color,
                                "vertical": @vertical,
                                "websites": @websites,
                                "emails": @emails,
                                "phone_numbers": @phone_numbers,
                        }.to_json(options)
                        end
                    end

                    class MessagingV2ChannelsSenderProfileGenericResponseEmails
                            # @param [email]: [String] 
                            # @param [label]: [String] 
                        attr_accessor :email, :label
                        def initialize(payload)
                                @email = payload["email"]
                                @label = payload["label"]
                        end
                        def to_json(options = {})
                        {
                                "email": @email,
                                "label": @label,
                        }.to_json(options)
                        end
                    end

                    class MessagingV2ChannelsSenderProfileGenericResponsePhoneNumbers
                            # @param [phone_number]: [String] 
                            # @param [label]: [String] 
                        attr_accessor :phone_number, :label
                        def initialize(payload)
                                @phone_number = payload["phone_number"]
                                @label = payload["label"]
                        end
                        def to_json(options = {})
                        {
                                "phone_number": @phone_number,
                                "label": @label,
                        }.to_json(options)
                        end
                    end

                    class MessagingV2ChannelsSenderProfileGenericResponseWebsites
                            # @param [website]: [String] 
                            # @param [label]: [String] 
                        attr_accessor :website, :label
                        def initialize(payload)
                                @website = payload["website"]
                                @label = payload["label"]
                        end
                        def to_json(options = {})
                        {
                                "website": @website,
                                "label": @label,
                        }.to_json(options)
                        end
                    end

                    class MessagingV2ChannelsSenderRequestsCreate
                            # @param [sender_id]: [String] The ID of the sender in `whatsapp:<E.164_PHONE_NUMBER>` format.
                            # @param [configuration]: [ChannelsSenderList.MessagingV2ChannelsSenderConfiguration] 
                            # @param [webhook]: [ChannelsSenderList.MessagingV2ChannelsSenderWebhook] 
                            # @param [profile]: [ChannelsSenderList.MessagingV2ChannelsSenderProfile] 
                        attr_accessor :sender_id, :configuration, :webhook, :profile
                        def initialize(payload)
                                @sender_id = payload["sender_id"]
                                @configuration = payload["configuration"]
                                @webhook = payload["webhook"]
                                @profile = payload["profile"]
                        end
                        def to_json(options = {})
                        {
                                "sender_id": @sender_id,
                                "configuration": @configuration,
                                "webhook": @webhook,
                                "profile": @profile,
                        }.to_json(options)
                        end
                    end

                    class MessagingV2ChannelsSenderRequestsUpdate
                            # @param [configuration]: [ChannelsSenderList.MessagingV2ChannelsSenderConfiguration] 
                            # @param [webhook]: [ChannelsSenderList.MessagingV2ChannelsSenderWebhook] 
                            # @param [profile]: [ChannelsSenderList.MessagingV2ChannelsSenderProfile] 
                        attr_accessor :configuration, :webhook, :profile
                        def initialize(payload)
                                @configuration = payload["configuration"]
                                @webhook = payload["webhook"]
                                @profile = payload["profile"]
                        end
                        def to_json(options = {})
                        {
                                "configuration": @configuration,
                                "webhook": @webhook,
                                "profile": @profile,
                        }.to_json(options)
                        end
                    end

                    class MessagingV2RcsCarrier
                            # @param [name]: [String] The name of the carrier. For example, `Verizon` or `AT&T` for US.
                            # @param [status]: [MessagingV2RcsCarrierStatus] 
                        attr_accessor :name, :status
                        def initialize(payload)
                                @name = payload["name"]
                                @status = payload["status"]
                        end
                        def to_json(options = {})
                        {
                                "name": @name,
                                "status": @status,
                        }.to_json(options)
                        end
                    end

                    class MessagingV2RcsComplianceCountryResponse
                            # @param [country]: [String] The ISO 3166-1 alpha-2 country code.
                            # @param [registration_sid]: [String] The default compliance registration SID (e.g., from CR-Google) that applies to all countries unless overridden in the `countries` array. 
                            # @param [status]: [MessagingV2RcsCountryStatus] 
                            # @param [carriers]: [Array<MessagingV2RcsCarrier>] 
                        attr_accessor :country, :registration_sid, :status, :carriers
                        def initialize(payload)
                                @country = payload["country"]
                                @registration_sid = payload["registration_sid"]
                                @status = payload["status"]
                                @carriers = payload["carriers"]
                        end
                        def to_json(options = {})
                        {
                                "country": @country,
                                "registration_sid": @registration_sid,
                                "status": @status,
                                "carriers": @carriers,
                        }.to_json(options)
                        end
                    end


                    ##
                    # Initialize the ChannelsSenderList
                    # @param [Version] version Version that contains the resource
                    # @return [ChannelsSenderList] ChannelsSenderList
                    def initialize(version)
                        super(version)
                        # Path Solution
                        @solution = {  }
                        @uri = "/Channels/Senders"
                        
                    end
                    ##
                    # Create the ChannelsSenderInstance
                    # @param [MessagingV2ChannelsSenderRequestsCreate] messaging_v2_channels_sender_requests_create 
                    # @return [ChannelsSenderInstance] Created ChannelsSenderInstance
                    def create(messaging_v2_channels_sender_requests_create: nil
                    )

                        headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
                        headers['Content-Type'] = 'application/json'
                        
                        
                        
                        
                        payload = @version.create('POST', @uri, headers: headers, data: messaging_v2_channels_sender_requests_create.to_json)
                        ChannelsSenderInstance.new(
                            @version,
                            payload,
                        )
                    end

                
                    ##
                    # Lists ChannelsSenderInstance records from the API as a list.
                    # Unlike stream(), this operation is eager and will load `limit` records into
                    # memory before returning.
                    # @param [String] channel 
                    # @param [Integer] limit Upper limit for the number of records to return. stream()
                    #    guarantees to never return more than limit.  Default is no limit
                    # @param [Integer] page_size Number of records to fetch per request, when
                    #    not set will use the default value of 50 records.  If no page_size is defined
                    #    but a limit is defined, stream() will attempt to read the limit with the most
                    #    efficient page size, i.e. min(limit, 1000)
                    # @return [Array] Array of up to limit results
                    def list(channel: nil, limit: nil, page_size: nil)
                        self.stream(
                            channel: channel,
                            limit: limit,
                            page_size: page_size
                        ).entries
                    end

                    ##
                    # Streams Instance records from the API as an Enumerable.
                    # This operation lazily loads records as efficiently as possible until the limit
                    # is reached.
                    # @param [String] channel 
                    # @param [Integer] limit Upper limit for the number of records to return. stream()
                    #    guarantees to never return more than limit.  Default is no limit
                    # @param [Integer] page_size Number of records to fetch per request, when
                    #    not set will use the default value of 50 records.  If no page_size is defined
                    #    but a limit is defined, stream() will attempt to read the limit with the most
                    #    efficient page size, i.e. min(limit, 1000)
                    # @return [Enumerable] Enumerable that will yield up to limit results
                    def stream(channel: nil, limit: nil, page_size: nil)
                        limits = @version.read_limits(limit, page_size)

                        page = self.page(
                            channel: channel,
                            page_size: limits[:page_size], )

                        @version.stream(page, limit: limits[:limit], page_limit: limits[:page_limit])
                    end

                    ##
                    # When passed a block, yields ChannelsSenderInstance records from the API.
                    # This operation lazily loads records as efficiently as possible until the limit
                    # is reached.
                    def each
                        limits = @version.read_limits

                        page = self.page(page_size: limits[:page_size], )

                        @version.stream(page,
                            limit: limits[:limit],
                            page_limit: limits[:page_limit]).each {|x| yield x}
                    end

                    ##
                    # Retrieve a single page of ChannelsSenderInstance records from the API.
                    # Request is executed immediately.
                    # @param [String] channel 
                    # @param [String] page_token PageToken provided by the API
                    # @param [Integer] page_number Page Number, this value is simply for client state
                    # @param [Integer] page_size Number of records to return, defaults to 50
                    # @return [Page] Page of ChannelsSenderInstance
                    def page(channel: nil, page_token: :unset, page_number: :unset, page_size: :unset)
                        params = Twilio::Values.of({
                            'Channel' => channel,
                            'PageToken' => page_token,
                            'Page' => page_number,
                            'PageSize' => page_size,
                        })
                        headers = Twilio::Values.of({})
                        
                        

                        response = @version.page('GET', @uri, params: params, headers: headers)

                        ChannelsSenderPage.new(@version, response, @solution)
                    end

                    ##
                    # Retrieve a single page of ChannelsSenderInstance records from the API.
                    # Request is executed immediately.
                    # @param [String] target_url API-generated URL for the requested results page
                    # @return [Page] Page of ChannelsSenderInstance
                    def get_page(target_url)
                        response = @version.domain.request(
                            'GET',
                            target_url
                        )
                    ChannelsSenderPage.new(@version, response, @solution)
                    end
                    


                    # Provide a user friendly representation
                    def to_s
                        '#<Twilio.Messaging.V2.ChannelsSenderList>'
                    end
                end


                class ChannelsSenderContext < InstanceContext
                    ##
                    # Initialize the ChannelsSenderContext
                    # @param [Version] version Version that contains the resource
                    # @param [String] sid The SID of the sender.
                    # @return [ChannelsSenderContext] ChannelsSenderContext
                    def initialize(version, sid)
                        super(version)

                        # Path Solution
                        @solution = { sid: sid,  }
                        @uri = "/Channels/Senders/#{@solution[:sid]}"

                        
                    end
                    ##
                    # Delete the ChannelsSenderInstance
                    # @return [Boolean] True if delete succeeds, false otherwise
                    def delete

                        headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
                        
                        
                        
                        @version.delete('DELETE', @uri, headers: headers)
                    end

                    ##
                    # Fetch the ChannelsSenderInstance
                    # @return [ChannelsSenderInstance] Fetched ChannelsSenderInstance
                    def fetch

                        headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
                        
                        
                        
                        
                        
                        payload = @version.fetch('GET', @uri, headers: headers)
                        ChannelsSenderInstance.new(
                            @version,
                            payload,
                            sid: @solution[:sid],
                        )
                    end

                    ##
                    # Update the ChannelsSenderInstance
                    # @param [MessagingV2ChannelsSenderRequestsUpdate] messaging_v2_channels_sender_requests_update 
                    # @return [ChannelsSenderInstance] Updated ChannelsSenderInstance
                    def update(messaging_v2_channels_sender_requests_update: :unset
                    )

                        headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
                        headers['Content-Type'] = 'application/json'
                        
                        
                        
                        
                        payload = @version.update('POST', @uri, headers: headers, data: messaging_v2_channels_sender_requests_update.to_json)
                        ChannelsSenderInstance.new(
                            @version,
                            payload,
                            sid: @solution[:sid],
                        )
                    end


                    ##
                    # Provide a user friendly representation
                    def to_s
                        context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
                        "#<Twilio.Messaging.V2.ChannelsSenderContext #{context}>"
                    end

                    ##
                    # Provide a detailed, user friendly representation
                    def inspect
                        context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
                        "#<Twilio.Messaging.V2.ChannelsSenderContext #{context}>"
                    end
                end

                class ChannelsSenderPage < Page
                    ##
                    # Initialize the ChannelsSenderPage
                    # @param [Version] version Version that contains the resource
                    # @param [Response] response Response from the API
                    # @param [Hash] solution Path solution for the resource
                    # @return [ChannelsSenderPage] ChannelsSenderPage
                    def initialize(version, response, solution)
                        super(version, response)

                        # Path Solution
                        @solution = solution
                    end

                    ##
                    # Build an instance of ChannelsSenderInstance
                    # @param [Hash] payload Payload response from the API
                    # @return [ChannelsSenderInstance] ChannelsSenderInstance
                    def get_instance(payload)
                        ChannelsSenderInstance.new(@version, payload)
                    end

                    ##
                    # Provide a user friendly representation
                    def to_s
                        '<Twilio.Messaging.V2.ChannelsSenderPage>'
                    end
                end
                class ChannelsSenderInstance < InstanceResource
                    ##
                    # Initialize the ChannelsSenderInstance
                    # @param [Version] version Version that contains the resource
                    # @param [Hash] payload payload that contains response from Twilio
                    # @param [String] account_sid The SID of the
                    #   {Account}[https://www.twilio.com/docs/iam/api/account] that created this ChannelsSender
                    #   resource.
                    # @param [String] sid The SID of the Call resource to fetch.
                    # @return [ChannelsSenderInstance] ChannelsSenderInstance
                    def initialize(version, payload , sid: nil)
                        super(version)
                        
                        # Marshaled Properties
                        @properties = { 
                            'sid' => payload['sid'],
                            'status' => payload['status'],
                            'sender_id' => payload['sender_id'],
                            'configuration' => payload['configuration'],
                            'webhook' => payload['webhook'],
                            'profile' => payload['profile'],
                            'properties' => payload['properties'],
                            'offline_reasons' => payload['offline_reasons'],
                            'compliance' => payload['compliance'],
                            'url' => payload['url'],
                        }

                        # Context
                        @instance_context = nil
                        @params = { 'sid' => sid  || @properties['sid']  , }
                    end

                    ##
                    # Generate an instance context for the instance, the context is capable of
                    # performing various actions.  All instance actions are proxied to the context
                    # @return [ChannelsSenderContext] CallContext for this CallInstance
                    def context
                        unless @instance_context
                            @instance_context = ChannelsSenderContext.new(@version , @params['sid'])
                        end
                        @instance_context
                    end
                    
                    ##
                    # @return [String] The SID of the sender.
                    def sid
                        @properties['sid']
                    end
                    
                    ##
                    # @return [Status] 
                    def status
                        @properties['status']
                    end
                    
                    ##
                    # @return [String] The ID of the sender in `whatsapp:<E.164_PHONE_NUMBER>` format.
                    def sender_id
                        @properties['sender_id']
                    end
                    
                    ##
                    # @return [MessagingV2ChannelsSenderConfiguration] 
                    def configuration
                        @properties['configuration']
                    end
                    
                    ##
                    # @return [MessagingV2ChannelsSenderWebhook] 
                    def webhook
                        @properties['webhook']
                    end
                    
                    ##
                    # @return [MessagingV2ChannelsSenderProfileGenericResponse] 
                    def profile
                        @properties['profile']
                    end
                    
                    ##
                    # @return [MessagingV2ChannelsSenderProperties] 
                    def properties
                        @properties['properties']
                    end
                    
                    ##
                    # @return [Array<MessagingV2ChannelsSenderOfflineReasonsItems>] The reasons why the sender is offline.
                    def offline_reasons
                        @properties['offline_reasons']
                    end
                    
                    ##
                    # @return [MessagingV2RcsComplianceResponse] 
                    def compliance
                        @properties['compliance']
                    end
                    
                    ##
                    # @return [String] The URL of the resource.
                    def url
                        @properties['url']
                    end
                    
                    ##
                    # Delete the ChannelsSenderInstance
                    # @return [Boolean] True if delete succeeds, false otherwise
                    def delete

                        context.delete
                    end

                    ##
                    # Fetch the ChannelsSenderInstance
                    # @return [ChannelsSenderInstance] Fetched ChannelsSenderInstance
                    def fetch

                        context.fetch
                    end

                    ##
                    # Update the ChannelsSenderInstance
                    # @param [MessagingV2ChannelsSenderRequestsUpdate] messaging_v2_channels_sender_requests_update 
                    # @return [ChannelsSenderInstance] Updated ChannelsSenderInstance
                    def update(messaging_v2_channels_sender_requests_update: :unset
                    )

                        context.update(
                        )
                    end

                    ##
                    # Provide a user friendly representation
                    def to_s
                        values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
                        "<Twilio.Messaging.V2.ChannelsSenderInstance #{values}>"
                    end

                    ##
                    # Provide a detailed, user friendly representation
                    def inspect
                        values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
                        "<Twilio.Messaging.V2.ChannelsSenderInstance #{values}>"
                    end
                end

            end
        end
    end
end
