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

/**
 * Single Namespace item in List or Get Operation
 *
 * @extends models['TrackedResource']
 */
class EHNamespace extends models['TrackedResource'] {
  /**
   * Create a EHNamespace.
   * @property {object} [sku] Properties of sku resource
   * @property {string} [sku.name] Name of this SKU. Possible values include:
   * 'Basic', 'Standard'
   * @property {string} [sku.tier] The billing tier of this particular SKU.
   * Possible values include: 'Basic', 'Standard'
   * @property {number} [sku.capacity] The Event Hubs throughput units, value
   * should be 0 to 20 throughput units.
   * @property {string} [provisioningState] Provisioning state of the
   * Namespace.
   * @property {date} [createdAt] The time the Namespace was created.
   * @property {date} [updatedAt] The time the Namespace was updated.
   * @property {string} [serviceBusEndpoint] Endpoint you can use to perform
   * Service Bus operations.
   * @property {string} [metricId] Identifier for Azure Insights metrics.
   * @property {boolean} [isAutoInflateEnabled] Value that indicates whether
   * AutoInflate is enabled for eventhub namespace.
   * @property {number} [maximumThroughputUnits] Upper limit of throughput
   * units when AutoInflate is enabled, value should be within 0 to 20
   * throughput units. ( '0' if AutoInflateEnabled = true)
   * @property {boolean} [kafkaEnabled] Value that indicates whether Kafka is
   * enabled for eventhub namespace.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of EHNamespace
   *
   * @returns {object} metadata of EHNamespace
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'EHNamespace',
      type: {
        name: 'Composite',
        className: 'EHNamespace',
        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'
                  }
              }
            }
          },
          sku: {
            required: false,
            serializedName: 'sku',
            type: {
              name: 'Composite',
              className: 'Sku'
            }
          },
          provisioningState: {
            required: false,
            readOnly: true,
            serializedName: 'properties.provisioningState',
            type: {
              name: 'String'
            }
          },
          createdAt: {
            required: false,
            readOnly: true,
            serializedName: 'properties.createdAt',
            type: {
              name: 'DateTime'
            }
          },
          updatedAt: {
            required: false,
            readOnly: true,
            serializedName: 'properties.updatedAt',
            type: {
              name: 'DateTime'
            }
          },
          serviceBusEndpoint: {
            required: false,
            readOnly: true,
            serializedName: 'properties.serviceBusEndpoint',
            type: {
              name: 'String'
            }
          },
          metricId: {
            required: false,
            readOnly: true,
            serializedName: 'properties.metricId',
            type: {
              name: 'String'
            }
          },
          isAutoInflateEnabled: {
            required: false,
            serializedName: 'properties.isAutoInflateEnabled',
            type: {
              name: 'Boolean'
            }
          },
          maximumThroughputUnits: {
            required: false,
            serializedName: 'properties.maximumThroughputUnits',
            constraints: {
              InclusiveMaximum: 20,
              InclusiveMinimum: 0
            },
            type: {
              name: 'Number'
            }
          },
          kafkaEnabled: {
            required: false,
            serializedName: 'properties.kafkaEnabled',
            type: {
              name: 'Boolean'
            }
          }
        }
      }
    };
  }
}

module.exports = EHNamespace;
