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

/**
 * Credentials to resources in the cluster.
 *
 */
class OperationalizationClusterCredentials {
  /**
   * Create a OperationalizationClusterCredentials.
   * @member {object} [storageAccount] Credentials for the Storage Account.
   * @member {string} [storageAccount.resourceId] The ARM resource ID of the
   * storage account.
   * @member {string} [storageAccount.primaryKey] The primary key of the
   * storage account.
   * @member {string} [storageAccount.secondaryKey] The secondary key of the
   * storage account.
   * @member {object} [containerRegistry] Credentials for Azure Container
   * Registry.
   * @member {string} [containerRegistry.loginServer] The ACR login server
   * name. User name is the first part of the FQDN.
   * @member {string} [containerRegistry.password] The ACR primary password.
   * @member {string} [containerRegistry.password2] The ACR secondary password.
   * @member {string} [containerRegistry.username] The ACR login username.
   * @member {object} [containerService] Credentials for Azure Container
   * Service.
   * @member {string} [containerService.acsKubeConfig] The ACS kube config
   * file.
   * @member {object} [containerService.servicePrincipalConfiguration] Service
   * principal configuration used by Kubernetes.
   * @member {string} [containerService.servicePrincipalConfiguration.clientId]
   * The service principal client ID
   * @member {string} [containerService.servicePrincipalConfiguration.secret]
   * The service principal secret. This is not returned in response of GET/PUT
   * on the resource. To see this please call listKeys.
   * @member {string} [containerService.imagePullSecretName] The ACR image pull
   * secret name which was created in Kubernetes.
   * @member {object} [appInsights] Credentials for Azure AppInsights.
   * @member {string} [appInsights.appId] The AppInsights application ID.
   * @member {string} [appInsights.instrumentationKey] The AppInsights
   * instrumentation key. This is not returned in response of GET/PUT on the
   * resource. To see this please call listKeys API.
   * @member {object} [serviceAuthConfiguration] Global authorization keys for
   * all user services deployed in cluster. These are used if the service does
   * not have auth keys.
   * @member {string} [serviceAuthConfiguration.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} [serviceAuthConfiguration.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} [sslConfiguration] The SSL configuration for the
   * services.
   * @member {string} [sslConfiguration.status] SSL status. Allowed values are
   * Enabled and Disabled. Possible values include: 'Enabled', 'Disabled'
   * @member {string} [sslConfiguration.cert] The SSL cert data in PEM format
   * encoded as base64 string
   * @member {string} [sslConfiguration.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} [sslConfiguration.cname] The CName of the certificate.
   */
  constructor() {
  }

  /**
   * Defines the metadata of OperationalizationClusterCredentials
   *
   * @returns {object} metadata of OperationalizationClusterCredentials
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'OperationalizationClusterCredentials',
      type: {
        name: 'Composite',
        className: 'OperationalizationClusterCredentials',
        modelProperties: {
          storageAccount: {
            required: false,
            serializedName: 'storageAccount',
            type: {
              name: 'Composite',
              className: 'StorageAccountCredentials'
            }
          },
          containerRegistry: {
            required: false,
            serializedName: 'containerRegistry',
            type: {
              name: 'Composite',
              className: 'ContainerRegistryCredentials'
            }
          },
          containerService: {
            required: false,
            serializedName: 'containerService',
            type: {
              name: 'Composite',
              className: 'ContainerServiceCredentials'
            }
          },
          appInsights: {
            required: false,
            serializedName: 'appInsights',
            type: {
              name: 'Composite',
              className: 'AppInsightsCredentials'
            }
          },
          serviceAuthConfiguration: {
            required: false,
            serializedName: 'serviceAuthConfiguration',
            type: {
              name: 'Composite',
              className: 'ServiceAuthConfiguration'
            }
          },
          sslConfiguration: {
            required: false,
            serializedName: 'sslConfiguration',
            type: {
              name: 'Composite',
              className: 'SslConfiguration'
            }
          }
        }
      }
    };
  }
}

module.exports = OperationalizationClusterCredentials;
