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

/**
 * Friendly domain name mapping to the endpoint hostname that the customer
 * provides for branding purposes, e.g. www.contoso.com.
 *
 * @extends models['ProxyResource']
 */
class CustomDomain extends models['ProxyResource'] {
  /**
   * Create a CustomDomain.
   * @property {string} hostName The host name of the custom domain. Must be a
   * domain name.
   * @property {string} [resourceState] Resource status of the custom domain.
   * Possible values include: 'Creating', 'Active', 'Deleting'
   * @property {string} [customHttpsProvisioningState] Provisioning status of
   * Custom Https of the custom domain. Possible values include: 'Enabling',
   * 'Enabled', 'Disabling', 'Disabled', 'Failed'
   * @property {string} [customHttpsProvisioningSubstate] Provisioning substate
   * shows the progress of custom HTTPS enabling/disabling process step by
   * step. Possible values include: 'SubmittingDomainControlValidationRequest',
   * 'PendingDomainControlValidationREquestApproval',
   * 'DomainControlValidationRequestApproved',
   * 'DomainControlValidationRequestRejected',
   * 'DomainControlValidationRequestTimedOut', 'IssuingCertificate',
   * 'DeployingCertificate', 'CertificateDeployed', 'DeletingCertificate',
   * 'CertificateDeleted'
   * @property {string} [validationData] Special validation or data may be
   * required when delivering CDN to some regions due to local compliance
   * reasons. E.g. ICP license number of a custom domain is required to deliver
   * content in China.
   * @property {string} [provisioningState] Provisioning status of the custom
   * domain.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of CustomDomain
   *
   * @returns {object} metadata of CustomDomain
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'CustomDomain',
      type: {
        name: 'Composite',
        className: 'CustomDomain',
        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'
            }
          },
          hostName: {
            required: true,
            serializedName: 'properties.hostName',
            type: {
              name: 'String'
            }
          },
          resourceState: {
            required: false,
            readOnly: true,
            serializedName: 'properties.resourceState',
            type: {
              name: 'String'
            }
          },
          customHttpsProvisioningState: {
            required: false,
            readOnly: true,
            serializedName: 'properties.customHttpsProvisioningState',
            type: {
              name: 'String'
            }
          },
          customHttpsProvisioningSubstate: {
            required: false,
            readOnly: true,
            serializedName: 'properties.customHttpsProvisioningSubstate',
            type: {
              name: 'String'
            }
          },
          validationData: {
            required: false,
            serializedName: 'properties.validationData',
            type: {
              name: 'String'
            }
          },
          provisioningState: {
            required: false,
            readOnly: true,
            serializedName: 'properties.provisioningState',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = CustomDomain;
