pulp_gem_client 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +160 -0
  4. data/Rakefile +10 -0
  5. data/docs/AsyncOperationResponse.md +17 -0
  6. data/docs/ContentGemApi.md +210 -0
  7. data/docs/ContentSummaryResponse.md +21 -0
  8. data/docs/DistributionsGemApi.md +382 -0
  9. data/docs/GemGemContent.md +21 -0
  10. data/docs/GemGemContentResponse.md +35 -0
  11. data/docs/GemGemDistribution.md +31 -0
  12. data/docs/GemGemDistributionResponse.md +37 -0
  13. data/docs/GemGemPublication.md +19 -0
  14. data/docs/GemGemPublicationResponse.md +23 -0
  15. data/docs/GemGemRemote.md +63 -0
  16. data/docs/GemGemRemoteResponse.md +61 -0
  17. data/docs/GemGemRemoteResponseHiddenFields.md +19 -0
  18. data/docs/GemGemRepository.md +25 -0
  19. data/docs/GemGemRepositoryResponse.md +33 -0
  20. data/docs/PaginatedRepositoryVersionResponseList.md +23 -0
  21. data/docs/PaginatedgemGemContentResponseList.md +23 -0
  22. data/docs/PaginatedgemGemDistributionResponseList.md +23 -0
  23. data/docs/PaginatedgemGemPublicationResponseList.md +23 -0
  24. data/docs/PaginatedgemGemRemoteResponseList.md +23 -0
  25. data/docs/PaginatedgemGemRepositoryResponseList.md +23 -0
  26. data/docs/PatchedgemGemDistribution.md +31 -0
  27. data/docs/PatchedgemGemRemote.md +63 -0
  28. data/docs/PatchedgemGemRepository.md +25 -0
  29. data/docs/PolicyEnum.md +16 -0
  30. data/docs/PublicationsGemApi.md +263 -0
  31. data/docs/RemotesGemApi.md +380 -0
  32. data/docs/Repair.md +17 -0
  33. data/docs/RepositoriesGemApi.md +502 -0
  34. data/docs/RepositoriesGemVersionsApi.md +273 -0
  35. data/docs/RepositoryAddRemoveContent.md +21 -0
  36. data/docs/RepositorySyncURL.md +19 -0
  37. data/docs/RepositoryVersionResponse.md +27 -0
  38. data/lib/pulp_gem_client/api/content_gem_api.rb +259 -0
  39. data/lib/pulp_gem_client/api/distributions_gem_api.rb +476 -0
  40. data/lib/pulp_gem_client/api/publications_gem_api.rb +325 -0
  41. data/lib/pulp_gem_client/api/remotes_gem_api.rb +473 -0
  42. data/lib/pulp_gem_client/api/repositories_gem_api.rb +628 -0
  43. data/lib/pulp_gem_client/api/repositories_gem_versions_api.rb +346 -0
  44. data/lib/pulp_gem_client/api_client.rb +403 -0
  45. data/lib/pulp_gem_client/api_error.rb +57 -0
  46. data/lib/pulp_gem_client/configuration.rb +251 -0
  47. data/lib/pulp_gem_client/models/async_operation_response.rb +213 -0
  48. data/lib/pulp_gem_client/models/content_summary_response.rb +246 -0
  49. data/lib/pulp_gem_client/models/gem_gem_content.rb +228 -0
  50. data/lib/pulp_gem_client/models/gem_gem_content_response.rb +303 -0
  51. data/lib/pulp_gem_client/models/gem_gem_distribution.rb +333 -0
  52. data/lib/pulp_gem_client/models/gem_gem_distribution_response.rb +324 -0
  53. data/lib/pulp_gem_client/models/gem_gem_publication.rb +217 -0
  54. data/lib/pulp_gem_client/models/gem_gem_publication_response.rb +236 -0
  55. data/lib/pulp_gem_client/models/gem_gem_remote.rb +704 -0
  56. data/lib/pulp_gem_client/models/gem_gem_remote_response.rb +532 -0
  57. data/lib/pulp_gem_client/models/gem_gem_remote_response_hidden_fields.rb +215 -0
  58. data/lib/pulp_gem_client/models/gem_gem_repository.rb +306 -0
  59. data/lib/pulp_gem_client/models/gem_gem_repository_response.rb +309 -0
  60. data/lib/pulp_gem_client/models/paginated_repository_version_response_list.rb +237 -0
  61. data/lib/pulp_gem_client/models/paginatedgem_gem_content_response_list.rb +237 -0
  62. data/lib/pulp_gem_client/models/paginatedgem_gem_distribution_response_list.rb +237 -0
  63. data/lib/pulp_gem_client/models/paginatedgem_gem_publication_response_list.rb +237 -0
  64. data/lib/pulp_gem_client/models/paginatedgem_gem_remote_response_list.rb +237 -0
  65. data/lib/pulp_gem_client/models/paginatedgem_gem_repository_response_list.rb +237 -0
  66. data/lib/pulp_gem_client/models/patchedgem_gem_distribution.rb +315 -0
  67. data/lib/pulp_gem_client/models/patchedgem_gem_remote.rb +686 -0
  68. data/lib/pulp_gem_client/models/patchedgem_gem_repository.rb +297 -0
  69. data/lib/pulp_gem_client/models/policy_enum.rb +37 -0
  70. data/lib/pulp_gem_client/models/repair.rb +209 -0
  71. data/lib/pulp_gem_client/models/repository_add_remove_content.rb +232 -0
  72. data/lib/pulp_gem_client/models/repository_sync_url.rb +220 -0
  73. data/lib/pulp_gem_client/models/repository_version_response.rb +255 -0
  74. data/lib/pulp_gem_client/version.rb +15 -0
  75. data/lib/pulp_gem_client.rb +72 -0
  76. data/pulp_gem_client.gemspec +39 -0
  77. data/spec/api/content_gem_api_spec.rb +88 -0
  78. data/spec/api/distributions_gem_api_spec.rb +130 -0
  79. data/spec/api/publications_gem_api_spec.rb +101 -0
  80. data/spec/api/remotes_gem_api_spec.rb +129 -0
  81. data/spec/api/repositories_gem_api_spec.rb +160 -0
  82. data/spec/api/repositories_gem_versions_api_spec.rb +105 -0
  83. data/spec/api_client_spec.rb +188 -0
  84. data/spec/configuration_spec.rb +42 -0
  85. data/spec/models/async_operation_response_spec.rb +41 -0
  86. data/spec/models/content_summary_response_spec.rb +53 -0
  87. data/spec/models/gem_gem_content_response_spec.rb +95 -0
  88. data/spec/models/gem_gem_content_spec.rb +53 -0
  89. data/spec/models/gem_gem_distribution_response_spec.rb +101 -0
  90. data/spec/models/gem_gem_distribution_spec.rb +83 -0
  91. data/spec/models/gem_gem_publication_response_spec.rb +59 -0
  92. data/spec/models/gem_gem_publication_spec.rb +47 -0
  93. data/spec/models/gem_gem_remote_response_hidden_fields_spec.rb +47 -0
  94. data/spec/models/gem_gem_remote_response_spec.rb +173 -0
  95. data/spec/models/gem_gem_remote_spec.rb +179 -0
  96. data/spec/models/gem_gem_repository_response_spec.rb +89 -0
  97. data/spec/models/gem_gem_repository_spec.rb +65 -0
  98. data/spec/models/paginated_repository_version_response_list_spec.rb +59 -0
  99. data/spec/models/paginatedgem_gem_content_response_list_spec.rb +59 -0
  100. data/spec/models/paginatedgem_gem_distribution_response_list_spec.rb +59 -0
  101. data/spec/models/paginatedgem_gem_publication_response_list_spec.rb +59 -0
  102. data/spec/models/paginatedgem_gem_remote_response_list_spec.rb +59 -0
  103. data/spec/models/paginatedgem_gem_repository_response_list_spec.rb +59 -0
  104. data/spec/models/patchedgem_gem_distribution_spec.rb +83 -0
  105. data/spec/models/patchedgem_gem_remote_spec.rb +179 -0
  106. data/spec/models/patchedgem_gem_repository_spec.rb +65 -0
  107. data/spec/models/policy_enum_spec.rb +35 -0
  108. data/spec/models/repair_spec.rb +41 -0
  109. data/spec/models/repository_add_remove_content_spec.rb +53 -0
  110. data/spec/models/repository_sync_url_spec.rb +47 -0
  111. data/spec/models/repository_version_response_spec.rb +71 -0
  112. data/spec/spec_helper.rb +111 -0
  113. metadata +250 -0
@@ -0,0 +1,273 @@
1
+ # PulpGemClient::RepositoriesGemVersionsApi
2
+
3
+ All URIs are relative to *https://pulp*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**delete**](RepositoriesGemVersionsApi.md#delete) | **DELETE** {gem_gem_repository_version_href} | Delete a repository version
8
+ [**list**](RepositoriesGemVersionsApi.md#list) | **GET** {gem_gem_repository_href}versions/ | List repository versions
9
+ [**read**](RepositoriesGemVersionsApi.md#read) | **GET** {gem_gem_repository_version_href} | Inspect a repository version
10
+ [**repair**](RepositoriesGemVersionsApi.md#repair) | **POST** {gem_gem_repository_version_href}repair/ |
11
+
12
+
13
+
14
+ ## delete
15
+
16
+ > AsyncOperationResponse delete(gem_gem_repository_version_href)
17
+
18
+ Delete a repository version
19
+
20
+ Trigger an asynchronous task to delete a repository version.
21
+
22
+ ### Example
23
+
24
+ ```ruby
25
+ # load the gem
26
+ require 'pulp_gem_client'
27
+ # setup authorization
28
+ PulpGemClient.configure do |config|
29
+ # Configure HTTP basic authorization: basicAuth
30
+ config.username = 'YOUR USERNAME'
31
+ config.password = 'YOUR PASSWORD'
32
+ end
33
+
34
+ api_instance = PulpGemClient::RepositoriesGemVersionsApi.new
35
+ gem_gem_repository_version_href = 'gem_gem_repository_version_href_example' # String |
36
+
37
+ begin
38
+ #Delete a repository version
39
+ result = api_instance.delete(gem_gem_repository_version_href)
40
+ p result
41
+ rescue PulpGemClient::ApiError => e
42
+ puts "Exception when calling RepositoriesGemVersionsApi->delete: #{e}"
43
+ end
44
+ ```
45
+
46
+ ### Parameters
47
+
48
+
49
+ Name | Type | Description | Notes
50
+ ------------- | ------------- | ------------- | -------------
51
+ **gem_gem_repository_version_href** | **String**| |
52
+
53
+ ### Return type
54
+
55
+ [**AsyncOperationResponse**](AsyncOperationResponse.md)
56
+
57
+ ### Authorization
58
+
59
+ [basicAuth](../README.md#basicAuth)
60
+
61
+ ### HTTP request headers
62
+
63
+ - **Content-Type**: Not defined
64
+ - **Accept**: application/json
65
+
66
+
67
+ ## list
68
+
69
+ > PaginatedRepositoryVersionResponseList list(gem_gem_repository_href, opts)
70
+
71
+ List repository versions
72
+
73
+ A ViewSet for a GemRepositoryVersion represents a single Gem repository version.
74
+
75
+ ### Example
76
+
77
+ ```ruby
78
+ # load the gem
79
+ require 'pulp_gem_client'
80
+ # setup authorization
81
+ PulpGemClient.configure do |config|
82
+ # Configure HTTP basic authorization: basicAuth
83
+ config.username = 'YOUR USERNAME'
84
+ config.password = 'YOUR PASSWORD'
85
+ end
86
+
87
+ api_instance = PulpGemClient::RepositoriesGemVersionsApi.new
88
+ gem_gem_repository_href = 'gem_gem_repository_href_example' # String |
89
+ opts = {
90
+ content: 'content_example', # String | Content Unit referenced by HREF
91
+ content__in: 'content__in_example', # String | Content Unit referenced by HREF
92
+ limit: 56, # Integer | Number of results to return per page.
93
+ number: 56, # Integer | Filter results where number matches value
94
+ number__gt: 56, # Integer | Filter results where number is greater than value
95
+ number__gte: 56, # Integer | Filter results where number is greater than or equal to value
96
+ number__lt: 56, # Integer | Filter results where number is less than value
97
+ number__lte: 56, # Integer | Filter results where number is less than or equal to value
98
+ number__range: [56], # Array<Integer> | Filter results where number is between two comma separated values
99
+ offset: 56, # Integer | The initial index from which to return the results.
100
+ ordering: ['ordering_example'], # Array<String> | Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `number` - Number * `-number` - Number (descending) * `complete` - Complete * `-complete` - Complete (descending) * `info` - Info * `-info` - Info (descending) * `pk` - Pk * `-pk` - Pk (descending)
101
+ pulp_created: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Filter results where pulp_created matches value
102
+ pulp_created__gt: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Filter results where pulp_created is greater than value
103
+ pulp_created__gte: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Filter results where pulp_created is greater than or equal to value
104
+ pulp_created__lt: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Filter results where pulp_created is less than value
105
+ pulp_created__lte: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Filter results where pulp_created is less than or equal to value
106
+ pulp_created__range: [DateTime.parse('2013-10-20T19:20:30+01:00')], # Array<DateTime> | Filter results where pulp_created is between two comma separated values
107
+ pulp_href__in: ['pulp_href__in_example'], # Array<String> | Multiple values may be separated by commas.
108
+ fields: ['fields_example'], # Array<String> | A list of fields to include in the response.
109
+ exclude_fields: ['exclude_fields_example'] # Array<String> | A list of fields to exclude from the response.
110
+ }
111
+
112
+ begin
113
+ #List repository versions
114
+ result = api_instance.list(gem_gem_repository_href, opts)
115
+ p result
116
+ rescue PulpGemClient::ApiError => e
117
+ puts "Exception when calling RepositoriesGemVersionsApi->list: #{e}"
118
+ end
119
+ ```
120
+
121
+ ### Parameters
122
+
123
+
124
+ Name | Type | Description | Notes
125
+ ------------- | ------------- | ------------- | -------------
126
+ **gem_gem_repository_href** | **String**| |
127
+ **content** | **String**| Content Unit referenced by HREF | [optional]
128
+ **content__in** | **String**| Content Unit referenced by HREF | [optional]
129
+ **limit** | **Integer**| Number of results to return per page. | [optional]
130
+ **number** | **Integer**| Filter results where number matches value | [optional]
131
+ **number__gt** | **Integer**| Filter results where number is greater than value | [optional]
132
+ **number__gte** | **Integer**| Filter results where number is greater than or equal to value | [optional]
133
+ **number__lt** | **Integer**| Filter results where number is less than value | [optional]
134
+ **number__lte** | **Integer**| Filter results where number is less than or equal to value | [optional]
135
+ **number__range** | [**Array&lt;Integer&gt;**](Integer.md)| Filter results where number is between two comma separated values | [optional]
136
+ **offset** | **Integer**| The initial index from which to return the results. | [optional]
137
+ **ordering** | [**Array&lt;String&gt;**](String.md)| Ordering * &#x60;pulp_id&#x60; - Pulp id * &#x60;-pulp_id&#x60; - Pulp id (descending) * &#x60;pulp_created&#x60; - Pulp created * &#x60;-pulp_created&#x60; - Pulp created (descending) * &#x60;pulp_last_updated&#x60; - Pulp last updated * &#x60;-pulp_last_updated&#x60; - Pulp last updated (descending) * &#x60;number&#x60; - Number * &#x60;-number&#x60; - Number (descending) * &#x60;complete&#x60; - Complete * &#x60;-complete&#x60; - Complete (descending) * &#x60;info&#x60; - Info * &#x60;-info&#x60; - Info (descending) * &#x60;pk&#x60; - Pk * &#x60;-pk&#x60; - Pk (descending) | [optional]
138
+ **pulp_created** | **DateTime**| Filter results where pulp_created matches value | [optional]
139
+ **pulp_created__gt** | **DateTime**| Filter results where pulp_created is greater than value | [optional]
140
+ **pulp_created__gte** | **DateTime**| Filter results where pulp_created is greater than or equal to value | [optional]
141
+ **pulp_created__lt** | **DateTime**| Filter results where pulp_created is less than value | [optional]
142
+ **pulp_created__lte** | **DateTime**| Filter results where pulp_created is less than or equal to value | [optional]
143
+ **pulp_created__range** | [**Array&lt;DateTime&gt;**](DateTime.md)| Filter results where pulp_created is between two comma separated values | [optional]
144
+ **pulp_href__in** | [**Array&lt;String&gt;**](String.md)| Multiple values may be separated by commas. | [optional]
145
+ **fields** | [**Array&lt;String&gt;**](String.md)| A list of fields to include in the response. | [optional]
146
+ **exclude_fields** | [**Array&lt;String&gt;**](String.md)| A list of fields to exclude from the response. | [optional]
147
+
148
+ ### Return type
149
+
150
+ [**PaginatedRepositoryVersionResponseList**](PaginatedRepositoryVersionResponseList.md)
151
+
152
+ ### Authorization
153
+
154
+ [basicAuth](../README.md#basicAuth)
155
+
156
+ ### HTTP request headers
157
+
158
+ - **Content-Type**: Not defined
159
+ - **Accept**: application/json
160
+
161
+
162
+ ## read
163
+
164
+ > RepositoryVersionResponse read(gem_gem_repository_version_href, opts)
165
+
166
+ Inspect a repository version
167
+
168
+ A ViewSet for a GemRepositoryVersion represents a single Gem repository version.
169
+
170
+ ### Example
171
+
172
+ ```ruby
173
+ # load the gem
174
+ require 'pulp_gem_client'
175
+ # setup authorization
176
+ PulpGemClient.configure do |config|
177
+ # Configure HTTP basic authorization: basicAuth
178
+ config.username = 'YOUR USERNAME'
179
+ config.password = 'YOUR PASSWORD'
180
+ end
181
+
182
+ api_instance = PulpGemClient::RepositoriesGemVersionsApi.new
183
+ gem_gem_repository_version_href = 'gem_gem_repository_version_href_example' # String |
184
+ opts = {
185
+ fields: ['fields_example'], # Array<String> | A list of fields to include in the response.
186
+ exclude_fields: ['exclude_fields_example'] # Array<String> | A list of fields to exclude from the response.
187
+ }
188
+
189
+ begin
190
+ #Inspect a repository version
191
+ result = api_instance.read(gem_gem_repository_version_href, opts)
192
+ p result
193
+ rescue PulpGemClient::ApiError => e
194
+ puts "Exception when calling RepositoriesGemVersionsApi->read: #{e}"
195
+ end
196
+ ```
197
+
198
+ ### Parameters
199
+
200
+
201
+ Name | Type | Description | Notes
202
+ ------------- | ------------- | ------------- | -------------
203
+ **gem_gem_repository_version_href** | **String**| |
204
+ **fields** | [**Array&lt;String&gt;**](String.md)| A list of fields to include in the response. | [optional]
205
+ **exclude_fields** | [**Array&lt;String&gt;**](String.md)| A list of fields to exclude from the response. | [optional]
206
+
207
+ ### Return type
208
+
209
+ [**RepositoryVersionResponse**](RepositoryVersionResponse.md)
210
+
211
+ ### Authorization
212
+
213
+ [basicAuth](../README.md#basicAuth)
214
+
215
+ ### HTTP request headers
216
+
217
+ - **Content-Type**: Not defined
218
+ - **Accept**: application/json
219
+
220
+
221
+ ## repair
222
+
223
+ > AsyncOperationResponse repair(gem_gem_repository_version_href, repair)
224
+
225
+
226
+
227
+ Trigger an asynchronous task to repair a repository version.
228
+
229
+ ### Example
230
+
231
+ ```ruby
232
+ # load the gem
233
+ require 'pulp_gem_client'
234
+ # setup authorization
235
+ PulpGemClient.configure do |config|
236
+ # Configure HTTP basic authorization: basicAuth
237
+ config.username = 'YOUR USERNAME'
238
+ config.password = 'YOUR PASSWORD'
239
+ end
240
+
241
+ api_instance = PulpGemClient::RepositoriesGemVersionsApi.new
242
+ gem_gem_repository_version_href = 'gem_gem_repository_version_href_example' # String |
243
+ repair = PulpGemClient::Repair.new # Repair |
244
+
245
+ begin
246
+ result = api_instance.repair(gem_gem_repository_version_href, repair)
247
+ p result
248
+ rescue PulpGemClient::ApiError => e
249
+ puts "Exception when calling RepositoriesGemVersionsApi->repair: #{e}"
250
+ end
251
+ ```
252
+
253
+ ### Parameters
254
+
255
+
256
+ Name | Type | Description | Notes
257
+ ------------- | ------------- | ------------- | -------------
258
+ **gem_gem_repository_version_href** | **String**| |
259
+ **repair** | [**Repair**](Repair.md)| |
260
+
261
+ ### Return type
262
+
263
+ [**AsyncOperationResponse**](AsyncOperationResponse.md)
264
+
265
+ ### Authorization
266
+
267
+ [basicAuth](../README.md#basicAuth)
268
+
269
+ ### HTTP request headers
270
+
271
+ - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data
272
+ - **Accept**: application/json
273
+
@@ -0,0 +1,21 @@
1
+ # PulpGemClient::RepositoryAddRemoveContent
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **add_content_units** | **Array&lt;String&gt;** | A list of content units to add to a new repository version. This content is added after remove_content_units are removed. | [optional]
8
+ **remove_content_units** | **Array&lt;String&gt;** | A list of content units to remove from the latest repository version. You may also specify &#39;*&#39; as an entry to remove all content. This content is removed before add_content_units are added. | [optional]
9
+ **base_version** | **String** | A repository version whose content will be used as the initial set of content for the new repository version | [optional]
10
+
11
+ ## Code Sample
12
+
13
+ ```ruby
14
+ require 'PulpGemClient'
15
+
16
+ instance = PulpGemClient::RepositoryAddRemoveContent.new(add_content_units: null,
17
+ remove_content_units: null,
18
+ base_version: null)
19
+ ```
20
+
21
+
@@ -0,0 +1,19 @@
1
+ # PulpGemClient::RepositorySyncURL
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **remote** | **String** | A remote to sync from. This will override a remote set on repository. | [optional]
8
+ **mirror** | **Boolean** | If &#x60;&#x60;True&#x60;&#x60;, synchronization will remove all content that is not present in the remote repository. If &#x60;&#x60;False&#x60;&#x60;, sync will be additive only. | [optional] [default to false]
9
+
10
+ ## Code Sample
11
+
12
+ ```ruby
13
+ require 'PulpGemClient'
14
+
15
+ instance = PulpGemClient::RepositorySyncURL.new(remote: null,
16
+ mirror: null)
17
+ ```
18
+
19
+
@@ -0,0 +1,27 @@
1
+ # PulpGemClient::RepositoryVersionResponse
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **pulp_href** | **String** | | [optional] [readonly]
8
+ **pulp_created** | **DateTime** | Timestamp of creation. | [optional] [readonly]
9
+ **number** | **Integer** | | [optional] [readonly]
10
+ **repository** | **String** | | [optional] [readonly]
11
+ **base_version** | **String** | A repository version whose content was used as the initial set of content for this repository version | [optional]
12
+ **content_summary** | [**ContentSummaryResponse**](ContentSummaryResponse.md) | Various count summaries of the content in the version and the HREF to view them. | [optional] [readonly]
13
+
14
+ ## Code Sample
15
+
16
+ ```ruby
17
+ require 'PulpGemClient'
18
+
19
+ instance = PulpGemClient::RepositoryVersionResponse.new(pulp_href: null,
20
+ pulp_created: null,
21
+ number: null,
22
+ repository: null,
23
+ base_version: null,
24
+ content_summary: null)
25
+ ```
26
+
27
+
@@ -0,0 +1,259 @@
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 'cgi'
14
+
15
+ module PulpGemClient
16
+ class ContentGemApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create a gem content
23
+ # Trigger an asynchronous task to create content,optionally create new repository version.
24
+ # @param [Hash] opts the optional parameters
25
+ # @option opts [String] :artifact Artifact file representing the physical content
26
+ # @option opts [File] :file An uploaded file that should be turned into the artifact of the content unit.
27
+ # @option opts [String] :repository A URI of a repository the new content unit should be associated with.
28
+ # @return [AsyncOperationResponse]
29
+ def create(opts = {})
30
+ data, _status_code, _headers = create_with_http_info(opts)
31
+ data
32
+ end
33
+
34
+ # Create a gem content
35
+ # Trigger an asynchronous task to create content,optionally create new repository version.
36
+ # @param [Hash] opts the optional parameters
37
+ # @option opts [String] :artifact Artifact file representing the physical content
38
+ # @option opts [File] :file An uploaded file that should be turned into the artifact of the content unit.
39
+ # @option opts [String] :repository A URI of a repository the new content unit should be associated with.
40
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
41
+ def create_with_http_info(opts = {})
42
+ if @api_client.config.debugging
43
+ @api_client.config.logger.debug 'Calling API: ContentGemApi.create ...'
44
+ end
45
+ # resource path
46
+ local_var_path = '/pulp/api/v3/content/gem/gem/'
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
55
+ # HTTP header 'Content-Type'
56
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data', 'application/x-www-form-urlencoded'])
57
+
58
+ # form parameters
59
+ form_params = opts[:form_params] || {}
60
+ form_params['artifact'] = opts[:'artifact'] if !opts[:'artifact'].nil?
61
+ form_params['file'] = opts[:'file'] if !opts[:'file'].nil?
62
+ form_params['repository'] = opts[:'repository'] if !opts[:'repository'].nil?
63
+
64
+ # http body (model)
65
+ post_body = opts[:body]
66
+
67
+ # return_type
68
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
69
+
70
+ # auth_names
71
+ auth_names = opts[:auth_names] || ['basicAuth']
72
+
73
+ new_options = opts.merge(
74
+ :header_params => header_params,
75
+ :query_params => query_params,
76
+ :form_params => form_params,
77
+ :body => post_body,
78
+ :auth_names => auth_names,
79
+ :return_type => return_type
80
+ )
81
+
82
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
83
+ if @api_client.config.debugging
84
+ @api_client.config.logger.debug "API called: ContentGemApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
85
+ end
86
+ return data, status_code, headers
87
+ end
88
+
89
+ # List gem contents
90
+ # A ViewSet for GemContent.
91
+ # @param [Hash] opts the optional parameters
92
+ # @option opts [String] :checksum Filter results where checksum matches value
93
+ # @option opts [Integer] :limit Number of results to return per page.
94
+ # @option opts [String] :name Filter results where name matches value
95
+ # @option opts [Integer] :offset The initial index from which to return the results.
96
+ # @option opts [Array<String>] :ordering Ordering * &#x60;pulp_id&#x60; - Pulp id * &#x60;-pulp_id&#x60; - Pulp id (descending) * &#x60;pulp_created&#x60; - Pulp created * &#x60;-pulp_created&#x60; - Pulp created (descending) * &#x60;pulp_last_updated&#x60; - Pulp last updated * &#x60;-pulp_last_updated&#x60; - Pulp last updated (descending) * &#x60;pulp_type&#x60; - Pulp type * &#x60;-pulp_type&#x60; - Pulp type (descending) * &#x60;upstream_id&#x60; - Upstream id * &#x60;-upstream_id&#x60; - Upstream id (descending) * &#x60;timestamp_of_interest&#x60; - Timestamp of interest * &#x60;-timestamp_of_interest&#x60; - Timestamp of interest (descending) * &#x60;name&#x60; - Name * &#x60;-name&#x60; - Name (descending) * &#x60;version&#x60; - Version * &#x60;-version&#x60; - Version (descending) * &#x60;checksum&#x60; - Checksum * &#x60;-checksum&#x60; - Checksum (descending) * &#x60;prerelease&#x60; - Prerelease * &#x60;-prerelease&#x60; - Prerelease (descending) * &#x60;dependencies&#x60; - Dependencies * &#x60;-dependencies&#x60; - Dependencies (descending) * &#x60;required_ruby_version&#x60; - Required ruby version * &#x60;-required_ruby_version&#x60; - Required ruby version (descending) * &#x60;required_rubygems_version&#x60; - Required rubygems version * &#x60;-required_rubygems_version&#x60; - Required rubygems version (descending) * &#x60;pk&#x60; - Pk * &#x60;-pk&#x60; - Pk (descending)
97
+ # @option opts [Boolean] :prerelease Filter results where prerelease matches value
98
+ # @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
99
+ # @option opts [Array<String>] :pulp_id__in Multiple values may be separated by commas.
100
+ # @option opts [String] :repository_version Repository Version referenced by HREF
101
+ # @option opts [String] :repository_version_added Repository Version referenced by HREF
102
+ # @option opts [String] :repository_version_removed Repository Version referenced by HREF
103
+ # @option opts [String] :version Filter results where version matches value
104
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
105
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
106
+ # @return [PaginatedgemGemContentResponseList]
107
+ def list(opts = {})
108
+ data, _status_code, _headers = list_with_http_info(opts)
109
+ data
110
+ end
111
+
112
+ # List gem contents
113
+ # A ViewSet for GemContent.
114
+ # @param [Hash] opts the optional parameters
115
+ # @option opts [String] :checksum Filter results where checksum matches value
116
+ # @option opts [Integer] :limit Number of results to return per page.
117
+ # @option opts [String] :name Filter results where name matches value
118
+ # @option opts [Integer] :offset The initial index from which to return the results.
119
+ # @option opts [Array<String>] :ordering Ordering * &#x60;pulp_id&#x60; - Pulp id * &#x60;-pulp_id&#x60; - Pulp id (descending) * &#x60;pulp_created&#x60; - Pulp created * &#x60;-pulp_created&#x60; - Pulp created (descending) * &#x60;pulp_last_updated&#x60; - Pulp last updated * &#x60;-pulp_last_updated&#x60; - Pulp last updated (descending) * &#x60;pulp_type&#x60; - Pulp type * &#x60;-pulp_type&#x60; - Pulp type (descending) * &#x60;upstream_id&#x60; - Upstream id * &#x60;-upstream_id&#x60; - Upstream id (descending) * &#x60;timestamp_of_interest&#x60; - Timestamp of interest * &#x60;-timestamp_of_interest&#x60; - Timestamp of interest (descending) * &#x60;name&#x60; - Name * &#x60;-name&#x60; - Name (descending) * &#x60;version&#x60; - Version * &#x60;-version&#x60; - Version (descending) * &#x60;checksum&#x60; - Checksum * &#x60;-checksum&#x60; - Checksum (descending) * &#x60;prerelease&#x60; - Prerelease * &#x60;-prerelease&#x60; - Prerelease (descending) * &#x60;dependencies&#x60; - Dependencies * &#x60;-dependencies&#x60; - Dependencies (descending) * &#x60;required_ruby_version&#x60; - Required ruby version * &#x60;-required_ruby_version&#x60; - Required ruby version (descending) * &#x60;required_rubygems_version&#x60; - Required rubygems version * &#x60;-required_rubygems_version&#x60; - Required rubygems version (descending) * &#x60;pk&#x60; - Pk * &#x60;-pk&#x60; - Pk (descending)
120
+ # @option opts [Boolean] :prerelease Filter results where prerelease matches value
121
+ # @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
122
+ # @option opts [Array<String>] :pulp_id__in Multiple values may be separated by commas.
123
+ # @option opts [String] :repository_version Repository Version referenced by HREF
124
+ # @option opts [String] :repository_version_added Repository Version referenced by HREF
125
+ # @option opts [String] :repository_version_removed Repository Version referenced by HREF
126
+ # @option opts [String] :version Filter results where version matches value
127
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
128
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
129
+ # @return [Array<(PaginatedgemGemContentResponseList, Integer, Hash)>] PaginatedgemGemContentResponseList data, response status code and response headers
130
+ def list_with_http_info(opts = {})
131
+ if @api_client.config.debugging
132
+ @api_client.config.logger.debug 'Calling API: ContentGemApi.list ...'
133
+ end
134
+ allowable_values = ["-checksum", "-dependencies", "-name", "-pk", "-prerelease", "-pulp_created", "-pulp_id", "-pulp_last_updated", "-pulp_type", "-required_ruby_version", "-required_rubygems_version", "-timestamp_of_interest", "-upstream_id", "-version", "checksum", "dependencies", "name", "pk", "prerelease", "pulp_created", "pulp_id", "pulp_last_updated", "pulp_type", "required_ruby_version", "required_rubygems_version", "timestamp_of_interest", "upstream_id", "version"]
135
+ if @api_client.config.client_side_validation && opts[:'ordering'] && !opts[:'ordering'].all? { |item| allowable_values.include?(item) }
136
+ fail ArgumentError, "invalid value for \"ordering\", must include one of #{allowable_values}"
137
+ end
138
+ # resource path
139
+ local_var_path = '/pulp/api/v3/content/gem/gem/'
140
+
141
+ # query parameters
142
+ query_params = opts[:query_params] || {}
143
+ query_params[:'checksum'] = opts[:'checksum'] if !opts[:'checksum'].nil?
144
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
145
+ query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
146
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
147
+ query_params[:'ordering'] = @api_client.build_collection_param(opts[:'ordering'], :csv) if !opts[:'ordering'].nil?
148
+ query_params[:'prerelease'] = opts[:'prerelease'] if !opts[:'prerelease'].nil?
149
+ query_params[:'pulp_href__in'] = @api_client.build_collection_param(opts[:'pulp_href__in'], :csv) if !opts[:'pulp_href__in'].nil?
150
+ query_params[:'pulp_id__in'] = @api_client.build_collection_param(opts[:'pulp_id__in'], :csv) if !opts[:'pulp_id__in'].nil?
151
+ query_params[:'repository_version'] = opts[:'repository_version'] if !opts[:'repository_version'].nil?
152
+ query_params[:'repository_version_added'] = opts[:'repository_version_added'] if !opts[:'repository_version_added'].nil?
153
+ query_params[:'repository_version_removed'] = opts[:'repository_version_removed'] if !opts[:'repository_version_removed'].nil?
154
+ query_params[:'version'] = opts[:'version'] if !opts[:'version'].nil?
155
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
156
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
157
+
158
+ # header parameters
159
+ header_params = opts[:header_params] || {}
160
+ # HTTP header 'Accept' (if needed)
161
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
162
+
163
+ # form parameters
164
+ form_params = opts[:form_params] || {}
165
+
166
+ # http body (model)
167
+ post_body = opts[:body]
168
+
169
+ # return_type
170
+ return_type = opts[:return_type] || 'PaginatedgemGemContentResponseList'
171
+
172
+ # auth_names
173
+ auth_names = opts[:auth_names] || ['basicAuth']
174
+
175
+ new_options = opts.merge(
176
+ :header_params => header_params,
177
+ :query_params => query_params,
178
+ :form_params => form_params,
179
+ :body => post_body,
180
+ :auth_names => auth_names,
181
+ :return_type => return_type
182
+ )
183
+
184
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
185
+ if @api_client.config.debugging
186
+ @api_client.config.logger.debug "API called: ContentGemApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
187
+ end
188
+ return data, status_code, headers
189
+ end
190
+
191
+ # Inspect a gem content
192
+ # A ViewSet for GemContent.
193
+ # @param gem_gem_content_href [String]
194
+ # @param [Hash] opts the optional parameters
195
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
196
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
197
+ # @return [GemGemContentResponse]
198
+ def read(gem_gem_content_href, opts = {})
199
+ data, _status_code, _headers = read_with_http_info(gem_gem_content_href, opts)
200
+ data
201
+ end
202
+
203
+ # Inspect a gem content
204
+ # A ViewSet for GemContent.
205
+ # @param gem_gem_content_href [String]
206
+ # @param [Hash] opts the optional parameters
207
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
208
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
209
+ # @return [Array<(GemGemContentResponse, Integer, Hash)>] GemGemContentResponse data, response status code and response headers
210
+ def read_with_http_info(gem_gem_content_href, opts = {})
211
+ if @api_client.config.debugging
212
+ @api_client.config.logger.debug 'Calling API: ContentGemApi.read ...'
213
+ end
214
+ # verify the required parameter 'gem_gem_content_href' is set
215
+ if @api_client.config.client_side_validation && gem_gem_content_href.nil?
216
+ fail ArgumentError, "Missing the required parameter 'gem_gem_content_href' when calling ContentGemApi.read"
217
+ end
218
+ # resource path
219
+ local_var_path = '{gem_gem_content_href}'.sub('{' + 'gem_gem_content_href' + '}', CGI.escape(gem_gem_content_href.to_s).gsub('%2F', '/'))
220
+
221
+ # query parameters
222
+ query_params = opts[:query_params] || {}
223
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
224
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
225
+
226
+ # header parameters
227
+ header_params = opts[:header_params] || {}
228
+ # HTTP header 'Accept' (if needed)
229
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
230
+
231
+ # form parameters
232
+ form_params = opts[:form_params] || {}
233
+
234
+ # http body (model)
235
+ post_body = opts[:body]
236
+
237
+ # return_type
238
+ return_type = opts[:return_type] || 'GemGemContentResponse'
239
+
240
+ # auth_names
241
+ auth_names = opts[:auth_names] || ['basicAuth']
242
+
243
+ new_options = opts.merge(
244
+ :header_params => header_params,
245
+ :query_params => query_params,
246
+ :form_params => form_params,
247
+ :body => post_body,
248
+ :auth_names => auth_names,
249
+ :return_type => return_type
250
+ )
251
+
252
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
253
+ if @api_client.config.debugging
254
+ @api_client.config.logger.debug "API called: ContentGemApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
255
+ end
256
+ return data, status_code, headers
257
+ end
258
+ end
259
+ end