Method: OCI::Core::Models::IPSecConnectionTunnel#initialize

Defined in:
lib/oci/core/models/ip_sec_connection_tunnel.rb

#initialize(attributes = {}) ⇒ IPSecConnectionTunnel

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):

  • :compartment_id (String)

    The value to assign to the #compartment_id property

  • :id (String)

    The value to assign to the #id property

  • :vpn_ip (String)

    The value to assign to the #vpn_ip property

  • :cpe_ip (String)

    The value to assign to the #cpe_ip property

  • :status (String)

    The value to assign to the #status property

  • :lifecycle_state (String)

    The value to assign to the #lifecycle_state property

  • :display_name (String)

    The value to assign to the #display_name property

  • :bgp_session_info (OCI::Core::Models::BgpSessionInfo)

    The value to assign to the #bgp_session_info property

  • :routing (String)

    The value to assign to the #routing property

  • :time_created (DateTime)

    The value to assign to the #time_created property

  • :time_status_updated (DateTime)

    The value to assign to the #time_status_updated property



150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
# File 'lib/oci/core/models/ip_sec_connection_tunnel.rb', line 150

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.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.id = attributes[:'id'] if attributes[:'id']

  self.vpn_ip = attributes[:'vpnIp'] if attributes[:'vpnIp']

  raise 'You cannot provide both :vpnIp and :vpn_ip' if attributes.key?(:'vpnIp') && attributes.key?(:'vpn_ip')

  self.vpn_ip = attributes[:'vpn_ip'] if attributes[:'vpn_ip']

  self.cpe_ip = attributes[:'cpeIp'] if attributes[:'cpeIp']

  raise 'You cannot provide both :cpeIp and :cpe_ip' if attributes.key?(:'cpeIp') && attributes.key?(:'cpe_ip')

  self.cpe_ip = attributes[:'cpe_ip'] if attributes[:'cpe_ip']

  self.status = attributes[:'status'] if attributes[:'status']

  self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState']

  raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state')

  self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state']

  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.bgp_session_info = attributes[:'bgpSessionInfo'] if attributes[:'bgpSessionInfo']

  raise 'You cannot provide both :bgpSessionInfo and :bgp_session_info' if attributes.key?(:'bgpSessionInfo') && attributes.key?(:'bgp_session_info')

  self.bgp_session_info = attributes[:'bgp_session_info'] if attributes[:'bgp_session_info']

  self.routing = attributes[:'routing'] if attributes[:'routing']

  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_status_updated = attributes[:'timeStatusUpdated'] if attributes[:'timeStatusUpdated']

  raise 'You cannot provide both :timeStatusUpdated and :time_status_updated' if attributes.key?(:'timeStatusUpdated') && attributes.key?(:'time_status_updated')

  self.time_status_updated = attributes[:'time_status_updated'] if attributes[:'time_status_updated']
end