Class: OCI::Core::Models::InventoryVcnSummary
- Inherits:
-
Object
- Object
- OCI::Core::Models::InventoryVcnSummary
- Defined in:
- lib/oci/core/models/inventory_vcn_summary.rb
Overview
Provides the summary of a VCN's IP Inventory data under specified compartments.
Constant Summary collapse
- RESOURCE_TYPE_ENUM =
[ RESOURCE_TYPE_VCN = 'VCN'.freeze, RESOURCE_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#compartment_id ⇒ String
The OCID of the compartment.
-
#dns_domain_name ⇒ String
DNS domain name of the VCN.
-
#inventory_subnetcollection ⇒ Array<OCI::Core::Models::InventorySubnetSummary>
Lists
Subnetcollection
objects. -
#inventory_vcn_cidr_block_collection ⇒ Array<OCI::Core::Models::InventoryVcnCidrBlockSummary>
Lists
InventoryVcnCidrBlockSummary
objects. -
#region ⇒ String
Region name of the VCN.
-
#resource_type ⇒ String
Resource types of the VCN.
-
#vcn_id ⇒ String
The OCID of the VCN .
-
#vcn_name ⇒ String
Name of the VCN.
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 = {}) ⇒ InventoryVcnSummary
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 = {}) ⇒ InventoryVcnSummary
Initializes the object
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 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/core/models/inventory_vcn_summary.rb', line 97 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.vcn_id = attributes[:'vcnId'] if attributes[:'vcnId'] raise 'You cannot provide both :vcnId and :vcn_id' if attributes.key?(:'vcnId') && attributes.key?(:'vcn_id') self.vcn_id = attributes[:'vcn_id'] if attributes[:'vcn_id'] self.vcn_name = attributes[:'vcnName'] if attributes[:'vcnName'] raise 'You cannot provide both :vcnName and :vcn_name' if attributes.key?(:'vcnName') && attributes.key?(:'vcn_name') self.vcn_name = attributes[:'vcn_name'] if attributes[:'vcn_name'] self.resource_type = attributes[:'resourceType'] if attributes[:'resourceType'] raise 'You cannot provide both :resourceType and :resource_type' if attributes.key?(:'resourceType') && attributes.key?(:'resource_type') self.resource_type = attributes[:'resource_type'] if attributes[:'resource_type'] self.inventory_vcn_cidr_block_collection = attributes[:'inventoryVcnCidrBlockCollection'] if attributes[:'inventoryVcnCidrBlockCollection'] raise 'You cannot provide both :inventoryVcnCidrBlockCollection and :inventory_vcn_cidr_block_collection' if attributes.key?(:'inventoryVcnCidrBlockCollection') && attributes.key?(:'inventory_vcn_cidr_block_collection') self.inventory_vcn_cidr_block_collection = attributes[:'inventory_vcn_cidr_block_collection'] if attributes[:'inventory_vcn_cidr_block_collection'] self.dns_domain_name = attributes[:'dnsDomainName'] if attributes[:'dnsDomainName'] raise 'You cannot provide both :dnsDomainName and :dns_domain_name' if attributes.key?(:'dnsDomainName') && attributes.key?(:'dns_domain_name') self.dns_domain_name = attributes[:'dns_domain_name'] if attributes[:'dns_domain_name'] self.region = attributes[:'region'] if attributes[:'region'] 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.inventory_subnetcollection = attributes[:'inventorySubnetcollection'] if attributes[:'inventorySubnetcollection'] raise 'You cannot provide both :inventorySubnetcollection and :inventory_subnetcollection' if attributes.key?(:'inventorySubnetcollection') && attributes.key?(:'inventory_subnetcollection') self.inventory_subnetcollection = attributes[:'inventory_subnetcollection'] if attributes[:'inventory_subnetcollection'] end |
Instance Attribute Details
#compartment_id ⇒ String
The OCID of the compartment.
44 45 46 |
# File 'lib/oci/core/models/inventory_vcn_summary.rb', line 44 def compartment_id @compartment_id end |
#dns_domain_name ⇒ String
DNS domain name of the VCN.
36 37 38 |
# File 'lib/oci/core/models/inventory_vcn_summary.rb', line 36 def dns_domain_name @dns_domain_name end |
#inventory_subnetcollection ⇒ Array<OCI::Core::Models::InventorySubnetSummary>
Lists Subnetcollection
objects
49 50 51 |
# File 'lib/oci/core/models/inventory_vcn_summary.rb', line 49 def inventory_subnetcollection @inventory_subnetcollection end |
#inventory_vcn_cidr_block_collection ⇒ Array<OCI::Core::Models::InventoryVcnCidrBlockSummary>
Lists InventoryVcnCidrBlockSummary
objects.
32 33 34 |
# File 'lib/oci/core/models/inventory_vcn_summary.rb', line 32 def inventory_vcn_cidr_block_collection @inventory_vcn_cidr_block_collection end |
#region ⇒ String
Region name of the VCN.
40 41 42 |
# File 'lib/oci/core/models/inventory_vcn_summary.rb', line 40 def region @region end |
#resource_type ⇒ String
Resource types of the VCN.
27 28 29 |
# File 'lib/oci/core/models/inventory_vcn_summary.rb', line 27 def resource_type @resource_type end |
#vcn_id ⇒ String
The OCID of the VCN .
19 20 21 |
# File 'lib/oci/core/models/inventory_vcn_summary.rb', line 19 def vcn_id @vcn_id end |
#vcn_name ⇒ String
Name of the VCN.
23 24 25 |
# File 'lib/oci/core/models/inventory_vcn_summary.rb', line 23 def vcn_name @vcn_name end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/oci/core/models/inventory_vcn_summary.rb', line 52 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'vcn_id': :'vcnId', 'vcn_name': :'vcnName', 'resource_type': :'resourceType', 'inventory_vcn_cidr_block_collection': :'inventoryVcnCidrBlockCollection', 'dns_domain_name': :'dnsDomainName', 'region': :'region', 'compartment_id': :'compartmentId', 'inventory_subnetcollection': :'inventorySubnetcollection' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/oci/core/models/inventory_vcn_summary.rb', line 68 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'vcn_id': :'String', 'vcn_name': :'String', 'resource_type': :'String', 'inventory_vcn_cidr_block_collection': :'Array<OCI::Core::Models::InventoryVcnCidrBlockSummary>', 'dns_domain_name': :'String', 'region': :'String', 'compartment_id': :'String', 'inventory_subnetcollection': :'Array<OCI::Core::Models::InventorySubnetSummary>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
168 169 170 171 172 173 174 175 176 177 178 179 180 |
# File 'lib/oci/core/models/inventory_vcn_summary.rb', line 168 def ==(other) return true if equal?(other) self.class == other.class && vcn_id == other.vcn_id && vcn_name == other.vcn_name && resource_type == other.resource_type && inventory_vcn_cidr_block_collection == other.inventory_vcn_cidr_block_collection && dns_domain_name == other.dns_domain_name && region == other.region && compartment_id == other.compartment_id && inventory_subnetcollection == other.inventory_subnetcollection end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
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/core/models/inventory_vcn_summary.rb', line 205 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
185 186 187 |
# File 'lib/oci/core/models/inventory_vcn_summary.rb', line 185 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
194 195 196 |
# File 'lib/oci/core/models/inventory_vcn_summary.rb', line 194 def hash [vcn_id, vcn_name, resource_type, inventory_vcn_cidr_block_collection, dns_domain_name, region, compartment_id, inventory_subnetcollection].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
238 239 240 241 242 243 244 245 246 247 |
# File 'lib/oci/core/models/inventory_vcn_summary.rb', line 238 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
232 233 234 |
# File 'lib/oci/core/models/inventory_vcn_summary.rb', line 232 def to_s to_hash.to_s end |