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

/**
 * Fabric properties.
 *
 */
class FabricProperties {
  /**
   * Create a FabricProperties.
   * @member {string} [friendlyName] Friendly name of the fabric.
   * @member {object} [encryptionDetails] Encryption details for the fabric.
   * @member {string} [encryptionDetails.kekState] The key encryption key state
   * for the Vmm.
   * @member {string} [encryptionDetails.kekCertThumbprint] The key encryption
   * key certificate thumbprint.
   * @member {date} [encryptionDetails.kekCertExpiryDate] The key encryption
   * key certificate expiry date.
   * @member {object} [rolloverEncryptionDetails] Rollover encryption details
   * for the fabric.
   * @member {string} [rolloverEncryptionDetails.kekState] The key encryption
   * key state for the Vmm.
   * @member {string} [rolloverEncryptionDetails.kekCertThumbprint] The key
   * encryption key certificate thumbprint.
   * @member {date} [rolloverEncryptionDetails.kekCertExpiryDate] The key
   * encryption key certificate expiry date.
   * @member {string} [internalIdentifier] Dra Registration Id.
   * @member {string} [bcdrState] BCDR state of the fabric.
   * @member {object} [customDetails] Fabric specific settings.
   * @member {string} [customDetails.instanceType] Polymorphic Discriminator
   * @member {array} [healthErrorDetails] Fabric health error details.
   * @member {string} [health] Health of fabric.
   */
  constructor() {
  }

  /**
   * Defines the metadata of FabricProperties
   *
   * @returns {object} metadata of FabricProperties
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'FabricProperties',
      type: {
        name: 'Composite',
        className: 'FabricProperties',
        modelProperties: {
          friendlyName: {
            required: false,
            serializedName: 'friendlyName',
            type: {
              name: 'String'
            }
          },
          encryptionDetails: {
            required: false,
            serializedName: 'encryptionDetails',
            type: {
              name: 'Composite',
              className: 'EncryptionDetails'
            }
          },
          rolloverEncryptionDetails: {
            required: false,
            serializedName: 'rolloverEncryptionDetails',
            type: {
              name: 'Composite',
              className: 'EncryptionDetails'
            }
          },
          internalIdentifier: {
            required: false,
            serializedName: 'internalIdentifier',
            type: {
              name: 'String'
            }
          },
          bcdrState: {
            required: false,
            serializedName: 'bcdrState',
            type: {
              name: 'String'
            }
          },
          customDetails: {
            required: false,
            serializedName: 'customDetails',
            type: {
              name: 'Composite',
              polymorphicDiscriminator: {
                serializedName: 'instanceType',
                clientName: 'instanceType'
              },
              uberParent: 'FabricSpecificDetails',
              className: 'FabricSpecificDetails'
            }
          },
          healthErrorDetails: {
            required: false,
            serializedName: 'healthErrorDetails',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'HealthErrorElementType',
                  type: {
                    name: 'Composite',
                    className: 'HealthError'
                  }
              }
            }
          },
          health: {
            required: false,
            serializedName: 'health',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = FabricProperties;
