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

var models = require('./index');

var util = require('util');

/**
 * @class
 * Initializes a new instance of the CustomDomain class.
 * @constructor
 * CDN CustomDomain represents a mapping between a user specified domain name
 * and a CDN endpoint. This is to use custom domain names to represent the
 * URLs for branding purposes.
 * @member {string} hostName The host name of the custom domain. Must be a
 * domain name.
 * 
 * @member {string} [resourceState] Resource status of the custom domain.
 * Possible values include: 'Creating', 'Active', 'Deleting'
 * 
 * @member {string} [provisioningState] Provisioning status of the custom
 * domain. Possible values include: 'Creating', 'Succeeded', 'Failed'
 * 
 */
function CustomDomain() {
  CustomDomain['super_'].call(this);
}

util.inherits(CustomDomain, models['Resource']);

/**
 * Defines the metadata of CustomDomain
 *
 * @returns {object} metadata of CustomDomain
 *
 */
CustomDomain.prototype.mapper = function () {
  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: 'Enum',
            allowedValues: [ 'Creating', 'Active', 'Deleting' ]
          }
        },
        provisioningState: {
          required: false,
          serializedName: 'properties.provisioningState',
          type: {
            name: 'Enum',
            allowedValues: [ 'Creating', 'Succeeded', 'Failed' ]
          }
        }
      }
    }
  };
};

module.exports = CustomDomain;
