/*
 * 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');

/**
 * SSL certificates of an application gateway.
 *
 * @extends models['SubResource']
 */
class ApplicationGatewaySslCertificate extends models['SubResource'] {
  /**
   * Create a ApplicationGatewaySslCertificate.
   * @property {string} [data] Base-64 encoded pfx certificate. Only applicable
   * in PUT Request.
   * @property {string} [password] Password for the pfx file specified in data.
   * Only applicable in PUT request.
   * @property {string} [publicCertData] Base-64 encoded Public cert data
   * corresponding to pfx specified in data. Only applicable in GET request.
   * @property {string} [keyVaultSecretId] Secret Id of (base-64 encoded
   * unencrypted pfx) 'Secret' or 'Certificate' object stored in KeyVault.
   * @property {string} [provisioningState] Provisioning state of the SSL
   * certificate resource Possible values are: 'Updating', 'Deleting', and
   * 'Failed'.
   * @property {string} [name] Name of the SSL certificate that is unique
   * within an Application Gateway.
   * @property {string} [etag] A unique read-only string that changes whenever
   * the resource is updated.
   * @property {string} [type] Type of the resource.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of ApplicationGatewaySslCertificate
   *
   * @returns {object} metadata of ApplicationGatewaySslCertificate
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ApplicationGatewaySslCertificate',
      type: {
        name: 'Composite',
        className: 'ApplicationGatewaySslCertificate',
        modelProperties: {
          id: {
            required: false,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          data: {
            required: false,
            serializedName: 'properties.data',
            type: {
              name: 'String'
            }
          },
          password: {
            required: false,
            serializedName: 'properties.password',
            type: {
              name: 'String'
            }
          },
          publicCertData: {
            required: false,
            serializedName: 'properties.publicCertData',
            type: {
              name: 'String'
            }
          },
          keyVaultSecretId: {
            required: false,
            serializedName: 'properties.keyVaultSecretId',
            type: {
              name: 'String'
            }
          },
          provisioningState: {
            required: false,
            serializedName: 'properties.provisioningState',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          etag: {
            required: false,
            serializedName: 'etag',
            type: {
              name: 'String'
            }
          },
          type: {
            required: false,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = ApplicationGatewaySslCertificate;
