pulp_container_client 2.10.2 → 2.10.5
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 +5 -6
- data/docs/ContainerContainerDistribution.md +4 -4
- data/docs/ContainerContainerDistributionResponse.md +7 -7
- data/docs/ContainerContainerPushRepository.md +3 -3
- data/docs/ContainerContainerPushRepositoryResponse.md +9 -9
- data/docs/PatchedcontainerContainerDistribution.md +4 -4
- data/docs/PatchedcontainerContainerPushRepository.md +3 -3
- data/docs/Repair.md +17 -0
- data/docs/RepositoriesContainerPushVersionsApi.md +4 -4
- data/docs/RepositoriesContainerVersionsApi.md +4 -4
- data/lib/pulp_container_client/api/repositories_container_push_versions_api.rb +9 -9
- data/lib/pulp_container_client/api/repositories_container_versions_api.rb +9 -9
- data/lib/pulp_container_client/api_client.rb +1 -4
- data/lib/pulp_container_client/configuration.rb +1 -0
- data/lib/pulp_container_client/models/container_container_distribution.rb +39 -39
- data/lib/pulp_container_client/models/container_container_distribution_response.rb +33 -33
- data/lib/pulp_container_client/models/container_container_push_repository.rb +30 -30
- data/lib/pulp_container_client/models/container_container_push_repository_response.rb +42 -42
- data/lib/pulp_container_client/models/patchedcontainer_container_distribution.rb +30 -30
- data/lib/pulp_container_client/models/patchedcontainer_container_push_repository.rb +30 -30
- data/lib/pulp_container_client/models/{repository_version.rb → repair.rb} +13 -12
- data/lib/pulp_container_client/version.rb +1 -1
- data/lib/pulp_container_client.rb +1 -2
- data/pulp_container_client.gemspec +3 -3
- data/spec/api/repositories_container_push_versions_api_spec.rb +1 -1
- data/spec/api/repositories_container_versions_api_spec.rb +1 -1
- data/spec/models/container_container_distribution_response_spec.rb +6 -6
- data/spec/models/container_container_distribution_spec.rb +2 -2
- data/spec/models/container_container_push_repository_response_spec.rb +6 -6
- data/spec/models/container_container_push_repository_spec.rb +2 -2
- data/spec/models/patchedcontainer_container_distribution_spec.rb +2 -2
- data/spec/models/patchedcontainer_container_push_repository_spec.rb +2 -2
- data/spec/models/{repository_version_spec.rb → repair_spec.rb} +7 -7
- metadata +50 -55
- data/docs/ContentSummary.md +0 -21
- data/docs/RepositoryVersion.md +0 -17
- data/git_push.sh +0 -58
- data/lib/pulp_container_client/models/content_summary.rb +0 -246
- data/spec/models/content_summary_spec.rb +0 -53
metadata
CHANGED
@@ -1,20 +1,20 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pulp_container_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.10.
|
4
|
+
version: 2.10.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OpenAPI-Generator
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-08-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0.17'
|
20
20
|
- - "<"
|
@@ -24,7 +24,7 @@ dependencies:
|
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
|
-
- - "
|
27
|
+
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: '0.17'
|
30
30
|
- - "<"
|
@@ -98,7 +98,6 @@ files:
|
|
98
98
|
- docs/ContainerTagResponse.md
|
99
99
|
- docs/ContentBlobsApi.md
|
100
100
|
- docs/ContentManifestsApi.md
|
101
|
-
- docs/ContentSummary.md
|
102
101
|
- docs/ContentSummaryResponse.md
|
103
102
|
- docs/ContentTagsApi.md
|
104
103
|
- docs/ContentguardsContentRedirectApi.md
|
@@ -126,18 +125,17 @@ files:
|
|
126
125
|
- docs/RecursiveManage.md
|
127
126
|
- docs/RemotesContainerApi.md
|
128
127
|
- docs/RemoveImage.md
|
128
|
+
- docs/Repair.md
|
129
129
|
- docs/RepositoriesContainerApi.md
|
130
130
|
- docs/RepositoriesContainerPushApi.md
|
131
131
|
- docs/RepositoriesContainerPushVersionsApi.md
|
132
132
|
- docs/RepositoriesContainerVersionsApi.md
|
133
133
|
- docs/RepositorySyncURL.md
|
134
|
-
- docs/RepositoryVersion.md
|
135
134
|
- docs/RepositoryVersionResponse.md
|
136
135
|
- docs/TagCopy.md
|
137
136
|
- docs/TagImage.md
|
138
137
|
- docs/TokenApi.md
|
139
138
|
- docs/UnTagImage.md
|
140
|
-
- git_push.sh
|
141
139
|
- lib/pulp_container_client.rb
|
142
140
|
- lib/pulp_container_client/api/content_blobs_api.rb
|
143
141
|
- lib/pulp_container_client/api/content_manifests_api.rb
|
@@ -170,7 +168,6 @@ files:
|
|
170
168
|
- lib/pulp_container_client/models/container_content_redirect_content_guard_response.rb
|
171
169
|
- lib/pulp_container_client/models/container_manifest_response.rb
|
172
170
|
- lib/pulp_container_client/models/container_tag_response.rb
|
173
|
-
- lib/pulp_container_client/models/content_summary.rb
|
174
171
|
- lib/pulp_container_client/models/content_summary_response.rb
|
175
172
|
- lib/pulp_container_client/models/manifest_copy.rb
|
176
173
|
- lib/pulp_container_client/models/media_types_enum.rb
|
@@ -193,8 +190,8 @@ files:
|
|
193
190
|
- lib/pulp_container_client/models/policy_enum.rb
|
194
191
|
- lib/pulp_container_client/models/recursive_manage.rb
|
195
192
|
- lib/pulp_container_client/models/remove_image.rb
|
193
|
+
- lib/pulp_container_client/models/repair.rb
|
196
194
|
- lib/pulp_container_client/models/repository_sync_url.rb
|
197
|
-
- lib/pulp_container_client/models/repository_version.rb
|
198
195
|
- lib/pulp_container_client/models/repository_version_response.rb
|
199
196
|
- lib/pulp_container_client/models/tag_copy.rb
|
200
197
|
- lib/pulp_container_client/models/tag_image.rb
|
@@ -232,7 +229,6 @@ files:
|
|
232
229
|
- spec/models/container_manifest_response_spec.rb
|
233
230
|
- spec/models/container_tag_response_spec.rb
|
234
231
|
- spec/models/content_summary_response_spec.rb
|
235
|
-
- spec/models/content_summary_spec.rb
|
236
232
|
- spec/models/manifest_copy_spec.rb
|
237
233
|
- spec/models/media_types_enum_spec.rb
|
238
234
|
- spec/models/oci_build_image_spec.rb
|
@@ -254,16 +250,16 @@ files:
|
|
254
250
|
- spec/models/policy_enum_spec.rb
|
255
251
|
- spec/models/recursive_manage_spec.rb
|
256
252
|
- spec/models/remove_image_spec.rb
|
253
|
+
- spec/models/repair_spec.rb
|
257
254
|
- spec/models/repository_sync_url_spec.rb
|
258
255
|
- spec/models/repository_version_response_spec.rb
|
259
|
-
- spec/models/repository_version_spec.rb
|
260
256
|
- spec/models/tag_copy_spec.rb
|
261
257
|
- spec/models/tag_image_spec.rb
|
262
258
|
- spec/models/un_tag_image_spec.rb
|
263
259
|
- spec/spec_helper.rb
|
264
|
-
homepage: https://
|
260
|
+
homepage: https://github.com/pulp/pulp_container
|
265
261
|
licenses:
|
266
|
-
-
|
262
|
+
- GPLv2+
|
267
263
|
metadata: {}
|
268
264
|
post_install_message:
|
269
265
|
rdoc_options: []
|
@@ -285,63 +281,62 @@ signing_key:
|
|
285
281
|
specification_version: 4
|
286
282
|
summary: Pulp 3 API Ruby Gem
|
287
283
|
test_files:
|
288
|
-
- spec/api/remotes_container_api_spec.rb
|
289
|
-
- spec/api/repositories_container_push_api_spec.rb
|
290
|
-
- spec/api/content_blobs_api_spec.rb
|
291
|
-
- spec/api/token_api_spec.rb
|
292
284
|
- spec/api/content_tags_api_spec.rb
|
293
|
-
- spec/api/repositories_container_api_spec.rb
|
294
285
|
- spec/api/distributions_container_api_spec.rb
|
286
|
+
- spec/api/repositories_container_api_spec.rb
|
287
|
+
- spec/api/token_api_spec.rb
|
288
|
+
- spec/api/remotes_container_api_spec.rb
|
295
289
|
- spec/api/repositories_container_push_versions_api_spec.rb
|
296
|
-
- spec/api/content_manifests_api_spec.rb
|
297
290
|
- spec/api/contentguards_content_redirect_api_spec.rb
|
298
|
-
- spec/api/
|
291
|
+
- spec/api/content_manifests_api_spec.rb
|
292
|
+
- spec/api/content_blobs_api_spec.rb
|
299
293
|
- spec/api/pulp_container_namespaces_api_spec.rb
|
294
|
+
- spec/api/repositories_container_push_api_spec.rb
|
295
|
+
- spec/api/repositories_container_versions_api_spec.rb
|
300
296
|
- spec/api_client_spec.rb
|
301
297
|
- spec/configuration_spec.rb
|
302
|
-
- spec/models/
|
303
|
-
- spec/models/
|
298
|
+
- spec/models/oci_build_image_spec.rb
|
299
|
+
- spec/models/container_container_push_repository_spec.rb
|
300
|
+
- spec/models/container_container_namespace_response_spec.rb
|
301
|
+
- spec/models/container_tag_response_spec.rb
|
302
|
+
- spec/models/container_content_redirect_content_guard_response_spec.rb
|
304
303
|
- spec/models/paginatedcontainer_container_push_repository_response_list_spec.rb
|
304
|
+
- spec/models/container_content_redirect_content_guard_spec.rb
|
305
|
+
- spec/models/async_operation_response_spec.rb
|
306
|
+
- spec/models/media_types_enum_spec.rb
|
307
|
+
- spec/models/container_container_distribution_spec.rb
|
308
|
+
- spec/models/paginatedcontainer_container_namespace_response_list_spec.rb
|
309
|
+
- spec/models/repair_spec.rb
|
310
|
+
- spec/models/patchedcontainer_container_push_repository_spec.rb
|
311
|
+
- spec/models/container_container_namespace_spec.rb
|
312
|
+
- spec/models/patchedcontainer_container_remote_spec.rb
|
305
313
|
- spec/models/repository_version_response_spec.rb
|
306
|
-
- spec/models/patchedcontainer_content_redirect_content_guard_spec.rb
|
307
|
-
- spec/models/container_tag_response_spec.rb
|
308
314
|
- spec/models/container_container_repository_spec.rb
|
309
|
-
- spec/models/
|
310
|
-
- spec/models/async_operation_response_spec.rb
|
311
|
-
- spec/models/patchedcontainer_container_distribution_spec.rb
|
312
|
-
- spec/models/paginated_repository_version_response_list_spec.rb
|
313
|
-
- spec/models/container_container_remote_response_spec.rb
|
314
|
-
- spec/models/paginatedcontainer_manifest_response_list_spec.rb
|
315
|
-
- spec/models/container_blob_response_spec.rb
|
316
|
-
- spec/models/content_summary_response_spec.rb
|
315
|
+
- spec/models/repository_sync_url_spec.rb
|
317
316
|
- spec/models/tag_copy_spec.rb
|
317
|
+
- spec/models/paginatedcontainer_content_redirect_content_guard_response_list_spec.rb
|
318
|
+
- spec/models/patchedcontainer_content_redirect_content_guard_spec.rb
|
319
|
+
- spec/models/policy_enum_spec.rb
|
320
|
+
- spec/models/container_container_repository_response_spec.rb
|
318
321
|
- spec/models/paginatedcontainer_blob_response_list_spec.rb
|
319
|
-
- spec/models/
|
322
|
+
- spec/models/un_tag_image_spec.rb
|
323
|
+
- spec/models/paginatedcontainer_container_distribution_response_list_spec.rb
|
324
|
+
- spec/models/recursive_manage_spec.rb
|
325
|
+
- spec/models/container_blob_response_spec.rb
|
320
326
|
- spec/models/tag_image_spec.rb
|
321
|
-
- spec/models/media_types_enum_spec.rb
|
322
|
-
- spec/models/container_container_remote_spec.rb
|
323
|
-
- spec/models/patchedcontainer_container_remote_spec.rb
|
324
|
-
- spec/models/container_container_namespace_response_spec.rb
|
325
327
|
- spec/models/paginatedcontainer_container_repository_response_list_spec.rb
|
326
|
-
- spec/models/container_container_push_repository_spec.rb
|
327
|
-
- spec/models/container_container_repository_response_spec.rb
|
328
|
-
- spec/models/paginatedcontainer_tag_response_list_spec.rb
|
329
|
-
- spec/models/policy_enum_spec.rb
|
330
|
-
- spec/models/paginatedcontainer_container_namespace_response_list_spec.rb
|
331
|
-
- spec/models/patchedcontainer_container_repository_spec.rb
|
332
|
-
- spec/models/content_summary_spec.rb
|
333
|
-
- spec/models/paginatedcontainer_content_redirect_content_guard_response_list_spec.rb
|
334
|
-
- spec/models/container_manifest_response_spec.rb
|
335
|
-
- spec/models/remove_image_spec.rb
|
336
328
|
- spec/models/manifest_copy_spec.rb
|
337
|
-
- spec/models/
|
338
|
-
- spec/models/
|
339
|
-
- spec/models/
|
340
|
-
- spec/models/
|
329
|
+
- spec/models/container_container_remote_response_spec.rb
|
330
|
+
- spec/models/paginated_repository_version_response_list_spec.rb
|
331
|
+
- spec/models/paginatedcontainer_tag_response_list_spec.rb
|
332
|
+
- spec/models/patchedcontainer_container_distribution_spec.rb
|
341
333
|
- spec/models/container_container_distribution_response_spec.rb
|
342
|
-
- spec/models/
|
334
|
+
- spec/models/container_manifest_response_spec.rb
|
343
335
|
- spec/models/paginatedcontainer_container_remote_response_list_spec.rb
|
344
|
-
- spec/models/
|
345
|
-
- spec/models/
|
346
|
-
- spec/models/
|
336
|
+
- spec/models/container_container_remote_spec.rb
|
337
|
+
- spec/models/paginatedcontainer_manifest_response_list_spec.rb
|
338
|
+
- spec/models/container_container_push_repository_response_spec.rb
|
339
|
+
- spec/models/patchedcontainer_container_repository_spec.rb
|
340
|
+
- spec/models/remove_image_spec.rb
|
341
|
+
- spec/models/content_summary_response_spec.rb
|
347
342
|
- spec/spec_helper.rb
|
data/docs/ContentSummary.md
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
# PulpContainerClient::ContentSummary
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
|
5
|
-
Name | Type | Description | Notes
|
6
|
-
------------ | ------------- | ------------- | -------------
|
7
|
-
**added** | **Hash<String, Object>** | |
|
8
|
-
**removed** | **Hash<String, Object>** | |
|
9
|
-
**present** | **Hash<String, Object>** | |
|
10
|
-
|
11
|
-
## Code Sample
|
12
|
-
|
13
|
-
```ruby
|
14
|
-
require 'PulpContainerClient'
|
15
|
-
|
16
|
-
instance = PulpContainerClient::ContentSummary.new(added: null,
|
17
|
-
removed: null,
|
18
|
-
present: null)
|
19
|
-
```
|
20
|
-
|
21
|
-
|
data/docs/RepositoryVersion.md
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
# PulpContainerClient::RepositoryVersion
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
|
5
|
-
Name | Type | Description | Notes
|
6
|
-
------------ | ------------- | ------------- | -------------
|
7
|
-
**base_version** | **String** | A repository version whose content was used as the initial set of content for this repository version | [optional]
|
8
|
-
|
9
|
-
## Code Sample
|
10
|
-
|
11
|
-
```ruby
|
12
|
-
require 'PulpContainerClient'
|
13
|
-
|
14
|
-
instance = PulpContainerClient::RepositoryVersion.new(base_version: null)
|
15
|
-
```
|
16
|
-
|
17
|
-
|
data/git_push.sh
DELETED
@@ -1,58 +0,0 @@
|
|
1
|
-
#!/bin/sh
|
2
|
-
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
3
|
-
#
|
4
|
-
# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com"
|
5
|
-
|
6
|
-
git_user_id=$1
|
7
|
-
git_repo_id=$2
|
8
|
-
release_note=$3
|
9
|
-
git_host=$4
|
10
|
-
|
11
|
-
if [ "$git_host" = "" ]; then
|
12
|
-
git_host="github.com"
|
13
|
-
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
|
14
|
-
fi
|
15
|
-
|
16
|
-
if [ "$git_user_id" = "" ]; then
|
17
|
-
git_user_id="GIT_USER_ID"
|
18
|
-
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
19
|
-
fi
|
20
|
-
|
21
|
-
if [ "$git_repo_id" = "" ]; then
|
22
|
-
git_repo_id="GIT_REPO_ID"
|
23
|
-
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
24
|
-
fi
|
25
|
-
|
26
|
-
if [ "$release_note" = "" ]; then
|
27
|
-
release_note="Minor update"
|
28
|
-
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
29
|
-
fi
|
30
|
-
|
31
|
-
# Initialize the local directory as a Git repository
|
32
|
-
git init
|
33
|
-
|
34
|
-
# Adds the files in the local repository and stages them for commit.
|
35
|
-
git add .
|
36
|
-
|
37
|
-
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
38
|
-
git commit -m "$release_note"
|
39
|
-
|
40
|
-
# Sets the new remote
|
41
|
-
git_remote=`git remote`
|
42
|
-
if [ "$git_remote" = "" ]; then # git remote not defined
|
43
|
-
|
44
|
-
if [ "$GIT_TOKEN" = "" ]; then
|
45
|
-
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
46
|
-
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
|
47
|
-
else
|
48
|
-
git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git
|
49
|
-
fi
|
50
|
-
|
51
|
-
fi
|
52
|
-
|
53
|
-
git pull origin master
|
54
|
-
|
55
|
-
# Pushes (Forces) the changes in the local repository up to the remote repository
|
56
|
-
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
|
57
|
-
git push origin master 2>&1 | grep -v 'To https'
|
58
|
-
|
@@ -1,246 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#Pulp 3 API
|
3
|
-
|
4
|
-
#Fetch, Upload, Organize, and Distribute Software Packages
|
5
|
-
|
6
|
-
The version of the OpenAPI document: v3
|
7
|
-
Contact: pulp-list@redhat.com
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 4.3.1
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'date'
|
14
|
-
|
15
|
-
module PulpContainerClient
|
16
|
-
# Serializer for the RepositoryVersion content summary
|
17
|
-
class ContentSummary
|
18
|
-
attr_accessor :added
|
19
|
-
|
20
|
-
attr_accessor :removed
|
21
|
-
|
22
|
-
attr_accessor :present
|
23
|
-
|
24
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
25
|
-
def self.attribute_map
|
26
|
-
{
|
27
|
-
:'added' => :'added',
|
28
|
-
:'removed' => :'removed',
|
29
|
-
:'present' => :'present'
|
30
|
-
}
|
31
|
-
end
|
32
|
-
|
33
|
-
# Attribute type mapping.
|
34
|
-
def self.openapi_types
|
35
|
-
{
|
36
|
-
:'added' => :'Hash<String, Object>',
|
37
|
-
:'removed' => :'Hash<String, Object>',
|
38
|
-
:'present' => :'Hash<String, Object>'
|
39
|
-
}
|
40
|
-
end
|
41
|
-
|
42
|
-
# List of attributes with nullable: true
|
43
|
-
def self.openapi_nullable
|
44
|
-
Set.new([
|
45
|
-
])
|
46
|
-
end
|
47
|
-
|
48
|
-
# Initializes the object
|
49
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
50
|
-
def initialize(attributes = {})
|
51
|
-
if (!attributes.is_a?(Hash))
|
52
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpContainerClient::ContentSummary` initialize method"
|
53
|
-
end
|
54
|
-
|
55
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
56
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
57
|
-
if (!self.class.attribute_map.key?(k.to_sym))
|
58
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpContainerClient::ContentSummary`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
59
|
-
end
|
60
|
-
h[k.to_sym] = v
|
61
|
-
}
|
62
|
-
|
63
|
-
if attributes.key?(:'added')
|
64
|
-
if (value = attributes[:'added']).is_a?(Hash)
|
65
|
-
self.added = value
|
66
|
-
end
|
67
|
-
end
|
68
|
-
|
69
|
-
if attributes.key?(:'removed')
|
70
|
-
if (value = attributes[:'removed']).is_a?(Hash)
|
71
|
-
self.removed = value
|
72
|
-
end
|
73
|
-
end
|
74
|
-
|
75
|
-
if attributes.key?(:'present')
|
76
|
-
if (value = attributes[:'present']).is_a?(Hash)
|
77
|
-
self.present = value
|
78
|
-
end
|
79
|
-
end
|
80
|
-
end
|
81
|
-
|
82
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
83
|
-
# @return Array for valid properties with the reasons
|
84
|
-
def list_invalid_properties
|
85
|
-
invalid_properties = Array.new
|
86
|
-
if @added.nil?
|
87
|
-
invalid_properties.push('invalid value for "added", added cannot be nil.')
|
88
|
-
end
|
89
|
-
|
90
|
-
if @removed.nil?
|
91
|
-
invalid_properties.push('invalid value for "removed", removed cannot be nil.')
|
92
|
-
end
|
93
|
-
|
94
|
-
if @present.nil?
|
95
|
-
invalid_properties.push('invalid value for "present", present cannot be nil.')
|
96
|
-
end
|
97
|
-
|
98
|
-
invalid_properties
|
99
|
-
end
|
100
|
-
|
101
|
-
# Check to see if the all the properties in the model are valid
|
102
|
-
# @return true if the model is valid
|
103
|
-
def valid?
|
104
|
-
return false if @added.nil?
|
105
|
-
return false if @removed.nil?
|
106
|
-
return false if @present.nil?
|
107
|
-
true
|
108
|
-
end
|
109
|
-
|
110
|
-
# Checks equality by comparing each attribute.
|
111
|
-
# @param [Object] Object to be compared
|
112
|
-
def ==(o)
|
113
|
-
return true if self.equal?(o)
|
114
|
-
self.class == o.class &&
|
115
|
-
added == o.added &&
|
116
|
-
removed == o.removed &&
|
117
|
-
present == o.present
|
118
|
-
end
|
119
|
-
|
120
|
-
# @see the `==` method
|
121
|
-
# @param [Object] Object to be compared
|
122
|
-
def eql?(o)
|
123
|
-
self == o
|
124
|
-
end
|
125
|
-
|
126
|
-
# Calculates hash code according to all attributes.
|
127
|
-
# @return [Integer] Hash code
|
128
|
-
def hash
|
129
|
-
[added, removed, present].hash
|
130
|
-
end
|
131
|
-
|
132
|
-
# Builds the object from hash
|
133
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
134
|
-
# @return [Object] Returns the model itself
|
135
|
-
def self.build_from_hash(attributes)
|
136
|
-
new.build_from_hash(attributes)
|
137
|
-
end
|
138
|
-
|
139
|
-
# Builds the object from hash
|
140
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
141
|
-
# @return [Object] Returns the model itself
|
142
|
-
def build_from_hash(attributes)
|
143
|
-
return nil unless attributes.is_a?(Hash)
|
144
|
-
self.class.openapi_types.each_pair do |key, type|
|
145
|
-
if type =~ /\AArray<(.*)>/i
|
146
|
-
# check to ensure the input is an array given that the attribute
|
147
|
-
# is documented as an array but the input is not
|
148
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
149
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
150
|
-
end
|
151
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
152
|
-
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
153
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
154
|
-
end
|
155
|
-
|
156
|
-
self
|
157
|
-
end
|
158
|
-
|
159
|
-
# Deserializes the data based on type
|
160
|
-
# @param string type Data type
|
161
|
-
# @param string value Value to be deserialized
|
162
|
-
# @return [Object] Deserialized data
|
163
|
-
def _deserialize(type, value)
|
164
|
-
case type.to_sym
|
165
|
-
when :DateTime
|
166
|
-
DateTime.parse(value)
|
167
|
-
when :Date
|
168
|
-
Date.parse(value)
|
169
|
-
when :String
|
170
|
-
value.to_s
|
171
|
-
when :Integer
|
172
|
-
value.to_i
|
173
|
-
when :Float
|
174
|
-
value.to_f
|
175
|
-
when :Boolean
|
176
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
177
|
-
true
|
178
|
-
else
|
179
|
-
false
|
180
|
-
end
|
181
|
-
when :Object
|
182
|
-
# generic object (usually a Hash), return directly
|
183
|
-
value
|
184
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
185
|
-
inner_type = Regexp.last_match[:inner_type]
|
186
|
-
value.map { |v| _deserialize(inner_type, v) }
|
187
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
188
|
-
k_type = Regexp.last_match[:k_type]
|
189
|
-
v_type = Regexp.last_match[:v_type]
|
190
|
-
{}.tap do |hash|
|
191
|
-
value.each do |k, v|
|
192
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
193
|
-
end
|
194
|
-
end
|
195
|
-
else # model
|
196
|
-
PulpContainerClient.const_get(type).build_from_hash(value)
|
197
|
-
end
|
198
|
-
end
|
199
|
-
|
200
|
-
# Returns the string representation of the object
|
201
|
-
# @return [String] String presentation of the object
|
202
|
-
def to_s
|
203
|
-
to_hash.to_s
|
204
|
-
end
|
205
|
-
|
206
|
-
# to_body is an alias to to_hash (backward compatibility)
|
207
|
-
# @return [Hash] Returns the object in the form of hash
|
208
|
-
def to_body
|
209
|
-
to_hash
|
210
|
-
end
|
211
|
-
|
212
|
-
# Returns the object in the form of hash
|
213
|
-
# @return [Hash] Returns the object in the form of hash
|
214
|
-
def to_hash
|
215
|
-
hash = {}
|
216
|
-
self.class.attribute_map.each_pair do |attr, param|
|
217
|
-
value = self.send(attr)
|
218
|
-
if value.nil?
|
219
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
220
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
221
|
-
end
|
222
|
-
|
223
|
-
hash[param] = _to_hash(value)
|
224
|
-
end
|
225
|
-
hash
|
226
|
-
end
|
227
|
-
|
228
|
-
# Outputs non-array value in the form of hash
|
229
|
-
# For object, use to_hash. Otherwise, just return the value
|
230
|
-
# @param [Object] value Any valid value
|
231
|
-
# @return [Hash] Returns the value in the form of hash
|
232
|
-
def _to_hash(value)
|
233
|
-
if value.is_a?(Array)
|
234
|
-
value.compact.map { |v| _to_hash(v) }
|
235
|
-
elsif value.is_a?(Hash)
|
236
|
-
{}.tap do |hash|
|
237
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
238
|
-
end
|
239
|
-
elsif value.respond_to? :to_hash
|
240
|
-
value.to_hash
|
241
|
-
else
|
242
|
-
value
|
243
|
-
end
|
244
|
-
end
|
245
|
-
end
|
246
|
-
end
|
@@ -1,53 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#Pulp 3 API
|
3
|
-
|
4
|
-
#Fetch, Upload, Organize, and Distribute Software Packages
|
5
|
-
|
6
|
-
The version of the OpenAPI document: v3
|
7
|
-
Contact: pulp-list@redhat.com
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 4.3.1
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'spec_helper'
|
14
|
-
require 'json'
|
15
|
-
require 'date'
|
16
|
-
|
17
|
-
# Unit tests for PulpContainerClient::ContentSummary
|
18
|
-
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
-
# Please update as you see appropriate
|
20
|
-
describe 'ContentSummary' do
|
21
|
-
before do
|
22
|
-
# run before each test
|
23
|
-
@instance = PulpContainerClient::ContentSummary.new
|
24
|
-
end
|
25
|
-
|
26
|
-
after do
|
27
|
-
# run after each test
|
28
|
-
end
|
29
|
-
|
30
|
-
describe 'test an instance of ContentSummary' do
|
31
|
-
it 'should create an instance of ContentSummary' do
|
32
|
-
expect(@instance).to be_instance_of(PulpContainerClient::ContentSummary)
|
33
|
-
end
|
34
|
-
end
|
35
|
-
describe 'test attribute "added"' do
|
36
|
-
it 'should work' do
|
37
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
describe 'test attribute "removed"' do
|
42
|
-
it 'should work' do
|
43
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
|
-
end
|
45
|
-
end
|
46
|
-
|
47
|
-
describe 'test attribute "present"' do
|
48
|
-
it 'should work' do
|
49
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
|
-
end
|