# 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::CDN::Mgmt::V2020_09_01
  module Models
    #
    # Customer Certificate used for https
    #
    class CustomerCertificateParameters

      include MsRestAzure

      # @return [SecretType] The type of the Secret to create. Possible values
      # include: 'UrlSigningKey', 'CustomerCertificate', 'ManagedCertificate'
      attr_accessor :type

      # @return [String] Subject name in the certificate.
      attr_accessor :subject

      # @return [String] Certificate expiration date.
      attr_accessor :expiration_date

      # @return [String] Certificate thumbprint.
      attr_accessor :thumbprint

      # @return [ResourceReference] Resource reference to the KV secret
      attr_accessor :secret_source

      # @return [String] Version of the secret to be used
      attr_accessor :secret_version

      # @return [String] Certificate issuing authority.
      attr_accessor :certificate_authority

      # @return [Boolean] Whether to use the latest version for the certificate
      attr_accessor :use_latest_version

      # @return [Array<String>] The list of SANs.
      attr_accessor :subject_alternative_names


      #
      # Mapper for CustomerCertificateParameters class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'CustomerCertificate',
          type: {
            name: 'Composite',
            class_name: 'CustomerCertificateParameters',
            model_properties: {
              type: {
                client_side_validation: true,
                required: true,
                serialized_name: 'type',
                type: {
                  name: 'String'
                }
              },
              subject: {
                client_side_validation: true,
                required: false,
                serialized_name: 'subject',
                type: {
                  name: 'String'
                }
              },
              expiration_date: {
                client_side_validation: true,
                required: false,
                serialized_name: 'expirationDate',
                type: {
                  name: 'String'
                }
              },
              thumbprint: {
                client_side_validation: true,
                required: false,
                serialized_name: 'thumbprint',
                type: {
                  name: 'String'
                }
              },
              secret_source: {
                client_side_validation: true,
                required: true,
                serialized_name: 'secretSource',
                type: {
                  name: 'Composite',
                  class_name: 'ResourceReference'
                }
              },
              secret_version: {
                client_side_validation: true,
                required: false,
                serialized_name: 'secretVersion',
                type: {
                  name: 'String'
                }
              },
              certificate_authority: {
                client_side_validation: true,
                required: false,
                serialized_name: 'certificateAuthority',
                type: {
                  name: 'String'
                }
              },
              use_latest_version: {
                client_side_validation: true,
                required: false,
                serialized_name: 'useLatestVersion',
                type: {
                  name: 'Boolean'
                }
              },
              subject_alternative_names: {
                client_side_validation: true,
                required: false,
                serialized_name: 'subjectAlternativeNames',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'StringElementType',
                      type: {
                        name: 'String'
                      }
                  }
                }
              }
            }
          }
        }
      end
    end
  end
end
