##
#    This code was generated by
#    ___ _ _ _ _ _    _ ____    ____ ____ _    ____ ____ _  _ ____ ____ ____ ___ __   __
#     |  | | | | |    | |  | __ |  | |__| | __ | __ |___ |\ | |___ |__/ |__|  | |  | |__/
#     |  |_|_| | |___ | |__|    |__| |  | |    |__] |___ | \| |___ |  \ |  |  | |__| |  \
#
#    Twilio - Flex
#    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 FlexApi
            class V1 < Version
                ##
                # Initialize the V1 version of FlexApi
                def initialize(domain)
                    super
                    @version = 'v1'
                    @assessments = nil
                    @channel = nil
                    @configuration = nil
                    @flex_flow = nil
                    @insights_assessments_comment = nil
                    @insights_conversations = nil
                    @insights_questionnaires = nil
                    @insights_questionnaires_category = nil
                    @insights_questionnaires_question = nil
                    @insights_segments = nil
                    @insights_session = nil
                    @insights_settings_answer_sets = nil
                    @insights_settings_comment = nil
                    @insights_user_roles = nil
                    @interaction = nil
                    @plugins = nil
                    @plugin_archive = nil
                    @plugin_configurations = nil
                    @plugin_configuration_archive = nil
                    @plugin_releases = nil
                    @plugin_version_archive = nil
                    @provisioning_status = nil
                    @web_channel = nil
                end

                ##
                # @param [String] assessment_sid The SID of the assessment to be modified
                # @return [Twilio::REST::FlexApi::V1::AssessmentsContext] if assessmentSid was passed.
                # @return [Twilio::REST::FlexApi::V1::AssessmentsList]
                def assessments(assessment_sid=:unset)
                    if assessment_sid.nil?
                        raise ArgumentError, 'assessment_sid cannot be nil'
                    end
                    if assessment_sid == :unset
                        @assessments ||= AssessmentsList.new self
                    else
                        AssessmentsContext.new(self, assessment_sid)
                    end
                end
                ##
                # @param [String] sid The SID of the Flex chat channel resource to fetch.
                # @return [Twilio::REST::FlexApi::V1::ChannelContext] if sid was passed.
                # @return [Twilio::REST::FlexApi::V1::ChannelList]
                def channel(sid=:unset)
                    if sid.nil?
                        raise ArgumentError, 'sid cannot be nil'
                    end
                    if sid == :unset
                        @channel ||= ChannelList.new self
                    else
                        ChannelContext.new(self, sid)
                    end
                end
                ##
                # @return [Twilio::REST::FlexApi::V1::configurationContext]
                def configuration
                    @configuration ||= ConfigurationContext.new self
                end
                ##
                # @param [String] sid The SID of the Flex Flow resource to fetch.
                # @return [Twilio::REST::FlexApi::V1::FlexFlowContext] if sid was passed.
                # @return [Twilio::REST::FlexApi::V1::FlexFlowList]
                def flex_flow(sid=:unset)
                    if sid.nil?
                        raise ArgumentError, 'sid cannot be nil'
                    end
                    if sid == :unset
                        @flex_flow ||= FlexFlowList.new self
                    else
                        FlexFlowContext.new(self, sid)
                    end
                end
                ##
                # @return [Twilio::REST::FlexApi::V1::InsightsAssessmentsCommentList]
                def insights_assessments_comment
                    @insights_assessments_comment ||= InsightsAssessmentsCommentList.new self
                end
                ##
                # @return [Twilio::REST::FlexApi::V1::InsightsConversationsList]
                def insights_conversations
                    @insights_conversations ||= InsightsConversationsList.new self
                end
                ##
                # @param [String] questionnaire_sid The SID of the questionnaire
                # @return [Twilio::REST::FlexApi::V1::InsightsQuestionnairesContext] if questionnaireSid was passed.
                # @return [Twilio::REST::FlexApi::V1::InsightsQuestionnairesList]
                def insights_questionnaires(questionnaire_sid=:unset)
                    if questionnaire_sid.nil?
                        raise ArgumentError, 'questionnaire_sid cannot be nil'
                    end
                    if questionnaire_sid == :unset
                        @insights_questionnaires ||= InsightsQuestionnairesList.new self
                    else
                        InsightsQuestionnairesContext.new(self, questionnaire_sid)
                    end
                end
                ##
                # @param [String] category_sid The SID of the category to be updated
                # @return [Twilio::REST::FlexApi::V1::InsightsQuestionnairesCategoryContext] if categorySid was passed.
                # @return [Twilio::REST::FlexApi::V1::InsightsQuestionnairesCategoryList]
                def insights_questionnaires_category(category_sid=:unset)
                    if category_sid.nil?
                        raise ArgumentError, 'category_sid cannot be nil'
                    end
                    if category_sid == :unset
                        @insights_questionnaires_category ||= InsightsQuestionnairesCategoryList.new self
                    else
                        InsightsQuestionnairesCategoryContext.new(self, category_sid)
                    end
                end
                ##
                # @param [String] question_sid The SID of the question
                # @return [Twilio::REST::FlexApi::V1::InsightsQuestionnairesQuestionContext] if questionSid was passed.
                # @return [Twilio::REST::FlexApi::V1::InsightsQuestionnairesQuestionList]
                def insights_questionnaires_question(question_sid=:unset)
                    if question_sid.nil?
                        raise ArgumentError, 'question_sid cannot be nil'
                    end
                    if question_sid == :unset
                        @insights_questionnaires_question ||= InsightsQuestionnairesQuestionList.new self
                    else
                        InsightsQuestionnairesQuestionContext.new(self, question_sid)
                    end
                end
                ##
                # @return [Twilio::REST::FlexApi::V1::InsightsSegmentsList]
                def insights_segments
                    @insights_segments ||= InsightsSegmentsList.new self
                end
                ##
                # @return [Twilio::REST::FlexApi::V1::insightsSessionContext]
                def insights_session
                    @insights_session ||= InsightsSessionContext.new self
                end
                ##
                # @return [Twilio::REST::FlexApi::V1::InsightsSettingsAnswerSetsList]
                def insights_settings_answer_sets
                    @insights_settings_answer_sets ||= InsightsSettingsAnswerSetsList.new self
                end
                ##
                # @return [Twilio::REST::FlexApi::V1::InsightsSettingsCommentList]
                def insights_settings_comment
                    @insights_settings_comment ||= InsightsSettingsCommentList.new self
                end
                ##
                # @return [Twilio::REST::FlexApi::V1::insightsUserRolesContext]
                def insights_user_roles
                    @insights_user_roles ||= InsightsUserRolesContext.new self
                end
                ##
                # @param [String] sid The SID of the Interaction resource to fetch.
                # @return [Twilio::REST::FlexApi::V1::InteractionContext] if sid was passed.
                # @return [Twilio::REST::FlexApi::V1::InteractionList]
                def interaction(sid=:unset)
                    if sid.nil?
                        raise ArgumentError, 'sid cannot be nil'
                    end
                    if sid == :unset
                        @interaction ||= InteractionList.new self
                    else
                        InteractionContext.new(self, sid)
                    end
                end
                ##
                # @param [String] sid The SID of the Flex Plugin resource to fetch.
                # @return [Twilio::REST::FlexApi::V1::PluginContext] if sid was passed.
                # @return [Twilio::REST::FlexApi::V1::PluginList]
                def plugins(sid=:unset)
                    if sid.nil?
                        raise ArgumentError, 'sid cannot be nil'
                    end
                    if sid == :unset
                        @plugins ||= PluginList.new self
                    else
                        PluginContext.new(self, sid)
                    end
                end
                ##
                # @param [String] sid The SID of the Flex Plugin resource to archive.
                # @return [Twilio::REST::FlexApi::V1::PluginArchiveContext] if sid was passed.
                # @return [Twilio::REST::FlexApi::V1::PluginArchiveList]
                def plugin_archive(sid=:unset)
                    if sid.nil?
                        raise ArgumentError, 'sid cannot be nil'
                    end
                    if sid == :unset
                        @plugin_archive ||= PluginArchiveList.new self
                    else
                        PluginArchiveContext.new(self, sid)
                    end
                end
                ##
                # @param [String] sid The SID of the Flex Plugin Configuration resource to fetch.
                # @return [Twilio::REST::FlexApi::V1::PluginConfigurationContext] if sid was passed.
                # @return [Twilio::REST::FlexApi::V1::PluginConfigurationList]
                def plugin_configurations(sid=:unset)
                    if sid.nil?
                        raise ArgumentError, 'sid cannot be nil'
                    end
                    if sid == :unset
                        @plugin_configurations ||= PluginConfigurationList.new self
                    else
                        PluginConfigurationContext.new(self, sid)
                    end
                end
                ##
                # @param [String] sid The SID of the Flex Plugin Configuration resource to archive.
                # @return [Twilio::REST::FlexApi::V1::PluginConfigurationArchiveContext] if sid was passed.
                # @return [Twilio::REST::FlexApi::V1::PluginConfigurationArchiveList]
                def plugin_configuration_archive(sid=:unset)
                    if sid.nil?
                        raise ArgumentError, 'sid cannot be nil'
                    end
                    if sid == :unset
                        @plugin_configuration_archive ||= PluginConfigurationArchiveList.new self
                    else
                        PluginConfigurationArchiveContext.new(self, sid)
                    end
                end
                ##
                # @param [String] sid The SID of the Flex Plugin Release resource to fetch.
                # @return [Twilio::REST::FlexApi::V1::PluginReleaseContext] if sid was passed.
                # @return [Twilio::REST::FlexApi::V1::PluginReleaseList]
                def plugin_releases(sid=:unset)
                    if sid.nil?
                        raise ArgumentError, 'sid cannot be nil'
                    end
                    if sid == :unset
                        @plugin_releases ||= PluginReleaseList.new self
                    else
                        PluginReleaseContext.new(self, sid)
                    end
                end
                ##
                # @param [String] plugin_sid The SID of the Flex Plugin the resource to belongs to.
                # @param [String] sid The SID of the Flex Plugin Version resource to archive.
                # @return [Twilio::REST::FlexApi::V1::PluginVersionArchiveContext] if pluginSid was passed.
                # @return [Twilio::REST::FlexApi::V1::PluginVersionArchiveList]
                def plugin_version_archive(plugin_sid=:unset, sid=:unset)
                    if plugin_sid.nil?
                        raise ArgumentError, 'plugin_sid cannot be nil'
                    end
                    if sid.nil?
                        raise ArgumentError, 'sid cannot be nil'
                    end
                    if plugin_sid == :unset && sid == :unset
                        @plugin_version_archive ||= PluginVersionArchiveList.new self
                    else
                        PluginVersionArchiveContext.new(self, plugin_sid, sid)
                    end
                end
                ##
                # @param [String] plugin_sid The SID of the Flex Plugin the resource to belongs to.
                # @param [String] sid The SID of the Flex Plugin Version resource to archive.
                # @return [Twilio::REST::FlexApi::V1::PluginVersionArchiveContext] if sid was passed.
                # @return [Twilio::REST::FlexApi::V1::PluginVersionArchiveList]
                def plugin_version_archive(plugin_sid=:unset, sid=:unset)
                    if plugin_sid.nil?
                        raise ArgumentError, 'plugin_sid cannot be nil'
                    end
                    if sid.nil?
                        raise ArgumentError, 'sid cannot be nil'
                    end
                    if plugin_sid == :unset && sid == :unset
                        @plugin_version_archive ||= PluginVersionArchiveList.new self
                    else
                        PluginVersionArchiveContext.new(self, plugin_sid, sid)
                    end
                end
                ##
                # @return [Twilio::REST::FlexApi::V1::provisioningStatusContext]
                def provisioning_status
                    @provisioning_status ||= ProvisioningStatusContext.new self
                end
                ##
                # @param [String] sid The SID of the WebChannel resource to fetch.
                # @return [Twilio::REST::FlexApi::V1::WebChannelContext] if sid was passed.
                # @return [Twilio::REST::FlexApi::V1::WebChannelList]
                def web_channel(sid=:unset)
                    if sid.nil?
                        raise ArgumentError, 'sid cannot be nil'
                    end
                    if sid == :unset
                        @web_channel ||= WebChannelList.new self
                    else
                        WebChannelContext.new(self, sid)
                    end
                end
                ##
                # Provide a user friendly representation
                def to_s
                    '<Twilio::REST::FlexApi::V1>';
                end
            end
        end
    end
end
