Class: OCI::Blockchain::Models::ScaledBlockchainPlatformPreview

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb

Overview

Blockchain Platform Instance Description Preview after Scaling.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ ScaledBlockchainPlatformPreview

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



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
194
195
196
197
198
199
200
201
202
203
204
205
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/blockchain/models/scaled_blockchain_platform_preview.rb', line 139

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.id = attributes[:'id'] if attributes[:'id']

  self.display_name = attributes[:'displayName'] if attributes[:'displayName']

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

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

  self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId']

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

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

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

  self.compute_shape = attributes[:'computeShape'] if attributes[:'computeShape']

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

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

  self.storage_size_in_tbs = attributes[:'storageSizeInTBs'] if attributes[:'storageSizeInTBs']

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

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

  self.storage_size_in_tbs_post_scaling = attributes[:'storageSizeInTBsPostScaling'] if attributes[:'storageSizeInTBsPostScaling']

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

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

  self.component_details = attributes[:'componentDetails'] if attributes[:'componentDetails']

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

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

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

  self.component_details_post_scaling = attributes[:'componentDetailsPostScaling'] if attributes[:'componentDetailsPostScaling']

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

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

  self.replicas_post_scaling = attributes[:'replicasPostScaling'] if attributes[:'replicasPostScaling']

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

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

  self.host_ocpu_utilization_info = attributes[:'hostOcpuUtilizationInfo'] if attributes[:'hostOcpuUtilizationInfo']

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

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

  self.host_ocpu_utilization_info_post_scaling = attributes[:'hostOcpuUtilizationInfoPostScaling'] if attributes[:'hostOcpuUtilizationInfoPostScaling']

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

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

  self.new_vm_count = attributes[:'newVmCount'] if attributes[:'newVmCount']

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

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

  self.metering_preview = attributes[:'meteringPreview'] if attributes[:'meteringPreview']

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

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

  self.scale_payload = attributes[:'scalePayload'] if attributes[:'scalePayload']

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

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

Instance Attribute Details

#compartment_idString

[Required] Compartment Identifier

Returns:

  • (String)


21
22
23
# File 'lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb', line 21

def compartment_id
  @compartment_id
end

#component_detailsOCI::Blockchain::Models::BlockchainPlatformComponentDetails



40
41
42
# File 'lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb', line 40

def component_details
  @component_details
end

#component_details_post_scalingOCI::Blockchain::Models::BlockchainPlatformComponentDetails



46
47
48
# File 'lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb', line 46

def component_details_post_scaling
  @component_details_post_scaling
end

#compute_shapeString

[Required] Compute shape - STANDARD or ENTERPRISE_SMALL or ENTERPRISE_MEDIUM or ENTERPRISE_LARGE or ENTERPRISE_EXTRA_LARGE or ENTERPRISE_CUSTOM

Returns:

  • (String)


29
30
31
# File 'lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb', line 29

def compute_shape
  @compute_shape
end

#descriptionString

Platform Instance Description

Returns:

  • (String)


25
26
27
# File 'lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb', line 25

def description
  @description
end

#display_nameString

[Required] Platform Instance Display name, can be renamed

Returns:

  • (String)


17
18
19
# File 'lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb', line 17

def display_name
  @display_name
end

#host_ocpu_utilization_infoArray<OCI::Blockchain::Models::OcpuUtilizationInfo>

List of OcpuUtilization for all hosts



53
54
55
# File 'lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb', line 53

def host_ocpu_utilization_info
  @host_ocpu_utilization_info
end

#host_ocpu_utilization_info_post_scalingArray<OCI::Blockchain::Models::OcpuUtilizationInfo>

List of OcpuUtilization for all hosts after scaling



57
58
59
# File 'lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb', line 57

def host_ocpu_utilization_info_post_scaling
  @host_ocpu_utilization_info_post_scaling
end

#idString

[Required] unique identifier that is immutable on creation

Returns:

  • (String)


13
14
15
# File 'lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb', line 13

def id
  @id
end

#metering_previewOCI::Blockchain::Models::ScaledPlatformMeteringPreview



64
65
66
# File 'lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb', line 64

def metering_preview
  @metering_preview
end

#new_vm_countInteger

Number of new VMs that would be created

Returns:

  • (Integer)


61
62
63
# File 'lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb', line 61

def new_vm_count
  @new_vm_count
end

#replicasOCI::Blockchain::Models::ReplicaDetails



43
44
45
# File 'lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb', line 43

def replicas
  @replicas
end

#replicas_post_scalingOCI::Blockchain::Models::ReplicaDetails



49
50
51
# File 'lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb', line 49

def replicas_post_scaling
  @replicas_post_scaling
end

#scale_payloadOCI::Blockchain::Models::ScaleBlockchainPlatformDetails



67
68
69
# File 'lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb', line 67

def scale_payload
  @scale_payload
end

#storage_size_in_tbsFloat

Storage size in TBs

Returns:

  • (Float)


33
34
35
# File 'lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb', line 33

def storage_size_in_tbs
  @storage_size_in_tbs
end

#storage_size_in_tbs_post_scalingFloat

Storage size in TBs post scaling

Returns:

  • (Float)


37
38
39
# File 'lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb', line 37

def storage_size_in_tbs_post_scaling
  @storage_size_in_tbs_post_scaling
end

Class Method Details

.attribute_mapObject

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



70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# File 'lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb', line 70

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'id',
    'display_name': :'displayName',
    'compartment_id': :'compartmentId',
    'description': :'description',
    'compute_shape': :'computeShape',
    'storage_size_in_tbs': :'storageSizeInTBs',
    'storage_size_in_tbs_post_scaling': :'storageSizeInTBsPostScaling',
    'component_details': :'componentDetails',
    'replicas': :'replicas',
    'component_details_post_scaling': :'componentDetailsPostScaling',
    'replicas_post_scaling': :'replicasPostScaling',
    'host_ocpu_utilization_info': :'hostOcpuUtilizationInfo',
    'host_ocpu_utilization_info_post_scaling': :'hostOcpuUtilizationInfoPostScaling',
    'new_vm_count': :'newVmCount',
    'metering_preview': :'meteringPreview',
    'scale_payload': :'scalePayload'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# File 'lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb', line 94

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'String',
    'display_name': :'String',
    'compartment_id': :'String',
    'description': :'String',
    'compute_shape': :'String',
    'storage_size_in_tbs': :'Float',
    'storage_size_in_tbs_post_scaling': :'Float',
    'component_details': :'OCI::Blockchain::Models::BlockchainPlatformComponentDetails',
    'replicas': :'OCI::Blockchain::Models::ReplicaDetails',
    'component_details_post_scaling': :'OCI::Blockchain::Models::BlockchainPlatformComponentDetails',
    'replicas_post_scaling': :'OCI::Blockchain::Models::ReplicaDetails',
    'host_ocpu_utilization_info': :'Array<OCI::Blockchain::Models::OcpuUtilizationInfo>',
    'host_ocpu_utilization_info_post_scaling': :'Array<OCI::Blockchain::Models::OcpuUtilizationInfo>',
    'new_vm_count': :'Integer',
    'metering_preview': :'OCI::Blockchain::Models::ScaledPlatformMeteringPreview',
    'scale_payload': :'OCI::Blockchain::Models::ScaleBlockchainPlatformDetails'
    # 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



237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
# File 'lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb', line 237

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    id == other.id &&
    display_name == other.display_name &&
    compartment_id == other.compartment_id &&
    description == other.description &&
    compute_shape == other.compute_shape &&
    storage_size_in_tbs == other.storage_size_in_tbs &&
    storage_size_in_tbs_post_scaling == other.storage_size_in_tbs_post_scaling &&
    component_details == other.component_details &&
    replicas == other.replicas &&
    component_details_post_scaling == other.component_details_post_scaling &&
    replicas_post_scaling == other.replicas_post_scaling &&
    host_ocpu_utilization_info == other.host_ocpu_utilization_info &&
    host_ocpu_utilization_info_post_scaling == other.host_ocpu_utilization_info_post_scaling &&
    new_vm_count == other.new_vm_count &&
    metering_preview == other.metering_preview &&
    scale_payload == other.scale_payload
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



282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
# File 'lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb', line 282

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


262
263
264
# File 'lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb', line 262

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



271
272
273
# File 'lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb', line 271

def hash
  [id, display_name, compartment_id, description, compute_shape, storage_size_in_tbs, storage_size_in_tbs_post_scaling, component_details, replicas, component_details_post_scaling, replicas_post_scaling, host_ocpu_utilization_info, host_ocpu_utilization_info_post_scaling, new_vm_count, metering_preview, scale_payload].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



315
316
317
318
319
320
321
322
323
324
# File 'lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb', line 315

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



309
310
311
# File 'lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb', line 309

def to_s
  to_hash.to_s
end