Class: OCI::DatabaseManagement::Models::StartSqlTuningTaskDetails
- Inherits:
-
Object
- Object
- OCI::DatabaseManagement::Models::StartSqlTuningTaskDetails
- Defined in:
- lib/oci/database_management/models/start_sql_tuning_task_details.rb
Overview
The request to start a SQL tuning task. It takes either credentialDetails or databaseCredential. It's recommended to provide databaseCredential
Constant Summary collapse
- SCOPE_ENUM =
[ SCOPE_LIMITED = 'LIMITED'.freeze, SCOPE_COMPREHENSIVE = 'COMPREHENSIVE'.freeze ].freeze
Instance Attribute Summary collapse
- #credential_details ⇒ OCI::DatabaseManagement::Models::SqlTuningTaskCredentialDetails
- #database_credential ⇒ OCI::DatabaseManagement::Models::DatabaseCredentialDetails
-
#scope ⇒ String
[Required] The scope for the SQL tuning task.
-
#sql_details ⇒ Array<OCI::DatabaseManagement::Models::SqlTuningTaskSqlDetail>
The details of the SQL statement on which tuning is performed.
- #sql_tuning_set ⇒ OCI::DatabaseManagement::Models::SqlTuningSetInput
-
#statement_time_limit_in_minutes ⇒ Integer
The time limit per SQL statement (in minutes).
-
#task_description ⇒ String
The description of the SQL tuning task.
-
#task_name ⇒ String
[Required] The name of the SQL tuning task.
-
#time_ended ⇒ DateTime
The end time of the period in which SQL statements are running.
-
#time_started ⇒ DateTime
The start time of the period in which SQL statements are running.
-
#total_time_limit_in_minutes ⇒ Integer
[Required] The time limit for running the SQL tuning task.
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 = {}) ⇒ StartSqlTuningTaskDetails
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 = {}) ⇒ StartSqlTuningTaskDetails
Initializes the object
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 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 |
# File 'lib/oci/database_management/models/start_sql_tuning_task_details.rb', line 122 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.task_description = attributes[:'taskDescription'] if attributes[:'taskDescription'] raise 'You cannot provide both :taskDescription and :task_description' if attributes.key?(:'taskDescription') && attributes.key?(:'task_description') self.task_description = attributes[:'task_description'] if attributes[:'task_description'] self.credential_details = attributes[:'credentialDetails'] if attributes[:'credentialDetails'] raise 'You cannot provide both :credentialDetails and :credential_details' if attributes.key?(:'credentialDetails') && attributes.key?(:'credential_details') self.credential_details = attributes[:'credential_details'] if attributes[:'credential_details'] self.database_credential = attributes[:'databaseCredential'] if attributes[:'databaseCredential'] raise 'You cannot provide both :databaseCredential and :database_credential' if attributes.key?(:'databaseCredential') && attributes.key?(:'database_credential') self.database_credential = attributes[:'database_credential'] if attributes[:'database_credential'] self.total_time_limit_in_minutes = attributes[:'totalTimeLimitInMinutes'] if attributes[:'totalTimeLimitInMinutes'] raise 'You cannot provide both :totalTimeLimitInMinutes and :total_time_limit_in_minutes' if attributes.key?(:'totalTimeLimitInMinutes') && attributes.key?(:'total_time_limit_in_minutes') self.total_time_limit_in_minutes = attributes[:'total_time_limit_in_minutes'] if attributes[:'total_time_limit_in_minutes'] self.scope = attributes[:'scope'] if attributes[:'scope'] self.statement_time_limit_in_minutes = attributes[:'statementTimeLimitInMinutes'] if attributes[:'statementTimeLimitInMinutes'] raise 'You cannot provide both :statementTimeLimitInMinutes and :statement_time_limit_in_minutes' if attributes.key?(:'statementTimeLimitInMinutes') && attributes.key?(:'statement_time_limit_in_minutes') self.statement_time_limit_in_minutes = attributes[:'statement_time_limit_in_minutes'] if attributes[:'statement_time_limit_in_minutes'] self.sql_tuning_set = attributes[:'sqlTuningSet'] if attributes[:'sqlTuningSet'] raise 'You cannot provide both :sqlTuningSet and :sql_tuning_set' if attributes.key?(:'sqlTuningSet') && attributes.key?(:'sql_tuning_set') self.sql_tuning_set = attributes[:'sql_tuning_set'] if attributes[:'sql_tuning_set'] self.sql_details = attributes[:'sqlDetails'] if attributes[:'sqlDetails'] raise 'You cannot provide both :sqlDetails and :sql_details' if attributes.key?(:'sqlDetails') && attributes.key?(:'sql_details') self.sql_details = attributes[:'sql_details'] if attributes[:'sql_details'] self.time_started = attributes[:'timeStarted'] if attributes[:'timeStarted'] raise 'You cannot provide both :timeStarted and :time_started' if attributes.key?(:'timeStarted') && attributes.key?(:'time_started') self.time_started = attributes[:'time_started'] if attributes[:'time_started'] self.time_ended = attributes[:'timeEnded'] if attributes[:'timeEnded'] raise 'You cannot provide both :timeEnded and :time_ended' if attributes.key?(:'timeEnded') && attributes.key?(:'time_ended') self.time_ended = attributes[:'time_ended'] if attributes[:'time_ended'] end |
Instance Attribute Details
#credential_details ⇒ OCI::DatabaseManagement::Models::SqlTuningTaskCredentialDetails
27 28 29 |
# File 'lib/oci/database_management/models/start_sql_tuning_task_details.rb', line 27 def credential_details @credential_details end |
#database_credential ⇒ OCI::DatabaseManagement::Models::DatabaseCredentialDetails
30 31 32 |
# File 'lib/oci/database_management/models/start_sql_tuning_task_details.rb', line 30 def database_credential @database_credential end |
#scope ⇒ String
[Required] The scope for the SQL tuning task. For LIMITED scope, the SQL profile recommendation is excluded, so the task is executed faster. For COMPREHENSIVE scope, the SQL profile recommendation is included.
41 42 43 |
# File 'lib/oci/database_management/models/start_sql_tuning_task_details.rb', line 41 def scope @scope end |
#sql_details ⇒ Array<OCI::DatabaseManagement::Models::SqlTuningTaskSqlDetail>
The details of the SQL statement on which tuning is performed. To obtain the details of the SQL statement, you must provide either the sqlTuningSet or the tuple of sqlDetails/timeStarted/timeEnded.
57 58 59 |
# File 'lib/oci/database_management/models/start_sql_tuning_task_details.rb', line 57 def sql_details @sql_details end |
#sql_tuning_set ⇒ OCI::DatabaseManagement::Models::SqlTuningSetInput
50 51 52 |
# File 'lib/oci/database_management/models/start_sql_tuning_task_details.rb', line 50 def sql_tuning_set @sql_tuning_set end |
#statement_time_limit_in_minutes ⇒ Integer
The time limit per SQL statement (in minutes). This is for a task with the COMPREHENSIVE scope. The time limit per SQL statement should not be more than the total time limit.
47 48 49 |
# File 'lib/oci/database_management/models/start_sql_tuning_task_details.rb', line 47 def statement_time_limit_in_minutes @statement_time_limit_in_minutes end |
#task_description ⇒ String
The description of the SQL tuning task.
24 25 26 |
# File 'lib/oci/database_management/models/start_sql_tuning_task_details.rb', line 24 def task_description @task_description end |
#task_name ⇒ String
[Required] The name of the SQL tuning task. The name is unique per user in a database, and it is case-sensitive.
20 21 22 |
# File 'lib/oci/database_management/models/start_sql_tuning_task_details.rb', line 20 def task_name @task_name end |
#time_ended ⇒ DateTime
The end time of the period in which SQL statements are running.
65 66 67 |
# File 'lib/oci/database_management/models/start_sql_tuning_task_details.rb', line 65 def time_ended @time_ended end |
#time_started ⇒ DateTime
The start time of the period in which SQL statements are running.
61 62 63 |
# File 'lib/oci/database_management/models/start_sql_tuning_task_details.rb', line 61 def time_started @time_started end |
#total_time_limit_in_minutes ⇒ Integer
[Required] The time limit for running the SQL tuning task.
34 35 36 |
# File 'lib/oci/database_management/models/start_sql_tuning_task_details.rb', line 34 def total_time_limit_in_minutes @total_time_limit_in_minutes end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/oci/database_management/models/start_sql_tuning_task_details.rb', line 68 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'task_name': :'taskName', 'task_description': :'taskDescription', 'credential_details': :'credentialDetails', 'database_credential': :'databaseCredential', 'total_time_limit_in_minutes': :'totalTimeLimitInMinutes', 'scope': :'scope', 'statement_time_limit_in_minutes': :'statementTimeLimitInMinutes', 'sql_tuning_set': :'sqlTuningSet', 'sql_details': :'sqlDetails', 'time_started': :'timeStarted', 'time_ended': :'timeEnded' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/oci/database_management/models/start_sql_tuning_task_details.rb', line 87 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'task_name': :'String', 'task_description': :'String', 'credential_details': :'OCI::DatabaseManagement::Models::SqlTuningTaskCredentialDetails', 'database_credential': :'OCI::DatabaseManagement::Models::DatabaseCredentialDetails', 'total_time_limit_in_minutes': :'Integer', 'scope': :'String', 'statement_time_limit_in_minutes': :'Integer', 'sql_tuning_set': :'OCI::DatabaseManagement::Models::SqlTuningSetInput', 'sql_details': :'Array<OCI::DatabaseManagement::Models::SqlTuningTaskSqlDetail>', 'time_started': :'DateTime', 'time_ended': :'DateTime' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 |
# File 'lib/oci/database_management/models/start_sql_tuning_task_details.rb', line 206 def ==(other) return true if equal?(other) self.class == other.class && task_name == other.task_name && task_description == other.task_description && credential_details == other.credential_details && database_credential == other.database_credential && total_time_limit_in_minutes == other.total_time_limit_in_minutes && scope == other.scope && statement_time_limit_in_minutes == other.statement_time_limit_in_minutes && sql_tuning_set == other.sql_tuning_set && sql_details == other.sql_details && time_started == other.time_started && time_ended == other.time_ended end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 |
# File 'lib/oci/database_management/models/start_sql_tuning_task_details.rb', line 246 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
226 227 228 |
# File 'lib/oci/database_management/models/start_sql_tuning_task_details.rb', line 226 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
235 236 237 |
# File 'lib/oci/database_management/models/start_sql_tuning_task_details.rb', line 235 def hash [task_name, task_description, credential_details, database_credential, total_time_limit_in_minutes, scope, statement_time_limit_in_minutes, sql_tuning_set, sql_details, time_started, time_ended].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
279 280 281 282 283 284 285 286 287 288 |
# File 'lib/oci/database_management/models/start_sql_tuning_task_details.rb', line 279 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
273 274 275 |
# File 'lib/oci/database_management/models/start_sql_tuning_task_details.rb', line 273 def to_s to_hash.to_s end |