pnap_ip_api 1.0.0 → 1.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0621b6cfe51d0216c6b878169fe8fdaa6f605e275f1beeba3d8e0f162b24a4ab
4
- data.tar.gz: 885941b7eab57da49c3f17e4f9589c8d163af90f0a4efa05ba4de87e708232d7
3
+ metadata.gz: bf0cd9c7098fd1898c2314ffd433b63a575cc0ff3c06aab620bfa13d62ed35f4
4
+ data.tar.gz: 834a5efef0e7c30cfa3479a5bc5ce656454c239897b41644c173699d6c9ee504
5
5
  SHA512:
6
- metadata.gz: 10b942c79b848d3a116b6a0d4eb7bcbbc41788299f058bb1e53714e3027408578c4583f1be2bdaa29441bcab809cb69454fa8cbd0b8e4eeee9275f236f3f5e87
7
- data.tar.gz: 47e5baafabd8a2de3b4affeb1ef10ab2ec080ec1aeb1d87cf32883000167ecee35a480d71db3f20161a9c95d065ecf72b8b862743c5630e27549ab376daf11ad
6
+ metadata.gz: 13e400bea04e342688e5a5172cfef530658dde6780ce5435e742d69a8edbfde43e2d1e9a5ad3ddc321861679e5a94727dc5b7698e0074b83ed28fd9a1b181e99
7
+ data.tar.gz: 43d498e4f2081ad4773605ef3f129d9d43e0da3595dba8ce83051bf79f71df929db5de112c3f20c9065cd54fe1336635cf9a5270b63ca1add720014754aaf1f0
data/README.md CHANGED
@@ -77,10 +77,13 @@ IpApi.configure do |config|
77
77
  end
78
78
 
79
79
  api_instance = IpApi::IPBlocksApi.new
80
+ opts = {
81
+ tag: ['inner_example'] # Array<String> | List of tags, in the form tagName.tagValue, to filter by.
82
+ }
80
83
 
81
84
  begin
82
85
  #List IP Blocks.
83
- result = api_instance.ip_blocks_get
86
+ result = api_instance.ip_blocks_get(opts)
84
87
  p result
85
88
  rescue IpApi::ApiError => e
86
89
  puts "Exception when calling IPBlocksApi->ip_blocks_get: #{e}"
@@ -123,6 +126,7 @@ Class | Method | HTTP request | Description
123
126
  *IpApi::IPBlocksApi* | [**ip_blocks_ip_block_id_delete**](docs/IPBlocksApi.md#ip_blocks_ip_block_id_delete) | **DELETE** /ip-blocks/{ipBlockId} | Delete IP Block.
124
127
  *IpApi::IPBlocksApi* | [**ip_blocks_ip_block_id_get**](docs/IPBlocksApi.md#ip_blocks_ip_block_id_get) | **GET** /ip-blocks/{ipBlockId} | Get IP Block.
125
128
  *IpApi::IPBlocksApi* | [**ip_blocks_ip_block_id_patch**](docs/IPBlocksApi.md#ip_blocks_ip_block_id_patch) | **PATCH** /ip-blocks/{ipBlockId} | Update IP block.
129
+ *IpApi::IPBlocksApi* | [**ip_blocks_ip_block_id_tags_put**](docs/IPBlocksApi.md#ip_blocks_ip_block_id_tags_put) | **PUT** /ip-blocks/{ipBlockId}/tags | Overwrite tags assigned for IP Block.
126
130
  *IpApi::IPBlocksApi* | [**ip_blocks_post**](docs/IPBlocksApi.md#ip_blocks_post) | **POST** /ip-blocks | Create an IP Block.
127
131
 
128
132
 
@@ -133,6 +137,8 @@ Class | Method | HTTP request | Description
133
137
  - [IpApi::IpBlock](docs/IpBlock.md)
134
138
  - [IpApi::IpBlockCreate](docs/IpBlockCreate.md)
135
139
  - [IpApi::IpBlockPatch](docs/IpBlockPatch.md)
140
+ - [IpApi::TagAssignment](docs/TagAssignment.md)
141
+ - [IpApi::TagAssignmentRequest](docs/TagAssignmentRequest.md)
136
142
 
137
143
 
138
144
  ## Documentation for Authorization
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.1.1
data/docs/IPBlocksApi.md CHANGED
@@ -8,12 +8,13 @@ All URIs are relative to *https://api.phoenixnap.com/ips/v1*
8
8
  | [**ip_blocks_ip_block_id_delete**](IPBlocksApi.md#ip_blocks_ip_block_id_delete) | **DELETE** /ip-blocks/{ipBlockId} | Delete IP Block. |
9
9
  | [**ip_blocks_ip_block_id_get**](IPBlocksApi.md#ip_blocks_ip_block_id_get) | **GET** /ip-blocks/{ipBlockId} | Get IP Block. |
10
10
  | [**ip_blocks_ip_block_id_patch**](IPBlocksApi.md#ip_blocks_ip_block_id_patch) | **PATCH** /ip-blocks/{ipBlockId} | Update IP block. |
11
+ | [**ip_blocks_ip_block_id_tags_put**](IPBlocksApi.md#ip_blocks_ip_block_id_tags_put) | **PUT** /ip-blocks/{ipBlockId}/tags | Overwrite tags assigned for IP Block. |
11
12
  | [**ip_blocks_post**](IPBlocksApi.md#ip_blocks_post) | **POST** /ip-blocks | Create an IP Block. |
12
13
 
13
14
 
14
15
  ## ip_blocks_get
15
16
 
16
- > <Array<IpBlock>> ip_blocks_get
17
+ > <Array<IpBlock>> ip_blocks_get(opts)
17
18
 
18
19
  List IP Blocks.
19
20
 
@@ -31,10 +32,13 @@ IpApi.configure do |config|
31
32
  end
32
33
 
33
34
  api_instance = IpApi::IPBlocksApi.new
35
+ opts = {
36
+ tag: ['inner_example'] # Array<String> | List of tags, in the form tagName.tagValue, to filter by.
37
+ }
34
38
 
35
39
  begin
36
40
  # List IP Blocks.
37
- result = api_instance.ip_blocks_get
41
+ result = api_instance.ip_blocks_get(opts)
38
42
  p result
39
43
  rescue IpApi::ApiError => e
40
44
  puts "Error when calling IPBlocksApi->ip_blocks_get: #{e}"
@@ -45,12 +49,12 @@ end
45
49
 
46
50
  This returns an Array which contains the response data, status code and headers.
47
51
 
48
- > <Array(<Array<IpBlock>>, Integer, Hash)> ip_blocks_get_with_http_info
52
+ > <Array(<Array<IpBlock>>, Integer, Hash)> ip_blocks_get_with_http_info(opts)
49
53
 
50
54
  ```ruby
51
55
  begin
52
56
  # List IP Blocks.
53
- data, status_code, headers = api_instance.ip_blocks_get_with_http_info
57
+ data, status_code, headers = api_instance.ip_blocks_get_with_http_info(opts)
54
58
  p status_code # => 2xx
55
59
  p headers # => { ... }
56
60
  p data # => <Array<IpBlock>>
@@ -61,7 +65,9 @@ end
61
65
 
62
66
  ### Parameters
63
67
 
64
- This endpoint does not need any parameter.
68
+ | Name | Type | Description | Notes |
69
+ | ---- | ---- | ----------- | ----- |
70
+ | **tag** | [**Array&lt;String&gt;**](String.md) | List of tags, in the form tagName.tagValue, to filter by. | [optional] |
65
71
 
66
72
  ### Return type
67
73
 
@@ -288,6 +294,79 @@ end
288
294
  - **Accept**: application/json
289
295
 
290
296
 
297
+ ## ip_blocks_ip_block_id_tags_put
298
+
299
+ > <IpBlock> ip_blocks_ip_block_id_tags_put(ip_block_id, opts)
300
+
301
+ Overwrite tags assigned for IP Block.
302
+
303
+ Overwrites tags assigned for IP Block and unassigns any tags not part of the request.
304
+
305
+ ### Examples
306
+
307
+ ```ruby
308
+ require 'time'
309
+ require 'pnap_ip_api'
310
+ # setup authorization
311
+ IpApi.configure do |config|
312
+ # Configure OAuth2 access token for authorization: OAuth2
313
+ config.access_token = 'YOUR ACCESS TOKEN'
314
+ end
315
+
316
+ api_instance = IpApi::IPBlocksApi.new
317
+ ip_block_id = '6047127fed34ecc3ba8402d2' # String | The IP Block identifier.
318
+ opts = {
319
+ tag_assignment_request: [IpApi::TagAssignmentRequest.new({name: 'Environment'})] # Array<TagAssignmentRequest> |
320
+ }
321
+
322
+ begin
323
+ # Overwrite tags assigned for IP Block.
324
+ result = api_instance.ip_blocks_ip_block_id_tags_put(ip_block_id, opts)
325
+ p result
326
+ rescue IpApi::ApiError => e
327
+ puts "Error when calling IPBlocksApi->ip_blocks_ip_block_id_tags_put: #{e}"
328
+ end
329
+ ```
330
+
331
+ #### Using the ip_blocks_ip_block_id_tags_put_with_http_info variant
332
+
333
+ This returns an Array which contains the response data, status code and headers.
334
+
335
+ > <Array(<IpBlock>, Integer, Hash)> ip_blocks_ip_block_id_tags_put_with_http_info(ip_block_id, opts)
336
+
337
+ ```ruby
338
+ begin
339
+ # Overwrite tags assigned for IP Block.
340
+ data, status_code, headers = api_instance.ip_blocks_ip_block_id_tags_put_with_http_info(ip_block_id, opts)
341
+ p status_code # => 2xx
342
+ p headers # => { ... }
343
+ p data # => <IpBlock>
344
+ rescue IpApi::ApiError => e
345
+ puts "Error when calling IPBlocksApi->ip_blocks_ip_block_id_tags_put_with_http_info: #{e}"
346
+ end
347
+ ```
348
+
349
+ ### Parameters
350
+
351
+ | Name | Type | Description | Notes |
352
+ | ---- | ---- | ----------- | ----- |
353
+ | **ip_block_id** | **String** | The IP Block identifier. | |
354
+ | **tag_assignment_request** | [**Array&lt;TagAssignmentRequest&gt;**](TagAssignmentRequest.md) | | [optional] |
355
+
356
+ ### Return type
357
+
358
+ [**IpBlock**](IpBlock.md)
359
+
360
+ ### Authorization
361
+
362
+ [OAuth2](../README.md#OAuth2)
363
+
364
+ ### HTTP request headers
365
+
366
+ - **Content-Type**: application/json
367
+ - **Accept**: application/json
368
+
369
+
291
370
  ## ip_blocks_post
292
371
 
293
372
  > <IpBlock> ip_blocks_post(opts)
data/docs/IpBlock.md CHANGED
@@ -12,6 +12,9 @@
12
12
  | **assigned_resource_id** | **String** | ID of the resource assigned to the IP Block. | [optional] |
13
13
  | **assigned_resource_type** | **String** | Type of the resource assigned to the IP Block. | [optional] |
14
14
  | **description** | **String** | The description of the IP Block. | [optional] |
15
+ | **tags** | [**Array&lt;TagAssignment&gt;**](TagAssignment.md) | The tags assigned if any. | [optional] |
16
+ | **is_bring_your_own** | **Boolean** | True if the IP block is a &#x60;bring your own&#x60; block. | |
17
+ | **created_on** | **Time** | Date and time when the IP block was created. | |
15
18
 
16
19
  ## Example
17
20
 
@@ -26,7 +29,10 @@ instance = IpApi::IpBlock.new(
26
29
  status: unassigned,
27
30
  assigned_resource_id: 6047127fed34ecc3ba8402d2,
28
31
  assigned_resource_type: server,
29
- description: IP Block #1 used for publicly accessing server #1.
32
+ description: IP Block #1 used for publicly accessing server #1.,
33
+ tags: [{&quot;name&quot;:&quot;stage&quot;,&quot;value&quot;:&quot;beta&quot;},{&quot;name&quot;:&quot;group&quot;,&quot;value&quot;:&quot;discounted&quot;}],
34
+ is_bring_your_own: false,
35
+ created_on: 2021-03-13T20:24:32.491Z
30
36
  )
31
37
  ```
32
38
 
@@ -7,6 +7,7 @@
7
7
  | **location** | **String** | IP Block location ID. Currently this field should be set to &#x60;PHX&#x60;, &#x60;ASH&#x60;, &#x60;SGP&#x60;, &#x60;NLD&#x60;, &#x60;CHI&#x60;, &#x60;SEA&#x60; or &#x60;AUS&#x60;. | |
8
8
  | **cidr_block_size** | **String** | CIDR IP Block Size. Currently this field should be set to either &#x60;/31&#x60;, &#x60;/30&#x60;, &#x60;/29&#x60; or &#x60;/28&#x60;. For a larger Block Size contact support. | |
9
9
  | **description** | **String** | The description of the IP Block. | [optional] |
10
+ | **tags** | [**Array&lt;TagAssignmentRequest&gt;**](TagAssignmentRequest.md) | Tags to set to the ip-block. To create a new tag or list all the existing tags that you can use, refer to [Tags API](https://developers.phoenixnap.com/docs/tags/1/overview). | [optional] |
10
11
 
11
12
  ## Example
12
13
 
@@ -16,7 +17,8 @@ require 'pnap_ip_api'
16
17
  instance = IpApi::IpBlockCreate.new(
17
18
  location: PHX,
18
19
  cidr_block_size: /30,
19
- description: IP Block #1 used for publicly accessing server #1.
20
+ description: IP Block #1 used for publicly accessing server #1.,
21
+ tags: [{&quot;name&quot;:&quot;stage&quot;,&quot;value&quot;:&quot;beta&quot;},{&quot;name&quot;:&quot;group&quot;,&quot;value&quot;:&quot;discounted&quot;}]
20
22
  )
21
23
  ```
22
24
 
@@ -0,0 +1,26 @@
1
+ # IpApi::TagAssignment
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | The unique id of the tag. | |
8
+ | **name** | **String** | The name of the tag. | |
9
+ | **value** | **String** | The value of the tag assigned to the resource. | [optional] |
10
+ | **is_billing_tag** | **Boolean** | Whether or not to show the tag as part of billing and invoices | |
11
+ | **created_by** | **String** | Who the tag was created by. | [optional] |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'pnap_ip_api'
17
+
18
+ instance = IpApi::TagAssignment.new(
19
+ id: 60ffafcdffb8b074c7968dad,
20
+ name: Environment,
21
+ value: PROD,
22
+ is_billing_tag: true,
23
+ created_by: null
24
+ )
25
+ ```
26
+
@@ -0,0 +1,20 @@
1
+ # IpApi::TagAssignmentRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **name** | **String** | The name of the tag. Tag names are case-sensitive, and should be composed of a maximum of 100 characters including UTF-8 Unicode letters, numbers, and the following symbols: &#39;-&#39;, &#39;_&#39;. Regex: [A-zÀ-ú0-9_-]{1,100}. | |
8
+ | **value** | **String** | The value of the tag assigned to the resource. Tag values are case-sensitive, and should be composed of a maximum of 100 characters including UTF-8 Unicode letters, numbers, and the following symbols: &#39;-&#39;, &#39;_&#39;. Regex: [A-zÀ-ú0-9_-]{1,100}. | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'pnap_ip_api'
14
+
15
+ instance = IpApi::TagAssignmentRequest.new(
16
+ name: Environment,
17
+ value: PROD
18
+ )
19
+ ```
20
+
@@ -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: 5.4.0
9
+ OpenAPI Generator version: 6.1.0
10
10
 
11
11
  =end
12
12
 
@@ -22,6 +22,7 @@ module IpApi
22
22
  # List IP Blocks.
23
23
  # List all IP Blocks.
24
24
  # @param [Hash] opts the optional parameters
25
+ # @option opts [Array<String>] :tag List of tags, in the form tagName.tagValue, to filter by.
25
26
  # @return [Array<IpBlock>]
26
27
  def ip_blocks_get(opts = {})
27
28
  data, _status_code, _headers = ip_blocks_get_with_http_info(opts)
@@ -31,6 +32,7 @@ module IpApi
31
32
  # List IP Blocks.
32
33
  # List all IP Blocks.
33
34
  # @param [Hash] opts the optional parameters
35
+ # @option opts [Array<String>] :tag List of tags, in the form tagName.tagValue, to filter by.
34
36
  # @return [Array<(Array<IpBlock>, Integer, Hash)>] Array<IpBlock> data, response status code and response headers
35
37
  def ip_blocks_get_with_http_info(opts = {})
36
38
  if @api_client.config.debugging
@@ -41,6 +43,7 @@ module IpApi
41
43
 
42
44
  # query parameters
43
45
  query_params = opts[:query_params] || {}
46
+ query_params[:'tag'] = @api_client.build_collection_param(opts[:'tag'], :multi) if !opts[:'tag'].nil?
44
47
 
45
48
  # header parameters
46
49
  header_params = opts[:header_params] || {}
@@ -272,6 +275,76 @@ module IpApi
272
275
  return data, status_code, headers
273
276
  end
274
277
 
278
+ # Overwrite tags assigned for IP Block.
279
+ # Overwrites tags assigned for IP Block and unassigns any tags not part of the request.
280
+ # @param ip_block_id [String] The IP Block identifier.
281
+ # @param [Hash] opts the optional parameters
282
+ # @option opts [Array<TagAssignmentRequest>] :tag_assignment_request
283
+ # @return [IpBlock]
284
+ def ip_blocks_ip_block_id_tags_put(ip_block_id, opts = {})
285
+ data, _status_code, _headers = ip_blocks_ip_block_id_tags_put_with_http_info(ip_block_id, opts)
286
+ data
287
+ end
288
+
289
+ # Overwrite tags assigned for IP Block.
290
+ # Overwrites tags assigned for IP Block and unassigns any tags not part of the request.
291
+ # @param ip_block_id [String] The IP Block identifier.
292
+ # @param [Hash] opts the optional parameters
293
+ # @option opts [Array<TagAssignmentRequest>] :tag_assignment_request
294
+ # @return [Array<(IpBlock, Integer, Hash)>] IpBlock data, response status code and response headers
295
+ def ip_blocks_ip_block_id_tags_put_with_http_info(ip_block_id, opts = {})
296
+ if @api_client.config.debugging
297
+ @api_client.config.logger.debug 'Calling API: IPBlocksApi.ip_blocks_ip_block_id_tags_put ...'
298
+ end
299
+ # verify the required parameter 'ip_block_id' is set
300
+ if @api_client.config.client_side_validation && ip_block_id.nil?
301
+ fail ArgumentError, "Missing the required parameter 'ip_block_id' when calling IPBlocksApi.ip_blocks_ip_block_id_tags_put"
302
+ end
303
+ # resource path
304
+ local_var_path = '/ip-blocks/{ipBlockId}/tags'.sub('{' + 'ipBlockId' + '}', CGI.escape(ip_block_id.to_s))
305
+
306
+ # query parameters
307
+ query_params = opts[:query_params] || {}
308
+
309
+ # header parameters
310
+ header_params = opts[:header_params] || {}
311
+ # HTTP header 'Accept' (if needed)
312
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
313
+ # HTTP header 'Content-Type'
314
+ content_type = @api_client.select_header_content_type(['application/json'])
315
+ if !content_type.nil?
316
+ header_params['Content-Type'] = content_type
317
+ end
318
+
319
+ # form parameters
320
+ form_params = opts[:form_params] || {}
321
+
322
+ # http body (model)
323
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'tag_assignment_request'])
324
+
325
+ # return_type
326
+ return_type = opts[:debug_return_type] || 'IpBlock'
327
+
328
+ # auth_names
329
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
330
+
331
+ new_options = opts.merge(
332
+ :operation => :"IPBlocksApi.ip_blocks_ip_block_id_tags_put",
333
+ :header_params => header_params,
334
+ :query_params => query_params,
335
+ :form_params => form_params,
336
+ :body => post_body,
337
+ :auth_names => auth_names,
338
+ :return_type => return_type
339
+ )
340
+
341
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
342
+ if @api_client.config.debugging
343
+ @api_client.config.logger.debug "API called: IPBlocksApi#ip_blocks_ip_block_id_tags_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
344
+ end
345
+ return data, status_code, headers
346
+ end
347
+
275
348
  # Create an IP Block.
276
349
  # Request an IP Block. An IP Block is a set of contiguous IPs that can be assigned to other resources such as servers.
277
350
  # @param [Hash] opts the optional parameters
@@ -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: 5.4.0
9
+ OpenAPI Generator version: 6.1.0
10
10
 
11
11
  =end
12
12
 
@@ -95,6 +95,7 @@ module IpApi
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 IpApi
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: 5.4.0
9
+ OpenAPI Generator version: 6.1.0
10
10
 
11
11
  =end
12
12
 
@@ -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: 5.4.0
9
+ OpenAPI Generator version: 6.1.0
10
10
 
11
11
  =end
12
12
 
@@ -133,6 +133,7 @@ module IpApi
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 IpApi
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: 5.4.0
9
+ OpenAPI Generator version: 6.1.0
10
10
 
11
11
  =end
12
12
 
@@ -129,6 +129,7 @@ module IpApi
129
129
  # @return [Object] Returns the model itself
130
130
  def build_from_hash(attributes)
131
131
  return nil unless attributes.is_a?(Hash)
132
+ attributes = attributes.transform_keys(&:to_sym)
132
133
  self.class.openapi_types.each_pair do |key, type|
133
134
  if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
134
135
  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: 5.4.0
9
+ OpenAPI Generator version: 6.1.0
10
10
 
11
11
  =end
12
12
 
@@ -125,6 +125,7 @@ module IpApi
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: 5.4.0
9
+ OpenAPI Generator version: 6.1.0
10
10
 
11
11
  =end
12
12
 
@@ -40,6 +40,15 @@ module IpApi
40
40
  # The description of the IP Block.
41
41
  attr_accessor :description
42
42
 
43
+ # The tags assigned if any.
44
+ attr_accessor :tags
45
+
46
+ # True if the IP block is a `bring your own` block.
47
+ attr_accessor :is_bring_your_own
48
+
49
+ # Date and time when the IP block was created.
50
+ attr_accessor :created_on
51
+
43
52
  # Attribute mapping from ruby-style variable name to JSON key.
44
53
  def self.attribute_map
45
54
  {
@@ -50,7 +59,10 @@ module IpApi
50
59
  :'status' => :'status',
51
60
  :'assigned_resource_id' => :'assignedResourceId',
52
61
  :'assigned_resource_type' => :'assignedResourceType',
53
- :'description' => :'description'
62
+ :'description' => :'description',
63
+ :'tags' => :'tags',
64
+ :'is_bring_your_own' => :'isBringYourOwn',
65
+ :'created_on' => :'createdOn'
54
66
  }
55
67
  end
56
68
 
@@ -69,7 +81,10 @@ module IpApi
69
81
  :'status' => :'String',
70
82
  :'assigned_resource_id' => :'String',
71
83
  :'assigned_resource_type' => :'String',
72
- :'description' => :'String'
84
+ :'description' => :'String',
85
+ :'tags' => :'Array<TagAssignment>',
86
+ :'is_bring_your_own' => :'Boolean',
87
+ :'created_on' => :'Time'
73
88
  }
74
89
  end
75
90
 
@@ -125,6 +140,20 @@ module IpApi
125
140
  if attributes.key?(:'description')
126
141
  self.description = attributes[:'description']
127
142
  end
143
+
144
+ if attributes.key?(:'tags')
145
+ if (value = attributes[:'tags']).is_a?(Array)
146
+ self.tags = value
147
+ end
148
+ end
149
+
150
+ if attributes.key?(:'is_bring_your_own')
151
+ self.is_bring_your_own = attributes[:'is_bring_your_own']
152
+ end
153
+
154
+ if attributes.key?(:'created_on')
155
+ self.created_on = attributes[:'created_on']
156
+ end
128
157
  end
129
158
 
130
159
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -155,6 +184,14 @@ module IpApi
155
184
  invalid_properties.push('invalid value for "description", the character length must be smaller than or equal to 250.')
156
185
  end
157
186
 
187
+ if @is_bring_your_own.nil?
188
+ invalid_properties.push('invalid value for "is_bring_your_own", is_bring_your_own cannot be nil.')
189
+ end
190
+
191
+ if @created_on.nil?
192
+ invalid_properties.push('invalid value for "created_on", created_on cannot be nil.')
193
+ end
194
+
158
195
  invalid_properties
159
196
  end
160
197
 
@@ -167,6 +204,8 @@ module IpApi
167
204
  return false if @cidr.nil?
168
205
  return false if @status.nil?
169
206
  return false if !@description.nil? && @description.to_s.length > 250
207
+ return false if @is_bring_your_own.nil?
208
+ return false if @created_on.nil?
170
209
  true
171
210
  end
172
211
 
@@ -192,7 +231,10 @@ module IpApi
192
231
  status == o.status &&
193
232
  assigned_resource_id == o.assigned_resource_id &&
194
233
  assigned_resource_type == o.assigned_resource_type &&
195
- description == o.description
234
+ description == o.description &&
235
+ tags == o.tags &&
236
+ is_bring_your_own == o.is_bring_your_own &&
237
+ created_on == o.created_on
196
238
  end
197
239
 
198
240
  # @see the `==` method
@@ -204,7 +246,7 @@ module IpApi
204
246
  # Calculates hash code according to all attributes.
205
247
  # @return [Integer] Hash code
206
248
  def hash
207
- [id, location, cidr_block_size, cidr, status, assigned_resource_id, assigned_resource_type, description].hash
249
+ [id, location, cidr_block_size, cidr, status, assigned_resource_id, assigned_resource_type, description, tags, is_bring_your_own, created_on].hash
208
250
  end
209
251
 
210
252
  # Builds the object from hash
@@ -219,6 +261,7 @@ module IpApi
219
261
  # @return [Object] Returns the model itself
220
262
  def build_from_hash(attributes)
221
263
  return nil unless attributes.is_a?(Hash)
264
+ attributes = attributes.transform_keys(&:to_sym)
222
265
  self.class.openapi_types.each_pair do |key, type|
223
266
  if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
224
267
  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: 5.4.0
9
+ OpenAPI Generator version: 6.1.0
10
10
 
11
11
  =end
12
12
 
@@ -25,12 +25,16 @@ module IpApi
25
25
  # The description of the IP Block.
26
26
  attr_accessor :description
27
27
 
28
+ # Tags to set to the ip-block. To create a new tag or list all the existing tags that you can use, refer to [Tags API](https://developers.phoenixnap.com/docs/tags/1/overview).
29
+ attr_accessor :tags
30
+
28
31
  # Attribute mapping from ruby-style variable name to JSON key.
29
32
  def self.attribute_map
30
33
  {
31
34
  :'location' => :'location',
32
35
  :'cidr_block_size' => :'cidrBlockSize',
33
- :'description' => :'description'
36
+ :'description' => :'description',
37
+ :'tags' => :'tags'
34
38
  }
35
39
  end
36
40
 
@@ -44,7 +48,8 @@ module IpApi
44
48
  {
45
49
  :'location' => :'String',
46
50
  :'cidr_block_size' => :'String',
47
- :'description' => :'String'
51
+ :'description' => :'String',
52
+ :'tags' => :'Array<TagAssignmentRequest>'
48
53
  }
49
54
  end
50
55
 
@@ -80,6 +85,12 @@ module IpApi
80
85
  if attributes.key?(:'description')
81
86
  self.description = attributes[:'description']
82
87
  end
88
+
89
+ if attributes.key?(:'tags')
90
+ if (value = attributes[:'tags']).is_a?(Array)
91
+ self.tags = value
92
+ end
93
+ end
83
94
  end
84
95
 
85
96
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -127,7 +138,8 @@ module IpApi
127
138
  self.class == o.class &&
128
139
  location == o.location &&
129
140
  cidr_block_size == o.cidr_block_size &&
130
- description == o.description
141
+ description == o.description &&
142
+ tags == o.tags
131
143
  end
132
144
 
133
145
  # @see the `==` method
@@ -139,7 +151,7 @@ module IpApi
139
151
  # Calculates hash code according to all attributes.
140
152
  # @return [Integer] Hash code
141
153
  def hash
142
- [location, cidr_block_size, description].hash
154
+ [location, cidr_block_size, description, tags].hash
143
155
  end
144
156
 
145
157
  # Builds the object from hash
@@ -154,6 +166,7 @@ module IpApi
154
166
  # @return [Object] Returns the model itself
155
167
  def build_from_hash(attributes)
156
168
  return nil unless attributes.is_a?(Hash)
169
+ attributes = attributes.transform_keys(&:to_sym)
157
170
  self.class.openapi_types.each_pair do |key, type|
158
171
  if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
159
172
  self.send("#{key}=", nil)