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

/**
 * Object used to create an API Revision or Version based on an existing API
 * Revision
 *
 */
class ApiRevisionInfoContract {
  /**
   * Create a ApiRevisionInfoContract.
   * @property {string} [sourceApiId] Resource identifier of API to be used to
   * create the revision from.
   * @property {string} [apiVersionName] Version identifier for the new API
   * Version.
   * @property {string} [apiRevisionDescription] Description of new API
   * Revision.
   * @property {object} [apiVersionSet] Version set details
   * @property {string} [apiVersionSet.id] Identifier for existing API Version
   * Set. Omit this value to create a new Version Set.
   * @property {string} [apiVersionSet.name] The display Name of the API
   * Version Set.
   * @property {string} [apiVersionSet.description] Description of API Version
   * Set.
   * @property {string} [apiVersionSet.versioningScheme] An value that
   * determines where the API Version identifer will be located in a HTTP
   * request. Possible values include: 'Segment', 'Query', 'Header'
   * @property {string} [apiVersionSet.versionQueryName] Name of query
   * parameter that indicates the API Version if versioningScheme is set to
   * `query`.
   * @property {string} [apiVersionSet.versionHeaderName] Name of HTTP header
   * parameter that indicates the API Version if versioningScheme is set to
   * `header`.
   */
  constructor() {
  }

  /**
   * Defines the metadata of ApiRevisionInfoContract
   *
   * @returns {object} metadata of ApiRevisionInfoContract
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ApiRevisionInfoContract',
      type: {
        name: 'Composite',
        className: 'ApiRevisionInfoContract',
        modelProperties: {
          sourceApiId: {
            required: false,
            serializedName: 'sourceApiId',
            type: {
              name: 'String'
            }
          },
          apiVersionName: {
            required: false,
            serializedName: 'apiVersionName',
            constraints: {
              MaxLength: 100
            },
            type: {
              name: 'String'
            }
          },
          apiRevisionDescription: {
            required: false,
            serializedName: 'apiRevisionDescription',
            constraints: {
              MaxLength: 256
            },
            type: {
              name: 'String'
            }
          },
          apiVersionSet: {
            required: false,
            serializedName: 'apiVersionSet',
            type: {
              name: 'Composite',
              className: 'ApiVersionSetContractDetails'
            }
          }
        }
      }
    };
  }
}

module.exports = ApiRevisionInfoContract;
