Class: OCI::DataConnectivity::Models::OperationExecResult

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/data_connectivity/models/operation_exec_result.rb

Overview

Operation execution result for a single input set.

Constant Summary collapse

EXECUTION_STATUS_ENUM =
[
  EXECUTION_STATUS_FAILED = 'FAILED'.freeze,
  EXECUTION_STATUS_SUCCESS = 'SUCCESS'.freeze,
  EXECUTION_STATUS_QUEUED = 'QUEUED'.freeze,
  EXECUTION_STATUS_RUNNING = 'RUNNING'.freeze,
  EXECUTION_STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ OperationExecResult

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):

  • :execution_status (String)

    The value to assign to the #execution_status property

  • :error_message (String)

    The value to assign to the #error_message property

  • :metrics (Object)

    The value to assign to the #metrics property

  • :output_values (Array<Array<Object>>)

    The value to assign to the #output_values property

  • :is_whitelisted_error_message (BOOLEAN)

    The value to assign to the #is_whitelisted_error_message property



76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# File 'lib/oci/data_connectivity/models/operation_exec_result.rb', line 76

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  self.execution_status = attributes[:'executionStatus'] if attributes[:'executionStatus']

  raise 'You cannot provide both :executionStatus and :execution_status' if attributes.key?(:'executionStatus') && attributes.key?(:'execution_status')

  self.execution_status = attributes[:'execution_status'] if attributes[:'execution_status']

  self.error_message = attributes[:'errorMessage'] if attributes[:'errorMessage']

  raise 'You cannot provide both :errorMessage and :error_message' if attributes.key?(:'errorMessage') && attributes.key?(:'error_message')

  self.error_message = attributes[:'error_message'] if attributes[:'error_message']

  self.metrics = attributes[:'metrics'] if attributes[:'metrics']

  self.output_values = attributes[:'outputValues'] if attributes[:'outputValues']

  raise 'You cannot provide both :outputValues and :output_values' if attributes.key?(:'outputValues') && attributes.key?(:'output_values')

  self.output_values = attributes[:'output_values'] if attributes[:'output_values']

  self.is_whitelisted_error_message = attributes[:'isWhitelistedErrorMessage'] unless attributes[:'isWhitelistedErrorMessage'].nil?

  raise 'You cannot provide both :isWhitelistedErrorMessage and :is_whitelisted_error_message' if attributes.key?(:'isWhitelistedErrorMessage') && attributes.key?(:'is_whitelisted_error_message')

  self.is_whitelisted_error_message = attributes[:'is_whitelisted_error_message'] unless attributes[:'is_whitelisted_error_message'].nil?
end

Instance Attribute Details

#error_messageString

Error message if execution of operation is failed.

Returns:

  • (String)


25
26
27
# File 'lib/oci/data_connectivity/models/operation_exec_result.rb', line 25

def error_message
  @error_message
end

#execution_statusString

Status of the operation job for particular set of input.

Returns:

  • (String)


21
22
23
# File 'lib/oci/data_connectivity/models/operation_exec_result.rb', line 21

def execution_status
  @execution_status
end

#is_whitelisted_error_messageBOOLEAN

True, if error message should be displayed on UI.

Returns:

  • (BOOLEAN)


37
38
39
# File 'lib/oci/data_connectivity/models/operation_exec_result.rb', line 37

def is_whitelisted_error_message
  @is_whitelisted_error_message
end

#metricsObject

Metrics of operation execution job.

Returns:

  • (Object)


29
30
31
# File 'lib/oci/data_connectivity/models/operation_exec_result.rb', line 29

def metrics
  @metrics
end

#output_valuesArray<Array<Object>>

List of emitted rows for each OUT/INOUT param.

Returns:

  • (Array<Array<Object>>)


33
34
35
# File 'lib/oci/data_connectivity/models/operation_exec_result.rb', line 33

def output_values
  @output_values
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



40
41
42
43
44
45
46
47
48
49
50
# File 'lib/oci/data_connectivity/models/operation_exec_result.rb', line 40

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'execution_status': :'executionStatus',
    'error_message': :'errorMessage',
    'metrics': :'metrics',
    'output_values': :'outputValues',
    'is_whitelisted_error_message': :'isWhitelistedErrorMessage'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



53
54
55
56
57
58
59
60
61
62
63
# File 'lib/oci/data_connectivity/models/operation_exec_result.rb', line 53

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'execution_status': :'String',
    'error_message': :'String',
    'metrics': :'Object',
    'output_values': :'Array<Array<Object>>',
    'is_whitelisted_error_message': :'BOOLEAN'
    # rubocop:enable Style/SymbolLiteral
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • other (Object)

    the other object to be compared



129
130
131
132
133
134
135
136
137
138
# File 'lib/oci/data_connectivity/models/operation_exec_result.rb', line 129

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    execution_status == other.execution_status &&
    error_message == other.error_message &&
    metrics == other.metrics &&
    output_values == other.output_values &&
    is_whitelisted_error_message == other.is_whitelisted_error_message
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
# File 'lib/oci/data_connectivity/models/operation_exec_result.rb', line 163

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)

  self.class.swagger_types.each_pair do |key, type|
    if type =~ /^Array<(.*)>/i
      # check to ensure the input is an array given that the the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        public_method("#{key}=").call(
          attributes[self.class.attribute_map[key]]
            .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
        )
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      public_method("#{key}=").call(
        OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
      )
    end
    # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end

#eql?(other) ⇒ Boolean

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


143
144
145
# File 'lib/oci/data_connectivity/models/operation_exec_result.rb', line 143

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



152
153
154
# File 'lib/oci/data_connectivity/models/operation_exec_result.rb', line 152

def hash
  [execution_status, error_message, metrics, output_values, is_whitelisted_error_message].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



196
197
198
199
200
201
202
203
204
205
# File 'lib/oci/data_connectivity/models/operation_exec_result.rb', line 196

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = public_method(attr).call
    next if value.nil? && !instance_variable_defined?("@#{attr}")

    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



190
191
192
# File 'lib/oci/data_connectivity/models/operation_exec_result.rb', line 190

def to_s
  to_hash.to_s
end