Class: OCI::Blockchain::Models::BlockchainPlatform
- Inherits:
-
Object
- Object
- OCI::Blockchain::Models::BlockchainPlatform
- Defined in:
- lib/oci/blockchain/models/blockchain_platform.rb
Overview
Blockchain Platform Instance Description.
Constant Summary collapse
- PLATFORM_ROLE_ENUM =
[ PLATFORM_ROLE_FOUNDER = 'FOUNDER'.freeze, PLATFORM_ROLE_PARTICIPANT = 'PARTICIPANT'.freeze, PLATFORM_ROLE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- COMPUTE_SHAPE_ENUM =
[ COMPUTE_SHAPE_STANDARD = 'STANDARD'.freeze, COMPUTE_SHAPE_ENTERPRISE_SMALL = 'ENTERPRISE_SMALL'.freeze, COMPUTE_SHAPE_ENTERPRISE_MEDIUM = 'ENTERPRISE_MEDIUM'.freeze, COMPUTE_SHAPE_ENTERPRISE_LARGE = 'ENTERPRISE_LARGE'.freeze, COMPUTE_SHAPE_ENTERPRISE_EXTRA_LARGE = 'ENTERPRISE_EXTRA_LARGE'.freeze, COMPUTE_SHAPE_ENTERPRISE_CUSTOM = 'ENTERPRISE_CUSTOM'.freeze, COMPUTE_SHAPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- PLATFORM_SHAPE_TYPE_ENUM =
[ PLATFORM_SHAPE_TYPE_DEFAULT = 'DEFAULT'.freeze, PLATFORM_SHAPE_TYPE_CUSTOM = 'CUSTOM'.freeze, PLATFORM_SHAPE_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- LOAD_BALANCER_SHAPE_ENUM =
[ LOAD_BALANCER_SHAPE_LB_100_MBPS = 'LB_100_MBPS'.freeze, LOAD_BALANCER_SHAPE_LB_400_MBPS = 'LB_400_MBPS'.freeze, LOAD_BALANCER_SHAPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- LIFECYCLE_STATE_ENUM =
[ LIFECYCLE_STATE_CREATING = 'CREATING'.freeze, LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze, LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze, LIFECYCLE_STATE_DELETING = 'DELETING'.freeze, LIFECYCLE_STATE_DELETED = 'DELETED'.freeze, LIFECYCLE_STATE_SCALING = 'SCALING'.freeze, LIFECYCLE_STATE_INACTIVE = 'INACTIVE'.freeze, LIFECYCLE_STATE_FAILED = 'FAILED'.freeze, LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#compartment_id ⇒ String
[Required] Compartment Identifier.
- #component_details ⇒ 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.
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource.
-
#description ⇒ String
Platform Instance Description.
-
#display_name ⇒ String
[Required] Platform Instance Display name, can be renamed.
-
#freeform_tags ⇒ Hash<String, String>
Simple key-value pair that is applied without any predefined name, type or scope.
-
#host_ocpu_utilization_info ⇒ Array<OCI::Blockchain::Models::OcpuUtilizationInfo>
List of OcpuUtilization for all hosts.
-
#id ⇒ String
[Required] unique identifier that is immutable on creation.
-
#is_byol ⇒ BOOLEAN
Bring your own license.
-
#is_multi_ad ⇒ BOOLEAN
True for multi-AD blockchain plaforms, false for single-AD.
-
#lifecycle_details ⇒ String
An message describing the current state in more detail.
-
#lifecycle_state ⇒ String
The current state of the Platform Instance.
-
#load_balancer_shape ⇒ String
Type of Load Balancer shape - LB_100_MBPS or LB_400_MBPS.
-
#platform_role ⇒ String
[Required] Role of platform - FOUNDER or PARTICIPANT.
-
#platform_shape_type ⇒ String
Type of Platform shape - DEFAULT or CUSTOM.
- #replicas ⇒ OCI::Blockchain::Models::ReplicaDetails
-
#service_endpoint ⇒ String
Service endpoint URL, valid post-provisioning.
-
#service_version ⇒ String
The version of the Platform Instance.
-
#storage_size_in_tbs ⇒ Float
Storage size in TBs.
-
#storage_used_in_tbs ⇒ Float
Storage used in TBs.
-
#time_created ⇒ DateTime
The time the the Platform Instance was created.
-
#time_updated ⇒ DateTime
The time the Platform Instance was updated.
-
#total_ocpu_capacity ⇒ Integer
Number of total OCPUs allocated to the platform cluster.
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 = {}) ⇒ BlockchainPlatform
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 = {}) ⇒ BlockchainPlatform
Initializes the object
243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 |
# File 'lib/oci/blockchain/models/blockchain_platform.rb', line 243 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.is_byol = attributes[:'isByol'] unless attributes[:'isByol'].nil? raise 'You cannot provide both :isByol and :is_byol' if attributes.key?(:'isByol') && attributes.key?(:'is_byol') self.is_byol = attributes[:'is_byol'] unless attributes[:'is_byol'].nil? self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated'] raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created') self.time_created = attributes[:'time_created'] if attributes[:'time_created'] self.time_updated = attributes[:'timeUpdated'] if attributes[:'timeUpdated'] raise 'You cannot provide both :timeUpdated and :time_updated' if attributes.key?(:'timeUpdated') && attributes.key?(:'time_updated') self.time_updated = attributes[:'time_updated'] if attributes[:'time_updated'] self.service_version = attributes[:'serviceVersion'] if attributes[:'serviceVersion'] raise 'You cannot provide both :serviceVersion and :service_version' if attributes.key?(:'serviceVersion') && attributes.key?(:'service_version') self.service_version = attributes[:'service_version'] if attributes[:'service_version'] self.platform_role = attributes[:'platformRole'] if attributes[:'platformRole'] raise 'You cannot provide both :platformRole and :platform_role' if attributes.key?(:'platformRole') && attributes.key?(:'platform_role') self.platform_role = attributes[:'platform_role'] if attributes[:'platform_role'] 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.platform_shape_type = attributes[:'platformShapeType'] if attributes[:'platformShapeType'] raise 'You cannot provide both :platformShapeType and :platform_shape_type' if attributes.key?(:'platformShapeType') && attributes.key?(:'platform_shape_type') self.platform_shape_type = attributes[:'platform_shape_type'] if attributes[:'platform_shape_type'] self.load_balancer_shape = attributes[:'loadBalancerShape'] if attributes[:'loadBalancerShape'] raise 'You cannot provide both :loadBalancerShape and :load_balancer_shape' if attributes.key?(:'loadBalancerShape') && attributes.key?(:'load_balancer_shape') self.load_balancer_shape = attributes[:'load_balancer_shape'] if attributes[:'load_balancer_shape'] self.service_endpoint = attributes[:'serviceEndpoint'] if attributes[:'serviceEndpoint'] raise 'You cannot provide both :serviceEndpoint and :service_endpoint' if attributes.key?(:'serviceEndpoint') && attributes.key?(:'service_endpoint') self.service_endpoint = attributes[:'service_endpoint'] if attributes[:'service_endpoint'] self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState'] raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state') self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state'] self.lifecycle_details = attributes[:'lifecycleDetails'] if attributes[:'lifecycleDetails'] raise 'You cannot provide both :lifecycleDetails and :lifecycle_details' if attributes.key?(:'lifecycleDetails') && attributes.key?(:'lifecycle_details') self.lifecycle_details = attributes[:'lifecycle_details'] if attributes[:'lifecycle_details'] 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_used_in_tbs = attributes[:'storageUsedInTBs'] if attributes[:'storageUsedInTBs'] raise 'You cannot provide both :storageUsedInTBs and :storage_used_in_tbs' if attributes.key?(:'storageUsedInTBs') && attributes.key?(:'storage_used_in_tbs') self.storage_used_in_tbs = attributes[:'storage_used_in_tbs'] if attributes[:'storage_used_in_tbs'] self.is_multi_ad = attributes[:'isMultiAD'] unless attributes[:'isMultiAD'].nil? raise 'You cannot provide both :isMultiAD and :is_multi_ad' if attributes.key?(:'isMultiAD') && attributes.key?(:'is_multi_ad') self.is_multi_ad = attributes[:'is_multi_ad'] unless attributes[:'is_multi_ad'].nil? self.total_ocpu_capacity = attributes[:'totalOcpuCapacity'] if attributes[:'totalOcpuCapacity'] raise 'You cannot provide both :totalOcpuCapacity and :total_ocpu_capacity' if attributes.key?(:'totalOcpuCapacity') && attributes.key?(:'total_ocpu_capacity') self.total_ocpu_capacity = attributes[:'total_ocpu_capacity'] if attributes[:'total_ocpu_capacity'] 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.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. = attributes[:'freeformTags'] if attributes[:'freeformTags'] raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags') self. = attributes[:'freeform_tags'] if attributes[:'freeform_tags'] self. = attributes[:'definedTags'] if attributes[:'definedTags'] raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags') self. = attributes[:'defined_tags'] if attributes[:'defined_tags'] end |
Instance Attribute Details
#compartment_id ⇒ String
[Required] Compartment Identifier
61 62 63 |
# File 'lib/oci/blockchain/models/blockchain_platform.rb', line 61 def compartment_id @compartment_id end |
#component_details ⇒ OCI::Blockchain::Models::BlockchainPlatformComponentDetails
128 129 130 |
# File 'lib/oci/blockchain/models/blockchain_platform.rb', line 128 def component_details @component_details end |
#compute_shape ⇒ String
[Required] Compute shape - STANDARD or ENTERPRISE_SMALL or ENTERPRISE_MEDIUM or ENTERPRISE_LARGE or ENTERPRISE_EXTRA_LARGE or ENTERPRISE_CUSTOM
89 90 91 |
# File 'lib/oci/blockchain/models/blockchain_platform.rb', line 89 def compute_shape @compute_shape end |
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: ‘{"bar-key": "value"}`
147 148 149 |
# File 'lib/oci/blockchain/models/blockchain_platform.rb', line 147 def end |
#description ⇒ String
Platform Instance Description
65 66 67 |
# File 'lib/oci/blockchain/models/blockchain_platform.rb', line 65 def description @description end |
#display_name ⇒ String
[Required] Platform Instance Display name, can be renamed
57 58 59 |
# File 'lib/oci/blockchain/models/blockchain_platform.rb', line 57 def display_name @display_name end |
#freeform_tags ⇒ Hash<String, String>
Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: ‘"value"`
141 142 143 |
# File 'lib/oci/blockchain/models/blockchain_platform.rb', line 141 def end |
#host_ocpu_utilization_info ⇒ Array<OCI::Blockchain::Models::OcpuUtilizationInfo>
List of OcpuUtilization for all hosts
135 136 137 |
# File 'lib/oci/blockchain/models/blockchain_platform.rb', line 135 def host_ocpu_utilization_info @host_ocpu_utilization_info end |
#id ⇒ String
[Required] unique identifier that is immutable on creation
53 54 55 |
# File 'lib/oci/blockchain/models/blockchain_platform.rb', line 53 def id @id end |
#is_byol ⇒ BOOLEAN
Bring your own license
69 70 71 |
# File 'lib/oci/blockchain/models/blockchain_platform.rb', line 69 def is_byol @is_byol end |
#is_multi_ad ⇒ BOOLEAN
True for multi-AD blockchain plaforms, false for single-AD
121 122 123 |
# File 'lib/oci/blockchain/models/blockchain_platform.rb', line 121 def is_multi_ad @is_multi_ad end |
#lifecycle_details ⇒ String
An message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.
109 110 111 |
# File 'lib/oci/blockchain/models/blockchain_platform.rb', line 109 def lifecycle_details @lifecycle_details end |
#lifecycle_state ⇒ String
The current state of the Platform Instance.
105 106 107 |
# File 'lib/oci/blockchain/models/blockchain_platform.rb', line 105 def lifecycle_state @lifecycle_state end |
#load_balancer_shape ⇒ String
Type of Load Balancer shape - LB_100_MBPS or LB_400_MBPS. Default is LB_100_MBPS.
97 98 99 |
# File 'lib/oci/blockchain/models/blockchain_platform.rb', line 97 def load_balancer_shape @load_balancer_shape end |
#platform_role ⇒ String
[Required] Role of platform - FOUNDER or PARTICIPANT
85 86 87 |
# File 'lib/oci/blockchain/models/blockchain_platform.rb', line 85 def platform_role @platform_role end |
#platform_shape_type ⇒ String
Type of Platform shape - DEFAULT or CUSTOM
93 94 95 |
# File 'lib/oci/blockchain/models/blockchain_platform.rb', line 93 def platform_shape_type @platform_shape_type end |
#replicas ⇒ OCI::Blockchain::Models::ReplicaDetails
131 132 133 |
# File 'lib/oci/blockchain/models/blockchain_platform.rb', line 131 def replicas @replicas end |
#service_endpoint ⇒ String
Service endpoint URL, valid post-provisioning
101 102 103 |
# File 'lib/oci/blockchain/models/blockchain_platform.rb', line 101 def service_endpoint @service_endpoint end |
#service_version ⇒ String
The version of the Platform Instance.
81 82 83 |
# File 'lib/oci/blockchain/models/blockchain_platform.rb', line 81 def service_version @service_version end |
#storage_size_in_tbs ⇒ Float
Storage size in TBs
113 114 115 |
# File 'lib/oci/blockchain/models/blockchain_platform.rb', line 113 def storage_size_in_tbs @storage_size_in_tbs end |
#storage_used_in_tbs ⇒ Float
Storage used in TBs
117 118 119 |
# File 'lib/oci/blockchain/models/blockchain_platform.rb', line 117 def storage_used_in_tbs @storage_used_in_tbs end |
#time_created ⇒ DateTime
The time the the Platform Instance was created. An RFC3339 formatted datetime string
73 74 75 |
# File 'lib/oci/blockchain/models/blockchain_platform.rb', line 73 def time_created @time_created end |
#time_updated ⇒ DateTime
The time the Platform Instance was updated. An RFC3339 formatted datetime string
77 78 79 |
# File 'lib/oci/blockchain/models/blockchain_platform.rb', line 77 def time_updated @time_updated end |
#total_ocpu_capacity ⇒ Integer
Number of total OCPUs allocated to the platform cluster
125 126 127 |
# File 'lib/oci/blockchain/models/blockchain_platform.rb', line 125 def total_ocpu_capacity @total_ocpu_capacity end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 |
# File 'lib/oci/blockchain/models/blockchain_platform.rb', line 150 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'display_name': :'displayName', 'compartment_id': :'compartmentId', 'description': :'description', 'is_byol': :'isByol', 'time_created': :'timeCreated', 'time_updated': :'timeUpdated', 'service_version': :'serviceVersion', 'platform_role': :'platformRole', 'compute_shape': :'computeShape', 'platform_shape_type': :'platformShapeType', 'load_balancer_shape': :'loadBalancerShape', 'service_endpoint': :'serviceEndpoint', 'lifecycle_state': :'lifecycleState', 'lifecycle_details': :'lifecycleDetails', 'storage_size_in_tbs': :'storageSizeInTBs', 'storage_used_in_tbs': :'storageUsedInTBs', 'is_multi_ad': :'isMultiAD', 'total_ocpu_capacity': :'totalOcpuCapacity', 'component_details': :'componentDetails', 'replicas': :'replicas', 'host_ocpu_utilization_info': :'hostOcpuUtilizationInfo', 'freeform_tags': :'freeformTags', 'defined_tags': :'definedTags' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/oci/blockchain/models/blockchain_platform.rb', line 182 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'display_name': :'String', 'compartment_id': :'String', 'description': :'String', 'is_byol': :'BOOLEAN', 'time_created': :'DateTime', 'time_updated': :'DateTime', 'service_version': :'String', 'platform_role': :'String', 'compute_shape': :'String', 'platform_shape_type': :'String', 'load_balancer_shape': :'String', 'service_endpoint': :'String', 'lifecycle_state': :'String', 'lifecycle_details': :'String', 'storage_size_in_tbs': :'Float', 'storage_used_in_tbs': :'Float', 'is_multi_ad': :'BOOLEAN', 'total_ocpu_capacity': :'Integer', 'component_details': :'OCI::Blockchain::Models::BlockchainPlatformComponentDetails', 'replicas': :'OCI::Blockchain::Models::ReplicaDetails', 'host_ocpu_utilization_info': :'Array<OCI::Blockchain::Models::OcpuUtilizationInfo>', 'freeform_tags': :'Hash<String, String>', 'defined_tags': :'Hash<String, Hash<String, Object>>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 |
# File 'lib/oci/blockchain/models/blockchain_platform.rb', line 454 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 && is_byol == other.is_byol && time_created == other.time_created && time_updated == other.time_updated && service_version == other.service_version && platform_role == other.platform_role && compute_shape == other.compute_shape && platform_shape_type == other.platform_shape_type && load_balancer_shape == other.load_balancer_shape && service_endpoint == other.service_endpoint && lifecycle_state == other.lifecycle_state && lifecycle_details == other.lifecycle_details && storage_size_in_tbs == other.storage_size_in_tbs && storage_used_in_tbs == other.storage_used_in_tbs && is_multi_ad == other.is_multi_ad && total_ocpu_capacity == other.total_ocpu_capacity && component_details == other.component_details && replicas == other.replicas && host_ocpu_utilization_info == other.host_ocpu_utilization_info && == other. && == other. end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 |
# File 'lib/oci/blockchain/models/blockchain_platform.rb', line 507 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
487 488 489 |
# File 'lib/oci/blockchain/models/blockchain_platform.rb', line 487 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
496 497 498 |
# File 'lib/oci/blockchain/models/blockchain_platform.rb', line 496 def hash [id, display_name, compartment_id, description, is_byol, time_created, time_updated, service_version, platform_role, compute_shape, platform_shape_type, load_balancer_shape, service_endpoint, lifecycle_state, lifecycle_details, storage_size_in_tbs, storage_used_in_tbs, is_multi_ad, total_ocpu_capacity, component_details, replicas, host_ocpu_utilization_info, , ].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
540 541 542 543 544 545 546 547 548 549 |
# File 'lib/oci/blockchain/models/blockchain_platform.rb', line 540 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
534 535 536 |
# File 'lib/oci/blockchain/models/blockchain_platform.rb', line 534 def to_s to_hash.to_s end |