Class: OCI::ComputeCloudAtCustomer::Models::CccInfrastructure
- Inherits:
-
Object
- Object
- OCI::ComputeCloudAtCustomer::Models::CccInfrastructure
- Defined in:
- lib/oci/compute_cloud_at_customer/models/ccc_infrastructure.rb
Overview
The Oracle Cloud Infrastructure resource representing the connection to the hardware and software located in a customer's data center running the Compute Cloud@Customer IaaS services.
Constant Summary collapse
- CONNECTION_STATE_ENUM =
[ CONNECTION_STATE_REJECT = 'REJECT'.freeze, CONNECTION_STATE_REQUEST = 'REQUEST'.freeze, CONNECTION_STATE_READY = 'READY'.freeze, CONNECTION_STATE_CONNECTED = 'CONNECTED'.freeze, CONNECTION_STATE_DISCONNECTED = 'DISCONNECTED'.freeze, CONNECTION_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- LIFECYCLE_STATE_ENUM =
[ LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze, LIFECYCLE_STATE_NEEDS_ATTENTION = 'NEEDS_ATTENTION'.freeze, LIFECYCLE_STATE_DELETED = 'DELETED'.freeze, LIFECYCLE_STATE_FAILED = 'FAILED'.freeze, LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#ccc_upgrade_schedule_id ⇒ String
Schedule used for upgrades.
-
#compartment_id ⇒ String
[Required] The infrastructure compartment OCID.
-
#connection_details ⇒ String
A message describing the current connection state in more detail.
-
#connection_state ⇒ String
The current connection state of the infrastructure.
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource.
-
#description ⇒ String
A mutable client-meaningful text description of the Compute Cloud@Customer infrastructure.
-
#display_name ⇒ String
[Required] The name that will be used to display the Compute Cloud@Customer infrastructure in the Oracle Cloud Infrastructure console.
-
#freeform_tags ⇒ Hash<String, String>
Simple key-value pair that is applied without any predefined name, type or scope.
-
#id ⇒ String
[Required] The Compute Cloud@Customer infrastructure OCID.
- #infrastructure_inventory ⇒ OCI::ComputeCloudAtCustomer::Models::CccInfrastructureInventory
- #infrastructure_network_configuration ⇒ OCI::ComputeCloudAtCustomer::Models::CccInfrastructureNetworkConfiguration
-
#lifecycle_details ⇒ String
A message describing the current lifecycle state in more detail.
-
#lifecycle_state ⇒ String
[Required] The current state of the Compute Cloud@Customer infrastructure.
-
#provisioning_fingerprint ⇒ String
Fingerprint of a Compute Cloud@Customer infrastructure in a data center generated during the initial connection to this resource.
-
#provisioning_pin ⇒ String
Code that is required for service personnel to connect a Compute Cloud@Customer infrastructure in a data center to this resource.
-
#short_name ⇒ String
The Compute Cloud@Customer infrastructure short name.
-
#subnet_id ⇒ String
[Required] OCID for the network subnet that is used to communicate with Compute Cloud@Customer infrastructure.
-
#system_tags ⇒ Hash<String, Hash<String, Object>>
System tags for this resource.
-
#time_created ⇒ DateTime
[Required] Compute Cloud@Customer infrastructure creation date and time, using an RFC3339 formatted datetime string.
-
#time_updated ⇒ DateTime
Compute Cloud@Customer infrastructure updated date and time, using an RFC3339 formatted datetime string.
- #upgrade_information ⇒ OCI::ComputeCloudAtCustomer::Models::CccUpgradeInformation
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 = {}) ⇒ CccInfrastructure
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 = {}) ⇒ CccInfrastructure
Initializes the object
235 236 237 238 239 240 241 242 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 |
# File 'lib/oci/compute_cloud_at_customer/models/ccc_infrastructure.rb', line 235 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.short_name = attributes[:'shortName'] if attributes[:'shortName'] raise 'You cannot provide both :shortName and :short_name' if attributes.key?(:'shortName') && attributes.key?(:'short_name') self.short_name = attributes[:'short_name'] if attributes[:'short_name'] 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.description = attributes[:'description'] if attributes[:'description'] 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.subnet_id = attributes[:'subnetId'] if attributes[:'subnetId'] raise 'You cannot provide both :subnetId and :subnet_id' if attributes.key?(:'subnetId') && attributes.key?(:'subnet_id') self.subnet_id = attributes[:'subnet_id'] if attributes[:'subnet_id'] self.connection_state = attributes[:'connectionState'] if attributes[:'connectionState'] raise 'You cannot provide both :connectionState and :connection_state' if attributes.key?(:'connectionState') && attributes.key?(:'connection_state') self.connection_state = attributes[:'connection_state'] if attributes[:'connection_state'] self.connection_details = attributes[:'connectionDetails'] if attributes[:'connectionDetails'] raise 'You cannot provide both :connectionDetails and :connection_details' if attributes.key?(:'connectionDetails') && attributes.key?(:'connection_details') self.connection_details = attributes[:'connection_details'] if attributes[:'connection_details'] self.ccc_upgrade_schedule_id = attributes[:'cccUpgradeScheduleId'] if attributes[:'cccUpgradeScheduleId'] raise 'You cannot provide both :cccUpgradeScheduleId and :ccc_upgrade_schedule_id' if attributes.key?(:'cccUpgradeScheduleId') && attributes.key?(:'ccc_upgrade_schedule_id') self.ccc_upgrade_schedule_id = attributes[:'ccc_upgrade_schedule_id'] if attributes[:'ccc_upgrade_schedule_id'] self.provisioning_fingerprint = attributes[:'provisioningFingerprint'] if attributes[:'provisioningFingerprint'] raise 'You cannot provide both :provisioningFingerprint and :provisioning_fingerprint' if attributes.key?(:'provisioningFingerprint') && attributes.key?(:'provisioning_fingerprint') self.provisioning_fingerprint = attributes[:'provisioning_fingerprint'] if attributes[:'provisioning_fingerprint'] self.provisioning_pin = attributes[:'provisioningPin'] if attributes[:'provisioningPin'] raise 'You cannot provide both :provisioningPin and :provisioning_pin' if attributes.key?(:'provisioningPin') && attributes.key?(:'provisioning_pin') self.provisioning_pin = attributes[:'provisioning_pin'] if attributes[:'provisioning_pin'] 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.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.infrastructure_inventory = attributes[:'infrastructureInventory'] if attributes[:'infrastructureInventory'] raise 'You cannot provide both :infrastructureInventory and :infrastructure_inventory' if attributes.key?(:'infrastructureInventory') && attributes.key?(:'infrastructure_inventory') self.infrastructure_inventory = attributes[:'infrastructure_inventory'] if attributes[:'infrastructure_inventory'] self.infrastructure_network_configuration = attributes[:'infrastructureNetworkConfiguration'] if attributes[:'infrastructureNetworkConfiguration'] raise 'You cannot provide both :infrastructureNetworkConfiguration and :infrastructure_network_configuration' if attributes.key?(:'infrastructureNetworkConfiguration') && attributes.key?(:'infrastructure_network_configuration') self.infrastructure_network_configuration = attributes[:'infrastructure_network_configuration'] if attributes[:'infrastructure_network_configuration'] self.upgrade_information = attributes[:'upgradeInformation'] if attributes[:'upgradeInformation'] raise 'You cannot provide both :upgradeInformation and :upgrade_information' if attributes.key?(:'upgradeInformation') && attributes.key?(:'upgrade_information') self.upgrade_information = attributes[:'upgrade_information'] if attributes[:'upgrade_information'] 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'] self. = attributes[:'systemTags'] if attributes[:'systemTags'] raise 'You cannot provide both :systemTags and :system_tags' if attributes.key?(:'systemTags') && attributes.key?(:'system_tags') self. = attributes[:'system_tags'] if attributes[:'system_tags'] end |
Instance Attribute Details
#ccc_upgrade_schedule_id ⇒ String
Schedule used for upgrades. If no schedule is associated with the infrastructure, it can be updated at any time.
83 84 85 |
# File 'lib/oci/compute_cloud_at_customer/models/ccc_infrastructure.rb', line 83 def ccc_upgrade_schedule_id @ccc_upgrade_schedule_id end |
#compartment_id ⇒ String
[Required] The infrastructure compartment OCID.
59 60 61 |
# File 'lib/oci/compute_cloud_at_customer/models/ccc_infrastructure.rb', line 59 def compartment_id @compartment_id end |
#connection_details ⇒ String
A message describing the current connection state in more detail.
77 78 79 |
# File 'lib/oci/compute_cloud_at_customer/models/ccc_infrastructure.rb', line 77 def connection_details @connection_details end |
#connection_state ⇒ String
The current connection state of the infrastructure. A user can only update it from REQUEST to READY or from any state back to REJECT. The system automatically handles the REJECT to REQUEST, READY to CONNECTED, or CONNECTED to DISCONNECTED transitions.
72 73 74 |
# File 'lib/oci/compute_cloud_at_customer/models/ccc_infrastructure.rb', line 72 def connection_state @connection_state end |
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {\"foo-namespace\": {\"bar-key\": \"value\"}}
142 143 144 |
# File 'lib/oci/compute_cloud_at_customer/models/ccc_infrastructure.rb', line 142 def @defined_tags end |
#description ⇒ String
A mutable client-meaningful text description of the Compute Cloud@Customer infrastructure. Avoid entering confidential information.
55 56 57 |
# File 'lib/oci/compute_cloud_at_customer/models/ccc_infrastructure.rb', line 55 def description @description end |
#display_name ⇒ String
[Required] The name that will be used to display the Compute Cloud@Customer infrastructure in the Oracle Cloud Infrastructure console. Does not have to be unique and can be changed. Avoid entering confidential information.
49 50 51 |
# File 'lib/oci/compute_cloud_at_customer/models/ccc_infrastructure.rb', line 49 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: {\"bar-key\": \"value\"}
136 137 138 |
# File 'lib/oci/compute_cloud_at_customer/models/ccc_infrastructure.rb', line 136 def @freeform_tags end |
#id ⇒ String
[Required] The Compute Cloud@Customer infrastructure OCID. This cannot be changed once created.
35 36 37 |
# File 'lib/oci/compute_cloud_at_customer/models/ccc_infrastructure.rb', line 35 def id @id end |
#infrastructure_inventory ⇒ OCI::ComputeCloudAtCustomer::Models::CccInfrastructureInventory
124 125 126 |
# File 'lib/oci/compute_cloud_at_customer/models/ccc_infrastructure.rb', line 124 def infrastructure_inventory @infrastructure_inventory end |
#infrastructure_network_configuration ⇒ OCI::ComputeCloudAtCustomer::Models::CccInfrastructureNetworkConfiguration
127 128 129 |
# File 'lib/oci/compute_cloud_at_customer/models/ccc_infrastructure.rb', line 127 def infrastructure_network_configuration @infrastructure_network_configuration end |
#lifecycle_details ⇒ String
A message describing the current lifecycle state in more detail. For example, this can be used to provide actionable information for a resource that is in a Failed state.
121 122 123 |
# File 'lib/oci/compute_cloud_at_customer/models/ccc_infrastructure.rb', line 121 def lifecycle_details @lifecycle_details end |
#lifecycle_state ⇒ String
[Required] The current state of the Compute Cloud@Customer infrastructure.
114 115 116 |
# File 'lib/oci/compute_cloud_at_customer/models/ccc_infrastructure.rb', line 114 def lifecycle_state @lifecycle_state end |
#provisioning_fingerprint ⇒ String
Fingerprint of a Compute Cloud@Customer infrastructure in a data center generated during the initial connection to this resource. The fingerprint should be verified by the administrator when changing the connectionState from REQUEST to READY.
90 91 92 |
# File 'lib/oci/compute_cloud_at_customer/models/ccc_infrastructure.rb', line 90 def provisioning_fingerprint @provisioning_fingerprint end |
#provisioning_pin ⇒ String
Code that is required for service personnel to connect a Compute Cloud@Customer infrastructure in a data center to this resource. This code will only be available when the connectionState is REJECT (usually at create time of the Compute Cloud@Customer infrastructure).
98 99 100 |
# File 'lib/oci/compute_cloud_at_customer/models/ccc_infrastructure.rb', line 98 def provisioning_pin @provisioning_pin end |
#short_name ⇒ String
The Compute Cloud@Customer infrastructure short name. This cannot be changed once created. The short name is used to refer to the infrastructure in several contexts and is unique.
42 43 44 |
# File 'lib/oci/compute_cloud_at_customer/models/ccc_infrastructure.rb', line 42 def short_name @short_name end |
#subnet_id ⇒ String
[Required] OCID for the network subnet that is used to communicate with Compute Cloud@Customer infrastructure.
65 66 67 |
# File 'lib/oci/compute_cloud_at_customer/models/ccc_infrastructure.rb', line 65 def subnet_id @subnet_id end |
#system_tags ⇒ Hash<String, Hash<String, Object>>
System tags for this resource. Each key is predefined and scoped to a namespace. Example: {\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}
148 149 150 |
# File 'lib/oci/compute_cloud_at_customer/models/ccc_infrastructure.rb', line 148 def @system_tags end |
#time_created ⇒ DateTime
[Required] Compute Cloud@Customer infrastructure creation date and time, using an RFC3339 formatted datetime string.
104 105 106 |
# File 'lib/oci/compute_cloud_at_customer/models/ccc_infrastructure.rb', line 104 def time_created @time_created end |
#time_updated ⇒ DateTime
Compute Cloud@Customer infrastructure updated date and time, using an RFC3339 formatted datetime string.
110 111 112 |
# File 'lib/oci/compute_cloud_at_customer/models/ccc_infrastructure.rb', line 110 def time_updated @time_updated end |
#upgrade_information ⇒ OCI::ComputeCloudAtCustomer::Models::CccUpgradeInformation
130 131 132 |
# File 'lib/oci/compute_cloud_at_customer/models/ccc_infrastructure.rb', line 130 def upgrade_information @upgrade_information end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 |
# File 'lib/oci/compute_cloud_at_customer/models/ccc_infrastructure.rb', line 151 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'short_name': :'shortName', 'display_name': :'displayName', 'description': :'description', 'compartment_id': :'compartmentId', 'subnet_id': :'subnetId', 'connection_state': :'connectionState', 'connection_details': :'connectionDetails', 'ccc_upgrade_schedule_id': :'cccUpgradeScheduleId', 'provisioning_fingerprint': :'provisioningFingerprint', 'provisioning_pin': :'provisioningPin', 'time_created': :'timeCreated', 'time_updated': :'timeUpdated', 'lifecycle_state': :'lifecycleState', 'lifecycle_details': :'lifecycleDetails', 'infrastructure_inventory': :'infrastructureInventory', 'infrastructure_network_configuration': :'infrastructureNetworkConfiguration', 'upgrade_information': :'upgradeInformation', 'freeform_tags': :'freeformTags', 'defined_tags': :'definedTags', 'system_tags': :'systemTags' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/oci/compute_cloud_at_customer/models/ccc_infrastructure.rb', line 180 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'short_name': :'String', 'display_name': :'String', 'description': :'String', 'compartment_id': :'String', 'subnet_id': :'String', 'connection_state': :'String', 'connection_details': :'String', 'ccc_upgrade_schedule_id': :'String', 'provisioning_fingerprint': :'String', 'provisioning_pin': :'String', 'time_created': :'DateTime', 'time_updated': :'DateTime', 'lifecycle_state': :'String', 'lifecycle_details': :'String', 'infrastructure_inventory': :'OCI::ComputeCloudAtCustomer::Models::CccInfrastructureInventory', 'infrastructure_network_configuration': :'OCI::ComputeCloudAtCustomer::Models::CccInfrastructureNetworkConfiguration', 'upgrade_information': :'OCI::ComputeCloudAtCustomer::Models::CccUpgradeInformation', 'freeform_tags': :'Hash<String, String>', 'defined_tags': :'Hash<String, Hash<String, Object>>', 'system_tags': :'Hash<String, Hash<String, Object>>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 |
# File 'lib/oci/compute_cloud_at_customer/models/ccc_infrastructure.rb', line 393 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && short_name == other.short_name && display_name == other.display_name && description == other.description && compartment_id == other.compartment_id && subnet_id == other.subnet_id && connection_state == other.connection_state && connection_details == other.connection_details && ccc_upgrade_schedule_id == other.ccc_upgrade_schedule_id && provisioning_fingerprint == other.provisioning_fingerprint && provisioning_pin == other.provisioning_pin && time_created == other.time_created && time_updated == other.time_updated && lifecycle_state == other.lifecycle_state && lifecycle_details == other.lifecycle_details && infrastructure_inventory == other.infrastructure_inventory && infrastructure_network_configuration == other.infrastructure_network_configuration && upgrade_information == other.upgrade_information && == other. && == other. && == other. end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 |
# File 'lib/oci/compute_cloud_at_customer/models/ccc_infrastructure.rb', line 443 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
423 424 425 |
# File 'lib/oci/compute_cloud_at_customer/models/ccc_infrastructure.rb', line 423 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
432 433 434 |
# File 'lib/oci/compute_cloud_at_customer/models/ccc_infrastructure.rb', line 432 def hash [id, short_name, display_name, description, compartment_id, subnet_id, connection_state, connection_details, ccc_upgrade_schedule_id, provisioning_fingerprint, provisioning_pin, time_created, time_updated, lifecycle_state, lifecycle_details, infrastructure_inventory, infrastructure_network_configuration, upgrade_information, , , ].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
476 477 478 479 480 481 482 483 484 485 |
# File 'lib/oci/compute_cloud_at_customer/models/ccc_infrastructure.rb', line 476 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
470 471 472 |
# File 'lib/oci/compute_cloud_at_customer/models/ccc_infrastructure.rb', line 470 def to_s to_hash.to_s end |