Class: OCI::Blockchain::Models::ScaledBlockchainPlatformPreview
- Inherits:
-
Object
- Object
- OCI::Blockchain::Models::ScaledBlockchainPlatformPreview
- Defined in:
- lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb
Overview
Blockchain Platform Instance Description Preview after Scaling.
Instance Attribute Summary collapse
-
#compartment_id ⇒ String
[Required] Compartment Identifier.
- #component_details ⇒ OCI::Blockchain::Models::BlockchainPlatformComponentDetails
- #component_details_post_scaling ⇒ OCI::Blockchain::Models::BlockchainPlatformComponentDetails
-
#compute_shape ⇒ String
[Required] Compute shape - STANDARD or ENTERPRISE_SMALL or ENTERPRISE_MEDIUM or ENTERPRISE_LARGE or ENTERPRISE_EXTRA_LARGE or ENTERPRISE_CUSTOM.
-
#description ⇒ String
Platform Instance Description.
-
#display_name ⇒ String
[Required] Platform Instance Display name, can be renamed.
-
#host_ocpu_utilization_info ⇒ Array<OCI::Blockchain::Models::OcpuUtilizationInfo>
List of OcpuUtilization for all hosts.
-
#host_ocpu_utilization_info_post_scaling ⇒ Array<OCI::Blockchain::Models::OcpuUtilizationInfo>
List of OcpuUtilization for all hosts after scaling.
-
#id ⇒ String
[Required] unique identifier that is immutable on creation.
- #metering_preview ⇒ OCI::Blockchain::Models::ScaledPlatformMeteringPreview
-
#new_vm_count ⇒ Integer
Number of new VMs that would be created.
- #replicas ⇒ OCI::Blockchain::Models::ReplicaDetails
- #replicas_post_scaling ⇒ OCI::Blockchain::Models::ReplicaDetails
- #scale_payload ⇒ OCI::Blockchain::Models::ScaleBlockchainPlatformDetails
-
#storage_size_in_tbs ⇒ Float
Storage size in TBs.
-
#storage_size_in_tbs_post_scaling ⇒ Float
Storage size in TBs post scaling.
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 = {}) ⇒ ScaledBlockchainPlatformPreview
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 = {}) ⇒ ScaledBlockchainPlatformPreview
Initializes the object
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 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 |
# File 'lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb', line 138 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_id ⇒ String
[Required] Compartment Identifier
20 21 22 |
# File 'lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb', line 20 def compartment_id @compartment_id end |
#component_details ⇒ OCI::Blockchain::Models::BlockchainPlatformComponentDetails
39 40 41 |
# File 'lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb', line 39 def component_details @component_details end |
#component_details_post_scaling ⇒ OCI::Blockchain::Models::BlockchainPlatformComponentDetails
45 46 47 |
# File 'lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb', line 45 def component_details_post_scaling @component_details_post_scaling end |
#compute_shape ⇒ String
[Required] Compute shape - STANDARD or ENTERPRISE_SMALL or ENTERPRISE_MEDIUM or ENTERPRISE_LARGE or ENTERPRISE_EXTRA_LARGE or ENTERPRISE_CUSTOM
28 29 30 |
# File 'lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb', line 28 def compute_shape @compute_shape end |
#description ⇒ String
Platform Instance Description
24 25 26 |
# File 'lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb', line 24 def description @description end |
#display_name ⇒ String
[Required] Platform Instance Display name, can be renamed
16 17 18 |
# File 'lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb', line 16 def display_name @display_name end |
#host_ocpu_utilization_info ⇒ Array<OCI::Blockchain::Models::OcpuUtilizationInfo>
List of OcpuUtilization for all hosts
52 53 54 |
# File 'lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb', line 52 def host_ocpu_utilization_info @host_ocpu_utilization_info end |
#host_ocpu_utilization_info_post_scaling ⇒ Array<OCI::Blockchain::Models::OcpuUtilizationInfo>
List of OcpuUtilization for all hosts after scaling
56 57 58 |
# File 'lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb', line 56 def host_ocpu_utilization_info_post_scaling @host_ocpu_utilization_info_post_scaling end |
#id ⇒ String
[Required] unique identifier that is immutable on creation
12 13 14 |
# File 'lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb', line 12 def id @id end |
#metering_preview ⇒ OCI::Blockchain::Models::ScaledPlatformMeteringPreview
63 64 65 |
# File 'lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb', line 63 def metering_preview @metering_preview end |
#new_vm_count ⇒ Integer
Number of new VMs that would be created
60 61 62 |
# File 'lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb', line 60 def new_vm_count @new_vm_count end |
#replicas ⇒ OCI::Blockchain::Models::ReplicaDetails
42 43 44 |
# File 'lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb', line 42 def replicas @replicas end |
#replicas_post_scaling ⇒ OCI::Blockchain::Models::ReplicaDetails
48 49 50 |
# File 'lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb', line 48 def replicas_post_scaling @replicas_post_scaling end |
#scale_payload ⇒ OCI::Blockchain::Models::ScaleBlockchainPlatformDetails
66 67 68 |
# File 'lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb', line 66 def scale_payload @scale_payload end |
#storage_size_in_tbs ⇒ Float
Storage size in TBs
32 33 34 |
# File 'lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb', line 32 def storage_size_in_tbs @storage_size_in_tbs end |
#storage_size_in_tbs_post_scaling ⇒ Float
Storage size in TBs post scaling
36 37 38 |
# File 'lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb', line 36 def storage_size_in_tbs_post_scaling @storage_size_in_tbs_post_scaling end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb', line 69 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_types ⇒ Object
Attribute type mapping.
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb', line 93 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.
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 |
# File 'lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb', line 236 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
281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 |
# File 'lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb', line 281 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
261 262 263 |
# File 'lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb', line 261 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
270 271 272 |
# File 'lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb', line 270 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_hash ⇒ Hash
Returns the object in the form of hash
314 315 316 317 318 319 320 321 322 323 |
# File 'lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb', line 314 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
308 309 310 |
# File 'lib/oci/blockchain/models/scaled_blockchain_platform_preview.rb', line 308 def to_s to_hash.to_s end |