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

/**
 * Domain service.
 *
 * @extends models['Resource']
 */
class DomainService extends models['Resource'] {
  /**
   * Create a DomainService.
   * @member {string} [tenantId] Azure Active Directory tenant id
   * @member {string} [domainName] The name of the Azure domain that the user
   * would like to deploy Domain Services to.
   * @member {string} [vnetSiteId] Virtual network site id
   * @member {string} [subnetId] The name of the virtual network that Domain
   * Services will be deployed on. The id of the subnet that Domain Services
   * will be deployed on. /virtualNetwork/vnetName/subnets/subnetName.
   * @member {object} [ldapsSettings] Secure LDAP Settings
   * @member {string} [ldapsSettings.ldaps] A flag to determine whether or not
   * Secure LDAP is enabled or disabled. Possible values include: 'Enabled',
   * 'Disabled'
   * @member {string} [ldapsSettings.pfxCertificate] The certificate required
   * to configure Secure LDAP. The parameter passed here should be a
   * base64encoded representation of the certificate pfx file.
   * @member {string} [ldapsSettings.pfxCertificatePassword] The password to
   * decrypt the provided Secure LDAP certificate pfx file.
   * @member {string} [ldapsSettings.publicCertificate] Public certificate used
   * to configure secure ldap.
   * @member {string} [ldapsSettings.certificateThumbprint] Thumbprint of
   * configure ldaps certificate.
   * @member {date} [ldapsSettings.certificateNotAfter] NotAfter DateTime of
   * configure ldaps certificate.
   * @member {string} [ldapsSettings.externalAccess] A flag to determine
   * whether or not Secure LDAP access over the internet is enabled or
   * disabled. Possible values include: 'Enabled', 'Disabled'
   * @member {string} [ldapsSettings.externalAccessIpAddress] External access
   * ip address.
   * @member {date} [healthLastEvaluated] Last domain evaluation run DateTime
   * @member {array} [healthMonitors] List of Domain Health Monitors
   * @member {array} [healthAlerts] List of Domain Health Alerts
   * @member {object} [notificationSettings] Notification Settings
   * @member {string} [notificationSettings.notifyGlobalAdmins] Should global
   * admins be notified. Possible values include: 'Enabled', 'Disabled'
   * @member {string} [notificationSettings.notifyDcAdmins] Should domain
   * controller admins be notified. Possible values include: 'Enabled',
   * 'Disabled'
   * @member {array} [notificationSettings.additionalRecipients] The list of
   * additional recipients
   * @member {object} [domainSecuritySettings] DomainSecurity Settings
   * @member {string} [domainSecuritySettings.ntlmV1] A flag to determine
   * whether or not NtlmV1 is enabled or disabled. Possible values include:
   * 'Enabled', 'Disabled'
   * @member {string} [domainSecuritySettings.tlsV1] A flag to determine
   * whether or not TlsV1 is enabled or disabled. Possible values include:
   * 'Enabled', 'Disabled'
   * @member {string} [domainSecuritySettings.syncNtlmPasswords] A flag to
   * determine whether or not SyncNtlmPasswords is enabled or disabled.
   * Possible values include: 'Enabled', 'Disabled'
   * @member {string} [filteredSync] Enabled or Disabled flag to turn on
   * Group-based filtered sync. Possible values include: 'Enabled', 'Disabled'
   * @member {array} [domainControllerIpAddress] List of Domain Controller IP
   * Address
   * @member {string} [serviceStatus] Status of Domain Service instance
   * @member {string} [provisioningState] the current deployment or
   * provisioning state, which only appears in the response.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of DomainService
   *
   * @returns {object} metadata of DomainService
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'DomainService',
      type: {
        name: 'Composite',
        className: 'DomainService',
        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'
            }
          },
          tags: {
            required: false,
            serializedName: 'tags',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          etag: {
            required: false,
            serializedName: 'etag',
            type: {
              name: 'String'
            }
          },
          tenantId: {
            required: false,
            readOnly: true,
            serializedName: 'properties.tenantId',
            type: {
              name: 'String'
            }
          },
          domainName: {
            required: false,
            serializedName: 'properties.domainName',
            type: {
              name: 'String'
            }
          },
          vnetSiteId: {
            required: false,
            readOnly: true,
            serializedName: 'properties.vnetSiteId',
            type: {
              name: 'String'
            }
          },
          subnetId: {
            required: false,
            serializedName: 'properties.subnetId',
            type: {
              name: 'String'
            }
          },
          ldapsSettings: {
            required: false,
            serializedName: 'properties.ldapsSettings',
            type: {
              name: 'Composite',
              className: 'LdapsSettings'
            }
          },
          healthLastEvaluated: {
            required: false,
            readOnly: true,
            serializedName: 'properties.healthLastEvaluated',
            type: {
              name: 'DateTime'
            }
          },
          healthMonitors: {
            required: false,
            readOnly: true,
            serializedName: 'properties.healthMonitors',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'HealthMonitorElementType',
                  type: {
                    name: 'Composite',
                    className: 'HealthMonitor'
                  }
              }
            }
          },
          healthAlerts: {
            required: false,
            readOnly: true,
            serializedName: 'properties.healthAlerts',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'HealthAlertElementType',
                  type: {
                    name: 'Composite',
                    className: 'HealthAlert'
                  }
              }
            }
          },
          notificationSettings: {
            required: false,
            serializedName: 'properties.notificationSettings',
            type: {
              name: 'Composite',
              className: 'NotificationSettings'
            }
          },
          domainSecuritySettings: {
            required: false,
            serializedName: 'properties.domainSecuritySettings',
            type: {
              name: 'Composite',
              className: 'DomainSecuritySettings'
            }
          },
          filteredSync: {
            required: false,
            serializedName: 'properties.filteredSync',
            type: {
              name: 'String'
            }
          },
          domainControllerIpAddress: {
            required: false,
            readOnly: true,
            serializedName: 'properties.domainControllerIpAddress',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          serviceStatus: {
            required: false,
            readOnly: true,
            serializedName: 'properties.serviceStatus',
            type: {
              name: 'String'
            }
          },
          provisioningState: {
            required: false,
            readOnly: true,
            serializedName: 'properties.provisioningState',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = DomainService;
