Class: OCI::DatabaseManagement::Models::LoadSqlPlanBaselinesFromAwrDetails
- Inherits:
-
Object
- Object
- OCI::DatabaseManagement::Models::LoadSqlPlanBaselinesFromAwrDetails
- Defined in:
- lib/oci/database_management/models/load_sql_plan_baselines_from_awr_details.rb
Overview
The details required to load plans from Automatic Workload Repository (AWR). It takes either credentials or databaseCredential. It's recommended to provide databaseCredential
Instance Attribute Summary collapse
-
#begin_snapshot ⇒ Integer
[Required] The begin snapshot.
- #credentials ⇒ OCI::DatabaseManagement::Models::ManagedDatabaseCredential
- #database_credential ⇒ OCI::DatabaseManagement::Models::DatabaseCredentialDetails
-
#end_snapshot ⇒ Integer
[Required] The end snapshot.
-
#is_enabled ⇒ BOOLEAN
Indicates whether the loaded plans are enabled (
true
) or not (false
). -
#is_fixed ⇒ BOOLEAN
Indicates whether the plans are loaded as fixed plans (
true
) or non-fixed plans (false
). -
#job_description ⇒ String
The description of the job.
-
#job_name ⇒ String
[Required] The name of the database job used for loading SQL plan baselines.
-
#sql_text_filter ⇒ String
A filter applied to AWR to select only qualifying plans to be loaded.
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 = {}) ⇒ LoadSqlPlanBaselinesFromAwrDetails
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 = {}) ⇒ LoadSqlPlanBaselinesFromAwrDetails
Initializes the object
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 149 150 151 152 153 154 155 156 157 158 159 |
# File 'lib/oci/database_management/models/load_sql_plan_baselines_from_awr_details.rb', line 104 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.job_name = attributes[:'jobName'] if attributes[:'jobName'] raise 'You cannot provide both :jobName and :job_name' if attributes.key?(:'jobName') && attributes.key?(:'job_name') self.job_name = attributes[:'job_name'] if attributes[:'job_name'] self.job_description = attributes[:'jobDescription'] if attributes[:'jobDescription'] raise 'You cannot provide both :jobDescription and :job_description' if attributes.key?(:'jobDescription') && attributes.key?(:'job_description') self.job_description = attributes[:'job_description'] if attributes[:'job_description'] self.begin_snapshot = attributes[:'beginSnapshot'] if attributes[:'beginSnapshot'] raise 'You cannot provide both :beginSnapshot and :begin_snapshot' if attributes.key?(:'beginSnapshot') && attributes.key?(:'begin_snapshot') self.begin_snapshot = attributes[:'begin_snapshot'] if attributes[:'begin_snapshot'] self.end_snapshot = attributes[:'endSnapshot'] if attributes[:'endSnapshot'] raise 'You cannot provide both :endSnapshot and :end_snapshot' if attributes.key?(:'endSnapshot') && attributes.key?(:'end_snapshot') self.end_snapshot = attributes[:'end_snapshot'] if attributes[:'end_snapshot'] self.sql_text_filter = attributes[:'sqlTextFilter'] if attributes[:'sqlTextFilter'] raise 'You cannot provide both :sqlTextFilter and :sql_text_filter' if attributes.key?(:'sqlTextFilter') && attributes.key?(:'sql_text_filter') self.sql_text_filter = attributes[:'sql_text_filter'] if attributes[:'sql_text_filter'] self.is_fixed = attributes[:'isFixed'] unless attributes[:'isFixed'].nil? raise 'You cannot provide both :isFixed and :is_fixed' if attributes.key?(:'isFixed') && attributes.key?(:'is_fixed') self.is_fixed = attributes[:'is_fixed'] unless attributes[:'is_fixed'].nil? self.is_enabled = attributes[:'isEnabled'] unless attributes[:'isEnabled'].nil? raise 'You cannot provide both :isEnabled and :is_enabled' if attributes.key?(:'isEnabled') && attributes.key?(:'is_enabled') self.is_enabled = attributes[:'is_enabled'] unless attributes[:'is_enabled'].nil? self.credentials = attributes[:'credentials'] if attributes[:'credentials'] 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'] end |
Instance Attribute Details
#begin_snapshot ⇒ Integer
[Required] The begin snapshot.
23 24 25 |
# File 'lib/oci/database_management/models/load_sql_plan_baselines_from_awr_details.rb', line 23 def begin_snapshot @begin_snapshot end |
#credentials ⇒ OCI::DatabaseManagement::Models::ManagedDatabaseCredential
50 51 52 |
# File 'lib/oci/database_management/models/load_sql_plan_baselines_from_awr_details.rb', line 50 def credentials @credentials end |
#database_credential ⇒ OCI::DatabaseManagement::Models::DatabaseCredentialDetails
53 54 55 |
# File 'lib/oci/database_management/models/load_sql_plan_baselines_from_awr_details.rb', line 53 def database_credential @database_credential end |
#end_snapshot ⇒ Integer
[Required] The end snapshot.
27 28 29 |
# File 'lib/oci/database_management/models/load_sql_plan_baselines_from_awr_details.rb', line 27 def end_snapshot @end_snapshot end |
#is_enabled ⇒ BOOLEAN
Indicates whether the loaded plans are enabled (true
) or not (false
). By default, they are enabled.
47 48 49 |
# File 'lib/oci/database_management/models/load_sql_plan_baselines_from_awr_details.rb', line 47 def is_enabled @is_enabled end |
#is_fixed ⇒ BOOLEAN
Indicates whether the plans are loaded as fixed plans (true
) or non-fixed plans (false
). By default, they are loaded as non-fixed plans.
41 42 43 |
# File 'lib/oci/database_management/models/load_sql_plan_baselines_from_awr_details.rb', line 41 def is_fixed @is_fixed end |
#job_description ⇒ String
The description of the job.
19 20 21 |
# File 'lib/oci/database_management/models/load_sql_plan_baselines_from_awr_details.rb', line 19 def job_description @job_description end |
#job_name ⇒ String
[Required] The name of the database job used for loading SQL plan baselines.
15 16 17 |
# File 'lib/oci/database_management/models/load_sql_plan_baselines_from_awr_details.rb', line 15 def job_name @job_name end |
#sql_text_filter ⇒ String
A filter applied to AWR to select only qualifying plans to be loaded. By default all plans in AWR are selected. The filter can take the form of any WHERE
clause predicate that can be specified against the column DBA_HIST_SQLTEXT.SQL_TEXT
. An example is sql_text like 'SELECT %'
.
35 36 37 |
# File 'lib/oci/database_management/models/load_sql_plan_baselines_from_awr_details.rb', line 35 def sql_text_filter @sql_text_filter end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/oci/database_management/models/load_sql_plan_baselines_from_awr_details.rb', line 56 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'job_name': :'jobName', 'job_description': :'jobDescription', 'begin_snapshot': :'beginSnapshot', 'end_snapshot': :'endSnapshot', 'sql_text_filter': :'sqlTextFilter', 'is_fixed': :'isFixed', 'is_enabled': :'isEnabled', 'credentials': :'credentials', 'database_credential': :'databaseCredential' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/oci/database_management/models/load_sql_plan_baselines_from_awr_details.rb', line 73 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'job_name': :'String', 'job_description': :'String', 'begin_snapshot': :'Integer', 'end_snapshot': :'Integer', 'sql_text_filter': :'String', 'is_fixed': :'BOOLEAN', 'is_enabled': :'BOOLEAN', 'credentials': :'OCI::DatabaseManagement::Models::ManagedDatabaseCredential', 'database_credential': :'OCI::DatabaseManagement::Models::DatabaseCredentialDetails' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
168 169 170 171 172 173 174 175 176 177 178 179 180 181 |
# File 'lib/oci/database_management/models/load_sql_plan_baselines_from_awr_details.rb', line 168 def ==(other) return true if equal?(other) self.class == other.class && job_name == other.job_name && job_description == other.job_description && begin_snapshot == other.begin_snapshot && end_snapshot == other.end_snapshot && sql_text_filter == other.sql_text_filter && is_fixed == other.is_fixed && is_enabled == other.is_enabled && credentials == other.credentials && database_credential == other.database_credential end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 |
# File 'lib/oci/database_management/models/load_sql_plan_baselines_from_awr_details.rb', line 206 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
186 187 188 |
# File 'lib/oci/database_management/models/load_sql_plan_baselines_from_awr_details.rb', line 186 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
195 196 197 |
# File 'lib/oci/database_management/models/load_sql_plan_baselines_from_awr_details.rb', line 195 def hash [job_name, job_description, begin_snapshot, end_snapshot, sql_text_filter, is_fixed, is_enabled, credentials, database_credential].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
239 240 241 242 243 244 245 246 247 248 |
# File 'lib/oci/database_management/models/load_sql_plan_baselines_from_awr_details.rb', line 239 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
233 234 235 |
# File 'lib/oci/database_management/models/load_sql_plan_baselines_from_awr_details.rb', line 233 def to_s to_hash.to_s end |