oci 2.0.3 → 2.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -9,6 +9,10 @@ module OCI
9
9
  CIRCUIT_TYPE_SINGLE_MODE_SC = 'Single_mode_SC',
10
10
  CIRCUIT_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
11
11
 
12
+ # The name of the entity authorized by this Letter of Authority.
13
+ # @return [String]
14
+ attr_accessor :authorized_entity_name
15
+
12
16
  # The type of cross-connect fiber, termination, and optical specification.
13
17
  # @return [String]
14
18
  attr_accessor :circuit_type
@@ -46,6 +50,10 @@ module OCI
46
50
  # convert string to symbol for hash key
47
51
  attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
48
52
 
53
+ if attributes[:'authorizedEntityName']
54
+ self.authorized_entity_name = attributes[:'authorizedEntityName']
55
+ end
56
+
49
57
  if attributes[:'circuitType']
50
58
  self.circuit_type = attributes[:'circuitType']
51
59
  end
@@ -87,6 +95,7 @@ module OCI
87
95
  def ==(other_object)
88
96
  return true if self.equal?(other_object)
89
97
  self.class == other_object.class &&
98
+ authorized_entity_name == other_object.authorized_entity_name &&
90
99
  circuit_type == other_object.circuit_type &&
91
100
  cross_connect_id == other_object.cross_connect_id &&
92
101
  facility_location == other_object.facility_location &&
@@ -104,7 +113,7 @@ module OCI
104
113
  # Calculates hash code according to all attributes.
105
114
  # @return [Fixnum] Hash code
106
115
  def hash
107
- [circuit_type, cross_connect_id, facility_location, port_name, time_expires, time_issued].hash
116
+ [authorized_entity_name, circuit_type, cross_connect_id, facility_location, port_name, time_expires, time_issued].hash
108
117
  end
109
118
 
110
119
  # Builds the object from hash
@@ -170,6 +179,7 @@ module OCI
170
179
  # Attribute mapping from ruby-style variable name to JSON key.
171
180
  def self.attribute_map
172
181
  {
182
+ :'authorized_entity_name' => :'authorizedEntityName',
173
183
  :'circuit_type' => :'circuitType',
174
184
  :'cross_connect_id' => :'crossConnectId',
175
185
  :'facility_location' => :'facilityLocation',
@@ -182,6 +192,7 @@ module OCI
182
192
  # Attribute type mapping.
183
193
  def self.swagger_types
184
194
  {
195
+ :'authorized_entity_name' => :'String',
185
196
  :'circuit_type' => :'String',
186
197
  :'cross_connect_id' => :'String',
187
198
  :'facility_location' => :'String',
@@ -10,7 +10,7 @@ module OCI
10
10
 
11
11
  # The provisioned data rate of the connection. To get a list of the
12
12
  # available bandwidth levels (that is, shapes), see
13
- # {#list_virtual_circuit_bandwidth_shapes list_virtual_circuit_bandwidth_shapes}.
13
+ # {#list_fast_connect_provider_virtual_circuit_bandwidth_shapes list_fast_connect_provider_virtual_circuit_bandwidth_shapes}.
14
14
  # To be updated only by the customer who owns the virtual circuit.
15
15
  #
16
16
  # @return [String]
@@ -49,7 +49,7 @@ module OCI
49
49
  attr_accessor :display_name
50
50
 
51
51
  # The OCID of the {Drg}
52
- # that this virtual circuit uses.
52
+ # that this private virtual circuit uses.
53
53
  #
54
54
  # To be updated only by the customer who owns the virtual circuit.
55
55
  #
@@ -5,6 +5,12 @@ require 'date'
5
5
  module OCI
6
6
  class Core::Models::VirtualCircuit
7
7
 
8
+ BGP_MANAGEMENT_ENUM = [BGP_MANAGEMENT_CUSTOMER_MANAGED = 'CUSTOMER_MANAGED',
9
+ BGP_MANAGEMENT_PROVIDER_MANAGED = 'PROVIDER_MANAGED',
10
+ BGP_MANAGEMENT_ORACLE_MANAGED = 'ORACLE_MANAGED',
11
+ BGP_MANAGEMENT_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
12
+
13
+
8
14
  BGP_SESSION_STATE_ENUM = [BGP_SESSION_STATE_UP = 'UP',
9
15
  BGP_SESSION_STATE_DOWN = 'DOWN',
10
16
  BGP_SESSION_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
@@ -26,6 +32,12 @@ module OCI
26
32
  PROVIDER_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
27
33
 
28
34
 
35
+ SERVICE_TYPE_ENUM = [SERVICE_TYPE_COLOCATED = 'COLOCATED',
36
+ SERVICE_TYPE_LAYER2 = 'LAYER2',
37
+ SERVICE_TYPE_LAYER3 = 'LAYER3',
38
+ SERVICE_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
39
+
40
+
29
41
  TYPE_ENUM = [TYPE_PUBLIC = 'PUBLIC',
30
42
  TYPE_PRIVATE = 'PRIVATE',
31
43
  TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
@@ -34,6 +46,11 @@ module OCI
34
46
  # @return [String]
35
47
  attr_accessor :bandwidth_shape_name
36
48
 
49
+ # BGP management option.
50
+ #
51
+ # @return [String]
52
+ attr_accessor :bgp_management
53
+
37
54
  # The state of the BGP session associated with the virtual circuit.
38
55
  # @return [String]
39
56
  attr_accessor :bgp_session_state
@@ -65,7 +82,7 @@ module OCI
65
82
  attr_accessor :display_name
66
83
 
67
84
  # The OCID of the customer's {Drg}
68
- # that this virtual circuit uses.
85
+ # that this virtual circuit uses. Applicable only to private virtual circuits.
69
86
  #
70
87
  # @return [String]
71
88
  attr_accessor :gateway_id
@@ -85,12 +102,17 @@ module OCI
85
102
  # @return [Integer]
86
103
  attr_accessor :oracle_bgp_asn
87
104
 
88
- # The name of the provider (if you're connecting via a provider).
105
+ # Deprecated. Instead use `providerServiceId`.
89
106
  #
90
107
  # @return [String]
91
108
  attr_accessor :provider_name
92
109
 
93
- # The name of the service offered by the provider.
110
+ # The OCID of the service offered by the provider (if the customer is connecting via a provider).
111
+ #
112
+ # @return [String]
113
+ attr_accessor :provider_service_id
114
+
115
+ # Deprecated. Instead use `providerServiceId`.
94
116
  #
95
117
  # @return [String]
96
118
  attr_accessor :provider_service_name
@@ -104,6 +126,12 @@ module OCI
104
126
  # @return [String]
105
127
  attr_accessor :provider_state
106
128
 
129
+ # For a public virtual circuit. The public IP prefixes (CIDRs) the customer wants to
130
+ # advertise across the connection. Each prefix must be /24 or less specific.
131
+ #
132
+ # @return [Array<String>]
133
+ attr_accessor :public_prefixes
134
+
107
135
  # Provider-supplied reference information about this virtual circuit
108
136
  # (if the customer is connecting via a provider).
109
137
  #
@@ -116,6 +144,11 @@ module OCI
116
144
  # @return [String]
117
145
  attr_accessor :region
118
146
 
147
+ # Provider service type.
148
+ #
149
+ # @return [String]
150
+ attr_accessor :service_type
151
+
119
152
  # The date and time the virtual circuit was created,
120
153
  # in the format defined by RFC3339.
121
154
  #
@@ -124,9 +157,8 @@ module OCI
124
157
  # @return [DateTime]
125
158
  attr_accessor :time_created
126
159
 
127
- # The type of IP addresses used in this virtual circuit. PRIVATE means
128
- # [RFC 1918](https://tools.ietf.org/html/rfc1918) addresses
129
- # (10.0.0.0/8, 172.16/12, and 192.168/16). Only PRIVATE is supported.
160
+ # Whether the virtual circuit supports private or public peering. For more information,
161
+ # see [FastConnect Overview](https://docs.us-phoenix-1.oraclecloud.com/Content/Network/Concepts/fastconnect.htm).
130
162
  #
131
163
  # @return [String]
132
164
  attr_accessor :type
@@ -144,6 +176,10 @@ module OCI
144
176
  self.bandwidth_shape_name = attributes[:'bandwidthShapeName']
145
177
  end
146
178
 
179
+ if attributes[:'bgpManagement']
180
+ self.bgp_management = attributes[:'bgpManagement']
181
+ end
182
+
147
183
  if attributes[:'bgpSessionState']
148
184
  self.bgp_session_state = attributes[:'bgpSessionState']
149
185
  end
@@ -184,6 +220,10 @@ module OCI
184
220
  self.provider_name = attributes[:'providerName']
185
221
  end
186
222
 
223
+ if attributes[:'providerServiceId']
224
+ self.provider_service_id = attributes[:'providerServiceId']
225
+ end
226
+
187
227
  if attributes[:'providerServiceName']
188
228
  self.provider_service_name = attributes[:'providerServiceName']
189
229
  end
@@ -192,6 +232,10 @@ module OCI
192
232
  self.provider_state = attributes[:'providerState']
193
233
  end
194
234
 
235
+ if attributes[:'publicPrefixes']
236
+ self.public_prefixes = attributes[:'publicPrefixes']
237
+ end
238
+
195
239
  if attributes[:'referenceComment']
196
240
  self.reference_comment = attributes[:'referenceComment']
197
241
  end
@@ -200,6 +244,10 @@ module OCI
200
244
  self.region = attributes[:'region']
201
245
  end
202
246
 
247
+ if attributes[:'serviceType']
248
+ self.service_type = attributes[:'serviceType']
249
+ end
250
+
203
251
  if attributes[:'timeCreated']
204
252
  self.time_created = attributes[:'timeCreated']
205
253
  end
@@ -210,6 +258,16 @@ module OCI
210
258
 
211
259
  end
212
260
 
261
+ # Custom attribute writer method checking allowed values (enum).
262
+ # @param [Object] bgp_management Object to be assigned
263
+ def bgp_management=(bgp_management)
264
+ if bgp_management && !BGP_MANAGEMENT_ENUM.include?(bgp_management)
265
+ @bgp_management = BGP_MANAGEMENT_UNKNOWN_ENUM_VALUE
266
+ else
267
+ @bgp_management = bgp_management
268
+ end
269
+ end
270
+
213
271
  # Custom attribute writer method checking allowed values (enum).
214
272
  # @param [Object] bgp_session_state Object to be assigned
215
273
  def bgp_session_state=(bgp_session_state)
@@ -240,6 +298,16 @@ module OCI
240
298
  end
241
299
  end
242
300
 
301
+ # Custom attribute writer method checking allowed values (enum).
302
+ # @param [Object] service_type Object to be assigned
303
+ def service_type=(service_type)
304
+ if service_type && !SERVICE_TYPE_ENUM.include?(service_type)
305
+ @service_type = SERVICE_TYPE_UNKNOWN_ENUM_VALUE
306
+ else
307
+ @service_type = service_type
308
+ end
309
+ end
310
+
243
311
  # Custom attribute writer method checking allowed values (enum).
244
312
  # @param [Object] type Object to be assigned
245
313
  def type=(type)
@@ -256,6 +324,7 @@ module OCI
256
324
  return true if self.equal?(other_object)
257
325
  self.class == other_object.class &&
258
326
  bandwidth_shape_name == other_object.bandwidth_shape_name &&
327
+ bgp_management == other_object.bgp_management &&
259
328
  bgp_session_state == other_object.bgp_session_state &&
260
329
  compartment_id == other_object.compartment_id &&
261
330
  cross_connect_mappings == other_object.cross_connect_mappings &&
@@ -266,10 +335,13 @@ module OCI
266
335
  lifecycle_state == other_object.lifecycle_state &&
267
336
  oracle_bgp_asn == other_object.oracle_bgp_asn &&
268
337
  provider_name == other_object.provider_name &&
338
+ provider_service_id == other_object.provider_service_id &&
269
339
  provider_service_name == other_object.provider_service_name &&
270
340
  provider_state == other_object.provider_state &&
341
+ public_prefixes == other_object.public_prefixes &&
271
342
  reference_comment == other_object.reference_comment &&
272
343
  region == other_object.region &&
344
+ service_type == other_object.service_type &&
273
345
  time_created == other_object.time_created &&
274
346
  type == other_object.type
275
347
  end
@@ -283,7 +355,7 @@ module OCI
283
355
  # Calculates hash code according to all attributes.
284
356
  # @return [Fixnum] Hash code
285
357
  def hash
286
- [bandwidth_shape_name, bgp_session_state, compartment_id, cross_connect_mappings, customer_bgp_asn, display_name, gateway_id, id, lifecycle_state, oracle_bgp_asn, provider_name, provider_service_name, provider_state, reference_comment, region, time_created, type].hash
358
+ [bandwidth_shape_name, bgp_management, bgp_session_state, compartment_id, cross_connect_mappings, customer_bgp_asn, display_name, gateway_id, id, lifecycle_state, oracle_bgp_asn, provider_name, provider_service_id, provider_service_name, provider_state, public_prefixes, reference_comment, region, service_type, time_created, type].hash
287
359
  end
288
360
 
289
361
  # Builds the object from hash
@@ -350,6 +422,7 @@ module OCI
350
422
  def self.attribute_map
351
423
  {
352
424
  :'bandwidth_shape_name' => :'bandwidthShapeName',
425
+ :'bgp_management' => :'bgpManagement',
353
426
  :'bgp_session_state' => :'bgpSessionState',
354
427
  :'compartment_id' => :'compartmentId',
355
428
  :'cross_connect_mappings' => :'crossConnectMappings',
@@ -360,10 +433,13 @@ module OCI
360
433
  :'lifecycle_state' => :'lifecycleState',
361
434
  :'oracle_bgp_asn' => :'oracleBgpAsn',
362
435
  :'provider_name' => :'providerName',
436
+ :'provider_service_id' => :'providerServiceId',
363
437
  :'provider_service_name' => :'providerServiceName',
364
438
  :'provider_state' => :'providerState',
439
+ :'public_prefixes' => :'publicPrefixes',
365
440
  :'reference_comment' => :'referenceComment',
366
441
  :'region' => :'region',
442
+ :'service_type' => :'serviceType',
367
443
  :'time_created' => :'timeCreated',
368
444
  :'type' => :'type'
369
445
  }
@@ -373,6 +449,7 @@ module OCI
373
449
  def self.swagger_types
374
450
  {
375
451
  :'bandwidth_shape_name' => :'String',
452
+ :'bgp_management' => :'String',
376
453
  :'bgp_session_state' => :'String',
377
454
  :'compartment_id' => :'String',
378
455
  :'cross_connect_mappings' => :'Array<OCI::Core::Models::CrossConnectMapping>',
@@ -383,10 +460,13 @@ module OCI
383
460
  :'lifecycle_state' => :'String',
384
461
  :'oracle_bgp_asn' => :'Integer',
385
462
  :'provider_name' => :'String',
463
+ :'provider_service_id' => :'String',
386
464
  :'provider_service_name' => :'String',
387
465
  :'provider_state' => :'String',
466
+ :'public_prefixes' => :'Array<String>',
388
467
  :'reference_comment' => :'String',
389
468
  :'region' => :'String',
469
+ :'service_type' => :'String',
390
470
  :'time_created' => :'DateTime',
391
471
  :'type' => :'String'
392
472
  }
@@ -0,0 +1,152 @@
1
+ # Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ require 'date'
4
+
5
+ module OCI
6
+ class Core::Models::VirtualCircuitPublicPrefix
7
+
8
+ VERIFICATION_STATE_ENUM = [VERIFICATION_STATE_IN_PROGRESS = 'IN_PROGRESS',
9
+ VERIFICATION_STATE_COMPLETED = 'COMPLETED',
10
+ VERIFICATION_STATE_FAILED = 'FAILED',
11
+ VERIFICATION_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
12
+
13
+ # Publix IP prefix (CIDR) that the customer specified.
14
+ # @return [String]
15
+ attr_accessor :cidr_block
16
+
17
+ # Oracle must verify that the customer owns the public IP prefix before traffic
18
+ # for that prefix can flow across the virtual circuit. Verification can take a
19
+ # few business days. `IN_PROGRESS` means Oracle is verifying the prefix. `COMPLETED`
20
+ # means verification succeeded. `FAILED` means verification failed and traffic for
21
+ # this prefix will not flow across the connection.
22
+ #
23
+ # @return [String]
24
+ attr_accessor :verification_state
25
+
26
+
27
+ # Initializes the object
28
+ # @param [Hash] attributes Model attributes in the form of hash
29
+ def initialize(attributes = {})
30
+ return unless attributes.is_a?(Hash)
31
+
32
+ # convert string to symbol for hash key
33
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
34
+
35
+ if attributes[:'cidrBlock']
36
+ self.cidr_block = attributes[:'cidrBlock']
37
+ end
38
+
39
+ if attributes[:'verificationState']
40
+ self.verification_state = attributes[:'verificationState']
41
+ end
42
+
43
+ end
44
+
45
+ # Custom attribute writer method checking allowed values (enum).
46
+ # @param [Object] verification_state Object to be assigned
47
+ def verification_state=(verification_state)
48
+ if verification_state && !VERIFICATION_STATE_ENUM.include?(verification_state)
49
+ @verification_state = VERIFICATION_STATE_UNKNOWN_ENUM_VALUE
50
+ else
51
+ @verification_state = verification_state
52
+ end
53
+ end
54
+
55
+ # Checks equality by comparing each attribute.
56
+ # @param [Object] other_object to be compared
57
+ def ==(other_object)
58
+ return true if self.equal?(other_object)
59
+ self.class == other_object.class &&
60
+ cidr_block == other_object.cidr_block &&
61
+ verification_state == other_object.verification_state
62
+ end
63
+
64
+ # @see the `==` method
65
+ # @param [Object] other_object to be compared
66
+ def eql?(other_object)
67
+ self == other_object
68
+ end
69
+
70
+ # Calculates hash code according to all attributes.
71
+ # @return [Fixnum] Hash code
72
+ def hash
73
+ [cidr_block, verification_state].hash
74
+ end
75
+
76
+ # Builds the object from hash
77
+ # @param [Hash] attributes Model attributes in the form of hash
78
+ # @return [Object] Returns the model itself
79
+ def build_from_hash(attributes)
80
+ return nil unless attributes.is_a?(Hash)
81
+ self.class.swagger_types.each_pair do |key, type|
82
+ if type =~ /^Array<(.*)>/i
83
+ # check to ensure the input is an array given that the the attribute
84
+ # is documented as an array but the input is not
85
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
86
+ self.public_send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
87
+ end
88
+ elsif !attributes[self.class.attribute_map[key]].nil?
89
+ self.public_send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
90
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
91
+ end
92
+
93
+ self
94
+ end
95
+
96
+ # Returns the string representation of the object
97
+ # @return [String] String presentation of the object
98
+ def to_s
99
+ to_hash.to_s
100
+ end
101
+
102
+ # Returns the object in the form of hash
103
+ # @return [Hash] Returns the object in the form of hash
104
+ def to_hash
105
+ hash = {}
106
+ self.class.attribute_map.each_pair do |attr, param|
107
+ value = public_send(attr)
108
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
109
+ hash[param] = _to_hash(value)
110
+ end
111
+ hash
112
+ end
113
+
114
+ private
115
+
116
+ # Outputs non-array value in the form of hash
117
+ # For object, use to_hash. Otherwise, just return the value
118
+ # @param [Object] value Any valid value
119
+ # @return [Hash] Returns the value in the form of hash
120
+ def _to_hash(value)
121
+ if value.is_a?(Array)
122
+ value.compact.map{ |v| _to_hash(v) }
123
+ elsif value.is_a?(Hash)
124
+ {}.tap do |hash|
125
+ value.each { |k, v| hash[k] = _to_hash(v) }
126
+ end
127
+ elsif value.respond_to? :to_hash
128
+ value.to_hash
129
+ else
130
+ value
131
+ end
132
+ end
133
+
134
+
135
+
136
+ # Attribute mapping from ruby-style variable name to JSON key.
137
+ def self.attribute_map
138
+ {
139
+ :'cidr_block' => :'cidrBlock',
140
+ :'verification_state' => :'verificationState'
141
+ }
142
+ end
143
+
144
+ # Attribute type mapping.
145
+ def self.swagger_types
146
+ {
147
+ :'cidr_block' => :'String',
148
+ :'verification_state' => :'String'
149
+ }
150
+ end
151
+ end
152
+ end