# 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::StreamAnalytics::Mgmt::V2016_03_01
  module Models
    #
    # The properties that are associated with data sources that use OAuth as
    # their authentication model.
    #
    class OAuthBasedDataSourceProperties

      include MsRestAzure

      # @return [String] A refresh token that can be used to obtain a valid
      # access token that can then be used to authenticate with the data
      # source. A valid refresh token is currently only obtainable via the
      # Azure Portal. It is recommended to put a dummy string value here when
      # creating the data source and then going to the Azure Portal to
      # authenticate the data source which will update this property with a
      # valid refresh token. Required on PUT (CreateOrReplace) requests.
      attr_accessor :refresh_token

      # @return [String] The user principal name (UPN) of the user that was
      # used to obtain the refresh token. Use this property to help remember
      # which user was used to obtain the refresh token.
      attr_accessor :token_user_principal_name

      # @return [String] The user display name of the user that was used to
      # obtain the refresh token. Use this property to help remember which user
      # was used to obtain the refresh token.
      attr_accessor :token_user_display_name


      #
      # Mapper for OAuthBasedDataSourceProperties class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'OAuthBasedDataSourceProperties',
          type: {
            name: 'Composite',
            class_name: 'OAuthBasedDataSourceProperties',
            model_properties: {
              refresh_token: {
                client_side_validation: true,
                required: false,
                serialized_name: 'refreshToken',
                type: {
                  name: 'String'
                }
              },
              token_user_principal_name: {
                client_side_validation: true,
                required: false,
                serialized_name: 'tokenUserPrincipalName',
                type: {
                  name: 'String'
                }
              },
              token_user_display_name: {
                client_side_validation: true,
                required: false,
                serialized_name: 'tokenUserDisplayName',
                type: {
                  name: 'String'
                }
              }
            }
          }
        }
      end
    end
  end
end
