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

/**
 * The storage account credential.
 *
 * @extends models['BaseModel']
 */
class StorageAccountCredential extends models['BaseModel'] {
  /**
   * Create a StorageAccountCredential.
   * @member {string} endPoint The storage endpoint
   * @member {string} sslStatus Signifies whether SSL needs to be enabled or
   * not. Possible values include: 'Enabled', 'Disabled'
   * @member {object} [accessKey] The details of the storage account password.
   * @member {string} [accessKey.value] The value of the secret.
   * @member {string} [accessKey.encryptionCertThumbprint] Thumbprint
   * certificate that was used to encrypt "Value". If the value in unencrypted,
   * it will be null.
   * @member {string} [accessKey.encryptionAlgorithm] The algorithm used to
   * encrypt "Value". Possible values include: 'None', 'AES256',
   * 'RSAES_PKCS1_v_1_5'
   * @member {number} [volumesCount] The count of volumes using this storage
   * account credential.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of StorageAccountCredential
   *
   * @returns {object} metadata of StorageAccountCredential
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'StorageAccountCredential',
      type: {
        name: 'Composite',
        className: 'StorageAccountCredential',
        modelProperties: {
          id: {
            required: false,
            readOnly: true,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            readOnly: true,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          type: {
            required: false,
            readOnly: true,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          },
          kind: {
            required: false,
            serializedName: 'kind',
            type: {
              name: 'Enum',
              allowedValues: [ 'Series8000' ]
            }
          },
          endPoint: {
            required: true,
            serializedName: 'properties.endPoint',
            type: {
              name: 'String'
            }
          },
          sslStatus: {
            required: true,
            serializedName: 'properties.sslStatus',
            type: {
              name: 'Enum',
              allowedValues: [ 'Enabled', 'Disabled' ]
            }
          },
          accessKey: {
            required: false,
            serializedName: 'properties.accessKey',
            type: {
              name: 'Composite',
              className: 'AsymmetricEncryptedSecret'
            }
          },
          volumesCount: {
            required: false,
            readOnly: true,
            serializedName: 'properties.volumesCount',
            type: {
              name: 'Number'
            }
          }
        }
      }
    };
  }
}

module.exports = StorageAccountCredential;
