oci 2.0.3 → 2.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,122 @@
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::CreateVirtualCircuitPublicPrefixDetails
7
+ # An individual public IP prefix (CIDR) to add to the public virtual circuit.
8
+ # Must be /24 or less specific.
9
+ #
10
+ # @return [String]
11
+ attr_accessor :cidr_block
12
+
13
+
14
+ # Initializes the object
15
+ # @param [Hash] attributes Model attributes in the form of hash
16
+ def initialize(attributes = {})
17
+ return unless attributes.is_a?(Hash)
18
+
19
+ # convert string to symbol for hash key
20
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
21
+
22
+ if attributes[:'cidrBlock']
23
+ self.cidr_block = attributes[:'cidrBlock']
24
+ end
25
+
26
+ end
27
+
28
+ # Checks equality by comparing each attribute.
29
+ # @param [Object] other_object to be compared
30
+ def ==(other_object)
31
+ return true if self.equal?(other_object)
32
+ self.class == other_object.class &&
33
+ cidr_block == other_object.cidr_block
34
+ end
35
+
36
+ # @see the `==` method
37
+ # @param [Object] other_object to be compared
38
+ def eql?(other_object)
39
+ self == other_object
40
+ end
41
+
42
+ # Calculates hash code according to all attributes.
43
+ # @return [Fixnum] Hash code
44
+ def hash
45
+ [cidr_block].hash
46
+ end
47
+
48
+ # Builds the object from hash
49
+ # @param [Hash] attributes Model attributes in the form of hash
50
+ # @return [Object] Returns the model itself
51
+ def build_from_hash(attributes)
52
+ return nil unless attributes.is_a?(Hash)
53
+ self.class.swagger_types.each_pair do |key, type|
54
+ if type =~ /^Array<(.*)>/i
55
+ # check to ensure the input is an array given that the the attribute
56
+ # is documented as an array but the input is not
57
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
58
+ self.public_send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
59
+ end
60
+ elsif !attributes[self.class.attribute_map[key]].nil?
61
+ self.public_send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
62
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
63
+ end
64
+
65
+ self
66
+ end
67
+
68
+ # Returns the string representation of the object
69
+ # @return [String] String presentation of the object
70
+ def to_s
71
+ to_hash.to_s
72
+ end
73
+
74
+ # Returns the object in the form of hash
75
+ # @return [Hash] Returns the object in the form of hash
76
+ def to_hash
77
+ hash = {}
78
+ self.class.attribute_map.each_pair do |attr, param|
79
+ value = public_send(attr)
80
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
81
+ hash[param] = _to_hash(value)
82
+ end
83
+ hash
84
+ end
85
+
86
+ private
87
+
88
+ # Outputs non-array value in the form of hash
89
+ # For object, use to_hash. Otherwise, just return the value
90
+ # @param [Object] value Any valid value
91
+ # @return [Hash] Returns the value in the form of hash
92
+ def _to_hash(value)
93
+ if value.is_a?(Array)
94
+ value.compact.map{ |v| _to_hash(v) }
95
+ elsif value.is_a?(Hash)
96
+ {}.tap do |hash|
97
+ value.each { |k, v| hash[k] = _to_hash(v) }
98
+ end
99
+ elsif value.respond_to? :to_hash
100
+ value.to_hash
101
+ else
102
+ value
103
+ end
104
+ end
105
+
106
+
107
+
108
+ # Attribute mapping from ruby-style variable name to JSON key.
109
+ def self.attribute_map
110
+ {
111
+ :'cidr_block' => :'cidrBlock'
112
+ }
113
+ end
114
+
115
+ # Attribute type mapping.
116
+ def self.swagger_types
117
+ {
118
+ :'cidr_block' => :'String'
119
+ }
120
+ end
121
+ end
122
+ end
@@ -25,6 +25,8 @@ module OCI
25
25
  # session goes from Oracle to a provider, this is the BGP IP address of the
26
26
  # provider's edge router. Must use a /30 or /31 subnet mask.
27
27
  #
28
+ # There's one exception: for a public virtual circuit, Oracle specifies the BGP IP addresses.
29
+ #
28
30
  # Example: `10.0.0.18/31`
29
31
  #
30
32
  # @return [String]
@@ -35,6 +37,8 @@ module OCI
35
37
  # the customer specifies this information. If the session goes from Oracle to
36
38
  # a provider's edge router, the provider specifies this.
37
39
  #
40
+ # There's one exception: for a public virtual circuit, Oracle specifies the BGP IP addresses.
41
+ #
38
42
  # Example: `10.0.0.19/31`
39
43
  #
40
44
  # @return [String]
@@ -0,0 +1,120 @@
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::DeleteVirtualCircuitPublicPrefixDetails
7
+ # An individual public IP prefix (CIDR) to remove from the public virtual circuit.
8
+ # @return [String]
9
+ attr_accessor :cidr_block
10
+
11
+
12
+ # Initializes the object
13
+ # @param [Hash] attributes Model attributes in the form of hash
14
+ def initialize(attributes = {})
15
+ return unless attributes.is_a?(Hash)
16
+
17
+ # convert string to symbol for hash key
18
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
19
+
20
+ if attributes[:'cidrBlock']
21
+ self.cidr_block = attributes[:'cidrBlock']
22
+ end
23
+
24
+ end
25
+
26
+ # Checks equality by comparing each attribute.
27
+ # @param [Object] other_object to be compared
28
+ def ==(other_object)
29
+ return true if self.equal?(other_object)
30
+ self.class == other_object.class &&
31
+ cidr_block == other_object.cidr_block
32
+ end
33
+
34
+ # @see the `==` method
35
+ # @param [Object] other_object to be compared
36
+ def eql?(other_object)
37
+ self == other_object
38
+ end
39
+
40
+ # Calculates hash code according to all attributes.
41
+ # @return [Fixnum] Hash code
42
+ def hash
43
+ [cidr_block].hash
44
+ end
45
+
46
+ # Builds the object from hash
47
+ # @param [Hash] attributes Model attributes in the form of hash
48
+ # @return [Object] Returns the model itself
49
+ def build_from_hash(attributes)
50
+ return nil unless attributes.is_a?(Hash)
51
+ self.class.swagger_types.each_pair do |key, type|
52
+ if type =~ /^Array<(.*)>/i
53
+ # check to ensure the input is an array given that the the attribute
54
+ # is documented as an array but the input is not
55
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
56
+ self.public_send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
57
+ end
58
+ elsif !attributes[self.class.attribute_map[key]].nil?
59
+ self.public_send("#{key}=", OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
60
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
61
+ end
62
+
63
+ self
64
+ end
65
+
66
+ # Returns the string representation of the object
67
+ # @return [String] String presentation of the object
68
+ def to_s
69
+ to_hash.to_s
70
+ end
71
+
72
+ # Returns the object in the form of hash
73
+ # @return [Hash] Returns the object in the form of hash
74
+ def to_hash
75
+ hash = {}
76
+ self.class.attribute_map.each_pair do |attr, param|
77
+ value = public_send(attr)
78
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
79
+ hash[param] = _to_hash(value)
80
+ end
81
+ hash
82
+ end
83
+
84
+ private
85
+
86
+ # Outputs non-array value in the form of hash
87
+ # For object, use to_hash. Otherwise, just return the value
88
+ # @param [Object] value Any valid value
89
+ # @return [Hash] Returns the value in the form of hash
90
+ def _to_hash(value)
91
+ if value.is_a?(Array)
92
+ value.compact.map{ |v| _to_hash(v) }
93
+ elsif value.is_a?(Hash)
94
+ {}.tap do |hash|
95
+ value.each { |k, v| hash[k] = _to_hash(v) }
96
+ end
97
+ elsif value.respond_to? :to_hash
98
+ value.to_hash
99
+ else
100
+ value
101
+ end
102
+ end
103
+
104
+
105
+
106
+ # Attribute mapping from ruby-style variable name to JSON key.
107
+ def self.attribute_map
108
+ {
109
+ :'cidr_block' => :'cidrBlock'
110
+ }
111
+ end
112
+
113
+ # Attribute type mapping.
114
+ def self.swagger_types
115
+ {
116
+ :'cidr_block' => :'String'
117
+ }
118
+ end
119
+ end
120
+ end
@@ -4,11 +4,43 @@ require 'date'
4
4
 
5
5
  module OCI
6
6
  class Core::Models::FastConnectProviderService
7
+
8
+ PRIVATE_PEERING_BGP_MANAGEMENT_ENUM = [PRIVATE_PEERING_BGP_MANAGEMENT_CUSTOMER_MANAGED = 'CUSTOMER_MANAGED',
9
+ PRIVATE_PEERING_BGP_MANAGEMENT_PROVIDER_MANAGED = 'PROVIDER_MANAGED',
10
+ PRIVATE_PEERING_BGP_MANAGEMENT_ORACLE_MANAGED = 'ORACLE_MANAGED',
11
+ PRIVATE_PEERING_BGP_MANAGEMENT_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
12
+
13
+
14
+ PUBLIC_PEERING_BGP_MANAGEMENT_ENUM = [PUBLIC_PEERING_BGP_MANAGEMENT_CUSTOMER_MANAGED = 'CUSTOMER_MANAGED',
15
+ PUBLIC_PEERING_BGP_MANAGEMENT_PROVIDER_MANAGED = 'PROVIDER_MANAGED',
16
+ PUBLIC_PEERING_BGP_MANAGEMENT_ORACLE_MANAGED = 'ORACLE_MANAGED',
17
+ PUBLIC_PEERING_BGP_MANAGEMENT_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
18
+
19
+
20
+ SUPPORTED_VIRTUAL_CIRCUIT_TYPES_ENUM = [SUPPORTED_VIRTUAL_CIRCUIT_TYPES_PUBLIC = 'PUBLIC',
21
+ SUPPORTED_VIRTUAL_CIRCUIT_TYPES_PRIVATE = 'PRIVATE',
22
+ SUPPORTED_VIRTUAL_CIRCUIT_TYPES_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
23
+
24
+
25
+ TYPE_ENUM = [TYPE_LAYER2 = 'LAYER2',
26
+ TYPE_LAYER3 = 'LAYER3',
27
+ TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
28
+
7
29
  # A description of the service offered by the provider.
8
30
  #
9
31
  # @return [String]
10
32
  attr_accessor :description
11
33
 
34
+ # The OCID of the service offered by the provider.
35
+ #
36
+ # @return [String]
37
+ attr_accessor :id
38
+
39
+ # Private peering BGP management.
40
+ #
41
+ # @return [String]
42
+ attr_accessor :private_peering_bgp_management
43
+
12
44
  # The name of the provider.
13
45
  #
14
46
  # @return [String]
@@ -19,6 +51,21 @@ module OCI
19
51
  # @return [String]
20
52
  attr_accessor :provider_service_name
21
53
 
54
+ # Public peering BGP management.
55
+ #
56
+ # @return [String]
57
+ attr_accessor :public_peering_bgp_management
58
+
59
+ # An array of virtual circuit types supported by this service.
60
+ #
61
+ # @return [Array<String>]
62
+ attr_accessor :supported_virtual_circuit_types
63
+
64
+ # Provider service type.
65
+ #
66
+ # @return [String]
67
+ attr_accessor :type
68
+
22
69
 
23
70
  # Initializes the object
24
71
  # @param [Hash] attributes Model attributes in the form of hash
@@ -32,6 +79,14 @@ module OCI
32
79
  self.description = attributes[:'description']
33
80
  end
34
81
 
82
+ if attributes[:'id']
83
+ self.id = attributes[:'id']
84
+ end
85
+
86
+ if attributes[:'privatePeeringBgpManagement']
87
+ self.private_peering_bgp_management = attributes[:'privatePeeringBgpManagement']
88
+ end
89
+
35
90
  if attributes[:'providerName']
36
91
  self.provider_name = attributes[:'providerName']
37
92
  end
@@ -40,6 +95,61 @@ module OCI
40
95
  self.provider_service_name = attributes[:'providerServiceName']
41
96
  end
42
97
 
98
+ if attributes[:'publicPeeringBgpManagement']
99
+ self.public_peering_bgp_management = attributes[:'publicPeeringBgpManagement']
100
+ end
101
+
102
+ if attributes[:'supportedVirtualCircuitTypes']
103
+ self.supported_virtual_circuit_types = attributes[:'supportedVirtualCircuitTypes']
104
+ end
105
+
106
+ if attributes[:'type']
107
+ self.type = attributes[:'type']
108
+ end
109
+
110
+ end
111
+
112
+ # Custom attribute writer method checking allowed values (enum).
113
+ # @param [Object] private_peering_bgp_management Object to be assigned
114
+ def private_peering_bgp_management=(private_peering_bgp_management)
115
+ if private_peering_bgp_management && !PRIVATE_PEERING_BGP_MANAGEMENT_ENUM.include?(private_peering_bgp_management)
116
+ @private_peering_bgp_management = PRIVATE_PEERING_BGP_MANAGEMENT_UNKNOWN_ENUM_VALUE
117
+ else
118
+ @private_peering_bgp_management = private_peering_bgp_management
119
+ end
120
+ end
121
+
122
+ # Custom attribute writer method checking allowed values (enum).
123
+ # @param [Object] public_peering_bgp_management Object to be assigned
124
+ def public_peering_bgp_management=(public_peering_bgp_management)
125
+ if public_peering_bgp_management && !PUBLIC_PEERING_BGP_MANAGEMENT_ENUM.include?(public_peering_bgp_management)
126
+ @public_peering_bgp_management = PUBLIC_PEERING_BGP_MANAGEMENT_UNKNOWN_ENUM_VALUE
127
+ else
128
+ @public_peering_bgp_management = public_peering_bgp_management
129
+ end
130
+ end
131
+
132
+ # Custom attribute writer method checking allowed values (enum).
133
+ # @param [Object] supported_virtual_circuit_types Object to be assigned
134
+ def supported_virtual_circuit_types=(supported_virtual_circuit_types)
135
+ if supported_virtual_circuit_types.nil?
136
+ @supported_virtual_circuit_types = nil
137
+ else
138
+ @supported_virtual_circuit_types =
139
+ supported_virtual_circuit_types.collect do |item|
140
+ SUPPORTED_VIRTUAL_CIRCUIT_TYPES_ENUM.include?(item) ? item : SUPPORTED_VIRTUAL_CIRCUIT_TYPES_UNKNOWN_ENUM_VALUE
141
+ end
142
+ end
143
+ end
144
+
145
+ # Custom attribute writer method checking allowed values (enum).
146
+ # @param [Object] type Object to be assigned
147
+ def type=(type)
148
+ if type && !TYPE_ENUM.include?(type)
149
+ @type = TYPE_UNKNOWN_ENUM_VALUE
150
+ else
151
+ @type = type
152
+ end
43
153
  end
44
154
 
45
155
  # Checks equality by comparing each attribute.
@@ -48,8 +158,13 @@ module OCI
48
158
  return true if self.equal?(other_object)
49
159
  self.class == other_object.class &&
50
160
  description == other_object.description &&
161
+ id == other_object.id &&
162
+ private_peering_bgp_management == other_object.private_peering_bgp_management &&
51
163
  provider_name == other_object.provider_name &&
52
- provider_service_name == other_object.provider_service_name
164
+ provider_service_name == other_object.provider_service_name &&
165
+ public_peering_bgp_management == other_object.public_peering_bgp_management &&
166
+ supported_virtual_circuit_types == other_object.supported_virtual_circuit_types &&
167
+ type == other_object.type
53
168
  end
54
169
 
55
170
  # @see the `==` method
@@ -61,7 +176,7 @@ module OCI
61
176
  # Calculates hash code according to all attributes.
62
177
  # @return [Fixnum] Hash code
63
178
  def hash
64
- [description, provider_name, provider_service_name].hash
179
+ [description, id, private_peering_bgp_management, provider_name, provider_service_name, public_peering_bgp_management, supported_virtual_circuit_types, type].hash
65
180
  end
66
181
 
67
182
  # Builds the object from hash
@@ -128,8 +243,13 @@ module OCI
128
243
  def self.attribute_map
129
244
  {
130
245
  :'description' => :'description',
246
+ :'id' => :'id',
247
+ :'private_peering_bgp_management' => :'privatePeeringBgpManagement',
131
248
  :'provider_name' => :'providerName',
132
- :'provider_service_name' => :'providerServiceName'
249
+ :'provider_service_name' => :'providerServiceName',
250
+ :'public_peering_bgp_management' => :'publicPeeringBgpManagement',
251
+ :'supported_virtual_circuit_types' => :'supportedVirtualCircuitTypes',
252
+ :'type' => :'type'
133
253
  }
134
254
  end
135
255
 
@@ -137,8 +257,13 @@ module OCI
137
257
  def self.swagger_types
138
258
  {
139
259
  :'description' => :'String',
260
+ :'id' => :'String',
261
+ :'private_peering_bgp_management' => :'String',
140
262
  :'provider_name' => :'String',
141
- :'provider_service_name' => :'String'
263
+ :'provider_service_name' => :'String',
264
+ :'public_peering_bgp_management' => :'String',
265
+ :'supported_virtual_circuit_types' => :'Array<String>',
266
+ :'type' => :'String'
142
267
  }
143
268
  end
144
269
  end