pulp_npm_client 0.1.0a4 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +24 -10
- data/docs/AsyncOperationResponse.md +8 -7
- data/docs/ContentPackagesApi.md +126 -64
- data/docs/ContentSummaryResponse.md +12 -11
- data/docs/DistributionsNpmApi.md +362 -93
- data/docs/NpmNpmDistribution.md +20 -15
- data/docs/NpmNpmDistributionResponse.md +32 -21
- data/docs/NpmNpmRemote.md +48 -47
- data/docs/NpmNpmRemoteResponse.md +48 -43
- data/docs/NpmNpmRemoteResponseHiddenFieldsInner.md +20 -0
- data/docs/NpmNpmRepository.md +16 -15
- data/docs/NpmNpmRepositoryResponse.md +28 -23
- data/docs/NpmPackageResponse.md +22 -17
- data/docs/PaginatedRepositoryVersionResponseList.md +14 -13
- data/docs/PaginatednpmNpmDistributionResponseList.md +14 -13
- data/docs/PaginatednpmNpmRemoteResponseList.md +14 -13
- data/docs/PaginatednpmNpmRepositoryResponseList.md +14 -13
- data/docs/PaginatednpmPackageResponseList.md +14 -13
- data/docs/PatchednpmNpmDistribution.md +20 -15
- data/docs/PatchednpmNpmRemote.md +48 -47
- data/docs/PatchednpmNpmRepository.md +16 -15
- data/docs/PolicyEnum.md +4 -5
- data/docs/RemotesNpmApi.md +364 -99
- data/docs/Repair.md +8 -7
- data/docs/RepositoriesNpmApi.md +429 -110
- data/docs/RepositoriesNpmVersionsApi.md +156 -80
- data/docs/RepositoryAddRemoveContent.md +12 -11
- data/docs/RepositorySyncURL.md +10 -9
- data/docs/RepositoryVersionResponse.md +22 -17
- data/docs/SetLabel.md +20 -0
- data/docs/SetLabelResponse.md +20 -0
- data/docs/UnsetLabel.md +18 -0
- data/docs/UnsetLabelResponse.md +20 -0
- data/lib/pulp_npm_client/api/content_packages_api.rb +72 -44
- data/lib/pulp_npm_client/api/distributions_npm_api.rb +243 -47
- data/lib/pulp_npm_client/api/remotes_npm_api.rb +247 -57
- data/lib/pulp_npm_client/api/repositories_npm_api.rb +283 -55
- data/lib/pulp_npm_client/api/repositories_npm_versions_api.rb +71 -52
- data/lib/pulp_npm_client/api_client.rb +137 -102
- data/lib/pulp_npm_client/api_error.rb +2 -1
- data/lib/pulp_npm_client/configuration.rb +163 -22
- data/lib/pulp_npm_client/models/async_operation_response.rb +32 -22
- data/lib/pulp_npm_client/models/content_summary_response.rb +36 -22
- data/lib/pulp_npm_client/models/npm_npm_distribution.rb +66 -29
- data/lib/pulp_npm_client/models/npm_npm_distribution_response.rb +98 -31
- data/lib/pulp_npm_client/models/npm_npm_remote.rb +62 -26
- data/lib/pulp_npm_client/models/npm_npm_remote_response.rb +100 -42
- data/lib/pulp_npm_client/models/npm_npm_remote_response_hidden_fields_inner.rb +237 -0
- data/lib/pulp_npm_client/models/npm_npm_repository.rb +38 -26
- data/lib/pulp_npm_client/models/npm_npm_repository_response.rb +60 -28
- data/lib/pulp_npm_client/models/npm_package_response.rb +59 -25
- data/lib/pulp_npm_client/models/paginated_repository_version_response_list.rb +44 -22
- data/lib/pulp_npm_client/models/paginatednpm_npm_distribution_response_list.rb +44 -22
- data/lib/pulp_npm_client/models/paginatednpm_npm_remote_response_list.rb +44 -22
- data/lib/pulp_npm_client/models/paginatednpm_npm_repository_response_list.rb +44 -22
- data/lib/pulp_npm_client/models/paginatednpm_package_response_list.rb +44 -22
- data/lib/pulp_npm_client/models/patchednpm_npm_distribution.rb +72 -31
- data/lib/pulp_npm_client/models/patchednpm_npm_remote.rb +68 -28
- data/lib/pulp_npm_client/models/patchednpm_npm_repository.rb +41 -27
- data/lib/pulp_npm_client/models/policy_enum.rb +8 -4
- data/lib/pulp_npm_client/models/repair.rb +30 -22
- data/lib/pulp_npm_client/models/repository_add_remove_content.rb +33 -25
- data/lib/pulp_npm_client/models/repository_sync_url.rb +30 -22
- data/lib/pulp_npm_client/models/repository_version_response.rb +53 -25
- data/lib/pulp_npm_client/models/set_label.rb +264 -0
- data/lib/pulp_npm_client/models/set_label_response.rb +255 -0
- data/lib/pulp_npm_client/models/unset_label.rb +252 -0
- data/lib/pulp_npm_client/models/unset_label_response.rb +252 -0
- data/lib/pulp_npm_client/version.rb +2 -2
- data/lib/pulp_npm_client.rb +6 -3
- data/pulp_npm_client.gemspec +10 -7
- data/spec/api/content_packages_api_spec.rb +22 -16
- data/spec/api/distributions_npm_api_spec.rb +51 -14
- data/spec/api/remotes_npm_api_spec.rb +54 -19
- data/spec/api/repositories_npm_api_spec.rb +60 -15
- data/spec/api/repositories_npm_versions_api_spec.rb +23 -19
- data/spec/models/async_operation_response_spec.rb +7 -12
- data/spec/models/content_summary_response_spec.rb +9 -14
- data/spec/models/npm_npm_distribution_response_spec.rb +44 -19
- data/spec/models/npm_npm_distribution_spec.rb +23 -16
- data/spec/models/npm_npm_remote_response_hidden_fields_inner_spec.rb +42 -0
- data/spec/models/npm_npm_remote_response_spec.rb +42 -35
- data/spec/models/npm_npm_remote_spec.rb +27 -32
- data/spec/models/npm_npm_repository_response_spec.rb +27 -20
- data/spec/models/npm_npm_repository_spec.rb +11 -16
- data/spec/models/npm_package_response_spec.rb +24 -17
- data/spec/models/paginated_repository_version_response_list_spec.rb +10 -15
- data/spec/models/paginatednpm_npm_distribution_response_list_spec.rb +10 -15
- data/spec/models/paginatednpm_npm_remote_response_list_spec.rb +10 -15
- data/spec/models/paginatednpm_npm_repository_response_list_spec.rb +10 -15
- data/spec/models/paginatednpm_package_response_list_spec.rb +10 -15
- data/spec/models/patchednpm_npm_distribution_spec.rb +23 -16
- data/spec/models/patchednpm_npm_remote_spec.rb +27 -32
- data/spec/models/patchednpm_npm_repository_spec.rb +11 -16
- data/spec/models/policy_enum_spec.rb +6 -11
- data/spec/models/repair_spec.rb +7 -12
- data/spec/models/repository_add_remove_content_spec.rb +9 -14
- data/spec/models/repository_sync_url_spec.rb +8 -13
- data/spec/models/repository_version_response_spec.rb +24 -17
- data/spec/models/set_label_response_spec.rb +42 -0
- data/spec/models/set_label_spec.rb +42 -0
- data/spec/models/unset_label_response_spec.rb +42 -0
- data/spec/models/unset_label_spec.rb +36 -0
- data/spec/spec_helper.rb +1 -1
- metadata +94 -59
- data/docs/NpmPackage.md +0 -29
- data/docs/PulpNpmPackagesApi.md +0 -60
- data/git_push.sh +0 -58
- data/lib/pulp_npm_client/api/pulp_npm_packages_api.rb +0 -86
- data/lib/pulp_npm_client/models/npm_package.rb +0 -337
- data/spec/api/pulp_npm_packages_api_spec.rb +0 -48
- data/spec/api_client_spec.rb +0 -188
- data/spec/configuration_spec.rb +0 -42
- data/spec/models/npm_package_spec.rb +0 -77
@@ -6,11 +6,12 @@
|
|
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
|
-
|
9
|
+
Generator version: 7.10.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module PulpNpmClient
|
16
17
|
# Serializer for NPM Distributions.
|
@@ -21,6 +22,9 @@ module PulpNpmClient
|
|
21
22
|
# An optional content-guard.
|
22
23
|
attr_accessor :content_guard
|
23
24
|
|
25
|
+
# Whether this distribution should be shown in the content app.
|
26
|
+
attr_accessor :hidden
|
27
|
+
|
24
28
|
attr_accessor :pulp_labels
|
25
29
|
|
26
30
|
# A unique name. Ex, `rawhide` and `stable`.
|
@@ -29,25 +33,37 @@ module PulpNpmClient
|
|
29
33
|
# The latest RepositoryVersion for this Repository will be served.
|
30
34
|
attr_accessor :repository
|
31
35
|
|
36
|
+
# Remote that can be used to fetch content when using pull-through caching.
|
37
|
+
attr_accessor :remote
|
38
|
+
|
32
39
|
# Attribute mapping from ruby-style variable name to JSON key.
|
33
40
|
def self.attribute_map
|
34
41
|
{
|
35
42
|
:'base_path' => :'base_path',
|
36
43
|
:'content_guard' => :'content_guard',
|
44
|
+
:'hidden' => :'hidden',
|
37
45
|
:'pulp_labels' => :'pulp_labels',
|
38
46
|
:'name' => :'name',
|
39
|
-
:'repository' => :'repository'
|
47
|
+
:'repository' => :'repository',
|
48
|
+
:'remote' => :'remote'
|
40
49
|
}
|
41
50
|
end
|
42
51
|
|
52
|
+
# Returns all the JSON keys this model knows about
|
53
|
+
def self.acceptable_attributes
|
54
|
+
attribute_map.values
|
55
|
+
end
|
56
|
+
|
43
57
|
# Attribute type mapping.
|
44
58
|
def self.openapi_types
|
45
59
|
{
|
46
60
|
:'base_path' => :'String',
|
47
61
|
:'content_guard' => :'String',
|
48
|
-
:'
|
62
|
+
:'hidden' => :'Boolean',
|
63
|
+
:'pulp_labels' => :'Hash<String, String>',
|
49
64
|
:'name' => :'String',
|
50
|
-
:'repository' => :'String'
|
65
|
+
:'repository' => :'String',
|
66
|
+
:'remote' => :'String'
|
51
67
|
}
|
52
68
|
end
|
53
69
|
|
@@ -55,7 +71,8 @@ module PulpNpmClient
|
|
55
71
|
def self.openapi_nullable
|
56
72
|
Set.new([
|
57
73
|
:'content_guard',
|
58
|
-
:'repository'
|
74
|
+
:'repository',
|
75
|
+
:'remote'
|
59
76
|
])
|
60
77
|
end
|
61
78
|
|
@@ -76,28 +93,45 @@ module PulpNpmClient
|
|
76
93
|
|
77
94
|
if attributes.key?(:'base_path')
|
78
95
|
self.base_path = attributes[:'base_path']
|
96
|
+
else
|
97
|
+
self.base_path = nil
|
79
98
|
end
|
80
99
|
|
81
100
|
if attributes.key?(:'content_guard')
|
82
101
|
self.content_guard = attributes[:'content_guard']
|
83
102
|
end
|
84
103
|
|
104
|
+
if attributes.key?(:'hidden')
|
105
|
+
self.hidden = attributes[:'hidden']
|
106
|
+
else
|
107
|
+
self.hidden = false
|
108
|
+
end
|
109
|
+
|
85
110
|
if attributes.key?(:'pulp_labels')
|
86
|
-
|
111
|
+
if (value = attributes[:'pulp_labels']).is_a?(Hash)
|
112
|
+
self.pulp_labels = value
|
113
|
+
end
|
87
114
|
end
|
88
115
|
|
89
116
|
if attributes.key?(:'name')
|
90
117
|
self.name = attributes[:'name']
|
118
|
+
else
|
119
|
+
self.name = nil
|
91
120
|
end
|
92
121
|
|
93
122
|
if attributes.key?(:'repository')
|
94
123
|
self.repository = attributes[:'repository']
|
95
124
|
end
|
125
|
+
|
126
|
+
if attributes.key?(:'remote')
|
127
|
+
self.remote = attributes[:'remote']
|
128
|
+
end
|
96
129
|
end
|
97
130
|
|
98
131
|
# Show invalid properties with the reasons. Usually used together with valid?
|
99
132
|
# @return Array for valid properties with the reasons
|
100
133
|
def list_invalid_properties
|
134
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
101
135
|
invalid_properties = Array.new
|
102
136
|
if @base_path.nil?
|
103
137
|
invalid_properties.push('invalid value for "base_path", base_path cannot be nil.')
|
@@ -121,6 +155,7 @@ module PulpNpmClient
|
|
121
155
|
# Check to see if the all the properties in the model are valid
|
122
156
|
# @return true if the model is valid
|
123
157
|
def valid?
|
158
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
124
159
|
return false if @base_path.nil?
|
125
160
|
return false if @base_path.to_s.length < 1
|
126
161
|
return false if @name.nil?
|
@@ -163,9 +198,11 @@ module PulpNpmClient
|
|
163
198
|
self.class == o.class &&
|
164
199
|
base_path == o.base_path &&
|
165
200
|
content_guard == o.content_guard &&
|
201
|
+
hidden == o.hidden &&
|
166
202
|
pulp_labels == o.pulp_labels &&
|
167
203
|
name == o.name &&
|
168
|
-
repository == o.repository
|
204
|
+
repository == o.repository &&
|
205
|
+
remote == o.remote
|
169
206
|
end
|
170
207
|
|
171
208
|
# @see the `==` method
|
@@ -177,44 +214,40 @@ module PulpNpmClient
|
|
177
214
|
# Calculates hash code according to all attributes.
|
178
215
|
# @return [Integer] Hash code
|
179
216
|
def hash
|
180
|
-
[base_path, content_guard, pulp_labels, name, repository].hash
|
217
|
+
[base_path, content_guard, hidden, pulp_labels, name, repository, remote].hash
|
181
218
|
end
|
182
219
|
|
183
220
|
# Builds the object from hash
|
184
221
|
# @param [Hash] attributes Model attributes in the form of hash
|
185
222
|
# @return [Object] Returns the model itself
|
186
223
|
def self.build_from_hash(attributes)
|
187
|
-
new.build_from_hash(attributes)
|
188
|
-
end
|
189
|
-
|
190
|
-
# Builds the object from hash
|
191
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
192
|
-
# @return [Object] Returns the model itself
|
193
|
-
def build_from_hash(attributes)
|
194
224
|
return nil unless attributes.is_a?(Hash)
|
195
|
-
|
196
|
-
|
225
|
+
attributes = attributes.transform_keys(&:to_sym)
|
226
|
+
transformed_hash = {}
|
227
|
+
openapi_types.each_pair do |key, type|
|
228
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
229
|
+
transformed_hash["#{key}"] = nil
|
230
|
+
elsif type =~ /\AArray<(.*)>/i
|
197
231
|
# check to ensure the input is an array given that the attribute
|
198
232
|
# is documented as an array but the input is not
|
199
|
-
if attributes[
|
200
|
-
|
233
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
234
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
201
235
|
end
|
202
|
-
elsif !attributes[
|
203
|
-
|
204
|
-
end
|
236
|
+
elsif !attributes[attribute_map[key]].nil?
|
237
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
238
|
+
end
|
205
239
|
end
|
206
|
-
|
207
|
-
self
|
240
|
+
new(transformed_hash)
|
208
241
|
end
|
209
242
|
|
210
243
|
# Deserializes the data based on type
|
211
244
|
# @param string type Data type
|
212
245
|
# @param string value Value to be deserialized
|
213
246
|
# @return [Object] Deserialized data
|
214
|
-
def _deserialize(type, value)
|
247
|
+
def self._deserialize(type, value)
|
215
248
|
case type.to_sym
|
216
|
-
when :
|
217
|
-
|
249
|
+
when :Time
|
250
|
+
Time.parse(value)
|
218
251
|
when :Date
|
219
252
|
Date.parse(value)
|
220
253
|
when :String
|
@@ -244,7 +277,9 @@ module PulpNpmClient
|
|
244
277
|
end
|
245
278
|
end
|
246
279
|
else # model
|
247
|
-
|
280
|
+
# models (e.g. Pet) or oneOf
|
281
|
+
klass = PulpNpmClient.const_get(type)
|
282
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
248
283
|
end
|
249
284
|
end
|
250
285
|
|
@@ -270,7 +305,7 @@ module PulpNpmClient
|
|
270
305
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
271
306
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
272
307
|
end
|
273
|
-
|
308
|
+
|
274
309
|
hash[param] = _to_hash(value)
|
275
310
|
end
|
276
311
|
hash
|
@@ -293,5 +328,7 @@ module PulpNpmClient
|
|
293
328
|
value
|
294
329
|
end
|
295
330
|
end
|
331
|
+
|
296
332
|
end
|
333
|
+
|
297
334
|
end
|
@@ -6,29 +6,42 @@
|
|
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
|
-
|
9
|
+
Generator version: 7.10.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module PulpNpmClient
|
16
17
|
# Serializer for NPM Distributions.
|
17
18
|
class NpmNpmDistributionResponse
|
18
19
|
attr_accessor :pulp_href
|
19
20
|
|
21
|
+
# The Pulp Resource Name (PRN).
|
22
|
+
attr_accessor :prn
|
23
|
+
|
20
24
|
# Timestamp of creation.
|
21
25
|
attr_accessor :pulp_created
|
22
26
|
|
27
|
+
# Timestamp of the last time this resource was updated. Note: for immutable resources - like content, repository versions, and publication - pulp_created and pulp_last_updated dates will be the same.
|
28
|
+
attr_accessor :pulp_last_updated
|
29
|
+
|
23
30
|
# The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\")
|
24
31
|
attr_accessor :base_path
|
25
32
|
|
26
|
-
# The URL for accessing the
|
33
|
+
# The URL for accessing the publication as defined by this distribution.
|
27
34
|
attr_accessor :base_url
|
28
35
|
|
29
36
|
# An optional content-guard.
|
30
37
|
attr_accessor :content_guard
|
31
38
|
|
39
|
+
# Timestamp since when the distributed content served by this distribution has not changed. If equals to `null`, no guarantee is provided about content changes.
|
40
|
+
attr_accessor :no_content_change_since
|
41
|
+
|
42
|
+
# Whether this distribution should be shown in the content app.
|
43
|
+
attr_accessor :hidden
|
44
|
+
|
32
45
|
attr_accessor :pulp_labels
|
33
46
|
|
34
47
|
# A unique name. Ex, `rawhide` and `stable`.
|
@@ -37,31 +50,49 @@ module PulpNpmClient
|
|
37
50
|
# The latest RepositoryVersion for this Repository will be served.
|
38
51
|
attr_accessor :repository
|
39
52
|
|
53
|
+
# Remote that can be used to fetch content when using pull-through caching.
|
54
|
+
attr_accessor :remote
|
55
|
+
|
40
56
|
# Attribute mapping from ruby-style variable name to JSON key.
|
41
57
|
def self.attribute_map
|
42
58
|
{
|
43
59
|
:'pulp_href' => :'pulp_href',
|
60
|
+
:'prn' => :'prn',
|
44
61
|
:'pulp_created' => :'pulp_created',
|
62
|
+
:'pulp_last_updated' => :'pulp_last_updated',
|
45
63
|
:'base_path' => :'base_path',
|
46
64
|
:'base_url' => :'base_url',
|
47
65
|
:'content_guard' => :'content_guard',
|
66
|
+
:'no_content_change_since' => :'no_content_change_since',
|
67
|
+
:'hidden' => :'hidden',
|
48
68
|
:'pulp_labels' => :'pulp_labels',
|
49
69
|
:'name' => :'name',
|
50
|
-
:'repository' => :'repository'
|
70
|
+
:'repository' => :'repository',
|
71
|
+
:'remote' => :'remote'
|
51
72
|
}
|
52
73
|
end
|
53
74
|
|
75
|
+
# Returns all the JSON keys this model knows about
|
76
|
+
def self.acceptable_attributes
|
77
|
+
attribute_map.values
|
78
|
+
end
|
79
|
+
|
54
80
|
# Attribute type mapping.
|
55
81
|
def self.openapi_types
|
56
82
|
{
|
57
83
|
:'pulp_href' => :'String',
|
58
|
-
:'
|
84
|
+
:'prn' => :'String',
|
85
|
+
:'pulp_created' => :'Time',
|
86
|
+
:'pulp_last_updated' => :'Time',
|
59
87
|
:'base_path' => :'String',
|
60
88
|
:'base_url' => :'String',
|
61
89
|
:'content_guard' => :'String',
|
62
|
-
:'
|
90
|
+
:'no_content_change_since' => :'String',
|
91
|
+
:'hidden' => :'Boolean',
|
92
|
+
:'pulp_labels' => :'Hash<String, String>',
|
63
93
|
:'name' => :'String',
|
64
|
-
:'repository' => :'String'
|
94
|
+
:'repository' => :'String',
|
95
|
+
:'remote' => :'String'
|
65
96
|
}
|
66
97
|
end
|
67
98
|
|
@@ -69,7 +100,8 @@ module PulpNpmClient
|
|
69
100
|
def self.openapi_nullable
|
70
101
|
Set.new([
|
71
102
|
:'content_guard',
|
72
|
-
:'repository'
|
103
|
+
:'repository',
|
104
|
+
:'remote'
|
73
105
|
])
|
74
106
|
end
|
75
107
|
|
@@ -92,12 +124,22 @@ module PulpNpmClient
|
|
92
124
|
self.pulp_href = attributes[:'pulp_href']
|
93
125
|
end
|
94
126
|
|
127
|
+
if attributes.key?(:'prn')
|
128
|
+
self.prn = attributes[:'prn']
|
129
|
+
end
|
130
|
+
|
95
131
|
if attributes.key?(:'pulp_created')
|
96
132
|
self.pulp_created = attributes[:'pulp_created']
|
97
133
|
end
|
98
134
|
|
135
|
+
if attributes.key?(:'pulp_last_updated')
|
136
|
+
self.pulp_last_updated = attributes[:'pulp_last_updated']
|
137
|
+
end
|
138
|
+
|
99
139
|
if attributes.key?(:'base_path')
|
100
140
|
self.base_path = attributes[:'base_path']
|
141
|
+
else
|
142
|
+
self.base_path = nil
|
101
143
|
end
|
102
144
|
|
103
145
|
if attributes.key?(:'base_url')
|
@@ -108,22 +150,41 @@ module PulpNpmClient
|
|
108
150
|
self.content_guard = attributes[:'content_guard']
|
109
151
|
end
|
110
152
|
|
153
|
+
if attributes.key?(:'no_content_change_since')
|
154
|
+
self.no_content_change_since = attributes[:'no_content_change_since']
|
155
|
+
end
|
156
|
+
|
157
|
+
if attributes.key?(:'hidden')
|
158
|
+
self.hidden = attributes[:'hidden']
|
159
|
+
else
|
160
|
+
self.hidden = false
|
161
|
+
end
|
162
|
+
|
111
163
|
if attributes.key?(:'pulp_labels')
|
112
|
-
|
164
|
+
if (value = attributes[:'pulp_labels']).is_a?(Hash)
|
165
|
+
self.pulp_labels = value
|
166
|
+
end
|
113
167
|
end
|
114
168
|
|
115
169
|
if attributes.key?(:'name')
|
116
170
|
self.name = attributes[:'name']
|
171
|
+
else
|
172
|
+
self.name = nil
|
117
173
|
end
|
118
174
|
|
119
175
|
if attributes.key?(:'repository')
|
120
176
|
self.repository = attributes[:'repository']
|
121
177
|
end
|
178
|
+
|
179
|
+
if attributes.key?(:'remote')
|
180
|
+
self.remote = attributes[:'remote']
|
181
|
+
end
|
122
182
|
end
|
123
183
|
|
124
184
|
# Show invalid properties with the reasons. Usually used together with valid?
|
125
185
|
# @return Array for valid properties with the reasons
|
126
186
|
def list_invalid_properties
|
187
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
127
188
|
invalid_properties = Array.new
|
128
189
|
if @base_path.nil?
|
129
190
|
invalid_properties.push('invalid value for "base_path", base_path cannot be nil.')
|
@@ -139,6 +200,7 @@ module PulpNpmClient
|
|
139
200
|
# Check to see if the all the properties in the model are valid
|
140
201
|
# @return true if the model is valid
|
141
202
|
def valid?
|
203
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
142
204
|
return false if @base_path.nil?
|
143
205
|
return false if @name.nil?
|
144
206
|
true
|
@@ -150,13 +212,18 @@ module PulpNpmClient
|
|
150
212
|
return true if self.equal?(o)
|
151
213
|
self.class == o.class &&
|
152
214
|
pulp_href == o.pulp_href &&
|
215
|
+
prn == o.prn &&
|
153
216
|
pulp_created == o.pulp_created &&
|
217
|
+
pulp_last_updated == o.pulp_last_updated &&
|
154
218
|
base_path == o.base_path &&
|
155
219
|
base_url == o.base_url &&
|
156
220
|
content_guard == o.content_guard &&
|
221
|
+
no_content_change_since == o.no_content_change_since &&
|
222
|
+
hidden == o.hidden &&
|
157
223
|
pulp_labels == o.pulp_labels &&
|
158
224
|
name == o.name &&
|
159
|
-
repository == o.repository
|
225
|
+
repository == o.repository &&
|
226
|
+
remote == o.remote
|
160
227
|
end
|
161
228
|
|
162
229
|
# @see the `==` method
|
@@ -168,44 +235,40 @@ module PulpNpmClient
|
|
168
235
|
# Calculates hash code according to all attributes.
|
169
236
|
# @return [Integer] Hash code
|
170
237
|
def hash
|
171
|
-
[pulp_href, pulp_created, base_path, base_url, content_guard, pulp_labels, name, repository].hash
|
238
|
+
[pulp_href, prn, pulp_created, pulp_last_updated, base_path, base_url, content_guard, no_content_change_since, hidden, pulp_labels, name, repository, remote].hash
|
172
239
|
end
|
173
240
|
|
174
241
|
# Builds the object from hash
|
175
242
|
# @param [Hash] attributes Model attributes in the form of hash
|
176
243
|
# @return [Object] Returns the model itself
|
177
244
|
def self.build_from_hash(attributes)
|
178
|
-
new.build_from_hash(attributes)
|
179
|
-
end
|
180
|
-
|
181
|
-
# Builds the object from hash
|
182
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
183
|
-
# @return [Object] Returns the model itself
|
184
|
-
def build_from_hash(attributes)
|
185
245
|
return nil unless attributes.is_a?(Hash)
|
186
|
-
|
187
|
-
|
246
|
+
attributes = attributes.transform_keys(&:to_sym)
|
247
|
+
transformed_hash = {}
|
248
|
+
openapi_types.each_pair do |key, type|
|
249
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
250
|
+
transformed_hash["#{key}"] = nil
|
251
|
+
elsif type =~ /\AArray<(.*)>/i
|
188
252
|
# check to ensure the input is an array given that the attribute
|
189
253
|
# is documented as an array but the input is not
|
190
|
-
if attributes[
|
191
|
-
|
254
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
255
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
192
256
|
end
|
193
|
-
elsif !attributes[
|
194
|
-
|
195
|
-
end
|
257
|
+
elsif !attributes[attribute_map[key]].nil?
|
258
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
259
|
+
end
|
196
260
|
end
|
197
|
-
|
198
|
-
self
|
261
|
+
new(transformed_hash)
|
199
262
|
end
|
200
263
|
|
201
264
|
# Deserializes the data based on type
|
202
265
|
# @param string type Data type
|
203
266
|
# @param string value Value to be deserialized
|
204
267
|
# @return [Object] Deserialized data
|
205
|
-
def _deserialize(type, value)
|
268
|
+
def self._deserialize(type, value)
|
206
269
|
case type.to_sym
|
207
|
-
when :
|
208
|
-
|
270
|
+
when :Time
|
271
|
+
Time.parse(value)
|
209
272
|
when :Date
|
210
273
|
Date.parse(value)
|
211
274
|
when :String
|
@@ -235,7 +298,9 @@ module PulpNpmClient
|
|
235
298
|
end
|
236
299
|
end
|
237
300
|
else # model
|
238
|
-
|
301
|
+
# models (e.g. Pet) or oneOf
|
302
|
+
klass = PulpNpmClient.const_get(type)
|
303
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
239
304
|
end
|
240
305
|
end
|
241
306
|
|
@@ -261,7 +326,7 @@ module PulpNpmClient
|
|
261
326
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
262
327
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
263
328
|
end
|
264
|
-
|
329
|
+
|
265
330
|
hash[param] = _to_hash(value)
|
266
331
|
end
|
267
332
|
hash
|
@@ -284,5 +349,7 @@ module PulpNpmClient
|
|
284
349
|
value
|
285
350
|
end
|
286
351
|
end
|
352
|
+
|
287
353
|
end
|
354
|
+
|
288
355
|
end
|