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

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

  /**
   * Defines the metadata of Fabric
   *
   * @returns {object} metadata of Fabric
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'Fabric',
      type: {
        name: 'Composite',
        className: 'Fabric',
        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'
            }
          },
          location: {
            required: false,
            serializedName: 'location',
            type: {
              name: 'String'
            }
          },
          properties: {
            required: false,
            serializedName: 'properties',
            type: {
              name: 'Composite',
              className: 'FabricProperties'
            }
          }
        }
      }
    };
  }
}

module.exports = Fabric;
