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

/**
 * Instance of an Azure ML Operationalization Cluster resource.
 *
 * @extends models['Resource']
 */
class OperationalizationCluster extends models['Resource'] {
  /**
   * Create a OperationalizationCluster.
   * @member {string} [description] The description of the cluster.
   * @member {date} [createdOn] The date and time when the cluster was created.
   * @member {date} [modifiedOn] The date and time when the cluster was last
   * modified.
   * @member {string} [provisioningState] The provision state of the cluster.
   * Valid values are Unknown, Updating, Provisioning, Succeeded, and Failed.
   * Possible values include: 'Unknown', 'Updating', 'Creating', 'Deleting',
   * 'Succeeded', 'Failed', 'Canceled'
   * @member {array} [provisioningErrors] List of provisioning errors reported
   * by the resource provider.
   * @member {string} clusterType The cluster type. Possible values include:
   * 'ACS', 'Local'
   * @member {object} [storageAccount] Storage Account properties.
   * @member {string} [storageAccount.resourceId] ARM resource ID of the Azure
   * Storage Account to store CLI specific files. If not provided one will be
   * created. This cannot be changed once the cluster is created.
   * @member {object} [containerRegistry] Container Registry properties.
   * @member {string} [containerRegistry.resourceId] ARM resource ID of the
   * Azure Container Registry used to store Docker images for web services in
   * the cluster. If not provided one will be created. This cannot be changed
   * once the cluster is created.
   * @member {object} [containerService] Parameters for the Azure Container
   * Service cluster.
   * @member {string} [containerService.clusterFqdn] The FQDN of the cluster.
   * @member {string} [containerService.orchestratorType] Type of orchestrator.
   * It cannot be changed once the cluster is created. Possible values include:
   * 'Kubernetes', 'None'
   * @member {object} [containerService.orchestratorProperties] Orchestrator
   * specific properties
   * @member {object}
   * [containerService.orchestratorProperties.servicePrincipal] The Azure
   * Service Principal used by Kubernetes
   * @member {string}
   * [containerService.orchestratorProperties.servicePrincipal.clientId] The
   * service principal client ID
   * @member {string}
   * [containerService.orchestratorProperties.servicePrincipal.secret] The
   * service principal secret. This is not returned in response of GET/PUT on
   * the resource. To see this please call listKeys.
   * @member {array} [containerService.systemServices] The system services
   * deployed to the cluster
   * @member {number} [containerService.masterCount] The number of master nodes
   * in the container service.
   * @member {number} [containerService.agentCount] The number of agent nodes
   * in the Container Service. This can be changed to scale the cluster.
   * @member {string} [containerService.agentVmSize] The Azure VM size of the
   * agent VM nodes. This cannot be changed once the cluster is created. This
   * list is non exhaustive; refer to
   * https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sizes for
   * the possible VM sizes. Possible values include: 'Standard_A0',
   * 'Standard_A1', 'Standard_A2', 'Standard_A3', 'Standard_A4', 'Standard_A5',
   * 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A9',
   * 'Standard_A10', 'Standard_A11', 'Standard_D1', 'Standard_D2',
   * 'Standard_D3', 'Standard_D4', 'Standard_D11', 'Standard_D12',
   * 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', 'Standard_D2_v2',
   * 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', 'Standard_D11_v2',
   * 'Standard_D12_v2', 'Standard_D13_v2', 'Standard_D14_v2', 'Standard_G1',
   * 'Standard_G2', 'Standard_G3', 'Standard_G4', 'Standard_G5',
   * 'Standard_DS1', 'Standard_DS2', 'Standard_DS3', 'Standard_DS4',
   * 'Standard_DS11', 'Standard_DS12', 'Standard_DS13', 'Standard_DS14',
   * 'Standard_GS1', 'Standard_GS2', 'Standard_GS3', 'Standard_GS4',
   * 'Standard_GS5'
   * @member {object} [appInsights] AppInsights configuration.
   * @member {string} [appInsights.resourceId] ARM resource ID of the App
   * Insights.
   * @member {object} [globalServiceConfiguration] Contains global
   * configuration for the web services in the cluster.
   * @member {object} [globalServiceConfiguration.additionalProperties]
   * Unmatched properties from the message are deserialized this collection
   * @member {string} [globalServiceConfiguration.etag] The configuartion ETag
   * for updates.
   * @member {object} [globalServiceConfiguration.ssl] The SSL configuration
   * properties
   * @member {string} [globalServiceConfiguration.ssl.status] SSL status.
   * Allowed values are Enabled and Disabled. Possible values include:
   * 'Enabled', 'Disabled'
   * @member {string} [globalServiceConfiguration.ssl.cert] The SSL cert data
   * in PEM format encoded as base64 string
   * @member {string} [globalServiceConfiguration.ssl.key] The SSL key data in
   * PEM format encoded as base64 string. This is not returned in response of
   * GET/PUT on the resource. To see this please call listKeys API.
   * @member {string} [globalServiceConfiguration.ssl.cname] The CName of the
   * certificate.
   * @member {object} [globalServiceConfiguration.serviceAuth] Optional global
   * authorization keys for all user services deployed in cluster. These are
   * used if the service does not have auth keys.
   * @member {string}
   * [globalServiceConfiguration.serviceAuth.primaryAuthKeyHash] The primary
   * auth key hash. This is not returned in response of GET/PUT on the
   * resource.. To see this please call listKeys API.
   * @member {string}
   * [globalServiceConfiguration.serviceAuth.secondaryAuthKeyHash] The
   * secondary auth key hash. This is not returned in response of GET/PUT on
   * the resource.. To see this please call listKeys API.
   * @member {object} [globalServiceConfiguration.autoScale] The auto-scale
   * configuration
   * @member {string} [globalServiceConfiguration.autoScale.status] If
   * auto-scale is enabled for all services. Each service can turn it off
   * individually. Possible values include: 'Enabled', 'Disabled'
   * @member {number} [globalServiceConfiguration.autoScale.minReplicas] The
   * minimum number of replicas for each service.
   * @member {number} [globalServiceConfiguration.autoScale.maxReplicas] The
   * maximum number of replicas for each service.
   * @member {number} [globalServiceConfiguration.autoScale.targetUtilization]
   * The target utilization.
   * @member {number}
   * [globalServiceConfiguration.autoScale.refreshPeriodInSeconds] Refresh
   * period in seconds.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of OperationalizationCluster
   *
   * @returns {object} metadata of OperationalizationCluster
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'OperationalizationCluster',
      type: {
        name: 'Composite',
        className: 'OperationalizationCluster',
        modelProperties: {
          id: {
            required: false,
            readOnly: true,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            readOnly: true,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          location: {
            required: true,
            serializedName: 'location',
            type: {
              name: 'String'
            }
          },
          type: {
            required: false,
            readOnly: true,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          },
          tags: {
            required: false,
            serializedName: 'tags',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          description: {
            required: false,
            serializedName: 'properties.description',
            type: {
              name: 'String'
            }
          },
          createdOn: {
            required: false,
            readOnly: true,
            serializedName: 'properties.createdOn',
            type: {
              name: 'DateTime'
            }
          },
          modifiedOn: {
            required: false,
            readOnly: true,
            serializedName: 'properties.modifiedOn',
            type: {
              name: 'DateTime'
            }
          },
          provisioningState: {
            required: false,
            readOnly: true,
            serializedName: 'properties.provisioningState',
            type: {
              name: 'String'
            }
          },
          provisioningErrors: {
            required: false,
            readOnly: true,
            serializedName: 'properties.provisioningErrors',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ErrorResponseWrapperElementType',
                  type: {
                    name: 'Composite',
                    className: 'ErrorResponseWrapper'
                  }
              }
            }
          },
          clusterType: {
            required: true,
            serializedName: 'properties.clusterType',
            type: {
              name: 'String'
            }
          },
          storageAccount: {
            required: false,
            serializedName: 'properties.storageAccount',
            type: {
              name: 'Composite',
              className: 'StorageAccountProperties'
            }
          },
          containerRegistry: {
            required: false,
            serializedName: 'properties.containerRegistry',
            type: {
              name: 'Composite',
              className: 'ContainerRegistryProperties'
            }
          },
          containerService: {
            required: false,
            serializedName: 'properties.containerService',
            type: {
              name: 'Composite',
              className: 'AcsClusterProperties'
            }
          },
          appInsights: {
            required: false,
            serializedName: 'properties.appInsights',
            type: {
              name: 'Composite',
              className: 'AppInsightsProperties'
            }
          },
          globalServiceConfiguration: {
            required: false,
            serializedName: 'properties.globalServiceConfiguration',
            type: {
              name: 'Composite',
              className: 'GlobalServiceConfiguration'
            }
          }
        }
      }
    };
  }
}

module.exports = OperationalizationCluster;
