/*
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Licensed under the MIT License. See License.txt in the project root for
 * license information.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is
 * regenerated.
 */

'use strict';

const models = require('./index');

/**
 * Key Vault container ARM resource for a certificate that is purchased through
 * Azure.
 *
 * @extends models['ProxyOnlyResource']
 */
class AppServiceCertificatePatchResource extends models['ProxyOnlyResource'] {
  /**
   * Create a AppServiceCertificatePatchResource.
   * @member {string} [keyVaultId] Key Vault resource Id.
   * @member {string} [keyVaultSecretName] Key Vault secret name.
   * @member {string} [provisioningState] Status of the Key Vault secret.
   * Possible values include: 'Initialized', 'WaitingOnCertificateOrder',
   * 'Succeeded', 'CertificateOrderFailed', 'OperationNotPermittedOnKeyVault',
   * 'AzureServiceUnauthorizedToAccessKeyVault', 'KeyVaultDoesNotExist',
   * 'KeyVaultSecretDoesNotExist', 'UnknownError', 'ExternalPrivateKey',
   * 'Unknown'
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of AppServiceCertificatePatchResource
   *
   * @returns {object} metadata of AppServiceCertificatePatchResource
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'AppServiceCertificatePatchResource',
      type: {
        name: 'Composite',
        className: 'AppServiceCertificatePatchResource',
        modelProperties: {
          id: {
            required: false,
            readOnly: true,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            readOnly: true,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          kind: {
            required: false,
            serializedName: 'kind',
            type: {
              name: 'String'
            }
          },
          type: {
            required: false,
            readOnly: true,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          },
          keyVaultId: {
            required: false,
            serializedName: 'properties.keyVaultId',
            type: {
              name: 'String'
            }
          },
          keyVaultSecretName: {
            required: false,
            serializedName: 'properties.keyVaultSecretName',
            type: {
              name: 'String'
            }
          },
          provisioningState: {
            required: false,
            readOnly: true,
            serializedName: 'properties.provisioningState',
            type: {
              name: 'Enum',
              allowedValues: [ 'Initialized', 'WaitingOnCertificateOrder', 'Succeeded', 'CertificateOrderFailed', 'OperationNotPermittedOnKeyVault', 'AzureServiceUnauthorizedToAccessKeyVault', 'KeyVaultDoesNotExist', 'KeyVaultSecretDoesNotExist', 'UnknownError', 'ExternalPrivateKey', 'Unknown' ]
            }
          }
        }
      }
    };
  }
}

module.exports = AppServiceCertificatePatchResource;
