pulp_npm_client 0.1.0a3 → 0.1.0a4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/README.md +8 -8
  4. data/docs/ContentPackagesApi.md +6 -4
  5. data/docs/DistributionsNpmApi.md +3 -3
  6. data/docs/NpmNpmDistribution.md +1 -3
  7. data/docs/NpmNpmDistributionResponse.md +1 -3
  8. data/docs/NpmNpmRemote.md +10 -8
  9. data/docs/NpmNpmRemoteResponse.md +8 -6
  10. data/docs/NpmNpmRepository.md +3 -1
  11. data/docs/NpmNpmRepositoryResponse.md +3 -1
  12. data/docs/NpmPackage.md +2 -0
  13. data/docs/PatchednpmNpmDistribution.md +1 -3
  14. data/docs/PatchednpmNpmRemote.md +10 -8
  15. data/docs/PatchednpmNpmRepository.md +3 -1
  16. data/docs/PulpNpmPackagesApi.md +1 -1
  17. data/docs/RemotesNpmApi.md +3 -3
  18. data/docs/Repair.md +17 -0
  19. data/docs/RepositoriesNpmApi.md +3 -3
  20. data/docs/RepositoriesNpmVersionsApi.md +7 -7
  21. data/docs/RepositoryAddRemoveContent.md +2 -2
  22. data/docs/RepositoryVersionResponse.md +2 -0
  23. data/lib/pulp_npm_client/api/content_packages_api.rb +23 -4
  24. data/lib/pulp_npm_client/api/distributions_npm_api.rb +8 -4
  25. data/lib/pulp_npm_client/api/pulp_npm_packages_api.rb +1 -1
  26. data/lib/pulp_npm_client/api/remotes_npm_api.rb +8 -4
  27. data/lib/pulp_npm_client/api/repositories_npm_api.rb +8 -4
  28. data/lib/pulp_npm_client/api/repositories_npm_versions_api.rb +17 -13
  29. data/lib/pulp_npm_client/api_client.rb +13 -12
  30. data/lib/pulp_npm_client/api_error.rb +1 -1
  31. data/lib/pulp_npm_client/configuration.rb +11 -3
  32. data/lib/pulp_npm_client/models/async_operation_response.rb +1 -1
  33. data/lib/pulp_npm_client/models/content_summary_response.rb +1 -1
  34. data/lib/pulp_npm_client/models/npm_npm_distribution.rb +44 -17
  35. data/lib/pulp_npm_client/models/npm_npm_distribution_response.rb +6 -17
  36. data/lib/pulp_npm_client/models/npm_npm_remote.rb +180 -10
  37. data/lib/pulp_npm_client/models/npm_npm_remote_response.rb +20 -8
  38. data/lib/pulp_npm_client/models/npm_npm_repository.rb +63 -2
  39. data/lib/pulp_npm_client/models/npm_npm_repository_response.rb +29 -2
  40. data/lib/pulp_npm_client/models/npm_package.rb +69 -2
  41. data/lib/pulp_npm_client/models/npm_package_response.rb +1 -1
  42. data/lib/pulp_npm_client/models/paginated_repository_version_response_list.rb +1 -1
  43. data/lib/pulp_npm_client/models/paginatednpm_npm_distribution_response_list.rb +1 -1
  44. data/lib/pulp_npm_client/models/paginatednpm_npm_remote_response_list.rb +1 -1
  45. data/lib/pulp_npm_client/models/paginatednpm_npm_repository_response_list.rb +1 -1
  46. data/lib/pulp_npm_client/models/paginatednpm_package_response_list.rb +1 -1
  47. data/lib/pulp_npm_client/models/patchednpm_npm_distribution.rb +36 -17
  48. data/lib/pulp_npm_client/models/patchednpm_npm_remote.rb +172 -10
  49. data/lib/pulp_npm_client/models/patchednpm_npm_repository.rb +59 -2
  50. data/lib/pulp_npm_client/models/policy_enum.rb +1 -1
  51. data/lib/pulp_npm_client/models/{repository_version.rb → repair.rb} +14 -13
  52. data/lib/pulp_npm_client/models/repository_add_remove_content.rb +3 -3
  53. data/lib/pulp_npm_client/models/repository_sync_url.rb +1 -1
  54. data/lib/pulp_npm_client/models/repository_version_response.rb +11 -2
  55. data/lib/pulp_npm_client/version.rb +2 -2
  56. data/lib/pulp_npm_client.rb +2 -3
  57. data/pulp_npm_client.gemspec +2 -2
  58. data/spec/api/content_packages_api_spec.rb +3 -2
  59. data/spec/api/distributions_npm_api_spec.rb +2 -2
  60. data/spec/api/pulp_npm_packages_api_spec.rb +1 -1
  61. data/spec/api/remotes_npm_api_spec.rb +2 -2
  62. data/spec/api/repositories_npm_api_spec.rb +2 -2
  63. data/spec/api/repositories_npm_versions_api_spec.rb +3 -3
  64. data/spec/api_client_spec.rb +2 -2
  65. data/spec/configuration_spec.rb +4 -4
  66. data/spec/models/async_operation_response_spec.rb +1 -1
  67. data/spec/models/content_summary_response_spec.rb +1 -1
  68. data/spec/models/npm_npm_distribution_response_spec.rb +1 -7
  69. data/spec/models/npm_npm_distribution_spec.rb +1 -7
  70. data/spec/models/npm_npm_remote_response_spec.rb +7 -1
  71. data/spec/models/npm_npm_remote_spec.rb +7 -1
  72. data/spec/models/npm_npm_repository_response_spec.rb +7 -1
  73. data/spec/models/npm_npm_repository_spec.rb +7 -1
  74. data/spec/models/npm_package_response_spec.rb +1 -1
  75. data/spec/models/npm_package_spec.rb +7 -1
  76. data/spec/models/paginated_repository_version_response_list_spec.rb +1 -1
  77. data/spec/models/paginatednpm_npm_distribution_response_list_spec.rb +1 -1
  78. data/spec/models/paginatednpm_npm_remote_response_list_spec.rb +1 -1
  79. data/spec/models/paginatednpm_npm_repository_response_list_spec.rb +1 -1
  80. data/spec/models/paginatednpm_package_response_list_spec.rb +1 -1
  81. data/spec/models/patchednpm_npm_distribution_spec.rb +1 -7
  82. data/spec/models/patchednpm_npm_remote_spec.rb +7 -1
  83. data/spec/models/patchednpm_npm_repository_spec.rb +7 -1
  84. data/spec/models/policy_enum_spec.rb +1 -1
  85. data/spec/models/{repository_version_spec.rb → repair_spec.rb} +8 -8
  86. data/spec/models/repository_add_remove_content_spec.rb +1 -1
  87. data/spec/models/repository_sync_url_spec.rb +1 -1
  88. data/spec/models/repository_version_response_spec.rb +7 -1
  89. data/spec/spec_helper.rb +1 -1
  90. metadata +37 -35
  91. data/docs/ContentSummary.md +0 -21
  92. data/docs/RepositoryVersion.md +0 -17
  93. data/lib/pulp_npm_client/models/content_summary.rb +0 -246
  94. data/spec/models/content_summary_spec.rb +0 -53
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: v3
7
7
  Contact: pulp-list@redhat.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -32,6 +32,10 @@ module PulpNpmClient
32
32
  # An optional description.
33
33
  attr_accessor :description
34
34
 
35
+ # Retain X versions of the repository. Default is null which retains all versions. This is provided as a tech preview in Pulp 3 and may change in the future.
36
+ attr_accessor :retain_repo_versions
37
+
38
+ # An optional remote to use by default when syncing.
35
39
  attr_accessor :remote
36
40
 
37
41
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -44,6 +48,7 @@ module PulpNpmClient
44
48
  :'latest_version_href' => :'latest_version_href',
45
49
  :'name' => :'name',
46
50
  :'description' => :'description',
51
+ :'retain_repo_versions' => :'retain_repo_versions',
47
52
  :'remote' => :'remote'
48
53
  }
49
54
  end
@@ -58,6 +63,7 @@ module PulpNpmClient
58
63
  :'latest_version_href' => :'String',
59
64
  :'name' => :'String',
60
65
  :'description' => :'String',
66
+ :'retain_repo_versions' => :'Integer',
61
67
  :'remote' => :'String'
62
68
  }
63
69
  end
@@ -66,6 +72,7 @@ module PulpNpmClient
66
72
  def self.openapi_nullable
67
73
  Set.new([
68
74
  :'description',
75
+ :'retain_repo_versions',
69
76
  :'remote'
70
77
  ])
71
78
  end
@@ -113,6 +120,10 @@ module PulpNpmClient
113
120
  self.description = attributes[:'description']
114
121
  end
115
122
 
123
+ if attributes.key?(:'retain_repo_versions')
124
+ self.retain_repo_versions = attributes[:'retain_repo_versions']
125
+ end
126
+
116
127
  if attributes.key?(:'remote')
117
128
  self.remote = attributes[:'remote']
118
129
  end
@@ -126,6 +137,10 @@ module PulpNpmClient
126
137
  invalid_properties.push('invalid value for "name", name cannot be nil.')
127
138
  end
128
139
 
140
+ if !@retain_repo_versions.nil? && @retain_repo_versions < 1
141
+ invalid_properties.push('invalid value for "retain_repo_versions", must be greater than or equal to 1.')
142
+ end
143
+
129
144
  invalid_properties
130
145
  end
131
146
 
@@ -133,9 +148,20 @@ module PulpNpmClient
133
148
  # @return true if the model is valid
134
149
  def valid?
135
150
  return false if @name.nil?
151
+ return false if !@retain_repo_versions.nil? && @retain_repo_versions < 1
136
152
  true
137
153
  end
138
154
 
155
+ # Custom attribute writer method with validation
156
+ # @param [Object] retain_repo_versions Value to be assigned
157
+ def retain_repo_versions=(retain_repo_versions)
158
+ if !retain_repo_versions.nil? && retain_repo_versions < 1
159
+ fail ArgumentError, 'invalid value for "retain_repo_versions", must be greater than or equal to 1.'
160
+ end
161
+
162
+ @retain_repo_versions = retain_repo_versions
163
+ end
164
+
139
165
  # Checks equality by comparing each attribute.
140
166
  # @param [Object] Object to be compared
141
167
  def ==(o)
@@ -148,6 +174,7 @@ module PulpNpmClient
148
174
  latest_version_href == o.latest_version_href &&
149
175
  name == o.name &&
150
176
  description == o.description &&
177
+ retain_repo_versions == o.retain_repo_versions &&
151
178
  remote == o.remote
152
179
  end
153
180
 
@@ -160,7 +187,7 @@ module PulpNpmClient
160
187
  # Calculates hash code according to all attributes.
161
188
  # @return [Integer] Hash code
162
189
  def hash
163
- [pulp_href, pulp_created, versions_href, pulp_labels, latest_version_href, name, description, remote].hash
190
+ [pulp_href, pulp_created, versions_href, pulp_labels, latest_version_href, name, description, retain_repo_versions, remote].hash
164
191
  end
165
192
 
166
193
  # Builds the object from hash
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: v3
7
7
  Contact: pulp-list@redhat.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -26,6 +26,9 @@ module PulpNpmClient
26
26
  # A URI of a repository the new content unit should be associated with.
27
27
  attr_accessor :repository
28
28
 
29
+ # An uncommitted upload that may be turned into the artifact of the content unit.
30
+ attr_accessor :upload
31
+
29
32
  attr_accessor :name
30
33
 
31
34
  attr_accessor :version
@@ -37,6 +40,7 @@ module PulpNpmClient
37
40
  :'relative_path' => :'relative_path',
38
41
  :'file' => :'file',
39
42
  :'repository' => :'repository',
43
+ :'upload' => :'upload',
40
44
  :'name' => :'name',
41
45
  :'version' => :'version'
42
46
  }
@@ -49,6 +53,7 @@ module PulpNpmClient
49
53
  :'relative_path' => :'String',
50
54
  :'file' => :'File',
51
55
  :'repository' => :'String',
56
+ :'upload' => :'String',
52
57
  :'name' => :'String',
53
58
  :'version' => :'String'
54
59
  }
@@ -91,6 +96,10 @@ module PulpNpmClient
91
96
  self.repository = attributes[:'repository']
92
97
  end
93
98
 
99
+ if attributes.key?(:'upload')
100
+ self.upload = attributes[:'upload']
101
+ end
102
+
94
103
  if attributes.key?(:'name')
95
104
  self.name = attributes[:'name']
96
105
  end
@@ -108,14 +117,26 @@ module PulpNpmClient
108
117
  invalid_properties.push('invalid value for "relative_path", relative_path cannot be nil.')
109
118
  end
110
119
 
120
+ if @relative_path.to_s.length < 1
121
+ invalid_properties.push('invalid value for "relative_path", the character length must be great than or equal to 1.')
122
+ end
123
+
111
124
  if @name.nil?
112
125
  invalid_properties.push('invalid value for "name", name cannot be nil.')
113
126
  end
114
127
 
128
+ if @name.to_s.length < 1
129
+ invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
130
+ end
131
+
115
132
  if @version.nil?
116
133
  invalid_properties.push('invalid value for "version", version cannot be nil.')
117
134
  end
118
135
 
136
+ if @version.to_s.length < 1
137
+ invalid_properties.push('invalid value for "version", the character length must be great than or equal to 1.')
138
+ end
139
+
119
140
  invalid_properties
120
141
  end
121
142
 
@@ -123,11 +144,56 @@ module PulpNpmClient
123
144
  # @return true if the model is valid
124
145
  def valid?
125
146
  return false if @relative_path.nil?
147
+ return false if @relative_path.to_s.length < 1
126
148
  return false if @name.nil?
149
+ return false if @name.to_s.length < 1
127
150
  return false if @version.nil?
151
+ return false if @version.to_s.length < 1
128
152
  true
129
153
  end
130
154
 
155
+ # Custom attribute writer method with validation
156
+ # @param [Object] relative_path Value to be assigned
157
+ def relative_path=(relative_path)
158
+ if relative_path.nil?
159
+ fail ArgumentError, 'relative_path cannot be nil'
160
+ end
161
+
162
+ if relative_path.to_s.length < 1
163
+ fail ArgumentError, 'invalid value for "relative_path", the character length must be great than or equal to 1.'
164
+ end
165
+
166
+ @relative_path = relative_path
167
+ end
168
+
169
+ # Custom attribute writer method with validation
170
+ # @param [Object] name Value to be assigned
171
+ def name=(name)
172
+ if name.nil?
173
+ fail ArgumentError, 'name cannot be nil'
174
+ end
175
+
176
+ if name.to_s.length < 1
177
+ fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
178
+ end
179
+
180
+ @name = name
181
+ end
182
+
183
+ # Custom attribute writer method with validation
184
+ # @param [Object] version Value to be assigned
185
+ def version=(version)
186
+ if version.nil?
187
+ fail ArgumentError, 'version cannot be nil'
188
+ end
189
+
190
+ if version.to_s.length < 1
191
+ fail ArgumentError, 'invalid value for "version", the character length must be great than or equal to 1.'
192
+ end
193
+
194
+ @version = version
195
+ end
196
+
131
197
  # Checks equality by comparing each attribute.
132
198
  # @param [Object] Object to be compared
133
199
  def ==(o)
@@ -137,6 +203,7 @@ module PulpNpmClient
137
203
  relative_path == o.relative_path &&
138
204
  file == o.file &&
139
205
  repository == o.repository &&
206
+ upload == o.upload &&
140
207
  name == o.name &&
141
208
  version == o.version
142
209
  end
@@ -150,7 +217,7 @@ module PulpNpmClient
150
217
  # Calculates hash code according to all attributes.
151
218
  # @return [Integer] Hash code
152
219
  def hash
153
- [artifact, relative_path, file, repository, name, version].hash
220
+ [artifact, relative_path, file, repository, upload, name, version].hash
154
221
  end
155
222
 
156
223
  # Builds the object from hash
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: v3
7
7
  Contact: pulp-list@redhat.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: v3
7
7
  Contact: pulp-list@redhat.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: v3
7
7
  Contact: pulp-list@redhat.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: v3
7
7
  Contact: pulp-list@redhat.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: v3
7
7
  Contact: pulp-list@redhat.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: v3
7
7
  Contact: pulp-list@redhat.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: v3
7
7
  Contact: pulp-list@redhat.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 4.2.3
9
+ OpenAPI Generator version: 4.3.1
10
10
 
11
11
  =end
12
12
 
@@ -29,9 +29,6 @@ module PulpNpmClient
29
29
  # The latest RepositoryVersion for this Repository will be served.
30
30
  attr_accessor :repository
31
31
 
32
- # RepositoryVersion to be served
33
- attr_accessor :repository_version
34
-
35
32
  # Attribute mapping from ruby-style variable name to JSON key.
36
33
  def self.attribute_map
37
34
  {
@@ -39,8 +36,7 @@ module PulpNpmClient
39
36
  :'content_guard' => :'content_guard',
40
37
  :'pulp_labels' => :'pulp_labels',
41
38
  :'name' => :'name',
42
- :'repository' => :'repository',
43
- :'repository_version' => :'repository_version'
39
+ :'repository' => :'repository'
44
40
  }
45
41
  end
46
42
 
@@ -51,8 +47,7 @@ module PulpNpmClient
51
47
  :'content_guard' => :'String',
52
48
  :'pulp_labels' => :'Object',
53
49
  :'name' => :'String',
54
- :'repository' => :'String',
55
- :'repository_version' => :'String'
50
+ :'repository' => :'String'
56
51
  }
57
52
  end
58
53
 
@@ -60,8 +55,7 @@ module PulpNpmClient
60
55
  def self.openapi_nullable
61
56
  Set.new([
62
57
  :'content_guard',
63
- :'repository',
64
- :'repository_version'
58
+ :'repository'
65
59
  ])
66
60
  end
67
61
 
@@ -99,25 +93,51 @@ module PulpNpmClient
99
93
  if attributes.key?(:'repository')
100
94
  self.repository = attributes[:'repository']
101
95
  end
102
-
103
- if attributes.key?(:'repository_version')
104
- self.repository_version = attributes[:'repository_version']
105
- end
106
96
  end
107
97
 
108
98
  # Show invalid properties with the reasons. Usually used together with valid?
109
99
  # @return Array for valid properties with the reasons
110
100
  def list_invalid_properties
111
101
  invalid_properties = Array.new
102
+ if !@base_path.nil? && @base_path.to_s.length < 1
103
+ invalid_properties.push('invalid value for "base_path", the character length must be great than or equal to 1.')
104
+ end
105
+
106
+ if !@name.nil? && @name.to_s.length < 1
107
+ invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
108
+ end
109
+
112
110
  invalid_properties
113
111
  end
114
112
 
115
113
  # Check to see if the all the properties in the model are valid
116
114
  # @return true if the model is valid
117
115
  def valid?
116
+ return false if !@base_path.nil? && @base_path.to_s.length < 1
117
+ return false if !@name.nil? && @name.to_s.length < 1
118
118
  true
119
119
  end
120
120
 
121
+ # Custom attribute writer method with validation
122
+ # @param [Object] base_path Value to be assigned
123
+ def base_path=(base_path)
124
+ if !base_path.nil? && base_path.to_s.length < 1
125
+ fail ArgumentError, 'invalid value for "base_path", the character length must be great than or equal to 1.'
126
+ end
127
+
128
+ @base_path = base_path
129
+ end
130
+
131
+ # Custom attribute writer method with validation
132
+ # @param [Object] name Value to be assigned
133
+ def name=(name)
134
+ if !name.nil? && name.to_s.length < 1
135
+ fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
136
+ end
137
+
138
+ @name = name
139
+ end
140
+
121
141
  # Checks equality by comparing each attribute.
122
142
  # @param [Object] Object to be compared
123
143
  def ==(o)
@@ -127,8 +147,7 @@ module PulpNpmClient
127
147
  content_guard == o.content_guard &&
128
148
  pulp_labels == o.pulp_labels &&
129
149
  name == o.name &&
130
- repository == o.repository &&
131
- repository_version == o.repository_version
150
+ repository == o.repository
132
151
  end
133
152
 
134
153
  # @see the `==` method
@@ -140,7 +159,7 @@ module PulpNpmClient
140
159
  # Calculates hash code according to all attributes.
141
160
  # @return [Integer] Hash code
142
161
  def hash
143
- [base_path, content_guard, pulp_labels, name, repository, repository_version].hash
162
+ [base_path, content_guard, pulp_labels, name, repository].hash
144
163
  end
145
164
 
146
165
  # Builds the object from hash