pulp_ansible_client 0.19.0 → 0.20.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (157) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +44 -32
  3. data/docs/AnsibleAnsibleRepositoryResponse.md +1 -1
  4. data/docs/AnsibleCollectionRemoteResponse.md +1 -1
  5. data/docs/AnsibleCollectionVersion.md +6 -6
  6. data/docs/AnsibleCollectionsApi.md +15 -9
  7. data/docs/AnsibleCopyApi.md +1 -1
  8. data/docs/AnsibleGitRemote.md +24 -24
  9. data/docs/AnsibleGitRemoteResponse.md +22 -22
  10. data/docs/ApiCollectionsApi.md +1 -1
  11. data/docs/ApiRolesApi.md +1 -1
  12. data/docs/CollectionImportApi.md +1 -1
  13. data/docs/CollectionVersionListResponse.md +1 -1
  14. data/docs/CollectionVersionResponse.md +1 -1
  15. data/docs/ContentCollectionDeprecationsApi.md +3 -1
  16. data/docs/ContentCollectionMarksApi.md +4 -2
  17. data/docs/ContentCollectionSignaturesApi.md +5 -3
  18. data/docs/ContentCollectionVersionsApi.md +7 -7
  19. data/docs/ContentNamespacesApi.md +19 -1
  20. data/docs/ContentRolesApi.md +3 -1
  21. data/docs/DistributionsAnsibleApi.md +136 -10
  22. data/docs/GalaxyDetailApi.md +1 -1
  23. data/docs/PatchedansibleGitRemote.md +24 -24
  24. data/docs/PulpAnsibleApiApi.md +1 -1
  25. data/docs/PulpAnsibleApiV2CollectionsVersionsApi.md +1 -1
  26. data/docs/PulpAnsibleApiV3Api.md +1 -1
  27. data/docs/PulpAnsibleApiV3ArtifactsCollectionsApi.md +1 -1
  28. data/docs/PulpAnsibleApiV3CollectionVersionsAllApi.md +1 -1
  29. data/docs/PulpAnsibleApiV3CollectionsAllApi.md +3 -1
  30. data/docs/PulpAnsibleApiV3CollectionsApi.md +3 -1
  31. data/docs/PulpAnsibleApiV3CollectionsVersionsApi.md +1 -1
  32. data/docs/PulpAnsibleApiV3CollectionsVersionsDocsBlobApi.md +1 -1
  33. data/docs/PulpAnsibleApiV3NamespacesApi.md +19 -1
  34. data/docs/PulpAnsibleApiV3PluginAnsibleClientConfigurationApi.md +1 -1
  35. data/docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsAllCollectionsApi.md +3 -1
  36. data/docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsAllVersionsApi.md +1 -1
  37. data/docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsApi.md +1 -1
  38. data/docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsArtifactsApi.md +1 -1
  39. data/docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexApi.md +3 -1
  40. data/docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsApi.md +1 -1
  41. data/docs/PulpAnsibleApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobApi.md +1 -1
  42. data/docs/PulpAnsibleApiV3PluginAnsibleContentNamespacesApi.md +23 -5
  43. data/docs/PulpAnsibleApiV3PluginAnsibleSearchCollectionVersionsApi.md +1 -1
  44. data/docs/PulpAnsibleArtifactsCollectionsV3Api.md +1 -1
  45. data/docs/PulpAnsibleDefaultApiApi.md +1 -1
  46. data/docs/PulpAnsibleDefaultApiV3Api.md +1 -1
  47. data/docs/PulpAnsibleDefaultApiV3ArtifactsCollectionsApi.md +1 -1
  48. data/docs/PulpAnsibleDefaultApiV3CollectionVersionsAllApi.md +1 -1
  49. data/docs/PulpAnsibleDefaultApiV3CollectionsAllApi.md +3 -1
  50. data/docs/PulpAnsibleDefaultApiV3CollectionsApi.md +3 -1
  51. data/docs/PulpAnsibleDefaultApiV3CollectionsVersionsApi.md +1 -1
  52. data/docs/PulpAnsibleDefaultApiV3CollectionsVersionsDocsBlobApi.md +1 -1
  53. data/docs/PulpAnsibleDefaultApiV3NamespacesApi.md +19 -1
  54. data/docs/PulpAnsibleDefaultApiV3PluginAnsibleClientConfigurationApi.md +1 -1
  55. data/docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllCollectionsApi.md +3 -1
  56. data/docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsAllVersionsApi.md +1 -1
  57. data/docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsApi.md +1 -1
  58. data/docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsArtifactsApi.md +1 -1
  59. data/docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexApi.md +3 -1
  60. data/docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsApi.md +1 -1
  61. data/docs/PulpAnsibleDefaultApiV3PluginAnsibleContentCollectionsIndexVersionsDocsBlobApi.md +1 -1
  62. data/docs/PulpAnsibleDefaultApiV3PluginAnsibleContentNamespacesApi.md +23 -5
  63. data/docs/PulpAnsibleDefaultApiV3PluginAnsibleSearchCollectionVersionsApi.md +1 -1
  64. data/docs/PulpAnsibleTagsApi.md +1 -1
  65. data/docs/RemotesCollectionApi.md +135 -9
  66. data/docs/RemotesGitApi.md +135 -9
  67. data/docs/RemotesRoleApi.md +135 -9
  68. data/docs/RepositoriesAnsibleApi.md +136 -10
  69. data/docs/RepositoriesAnsibleVersionsApi.md +3 -1
  70. data/docs/SetLabel.md +19 -0
  71. data/docs/SetLabelResponse.md +19 -0
  72. data/docs/UnpaginatedCollectionVersionResponse.md +1 -1
  73. data/docs/UnsetLabel.md +17 -0
  74. data/docs/UnsetLabelResponse.md +19 -0
  75. data/docs/VersionsApi.md +1 -1
  76. data/lib/pulp_ansible_client/api/ansible_collections_api.rb +11 -0
  77. data/lib/pulp_ansible_client/api/content_collection_deprecations_api.rb +3 -0
  78. data/lib/pulp_ansible_client/api/content_collection_marks_api.rb +3 -0
  79. data/lib/pulp_ansible_client/api/content_collection_signatures_api.rb +3 -0
  80. data/lib/pulp_ansible_client/api/content_collection_versions_api.rb +9 -9
  81. data/lib/pulp_ansible_client/api/content_namespaces_api.rb +27 -0
  82. data/lib/pulp_ansible_client/api/content_roles_api.rb +3 -0
  83. data/lib/pulp_ansible_client/api/distributions_ansible_api.rb +163 -0
  84. data/lib/pulp_ansible_client/api/pulp_ansible_api_v3_collections_all_api.rb +3 -0
  85. data/lib/pulp_ansible_client/api/pulp_ansible_api_v3_collections_api.rb +3 -0
  86. data/lib/pulp_ansible_client/api/pulp_ansible_api_v3_namespaces_api.rb +27 -0
  87. data/lib/pulp_ansible_client/api/pulp_ansible_api_v3_plugin_ansible_content_collections_all_collections_api.rb +3 -0
  88. data/lib/pulp_ansible_client/api/pulp_ansible_api_v3_plugin_ansible_content_collections_index_api.rb +3 -0
  89. data/lib/pulp_ansible_client/api/pulp_ansible_api_v3_plugin_ansible_content_namespaces_api.rb +35 -8
  90. data/lib/pulp_ansible_client/api/pulp_ansible_default_api_v3_collections_all_api.rb +3 -0
  91. data/lib/pulp_ansible_client/api/pulp_ansible_default_api_v3_collections_api.rb +3 -0
  92. data/lib/pulp_ansible_client/api/pulp_ansible_default_api_v3_namespaces_api.rb +27 -0
  93. data/lib/pulp_ansible_client/api/pulp_ansible_default_api_v3_plugin_ansible_content_collections_all_collections_api.rb +3 -0
  94. data/lib/pulp_ansible_client/api/pulp_ansible_default_api_v3_plugin_ansible_content_collections_index_api.rb +3 -0
  95. data/lib/pulp_ansible_client/api/pulp_ansible_default_api_v3_plugin_ansible_content_namespaces_api.rb +35 -8
  96. data/lib/pulp_ansible_client/api/remotes_collection_api.rb +163 -0
  97. data/lib/pulp_ansible_client/api/remotes_git_api.rb +163 -0
  98. data/lib/pulp_ansible_client/api/remotes_role_api.rb +163 -0
  99. data/lib/pulp_ansible_client/api/repositories_ansible_api.rb +163 -0
  100. data/lib/pulp_ansible_client/api/repositories_ansible_versions_api.rb +3 -0
  101. data/lib/pulp_ansible_client/configuration.rb +2 -2
  102. data/lib/pulp_ansible_client/models/ansible_ansible_repository_response.rb +1 -1
  103. data/lib/pulp_ansible_client/models/ansible_collection_remote_response.rb +1 -1
  104. data/lib/pulp_ansible_client/models/ansible_collection_version.rb +25 -25
  105. data/lib/pulp_ansible_client/models/ansible_git_remote.rb +195 -195
  106. data/lib/pulp_ansible_client/models/ansible_git_remote_response.rb +130 -130
  107. data/lib/pulp_ansible_client/models/collection_version_list_response.rb +24 -0
  108. data/lib/pulp_ansible_client/models/collection_version_response.rb +24 -0
  109. data/lib/pulp_ansible_client/models/patchedansible_git_remote.rb +186 -186
  110. data/lib/pulp_ansible_client/models/{progress_report_response.rb → set_label.rb} +52 -59
  111. data/lib/pulp_ansible_client/models/set_label_response.rb +243 -0
  112. data/lib/pulp_ansible_client/models/unpaginated_collection_version_response.rb +24 -0
  113. data/lib/pulp_ansible_client/models/{task.rb → unset_label.rb} +31 -55
  114. data/lib/pulp_ansible_client/models/unset_label_response.rb +242 -0
  115. data/lib/pulp_ansible_client/version.rb +1 -1
  116. data/lib/pulp_ansible_client.rb +4 -3
  117. data/spec/api/ansible_collections_api_spec.rb +5 -0
  118. data/spec/api/content_collection_deprecations_api_spec.rb +1 -0
  119. data/spec/api/content_collection_marks_api_spec.rb +1 -0
  120. data/spec/api/content_collection_signatures_api_spec.rb +1 -0
  121. data/spec/api/content_collection_versions_api_spec.rb +3 -3
  122. data/spec/api/content_namespaces_api_spec.rb +9 -0
  123. data/spec/api/content_roles_api_spec.rb +1 -0
  124. data/spec/api/distributions_ansible_api_spec.rb +35 -0
  125. data/spec/api/pulp_ansible_api_v3_collections_all_api_spec.rb +1 -0
  126. data/spec/api/pulp_ansible_api_v3_collections_api_spec.rb +1 -0
  127. data/spec/api/pulp_ansible_api_v3_namespaces_api_spec.rb +9 -0
  128. data/spec/api/pulp_ansible_api_v3_plugin_ansible_content_collections_all_collections_api_spec.rb +1 -0
  129. data/spec/api/pulp_ansible_api_v3_plugin_ansible_content_collections_index_api_spec.rb +1 -0
  130. data/spec/api/pulp_ansible_api_v3_plugin_ansible_content_namespaces_api_spec.rb +13 -4
  131. data/spec/api/pulp_ansible_default_api_v3_collections_all_api_spec.rb +1 -0
  132. data/spec/api/pulp_ansible_default_api_v3_collections_api_spec.rb +1 -0
  133. data/spec/api/pulp_ansible_default_api_v3_namespaces_api_spec.rb +9 -0
  134. data/spec/api/pulp_ansible_default_api_v3_plugin_ansible_content_collections_all_collections_api_spec.rb +1 -0
  135. data/spec/api/pulp_ansible_default_api_v3_plugin_ansible_content_collections_index_api_spec.rb +1 -0
  136. data/spec/api/pulp_ansible_default_api_v3_plugin_ansible_content_namespaces_api_spec.rb +13 -4
  137. data/spec/api/remotes_collection_api_spec.rb +35 -0
  138. data/spec/api/remotes_git_api_spec.rb +35 -0
  139. data/spec/api/remotes_role_api_spec.rb +35 -0
  140. data/spec/api/repositories_ansible_api_spec.rb +35 -0
  141. data/spec/api/repositories_ansible_versions_api_spec.rb +1 -0
  142. data/spec/configuration_spec.rb +3 -3
  143. data/spec/models/ansible_collection_version_spec.rb +4 -4
  144. data/spec/models/ansible_git_remote_response_spec.rb +17 -17
  145. data/spec/models/ansible_git_remote_spec.rb +18 -18
  146. data/spec/models/patchedansible_git_remote_spec.rb +18 -18
  147. data/spec/models/set_label_response_spec.rb +47 -0
  148. data/spec/models/{task_spec.rb → set_label_spec.rb} +8 -8
  149. data/spec/models/unset_label_response_spec.rb +47 -0
  150. data/spec/models/unset_label_spec.rb +41 -0
  151. metadata +147 -143
  152. data/docs/ProgressReportResponse.md +0 -27
  153. data/docs/Task.md +0 -19
  154. data/docs/TaskResponse.md +0 -47
  155. data/lib/pulp_ansible_client/models/task_response.rb +0 -376
  156. data/spec/models/progress_report_response_spec.rb +0 -71
  157. data/spec/models/task_response_spec.rb +0 -131
@@ -1,376 +0,0 @@
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.3.1
10
-
11
- =end
12
-
13
- require 'date'
14
-
15
- module PulpAnsibleClient
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 TaskResponse
18
- attr_accessor :pulp_href
19
-
20
- # Timestamp of creation.
21
- attr_accessor :pulp_created
22
-
23
- # The current state of the task. The possible values include: 'waiting', 'skipped', 'running', 'completed', 'failed', 'canceled' and 'canceling'.
24
- attr_accessor :state
25
-
26
- # The name of task.
27
- attr_accessor :name
28
-
29
- # The logging correlation id associated with this task
30
- attr_accessor :logging_cid
31
-
32
- # User who dispatched this task.
33
- attr_accessor :created_by
34
-
35
- # Timestamp of the when this task started execution.
36
- attr_accessor :started_at
37
-
38
- # Timestamp of the when this task stopped execution.
39
- attr_accessor :finished_at
40
-
41
- # A JSON Object of a fatal error encountered during the execution of this task.
42
- attr_accessor :error
43
-
44
- # The worker associated with this task. This field is empty if a worker is not yet assigned.
45
- attr_accessor :worker
46
-
47
- # The parent task that spawned this task.
48
- attr_accessor :parent_task
49
-
50
- # Any tasks spawned by this task.
51
- attr_accessor :child_tasks
52
-
53
- # The task group that this task is a member of.
54
- attr_accessor :task_group
55
-
56
- attr_accessor :progress_reports
57
-
58
- # Resources created by this task.
59
- attr_accessor :created_resources
60
-
61
- # A list of resources required by that task.
62
- attr_accessor :reserved_resources_record
63
-
64
- # Attribute mapping from ruby-style variable name to JSON key.
65
- def self.attribute_map
66
- {
67
- :'pulp_href' => :'pulp_href',
68
- :'pulp_created' => :'pulp_created',
69
- :'state' => :'state',
70
- :'name' => :'name',
71
- :'logging_cid' => :'logging_cid',
72
- :'created_by' => :'created_by',
73
- :'started_at' => :'started_at',
74
- :'finished_at' => :'finished_at',
75
- :'error' => :'error',
76
- :'worker' => :'worker',
77
- :'parent_task' => :'parent_task',
78
- :'child_tasks' => :'child_tasks',
79
- :'task_group' => :'task_group',
80
- :'progress_reports' => :'progress_reports',
81
- :'created_resources' => :'created_resources',
82
- :'reserved_resources_record' => :'reserved_resources_record'
83
- }
84
- end
85
-
86
- # Attribute type mapping.
87
- def self.openapi_types
88
- {
89
- :'pulp_href' => :'String',
90
- :'pulp_created' => :'DateTime',
91
- :'state' => :'String',
92
- :'name' => :'String',
93
- :'logging_cid' => :'String',
94
- :'created_by' => :'String',
95
- :'started_at' => :'DateTime',
96
- :'finished_at' => :'DateTime',
97
- :'error' => :'Hash<String, Object>',
98
- :'worker' => :'String',
99
- :'parent_task' => :'String',
100
- :'child_tasks' => :'Array<String>',
101
- :'task_group' => :'String',
102
- :'progress_reports' => :'Array<ProgressReportResponse>',
103
- :'created_resources' => :'Array<String>',
104
- :'reserved_resources_record' => :'Array<String>'
105
- }
106
- end
107
-
108
- # List of attributes with nullable: true
109
- def self.openapi_nullable
110
- Set.new([
111
- ])
112
- end
113
-
114
- # Initializes the object
115
- # @param [Hash] attributes Model attributes in the form of hash
116
- def initialize(attributes = {})
117
- if (!attributes.is_a?(Hash))
118
- fail ArgumentError, "The input argument (attributes) must be a hash in `PulpAnsibleClient::TaskResponse` initialize method"
119
- end
120
-
121
- # check to see if the attribute exists and convert string to symbol for hash key
122
- attributes = attributes.each_with_object({}) { |(k, v), h|
123
- if (!self.class.attribute_map.key?(k.to_sym))
124
- fail ArgumentError, "`#{k}` is not a valid attribute in `PulpAnsibleClient::TaskResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
125
- end
126
- h[k.to_sym] = v
127
- }
128
-
129
- if attributes.key?(:'pulp_href')
130
- self.pulp_href = attributes[:'pulp_href']
131
- end
132
-
133
- if attributes.key?(:'pulp_created')
134
- self.pulp_created = attributes[:'pulp_created']
135
- end
136
-
137
- if attributes.key?(:'state')
138
- self.state = attributes[:'state']
139
- end
140
-
141
- if attributes.key?(:'name')
142
- self.name = attributes[:'name']
143
- end
144
-
145
- if attributes.key?(:'logging_cid')
146
- self.logging_cid = attributes[:'logging_cid']
147
- end
148
-
149
- if attributes.key?(:'created_by')
150
- self.created_by = attributes[:'created_by']
151
- end
152
-
153
- if attributes.key?(:'started_at')
154
- self.started_at = attributes[:'started_at']
155
- end
156
-
157
- if attributes.key?(:'finished_at')
158
- self.finished_at = attributes[:'finished_at']
159
- end
160
-
161
- if attributes.key?(:'error')
162
- if (value = attributes[:'error']).is_a?(Hash)
163
- self.error = value
164
- end
165
- end
166
-
167
- if attributes.key?(:'worker')
168
- self.worker = attributes[:'worker']
169
- end
170
-
171
- if attributes.key?(:'parent_task')
172
- self.parent_task = attributes[:'parent_task']
173
- end
174
-
175
- if attributes.key?(:'child_tasks')
176
- if (value = attributes[:'child_tasks']).is_a?(Array)
177
- self.child_tasks = value
178
- end
179
- end
180
-
181
- if attributes.key?(:'task_group')
182
- self.task_group = attributes[:'task_group']
183
- end
184
-
185
- if attributes.key?(:'progress_reports')
186
- if (value = attributes[:'progress_reports']).is_a?(Array)
187
- self.progress_reports = value
188
- end
189
- end
190
-
191
- if attributes.key?(:'created_resources')
192
- if (value = attributes[:'created_resources']).is_a?(Array)
193
- self.created_resources = value
194
- end
195
- end
196
-
197
- if attributes.key?(:'reserved_resources_record')
198
- if (value = attributes[:'reserved_resources_record']).is_a?(Array)
199
- self.reserved_resources_record = value
200
- end
201
- end
202
- end
203
-
204
- # Show invalid properties with the reasons. Usually used together with valid?
205
- # @return Array for valid properties with the reasons
206
- def list_invalid_properties
207
- invalid_properties = Array.new
208
- if @name.nil?
209
- invalid_properties.push('invalid value for "name", name cannot be nil.')
210
- end
211
-
212
- if @logging_cid.nil?
213
- invalid_properties.push('invalid value for "logging_cid", logging_cid cannot be nil.')
214
- end
215
-
216
- invalid_properties
217
- end
218
-
219
- # Check to see if the all the properties in the model are valid
220
- # @return true if the model is valid
221
- def valid?
222
- return false if @name.nil?
223
- return false if @logging_cid.nil?
224
- true
225
- end
226
-
227
- # Checks equality by comparing each attribute.
228
- # @param [Object] Object to be compared
229
- def ==(o)
230
- return true if self.equal?(o)
231
- self.class == o.class &&
232
- pulp_href == o.pulp_href &&
233
- pulp_created == o.pulp_created &&
234
- state == o.state &&
235
- name == o.name &&
236
- logging_cid == o.logging_cid &&
237
- created_by == o.created_by &&
238
- started_at == o.started_at &&
239
- finished_at == o.finished_at &&
240
- error == o.error &&
241
- worker == o.worker &&
242
- parent_task == o.parent_task &&
243
- child_tasks == o.child_tasks &&
244
- task_group == o.task_group &&
245
- progress_reports == o.progress_reports &&
246
- created_resources == o.created_resources &&
247
- reserved_resources_record == o.reserved_resources_record
248
- end
249
-
250
- # @see the `==` method
251
- # @param [Object] Object to be compared
252
- def eql?(o)
253
- self == o
254
- end
255
-
256
- # Calculates hash code according to all attributes.
257
- # @return [Integer] Hash code
258
- def hash
259
- [pulp_href, pulp_created, state, name, logging_cid, created_by, started_at, finished_at, error, worker, parent_task, child_tasks, task_group, progress_reports, created_resources, reserved_resources_record].hash
260
- end
261
-
262
- # Builds the object from hash
263
- # @param [Hash] attributes Model attributes in the form of hash
264
- # @return [Object] Returns the model itself
265
- def self.build_from_hash(attributes)
266
- new.build_from_hash(attributes)
267
- end
268
-
269
- # Builds the object from hash
270
- # @param [Hash] attributes Model attributes in the form of hash
271
- # @return [Object] Returns the model itself
272
- def build_from_hash(attributes)
273
- return nil unless attributes.is_a?(Hash)
274
- self.class.openapi_types.each_pair do |key, type|
275
- if type =~ /\AArray<(.*)>/i
276
- # check to ensure the input is an array given that the attribute
277
- # is documented as an array but the input is not
278
- if attributes[self.class.attribute_map[key]].is_a?(Array)
279
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
280
- end
281
- elsif !attributes[self.class.attribute_map[key]].nil?
282
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
283
- end # or else data not found in attributes(hash), not an issue as the data can be optional
284
- end
285
-
286
- self
287
- end
288
-
289
- # Deserializes the data based on type
290
- # @param string type Data type
291
- # @param string value Value to be deserialized
292
- # @return [Object] Deserialized data
293
- def _deserialize(type, value)
294
- case type.to_sym
295
- when :DateTime
296
- DateTime.parse(value)
297
- when :Date
298
- Date.parse(value)
299
- when :String
300
- value.to_s
301
- when :Integer
302
- value.to_i
303
- when :Float
304
- value.to_f
305
- when :Boolean
306
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
307
- true
308
- else
309
- false
310
- end
311
- when :Object
312
- # generic object (usually a Hash), return directly
313
- value
314
- when /\AArray<(?<inner_type>.+)>\z/
315
- inner_type = Regexp.last_match[:inner_type]
316
- value.map { |v| _deserialize(inner_type, v) }
317
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
318
- k_type = Regexp.last_match[:k_type]
319
- v_type = Regexp.last_match[:v_type]
320
- {}.tap do |hash|
321
- value.each do |k, v|
322
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
323
- end
324
- end
325
- else # model
326
- PulpAnsibleClient.const_get(type).build_from_hash(value)
327
- end
328
- end
329
-
330
- # Returns the string representation of the object
331
- # @return [String] String presentation of the object
332
- def to_s
333
- to_hash.to_s
334
- end
335
-
336
- # to_body is an alias to to_hash (backward compatibility)
337
- # @return [Hash] Returns the object in the form of hash
338
- def to_body
339
- to_hash
340
- end
341
-
342
- # Returns the object in the form of hash
343
- # @return [Hash] Returns the object in the form of hash
344
- def to_hash
345
- hash = {}
346
- self.class.attribute_map.each_pair do |attr, param|
347
- value = self.send(attr)
348
- if value.nil?
349
- is_nullable = self.class.openapi_nullable.include?(attr)
350
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
351
- end
352
-
353
- hash[param] = _to_hash(value)
354
- end
355
- hash
356
- end
357
-
358
- # Outputs non-array value in the form of hash
359
- # For object, use to_hash. Otherwise, just return the value
360
- # @param [Object] value Any valid value
361
- # @return [Hash] Returns the value in the form of hash
362
- def _to_hash(value)
363
- if value.is_a?(Array)
364
- value.compact.map { |v| _to_hash(v) }
365
- elsif value.is_a?(Hash)
366
- {}.tap do |hash|
367
- value.each { |k, v| hash[k] = _to_hash(v) }
368
- end
369
- elsif value.respond_to? :to_hash
370
- value.to_hash
371
- else
372
- value
373
- end
374
- end
375
- end
376
- end
@@ -1,71 +0,0 @@
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.3.1
10
-
11
- =end
12
-
13
- require 'spec_helper'
14
- require 'json'
15
- require 'date'
16
-
17
- # Unit tests for PulpAnsibleClient::ProgressReportResponse
18
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
- # Please update as you see appropriate
20
- describe 'ProgressReportResponse' do
21
- before do
22
- # run before each test
23
- @instance = PulpAnsibleClient::ProgressReportResponse.new
24
- end
25
-
26
- after do
27
- # run after each test
28
- end
29
-
30
- describe 'test an instance of ProgressReportResponse' do
31
- it 'should create an instance of ProgressReportResponse' do
32
- expect(@instance).to be_instance_of(PulpAnsibleClient::ProgressReportResponse)
33
- end
34
- end
35
- describe 'test attribute "message"' do
36
- it 'should work' do
37
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
- end
39
- end
40
-
41
- describe 'test attribute "code"' do
42
- it 'should work' do
43
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
- end
45
- end
46
-
47
- describe 'test attribute "state"' do
48
- it 'should work' do
49
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
- end
51
- end
52
-
53
- describe 'test attribute "total"' do
54
- it 'should work' do
55
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
- end
57
- end
58
-
59
- describe 'test attribute "done"' do
60
- it 'should work' do
61
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
62
- end
63
- end
64
-
65
- describe 'test attribute "suffix"' do
66
- it 'should work' do
67
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
68
- end
69
- end
70
-
71
- end
@@ -1,131 +0,0 @@
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.3.1
10
-
11
- =end
12
-
13
- require 'spec_helper'
14
- require 'json'
15
- require 'date'
16
-
17
- # Unit tests for PulpAnsibleClient::TaskResponse
18
- # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
- # Please update as you see appropriate
20
- describe 'TaskResponse' do
21
- before do
22
- # run before each test
23
- @instance = PulpAnsibleClient::TaskResponse.new
24
- end
25
-
26
- after do
27
- # run after each test
28
- end
29
-
30
- describe 'test an instance of TaskResponse' do
31
- it 'should create an instance of TaskResponse' do
32
- expect(@instance).to be_instance_of(PulpAnsibleClient::TaskResponse)
33
- end
34
- end
35
- describe 'test attribute "pulp_href"' do
36
- it 'should work' do
37
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
- end
39
- end
40
-
41
- describe 'test attribute "pulp_created"' do
42
- it 'should work' do
43
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
- end
45
- end
46
-
47
- describe 'test attribute "state"' do
48
- it 'should work' do
49
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
- end
51
- end
52
-
53
- describe 'test attribute "name"' do
54
- it 'should work' do
55
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
- end
57
- end
58
-
59
- describe 'test attribute "logging_cid"' do
60
- it 'should work' do
61
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
62
- end
63
- end
64
-
65
- describe 'test attribute "created_by"' do
66
- it 'should work' do
67
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
68
- end
69
- end
70
-
71
- describe 'test attribute "started_at"' do
72
- it 'should work' do
73
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
74
- end
75
- end
76
-
77
- describe 'test attribute "finished_at"' do
78
- it 'should work' do
79
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
80
- end
81
- end
82
-
83
- describe 'test attribute "error"' do
84
- it 'should work' do
85
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
86
- end
87
- end
88
-
89
- describe 'test attribute "worker"' do
90
- it 'should work' do
91
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
92
- end
93
- end
94
-
95
- describe 'test attribute "parent_task"' do
96
- it 'should work' do
97
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
98
- end
99
- end
100
-
101
- describe 'test attribute "child_tasks"' do
102
- it 'should work' do
103
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
104
- end
105
- end
106
-
107
- describe 'test attribute "task_group"' do
108
- it 'should work' do
109
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
110
- end
111
- end
112
-
113
- describe 'test attribute "progress_reports"' do
114
- it 'should work' do
115
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
116
- end
117
- end
118
-
119
- describe 'test attribute "created_resources"' do
120
- it 'should work' do
121
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
122
- end
123
- end
124
-
125
- describe 'test attribute "reserved_resources_record"' do
126
- it 'should work' do
127
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
128
- end
129
- end
130
-
131
- end