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

/**
 * Api Operation Update Contract details.
 *
 */
class OperationUpdateContract {
  /**
   * Create a OperationUpdateContract.
   * @property {array} [templateParameters] Collection of URL template
   * parameters.
   * @property {string} [description] Description of the operation. May include
   * HTML formatting tags.
   * @property {object} [request] An entity containing request details.
   * @property {string} [request.description] Operation request description.
   * @property {array} [request.queryParameters] Collection of operation
   * request query parameters.
   * @property {array} [request.headers] Collection of operation request
   * headers.
   * @property {array} [request.representations] Collection of operation
   * request representations.
   * @property {array} [responses] Array of Operation responses.
   * @property {string} [policies] Operation Policies
   * @property {string} [displayName] Operation Name.
   * @property {string} [method] A Valid HTTP Operation Method. Typical Http
   * Methods like GET, PUT, POST but not limited by only them.
   * @property {string} [urlTemplate] Relative URL template identifying the
   * target resource for this operation. May include parameters. Example:
   * /customers/{cid}/orders/{oid}/?date={date}
   */
  constructor() {
  }

  /**
   * Defines the metadata of OperationUpdateContract
   *
   * @returns {object} metadata of OperationUpdateContract
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'OperationUpdateContract',
      type: {
        name: 'Composite',
        className: 'OperationUpdateContract',
        modelProperties: {
          templateParameters: {
            required: false,
            serializedName: 'properties.templateParameters',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ParameterContractElementType',
                  type: {
                    name: 'Composite',
                    className: 'ParameterContract'
                  }
              }
            }
          },
          description: {
            required: false,
            serializedName: 'properties.description',
            constraints: {
              MaxLength: 1000
            },
            type: {
              name: 'String'
            }
          },
          request: {
            required: false,
            serializedName: 'properties.request',
            type: {
              name: 'Composite',
              className: 'RequestContract'
            }
          },
          responses: {
            required: false,
            serializedName: 'properties.responses',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ResponseContractElementType',
                  type: {
                    name: 'Composite',
                    className: 'ResponseContract'
                  }
              }
            }
          },
          policies: {
            required: false,
            serializedName: 'properties.policies',
            type: {
              name: 'String'
            }
          },
          displayName: {
            required: false,
            serializedName: 'properties.displayName',
            constraints: {
              MaxLength: 300,
              MinLength: 1
            },
            type: {
              name: 'String'
            }
          },
          method: {
            required: false,
            serializedName: 'properties.method',
            type: {
              name: 'String'
            }
          },
          urlTemplate: {
            required: false,
            serializedName: 'properties.urlTemplate',
            constraints: {
              MaxLength: 1000,
              MinLength: 1
            },
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = OperationUpdateContract;
