# 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
    #
    # The properties of a certificate used for authenticating a token.
    #
    class TokenCertificate

      include MsRestAzure

      # @return [TokenCertificateName] Possible values include: 'certificate1',
      # 'certificate2'
      attr_accessor :name

      # @return [DateTime] The expiry datetime of the certificate.
      attr_accessor :expiry

      # @return [String] The thumbprint of the certificate.
      attr_accessor :thumbprint

      # @return [String] Base 64 encoded string of the public certificate1 in
      # PEM format that will be used for authenticating the token.
      attr_accessor :encoded_pem_certificate


      #
      # Mapper for TokenCertificate class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'TokenCertificate',
          type: {
            name: 'Composite',
            class_name: 'TokenCertificate',
            model_properties: {
              name: {
                client_side_validation: true,
                required: false,
                serialized_name: 'name',
                type: {
                  name: 'String'
                }
              },
              expiry: {
                client_side_validation: true,
                required: false,
                serialized_name: 'expiry',
                type: {
                  name: 'DateTime'
                }
              },
              thumbprint: {
                client_side_validation: true,
                required: false,
                serialized_name: 'thumbprint',
                type: {
                  name: 'String'
                }
              },
              encoded_pem_certificate: {
                client_side_validation: true,
                required: false,
                serialized_name: 'encodedPemCertificate',
                type: {
                  name: 'String'
                }
              }
            }
          }
        }
      end
    end
  end
end
