Class: OCI::DatabaseManagement::Models::ChangeSqlPlanBaselinesAttributesDetails
- Inherits:
-
Object
- Object
- OCI::DatabaseManagement::Models::ChangeSqlPlanBaselinesAttributesDetails
- Defined in:
- lib/oci/database_management/models/change_sql_plan_baselines_attributes_details.rb
Overview
The details required to change SQL plan baseline attributes.
Instance Attribute Summary collapse
-
#credentials ⇒ OCI::DatabaseManagement::Models::ManagedDatabaseCredential
This attribute is required.
-
#is_auto_purged ⇒ BOOLEAN
Indicates whether the plan is purged if it is not used for a time period.
-
#is_enabled ⇒ BOOLEAN
Indicates whether the plan is available for use by the optimizer.
-
#is_fixed ⇒ BOOLEAN
Indicates whether the plan baseline is fixed.
-
#plan_name ⇒ String
Then plan name.
-
#sql_handle ⇒ String
The SQL statement handle.
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 = {}) ⇒ ChangeSqlPlanBaselinesAttributesDetails
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 = {}) ⇒ ChangeSqlPlanBaselinesAttributesDetails
Initializes the object
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/oci/database_management/models/change_sql_plan_baselines_attributes_details.rb', line 80 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.sql_handle = attributes[:'sqlHandle'] if attributes[:'sqlHandle'] raise 'You cannot provide both :sqlHandle and :sql_handle' if attributes.key?(:'sqlHandle') && attributes.key?(:'sql_handle') self.sql_handle = attributes[:'sql_handle'] if attributes[:'sql_handle'] self.plan_name = attributes[:'planName'] if attributes[:'planName'] raise 'You cannot provide both :planName and :plan_name' if attributes.key?(:'planName') && attributes.key?(:'plan_name') self.plan_name = attributes[:'plan_name'] if attributes[:'plan_name'] 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.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_auto_purged = attributes[:'isAutoPurged'] unless attributes[:'isAutoPurged'].nil? raise 'You cannot provide both :isAutoPurged and :is_auto_purged' if attributes.key?(:'isAutoPurged') && attributes.key?(:'is_auto_purged') self.is_auto_purged = attributes[:'is_auto_purged'] unless attributes[:'is_auto_purged'].nil? self.credentials = attributes[:'credentials'] if attributes[:'credentials'] end |
Instance Attribute Details
#credentials ⇒ OCI::DatabaseManagement::Models::ManagedDatabaseCredential
This attribute is required.
38 39 40 |
# File 'lib/oci/database_management/models/change_sql_plan_baselines_attributes_details.rb', line 38 def credentials @credentials end |
#is_auto_purged ⇒ BOOLEAN
Indicates whether the plan is purged if it is not used for a time period.
34 35 36 |
# File 'lib/oci/database_management/models/change_sql_plan_baselines_attributes_details.rb', line 34 def is_auto_purged @is_auto_purged end |
#is_enabled ⇒ BOOLEAN
Indicates whether the plan is available for use by the optimizer.
26 27 28 |
# File 'lib/oci/database_management/models/change_sql_plan_baselines_attributes_details.rb', line 26 def is_enabled @is_enabled end |
#is_fixed ⇒ BOOLEAN
Indicates whether the plan baseline is fixed. A fixed plan takes precedence over a non-fixed plan.
30 31 32 |
# File 'lib/oci/database_management/models/change_sql_plan_baselines_attributes_details.rb', line 30 def is_fixed @is_fixed end |
#plan_name ⇒ String
Then plan name. It identifies a specific plan. If null' then all plans associated with a SQL statement identified by
sqlHandle' are considered for attribute changes.
22 23 24 |
# File 'lib/oci/database_management/models/change_sql_plan_baselines_attributes_details.rb', line 22 def plan_name @plan_name end |
#sql_handle ⇒ String
The SQL statement handle. It identifies plans associated with a SQL statement for attribute changes. If null
then planName
must be specified.
16 17 18 |
# File 'lib/oci/database_management/models/change_sql_plan_baselines_attributes_details.rb', line 16 def sql_handle @sql_handle end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/oci/database_management/models/change_sql_plan_baselines_attributes_details.rb', line 41 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'sql_handle': :'sqlHandle', 'plan_name': :'planName', 'is_enabled': :'isEnabled', 'is_fixed': :'isFixed', 'is_auto_purged': :'isAutoPurged', 'credentials': :'credentials' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/oci/database_management/models/change_sql_plan_baselines_attributes_details.rb', line 55 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'sql_handle': :'String', 'plan_name': :'String', 'is_enabled': :'BOOLEAN', 'is_fixed': :'BOOLEAN', 'is_auto_purged': :'BOOLEAN', 'credentials': :'OCI::DatabaseManagement::Models::ManagedDatabaseCredential' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
126 127 128 129 130 131 132 133 134 135 136 |
# File 'lib/oci/database_management/models/change_sql_plan_baselines_attributes_details.rb', line 126 def ==(other) return true if equal?(other) self.class == other.class && sql_handle == other.sql_handle && plan_name == other.plan_name && is_enabled == other.is_enabled && is_fixed == other.is_fixed && is_auto_purged == other.is_auto_purged && credentials == other.credentials end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 |
# File 'lib/oci/database_management/models/change_sql_plan_baselines_attributes_details.rb', line 161 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
141 142 143 |
# File 'lib/oci/database_management/models/change_sql_plan_baselines_attributes_details.rb', line 141 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
150 151 152 |
# File 'lib/oci/database_management/models/change_sql_plan_baselines_attributes_details.rb', line 150 def hash [sql_handle, plan_name, is_enabled, is_fixed, is_auto_purged, credentials].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
194 195 196 197 198 199 200 201 202 203 |
# File 'lib/oci/database_management/models/change_sql_plan_baselines_attributes_details.rb', line 194 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
188 189 190 |
# File 'lib/oci/database_management/models/change_sql_plan_baselines_attributes_details.rb', line 188 def to_s to_hash.to_s end |