# 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::Synapse::Mgmt::V2019_06_01_preview
  module Models
    #
    # A Sql pool operation.
    #
    class SqlPoolOperation < ProxyResource

      include MsRestAzure

      # @return [String] The name of the Sql pool the operation is being
      # performed on.
      attr_accessor :database_name

      # @return [String] The name of operation.
      attr_accessor :operation

      # @return [String] The friendly name of operation.
      attr_accessor :operation_friendly_name

      # @return [Integer] The percentage of the operation completed.
      attr_accessor :percent_complete

      # @return [String] The name of the server.
      attr_accessor :server_name

      # @return [DateTime] The operation start time.
      attr_accessor :start_time

      # @return [ManagementOperationState] The operation state. Possible values
      # include: 'Pending', 'InProgress', 'Succeeded', 'Failed',
      # 'CancelInProgress', 'Cancelled'
      attr_accessor :state

      # @return [Integer] The operation error code.
      attr_accessor :error_code

      # @return [String] The operation error description.
      attr_accessor :error_description

      # @return [Integer] The operation error severity.
      attr_accessor :error_severity

      # @return [Boolean] Whether or not the error is a user error.
      attr_accessor :is_user_error

      # @return [DateTime] The estimated completion time of the operation.
      attr_accessor :estimated_completion_time

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

      # @return [Boolean] Whether the operation can be cancelled.
      attr_accessor :is_cancellable


      #
      # Mapper for SqlPoolOperation class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'SqlPoolOperation',
          type: {
            name: 'Composite',
            class_name: 'SqlPoolOperation',
            model_properties: {
              id: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'id',
                type: {
                  name: 'String'
                }
              },
              name: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'name',
                type: {
                  name: 'String'
                }
              },
              type: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'type',
                type: {
                  name: 'String'
                }
              },
              database_name: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.databaseName',
                type: {
                  name: 'String'
                }
              },
              operation: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.operation',
                type: {
                  name: 'String'
                }
              },
              operation_friendly_name: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.operationFriendlyName',
                type: {
                  name: 'String'
                }
              },
              percent_complete: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.percentComplete',
                type: {
                  name: 'Number'
                }
              },
              server_name: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.serverName',
                type: {
                  name: 'String'
                }
              },
              start_time: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.startTime',
                type: {
                  name: 'DateTime'
                }
              },
              state: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.state',
                type: {
                  name: 'String'
                }
              },
              error_code: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.errorCode',
                type: {
                  name: 'Number'
                }
              },
              error_description: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.errorDescription',
                type: {
                  name: 'String'
                }
              },
              error_severity: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.errorSeverity',
                type: {
                  name: 'Number'
                }
              },
              is_user_error: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.isUserError',
                type: {
                  name: 'Boolean'
                }
              },
              estimated_completion_time: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.estimatedCompletionTime',
                type: {
                  name: 'DateTime'
                }
              },
              description: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.description',
                type: {
                  name: 'String'
                }
              },
              is_cancellable: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'properties.isCancellable',
                type: {
                  name: 'Boolean'
                }
              }
            }
          }
        }
      end
    end
  end
end
