text: /*
   * 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 cluster resource
   *
   *
   * @extends models['Resource']
   */
  class Cluster extends models['Resource'] {
    /**
     * Create a Cluster.
     * @member {array} [availableClusterVersions] The Service Fabric runtime
     * versions available for this cluster.
     * @member {string} [clusterId] A service generated unique identifier for the
     * cluster resource.
     * @member {string} [clusterState] Possible values include:
     * 'WaitingForNodes', 'Deploying', 'BaselineUpgrade',
     * 'UpdatingUserConfiguration', 'UpdatingUserCertificate',
     * 'UpdatingInfrastructure', 'EnforcingClusterVersion',
     * 'UpgradeServiceUnreachable', 'AutoScale', 'Ready'
     * @member {string} [clusterEndpoint] The Azure Resource Provider endpoint. A
     * system service in the cluster connects to this  endpoint.
     * @member {string} [clusterCodeVersion] The Service Fabric runtime version
     * of the cluster. This property can only by set the user when
     * **upgradeMode** is set to 'Manual'. To get list of available Service
     * Fabric versions for new clusters use [ClusterVersion
     * API](./ClusterVersion.md). To get the list of available version for
     * existing clusters use **availableClusterVersions**.
     * @member {object} [certificate] The certificate to use for securing the
     * cluster. The certificate provided will be used for  node to node security
     * within the cluster, SSL certificate for cluster management endpoint and
     * default  admin client.
     * @member {string} [certificate.thumbprint] Thumbprint of the primary
     * certificate.
     * @member {string} [certificate.thumbprintSecondary] Thumbprint of the
     * secondary certificate.
     * @member {string} [certificate.x509StoreName] The local certificate store
     * location. Possible values include: 'AddressBook', 'AuthRoot',
     * 'CertificateAuthority', 'Disallowed', 'My', 'Root', 'TrustedPeople',
     * 'TrustedPublisher'
     * @member {string} [reliabilityLevel] Possible values include: 'None',
     * 'Bronze', 'Silver', 'Gold', 'Platinum'
     * @member {string} [upgradeMode] Possible values include: 'Automatic',
     * 'Manual'
     * @member {array} [clientCertificateThumbprints] The list of client
     * certificates referenced by thumbprint that are allowed to manage the
     * cluster.
     * @member {array} [clientCertificateCommonNames] The list of client
     * certificates referenced by common name that are allowed to manage the
     * cluster.
     * @member {array} [fabricSettings] The list of custom fabric settings to
     * configure the cluster.
     * @member {object} [reverseProxyCertificate] The server certificate used by
     * reverse proxy.
     * @member {string} [reverseProxyCertificate.thumbprint] Thumbprint of the
     * primary certificate.
     * @member {string} [reverseProxyCertificate.thumbprintSecondary] Thumbprint
     * of the secondary certificate.
     * @member {string} [reverseProxyCertificate.x509StoreName] The local
     * certificate store location. Possible values include: 'AddressBook',
     * 'AuthRoot', 'CertificateAuthority', 'Disallowed', 'My', 'Root',
     * 'TrustedPeople', 'TrustedPublisher'
     * @member {string} managementEndpoint The http management endpoint of the
     * cluster.
     * @member {array} nodeTypes The list of node types in the cluster.
     * @member {object} [azureActiveDirectory] The AAD authentication settings of
     * the cluster.
     * @member {string} [azureActiveDirectory.tenantId] Azure active directory
     * tenant id.
     * @member {string} [azureActiveDirectory.clusterApplication] Azure active
     * directory cluster application id.
     * @member {string} [azureActiveDirectory.clientApplication] Azure active
     * directory client application id.
     * @member {string} [provisioningState] The provisioning state of the cluster
     * resource. Possible values include: 'Updating', 'Succeeded', 'Failed',
     * 'Canceled'
     * @member {string} [vmImage] The VM image VMSS has been configured with.
     * Generic names such as Windows or Linux can be used.
     * @member {object} [diagnosticsStorageAccountConfig] The storage account
     * information for storing Service Fabric diagnostic logs.
     * @member {string} [diagnosticsStorageAccountConfig.storageAccountName] The
     * Azure storage account name.
     * @member {string} [diagnosticsStorageAccountConfig.protectedAccountKeyName]
     * The protected diagnostics storage key name.
     * @member {string} [diagnosticsStorageAccountConfig.blobEndpoint] The blob
     * endpoint of the azure storage account.
     * @member {string} [diagnosticsStorageAccountConfig.queueEndpoint] The queue
     * endpoint of the azure storage account.
     * @member {string} [diagnosticsStorageAccountConfig.tableEndpoint] The table
     * endpoint of the azure storage account.
     * @member {object} [upgradeDescription] The policy to use when upgrading the
     * cluster.
     * @member {boolean} [upgradeDescription.forceRestart] If true, then
     * processes are forcefully restarted during upgrade even when the code
     * version has not changed (the upgrade only changes configuration or data).
     * @member {string} [upgradeDescription.upgradeReplicaSetCheckTimeout] The
     * maximum amount of time to block processing of an upgrade domain and revent
     * loss of availability when there are unexpected issues. When this timeout
     * expires, processing of the upgrade domain will proceed regardless of
     * availability loss issues. The timeout is reset at the start of each
     * upgrade domain. The timeout can be in either hh:mm:ss or in d.hh:mm:ss.ms
     * format.
     * @member {string} [upgradeDescription.healthCheckWaitDuration] The length
     * of time to wait after completing an upgrade domain before performing
     * health checks. The duration can be in either hh:mm:ss or in d.hh:mm:ss.ms
     * format.
     * @member {string} [upgradeDescription.healthCheckStableDuration] The amount
     * of time that the application or cluster must remain healthy before the
     * upgrade proceeds to the next upgrade domain. The duration can be in either
     * hh:mm:ss or in d.hh:mm:ss.ms format.
     * @member {string} [upgradeDescription.healthCheckRetryTimeout] The amount
     * of time to retry health evaluation when the application or cluster is
     * unhealthy before the upgrade rolls back. The timeout can be in either
     * hh:mm:ss or in d.hh:mm:ss.ms format.
     * @member {string} [upgradeDescription.upgradeTimeout] The amount of time
     * the overall upgrade has to complete before the upgrade rolls back. The
     * timeout can be in either hh:mm:ss or in d.hh:mm:ss.ms format.
     * @member {string} [upgradeDescription.upgradeDomainTimeout] The amount of
     * time each upgrade domain has to complete before the upgrade rolls back.
     * The timeout can be in either hh:mm:ss or in d.hh:mm:ss.ms format.
     * @member {object} [upgradeDescription.healthPolicy] The cluster health
     * policy used when upgrading the cluster.
     * @member {number}
     * [upgradeDescription.healthPolicy.maxPercentUnhealthyNodes] The maximum
     * allowed percentage of unhealthy nodes before reporting an error. For
     * example, to allow 10% of nodes to be unhealthy, this value would be 10.
     * @member {number}
     * [upgradeDescription.healthPolicy.maxPercentUnhealthyApplications] The
     * maximum allowed percentage of unhealthy applications before reporting an
     * error. For example, to allow 10% of applications to be unhealthy, this
     * value would be 10.
     * @member {object} [upgradeDescription.deltaHealthPolicy] The delta health
     * policy used when upgrading the cluster.
     * @member {number}
     * [upgradeDescription.deltaHealthPolicy.maxPercentDeltaUnhealthyNodes] The
     * maximum allowed percentage of nodes health degradation allowed during
     * cluster upgrades. The delta is measured between the state of the nodes at
     * the beginning of upgrade and the state of the nodes at the time of the
     * health evaluation. The check is performed after every upgrade domain
     * upgrade completion to make sure the global state of the cluster is within
     * tolerated limits.
     * @member {number}
     * [upgradeDescription.deltaHealthPolicy.maxPercentUpgradeDomainDeltaUnhealthyNodes]
     * The maximum allowed percentage of upgrade domain nodes health degradation
     * allowed during cluster upgrades. The delta is measured between the state
     * of the upgrade domain nodes at the beginning of upgrade and the state of
     * the upgrade domain nodes at the time of the health evaluation. The check
     * is performed after every upgrade domain upgrade completion for all
     * completed upgrade domains to make sure the state of the upgrade domains is
     * within tolerated limits.
     * @member {number}
     * [upgradeDescription.deltaHealthPolicy.maxPercentDeltaUnhealthyApplications]
     * The maximum allowed percentage of applications health degradation allowed
     * during cluster upgrades. The delta is measured between the state of the
     * applications at the beginning of upgrade and the state of the applications
     * at the time of the health evaluation. The check is performed after every
     * upgrade domain upgrade completion to make sure the global state of the
     * cluster is within tolerated limits. System services are not included in
     * this.
     * @member {array} [addOnFeatures] The list of add-on features to enable in
     * the cluster.
     */
    constructor() {
      super();
    }
  
    /**
     * Defines the metadata of Cluster
     *
     * @returns {object} metadata of Cluster
     *
     */
    mapper() {
      return {
        required: false,
        serializedName: 'Cluster',
        type: {
          name: 'Composite',
          className: 'Cluster',
          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: true,
              serializedName: 'location',
              type: {
                name: 'String'
              }
            },
            tags: {
              required: false,
              serializedName: 'tags',
              type: {
                name: 'Dictionary',
                value: {
                    required: false,
                    serializedName: 'StringElementType',
                    type: {
                      name: 'String'
                    }
                }
              }
            },
            availableClusterVersions: {
              required: false,
              serializedName: 'properties.availableClusterVersions',
              type: {
                name: 'Sequence',
                element: {
                    required: false,
                    serializedName: 'ClusterVersionDetailsElementType',
                    type: {
                      name: 'Composite',
                      className: 'ClusterVersionDetails'
                    }
                }
              }
            },
            clusterId: {
              required: false,
              readOnly: true,
              serializedName: 'properties.clusterId',
              type: {
                name: 'String'
              }
            },
            clusterState: {
              required: false,
              serializedName: 'properties.clusterState',
              type: {
                name: 'String'
              }
            },
            clusterEndpoint: {
              required: false,
              readOnly: true,
              serializedName: 'properties.clusterEndpoint',
              type: {
                name: 'String'
              }
            },
            clusterCodeVersion: {
              required: false,
              serializedName: 'properties.clusterCodeVersion',
              type: {
                name: 'String'
              }
            },
            certificate: {
              required: false,
              serializedName: 'properties.certificate',
              type: {
                name: 'Composite',
                className: 'CertificateDescription'
              }
            },
            reliabilityLevel: {
              required: false,
              serializedName: 'properties.reliabilityLevel',
              type: {
                name: 'String'
              }
            },
            upgradeMode: {
              required: false,
              serializedName: 'properties.upgradeMode',
              type: {
                name: 'String'
              }
            },
            clientCertificateThumbprints: {
              required: false,
              serializedName: 'properties.clientCertificateThumbprints',
              type: {
                name: 'Sequence',
                element: {
                    required: false,
                    serializedName: 'ClientCertificateThumbprintElementType',
                    type: {
                      name: 'Composite',
                      className: 'ClientCertificateThumbprint'
                    }
                }
              }
            },
            clientCertificateCommonNames: {
              required: false,
              serializedName: 'properties.clientCertificateCommonNames',
              type: {
                name: 'Sequence',
                element: {
                    required: false,
                    serializedName: 'ClientCertificateCommonNameElementType',
                    type: {
                      name: 'Composite',
                      className: 'ClientCertificateCommonName'
                    }
                }
              }
            },
            fabricSettings: {
              required: false,
              serializedName: 'properties.fabricSettings',
              type: {
                name: 'Sequence',
                element: {
                    required: false,
                    serializedName: 'SettingsSectionDescriptionElementType',
                    type: {
                      name: 'Composite',
                      className: 'SettingsSectionDescription'
                    }
                }
              }
            },
            reverseProxyCertificate: {
              required: false,
              serializedName: 'properties.reverseProxyCertificate',
              type: {
                name: 'Composite',
                className: 'CertificateDescription'
              }
            },
            managementEndpoint: {
              required: true,
              serializedName: 'properties.managementEndpoint',
              type: {
                name: 'String'
              }
            },
            nodeTypes: {
              required: true,
              serializedName: 'properties.nodeTypes',
              type: {
                name: 'Sequence',
                element: {
                    required: false,
                    serializedName: 'NodeTypeDescriptionElementType',
                    type: {
                      name: 'Composite',
                      className: 'NodeTypeDescription'
                    }
                }
              }
            },
            azureActiveDirectory: {
              required: false,
              serializedName: 'properties.azureActiveDirectory',
              type: {
                name: 'Composite',
                className: 'AzureActiveDirectory'
              }
            },
            provisioningState: {
              required: false,
              readOnly: true,
              serializedName: 'properties.provisioningState',
              type: {
                name: 'String'
              }
            },
            vmImage: {
              required: false,
              serializedName: 'properties.vmImage',
              type: {
                name: 'String'
              }
            },
            diagnosticsStorageAccountConfig: {
              required: false,
              serializedName: 'properties.diagnosticsStorageAccountConfig',
              type: {
                name: 'Composite',
                className: 'DiagnosticsStorageAccountConfig'
              }
            },
            upgradeDescription: {
              required: false,
              serializedName: 'properties.upgradeDescription',
              type: {
                name: 'Composite',
                className: 'ClusterUpgradePolicy'
              }
            },
            addOnFeatures: {
              required: false,
              serializedName: 'properties.addOnFeatures',
              type: {
                name: 'Sequence',
                element: {
                    required: false,
                    serializedName: 'StringElementType',
                    type: {
                      name: 'String'
                    }
                }
              }
            }
          }
        }
      };
    }
  }
  
  module.exports = Cluster;
  