pulp_container_client 2.22.1 → 2.23.0

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.
Files changed (244) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +17 -14
  3. data/docs/AsyncOperationResponse.md +8 -7
  4. data/docs/ContainerBlobResponse.md +18 -17
  5. data/docs/ContainerContainerDistribution.md +24 -23
  6. data/docs/ContainerContainerDistributionResponse.md +40 -39
  7. data/docs/ContainerContainerNamespace.md +8 -7
  8. data/docs/ContainerContainerNamespaceResponse.md +16 -15
  9. data/docs/ContainerContainerPullThroughDistribution.md +26 -25
  10. data/docs/ContainerContainerPullThroughDistributionResponse.md +38 -37
  11. data/docs/ContainerContainerPullThroughRemote.md +52 -51
  12. data/docs/ContainerContainerPullThroughRemoteResponse.md +52 -51
  13. data/docs/ContainerContainerPullThroughRemoteResponseHiddenFieldsInner.md +20 -0
  14. data/docs/ContainerContainerPushRepository.md +16 -15
  15. data/docs/ContainerContainerPushRepositoryResponse.md +28 -27
  16. data/docs/ContainerContainerRemote.md +56 -55
  17. data/docs/ContainerContainerRemoteResponse.md +56 -55
  18. data/docs/ContainerContainerRepository.md +18 -17
  19. data/docs/ContainerContainerRepositoryResponse.md +30 -29
  20. data/docs/ContainerManifestResponse.md +42 -41
  21. data/docs/ContainerManifestSignatureResponse.md +28 -27
  22. data/docs/ContainerRepositorySyncURL.md +12 -11
  23. data/docs/ContainerTagResponse.md +18 -17
  24. data/docs/ContentBlobsApi.md +82 -49
  25. data/docs/ContentManifestsApi.md +86 -53
  26. data/docs/ContentSignaturesApi.md +97 -64
  27. data/docs/ContentSummaryResponse.md +12 -11
  28. data/docs/ContentTagsApi.md +86 -53
  29. data/docs/DistributionsContainerApi.md +386 -183
  30. data/docs/DistributionsPullThroughApi.md +385 -182
  31. data/docs/ManifestCopy.md +14 -13
  32. data/docs/MediaTypesEnum.md +4 -5
  33. data/docs/MyPermissionsResponse.md +8 -7
  34. data/docs/NestedRole.md +12 -11
  35. data/docs/NestedRoleResponse.md +12 -11
  36. data/docs/ObjectRolesResponse.md +8 -7
  37. data/docs/PaginatedRepositoryVersionResponseList.md +14 -13
  38. data/docs/PaginatedcontainerBlobResponseList.md +14 -13
  39. data/docs/PaginatedcontainerContainerDistributionResponseList.md +14 -13
  40. data/docs/PaginatedcontainerContainerNamespaceResponseList.md +14 -13
  41. data/docs/PaginatedcontainerContainerPullThroughDistributionResponseList.md +14 -13
  42. data/docs/PaginatedcontainerContainerPullThroughRemoteResponseList.md +14 -13
  43. data/docs/PaginatedcontainerContainerPushRepositoryResponseList.md +14 -13
  44. data/docs/PaginatedcontainerContainerRemoteResponseList.md +14 -13
  45. data/docs/PaginatedcontainerContainerRepositoryResponseList.md +14 -13
  46. data/docs/PaginatedcontainerManifestResponseList.md +14 -13
  47. data/docs/PaginatedcontainerManifestSignatureResponseList.md +14 -13
  48. data/docs/PaginatedcontainerTagResponseList.md +14 -13
  49. data/docs/PatchedcontainerContainerDistribution.md +24 -23
  50. data/docs/PatchedcontainerContainerPullThroughDistribution.md +26 -25
  51. data/docs/PatchedcontainerContainerPullThroughRemote.md +52 -51
  52. data/docs/PatchedcontainerContainerPushRepository.md +16 -15
  53. data/docs/PatchedcontainerContainerRemote.md +56 -55
  54. data/docs/PatchedcontainerContainerRepository.md +18 -17
  55. data/docs/Policy692Enum.md +4 -5
  56. data/docs/Policy7e0Enum.md +4 -5
  57. data/docs/PulpContainerNamespacesApi.md +259 -124
  58. data/docs/RecursiveManage.md +8 -7
  59. data/docs/RemotesContainerApi.md +389 -184
  60. data/docs/RemotesPullThroughApi.md +389 -184
  61. data/docs/RemoveImage.md +8 -7
  62. data/docs/RemoveSignatures.md +8 -7
  63. data/docs/RemoveSignaturesResponse.md +8 -7
  64. data/docs/Repair.md +8 -7
  65. data/docs/RepositoriesContainerApi.md +647 -291
  66. data/docs/RepositoriesContainerPushApi.md +419 -198
  67. data/docs/RepositoriesContainerPushVersionsApi.md +152 -82
  68. data/docs/RepositoriesContainerVersionsApi.md +152 -82
  69. data/docs/RepositorySign.md +12 -11
  70. data/docs/RepositoryVersionResponse.md +22 -21
  71. data/docs/SetLabel.md +10 -9
  72. data/docs/SetLabelResponse.md +10 -9
  73. data/docs/TagCopy.md +12 -11
  74. data/docs/TagImage.md +10 -9
  75. data/docs/TokenApi.md +25 -7
  76. data/docs/UnTagImage.md +8 -7
  77. data/docs/UnsetLabel.md +8 -7
  78. data/docs/UnsetLabelResponse.md +10 -9
  79. data/lib/pulp_container_client/api/content_blobs_api.rb +11 -9
  80. data/lib/pulp_container_client/api/content_manifests_api.rb +11 -9
  81. data/lib/pulp_container_client/api/content_signatures_api.rb +11 -9
  82. data/lib/pulp_container_client/api/content_tags_api.rb +11 -9
  83. data/lib/pulp_container_client/api/distributions_container_api.rb +89 -56
  84. data/lib/pulp_container_client/api/distributions_pull_through_api.rb +89 -56
  85. data/lib/pulp_container_client/api/pulp_container_namespaces_api.rb +53 -36
  86. data/lib/pulp_container_client/api/remotes_container_api.rb +104 -68
  87. data/lib/pulp_container_client/api/remotes_pull_through_api.rb +104 -68
  88. data/lib/pulp_container_client/api/repositories_container_api.rb +171 -102
  89. data/lib/pulp_container_client/api/repositories_container_push_api.rb +102 -62
  90. data/lib/pulp_container_client/api/repositories_container_push_versions_api.rb +40 -30
  91. data/lib/pulp_container_client/api/repositories_container_versions_api.rb +40 -30
  92. data/lib/pulp_container_client/api/token_api.rb +5 -4
  93. data/lib/pulp_container_client/api_client.rb +137 -102
  94. data/lib/pulp_container_client/api_error.rb +2 -1
  95. data/lib/pulp_container_client/configuration.rb +162 -21
  96. data/lib/pulp_container_client/models/async_operation_response.rb +32 -22
  97. data/lib/pulp_container_client/models/container_blob_response.rb +37 -29
  98. data/lib/pulp_container_client/models/container_container_distribution.rb +86 -74
  99. data/lib/pulp_container_client/models/container_container_distribution_response.rb +95 -83
  100. data/lib/pulp_container_client/models/container_container_namespace.rb +32 -22
  101. data/lib/pulp_container_client/models/container_container_namespace_response.rb +34 -24
  102. data/lib/pulp_container_client/models/container_container_pull_through_distribution.rb +88 -74
  103. data/lib/pulp_container_client/models/container_container_pull_through_distribution_response.rb +97 -83
  104. data/lib/pulp_container_client/models/container_container_pull_through_remote.rb +56 -22
  105. data/lib/pulp_container_client/models/container_container_pull_through_remote_response.rb +59 -25
  106. data/lib/pulp_container_client/models/{container_container_pull_through_remote_response_hidden_fields.rb → container_container_pull_through_remote_response_hidden_fields_inner.rb} +37 -25
  107. data/lib/pulp_container_client/models/container_container_push_repository.rb +83 -73
  108. data/lib/pulp_container_client/models/container_container_push_repository_response.rb +91 -81
  109. data/lib/pulp_container_client/models/container_container_remote.rb +63 -23
  110. data/lib/pulp_container_client/models/container_container_remote_response.rb +61 -25
  111. data/lib/pulp_container_client/models/container_container_repository.rb +32 -22
  112. data/lib/pulp_container_client/models/container_container_repository_response.rb +34 -24
  113. data/lib/pulp_container_client/models/container_manifest_response.rb +42 -24
  114. data/lib/pulp_container_client/models/container_manifest_signature_response.rb +46 -24
  115. data/lib/pulp_container_client/models/container_repository_sync_url.rb +30 -22
  116. data/lib/pulp_container_client/models/container_tag_response.rb +36 -24
  117. data/lib/pulp_container_client/models/content_summary_response.rb +36 -22
  118. data/lib/pulp_container_client/models/manifest_copy.rb +31 -23
  119. data/lib/pulp_container_client/models/media_types_enum.rb +8 -4
  120. data/lib/pulp_container_client/models/my_permissions_response.rb +32 -22
  121. data/lib/pulp_container_client/models/nested_role.rb +32 -22
  122. data/lib/pulp_container_client/models/nested_role_response.rb +32 -22
  123. data/lib/pulp_container_client/models/object_roles_response.rb +32 -22
  124. data/lib/pulp_container_client/models/paginated_repository_version_response_list.rb +34 -22
  125. data/lib/pulp_container_client/models/paginatedcontainer_blob_response_list.rb +34 -22
  126. data/lib/pulp_container_client/models/paginatedcontainer_container_distribution_response_list.rb +34 -22
  127. data/lib/pulp_container_client/models/paginatedcontainer_container_namespace_response_list.rb +34 -22
  128. data/lib/pulp_container_client/models/paginatedcontainer_container_pull_through_distribution_response_list.rb +34 -22
  129. data/lib/pulp_container_client/models/paginatedcontainer_container_pull_through_remote_response_list.rb +34 -22
  130. data/lib/pulp_container_client/models/paginatedcontainer_container_push_repository_response_list.rb +34 -22
  131. data/lib/pulp_container_client/models/paginatedcontainer_container_remote_response_list.rb +34 -22
  132. data/lib/pulp_container_client/models/paginatedcontainer_container_repository_response_list.rb +34 -22
  133. data/lib/pulp_container_client/models/paginatedcontainer_manifest_response_list.rb +34 -22
  134. data/lib/pulp_container_client/models/paginatedcontainer_manifest_signature_response_list.rb +34 -22
  135. data/lib/pulp_container_client/models/paginatedcontainer_tag_response_list.rb +34 -22
  136. data/lib/pulp_container_client/models/patchedcontainer_container_distribution.rb +81 -65
  137. data/lib/pulp_container_client/models/patchedcontainer_container_pull_through_distribution.rb +81 -65
  138. data/lib/pulp_container_client/models/patchedcontainer_container_pull_through_remote.rb +62 -24
  139. data/lib/pulp_container_client/models/patchedcontainer_container_push_repository.rb +77 -65
  140. data/lib/pulp_container_client/models/patchedcontainer_container_remote.rb +72 -26
  141. data/lib/pulp_container_client/models/patchedcontainer_container_repository.rb +35 -23
  142. data/lib/pulp_container_client/models/policy692_enum.rb +8 -4
  143. data/lib/pulp_container_client/models/policy7e0_enum.rb +8 -4
  144. data/lib/pulp_container_client/models/recursive_manage.rb +31 -23
  145. data/lib/pulp_container_client/models/remove_image.rb +32 -22
  146. data/lib/pulp_container_client/models/remove_signatures.rb +32 -22
  147. data/lib/pulp_container_client/models/remove_signatures_response.rb +32 -22
  148. data/lib/pulp_container_client/models/repair.rb +30 -22
  149. data/lib/pulp_container_client/models/repository_sign.rb +36 -24
  150. data/lib/pulp_container_client/models/repository_version_response.rb +32 -24
  151. data/lib/pulp_container_client/models/set_label.rb +34 -22
  152. data/lib/pulp_container_client/models/set_label_response.rb +34 -22
  153. data/lib/pulp_container_client/models/tag_copy.rb +31 -23
  154. data/lib/pulp_container_client/models/tag_image.rb +34 -22
  155. data/lib/pulp_container_client/models/un_tag_image.rb +32 -22
  156. data/lib/pulp_container_client/models/unset_label.rb +32 -22
  157. data/lib/pulp_container_client/models/unset_label_response.rb +32 -22
  158. data/lib/pulp_container_client/version.rb +2 -2
  159. data/lib/pulp_container_client.rb +2 -3
  160. data/pulp_container_client.gemspec +9 -6
  161. data/spec/api/content_blobs_api_spec.rb +3 -3
  162. data/spec/api/content_manifests_api_spec.rb +3 -3
  163. data/spec/api/content_signatures_api_spec.rb +3 -3
  164. data/spec/api/content_tags_api_spec.rb +3 -3
  165. data/spec/api/distributions_container_api_spec.rb +13 -13
  166. data/spec/api/distributions_pull_through_api_spec.rb +13 -13
  167. data/spec/api/pulp_container_namespaces_api_spec.rb +9 -9
  168. data/spec/api/remotes_container_api_spec.rb +20 -19
  169. data/spec/api/remotes_pull_through_api_spec.rb +20 -19
  170. data/spec/api/repositories_container_api_spec.rb +22 -22
  171. data/spec/api/repositories_container_push_api_spec.rb +14 -14
  172. data/spec/api/repositories_container_push_versions_api_spec.rb +12 -11
  173. data/spec/api/repositories_container_versions_api_spec.rb +12 -11
  174. data/spec/api/token_api_spec.rb +2 -2
  175. data/spec/models/async_operation_response_spec.rb +7 -12
  176. data/spec/models/container_blob_response_spec.rb +12 -17
  177. data/spec/models/container_container_distribution_response_spec.rb +34 -39
  178. data/spec/models/container_container_distribution_spec.rb +20 -25
  179. data/spec/models/container_container_namespace_response_spec.rb +11 -16
  180. data/spec/models/container_container_namespace_spec.rb +7 -12
  181. data/spec/models/container_container_pull_through_distribution_response_spec.rb +33 -38
  182. data/spec/models/container_container_pull_through_distribution_spec.rb +21 -26
  183. data/spec/models/{container_container_pull_through_remote_response_hidden_fields_spec.rb → container_container_pull_through_remote_response_hidden_fields_inner_spec.rb} +11 -16
  184. data/spec/models/container_container_pull_through_remote_response_spec.rb +29 -34
  185. data/spec/models/container_container_pull_through_remote_spec.rb +29 -34
  186. data/spec/models/container_container_push_repository_response_spec.rb +28 -33
  187. data/spec/models/container_container_push_repository_spec.rb +15 -20
  188. data/spec/models/container_container_remote_response_spec.rb +31 -36
  189. data/spec/models/container_container_remote_spec.rb +31 -36
  190. data/spec/models/container_container_repository_response_spec.rb +18 -23
  191. data/spec/models/container_container_repository_spec.rb +12 -17
  192. data/spec/models/container_manifest_response_spec.rb +24 -29
  193. data/spec/models/container_manifest_signature_response_spec.rb +17 -22
  194. data/spec/models/container_repository_sync_url_spec.rb +9 -14
  195. data/spec/models/container_tag_response_spec.rb +12 -17
  196. data/spec/models/content_summary_response_spec.rb +9 -14
  197. data/spec/models/manifest_copy_spec.rb +10 -15
  198. data/spec/models/media_types_enum_spec.rb +6 -11
  199. data/spec/models/my_permissions_response_spec.rb +7 -12
  200. data/spec/models/nested_role_response_spec.rb +9 -14
  201. data/spec/models/nested_role_spec.rb +9 -14
  202. data/spec/models/object_roles_response_spec.rb +7 -12
  203. data/spec/models/paginated_repository_version_response_list_spec.rb +10 -15
  204. data/spec/models/paginatedcontainer_blob_response_list_spec.rb +10 -15
  205. data/spec/models/paginatedcontainer_container_distribution_response_list_spec.rb +10 -15
  206. data/spec/models/paginatedcontainer_container_namespace_response_list_spec.rb +10 -15
  207. data/spec/models/paginatedcontainer_container_pull_through_distribution_response_list_spec.rb +10 -15
  208. data/spec/models/paginatedcontainer_container_pull_through_remote_response_list_spec.rb +10 -15
  209. data/spec/models/paginatedcontainer_container_push_repository_response_list_spec.rb +10 -15
  210. data/spec/models/paginatedcontainer_container_remote_response_list_spec.rb +10 -15
  211. data/spec/models/paginatedcontainer_container_repository_response_list_spec.rb +10 -15
  212. data/spec/models/paginatedcontainer_manifest_response_list_spec.rb +10 -15
  213. data/spec/models/paginatedcontainer_manifest_signature_response_list_spec.rb +10 -15
  214. data/spec/models/paginatedcontainer_tag_response_list_spec.rb +10 -15
  215. data/spec/models/patchedcontainer_container_distribution_spec.rb +20 -25
  216. data/spec/models/patchedcontainer_container_pull_through_distribution_spec.rb +21 -26
  217. data/spec/models/patchedcontainer_container_pull_through_remote_spec.rb +29 -34
  218. data/spec/models/patchedcontainer_container_push_repository_spec.rb +15 -20
  219. data/spec/models/patchedcontainer_container_remote_spec.rb +31 -36
  220. data/spec/models/patchedcontainer_container_repository_spec.rb +12 -17
  221. data/spec/models/policy692_enum_spec.rb +6 -11
  222. data/spec/models/policy7e0_enum_spec.rb +6 -11
  223. data/spec/models/recursive_manage_spec.rb +7 -12
  224. data/spec/models/remove_image_spec.rb +7 -12
  225. data/spec/models/remove_signatures_response_spec.rb +7 -12
  226. data/spec/models/remove_signatures_spec.rb +7 -12
  227. data/spec/models/repair_spec.rb +7 -12
  228. data/spec/models/repository_sign_spec.rb +9 -14
  229. data/spec/models/repository_version_response_spec.rb +14 -19
  230. data/spec/models/set_label_response_spec.rb +8 -13
  231. data/spec/models/set_label_spec.rb +8 -13
  232. data/spec/models/tag_copy_spec.rb +9 -14
  233. data/spec/models/tag_image_spec.rb +8 -13
  234. data/spec/models/un_tag_image_spec.rb +7 -12
  235. data/spec/models/unset_label_response_spec.rb +8 -13
  236. data/spec/models/unset_label_spec.rb +7 -12
  237. data/spec/spec_helper.rb +1 -1
  238. metadata +105 -85
  239. data/docs/ContainerContainerPullThroughRemoteResponseHiddenFields.md +0 -19
  240. data/docs/OCIBuildImage.md +0 -23
  241. data/lib/pulp_container_client/models/oci_build_image.rb +0 -256
  242. data/spec/api_client_spec.rb +0 -188
  243. data/spec/configuration_spec.rb +0 -42
  244. data/spec/models/oci_build_image_spec.rb +0 -59
@@ -6,57 +6,63 @@
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.3.1
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 PulpContainerClient
16
17
  # Serializer for Container Push Repositories.
17
18
  class PatchedcontainerContainerPushRepository
18
- # A unique name for this repository.
19
- attr_accessor :name
19
+ # Retain X versions of the repository. Default is null which retains all versions.
20
+ attr_accessor :retain_repo_versions
20
21
 
21
22
  # A reference to an associated signing service.
22
23
  attr_accessor :manifest_signing_service
23
24
 
25
+ attr_accessor :pulp_labels
26
+
24
27
  # An optional description.
25
28
  attr_accessor :description
26
29
 
27
- # Retain X versions of the repository. Default is null which retains all versions.
28
- attr_accessor :retain_repo_versions
29
-
30
- attr_accessor :pulp_labels
30
+ # A unique name for this repository.
31
+ attr_accessor :name
31
32
 
32
33
  # Attribute mapping from ruby-style variable name to JSON key.
33
34
  def self.attribute_map
34
35
  {
35
- :'name' => :'name',
36
+ :'retain_repo_versions' => :'retain_repo_versions',
36
37
  :'manifest_signing_service' => :'manifest_signing_service',
38
+ :'pulp_labels' => :'pulp_labels',
37
39
  :'description' => :'description',
38
- :'retain_repo_versions' => :'retain_repo_versions',
39
- :'pulp_labels' => :'pulp_labels'
40
+ :'name' => :'name'
40
41
  }
41
42
  end
42
43
 
44
+ # Returns all the JSON keys this model knows about
45
+ def self.acceptable_attributes
46
+ attribute_map.values
47
+ end
48
+
43
49
  # Attribute type mapping.
44
50
  def self.openapi_types
45
51
  {
46
- :'name' => :'String',
52
+ :'retain_repo_versions' => :'Integer',
47
53
  :'manifest_signing_service' => :'String',
54
+ :'pulp_labels' => :'Hash<String, String>',
48
55
  :'description' => :'String',
49
- :'retain_repo_versions' => :'Integer',
50
- :'pulp_labels' => :'Hash<String, String>'
56
+ :'name' => :'String'
51
57
  }
52
58
  end
53
59
 
54
60
  # List of attributes with nullable: true
55
61
  def self.openapi_nullable
56
62
  Set.new([
63
+ :'retain_repo_versions',
57
64
  :'manifest_signing_service',
58
65
  :'description',
59
- :'retain_repo_versions',
60
66
  ])
61
67
  end
62
68
 
@@ -75,43 +81,44 @@ module PulpContainerClient
75
81
  h[k.to_sym] = v
76
82
  }
77
83
 
78
- if attributes.key?(:'name')
79
- self.name = attributes[:'name']
84
+ if attributes.key?(:'retain_repo_versions')
85
+ self.retain_repo_versions = attributes[:'retain_repo_versions']
80
86
  end
81
87
 
82
88
  if attributes.key?(:'manifest_signing_service')
83
89
  self.manifest_signing_service = attributes[:'manifest_signing_service']
84
90
  end
85
91
 
86
- if attributes.key?(:'description')
87
- self.description = attributes[:'description']
88
- end
89
-
90
- if attributes.key?(:'retain_repo_versions')
91
- self.retain_repo_versions = attributes[:'retain_repo_versions']
92
- end
93
-
94
92
  if attributes.key?(:'pulp_labels')
95
93
  if (value = attributes[:'pulp_labels']).is_a?(Hash)
96
94
  self.pulp_labels = value
97
95
  end
98
96
  end
97
+
98
+ if attributes.key?(:'description')
99
+ self.description = attributes[:'description']
100
+ end
101
+
102
+ if attributes.key?(:'name')
103
+ self.name = attributes[:'name']
104
+ end
99
105
  end
100
106
 
101
107
  # Show invalid properties with the reasons. Usually used together with valid?
102
108
  # @return Array for valid properties with the reasons
103
109
  def list_invalid_properties
110
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
104
111
  invalid_properties = Array.new
105
- if !@name.nil? && @name.to_s.length < 1
106
- invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
112
+ if !@retain_repo_versions.nil? && @retain_repo_versions < 1
113
+ invalid_properties.push('invalid value for "retain_repo_versions", must be greater than or equal to 1.')
107
114
  end
108
115
 
109
116
  if !@description.nil? && @description.to_s.length < 1
110
117
  invalid_properties.push('invalid value for "description", the character length must be great than or equal to 1.')
111
118
  end
112
119
 
113
- if !@retain_repo_versions.nil? && @retain_repo_versions < 1
114
- invalid_properties.push('invalid value for "retain_repo_versions", must be greater than or equal to 1.')
120
+ if !@name.nil? && @name.to_s.length < 1
121
+ invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
115
122
  end
116
123
 
117
124
  invalid_properties
@@ -120,20 +127,21 @@ module PulpContainerClient
120
127
  # Check to see if the all the properties in the model are valid
121
128
  # @return true if the model is valid
122
129
  def valid?
123
- return false if !@name.nil? && @name.to_s.length < 1
124
- return false if !@description.nil? && @description.to_s.length < 1
130
+ warn '[DEPRECATED] the `valid?` method is obsolete'
125
131
  return false if !@retain_repo_versions.nil? && @retain_repo_versions < 1
132
+ return false if !@description.nil? && @description.to_s.length < 1
133
+ return false if !@name.nil? && @name.to_s.length < 1
126
134
  true
127
135
  end
128
136
 
129
137
  # Custom attribute writer method with validation
130
- # @param [Object] name Value to be assigned
131
- def name=(name)
132
- if !name.nil? && name.to_s.length < 1
133
- fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
138
+ # @param [Object] retain_repo_versions Value to be assigned
139
+ def retain_repo_versions=(retain_repo_versions)
140
+ if !retain_repo_versions.nil? && retain_repo_versions < 1
141
+ fail ArgumentError, 'invalid value for "retain_repo_versions", must be greater than or equal to 1.'
134
142
  end
135
143
 
136
- @name = name
144
+ @retain_repo_versions = retain_repo_versions
137
145
  end
138
146
 
139
147
  # Custom attribute writer method with validation
@@ -147,13 +155,17 @@ module PulpContainerClient
147
155
  end
148
156
 
149
157
  # Custom attribute writer method with validation
150
- # @param [Object] retain_repo_versions Value to be assigned
151
- def retain_repo_versions=(retain_repo_versions)
152
- if !retain_repo_versions.nil? && retain_repo_versions < 1
153
- fail ArgumentError, 'invalid value for "retain_repo_versions", must be greater than or equal to 1.'
158
+ # @param [Object] name Value to be assigned
159
+ def name=(name)
160
+ if name.nil?
161
+ fail ArgumentError, 'name cannot be nil'
154
162
  end
155
163
 
156
- @retain_repo_versions = retain_repo_versions
164
+ if name.to_s.length < 1
165
+ fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
166
+ end
167
+
168
+ @name = name
157
169
  end
158
170
 
159
171
  # Checks equality by comparing each attribute.
@@ -161,11 +173,11 @@ module PulpContainerClient
161
173
  def ==(o)
162
174
  return true if self.equal?(o)
163
175
  self.class == o.class &&
164
- name == o.name &&
176
+ retain_repo_versions == o.retain_repo_versions &&
165
177
  manifest_signing_service == o.manifest_signing_service &&
178
+ pulp_labels == o.pulp_labels &&
166
179
  description == o.description &&
167
- retain_repo_versions == o.retain_repo_versions &&
168
- pulp_labels == o.pulp_labels
180
+ name == o.name
169
181
  end
170
182
 
171
183
  # @see the `==` method
@@ -177,44 +189,40 @@ module PulpContainerClient
177
189
  # Calculates hash code according to all attributes.
178
190
  # @return [Integer] Hash code
179
191
  def hash
180
- [name, manifest_signing_service, description, retain_repo_versions, pulp_labels].hash
192
+ [retain_repo_versions, manifest_signing_service, pulp_labels, description, name].hash
181
193
  end
182
194
 
183
195
  # Builds the object from hash
184
196
  # @param [Hash] attributes Model attributes in the form of hash
185
197
  # @return [Object] Returns the model itself
186
198
  def self.build_from_hash(attributes)
187
- new.build_from_hash(attributes)
188
- end
189
-
190
- # Builds the object from hash
191
- # @param [Hash] attributes Model attributes in the form of hash
192
- # @return [Object] Returns the model itself
193
- def build_from_hash(attributes)
194
199
  return nil unless attributes.is_a?(Hash)
195
- self.class.openapi_types.each_pair do |key, type|
196
- if type =~ /\AArray<(.*)>/i
200
+ attributes = attributes.transform_keys(&:to_sym)
201
+ transformed_hash = {}
202
+ openapi_types.each_pair do |key, type|
203
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
204
+ transformed_hash["#{key}"] = nil
205
+ elsif type =~ /\AArray<(.*)>/i
197
206
  # check to ensure the input is an array given that the attribute
198
207
  # is documented as an array but the input is not
199
- if attributes[self.class.attribute_map[key]].is_a?(Array)
200
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
208
+ if attributes[attribute_map[key]].is_a?(Array)
209
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
201
210
  end
202
- elsif !attributes[self.class.attribute_map[key]].nil?
203
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
204
- end # or else data not found in attributes(hash), not an issue as the data can be optional
211
+ elsif !attributes[attribute_map[key]].nil?
212
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
213
+ end
205
214
  end
206
-
207
- self
215
+ new(transformed_hash)
208
216
  end
209
217
 
210
218
  # Deserializes the data based on type
211
219
  # @param string type Data type
212
220
  # @param string value Value to be deserialized
213
221
  # @return [Object] Deserialized data
214
- def _deserialize(type, value)
222
+ def self._deserialize(type, value)
215
223
  case type.to_sym
216
- when :DateTime
217
- DateTime.parse(value)
224
+ when :Time
225
+ Time.parse(value)
218
226
  when :Date
219
227
  Date.parse(value)
220
228
  when :String
@@ -244,7 +252,9 @@ module PulpContainerClient
244
252
  end
245
253
  end
246
254
  else # model
247
- PulpContainerClient.const_get(type).build_from_hash(value)
255
+ # models (e.g. Pet) or oneOf
256
+ klass = PulpContainerClient.const_get(type)
257
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
248
258
  end
249
259
  end
250
260
 
@@ -270,7 +280,7 @@ module PulpContainerClient
270
280
  is_nullable = self.class.openapi_nullable.include?(attr)
271
281
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
272
282
  end
273
-
283
+
274
284
  hash[param] = _to_hash(value)
275
285
  end
276
286
  hash
@@ -293,5 +303,7 @@ module PulpContainerClient
293
303
  value
294
304
  end
295
305
  end
306
+
296
307
  end
308
+
297
309
  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
- OpenAPI Generator version: 4.3.1
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 PulpContainerClient
16
17
  # A Serializer for ContainerRemote.
@@ -89,6 +90,28 @@ module PulpContainerClient
89
90
  # A URL to a sigstore to download image signatures from
90
91
  attr_accessor :sigstore
91
92
 
93
+ class EnumAttributeValidator
94
+ attr_reader :datatype
95
+ attr_reader :allowable_values
96
+
97
+ def initialize(datatype, allowable_values)
98
+ @allowable_values = allowable_values.map do |value|
99
+ case datatype.to_s
100
+ when /Integer/i
101
+ value.to_i
102
+ when /Float/i
103
+ value.to_f
104
+ else
105
+ value
106
+ end
107
+ end
108
+ end
109
+
110
+ def valid?(value)
111
+ !value || allowable_values.include?(value)
112
+ end
113
+ end
114
+
92
115
  # Attribute mapping from ruby-style variable name to JSON key.
93
116
  def self.attribute_map
94
117
  {
@@ -120,6 +143,11 @@ module PulpContainerClient
120
143
  }
121
144
  end
122
145
 
146
+ # Returns all the JSON keys this model knows about
147
+ def self.acceptable_attributes
148
+ attribute_map.values
149
+ end
150
+
123
151
  # Attribute type mapping.
124
152
  def self.openapi_types
125
153
  {
@@ -301,6 +329,7 @@ module PulpContainerClient
301
329
  # Show invalid properties with the reasons. Usually used together with valid?
302
330
  # @return Array for valid properties with the reasons
303
331
  def list_invalid_properties
332
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
304
333
  invalid_properties = Array.new
305
334
  if !@name.nil? && @name.to_s.length < 1
306
335
  invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
@@ -376,6 +405,7 @@ module PulpContainerClient
376
405
  # Check to see if the all the properties in the model are valid
377
406
  # @return true if the model is valid
378
407
  def valid?
408
+ warn '[DEPRECATED] the `valid?` method is obsolete'
379
409
  return false if !@name.nil? && @name.to_s.length < 1
380
410
  return false if !@url.nil? && @url.to_s.length < 1
381
411
  return false if !@ca_cert.nil? && @ca_cert.to_s.length < 1
@@ -399,7 +429,11 @@ module PulpContainerClient
399
429
  # Custom attribute writer method with validation
400
430
  # @param [Object] name Value to be assigned
401
431
  def name=(name)
402
- if !name.nil? && name.to_s.length < 1
432
+ if name.nil?
433
+ fail ArgumentError, 'name cannot be nil'
434
+ end
435
+
436
+ if name.to_s.length < 1
403
437
  fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
404
438
  end
405
439
 
@@ -409,7 +443,11 @@ module PulpContainerClient
409
443
  # Custom attribute writer method with validation
410
444
  # @param [Object] url Value to be assigned
411
445
  def url=(url)
412
- if !url.nil? && url.to_s.length < 1
446
+ if url.nil?
447
+ fail ArgumentError, 'url cannot be nil'
448
+ end
449
+
450
+ if url.to_s.length < 1
413
451
  fail ArgumentError, 'invalid value for "url", the character length must be great than or equal to 1.'
414
452
  end
415
453
 
@@ -549,7 +587,11 @@ module PulpContainerClient
549
587
  # Custom attribute writer method with validation
550
588
  # @param [Object] upstream_name Value to be assigned
551
589
  def upstream_name=(upstream_name)
552
- if !upstream_name.nil? && upstream_name.to_s.length < 1
590
+ if upstream_name.nil?
591
+ fail ArgumentError, 'upstream_name cannot be nil'
592
+ end
593
+
594
+ if upstream_name.to_s.length < 1
553
595
  fail ArgumentError, 'invalid value for "upstream_name", the character length must be great than or equal to 1.'
554
596
  end
555
597
 
@@ -559,7 +601,11 @@ module PulpContainerClient
559
601
  # Custom attribute writer method with validation
560
602
  # @param [Object] sigstore Value to be assigned
561
603
  def sigstore=(sigstore)
562
- if !sigstore.nil? && sigstore.to_s.length < 1
604
+ if sigstore.nil?
605
+ fail ArgumentError, 'sigstore cannot be nil'
606
+ end
607
+
608
+ if sigstore.to_s.length < 1
563
609
  fail ArgumentError, 'invalid value for "sigstore", the character length must be great than or equal to 1.'
564
610
  end
565
611
 
@@ -614,37 +660,33 @@ module PulpContainerClient
614
660
  # @param [Hash] attributes Model attributes in the form of hash
615
661
  # @return [Object] Returns the model itself
616
662
  def self.build_from_hash(attributes)
617
- new.build_from_hash(attributes)
618
- end
619
-
620
- # Builds the object from hash
621
- # @param [Hash] attributes Model attributes in the form of hash
622
- # @return [Object] Returns the model itself
623
- def build_from_hash(attributes)
624
663
  return nil unless attributes.is_a?(Hash)
625
- self.class.openapi_types.each_pair do |key, type|
626
- if type =~ /\AArray<(.*)>/i
664
+ attributes = attributes.transform_keys(&:to_sym)
665
+ transformed_hash = {}
666
+ openapi_types.each_pair do |key, type|
667
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
668
+ transformed_hash["#{key}"] = nil
669
+ elsif type =~ /\AArray<(.*)>/i
627
670
  # check to ensure the input is an array given that the attribute
628
671
  # is documented as an array but the input is not
629
- if attributes[self.class.attribute_map[key]].is_a?(Array)
630
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
672
+ if attributes[attribute_map[key]].is_a?(Array)
673
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
631
674
  end
632
- elsif !attributes[self.class.attribute_map[key]].nil?
633
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
634
- end # or else data not found in attributes(hash), not an issue as the data can be optional
675
+ elsif !attributes[attribute_map[key]].nil?
676
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
677
+ end
635
678
  end
636
-
637
- self
679
+ new(transformed_hash)
638
680
  end
639
681
 
640
682
  # Deserializes the data based on type
641
683
  # @param string type Data type
642
684
  # @param string value Value to be deserialized
643
685
  # @return [Object] Deserialized data
644
- def _deserialize(type, value)
686
+ def self._deserialize(type, value)
645
687
  case type.to_sym
646
- when :DateTime
647
- DateTime.parse(value)
688
+ when :Time
689
+ Time.parse(value)
648
690
  when :Date
649
691
  Date.parse(value)
650
692
  when :String
@@ -674,7 +716,9 @@ module PulpContainerClient
674
716
  end
675
717
  end
676
718
  else # model
677
- PulpContainerClient.const_get(type).build_from_hash(value)
719
+ # models (e.g. Pet) or oneOf
720
+ klass = PulpContainerClient.const_get(type)
721
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
678
722
  end
679
723
  end
680
724
 
@@ -700,7 +744,7 @@ module PulpContainerClient
700
744
  is_nullable = self.class.openapi_nullable.include?(attr)
701
745
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
702
746
  end
703
-
747
+
704
748
  hash[param] = _to_hash(value)
705
749
  end
706
750
  hash
@@ -723,5 +767,7 @@ module PulpContainerClient
723
767
  value
724
768
  end
725
769
  end
770
+
726
771
  end
772
+
727
773
  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
- OpenAPI Generator version: 4.3.1
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 PulpContainerClient
16
17
  # Serializer for Container Repositories.
@@ -44,6 +45,11 @@ module PulpContainerClient
44
45
  }
45
46
  end
46
47
 
48
+ # Returns all the JSON keys this model knows about
49
+ def self.acceptable_attributes
50
+ attribute_map.values
51
+ end
52
+
47
53
  # Attribute type mapping.
48
54
  def self.openapi_types
49
55
  {
@@ -111,6 +117,7 @@ module PulpContainerClient
111
117
  # Show invalid properties with the reasons. Usually used together with valid?
112
118
  # @return Array for valid properties with the reasons
113
119
  def list_invalid_properties
120
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
114
121
  invalid_properties = Array.new
115
122
  if !@name.nil? && @name.to_s.length < 1
116
123
  invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
@@ -130,6 +137,7 @@ module PulpContainerClient
130
137
  # Check to see if the all the properties in the model are valid
131
138
  # @return true if the model is valid
132
139
  def valid?
140
+ warn '[DEPRECATED] the `valid?` method is obsolete'
133
141
  return false if !@name.nil? && @name.to_s.length < 1
134
142
  return false if !@description.nil? && @description.to_s.length < 1
135
143
  return false if !@retain_repo_versions.nil? && @retain_repo_versions < 1
@@ -139,7 +147,11 @@ module PulpContainerClient
139
147
  # Custom attribute writer method with validation
140
148
  # @param [Object] name Value to be assigned
141
149
  def name=(name)
142
- if !name.nil? && name.to_s.length < 1
150
+ if name.nil?
151
+ fail ArgumentError, 'name cannot be nil'
152
+ end
153
+
154
+ if name.to_s.length < 1
143
155
  fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
144
156
  end
145
157
 
@@ -195,37 +207,33 @@ module PulpContainerClient
195
207
  # @param [Hash] attributes Model attributes in the form of hash
196
208
  # @return [Object] Returns the model itself
197
209
  def self.build_from_hash(attributes)
198
- new.build_from_hash(attributes)
199
- end
200
-
201
- # Builds the object from hash
202
- # @param [Hash] attributes Model attributes in the form of hash
203
- # @return [Object] Returns the model itself
204
- def build_from_hash(attributes)
205
210
  return nil unless attributes.is_a?(Hash)
206
- self.class.openapi_types.each_pair do |key, type|
207
- if type =~ /\AArray<(.*)>/i
211
+ attributes = attributes.transform_keys(&:to_sym)
212
+ transformed_hash = {}
213
+ openapi_types.each_pair do |key, type|
214
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
215
+ transformed_hash["#{key}"] = nil
216
+ elsif type =~ /\AArray<(.*)>/i
208
217
  # check to ensure the input is an array given that the attribute
209
218
  # is documented as an array but the input is not
210
- if attributes[self.class.attribute_map[key]].is_a?(Array)
211
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
219
+ if attributes[attribute_map[key]].is_a?(Array)
220
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
212
221
  end
213
- elsif !attributes[self.class.attribute_map[key]].nil?
214
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
215
- end # or else data not found in attributes(hash), not an issue as the data can be optional
222
+ elsif !attributes[attribute_map[key]].nil?
223
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
224
+ end
216
225
  end
217
-
218
- self
226
+ new(transformed_hash)
219
227
  end
220
228
 
221
229
  # Deserializes the data based on type
222
230
  # @param string type Data type
223
231
  # @param string value Value to be deserialized
224
232
  # @return [Object] Deserialized data
225
- def _deserialize(type, value)
233
+ def self._deserialize(type, value)
226
234
  case type.to_sym
227
- when :DateTime
228
- DateTime.parse(value)
235
+ when :Time
236
+ Time.parse(value)
229
237
  when :Date
230
238
  Date.parse(value)
231
239
  when :String
@@ -255,7 +263,9 @@ module PulpContainerClient
255
263
  end
256
264
  end
257
265
  else # model
258
- PulpContainerClient.const_get(type).build_from_hash(value)
266
+ # models (e.g. Pet) or oneOf
267
+ klass = PulpContainerClient.const_get(type)
268
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
259
269
  end
260
270
  end
261
271
 
@@ -281,7 +291,7 @@ module PulpContainerClient
281
291
  is_nullable = self.class.openapi_nullable.include?(attr)
282
292
  next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
283
293
  end
284
-
294
+
285
295
  hash[param] = _to_hash(value)
286
296
  end
287
297
  hash
@@ -304,5 +314,7 @@ module PulpContainerClient
304
314
  value
305
315
  end
306
316
  end
317
+
307
318
  end
319
+
308
320
  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
- OpenAPI Generator version: 4.3.1
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 PulpContainerClient
16
17
  class Policy692Enum
@@ -18,6 +19,10 @@ module PulpContainerClient
18
19
  ON_DEMAND = "on_demand".freeze
19
20
  STREAMED = "streamed".freeze
20
21
 
22
+ def self.all_vars
23
+ @all_vars ||= [IMMEDIATE, ON_DEMAND, STREAMED].freeze
24
+ end
25
+
21
26
  # Builds the enum from string
22
27
  # @param [String] The enum value in the form of the string
23
28
  # @return [String] The enum value
@@ -29,9 +34,8 @@ module PulpContainerClient
29
34
  # @param [String] The enum value in the form of the string
30
35
  # @return [String] The enum value
31
36
  def build_from_hash(value)
32
- constantValues = Policy692Enum.constants.select { |c| Policy692Enum::const_get(c) == value }
33
- raise "Invalid ENUM value #{value} for class #Policy692Enum" if constantValues.empty?
34
- value
37
+ return value if Policy692Enum.all_vars.include?(value)
38
+ raise "Invalid ENUM value #{value} for class #Policy692Enum"
35
39
  end
36
40
  end
37
41
  end