pulp_ansible_client 0.2.0b14 → 0.2.0b15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (117) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +10 -20
  3. data/docs/{AnsibleCollectionRead.md → AnsibleCollection.md} +2 -2
  4. data/docs/AnsibleCollectionRemote.md +5 -1
  5. data/docs/AnsibleCollectionVersion.md +3 -3
  6. data/docs/AnsibleRole.md +3 -3
  7. data/docs/{CollectionImportDetailRead.md → CollectionImportDetail.md} +2 -2
  8. data/docs/ContentCollectionVersionsApi.md +4 -4
  9. data/docs/ContentRolesApi.md +4 -4
  10. data/docs/DistributionsAnsibleApi.md +2 -2
  11. data/docs/{GalaxyCollectionVersionRead.md → GalaxyCollectionVersion.md} +2 -2
  12. data/docs/{GalaxyRoleRead.md → GalaxyRole.md} +2 -2
  13. data/docs/{GalaxyRoleVersionRead.md → GalaxyRoleVersion.md} +2 -2
  14. data/docs/InlineResponse200.md +1 -1
  15. data/docs/InlineResponse2001.md +1 -1
  16. data/docs/InlineResponse20010.md +1 -1
  17. data/docs/InlineResponse20011.md +1 -1
  18. data/docs/InlineResponse20012.md +1 -1
  19. data/docs/InlineResponse20013.md +1 -1
  20. data/docs/InlineResponse2002.md +1 -1
  21. data/docs/InlineResponse2003.md +1 -1
  22. data/docs/InlineResponse2004.md +1 -1
  23. data/docs/InlineResponse2005.md +1 -1
  24. data/docs/InlineResponse2006.md +1 -1
  25. data/docs/InlineResponse2007.md +1 -1
  26. data/docs/InlineResponse2008.md +1 -1
  27. data/docs/InlineResponse2009.md +1 -1
  28. data/docs/PulpAnsibleGalaxyApiCollectionsApi.md +4 -4
  29. data/docs/PulpAnsibleGalaxyApiV3CollectionsApi.md +2 -2
  30. data/docs/RemotesAnsibleApi.md +4 -4
  31. data/docs/RemotesCollectionApi.md +4 -4
  32. data/docs/RepositoriesAnsibleApi.md +4 -4
  33. data/docs/RepositoriesAnsibleVersionsApi.md +6 -4
  34. data/docs/{TagRead.md → Tag.md} +2 -2
  35. data/lib/pulp_ansible_client/api/content_collection_versions_api.rb +6 -6
  36. data/lib/pulp_ansible_client/api/content_roles_api.rb +6 -6
  37. data/lib/pulp_ansible_client/api/distributions_ansible_api.rb +3 -3
  38. data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_collections_api.rb +6 -6
  39. data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_v3_collections_api.rb +3 -3
  40. data/lib/pulp_ansible_client/api/remotes_ansible_api.rb +6 -6
  41. data/lib/pulp_ansible_client/api/remotes_collection_api.rb +6 -6
  42. data/lib/pulp_ansible_client/api/repositories_ansible_api.rb +6 -6
  43. data/lib/pulp_ansible_client/api/repositories_ansible_versions_api.rb +9 -6
  44. data/lib/pulp_ansible_client/models/{ansible_collection_read.rb → ansible_collection.rb} +3 -3
  45. data/lib/pulp_ansible_client/models/ansible_collection_remote.rb +75 -5
  46. data/lib/pulp_ansible_client/models/ansible_collection_version.rb +11 -11
  47. data/lib/pulp_ansible_client/models/ansible_role.rb +11 -11
  48. data/lib/pulp_ansible_client/models/{collection_import_detail_read.rb → collection_import_detail.rb} +3 -3
  49. data/lib/pulp_ansible_client/models/{galaxy_collection_version_read.rb → galaxy_collection_version.rb} +3 -3
  50. data/lib/pulp_ansible_client/models/{galaxy_role_read.rb → galaxy_role.rb} +3 -3
  51. data/lib/pulp_ansible_client/models/{galaxy_role_version_read.rb → galaxy_role_version.rb} +3 -3
  52. data/lib/pulp_ansible_client/models/inline_response200.rb +1 -1
  53. data/lib/pulp_ansible_client/models/inline_response2001.rb +1 -1
  54. data/lib/pulp_ansible_client/models/inline_response20010.rb +1 -1
  55. data/lib/pulp_ansible_client/models/inline_response20011.rb +1 -1
  56. data/lib/pulp_ansible_client/models/inline_response20012.rb +1 -1
  57. data/lib/pulp_ansible_client/models/inline_response20013.rb +1 -1
  58. data/lib/pulp_ansible_client/models/inline_response2002.rb +1 -1
  59. data/lib/pulp_ansible_client/models/inline_response2003.rb +1 -1
  60. data/lib/pulp_ansible_client/models/inline_response2004.rb +1 -1
  61. data/lib/pulp_ansible_client/models/inline_response2005.rb +1 -1
  62. data/lib/pulp_ansible_client/models/inline_response2006.rb +1 -1
  63. data/lib/pulp_ansible_client/models/inline_response2007.rb +1 -1
  64. data/lib/pulp_ansible_client/models/inline_response2008.rb +1 -1
  65. data/lib/pulp_ansible_client/models/inline_response2009.rb +1 -1
  66. data/lib/pulp_ansible_client/models/{tag_read.rb → tag.rb} +3 -3
  67. data/lib/pulp_ansible_client/version.rb +1 -1
  68. data/lib/pulp_ansible_client.rb +6 -16
  69. data/spec/api/content_collection_versions_api_spec.rb +2 -2
  70. data/spec/api/content_roles_api_spec.rb +2 -2
  71. data/spec/api/distributions_ansible_api_spec.rb +1 -1
  72. data/spec/api/pulp_ansible_galaxy_api_collections_api_spec.rb +2 -2
  73. data/spec/api/pulp_ansible_galaxy_api_v3_collections_api_spec.rb +1 -1
  74. data/spec/api/remotes_ansible_api_spec.rb +2 -2
  75. data/spec/api/remotes_collection_api_spec.rb +2 -2
  76. data/spec/api/repositories_ansible_api_spec.rb +2 -2
  77. data/spec/api/repositories_ansible_versions_api_spec.rb +3 -2
  78. data/spec/models/ansible_collection_remote_spec.rb +12 -0
  79. data/spec/models/{ansible_collection_read_spec.rb → ansible_collection_spec.rb} +6 -6
  80. data/spec/models/ansible_collection_version_spec.rb +3 -3
  81. data/spec/models/ansible_role_spec.rb +3 -3
  82. data/spec/models/{collection_import_detail_read_spec.rb → collection_import_detail_spec.rb} +6 -6
  83. data/spec/models/{galaxy_collection_version_read_spec.rb → galaxy_collection_version_spec.rb} +6 -6
  84. data/spec/models/{galaxy_role_read_spec.rb → galaxy_role_spec.rb} +6 -6
  85. data/spec/models/{galaxy_role_version_read_spec.rb → galaxy_role_version_spec.rb} +6 -6
  86. data/spec/models/{tag_read_spec.rb → tag_spec.rb} +6 -6
  87. metadata +26 -66
  88. data/docs/AnsibleAnsibleDistributionRead.md +0 -31
  89. data/docs/AnsibleAnsibleRemoteRead.md +0 -43
  90. data/docs/AnsibleAnsibleRepositoryRead.md +0 -27
  91. data/docs/AnsibleCollectionRemoteRead.md +0 -45
  92. data/docs/AnsibleCollectionVersionRead.md +0 -67
  93. data/docs/AnsibleRoleRead.md +0 -27
  94. data/docs/CollectionRead.md +0 -31
  95. data/docs/CollectionVersionRead.md +0 -37
  96. data/docs/GalaxyCollectionRead.md +0 -23
  97. data/docs/RepositoryVersionRead.md +0 -25
  98. data/lib/pulp_ansible_client/models/ansible_ansible_distribution_read.rb +0 -327
  99. data/lib/pulp_ansible_client/models/ansible_ansible_remote_read.rb +0 -531
  100. data/lib/pulp_ansible_client/models/ansible_ansible_repository_read.rb +0 -294
  101. data/lib/pulp_ansible_client/models/ansible_collection_remote_read.rb +0 -557
  102. data/lib/pulp_ansible_client/models/ansible_collection_version_read.rb +0 -816
  103. data/lib/pulp_ansible_client/models/ansible_role_read.rb +0 -330
  104. data/lib/pulp_ansible_client/models/collection_read.rb +0 -314
  105. data/lib/pulp_ansible_client/models/collection_version_read.rb +0 -370
  106. data/lib/pulp_ansible_client/models/galaxy_collection_read.rb +0 -281
  107. data/lib/pulp_ansible_client/models/repository_version_read.rb +0 -244
  108. data/spec/models/ansible_ansible_distribution_read_spec.rb +0 -83
  109. data/spec/models/ansible_ansible_remote_read_spec.rb +0 -123
  110. data/spec/models/ansible_ansible_repository_read_spec.rb +0 -71
  111. data/spec/models/ansible_collection_remote_read_spec.rb +0 -129
  112. data/spec/models/ansible_collection_version_read_spec.rb +0 -191
  113. data/spec/models/ansible_role_read_spec.rb +0 -71
  114. data/spec/models/collection_read_spec.rb +0 -83
  115. data/spec/models/collection_version_read_spec.rb +0 -105
  116. data/spec/models/galaxy_collection_read_spec.rb +0 -59
  117. data/spec/models/repository_version_read_spec.rb +0 -65
@@ -1,557 +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 PulpAnsibleClient
16
- class AnsibleCollectionRemoteRead
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.
56
- attr_accessor :policy
57
-
58
- # The string version of Collection requirements yaml.
59
- attr_accessor :requirements_file
60
-
61
- class EnumAttributeValidator
62
- attr_reader :datatype
63
- attr_reader :allowable_values
64
-
65
- def initialize(datatype, allowable_values)
66
- @allowable_values = allowable_values.map do |value|
67
- case datatype.to_s
68
- when /Integer/i
69
- value.to_i
70
- when /Float/i
71
- value.to_f
72
- else
73
- value
74
- end
75
- end
76
- end
77
-
78
- def valid?(value)
79
- !value || allowable_values.include?(value)
80
- end
81
- end
82
-
83
- # Attribute mapping from ruby-style variable name to JSON key.
84
- def self.attribute_map
85
- {
86
- :'pulp_href' => :'pulp_href',
87
- :'pulp_created' => :'pulp_created',
88
- :'name' => :'name',
89
- :'url' => :'url',
90
- :'ca_cert' => :'ca_cert',
91
- :'client_cert' => :'client_cert',
92
- :'client_key' => :'client_key',
93
- :'tls_validation' => :'tls_validation',
94
- :'proxy_url' => :'proxy_url',
95
- :'username' => :'username',
96
- :'password' => :'password',
97
- :'pulp_last_updated' => :'pulp_last_updated',
98
- :'download_concurrency' => :'download_concurrency',
99
- :'policy' => :'policy',
100
- :'requirements_file' => :'requirements_file'
101
- }
102
- end
103
-
104
- # Attribute type mapping.
105
- def self.openapi_types
106
- {
107
- :'pulp_href' => :'String',
108
- :'pulp_created' => :'DateTime',
109
- :'name' => :'String',
110
- :'url' => :'String',
111
- :'ca_cert' => :'String',
112
- :'client_cert' => :'String',
113
- :'client_key' => :'String',
114
- :'tls_validation' => :'Boolean',
115
- :'proxy_url' => :'String',
116
- :'username' => :'String',
117
- :'password' => :'String',
118
- :'pulp_last_updated' => :'DateTime',
119
- :'download_concurrency' => :'Integer',
120
- :'policy' => :'String',
121
- :'requirements_file' => :'String'
122
- }
123
- end
124
-
125
- # List of attributes with nullable: true
126
- def self.openapi_nullable
127
- Set.new([
128
- :'ca_cert',
129
- :'client_cert',
130
- :'client_key',
131
- :'proxy_url',
132
- :'username',
133
- :'password',
134
- :'requirements_file'
135
- ])
136
- end
137
-
138
- # Initializes the object
139
- # @param [Hash] attributes Model attributes in the form of hash
140
- def initialize(attributes = {})
141
- if (!attributes.is_a?(Hash))
142
- fail ArgumentError, "The input argument (attributes) must be a hash in `PulpAnsibleClient::AnsibleCollectionRemoteRead` initialize method"
143
- end
144
-
145
- # check to see if the attribute exists and convert string to symbol for hash key
146
- attributes = attributes.each_with_object({}) { |(k, v), h|
147
- if (!self.class.attribute_map.key?(k.to_sym))
148
- fail ArgumentError, "`#{k}` is not a valid attribute in `PulpAnsibleClient::AnsibleCollectionRemoteRead`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
149
- end
150
- h[k.to_sym] = v
151
- }
152
-
153
- if attributes.key?(:'pulp_href')
154
- self.pulp_href = attributes[:'pulp_href']
155
- end
156
-
157
- if attributes.key?(:'pulp_created')
158
- self.pulp_created = attributes[:'pulp_created']
159
- end
160
-
161
- if attributes.key?(:'name')
162
- self.name = attributes[:'name']
163
- end
164
-
165
- if attributes.key?(:'url')
166
- self.url = attributes[:'url']
167
- end
168
-
169
- if attributes.key?(:'ca_cert')
170
- self.ca_cert = attributes[:'ca_cert']
171
- end
172
-
173
- if attributes.key?(:'client_cert')
174
- self.client_cert = attributes[:'client_cert']
175
- end
176
-
177
- if attributes.key?(:'client_key')
178
- self.client_key = attributes[:'client_key']
179
- end
180
-
181
- if attributes.key?(:'tls_validation')
182
- self.tls_validation = attributes[:'tls_validation']
183
- end
184
-
185
- if attributes.key?(:'proxy_url')
186
- self.proxy_url = attributes[:'proxy_url']
187
- end
188
-
189
- if attributes.key?(:'username')
190
- self.username = attributes[:'username']
191
- end
192
-
193
- if attributes.key?(:'password')
194
- self.password = attributes[:'password']
195
- end
196
-
197
- if attributes.key?(:'pulp_last_updated')
198
- self.pulp_last_updated = attributes[:'pulp_last_updated']
199
- end
200
-
201
- if attributes.key?(:'download_concurrency')
202
- self.download_concurrency = attributes[:'download_concurrency']
203
- end
204
-
205
- if attributes.key?(:'policy')
206
- self.policy = attributes[:'policy']
207
- else
208
- self.policy = 'immediate'
209
- end
210
-
211
- if attributes.key?(:'requirements_file')
212
- self.requirements_file = attributes[:'requirements_file']
213
- end
214
- end
215
-
216
- # Show invalid properties with the reasons. Usually used together with valid?
217
- # @return Array for valid properties with the reasons
218
- def list_invalid_properties
219
- invalid_properties = Array.new
220
- if @name.nil?
221
- invalid_properties.push('invalid value for "name", name cannot be nil.')
222
- end
223
-
224
- if @name.to_s.length < 1
225
- invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
226
- end
227
-
228
- if @url.nil?
229
- invalid_properties.push('invalid value for "url", url cannot be nil.')
230
- end
231
-
232
- if @url.to_s.length < 1
233
- invalid_properties.push('invalid value for "url", the character length must be great than or equal to 1.')
234
- end
235
-
236
- if !@ca_cert.nil? && @ca_cert.to_s.length < 1
237
- invalid_properties.push('invalid value for "ca_cert", the character length must be great than or equal to 1.')
238
- end
239
-
240
- if !@client_cert.nil? && @client_cert.to_s.length < 1
241
- invalid_properties.push('invalid value for "client_cert", the character length must be great than or equal to 1.')
242
- end
243
-
244
- if !@client_key.nil? && @client_key.to_s.length < 1
245
- invalid_properties.push('invalid value for "client_key", the character length must be great than or equal to 1.')
246
- end
247
-
248
- if !@proxy_url.nil? && @proxy_url.to_s.length < 1
249
- invalid_properties.push('invalid value for "proxy_url", the character length must be great than or equal to 1.')
250
- end
251
-
252
- if !@username.nil? && @username.to_s.length < 1
253
- invalid_properties.push('invalid value for "username", the character length must be great than or equal to 1.')
254
- end
255
-
256
- if !@password.nil? && @password.to_s.length < 1
257
- invalid_properties.push('invalid value for "password", the character length must be great than or equal to 1.')
258
- end
259
-
260
- if !@download_concurrency.nil? && @download_concurrency < 1
261
- invalid_properties.push('invalid value for "download_concurrency", must be greater than or equal to 1.')
262
- end
263
-
264
- if !@requirements_file.nil? && @requirements_file.to_s.length < 1
265
- invalid_properties.push('invalid value for "requirements_file", the character length must be great than or equal to 1.')
266
- end
267
-
268
- invalid_properties
269
- end
270
-
271
- # Check to see if the all the properties in the model are valid
272
- # @return true if the model is valid
273
- def valid?
274
- return false if @name.nil?
275
- return false if @name.to_s.length < 1
276
- return false if @url.nil?
277
- return false if @url.to_s.length < 1
278
- return false if !@ca_cert.nil? && @ca_cert.to_s.length < 1
279
- return false if !@client_cert.nil? && @client_cert.to_s.length < 1
280
- return false if !@client_key.nil? && @client_key.to_s.length < 1
281
- return false if !@proxy_url.nil? && @proxy_url.to_s.length < 1
282
- return false if !@username.nil? && @username.to_s.length < 1
283
- return false if !@password.nil? && @password.to_s.length < 1
284
- return false if !@download_concurrency.nil? && @download_concurrency < 1
285
- policy_validator = EnumAttributeValidator.new('String', ["immediate", "When syncing, download all metadata and content now."])
286
- return false unless policy_validator.valid?(@policy)
287
- return false if !@requirements_file.nil? && @requirements_file.to_s.length < 1
288
- true
289
- end
290
-
291
- # Custom attribute writer method with validation
292
- # @param [Object] name Value to be assigned
293
- def name=(name)
294
- if name.nil?
295
- fail ArgumentError, 'name cannot be nil'
296
- end
297
-
298
- if name.to_s.length < 1
299
- fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
300
- end
301
-
302
- @name = name
303
- end
304
-
305
- # Custom attribute writer method with validation
306
- # @param [Object] url Value to be assigned
307
- def url=(url)
308
- if url.nil?
309
- fail ArgumentError, 'url cannot be nil'
310
- end
311
-
312
- if url.to_s.length < 1
313
- fail ArgumentError, 'invalid value for "url", the character length must be great than or equal to 1.'
314
- end
315
-
316
- @url = url
317
- end
318
-
319
- # Custom attribute writer method with validation
320
- # @param [Object] ca_cert Value to be assigned
321
- def ca_cert=(ca_cert)
322
- if !ca_cert.nil? && ca_cert.to_s.length < 1
323
- fail ArgumentError, 'invalid value for "ca_cert", the character length must be great than or equal to 1.'
324
- end
325
-
326
- @ca_cert = ca_cert
327
- end
328
-
329
- # Custom attribute writer method with validation
330
- # @param [Object] client_cert Value to be assigned
331
- def client_cert=(client_cert)
332
- if !client_cert.nil? && client_cert.to_s.length < 1
333
- fail ArgumentError, 'invalid value for "client_cert", the character length must be great than or equal to 1.'
334
- end
335
-
336
- @client_cert = client_cert
337
- end
338
-
339
- # Custom attribute writer method with validation
340
- # @param [Object] client_key Value to be assigned
341
- def client_key=(client_key)
342
- if !client_key.nil? && client_key.to_s.length < 1
343
- fail ArgumentError, 'invalid value for "client_key", the character length must be great than or equal to 1.'
344
- end
345
-
346
- @client_key = client_key
347
- end
348
-
349
- # Custom attribute writer method with validation
350
- # @param [Object] proxy_url Value to be assigned
351
- def proxy_url=(proxy_url)
352
- if !proxy_url.nil? && proxy_url.to_s.length < 1
353
- fail ArgumentError, 'invalid value for "proxy_url", the character length must be great than or equal to 1.'
354
- end
355
-
356
- @proxy_url = proxy_url
357
- end
358
-
359
- # Custom attribute writer method with validation
360
- # @param [Object] username Value to be assigned
361
- def username=(username)
362
- if !username.nil? && username.to_s.length < 1
363
- fail ArgumentError, 'invalid value for "username", the character length must be great than or equal to 1.'
364
- end
365
-
366
- @username = username
367
- end
368
-
369
- # Custom attribute writer method with validation
370
- # @param [Object] password Value to be assigned
371
- def password=(password)
372
- if !password.nil? && password.to_s.length < 1
373
- fail ArgumentError, 'invalid value for "password", the character length must be great than or equal to 1.'
374
- end
375
-
376
- @password = password
377
- end
378
-
379
- # Custom attribute writer method with validation
380
- # @param [Object] download_concurrency Value to be assigned
381
- def download_concurrency=(download_concurrency)
382
- if !download_concurrency.nil? && download_concurrency < 1
383
- fail ArgumentError, 'invalid value for "download_concurrency", must be greater than or equal to 1.'
384
- end
385
-
386
- @download_concurrency = download_concurrency
387
- end
388
-
389
- # Custom attribute writer method checking allowed values (enum).
390
- # @param [Object] policy Object to be assigned
391
- def policy=(policy)
392
- validator = EnumAttributeValidator.new('String', ["immediate", "When syncing, download all metadata and content now."])
393
- unless validator.valid?(policy)
394
- fail ArgumentError, "invalid value for \"policy\", must be one of #{validator.allowable_values}."
395
- end
396
- @policy = policy
397
- end
398
-
399
- # Custom attribute writer method with validation
400
- # @param [Object] requirements_file Value to be assigned
401
- def requirements_file=(requirements_file)
402
- if !requirements_file.nil? && requirements_file.to_s.length < 1
403
- fail ArgumentError, 'invalid value for "requirements_file", the character length must be great than or equal to 1.'
404
- end
405
-
406
- @requirements_file = requirements_file
407
- end
408
-
409
- # Checks equality by comparing each attribute.
410
- # @param [Object] Object to be compared
411
- def ==(o)
412
- return true if self.equal?(o)
413
- self.class == o.class &&
414
- pulp_href == o.pulp_href &&
415
- pulp_created == o.pulp_created &&
416
- name == o.name &&
417
- url == o.url &&
418
- ca_cert == o.ca_cert &&
419
- client_cert == o.client_cert &&
420
- client_key == o.client_key &&
421
- tls_validation == o.tls_validation &&
422
- proxy_url == o.proxy_url &&
423
- username == o.username &&
424
- password == o.password &&
425
- pulp_last_updated == o.pulp_last_updated &&
426
- download_concurrency == o.download_concurrency &&
427
- policy == o.policy &&
428
- requirements_file == o.requirements_file
429
- end
430
-
431
- # @see the `==` method
432
- # @param [Object] Object to be compared
433
- def eql?(o)
434
- self == o
435
- end
436
-
437
- # Calculates hash code according to all attributes.
438
- # @return [Integer] Hash code
439
- def hash
440
- [pulp_href, pulp_created, name, url, ca_cert, client_cert, client_key, tls_validation, proxy_url, username, password, pulp_last_updated, download_concurrency, policy, requirements_file].hash
441
- end
442
-
443
- # Builds the object from hash
444
- # @param [Hash] attributes Model attributes in the form of hash
445
- # @return [Object] Returns the model itself
446
- def self.build_from_hash(attributes)
447
- new.build_from_hash(attributes)
448
- end
449
-
450
- # Builds the object from hash
451
- # @param [Hash] attributes Model attributes in the form of hash
452
- # @return [Object] Returns the model itself
453
- def build_from_hash(attributes)
454
- return nil unless attributes.is_a?(Hash)
455
- self.class.openapi_types.each_pair do |key, type|
456
- if type =~ /\AArray<(.*)>/i
457
- # check to ensure the input is an array given that the attribute
458
- # is documented as an array but the input is not
459
- if attributes[self.class.attribute_map[key]].is_a?(Array)
460
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
461
- end
462
- elsif !attributes[self.class.attribute_map[key]].nil?
463
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
464
- end # or else data not found in attributes(hash), not an issue as the data can be optional
465
- end
466
-
467
- self
468
- end
469
-
470
- # Deserializes the data based on type
471
- # @param string type Data type
472
- # @param string value Value to be deserialized
473
- # @return [Object] Deserialized data
474
- def _deserialize(type, value)
475
- case type.to_sym
476
- when :DateTime
477
- DateTime.parse(value)
478
- when :Date
479
- Date.parse(value)
480
- when :String
481
- value.to_s
482
- when :Integer
483
- value.to_i
484
- when :Float
485
- value.to_f
486
- when :Boolean
487
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
488
- true
489
- else
490
- false
491
- end
492
- when :Object
493
- # generic object (usually a Hash), return directly
494
- value
495
- when /\AArray<(?<inner_type>.+)>\z/
496
- inner_type = Regexp.last_match[:inner_type]
497
- value.map { |v| _deserialize(inner_type, v) }
498
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
499
- k_type = Regexp.last_match[:k_type]
500
- v_type = Regexp.last_match[:v_type]
501
- {}.tap do |hash|
502
- value.each do |k, v|
503
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
504
- end
505
- end
506
- else # model
507
- PulpAnsibleClient.const_get(type).build_from_hash(value)
508
- end
509
- end
510
-
511
- # Returns the string representation of the object
512
- # @return [String] String presentation of the object
513
- def to_s
514
- to_hash.to_s
515
- end
516
-
517
- # to_body is an alias to to_hash (backward compatibility)
518
- # @return [Hash] Returns the object in the form of hash
519
- def to_body
520
- to_hash
521
- end
522
-
523
- # Returns the object in the form of hash
524
- # @return [Hash] Returns the object in the form of hash
525
- def to_hash
526
- hash = {}
527
- self.class.attribute_map.each_pair do |attr, param|
528
- value = self.send(attr)
529
- if value.nil?
530
- is_nullable = self.class.openapi_nullable.include?(attr)
531
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
532
- end
533
-
534
- hash[param] = _to_hash(value)
535
- end
536
- hash
537
- end
538
-
539
- # Outputs non-array value in the form of hash
540
- # For object, use to_hash. Otherwise, just return the value
541
- # @param [Object] value Any valid value
542
- # @return [Hash] Returns the value in the form of hash
543
- def _to_hash(value)
544
- if value.is_a?(Array)
545
- value.compact.map { |v| _to_hash(v) }
546
- elsif value.is_a?(Hash)
547
- {}.tap do |hash|
548
- value.each { |k, v| hash[k] = _to_hash(v) }
549
- end
550
- elsif value.respond_to? :to_hash
551
- value.to_hash
552
- else
553
- value
554
- end
555
- end
556
- end
557
- end