pulp_ostree_client 2.4.5 → 2.4.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +29 -12
- data/docs/AsyncOperationResponse.md +8 -7
- data/docs/ContentCommitsApi.md +228 -47
- data/docs/ContentConfigsApi.md +227 -46
- data/docs/ContentContentApi.md +255 -57
- data/docs/ContentObjectsApi.md +228 -47
- data/docs/ContentRefsApi.md +238 -57
- data/docs/ContentSummariesApi.md +227 -46
- data/docs/ContentSummaryResponse.md +12 -11
- data/docs/DistributionsOstreeApi.md +387 -182
- data/docs/MyPermissionsResponse.md +8 -7
- data/docs/NestedRole.md +12 -11
- data/docs/NestedRoleResponse.md +12 -11
- data/docs/ObjectRolesResponse.md +8 -7
- data/docs/OstreeImportAll.md +10 -9
- data/docs/OstreeImportCommitsToRef.md +12 -11
- data/docs/OstreeOstreeCommitResponse.md +26 -23
- data/docs/OstreeOstreeConfigResponse.md +20 -17
- data/docs/OstreeOstreeContent.md +16 -13
- data/docs/OstreeOstreeContentResponse.md +22 -19
- data/docs/OstreeOstreeDistribution.md +20 -19
- data/docs/OstreeOstreeDistributionResponse.md +32 -31
- data/docs/OstreeOstreeObjectResponse.md +24 -21
- data/docs/OstreeOstreeRefResponse.md +26 -23
- data/docs/OstreeOstreeRemote.md +54 -53
- data/docs/OstreeOstreeRemoteResponse.md +54 -53
- data/docs/OstreeOstreeRemoteResponseHiddenFieldsInner.md +20 -0
- data/docs/OstreeOstreeRepository.md +18 -17
- data/docs/OstreeOstreeRepositoryResponse.md +30 -29
- data/docs/OstreeOstreeSummaryResponse.md +20 -17
- data/docs/PaginatedRepositoryVersionResponseList.md +14 -13
- data/docs/PaginatedostreeOstreeCommitResponseList.md +14 -13
- data/docs/PaginatedostreeOstreeConfigResponseList.md +14 -13
- data/docs/PaginatedostreeOstreeContentResponseList.md +14 -13
- data/docs/PaginatedostreeOstreeDistributionResponseList.md +14 -13
- data/docs/PaginatedostreeOstreeObjectResponseList.md +14 -13
- data/docs/PaginatedostreeOstreeRefResponseList.md +14 -13
- data/docs/PaginatedostreeOstreeRemoteResponseList.md +14 -13
- data/docs/PaginatedostreeOstreeRepositoryResponseList.md +14 -13
- data/docs/PaginatedostreeOstreeSummaryResponseList.md +14 -13
- data/docs/PatchedostreeOstreeDistribution.md +20 -19
- data/docs/PatchedostreeOstreeRemote.md +54 -53
- data/docs/PatchedostreeOstreeRepository.md +18 -17
- data/docs/PolicyEnum.md +4 -5
- data/docs/RemotesOstreeApi.md +389 -184
- data/docs/Repair.md +8 -7
- data/docs/RepositoriesOstreeApi.md +502 -231
- data/docs/RepositoriesOstreeVersionsApi.md +152 -82
- data/docs/RepositoryAddRemoveContent.md +12 -11
- data/docs/RepositorySyncURL.md +10 -9
- data/docs/RepositoryVersionResponse.md +22 -21
- data/docs/SetLabel.md +10 -9
- data/docs/SetLabelResponse.md +10 -9
- data/docs/UnsetLabel.md +8 -7
- data/docs/UnsetLabelResponse.md +10 -9
- data/lib/pulp_ostree_client/api/content_commits_api.rb +165 -12
- data/lib/pulp_ostree_client/api/content_configs_api.rb +162 -9
- data/lib/pulp_ostree_client/api/content_content_api.rb +171 -14
- data/lib/pulp_ostree_client/api/content_objects_api.rb +165 -12
- data/lib/pulp_ostree_client/api/content_refs_api.rb +165 -12
- data/lib/pulp_ostree_client/api/content_summaries_api.rb +162 -9
- data/lib/pulp_ostree_client/api/distributions_ostree_api.rb +95 -59
- data/lib/pulp_ostree_client/api/remotes_ostree_api.rb +104 -68
- data/lib/pulp_ostree_client/api/repositories_ostree_api.rb +125 -76
- data/lib/pulp_ostree_client/api/repositories_ostree_versions_api.rb +40 -30
- data/lib/pulp_ostree_client/api_client.rb +137 -102
- data/lib/pulp_ostree_client/api_error.rb +2 -1
- data/lib/pulp_ostree_client/configuration.rb +162 -21
- data/lib/pulp_ostree_client/models/async_operation_response.rb +32 -22
- data/lib/pulp_ostree_client/models/content_summary_response.rb +36 -22
- data/lib/pulp_ostree_client/models/my_permissions_response.rb +32 -22
- data/lib/pulp_ostree_client/models/nested_role.rb +32 -22
- data/lib/pulp_ostree_client/models/nested_role_response.rb +32 -22
- data/lib/pulp_ostree_client/models/object_roles_response.rb +32 -22
- data/lib/pulp_ostree_client/models/ostree_import_all.rb +34 -22
- data/lib/pulp_ostree_client/models/ostree_import_commits_to_ref.rb +36 -22
- data/lib/pulp_ostree_client/models/ostree_ostree_commit_response.rb +53 -25
- data/lib/pulp_ostree_client/models/ostree_ostree_config_response.rb +49 -25
- data/lib/pulp_ostree_client/models/ostree_ostree_content.rb +49 -23
- data/lib/pulp_ostree_client/models/ostree_ostree_content_response.rb +51 -25
- data/lib/pulp_ostree_client/models/ostree_ostree_distribution.rb +34 -22
- data/lib/pulp_ostree_client/models/ostree_ostree_distribution_response.rb +36 -24
- data/lib/pulp_ostree_client/models/ostree_ostree_object_response.rb +53 -25
- data/lib/pulp_ostree_client/models/ostree_ostree_ref_response.rb +53 -25
- data/lib/pulp_ostree_client/models/ostree_ostree_remote.rb +61 -23
- data/lib/pulp_ostree_client/models/ostree_ostree_remote_response.rb +64 -26
- data/lib/pulp_ostree_client/models/{ostree_ostree_remote_response_hidden_fields.rb → ostree_ostree_remote_response_hidden_fields_inner.rb} +37 -25
- data/lib/pulp_ostree_client/models/ostree_ostree_repository.rb +32 -22
- data/lib/pulp_ostree_client/models/ostree_ostree_repository_response.rb +34 -24
- data/lib/pulp_ostree_client/models/ostree_ostree_summary_response.rb +49 -25
- data/lib/pulp_ostree_client/models/paginated_repository_version_response_list.rb +34 -22
- data/lib/pulp_ostree_client/models/paginatedostree_ostree_commit_response_list.rb +34 -22
- data/lib/pulp_ostree_client/models/paginatedostree_ostree_config_response_list.rb +34 -22
- data/lib/pulp_ostree_client/models/paginatedostree_ostree_content_response_list.rb +34 -22
- data/lib/pulp_ostree_client/models/paginatedostree_ostree_distribution_response_list.rb +34 -22
- data/lib/pulp_ostree_client/models/paginatedostree_ostree_object_response_list.rb +34 -22
- data/lib/pulp_ostree_client/models/paginatedostree_ostree_ref_response_list.rb +34 -22
- data/lib/pulp_ostree_client/models/paginatedostree_ostree_remote_response_list.rb +34 -22
- data/lib/pulp_ostree_client/models/paginatedostree_ostree_repository_response_list.rb +34 -22
- data/lib/pulp_ostree_client/models/paginatedostree_ostree_summary_response_list.rb +34 -22
- data/lib/pulp_ostree_client/models/patchedostree_ostree_distribution.rb +40 -24
- data/lib/pulp_ostree_client/models/patchedostree_ostree_remote.rb +67 -25
- data/lib/pulp_ostree_client/models/patchedostree_ostree_repository.rb +35 -23
- data/lib/pulp_ostree_client/models/policy_enum.rb +8 -4
- data/lib/pulp_ostree_client/models/repair.rb +30 -22
- data/lib/pulp_ostree_client/models/repository_add_remove_content.rb +30 -22
- data/lib/pulp_ostree_client/models/repository_sync_url.rb +30 -22
- data/lib/pulp_ostree_client/models/repository_version_response.rb +32 -24
- data/lib/pulp_ostree_client/models/set_label.rb +34 -22
- data/lib/pulp_ostree_client/models/set_label_response.rb +34 -22
- data/lib/pulp_ostree_client/models/unset_label.rb +33 -23
- data/lib/pulp_ostree_client/models/unset_label_response.rb +33 -23
- data/lib/pulp_ostree_client/version.rb +2 -2
- data/lib/pulp_ostree_client.rb +2 -2
- data/pulp_ostree_client.gemspec +9 -6
- data/spec/api/content_commits_api_spec.rb +31 -4
- data/spec/api/content_configs_api_spec.rb +30 -3
- data/spec/api/content_content_api_spec.rb +31 -4
- data/spec/api/content_objects_api_spec.rb +31 -4
- data/spec/api/content_refs_api_spec.rb +31 -4
- data/spec/api/content_summaries_api_spec.rb +30 -3
- data/spec/api/distributions_ostree_api_spec.rb +15 -14
- data/spec/api/remotes_ostree_api_spec.rb +20 -19
- data/spec/api/repositories_ostree_api_spec.rb +17 -17
- data/spec/api/repositories_ostree_versions_api_spec.rb +12 -11
- data/spec/models/async_operation_response_spec.rb +7 -12
- data/spec/models/content_summary_response_spec.rb +9 -14
- data/spec/models/my_permissions_response_spec.rb +7 -12
- data/spec/models/nested_role_response_spec.rb +9 -14
- data/spec/models/nested_role_spec.rb +9 -14
- data/spec/models/object_roles_response_spec.rb +7 -12
- data/spec/models/ostree_import_all_spec.rb +8 -13
- data/spec/models/ostree_import_commits_to_ref_spec.rb +9 -14
- data/spec/models/ostree_ostree_commit_response_spec.rb +21 -20
- data/spec/models/ostree_ostree_config_response_spec.rb +18 -17
- data/spec/models/ostree_ostree_content_response_spec.rb +19 -18
- data/spec/models/ostree_ostree_content_spec.rb +16 -15
- data/spec/models/ostree_ostree_distribution_response_spec.rb +19 -24
- data/spec/models/ostree_ostree_distribution_spec.rb +13 -18
- data/spec/models/ostree_ostree_object_response_spec.rb +20 -19
- data/spec/models/ostree_ostree_ref_response_spec.rb +21 -20
- data/spec/models/{ostree_ostree_remote_response_hidden_fields_spec.rb → ostree_ostree_remote_response_hidden_fields_inner_spec.rb} +11 -16
- data/spec/models/ostree_ostree_remote_response_spec.rb +30 -35
- data/spec/models/ostree_ostree_remote_spec.rb +30 -35
- data/spec/models/ostree_ostree_repository_response_spec.rb +18 -23
- data/spec/models/ostree_ostree_repository_spec.rb +12 -17
- data/spec/models/ostree_ostree_summary_response_spec.rb +18 -17
- data/spec/models/paginated_repository_version_response_list_spec.rb +10 -15
- data/spec/models/paginatedostree_ostree_commit_response_list_spec.rb +10 -15
- data/spec/models/paginatedostree_ostree_config_response_list_spec.rb +10 -15
- data/spec/models/paginatedostree_ostree_content_response_list_spec.rb +10 -15
- data/spec/models/paginatedostree_ostree_distribution_response_list_spec.rb +10 -15
- data/spec/models/paginatedostree_ostree_object_response_list_spec.rb +10 -15
- data/spec/models/paginatedostree_ostree_ref_response_list_spec.rb +10 -15
- data/spec/models/paginatedostree_ostree_remote_response_list_spec.rb +10 -15
- data/spec/models/paginatedostree_ostree_repository_response_list_spec.rb +10 -15
- data/spec/models/paginatedostree_ostree_summary_response_list_spec.rb +10 -15
- data/spec/models/patchedostree_ostree_distribution_spec.rb +13 -18
- data/spec/models/patchedostree_ostree_remote_spec.rb +30 -35
- data/spec/models/patchedostree_ostree_repository_spec.rb +12 -17
- 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 +14 -19
- data/spec/models/set_label_response_spec.rb +8 -13
- data/spec/models/set_label_spec.rb +8 -13
- data/spec/models/unset_label_response_spec.rb +8 -13
- data/spec/models/unset_label_spec.rb +7 -12
- data/spec/spec_helper.rb +1 -1
- metadata +83 -59
- data/docs/OstreeOstreeRemoteResponseHiddenFields.md +0 -19
- data/spec/api_client_spec.rb +0 -188
- data/spec/configuration_spec.rb +0 -42
@@ -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 PulpOstreeClient
|
16
17
|
# A Serializer class for uncategorized content units (e.g., static deltas).
|
@@ -26,6 +27,9 @@ module PulpOstreeClient
|
|
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.
|
27
28
|
attr_accessor :pulp_last_updated
|
28
29
|
|
30
|
+
# A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
|
31
|
+
attr_accessor :pulp_labels
|
32
|
+
|
29
33
|
# Artifact file representing the physical content
|
30
34
|
attr_accessor :artifact
|
31
35
|
|
@@ -40,19 +44,26 @@ module PulpOstreeClient
|
|
40
44
|
:'prn' => :'prn',
|
41
45
|
:'pulp_created' => :'pulp_created',
|
42
46
|
:'pulp_last_updated' => :'pulp_last_updated',
|
47
|
+
:'pulp_labels' => :'pulp_labels',
|
43
48
|
:'artifact' => :'artifact',
|
44
49
|
:'relative_path' => :'relative_path',
|
45
50
|
:'digest' => :'digest'
|
46
51
|
}
|
47
52
|
end
|
48
53
|
|
54
|
+
# Returns all the JSON keys this model knows about
|
55
|
+
def self.acceptable_attributes
|
56
|
+
attribute_map.values
|
57
|
+
end
|
58
|
+
|
49
59
|
# Attribute type mapping.
|
50
60
|
def self.openapi_types
|
51
61
|
{
|
52
62
|
:'pulp_href' => :'String',
|
53
63
|
:'prn' => :'String',
|
54
|
-
:'pulp_created' => :'
|
55
|
-
:'pulp_last_updated' => :'
|
64
|
+
:'pulp_created' => :'Time',
|
65
|
+
:'pulp_last_updated' => :'Time',
|
66
|
+
:'pulp_labels' => :'Hash<String, String>',
|
56
67
|
:'artifact' => :'String',
|
57
68
|
:'relative_path' => :'String',
|
58
69
|
:'digest' => :'String'
|
@@ -96,22 +107,35 @@ module PulpOstreeClient
|
|
96
107
|
self.pulp_last_updated = attributes[:'pulp_last_updated']
|
97
108
|
end
|
98
109
|
|
110
|
+
if attributes.key?(:'pulp_labels')
|
111
|
+
if (value = attributes[:'pulp_labels']).is_a?(Hash)
|
112
|
+
self.pulp_labels = value
|
113
|
+
end
|
114
|
+
end
|
115
|
+
|
99
116
|
if attributes.key?(:'artifact')
|
100
117
|
self.artifact = attributes[:'artifact']
|
118
|
+
else
|
119
|
+
self.artifact = nil
|
101
120
|
end
|
102
121
|
|
103
122
|
if attributes.key?(:'relative_path')
|
104
123
|
self.relative_path = attributes[:'relative_path']
|
124
|
+
else
|
125
|
+
self.relative_path = nil
|
105
126
|
end
|
106
127
|
|
107
128
|
if attributes.key?(:'digest')
|
108
129
|
self.digest = attributes[:'digest']
|
130
|
+
else
|
131
|
+
self.digest = nil
|
109
132
|
end
|
110
133
|
end
|
111
134
|
|
112
135
|
# Show invalid properties with the reasons. Usually used together with valid?
|
113
136
|
# @return Array for valid properties with the reasons
|
114
137
|
def list_invalid_properties
|
138
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
115
139
|
invalid_properties = Array.new
|
116
140
|
if @artifact.nil?
|
117
141
|
invalid_properties.push('invalid value for "artifact", artifact cannot be nil.')
|
@@ -131,6 +155,7 @@ module PulpOstreeClient
|
|
131
155
|
# Check to see if the all the properties in the model are valid
|
132
156
|
# @return true if the model is valid
|
133
157
|
def valid?
|
158
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
134
159
|
return false if @artifact.nil?
|
135
160
|
return false if @relative_path.nil?
|
136
161
|
return false if @digest.nil?
|
@@ -146,6 +171,7 @@ module PulpOstreeClient
|
|
146
171
|
prn == o.prn &&
|
147
172
|
pulp_created == o.pulp_created &&
|
148
173
|
pulp_last_updated == o.pulp_last_updated &&
|
174
|
+
pulp_labels == o.pulp_labels &&
|
149
175
|
artifact == o.artifact &&
|
150
176
|
relative_path == o.relative_path &&
|
151
177
|
digest == o.digest
|
@@ -160,44 +186,40 @@ module PulpOstreeClient
|
|
160
186
|
# Calculates hash code according to all attributes.
|
161
187
|
# @return [Integer] Hash code
|
162
188
|
def hash
|
163
|
-
[pulp_href, prn, pulp_created, pulp_last_updated, artifact, relative_path, digest].hash
|
189
|
+
[pulp_href, prn, pulp_created, pulp_last_updated, pulp_labels, artifact, relative_path, digest].hash
|
164
190
|
end
|
165
191
|
|
166
192
|
# Builds the object from hash
|
167
193
|
# @param [Hash] attributes Model attributes in the form of hash
|
168
194
|
# @return [Object] Returns the model itself
|
169
195
|
def self.build_from_hash(attributes)
|
170
|
-
new.build_from_hash(attributes)
|
171
|
-
end
|
172
|
-
|
173
|
-
# Builds the object from hash
|
174
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
175
|
-
# @return [Object] Returns the model itself
|
176
|
-
def build_from_hash(attributes)
|
177
196
|
return nil unless attributes.is_a?(Hash)
|
178
|
-
|
179
|
-
|
197
|
+
attributes = attributes.transform_keys(&:to_sym)
|
198
|
+
transformed_hash = {}
|
199
|
+
openapi_types.each_pair do |key, type|
|
200
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
201
|
+
transformed_hash["#{key}"] = nil
|
202
|
+
elsif type =~ /\AArray<(.*)>/i
|
180
203
|
# check to ensure the input is an array given that the attribute
|
181
204
|
# is documented as an array but the input is not
|
182
|
-
if attributes[
|
183
|
-
|
205
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
206
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
184
207
|
end
|
185
|
-
elsif !attributes[
|
186
|
-
|
187
|
-
end
|
208
|
+
elsif !attributes[attribute_map[key]].nil?
|
209
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
210
|
+
end
|
188
211
|
end
|
189
|
-
|
190
|
-
self
|
212
|
+
new(transformed_hash)
|
191
213
|
end
|
192
214
|
|
193
215
|
# Deserializes the data based on type
|
194
216
|
# @param string type Data type
|
195
217
|
# @param string value Value to be deserialized
|
196
218
|
# @return [Object] Deserialized data
|
197
|
-
def _deserialize(type, value)
|
219
|
+
def self._deserialize(type, value)
|
198
220
|
case type.to_sym
|
199
|
-
when :
|
200
|
-
|
221
|
+
when :Time
|
222
|
+
Time.parse(value)
|
201
223
|
when :Date
|
202
224
|
Date.parse(value)
|
203
225
|
when :String
|
@@ -227,7 +249,9 @@ module PulpOstreeClient
|
|
227
249
|
end
|
228
250
|
end
|
229
251
|
else # model
|
230
|
-
|
252
|
+
# models (e.g. Pet) or oneOf
|
253
|
+
klass = PulpOstreeClient.const_get(type)
|
254
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
231
255
|
end
|
232
256
|
end
|
233
257
|
|
@@ -253,7 +277,7 @@ module PulpOstreeClient
|
|
253
277
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
254
278
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
255
279
|
end
|
256
|
-
|
280
|
+
|
257
281
|
hash[param] = _to_hash(value)
|
258
282
|
end
|
259
283
|
hash
|
@@ -276,5 +300,7 @@ module PulpOstreeClient
|
|
276
300
|
value
|
277
301
|
end
|
278
302
|
end
|
303
|
+
|
279
304
|
end
|
305
|
+
|
280
306
|
end
|
@@ -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 PulpOstreeClient
|
16
17
|
# A Serializer class for an OSTree distribution.
|
@@ -48,6 +49,11 @@ module PulpOstreeClient
|
|
48
49
|
}
|
49
50
|
end
|
50
51
|
|
52
|
+
# Returns all the JSON keys this model knows about
|
53
|
+
def self.acceptable_attributes
|
54
|
+
attribute_map.values
|
55
|
+
end
|
56
|
+
|
51
57
|
# Attribute type mapping.
|
52
58
|
def self.openapi_types
|
53
59
|
{
|
@@ -87,6 +93,8 @@ module PulpOstreeClient
|
|
87
93
|
|
88
94
|
if attributes.key?(:'base_path')
|
89
95
|
self.base_path = attributes[:'base_path']
|
96
|
+
else
|
97
|
+
self.base_path = nil
|
90
98
|
end
|
91
99
|
|
92
100
|
if attributes.key?(:'content_guard')
|
@@ -107,6 +115,8 @@ module PulpOstreeClient
|
|
107
115
|
|
108
116
|
if attributes.key?(:'name')
|
109
117
|
self.name = attributes[:'name']
|
118
|
+
else
|
119
|
+
self.name = nil
|
110
120
|
end
|
111
121
|
|
112
122
|
if attributes.key?(:'repository')
|
@@ -121,6 +131,7 @@ module PulpOstreeClient
|
|
121
131
|
# Show invalid properties with the reasons. Usually used together with valid?
|
122
132
|
# @return Array for valid properties with the reasons
|
123
133
|
def list_invalid_properties
|
134
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
124
135
|
invalid_properties = Array.new
|
125
136
|
if @base_path.nil?
|
126
137
|
invalid_properties.push('invalid value for "base_path", base_path cannot be nil.')
|
@@ -144,6 +155,7 @@ module PulpOstreeClient
|
|
144
155
|
# Check to see if the all the properties in the model are valid
|
145
156
|
# @return true if the model is valid
|
146
157
|
def valid?
|
158
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
147
159
|
return false if @base_path.nil?
|
148
160
|
return false if @base_path.to_s.length < 1
|
149
161
|
return false if @name.nil?
|
@@ -209,37 +221,33 @@ module PulpOstreeClient
|
|
209
221
|
# @param [Hash] attributes Model attributes in the form of hash
|
210
222
|
# @return [Object] Returns the model itself
|
211
223
|
def self.build_from_hash(attributes)
|
212
|
-
new.build_from_hash(attributes)
|
213
|
-
end
|
214
|
-
|
215
|
-
# Builds the object from hash
|
216
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
217
|
-
# @return [Object] Returns the model itself
|
218
|
-
def build_from_hash(attributes)
|
219
224
|
return nil unless attributes.is_a?(Hash)
|
220
|
-
|
221
|
-
|
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
|
222
231
|
# check to ensure the input is an array given that the attribute
|
223
232
|
# is documented as an array but the input is not
|
224
|
-
if attributes[
|
225
|
-
|
233
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
234
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
226
235
|
end
|
227
|
-
elsif !attributes[
|
228
|
-
|
229
|
-
end
|
236
|
+
elsif !attributes[attribute_map[key]].nil?
|
237
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
238
|
+
end
|
230
239
|
end
|
231
|
-
|
232
|
-
self
|
240
|
+
new(transformed_hash)
|
233
241
|
end
|
234
242
|
|
235
243
|
# Deserializes the data based on type
|
236
244
|
# @param string type Data type
|
237
245
|
# @param string value Value to be deserialized
|
238
246
|
# @return [Object] Deserialized data
|
239
|
-
def _deserialize(type, value)
|
247
|
+
def self._deserialize(type, value)
|
240
248
|
case type.to_sym
|
241
|
-
when :
|
242
|
-
|
249
|
+
when :Time
|
250
|
+
Time.parse(value)
|
243
251
|
when :Date
|
244
252
|
Date.parse(value)
|
245
253
|
when :String
|
@@ -269,7 +277,9 @@ module PulpOstreeClient
|
|
269
277
|
end
|
270
278
|
end
|
271
279
|
else # model
|
272
|
-
|
280
|
+
# models (e.g. Pet) or oneOf
|
281
|
+
klass = PulpOstreeClient.const_get(type)
|
282
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
273
283
|
end
|
274
284
|
end
|
275
285
|
|
@@ -295,7 +305,7 @@ module PulpOstreeClient
|
|
295
305
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
296
306
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
297
307
|
end
|
298
|
-
|
308
|
+
|
299
309
|
hash[param] = _to_hash(value)
|
300
310
|
end
|
301
311
|
hash
|
@@ -318,5 +328,7 @@ module PulpOstreeClient
|
|
318
328
|
value
|
319
329
|
end
|
320
330
|
end
|
331
|
+
|
321
332
|
end
|
333
|
+
|
322
334
|
end
|
@@ -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 PulpOstreeClient
|
16
17
|
# A Serializer class for an OSTree distribution.
|
@@ -71,13 +72,18 @@ module PulpOstreeClient
|
|
71
72
|
}
|
72
73
|
end
|
73
74
|
|
75
|
+
# Returns all the JSON keys this model knows about
|
76
|
+
def self.acceptable_attributes
|
77
|
+
attribute_map.values
|
78
|
+
end
|
79
|
+
|
74
80
|
# Attribute type mapping.
|
75
81
|
def self.openapi_types
|
76
82
|
{
|
77
83
|
:'pulp_href' => :'String',
|
78
84
|
:'prn' => :'String',
|
79
|
-
:'pulp_created' => :'
|
80
|
-
:'pulp_last_updated' => :'
|
85
|
+
:'pulp_created' => :'Time',
|
86
|
+
:'pulp_last_updated' => :'Time',
|
81
87
|
:'base_path' => :'String',
|
82
88
|
:'base_url' => :'String',
|
83
89
|
:'content_guard' => :'String',
|
@@ -132,6 +138,8 @@ module PulpOstreeClient
|
|
132
138
|
|
133
139
|
if attributes.key?(:'base_path')
|
134
140
|
self.base_path = attributes[:'base_path']
|
141
|
+
else
|
142
|
+
self.base_path = nil
|
135
143
|
end
|
136
144
|
|
137
145
|
if attributes.key?(:'base_url')
|
@@ -160,6 +168,8 @@ module PulpOstreeClient
|
|
160
168
|
|
161
169
|
if attributes.key?(:'name')
|
162
170
|
self.name = attributes[:'name']
|
171
|
+
else
|
172
|
+
self.name = nil
|
163
173
|
end
|
164
174
|
|
165
175
|
if attributes.key?(:'repository')
|
@@ -174,6 +184,7 @@ module PulpOstreeClient
|
|
174
184
|
# Show invalid properties with the reasons. Usually used together with valid?
|
175
185
|
# @return Array for valid properties with the reasons
|
176
186
|
def list_invalid_properties
|
187
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
177
188
|
invalid_properties = Array.new
|
178
189
|
if @base_path.nil?
|
179
190
|
invalid_properties.push('invalid value for "base_path", base_path cannot be nil.')
|
@@ -189,6 +200,7 @@ module PulpOstreeClient
|
|
189
200
|
# Check to see if the all the properties in the model are valid
|
190
201
|
# @return true if the model is valid
|
191
202
|
def valid?
|
203
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
192
204
|
return false if @base_path.nil?
|
193
205
|
return false if @name.nil?
|
194
206
|
true
|
@@ -230,37 +242,33 @@ module PulpOstreeClient
|
|
230
242
|
# @param [Hash] attributes Model attributes in the form of hash
|
231
243
|
# @return [Object] Returns the model itself
|
232
244
|
def self.build_from_hash(attributes)
|
233
|
-
new.build_from_hash(attributes)
|
234
|
-
end
|
235
|
-
|
236
|
-
# Builds the object from hash
|
237
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
238
|
-
# @return [Object] Returns the model itself
|
239
|
-
def build_from_hash(attributes)
|
240
245
|
return nil unless attributes.is_a?(Hash)
|
241
|
-
|
242
|
-
|
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
|
243
252
|
# check to ensure the input is an array given that the attribute
|
244
253
|
# is documented as an array but the input is not
|
245
|
-
if attributes[
|
246
|
-
|
254
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
255
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
247
256
|
end
|
248
|
-
elsif !attributes[
|
249
|
-
|
250
|
-
end
|
257
|
+
elsif !attributes[attribute_map[key]].nil?
|
258
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
259
|
+
end
|
251
260
|
end
|
252
|
-
|
253
|
-
self
|
261
|
+
new(transformed_hash)
|
254
262
|
end
|
255
263
|
|
256
264
|
# Deserializes the data based on type
|
257
265
|
# @param string type Data type
|
258
266
|
# @param string value Value to be deserialized
|
259
267
|
# @return [Object] Deserialized data
|
260
|
-
def _deserialize(type, value)
|
268
|
+
def self._deserialize(type, value)
|
261
269
|
case type.to_sym
|
262
|
-
when :
|
263
|
-
|
270
|
+
when :Time
|
271
|
+
Time.parse(value)
|
264
272
|
when :Date
|
265
273
|
Date.parse(value)
|
266
274
|
when :String
|
@@ -290,7 +298,9 @@ module PulpOstreeClient
|
|
290
298
|
end
|
291
299
|
end
|
292
300
|
else # model
|
293
|
-
|
301
|
+
# models (e.g. Pet) or oneOf
|
302
|
+
klass = PulpOstreeClient.const_get(type)
|
303
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
294
304
|
end
|
295
305
|
end
|
296
306
|
|
@@ -316,7 +326,7 @@ module PulpOstreeClient
|
|
316
326
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
317
327
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
318
328
|
end
|
319
|
-
|
329
|
+
|
320
330
|
hash[param] = _to_hash(value)
|
321
331
|
end
|
322
332
|
hash
|
@@ -339,5 +349,7 @@ module PulpOstreeClient
|
|
339
349
|
value
|
340
350
|
end
|
341
351
|
end
|
352
|
+
|
342
353
|
end
|
354
|
+
|
343
355
|
end
|
@@ -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 PulpOstreeClient
|
16
17
|
# A Serializer class for OSTree objects (e.g., dirtree, dirmeta, file).
|
@@ -26,6 +27,9 @@ module PulpOstreeClient
|
|
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.
|
27
28
|
attr_accessor :pulp_last_updated
|
28
29
|
|
30
|
+
# A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
|
31
|
+
attr_accessor :pulp_labels
|
32
|
+
|
29
33
|
# Artifact file representing the physical content
|
30
34
|
attr_accessor :artifact
|
31
35
|
|
@@ -44,6 +48,7 @@ module PulpOstreeClient
|
|
44
48
|
:'prn' => :'prn',
|
45
49
|
:'pulp_created' => :'pulp_created',
|
46
50
|
:'pulp_last_updated' => :'pulp_last_updated',
|
51
|
+
:'pulp_labels' => :'pulp_labels',
|
47
52
|
:'artifact' => :'artifact',
|
48
53
|
:'relative_path' => :'relative_path',
|
49
54
|
:'checksum' => :'checksum',
|
@@ -51,13 +56,19 @@ module PulpOstreeClient
|
|
51
56
|
}
|
52
57
|
end
|
53
58
|
|
59
|
+
# Returns all the JSON keys this model knows about
|
60
|
+
def self.acceptable_attributes
|
61
|
+
attribute_map.values
|
62
|
+
end
|
63
|
+
|
54
64
|
# Attribute type mapping.
|
55
65
|
def self.openapi_types
|
56
66
|
{
|
57
67
|
:'pulp_href' => :'String',
|
58
68
|
:'prn' => :'String',
|
59
|
-
:'pulp_created' => :'
|
60
|
-
:'pulp_last_updated' => :'
|
69
|
+
:'pulp_created' => :'Time',
|
70
|
+
:'pulp_last_updated' => :'Time',
|
71
|
+
:'pulp_labels' => :'Hash<String, String>',
|
61
72
|
:'artifact' => :'String',
|
62
73
|
:'relative_path' => :'String',
|
63
74
|
:'checksum' => :'String',
|
@@ -102,26 +113,41 @@ module PulpOstreeClient
|
|
102
113
|
self.pulp_last_updated = attributes[:'pulp_last_updated']
|
103
114
|
end
|
104
115
|
|
116
|
+
if attributes.key?(:'pulp_labels')
|
117
|
+
if (value = attributes[:'pulp_labels']).is_a?(Hash)
|
118
|
+
self.pulp_labels = value
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
105
122
|
if attributes.key?(:'artifact')
|
106
123
|
self.artifact = attributes[:'artifact']
|
124
|
+
else
|
125
|
+
self.artifact = nil
|
107
126
|
end
|
108
127
|
|
109
128
|
if attributes.key?(:'relative_path')
|
110
129
|
self.relative_path = attributes[:'relative_path']
|
130
|
+
else
|
131
|
+
self.relative_path = nil
|
111
132
|
end
|
112
133
|
|
113
134
|
if attributes.key?(:'checksum')
|
114
135
|
self.checksum = attributes[:'checksum']
|
136
|
+
else
|
137
|
+
self.checksum = nil
|
115
138
|
end
|
116
139
|
|
117
140
|
if attributes.key?(:'typ')
|
118
141
|
self.typ = attributes[:'typ']
|
142
|
+
else
|
143
|
+
self.typ = nil
|
119
144
|
end
|
120
145
|
end
|
121
146
|
|
122
147
|
# Show invalid properties with the reasons. Usually used together with valid?
|
123
148
|
# @return Array for valid properties with the reasons
|
124
149
|
def list_invalid_properties
|
150
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
125
151
|
invalid_properties = Array.new
|
126
152
|
if @artifact.nil?
|
127
153
|
invalid_properties.push('invalid value for "artifact", artifact cannot be nil.')
|
@@ -145,6 +171,7 @@ module PulpOstreeClient
|
|
145
171
|
# Check to see if the all the properties in the model are valid
|
146
172
|
# @return true if the model is valid
|
147
173
|
def valid?
|
174
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
148
175
|
return false if @artifact.nil?
|
149
176
|
return false if @relative_path.nil?
|
150
177
|
return false if @checksum.nil?
|
@@ -161,6 +188,7 @@ module PulpOstreeClient
|
|
161
188
|
prn == o.prn &&
|
162
189
|
pulp_created == o.pulp_created &&
|
163
190
|
pulp_last_updated == o.pulp_last_updated &&
|
191
|
+
pulp_labels == o.pulp_labels &&
|
164
192
|
artifact == o.artifact &&
|
165
193
|
relative_path == o.relative_path &&
|
166
194
|
checksum == o.checksum &&
|
@@ -176,44 +204,40 @@ module PulpOstreeClient
|
|
176
204
|
# Calculates hash code according to all attributes.
|
177
205
|
# @return [Integer] Hash code
|
178
206
|
def hash
|
179
|
-
[pulp_href, prn, pulp_created, pulp_last_updated, artifact, relative_path, checksum, typ].hash
|
207
|
+
[pulp_href, prn, pulp_created, pulp_last_updated, pulp_labels, artifact, relative_path, checksum, typ].hash
|
180
208
|
end
|
181
209
|
|
182
210
|
# Builds the object from hash
|
183
211
|
# @param [Hash] attributes Model attributes in the form of hash
|
184
212
|
# @return [Object] Returns the model itself
|
185
213
|
def self.build_from_hash(attributes)
|
186
|
-
new.build_from_hash(attributes)
|
187
|
-
end
|
188
|
-
|
189
|
-
# Builds the object from hash
|
190
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
191
|
-
# @return [Object] Returns the model itself
|
192
|
-
def build_from_hash(attributes)
|
193
214
|
return nil unless attributes.is_a?(Hash)
|
194
|
-
|
195
|
-
|
215
|
+
attributes = attributes.transform_keys(&:to_sym)
|
216
|
+
transformed_hash = {}
|
217
|
+
openapi_types.each_pair do |key, type|
|
218
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
219
|
+
transformed_hash["#{key}"] = nil
|
220
|
+
elsif type =~ /\AArray<(.*)>/i
|
196
221
|
# check to ensure the input is an array given that the attribute
|
197
222
|
# is documented as an array but the input is not
|
198
|
-
if attributes[
|
199
|
-
|
223
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
224
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
200
225
|
end
|
201
|
-
elsif !attributes[
|
202
|
-
|
203
|
-
end
|
226
|
+
elsif !attributes[attribute_map[key]].nil?
|
227
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
228
|
+
end
|
204
229
|
end
|
205
|
-
|
206
|
-
self
|
230
|
+
new(transformed_hash)
|
207
231
|
end
|
208
232
|
|
209
233
|
# Deserializes the data based on type
|
210
234
|
# @param string type Data type
|
211
235
|
# @param string value Value to be deserialized
|
212
236
|
# @return [Object] Deserialized data
|
213
|
-
def _deserialize(type, value)
|
237
|
+
def self._deserialize(type, value)
|
214
238
|
case type.to_sym
|
215
|
-
when :
|
216
|
-
|
239
|
+
when :Time
|
240
|
+
Time.parse(value)
|
217
241
|
when :Date
|
218
242
|
Date.parse(value)
|
219
243
|
when :String
|
@@ -243,7 +267,9 @@ module PulpOstreeClient
|
|
243
267
|
end
|
244
268
|
end
|
245
269
|
else # model
|
246
|
-
|
270
|
+
# models (e.g. Pet) or oneOf
|
271
|
+
klass = PulpOstreeClient.const_get(type)
|
272
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
247
273
|
end
|
248
274
|
end
|
249
275
|
|
@@ -269,7 +295,7 @@ module PulpOstreeClient
|
|
269
295
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
270
296
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
271
297
|
end
|
272
|
-
|
298
|
+
|
273
299
|
hash[param] = _to_hash(value)
|
274
300
|
end
|
275
301
|
hash
|
@@ -292,5 +318,7 @@ module PulpOstreeClient
|
|
292
318
|
value
|
293
319
|
end
|
294
320
|
end
|
321
|
+
|
295
322
|
end
|
323
|
+
|
296
324
|
end
|