# encoding: utf-8
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.

module Azure::Web::Mgmt::V2016_06_01
  module Models
    #
    # OAuth settings for the connection provider
    #
    class ApiOAuthSettings

      include MsRestAzure

      # @return [String] Identity provider
      attr_accessor :identity_provider

      # @return [String] Resource provider client id
      attr_accessor :client_id

      # @return [String] Client Secret needed for OAuth
      attr_accessor :client_secret

      # @return [Array<String>] OAuth scopes
      attr_accessor :scopes

      # @return [String] Url
      attr_accessor :redirect_url

      # @return Read only properties for this oauth setting.
      attr_accessor :properties

      # @return [Hash{String => ApiOAuthSettingsParameter}] OAuth parameters
      # key is the name of parameter
      attr_accessor :custom_parameters


      #
      # Mapper for ApiOAuthSettings class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'ApiOAuthSettings',
          type: {
            name: 'Composite',
            class_name: 'ApiOAuthSettings',
            model_properties: {
              identity_provider: {
                client_side_validation: true,
                required: false,
                serialized_name: 'identityProvider',
                type: {
                  name: 'String'
                }
              },
              client_id: {
                client_side_validation: true,
                required: false,
                serialized_name: 'clientId',
                type: {
                  name: 'String'
                }
              },
              client_secret: {
                client_side_validation: true,
                required: false,
                serialized_name: 'clientSecret',
                type: {
                  name: 'String'
                }
              },
              scopes: {
                client_side_validation: true,
                required: false,
                serialized_name: 'scopes',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'StringElementType',
                      type: {
                        name: 'String'
                      }
                  }
                }
              },
              redirect_url: {
                client_side_validation: true,
                required: false,
                serialized_name: 'redirectUrl',
                type: {
                  name: 'String'
                }
              },
              properties: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties',
                type: {
                  name: 'Object'
                }
              },
              custom_parameters: {
                client_side_validation: true,
                required: false,
                serialized_name: 'customParameters',
                type: {
                  name: 'Dictionary',
                  value: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'ApiOAuthSettingsParameterElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'ApiOAuthSettingsParameter'
                      }
                  }
                }
              }
            }
          }
        }
      end
    end
  end
end
