Class: OCI::Multicloud::Models::NetworkAnchor
- Inherits:
-
Object
- Object
- OCI::Multicloud::Models::NetworkAnchor
- Defined in:
- lib/oci/multicloud/models/network_anchor.rb
Overview
A NetworkAnchor is a description of a NetworkAnchor.
To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator. If you're an administrator who needs to write policies to give users access, see Getting Started with Policies.
Constant Summary collapse
- NETWORK_ANCHOR_LIFECYCLE_STATE_ENUM =
[ NETWORK_ANCHOR_LIFECYCLE_STATE_CREATING = 'CREATING'.freeze, NETWORK_ANCHOR_LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze, NETWORK_ANCHOR_LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze, NETWORK_ANCHOR_LIFECYCLE_STATE_DELETING = 'DELETING'.freeze, NETWORK_ANCHOR_LIFECYCLE_STATE_DELETED = 'DELETED'.freeze, NETWORK_ANCHOR_LIFECYCLE_STATE_FAILED = 'FAILED'.freeze, NETWORK_ANCHOR_LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- SETUP_MODE_ENUM =
[ SETUP_MODE_AUTO_BIND = 'AUTO_BIND'.freeze, SETUP_MODE_NO_AUTO_BIND = 'NO_AUTO_BIND'.freeze, SETUP_MODE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- SUBSCRIPTION_TYPE_ENUM =
[ SUBSCRIPTION_TYPE_ORACLEDBATAZURE = 'ORACLEDBATAZURE'.freeze, SUBSCRIPTION_TYPE_ORACLEDBATGOOGLE = 'ORACLEDBATGOOGLE'.freeze, SUBSCRIPTION_TYPE_ORACLEDBATAWS = 'ORACLEDBATAWS'.freeze, SUBSCRIPTION_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
- #cloud_service_provider_metadata_item ⇒ OCI::Multicloud::Models::CloudServiceProviderNetworkMetadataItem
-
#cluster_placement_group_id ⇒ String
The CPG ID in which Network Anchor will be created.
-
#compartment_id ⇒ String
[Required] The OCID of the compartment.
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
[Required] Defined tags for this resource.
-
#display_name ⇒ String
[Required] A user-friendly name.
-
#freeform_tags ⇒ Hash<String, String>
[Required] Free-form tags for this resource.
-
#id ⇒ String
[Required] The OCID of the NetworkAnchor.
-
#lifecycle_details ⇒ String
A message that describes the current state of the NetworkAnchor in more detail.
-
#network_anchor_lifecycle_state ⇒ String
[Required] The current state of the NetworkAnchor.
- #oci_metadata_item ⇒ OCI::Multicloud::Models::OciNetworkMetadata
-
#resource_anchor_id ⇒ String
[Required] OCI resource anchor Id (OCID).
-
#setup_mode ⇒ String
AUTO_BIND - when passed compartment will be created on-behalf of customer and bind to this resource anchor NO_AUTO_BIND - compartment will not be created and later customer can bind existing compartment.
-
#subscription_type ⇒ String
Oracle Cloud Infrastructure Subscription Type.
-
#system_tags ⇒ Hash<String, Hash<String, Object>>
System tags for this resource.
-
#time_created ⇒ DateTime
[Required] The date and time the NetworkAnchor was created, in the format defined by RFC 3339.
-
#time_updated ⇒ DateTime
The date and time the NetworkAnchor was updated, in the format defined by RFC 3339.
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 = {}) ⇒ NetworkAnchor
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 = {}) ⇒ NetworkAnchor
Initializes the object
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 229 230 231 232 233 234 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 |
# File 'lib/oci/multicloud/models/network_anchor.rb', line 194 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.resource_anchor_id = attributes[:'resourceAnchorId'] if attributes[:'resourceAnchorId'] raise 'You cannot provide both :resourceAnchorId and :resource_anchor_id' if attributes.key?(:'resourceAnchorId') && attributes.key?(:'resource_anchor_id') self.resource_anchor_id = attributes[:'resource_anchor_id'] if attributes[:'resource_anchor_id'] 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.network_anchor_lifecycle_state = attributes[:'networkAnchorLifecycleState'] if attributes[:'networkAnchorLifecycleState'] raise 'You cannot provide both :networkAnchorLifecycleState and :network_anchor_lifecycle_state' if attributes.key?(:'networkAnchorLifecycleState') && attributes.key?(:'network_anchor_lifecycle_state') self.network_anchor_lifecycle_state = attributes[:'network_anchor_lifecycle_state'] if attributes[:'network_anchor_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. = 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'] self.setup_mode = attributes[:'setupMode'] if attributes[:'setupMode'] raise 'You cannot provide both :setupMode and :setup_mode' if attributes.key?(:'setupMode') && attributes.key?(:'setup_mode') self.setup_mode = attributes[:'setup_mode'] if attributes[:'setup_mode'] self.cluster_placement_group_id = attributes[:'clusterPlacementGroupId'] if attributes[:'clusterPlacementGroupId'] raise 'You cannot provide both :clusterPlacementGroupId and :cluster_placement_group_id' if attributes.key?(:'clusterPlacementGroupId') && attributes.key?(:'cluster_placement_group_id') self.cluster_placement_group_id = attributes[:'cluster_placement_group_id'] if attributes[:'cluster_placement_group_id'] self. = attributes[:'ociMetadataItem'] if attributes[:'ociMetadataItem'] raise 'You cannot provide both :ociMetadataItem and :oci_metadata_item' if attributes.key?(:'ociMetadataItem') && attributes.key?(:'oci_metadata_item') self. = attributes[:'oci_metadata_item'] if attributes[:'oci_metadata_item'] self. = attributes[:'cloudServiceProviderMetadataItem'] if attributes[:'cloudServiceProviderMetadataItem'] raise 'You cannot provide both :cloudServiceProviderMetadataItem and :cloud_service_provider_metadata_item' if attributes.key?(:'cloudServiceProviderMetadataItem') && attributes.key?(:'cloud_service_provider_metadata_item') self. = attributes[:'cloud_service_provider_metadata_item'] if attributes[:'cloud_service_provider_metadata_item'] self.subscription_type = attributes[:'subscriptionType'] if attributes[:'subscriptionType'] raise 'You cannot provide both :subscriptionType and :subscription_type' if attributes.key?(:'subscriptionType') && attributes.key?(:'subscription_type') self.subscription_type = attributes[:'subscription_type'] if attributes[:'subscription_type'] end |
Instance Attribute Details
#cloud_service_provider_metadata_item ⇒ OCI::Multicloud::Models::CloudServiceProviderNetworkMetadataItem
118 119 120 |
# File 'lib/oci/multicloud/models/network_anchor.rb', line 118 def @cloud_service_provider_metadata_item end |
#cluster_placement_group_id ⇒ String
The CPG ID in which Network Anchor will be created.
112 113 114 |
# File 'lib/oci/multicloud/models/network_anchor.rb', line 112 def cluster_placement_group_id @cluster_placement_group_id end |
#compartment_id ⇒ String
[Required] The OCID of the compartment.
50 51 52 |
# File 'lib/oci/multicloud/models/network_anchor.rb', line 50 def compartment_id @compartment_id end |
#defined_tags ⇒ Hash<String, Hash<String, Object>>
[Required] Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
Example: {\"Operations\": {\"CostCenter\": \"42\"}}
94 95 96 |
# File 'lib/oci/multicloud/models/network_anchor.rb', line 94 def @defined_tags end |
#display_name ⇒ String
[Required] A user-friendly name. Does not have to be unique, and it's changeable.
46 47 48 |
# File 'lib/oci/multicloud/models/network_anchor.rb', line 46 def display_name @display_name end |
#freeform_tags ⇒ Hash<String, String>
[Required] Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags.
Example: {\"Department\": \"Finance\"}
86 87 88 |
# File 'lib/oci/multicloud/models/network_anchor.rb', line 86 def @freeform_tags end |
#id ⇒ String
[Required] The OCID of the NetworkAnchor.
42 43 44 |
# File 'lib/oci/multicloud/models/network_anchor.rb', line 42 def id @id end |
#lifecycle_details ⇒ String
A message that describes the current state of the NetworkAnchor in more detail. For example, can be used to provide actionable information for a resource in the Failed state.
78 79 80 |
# File 'lib/oci/multicloud/models/network_anchor.rb', line 78 def lifecycle_details @lifecycle_details end |
#network_anchor_lifecycle_state ⇒ String
[Required] The current state of the NetworkAnchor.
72 73 74 |
# File 'lib/oci/multicloud/models/network_anchor.rb', line 72 def network_anchor_lifecycle_state @network_anchor_lifecycle_state end |
#oci_metadata_item ⇒ OCI::Multicloud::Models::OciNetworkMetadata
115 116 117 |
# File 'lib/oci/multicloud/models/network_anchor.rb', line 115 def @oci_metadata_item end |
#resource_anchor_id ⇒ String
[Required] OCI resource anchor Id (OCID).
54 55 56 |
# File 'lib/oci/multicloud/models/network_anchor.rb', line 54 def resource_anchor_id @resource_anchor_id end |
#setup_mode ⇒ String
AUTO_BIND - when passed compartment will be created on-behalf of customer and bind to this resource anchor NO_AUTO_BIND - compartment will not be created and later customer can bind existing compartment. to this resource anchor. This is for future use only
108 109 110 |
# File 'lib/oci/multicloud/models/network_anchor.rb', line 108 def setup_mode @setup_mode end |
#subscription_type ⇒ String
Oracle Cloud Infrastructure Subscription Type.
122 123 124 |
# File 'lib/oci/multicloud/models/network_anchor.rb', line 122 def subscription_type @subscription_type 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\"}}
101 102 103 |
# File 'lib/oci/multicloud/models/network_anchor.rb', line 101 def @system_tags end |
#time_created ⇒ DateTime
[Required] The date and time the NetworkAnchor was created, in the format defined by RFC 3339.
Example: 2016-08-25T21:10:29.600Z
61 62 63 |
# File 'lib/oci/multicloud/models/network_anchor.rb', line 61 def time_created @time_created end |
#time_updated ⇒ DateTime
The date and time the NetworkAnchor was updated, in the format defined by RFC 3339.
Example: 2016-08-25T21:10:29.600Z
68 69 70 |
# File 'lib/oci/multicloud/models/network_anchor.rb', line 68 def time_updated @time_updated end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 |
# File 'lib/oci/multicloud/models/network_anchor.rb', line 125 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'display_name': :'displayName', 'compartment_id': :'compartmentId', 'resource_anchor_id': :'resourceAnchorId', 'time_created': :'timeCreated', 'time_updated': :'timeUpdated', 'network_anchor_lifecycle_state': :'networkAnchorLifecycleState', 'lifecycle_details': :'lifecycleDetails', 'freeform_tags': :'freeformTags', 'defined_tags': :'definedTags', 'system_tags': :'systemTags', 'setup_mode': :'setupMode', 'cluster_placement_group_id': :'clusterPlacementGroupId', 'oci_metadata_item': :'ociMetadataItem', 'cloud_service_provider_metadata_item': :'cloudServiceProviderMetadataItem', 'subscription_type': :'subscriptionType' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 |
# File 'lib/oci/multicloud/models/network_anchor.rb', line 149 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'display_name': :'String', 'compartment_id': :'String', 'resource_anchor_id': :'String', 'time_created': :'DateTime', 'time_updated': :'DateTime', 'network_anchor_lifecycle_state': :'String', 'lifecycle_details': :'String', 'freeform_tags': :'Hash<String, String>', 'defined_tags': :'Hash<String, Hash<String, Object>>', 'system_tags': :'Hash<String, Hash<String, Object>>', 'setup_mode': :'String', 'cluster_placement_group_id': :'String', 'oci_metadata_item': :'OCI::Multicloud::Models::OciNetworkMetadata', 'cloud_service_provider_metadata_item': :'OCI::Multicloud::Models::CloudServiceProviderNetworkMetadataItem', 'subscription_type': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 |
# File 'lib/oci/multicloud/models/network_anchor.rb', line 339 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && display_name == other.display_name && compartment_id == other.compartment_id && resource_anchor_id == other.resource_anchor_id && time_created == other.time_created && time_updated == other.time_updated && network_anchor_lifecycle_state == other.network_anchor_lifecycle_state && lifecycle_details == other.lifecycle_details && == other. && == other. && == other. && setup_mode == other.setup_mode && cluster_placement_group_id == other.cluster_placement_group_id && == other. && == other. && subscription_type == other.subscription_type end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 |
# File 'lib/oci/multicloud/models/network_anchor.rb', line 384 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
364 365 366 |
# File 'lib/oci/multicloud/models/network_anchor.rb', line 364 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
373 374 375 |
# File 'lib/oci/multicloud/models/network_anchor.rb', line 373 def hash [id, display_name, compartment_id, resource_anchor_id, time_created, time_updated, network_anchor_lifecycle_state, lifecycle_details, , , , setup_mode, cluster_placement_group_id, , , subscription_type].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
417 418 419 420 421 422 423 424 425 426 |
# File 'lib/oci/multicloud/models/network_anchor.rb', line 417 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
411 412 413 |
# File 'lib/oci/multicloud/models/network_anchor.rb', line 411 def to_s to_hash.to_s end |