Class: OCI::Bds::Models::ChangeShapeNodes

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/bds/models/change_shape_nodes.rb

Overview

Individual worker nodes groups details.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ ChangeShapeNodes

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):



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
190
191
192
193
# File 'lib/oci/bds/models/change_shape_nodes.rb', line 124

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']

  self.cloudsql_shape_config = attributes[:'cloudsqlShapeConfig'] if attributes[:'cloudsqlShapeConfig']

  raise 'You cannot provide both :cloudsqlShapeConfig and :cloudsql_shape_config' if attributes.key?(:'cloudsqlShapeConfig') && attributes.key?(:'cloudsql_shape_config')

  self.cloudsql_shape_config = attributes[:'cloudsql_shape_config'] if attributes[:'cloudsql_shape_config']

  self.edge = attributes[:'edge'] if attributes[:'edge']

  self.edge_shape_config = attributes[:'edgeShapeConfig'] if attributes[:'edgeShapeConfig']

  raise 'You cannot provide both :edgeShapeConfig and :edge_shape_config' if attributes.key?(:'edgeShapeConfig') && attributes.key?(:'edge_shape_config')

  self.edge_shape_config = attributes[:'edge_shape_config'] if attributes[:'edge_shape_config']

  self.kafka_broker = attributes[:'kafkaBroker'] if attributes[:'kafkaBroker']

  raise 'You cannot provide both :kafkaBroker and :kafka_broker' if attributes.key?(:'kafkaBroker') && attributes.key?(:'kafka_broker')

  self.kafka_broker = attributes[:'kafka_broker'] if attributes[:'kafka_broker']

  self.kafka_broker_shape_config = attributes[:'kafkaBrokerShapeConfig'] if attributes[:'kafkaBrokerShapeConfig']

  raise 'You cannot provide both :kafkaBrokerShapeConfig and :kafka_broker_shape_config' if attributes.key?(:'kafkaBrokerShapeConfig') && attributes.key?(:'kafka_broker_shape_config')

  self.kafka_broker_shape_config = attributes[:'kafka_broker_shape_config'] if attributes[:'kafka_broker_shape_config']
end

Instance Attribute Details

#cloudsqlString

Change shape of the Cloud SQL node to the desired target shape. Both VM_STANDARD and E4 Flex shapes are allowed here.

Returns:

  • (String)


41
42
43
# File 'lib/oci/bds/models/change_shape_nodes.rb', line 41

def cloudsql
  @cloudsql
end

#cloudsql_shape_configOCI::Bds::Models::ShapeConfigDetails



44
45
46
# File 'lib/oci/bds/models/change_shape_nodes.rb', line 44

def cloudsql_shape_config
  @cloudsql_shape_config
end

#compute_only_workerString

Change shape of compute only worker nodes to the desired target shape. Both VM_STANDARD and E4 Flex shapes are allowed here.

Returns:

  • (String)


20
21
22
# File 'lib/oci/bds/models/change_shape_nodes.rb', line 20

def compute_only_worker
  @compute_only_worker
end

#compute_only_worker_shape_configOCI::Bds::Models::ShapeConfigDetails



23
24
25
# File 'lib/oci/bds/models/change_shape_nodes.rb', line 23

def compute_only_worker_shape_config
  @compute_only_worker_shape_config
end

#edgeString

Change shape of edge nodes to the desired target shape. Both VM_STANDARD and E4 Flex shapes are allowed here.

Returns:

  • (String)


48
49
50
# File 'lib/oci/bds/models/change_shape_nodes.rb', line 48

def edge
  @edge
end

#edge_shape_configOCI::Bds::Models::ShapeConfigDetails



51
52
53
# File 'lib/oci/bds/models/change_shape_nodes.rb', line 51

def edge_shape_config
  @edge_shape_config
end

#kafka_brokerString

Change shape of Kafka Broker nodes to the desired target shape. Both VM_STANDARD and E4 Flex shapes are allowed here.

Returns:

  • (String)


55
56
57
# File 'lib/oci/bds/models/change_shape_nodes.rb', line 55

def kafka_broker
  @kafka_broker
end

#kafka_broker_shape_configOCI::Bds::Models::ShapeConfigDetails



58
59
60
# File 'lib/oci/bds/models/change_shape_nodes.rb', line 58

def kafka_broker_shape_config
  @kafka_broker_shape_config
end

#masterString

Change shape of master nodes to the desired target shape. Both VM_STANDARD and E4 Flex shapes are allowed here.

Returns:

  • (String)


27
28
29
# File 'lib/oci/bds/models/change_shape_nodes.rb', line 27

def master
  @master
end

#master_shape_configOCI::Bds::Models::ShapeConfigDetails



30
31
32
# File 'lib/oci/bds/models/change_shape_nodes.rb', line 30

def master_shape_config
  @master_shape_config
end

#utilityString

Change shape of utility nodes to the desired target shape. Both VM_STANDARD and E4 Flex shapes are allowed here.

Returns:

  • (String)


34
35
36
# File 'lib/oci/bds/models/change_shape_nodes.rb', line 34

def utility
  @utility
end

#utility_shape_configOCI::Bds::Models::ShapeConfigDetails



37
38
39
# File 'lib/oci/bds/models/change_shape_nodes.rb', line 37

def utility_shape_config
  @utility_shape_config
end

#workerString

Change shape of worker nodes to the desired target shape. Both VM_STANDARD and E4 Flex shapes are allowed here.

Returns:

  • (String)


13
14
15
# File 'lib/oci/bds/models/change_shape_nodes.rb', line 13

def worker
  @worker
end

#worker_shape_configOCI::Bds::Models::ShapeConfigDetails



16
17
18
# File 'lib/oci/bds/models/change_shape_nodes.rb', line 16

def worker_shape_config
  @worker_shape_config
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# File 'lib/oci/bds/models/change_shape_nodes.rb', line 61

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',
    'cloudsql_shape_config': :'cloudsqlShapeConfig',
    'edge': :'edge',
    'edge_shape_config': :'edgeShapeConfig',
    'kafka_broker': :'kafkaBroker',
    'kafka_broker_shape_config': :'kafkaBrokerShapeConfig'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# File 'lib/oci/bds/models/change_shape_nodes.rb', line 83

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',
    'cloudsql_shape_config': :'OCI::Bds::Models::ShapeConfigDetails',
    'edge': :'String',
    'edge_shape_config': :'OCI::Bds::Models::ShapeConfigDetails',
    'kafka_broker': :'String',
    'kafka_broker_shape_config': :'OCI::Bds::Models::ShapeConfigDetails'
    # rubocop:enable Style/SymbolLiteral
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • other (Object)

    the other object to be compared



202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
# File 'lib/oci/bds/models/change_shape_nodes.rb', line 202

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 &&
    cloudsql_shape_config == other.cloudsql_shape_config &&
    edge == other.edge &&
    edge_shape_config == other.edge_shape_config &&
    kafka_broker == other.kafka_broker &&
    kafka_broker_shape_config == other.kafka_broker_shape_config
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
# File 'lib/oci/bds/models/change_shape_nodes.rb', line 245

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

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


225
226
227
# File 'lib/oci/bds/models/change_shape_nodes.rb', line 225

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



234
235
236
# File 'lib/oci/bds/models/change_shape_nodes.rb', line 234

def hash
  [worker, worker_shape_config, compute_only_worker, compute_only_worker_shape_config, master, master_shape_config, utility, utility_shape_config, cloudsql, cloudsql_shape_config, edge, edge_shape_config, kafka_broker, kafka_broker_shape_config].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



278
279
280
281
282
283
284
285
286
287
# File 'lib/oci/bds/models/change_shape_nodes.rb', line 278

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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



272
273
274
# File 'lib/oci/bds/models/change_shape_nodes.rb', line 272

def to_s
  to_hash.to_s
end