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

/**
 * Operation request/response representation details.
 *
 */
class RepresentationContract {
  /**
   * Create a RepresentationContract.
   * @property {string} contentType Specifies a registered or custom content
   * type for this representation, e.g. application/xml.
   * @property {string} [sample] An example of the representation.
   * @property {string} [schemaId] Schema identifier. Applicable only if
   * 'contentType' value is neither 'application/x-www-form-urlencoded' nor
   * 'multipart/form-data'.
   * @property {string} [typeName] Type name defined by the schema. Applicable
   * only if 'contentType' value is neither 'application/x-www-form-urlencoded'
   * nor 'multipart/form-data'.
   * @property {array} [formParameters] Collection of form parameters. Required
   * if 'contentType' value is either 'application/x-www-form-urlencoded' or
   * 'multipart/form-data'..
   */
  constructor() {
  }

  /**
   * Defines the metadata of RepresentationContract
   *
   * @returns {object} metadata of RepresentationContract
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'RepresentationContract',
      type: {
        name: 'Composite',
        className: 'RepresentationContract',
        modelProperties: {
          contentType: {
            required: true,
            serializedName: 'contentType',
            type: {
              name: 'String'
            }
          },
          sample: {
            required: false,
            serializedName: 'sample',
            type: {
              name: 'String'
            }
          },
          schemaId: {
            required: false,
            serializedName: 'schemaId',
            type: {
              name: 'String'
            }
          },
          typeName: {
            required: false,
            serializedName: 'typeName',
            type: {
              name: 'String'
            }
          },
          formParameters: {
            required: false,
            serializedName: 'formParameters',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ParameterContractElementType',
                  type: {
                    name: 'Composite',
                    className: 'ParameterContract'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = RepresentationContract;
