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

/**
 * Parameters supplied to the CreateOrUpdate Namespace operation.
 *
 * @extends models['Resource']
 */
class NamespaceCreateOrUpdateParameters extends models['Resource'] {
  /**
   * Create a NamespaceCreateOrUpdateParameters.
   * @member {string} [namespaceCreateOrUpdateParametersName] The name of the
   * namespace.
   * @member {string} [provisioningState] Provisioning state of the Namespace.
   * @member {string} [region] Specifies the targeted region in which the
   * namespace should be created. It can be any of the following values:
   * Australia EastAustralia SoutheastCentral USEast USEast US 2West USNorth
   * Central USSouth Central USEast AsiaSoutheast AsiaBrazil SouthJapan
   * EastJapan WestNorth EuropeWest Europe
   * @member {string} [status] Status of the namespace. It can be any of these
   * values:1 = Created/Active2 = Creating3 = Suspended4 = Deleting
   * @member {date} [createdAt] The time the namespace was created.
   * @member {string} [serviceBusEndpoint] Endpoint you can use to perform
   * NotificationHub operations.
   * @member {string} [subscriptionId] The Id of the Azure subscription
   * associated with the namespace.
   * @member {string} [scaleUnit] ScaleUnit where the namespace gets created
   * @member {boolean} [enabled] Whether or not the namespace is currently
   * enabled.
   * @member {boolean} [critical] Whether or not the namespace is set as
   * Critical.
   * @member {string} [namespaceType] The namespace type. Possible values
   * include: 'Messaging', 'NotificationHub'
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of NamespaceCreateOrUpdateParameters
   *
   * @returns {object} metadata of NamespaceCreateOrUpdateParameters
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'NamespaceCreateOrUpdateParameters',
      type: {
        name: 'Composite',
        className: 'NamespaceCreateOrUpdateParameters',
        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: true,
            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'
            }
          },
          namespaceCreateOrUpdateParametersName: {
            required: false,
            serializedName: 'properties.name',
            type: {
              name: 'String'
            }
          },
          provisioningState: {
            required: false,
            serializedName: 'properties.provisioningState',
            type: {
              name: 'String'
            }
          },
          region: {
            required: false,
            serializedName: 'properties.region',
            type: {
              name: 'String'
            }
          },
          status: {
            required: false,
            serializedName: 'properties.status',
            type: {
              name: 'String'
            }
          },
          createdAt: {
            required: false,
            serializedName: 'properties.createdAt',
            type: {
              name: 'DateTime'
            }
          },
          serviceBusEndpoint: {
            required: false,
            serializedName: 'properties.serviceBusEndpoint',
            type: {
              name: 'String'
            }
          },
          subscriptionId: {
            required: false,
            serializedName: 'properties.subscriptionId',
            type: {
              name: 'String'
            }
          },
          scaleUnit: {
            required: false,
            serializedName: 'properties.scaleUnit',
            type: {
              name: 'String'
            }
          },
          enabled: {
            required: false,
            serializedName: 'properties.enabled',
            type: {
              name: 'Boolean'
            }
          },
          critical: {
            required: false,
            serializedName: 'properties.critical',
            type: {
              name: 'Boolean'
            }
          },
          namespaceType: {
            required: false,
            serializedName: 'properties.namespaceType',
            type: {
              name: 'Enum',
              allowedValues: [ 'Messaging', 'NotificationHub' ]
            }
          }
        }
      }
    };
  }
}

module.exports = NamespaceCreateOrUpdateParameters;
