Class: OCI::Bds::Models::ChangeShapeNodes
- Inherits:
-
Object
- Object
- OCI::Bds::Models::ChangeShapeNodes
- Defined in:
- lib/oci/bds/models/change_shape_nodes.rb
Overview
Individual worker nodes groups details.
Instance Attribute Summary collapse
-
#cloudsql ⇒ String
Change shape of the Cloud SQL node to the desired target shape.
-
#compute_only_worker ⇒ String
Change shape of compute only worker nodes to the desired target shape.
- #compute_only_worker_shape_config ⇒ OCI::Bds::Models::ShapeConfigDetails
-
#master ⇒ String
Change shape of master nodes to the desired target shape.
- #master_shape_config ⇒ OCI::Bds::Models::ShapeConfigDetails
-
#utility ⇒ String
Change shape of utility nodes to the desired target shape.
- #utility_shape_config ⇒ OCI::Bds::Models::ShapeConfigDetails
-
#worker ⇒ String
Change shape of worker nodes to the desired target shape.
- #worker_shape_config ⇒ OCI::Bds::Models::ShapeConfigDetails
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 = {}) ⇒ ChangeShapeNodes
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 = {}) ⇒ ChangeShapeNodes
Initializes the object
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 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
# File 'lib/oci/bds/models/change_shape_nodes.rb', line 91 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.worker = attributes[:'worker'] if attributes[:'worker'] self.worker_shape_config = attributes[:'workerShapeConfig'] if attributes[:'workerShapeConfig'] raise 'You cannot provide both :workerShapeConfig and :worker_shape_config' if attributes.key?(:'workerShapeConfig') && attributes.key?(:'worker_shape_config') self.worker_shape_config = attributes[:'worker_shape_config'] if attributes[:'worker_shape_config'] self.compute_only_worker = attributes[:'computeOnlyWorker'] if attributes[:'computeOnlyWorker'] raise 'You cannot provide both :computeOnlyWorker and :compute_only_worker' if attributes.key?(:'computeOnlyWorker') && attributes.key?(:'compute_only_worker') self.compute_only_worker = attributes[:'compute_only_worker'] if attributes[:'compute_only_worker'] self.compute_only_worker_shape_config = attributes[:'computeOnlyWorkerShapeConfig'] if attributes[:'computeOnlyWorkerShapeConfig'] raise 'You cannot provide both :computeOnlyWorkerShapeConfig and :compute_only_worker_shape_config' if attributes.key?(:'computeOnlyWorkerShapeConfig') && attributes.key?(:'compute_only_worker_shape_config') self.compute_only_worker_shape_config = attributes[:'compute_only_worker_shape_config'] if attributes[:'compute_only_worker_shape_config'] self.master = attributes[:'master'] if attributes[:'master'] self.master_shape_config = attributes[:'masterShapeConfig'] if attributes[:'masterShapeConfig'] raise 'You cannot provide both :masterShapeConfig and :master_shape_config' if attributes.key?(:'masterShapeConfig') && attributes.key?(:'master_shape_config') self.master_shape_config = attributes[:'master_shape_config'] if attributes[:'master_shape_config'] self.utility = attributes[:'utility'] if attributes[:'utility'] self.utility_shape_config = attributes[:'utilityShapeConfig'] if attributes[:'utilityShapeConfig'] raise 'You cannot provide both :utilityShapeConfig and :utility_shape_config' if attributes.key?(:'utilityShapeConfig') && attributes.key?(:'utility_shape_config') self.utility_shape_config = attributes[:'utility_shape_config'] if attributes[:'utility_shape_config'] self.cloudsql = attributes[:'cloudsql'] if attributes[:'cloudsql'] end |
Instance Attribute Details
#cloudsql ⇒ String
Change shape of the Cloud SQL node to the desired target shape. Only VM_STANDARD shapes are allowed here.
40 41 42 |
# File 'lib/oci/bds/models/change_shape_nodes.rb', line 40 def cloudsql @cloudsql end |
#compute_only_worker ⇒ String
Change shape of compute only worker nodes to the desired target shape. Both VM_STANDARD and E4 Flex shapes are allowed here.
19 20 21 |
# File 'lib/oci/bds/models/change_shape_nodes.rb', line 19 def compute_only_worker @compute_only_worker end |
#compute_only_worker_shape_config ⇒ OCI::Bds::Models::ShapeConfigDetails
22 23 24 |
# File 'lib/oci/bds/models/change_shape_nodes.rb', line 22 def compute_only_worker_shape_config @compute_only_worker_shape_config end |
#master ⇒ String
Change shape of master nodes to the desired target shape. Both VM_STANDARD and E4 Flex shapes are allowed here.
26 27 28 |
# File 'lib/oci/bds/models/change_shape_nodes.rb', line 26 def master @master end |
#master_shape_config ⇒ OCI::Bds::Models::ShapeConfigDetails
29 30 31 |
# File 'lib/oci/bds/models/change_shape_nodes.rb', line 29 def master_shape_config @master_shape_config end |
#utility ⇒ String
Change shape of utility nodes to the desired target shape. Both VM_STANDARD and E4 Flex shapes are allowed here.
33 34 35 |
# File 'lib/oci/bds/models/change_shape_nodes.rb', line 33 def utility @utility end |
#utility_shape_config ⇒ OCI::Bds::Models::ShapeConfigDetails
36 37 38 |
# File 'lib/oci/bds/models/change_shape_nodes.rb', line 36 def utility_shape_config @utility_shape_config end |
#worker ⇒ String
Change shape of worker nodes to the desired target shape. Both VM_STANDARD and E4 Flex shapes are allowed here.
12 13 14 |
# File 'lib/oci/bds/models/change_shape_nodes.rb', line 12 def worker @worker end |
#worker_shape_config ⇒ OCI::Bds::Models::ShapeConfigDetails
15 16 17 |
# File 'lib/oci/bds/models/change_shape_nodes.rb', line 15 def worker_shape_config @worker_shape_config end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/oci/bds/models/change_shape_nodes.rb', line 43 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'worker': :'worker', 'worker_shape_config': :'workerShapeConfig', 'compute_only_worker': :'computeOnlyWorker', 'compute_only_worker_shape_config': :'computeOnlyWorkerShapeConfig', 'master': :'master', 'master_shape_config': :'masterShapeConfig', 'utility': :'utility', 'utility_shape_config': :'utilityShapeConfig', 'cloudsql': :'cloudsql' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/oci/bds/models/change_shape_nodes.rb', line 60 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'worker': :'String', 'worker_shape_config': :'OCI::Bds::Models::ShapeConfigDetails', 'compute_only_worker': :'String', 'compute_only_worker_shape_config': :'OCI::Bds::Models::ShapeConfigDetails', 'master': :'String', 'master_shape_config': :'OCI::Bds::Models::ShapeConfigDetails', 'utility': :'String', 'utility_shape_config': :'OCI::Bds::Models::ShapeConfigDetails', 'cloudsql': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
143 144 145 146 147 148 149 150 151 152 153 154 155 156 |
# File 'lib/oci/bds/models/change_shape_nodes.rb', line 143 def ==(other) return true if equal?(other) self.class == other.class && worker == other.worker && worker_shape_config == other.worker_shape_config && compute_only_worker == other.compute_only_worker && compute_only_worker_shape_config == other.compute_only_worker_shape_config && master == other.master && master_shape_config == other.master_shape_config && utility == other.utility && utility_shape_config == other.utility_shape_config && cloudsql == other.cloudsql end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 |
# File 'lib/oci/bds/models/change_shape_nodes.rb', line 181 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
161 162 163 |
# File 'lib/oci/bds/models/change_shape_nodes.rb', line 161 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
170 171 172 |
# File 'lib/oci/bds/models/change_shape_nodes.rb', line 170 def hash [worker, worker_shape_config, compute_only_worker, compute_only_worker_shape_config, master, master_shape_config, utility, utility_shape_config, cloudsql].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
214 215 216 217 218 219 220 221 222 223 |
# File 'lib/oci/bds/models/change_shape_nodes.rb', line 214 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
208 209 210 |
# File 'lib/oci/bds/models/change_shape_nodes.rb', line 208 def to_s to_hash.to_s end |