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

module Twilio
  module REST
    class Numbers < Domain
      class V2 < Version
        class RegulatoryComplianceList < ListResource
          ##
          # Initialize the RegulatoryComplianceList
          # @param [Version] version Version that contains the resource
          # @return [RegulatoryComplianceList] RegulatoryComplianceList
          def initialize(version)
            super(version)

            # Path Solution
            @solution = {}

            # Components
            @bundles = nil
            @end_users = nil
            @end_user_types = nil
            @regulations = nil
            @supporting_documents = nil
            @supporting_document_types = nil
          end

          ##
          # Access the bundles
          # @param [String] sid The unique string that we created to identify the Bundle
          #   resource.
          # @return [BundleList]
          # @return [BundleContext] if sid was passed.
          def bundles(sid=:unset)
            raise ArgumentError, 'sid cannot be nil' if sid.nil?

            if sid != :unset
              return BundleContext.new(@version, sid, )
            end

              @bundles ||= BundleList.new(@version, )
          end

          ##
          # Access the end_users
          # @param [String] sid The unique string created by Twilio to identify the End User
          #   resource.
          # @return [EndUserList]
          # @return [EndUserContext] if sid was passed.
          def end_users(sid=:unset)
            raise ArgumentError, 'sid cannot be nil' if sid.nil?

            if sid != :unset
              return EndUserContext.new(@version, sid, )
            end

              @end_users ||= EndUserList.new(@version, )
          end

          ##
          # Access the end_user_types
          # @param [String] sid The unique string that identifies the End-User Type
          #   resource.
          # @return [EndUserTypeList]
          # @return [EndUserTypeContext] if sid was passed.
          def end_user_types(sid=:unset)
            raise ArgumentError, 'sid cannot be nil' if sid.nil?

            if sid != :unset
              return EndUserTypeContext.new(@version, sid, )
            end

              @end_user_types ||= EndUserTypeList.new(@version, )
          end

          ##
          # Access the regulations
          # @param [String] sid The unique string that identifies the Regulation resource.
          # @return [RegulationList]
          # @return [RegulationContext] if sid was passed.
          def regulations(sid=:unset)
            raise ArgumentError, 'sid cannot be nil' if sid.nil?

            if sid != :unset
              return RegulationContext.new(@version, sid, )
            end

              @regulations ||= RegulationList.new(@version, )
          end

          ##
          # Access the supporting_documents
          # @param [String] sid The unique string created by Twilio to identify the
          #   Supporting Document resource.
          # @return [SupportingDocumentList]
          # @return [SupportingDocumentContext] if sid was passed.
          def supporting_documents(sid=:unset)
            raise ArgumentError, 'sid cannot be nil' if sid.nil?

            if sid != :unset
              return SupportingDocumentContext.new(@version, sid, )
            end

              @supporting_documents ||= SupportingDocumentList.new(@version, )
          end

          ##
          # Access the supporting_document_types
          # @param [String] sid The unique string that identifies the Supporting Document
          #   Type resource.
          # @return [SupportingDocumentTypeList]
          # @return [SupportingDocumentTypeContext] if sid was passed.
          def supporting_document_types(sid=:unset)
            raise ArgumentError, 'sid cannot be nil' if sid.nil?

            if sid != :unset
              return SupportingDocumentTypeContext.new(@version, sid, )
            end

              @supporting_document_types ||= SupportingDocumentTypeList.new(@version, )
          end

          ##
          # Provide a user friendly representation
          def to_s
            '#<Twilio.Numbers.V2.RegulatoryComplianceList>'
          end
        end

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

            # Path Solution
            @solution = solution
          end

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

          ##
          # Provide a user friendly representation
          def to_s
            '<Twilio.Numbers.V2.RegulatoryCompliancePage>'
          end
        end

        class RegulatoryComplianceInstance < InstanceResource
          ##
          # Initialize the RegulatoryComplianceInstance
          # @param [Version] version Version that contains the resource
          # @param [Hash] payload payload that contains response from Twilio
          # @return [RegulatoryComplianceInstance] RegulatoryComplianceInstance
          def initialize(version, payload)
            super(version)
          end

          ##
          # Provide a user friendly representation
          def to_s
            "<Twilio.Numbers.V2.RegulatoryComplianceInstance>"
          end

          ##
          # Provide a detailed, user friendly representation
          def inspect
            "<Twilio.Numbers.V2.RegulatoryComplianceInstance>"
          end
        end
      end
    end
  end
end