pulp_deb_client 2.5.0b1 → 2.6.0b1

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 (221) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +60 -39
  3. data/docs/ContentGenericContentsApi.md +26 -26
  4. data/docs/ContentInstallerFileIndicesApi.md +37 -37
  5. data/docs/ContentInstallerPackagesApi.md +56 -56
  6. data/docs/ContentPackageIndicesApi.md +37 -37
  7. data/docs/ContentPackageReleaseComponentsApi.md +33 -33
  8. data/docs/ContentPackagesApi.md +58 -58
  9. data/docs/ContentReleaseArchitecturesApi.md +33 -33
  10. data/docs/ContentReleaseComponentsApi.md +33 -33
  11. data/docs/ContentReleaseFilesApi.md +37 -37
  12. data/docs/ContentReleasesApi.md +35 -35
  13. data/docs/ContentSummary.md +3 -3
  14. data/docs/ContentSummaryResponse.md +21 -0
  15. data/docs/DebAptDistribution.md +1 -7
  16. data/docs/DebAptDistributionResponse.md +29 -0
  17. data/docs/DebAptPublication.md +1 -5
  18. data/docs/DebAptPublicationResponse.md +29 -0
  19. data/docs/DebAptRemote.md +4 -10
  20. data/docs/DebAptRemoteResponse.md +57 -0
  21. data/docs/DebAptRepository.md +4 -10
  22. data/docs/DebAptRepositoryResponse.md +29 -0
  23. data/docs/DebBasePackage.md +5 -75
  24. data/docs/DebBasePackageResponse.md +93 -0
  25. data/docs/DebGenericContent.md +5 -17
  26. data/docs/DebGenericContentResponse.md +35 -0
  27. data/docs/DebInstallerFileIndex.md +2 -6
  28. data/docs/DebInstallerFileIndexResponse.md +29 -0
  29. data/docs/DebPackageIndex.md +2 -6
  30. data/docs/DebPackageIndexResponse.md +29 -0
  31. data/docs/DebPackageReleaseComponent.md +1 -5
  32. data/docs/DebPackageReleaseComponentResponse.md +23 -0
  33. data/docs/DebRelease.md +1 -5
  34. data/docs/DebReleaseArchitecture.md +1 -5
  35. data/docs/DebReleaseArchitectureResponse.md +23 -0
  36. data/docs/DebReleaseComponent.md +1 -5
  37. data/docs/DebReleaseComponentResponse.md +23 -0
  38. data/docs/DebReleaseFile.md +2 -6
  39. data/docs/DebReleaseFileResponse.md +29 -0
  40. data/docs/DebReleaseResponse.md +25 -0
  41. data/docs/DebVerbatimPublication.md +1 -5
  42. data/docs/DebVerbatimPublicationResponse.md +23 -0
  43. data/docs/DistributionsAptApi.md +110 -62
  44. data/docs/InlineResponse200.md +3 -3
  45. data/docs/InlineResponse2001.md +3 -3
  46. data/docs/InlineResponse20010.md +3 -3
  47. data/docs/InlineResponse20011.md +3 -3
  48. data/docs/InlineResponse20012.md +3 -3
  49. data/docs/InlineResponse20013.md +3 -3
  50. data/docs/InlineResponse20014.md +3 -3
  51. data/docs/InlineResponse2002.md +3 -3
  52. data/docs/InlineResponse2003.md +3 -3
  53. data/docs/InlineResponse2004.md +3 -3
  54. data/docs/InlineResponse2005.md +3 -3
  55. data/docs/InlineResponse2006.md +3 -3
  56. data/docs/InlineResponse2007.md +3 -3
  57. data/docs/InlineResponse2008.md +3 -3
  58. data/docs/InlineResponse2009.md +3 -3
  59. data/docs/PatcheddebAptDistribution.md +23 -0
  60. data/docs/PatcheddebAptRemote.md +51 -0
  61. data/docs/PatcheddebAptRepository.md +21 -0
  62. data/docs/PolicyEnum.md +16 -0
  63. data/docs/PublicationsAptApi.md +43 -43
  64. data/docs/PublicationsVerbatimApi.md +43 -43
  65. data/docs/RemotesAptApi.md +128 -68
  66. data/docs/RepositoriesAptApi.md +100 -76
  67. data/docs/RepositoriesDebVersionsApi.md +96 -64
  68. data/docs/RepositoryAddRemoveContent.md +2 -2
  69. data/docs/RepositorySyncURL.md +1 -1
  70. data/docs/RepositoryVersion.md +1 -9
  71. data/docs/RepositoryVersionResponse.md +25 -0
  72. data/lib/pulp_deb_client/api/content_generic_contents_api.rb +36 -40
  73. data/lib/pulp_deb_client/api/content_installer_file_indices_api.rb +57 -57
  74. data/lib/pulp_deb_client/api/content_installer_packages_api.rb +90 -82
  75. data/lib/pulp_deb_client/api/content_package_indices_api.rb +57 -57
  76. data/lib/pulp_deb_client/api/content_package_release_components_api.rb +50 -50
  77. data/lib/pulp_deb_client/api/content_packages_api.rb +92 -84
  78. data/lib/pulp_deb_client/api/content_release_architectures_api.rb +51 -51
  79. data/lib/pulp_deb_client/api/content_release_components_api.rb +51 -51
  80. data/lib/pulp_deb_client/api/content_release_files_api.rb +57 -57
  81. data/lib/pulp_deb_client/api/content_releases_api.rb +54 -54
  82. data/lib/pulp_deb_client/api/distributions_apt_api.rb +157 -94
  83. data/lib/pulp_deb_client/api/publications_apt_api.rb +65 -65
  84. data/lib/pulp_deb_client/api/publications_verbatim_api.rb +65 -65
  85. data/lib/pulp_deb_client/api/remotes_apt_api.rb +187 -106
  86. data/lib/pulp_deb_client/api/repositories_apt_api.rb +151 -124
  87. data/lib/pulp_deb_client/api/repositories_deb_versions_api.rb +141 -96
  88. data/lib/pulp_deb_client/api_client.rb +2 -2
  89. data/lib/pulp_deb_client/api_error.rb +2 -2
  90. data/lib/pulp_deb_client/configuration.rb +3 -3
  91. data/lib/pulp_deb_client/models/async_operation_response.rb +3 -2
  92. data/lib/pulp_deb_client/models/content_summary.rb +9 -15
  93. data/lib/pulp_deb_client/models/content_summary_response.rb +240 -0
  94. data/lib/pulp_deb_client/models/deb_apt_distribution.rb +4 -85
  95. data/lib/pulp_deb_client/models/deb_apt_distribution_response.rb +279 -0
  96. data/lib/pulp_deb_client/models/deb_apt_publication.rb +4 -22
  97. data/lib/pulp_deb_client/models/deb_apt_publication_response.rb +270 -0
  98. data/lib/pulp_deb_client/models/deb_apt_remote.rb +7 -263
  99. data/lib/pulp_deb_client/models/deb_apt_remote_response.rb +446 -0
  100. data/lib/pulp_deb_client/models/deb_apt_repository.rb +18 -78
  101. data/lib/pulp_deb_client/models/deb_apt_repository_response.rb +271 -0
  102. data/lib/pulp_deb_client/models/deb_base_package.rb +18 -847
  103. data/lib/pulp_deb_client/models/deb_base_package_response.rb +558 -0
  104. data/lib/pulp_deb_client/models/deb_generic_content.rb +18 -185
  105. data/lib/pulp_deb_client/models/deb_generic_content_response.rb +302 -0
  106. data/lib/pulp_deb_client/models/deb_installer_file_index.rb +6 -79
  107. data/lib/pulp_deb_client/models/deb_installer_file_index_response.rb +287 -0
  108. data/lib/pulp_deb_client/models/deb_package_index.rb +6 -79
  109. data/lib/pulp_deb_client/models/deb_package_index_response.rb +287 -0
  110. data/lib/pulp_deb_client/models/deb_package_release_component.rb +4 -22
  111. data/lib/pulp_deb_client/models/deb_package_release_component_response.rb +247 -0
  112. data/lib/pulp_deb_client/models/deb_release.rb +4 -79
  113. data/lib/pulp_deb_client/models/deb_release_architecture.rb +4 -41
  114. data/lib/pulp_deb_client/models/deb_release_architecture_response.rb +247 -0
  115. data/lib/pulp_deb_client/models/deb_release_component.rb +4 -41
  116. data/lib/pulp_deb_client/models/deb_release_component_response.rb +247 -0
  117. data/lib/pulp_deb_client/models/deb_release_file.rb +6 -90
  118. data/lib/pulp_deb_client/models/deb_release_file_response.rb +277 -0
  119. data/lib/pulp_deb_client/models/deb_release_response.rb +259 -0
  120. data/lib/pulp_deb_client/models/deb_verbatim_publication.rb +4 -22
  121. data/lib/pulp_deb_client/models/deb_verbatim_publication_response.rb +236 -0
  122. data/lib/pulp_deb_client/models/inline_response200.rb +3 -13
  123. data/lib/pulp_deb_client/models/inline_response2001.rb +3 -13
  124. data/lib/pulp_deb_client/models/inline_response20010.rb +3 -13
  125. data/lib/pulp_deb_client/models/inline_response20011.rb +3 -13
  126. data/lib/pulp_deb_client/models/inline_response20012.rb +3 -13
  127. data/lib/pulp_deb_client/models/inline_response20013.rb +3 -13
  128. data/lib/pulp_deb_client/models/inline_response20014.rb +3 -13
  129. data/lib/pulp_deb_client/models/inline_response2002.rb +3 -13
  130. data/lib/pulp_deb_client/models/inline_response2003.rb +3 -13
  131. data/lib/pulp_deb_client/models/inline_response2004.rb +3 -13
  132. data/lib/pulp_deb_client/models/inline_response2005.rb +3 -13
  133. data/lib/pulp_deb_client/models/inline_response2006.rb +3 -13
  134. data/lib/pulp_deb_client/models/inline_response2007.rb +3 -13
  135. data/lib/pulp_deb_client/models/inline_response2008.rb +3 -13
  136. data/lib/pulp_deb_client/models/inline_response2009.rb +3 -13
  137. data/lib/pulp_deb_client/models/patcheddeb_apt_distribution.rb +240 -0
  138. data/lib/pulp_deb_client/models/patcheddeb_apt_remote.rb +402 -0
  139. data/lib/pulp_deb_client/models/patcheddeb_apt_repository.rb +229 -0
  140. data/lib/pulp_deb_client/models/policy_enum.rb +37 -0
  141. data/lib/pulp_deb_client/models/repository_add_remove_content.rb +5 -4
  142. data/lib/pulp_deb_client/models/repository_sync_url.rb +3 -8
  143. data/lib/pulp_deb_client/models/repository_version.rb +7 -43
  144. data/lib/pulp_deb_client/models/repository_version_response.rb +246 -0
  145. data/lib/pulp_deb_client/version.rb +3 -3
  146. data/lib/pulp_deb_client.rb +22 -2
  147. data/pulp_deb_client.gemspec +4 -4
  148. data/spec/api/content_generic_contents_api_spec.rb +12 -12
  149. data/spec/api/content_installer_file_indices_api_spec.rb +17 -17
  150. data/spec/api/content_installer_packages_api_spec.rb +27 -27
  151. data/spec/api/content_package_indices_api_spec.rb +17 -17
  152. data/spec/api/content_package_release_components_api_spec.rb +15 -15
  153. data/spec/api/content_packages_api_spec.rb +28 -28
  154. data/spec/api/content_release_architectures_api_spec.rb +15 -15
  155. data/spec/api/content_release_components_api_spec.rb +15 -15
  156. data/spec/api/content_release_files_api_spec.rb +17 -17
  157. data/spec/api/content_releases_api_spec.rb +16 -16
  158. data/spec/api/distributions_apt_api_spec.rb +41 -20
  159. data/spec/api/publications_apt_api_spec.rb +17 -17
  160. data/spec/api/publications_verbatim_api_spec.rb +17 -17
  161. data/spec/api/remotes_apt_api_spec.rb +51 -24
  162. data/spec/api/repositories_apt_api_spec.rb +31 -22
  163. data/spec/api/repositories_deb_versions_api_spec.rb +40 -25
  164. data/spec/api_client_spec.rb +2 -2
  165. data/spec/configuration_spec.rb +2 -2
  166. data/spec/models/async_operation_response_spec.rb +2 -2
  167. data/spec/models/content_summary_response_spec.rb +53 -0
  168. data/spec/models/content_summary_spec.rb +2 -2
  169. data/spec/models/deb_apt_distribution_response_spec.rb +77 -0
  170. data/spec/models/deb_apt_distribution_spec.rb +2 -20
  171. data/spec/models/deb_apt_publication_response_spec.rb +77 -0
  172. data/spec/models/deb_apt_publication_spec.rb +2 -14
  173. data/spec/models/deb_apt_remote_response_spec.rb +161 -0
  174. data/spec/models/deb_apt_remote_spec.rb +2 -24
  175. data/spec/models/deb_apt_repository_response_spec.rb +77 -0
  176. data/spec/models/deb_apt_repository_spec.rb +5 -23
  177. data/spec/models/deb_base_package_response_spec.rb +269 -0
  178. data/spec/models/deb_base_package_spec.rb +4 -214
  179. data/spec/models/deb_generic_content_response_spec.rb +95 -0
  180. data/spec/models/deb_generic_content_spec.rb +4 -40
  181. data/spec/models/deb_installer_file_index_response_spec.rb +77 -0
  182. data/spec/models/deb_installer_file_index_spec.rb +2 -14
  183. data/spec/models/deb_package_index_response_spec.rb +77 -0
  184. data/spec/models/deb_package_index_spec.rb +2 -14
  185. data/spec/models/deb_package_release_component_response_spec.rb +59 -0
  186. data/spec/models/deb_package_release_component_spec.rb +2 -14
  187. data/spec/models/deb_release_architecture_response_spec.rb +59 -0
  188. data/spec/models/deb_release_architecture_spec.rb +2 -14
  189. data/spec/models/deb_release_component_response_spec.rb +59 -0
  190. data/spec/models/deb_release_component_spec.rb +2 -14
  191. data/spec/models/deb_release_file_response_spec.rb +77 -0
  192. data/spec/models/deb_release_file_spec.rb +2 -14
  193. data/spec/models/deb_release_response_spec.rb +65 -0
  194. data/spec/models/deb_release_spec.rb +2 -14
  195. data/spec/models/deb_verbatim_publication_response_spec.rb +59 -0
  196. data/spec/models/deb_verbatim_publication_spec.rb +2 -14
  197. data/spec/models/inline_response20010_spec.rb +2 -2
  198. data/spec/models/inline_response20011_spec.rb +2 -2
  199. data/spec/models/inline_response20012_spec.rb +2 -2
  200. data/spec/models/inline_response20013_spec.rb +2 -2
  201. data/spec/models/inline_response20014_spec.rb +2 -2
  202. data/spec/models/inline_response2001_spec.rb +2 -2
  203. data/spec/models/inline_response2002_spec.rb +2 -2
  204. data/spec/models/inline_response2003_spec.rb +2 -2
  205. data/spec/models/inline_response2004_spec.rb +2 -2
  206. data/spec/models/inline_response2005_spec.rb +2 -2
  207. data/spec/models/inline_response2006_spec.rb +2 -2
  208. data/spec/models/inline_response2007_spec.rb +2 -2
  209. data/spec/models/inline_response2008_spec.rb +2 -2
  210. data/spec/models/inline_response2009_spec.rb +2 -2
  211. data/spec/models/inline_response200_spec.rb +2 -2
  212. data/spec/models/patcheddeb_apt_distribution_spec.rb +59 -0
  213. data/spec/models/patcheddeb_apt_remote_spec.rb +143 -0
  214. data/spec/models/patcheddeb_apt_repository_spec.rb +53 -0
  215. data/spec/models/policy_enum_spec.rb +35 -0
  216. data/spec/models/repository_add_remove_content_spec.rb +2 -2
  217. data/spec/models/repository_sync_url_spec.rb +2 -2
  218. data/spec/models/repository_version_response_spec.rb +65 -0
  219. data/spec/models/repository_version_spec.rb +2 -26
  220. data/spec/spec_helper.rb +2 -2
  221. metadata +120 -40
@@ -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,65 +13,37 @@ OpenAPI Generator version: 4.2.3
13
13
  require 'date'
14
14
 
15
15
  module PulpDebClient
16
+ # A serializer for GenericContent.
16
17
  class DebGenericContent
17
- attr_accessor :pulp_href
18
-
19
- # Timestamp of creation.
20
- attr_accessor :pulp_created
21
-
22
18
  # Artifact file representing the physical content
23
19
  attr_accessor :artifact
24
20
 
25
21
  # Path where the artifact is located relative to distributions base_path
26
22
  attr_accessor :relative_path
27
23
 
28
- # The MD5 checksum if available.
29
- attr_accessor :md5
30
-
31
- # The SHA-1 checksum if available.
32
- attr_accessor :sha1
24
+ # An uploaded file that may be turned into the artifact of the content unit.
25
+ attr_accessor :file
33
26
 
34
- # The SHA-224 checksum if available.
35
- attr_accessor :sha224
36
-
37
- # The SHA-256 checksum if available.
38
- attr_accessor :sha256
39
-
40
- # The SHA-384 checksum if available.
41
- attr_accessor :sha384
42
-
43
- # The SHA-512 checksum if available.
44
- attr_accessor :sha512
27
+ # A URI of a repository the new content unit should be associated with.
28
+ attr_accessor :repository
45
29
 
46
30
  # Attribute mapping from ruby-style variable name to JSON key.
47
31
  def self.attribute_map
48
32
  {
49
- :'pulp_href' => :'pulp_href',
50
- :'pulp_created' => :'pulp_created',
51
33
  :'artifact' => :'artifact',
52
34
  :'relative_path' => :'relative_path',
53
- :'md5' => :'md5',
54
- :'sha1' => :'sha1',
55
- :'sha224' => :'sha224',
56
- :'sha256' => :'sha256',
57
- :'sha384' => :'sha384',
58
- :'sha512' => :'sha512'
35
+ :'file' => :'file',
36
+ :'repository' => :'repository'
59
37
  }
60
38
  end
61
39
 
62
40
  # Attribute type mapping.
63
41
  def self.openapi_types
64
42
  {
65
- :'pulp_href' => :'String',
66
- :'pulp_created' => :'DateTime',
67
43
  :'artifact' => :'String',
68
44
  :'relative_path' => :'String',
69
- :'md5' => :'String',
70
- :'sha1' => :'String',
71
- :'sha224' => :'String',
72
- :'sha256' => :'String',
73
- :'sha384' => :'String',
74
- :'sha512' => :'String'
45
+ :'file' => :'File',
46
+ :'repository' => :'String'
75
47
  }
76
48
  end
77
49
 
@@ -96,14 +68,6 @@ module PulpDebClient
96
68
  h[k.to_sym] = v
97
69
  }
98
70
 
99
- if attributes.key?(:'pulp_href')
100
- self.pulp_href = attributes[:'pulp_href']
101
- end
102
-
103
- if attributes.key?(:'pulp_created')
104
- self.pulp_created = attributes[:'pulp_created']
105
- end
106
-
107
71
  if attributes.key?(:'artifact')
108
72
  self.artifact = attributes[:'artifact']
109
73
  end
@@ -112,28 +76,12 @@ module PulpDebClient
112
76
  self.relative_path = attributes[:'relative_path']
113
77
  end
114
78
 
115
- if attributes.key?(:'md5')
116
- self.md5 = attributes[:'md5']
117
- end
118
-
119
- if attributes.key?(:'sha1')
120
- self.sha1 = attributes[:'sha1']
121
- end
122
-
123
- if attributes.key?(:'sha224')
124
- self.sha224 = attributes[:'sha224']
125
- end
126
-
127
- if attributes.key?(:'sha256')
128
- self.sha256 = attributes[:'sha256']
129
- end
130
-
131
- if attributes.key?(:'sha384')
132
- self.sha384 = attributes[:'sha384']
79
+ if attributes.key?(:'file')
80
+ self.file = attributes[:'file']
133
81
  end
134
82
 
135
- if attributes.key?(:'sha512')
136
- self.sha512 = attributes[:'sha512']
83
+ if attributes.key?(:'repository')
84
+ self.repository = attributes[:'repository']
137
85
  end
138
86
  end
139
87
 
@@ -145,34 +93,6 @@ module PulpDebClient
145
93
  invalid_properties.push('invalid value for "relative_path", relative_path cannot be nil.')
146
94
  end
147
95
 
148
- if @relative_path.to_s.length < 1
149
- invalid_properties.push('invalid value for "relative_path", the character length must be great than or equal to 1.')
150
- end
151
-
152
- if !@md5.nil? && @md5.to_s.length < 1
153
- invalid_properties.push('invalid value for "md5", the character length must be great than or equal to 1.')
154
- end
155
-
156
- if !@sha1.nil? && @sha1.to_s.length < 1
157
- invalid_properties.push('invalid value for "sha1", the character length must be great than or equal to 1.')
158
- end
159
-
160
- if !@sha224.nil? && @sha224.to_s.length < 1
161
- invalid_properties.push('invalid value for "sha224", the character length must be great than or equal to 1.')
162
- end
163
-
164
- if !@sha256.nil? && @sha256.to_s.length < 1
165
- invalid_properties.push('invalid value for "sha256", the character length must be great than or equal to 1.')
166
- end
167
-
168
- if !@sha384.nil? && @sha384.to_s.length < 1
169
- invalid_properties.push('invalid value for "sha384", the character length must be great than or equal to 1.')
170
- end
171
-
172
- if !@sha512.nil? && @sha512.to_s.length < 1
173
- invalid_properties.push('invalid value for "sha512", the character length must be great than or equal to 1.')
174
- end
175
-
176
96
  invalid_properties
177
97
  end
178
98
 
@@ -180,105 +100,18 @@ module PulpDebClient
180
100
  # @return true if the model is valid
181
101
  def valid?
182
102
  return false if @relative_path.nil?
183
- return false if @relative_path.to_s.length < 1
184
- return false if !@md5.nil? && @md5.to_s.length < 1
185
- return false if !@sha1.nil? && @sha1.to_s.length < 1
186
- return false if !@sha224.nil? && @sha224.to_s.length < 1
187
- return false if !@sha256.nil? && @sha256.to_s.length < 1
188
- return false if !@sha384.nil? && @sha384.to_s.length < 1
189
- return false if !@sha512.nil? && @sha512.to_s.length < 1
190
103
  true
191
104
  end
192
105
 
193
- # Custom attribute writer method with validation
194
- # @param [Object] relative_path Value to be assigned
195
- def relative_path=(relative_path)
196
- if relative_path.nil?
197
- fail ArgumentError, 'relative_path cannot be nil'
198
- end
199
-
200
- if relative_path.to_s.length < 1
201
- fail ArgumentError, 'invalid value for "relative_path", the character length must be great than or equal to 1.'
202
- end
203
-
204
- @relative_path = relative_path
205
- end
206
-
207
- # Custom attribute writer method with validation
208
- # @param [Object] md5 Value to be assigned
209
- def md5=(md5)
210
- if !md5.nil? && md5.to_s.length < 1
211
- fail ArgumentError, 'invalid value for "md5", the character length must be great than or equal to 1.'
212
- end
213
-
214
- @md5 = md5
215
- end
216
-
217
- # Custom attribute writer method with validation
218
- # @param [Object] sha1 Value to be assigned
219
- def sha1=(sha1)
220
- if !sha1.nil? && sha1.to_s.length < 1
221
- fail ArgumentError, 'invalid value for "sha1", the character length must be great than or equal to 1.'
222
- end
223
-
224
- @sha1 = sha1
225
- end
226
-
227
- # Custom attribute writer method with validation
228
- # @param [Object] sha224 Value to be assigned
229
- def sha224=(sha224)
230
- if !sha224.nil? && sha224.to_s.length < 1
231
- fail ArgumentError, 'invalid value for "sha224", the character length must be great than or equal to 1.'
232
- end
233
-
234
- @sha224 = sha224
235
- end
236
-
237
- # Custom attribute writer method with validation
238
- # @param [Object] sha256 Value to be assigned
239
- def sha256=(sha256)
240
- if !sha256.nil? && sha256.to_s.length < 1
241
- fail ArgumentError, 'invalid value for "sha256", the character length must be great than or equal to 1.'
242
- end
243
-
244
- @sha256 = sha256
245
- end
246
-
247
- # Custom attribute writer method with validation
248
- # @param [Object] sha384 Value to be assigned
249
- def sha384=(sha384)
250
- if !sha384.nil? && sha384.to_s.length < 1
251
- fail ArgumentError, 'invalid value for "sha384", the character length must be great than or equal to 1.'
252
- end
253
-
254
- @sha384 = sha384
255
- end
256
-
257
- # Custom attribute writer method with validation
258
- # @param [Object] sha512 Value to be assigned
259
- def sha512=(sha512)
260
- if !sha512.nil? && sha512.to_s.length < 1
261
- fail ArgumentError, 'invalid value for "sha512", the character length must be great than or equal to 1.'
262
- end
263
-
264
- @sha512 = sha512
265
- end
266
-
267
106
  # Checks equality by comparing each attribute.
268
107
  # @param [Object] Object to be compared
269
108
  def ==(o)
270
109
  return true if self.equal?(o)
271
110
  self.class == o.class &&
272
- pulp_href == o.pulp_href &&
273
- pulp_created == o.pulp_created &&
274
111
  artifact == o.artifact &&
275
112
  relative_path == o.relative_path &&
276
- md5 == o.md5 &&
277
- sha1 == o.sha1 &&
278
- sha224 == o.sha224 &&
279
- sha256 == o.sha256 &&
280
- sha384 == o.sha384 &&
281
- sha512 == o.sha512
113
+ file == o.file &&
114
+ repository == o.repository
282
115
  end
283
116
 
284
117
  # @see the `==` method
@@ -290,7 +123,7 @@ module PulpDebClient
290
123
  # Calculates hash code according to all attributes.
291
124
  # @return [Integer] Hash code
292
125
  def hash
293
- [pulp_href, pulp_created, artifact, relative_path, md5, sha1, sha224, sha256, sha384, sha512].hash
126
+ [artifact, relative_path, file, repository].hash
294
127
  end
295
128
 
296
129
  # Builds the object from hash
@@ -0,0 +1,302 @@
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 PulpDebClient
16
+ # A serializer for GenericContent.
17
+ class DebGenericContentResponse
18
+ attr_accessor :pulp_href
19
+
20
+ # Timestamp of creation.
21
+ attr_accessor :pulp_created
22
+
23
+ # Artifact file representing the physical content
24
+ attr_accessor :artifact
25
+
26
+ # Path where the artifact is located relative to distributions base_path
27
+ attr_accessor :relative_path
28
+
29
+ # The MD5 checksum if available.
30
+ attr_accessor :md5
31
+
32
+ # The SHA-1 checksum if available.
33
+ attr_accessor :sha1
34
+
35
+ # The SHA-224 checksum if available.
36
+ attr_accessor :sha224
37
+
38
+ # The SHA-256 checksum if available.
39
+ attr_accessor :sha256
40
+
41
+ # The SHA-384 checksum if available.
42
+ attr_accessor :sha384
43
+
44
+ # The SHA-512 checksum if available.
45
+ attr_accessor :sha512
46
+
47
+ # Attribute mapping from ruby-style variable name to JSON key.
48
+ def self.attribute_map
49
+ {
50
+ :'pulp_href' => :'pulp_href',
51
+ :'pulp_created' => :'pulp_created',
52
+ :'artifact' => :'artifact',
53
+ :'relative_path' => :'relative_path',
54
+ :'md5' => :'md5',
55
+ :'sha1' => :'sha1',
56
+ :'sha224' => :'sha224',
57
+ :'sha256' => :'sha256',
58
+ :'sha384' => :'sha384',
59
+ :'sha512' => :'sha512'
60
+ }
61
+ end
62
+
63
+ # Attribute type mapping.
64
+ def self.openapi_types
65
+ {
66
+ :'pulp_href' => :'String',
67
+ :'pulp_created' => :'DateTime',
68
+ :'artifact' => :'String',
69
+ :'relative_path' => :'String',
70
+ :'md5' => :'String',
71
+ :'sha1' => :'String',
72
+ :'sha224' => :'String',
73
+ :'sha256' => :'String',
74
+ :'sha384' => :'String',
75
+ :'sha512' => :'String'
76
+ }
77
+ end
78
+
79
+ # List of attributes with nullable: true
80
+ def self.openapi_nullable
81
+ Set.new([
82
+ ])
83
+ end
84
+
85
+ # Initializes the object
86
+ # @param [Hash] attributes Model attributes in the form of hash
87
+ def initialize(attributes = {})
88
+ if (!attributes.is_a?(Hash))
89
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpDebClient::DebGenericContentResponse` initialize method"
90
+ end
91
+
92
+ # check to see if the attribute exists and convert string to symbol for hash key
93
+ attributes = attributes.each_with_object({}) { |(k, v), h|
94
+ if (!self.class.attribute_map.key?(k.to_sym))
95
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpDebClient::DebGenericContentResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
96
+ end
97
+ h[k.to_sym] = v
98
+ }
99
+
100
+ if attributes.key?(:'pulp_href')
101
+ self.pulp_href = attributes[:'pulp_href']
102
+ end
103
+
104
+ if attributes.key?(:'pulp_created')
105
+ self.pulp_created = attributes[:'pulp_created']
106
+ end
107
+
108
+ if attributes.key?(:'artifact')
109
+ self.artifact = attributes[:'artifact']
110
+ end
111
+
112
+ if attributes.key?(:'relative_path')
113
+ self.relative_path = attributes[:'relative_path']
114
+ end
115
+
116
+ if attributes.key?(:'md5')
117
+ self.md5 = attributes[:'md5']
118
+ end
119
+
120
+ if attributes.key?(:'sha1')
121
+ self.sha1 = attributes[:'sha1']
122
+ end
123
+
124
+ if attributes.key?(:'sha224')
125
+ self.sha224 = attributes[:'sha224']
126
+ end
127
+
128
+ if attributes.key?(:'sha256')
129
+ self.sha256 = attributes[:'sha256']
130
+ end
131
+
132
+ if attributes.key?(:'sha384')
133
+ self.sha384 = attributes[:'sha384']
134
+ end
135
+
136
+ if attributes.key?(:'sha512')
137
+ self.sha512 = attributes[:'sha512']
138
+ end
139
+ end
140
+
141
+ # Show invalid properties with the reasons. Usually used together with valid?
142
+ # @return Array for valid properties with the reasons
143
+ def list_invalid_properties
144
+ invalid_properties = Array.new
145
+ if @relative_path.nil?
146
+ invalid_properties.push('invalid value for "relative_path", relative_path cannot be nil.')
147
+ end
148
+
149
+ invalid_properties
150
+ end
151
+
152
+ # Check to see if the all the properties in the model are valid
153
+ # @return true if the model is valid
154
+ def valid?
155
+ return false if @relative_path.nil?
156
+ true
157
+ end
158
+
159
+ # Checks equality by comparing each attribute.
160
+ # @param [Object] Object to be compared
161
+ def ==(o)
162
+ return true if self.equal?(o)
163
+ self.class == o.class &&
164
+ pulp_href == o.pulp_href &&
165
+ pulp_created == o.pulp_created &&
166
+ artifact == o.artifact &&
167
+ relative_path == o.relative_path &&
168
+ md5 == o.md5 &&
169
+ sha1 == o.sha1 &&
170
+ sha224 == o.sha224 &&
171
+ sha256 == o.sha256 &&
172
+ sha384 == o.sha384 &&
173
+ sha512 == o.sha512
174
+ end
175
+
176
+ # @see the `==` method
177
+ # @param [Object] Object to be compared
178
+ def eql?(o)
179
+ self == o
180
+ end
181
+
182
+ # Calculates hash code according to all attributes.
183
+ # @return [Integer] Hash code
184
+ def hash
185
+ [pulp_href, pulp_created, artifact, relative_path, md5, sha1, sha224, sha256, sha384, sha512].hash
186
+ end
187
+
188
+ # Builds the object from hash
189
+ # @param [Hash] attributes Model attributes in the form of hash
190
+ # @return [Object] Returns the model itself
191
+ def self.build_from_hash(attributes)
192
+ new.build_from_hash(attributes)
193
+ end
194
+
195
+ # Builds the object from hash
196
+ # @param [Hash] attributes Model attributes in the form of hash
197
+ # @return [Object] Returns the model itself
198
+ def build_from_hash(attributes)
199
+ return nil unless attributes.is_a?(Hash)
200
+ self.class.openapi_types.each_pair do |key, type|
201
+ if type =~ /\AArray<(.*)>/i
202
+ # check to ensure the input is an array given that the attribute
203
+ # is documented as an array but the input is not
204
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
205
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
206
+ end
207
+ elsif !attributes[self.class.attribute_map[key]].nil?
208
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
209
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
210
+ end
211
+
212
+ self
213
+ end
214
+
215
+ # Deserializes the data based on type
216
+ # @param string type Data type
217
+ # @param string value Value to be deserialized
218
+ # @return [Object] Deserialized data
219
+ def _deserialize(type, value)
220
+ case type.to_sym
221
+ when :DateTime
222
+ DateTime.parse(value)
223
+ when :Date
224
+ Date.parse(value)
225
+ when :String
226
+ value.to_s
227
+ when :Integer
228
+ value.to_i
229
+ when :Float
230
+ value.to_f
231
+ when :Boolean
232
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
233
+ true
234
+ else
235
+ false
236
+ end
237
+ when :Object
238
+ # generic object (usually a Hash), return directly
239
+ value
240
+ when /\AArray<(?<inner_type>.+)>\z/
241
+ inner_type = Regexp.last_match[:inner_type]
242
+ value.map { |v| _deserialize(inner_type, v) }
243
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
244
+ k_type = Regexp.last_match[:k_type]
245
+ v_type = Regexp.last_match[:v_type]
246
+ {}.tap do |hash|
247
+ value.each do |k, v|
248
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
249
+ end
250
+ end
251
+ else # model
252
+ PulpDebClient.const_get(type).build_from_hash(value)
253
+ end
254
+ end
255
+
256
+ # Returns the string representation of the object
257
+ # @return [String] String presentation of the object
258
+ def to_s
259
+ to_hash.to_s
260
+ end
261
+
262
+ # to_body is an alias to to_hash (backward compatibility)
263
+ # @return [Hash] Returns the object in the form of hash
264
+ def to_body
265
+ to_hash
266
+ end
267
+
268
+ # Returns the object in the form of hash
269
+ # @return [Hash] Returns the object in the form of hash
270
+ def to_hash
271
+ hash = {}
272
+ self.class.attribute_map.each_pair do |attr, param|
273
+ value = self.send(attr)
274
+ if value.nil?
275
+ is_nullable = self.class.openapi_nullable.include?(attr)
276
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
277
+ end
278
+
279
+ hash[param] = _to_hash(value)
280
+ end
281
+ hash
282
+ end
283
+
284
+ # Outputs non-array value in the form of hash
285
+ # For object, use to_hash. Otherwise, just return the value
286
+ # @param [Object] value Any valid value
287
+ # @return [Hash] Returns the value in the form of hash
288
+ def _to_hash(value)
289
+ if value.is_a?(Array)
290
+ value.compact.map { |v| _to_hash(v) }
291
+ elsif value.is_a?(Hash)
292
+ {}.tap do |hash|
293
+ value.each { |k, v| hash[k] = _to_hash(v) }
294
+ end
295
+ elsif value.respond_to? :to_hash
296
+ value.to_hash
297
+ else
298
+ value
299
+ end
300
+ end
301
+ end
302
+ end