pulp_deb_client 2.5.0b1 → 2.6.0b1

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -0,0 +1,229 @@
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 AptRepository.
17
+ class PatcheddebAptRepository
18
+ # A unique name for this repository.
19
+ attr_accessor :name
20
+
21
+ # An optional description.
22
+ attr_accessor :description
23
+
24
+ attr_accessor :remote
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'name' => :'name',
30
+ :'description' => :'description',
31
+ :'remote' => :'remote'
32
+ }
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ def self.openapi_types
37
+ {
38
+ :'name' => :'String',
39
+ :'description' => :'String',
40
+ :'remote' => :'String'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ :'description',
48
+ :'remote'
49
+ ])
50
+ end
51
+
52
+ # Initializes the object
53
+ # @param [Hash] attributes Model attributes in the form of hash
54
+ def initialize(attributes = {})
55
+ if (!attributes.is_a?(Hash))
56
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpDebClient::PatcheddebAptRepository` initialize method"
57
+ end
58
+
59
+ # check to see if the attribute exists and convert string to symbol for hash key
60
+ attributes = attributes.each_with_object({}) { |(k, v), h|
61
+ if (!self.class.attribute_map.key?(k.to_sym))
62
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpDebClient::PatcheddebAptRepository`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
63
+ end
64
+ h[k.to_sym] = v
65
+ }
66
+
67
+ if attributes.key?(:'name')
68
+ self.name = attributes[:'name']
69
+ end
70
+
71
+ if attributes.key?(:'description')
72
+ self.description = attributes[:'description']
73
+ end
74
+
75
+ if attributes.key?(:'remote')
76
+ self.remote = attributes[:'remote']
77
+ end
78
+ end
79
+
80
+ # Show invalid properties with the reasons. Usually used together with valid?
81
+ # @return Array for valid properties with the reasons
82
+ def list_invalid_properties
83
+ invalid_properties = Array.new
84
+ invalid_properties
85
+ end
86
+
87
+ # Check to see if the all the properties in the model are valid
88
+ # @return true if the model is valid
89
+ def valid?
90
+ true
91
+ end
92
+
93
+ # Checks equality by comparing each attribute.
94
+ # @param [Object] Object to be compared
95
+ def ==(o)
96
+ return true if self.equal?(o)
97
+ self.class == o.class &&
98
+ name == o.name &&
99
+ description == o.description &&
100
+ remote == o.remote
101
+ end
102
+
103
+ # @see the `==` method
104
+ # @param [Object] Object to be compared
105
+ def eql?(o)
106
+ self == o
107
+ end
108
+
109
+ # Calculates hash code according to all attributes.
110
+ # @return [Integer] Hash code
111
+ def hash
112
+ [name, description, remote].hash
113
+ end
114
+
115
+ # Builds the object from hash
116
+ # @param [Hash] attributes Model attributes in the form of hash
117
+ # @return [Object] Returns the model itself
118
+ def self.build_from_hash(attributes)
119
+ new.build_from_hash(attributes)
120
+ end
121
+
122
+ # Builds the object from hash
123
+ # @param [Hash] attributes Model attributes in the form of hash
124
+ # @return [Object] Returns the model itself
125
+ def build_from_hash(attributes)
126
+ return nil unless attributes.is_a?(Hash)
127
+ self.class.openapi_types.each_pair do |key, type|
128
+ if type =~ /\AArray<(.*)>/i
129
+ # check to ensure the input is an array given that the attribute
130
+ # is documented as an array but the input is not
131
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
132
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
133
+ end
134
+ elsif !attributes[self.class.attribute_map[key]].nil?
135
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
136
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
137
+ end
138
+
139
+ self
140
+ end
141
+
142
+ # Deserializes the data based on type
143
+ # @param string type Data type
144
+ # @param string value Value to be deserialized
145
+ # @return [Object] Deserialized data
146
+ def _deserialize(type, value)
147
+ case type.to_sym
148
+ when :DateTime
149
+ DateTime.parse(value)
150
+ when :Date
151
+ Date.parse(value)
152
+ when :String
153
+ value.to_s
154
+ when :Integer
155
+ value.to_i
156
+ when :Float
157
+ value.to_f
158
+ when :Boolean
159
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
160
+ true
161
+ else
162
+ false
163
+ end
164
+ when :Object
165
+ # generic object (usually a Hash), return directly
166
+ value
167
+ when /\AArray<(?<inner_type>.+)>\z/
168
+ inner_type = Regexp.last_match[:inner_type]
169
+ value.map { |v| _deserialize(inner_type, v) }
170
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
171
+ k_type = Regexp.last_match[:k_type]
172
+ v_type = Regexp.last_match[:v_type]
173
+ {}.tap do |hash|
174
+ value.each do |k, v|
175
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
176
+ end
177
+ end
178
+ else # model
179
+ PulpDebClient.const_get(type).build_from_hash(value)
180
+ end
181
+ end
182
+
183
+ # Returns the string representation of the object
184
+ # @return [String] String presentation of the object
185
+ def to_s
186
+ to_hash.to_s
187
+ end
188
+
189
+ # to_body is an alias to to_hash (backward compatibility)
190
+ # @return [Hash] Returns the object in the form of hash
191
+ def to_body
192
+ to_hash
193
+ end
194
+
195
+ # Returns the object in the form of hash
196
+ # @return [Hash] Returns the object in the form of hash
197
+ def to_hash
198
+ hash = {}
199
+ self.class.attribute_map.each_pair do |attr, param|
200
+ value = self.send(attr)
201
+ if value.nil?
202
+ is_nullable = self.class.openapi_nullable.include?(attr)
203
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
204
+ end
205
+
206
+ hash[param] = _to_hash(value)
207
+ end
208
+ hash
209
+ end
210
+
211
+ # Outputs non-array value in the form of hash
212
+ # For object, use to_hash. Otherwise, just return the value
213
+ # @param [Object] value Any valid value
214
+ # @return [Hash] Returns the value in the form of hash
215
+ def _to_hash(value)
216
+ if value.is_a?(Array)
217
+ value.compact.map { |v| _to_hash(v) }
218
+ elsif value.is_a?(Hash)
219
+ {}.tap do |hash|
220
+ value.each { |k, v| hash[k] = _to_hash(v) }
221
+ end
222
+ elsif value.respond_to? :to_hash
223
+ value.to_hash
224
+ else
225
+ value
226
+ end
227
+ end
228
+ end
229
+ end
@@ -0,0 +1,37 @@
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
+ class PolicyEnum
17
+ IMMEDIATE = "immediate".freeze
18
+ ON_DEMAND = "on_demand".freeze
19
+ STREAMED = "streamed".freeze
20
+
21
+ # Builds the enum from string
22
+ # @param [String] The enum value in the form of the string
23
+ # @return [String] The enum value
24
+ def self.build_from_hash(value)
25
+ new.build_from_hash(value)
26
+ end
27
+
28
+ # Builds the enum from string
29
+ # @param [String] The enum value in the form of the string
30
+ # @return [String] The enum value
31
+ def build_from_hash(value)
32
+ constantValues = PolicyEnum.constants.select { |c| PolicyEnum::const_get(c) == value }
33
+ raise "Invalid ENUM value #{value} for class #PolicyEnum" if constantValues.empty?
34
+ value
35
+ end
36
+ end
37
+ 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
 
@@ -13,6 +13,7 @@ OpenAPI Generator version: 4.2.3
13
13
  require 'date'
14
14
 
15
15
  module PulpDebClient
16
+ # Base serializer for use with :class:`pulpcore.app.models.Model` This ensures that all Serializers provide values for the 'pulp_href` field. The class provides a default for the ``ref_name`` attribute in the ModelSerializers's ``Meta`` class. This ensures that the OpenAPI definitions of plugins are namespaced properly.
16
17
  class RepositoryAddRemoveContent
17
18
  # A list of content units to add to a new repository version. This content is added after remove_content_units are removed.
18
19
  attr_accessor :add_content_units
@@ -35,8 +36,8 @@ module PulpDebClient
35
36
  # Attribute type mapping.
36
37
  def self.openapi_types
37
38
  {
38
- :'add_content_units' => :'Array<String>',
39
- :'remove_content_units' => :'Array<String>',
39
+ :'add_content_units' => :'Array<Object>',
40
+ :'remove_content_units' => :'Array<Object>',
40
41
  :'base_version' => :'String'
41
42
  }
42
43
  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
 
@@ -14,7 +14,7 @@ require 'date'
14
14
 
15
15
  module PulpDebClient
16
16
  class RepositorySyncURL
17
- # A URI of the repository to be synchronized.
17
+ # A remote to sync from. This will override a remote set on repository.
18
18
  attr_accessor :remote
19
19
 
20
20
  # If ``True``, synchronization will remove all content that is not present in the remote repository. If ``False``, sync will be additive only.
@@ -72,17 +72,12 @@ module PulpDebClient
72
72
  # @return Array for valid properties with the reasons
73
73
  def list_invalid_properties
74
74
  invalid_properties = Array.new
75
- if @remote.nil?
76
- invalid_properties.push('invalid value for "remote", remote cannot be nil.')
77
- end
78
-
79
75
  invalid_properties
80
76
  end
81
77
 
82
78
  # Check to see if the all the properties in the model are valid
83
79
  # @return true if the model is valid
84
80
  def valid?
85
- return false if @remote.nil?
86
81
  true
87
82
  end
88
83
 
@@ -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,38 +13,22 @@ OpenAPI Generator version: 4.2.3
13
13
  require 'date'
14
14
 
15
15
  module PulpDebClient
16
+ # Base serializer for use with :class:`pulpcore.app.models.Model` This ensures that all Serializers provide values for the 'pulp_href` field. The class provides a default for the ``ref_name`` attribute in the ModelSerializers's ``Meta`` class. This ensures that the OpenAPI definitions of plugins are namespaced properly.
16
17
  class RepositoryVersion
17
- attr_accessor :pulp_href
18
-
19
- # Timestamp of creation.
20
- attr_accessor :pulp_created
21
-
22
- attr_accessor :number
23
-
24
18
  # A repository version whose content was used as the initial set of content for this repository version
25
19
  attr_accessor :base_version
26
20
 
27
- attr_accessor :content_summary
28
-
29
21
  # Attribute mapping from ruby-style variable name to JSON key.
30
22
  def self.attribute_map
31
23
  {
32
- :'pulp_href' => :'pulp_href',
33
- :'pulp_created' => :'pulp_created',
34
- :'number' => :'number',
35
- :'base_version' => :'base_version',
36
- :'content_summary' => :'content_summary'
24
+ :'base_version' => :'base_version'
37
25
  }
38
26
  end
39
27
 
40
28
  # Attribute type mapping.
41
29
  def self.openapi_types
42
30
  {
43
- :'pulp_href' => :'String',
44
- :'pulp_created' => :'DateTime',
45
- :'number' => :'Integer',
46
- :'base_version' => :'String',
47
- :'content_summary' => :'ContentSummary'
31
+ :'base_version' => :'String'
48
32
  }
49
33
  end
50
34
 
@@ -69,25 +53,9 @@ module PulpDebClient
69
53
  h[k.to_sym] = v
70
54
  }
71
55
 
72
- if attributes.key?(:'pulp_href')
73
- self.pulp_href = attributes[:'pulp_href']
74
- end
75
-
76
- if attributes.key?(:'pulp_created')
77
- self.pulp_created = attributes[:'pulp_created']
78
- end
79
-
80
- if attributes.key?(:'number')
81
- self.number = attributes[:'number']
82
- end
83
-
84
56
  if attributes.key?(:'base_version')
85
57
  self.base_version = attributes[:'base_version']
86
58
  end
87
-
88
- if attributes.key?(:'content_summary')
89
- self.content_summary = attributes[:'content_summary']
90
- end
91
59
  end
92
60
 
93
61
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -108,11 +76,7 @@ module PulpDebClient
108
76
  def ==(o)
109
77
  return true if self.equal?(o)
110
78
  self.class == o.class &&
111
- pulp_href == o.pulp_href &&
112
- pulp_created == o.pulp_created &&
113
- number == o.number &&
114
- base_version == o.base_version &&
115
- content_summary == o.content_summary
79
+ base_version == o.base_version
116
80
  end
117
81
 
118
82
  # @see the `==` method
@@ -124,7 +88,7 @@ module PulpDebClient
124
88
  # Calculates hash code according to all attributes.
125
89
  # @return [Integer] Hash code
126
90
  def hash
127
- [pulp_href, pulp_created, number, base_version, content_summary].hash
91
+ [base_version].hash
128
92
  end
129
93
 
130
94
  # Builds the object from hash
@@ -0,0 +1,246 @@
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
+ # Base serializer for use with :class:`pulpcore.app.models.Model` This ensures that all Serializers provide values for the 'pulp_href` field. The class provides a default for the ``ref_name`` attribute in the ModelSerializers's ``Meta`` class. This ensures that the OpenAPI definitions of plugins are namespaced properly.
17
+ class RepositoryVersionResponse
18
+ attr_accessor :pulp_href
19
+
20
+ # Timestamp of creation.
21
+ attr_accessor :pulp_created
22
+
23
+ attr_accessor :number
24
+
25
+ # A repository version whose content was used as the initial set of content for this repository version
26
+ attr_accessor :base_version
27
+
28
+ # Various count summaries of the content in the version and the HREF to view them.
29
+ attr_accessor :content_summary
30
+
31
+ # Attribute mapping from ruby-style variable name to JSON key.
32
+ def self.attribute_map
33
+ {
34
+ :'pulp_href' => :'pulp_href',
35
+ :'pulp_created' => :'pulp_created',
36
+ :'number' => :'number',
37
+ :'base_version' => :'base_version',
38
+ :'content_summary' => :'content_summary'
39
+ }
40
+ end
41
+
42
+ # Attribute type mapping.
43
+ def self.openapi_types
44
+ {
45
+ :'pulp_href' => :'String',
46
+ :'pulp_created' => :'DateTime',
47
+ :'number' => :'Integer',
48
+ :'base_version' => :'String',
49
+ :'content_summary' => :'ContentSummaryResponse'
50
+ }
51
+ end
52
+
53
+ # List of attributes with nullable: true
54
+ def self.openapi_nullable
55
+ Set.new([
56
+ ])
57
+ end
58
+
59
+ # Initializes the object
60
+ # @param [Hash] attributes Model attributes in the form of hash
61
+ def initialize(attributes = {})
62
+ if (!attributes.is_a?(Hash))
63
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpDebClient::RepositoryVersionResponse` initialize method"
64
+ end
65
+
66
+ # check to see if the attribute exists and convert string to symbol for hash key
67
+ attributes = attributes.each_with_object({}) { |(k, v), h|
68
+ if (!self.class.attribute_map.key?(k.to_sym))
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpDebClient::RepositoryVersionResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
70
+ end
71
+ h[k.to_sym] = v
72
+ }
73
+
74
+ if attributes.key?(:'pulp_href')
75
+ self.pulp_href = attributes[:'pulp_href']
76
+ end
77
+
78
+ if attributes.key?(:'pulp_created')
79
+ self.pulp_created = attributes[:'pulp_created']
80
+ end
81
+
82
+ if attributes.key?(:'number')
83
+ self.number = attributes[:'number']
84
+ end
85
+
86
+ if attributes.key?(:'base_version')
87
+ self.base_version = attributes[:'base_version']
88
+ end
89
+
90
+ if attributes.key?(:'content_summary')
91
+ self.content_summary = attributes[:'content_summary']
92
+ end
93
+ end
94
+
95
+ # Show invalid properties with the reasons. Usually used together with valid?
96
+ # @return Array for valid properties with the reasons
97
+ def list_invalid_properties
98
+ invalid_properties = Array.new
99
+ invalid_properties
100
+ end
101
+
102
+ # Check to see if the all the properties in the model are valid
103
+ # @return true if the model is valid
104
+ def valid?
105
+ true
106
+ end
107
+
108
+ # Checks equality by comparing each attribute.
109
+ # @param [Object] Object to be compared
110
+ def ==(o)
111
+ return true if self.equal?(o)
112
+ self.class == o.class &&
113
+ pulp_href == o.pulp_href &&
114
+ pulp_created == o.pulp_created &&
115
+ number == o.number &&
116
+ base_version == o.base_version &&
117
+ content_summary == o.content_summary
118
+ end
119
+
120
+ # @see the `==` method
121
+ # @param [Object] Object to be compared
122
+ def eql?(o)
123
+ self == o
124
+ end
125
+
126
+ # Calculates hash code according to all attributes.
127
+ # @return [Integer] Hash code
128
+ def hash
129
+ [pulp_href, pulp_created, number, base_version, content_summary].hash
130
+ end
131
+
132
+ # Builds the object from hash
133
+ # @param [Hash] attributes Model attributes in the form of hash
134
+ # @return [Object] Returns the model itself
135
+ def self.build_from_hash(attributes)
136
+ new.build_from_hash(attributes)
137
+ end
138
+
139
+ # Builds the object from hash
140
+ # @param [Hash] attributes Model attributes in the form of hash
141
+ # @return [Object] Returns the model itself
142
+ def build_from_hash(attributes)
143
+ return nil unless attributes.is_a?(Hash)
144
+ self.class.openapi_types.each_pair do |key, type|
145
+ if type =~ /\AArray<(.*)>/i
146
+ # check to ensure the input is an array given that the attribute
147
+ # is documented as an array but the input is not
148
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
149
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
150
+ end
151
+ elsif !attributes[self.class.attribute_map[key]].nil?
152
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
153
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
154
+ end
155
+
156
+ self
157
+ end
158
+
159
+ # Deserializes the data based on type
160
+ # @param string type Data type
161
+ # @param string value Value to be deserialized
162
+ # @return [Object] Deserialized data
163
+ def _deserialize(type, value)
164
+ case type.to_sym
165
+ when :DateTime
166
+ DateTime.parse(value)
167
+ when :Date
168
+ Date.parse(value)
169
+ when :String
170
+ value.to_s
171
+ when :Integer
172
+ value.to_i
173
+ when :Float
174
+ value.to_f
175
+ when :Boolean
176
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
177
+ true
178
+ else
179
+ false
180
+ end
181
+ when :Object
182
+ # generic object (usually a Hash), return directly
183
+ value
184
+ when /\AArray<(?<inner_type>.+)>\z/
185
+ inner_type = Regexp.last_match[:inner_type]
186
+ value.map { |v| _deserialize(inner_type, v) }
187
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
188
+ k_type = Regexp.last_match[:k_type]
189
+ v_type = Regexp.last_match[:v_type]
190
+ {}.tap do |hash|
191
+ value.each do |k, v|
192
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
193
+ end
194
+ end
195
+ else # model
196
+ PulpDebClient.const_get(type).build_from_hash(value)
197
+ end
198
+ end
199
+
200
+ # Returns the string representation of the object
201
+ # @return [String] String presentation of the object
202
+ def to_s
203
+ to_hash.to_s
204
+ end
205
+
206
+ # to_body is an alias to to_hash (backward compatibility)
207
+ # @return [Hash] Returns the object in the form of hash
208
+ def to_body
209
+ to_hash
210
+ end
211
+
212
+ # Returns the object in the form of hash
213
+ # @return [Hash] Returns the object in the form of hash
214
+ def to_hash
215
+ hash = {}
216
+ self.class.attribute_map.each_pair do |attr, param|
217
+ value = self.send(attr)
218
+ if value.nil?
219
+ is_nullable = self.class.openapi_nullable.include?(attr)
220
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
221
+ end
222
+
223
+ hash[param] = _to_hash(value)
224
+ end
225
+ hash
226
+ end
227
+
228
+ # Outputs non-array value in the form of hash
229
+ # For object, use to_hash. Otherwise, just return the value
230
+ # @param [Object] value Any valid value
231
+ # @return [Hash] Returns the value in the form of hash
232
+ def _to_hash(value)
233
+ if value.is_a?(Array)
234
+ value.compact.map { |v| _to_hash(v) }
235
+ elsif value.is_a?(Hash)
236
+ {}.tap do |hash|
237
+ value.each { |k, v| hash[k] = _to_hash(v) }
238
+ end
239
+ elsif value.respond_to? :to_hash
240
+ value.to_hash
241
+ else
242
+ value
243
+ end
244
+ end
245
+ end
246
+ end