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

/**
 * The parameters supplied to the create or update connection type operation.
 *
 */
class ConnectionTypeCreateOrUpdateParameters {
  /**
   * Create a ConnectionTypeCreateOrUpdateParameters.
   * @member {string} name Gets or sets the name of the connection type.
   * @member {boolean} [isGlobal] Gets or sets a Boolean value to indicate if
   * the connection type is global.
   * @member {object} fieldDefinitions Gets or sets the field definitions of
   * the connection type.
   */
  constructor() {
  }

  /**
   * Defines the metadata of ConnectionTypeCreateOrUpdateParameters
   *
   * @returns {object} metadata of ConnectionTypeCreateOrUpdateParameters
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ConnectionTypeCreateOrUpdateParameters',
      type: {
        name: 'Composite',
        className: 'ConnectionTypeCreateOrUpdateParameters',
        modelProperties: {
          name: {
            required: true,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          isGlobal: {
            required: false,
            serializedName: 'properties.isGlobal',
            type: {
              name: 'Boolean'
            }
          },
          fieldDefinitions: {
            required: true,
            serializedName: 'properties.fieldDefinitions',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'FieldDefinitionElementType',
                  type: {
                    name: 'Composite',
                    className: 'FieldDefinition'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = ConnectionTypeCreateOrUpdateParameters;
