Class: OCI::DatabaseManagement::Models::SqlTuningSet

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

Overview

Details of the Sql tuning set.

Constant Summary collapse

STATUS_ENUM =
[
  STATUS_DISABLED = 'DISABLED'.freeze,
  STATUS_RETRY_SCHEDULED = 'RETRY_SCHEDULED'.freeze,
  STATUS_SCHEDULED = 'SCHEDULED'.freeze,
  STATUS_BLOCKED = 'BLOCKED'.freeze,
  STATUS_RUNNING = 'RUNNING'.freeze,
  STATUS_COMPLETED = 'COMPLETED'.freeze,
  STATUS_BROKEN = 'BROKEN'.freeze,
  STATUS_FAILED = 'FAILED'.freeze,
  STATUS_REMOTE = 'REMOTE'.freeze,
  STATUS_RESOURCE_UNAVAILABLE = 'RESOURCE_UNAVAILABLE'.freeze,
  STATUS_SUCCEEDED = 'SUCCEEDED'.freeze,
  STATUS_CHAIN_STALLED = 'CHAIN_STALLED'.freeze,
  STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
ALL_SQL_STATEMENTS_FETCHED_ENUM =
[
  ALL_SQL_STATEMENTS_FETCHED_YES = 'YES'.freeze,
  ALL_SQL_STATEMENTS_FETCHED_NO = 'NO'.freeze,
  ALL_SQL_STATEMENTS_FETCHED_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ SqlTuningSet

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
# File 'lib/oci/database_management/models/sql_tuning_set.rb', line 146

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

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

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

  self.statement_count = attributes[:'statementCount'] if attributes[:'statementCount']

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

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

  self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated']

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

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

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

  self.time_last_modified = attributes[:'timeLastModified'] if attributes[:'timeLastModified']

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

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

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

  self.scheduled_job_name = attributes[:'scheduledJobName'] if attributes[:'scheduledJobName']

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

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

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

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

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

  self.sql_list = attributes[:'sqlList'] if attributes[:'sqlList']

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

  self.sql_list = attributes[:'sql_list'] if attributes[:'sql_list']
end

Instance Attribute Details

#all_sql_statements_fetchedString

In OCI database management, there is a limit to fetch only 2000 rows. This flag indicates whether all Sql statements of this Sql tuning set matching the filter criteria are fetched or not. Possible values are 'Yes' or 'No' - Yes - All Sql statements matching the filter criteria are fetched. - No - There are more Sql statements matching the fitler criteria. User should fine tune the filter criteria to narrow down the result set.

Returns:

  • (String)


82
83
84
# File 'lib/oci/database_management/models/sql_tuning_set.rb', line 82

def all_sql_statements_fetched
  @all_sql_statements_fetched
end

#descriptionString

The description of the Sql tuning set.

Returns:

  • (String)


56
57
58
# File 'lib/oci/database_management/models/sql_tuning_set.rb', line 56

def description
  @description
end

#error_messageString

Latest execution error of the plsql that was submitted as a scheduler job.

Returns:

  • (String)


72
73
74
# File 'lib/oci/database_management/models/sql_tuning_set.rb', line 72

def error_message
  @error_message
end

#idInteger

The unique Sql tuning set identifier.

Returns:

  • (Integer)


36
37
38
# File 'lib/oci/database_management/models/sql_tuning_set.rb', line 36

def id
  @id
end

#nameString

[Required] The name of the Sql tuning set.

Returns:

  • (String)


44
45
46
# File 'lib/oci/database_management/models/sql_tuning_set.rb', line 44

def name
  @name
end

#ownerString

[Required] The owner of the Sql tuning set.

Returns:

  • (String)


40
41
42
# File 'lib/oci/database_management/models/sql_tuning_set.rb', line 40

def owner
  @owner
end

#scheduled_job_nameString

Name of the Sql tuning set scheduler job.

Returns:

  • (String)


68
69
70
# File 'lib/oci/database_management/models/sql_tuning_set.rb', line 68

def scheduled_job_name
  @scheduled_job_name
end

#sql_listArray<OCI::DatabaseManagement::Models::SqlInSqlTuningSet>

A list of the Sqls associated with the Sql tuning set.



86
87
88
# File 'lib/oci/database_management/models/sql_tuning_set.rb', line 86

def sql_list
  @sql_list
end

#statement_countInteger

Number of statements in the Sql tuning set

Returns:

  • (Integer)


48
49
50
# File 'lib/oci/database_management/models/sql_tuning_set.rb', line 48

def statement_count
  @statement_count
end

#statusString

Current status of the Sql tuning set.

Returns:

  • (String)


64
65
66
# File 'lib/oci/database_management/models/sql_tuning_set.rb', line 64

def status
  @status
end

#time_createdDateTime

The created time of the Sql tuning set.

Returns:

  • (DateTime)


52
53
54
# File 'lib/oci/database_management/models/sql_tuning_set.rb', line 52

def time_created
  @time_created
end

#time_last_modifiedDateTime

Last modified time of the Sql tuning set.

Returns:

  • (DateTime)


60
61
62
# File 'lib/oci/database_management/models/sql_tuning_set.rb', line 60

def time_last_modified
  @time_last_modified
end

Class Method Details

.attribute_mapObject

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



89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# File 'lib/oci/database_management/models/sql_tuning_set.rb', line 89

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'id',
    'owner': :'owner',
    'name': :'name',
    'statement_count': :'statementCount',
    'time_created': :'timeCreated',
    'description': :'description',
    'time_last_modified': :'timeLastModified',
    'status': :'status',
    'scheduled_job_name': :'scheduledJobName',
    'error_message': :'errorMessage',
    'all_sql_statements_fetched': :'allSqlStatementsFetched',
    'sql_list': :'sqlList'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# File 'lib/oci/database_management/models/sql_tuning_set.rb', line 109

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'Integer',
    'owner': :'String',
    'name': :'String',
    'statement_count': :'Integer',
    'time_created': :'DateTime',
    'description': :'String',
    'time_last_modified': :'DateTime',
    'status': :'String',
    'scheduled_job_name': :'String',
    'error_message': :'String',
    'all_sql_statements_fetched': :'String',
    'sql_list': :'Array<OCI::DatabaseManagement::Models::SqlInSqlTuningSet>'
    # 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



238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
# File 'lib/oci/database_management/models/sql_tuning_set.rb', line 238

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

  self.class == other.class &&
    id == other.id &&
    owner == other.owner &&
    name == other.name &&
    statement_count == other.statement_count &&
    time_created == other.time_created &&
    description == other.description &&
    time_last_modified == other.time_last_modified &&
    status == other.status &&
    scheduled_job_name == other.scheduled_job_name &&
    error_message == other.error_message &&
    all_sql_statements_fetched == other.all_sql_statements_fetched &&
    sql_list == other.sql_list
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



279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
# File 'lib/oci/database_management/models/sql_tuning_set.rb', line 279

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


259
260
261
# File 'lib/oci/database_management/models/sql_tuning_set.rb', line 259

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



268
269
270
# File 'lib/oci/database_management/models/sql_tuning_set.rb', line 268

def hash
  [id, owner, name, statement_count, time_created, description, time_last_modified, status, scheduled_job_name, error_message, all_sql_statements_fetched, sql_list].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



312
313
314
315
316
317
318
319
320
321
# File 'lib/oci/database_management/models/sql_tuning_set.rb', line 312

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



306
307
308
# File 'lib/oci/database_management/models/sql_tuning_set.rb', line 306

def to_s
  to_hash.to_s
end