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

const models = require('./index');

/**
 * Base class for operation result info.
 *
 * @extends models['OperationWorkerResponse']
 */
class OperationResultInfoBaseResource extends models['OperationWorkerResponse'] {
  /**
   * Create a OperationResultInfoBaseResource.
   * @member {object} [operation] OperationResultInfoBaseResource operation
   * @member {string} [operation.objectType] Polymorphic Discriminator
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of OperationResultInfoBaseResource
   *
   * @returns {object} metadata of OperationResultInfoBaseResource
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'OperationResultInfoBaseResource',
      type: {
        name: 'Composite',
        className: 'OperationResultInfoBaseResource',
        modelProperties: {
          statusCode: {
            required: false,
            serializedName: 'statusCode',
            type: {
              name: 'Enum',
              allowedValues: [ 'Continue', 'SwitchingProtocols', 'OK', 'Created', 'Accepted', 'NonAuthoritativeInformation', 'NoContent', 'ResetContent', 'PartialContent', 'MultipleChoices', 'Ambiguous', 'MovedPermanently', 'Moved', 'Found', 'Redirect', 'SeeOther', 'RedirectMethod', 'NotModified', 'UseProxy', 'Unused', 'TemporaryRedirect', 'RedirectKeepVerb', 'BadRequest', 'Unauthorized', 'PaymentRequired', 'Forbidden', 'NotFound', 'MethodNotAllowed', 'NotAcceptable', 'ProxyAuthenticationRequired', 'RequestTimeout', 'Conflict', 'Gone', 'LengthRequired', 'PreconditionFailed', 'RequestEntityTooLarge', 'RequestUriTooLong', 'UnsupportedMediaType', 'RequestedRangeNotSatisfiable', 'ExpectationFailed', 'UpgradeRequired', 'InternalServerError', 'NotImplemented', 'BadGateway', 'ServiceUnavailable', 'GatewayTimeout', 'HttpVersionNotSupported' ]
            }
          },
          headers: {
            required: false,
            serializedName: 'headers',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'ArrayElementType',
                  type: {
                    name: 'Sequence',
                    element: {
                        required: false,
                        serializedName: 'StringElementType',
                        type: {
                          name: 'String'
                        }
                    }
                  }
              }
            }
          },
          operation: {
            required: false,
            serializedName: 'operation',
            type: {
              name: 'Composite',
              polymorphicDiscriminator: {
                serializedName: 'objectType',
                clientName: 'objectType'
              },
              uberParent: 'OperationResultInfoBase',
              className: 'OperationResultInfoBase'
            }
          }
        }
      }
    };
  }
}

module.exports = OperationResultInfoBaseResource;
