# 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::ContainerRegistry::Mgmt::V2019_04_01
  module Models
    #
    # Describes the credentials that will be used to access a custom registry
    # during a run.
    #
    class CustomRegistryCredentials

      include MsRestAzure

      # @return [SecretObject] The username for logging into the custom
      # registry.
      attr_accessor :user_name

      # @return [SecretObject] The password for logging into the custom
      # registry. The password is a secret
      # object that allows multiple ways of providing the value for it.
      attr_accessor :password

      # @return [String] Indicates the managed identity assigned to the custom
      # credential. If a user-assigned identity
      # this value is the Client ID. If a system-assigned identity, the value
      # will be `system`. In
      # the case of a system-assigned identity, the Client ID will be
      # determined by the runner. This
      # identity may be used to authenticate to key vault to retrieve
      # credentials or it may be the only
      # source of authentication used for accessing the registry.
      attr_accessor :identity


      #
      # Mapper for CustomRegistryCredentials class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'CustomRegistryCredentials',
          type: {
            name: 'Composite',
            class_name: 'CustomRegistryCredentials',
            model_properties: {
              user_name: {
                client_side_validation: true,
                required: false,
                serialized_name: 'userName',
                type: {
                  name: 'Composite',
                  class_name: 'SecretObject'
                }
              },
              password: {
                client_side_validation: true,
                required: false,
                serialized_name: 'password',
                type: {
                  name: 'Composite',
                  class_name: 'SecretObject'
                }
              },
              identity: {
                client_side_validation: true,
                required: false,
                serialized_name: 'identity',
                type: {
                  name: 'String'
                }
              }
            }
          }
        }
      end
    end
  end
end
