Class: OCI::Multicloud::Models::CloudServiceProviderNetworkMetadataItem
- Inherits:
-
Object
- Object
- OCI::Multicloud::Models::CloudServiceProviderNetworkMetadataItem
- Defined in:
- lib/oci/multicloud/models/cloud_service_provider_network_metadata_item.rb
Overview
Cloud Service Provider metadata item. Warning - In future this object can change to generic object with future Cloud Service Provider based on CloudServiceProvider field. This can be one of CSP provider type Azure, GCP and AWS
Instance Attribute Summary collapse
-
#cidr_blocks ⇒ Array<String>
An Azure/GCP/AWS cidrBlocks.
-
#csp_additional_properties ⇒ Hash<String, String>
CSP Specific Additional Properties, AzureSubnetId for Azure.
-
#dns_forwarding_config ⇒ Array<Hash<String, String>>
DNS domain ip mapping forwarding configuration.
-
#network_anchor_uri ⇒ String
CSP network anchor Uri.
-
#odb_network_id ⇒ String
[Required] CSP oracle database network anchor unique ID/name.
-
#region ⇒ String
[Required] Azure/GCP/AWS region.
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 = {}) ⇒ CloudServiceProviderNetworkMetadataItem
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 = {}) ⇒ CloudServiceProviderNetworkMetadataItem
Initializes the object
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 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/multicloud/models/cloud_service_provider_network_metadata_item.rb', line 78 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.region = attributes[:'region'] if attributes[:'region'] self.odb_network_id = attributes[:'odbNetworkId'] if attributes[:'odbNetworkId'] raise 'You cannot provide both :odbNetworkId and :odb_network_id' if attributes.key?(:'odbNetworkId') && attributes.key?(:'odb_network_id') self.odb_network_id = attributes[:'odb_network_id'] if attributes[:'odb_network_id'] self.cidr_blocks = attributes[:'cidrBlocks'] if attributes[:'cidrBlocks'] raise 'You cannot provide both :cidrBlocks and :cidr_blocks' if attributes.key?(:'cidrBlocks') && attributes.key?(:'cidr_blocks') self.cidr_blocks = attributes[:'cidr_blocks'] if attributes[:'cidr_blocks'] self.network_anchor_uri = attributes[:'networkAnchorUri'] if attributes[:'networkAnchorUri'] raise 'You cannot provide both :networkAnchorUri and :network_anchor_uri' if attributes.key?(:'networkAnchorUri') && attributes.key?(:'network_anchor_uri') self.network_anchor_uri = attributes[:'network_anchor_uri'] if attributes[:'network_anchor_uri'] self.csp_additional_properties = attributes[:'cspAdditionalProperties'] if attributes[:'cspAdditionalProperties'] raise 'You cannot provide both :cspAdditionalProperties and :csp_additional_properties' if attributes.key?(:'cspAdditionalProperties') && attributes.key?(:'csp_additional_properties') self.csp_additional_properties = attributes[:'csp_additional_properties'] if attributes[:'csp_additional_properties'] self.dns_forwarding_config = attributes[:'dnsForwardingConfig'] if attributes[:'dnsForwardingConfig'] raise 'You cannot provide both :dnsForwardingConfig and :dns_forwarding_config' if attributes.key?(:'dnsForwardingConfig') && attributes.key?(:'dns_forwarding_config') self.dns_forwarding_config = attributes[:'dns_forwarding_config'] if attributes[:'dns_forwarding_config'] end |
Instance Attribute Details
#cidr_blocks ⇒ Array<String>
An Azure/GCP/AWS cidrBlocks
24 25 26 |
# File 'lib/oci/multicloud/models/cloud_service_provider_network_metadata_item.rb', line 24 def cidr_blocks @cidr_blocks end |
#csp_additional_properties ⇒ Hash<String, String>
CSP Specific Additional Properties, AzureSubnetId for Azure
32 33 34 |
# File 'lib/oci/multicloud/models/cloud_service_provider_network_metadata_item.rb', line 32 def csp_additional_properties @csp_additional_properties end |
#dns_forwarding_config ⇒ Array<Hash<String, String>>
DNS domain ip mapping forwarding configuration
36 37 38 |
# File 'lib/oci/multicloud/models/cloud_service_provider_network_metadata_item.rb', line 36 def dns_forwarding_config @dns_forwarding_config end |
#network_anchor_uri ⇒ String
CSP network anchor Uri
28 29 30 |
# File 'lib/oci/multicloud/models/cloud_service_provider_network_metadata_item.rb', line 28 def network_anchor_uri @network_anchor_uri end |
#odb_network_id ⇒ String
[Required] CSP oracle database network anchor unique ID/name
20 21 22 |
# File 'lib/oci/multicloud/models/cloud_service_provider_network_metadata_item.rb', line 20 def odb_network_id @odb_network_id end |
#region ⇒ String
[Required] Azure/GCP/AWS region
16 17 18 |
# File 'lib/oci/multicloud/models/cloud_service_provider_network_metadata_item.rb', line 16 def region @region end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/oci/multicloud/models/cloud_service_provider_network_metadata_item.rb', line 39 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'region': :'region', 'odb_network_id': :'odbNetworkId', 'cidr_blocks': :'cidrBlocks', 'network_anchor_uri': :'networkAnchorUri', 'csp_additional_properties': :'cspAdditionalProperties', 'dns_forwarding_config': :'dnsForwardingConfig' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/oci/multicloud/models/cloud_service_provider_network_metadata_item.rb', line 53 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'region': :'String', 'odb_network_id': :'String', 'cidr_blocks': :'Array<String>', 'network_anchor_uri': :'String', 'csp_additional_properties': :'Hash<String, String>', 'dns_forwarding_config': :'Array<Hash<String, String>>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
124 125 126 127 128 129 130 131 132 133 134 |
# File 'lib/oci/multicloud/models/cloud_service_provider_network_metadata_item.rb', line 124 def ==(other) return true if equal?(other) self.class == other.class && region == other.region && odb_network_id == other.odb_network_id && cidr_blocks == other.cidr_blocks && network_anchor_uri == other.network_anchor_uri && csp_additional_properties == other.csp_additional_properties && dns_forwarding_config == other.dns_forwarding_config end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 |
# File 'lib/oci/multicloud/models/cloud_service_provider_network_metadata_item.rb', line 159 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
139 140 141 |
# File 'lib/oci/multicloud/models/cloud_service_provider_network_metadata_item.rb', line 139 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
148 149 150 |
# File 'lib/oci/multicloud/models/cloud_service_provider_network_metadata_item.rb', line 148 def hash [region, odb_network_id, cidr_blocks, network_anchor_uri, csp_additional_properties, dns_forwarding_config].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
192 193 194 195 196 197 198 199 200 201 |
# File 'lib/oci/multicloud/models/cloud_service_provider_network_metadata_item.rb', line 192 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
186 187 188 |
# File 'lib/oci/multicloud/models/cloud_service_provider_network_metadata_item.rb', line 186 def to_s to_hash.to_s end |