##
#    This code was generated by
#    ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
#     |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
#     |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \
#
#    Twilio - Chat
#    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 Chat
            class V3 < Version
                ##
                # Initialize the V3 version of Chat
                def initialize(domain)
                    super
                    @version = 'v3'
                    @channels = nil
                end

                ##
                # @param [String] service_sid The unique SID identifier of the Service.
                # @param [String] sid A 34 character string that uniquely identifies this Channel.
                # @return [Twilio::REST::Chat::V3::ChannelContext] if serviceSid was passed.
                # @return [Twilio::REST::Chat::V3::ChannelList]
                def channels(service_sid=:unset, sid=:unset)
                    if service_sid.nil?
                        raise ArgumentError, 'service_sid cannot be nil'
                    end
                    if sid.nil?
                        raise ArgumentError, 'sid cannot be nil'
                    end
                    if service_sid == :unset && sid == :unset
                        @channels ||= ChannelList.new self
                    else
                        ChannelContext.new(self, service_sid, sid)
                    end
                end
                ##
                # @param [String] service_sid The unique SID identifier of the Service.
                # @param [String] sid A 34 character string that uniquely identifies this Channel.
                # @return [Twilio::REST::Chat::V3::ChannelContext] if sid was passed.
                # @return [Twilio::REST::Chat::V3::ChannelList]
                def channels(service_sid=:unset, sid=:unset)
                    if service_sid.nil?
                        raise ArgumentError, 'service_sid cannot be nil'
                    end
                    if sid.nil?
                        raise ArgumentError, 'sid cannot be nil'
                    end
                    if service_sid == :unset && sid == :unset
                        @channels ||= ChannelList.new self
                    else
                        ChannelContext.new(self, service_sid, sid)
                    end
                end
                ##
                # Provide a user friendly representation
                def to_s
                    '<Twilio::REST::Chat::V3>';
                end
            end
        end
    end
end
