pulp_ansible_client 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +7 -4
  3. data/docs/AnsibleCollectionRemote.md +8 -0
  4. data/docs/AnsibleCollectionRemoteResponse.md +8 -0
  5. data/docs/AnsibleCollectionVersionResponse.md +4 -4
  6. data/docs/AnsibleRoleRemote.md +9 -1
  7. data/docs/AnsibleRoleRemoteResponse.md +9 -1
  8. data/docs/AnsibleRoleResponse.md +4 -4
  9. data/docs/ArtifactRefResponse.md +21 -0
  10. data/docs/CollectionResponse.md +2 -2
  11. data/docs/CollectionVersionResponse.md +1 -1
  12. data/docs/PaginatedCollectionResponseList.md +2 -2
  13. data/docs/PaginatedCollectionResponseListLinks.md +23 -0
  14. data/docs/PaginatedCollectionResponseListMeta.md +17 -0
  15. data/docs/PaginatedCollectionVersionResponseList.md +2 -2
  16. data/docs/PatchedansibleCollectionRemote.md +8 -0
  17. data/docs/PatchedansibleRoleRemote.md +9 -1
  18. data/docs/RepositoriesAnsibleVersionsApi.md +2 -2
  19. data/lib/pulp_ansible_client.rb +3 -0
  20. data/lib/pulp_ansible_client/api/repositories_ansible_versions_api.rb +4 -4
  21. data/lib/pulp_ansible_client/models/ansible_collection_remote.rb +105 -1
  22. data/lib/pulp_ansible_client/models/ansible_collection_remote_response.rb +105 -1
  23. data/lib/pulp_ansible_client/models/ansible_collection_version_response.rb +14 -14
  24. data/lib/pulp_ansible_client/models/ansible_role_remote.rb +108 -4
  25. data/lib/pulp_ansible_client/models/ansible_role_remote_response.rb +108 -4
  26. data/lib/pulp_ansible_client/models/ansible_role_response.rb +14 -14
  27. data/lib/pulp_ansible_client/models/artifact_ref_response.rb +240 -0
  28. data/lib/pulp_ansible_client/models/collection_response.rb +2 -2
  29. data/lib/pulp_ansible_client/models/collection_version_response.rb +1 -1
  30. data/lib/pulp_ansible_client/models/paginated_collection_response_list.rb +2 -2
  31. data/lib/pulp_ansible_client/models/paginated_collection_response_list_links.rb +237 -0
  32. data/lib/pulp_ansible_client/models/paginated_collection_response_list_meta.rb +206 -0
  33. data/lib/pulp_ansible_client/models/paginated_collection_version_response_list.rb +2 -2
  34. data/lib/pulp_ansible_client/models/patchedansible_collection_remote.rb +105 -1
  35. data/lib/pulp_ansible_client/models/patchedansible_role_remote.rb +108 -4
  36. data/lib/pulp_ansible_client/version.rb +1 -1
  37. data/spec/api/repositories_ansible_versions_api_spec.rb +2 -2
  38. data/spec/models/ansible_collection_remote_response_spec.rb +24 -0
  39. data/spec/models/ansible_collection_remote_spec.rb +24 -0
  40. data/spec/models/ansible_collection_version_response_spec.rb +2 -2
  41. data/spec/models/ansible_role_remote_response_spec.rb +24 -0
  42. data/spec/models/ansible_role_remote_spec.rb +24 -0
  43. data/spec/models/ansible_role_response_spec.rb +2 -2
  44. data/spec/models/artifact_ref_response_spec.rb +53 -0
  45. data/spec/models/paginated_collection_response_list_links_spec.rb +59 -0
  46. data/spec/models/paginated_collection_response_list_meta_spec.rb +41 -0
  47. data/spec/models/patchedansible_collection_remote_spec.rb +24 -0
  48. data/spec/models/patchedansible_role_remote_spec.rb +24 -0
  49. metadata +75 -63
@@ -0,0 +1,206 @@
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 PulpAnsibleClient
16
+ class PaginatedCollectionResponseListMeta
17
+ attr_accessor :count
18
+
19
+ # Attribute mapping from ruby-style variable name to JSON key.
20
+ def self.attribute_map
21
+ {
22
+ :'count' => :'count'
23
+ }
24
+ end
25
+
26
+ # Attribute type mapping.
27
+ def self.openapi_types
28
+ {
29
+ :'count' => :'Integer'
30
+ }
31
+ end
32
+
33
+ # List of attributes with nullable: true
34
+ def self.openapi_nullable
35
+ Set.new([
36
+ ])
37
+ end
38
+
39
+ # Initializes the object
40
+ # @param [Hash] attributes Model attributes in the form of hash
41
+ def initialize(attributes = {})
42
+ if (!attributes.is_a?(Hash))
43
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpAnsibleClient::PaginatedCollectionResponseListMeta` initialize method"
44
+ end
45
+
46
+ # check to see if the attribute exists and convert string to symbol for hash key
47
+ attributes = attributes.each_with_object({}) { |(k, v), h|
48
+ if (!self.class.attribute_map.key?(k.to_sym))
49
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpAnsibleClient::PaginatedCollectionResponseListMeta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
50
+ end
51
+ h[k.to_sym] = v
52
+ }
53
+
54
+ if attributes.key?(:'count')
55
+ self.count = attributes[:'count']
56
+ end
57
+ end
58
+
59
+ # Show invalid properties with the reasons. Usually used together with valid?
60
+ # @return Array for valid properties with the reasons
61
+ def list_invalid_properties
62
+ invalid_properties = Array.new
63
+ invalid_properties
64
+ end
65
+
66
+ # Check to see if the all the properties in the model are valid
67
+ # @return true if the model is valid
68
+ def valid?
69
+ true
70
+ end
71
+
72
+ # Checks equality by comparing each attribute.
73
+ # @param [Object] Object to be compared
74
+ def ==(o)
75
+ return true if self.equal?(o)
76
+ self.class == o.class &&
77
+ count == o.count
78
+ end
79
+
80
+ # @see the `==` method
81
+ # @param [Object] Object to be compared
82
+ def eql?(o)
83
+ self == o
84
+ end
85
+
86
+ # Calculates hash code according to all attributes.
87
+ # @return [Integer] Hash code
88
+ def hash
89
+ [count].hash
90
+ end
91
+
92
+ # Builds the object from hash
93
+ # @param [Hash] attributes Model attributes in the form of hash
94
+ # @return [Object] Returns the model itself
95
+ def self.build_from_hash(attributes)
96
+ new.build_from_hash(attributes)
97
+ end
98
+
99
+ # Builds the object from hash
100
+ # @param [Hash] attributes Model attributes in the form of hash
101
+ # @return [Object] Returns the model itself
102
+ def build_from_hash(attributes)
103
+ return nil unless attributes.is_a?(Hash)
104
+ self.class.openapi_types.each_pair do |key, type|
105
+ if type =~ /\AArray<(.*)>/i
106
+ # check to ensure the input is an array given that the attribute
107
+ # is documented as an array but the input is not
108
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
109
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
110
+ end
111
+ elsif !attributes[self.class.attribute_map[key]].nil?
112
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
113
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
114
+ end
115
+
116
+ self
117
+ end
118
+
119
+ # Deserializes the data based on type
120
+ # @param string type Data type
121
+ # @param string value Value to be deserialized
122
+ # @return [Object] Deserialized data
123
+ def _deserialize(type, value)
124
+ case type.to_sym
125
+ when :DateTime
126
+ DateTime.parse(value)
127
+ when :Date
128
+ Date.parse(value)
129
+ when :String
130
+ value.to_s
131
+ when :Integer
132
+ value.to_i
133
+ when :Float
134
+ value.to_f
135
+ when :Boolean
136
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
137
+ true
138
+ else
139
+ false
140
+ end
141
+ when :Object
142
+ # generic object (usually a Hash), return directly
143
+ value
144
+ when /\AArray<(?<inner_type>.+)>\z/
145
+ inner_type = Regexp.last_match[:inner_type]
146
+ value.map { |v| _deserialize(inner_type, v) }
147
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
148
+ k_type = Regexp.last_match[:k_type]
149
+ v_type = Regexp.last_match[:v_type]
150
+ {}.tap do |hash|
151
+ value.each do |k, v|
152
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
153
+ end
154
+ end
155
+ else # model
156
+ PulpAnsibleClient.const_get(type).build_from_hash(value)
157
+ end
158
+ end
159
+
160
+ # Returns the string representation of the object
161
+ # @return [String] String presentation of the object
162
+ def to_s
163
+ to_hash.to_s
164
+ end
165
+
166
+ # to_body is an alias to to_hash (backward compatibility)
167
+ # @return [Hash] Returns the object in the form of hash
168
+ def to_body
169
+ to_hash
170
+ end
171
+
172
+ # Returns the object in the form of hash
173
+ # @return [Hash] Returns the object in the form of hash
174
+ def to_hash
175
+ hash = {}
176
+ self.class.attribute_map.each_pair do |attr, param|
177
+ value = self.send(attr)
178
+ if value.nil?
179
+ is_nullable = self.class.openapi_nullable.include?(attr)
180
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
181
+ end
182
+
183
+ hash[param] = _to_hash(value)
184
+ end
185
+ hash
186
+ end
187
+
188
+ # Outputs non-array value in the form of hash
189
+ # For object, use to_hash. Otherwise, just return the value
190
+ # @param [Object] value Any valid value
191
+ # @return [Hash] Returns the value in the form of hash
192
+ def _to_hash(value)
193
+ if value.is_a?(Array)
194
+ value.compact.map { |v| _to_hash(v) }
195
+ elsif value.is_a?(Hash)
196
+ {}.tap do |hash|
197
+ value.each { |k, v| hash[k] = _to_hash(v) }
198
+ end
199
+ elsif value.respond_to? :to_hash
200
+ value.to_hash
201
+ else
202
+ value
203
+ end
204
+ end
205
+ end
206
+ end
@@ -32,8 +32,8 @@ module PulpAnsibleClient
32
32
  # Attribute type mapping.
33
33
  def self.openapi_types
34
34
  {
35
- :'meta' => :'Object',
36
- :'links' => :'Object',
35
+ :'meta' => :'PaginatedCollectionResponseListMeta',
36
+ :'links' => :'PaginatedCollectionResponseListLinks',
37
37
  :'data' => :'Array<CollectionVersionResponse>'
38
38
  }
39
39
  end
@@ -48,6 +48,18 @@ module PulpAnsibleClient
48
48
  # The policy to use when downloading content.
49
49
  attr_accessor :policy
50
50
 
51
+ # aiohttp.ClientTimeout.total (q.v.) for download-connections.
52
+ attr_accessor :total_timeout
53
+
54
+ # aiohttp.ClientTimeout.connect (q.v.) for download-connections.
55
+ attr_accessor :connect_timeout
56
+
57
+ # aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections.
58
+ attr_accessor :sock_connect_timeout
59
+
60
+ # aiohttp.ClientTimeout.sock_read (q.v.) for download-connections.
61
+ attr_accessor :sock_read_timeout
62
+
51
63
  # The string version of Collection requirements yaml.
52
64
  attr_accessor :requirements_file
53
65
 
@@ -71,6 +83,10 @@ module PulpAnsibleClient
71
83
  :'password' => :'password',
72
84
  :'download_concurrency' => :'download_concurrency',
73
85
  :'policy' => :'policy',
86
+ :'total_timeout' => :'total_timeout',
87
+ :'connect_timeout' => :'connect_timeout',
88
+ :'sock_connect_timeout' => :'sock_connect_timeout',
89
+ :'sock_read_timeout' => :'sock_read_timeout',
74
90
  :'requirements_file' => :'requirements_file',
75
91
  :'auth_url' => :'auth_url',
76
92
  :'token' => :'token'
@@ -91,6 +107,10 @@ module PulpAnsibleClient
91
107
  :'password' => :'String',
92
108
  :'download_concurrency' => :'Integer',
93
109
  :'policy' => :'PolicyEnum',
110
+ :'total_timeout' => :'Float',
111
+ :'connect_timeout' => :'Float',
112
+ :'sock_connect_timeout' => :'Float',
113
+ :'sock_read_timeout' => :'Float',
94
114
  :'requirements_file' => :'String',
95
115
  :'auth_url' => :'String',
96
116
  :'token' => :'String'
@@ -106,6 +126,10 @@ module PulpAnsibleClient
106
126
  :'proxy_url',
107
127
  :'username',
108
128
  :'password',
129
+ :'total_timeout',
130
+ :'connect_timeout',
131
+ :'sock_connect_timeout',
132
+ :'sock_read_timeout',
109
133
  :'requirements_file',
110
134
  :'auth_url',
111
135
  :'token'
@@ -171,6 +195,22 @@ module PulpAnsibleClient
171
195
  self.policy = attributes[:'policy']
172
196
  end
173
197
 
198
+ if attributes.key?(:'total_timeout')
199
+ self.total_timeout = attributes[:'total_timeout']
200
+ end
201
+
202
+ if attributes.key?(:'connect_timeout')
203
+ self.connect_timeout = attributes[:'connect_timeout']
204
+ end
205
+
206
+ if attributes.key?(:'sock_connect_timeout')
207
+ self.sock_connect_timeout = attributes[:'sock_connect_timeout']
208
+ end
209
+
210
+ if attributes.key?(:'sock_read_timeout')
211
+ self.sock_read_timeout = attributes[:'sock_read_timeout']
212
+ end
213
+
174
214
  if attributes.key?(:'requirements_file')
175
215
  self.requirements_file = attributes[:'requirements_file']
176
216
  end
@@ -192,6 +232,22 @@ module PulpAnsibleClient
192
232
  invalid_properties.push('invalid value for "download_concurrency", must be greater than or equal to 1.')
193
233
  end
194
234
 
235
+ if !@total_timeout.nil? && @total_timeout < 0.0
236
+ invalid_properties.push('invalid value for "total_timeout", must be greater than or equal to 0.0.')
237
+ end
238
+
239
+ if !@connect_timeout.nil? && @connect_timeout < 0.0
240
+ invalid_properties.push('invalid value for "connect_timeout", must be greater than or equal to 0.0.')
241
+ end
242
+
243
+ if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
244
+ invalid_properties.push('invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.')
245
+ end
246
+
247
+ if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
248
+ invalid_properties.push('invalid value for "sock_read_timeout", must be greater than or equal to 0.0.')
249
+ end
250
+
195
251
  if !@auth_url.nil? && @auth_url.to_s.length > 255
196
252
  invalid_properties.push('invalid value for "auth_url", the character length must be smaller than or equal to 255.')
197
253
  end
@@ -207,6 +263,10 @@ module PulpAnsibleClient
207
263
  # @return true if the model is valid
208
264
  def valid?
209
265
  return false if !@download_concurrency.nil? && @download_concurrency < 1
266
+ return false if !@total_timeout.nil? && @total_timeout < 0.0
267
+ return false if !@connect_timeout.nil? && @connect_timeout < 0.0
268
+ return false if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
269
+ return false if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
210
270
  return false if !@auth_url.nil? && @auth_url.to_s.length > 255
211
271
  return false if !@token.nil? && @token.to_s.length > 2000
212
272
  true
@@ -222,6 +282,46 @@ module PulpAnsibleClient
222
282
  @download_concurrency = download_concurrency
223
283
  end
224
284
 
285
+ # Custom attribute writer method with validation
286
+ # @param [Object] total_timeout Value to be assigned
287
+ def total_timeout=(total_timeout)
288
+ if !total_timeout.nil? && total_timeout < 0.0
289
+ fail ArgumentError, 'invalid value for "total_timeout", must be greater than or equal to 0.0.'
290
+ end
291
+
292
+ @total_timeout = total_timeout
293
+ end
294
+
295
+ # Custom attribute writer method with validation
296
+ # @param [Object] connect_timeout Value to be assigned
297
+ def connect_timeout=(connect_timeout)
298
+ if !connect_timeout.nil? && connect_timeout < 0.0
299
+ fail ArgumentError, 'invalid value for "connect_timeout", must be greater than or equal to 0.0.'
300
+ end
301
+
302
+ @connect_timeout = connect_timeout
303
+ end
304
+
305
+ # Custom attribute writer method with validation
306
+ # @param [Object] sock_connect_timeout Value to be assigned
307
+ def sock_connect_timeout=(sock_connect_timeout)
308
+ if !sock_connect_timeout.nil? && sock_connect_timeout < 0.0
309
+ fail ArgumentError, 'invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.'
310
+ end
311
+
312
+ @sock_connect_timeout = sock_connect_timeout
313
+ end
314
+
315
+ # Custom attribute writer method with validation
316
+ # @param [Object] sock_read_timeout Value to be assigned
317
+ def sock_read_timeout=(sock_read_timeout)
318
+ if !sock_read_timeout.nil? && sock_read_timeout < 0.0
319
+ fail ArgumentError, 'invalid value for "sock_read_timeout", must be greater than or equal to 0.0.'
320
+ end
321
+
322
+ @sock_read_timeout = sock_read_timeout
323
+ end
324
+
225
325
  # Custom attribute writer method with validation
226
326
  # @param [Object] auth_url Value to be assigned
227
327
  def auth_url=(auth_url)
@@ -258,6 +358,10 @@ module PulpAnsibleClient
258
358
  password == o.password &&
259
359
  download_concurrency == o.download_concurrency &&
260
360
  policy == o.policy &&
361
+ total_timeout == o.total_timeout &&
362
+ connect_timeout == o.connect_timeout &&
363
+ sock_connect_timeout == o.sock_connect_timeout &&
364
+ sock_read_timeout == o.sock_read_timeout &&
261
365
  requirements_file == o.requirements_file &&
262
366
  auth_url == o.auth_url &&
263
367
  token == o.token
@@ -272,7 +376,7 @@ module PulpAnsibleClient
272
376
  # Calculates hash code according to all attributes.
273
377
  # @return [Integer] Hash code
274
378
  def hash
275
- [name, url, ca_cert, client_cert, client_key, tls_validation, proxy_url, username, password, download_concurrency, policy, requirements_file, auth_url, token].hash
379
+ [name, url, ca_cert, client_cert, client_key, tls_validation, proxy_url, username, password, download_concurrency, policy, total_timeout, connect_timeout, sock_connect_timeout, sock_read_timeout, requirements_file, auth_url, token].hash
276
380
  end
277
381
 
278
382
  # Builds the object from hash
@@ -48,6 +48,18 @@ module PulpAnsibleClient
48
48
  # The policy to use when downloading content.
49
49
  attr_accessor :policy
50
50
 
51
+ # aiohttp.ClientTimeout.total (q.v.) for download-connections.
52
+ attr_accessor :total_timeout
53
+
54
+ # aiohttp.ClientTimeout.connect (q.v.) for download-connections.
55
+ attr_accessor :connect_timeout
56
+
57
+ # aiohttp.ClientTimeout.sock_connect (q.v.) for download-connections.
58
+ attr_accessor :sock_connect_timeout
59
+
60
+ # aiohttp.ClientTimeout.sock_read (q.v.) for download-connections.
61
+ attr_accessor :sock_read_timeout
62
+
51
63
  # Attribute mapping from ruby-style variable name to JSON key.
52
64
  def self.attribute_map
53
65
  {
@@ -61,7 +73,11 @@ module PulpAnsibleClient
61
73
  :'username' => :'username',
62
74
  :'password' => :'password',
63
75
  :'download_concurrency' => :'download_concurrency',
64
- :'policy' => :'policy'
76
+ :'policy' => :'policy',
77
+ :'total_timeout' => :'total_timeout',
78
+ :'connect_timeout' => :'connect_timeout',
79
+ :'sock_connect_timeout' => :'sock_connect_timeout',
80
+ :'sock_read_timeout' => :'sock_read_timeout'
65
81
  }
66
82
  end
67
83
 
@@ -78,7 +94,11 @@ module PulpAnsibleClient
78
94
  :'username' => :'String',
79
95
  :'password' => :'String',
80
96
  :'download_concurrency' => :'Integer',
81
- :'policy' => :'PolicyEnum'
97
+ :'policy' => :'PolicyEnum',
98
+ :'total_timeout' => :'Float',
99
+ :'connect_timeout' => :'Float',
100
+ :'sock_connect_timeout' => :'Float',
101
+ :'sock_read_timeout' => :'Float'
82
102
  }
83
103
  end
84
104
 
@@ -91,6 +111,10 @@ module PulpAnsibleClient
91
111
  :'proxy_url',
92
112
  :'username',
93
113
  :'password',
114
+ :'total_timeout',
115
+ :'connect_timeout',
116
+ :'sock_connect_timeout',
117
+ :'sock_read_timeout'
94
118
  ])
95
119
  end
96
120
 
@@ -152,6 +176,22 @@ module PulpAnsibleClient
152
176
  if attributes.key?(:'policy')
153
177
  self.policy = attributes[:'policy']
154
178
  end
179
+
180
+ if attributes.key?(:'total_timeout')
181
+ self.total_timeout = attributes[:'total_timeout']
182
+ end
183
+
184
+ if attributes.key?(:'connect_timeout')
185
+ self.connect_timeout = attributes[:'connect_timeout']
186
+ end
187
+
188
+ if attributes.key?(:'sock_connect_timeout')
189
+ self.sock_connect_timeout = attributes[:'sock_connect_timeout']
190
+ end
191
+
192
+ if attributes.key?(:'sock_read_timeout')
193
+ self.sock_read_timeout = attributes[:'sock_read_timeout']
194
+ end
155
195
  end
156
196
 
157
197
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -162,6 +202,22 @@ module PulpAnsibleClient
162
202
  invalid_properties.push('invalid value for "download_concurrency", must be greater than or equal to 1.')
163
203
  end
164
204
 
205
+ if !@total_timeout.nil? && @total_timeout < 0.0
206
+ invalid_properties.push('invalid value for "total_timeout", must be greater than or equal to 0.0.')
207
+ end
208
+
209
+ if !@connect_timeout.nil? && @connect_timeout < 0.0
210
+ invalid_properties.push('invalid value for "connect_timeout", must be greater than or equal to 0.0.')
211
+ end
212
+
213
+ if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
214
+ invalid_properties.push('invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.')
215
+ end
216
+
217
+ if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
218
+ invalid_properties.push('invalid value for "sock_read_timeout", must be greater than or equal to 0.0.')
219
+ end
220
+
165
221
  invalid_properties
166
222
  end
167
223
 
@@ -169,6 +225,10 @@ module PulpAnsibleClient
169
225
  # @return true if the model is valid
170
226
  def valid?
171
227
  return false if !@download_concurrency.nil? && @download_concurrency < 1
228
+ return false if !@total_timeout.nil? && @total_timeout < 0.0
229
+ return false if !@connect_timeout.nil? && @connect_timeout < 0.0
230
+ return false if !@sock_connect_timeout.nil? && @sock_connect_timeout < 0.0
231
+ return false if !@sock_read_timeout.nil? && @sock_read_timeout < 0.0
172
232
  true
173
233
  end
174
234
 
@@ -182,6 +242,46 @@ module PulpAnsibleClient
182
242
  @download_concurrency = download_concurrency
183
243
  end
184
244
 
245
+ # Custom attribute writer method with validation
246
+ # @param [Object] total_timeout Value to be assigned
247
+ def total_timeout=(total_timeout)
248
+ if !total_timeout.nil? && total_timeout < 0.0
249
+ fail ArgumentError, 'invalid value for "total_timeout", must be greater than or equal to 0.0.'
250
+ end
251
+
252
+ @total_timeout = total_timeout
253
+ end
254
+
255
+ # Custom attribute writer method with validation
256
+ # @param [Object] connect_timeout Value to be assigned
257
+ def connect_timeout=(connect_timeout)
258
+ if !connect_timeout.nil? && connect_timeout < 0.0
259
+ fail ArgumentError, 'invalid value for "connect_timeout", must be greater than or equal to 0.0.'
260
+ end
261
+
262
+ @connect_timeout = connect_timeout
263
+ end
264
+
265
+ # Custom attribute writer method with validation
266
+ # @param [Object] sock_connect_timeout Value to be assigned
267
+ def sock_connect_timeout=(sock_connect_timeout)
268
+ if !sock_connect_timeout.nil? && sock_connect_timeout < 0.0
269
+ fail ArgumentError, 'invalid value for "sock_connect_timeout", must be greater than or equal to 0.0.'
270
+ end
271
+
272
+ @sock_connect_timeout = sock_connect_timeout
273
+ end
274
+
275
+ # Custom attribute writer method with validation
276
+ # @param [Object] sock_read_timeout Value to be assigned
277
+ def sock_read_timeout=(sock_read_timeout)
278
+ if !sock_read_timeout.nil? && sock_read_timeout < 0.0
279
+ fail ArgumentError, 'invalid value for "sock_read_timeout", must be greater than or equal to 0.0.'
280
+ end
281
+
282
+ @sock_read_timeout = sock_read_timeout
283
+ end
284
+
185
285
  # Checks equality by comparing each attribute.
186
286
  # @param [Object] Object to be compared
187
287
  def ==(o)
@@ -197,7 +297,11 @@ module PulpAnsibleClient
197
297
  username == o.username &&
198
298
  password == o.password &&
199
299
  download_concurrency == o.download_concurrency &&
200
- policy == o.policy
300
+ policy == o.policy &&
301
+ total_timeout == o.total_timeout &&
302
+ connect_timeout == o.connect_timeout &&
303
+ sock_connect_timeout == o.sock_connect_timeout &&
304
+ sock_read_timeout == o.sock_read_timeout
201
305
  end
202
306
 
203
307
  # @see the `==` method
@@ -209,7 +313,7 @@ module PulpAnsibleClient
209
313
  # Calculates hash code according to all attributes.
210
314
  # @return [Integer] Hash code
211
315
  def hash
212
- [name, url, ca_cert, client_cert, client_key, tls_validation, proxy_url, username, password, download_concurrency, policy].hash
316
+ [name, url, ca_cert, client_cert, client_key, tls_validation, proxy_url, username, password, download_concurrency, policy, total_timeout, connect_timeout, sock_connect_timeout, sock_read_timeout].hash
213
317
  end
214
318
 
215
319
  # Builds the object from hash