# 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::V2018_09_01
  module Models
    #
    # The parameters that describes a set of credentials that will be used when
    # a run is invoked.
    #
    class Credentials

      include MsRestAzure

      # @return [SourceRegistryCredentials] Describes the credential parameters
      # for accessing the source registry.
      attr_accessor :source_registry

      # @return [Hash{String => CustomRegistryCredentials}] Describes the
      # credential parameters for accessing other custom registries. The key
      # for the dictionary item will be the registry login server
      # (myregistry.azurecr.io) and
      # the value of the item will be the registry credentials for accessing
      # the registry.
      attr_accessor :custom_registries


      #
      # Mapper for Credentials class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'Credentials',
          type: {
            name: 'Composite',
            class_name: 'Credentials',
            model_properties: {
              source_registry: {
                client_side_validation: true,
                required: false,
                serialized_name: 'sourceRegistry',
                type: {
                  name: 'Composite',
                  class_name: 'SourceRegistryCredentials'
                }
              },
              custom_registries: {
                client_side_validation: true,
                required: false,
                serialized_name: 'customRegistries',
                type: {
                  name: 'Dictionary',
                  value: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'CustomRegistryCredentialsElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'CustomRegistryCredentials'
                      }
                  }
                }
              }
            }
          }
        }
      end
    end
  end
end
