pnap_network_api 1.1.0 → 1.2.0
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.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/docs/PrivateNetworkCreate.md +2 -0
- data/docs/PublicNetworkCreate.md +2 -0
- data/lib/pnap_network_api/api/private_networks_api.rb +1 -1
- data/lib/pnap_network_api/api/public_networks_api.rb +1 -1
- data/lib/pnap_network_api/api_client.rb +4 -2
- data/lib/pnap_network_api/api_error.rb +1 -1
- data/lib/pnap_network_api/configuration.rb +3 -2
- data/lib/pnap_network_api/models/error.rb +2 -1
- data/lib/pnap_network_api/models/network_membership.rb +2 -1
- data/lib/pnap_network_api/models/private_network.rb +2 -1
- data/lib/pnap_network_api/models/private_network_create.rb +37 -2
- data/lib/pnap_network_api/models/private_network_modify.rb +2 -1
- data/lib/pnap_network_api/models/private_network_server.rb +2 -1
- data/lib/pnap_network_api/models/public_network.rb +2 -1
- data/lib/pnap_network_api/models/public_network_create.rb +37 -2
- data/lib/pnap_network_api/models/public_network_ip_block.rb +2 -1
- data/lib/pnap_network_api/models/public_network_modify.rb +2 -1
- data/lib/pnap_network_api/version.rb +1 -1
- data/lib/pnap_network_api.rb +1 -1
- data/pnap_network_api.gemspec +1 -1
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eae6809841069e2beff1e534d99b0a74c6375237339d11d1d5d21b4284c087f4
|
4
|
+
data.tar.gz: 065743c6e7ec7544155d09e743eb7753ddc1542ec5f1616f2322b0165b86b3ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a64b7560d21108cd44fb469e68d9bdef3897113db9ae02886bd499d7f3b293f8282ed579656184676c38352fd432ef8ae2b6ef3736980ec43628d29f22f88c83
|
7
|
+
data.tar.gz: 71cf3d4411e7f4d71d1e3a7cfb6bf33a9245d9ded3a46f14c860f900ebe61f0fc2ffe5cf0d24fb50084c7f4711d2d6eb2127cb84a82620deaf6cac7c6102a3be
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.2.0
|
@@ -8,6 +8,7 @@
|
|
8
8
|
| **description** | **String** | The description of this private network. | [optional] |
|
9
9
|
| **location** | **String** | The location of this private network. Supported values are `PHX`, `ASH`, `SGP`, `NLD`, `CHI`, `SEA` and `AUS`. | |
|
10
10
|
| **location_default** | **Boolean** | Identifies network as the default private network for the specified location. | [optional][default to false] |
|
11
|
+
| **vlan_id** | **Integer** | The VLAN that will be assigned to this network. | [optional] |
|
11
12
|
| **cidr** | **String** | IP range associated with this private network in CIDR notation. | |
|
12
13
|
|
13
14
|
## Example
|
@@ -20,6 +21,7 @@ instance = NetworkApi::PrivateNetworkCreate.new(
|
|
20
21
|
description: Further details on the network,
|
21
22
|
location: PHX,
|
22
23
|
location_default: true,
|
24
|
+
vlan_id: 10,
|
23
25
|
cidr: 10.0.0.0/24
|
24
26
|
)
|
25
27
|
```
|
data/docs/PublicNetworkCreate.md
CHANGED
@@ -7,6 +7,7 @@
|
|
7
7
|
| **name** | **String** | The friendly name of this public network. This name should be unique. | |
|
8
8
|
| **description** | **String** | The description of this public network. | [optional] |
|
9
9
|
| **location** | **String** | The location of this public network. Supported values are `PHX`, `ASH`, `SGP`, `NLD`, `CHI`, `SEA` and `AUS`. | |
|
10
|
+
| **vlan_id** | **Integer** | The VLAN that will be assigned to this network. | [optional] |
|
10
11
|
| **ip_blocks** | [**Array<PublicNetworkIpBlock>**](PublicNetworkIpBlock.md) | A list of IP Blocks that will be associated with this public network. | [optional] |
|
11
12
|
|
12
13
|
## Example
|
@@ -18,6 +19,7 @@ instance = NetworkApi::PublicNetworkCreate.new(
|
|
18
19
|
name: Sample Network,
|
19
20
|
description: Further details on the network.,
|
20
21
|
location: PHX,
|
22
|
+
vlan_id: 10,
|
21
23
|
ip_blocks: null
|
22
24
|
)
|
23
25
|
```
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0
|
7
7
|
Contact: support@phoenixnap.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 6.1.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -95,6 +95,7 @@ module NetworkApi
|
|
95
95
|
header_params = @default_headers.merge(opts[:header_params] || {})
|
96
96
|
query_params = opts[:query_params] || {}
|
97
97
|
form_params = opts[:form_params] || {}
|
98
|
+
follow_location = opts[:follow_location] || true
|
98
99
|
|
99
100
|
update_params_for_auth! header_params, query_params, opts[:auth_names]
|
100
101
|
|
@@ -111,7 +112,8 @@ module NetworkApi
|
|
111
112
|
:ssl_verifyhost => _verify_ssl_host,
|
112
113
|
:sslcert => @config.cert_file,
|
113
114
|
:sslkey => @config.key_file,
|
114
|
-
:verbose => @config.debugging
|
115
|
+
:verbose => @config.debugging,
|
116
|
+
:followlocation => follow_location
|
115
117
|
}
|
116
118
|
|
117
119
|
# set custom cert, if provided
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0
|
7
7
|
Contact: support@phoenixnap.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 6.1.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -133,6 +133,7 @@ module NetworkApi
|
|
133
133
|
# https://github.com/typhoeus/ethon/blob/master/lib/ethon/easy/queryable.rb#L96
|
134
134
|
attr_accessor :params_encoding
|
135
135
|
|
136
|
+
|
136
137
|
attr_accessor :inject_format
|
137
138
|
|
138
139
|
attr_accessor :force_ending_format
|
@@ -150,10 +151,10 @@ module NetworkApi
|
|
150
151
|
@client_side_validation = true
|
151
152
|
@verify_ssl = true
|
152
153
|
@verify_ssl_host = true
|
153
|
-
@params_encoding = nil
|
154
154
|
@cert_file = nil
|
155
155
|
@key_file = nil
|
156
156
|
@timeout = 0
|
157
|
+
@params_encoding = nil
|
157
158
|
@debugging = false
|
158
159
|
@inject_format = false
|
159
160
|
@force_ending_format = false
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0
|
7
7
|
Contact: support@phoenixnap.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 6.1.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -125,6 +125,7 @@ module NetworkApi
|
|
125
125
|
# @return [Object] Returns the model itself
|
126
126
|
def build_from_hash(attributes)
|
127
127
|
return nil unless attributes.is_a?(Hash)
|
128
|
+
attributes = attributes.transform_keys(&:to_sym)
|
128
129
|
self.class.openapi_types.each_pair do |key, type|
|
129
130
|
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
130
131
|
self.send("#{key}=", nil)
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0
|
7
7
|
Contact: support@phoenixnap.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 6.1.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -146,6 +146,7 @@ module NetworkApi
|
|
146
146
|
# @return [Object] Returns the model itself
|
147
147
|
def build_from_hash(attributes)
|
148
148
|
return nil unless attributes.is_a?(Hash)
|
149
|
+
attributes = attributes.transform_keys(&:to_sym)
|
149
150
|
self.class.openapi_types.each_pair do |key, type|
|
150
151
|
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
151
152
|
self.send("#{key}=", nil)
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0
|
7
7
|
Contact: support@phoenixnap.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 6.1.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -320,6 +320,7 @@ module NetworkApi
|
|
320
320
|
# @return [Object] Returns the model itself
|
321
321
|
def build_from_hash(attributes)
|
322
322
|
return nil unless attributes.is_a?(Hash)
|
323
|
+
attributes = attributes.transform_keys(&:to_sym)
|
323
324
|
self.class.openapi_types.each_pair do |key, type|
|
324
325
|
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
325
326
|
self.send("#{key}=", nil)
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0
|
7
7
|
Contact: support@phoenixnap.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 6.1.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -28,6 +28,9 @@ module NetworkApi
|
|
28
28
|
# Identifies network as the default private network for the specified location.
|
29
29
|
attr_accessor :location_default
|
30
30
|
|
31
|
+
# The VLAN that will be assigned to this network.
|
32
|
+
attr_accessor :vlan_id
|
33
|
+
|
31
34
|
# IP range associated with this private network in CIDR notation.
|
32
35
|
attr_accessor :cidr
|
33
36
|
|
@@ -38,6 +41,7 @@ module NetworkApi
|
|
38
41
|
:'description' => :'description',
|
39
42
|
:'location' => :'location',
|
40
43
|
:'location_default' => :'locationDefault',
|
44
|
+
:'vlan_id' => :'vlanId',
|
41
45
|
:'cidr' => :'cidr'
|
42
46
|
}
|
43
47
|
end
|
@@ -54,6 +58,7 @@ module NetworkApi
|
|
54
58
|
:'description' => :'String',
|
55
59
|
:'location' => :'String',
|
56
60
|
:'location_default' => :'Boolean',
|
61
|
+
:'vlan_id' => :'Integer',
|
57
62
|
:'cidr' => :'String'
|
58
63
|
}
|
59
64
|
end
|
@@ -97,6 +102,10 @@ module NetworkApi
|
|
97
102
|
self.location_default = false
|
98
103
|
end
|
99
104
|
|
105
|
+
if attributes.key?(:'vlan_id')
|
106
|
+
self.vlan_id = attributes[:'vlan_id']
|
107
|
+
end
|
108
|
+
|
100
109
|
if attributes.key?(:'cidr')
|
101
110
|
self.cidr = attributes[:'cidr']
|
102
111
|
end
|
@@ -126,6 +135,14 @@ module NetworkApi
|
|
126
135
|
invalid_properties.push('invalid value for "location", location cannot be nil.')
|
127
136
|
end
|
128
137
|
|
138
|
+
if !@vlan_id.nil? && @vlan_id > 4094
|
139
|
+
invalid_properties.push('invalid value for "vlan_id", must be smaller than or equal to 4094.')
|
140
|
+
end
|
141
|
+
|
142
|
+
if !@vlan_id.nil? && @vlan_id < 2
|
143
|
+
invalid_properties.push('invalid value for "vlan_id", must be greater than or equal to 2.')
|
144
|
+
end
|
145
|
+
|
129
146
|
if @cidr.nil?
|
130
147
|
invalid_properties.push('invalid value for "cidr", cidr cannot be nil.')
|
131
148
|
end
|
@@ -141,6 +158,8 @@ module NetworkApi
|
|
141
158
|
return false if @name.to_s.length < 1
|
142
159
|
return false if !@description.nil? && @description.to_s.length > 250
|
143
160
|
return false if @location.nil?
|
161
|
+
return false if !@vlan_id.nil? && @vlan_id > 4094
|
162
|
+
return false if !@vlan_id.nil? && @vlan_id < 2
|
144
163
|
return false if @cidr.nil?
|
145
164
|
true
|
146
165
|
end
|
@@ -173,6 +192,20 @@ module NetworkApi
|
|
173
192
|
@description = description
|
174
193
|
end
|
175
194
|
|
195
|
+
# Custom attribute writer method with validation
|
196
|
+
# @param [Object] vlan_id Value to be assigned
|
197
|
+
def vlan_id=(vlan_id)
|
198
|
+
if !vlan_id.nil? && vlan_id > 4094
|
199
|
+
fail ArgumentError, 'invalid value for "vlan_id", must be smaller than or equal to 4094.'
|
200
|
+
end
|
201
|
+
|
202
|
+
if !vlan_id.nil? && vlan_id < 2
|
203
|
+
fail ArgumentError, 'invalid value for "vlan_id", must be greater than or equal to 2.'
|
204
|
+
end
|
205
|
+
|
206
|
+
@vlan_id = vlan_id
|
207
|
+
end
|
208
|
+
|
176
209
|
# Checks equality by comparing each attribute.
|
177
210
|
# @param [Object] Object to be compared
|
178
211
|
def ==(o)
|
@@ -182,6 +215,7 @@ module NetworkApi
|
|
182
215
|
description == o.description &&
|
183
216
|
location == o.location &&
|
184
217
|
location_default == o.location_default &&
|
218
|
+
vlan_id == o.vlan_id &&
|
185
219
|
cidr == o.cidr
|
186
220
|
end
|
187
221
|
|
@@ -194,7 +228,7 @@ module NetworkApi
|
|
194
228
|
# Calculates hash code according to all attributes.
|
195
229
|
# @return [Integer] Hash code
|
196
230
|
def hash
|
197
|
-
[name, description, location, location_default, cidr].hash
|
231
|
+
[name, description, location, location_default, vlan_id, cidr].hash
|
198
232
|
end
|
199
233
|
|
200
234
|
# Builds the object from hash
|
@@ -209,6 +243,7 @@ module NetworkApi
|
|
209
243
|
# @return [Object] Returns the model itself
|
210
244
|
def build_from_hash(attributes)
|
211
245
|
return nil unless attributes.is_a?(Hash)
|
246
|
+
attributes = attributes.transform_keys(&:to_sym)
|
212
247
|
self.class.openapi_types.each_pair do |key, type|
|
213
248
|
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
214
249
|
self.send("#{key}=", nil)
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0
|
7
7
|
Contact: support@phoenixnap.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 6.1.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -182,6 +182,7 @@ module NetworkApi
|
|
182
182
|
# @return [Object] Returns the model itself
|
183
183
|
def build_from_hash(attributes)
|
184
184
|
return nil unless attributes.is_a?(Hash)
|
185
|
+
attributes = attributes.transform_keys(&:to_sym)
|
185
186
|
self.class.openapi_types.each_pair do |key, type|
|
186
187
|
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
187
188
|
self.send("#{key}=", nil)
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0
|
7
7
|
Contact: support@phoenixnap.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 6.1.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -131,6 +131,7 @@ module NetworkApi
|
|
131
131
|
# @return [Object] Returns the model itself
|
132
132
|
def build_from_hash(attributes)
|
133
133
|
return nil unless attributes.is_a?(Hash)
|
134
|
+
attributes = attributes.transform_keys(&:to_sym)
|
134
135
|
self.class.openapi_types.each_pair do |key, type|
|
135
136
|
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
136
137
|
self.send("#{key}=", nil)
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0
|
7
7
|
Contact: support@phoenixnap.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 6.1.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -276,6 +276,7 @@ module NetworkApi
|
|
276
276
|
# @return [Object] Returns the model itself
|
277
277
|
def build_from_hash(attributes)
|
278
278
|
return nil unless attributes.is_a?(Hash)
|
279
|
+
attributes = attributes.transform_keys(&:to_sym)
|
279
280
|
self.class.openapi_types.each_pair do |key, type|
|
280
281
|
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
281
282
|
self.send("#{key}=", nil)
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0
|
7
7
|
Contact: support@phoenixnap.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 6.1.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -25,6 +25,9 @@ module NetworkApi
|
|
25
25
|
# The location of this public network. Supported values are `PHX`, `ASH`, `SGP`, `NLD`, `CHI`, `SEA` and `AUS`.
|
26
26
|
attr_accessor :location
|
27
27
|
|
28
|
+
# The VLAN that will be assigned to this network.
|
29
|
+
attr_accessor :vlan_id
|
30
|
+
|
28
31
|
# A list of IP Blocks that will be associated with this public network.
|
29
32
|
attr_accessor :ip_blocks
|
30
33
|
|
@@ -34,6 +37,7 @@ module NetworkApi
|
|
34
37
|
:'name' => :'name',
|
35
38
|
:'description' => :'description',
|
36
39
|
:'location' => :'location',
|
40
|
+
:'vlan_id' => :'vlanId',
|
37
41
|
:'ip_blocks' => :'ipBlocks'
|
38
42
|
}
|
39
43
|
end
|
@@ -49,6 +53,7 @@ module NetworkApi
|
|
49
53
|
:'name' => :'String',
|
50
54
|
:'description' => :'String',
|
51
55
|
:'location' => :'String',
|
56
|
+
:'vlan_id' => :'Integer',
|
52
57
|
:'ip_blocks' => :'Array<PublicNetworkIpBlock>'
|
53
58
|
}
|
54
59
|
end
|
@@ -86,6 +91,10 @@ module NetworkApi
|
|
86
91
|
self.location = attributes[:'location']
|
87
92
|
end
|
88
93
|
|
94
|
+
if attributes.key?(:'vlan_id')
|
95
|
+
self.vlan_id = attributes[:'vlan_id']
|
96
|
+
end
|
97
|
+
|
89
98
|
if attributes.key?(:'ip_blocks')
|
90
99
|
if (value = attributes[:'ip_blocks']).is_a?(Array)
|
91
100
|
self.ip_blocks = value
|
@@ -117,6 +126,14 @@ module NetworkApi
|
|
117
126
|
invalid_properties.push('invalid value for "location", location cannot be nil.')
|
118
127
|
end
|
119
128
|
|
129
|
+
if !@vlan_id.nil? && @vlan_id > 4094
|
130
|
+
invalid_properties.push('invalid value for "vlan_id", must be smaller than or equal to 4094.')
|
131
|
+
end
|
132
|
+
|
133
|
+
if !@vlan_id.nil? && @vlan_id < 2
|
134
|
+
invalid_properties.push('invalid value for "vlan_id", must be greater than or equal to 2.')
|
135
|
+
end
|
136
|
+
|
120
137
|
if !@ip_blocks.nil? && @ip_blocks.length > 10
|
121
138
|
invalid_properties.push('invalid value for "ip_blocks", number of items must be less than or equal to 10.')
|
122
139
|
end
|
@@ -132,6 +149,8 @@ module NetworkApi
|
|
132
149
|
return false if @name.to_s.length < 1
|
133
150
|
return false if !@description.nil? && @description.to_s.length > 250
|
134
151
|
return false if @location.nil?
|
152
|
+
return false if !@vlan_id.nil? && @vlan_id > 4094
|
153
|
+
return false if !@vlan_id.nil? && @vlan_id < 2
|
135
154
|
return false if !@ip_blocks.nil? && @ip_blocks.length > 10
|
136
155
|
true
|
137
156
|
end
|
@@ -164,6 +183,20 @@ module NetworkApi
|
|
164
183
|
@description = description
|
165
184
|
end
|
166
185
|
|
186
|
+
# Custom attribute writer method with validation
|
187
|
+
# @param [Object] vlan_id Value to be assigned
|
188
|
+
def vlan_id=(vlan_id)
|
189
|
+
if !vlan_id.nil? && vlan_id > 4094
|
190
|
+
fail ArgumentError, 'invalid value for "vlan_id", must be smaller than or equal to 4094.'
|
191
|
+
end
|
192
|
+
|
193
|
+
if !vlan_id.nil? && vlan_id < 2
|
194
|
+
fail ArgumentError, 'invalid value for "vlan_id", must be greater than or equal to 2.'
|
195
|
+
end
|
196
|
+
|
197
|
+
@vlan_id = vlan_id
|
198
|
+
end
|
199
|
+
|
167
200
|
# Custom attribute writer method with validation
|
168
201
|
# @param [Object] ip_blocks Value to be assigned
|
169
202
|
def ip_blocks=(ip_blocks)
|
@@ -182,6 +215,7 @@ module NetworkApi
|
|
182
215
|
name == o.name &&
|
183
216
|
description == o.description &&
|
184
217
|
location == o.location &&
|
218
|
+
vlan_id == o.vlan_id &&
|
185
219
|
ip_blocks == o.ip_blocks
|
186
220
|
end
|
187
221
|
|
@@ -194,7 +228,7 @@ module NetworkApi
|
|
194
228
|
# Calculates hash code according to all attributes.
|
195
229
|
# @return [Integer] Hash code
|
196
230
|
def hash
|
197
|
-
[name, description, location, ip_blocks].hash
|
231
|
+
[name, description, location, vlan_id, ip_blocks].hash
|
198
232
|
end
|
199
233
|
|
200
234
|
# Builds the object from hash
|
@@ -209,6 +243,7 @@ module NetworkApi
|
|
209
243
|
# @return [Object] Returns the model itself
|
210
244
|
def build_from_hash(attributes)
|
211
245
|
return nil unless attributes.is_a?(Hash)
|
246
|
+
attributes = attributes.transform_keys(&:to_sym)
|
212
247
|
self.class.openapi_types.each_pair do |key, type|
|
213
248
|
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
214
249
|
self.send("#{key}=", nil)
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0
|
7
7
|
Contact: support@phoenixnap.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 6.1.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -114,6 +114,7 @@ module NetworkApi
|
|
114
114
|
# @return [Object] Returns the model itself
|
115
115
|
def build_from_hash(attributes)
|
116
116
|
return nil unless attributes.is_a?(Hash)
|
117
|
+
attributes = attributes.transform_keys(&:to_sym)
|
117
118
|
self.class.openapi_types.each_pair do |key, type|
|
118
119
|
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
119
120
|
self.send("#{key}=", nil)
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0
|
7
7
|
Contact: support@phoenixnap.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 6.1.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -158,6 +158,7 @@ module NetworkApi
|
|
158
158
|
# @return [Object] Returns the model itself
|
159
159
|
def build_from_hash(attributes)
|
160
160
|
return nil unless attributes.is_a?(Hash)
|
161
|
+
attributes = attributes.transform_keys(&:to_sym)
|
161
162
|
self.class.openapi_types.each_pair do |key, type|
|
162
163
|
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
163
164
|
self.send("#{key}=", nil)
|
data/lib/pnap_network_api.rb
CHANGED
data/pnap_network_api.gemspec
CHANGED
data/spec/api_client_spec.rb
CHANGED
data/spec/configuration_spec.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pnap_network_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PhoenixNAP
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -129,7 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
129
129
|
- !ruby/object:Gem::Version
|
130
130
|
version: '0'
|
131
131
|
requirements: []
|
132
|
-
rubygems_version: 3.
|
132
|
+
rubygems_version: 3.3.5
|
133
133
|
signing_key:
|
134
134
|
specification_version: 4
|
135
135
|
summary: Networks API Ruby Gem
|
@@ -138,15 +138,15 @@ test_files:
|
|
138
138
|
- spec/api/private_networks_api_spec.rb
|
139
139
|
- spec/api_client_spec.rb
|
140
140
|
- spec/configuration_spec.rb
|
141
|
-
- spec/models/
|
141
|
+
- spec/models/network_membership_spec.rb
|
142
142
|
- spec/models/private_network_spec.rb
|
143
|
-
- spec/models/private_network_modify_spec.rb
|
144
143
|
- spec/models/public_network_ip_block_spec.rb
|
145
|
-
- spec/models/error_spec.rb
|
146
|
-
- spec/models/network_membership_spec.rb
|
147
|
-
- spec/models/public_network_spec.rb
|
148
144
|
- spec/models/private_network_create_spec.rb
|
149
145
|
- spec/models/private_network_server_spec.rb
|
146
|
+
- spec/models/private_network_modify_spec.rb
|
150
147
|
- spec/models/public_network_create_spec.rb
|
148
|
+
- spec/models/public_network_modify_spec.rb
|
151
149
|
- spec/models/public_network_membership_spec.rb
|
150
|
+
- spec/models/error_spec.rb
|
151
|
+
- spec/models/public_network_spec.rb
|
152
152
|
- spec/spec_helper.rb
|