pulp_container_client 2.0.0b3 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (156) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +69 -57
  3. data/docs/{ContainerBlob.md → ContainerBlobResponse.md} +2 -2
  4. data/docs/ContainerContainerDistribution.md +6 -12
  5. data/docs/ContainerContainerDistributionResponse.md +31 -0
  6. data/docs/ContainerContainerPushRepository.md +4 -10
  7. data/docs/ContainerContainerPushRepositoryResponse.md +29 -0
  8. data/docs/ContainerContainerRemote.md +8 -12
  9. data/docs/ContainerContainerRemoteResponse.md +49 -0
  10. data/docs/ContainerContainerRepository.md +4 -10
  11. data/docs/ContainerContainerRepositoryResponse.md +29 -0
  12. data/docs/ContainerContentRedirectContentGuard.md +1 -5
  13. data/docs/ContainerContentRedirectContentGuardResponse.md +23 -0
  14. data/docs/{ContainerManifest.md → ContainerManifestResponse.md} +2 -2
  15. data/docs/{ContainerTag.md → ContainerTagResponse.md} +2 -4
  16. data/docs/ContentBlobsApi.md +24 -24
  17. data/docs/ContentManifestsApi.md +24 -24
  18. data/docs/ContentSummary.md +3 -3
  19. data/docs/ContentSummaryResponse.md +21 -0
  20. data/docs/ContentTagsApi.md +26 -26
  21. data/docs/ContentguardsContentRedirectApi.md +55 -55
  22. data/docs/DistributionsContainerApi.md +108 -60
  23. data/docs/InlineResponse200.md +3 -3
  24. data/docs/InlineResponse2001.md +3 -3
  25. data/docs/InlineResponse2002.md +3 -3
  26. data/docs/InlineResponse2003.md +3 -3
  27. data/docs/InlineResponse2004.md +3 -3
  28. data/docs/InlineResponse2005.md +3 -3
  29. data/docs/InlineResponse2006.md +3 -3
  30. data/docs/InlineResponse2007.md +3 -3
  31. data/docs/InlineResponse2008.md +3 -3
  32. data/docs/ManifestCopy.md +1 -1
  33. data/docs/OCIBuildImage.md +23 -0
  34. data/docs/PatchedcontainerContainerDistribution.md +25 -0
  35. data/docs/PatchedcontainerContainerRemote.md +43 -0
  36. data/docs/PatchedcontainerContainerRepository.md +21 -0
  37. data/docs/PatchedcontainerContentRedirectContentGuard.md +19 -0
  38. data/docs/PolicyEnum.md +16 -0
  39. data/docs/RecursiveManage.md +1 -1
  40. data/docs/RemotesContainerApi.md +125 -65
  41. data/docs/RepositoriesContainerApi.md +158 -134
  42. data/docs/RepositoriesContainerPushApi.md +44 -148
  43. data/docs/RepositoriesContainerVersionsApi.md +190 -126
  44. data/docs/RepositorySyncURL.md +1 -1
  45. data/docs/RepositoryVersion.md +1 -9
  46. data/docs/RepositoryVersionResponse.md +25 -0
  47. data/docs/TagCopy.md +1 -1
  48. data/docs/TokenApi.md +8 -16
  49. data/lib/pulp_container_client/api/content_blobs_api.rb +38 -34
  50. data/lib/pulp_container_client/api/content_manifests_api.rb +38 -34
  51. data/lib/pulp_container_client/api/content_tags_api.rb +41 -37
  52. data/lib/pulp_container_client/api/contentguards_content_redirect_api.rb +90 -90
  53. data/lib/pulp_container_client/api/distributions_container_api.rb +153 -90
  54. data/lib/pulp_container_client/api/remotes_container_api.rb +181 -100
  55. data/lib/pulp_container_client/api/repositories_container_api.rb +245 -222
  56. data/lib/pulp_container_client/api/repositories_container_push_api.rb +66 -197
  57. data/lib/pulp_container_client/api/repositories_container_versions_api.rb +278 -188
  58. data/lib/pulp_container_client/api/token_api.rb +8 -14
  59. data/lib/pulp_container_client/api_client.rb +2 -2
  60. data/lib/pulp_container_client/api_error.rb +2 -2
  61. data/lib/pulp_container_client/configuration.rb +3 -3
  62. data/lib/pulp_container_client/models/async_operation_response.rb +3 -2
  63. data/lib/pulp_container_client/models/{container_blob.rb → container_blob_response.rb} +6 -43
  64. data/lib/pulp_container_client/models/container_container_distribution.rb +29 -110
  65. data/lib/pulp_container_client/models/container_container_distribution_response.rb +289 -0
  66. data/lib/pulp_container_client/models/container_container_push_repository.rb +18 -78
  67. data/lib/pulp_container_client/models/container_container_push_repository_response.rb +271 -0
  68. data/lib/pulp_container_client/models/container_container_remote.rb +29 -227
  69. data/lib/pulp_container_client/models/container_container_remote_response.rb +409 -0
  70. data/lib/pulp_container_client/models/container_container_repository.rb +18 -78
  71. data/lib/pulp_container_client/models/container_container_repository_response.rb +271 -0
  72. data/lib/pulp_container_client/models/container_content_redirect_content_guard.rb +4 -56
  73. data/lib/pulp_container_client/models/container_content_redirect_content_guard_response.rb +243 -0
  74. data/lib/pulp_container_client/models/{container_manifest.rb → container_manifest_response.rb} +6 -43
  75. data/lib/pulp_container_client/models/{container_tag.rb → container_tag_response.rb} +7 -40
  76. data/lib/pulp_container_client/models/content_summary.rb +9 -15
  77. data/lib/pulp_container_client/models/content_summary_response.rb +240 -0
  78. data/lib/pulp_container_client/models/inline_response200.rb +3 -13
  79. data/lib/pulp_container_client/models/inline_response2001.rb +3 -13
  80. data/lib/pulp_container_client/models/inline_response2002.rb +3 -13
  81. data/lib/pulp_container_client/models/inline_response2003.rb +3 -13
  82. data/lib/pulp_container_client/models/inline_response2004.rb +3 -13
  83. data/lib/pulp_container_client/models/inline_response2005.rb +3 -13
  84. data/lib/pulp_container_client/models/inline_response2006.rb +3 -13
  85. data/lib/pulp_container_client/models/inline_response2007.rb +3 -13
  86. data/lib/pulp_container_client/models/inline_response2008.rb +3 -13
  87. data/lib/pulp_container_client/models/manifest_copy.rb +4 -3
  88. data/lib/pulp_container_client/models/oci_build_image.rb +240 -0
  89. data/lib/pulp_container_client/models/patchedcontainer_container_distribution.rb +250 -0
  90. data/lib/pulp_container_client/models/patchedcontainer_container_remote.rb +365 -0
  91. data/lib/pulp_container_client/models/patchedcontainer_container_repository.rb +229 -0
  92. data/lib/pulp_container_client/models/patchedcontainer_content_redirect_content_guard.rb +219 -0
  93. data/lib/pulp_container_client/models/policy_enum.rb +37 -0
  94. data/lib/pulp_container_client/models/recursive_manage.rb +4 -3
  95. data/lib/pulp_container_client/models/repository_sync_url.rb +3 -8
  96. data/lib/pulp_container_client/models/repository_version.rb +7 -43
  97. data/lib/pulp_container_client/models/repository_version_response.rb +246 -0
  98. data/lib/pulp_container_client/models/tag_copy.rb +4 -3
  99. data/lib/pulp_container_client/models/tag_image.rb +3 -40
  100. data/lib/pulp_container_client/models/un_tag_image.rb +3 -21
  101. data/lib/pulp_container_client/version.rb +3 -3
  102. data/lib/pulp_container_client.rb +18 -5
  103. data/pulp_container_client.gemspec +4 -4
  104. data/spec/api/content_blobs_api_spec.rb +11 -11
  105. data/spec/api/content_manifests_api_spec.rb +11 -11
  106. data/spec/api/content_tags_api_spec.rb +12 -12
  107. data/spec/api/contentguards_content_redirect_api_spec.rb +17 -17
  108. data/spec/api/distributions_container_api_spec.rb +39 -18
  109. data/spec/api/remotes_container_api_spec.rb +48 -21
  110. data/spec/api/repositories_container_api_spec.rb +41 -32
  111. data/spec/api/repositories_container_push_api_spec.rb +17 -40
  112. data/spec/api/repositories_container_versions_api_spec.rb +76 -46
  113. data/spec/api/token_api_spec.rb +4 -6
  114. data/spec/api_client_spec.rb +2 -2
  115. data/spec/configuration_spec.rb +2 -2
  116. data/spec/models/async_operation_response_spec.rb +2 -2
  117. data/spec/models/{container_blob_spec.rb → container_blob_response_spec.rb} +8 -8
  118. data/spec/models/container_container_distribution_response_spec.rb +83 -0
  119. data/spec/models/container_container_distribution_spec.rb +5 -23
  120. data/spec/models/container_container_push_repository_response_spec.rb +77 -0
  121. data/spec/models/container_container_push_repository_spec.rb +5 -23
  122. data/spec/models/container_container_remote_response_spec.rb +137 -0
  123. data/spec/models/container_container_remote_spec.rb +7 -23
  124. data/spec/models/container_container_repository_response_spec.rb +77 -0
  125. data/spec/models/container_container_repository_spec.rb +5 -23
  126. data/spec/models/container_content_redirect_content_guard_response_spec.rb +59 -0
  127. data/spec/models/container_content_redirect_content_guard_spec.rb +2 -14
  128. data/spec/models/{container_manifest_spec.rb → container_manifest_response_spec.rb} +8 -8
  129. data/spec/models/{container_tag_spec.rb → container_tag_response_spec.rb} +8 -14
  130. data/spec/models/content_summary_response_spec.rb +53 -0
  131. data/spec/models/content_summary_spec.rb +2 -2
  132. data/spec/models/inline_response2001_spec.rb +2 -2
  133. data/spec/models/inline_response2002_spec.rb +2 -2
  134. data/spec/models/inline_response2003_spec.rb +2 -2
  135. data/spec/models/inline_response2004_spec.rb +2 -2
  136. data/spec/models/inline_response2005_spec.rb +2 -2
  137. data/spec/models/inline_response2006_spec.rb +2 -2
  138. data/spec/models/inline_response2007_spec.rb +2 -2
  139. data/spec/models/inline_response2008_spec.rb +2 -2
  140. data/spec/models/inline_response200_spec.rb +2 -2
  141. data/spec/models/manifest_copy_spec.rb +2 -2
  142. data/spec/models/oci_build_image_spec.rb +59 -0
  143. data/spec/models/patchedcontainer_container_distribution_spec.rb +65 -0
  144. data/spec/models/patchedcontainer_container_remote_spec.rb +119 -0
  145. data/spec/models/patchedcontainer_container_repository_spec.rb +53 -0
  146. data/spec/models/patchedcontainer_content_redirect_content_guard_spec.rb +47 -0
  147. data/spec/models/policy_enum_spec.rb +35 -0
  148. data/spec/models/recursive_manage_spec.rb +2 -2
  149. data/spec/models/repository_sync_url_spec.rb +2 -2
  150. data/spec/models/repository_version_response_spec.rb +65 -0
  151. data/spec/models/repository_version_spec.rb +2 -26
  152. data/spec/models/tag_copy_spec.rb +2 -2
  153. data/spec/models/tag_image_spec.rb +2 -2
  154. data/spec/models/un_tag_image_spec.rb +2 -2
  155. data/spec/spec_helper.rb +2 -2
  156. metadata +93 -41
@@ -1,10 +1,10 @@
1
1
  =begin
2
2
  #Pulp 3 API
3
3
 
4
- #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ #Fetch, Upload, Organize, and Distribute Software Packages
5
5
 
6
6
  The version of the OpenAPI document: v3
7
-
7
+ Contact: pulp-list@redhat.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 4.2.3
10
10
 
@@ -13,7 +13,8 @@ OpenAPI Generator version: 4.2.3
13
13
  require 'date'
14
14
 
15
15
  module PulpContainerClient
16
- class ContainerManifest
16
+ # Serializer for Manifests.
17
+ class ContainerManifestResponse
17
18
  attr_accessor :pulp_href
18
19
 
19
20
  # Timestamp of creation.
@@ -80,13 +81,13 @@ module PulpContainerClient
80
81
  # @param [Hash] attributes Model attributes in the form of hash
81
82
  def initialize(attributes = {})
82
83
  if (!attributes.is_a?(Hash))
83
- fail ArgumentError, "The input argument (attributes) must be a hash in `PulpContainerClient::ContainerManifest` initialize method"
84
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpContainerClient::ContainerManifestResponse` initialize method"
84
85
  end
85
86
 
86
87
  # check to see if the attribute exists and convert string to symbol for hash key
87
88
  attributes = attributes.each_with_object({}) { |(k, v), h|
88
89
  if (!self.class.attribute_map.key?(k.to_sym))
89
- fail ArgumentError, "`#{k}` is not a valid attribute in `PulpContainerClient::ContainerManifest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
90
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpContainerClient::ContainerManifestResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
90
91
  end
91
92
  h[k.to_sym] = v
92
93
  }
@@ -144,10 +145,6 @@ module PulpContainerClient
144
145
  invalid_properties.push('invalid value for "digest", digest cannot be nil.')
145
146
  end
146
147
 
147
- if @digest.to_s.length < 1
148
- invalid_properties.push('invalid value for "digest", the character length must be great than or equal to 1.')
149
- end
150
-
151
148
  if @schema_version.nil?
152
149
  invalid_properties.push('invalid value for "schema_version", schema_version cannot be nil.')
153
150
  end
@@ -156,10 +153,6 @@ module PulpContainerClient
156
153
  invalid_properties.push('invalid value for "media_type", media_type cannot be nil.')
157
154
  end
158
155
 
159
- if @media_type.to_s.length < 1
160
- invalid_properties.push('invalid value for "media_type", the character length must be great than or equal to 1.')
161
- end
162
-
163
156
  if @listed_manifests.nil?
164
157
  invalid_properties.push('invalid value for "listed_manifests", listed_manifests cannot be nil.')
165
158
  end
@@ -176,43 +169,13 @@ module PulpContainerClient
176
169
  def valid?
177
170
  return false if @artifact.nil?
178
171
  return false if @digest.nil?
179
- return false if @digest.to_s.length < 1
180
172
  return false if @schema_version.nil?
181
173
  return false if @media_type.nil?
182
- return false if @media_type.to_s.length < 1
183
174
  return false if @listed_manifests.nil?
184
175
  return false if @blobs.nil?
185
176
  true
186
177
  end
187
178
 
188
- # Custom attribute writer method with validation
189
- # @param [Object] digest Value to be assigned
190
- def digest=(digest)
191
- if digest.nil?
192
- fail ArgumentError, 'digest cannot be nil'
193
- end
194
-
195
- if digest.to_s.length < 1
196
- fail ArgumentError, 'invalid value for "digest", the character length must be great than or equal to 1.'
197
- end
198
-
199
- @digest = digest
200
- end
201
-
202
- # Custom attribute writer method with validation
203
- # @param [Object] media_type Value to be assigned
204
- def media_type=(media_type)
205
- if media_type.nil?
206
- fail ArgumentError, 'media_type cannot be nil'
207
- end
208
-
209
- if media_type.to_s.length < 1
210
- fail ArgumentError, 'invalid value for "media_type", the character length must be great than or equal to 1.'
211
- end
212
-
213
- @media_type = media_type
214
- end
215
-
216
179
  # Checks equality by comparing each attribute.
217
180
  # @param [Object] Object to be compared
218
181
  def ==(o)
@@ -1,10 +1,10 @@
1
1
  =begin
2
2
  #Pulp 3 API
3
3
 
4
- #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ #Fetch, Upload, Organize, and Distribute Software Packages
5
5
 
6
6
  The version of the OpenAPI document: v3
7
-
7
+ Contact: pulp-list@redhat.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 4.2.3
10
10
 
@@ -13,15 +13,13 @@ OpenAPI Generator version: 4.2.3
13
13
  require 'date'
14
14
 
15
15
  module PulpContainerClient
16
- class ContainerTag
16
+ # Serializer for Tags.
17
+ class ContainerTagResponse
17
18
  attr_accessor :pulp_href
18
19
 
19
20
  # Timestamp of creation.
20
21
  attr_accessor :pulp_created
21
22
 
22
- # Artifact file representing the physical content
23
- attr_accessor :artifact
24
-
25
23
  # Tag name
26
24
  attr_accessor :name
27
25
 
@@ -33,7 +31,6 @@ module PulpContainerClient
33
31
  {
34
32
  :'pulp_href' => :'pulp_href',
35
33
  :'pulp_created' => :'pulp_created',
36
- :'artifact' => :'artifact',
37
34
  :'name' => :'name',
38
35
  :'tagged_manifest' => :'tagged_manifest'
39
36
  }
@@ -44,7 +41,6 @@ module PulpContainerClient
44
41
  {
45
42
  :'pulp_href' => :'String',
46
43
  :'pulp_created' => :'DateTime',
47
- :'artifact' => :'String',
48
44
  :'name' => :'String',
49
45
  :'tagged_manifest' => :'String'
50
46
  }
@@ -60,13 +56,13 @@ module PulpContainerClient
60
56
  # @param [Hash] attributes Model attributes in the form of hash
61
57
  def initialize(attributes = {})
62
58
  if (!attributes.is_a?(Hash))
63
- fail ArgumentError, "The input argument (attributes) must be a hash in `PulpContainerClient::ContainerTag` initialize method"
59
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpContainerClient::ContainerTagResponse` initialize method"
64
60
  end
65
61
 
66
62
  # check to see if the attribute exists and convert string to symbol for hash key
67
63
  attributes = attributes.each_with_object({}) { |(k, v), h|
68
64
  if (!self.class.attribute_map.key?(k.to_sym))
69
- fail ArgumentError, "`#{k}` is not a valid attribute in `PulpContainerClient::ContainerTag`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
65
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpContainerClient::ContainerTagResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
70
66
  end
71
67
  h[k.to_sym] = v
72
68
  }
@@ -79,10 +75,6 @@ module PulpContainerClient
79
75
  self.pulp_created = attributes[:'pulp_created']
80
76
  end
81
77
 
82
- if attributes.key?(:'artifact')
83
- self.artifact = attributes[:'artifact']
84
- end
85
-
86
78
  if attributes.key?(:'name')
87
79
  self.name = attributes[:'name']
88
80
  end
@@ -96,18 +88,10 @@ module PulpContainerClient
96
88
  # @return Array for valid properties with the reasons
97
89
  def list_invalid_properties
98
90
  invalid_properties = Array.new
99
- if @artifact.nil?
100
- invalid_properties.push('invalid value for "artifact", artifact cannot be nil.')
101
- end
102
-
103
91
  if @name.nil?
104
92
  invalid_properties.push('invalid value for "name", name cannot be nil.')
105
93
  end
106
94
 
107
- if @name.to_s.length < 1
108
- invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
109
- end
110
-
111
95
  if @tagged_manifest.nil?
112
96
  invalid_properties.push('invalid value for "tagged_manifest", tagged_manifest cannot be nil.')
113
97
  end
@@ -118,27 +102,11 @@ module PulpContainerClient
118
102
  # Check to see if the all the properties in the model are valid
119
103
  # @return true if the model is valid
120
104
  def valid?
121
- return false if @artifact.nil?
122
105
  return false if @name.nil?
123
- return false if @name.to_s.length < 1
124
106
  return false if @tagged_manifest.nil?
125
107
  true
126
108
  end
127
109
 
128
- # Custom attribute writer method with validation
129
- # @param [Object] name Value to be assigned
130
- def name=(name)
131
- if name.nil?
132
- fail ArgumentError, 'name cannot be nil'
133
- end
134
-
135
- if name.to_s.length < 1
136
- fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
137
- end
138
-
139
- @name = name
140
- end
141
-
142
110
  # Checks equality by comparing each attribute.
143
111
  # @param [Object] Object to be compared
144
112
  def ==(o)
@@ -146,7 +114,6 @@ module PulpContainerClient
146
114
  self.class == o.class &&
147
115
  pulp_href == o.pulp_href &&
148
116
  pulp_created == o.pulp_created &&
149
- artifact == o.artifact &&
150
117
  name == o.name &&
151
118
  tagged_manifest == o.tagged_manifest
152
119
  end
@@ -160,7 +127,7 @@ module PulpContainerClient
160
127
  # Calculates hash code according to all attributes.
161
128
  # @return [Integer] Hash code
162
129
  def hash
163
- [pulp_href, pulp_created, artifact, name, tagged_manifest].hash
130
+ [pulp_href, pulp_created, name, tagged_manifest].hash
164
131
  end
165
132
 
166
133
  # Builds the object from hash
@@ -1,10 +1,10 @@
1
1
  =begin
2
2
  #Pulp 3 API
3
3
 
4
- #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ #Fetch, Upload, Organize, and Distribute Software Packages
5
5
 
6
6
  The version of the OpenAPI document: v3
7
-
7
+ Contact: pulp-list@redhat.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 4.2.3
10
10
 
@@ -13,7 +13,7 @@ OpenAPI Generator version: 4.2.3
13
13
  require 'date'
14
14
 
15
15
  module PulpContainerClient
16
- # Various count summaries of the content in the version and the HREF to view them.
16
+ # Serializer for the RepositoryVersion content summary
17
17
  class ContentSummary
18
18
  attr_accessor :added
19
19
 
@@ -33,9 +33,9 @@ module PulpContainerClient
33
33
  # Attribute type mapping.
34
34
  def self.openapi_types
35
35
  {
36
- :'added' => :'Hash<String, Hash<String, String>>',
37
- :'removed' => :'Hash<String, Hash<String, String>>',
38
- :'present' => :'Hash<String, Hash<String, String>>'
36
+ :'added' => :'Object',
37
+ :'removed' => :'Object',
38
+ :'present' => :'Object'
39
39
  }
40
40
  end
41
41
 
@@ -61,21 +61,15 @@ module PulpContainerClient
61
61
  }
62
62
 
63
63
  if attributes.key?(:'added')
64
- if (value = attributes[:'added']).is_a?(Hash)
65
- self.added = value
66
- end
64
+ self.added = attributes[:'added']
67
65
  end
68
66
 
69
67
  if attributes.key?(:'removed')
70
- if (value = attributes[:'removed']).is_a?(Hash)
71
- self.removed = value
72
- end
68
+ self.removed = attributes[:'removed']
73
69
  end
74
70
 
75
71
  if attributes.key?(:'present')
76
- if (value = attributes[:'present']).is_a?(Hash)
77
- self.present = value
78
- end
72
+ self.present = attributes[:'present']
79
73
  end
80
74
  end
81
75
 
@@ -0,0 +1,240 @@
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.2.3
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module PulpContainerClient
16
+ # Serializer for the RepositoryVersion content summary
17
+ class ContentSummaryResponse
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' => :'Object',
37
+ :'removed' => :'Object',
38
+ :'present' => :'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::ContentSummaryResponse` 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::ContentSummaryResponse`. 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
+ self.added = attributes[:'added']
65
+ end
66
+
67
+ if attributes.key?(:'removed')
68
+ self.removed = attributes[:'removed']
69
+ end
70
+
71
+ if attributes.key?(:'present')
72
+ self.present = attributes[:'present']
73
+ end
74
+ end
75
+
76
+ # Show invalid properties with the reasons. Usually used together with valid?
77
+ # @return Array for valid properties with the reasons
78
+ def list_invalid_properties
79
+ invalid_properties = Array.new
80
+ if @added.nil?
81
+ invalid_properties.push('invalid value for "added", added cannot be nil.')
82
+ end
83
+
84
+ if @removed.nil?
85
+ invalid_properties.push('invalid value for "removed", removed cannot be nil.')
86
+ end
87
+
88
+ if @present.nil?
89
+ invalid_properties.push('invalid value for "present", present cannot be nil.')
90
+ end
91
+
92
+ invalid_properties
93
+ end
94
+
95
+ # Check to see if the all the properties in the model are valid
96
+ # @return true if the model is valid
97
+ def valid?
98
+ return false if @added.nil?
99
+ return false if @removed.nil?
100
+ return false if @present.nil?
101
+ true
102
+ end
103
+
104
+ # Checks equality by comparing each attribute.
105
+ # @param [Object] Object to be compared
106
+ def ==(o)
107
+ return true if self.equal?(o)
108
+ self.class == o.class &&
109
+ added == o.added &&
110
+ removed == o.removed &&
111
+ present == o.present
112
+ end
113
+
114
+ # @see the `==` method
115
+ # @param [Object] Object to be compared
116
+ def eql?(o)
117
+ self == o
118
+ end
119
+
120
+ # Calculates hash code according to all attributes.
121
+ # @return [Integer] Hash code
122
+ def hash
123
+ [added, removed, present].hash
124
+ end
125
+
126
+ # Builds the object from hash
127
+ # @param [Hash] attributes Model attributes in the form of hash
128
+ # @return [Object] Returns the model itself
129
+ def self.build_from_hash(attributes)
130
+ new.build_from_hash(attributes)
131
+ end
132
+
133
+ # Builds the object from hash
134
+ # @param [Hash] attributes Model attributes in the form of hash
135
+ # @return [Object] Returns the model itself
136
+ def build_from_hash(attributes)
137
+ return nil unless attributes.is_a?(Hash)
138
+ self.class.openapi_types.each_pair do |key, type|
139
+ if type =~ /\AArray<(.*)>/i
140
+ # check to ensure the input is an array given that the attribute
141
+ # is documented as an array but the input is not
142
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
143
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
144
+ end
145
+ elsif !attributes[self.class.attribute_map[key]].nil?
146
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
147
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
148
+ end
149
+
150
+ self
151
+ end
152
+
153
+ # Deserializes the data based on type
154
+ # @param string type Data type
155
+ # @param string value Value to be deserialized
156
+ # @return [Object] Deserialized data
157
+ def _deserialize(type, value)
158
+ case type.to_sym
159
+ when :DateTime
160
+ DateTime.parse(value)
161
+ when :Date
162
+ Date.parse(value)
163
+ when :String
164
+ value.to_s
165
+ when :Integer
166
+ value.to_i
167
+ when :Float
168
+ value.to_f
169
+ when :Boolean
170
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
171
+ true
172
+ else
173
+ false
174
+ end
175
+ when :Object
176
+ # generic object (usually a Hash), return directly
177
+ value
178
+ when /\AArray<(?<inner_type>.+)>\z/
179
+ inner_type = Regexp.last_match[:inner_type]
180
+ value.map { |v| _deserialize(inner_type, v) }
181
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
182
+ k_type = Regexp.last_match[:k_type]
183
+ v_type = Regexp.last_match[:v_type]
184
+ {}.tap do |hash|
185
+ value.each do |k, v|
186
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
187
+ end
188
+ end
189
+ else # model
190
+ PulpContainerClient.const_get(type).build_from_hash(value)
191
+ end
192
+ end
193
+
194
+ # Returns the string representation of the object
195
+ # @return [String] String presentation of the object
196
+ def to_s
197
+ to_hash.to_s
198
+ end
199
+
200
+ # to_body is an alias to to_hash (backward compatibility)
201
+ # @return [Hash] Returns the object in the form of hash
202
+ def to_body
203
+ to_hash
204
+ end
205
+
206
+ # Returns the object in the form of hash
207
+ # @return [Hash] Returns the object in the form of hash
208
+ def to_hash
209
+ hash = {}
210
+ self.class.attribute_map.each_pair do |attr, param|
211
+ value = self.send(attr)
212
+ if value.nil?
213
+ is_nullable = self.class.openapi_nullable.include?(attr)
214
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
215
+ end
216
+
217
+ hash[param] = _to_hash(value)
218
+ end
219
+ hash
220
+ end
221
+
222
+ # Outputs non-array value in the form of hash
223
+ # For object, use to_hash. Otherwise, just return the value
224
+ # @param [Object] value Any valid value
225
+ # @return [Hash] Returns the value in the form of hash
226
+ def _to_hash(value)
227
+ if value.is_a?(Array)
228
+ value.compact.map { |v| _to_hash(v) }
229
+ elsif value.is_a?(Hash)
230
+ {}.tap do |hash|
231
+ value.each { |k, v| hash[k] = _to_hash(v) }
232
+ end
233
+ elsif value.respond_to? :to_hash
234
+ value.to_hash
235
+ else
236
+ value
237
+ end
238
+ end
239
+ end
240
+ end
@@ -1,10 +1,10 @@
1
1
  =begin
2
2
  #Pulp 3 API
3
3
 
4
- #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ #Fetch, Upload, Organize, and Distribute Software Packages
5
5
 
6
6
  The version of the OpenAPI document: v3
7
-
7
+ Contact: pulp-list@redhat.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 4.2.3
10
10
 
@@ -38,7 +38,7 @@ module PulpContainerClient
38
38
  :'count' => :'Integer',
39
39
  :'_next' => :'String',
40
40
  :'previous' => :'String',
41
- :'results' => :'Array<ContainerBlob>'
41
+ :'results' => :'Array<ContainerBlobResponse>'
42
42
  }
43
43
  end
44
44
 
@@ -88,22 +88,12 @@ module PulpContainerClient
88
88
  # @return Array for valid properties with the reasons
89
89
  def list_invalid_properties
90
90
  invalid_properties = Array.new
91
- if @count.nil?
92
- invalid_properties.push('invalid value for "count", count cannot be nil.')
93
- end
94
-
95
- if @results.nil?
96
- invalid_properties.push('invalid value for "results", results cannot be nil.')
97
- end
98
-
99
91
  invalid_properties
100
92
  end
101
93
 
102
94
  # Check to see if the all the properties in the model are valid
103
95
  # @return true if the model is valid
104
96
  def valid?
105
- return false if @count.nil?
106
- return false if @results.nil?
107
97
  true
108
98
  end
109
99
 
@@ -1,10 +1,10 @@
1
1
  =begin
2
2
  #Pulp 3 API
3
3
 
4
- #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ #Fetch, Upload, Organize, and Distribute Software Packages
5
5
 
6
6
  The version of the OpenAPI document: v3
7
-
7
+ Contact: pulp-list@redhat.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 4.2.3
10
10
 
@@ -38,7 +38,7 @@ module PulpContainerClient
38
38
  :'count' => :'Integer',
39
39
  :'_next' => :'String',
40
40
  :'previous' => :'String',
41
- :'results' => :'Array<ContainerManifest>'
41
+ :'results' => :'Array<ContainerManifestResponse>'
42
42
  }
43
43
  end
44
44
 
@@ -88,22 +88,12 @@ module PulpContainerClient
88
88
  # @return Array for valid properties with the reasons
89
89
  def list_invalid_properties
90
90
  invalid_properties = Array.new
91
- if @count.nil?
92
- invalid_properties.push('invalid value for "count", count cannot be nil.')
93
- end
94
-
95
- if @results.nil?
96
- invalid_properties.push('invalid value for "results", results cannot be nil.')
97
- end
98
-
99
91
  invalid_properties
100
92
  end
101
93
 
102
94
  # Check to see if the all the properties in the model are valid
103
95
  # @return true if the model is valid
104
96
  def valid?
105
- return false if @count.nil?
106
- return false if @results.nil?
107
97
  true
108
98
  end
109
99
 
@@ -1,10 +1,10 @@
1
1
  =begin
2
2
  #Pulp 3 API
3
3
 
4
- #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ #Fetch, Upload, Organize, and Distribute Software Packages
5
5
 
6
6
  The version of the OpenAPI document: v3
7
-
7
+ Contact: pulp-list@redhat.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 4.2.3
10
10
 
@@ -38,7 +38,7 @@ module PulpContainerClient
38
38
  :'count' => :'Integer',
39
39
  :'_next' => :'String',
40
40
  :'previous' => :'String',
41
- :'results' => :'Array<ContainerTag>'
41
+ :'results' => :'Array<ContainerTagResponse>'
42
42
  }
43
43
  end
44
44
 
@@ -88,22 +88,12 @@ module PulpContainerClient
88
88
  # @return Array for valid properties with the reasons
89
89
  def list_invalid_properties
90
90
  invalid_properties = Array.new
91
- if @count.nil?
92
- invalid_properties.push('invalid value for "count", count cannot be nil.')
93
- end
94
-
95
- if @results.nil?
96
- invalid_properties.push('invalid value for "results", results cannot be nil.')
97
- end
98
-
99
91
  invalid_properties
100
92
  end
101
93
 
102
94
  # Check to see if the all the properties in the model are valid
103
95
  # @return true if the model is valid
104
96
  def valid?
105
- return false if @count.nil?
106
- return false if @results.nil?
107
97
  true
108
98
  end
109
99