Class: OCI::DatabaseManagement::Models::SqlTuningSet
- Inherits:
-
Object
- Object
- OCI::DatabaseManagement::Models::SqlTuningSet
- 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
Instance Attribute Summary collapse
-
#all_sql_statements_fetched ⇒ String
In OCI database management, there is a limit to fetch only 2000 rows.
-
#description ⇒ String
The description of the Sql tuning set.
-
#error_message ⇒ String
Latest execution error of the plsql that was submitted as a scheduler job.
-
#id ⇒ Integer
The unique Sql tuning set identifier.
-
#name ⇒ String
[Required] The name of the Sql tuning set.
-
#owner ⇒ String
[Required] The owner of the Sql tuning set.
-
#scheduled_job_name ⇒ String
Name of the Sql tuning set scheduler job.
-
#sql_list ⇒ Array<OCI::DatabaseManagement::Models::SqlInSqlTuningSet>
A list of the Sqls associated with the Sql tuning set.
-
#statement_count ⇒ Integer
Number of statements in the Sql tuning set.
-
#status ⇒ String
Current status of the Sql tuning set.
-
#time_created ⇒ DateTime
The created time of the Sql tuning set.
-
#time_last_modified ⇒ DateTime
Last modified time of the Sql tuning set.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ SqlTuningSet
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ SqlTuningSet
Initializes the object
140 141 142 143 144 145 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 |
# File 'lib/oci/database_management/models/sql_tuning_set.rb', line 140 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. = attributes[:'errorMessage'] if attributes[:'errorMessage'] raise 'You cannot provide both :errorMessage and :error_message' if attributes.key?(:'errorMessage') && attributes.key?(:'error_message') self. = 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_fetched ⇒ String
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.
76 77 78 |
# File 'lib/oci/database_management/models/sql_tuning_set.rb', line 76 def all_sql_statements_fetched @all_sql_statements_fetched end |
#description ⇒ String
The description of the Sql tuning set.
50 51 52 |
# File 'lib/oci/database_management/models/sql_tuning_set.rb', line 50 def description @description end |
#error_message ⇒ String
Latest execution error of the plsql that was submitted as a scheduler job.
66 67 68 |
# File 'lib/oci/database_management/models/sql_tuning_set.rb', line 66 def @error_message end |
#id ⇒ Integer
The unique Sql tuning set identifier.
30 31 32 |
# File 'lib/oci/database_management/models/sql_tuning_set.rb', line 30 def id @id end |
#name ⇒ String
[Required] The name of the Sql tuning set.
38 39 40 |
# File 'lib/oci/database_management/models/sql_tuning_set.rb', line 38 def name @name end |
#owner ⇒ String
[Required] The owner of the Sql tuning set.
34 35 36 |
# File 'lib/oci/database_management/models/sql_tuning_set.rb', line 34 def owner @owner end |
#scheduled_job_name ⇒ String
Name of the Sql tuning set scheduler job.
62 63 64 |
# File 'lib/oci/database_management/models/sql_tuning_set.rb', line 62 def scheduled_job_name @scheduled_job_name end |
#sql_list ⇒ Array<OCI::DatabaseManagement::Models::SqlInSqlTuningSet>
A list of the Sqls associated with the Sql tuning set.
80 81 82 |
# File 'lib/oci/database_management/models/sql_tuning_set.rb', line 80 def sql_list @sql_list end |
#statement_count ⇒ Integer
Number of statements in the Sql tuning set
42 43 44 |
# File 'lib/oci/database_management/models/sql_tuning_set.rb', line 42 def statement_count @statement_count end |
#status ⇒ String
Current status of the Sql tuning set.
58 59 60 |
# File 'lib/oci/database_management/models/sql_tuning_set.rb', line 58 def status @status end |
#time_created ⇒ DateTime
The created time of the Sql tuning set.
46 47 48 |
# File 'lib/oci/database_management/models/sql_tuning_set.rb', line 46 def time_created @time_created end |
#time_last_modified ⇒ DateTime
Last modified time of the Sql tuning set.
54 55 56 |
# File 'lib/oci/database_management/models/sql_tuning_set.rb', line 54 def time_last_modified @time_last_modified end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/oci/database_management/models/sql_tuning_set.rb', line 83 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_types ⇒ Object
Attribute type mapping.
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
# File 'lib/oci/database_management/models/sql_tuning_set.rb', line 103 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.
219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 |
# File 'lib/oci/database_management/models/sql_tuning_set.rb', line 219 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 && == other. && 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
260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 |
# File 'lib/oci/database_management/models/sql_tuning_set.rb', line 260 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
240 241 242 |
# File 'lib/oci/database_management/models/sql_tuning_set.rb', line 240 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
249 250 251 |
# File 'lib/oci/database_management/models/sql_tuning_set.rb', line 249 def hash [id, owner, name, statement_count, time_created, description, time_last_modified, status, scheduled_job_name, , all_sql_statements_fetched, sql_list].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
293 294 295 296 297 298 299 300 301 302 |
# File 'lib/oci/database_management/models/sql_tuning_set.rb', line 293 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_s ⇒ String
Returns the string representation of the object
287 288 289 |
# File 'lib/oci/database_management/models/sql_tuning_set.rb', line 287 def to_s to_hash.to_s end |