Class: OCI::Core::Models::LocalPeeringGateway
- Inherits:
-
Object
- Object
- OCI::Core::Models::LocalPeeringGateway
- Defined in:
- lib/oci/core/models/local_peering_gateway.rb
Constant Summary collapse
- LIFECYCLE_STATE_ENUM =
[LIFECYCLE_STATE_PROVISIONING = 'PROVISIONING', LIFECYCLE_STATE_AVAILABLE = 'AVAILABLE', LIFECYCLE_STATE_TERMINATING = 'TERMINATING', LIFECYCLE_STATE_TERMINATED = 'TERMINATED', LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
- PEERING_STATUS_ENUM =
[PEERING_STATUS_INVALID = 'INVALID', PEERING_STATUS_NEW = 'NEW', PEERING_STATUS_PEERED = 'PEERED', PEERING_STATUS_PENDING = 'PENDING', PEERING_STATUS_REVOKED = 'REVOKED', PEERING_STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
Instance Attribute Summary collapse
-
#compartment_id ⇒ String
The OCID of the compartment containing the LPG.
-
#display_name ⇒ String
A user-friendly name.
-
#id ⇒ String
The LPG’s Oracle ID (OCID).
-
#is_cross_tenancy_peering ⇒ BOOLEAN
Whether the VCN at the other end of the peering is in a different tenancy.
-
#lifecycle_state ⇒ String
The LPG’s current lifecycle state.
-
#peer_advertised_cidr ⇒ String
The range of IP addresses available on the VCN at the other end of the peering from this LPG.
-
#peering_status ⇒ String
Whether the LPG is peered with another LPG.
-
#peering_status_details ⇒ String
Additional information regarding the peering status, if applicable.
-
#time_created ⇒ DateTime
The date and time the LPG was created, in the format defined by RFC3339.
-
#vcn_id ⇒ String
The OCID of the VCN the LPG belongs to.
Instance Method Summary collapse
-
#==(other_object) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other_object) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ LocalPeeringGateway
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 = {}) ⇒ LocalPeeringGateway
Initializes the object
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 116 117 118 119 120 121 122 123 124 125 126 127 128 |
# File 'lib/oci/core/models/local_peering_gateway.rb', line 82 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} if attributes[:'compartmentId'] self.compartment_id = attributes[:'compartmentId'] end if attributes[:'displayName'] self.display_name = attributes[:'displayName'] end if attributes[:'id'] self.id = attributes[:'id'] end if attributes[:'isCrossTenancyPeering'] self.is_cross_tenancy_peering = attributes[:'isCrossTenancyPeering'] end if attributes[:'lifecycleState'] self.lifecycle_state = attributes[:'lifecycleState'] end if attributes[:'peerAdvertisedCidr'] self.peer_advertised_cidr = attributes[:'peerAdvertisedCidr'] end if attributes[:'peeringStatus'] self.peering_status = attributes[:'peeringStatus'] end if attributes[:'peeringStatusDetails'] self.peering_status_details = attributes[:'peeringStatusDetails'] end if attributes[:'timeCreated'] self.time_created = attributes[:'timeCreated'] end if attributes[:'vcnId'] self.vcn_id = attributes[:'vcnId'] end end |
Instance Attribute Details
#compartment_id ⇒ String
The OCID of the compartment containing the LPG.
24 25 26 |
# File 'lib/oci/core/models/local_peering_gateway.rb', line 24 def compartment_id @compartment_id end |
#display_name ⇒ String
A user-friendly name. Does not have to be unique, and it’s changeable. Avoid entering confidential information.
30 31 32 |
# File 'lib/oci/core/models/local_peering_gateway.rb', line 30 def display_name @display_name end |
#id ⇒ String
The LPG’s Oracle ID (OCID).
34 35 36 |
# File 'lib/oci/core/models/local_peering_gateway.rb', line 34 def id @id end |
#is_cross_tenancy_peering ⇒ BOOLEAN
Whether the VCN at the other end of the peering is in a different tenancy.
Example: ‘false`
41 42 43 |
# File 'lib/oci/core/models/local_peering_gateway.rb', line 41 def is_cross_tenancy_peering @is_cross_tenancy_peering end |
#lifecycle_state ⇒ String
The LPG’s current lifecycle state.
45 46 47 |
# File 'lib/oci/core/models/local_peering_gateway.rb', line 45 def lifecycle_state @lifecycle_state end |
#peer_advertised_cidr ⇒ String
The range of IP addresses available on the VCN at the other end of the peering from this LPG. The value is ‘null` if the LPG is not peered. You can use this as the destination CIDR for a route rule to route a subnet’s traffic to this LPG.
Example: ‘192.168.0.0/16`
55 56 57 |
# File 'lib/oci/core/models/local_peering_gateway.rb', line 55 def peer_advertised_cidr @peer_advertised_cidr end |
#peering_status ⇒ String
Whether the LPG is peered with another LPG. ‘NEW` means the LPG has not yet been peered. `PENDING` means the peering is being established. `REVOKED` means the LPG at the other end of the peering has been deleted.
62 63 64 |
# File 'lib/oci/core/models/local_peering_gateway.rb', line 62 def peering_status @peering_status end |
#peering_status_details ⇒ String
Additional information regarding the peering status, if applicable.
66 67 68 |
# File 'lib/oci/core/models/local_peering_gateway.rb', line 66 def peering_status_details @peering_status_details end |
#time_created ⇒ DateTime
The date and time the LPG was created, in the format defined by RFC3339.
Example: ‘2016-08-25T21:10:29.600Z`
73 74 75 |
# File 'lib/oci/core/models/local_peering_gateway.rb', line 73 def time_created @time_created end |
#vcn_id ⇒ String
The OCID of the VCN the LPG belongs to.
77 78 79 |
# File 'lib/oci/core/models/local_peering_gateway.rb', line 77 def vcn_id @vcn_id end |
Instance Method Details
#==(other_object) ⇒ Object
Checks equality by comparing each attribute.
152 153 154 155 156 157 158 159 160 161 162 163 164 165 |
# File 'lib/oci/core/models/local_peering_gateway.rb', line 152 def ==(other_object) return true if self.equal?(other_object) self.class == other_object.class && compartment_id == other_object.compartment_id && display_name == other_object.display_name && id == other_object.id && is_cross_tenancy_peering == other_object.is_cross_tenancy_peering && lifecycle_state == other_object.lifecycle_state && peer_advertised_cidr == other_object.peer_advertised_cidr && peering_status == other_object.peering_status && peering_status_details == other_object.peering_status_details && time_created == other_object.time_created && vcn_id == other_object.vcn_id end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 |
# File 'lib/oci/core/models/local_peering_gateway.rb', line 182 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) self.public_send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? self.public_send("#{key}=", 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_object) ⇒ Boolean
169 170 171 |
# File 'lib/oci/core/models/local_peering_gateway.rb', line 169 def eql?(other_object) self == other_object end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
175 176 177 |
# File 'lib/oci/core/models/local_peering_gateway.rb', line 175 def hash [compartment_id, display_name, id, is_cross_tenancy_peering, lifecycle_state, peer_advertised_cidr, peering_status, peering_status_details, time_created, vcn_id].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
207 208 209 210 211 212 213 214 215 |
# File 'lib/oci/core/models/local_peering_gateway.rb', line 207 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_send(attr) 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
201 202 203 |
# File 'lib/oci/core/models/local_peering_gateway.rb', line 201 def to_s to_hash.to_s end |