pulp_certguard_client 0.1.0rc4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +113 -0
  4. data/Rakefile +10 -0
  5. data/docs/CertguardRHSMCertGuard.md +25 -0
  6. data/docs/CertguardX509CertGuard.md +25 -0
  7. data/docs/ContentguardsRhsmApi.md +355 -0
  8. data/docs/ContentguardsX509Api.md +355 -0
  9. data/docs/InlineResponse200.md +23 -0
  10. data/docs/InlineResponse2001.md +23 -0
  11. data/git_push.sh +58 -0
  12. data/lib/pulp_certguard_client/api/contentguards_rhsm_api.rb +431 -0
  13. data/lib/pulp_certguard_client/api/contentguards_x509_api.rb +431 -0
  14. data/lib/pulp_certguard_client/api_client.rb +402 -0
  15. data/lib/pulp_certguard_client/api_error.rb +57 -0
  16. data/lib/pulp_certguard_client/configuration.rb +243 -0
  17. data/lib/pulp_certguard_client/models/certguard_rhsm_cert_guard.rb +310 -0
  18. data/lib/pulp_certguard_client/models/certguard_x509_cert_guard.rb +310 -0
  19. data/lib/pulp_certguard_client/models/inline_response200.rb +247 -0
  20. data/lib/pulp_certguard_client/models/inline_response2001.rb +247 -0
  21. data/lib/pulp_certguard_client/version.rb +15 -0
  22. data/lib/pulp_certguard_client.rb +45 -0
  23. data/pulp_certguard_client.gemspec +39 -0
  24. data/spec/api/contentguards_rhsm_api_spec.rb +117 -0
  25. data/spec/api/contentguards_x509_api_spec.rb +117 -0
  26. data/spec/api_client_spec.rb +188 -0
  27. data/spec/configuration_spec.rb +42 -0
  28. data/spec/models/certguard_rhsm_cert_guard_spec.rb +65 -0
  29. data/spec/models/certguard_x509_cert_guard_spec.rb +65 -0
  30. data/spec/models/inline_response2001_spec.rb +59 -0
  31. data/spec/models/inline_response200_spec.rb +59 -0
  32. data/spec/spec_helper.rb +111 -0
  33. metadata +137 -0
@@ -0,0 +1,431 @@
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 'cgi'
14
+
15
+ module PulpCertguardClient
16
+ class ContentguardsX509Api
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create a x509 cert guard
23
+ # X509CertGuard API Viewsets.
24
+ # @param data [CertguardX509CertGuard]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [CertguardX509CertGuard]
27
+ def create(data, opts = {})
28
+ data, _status_code, _headers = create_with_http_info(data, opts)
29
+ data
30
+ end
31
+
32
+ # Create a x509 cert guard
33
+ # X509CertGuard API Viewsets.
34
+ # @param data [CertguardX509CertGuard]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(CertguardX509CertGuard, Integer, Hash)>] CertguardX509CertGuard data, response status code and response headers
37
+ def create_with_http_info(data, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: ContentguardsX509Api.create ...'
40
+ end
41
+ # verify the required parameter 'data' is set
42
+ if @api_client.config.client_side_validation && data.nil?
43
+ fail ArgumentError, "Missing the required parameter 'data' when calling ContentguardsX509Api.create"
44
+ end
45
+ # resource path
46
+ local_var_path = '/pulp/api/v3/contentguards/certguard/x509/'
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(['application/json'])
57
+
58
+ # form parameters
59
+ form_params = opts[:form_params] || {}
60
+
61
+ # http body (model)
62
+ post_body = opts[:body] || @api_client.object_to_http_body(data)
63
+
64
+ # return_type
65
+ return_type = opts[:return_type] || 'CertguardX509CertGuard'
66
+
67
+ # auth_names
68
+ auth_names = opts[:auth_names] || ['Basic']
69
+
70
+ new_options = opts.merge(
71
+ :header_params => header_params,
72
+ :query_params => query_params,
73
+ :form_params => form_params,
74
+ :body => post_body,
75
+ :auth_names => auth_names,
76
+ :return_type => return_type
77
+ )
78
+
79
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
80
+ if @api_client.config.debugging
81
+ @api_client.config.logger.debug "API called: ContentguardsX509Api#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
82
+ end
83
+ return data, status_code, headers
84
+ end
85
+
86
+ # Delete a x509 cert guard
87
+ # X509CertGuard API Viewsets.
88
+ # @param x509_cert_guard_href [String] URI of X509 Cert Guard. e.g.: /pulp/api/v3/contentguards/certguard/x509/1/
89
+ # @param [Hash] opts the optional parameters
90
+ # @return [nil]
91
+ def delete(x509_cert_guard_href, opts = {})
92
+ delete_with_http_info(x509_cert_guard_href, opts)
93
+ nil
94
+ end
95
+
96
+ # Delete a x509 cert guard
97
+ # X509CertGuard API Viewsets.
98
+ # @param x509_cert_guard_href [String] URI of X509 Cert Guard. e.g.: /pulp/api/v3/contentguards/certguard/x509/1/
99
+ # @param [Hash] opts the optional parameters
100
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
101
+ def delete_with_http_info(x509_cert_guard_href, opts = {})
102
+ if @api_client.config.debugging
103
+ @api_client.config.logger.debug 'Calling API: ContentguardsX509Api.delete ...'
104
+ end
105
+ # verify the required parameter 'x509_cert_guard_href' is set
106
+ if @api_client.config.client_side_validation && x509_cert_guard_href.nil?
107
+ fail ArgumentError, "Missing the required parameter 'x509_cert_guard_href' when calling ContentguardsX509Api.delete"
108
+ end
109
+ # resource path
110
+ local_var_path = '{x509_cert_guard_href}'.sub('{' + 'x509_cert_guard_href' + '}', CGI.escape(x509_cert_guard_href.to_s).gsub('%2F', '/'))
111
+
112
+ # query parameters
113
+ query_params = opts[:query_params] || {}
114
+
115
+ # header parameters
116
+ header_params = opts[:header_params] || {}
117
+
118
+ # form parameters
119
+ form_params = opts[:form_params] || {}
120
+
121
+ # http body (model)
122
+ post_body = opts[:body]
123
+
124
+ # return_type
125
+ return_type = opts[:return_type]
126
+
127
+ # auth_names
128
+ auth_names = opts[:auth_names] || ['Basic']
129
+
130
+ new_options = opts.merge(
131
+ :header_params => header_params,
132
+ :query_params => query_params,
133
+ :form_params => form_params,
134
+ :body => post_body,
135
+ :auth_names => auth_names,
136
+ :return_type => return_type
137
+ )
138
+
139
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
140
+ if @api_client.config.debugging
141
+ @api_client.config.logger.debug "API called: ContentguardsX509Api#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
142
+ end
143
+ return data, status_code, headers
144
+ end
145
+
146
+ # List x509 cert guards
147
+ # X509CertGuard API Viewsets.
148
+ # @param [Hash] opts the optional parameters
149
+ # @option opts [String] :ordering Which field to use when ordering the results.
150
+ # @option opts [String] :name
151
+ # @option opts [String] :name__in Filter results where name is in a comma-separated list of values
152
+ # @option opts [Integer] :limit Number of results to return per page.
153
+ # @option opts [Integer] :offset The initial index from which to return the results.
154
+ # @option opts [String] :fields A list of fields to include in the response.
155
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
156
+ # @return [InlineResponse2001]
157
+ def list(opts = {})
158
+ data, _status_code, _headers = list_with_http_info(opts)
159
+ data
160
+ end
161
+
162
+ # List x509 cert guards
163
+ # X509CertGuard API Viewsets.
164
+ # @param [Hash] opts the optional parameters
165
+ # @option opts [String] :ordering Which field to use when ordering the results.
166
+ # @option opts [String] :name
167
+ # @option opts [String] :name__in Filter results where name is in a comma-separated list of values
168
+ # @option opts [Integer] :limit Number of results to return per page.
169
+ # @option opts [Integer] :offset The initial index from which to return the results.
170
+ # @option opts [String] :fields A list of fields to include in the response.
171
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
172
+ # @return [Array<(InlineResponse2001, Integer, Hash)>] InlineResponse2001 data, response status code and response headers
173
+ def list_with_http_info(opts = {})
174
+ if @api_client.config.debugging
175
+ @api_client.config.logger.debug 'Calling API: ContentguardsX509Api.list ...'
176
+ end
177
+ # resource path
178
+ local_var_path = '/pulp/api/v3/contentguards/certguard/x509/'
179
+
180
+ # query parameters
181
+ query_params = opts[:query_params] || {}
182
+ query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
183
+ query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
184
+ query_params[:'name__in'] = opts[:'name__in'] if !opts[:'name__in'].nil?
185
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
186
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
187
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
188
+ query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
189
+
190
+ # header parameters
191
+ header_params = opts[:header_params] || {}
192
+ # HTTP header 'Accept' (if needed)
193
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
194
+
195
+ # form parameters
196
+ form_params = opts[:form_params] || {}
197
+
198
+ # http body (model)
199
+ post_body = opts[:body]
200
+
201
+ # return_type
202
+ return_type = opts[:return_type] || 'InlineResponse2001'
203
+
204
+ # auth_names
205
+ auth_names = opts[:auth_names] || ['Basic']
206
+
207
+ new_options = opts.merge(
208
+ :header_params => header_params,
209
+ :query_params => query_params,
210
+ :form_params => form_params,
211
+ :body => post_body,
212
+ :auth_names => auth_names,
213
+ :return_type => return_type
214
+ )
215
+
216
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
217
+ if @api_client.config.debugging
218
+ @api_client.config.logger.debug "API called: ContentguardsX509Api#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
219
+ end
220
+ return data, status_code, headers
221
+ end
222
+
223
+ # Partially update a x509 cert guard
224
+ # X509CertGuard API Viewsets.
225
+ # @param x509_cert_guard_href [String] URI of X509 Cert Guard. e.g.: /pulp/api/v3/contentguards/certguard/x509/1/
226
+ # @param data [CertguardX509CertGuard]
227
+ # @param [Hash] opts the optional parameters
228
+ # @return [CertguardX509CertGuard]
229
+ def partial_update(x509_cert_guard_href, data, opts = {})
230
+ data, _status_code, _headers = partial_update_with_http_info(x509_cert_guard_href, data, opts)
231
+ data
232
+ end
233
+
234
+ # Partially update a x509 cert guard
235
+ # X509CertGuard API Viewsets.
236
+ # @param x509_cert_guard_href [String] URI of X509 Cert Guard. e.g.: /pulp/api/v3/contentguards/certguard/x509/1/
237
+ # @param data [CertguardX509CertGuard]
238
+ # @param [Hash] opts the optional parameters
239
+ # @return [Array<(CertguardX509CertGuard, Integer, Hash)>] CertguardX509CertGuard data, response status code and response headers
240
+ def partial_update_with_http_info(x509_cert_guard_href, data, opts = {})
241
+ if @api_client.config.debugging
242
+ @api_client.config.logger.debug 'Calling API: ContentguardsX509Api.partial_update ...'
243
+ end
244
+ # verify the required parameter 'x509_cert_guard_href' is set
245
+ if @api_client.config.client_side_validation && x509_cert_guard_href.nil?
246
+ fail ArgumentError, "Missing the required parameter 'x509_cert_guard_href' when calling ContentguardsX509Api.partial_update"
247
+ end
248
+ # verify the required parameter 'data' is set
249
+ if @api_client.config.client_side_validation && data.nil?
250
+ fail ArgumentError, "Missing the required parameter 'data' when calling ContentguardsX509Api.partial_update"
251
+ end
252
+ # resource path
253
+ local_var_path = '{x509_cert_guard_href}'.sub('{' + 'x509_cert_guard_href' + '}', CGI.escape(x509_cert_guard_href.to_s).gsub('%2F', '/'))
254
+
255
+ # query parameters
256
+ query_params = opts[:query_params] || {}
257
+
258
+ # header parameters
259
+ header_params = opts[:header_params] || {}
260
+ # HTTP header 'Accept' (if needed)
261
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
262
+ # HTTP header 'Content-Type'
263
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
264
+
265
+ # form parameters
266
+ form_params = opts[:form_params] || {}
267
+
268
+ # http body (model)
269
+ post_body = opts[:body] || @api_client.object_to_http_body(data)
270
+
271
+ # return_type
272
+ return_type = opts[:return_type] || 'CertguardX509CertGuard'
273
+
274
+ # auth_names
275
+ auth_names = opts[:auth_names] || ['Basic']
276
+
277
+ new_options = opts.merge(
278
+ :header_params => header_params,
279
+ :query_params => query_params,
280
+ :form_params => form_params,
281
+ :body => post_body,
282
+ :auth_names => auth_names,
283
+ :return_type => return_type
284
+ )
285
+
286
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
287
+ if @api_client.config.debugging
288
+ @api_client.config.logger.debug "API called: ContentguardsX509Api#partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
289
+ end
290
+ return data, status_code, headers
291
+ end
292
+
293
+ # Inspect a x509 cert guard
294
+ # X509CertGuard API Viewsets.
295
+ # @param x509_cert_guard_href [String] URI of X509 Cert Guard. e.g.: /pulp/api/v3/contentguards/certguard/x509/1/
296
+ # @param [Hash] opts the optional parameters
297
+ # @option opts [String] :fields A list of fields to include in the response.
298
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
299
+ # @return [CertguardX509CertGuard]
300
+ def read(x509_cert_guard_href, opts = {})
301
+ data, _status_code, _headers = read_with_http_info(x509_cert_guard_href, opts)
302
+ data
303
+ end
304
+
305
+ # Inspect a x509 cert guard
306
+ # X509CertGuard API Viewsets.
307
+ # @param x509_cert_guard_href [String] URI of X509 Cert Guard. e.g.: /pulp/api/v3/contentguards/certguard/x509/1/
308
+ # @param [Hash] opts the optional parameters
309
+ # @option opts [String] :fields A list of fields to include in the response.
310
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
311
+ # @return [Array<(CertguardX509CertGuard, Integer, Hash)>] CertguardX509CertGuard data, response status code and response headers
312
+ def read_with_http_info(x509_cert_guard_href, opts = {})
313
+ if @api_client.config.debugging
314
+ @api_client.config.logger.debug 'Calling API: ContentguardsX509Api.read ...'
315
+ end
316
+ # verify the required parameter 'x509_cert_guard_href' is set
317
+ if @api_client.config.client_side_validation && x509_cert_guard_href.nil?
318
+ fail ArgumentError, "Missing the required parameter 'x509_cert_guard_href' when calling ContentguardsX509Api.read"
319
+ end
320
+ # resource path
321
+ local_var_path = '{x509_cert_guard_href}'.sub('{' + 'x509_cert_guard_href' + '}', CGI.escape(x509_cert_guard_href.to_s).gsub('%2F', '/'))
322
+
323
+ # query parameters
324
+ query_params = opts[:query_params] || {}
325
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
326
+ query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
327
+
328
+ # header parameters
329
+ header_params = opts[:header_params] || {}
330
+ # HTTP header 'Accept' (if needed)
331
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
332
+
333
+ # form parameters
334
+ form_params = opts[:form_params] || {}
335
+
336
+ # http body (model)
337
+ post_body = opts[:body]
338
+
339
+ # return_type
340
+ return_type = opts[:return_type] || 'CertguardX509CertGuard'
341
+
342
+ # auth_names
343
+ auth_names = opts[:auth_names] || ['Basic']
344
+
345
+ new_options = opts.merge(
346
+ :header_params => header_params,
347
+ :query_params => query_params,
348
+ :form_params => form_params,
349
+ :body => post_body,
350
+ :auth_names => auth_names,
351
+ :return_type => return_type
352
+ )
353
+
354
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
355
+ if @api_client.config.debugging
356
+ @api_client.config.logger.debug "API called: ContentguardsX509Api#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
357
+ end
358
+ return data, status_code, headers
359
+ end
360
+
361
+ # Update a x509 cert guard
362
+ # X509CertGuard API Viewsets.
363
+ # @param x509_cert_guard_href [String] URI of X509 Cert Guard. e.g.: /pulp/api/v3/contentguards/certguard/x509/1/
364
+ # @param data [CertguardX509CertGuard]
365
+ # @param [Hash] opts the optional parameters
366
+ # @return [CertguardX509CertGuard]
367
+ def update(x509_cert_guard_href, data, opts = {})
368
+ data, _status_code, _headers = update_with_http_info(x509_cert_guard_href, data, opts)
369
+ data
370
+ end
371
+
372
+ # Update a x509 cert guard
373
+ # X509CertGuard API Viewsets.
374
+ # @param x509_cert_guard_href [String] URI of X509 Cert Guard. e.g.: /pulp/api/v3/contentguards/certguard/x509/1/
375
+ # @param data [CertguardX509CertGuard]
376
+ # @param [Hash] opts the optional parameters
377
+ # @return [Array<(CertguardX509CertGuard, Integer, Hash)>] CertguardX509CertGuard data, response status code and response headers
378
+ def update_with_http_info(x509_cert_guard_href, data, opts = {})
379
+ if @api_client.config.debugging
380
+ @api_client.config.logger.debug 'Calling API: ContentguardsX509Api.update ...'
381
+ end
382
+ # verify the required parameter 'x509_cert_guard_href' is set
383
+ if @api_client.config.client_side_validation && x509_cert_guard_href.nil?
384
+ fail ArgumentError, "Missing the required parameter 'x509_cert_guard_href' when calling ContentguardsX509Api.update"
385
+ end
386
+ # verify the required parameter 'data' is set
387
+ if @api_client.config.client_side_validation && data.nil?
388
+ fail ArgumentError, "Missing the required parameter 'data' when calling ContentguardsX509Api.update"
389
+ end
390
+ # resource path
391
+ local_var_path = '{x509_cert_guard_href}'.sub('{' + 'x509_cert_guard_href' + '}', CGI.escape(x509_cert_guard_href.to_s).gsub('%2F', '/'))
392
+
393
+ # query parameters
394
+ query_params = opts[:query_params] || {}
395
+
396
+ # header parameters
397
+ header_params = opts[:header_params] || {}
398
+ # HTTP header 'Accept' (if needed)
399
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
400
+ # HTTP header 'Content-Type'
401
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
402
+
403
+ # form parameters
404
+ form_params = opts[:form_params] || {}
405
+
406
+ # http body (model)
407
+ post_body = opts[:body] || @api_client.object_to_http_body(data)
408
+
409
+ # return_type
410
+ return_type = opts[:return_type] || 'CertguardX509CertGuard'
411
+
412
+ # auth_names
413
+ auth_names = opts[:auth_names] || ['Basic']
414
+
415
+ new_options = opts.merge(
416
+ :header_params => header_params,
417
+ :query_params => query_params,
418
+ :form_params => form_params,
419
+ :body => post_body,
420
+ :auth_names => auth_names,
421
+ :return_type => return_type
422
+ )
423
+
424
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
425
+ if @api_client.config.debugging
426
+ @api_client.config.logger.debug "API called: ContentguardsX509Api#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
427
+ end
428
+ return data, status_code, headers
429
+ end
430
+ end
431
+ end