pulp_deb_client 2.4.0b1 → 2.5.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 (140) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +35 -48
  3. data/docs/ContentGenericContentsApi.md +2 -2
  4. data/docs/ContentInstallerFileIndicesApi.md +4 -4
  5. data/docs/ContentInstallerPackagesApi.md +2 -2
  6. data/docs/ContentPackageIndicesApi.md +4 -4
  7. data/docs/ContentPackageReleaseComponentsApi.md +4 -4
  8. data/docs/ContentPackagesApi.md +2 -2
  9. data/docs/ContentReleaseArchitecturesApi.md +4 -4
  10. data/docs/ContentReleaseComponentsApi.md +4 -4
  11. data/docs/ContentReleaseFilesApi.md +4 -4
  12. data/docs/ContentReleasesApi.md +4 -4
  13. data/docs/{DebDebDistribution.md → DebAptDistribution.md} +2 -2
  14. data/docs/{DebDebPublication.md → DebAptPublication.md} +2 -2
  15. data/docs/{DebDebRemote.md → DebAptRemote.md} +2 -2
  16. data/docs/{DebDebRepository.md → DebAptRepository.md} +2 -2
  17. data/docs/{DebBasePackageRead.md → DebBasePackage.md} +2 -2
  18. data/docs/{DebGenericContentRead.md → DebGenericContent.md} +2 -2
  19. data/docs/DistributionsAptApi.md +43 -43
  20. data/docs/InlineResponse200.md +1 -1
  21. data/docs/InlineResponse2001.md +1 -1
  22. data/docs/InlineResponse20010.md +1 -1
  23. data/docs/InlineResponse20011.md +1 -1
  24. data/docs/InlineResponse20012.md +1 -1
  25. data/docs/InlineResponse20013.md +1 -1
  26. data/docs/InlineResponse20014.md +1 -1
  27. data/docs/InlineResponse2002.md +1 -1
  28. data/docs/InlineResponse2003.md +1 -1
  29. data/docs/InlineResponse2004.md +1 -1
  30. data/docs/InlineResponse2005.md +1 -1
  31. data/docs/InlineResponse2006.md +1 -1
  32. data/docs/InlineResponse2007.md +1 -1
  33. data/docs/InlineResponse2008.md +1 -1
  34. data/docs/InlineResponse2009.md +1 -1
  35. data/docs/PublicationsAptApi.md +26 -26
  36. data/docs/PublicationsVerbatimApi.md +2 -2
  37. data/docs/RemotesAptApi.md +46 -46
  38. data/docs/RepositoriesAptApi.md +56 -56
  39. data/docs/RepositoriesDebVersionsApi.md +13 -11
  40. data/lib/pulp_deb_client/api/content_generic_contents_api.rb +3 -3
  41. data/lib/pulp_deb_client/api/content_installer_file_indices_api.rb +6 -6
  42. data/lib/pulp_deb_client/api/content_installer_packages_api.rb +3 -3
  43. data/lib/pulp_deb_client/api/content_package_indices_api.rb +6 -6
  44. data/lib/pulp_deb_client/api/content_package_release_components_api.rb +6 -6
  45. data/lib/pulp_deb_client/api/content_packages_api.rb +3 -3
  46. data/lib/pulp_deb_client/api/content_release_architectures_api.rb +6 -6
  47. data/lib/pulp_deb_client/api/content_release_components_api.rb +6 -6
  48. data/lib/pulp_deb_client/api/content_release_files_api.rb +6 -6
  49. data/lib/pulp_deb_client/api/content_releases_api.rb +6 -6
  50. data/lib/pulp_deb_client/api/distributions_apt_api.rb +61 -61
  51. data/lib/pulp_deb_client/api/publications_apt_api.rb +37 -37
  52. data/lib/pulp_deb_client/api/publications_verbatim_api.rb +3 -3
  53. data/lib/pulp_deb_client/api/remotes_apt_api.rb +66 -66
  54. data/lib/pulp_deb_client/api/repositories_apt_api.rb +84 -84
  55. data/lib/pulp_deb_client/api/repositories_deb_versions_api.rb +22 -19
  56. data/lib/pulp_deb_client/models/{deb_deb_distribution.rb → deb_apt_distribution.rb} +3 -3
  57. data/lib/pulp_deb_client/models/{deb_deb_publication.rb → deb_apt_publication.rb} +3 -3
  58. data/lib/pulp_deb_client/models/{deb_deb_remote.rb → deb_apt_remote.rb} +6 -3
  59. data/lib/pulp_deb_client/models/{deb_deb_repository.rb → deb_apt_repository.rb} +3 -3
  60. data/lib/pulp_deb_client/models/{deb_base_package_read.rb → deb_base_package.rb} +3 -3
  61. data/lib/pulp_deb_client/models/{deb_generic_content_read.rb → deb_generic_content.rb} +3 -3
  62. data/lib/pulp_deb_client/models/inline_response200.rb +1 -1
  63. data/lib/pulp_deb_client/models/inline_response2001.rb +1 -1
  64. data/lib/pulp_deb_client/models/inline_response20010.rb +1 -1
  65. data/lib/pulp_deb_client/models/inline_response20011.rb +1 -1
  66. data/lib/pulp_deb_client/models/inline_response20012.rb +1 -1
  67. data/lib/pulp_deb_client/models/inline_response20013.rb +1 -1
  68. data/lib/pulp_deb_client/models/inline_response20014.rb +1 -1
  69. data/lib/pulp_deb_client/models/inline_response2002.rb +1 -1
  70. data/lib/pulp_deb_client/models/inline_response2003.rb +1 -1
  71. data/lib/pulp_deb_client/models/inline_response2004.rb +1 -1
  72. data/lib/pulp_deb_client/models/inline_response2005.rb +1 -1
  73. data/lib/pulp_deb_client/models/inline_response2006.rb +1 -1
  74. data/lib/pulp_deb_client/models/inline_response2007.rb +1 -1
  75. data/lib/pulp_deb_client/models/inline_response2008.rb +1 -1
  76. data/lib/pulp_deb_client/models/inline_response2009.rb +1 -1
  77. data/lib/pulp_deb_client/version.rb +1 -1
  78. data/lib/pulp_deb_client.rb +6 -19
  79. data/spec/api/content_generic_contents_api_spec.rb +1 -1
  80. data/spec/api/content_installer_file_indices_api_spec.rb +2 -2
  81. data/spec/api/content_installer_packages_api_spec.rb +1 -1
  82. data/spec/api/content_package_indices_api_spec.rb +2 -2
  83. data/spec/api/content_package_release_components_api_spec.rb +2 -2
  84. data/spec/api/content_packages_api_spec.rb +1 -1
  85. data/spec/api/content_release_architectures_api_spec.rb +2 -2
  86. data/spec/api/content_release_components_api_spec.rb +2 -2
  87. data/spec/api/content_release_files_api_spec.rb +2 -2
  88. data/spec/api/content_releases_api_spec.rb +2 -2
  89. data/spec/api/distributions_apt_api_spec.rb +13 -13
  90. data/spec/api/publications_apt_api_spec.rb +10 -10
  91. data/spec/api/publications_verbatim_api_spec.rb +1 -1
  92. data/spec/api/remotes_apt_api_spec.rb +15 -15
  93. data/spec/api/repositories_apt_api_spec.rb +17 -17
  94. data/spec/api/repositories_deb_versions_api_spec.rb +6 -5
  95. data/spec/models/{deb_deb_distribution_spec.rb → deb_apt_distribution_spec.rb} +6 -6
  96. data/spec/models/{deb_deb_publication_spec.rb → deb_apt_publication_spec.rb} +6 -6
  97. data/spec/models/{deb_deb_remote_spec.rb → deb_apt_remote_spec.rb} +6 -6
  98. data/spec/models/{deb_deb_repository_spec.rb → deb_apt_repository_spec.rb} +6 -6
  99. data/spec/models/{deb_base_package_read_spec.rb → deb_base_package_spec.rb} +6 -6
  100. data/spec/models/{deb_generic_content_read_spec.rb → deb_generic_content_spec.rb} +6 -6
  101. metadata +26 -78
  102. data/docs/DebDebDistributionRead.md +0 -29
  103. data/docs/DebDebPublicationRead.md +0 -29
  104. data/docs/DebDebRemoteRead.md +0 -57
  105. data/docs/DebDebRepositoryRead.md +0 -27
  106. data/docs/DebInstallerFileIndexRead.md +0 -29
  107. data/docs/DebPackageIndexRead.md +0 -29
  108. data/docs/DebPackageReleaseComponentRead.md +0 -23
  109. data/docs/DebReleaseArchitectureRead.md +0 -23
  110. data/docs/DebReleaseComponentRead.md +0 -23
  111. data/docs/DebReleaseFileRead.md +0 -29
  112. data/docs/DebReleaseRead.md +0 -25
  113. data/docs/DebVerbatimPublicationRead.md +0 -23
  114. data/docs/RepositoryVersionRead.md +0 -25
  115. data/lib/pulp_deb_client/models/deb_deb_distribution_read.rb +0 -331
  116. data/lib/pulp_deb_client/models/deb_deb_publication_read.rb +0 -269
  117. data/lib/pulp_deb_client/models/deb_deb_remote_read.rb +0 -670
  118. data/lib/pulp_deb_client/models/deb_deb_repository_read.rb +0 -294
  119. data/lib/pulp_deb_client/models/deb_installer_file_index_read.rb +0 -341
  120. data/lib/pulp_deb_client/models/deb_package_index_read.rb +0 -341
  121. data/lib/pulp_deb_client/models/deb_package_release_component_read.rb +0 -246
  122. data/lib/pulp_deb_client/models/deb_release_architecture_read.rb +0 -265
  123. data/lib/pulp_deb_client/models/deb_release_component_read.rb +0 -265
  124. data/lib/pulp_deb_client/models/deb_release_file_read.rb +0 -342
  125. data/lib/pulp_deb_client/models/deb_release_read.rb +0 -315
  126. data/lib/pulp_deb_client/models/deb_verbatim_publication_read.rb +0 -235
  127. data/lib/pulp_deb_client/models/repository_version_read.rb +0 -244
  128. data/spec/models/deb_deb_distribution_read_spec.rb +0 -77
  129. data/spec/models/deb_deb_publication_read_spec.rb +0 -77
  130. data/spec/models/deb_deb_remote_read_spec.rb +0 -165
  131. data/spec/models/deb_deb_repository_read_spec.rb +0 -71
  132. data/spec/models/deb_installer_file_index_read_spec.rb +0 -77
  133. data/spec/models/deb_package_index_read_spec.rb +0 -77
  134. data/spec/models/deb_package_release_component_read_spec.rb +0 -59
  135. data/spec/models/deb_release_architecture_read_spec.rb +0 -59
  136. data/spec/models/deb_release_component_read_spec.rb +0 -59
  137. data/spec/models/deb_release_file_read_spec.rb +0 -77
  138. data/spec/models/deb_release_read_spec.rb +0 -65
  139. data/spec/models/deb_verbatim_publication_read_spec.rb +0 -59
  140. data/spec/models/repository_version_read_spec.rb +0 -65
@@ -1,670 +0,0 @@
1
- =begin
2
- #Pulp 3 API
3
-
4
- #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
-
6
- The version of the OpenAPI document: v3
7
-
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 DebDebRemoteRead
17
- attr_accessor :pulp_href
18
-
19
- # Timestamp of creation.
20
- attr_accessor :pulp_created
21
-
22
- # A unique name for this remote.
23
- attr_accessor :name
24
-
25
- # The URL of an external content source.
26
- attr_accessor :url
27
-
28
- # A string containing the PEM encoded CA certificate used to validate the server certificate presented by the remote server. All new line characters must be escaped.
29
- attr_accessor :ca_cert
30
-
31
- # A string containing the PEM encoded client certificate used for authentication. All new line characters must be escaped.
32
- attr_accessor :client_cert
33
-
34
- # A PEM encoded private key used for authentication.
35
- attr_accessor :client_key
36
-
37
- # If True, TLS peer validation must be performed.
38
- attr_accessor :tls_validation
39
-
40
- # The proxy URL. Format: scheme://user:password@host:port
41
- attr_accessor :proxy_url
42
-
43
- # The username to be used for authentication when syncing.
44
- attr_accessor :username
45
-
46
- # The password to be used for authentication when syncing.
47
- attr_accessor :password
48
-
49
- # Timestamp of the most recent update of the remote.
50
- attr_accessor :pulp_last_updated
51
-
52
- # Total number of simultaneous connections.
53
- attr_accessor :download_concurrency
54
-
55
- # The policy to use when downloading content. The possible values include: 'immediate', 'on_demand', and 'streamed'. 'immediate' is the default.
56
- attr_accessor :policy
57
-
58
- # Whitespace separated list of distributions to sync
59
- attr_accessor :distributions
60
-
61
- # Whitespace separatet list of components to sync
62
- attr_accessor :components
63
-
64
- # Whitespace separated list of architectures to sync
65
- attr_accessor :architectures
66
-
67
- # Sync source packages
68
- attr_accessor :sync_sources
69
-
70
- # Sync installer packages
71
- attr_accessor :sync_udebs
72
-
73
- # Sync installer files
74
- attr_accessor :sync_installer
75
-
76
- # Gpg public key to verify origin releases against
77
- attr_accessor :gpgkey
78
-
79
- class EnumAttributeValidator
80
- attr_reader :datatype
81
- attr_reader :allowable_values
82
-
83
- def initialize(datatype, allowable_values)
84
- @allowable_values = allowable_values.map do |value|
85
- case datatype.to_s
86
- when /Integer/i
87
- value.to_i
88
- when /Float/i
89
- value.to_f
90
- else
91
- value
92
- end
93
- end
94
- end
95
-
96
- def valid?(value)
97
- !value || allowable_values.include?(value)
98
- end
99
- end
100
-
101
- # Attribute mapping from ruby-style variable name to JSON key.
102
- def self.attribute_map
103
- {
104
- :'pulp_href' => :'pulp_href',
105
- :'pulp_created' => :'pulp_created',
106
- :'name' => :'name',
107
- :'url' => :'url',
108
- :'ca_cert' => :'ca_cert',
109
- :'client_cert' => :'client_cert',
110
- :'client_key' => :'client_key',
111
- :'tls_validation' => :'tls_validation',
112
- :'proxy_url' => :'proxy_url',
113
- :'username' => :'username',
114
- :'password' => :'password',
115
- :'pulp_last_updated' => :'pulp_last_updated',
116
- :'download_concurrency' => :'download_concurrency',
117
- :'policy' => :'policy',
118
- :'distributions' => :'distributions',
119
- :'components' => :'components',
120
- :'architectures' => :'architectures',
121
- :'sync_sources' => :'sync_sources',
122
- :'sync_udebs' => :'sync_udebs',
123
- :'sync_installer' => :'sync_installer',
124
- :'gpgkey' => :'gpgkey'
125
- }
126
- end
127
-
128
- # Attribute type mapping.
129
- def self.openapi_types
130
- {
131
- :'pulp_href' => :'String',
132
- :'pulp_created' => :'DateTime',
133
- :'name' => :'String',
134
- :'url' => :'String',
135
- :'ca_cert' => :'String',
136
- :'client_cert' => :'String',
137
- :'client_key' => :'String',
138
- :'tls_validation' => :'Boolean',
139
- :'proxy_url' => :'String',
140
- :'username' => :'String',
141
- :'password' => :'String',
142
- :'pulp_last_updated' => :'DateTime',
143
- :'download_concurrency' => :'Integer',
144
- :'policy' => :'String',
145
- :'distributions' => :'String',
146
- :'components' => :'String',
147
- :'architectures' => :'String',
148
- :'sync_sources' => :'Boolean',
149
- :'sync_udebs' => :'Boolean',
150
- :'sync_installer' => :'Boolean',
151
- :'gpgkey' => :'String'
152
- }
153
- end
154
-
155
- # List of attributes with nullable: true
156
- def self.openapi_nullable
157
- Set.new([
158
- :'ca_cert',
159
- :'client_cert',
160
- :'client_key',
161
- :'proxy_url',
162
- :'username',
163
- :'password',
164
- ])
165
- end
166
-
167
- # Initializes the object
168
- # @param [Hash] attributes Model attributes in the form of hash
169
- def initialize(attributes = {})
170
- if (!attributes.is_a?(Hash))
171
- fail ArgumentError, "The input argument (attributes) must be a hash in `PulpDebClient::DebDebRemoteRead` initialize method"
172
- end
173
-
174
- # check to see if the attribute exists and convert string to symbol for hash key
175
- attributes = attributes.each_with_object({}) { |(k, v), h|
176
- if (!self.class.attribute_map.key?(k.to_sym))
177
- fail ArgumentError, "`#{k}` is not a valid attribute in `PulpDebClient::DebDebRemoteRead`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
178
- end
179
- h[k.to_sym] = v
180
- }
181
-
182
- if attributes.key?(:'pulp_href')
183
- self.pulp_href = attributes[:'pulp_href']
184
- end
185
-
186
- if attributes.key?(:'pulp_created')
187
- self.pulp_created = attributes[:'pulp_created']
188
- end
189
-
190
- if attributes.key?(:'name')
191
- self.name = attributes[:'name']
192
- end
193
-
194
- if attributes.key?(:'url')
195
- self.url = attributes[:'url']
196
- end
197
-
198
- if attributes.key?(:'ca_cert')
199
- self.ca_cert = attributes[:'ca_cert']
200
- end
201
-
202
- if attributes.key?(:'client_cert')
203
- self.client_cert = attributes[:'client_cert']
204
- end
205
-
206
- if attributes.key?(:'client_key')
207
- self.client_key = attributes[:'client_key']
208
- end
209
-
210
- if attributes.key?(:'tls_validation')
211
- self.tls_validation = attributes[:'tls_validation']
212
- end
213
-
214
- if attributes.key?(:'proxy_url')
215
- self.proxy_url = attributes[:'proxy_url']
216
- end
217
-
218
- if attributes.key?(:'username')
219
- self.username = attributes[:'username']
220
- end
221
-
222
- if attributes.key?(:'password')
223
- self.password = attributes[:'password']
224
- end
225
-
226
- if attributes.key?(:'pulp_last_updated')
227
- self.pulp_last_updated = attributes[:'pulp_last_updated']
228
- end
229
-
230
- if attributes.key?(:'download_concurrency')
231
- self.download_concurrency = attributes[:'download_concurrency']
232
- end
233
-
234
- if attributes.key?(:'policy')
235
- self.policy = attributes[:'policy']
236
- else
237
- self.policy = 'immediate'
238
- end
239
-
240
- if attributes.key?(:'distributions')
241
- self.distributions = attributes[:'distributions']
242
- end
243
-
244
- if attributes.key?(:'components')
245
- self.components = attributes[:'components']
246
- end
247
-
248
- if attributes.key?(:'architectures')
249
- self.architectures = attributes[:'architectures']
250
- end
251
-
252
- if attributes.key?(:'sync_sources')
253
- self.sync_sources = attributes[:'sync_sources']
254
- end
255
-
256
- if attributes.key?(:'sync_udebs')
257
- self.sync_udebs = attributes[:'sync_udebs']
258
- end
259
-
260
- if attributes.key?(:'sync_installer')
261
- self.sync_installer = attributes[:'sync_installer']
262
- end
263
-
264
- if attributes.key?(:'gpgkey')
265
- self.gpgkey = attributes[:'gpgkey']
266
- end
267
- end
268
-
269
- # Show invalid properties with the reasons. Usually used together with valid?
270
- # @return Array for valid properties with the reasons
271
- def list_invalid_properties
272
- invalid_properties = Array.new
273
- if @name.nil?
274
- invalid_properties.push('invalid value for "name", name cannot be nil.')
275
- end
276
-
277
- if @name.to_s.length < 1
278
- invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
279
- end
280
-
281
- if @url.nil?
282
- invalid_properties.push('invalid value for "url", url cannot be nil.')
283
- end
284
-
285
- if @url.to_s.length < 1
286
- invalid_properties.push('invalid value for "url", the character length must be great than or equal to 1.')
287
- end
288
-
289
- if !@ca_cert.nil? && @ca_cert.to_s.length < 1
290
- invalid_properties.push('invalid value for "ca_cert", the character length must be great than or equal to 1.')
291
- end
292
-
293
- if !@client_cert.nil? && @client_cert.to_s.length < 1
294
- invalid_properties.push('invalid value for "client_cert", the character length must be great than or equal to 1.')
295
- end
296
-
297
- if !@client_key.nil? && @client_key.to_s.length < 1
298
- invalid_properties.push('invalid value for "client_key", the character length must be great than or equal to 1.')
299
- end
300
-
301
- if !@proxy_url.nil? && @proxy_url.to_s.length < 1
302
- invalid_properties.push('invalid value for "proxy_url", the character length must be great than or equal to 1.')
303
- end
304
-
305
- if !@username.nil? && @username.to_s.length < 1
306
- invalid_properties.push('invalid value for "username", the character length must be great than or equal to 1.')
307
- end
308
-
309
- if !@password.nil? && @password.to_s.length < 1
310
- invalid_properties.push('invalid value for "password", the character length must be great than or equal to 1.')
311
- end
312
-
313
- if !@download_concurrency.nil? && @download_concurrency < 1
314
- invalid_properties.push('invalid value for "download_concurrency", must be greater than or equal to 1.')
315
- end
316
-
317
- if @distributions.nil?
318
- invalid_properties.push('invalid value for "distributions", distributions cannot be nil.')
319
- end
320
-
321
- if @distributions.to_s.length < 1
322
- invalid_properties.push('invalid value for "distributions", the character length must be great than or equal to 1.')
323
- end
324
-
325
- if !@components.nil? && @components.to_s.length < 1
326
- invalid_properties.push('invalid value for "components", the character length must be great than or equal to 1.')
327
- end
328
-
329
- if !@architectures.nil? && @architectures.to_s.length < 1
330
- invalid_properties.push('invalid value for "architectures", the character length must be great than or equal to 1.')
331
- end
332
-
333
- if !@gpgkey.nil? && @gpgkey.to_s.length < 1
334
- invalid_properties.push('invalid value for "gpgkey", the character length must be great than or equal to 1.')
335
- end
336
-
337
- invalid_properties
338
- end
339
-
340
- # Check to see if the all the properties in the model are valid
341
- # @return true if the model is valid
342
- def valid?
343
- return false if @name.nil?
344
- return false if @name.to_s.length < 1
345
- return false if @url.nil?
346
- return false if @url.to_s.length < 1
347
- return false if !@ca_cert.nil? && @ca_cert.to_s.length < 1
348
- return false if !@client_cert.nil? && @client_cert.to_s.length < 1
349
- return false if !@client_key.nil? && @client_key.to_s.length < 1
350
- return false if !@proxy_url.nil? && @proxy_url.to_s.length < 1
351
- return false if !@username.nil? && @username.to_s.length < 1
352
- return false if !@password.nil? && @password.to_s.length < 1
353
- return false if !@download_concurrency.nil? && @download_concurrency < 1
354
- policy_validator = EnumAttributeValidator.new('String', ["immediate", "on_demand", "streamed"])
355
- return false unless policy_validator.valid?(@policy)
356
- return false if @distributions.nil?
357
- return false if @distributions.to_s.length < 1
358
- return false if !@components.nil? && @components.to_s.length < 1
359
- return false if !@architectures.nil? && @architectures.to_s.length < 1
360
- return false if !@gpgkey.nil? && @gpgkey.to_s.length < 1
361
- true
362
- end
363
-
364
- # Custom attribute writer method with validation
365
- # @param [Object] name Value to be assigned
366
- def name=(name)
367
- if name.nil?
368
- fail ArgumentError, 'name cannot be nil'
369
- end
370
-
371
- if name.to_s.length < 1
372
- fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
373
- end
374
-
375
- @name = name
376
- end
377
-
378
- # Custom attribute writer method with validation
379
- # @param [Object] url Value to be assigned
380
- def url=(url)
381
- if url.nil?
382
- fail ArgumentError, 'url cannot be nil'
383
- end
384
-
385
- if url.to_s.length < 1
386
- fail ArgumentError, 'invalid value for "url", the character length must be great than or equal to 1.'
387
- end
388
-
389
- @url = url
390
- end
391
-
392
- # Custom attribute writer method with validation
393
- # @param [Object] ca_cert Value to be assigned
394
- def ca_cert=(ca_cert)
395
- if !ca_cert.nil? && ca_cert.to_s.length < 1
396
- fail ArgumentError, 'invalid value for "ca_cert", the character length must be great than or equal to 1.'
397
- end
398
-
399
- @ca_cert = ca_cert
400
- end
401
-
402
- # Custom attribute writer method with validation
403
- # @param [Object] client_cert Value to be assigned
404
- def client_cert=(client_cert)
405
- if !client_cert.nil? && client_cert.to_s.length < 1
406
- fail ArgumentError, 'invalid value for "client_cert", the character length must be great than or equal to 1.'
407
- end
408
-
409
- @client_cert = client_cert
410
- end
411
-
412
- # Custom attribute writer method with validation
413
- # @param [Object] client_key Value to be assigned
414
- def client_key=(client_key)
415
- if !client_key.nil? && client_key.to_s.length < 1
416
- fail ArgumentError, 'invalid value for "client_key", the character length must be great than or equal to 1.'
417
- end
418
-
419
- @client_key = client_key
420
- end
421
-
422
- # Custom attribute writer method with validation
423
- # @param [Object] proxy_url Value to be assigned
424
- def proxy_url=(proxy_url)
425
- if !proxy_url.nil? && proxy_url.to_s.length < 1
426
- fail ArgumentError, 'invalid value for "proxy_url", the character length must be great than or equal to 1.'
427
- end
428
-
429
- @proxy_url = proxy_url
430
- end
431
-
432
- # Custom attribute writer method with validation
433
- # @param [Object] username Value to be assigned
434
- def username=(username)
435
- if !username.nil? && username.to_s.length < 1
436
- fail ArgumentError, 'invalid value for "username", the character length must be great than or equal to 1.'
437
- end
438
-
439
- @username = username
440
- end
441
-
442
- # Custom attribute writer method with validation
443
- # @param [Object] password Value to be assigned
444
- def password=(password)
445
- if !password.nil? && password.to_s.length < 1
446
- fail ArgumentError, 'invalid value for "password", the character length must be great than or equal to 1.'
447
- end
448
-
449
- @password = password
450
- end
451
-
452
- # Custom attribute writer method with validation
453
- # @param [Object] download_concurrency Value to be assigned
454
- def download_concurrency=(download_concurrency)
455
- if !download_concurrency.nil? && download_concurrency < 1
456
- fail ArgumentError, 'invalid value for "download_concurrency", must be greater than or equal to 1.'
457
- end
458
-
459
- @download_concurrency = download_concurrency
460
- end
461
-
462
- # Custom attribute writer method checking allowed values (enum).
463
- # @param [Object] policy Object to be assigned
464
- def policy=(policy)
465
- validator = EnumAttributeValidator.new('String', ["immediate", "on_demand", "streamed"])
466
- unless validator.valid?(policy)
467
- fail ArgumentError, "invalid value for \"policy\", must be one of #{validator.allowable_values}."
468
- end
469
- @policy = policy
470
- end
471
-
472
- # Custom attribute writer method with validation
473
- # @param [Object] distributions Value to be assigned
474
- def distributions=(distributions)
475
- if distributions.nil?
476
- fail ArgumentError, 'distributions cannot be nil'
477
- end
478
-
479
- if distributions.to_s.length < 1
480
- fail ArgumentError, 'invalid value for "distributions", the character length must be great than or equal to 1.'
481
- end
482
-
483
- @distributions = distributions
484
- end
485
-
486
- # Custom attribute writer method with validation
487
- # @param [Object] components Value to be assigned
488
- def components=(components)
489
- if !components.nil? && components.to_s.length < 1
490
- fail ArgumentError, 'invalid value for "components", the character length must be great than or equal to 1.'
491
- end
492
-
493
- @components = components
494
- end
495
-
496
- # Custom attribute writer method with validation
497
- # @param [Object] architectures Value to be assigned
498
- def architectures=(architectures)
499
- if !architectures.nil? && architectures.to_s.length < 1
500
- fail ArgumentError, 'invalid value for "architectures", the character length must be great than or equal to 1.'
501
- end
502
-
503
- @architectures = architectures
504
- end
505
-
506
- # Custom attribute writer method with validation
507
- # @param [Object] gpgkey Value to be assigned
508
- def gpgkey=(gpgkey)
509
- if !gpgkey.nil? && gpgkey.to_s.length < 1
510
- fail ArgumentError, 'invalid value for "gpgkey", the character length must be great than or equal to 1.'
511
- end
512
-
513
- @gpgkey = gpgkey
514
- end
515
-
516
- # Checks equality by comparing each attribute.
517
- # @param [Object] Object to be compared
518
- def ==(o)
519
- return true if self.equal?(o)
520
- self.class == o.class &&
521
- pulp_href == o.pulp_href &&
522
- pulp_created == o.pulp_created &&
523
- name == o.name &&
524
- url == o.url &&
525
- ca_cert == o.ca_cert &&
526
- client_cert == o.client_cert &&
527
- client_key == o.client_key &&
528
- tls_validation == o.tls_validation &&
529
- proxy_url == o.proxy_url &&
530
- username == o.username &&
531
- password == o.password &&
532
- pulp_last_updated == o.pulp_last_updated &&
533
- download_concurrency == o.download_concurrency &&
534
- policy == o.policy &&
535
- distributions == o.distributions &&
536
- components == o.components &&
537
- architectures == o.architectures &&
538
- sync_sources == o.sync_sources &&
539
- sync_udebs == o.sync_udebs &&
540
- sync_installer == o.sync_installer &&
541
- gpgkey == o.gpgkey
542
- end
543
-
544
- # @see the `==` method
545
- # @param [Object] Object to be compared
546
- def eql?(o)
547
- self == o
548
- end
549
-
550
- # Calculates hash code according to all attributes.
551
- # @return [Integer] Hash code
552
- def hash
553
- [pulp_href, pulp_created, name, url, ca_cert, client_cert, client_key, tls_validation, proxy_url, username, password, pulp_last_updated, download_concurrency, policy, distributions, components, architectures, sync_sources, sync_udebs, sync_installer, gpgkey].hash
554
- end
555
-
556
- # Builds the object from hash
557
- # @param [Hash] attributes Model attributes in the form of hash
558
- # @return [Object] Returns the model itself
559
- def self.build_from_hash(attributes)
560
- new.build_from_hash(attributes)
561
- end
562
-
563
- # Builds the object from hash
564
- # @param [Hash] attributes Model attributes in the form of hash
565
- # @return [Object] Returns the model itself
566
- def build_from_hash(attributes)
567
- return nil unless attributes.is_a?(Hash)
568
- self.class.openapi_types.each_pair do |key, type|
569
- if type =~ /\AArray<(.*)>/i
570
- # check to ensure the input is an array given that the attribute
571
- # is documented as an array but the input is not
572
- if attributes[self.class.attribute_map[key]].is_a?(Array)
573
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
574
- end
575
- elsif !attributes[self.class.attribute_map[key]].nil?
576
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
577
- end # or else data not found in attributes(hash), not an issue as the data can be optional
578
- end
579
-
580
- self
581
- end
582
-
583
- # Deserializes the data based on type
584
- # @param string type Data type
585
- # @param string value Value to be deserialized
586
- # @return [Object] Deserialized data
587
- def _deserialize(type, value)
588
- case type.to_sym
589
- when :DateTime
590
- DateTime.parse(value)
591
- when :Date
592
- Date.parse(value)
593
- when :String
594
- value.to_s
595
- when :Integer
596
- value.to_i
597
- when :Float
598
- value.to_f
599
- when :Boolean
600
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
601
- true
602
- else
603
- false
604
- end
605
- when :Object
606
- # generic object (usually a Hash), return directly
607
- value
608
- when /\AArray<(?<inner_type>.+)>\z/
609
- inner_type = Regexp.last_match[:inner_type]
610
- value.map { |v| _deserialize(inner_type, v) }
611
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
612
- k_type = Regexp.last_match[:k_type]
613
- v_type = Regexp.last_match[:v_type]
614
- {}.tap do |hash|
615
- value.each do |k, v|
616
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
617
- end
618
- end
619
- else # model
620
- PulpDebClient.const_get(type).build_from_hash(value)
621
- end
622
- end
623
-
624
- # Returns the string representation of the object
625
- # @return [String] String presentation of the object
626
- def to_s
627
- to_hash.to_s
628
- end
629
-
630
- # to_body is an alias to to_hash (backward compatibility)
631
- # @return [Hash] Returns the object in the form of hash
632
- def to_body
633
- to_hash
634
- end
635
-
636
- # Returns the object in the form of hash
637
- # @return [Hash] Returns the object in the form of hash
638
- def to_hash
639
- hash = {}
640
- self.class.attribute_map.each_pair do |attr, param|
641
- value = self.send(attr)
642
- if value.nil?
643
- is_nullable = self.class.openapi_nullable.include?(attr)
644
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
645
- end
646
-
647
- hash[param] = _to_hash(value)
648
- end
649
- hash
650
- end
651
-
652
- # Outputs non-array value in the form of hash
653
- # For object, use to_hash. Otherwise, just return the value
654
- # @param [Object] value Any valid value
655
- # @return [Hash] Returns the value in the form of hash
656
- def _to_hash(value)
657
- if value.is_a?(Array)
658
- value.compact.map { |v| _to_hash(v) }
659
- elsif value.is_a?(Hash)
660
- {}.tap do |hash|
661
- value.each { |k, v| hash[k] = _to_hash(v) }
662
- end
663
- elsif value.respond_to? :to_hash
664
- value.to_hash
665
- else
666
- value
667
- end
668
- end
669
- end
670
- end