/*
 * 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 base contract details.
 *
 */
class ApiEntityBaseContract {
  /**
   * Create a ApiEntityBaseContract.
   * @property {string} [description] Description of the API. May include HTML
   * formatting tags.
   * @property {object} [authenticationSettings] Collection of authentication
   * settings included into this API.
   * @property {object} [authenticationSettings.oAuth2] OAuth2 Authentication
   * settings
   * @property {string} [authenticationSettings.oAuth2.authorizationServerId]
   * OAuth authorization server identifier.
   * @property {string} [authenticationSettings.oAuth2.scope] operations scope.
   * @property {object} [authenticationSettings.openid] OpenID Connect
   * Authentication Settings
   * @property {string} [authenticationSettings.openid.openidProviderId] OAuth
   * authorization server identifier.
   * @property {array}
   * [authenticationSettings.openid.bearerTokenSendingMethods] How to send
   * token to the server.
   * @property {object} [subscriptionKeyParameterNames] Protocols over which
   * API is made available.
   * @property {string} [subscriptionKeyParameterNames.header] Subscription key
   * header name.
   * @property {string} [subscriptionKeyParameterNames.query] Subscription key
   * query string parameter name.
   * @property {string} [apiType] Type of API. Possible values include: 'http',
   * 'soap'
   * @property {string} [apiRevision] Describes the Revision of the Api. If no
   * value is provided, default revision 1 is created
   * @property {string} [apiVersion] Indicates the Version identifier of the
   * API if the API is versioned
   * @property {boolean} [isCurrent] Indicates if API revision is current api
   * revision.
   * @property {boolean} [isOnline] Indicates if API revision is accessible via
   * the gateway.
   * @property {string} [apiRevisionDescription] Description of the Api
   * Revision.
   * @property {string} [apiVersionDescription] Description of the Api Version.
   * @property {string} [apiVersionSetId] A resource identifier for the related
   * ApiVersionSet.
   * @property {boolean} [subscriptionRequired] Specifies whether an API or
   * Product subscription is required for accessing the API.
   */
  constructor() {
  }

  /**
   * Defines the metadata of ApiEntityBaseContract
   *
   * @returns {object} metadata of ApiEntityBaseContract
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ApiEntityBaseContract',
      type: {
        name: 'Composite',
        className: 'ApiEntityBaseContract',
        modelProperties: {
          description: {
            required: false,
            serializedName: 'description',
            type: {
              name: 'String'
            }
          },
          authenticationSettings: {
            required: false,
            serializedName: 'authenticationSettings',
            type: {
              name: 'Composite',
              className: 'AuthenticationSettingsContract'
            }
          },
          subscriptionKeyParameterNames: {
            required: false,
            serializedName: 'subscriptionKeyParameterNames',
            type: {
              name: 'Composite',
              className: 'SubscriptionKeyParameterNamesContract'
            }
          },
          apiType: {
            required: false,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          },
          apiRevision: {
            required: false,
            serializedName: 'apiRevision',
            constraints: {
              MaxLength: 100,
              MinLength: 1
            },
            type: {
              name: 'String'
            }
          },
          apiVersion: {
            required: false,
            serializedName: 'apiVersion',
            constraints: {
              MaxLength: 100
            },
            type: {
              name: 'String'
            }
          },
          isCurrent: {
            required: false,
            serializedName: 'isCurrent',
            type: {
              name: 'Boolean'
            }
          },
          isOnline: {
            required: false,
            readOnly: true,
            serializedName: 'isOnline',
            type: {
              name: 'Boolean'
            }
          },
          apiRevisionDescription: {
            required: false,
            serializedName: 'apiRevisionDescription',
            constraints: {
              MaxLength: 256
            },
            type: {
              name: 'String'
            }
          },
          apiVersionDescription: {
            required: false,
            serializedName: 'apiVersionDescription',
            constraints: {
              MaxLength: 256
            },
            type: {
              name: 'String'
            }
          },
          apiVersionSetId: {
            required: false,
            serializedName: 'apiVersionSetId',
            type: {
              name: 'String'
            }
          },
          subscriptionRequired: {
            required: false,
            serializedName: 'subscriptionRequired',
            type: {
              name: 'Boolean'
            }
          }
        }
      }
    };
  }
}

module.exports = ApiEntityBaseContract;
