##
#    This code was generated by
#    ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
#     |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
#     |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \
#
#    Twilio - Events
#    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 Events
            class V1 < Version
                ##
                # Initialize the V1 version of Events
                def initialize(domain)
                    super
                    @version = 'v1'
                    @event_types = nil
                    @schemas = nil
                    @sinks = nil
                    @subscriptions = nil
                end

                ##
                # @param [String] type A string that uniquely identifies this Event Type.
                # @return [Twilio::REST::Events::V1::EventTypeContext] if type was passed.
                # @return [Twilio::REST::Events::V1::EventTypeList]
                def event_types(type=:unset)
                    if type.nil?
                        raise ArgumentError, 'type cannot be nil'
                    end
                    if type == :unset
                        @event_types ||= EventTypeList.new self
                    else
                        EventTypeContext.new(self, type)
                    end
                end
                ##
                # @param [String] id The unique identifier of the schema. Each schema can have multiple versions, that share the same id.
                # @return [Twilio::REST::Events::V1::SchemaContext] if id was passed.
                # @return [Twilio::REST::Events::V1::SchemaList]
                def schemas(id=:unset)
                    if id.nil?
                        raise ArgumentError, 'id cannot be nil'
                    end
                    if id == :unset
                        @schemas ||= SchemaList.new self
                    else
                        SchemaContext.new(self, id)
                    end
                end
                ##
                # @param [String] sid A 34 character string that uniquely identifies this Sink.
                # @return [Twilio::REST::Events::V1::SinkContext] if sid was passed.
                # @return [Twilio::REST::Events::V1::SinkList]
                def sinks(sid=:unset)
                    if sid.nil?
                        raise ArgumentError, 'sid cannot be nil'
                    end
                    if sid == :unset
                        @sinks ||= SinkList.new self
                    else
                        SinkContext.new(self, sid)
                    end
                end
                ##
                # @param [String] sid A 34 character string that uniquely identifies this Subscription.
                # @return [Twilio::REST::Events::V1::SubscriptionContext] if sid was passed.
                # @return [Twilio::REST::Events::V1::SubscriptionList]
                def subscriptions(sid=:unset)
                    if sid.nil?
                        raise ArgumentError, 'sid cannot be nil'
                    end
                    if sid == :unset
                        @subscriptions ||= SubscriptionList.new self
                    else
                        SubscriptionContext.new(self, sid)
                    end
                end
                ##
                # Provide a user friendly representation
                def to_s
                    '<Twilio::REST::Events::V1>';
                end
            end
        end
    end
end
