pulp_npm_client 0.1.0a1.dev01590542888 → 0.1.0a1.dev01591234165
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.
Potentially problematic release.
This version of pulp_npm_client might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.md +10 -6
- data/docs/ContentPackagesApi.md +6 -6
- data/docs/DistributionsNpmApi.md +2 -2
- data/docs/InlineResponse200.md +1 -1
- data/docs/InlineResponse2001.md +1 -1
- data/docs/InlineResponse2002.md +1 -1
- data/docs/InlineResponse2003.md +1 -1
- data/docs/InlineResponse2004.md +1 -1
- data/docs/NpmNpmDistributionRead.md +31 -0
- data/docs/NpmNpmRemote.md +7 -3
- data/docs/NpmNpmRemoteRead.md +43 -0
- data/docs/NpmNpmRepositoryRead.md +27 -0
- data/docs/{NpmPackage.md → NpmPackageRead.md} +2 -2
- data/docs/RemotesNpmApi.md +4 -4
- data/docs/RepositoriesNpmApi.md +9 -9
- data/docs/RepositoriesNpmVersionsApi.md +2 -2
- data/docs/RepositoryVersionRead.md +25 -0
- data/lib/pulp_npm_client.rb +5 -1
- data/lib/pulp_npm_client/api/content_packages_api.rb +8 -8
- data/lib/pulp_npm_client/api/distributions_npm_api.rb +3 -3
- data/lib/pulp_npm_client/api/remotes_npm_api.rb +6 -6
- data/lib/pulp_npm_client/api/repositories_npm_api.rb +15 -15
- data/lib/pulp_npm_client/api/repositories_npm_versions_api.rb +3 -3
- data/lib/pulp_npm_client/models/inline_response200.rb +1 -1
- data/lib/pulp_npm_client/models/inline_response2001.rb +1 -1
- data/lib/pulp_npm_client/models/inline_response2002.rb +1 -1
- data/lib/pulp_npm_client/models/inline_response2003.rb +1 -1
- data/lib/pulp_npm_client/models/inline_response2004.rb +1 -1
- data/lib/pulp_npm_client/models/npm_npm_distribution_read.rb +342 -0
- data/lib/pulp_npm_client/models/npm_npm_remote.rb +56 -4
- data/lib/pulp_npm_client/models/npm_npm_remote_read.rb +531 -0
- data/lib/pulp_npm_client/models/npm_npm_repository_read.rb +294 -0
- data/lib/pulp_npm_client/models/{npm_package.rb → npm_package_read.rb} +3 -3
- data/lib/pulp_npm_client/models/repository_version_read.rb +244 -0
- data/lib/pulp_npm_client/version.rb +1 -1
- data/spec/api/content_packages_api_spec.rb +3 -3
- data/spec/api/distributions_npm_api_spec.rb +1 -1
- data/spec/api/remotes_npm_api_spec.rb +2 -2
- data/spec/api/repositories_npm_api_spec.rb +6 -6
- data/spec/api/repositories_npm_versions_api_spec.rb +1 -1
- data/spec/models/npm_npm_distribution_read_spec.rb +83 -0
- data/spec/models/npm_npm_remote_read_spec.rb +123 -0
- data/spec/models/npm_npm_remote_spec.rb +12 -0
- data/spec/models/npm_npm_repository_read_spec.rb +71 -0
- data/spec/models/{npm_package_spec.rb → npm_package_read_spec.rb} +6 -6
- data/spec/models/repository_version_read_spec.rb +65 -0
- metadata +22 -6
@@ -0,0 +1,25 @@
|
|
1
|
+
# PulpNpmClient::RepositoryVersionRead
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**pulp_href** | **String** | | [optional] [readonly]
|
8
|
+
**pulp_created** | **DateTime** | Timestamp of creation. | [optional] [readonly]
|
9
|
+
**number** | **Integer** | | [optional] [readonly]
|
10
|
+
**base_version** | **String** | A repository version whose content was used as the initial set of content for this repository version | [optional]
|
11
|
+
**content_summary** | [**ContentSummary**](ContentSummary.md) | | [optional]
|
12
|
+
|
13
|
+
## Code Sample
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
require 'PulpNpmClient'
|
17
|
+
|
18
|
+
instance = PulpNpmClient::RepositoryVersionRead.new(pulp_href: null,
|
19
|
+
pulp_created: null,
|
20
|
+
number: null,
|
21
|
+
base_version: null,
|
22
|
+
content_summary: null)
|
23
|
+
```
|
24
|
+
|
25
|
+
|
data/lib/pulp_npm_client.rb
CHANGED
@@ -25,12 +25,16 @@ require 'pulp_npm_client/models/inline_response2002'
|
|
25
25
|
require 'pulp_npm_client/models/inline_response2003'
|
26
26
|
require 'pulp_npm_client/models/inline_response2004'
|
27
27
|
require 'pulp_npm_client/models/npm_npm_distribution'
|
28
|
+
require 'pulp_npm_client/models/npm_npm_distribution_read'
|
28
29
|
require 'pulp_npm_client/models/npm_npm_remote'
|
30
|
+
require 'pulp_npm_client/models/npm_npm_remote_read'
|
29
31
|
require 'pulp_npm_client/models/npm_npm_repository'
|
30
|
-
require 'pulp_npm_client/models/
|
32
|
+
require 'pulp_npm_client/models/npm_npm_repository_read'
|
33
|
+
require 'pulp_npm_client/models/npm_package_read'
|
31
34
|
require 'pulp_npm_client/models/repository_add_remove_content'
|
32
35
|
require 'pulp_npm_client/models/repository_sync_url'
|
33
36
|
require 'pulp_npm_client/models/repository_version'
|
37
|
+
require 'pulp_npm_client/models/repository_version_read'
|
34
38
|
|
35
39
|
# APIs
|
36
40
|
require 'pulp_npm_client/api/content_packages_api'
|
@@ -26,9 +26,9 @@ module PulpNpmClient
|
|
26
26
|
# @param version [String]
|
27
27
|
# @param [Hash] opts the optional parameters
|
28
28
|
# @option opts [String] :artifact Artifact file representing the physical content
|
29
|
-
# @option opts [File] :file An uploaded file that
|
29
|
+
# @option opts [File] :file An uploaded file that may be turned into the artifact of the content unit.
|
30
30
|
# @option opts [String] :repository A URI of a repository the new content unit should be associated with.
|
31
|
-
# @return [
|
31
|
+
# @return [NpmPackageRead]
|
32
32
|
def create(relative_path, name, version, opts = {})
|
33
33
|
data, _status_code, _headers = create_with_http_info(relative_path, name, version, opts)
|
34
34
|
data
|
@@ -41,9 +41,9 @@ module PulpNpmClient
|
|
41
41
|
# @param version [String]
|
42
42
|
# @param [Hash] opts the optional parameters
|
43
43
|
# @option opts [String] :artifact Artifact file representing the physical content
|
44
|
-
# @option opts [File] :file An uploaded file that
|
44
|
+
# @option opts [File] :file An uploaded file that may be turned into the artifact of the content unit.
|
45
45
|
# @option opts [String] :repository A URI of a repository the new content unit should be associated with.
|
46
|
-
# @return [Array<(
|
46
|
+
# @return [Array<(NpmPackageRead, Integer, Hash)>] NpmPackageRead data, response status code and response headers
|
47
47
|
def create_with_http_info(relative_path, name, version, opts = {})
|
48
48
|
if @api_client.config.debugging
|
49
49
|
@api_client.config.logger.debug 'Calling API: ContentPackagesApi.create ...'
|
@@ -98,7 +98,7 @@ module PulpNpmClient
|
|
98
98
|
post_body = opts[:body]
|
99
99
|
|
100
100
|
# return_type
|
101
|
-
return_type = opts[:return_type] || '
|
101
|
+
return_type = opts[:return_type] || 'NpmPackageRead'
|
102
102
|
|
103
103
|
# auth_names
|
104
104
|
auth_names = opts[:auth_names] || ['Basic']
|
@@ -211,7 +211,7 @@ module PulpNpmClient
|
|
211
211
|
# @param [Hash] opts the optional parameters
|
212
212
|
# @option opts [String] :fields A list of fields to include in the response.
|
213
213
|
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
214
|
-
# @return [
|
214
|
+
# @return [NpmPackageRead]
|
215
215
|
def read(package_href, opts = {})
|
216
216
|
data, _status_code, _headers = read_with_http_info(package_href, opts)
|
217
217
|
data
|
@@ -223,7 +223,7 @@ module PulpNpmClient
|
|
223
223
|
# @param [Hash] opts the optional parameters
|
224
224
|
# @option opts [String] :fields A list of fields to include in the response.
|
225
225
|
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
226
|
-
# @return [Array<(
|
226
|
+
# @return [Array<(NpmPackageRead, Integer, Hash)>] NpmPackageRead data, response status code and response headers
|
227
227
|
def read_with_http_info(package_href, opts = {})
|
228
228
|
if @api_client.config.debugging
|
229
229
|
@api_client.config.logger.debug 'Calling API: ContentPackagesApi.read ...'
|
@@ -252,7 +252,7 @@ module PulpNpmClient
|
|
252
252
|
post_body = opts[:body]
|
253
253
|
|
254
254
|
# return_type
|
255
|
-
return_type = opts[:return_type] || '
|
255
|
+
return_type = opts[:return_type] || 'NpmPackageRead'
|
256
256
|
|
257
257
|
# auth_names
|
258
258
|
auth_names = opts[:auth_names] || ['Basic']
|
@@ -310,7 +310,7 @@ module PulpNpmClient
|
|
310
310
|
# @param [Hash] opts the optional parameters
|
311
311
|
# @option opts [String] :fields A list of fields to include in the response.
|
312
312
|
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
313
|
-
# @return [
|
313
|
+
# @return [NpmNpmDistributionRead]
|
314
314
|
def read(npm_distribution_href, opts = {})
|
315
315
|
data, _status_code, _headers = read_with_http_info(npm_distribution_href, opts)
|
316
316
|
data
|
@@ -322,7 +322,7 @@ module PulpNpmClient
|
|
322
322
|
# @param [Hash] opts the optional parameters
|
323
323
|
# @option opts [String] :fields A list of fields to include in the response.
|
324
324
|
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
325
|
-
# @return [Array<(
|
325
|
+
# @return [Array<(NpmNpmDistributionRead, Integer, Hash)>] NpmNpmDistributionRead data, response status code and response headers
|
326
326
|
def read_with_http_info(npm_distribution_href, opts = {})
|
327
327
|
if @api_client.config.debugging
|
328
328
|
@api_client.config.logger.debug 'Calling API: DistributionsNpmApi.read ...'
|
@@ -351,7 +351,7 @@ module PulpNpmClient
|
|
351
351
|
post_body = opts[:body]
|
352
352
|
|
353
353
|
# return_type
|
354
|
-
return_type = opts[:return_type] || '
|
354
|
+
return_type = opts[:return_type] || 'NpmNpmDistributionRead'
|
355
355
|
|
356
356
|
# auth_names
|
357
357
|
auth_names = opts[:auth_names] || ['Basic']
|
@@ -23,7 +23,7 @@ module PulpNpmClient
|
|
23
23
|
# Similar to the PackageViewSet above, define endpoint_name, queryset and serializer, at a minimum.
|
24
24
|
# @param data [NpmNpmRemote]
|
25
25
|
# @param [Hash] opts the optional parameters
|
26
|
-
# @return [
|
26
|
+
# @return [NpmNpmRemoteRead]
|
27
27
|
def create(data, opts = {})
|
28
28
|
data, _status_code, _headers = create_with_http_info(data, opts)
|
29
29
|
data
|
@@ -33,7 +33,7 @@ module PulpNpmClient
|
|
33
33
|
# Similar to the PackageViewSet above, define endpoint_name, queryset and serializer, at a minimum.
|
34
34
|
# @param data [NpmNpmRemote]
|
35
35
|
# @param [Hash] opts the optional parameters
|
36
|
-
# @return [Array<(
|
36
|
+
# @return [Array<(NpmNpmRemoteRead, Integer, Hash)>] NpmNpmRemoteRead data, response status code and response headers
|
37
37
|
def create_with_http_info(data, opts = {})
|
38
38
|
if @api_client.config.debugging
|
39
39
|
@api_client.config.logger.debug 'Calling API: RemotesNpmApi.create ...'
|
@@ -62,7 +62,7 @@ module PulpNpmClient
|
|
62
62
|
post_body = opts[:body] || @api_client.object_to_http_body(data)
|
63
63
|
|
64
64
|
# return_type
|
65
|
-
return_type = opts[:return_type] || '
|
65
|
+
return_type = opts[:return_type] || 'NpmNpmRemoteRead'
|
66
66
|
|
67
67
|
# auth_names
|
68
68
|
auth_names = opts[:auth_names] || ['Basic']
|
@@ -316,7 +316,7 @@ module PulpNpmClient
|
|
316
316
|
# @param [Hash] opts the optional parameters
|
317
317
|
# @option opts [String] :fields A list of fields to include in the response.
|
318
318
|
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
319
|
-
# @return [
|
319
|
+
# @return [NpmNpmRemoteRead]
|
320
320
|
def read(npm_remote_href, opts = {})
|
321
321
|
data, _status_code, _headers = read_with_http_info(npm_remote_href, opts)
|
322
322
|
data
|
@@ -328,7 +328,7 @@ module PulpNpmClient
|
|
328
328
|
# @param [Hash] opts the optional parameters
|
329
329
|
# @option opts [String] :fields A list of fields to include in the response.
|
330
330
|
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
331
|
-
# @return [Array<(
|
331
|
+
# @return [Array<(NpmNpmRemoteRead, Integer, Hash)>] NpmNpmRemoteRead data, response status code and response headers
|
332
332
|
def read_with_http_info(npm_remote_href, opts = {})
|
333
333
|
if @api_client.config.debugging
|
334
334
|
@api_client.config.logger.debug 'Calling API: RemotesNpmApi.read ...'
|
@@ -357,7 +357,7 @@ module PulpNpmClient
|
|
357
357
|
post_body = opts[:body]
|
358
358
|
|
359
359
|
# return_type
|
360
|
-
return_type = opts[:return_type] || '
|
360
|
+
return_type = opts[:return_type] || 'NpmNpmRemoteRead'
|
361
361
|
|
362
362
|
# auth_names
|
363
363
|
auth_names = opts[:auth_names] || ['Basic']
|
@@ -23,7 +23,7 @@ module PulpNpmClient
|
|
23
23
|
# Similar to the PackageViewSet above, define endpoint_name, queryset and serializer, at a minimum.
|
24
24
|
# @param data [NpmNpmRepository]
|
25
25
|
# @param [Hash] opts the optional parameters
|
26
|
-
# @return [
|
26
|
+
# @return [NpmNpmRepositoryRead]
|
27
27
|
def create(data, opts = {})
|
28
28
|
data, _status_code, _headers = create_with_http_info(data, opts)
|
29
29
|
data
|
@@ -33,7 +33,7 @@ module PulpNpmClient
|
|
33
33
|
# Similar to the PackageViewSet above, define endpoint_name, queryset and serializer, at a minimum.
|
34
34
|
# @param data [NpmNpmRepository]
|
35
35
|
# @param [Hash] opts the optional parameters
|
36
|
-
# @return [Array<(
|
36
|
+
# @return [Array<(NpmNpmRepositoryRead, Integer, Hash)>] NpmNpmRepositoryRead data, response status code and response headers
|
37
37
|
def create_with_http_info(data, opts = {})
|
38
38
|
if @api_client.config.debugging
|
39
39
|
@api_client.config.logger.debug 'Calling API: RepositoriesNpmApi.create ...'
|
@@ -62,7 +62,7 @@ module PulpNpmClient
|
|
62
62
|
post_body = opts[:body] || @api_client.object_to_http_body(data)
|
63
63
|
|
64
64
|
# return_type
|
65
|
-
return_type = opts[:return_type] || '
|
65
|
+
return_type = opts[:return_type] || 'NpmNpmRepositoryRead'
|
66
66
|
|
67
67
|
# auth_names
|
68
68
|
auth_names = opts[:auth_names] || ['Basic']
|
@@ -84,7 +84,7 @@ module PulpNpmClient
|
|
84
84
|
end
|
85
85
|
|
86
86
|
# Delete a npm repository
|
87
|
-
# Trigger an asynchronous
|
87
|
+
# Trigger an asynchronous delete task
|
88
88
|
# @param npm_repository_href [String] URI of Npm Repository. e.g.: /pulp/api/v3/repositories/npm/npm/1/
|
89
89
|
# @param [Hash] opts the optional parameters
|
90
90
|
# @return [AsyncOperationResponse]
|
@@ -94,7 +94,7 @@ module PulpNpmClient
|
|
94
94
|
end
|
95
95
|
|
96
96
|
# Delete a npm repository
|
97
|
-
# Trigger an asynchronous
|
97
|
+
# Trigger an asynchronous delete task
|
98
98
|
# @param npm_repository_href [String] URI of Npm Repository. e.g.: /pulp/api/v3/repositories/npm/npm/1/
|
99
99
|
# @param [Hash] opts the optional parameters
|
100
100
|
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
@@ -293,22 +293,22 @@ module PulpNpmClient
|
|
293
293
|
end
|
294
294
|
|
295
295
|
# Partially update a npm repository
|
296
|
-
#
|
296
|
+
# Trigger an asynchronous partial update task
|
297
297
|
# @param npm_repository_href [String] URI of Npm Repository. e.g.: /pulp/api/v3/repositories/npm/npm/1/
|
298
298
|
# @param data [NpmNpmRepository]
|
299
299
|
# @param [Hash] opts the optional parameters
|
300
|
-
# @return [
|
300
|
+
# @return [AsyncOperationResponse]
|
301
301
|
def partial_update(npm_repository_href, data, opts = {})
|
302
302
|
data, _status_code, _headers = partial_update_with_http_info(npm_repository_href, data, opts)
|
303
303
|
data
|
304
304
|
end
|
305
305
|
|
306
306
|
# Partially update a npm repository
|
307
|
-
#
|
307
|
+
# Trigger an asynchronous partial update task
|
308
308
|
# @param npm_repository_href [String] URI of Npm Repository. e.g.: /pulp/api/v3/repositories/npm/npm/1/
|
309
309
|
# @param data [NpmNpmRepository]
|
310
310
|
# @param [Hash] opts the optional parameters
|
311
|
-
# @return [Array<(
|
311
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
312
312
|
def partial_update_with_http_info(npm_repository_href, data, opts = {})
|
313
313
|
if @api_client.config.debugging
|
314
314
|
@api_client.config.logger.debug 'Calling API: RepositoriesNpmApi.partial_update ...'
|
@@ -341,7 +341,7 @@ module PulpNpmClient
|
|
341
341
|
post_body = opts[:body] || @api_client.object_to_http_body(data)
|
342
342
|
|
343
343
|
# return_type
|
344
|
-
return_type = opts[:return_type] || '
|
344
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
345
345
|
|
346
346
|
# auth_names
|
347
347
|
auth_names = opts[:auth_names] || ['Basic']
|
@@ -368,7 +368,7 @@ module PulpNpmClient
|
|
368
368
|
# @param [Hash] opts the optional parameters
|
369
369
|
# @option opts [String] :fields A list of fields to include in the response.
|
370
370
|
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
371
|
-
# @return [
|
371
|
+
# @return [NpmNpmRepositoryRead]
|
372
372
|
def read(npm_repository_href, opts = {})
|
373
373
|
data, _status_code, _headers = read_with_http_info(npm_repository_href, opts)
|
374
374
|
data
|
@@ -380,7 +380,7 @@ module PulpNpmClient
|
|
380
380
|
# @param [Hash] opts the optional parameters
|
381
381
|
# @option opts [String] :fields A list of fields to include in the response.
|
382
382
|
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
383
|
-
# @return [Array<(
|
383
|
+
# @return [Array<(NpmNpmRepositoryRead, Integer, Hash)>] NpmNpmRepositoryRead data, response status code and response headers
|
384
384
|
def read_with_http_info(npm_repository_href, opts = {})
|
385
385
|
if @api_client.config.debugging
|
386
386
|
@api_client.config.logger.debug 'Calling API: RepositoriesNpmApi.read ...'
|
@@ -409,7 +409,7 @@ module PulpNpmClient
|
|
409
409
|
post_body = opts[:body]
|
410
410
|
|
411
411
|
# return_type
|
412
|
-
return_type = opts[:return_type] || '
|
412
|
+
return_type = opts[:return_type] || 'NpmNpmRepositoryRead'
|
413
413
|
|
414
414
|
# auth_names
|
415
415
|
auth_names = opts[:auth_names] || ['Basic']
|
@@ -501,7 +501,7 @@ module PulpNpmClient
|
|
501
501
|
end
|
502
502
|
|
503
503
|
# Update a npm repository
|
504
|
-
# Trigger an asynchronous
|
504
|
+
# Trigger an asynchronous update task
|
505
505
|
# @param npm_repository_href [String] URI of Npm Repository. e.g.: /pulp/api/v3/repositories/npm/npm/1/
|
506
506
|
# @param data [NpmNpmRepository]
|
507
507
|
# @param [Hash] opts the optional parameters
|
@@ -512,7 +512,7 @@ module PulpNpmClient
|
|
512
512
|
end
|
513
513
|
|
514
514
|
# Update a npm repository
|
515
|
-
# Trigger an asynchronous
|
515
|
+
# Trigger an asynchronous update task
|
516
516
|
# @param npm_repository_href [String] URI of Npm Repository. e.g.: /pulp/api/v3/repositories/npm/npm/1/
|
517
517
|
# @param data [NpmNpmRepository]
|
518
518
|
# @param [Hash] opts the optional parameters
|
@@ -203,7 +203,7 @@ module PulpNpmClient
|
|
203
203
|
# @param [Hash] opts the optional parameters
|
204
204
|
# @option opts [String] :fields A list of fields to include in the response.
|
205
205
|
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
206
|
-
# @return [
|
206
|
+
# @return [RepositoryVersionRead]
|
207
207
|
def read(npm_repository_version_href, opts = {})
|
208
208
|
data, _status_code, _headers = read_with_http_info(npm_repository_version_href, opts)
|
209
209
|
data
|
@@ -215,7 +215,7 @@ module PulpNpmClient
|
|
215
215
|
# @param [Hash] opts the optional parameters
|
216
216
|
# @option opts [String] :fields A list of fields to include in the response.
|
217
217
|
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
218
|
-
# @return [Array<(
|
218
|
+
# @return [Array<(RepositoryVersionRead, Integer, Hash)>] RepositoryVersionRead data, response status code and response headers
|
219
219
|
def read_with_http_info(npm_repository_version_href, opts = {})
|
220
220
|
if @api_client.config.debugging
|
221
221
|
@api_client.config.logger.debug 'Calling API: RepositoriesNpmVersionsApi.read ...'
|
@@ -244,7 +244,7 @@ module PulpNpmClient
|
|
244
244
|
post_body = opts[:body]
|
245
245
|
|
246
246
|
# return_type
|
247
|
-
return_type = opts[:return_type] || '
|
247
|
+
return_type = opts[:return_type] || 'RepositoryVersionRead'
|
248
248
|
|
249
249
|
# auth_names
|
250
250
|
auth_names = opts[:auth_names] || ['Basic']
|
@@ -0,0 +1,342 @@
|
|
1
|
+
=begin
|
2
|
+
#Pulp 3 API
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v3
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.2.3
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module PulpNpmClient
|
16
|
+
class NpmNpmDistributionRead
|
17
|
+
attr_accessor :pulp_href
|
18
|
+
|
19
|
+
# Timestamp of creation.
|
20
|
+
attr_accessor :pulp_created
|
21
|
+
|
22
|
+
# The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\")
|
23
|
+
attr_accessor :base_path
|
24
|
+
|
25
|
+
# The URL for accessing the universe API as defined by this distribution.
|
26
|
+
attr_accessor :base_url
|
27
|
+
|
28
|
+
# An optional content-guard.
|
29
|
+
attr_accessor :content_guard
|
30
|
+
|
31
|
+
# A unique name. Ex, `rawhide` and `stable`.
|
32
|
+
attr_accessor :name
|
33
|
+
|
34
|
+
# The latest RepositoryVersion for this Repository will be served.
|
35
|
+
attr_accessor :repository
|
36
|
+
|
37
|
+
# RepositoryVersion to be served
|
38
|
+
attr_accessor :repository_version
|
39
|
+
|
40
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
41
|
+
def self.attribute_map
|
42
|
+
{
|
43
|
+
:'pulp_href' => :'pulp_href',
|
44
|
+
:'pulp_created' => :'pulp_created',
|
45
|
+
:'base_path' => :'base_path',
|
46
|
+
:'base_url' => :'base_url',
|
47
|
+
:'content_guard' => :'content_guard',
|
48
|
+
:'name' => :'name',
|
49
|
+
:'repository' => :'repository',
|
50
|
+
:'repository_version' => :'repository_version'
|
51
|
+
}
|
52
|
+
end
|
53
|
+
|
54
|
+
# Attribute type mapping.
|
55
|
+
def self.openapi_types
|
56
|
+
{
|
57
|
+
:'pulp_href' => :'String',
|
58
|
+
:'pulp_created' => :'DateTime',
|
59
|
+
:'base_path' => :'String',
|
60
|
+
:'base_url' => :'String',
|
61
|
+
:'content_guard' => :'String',
|
62
|
+
:'name' => :'String',
|
63
|
+
:'repository' => :'String',
|
64
|
+
:'repository_version' => :'String'
|
65
|
+
}
|
66
|
+
end
|
67
|
+
|
68
|
+
# List of attributes with nullable: true
|
69
|
+
def self.openapi_nullable
|
70
|
+
Set.new([
|
71
|
+
:'content_guard',
|
72
|
+
:'repository',
|
73
|
+
:'repository_version'
|
74
|
+
])
|
75
|
+
end
|
76
|
+
|
77
|
+
# Initializes the object
|
78
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
79
|
+
def initialize(attributes = {})
|
80
|
+
if (!attributes.is_a?(Hash))
|
81
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpNpmClient::NpmNpmDistributionRead` initialize method"
|
82
|
+
end
|
83
|
+
|
84
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
85
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
86
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
87
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpNpmClient::NpmNpmDistributionRead`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
88
|
+
end
|
89
|
+
h[k.to_sym] = v
|
90
|
+
}
|
91
|
+
|
92
|
+
if attributes.key?(:'pulp_href')
|
93
|
+
self.pulp_href = attributes[:'pulp_href']
|
94
|
+
end
|
95
|
+
|
96
|
+
if attributes.key?(:'pulp_created')
|
97
|
+
self.pulp_created = attributes[:'pulp_created']
|
98
|
+
end
|
99
|
+
|
100
|
+
if attributes.key?(:'base_path')
|
101
|
+
self.base_path = attributes[:'base_path']
|
102
|
+
end
|
103
|
+
|
104
|
+
if attributes.key?(:'base_url')
|
105
|
+
self.base_url = attributes[:'base_url']
|
106
|
+
end
|
107
|
+
|
108
|
+
if attributes.key?(:'content_guard')
|
109
|
+
self.content_guard = attributes[:'content_guard']
|
110
|
+
end
|
111
|
+
|
112
|
+
if attributes.key?(:'name')
|
113
|
+
self.name = attributes[:'name']
|
114
|
+
end
|
115
|
+
|
116
|
+
if attributes.key?(:'repository')
|
117
|
+
self.repository = attributes[:'repository']
|
118
|
+
end
|
119
|
+
|
120
|
+
if attributes.key?(:'repository_version')
|
121
|
+
self.repository_version = attributes[:'repository_version']
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
126
|
+
# @return Array for valid properties with the reasons
|
127
|
+
def list_invalid_properties
|
128
|
+
invalid_properties = Array.new
|
129
|
+
if @base_path.nil?
|
130
|
+
invalid_properties.push('invalid value for "base_path", base_path cannot be nil.')
|
131
|
+
end
|
132
|
+
|
133
|
+
if @base_path.to_s.length < 1
|
134
|
+
invalid_properties.push('invalid value for "base_path", the character length must be great than or equal to 1.')
|
135
|
+
end
|
136
|
+
|
137
|
+
if !@base_url.nil? && @base_url.to_s.length < 1
|
138
|
+
invalid_properties.push('invalid value for "base_url", the character length must be great than or equal to 1.')
|
139
|
+
end
|
140
|
+
|
141
|
+
if @name.nil?
|
142
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
143
|
+
end
|
144
|
+
|
145
|
+
if @name.to_s.length < 1
|
146
|
+
invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
|
147
|
+
end
|
148
|
+
|
149
|
+
invalid_properties
|
150
|
+
end
|
151
|
+
|
152
|
+
# Check to see if the all the properties in the model are valid
|
153
|
+
# @return true if the model is valid
|
154
|
+
def valid?
|
155
|
+
return false if @base_path.nil?
|
156
|
+
return false if @base_path.to_s.length < 1
|
157
|
+
return false if !@base_url.nil? && @base_url.to_s.length < 1
|
158
|
+
return false if @name.nil?
|
159
|
+
return false if @name.to_s.length < 1
|
160
|
+
true
|
161
|
+
end
|
162
|
+
|
163
|
+
# Custom attribute writer method with validation
|
164
|
+
# @param [Object] base_path Value to be assigned
|
165
|
+
def base_path=(base_path)
|
166
|
+
if base_path.nil?
|
167
|
+
fail ArgumentError, 'base_path cannot be nil'
|
168
|
+
end
|
169
|
+
|
170
|
+
if base_path.to_s.length < 1
|
171
|
+
fail ArgumentError, 'invalid value for "base_path", the character length must be great than or equal to 1.'
|
172
|
+
end
|
173
|
+
|
174
|
+
@base_path = base_path
|
175
|
+
end
|
176
|
+
|
177
|
+
# Custom attribute writer method with validation
|
178
|
+
# @param [Object] base_url Value to be assigned
|
179
|
+
def base_url=(base_url)
|
180
|
+
if !base_url.nil? && base_url.to_s.length < 1
|
181
|
+
fail ArgumentError, 'invalid value for "base_url", the character length must be great than or equal to 1.'
|
182
|
+
end
|
183
|
+
|
184
|
+
@base_url = base_url
|
185
|
+
end
|
186
|
+
|
187
|
+
# Custom attribute writer method with validation
|
188
|
+
# @param [Object] name Value to be assigned
|
189
|
+
def name=(name)
|
190
|
+
if name.nil?
|
191
|
+
fail ArgumentError, 'name cannot be nil'
|
192
|
+
end
|
193
|
+
|
194
|
+
if name.to_s.length < 1
|
195
|
+
fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
|
196
|
+
end
|
197
|
+
|
198
|
+
@name = name
|
199
|
+
end
|
200
|
+
|
201
|
+
# Checks equality by comparing each attribute.
|
202
|
+
# @param [Object] Object to be compared
|
203
|
+
def ==(o)
|
204
|
+
return true if self.equal?(o)
|
205
|
+
self.class == o.class &&
|
206
|
+
pulp_href == o.pulp_href &&
|
207
|
+
pulp_created == o.pulp_created &&
|
208
|
+
base_path == o.base_path &&
|
209
|
+
base_url == o.base_url &&
|
210
|
+
content_guard == o.content_guard &&
|
211
|
+
name == o.name &&
|
212
|
+
repository == o.repository &&
|
213
|
+
repository_version == o.repository_version
|
214
|
+
end
|
215
|
+
|
216
|
+
# @see the `==` method
|
217
|
+
# @param [Object] Object to be compared
|
218
|
+
def eql?(o)
|
219
|
+
self == o
|
220
|
+
end
|
221
|
+
|
222
|
+
# Calculates hash code according to all attributes.
|
223
|
+
# @return [Integer] Hash code
|
224
|
+
def hash
|
225
|
+
[pulp_href, pulp_created, base_path, base_url, content_guard, name, repository, repository_version].hash
|
226
|
+
end
|
227
|
+
|
228
|
+
# Builds the object from hash
|
229
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
230
|
+
# @return [Object] Returns the model itself
|
231
|
+
def self.build_from_hash(attributes)
|
232
|
+
new.build_from_hash(attributes)
|
233
|
+
end
|
234
|
+
|
235
|
+
# Builds the object from hash
|
236
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
237
|
+
# @return [Object] Returns the model itself
|
238
|
+
def build_from_hash(attributes)
|
239
|
+
return nil unless attributes.is_a?(Hash)
|
240
|
+
self.class.openapi_types.each_pair do |key, type|
|
241
|
+
if type =~ /\AArray<(.*)>/i
|
242
|
+
# check to ensure the input is an array given that the attribute
|
243
|
+
# is documented as an array but the input is not
|
244
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
245
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
246
|
+
end
|
247
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
248
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
249
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
250
|
+
end
|
251
|
+
|
252
|
+
self
|
253
|
+
end
|
254
|
+
|
255
|
+
# Deserializes the data based on type
|
256
|
+
# @param string type Data type
|
257
|
+
# @param string value Value to be deserialized
|
258
|
+
# @return [Object] Deserialized data
|
259
|
+
def _deserialize(type, value)
|
260
|
+
case type.to_sym
|
261
|
+
when :DateTime
|
262
|
+
DateTime.parse(value)
|
263
|
+
when :Date
|
264
|
+
Date.parse(value)
|
265
|
+
when :String
|
266
|
+
value.to_s
|
267
|
+
when :Integer
|
268
|
+
value.to_i
|
269
|
+
when :Float
|
270
|
+
value.to_f
|
271
|
+
when :Boolean
|
272
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
273
|
+
true
|
274
|
+
else
|
275
|
+
false
|
276
|
+
end
|
277
|
+
when :Object
|
278
|
+
# generic object (usually a Hash), return directly
|
279
|
+
value
|
280
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
281
|
+
inner_type = Regexp.last_match[:inner_type]
|
282
|
+
value.map { |v| _deserialize(inner_type, v) }
|
283
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
284
|
+
k_type = Regexp.last_match[:k_type]
|
285
|
+
v_type = Regexp.last_match[:v_type]
|
286
|
+
{}.tap do |hash|
|
287
|
+
value.each do |k, v|
|
288
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
289
|
+
end
|
290
|
+
end
|
291
|
+
else # model
|
292
|
+
PulpNpmClient.const_get(type).build_from_hash(value)
|
293
|
+
end
|
294
|
+
end
|
295
|
+
|
296
|
+
# Returns the string representation of the object
|
297
|
+
# @return [String] String presentation of the object
|
298
|
+
def to_s
|
299
|
+
to_hash.to_s
|
300
|
+
end
|
301
|
+
|
302
|
+
# to_body is an alias to to_hash (backward compatibility)
|
303
|
+
# @return [Hash] Returns the object in the form of hash
|
304
|
+
def to_body
|
305
|
+
to_hash
|
306
|
+
end
|
307
|
+
|
308
|
+
# Returns the object in the form of hash
|
309
|
+
# @return [Hash] Returns the object in the form of hash
|
310
|
+
def to_hash
|
311
|
+
hash = {}
|
312
|
+
self.class.attribute_map.each_pair do |attr, param|
|
313
|
+
value = self.send(attr)
|
314
|
+
if value.nil?
|
315
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
316
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
317
|
+
end
|
318
|
+
|
319
|
+
hash[param] = _to_hash(value)
|
320
|
+
end
|
321
|
+
hash
|
322
|
+
end
|
323
|
+
|
324
|
+
# Outputs non-array value in the form of hash
|
325
|
+
# For object, use to_hash. Otherwise, just return the value
|
326
|
+
# @param [Object] value Any valid value
|
327
|
+
# @return [Hash] Returns the value in the form of hash
|
328
|
+
def _to_hash(value)
|
329
|
+
if value.is_a?(Array)
|
330
|
+
value.compact.map { |v| _to_hash(v) }
|
331
|
+
elsif value.is_a?(Hash)
|
332
|
+
{}.tap do |hash|
|
333
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
334
|
+
end
|
335
|
+
elsif value.respond_to? :to_hash
|
336
|
+
value.to_hash
|
337
|
+
else
|
338
|
+
value
|
339
|
+
end
|
340
|
+
end
|
341
|
+
end
|
342
|
+
end
|