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

/**
 * Details of the status of an operation.
 *
 */
class LatestOperationResult {
  /**
   * Create a LatestOperationResult.
   * @property {string} [status] The current status of the operation.
   * @property {string} [errorCode] Error code on failure.
   * @property {string} [errorMessage] The error message.
   * @property {string} [requestUri] Request URI of the operation.
   * @property {string} [httpMethod] The HttpMethod - PUT/POST/DELETE for the
   * operation.
   * @property {string} [operationUrl] The URL to use to check long-running
   * operation status
   */
  constructor() {
  }

  /**
   * Defines the metadata of LatestOperationResult
   *
   * @returns {object} metadata of LatestOperationResult
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'LatestOperationResult',
      type: {
        name: 'Composite',
        className: 'LatestOperationResult',
        modelProperties: {
          status: {
            required: false,
            readOnly: true,
            serializedName: 'status',
            type: {
              name: 'String'
            }
          },
          errorCode: {
            required: false,
            readOnly: true,
            serializedName: 'errorCode',
            type: {
              name: 'String'
            }
          },
          errorMessage: {
            required: false,
            readOnly: true,
            serializedName: 'errorMessage',
            type: {
              name: 'String'
            }
          },
          requestUri: {
            required: false,
            readOnly: true,
            serializedName: 'requestUri',
            type: {
              name: 'String'
            }
          },
          httpMethod: {
            required: false,
            readOnly: true,
            serializedName: 'httpMethod',
            type: {
              name: 'String'
            }
          },
          operationUrl: {
            required: false,
            readOnly: true,
            serializedName: 'operationUrl',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = LatestOperationResult;
