Class: OCI::DatabaseManagement::Models::IormPlan
- Inherits:
-
Object
- Object
- OCI::DatabaseManagement::Models::IormPlan
- Defined in:
- lib/oci/database_management/models/iorm_plan.rb
Overview
The IORM plan from an Exadata storage server.
Constant Summary collapse
- PLAN_STATUS_ENUM =
[ PLAN_STATUS_ACTIVE = 'ACTIVE'.freeze, PLAN_STATUS_INACTIVE = 'INACTIVE'.freeze, PLAN_STATUS_OTHER = 'OTHER'.freeze, PLAN_STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- PLAN_OBJECTIVE_ENUM =
[ PLAN_OBJECTIVE_AUTO = 'AUTO'.freeze, PLAN_OBJECTIVE_HIGH_THROUGHPUT = 'HIGH_THROUGHPUT'.freeze, PLAN_OBJECTIVE_LOW_LATENCY = 'LOW_LATENCY'.freeze, PLAN_OBJECTIVE_BALANCED = 'BALANCED'.freeze, PLAN_OBJECTIVE_BASIC = 'BASIC'.freeze, PLAN_OBJECTIVE_OTHER = 'OTHER'.freeze, PLAN_OBJECTIVE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
- #db_plan ⇒ OCI::DatabaseManagement::Models::DatabasePlan
-
#plan_objective ⇒ String
[Required] The objective of the IORM plan.
-
#plan_status ⇒ String
[Required] The status of the IORM plan.
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 = {}) ⇒ IormPlan
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 = {}) ⇒ IormPlan
Initializes the object
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/oci/database_management/models/iorm_plan.rb', line 71 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.plan_status = attributes[:'planStatus'] if attributes[:'planStatus'] raise 'You cannot provide both :planStatus and :plan_status' if attributes.key?(:'planStatus') && attributes.key?(:'plan_status') self.plan_status = attributes[:'plan_status'] if attributes[:'plan_status'] self.plan_objective = attributes[:'planObjective'] if attributes[:'planObjective'] raise 'You cannot provide both :planObjective and :plan_objective' if attributes.key?(:'planObjective') && attributes.key?(:'plan_objective') self.plan_objective = attributes[:'plan_objective'] if attributes[:'plan_objective'] self.db_plan = attributes[:'dbPlan'] if attributes[:'dbPlan'] raise 'You cannot provide both :dbPlan and :db_plan' if attributes.key?(:'dbPlan') && attributes.key?(:'db_plan') self.db_plan = attributes[:'db_plan'] if attributes[:'db_plan'] end |
Instance Attribute Details
#db_plan ⇒ OCI::DatabaseManagement::Models::DatabasePlan
38 39 40 |
# File 'lib/oci/database_management/models/iorm_plan.rb', line 38 def db_plan @db_plan end |
#plan_objective ⇒ String
[Required] The objective of the IORM plan.
35 36 37 |
# File 'lib/oci/database_management/models/iorm_plan.rb', line 35 def plan_objective @plan_objective end |
#plan_status ⇒ String
[Required] The status of the IORM plan.
31 32 33 |
# File 'lib/oci/database_management/models/iorm_plan.rb', line 31 def plan_status @plan_status 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 |
# File 'lib/oci/database_management/models/iorm_plan.rb', line 41 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'plan_status': :'planStatus', 'plan_objective': :'planObjective', 'db_plan': :'dbPlan' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
52 53 54 55 56 57 58 59 60 |
# File 'lib/oci/database_management/models/iorm_plan.rb', line 52 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'plan_status': :'String', 'plan_objective': :'String', 'db_plan': :'OCI::DatabaseManagement::Models::DatabasePlan' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
129 130 131 132 133 134 135 136 |
# File 'lib/oci/database_management/models/iorm_plan.rb', line 129 def ==(other) return true if equal?(other) self.class == other.class && plan_status == other.plan_status && plan_objective == other.plan_objective && db_plan == other.db_plan 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/iorm_plan.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/iorm_plan.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/iorm_plan.rb', line 150 def hash [plan_status, plan_objective, db_plan].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/iorm_plan.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/iorm_plan.rb', line 188 def to_s to_hash.to_s end |