Class: OCI::DatabaseManagement::Models::OptimizerStatisticsAdvisorExecutionSummary

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/database_management/models/optimizer_statistics_advisor_execution_summary.rb

Overview

The summary of the Optimizer Statistics Advisor execution.

Constant Summary collapse

STATUS_ENUM =
[
  STATUS_EXECUTING = 'EXECUTING'.freeze,
  STATUS_COMPLETED = 'COMPLETED'.freeze,
  STATUS_INTERRUPTED = 'INTERRUPTED'.freeze,
  STATUS_CANCELLED = 'CANCELLED'.freeze,
  STATUS_FATAL_ERROR = 'FATAL_ERROR'.freeze,
  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 = {}) ⇒ OptimizerStatisticsAdvisorExecutionSummary

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :task_name (String)

    The value to assign to the #task_name property

  • :execution_name (String)

    The value to assign to the #execution_name property

  • :time_start (DateTime)

    The value to assign to the #time_start property

  • :time_end (DateTime)

    The value to assign to the #time_end property

  • :status (String)

    The value to assign to the #status property

  • :status_message (String)

    The value to assign to the #status_message property

  • :error_message (String)

    The value to assign to the #error_message property

  • :findings (Integer)

    The value to assign to the #findings property



103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# File 'lib/oci/database_management/models/optimizer_statistics_advisor_execution_summary.rb', line 103

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.task_name = attributes[:'taskName'] if attributes[:'taskName']

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

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

  self.execution_name = attributes[:'executionName'] if attributes[:'executionName']

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

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

  self.time_start = attributes[:'timeStart'] if attributes[:'timeStart']

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

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

  self.time_end = attributes[:'timeEnd'] if attributes[:'timeEnd']

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

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

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

  self.status_message = attributes[:'statusMessage'] if attributes[:'statusMessage']

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

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

  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.findings = attributes[:'findings'] if attributes[:'findings']
end

Instance Attribute Details

#error_messageString

The errors in the Optimizer Statistics Advisor execution, if any.

Returns:

  • (String)


51
52
53
# File 'lib/oci/database_management/models/optimizer_statistics_advisor_execution_summary.rb', line 51

def error_message
  @error_message
end

#execution_nameString

[Required] The name of the Optimizer Statistics Advisor execution.

Returns:

  • (String)


27
28
29
# File 'lib/oci/database_management/models/optimizer_statistics_advisor_execution_summary.rb', line 27

def execution_name
  @execution_name
end

#findingsInteger

The number of findings generated by the Optimizer Statistics Advisor execution.

Returns:

  • (Integer)


55
56
57
# File 'lib/oci/database_management/models/optimizer_statistics_advisor_execution_summary.rb', line 55

def findings
  @findings
end

#statusString

[Required] The status of the Optimizer Statistics Advisor execution.

Returns:

  • (String)


43
44
45
# File 'lib/oci/database_management/models/optimizer_statistics_advisor_execution_summary.rb', line 43

def status
  @status
end

#status_messageString

The Optimizer Statistics Advisor execution status message, if any.

Returns:

  • (String)


47
48
49
# File 'lib/oci/database_management/models/optimizer_statistics_advisor_execution_summary.rb', line 47

def status_message
  @status_message
end

#task_nameString

[Required] The name of the Optimizer Statistics Advisor task.

Returns:

  • (String)


23
24
25
# File 'lib/oci/database_management/models/optimizer_statistics_advisor_execution_summary.rb', line 23

def task_name
  @task_name
end

#time_endDateTime

[Required] The end time of the time range to retrieve the Optimizer Statistics Advisor execution of a Managed Database in UTC in ISO-8601 format, which is "yyyy-MM-dd'T'hh:mm:ss.sss'Z'".

Returns:

  • (DateTime)


39
40
41
# File 'lib/oci/database_management/models/optimizer_statistics_advisor_execution_summary.rb', line 39

def time_end
  @time_end
end

#time_startDateTime

[Required] The start time of the time range to retrieve the Optimizer Statistics Advisor execution of a Managed Database in UTC in ISO-8601 format, which is "yyyy-MM-dd'T'hh:mm:ss.sss'Z'".

Returns:

  • (DateTime)


33
34
35
# File 'lib/oci/database_management/models/optimizer_statistics_advisor_execution_summary.rb', line 33

def time_start
  @time_start
end

Class Method Details

.attribute_mapObject

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



58
59
60
61
62
63
64
65
66
67
68
69
70
71
# File 'lib/oci/database_management/models/optimizer_statistics_advisor_execution_summary.rb', line 58

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'task_name': :'taskName',
    'execution_name': :'executionName',
    'time_start': :'timeStart',
    'time_end': :'timeEnd',
    'status': :'status',
    'status_message': :'statusMessage',
    'error_message': :'errorMessage',
    'findings': :'findings'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



74
75
76
77
78
79
80
81
82
83
84
85
86
87
# File 'lib/oci/database_management/models/optimizer_statistics_advisor_execution_summary.rb', line 74

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'task_name': :'String',
    'execution_name': :'String',
    'time_start': :'DateTime',
    'time_end': :'DateTime',
    'status': :'String',
    'status_message': :'String',
    'error_message': :'String',
    'findings': :'Integer'
    # 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



170
171
172
173
174
175
176
177
178
179
180
181
182
# File 'lib/oci/database_management/models/optimizer_statistics_advisor_execution_summary.rb', line 170

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

  self.class == other.class &&
    task_name == other.task_name &&
    execution_name == other.execution_name &&
    time_start == other.time_start &&
    time_end == other.time_end &&
    status == other.status &&
    status_message == other.status_message &&
    error_message == other.error_message &&
    findings == other.findings
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



207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
# File 'lib/oci/database_management/models/optimizer_statistics_advisor_execution_summary.rb', line 207

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


187
188
189
# File 'lib/oci/database_management/models/optimizer_statistics_advisor_execution_summary.rb', line 187

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



196
197
198
# File 'lib/oci/database_management/models/optimizer_statistics_advisor_execution_summary.rb', line 196

def hash
  [task_name, execution_name, time_start, time_end, status, status_message, error_message, findings].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



240
241
242
243
244
245
246
247
248
249
# File 'lib/oci/database_management/models/optimizer_statistics_advisor_execution_summary.rb', line 240

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



234
235
236
# File 'lib/oci/database_management/models/optimizer_statistics_advisor_execution_summary.rb', line 234

def to_s
  to_hash.to_s
end