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

/**
 * Properties of a topic type info.
 *
 * @extends models['Resource']
 */
class TopicTypeInfo extends models['Resource'] {
  /**
   * Create a TopicTypeInfo.
   * @property {string} [provider] Namespace of the provider of the topic type.
   * @property {string} [displayName] Display Name for the topic type.
   * @property {string} [description] Description of the topic type.
   * @property {string} [resourceRegionType] Region type of the resource.
   * Possible values include: 'RegionalResource', 'GlobalResource'
   * @property {string} [provisioningState] Provisioning state of the topic
   * type. Possible values include: 'Creating', 'Updating', 'Deleting',
   * 'Succeeded', 'Canceled', 'Failed'
   * @property {array} [supportedLocations] List of locations supported by this
   * topic type.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of TopicTypeInfo
   *
   * @returns {object} metadata of TopicTypeInfo
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'TopicTypeInfo',
      type: {
        name: 'Composite',
        className: 'TopicTypeInfo',
        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'
            }
          },
          provider: {
            required: false,
            serializedName: 'properties.provider',
            type: {
              name: 'String'
            }
          },
          displayName: {
            required: false,
            serializedName: 'properties.displayName',
            type: {
              name: 'String'
            }
          },
          description: {
            required: false,
            serializedName: 'properties.description',
            type: {
              name: 'String'
            }
          },
          resourceRegionType: {
            required: false,
            serializedName: 'properties.resourceRegionType',
            type: {
              name: 'String'
            }
          },
          provisioningState: {
            required: false,
            serializedName: 'properties.provisioningState',
            type: {
              name: 'String'
            }
          },
          supportedLocations: {
            required: false,
            serializedName: 'properties.supportedLocations',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = TopicTypeInfo;
