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

/**
 * Description of the IoT hub.
 *
 */
class IotHubDefinitionDescription {
  /**
   * Create a IotHubDefinitionDescription.
   * @member {boolean} [applyAllocationPolicy] flag for applying
   * allocationPolicy or not for a given iot hub.
   * @member {number} [allocationWeight] weight to apply for a given iot h.
   * @member {string} [name] Host name of the IoT hub.
   * @member {string} connectionString Connection string og the IoT hub.
   * @member {string} location ARM region of the IoT hub.
   */
  constructor() {
  }

  /**
   * Defines the metadata of IotHubDefinitionDescription
   *
   * @returns {object} metadata of IotHubDefinitionDescription
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'IotHubDefinitionDescription',
      type: {
        name: 'Composite',
        className: 'IotHubDefinitionDescription',
        modelProperties: {
          applyAllocationPolicy: {
            required: false,
            serializedName: 'applyAllocationPolicy',
            type: {
              name: 'Boolean'
            }
          },
          allocationWeight: {
            required: false,
            serializedName: 'allocationWeight',
            type: {
              name: 'Number'
            }
          },
          name: {
            required: false,
            readOnly: true,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          connectionString: {
            required: true,
            serializedName: 'connectionString',
            type: {
              name: 'String'
            }
          },
          location: {
            required: true,
            serializedName: 'location',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = IotHubDefinitionDescription;
