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

/**
 * Summary of revision metadata.
 *
 */
class ApiRevisionContract {
  /**
   * Create a ApiRevisionContract.
   * @property {string} [apiId] Identifier of the API Revision.
   * @property {string} [apiRevision] Revision number of API.
   * @property {date} [createdDateTime] The time the API Revision was created.
   * The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as
   * specified by the ISO 8601 standard.
   * @property {date} [updatedDateTime] The time the API Revision were updated.
   * The date conforms to the following format: yyyy-MM-ddTHH:mm:ssZ as
   * specified by the ISO 8601 standard.
   * @property {string} [description] Description of the API Revision.
   * @property {string} [privateUrl] Gateway URL for accessing the non-current
   * API Revision.
   * @property {boolean} [isOnline] Indicates if API revision is the current
   * api revision.
   * @property {boolean} [isCurrent] Indicates if API revision is accessible
   * via the gateway.
   */
  constructor() {
  }

  /**
   * Defines the metadata of ApiRevisionContract
   *
   * @returns {object} metadata of ApiRevisionContract
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ApiRevisionContract',
      type: {
        name: 'Composite',
        className: 'ApiRevisionContract',
        modelProperties: {
          apiId: {
            required: false,
            readOnly: true,
            serializedName: 'apiId',
            type: {
              name: 'String'
            }
          },
          apiRevision: {
            required: false,
            readOnly: true,
            serializedName: 'apiRevision',
            constraints: {
              MaxLength: 100,
              MinLength: 1
            },
            type: {
              name: 'String'
            }
          },
          createdDateTime: {
            required: false,
            readOnly: true,
            serializedName: 'createdDateTime',
            type: {
              name: 'DateTime'
            }
          },
          updatedDateTime: {
            required: false,
            readOnly: true,
            serializedName: 'updatedDateTime',
            type: {
              name: 'DateTime'
            }
          },
          description: {
            required: false,
            readOnly: true,
            serializedName: 'description',
            constraints: {
              MaxLength: 256
            },
            type: {
              name: 'String'
            }
          },
          privateUrl: {
            required: false,
            readOnly: true,
            serializedName: 'privateUrl',
            type: {
              name: 'String'
            }
          },
          isOnline: {
            required: false,
            readOnly: true,
            serializedName: 'isOnline',
            type: {
              name: 'Boolean'
            }
          },
          isCurrent: {
            required: false,
            readOnly: true,
            serializedName: 'isCurrent',
            type: {
              name: 'Boolean'
            }
          }
        }
      }
    };
  }
}

module.exports = ApiRevisionContract;
