Class: OCI::ContainerEngine::Models::CreateClusterEndpointConfigDetails
- Inherits:
-
Object
- Object
- OCI::ContainerEngine::Models::CreateClusterEndpointConfigDetails
- Defined in:
- lib/oci/container_engine/models/create_cluster_endpoint_config_details.rb
Overview
The properties that define the network configuration for the Cluster endpoint.
Instance Attribute Summary collapse
-
#is_public_ip_enabled ⇒ BOOLEAN
Whether the cluster should be assigned a public IP address.
-
#nsg_ids ⇒ Array<String>
A list of the OCIDs of the network security groups (NSGs) to apply to the cluster endpoint.
-
#security_attributes ⇒ Hash<String, Hash<String, Object>>
Security attributes are labels for a resource that can be referenced in a Zero Trust Packet Routing (ZPR) policy to control access to ZPR-supported resources.
-
#subnet_id ⇒ String
The OCID of the regional subnet in which to place the Cluster endpoint.
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 = {}) ⇒ CreateClusterEndpointConfigDetails
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 = {}) ⇒ CreateClusterEndpointConfigDetails
Initializes the object
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/oci/container_engine/models/create_cluster_endpoint_config_details.rb', line 65 def initialize(attributes = {}) return unless attributes.is_a?(Hash) 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.nsg_ids = attributes[:'nsgIds'] if attributes[:'nsgIds'] raise 'You cannot provide both :nsgIds and :nsg_ids' if attributes.key?(:'nsgIds') && attributes.key?(:'nsg_ids') self.nsg_ids = attributes[:'nsg_ids'] if attributes[:'nsg_ids'] self.is_public_ip_enabled = attributes[:'isPublicIpEnabled'] unless attributes[:'isPublicIpEnabled'].nil? self.is_public_ip_enabled = false if is_public_ip_enabled.nil? && !attributes.key?(:'isPublicIpEnabled') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isPublicIpEnabled and :is_public_ip_enabled' if attributes.key?(:'isPublicIpEnabled') && attributes.key?(:'is_public_ip_enabled') self.is_public_ip_enabled = attributes[:'is_public_ip_enabled'] unless attributes[:'is_public_ip_enabled'].nil? self.is_public_ip_enabled = false if is_public_ip_enabled.nil? && !attributes.key?(:'isPublicIpEnabled') && !attributes.key?(:'is_public_ip_enabled') # rubocop:disable Style/StringLiterals self.security_attributes = attributes[:'securityAttributes'] if attributes[:'securityAttributes'] raise 'You cannot provide both :securityAttributes and :security_attributes' if attributes.key?(:'securityAttributes') && attributes.key?(:'security_attributes') self.security_attributes = attributes[:'security_attributes'] if attributes[:'security_attributes'] end |
Instance Attribute Details
#is_public_ip_enabled ⇒ BOOLEAN
Whether the cluster should be assigned a public IP address. Defaults to false. If set to true on a private subnet, the cluster provisioning will fail.
22 23 24 |
# File 'lib/oci/container_engine/models/create_cluster_endpoint_config_details.rb', line 22 def is_public_ip_enabled @is_public_ip_enabled end |
#nsg_ids ⇒ Array<String>
A list of the OCIDs of the network security groups (NSGs) to apply to the cluster endpoint. For more information about NSGs, see NetworkSecurityGroup.
18 19 20 |
# File 'lib/oci/container_engine/models/create_cluster_endpoint_config_details.rb', line 18 def nsg_ids @nsg_ids end |
#security_attributes ⇒ Hash<String, Hash<String, Object>>
Security attributes are labels for a resource that can be referenced in a Zero Trust Packet Routing (ZPR) policy to control access to ZPR-supported resources.
29 30 31 |
# File 'lib/oci/container_engine/models/create_cluster_endpoint_config_details.rb', line 29 def security_attributes @security_attributes end |
#subnet_id ⇒ String
The OCID of the regional subnet in which to place the Cluster endpoint.
13 14 15 |
# File 'lib/oci/container_engine/models/create_cluster_endpoint_config_details.rb', line 13 def subnet_id @subnet_id end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
32 33 34 35 36 37 38 39 40 41 |
# File 'lib/oci/container_engine/models/create_cluster_endpoint_config_details.rb', line 32 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'subnet_id': :'subnetId', 'nsg_ids': :'nsgIds', 'is_public_ip_enabled': :'isPublicIpEnabled', 'security_attributes': :'securityAttributes' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
44 45 46 47 48 49 50 51 52 53 |
# File 'lib/oci/container_engine/models/create_cluster_endpoint_config_details.rb', line 44 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'subnet_id': :'String', 'nsg_ids': :'Array<String>', 'is_public_ip_enabled': :'BOOLEAN', 'security_attributes': :'Hash<String, Hash<String, Object>>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
102 103 104 105 106 107 108 109 110 |
# File 'lib/oci/container_engine/models/create_cluster_endpoint_config_details.rb', line 102 def ==(other) return true if equal?(other) self.class == other.class && subnet_id == other.subnet_id && nsg_ids == other.nsg_ids && is_public_ip_enabled == other.is_public_ip_enabled && security_attributes == other.security_attributes end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 |
# File 'lib/oci/container_engine/models/create_cluster_endpoint_config_details.rb', line 135 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
115 116 117 |
# File 'lib/oci/container_engine/models/create_cluster_endpoint_config_details.rb', line 115 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
124 125 126 |
# File 'lib/oci/container_engine/models/create_cluster_endpoint_config_details.rb', line 124 def hash [subnet_id, nsg_ids, is_public_ip_enabled, security_attributes].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
168 169 170 171 172 173 174 175 176 177 |
# File 'lib/oci/container_engine/models/create_cluster_endpoint_config_details.rb', line 168 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
162 163 164 |
# File 'lib/oci/container_engine/models/create_cluster_endpoint_config_details.rb', line 162 def to_s to_hash.to_s end |