pulp_container_client 2.6.0 → 2.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (142) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/README.md +16 -12
  4. data/docs/ContainerContainerDistribution.md +5 -5
  5. data/docs/ContainerContainerDistributionResponse.md +7 -7
  6. data/docs/ContainerContainerPushRepository.md +23 -0
  7. data/docs/ContainerContainerPushRepositoryResponse.md +9 -11
  8. data/docs/ContainerContainerRemote.md +7 -5
  9. data/docs/ContainerContainerRemoteResponse.md +7 -5
  10. data/docs/ManifestCopy.md +1 -1
  11. data/docs/PatchedcontainerContainerDistribution.md +5 -5
  12. data/docs/PatchedcontainerContainerPushRepository.md +23 -0
  13. data/docs/PatchedcontainerContainerRemote.md +7 -5
  14. data/docs/RecursiveManage.md +1 -1
  15. data/docs/RepositoriesContainerPushApi.md +112 -0
  16. data/docs/RepositoriesContainerPushVersionsApi.md +271 -0
  17. data/docs/RepositoriesContainerVersionsApi.md +16 -279
  18. data/docs/TagCopy.md +1 -1
  19. data/lib/pulp_container_client.rb +4 -1
  20. data/lib/pulp_container_client/api/content_blobs_api.rb +1 -1
  21. data/lib/pulp_container_client/api/content_manifests_api.rb +1 -1
  22. data/lib/pulp_container_client/api/content_tags_api.rb +1 -1
  23. data/lib/pulp_container_client/api/contentguards_content_redirect_api.rb +1 -1
  24. data/lib/pulp_container_client/api/distributions_container_api.rb +1 -1
  25. data/lib/pulp_container_client/api/pulp_container_namespaces_api.rb +1 -1
  26. data/lib/pulp_container_client/api/remotes_container_api.rb +1 -1
  27. data/lib/pulp_container_client/api/repositories_container_api.rb +1 -1
  28. data/lib/pulp_container_client/api/repositories_container_push_api.rb +141 -1
  29. data/lib/pulp_container_client/api/repositories_container_push_versions_api.rb +339 -0
  30. data/lib/pulp_container_client/api/repositories_container_versions_api.rb +26 -343
  31. data/lib/pulp_container_client/api/token_api.rb +1 -1
  32. data/lib/pulp_container_client/api_client.rb +12 -8
  33. data/lib/pulp_container_client/api_error.rb +1 -1
  34. data/lib/pulp_container_client/configuration.rb +8 -1
  35. data/lib/pulp_container_client/models/async_operation_response.rb +1 -1
  36. data/lib/pulp_container_client/models/container_blob_response.rb +1 -1
  37. data/lib/pulp_container_client/models/container_container_distribution.rb +21 -21
  38. data/lib/pulp_container_client/models/container_container_distribution_response.rb +25 -25
  39. data/lib/pulp_container_client/models/container_container_namespace.rb +1 -1
  40. data/lib/pulp_container_client/models/container_container_namespace_response.rb +1 -1
  41. data/lib/pulp_container_client/models/container_container_push_repository.rb +259 -0
  42. data/lib/pulp_container_client/models/container_container_push_repository_response.rb +33 -43
  43. data/lib/pulp_container_client/models/container_container_remote.rb +19 -7
  44. data/lib/pulp_container_client/models/container_container_remote_response.rb +19 -7
  45. data/lib/pulp_container_client/models/container_container_repository.rb +1 -1
  46. data/lib/pulp_container_client/models/container_container_repository_response.rb +1 -1
  47. data/lib/pulp_container_client/models/container_content_redirect_content_guard.rb +1 -1
  48. data/lib/pulp_container_client/models/container_content_redirect_content_guard_response.rb +1 -1
  49. data/lib/pulp_container_client/models/container_manifest_response.rb +1 -1
  50. data/lib/pulp_container_client/models/container_tag_response.rb +1 -1
  51. data/lib/pulp_container_client/models/content_summary.rb +1 -1
  52. data/lib/pulp_container_client/models/content_summary_response.rb +1 -1
  53. data/lib/pulp_container_client/models/manifest_copy.rb +2 -2
  54. data/lib/pulp_container_client/models/media_types_enum.rb +1 -1
  55. data/lib/pulp_container_client/models/oci_build_image.rb +1 -1
  56. data/lib/pulp_container_client/models/paginated_repository_version_response_list.rb +1 -1
  57. data/lib/pulp_container_client/models/paginatedcontainer_blob_response_list.rb +1 -1
  58. data/lib/pulp_container_client/models/paginatedcontainer_container_distribution_response_list.rb +1 -1
  59. data/lib/pulp_container_client/models/paginatedcontainer_container_namespace_response_list.rb +1 -1
  60. data/lib/pulp_container_client/models/paginatedcontainer_container_push_repository_response_list.rb +1 -1
  61. data/lib/pulp_container_client/models/paginatedcontainer_container_remote_response_list.rb +1 -1
  62. data/lib/pulp_container_client/models/paginatedcontainer_container_repository_response_list.rb +1 -1
  63. data/lib/pulp_container_client/models/paginatedcontainer_content_redirect_content_guard_response_list.rb +1 -1
  64. data/lib/pulp_container_client/models/paginatedcontainer_manifest_response_list.rb +1 -1
  65. data/lib/pulp_container_client/models/paginatedcontainer_tag_response_list.rb +1 -1
  66. data/lib/pulp_container_client/models/patchedcontainer_container_distribution.rb +21 -21
  67. data/lib/pulp_container_client/models/patchedcontainer_container_push_repository.rb +254 -0
  68. data/lib/pulp_container_client/models/patchedcontainer_container_remote.rb +19 -7
  69. data/lib/pulp_container_client/models/patchedcontainer_container_repository.rb +1 -1
  70. data/lib/pulp_container_client/models/patchedcontainer_content_redirect_content_guard.rb +1 -1
  71. data/lib/pulp_container_client/models/policy_enum.rb +1 -1
  72. data/lib/pulp_container_client/models/recursive_manage.rb +2 -2
  73. data/lib/pulp_container_client/models/remove_image.rb +1 -1
  74. data/lib/pulp_container_client/models/repository_sync_url.rb +1 -1
  75. data/lib/pulp_container_client/models/repository_version.rb +1 -1
  76. data/lib/pulp_container_client/models/repository_version_response.rb +1 -1
  77. data/lib/pulp_container_client/models/tag_copy.rb +2 -2
  78. data/lib/pulp_container_client/models/tag_image.rb +1 -1
  79. data/lib/pulp_container_client/models/un_tag_image.rb +1 -1
  80. data/lib/pulp_container_client/version.rb +2 -2
  81. data/pulp_container_client.gemspec +1 -1
  82. data/spec/api/content_blobs_api_spec.rb +1 -1
  83. data/spec/api/content_manifests_api_spec.rb +1 -1
  84. data/spec/api/content_tags_api_spec.rb +1 -1
  85. data/spec/api/contentguards_content_redirect_api_spec.rb +1 -1
  86. data/spec/api/distributions_container_api_spec.rb +1 -1
  87. data/spec/api/pulp_container_namespaces_api_spec.rb +1 -1
  88. data/spec/api/remotes_container_api_spec.rb +1 -1
  89. data/spec/api/repositories_container_api_spec.rb +1 -1
  90. data/spec/api/repositories_container_push_api_spec.rb +27 -1
  91. data/spec/api/repositories_container_push_versions_api_spec.rb +104 -0
  92. data/spec/api/repositories_container_versions_api_spec.rb +5 -74
  93. data/spec/api/token_api_spec.rb +1 -1
  94. data/spec/api_client_spec.rb +2 -2
  95. data/spec/configuration_spec.rb +1 -1
  96. data/spec/models/async_operation_response_spec.rb +1 -1
  97. data/spec/models/container_blob_response_spec.rb +1 -1
  98. data/spec/models/container_container_distribution_response_spec.rb +8 -8
  99. data/spec/models/container_container_distribution_spec.rb +6 -6
  100. data/spec/models/container_container_namespace_response_spec.rb +1 -1
  101. data/spec/models/container_container_namespace_spec.rb +1 -1
  102. data/spec/models/container_container_push_repository_response_spec.rb +7 -13
  103. data/spec/models/container_container_push_repository_spec.rb +59 -0
  104. data/spec/models/container_container_remote_response_spec.rb +7 -1
  105. data/spec/models/container_container_remote_spec.rb +7 -1
  106. data/spec/models/container_container_repository_response_spec.rb +1 -1
  107. data/spec/models/container_container_repository_spec.rb +1 -1
  108. data/spec/models/container_content_redirect_content_guard_response_spec.rb +1 -1
  109. data/spec/models/container_content_redirect_content_guard_spec.rb +1 -1
  110. data/spec/models/container_manifest_response_spec.rb +1 -1
  111. data/spec/models/container_tag_response_spec.rb +1 -1
  112. data/spec/models/content_summary_response_spec.rb +1 -1
  113. data/spec/models/content_summary_spec.rb +1 -1
  114. data/spec/models/manifest_copy_spec.rb +1 -1
  115. data/spec/models/media_types_enum_spec.rb +1 -1
  116. data/spec/models/oci_build_image_spec.rb +1 -1
  117. data/spec/models/paginated_repository_version_response_list_spec.rb +1 -1
  118. data/spec/models/paginatedcontainer_blob_response_list_spec.rb +1 -1
  119. data/spec/models/paginatedcontainer_container_distribution_response_list_spec.rb +1 -1
  120. data/spec/models/paginatedcontainer_container_namespace_response_list_spec.rb +1 -1
  121. data/spec/models/paginatedcontainer_container_push_repository_response_list_spec.rb +1 -1
  122. data/spec/models/paginatedcontainer_container_remote_response_list_spec.rb +1 -1
  123. data/spec/models/paginatedcontainer_container_repository_response_list_spec.rb +1 -1
  124. data/spec/models/paginatedcontainer_content_redirect_content_guard_response_list_spec.rb +1 -1
  125. data/spec/models/paginatedcontainer_manifest_response_list_spec.rb +1 -1
  126. data/spec/models/paginatedcontainer_tag_response_list_spec.rb +1 -1
  127. data/spec/models/patchedcontainer_container_distribution_spec.rb +6 -6
  128. data/spec/models/patchedcontainer_container_push_repository_spec.rb +59 -0
  129. data/spec/models/patchedcontainer_container_remote_spec.rb +7 -1
  130. data/spec/models/patchedcontainer_container_repository_spec.rb +1 -1
  131. data/spec/models/patchedcontainer_content_redirect_content_guard_spec.rb +1 -1
  132. data/spec/models/policy_enum_spec.rb +1 -1
  133. data/spec/models/recursive_manage_spec.rb +1 -1
  134. data/spec/models/remove_image_spec.rb +1 -1
  135. data/spec/models/repository_sync_url_spec.rb +1 -1
  136. data/spec/models/repository_version_response_spec.rb +1 -1
  137. data/spec/models/repository_version_spec.rb +1 -1
  138. data/spec/models/tag_copy_spec.rb +1 -1
  139. data/spec/models/tag_image_spec.rb +1 -1
  140. data/spec/models/un_tag_image_spec.rb +1 -1
  141. data/spec/spec_helper.rb +1 -1
  142. metadata +51 -39
@@ -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
 
@@ -53,8 +53,10 @@ module PulpContainerClient
53
53
  :client_cert => @config.ssl_client_cert,
54
54
  :client_key => @config.ssl_client_key
55
55
  }
56
-
57
- connection = Faraday.new(:url => config.base_url, :ssl => ssl_options) do |conn|
56
+ request_options = {
57
+ :params_encoder => @config.params_encoder
58
+ }
59
+ connection = Faraday.new(:url => config.base_url, :ssl => ssl_options, :request => request_options) do |conn|
58
60
  conn.basic_auth(config.username, config.password)
59
61
  if opts[:header_params]["Content-Type"] == "multipart/form-data"
60
62
  conn.request :multipart
@@ -285,11 +287,13 @@ module PulpContainerClient
285
287
  tempfile.write(chunk)
286
288
  end
287
289
  request.on_complete do |response|
288
- tempfile.close if tempfile
289
- @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
290
- "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
291
- "will be deleted automatically with GC. It's also recommended to delete the temp file "\
292
- "explicitly with `tempfile.delete`"
290
+ if tempfile
291
+ tempfile.close
292
+ @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
293
+ "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
294
+ "will be deleted automatically with GC. It's also recommended to delete the temp file "\
295
+ "explicitly with `tempfile.delete`"
296
+ end
293
297
  end
294
298
  end
295
299
 
@@ -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
 
@@ -109,6 +109,12 @@ module PulpContainerClient
109
109
  # Client private key file (for client certificate)
110
110
  attr_accessor :ssl_client_key
111
111
 
112
+ # Set this to customize parameters encoder of array parameter.
113
+ # Default to nil. Faraday uses NestedParamsEncoder when nil.
114
+ #
115
+ # @see The params_encoder option of Faraday. Related source code:
116
+ # https://github.com/lostisland/faraday/tree/main/lib/faraday/encoders
117
+ attr_accessor :params_encoder
112
118
  # Set this to customize parameters encoding of array parameter with multi collectionFormat.
113
119
  # Default to nil.
114
120
  #
@@ -133,6 +139,7 @@ module PulpContainerClient
133
139
  @ssl_ca_file = nil
134
140
  @ssl_client_cert = nil
135
141
  @ssl_client_key = nil
142
+ @params_encoder = nil
136
143
  @debugging = false
137
144
  @inject_format = false
138
145
  @force_ending_format = false
@@ -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
 
@@ -15,20 +15,20 @@ require 'date'
15
15
  module PulpContainerClient
16
16
  # A serializer for ContainerDistribution.
17
17
  class ContainerContainerDistribution
18
- # The latest RepositoryVersion for this Repository will be served.
19
- attr_accessor :repository
20
-
21
- attr_accessor :pulp_labels
22
-
23
18
  # A unique name. Ex, `rawhide` and `stable`.
24
19
  attr_accessor :name
25
20
 
21
+ # The latest RepositoryVersion for this Repository will be served.
22
+ attr_accessor :repository
23
+
26
24
  # An optional content-guard. If none is specified, a default one will be used.
27
25
  attr_accessor :content_guard
28
26
 
29
27
  # The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\")
30
28
  attr_accessor :base_path
31
29
 
30
+ attr_accessor :pulp_labels
31
+
32
32
  # RepositoryVersion to be served
33
33
  attr_accessor :repository_version
34
34
 
@@ -41,11 +41,11 @@ module PulpContainerClient
41
41
  # Attribute mapping from ruby-style variable name to JSON key.
42
42
  def self.attribute_map
43
43
  {
44
- :'repository' => :'repository',
45
- :'pulp_labels' => :'pulp_labels',
46
44
  :'name' => :'name',
45
+ :'repository' => :'repository',
47
46
  :'content_guard' => :'content_guard',
48
47
  :'base_path' => :'base_path',
48
+ :'pulp_labels' => :'pulp_labels',
49
49
  :'repository_version' => :'repository_version',
50
50
  :'private' => :'private',
51
51
  :'description' => :'description'
@@ -55,11 +55,11 @@ module PulpContainerClient
55
55
  # Attribute type mapping.
56
56
  def self.openapi_types
57
57
  {
58
- :'repository' => :'String',
59
- :'pulp_labels' => :'Object',
60
58
  :'name' => :'String',
59
+ :'repository' => :'String',
61
60
  :'content_guard' => :'String',
62
61
  :'base_path' => :'String',
62
+ :'pulp_labels' => :'Object',
63
63
  :'repository_version' => :'String',
64
64
  :'private' => :'Boolean',
65
65
  :'description' => :'String'
@@ -90,18 +90,14 @@ module PulpContainerClient
90
90
  h[k.to_sym] = v
91
91
  }
92
92
 
93
- if attributes.key?(:'repository')
94
- self.repository = attributes[:'repository']
95
- end
96
-
97
- if attributes.key?(:'pulp_labels')
98
- self.pulp_labels = attributes[:'pulp_labels']
99
- end
100
-
101
93
  if attributes.key?(:'name')
102
94
  self.name = attributes[:'name']
103
95
  end
104
96
 
97
+ if attributes.key?(:'repository')
98
+ self.repository = attributes[:'repository']
99
+ end
100
+
105
101
  if attributes.key?(:'content_guard')
106
102
  self.content_guard = attributes[:'content_guard']
107
103
  end
@@ -110,6 +106,10 @@ module PulpContainerClient
110
106
  self.base_path = attributes[:'base_path']
111
107
  end
112
108
 
109
+ if attributes.key?(:'pulp_labels')
110
+ self.pulp_labels = attributes[:'pulp_labels']
111
+ end
112
+
113
113
  if attributes.key?(:'repository_version')
114
114
  self.repository_version = attributes[:'repository_version']
115
115
  end
@@ -151,11 +151,11 @@ module PulpContainerClient
151
151
  def ==(o)
152
152
  return true if self.equal?(o)
153
153
  self.class == o.class &&
154
- repository == o.repository &&
155
- pulp_labels == o.pulp_labels &&
156
154
  name == o.name &&
155
+ repository == o.repository &&
157
156
  content_guard == o.content_guard &&
158
157
  base_path == o.base_path &&
158
+ pulp_labels == o.pulp_labels &&
159
159
  repository_version == o.repository_version &&
160
160
  private == o.private &&
161
161
  description == o.description
@@ -170,7 +170,7 @@ module PulpContainerClient
170
170
  # Calculates hash code according to all attributes.
171
171
  # @return [Integer] Hash code
172
172
  def hash
173
- [repository, pulp_labels, name, content_guard, base_path, repository_version, private, description].hash
173
+ [name, repository, content_guard, base_path, pulp_labels, repository_version, private, description].hash
174
174
  end
175
175
 
176
176
  # 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
 
@@ -15,18 +15,16 @@ require 'date'
15
15
  module PulpContainerClient
16
16
  # A serializer for ContainerDistribution.
17
17
  class ContainerContainerDistributionResponse
18
- # The latest RepositoryVersion for this Repository will be served.
19
- attr_accessor :repository
20
-
21
18
  # Timestamp of creation.
22
19
  attr_accessor :pulp_created
23
20
 
24
- attr_accessor :pulp_labels
21
+ # A unique name. Ex, `rawhide` and `stable`.
22
+ attr_accessor :name
25
23
 
26
24
  attr_accessor :pulp_href
27
25
 
28
- # A unique name. Ex, `rawhide` and `stable`.
29
- attr_accessor :name
26
+ # The latest RepositoryVersion for this Repository will be served.
27
+ attr_accessor :repository
30
28
 
31
29
  # An optional content-guard. If none is specified, a default one will be used.
32
30
  attr_accessor :content_guard
@@ -34,6 +32,8 @@ module PulpContainerClient
34
32
  # The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\")
35
33
  attr_accessor :base_path
36
34
 
35
+ attr_accessor :pulp_labels
36
+
37
37
  # RepositoryVersion to be served
38
38
  attr_accessor :repository_version
39
39
 
@@ -52,13 +52,13 @@ module PulpContainerClient
52
52
  # Attribute mapping from ruby-style variable name to JSON key.
53
53
  def self.attribute_map
54
54
  {
55
- :'repository' => :'repository',
56
55
  :'pulp_created' => :'pulp_created',
57
- :'pulp_labels' => :'pulp_labels',
58
- :'pulp_href' => :'pulp_href',
59
56
  :'name' => :'name',
57
+ :'pulp_href' => :'pulp_href',
58
+ :'repository' => :'repository',
60
59
  :'content_guard' => :'content_guard',
61
60
  :'base_path' => :'base_path',
61
+ :'pulp_labels' => :'pulp_labels',
62
62
  :'repository_version' => :'repository_version',
63
63
  :'registry_path' => :'registry_path',
64
64
  :'namespace' => :'namespace',
@@ -70,13 +70,13 @@ module PulpContainerClient
70
70
  # Attribute type mapping.
71
71
  def self.openapi_types
72
72
  {
73
- :'repository' => :'String',
74
73
  :'pulp_created' => :'DateTime',
75
- :'pulp_labels' => :'Object',
76
- :'pulp_href' => :'String',
77
74
  :'name' => :'String',
75
+ :'pulp_href' => :'String',
76
+ :'repository' => :'String',
78
77
  :'content_guard' => :'String',
79
78
  :'base_path' => :'String',
79
+ :'pulp_labels' => :'Object',
80
80
  :'repository_version' => :'String',
81
81
  :'registry_path' => :'String',
82
82
  :'namespace' => :'String',
@@ -109,24 +109,20 @@ module PulpContainerClient
109
109
  h[k.to_sym] = v
110
110
  }
111
111
 
112
- if attributes.key?(:'repository')
113
- self.repository = attributes[:'repository']
114
- end
115
-
116
112
  if attributes.key?(:'pulp_created')
117
113
  self.pulp_created = attributes[:'pulp_created']
118
114
  end
119
115
 
120
- if attributes.key?(:'pulp_labels')
121
- self.pulp_labels = attributes[:'pulp_labels']
116
+ if attributes.key?(:'name')
117
+ self.name = attributes[:'name']
122
118
  end
123
119
 
124
120
  if attributes.key?(:'pulp_href')
125
121
  self.pulp_href = attributes[:'pulp_href']
126
122
  end
127
123
 
128
- if attributes.key?(:'name')
129
- self.name = attributes[:'name']
124
+ if attributes.key?(:'repository')
125
+ self.repository = attributes[:'repository']
130
126
  end
131
127
 
132
128
  if attributes.key?(:'content_guard')
@@ -137,6 +133,10 @@ module PulpContainerClient
137
133
  self.base_path = attributes[:'base_path']
138
134
  end
139
135
 
136
+ if attributes.key?(:'pulp_labels')
137
+ self.pulp_labels = attributes[:'pulp_labels']
138
+ end
139
+
140
140
  if attributes.key?(:'repository_version')
141
141
  self.repository_version = attributes[:'repository_version']
142
142
  end
@@ -186,13 +186,13 @@ module PulpContainerClient
186
186
  def ==(o)
187
187
  return true if self.equal?(o)
188
188
  self.class == o.class &&
189
- repository == o.repository &&
190
189
  pulp_created == o.pulp_created &&
191
- pulp_labels == o.pulp_labels &&
192
- pulp_href == o.pulp_href &&
193
190
  name == o.name &&
191
+ pulp_href == o.pulp_href &&
192
+ repository == o.repository &&
194
193
  content_guard == o.content_guard &&
195
194
  base_path == o.base_path &&
195
+ pulp_labels == o.pulp_labels &&
196
196
  repository_version == o.repository_version &&
197
197
  registry_path == o.registry_path &&
198
198
  namespace == o.namespace &&
@@ -209,7 +209,7 @@ module PulpContainerClient
209
209
  # Calculates hash code according to all attributes.
210
210
  # @return [Integer] Hash code
211
211
  def hash
212
- [repository, pulp_created, pulp_labels, pulp_href, name, content_guard, base_path, repository_version, registry_path, namespace, private, description].hash
212
+ [pulp_created, name, pulp_href, repository, content_guard, base_path, pulp_labels, repository_version, registry_path, namespace, private, description].hash
213
213
  end
214
214
 
215
215
  # 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
 
@@ -0,0 +1,259 @@
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 Container Push Repositories.
17
+ class ContainerContainerPushRepository
18
+ # A unique name for this repository.
19
+ attr_accessor :name
20
+
21
+ # An optional description.
22
+ attr_accessor :description
23
+
24
+ # 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.
25
+ attr_accessor :retained_versions
26
+
27
+ attr_accessor :pulp_labels
28
+
29
+ # Attribute mapping from ruby-style variable name to JSON key.
30
+ def self.attribute_map
31
+ {
32
+ :'name' => :'name',
33
+ :'description' => :'description',
34
+ :'retained_versions' => :'retained_versions',
35
+ :'pulp_labels' => :'pulp_labels'
36
+ }
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ def self.openapi_types
41
+ {
42
+ :'name' => :'String',
43
+ :'description' => :'String',
44
+ :'retained_versions' => :'Integer',
45
+ :'pulp_labels' => :'Object'
46
+ }
47
+ end
48
+
49
+ # List of attributes with nullable: true
50
+ def self.openapi_nullable
51
+ Set.new([
52
+ :'description',
53
+ :'retained_versions',
54
+ ])
55
+ end
56
+
57
+ # Initializes the object
58
+ # @param [Hash] attributes Model attributes in the form of hash
59
+ def initialize(attributes = {})
60
+ if (!attributes.is_a?(Hash))
61
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpContainerClient::ContainerContainerPushRepository` initialize method"
62
+ end
63
+
64
+ # check to see if the attribute exists and convert string to symbol for hash key
65
+ attributes = attributes.each_with_object({}) { |(k, v), h|
66
+ if (!self.class.attribute_map.key?(k.to_sym))
67
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpContainerClient::ContainerContainerPushRepository`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
68
+ end
69
+ h[k.to_sym] = v
70
+ }
71
+
72
+ if attributes.key?(:'name')
73
+ self.name = attributes[:'name']
74
+ end
75
+
76
+ if attributes.key?(:'description')
77
+ self.description = attributes[:'description']
78
+ end
79
+
80
+ if attributes.key?(:'retained_versions')
81
+ self.retained_versions = attributes[:'retained_versions']
82
+ end
83
+
84
+ if attributes.key?(:'pulp_labels')
85
+ self.pulp_labels = attributes[:'pulp_labels']
86
+ end
87
+ end
88
+
89
+ # Show invalid properties with the reasons. Usually used together with valid?
90
+ # @return Array for valid properties with the reasons
91
+ def list_invalid_properties
92
+ invalid_properties = Array.new
93
+ if @name.nil?
94
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
95
+ end
96
+
97
+ if !@retained_versions.nil? && @retained_versions < 1
98
+ invalid_properties.push('invalid value for "retained_versions", must be greater than or equal to 1.')
99
+ end
100
+
101
+ invalid_properties
102
+ end
103
+
104
+ # Check to see if the all the properties in the model are valid
105
+ # @return true if the model is valid
106
+ def valid?
107
+ return false if @name.nil?
108
+ return false if !@retained_versions.nil? && @retained_versions < 1
109
+ true
110
+ end
111
+
112
+ # Custom attribute writer method with validation
113
+ # @param [Object] retained_versions Value to be assigned
114
+ def retained_versions=(retained_versions)
115
+ if !retained_versions.nil? && retained_versions < 1
116
+ fail ArgumentError, 'invalid value for "retained_versions", must be greater than or equal to 1.'
117
+ end
118
+
119
+ @retained_versions = retained_versions
120
+ end
121
+
122
+ # Checks equality by comparing each attribute.
123
+ # @param [Object] Object to be compared
124
+ def ==(o)
125
+ return true if self.equal?(o)
126
+ self.class == o.class &&
127
+ name == o.name &&
128
+ description == o.description &&
129
+ retained_versions == o.retained_versions &&
130
+ pulp_labels == o.pulp_labels
131
+ end
132
+
133
+ # @see the `==` method
134
+ # @param [Object] Object to be compared
135
+ def eql?(o)
136
+ self == o
137
+ end
138
+
139
+ # Calculates hash code according to all attributes.
140
+ # @return [Integer] Hash code
141
+ def hash
142
+ [name, description, retained_versions, pulp_labels].hash
143
+ end
144
+
145
+ # Builds the object from hash
146
+ # @param [Hash] attributes Model attributes in the form of hash
147
+ # @return [Object] Returns the model itself
148
+ def self.build_from_hash(attributes)
149
+ new.build_from_hash(attributes)
150
+ end
151
+
152
+ # Builds the object from hash
153
+ # @param [Hash] attributes Model attributes in the form of hash
154
+ # @return [Object] Returns the model itself
155
+ def build_from_hash(attributes)
156
+ return nil unless attributes.is_a?(Hash)
157
+ self.class.openapi_types.each_pair do |key, type|
158
+ if type =~ /\AArray<(.*)>/i
159
+ # check to ensure the input is an array given that the attribute
160
+ # is documented as an array but the input is not
161
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
162
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
163
+ end
164
+ elsif !attributes[self.class.attribute_map[key]].nil?
165
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
166
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
167
+ end
168
+
169
+ self
170
+ end
171
+
172
+ # Deserializes the data based on type
173
+ # @param string type Data type
174
+ # @param string value Value to be deserialized
175
+ # @return [Object] Deserialized data
176
+ def _deserialize(type, value)
177
+ case type.to_sym
178
+ when :DateTime
179
+ DateTime.parse(value)
180
+ when :Date
181
+ Date.parse(value)
182
+ when :String
183
+ value.to_s
184
+ when :Integer
185
+ value.to_i
186
+ when :Float
187
+ value.to_f
188
+ when :Boolean
189
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
190
+ true
191
+ else
192
+ false
193
+ end
194
+ when :Object
195
+ # generic object (usually a Hash), return directly
196
+ value
197
+ when /\AArray<(?<inner_type>.+)>\z/
198
+ inner_type = Regexp.last_match[:inner_type]
199
+ value.map { |v| _deserialize(inner_type, v) }
200
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
201
+ k_type = Regexp.last_match[:k_type]
202
+ v_type = Regexp.last_match[:v_type]
203
+ {}.tap do |hash|
204
+ value.each do |k, v|
205
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
206
+ end
207
+ end
208
+ else # model
209
+ PulpContainerClient.const_get(type).build_from_hash(value)
210
+ end
211
+ end
212
+
213
+ # Returns the string representation of the object
214
+ # @return [String] String presentation of the object
215
+ def to_s
216
+ to_hash.to_s
217
+ end
218
+
219
+ # to_body is an alias to to_hash (backward compatibility)
220
+ # @return [Hash] Returns the object in the form of hash
221
+ def to_body
222
+ to_hash
223
+ end
224
+
225
+ # Returns the object in the form of hash
226
+ # @return [Hash] Returns the object in the form of hash
227
+ def to_hash
228
+ hash = {}
229
+ self.class.attribute_map.each_pair do |attr, param|
230
+ value = self.send(attr)
231
+ if value.nil?
232
+ is_nullable = self.class.openapi_nullable.include?(attr)
233
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
234
+ end
235
+
236
+ hash[param] = _to_hash(value)
237
+ end
238
+ hash
239
+ end
240
+
241
+ # Outputs non-array value in the form of hash
242
+ # For object, use to_hash. Otherwise, just return the value
243
+ # @param [Object] value Any valid value
244
+ # @return [Hash] Returns the value in the form of hash
245
+ def _to_hash(value)
246
+ if value.is_a?(Array)
247
+ value.compact.map { |v| _to_hash(v) }
248
+ elsif value.is_a?(Hash)
249
+ {}.tap do |hash|
250
+ value.each { |k, v| hash[k] = _to_hash(v) }
251
+ end
252
+ elsif value.respond_to? :to_hash
253
+ value.to_hash
254
+ else
255
+ value
256
+ end
257
+ end
258
+ end
259
+ end