##
#    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 V1 < Version
                class BrandRegistrationContext < InstanceContext

                     class BrandRegistrationOtpList < ListResource
                
                    ##
                    # Initialize the BrandRegistrationOtpList
                    # @param [Version] version Version that contains the resource
                    # @return [BrandRegistrationOtpList] BrandRegistrationOtpList
                    def initialize(version, brand_registration_sid: nil)
                        super(version)
                        # Path Solution
                        @solution = { brand_registration_sid: brand_registration_sid }
                        @uri = "/a2p/BrandRegistrations/#{@solution[:brand_registration_sid]}/SmsOtp"
                        
                    end
                    ##
                    # Create the BrandRegistrationOtpInstance
                    # @return [BrandRegistrationOtpInstance] Created BrandRegistrationOtpInstance
                    def create

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

                


                    # Provide a user friendly representation
                    def to_s
                        '#<Twilio.Messaging.V1.BrandRegistrationOtpList>'
                    end
                end

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

                        # Path Solution
                        @solution = solution
                    end

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

                    ##
                    # Provide a user friendly representation
                    def to_s
                        '<Twilio.Messaging.V1.BrandRegistrationOtpPage>'
                    end
                end
                class BrandRegistrationOtpInstance < InstanceResource
                    ##
                    # Initialize the BrandRegistrationOtpInstance
                    # @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 BrandRegistrationOtp
                    #   resource.
                    # @param [String] sid The SID of the Call resource to fetch.
                    # @return [BrandRegistrationOtpInstance] BrandRegistrationOtpInstance
                    def initialize(version, payload , brand_registration_sid: nil)
                        super(version)
                        
                        # Marshaled Properties
                        @properties = { 
                            'account_sid' => payload['account_sid'],
                            'brand_registration_sid' => payload['brand_registration_sid'],
                        }
                    end

                    
                    ##
                    # @return [String] The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Brand Registration resource.
                    def account_sid
                        @properties['account_sid']
                    end
                    
                    ##
                    # @return [String] The unique string to identify Brand Registration of Sole Proprietor Brand
                    def brand_registration_sid
                        @properties['brand_registration_sid']
                    end
                    
                    ##
                    # Provide a user friendly representation
                    def to_s
                        "<Twilio.Messaging.V1.BrandRegistrationOtpInstance>"
                    end

                    ##
                    # Provide a detailed, user friendly representation
                    def inspect
                        "<Twilio.Messaging.V1.BrandRegistrationOtpInstance>"
                    end
                end

             end
            end
        end
    end
end


