##
# This code was generated by
# \ / _    _  _|   _  _
#  | (_)\/(_)(_|\/| |(/_  v1.0.0
#       /       /       

module Twilio
  module REST
    class Api < Domain
      class V2010 < Version
        class AccountContext < InstanceContext
          class SmsList < ListResource
            ##
            # Initialize the SmsList
            # @param [Version] version Version that contains the resource
            # @param [String] account_sid A 34 character string that uniquely identifies this
            #   resource.
            
            # @return [SmsList] SmsList
            def initialize(version, account_sid: nil)
              super(version)
              
              # Path Solution
              @solution = {
                  account_sid: account_sid
              }
              
              # Components
              @messages = nil
              @short_codes = nil
            end
            
            ##
            # Access the messages
            # @param [String] sid The sid
            
            # @return [SmsMessageList] SmsMessageList
            def messages(sid=:unset)
              if sid != :unset
                return SmsMessageContext.new(
                    @version,
                    @solution[:account_sid],
                    sid,
                )
              end
              
                @messages ||= SmsMessageList.new(
                    @version,
                    account_sid: @solution[:account_sid],
                )
            end
            
            ##
            # Access the short_codes
            # @param [String] sid The short-code Sid that uniquely identifies this resource
            
            # @return [ShortCodeList] ShortCodeList
            def short_codes(sid=:unset)
              if sid != :unset
                return ShortCodeContext.new(
                    @version,
                    @solution[:account_sid],
                    sid,
                )
              end
              
                @short_codes ||= ShortCodeList.new(
                    @version,
                    account_sid: @solution[:account_sid],
                )
            end
            
            ##
            # Provide a user friendly representation
            def to_s
              '#<Twilio.Api.V2010.SmsList>'
            end
          end
        
          class SmsPage < Page
            ##
            # Initialize the SmsPage
            # @param [Version] version Version that contains the resource
            # @param [Response] response Response from the API
            # @param [Hash] solution Path solution for the resource
            # @param [String] account_sid A 34 character string that uniquely identifies this
            #   resource.
            
            # @return [SmsPage] SmsPage
            def initialize(version, response, solution)
              super(version, response)
              
              # Path Solution
              @solution = solution
            end
            
            ##
            # Build an instance of SmsInstance
            # @param [Hash] payload Payload response from the API
            
            # @return [SmsInstance] SmsInstance
            def get_instance(payload)
              return SmsInstance.new(
                  @version,
                  payload,
                  account_sid: @solution['account_sid'],
              )
            end
            
            ##
            # Provide a user friendly representation
            def to_s
              '<Twilio.Api.V2010.SmsPage>'
            end
          end
        
          class SmsInstance < InstanceResource
            ##
            # Initialize the SmsInstance
            # @param [Version] version Version that contains the resource
            # @param [Hash] payload payload that contains response from Twilio
            # @param [String] account_sid A 34 character string that uniquely identifies this
            #   resource.
            
            # @return [SmsInstance] SmsInstance
            def initialize(version, payload, account_sid: nil)
              super(version)
            end
            
            ##
            # Provide a user friendly representation
            def to_s
              "<Twilio.Api.V2010.SmsInstance>"
            end
          end
        end
      end
    end
  end
end