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

/**
 * The security profile which contains Ssh public key for the HDInsight
 * cluster.
 *
 */
class SecurityProfile {
  /**
   * Create a SecurityProfile.
   * @property {string} [directoryType] The directory type. Possible values
   * include: 'ActiveDirectory'
   * @property {string} [domain] The organization's active directory domain.
   * @property {string} [organizationalUnitDN] The organizational unit within
   * the Active Directory to place the cluster and service accounts.
   * @property {array} [ldapsUrls] The LDAPS protocol URLs to communicate with
   * the Active Directory.
   * @property {string} [domainUsername] The domain user account that will have
   * admin privileges on the cluster.
   * @property {string} [domainUserPassword] The domain admin password.
   * @property {array} [clusterUsersGroupDNs] Optional. The Distinguished Names
   * for cluster user groups
   * @property {string} [aaddsResourceId] The resource ID of the user's Azure
   * Active Directory Domain Service.
   * @property {string} [msiResourceId] User assigned identity that has
   * permissions to read and create cluster-related artifacts in the user's
   * AADDS.
   */
  constructor() {
  }

  /**
   * Defines the metadata of SecurityProfile
   *
   * @returns {object} metadata of SecurityProfile
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'SecurityProfile',
      type: {
        name: 'Composite',
        className: 'SecurityProfile',
        modelProperties: {
          directoryType: {
            required: false,
            serializedName: 'directoryType',
            type: {
              name: 'Enum',
              allowedValues: [ 'ActiveDirectory' ]
            }
          },
          domain: {
            required: false,
            serializedName: 'domain',
            type: {
              name: 'String'
            }
          },
          organizationalUnitDN: {
            required: false,
            serializedName: 'organizationalUnitDN',
            type: {
              name: 'String'
            }
          },
          ldapsUrls: {
            required: false,
            serializedName: 'ldapsUrls',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          domainUsername: {
            required: false,
            serializedName: 'domainUsername',
            type: {
              name: 'String'
            }
          },
          domainUserPassword: {
            required: false,
            serializedName: 'domainUserPassword',
            type: {
              name: 'String'
            }
          },
          clusterUsersGroupDNs: {
            required: false,
            serializedName: 'clusterUsersGroupDNs',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          aaddsResourceId: {
            required: false,
            serializedName: 'aaddsResourceId',
            type: {
              name: 'String'
            }
          },
          msiResourceId: {
            required: false,
            serializedName: 'msiResourceId',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = SecurityProfile;
