# 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_05_01_preview
  module Models
    #
    # An object that represents a token for a container registry.
    #
    class Token < ProxyResource

      include MsRestAzure

      # @return [DateTime] The creation date of scope map.
      attr_accessor :creation_date

      # @return [ProvisioningState] Provisioning state of the resource.
      # Possible values include: 'Creating', 'Updating', 'Deleting',
      # 'Succeeded', 'Failed', 'Canceled'
      attr_accessor :provisioning_state

      # @return [String] The resource ID of the scope map to which the token
      # will be associated with.
      attr_accessor :scope_map_id

      # @return [TokenCredentialsProperties] The credentials that can be used
      # for authenticating the token.
      attr_accessor :credentials

      # @return [TokenStatus] The status of the token example enabled or
      # disabled. Possible values include: 'enabled', 'disabled'
      attr_accessor :status


      #
      # Mapper for Token class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'Token',
          type: {
            name: 'Composite',
            class_name: 'Token',
            model_properties: {
              id: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'id',
                type: {
                  name: 'String'
                }
              },
              name: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'name',
                type: {
                  name: 'String'
                }
              },
              type: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'type',
                type: {
                  name: 'String'
                }
              },
              system_data: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'systemData',
                type: {
                  name: 'Composite',
                  class_name: 'SystemData'
                }
              },
              creation_date: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.creationDate',
                type: {
                  name: 'DateTime'
                }
              },
              provisioning_state: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.provisioningState',
                type: {
                  name: 'String'
                }
              },
              scope_map_id: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.scopeMapId',
                type: {
                  name: 'String'
                }
              },
              credentials: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.credentials',
                type: {
                  name: 'Composite',
                  class_name: 'TokenCredentialsProperties'
                }
              },
              status: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.status',
                type: {
                  name: 'String'
                }
              }
            }
          }
        }
      end
    end
  end
end
