##
#    This code was generated by
#    ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
#     |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
#     |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \
#
#    Twilio - Voice
#    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 Voice < VoiceBase
            class V1 < Version
                class DialingPermissionsList < ListResource
                
                    ##
                    # Initialize the DialingPermissionsList
                    # @param [Version] version Version that contains the resource
                    # @return [DialingPermissionsList] DialingPermissionsList
                    def initialize(version)
                        super(version)
                        # Path Solution
                        @solution = {  }
                        @uri = "/DialingPermissions"
                        # Components
                        @bulk_country_updates = nil
                        @countries = nil
                        @settings = nil
                    end
                

                ##
                # Access the bulk_country_updates
                # @return [BulkCountryUpdateList]
                # @return [BulkCountryUpdateContext]
                def bulk_country_updates
                    @bulk_country_updates ||= BulkCountryUpdateList.new(@version )
                end
                ##
                # Access the countries
                # @return [CountryList]
                # @return [CountryContext] if sid was passed.
                def countries(iso_code=:unset)
                    raise ArgumentError, 'iso_code cannot be nil' if iso_code.nil?

                    if iso_code != :unset
                        return CountryContext.new(@version,iso_code )
                    end

                    @countries ||= CountryList.new(@version )
                end
                ##
                # Access the settings
                # @return [SettingsContext]
                def settings
                   return  SettingsContext.new(@version)
                end

                    # Provide a user friendly representation
                    def to_s
                        '#<Twilio.Voice.V1.DialingPermissionsList>'
                    end
                end

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

                        # Path Solution
                        @solution = solution
                    end

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

                    ##
                    # Provide a user friendly representation
                    def to_s
                        '<Twilio.Voice.V1.DialingPermissionsPage>'
                    end
                end
                class DialingPermissionsInstance < InstanceResource
                    ##
                    # Initialize the DialingPermissionsInstance
                    # @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 DialingPermissions
                    #   resource.
                    # @param [String] sid The SID of the Call resource to fetch.
                    # @return [DialingPermissionsInstance] DialingPermissionsInstance
                    def initialize(version )
                        super(version)
                        
                    end

                    
                    ##
                    # Provide a user friendly representation
                    def to_s
                        "<Twilio.Voice.V1.DialingPermissionsInstance>"
                    end

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

            end
        end
    end
end
