Method: OCI::Core::Models::CrossConnectMapping#initialize
- Defined in:
- lib/oci/core/models/cross_connect_mapping.rb
#initialize(attributes = {}) ⇒ CrossConnectMapping
Initializes the object
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 147 148 149 150 151 152 |
# File 'lib/oci/core/models/cross_connect_mapping.rb', line 121 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.bgp_md5_auth_key = attributes[:'bgpMd5AuthKey'] if attributes[:'bgpMd5AuthKey'] raise 'You cannot provide both :bgpMd5AuthKey and :bgp_md5_auth_key' if attributes.key?(:'bgpMd5AuthKey') && attributes.key?(:'bgp_md5_auth_key') self.bgp_md5_auth_key = attributes[:'bgp_md5_auth_key'] if attributes[:'bgp_md5_auth_key'] self.cross_connect_or_cross_connect_group_id = attributes[:'crossConnectOrCrossConnectGroupId'] if attributes[:'crossConnectOrCrossConnectGroupId'] raise 'You cannot provide both :crossConnectOrCrossConnectGroupId and :cross_connect_or_cross_connect_group_id' if attributes.key?(:'crossConnectOrCrossConnectGroupId') && attributes.key?(:'cross_connect_or_cross_connect_group_id') self.cross_connect_or_cross_connect_group_id = attributes[:'cross_connect_or_cross_connect_group_id'] if attributes[:'cross_connect_or_cross_connect_group_id'] self.customer_bgp_peering_ip = attributes[:'customerBgpPeeringIp'] if attributes[:'customerBgpPeeringIp'] raise 'You cannot provide both :customerBgpPeeringIp and :customer_bgp_peering_ip' if attributes.key?(:'customerBgpPeeringIp') && attributes.key?(:'customer_bgp_peering_ip') self.customer_bgp_peering_ip = attributes[:'customer_bgp_peering_ip'] if attributes[:'customer_bgp_peering_ip'] self.oracle_bgp_peering_ip = attributes[:'oracleBgpPeeringIp'] if attributes[:'oracleBgpPeeringIp'] raise 'You cannot provide both :oracleBgpPeeringIp and :oracle_bgp_peering_ip' if attributes.key?(:'oracleBgpPeeringIp') && attributes.key?(:'oracle_bgp_peering_ip') self.oracle_bgp_peering_ip = attributes[:'oracle_bgp_peering_ip'] if attributes[:'oracle_bgp_peering_ip'] self.vlan = attributes[:'vlan'] if attributes[:'vlan'] end |