# encoding: utf-8
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.

module Azure::DevTestLabs::Mgmt::V2018_09_15
  module Models
    #
    # An Operation Result
    #
    class OperationResult

      include MsRestAzure

      # @return [String] The operation status.
      attr_accessor :status

      # @return [HttpStatusCode] The status code for the operation. Possible
      # values include: 'Continue', 'SwitchingProtocols', 'OK', 'Created',
      # 'Accepted', 'NonAuthoritativeInformation', 'NoContent', 'ResetContent',
      # 'PartialContent', 'MultipleChoices', 'MovedPermanently', 'Redirect',
      # 'SeeOther', 'NotModified', 'UseProxy', 'Unused', 'TemporaryRedirect',
      # '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'
      attr_accessor :status_code

      # @return [OperationError] Error details for the operation in case of a
      # failure.
      attr_accessor :error


      #
      # Mapper for OperationResult class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'OperationResult',
          type: {
            name: 'Composite',
            class_name: 'OperationResult',
            model_properties: {
              status: {
                client_side_validation: true,
                required: false,
                serialized_name: 'status',
                type: {
                  name: 'String'
                }
              },
              status_code: {
                client_side_validation: true,
                required: false,
                serialized_name: 'statusCode',
                type: {
                  name: 'String'
                }
              },
              error: {
                client_side_validation: true,
                required: false,
                serialized_name: 'error',
                type: {
                  name: 'Composite',
                  class_name: 'OperationError'
                }
              }
            }
          }
        }
      end
    end
  end
end
