pulp_certguard_client 0.1.0rc3.dev01581432076

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of pulp_certguard_client might be problematic. Click here for more details.

@@ -0,0 +1,23 @@
1
+ # PulpCertguardClient::InlineResponse200
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **count** | **Integer** | |
8
+ **_next** | **String** | | [optional]
9
+ **previous** | **String** | | [optional]
10
+ **results** | [**Array<CertguardX509CertGuard>**](CertguardX509CertGuard.md) | |
11
+
12
+ ## Code Sample
13
+
14
+ ```ruby
15
+ require 'PulpCertguardClient'
16
+
17
+ instance = PulpCertguardClient::InlineResponse200.new(count: null,
18
+ _next: null,
19
+ previous: null,
20
+ results: null)
21
+ ```
22
+
23
+
@@ -0,0 +1,58 @@
1
+ #!/bin/sh
2
+ # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
3
+ #
4
+ # Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com"
5
+
6
+ git_user_id=$1
7
+ git_repo_id=$2
8
+ release_note=$3
9
+ git_host=$4
10
+
11
+ if [ "$git_host" = "" ]; then
12
+ git_host="github.com"
13
+ echo "[INFO] No command line input provided. Set \$git_host to $git_host"
14
+ fi
15
+
16
+ if [ "$git_user_id" = "" ]; then
17
+ git_user_id="GIT_USER_ID"
18
+ echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
19
+ fi
20
+
21
+ if [ "$git_repo_id" = "" ]; then
22
+ git_repo_id="GIT_REPO_ID"
23
+ echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
24
+ fi
25
+
26
+ if [ "$release_note" = "" ]; then
27
+ release_note="Minor update"
28
+ echo "[INFO] No command line input provided. Set \$release_note to $release_note"
29
+ fi
30
+
31
+ # Initialize the local directory as a Git repository
32
+ git init
33
+
34
+ # Adds the files in the local repository and stages them for commit.
35
+ git add .
36
+
37
+ # Commits the tracked changes and prepares them to be pushed to a remote repository.
38
+ git commit -m "$release_note"
39
+
40
+ # Sets the new remote
41
+ git_remote=`git remote`
42
+ if [ "$git_remote" = "" ]; then # git remote not defined
43
+
44
+ if [ "$GIT_TOKEN" = "" ]; then
45
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
46
+ git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
47
+ else
48
+ git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git
49
+ fi
50
+
51
+ fi
52
+
53
+ git pull origin master
54
+
55
+ # Pushes (Forces) the changes in the local repository up to the remote repository
56
+ echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
57
+ git push origin master 2>&1 | grep -v 'To https'
58
+
@@ -0,0 +1,42 @@
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.2
10
+
11
+ =end
12
+
13
+ # Common files
14
+ require 'pulp_certguard_client/api_client'
15
+ require 'pulp_certguard_client/api_error'
16
+ require 'pulp_certguard_client/version'
17
+ require 'pulp_certguard_client/configuration'
18
+
19
+ # Models
20
+ require 'pulp_certguard_client/models/certguard_x509_cert_guard'
21
+ require 'pulp_certguard_client/models/inline_response200'
22
+
23
+ # APIs
24
+ require 'pulp_certguard_client/api/contentguards_x509_api'
25
+
26
+ module PulpCertguardClient
27
+ class << self
28
+ # Customize default settings for the SDK using block.
29
+ # PulpCertguardClient.configure do |config|
30
+ # config.username = "xxx"
31
+ # config.password = "xxx"
32
+ # end
33
+ # If no block given, return the default Configuration object.
34
+ def configure
35
+ if block_given?
36
+ yield(Configuration.default)
37
+ else
38
+ Configuration.default
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,485 @@
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.2
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 name [String] The unique name.
25
+ # @param ca_certificate [File] The Certificate Authority (CA) certificate.
26
+ # @param [Hash] opts the optional parameters
27
+ # @option opts [String] :description An optional description.
28
+ # @return [CertguardX509CertGuard]
29
+ def create(name, ca_certificate, opts = {})
30
+ data, _status_code, _headers = create_with_http_info(name, ca_certificate, opts)
31
+ data
32
+ end
33
+
34
+ # Create a x509 cert guard
35
+ # X509CertGuard API Viewsets.
36
+ # @param name [String] The unique name.
37
+ # @param ca_certificate [File] The Certificate Authority (CA) certificate.
38
+ # @param [Hash] opts the optional parameters
39
+ # @option opts [String] :description An optional description.
40
+ # @return [Array<(CertguardX509CertGuard, Integer, Hash)>] CertguardX509CertGuard data, response status code and response headers
41
+ def create_with_http_info(name, ca_certificate, opts = {})
42
+ if @api_client.config.debugging
43
+ @api_client.config.logger.debug 'Calling API: ContentguardsX509Api.create ...'
44
+ end
45
+ # verify the required parameter 'name' is set
46
+ if @api_client.config.client_side_validation && name.nil?
47
+ fail ArgumentError, "Missing the required parameter 'name' when calling ContentguardsX509Api.create"
48
+ end
49
+ if @api_client.config.client_side_validation && name.to_s.length < 1
50
+ fail ArgumentError, 'invalid value for "name" when calling ContentguardsX509Api.create, the character length must be great than or equal to 1.'
51
+ end
52
+
53
+ # verify the required parameter 'ca_certificate' is set
54
+ if @api_client.config.client_side_validation && ca_certificate.nil?
55
+ fail ArgumentError, "Missing the required parameter 'ca_certificate' when calling ContentguardsX509Api.create"
56
+ end
57
+ if @api_client.config.client_side_validation && !opts[:'description'].nil? && opts[:'description'].to_s.length < 1
58
+ fail ArgumentError, 'invalid value for "opts[:"description"]" when calling ContentguardsX509Api.create, the character length must be great than or equal to 1.'
59
+ end
60
+
61
+ # resource path
62
+ local_var_path = '/pulp/api/v3/contentguards/certguard/x509/'
63
+
64
+ # query parameters
65
+ query_params = opts[:query_params] || {}
66
+
67
+ # header parameters
68
+ header_params = opts[:header_params] || {}
69
+ # HTTP header 'Accept' (if needed)
70
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
71
+ # HTTP header 'Content-Type'
72
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data', 'application/x-www-form-urlencoded'])
73
+
74
+ # form parameters
75
+ form_params = opts[:form_params] || {}
76
+ form_params['name'] = name
77
+ form_params['ca_certificate'] = ca_certificate
78
+ form_params['description'] = opts[:'description'] if !opts[:'description'].nil?
79
+
80
+ # http body (model)
81
+ post_body = opts[:body]
82
+
83
+ # return_type
84
+ return_type = opts[:return_type] || 'CertguardX509CertGuard'
85
+
86
+ # auth_names
87
+ auth_names = opts[:auth_names] || ['Basic']
88
+
89
+ new_options = opts.merge(
90
+ :header_params => header_params,
91
+ :query_params => query_params,
92
+ :form_params => form_params,
93
+ :body => post_body,
94
+ :auth_names => auth_names,
95
+ :return_type => return_type
96
+ )
97
+
98
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
99
+ if @api_client.config.debugging
100
+ @api_client.config.logger.debug "API called: ContentguardsX509Api#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
101
+ end
102
+ return data, status_code, headers
103
+ end
104
+
105
+ # Delete a x509 cert guard
106
+ # X509CertGuard API Viewsets.
107
+ # @param x509_cert_guard_href [String] URI of X509 Cert Guard. e.g.: /pulp/api/v3/contentguards/certguard/x509/1/
108
+ # @param [Hash] opts the optional parameters
109
+ # @return [nil]
110
+ def delete(x509_cert_guard_href, opts = {})
111
+ delete_with_http_info(x509_cert_guard_href, opts)
112
+ nil
113
+ end
114
+
115
+ # Delete a x509 cert guard
116
+ # X509CertGuard API Viewsets.
117
+ # @param x509_cert_guard_href [String] URI of X509 Cert Guard. e.g.: /pulp/api/v3/contentguards/certguard/x509/1/
118
+ # @param [Hash] opts the optional parameters
119
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
120
+ def delete_with_http_info(x509_cert_guard_href, opts = {})
121
+ if @api_client.config.debugging
122
+ @api_client.config.logger.debug 'Calling API: ContentguardsX509Api.delete ...'
123
+ end
124
+ # verify the required parameter 'x509_cert_guard_href' is set
125
+ if @api_client.config.client_side_validation && x509_cert_guard_href.nil?
126
+ fail ArgumentError, "Missing the required parameter 'x509_cert_guard_href' when calling ContentguardsX509Api.delete"
127
+ end
128
+ # resource path
129
+ local_var_path = '{x509_cert_guard_href}'.sub('{' + 'x509_cert_guard_href' + '}', CGI.escape(x509_cert_guard_href.to_s).gsub('%2F', '/'))
130
+
131
+ # query parameters
132
+ query_params = opts[:query_params] || {}
133
+
134
+ # header parameters
135
+ header_params = opts[:header_params] || {}
136
+
137
+ # form parameters
138
+ form_params = opts[:form_params] || {}
139
+
140
+ # http body (model)
141
+ post_body = opts[:body]
142
+
143
+ # return_type
144
+ return_type = opts[:return_type]
145
+
146
+ # auth_names
147
+ auth_names = opts[:auth_names] || ['Basic']
148
+
149
+ new_options = opts.merge(
150
+ :header_params => header_params,
151
+ :query_params => query_params,
152
+ :form_params => form_params,
153
+ :body => post_body,
154
+ :auth_names => auth_names,
155
+ :return_type => return_type
156
+ )
157
+
158
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
159
+ if @api_client.config.debugging
160
+ @api_client.config.logger.debug "API called: ContentguardsX509Api#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
161
+ end
162
+ return data, status_code, headers
163
+ end
164
+
165
+ # List x509 cert guards
166
+ # X509CertGuard API Viewsets.
167
+ # @param [Hash] opts the optional parameters
168
+ # @option opts [String] :name
169
+ # @option opts [String] :name__in Filter results where name is in a comma-separated list of values
170
+ # @option opts [Integer] :limit Number of results to return per page.
171
+ # @option opts [Integer] :offset The initial index from which to return the results.
172
+ # @option opts [String] :fields A list of fields to include in the response.
173
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
174
+ # @return [InlineResponse200]
175
+ def list(opts = {})
176
+ data, _status_code, _headers = list_with_http_info(opts)
177
+ data
178
+ end
179
+
180
+ # List x509 cert guards
181
+ # X509CertGuard API Viewsets.
182
+ # @param [Hash] opts the optional parameters
183
+ # @option opts [String] :name
184
+ # @option opts [String] :name__in Filter results where name is in a comma-separated list of values
185
+ # @option opts [Integer] :limit Number of results to return per page.
186
+ # @option opts [Integer] :offset The initial index from which to return the results.
187
+ # @option opts [String] :fields A list of fields to include in the response.
188
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
189
+ # @return [Array<(InlineResponse200, Integer, Hash)>] InlineResponse200 data, response status code and response headers
190
+ def list_with_http_info(opts = {})
191
+ if @api_client.config.debugging
192
+ @api_client.config.logger.debug 'Calling API: ContentguardsX509Api.list ...'
193
+ end
194
+ # resource path
195
+ local_var_path = '/pulp/api/v3/contentguards/certguard/x509/'
196
+
197
+ # query parameters
198
+ query_params = opts[:query_params] || {}
199
+ query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
200
+ query_params[:'name__in'] = opts[:'name__in'] if !opts[:'name__in'].nil?
201
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
202
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
203
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
204
+ query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
205
+
206
+ # header parameters
207
+ header_params = opts[:header_params] || {}
208
+ # HTTP header 'Accept' (if needed)
209
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
210
+
211
+ # form parameters
212
+ form_params = opts[:form_params] || {}
213
+
214
+ # http body (model)
215
+ post_body = opts[:body]
216
+
217
+ # return_type
218
+ return_type = opts[:return_type] || 'InlineResponse200'
219
+
220
+ # auth_names
221
+ auth_names = opts[:auth_names] || ['Basic']
222
+
223
+ new_options = opts.merge(
224
+ :header_params => header_params,
225
+ :query_params => query_params,
226
+ :form_params => form_params,
227
+ :body => post_body,
228
+ :auth_names => auth_names,
229
+ :return_type => return_type
230
+ )
231
+
232
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
233
+ if @api_client.config.debugging
234
+ @api_client.config.logger.debug "API called: ContentguardsX509Api#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
235
+ end
236
+ return data, status_code, headers
237
+ end
238
+
239
+ # Partially update a x509 cert guard
240
+ # X509CertGuard API Viewsets.
241
+ # @param x509_cert_guard_href [String] URI of X509 Cert Guard. e.g.: /pulp/api/v3/contentguards/certguard/x509/1/
242
+ # @param name [String] The unique name.
243
+ # @param ca_certificate [File] The Certificate Authority (CA) certificate.
244
+ # @param [Hash] opts the optional parameters
245
+ # @option opts [String] :description An optional description.
246
+ # @return [CertguardX509CertGuard]
247
+ def partial_update(x509_cert_guard_href, name, ca_certificate, opts = {})
248
+ data, _status_code, _headers = partial_update_with_http_info(x509_cert_guard_href, name, ca_certificate, opts)
249
+ data
250
+ end
251
+
252
+ # Partially update a x509 cert guard
253
+ # X509CertGuard API Viewsets.
254
+ # @param x509_cert_guard_href [String] URI of X509 Cert Guard. e.g.: /pulp/api/v3/contentguards/certguard/x509/1/
255
+ # @param name [String] The unique name.
256
+ # @param ca_certificate [File] The Certificate Authority (CA) certificate.
257
+ # @param [Hash] opts the optional parameters
258
+ # @option opts [String] :description An optional description.
259
+ # @return [Array<(CertguardX509CertGuard, Integer, Hash)>] CertguardX509CertGuard data, response status code and response headers
260
+ def partial_update_with_http_info(x509_cert_guard_href, name, ca_certificate, opts = {})
261
+ if @api_client.config.debugging
262
+ @api_client.config.logger.debug 'Calling API: ContentguardsX509Api.partial_update ...'
263
+ end
264
+ # verify the required parameter 'x509_cert_guard_href' is set
265
+ if @api_client.config.client_side_validation && x509_cert_guard_href.nil?
266
+ fail ArgumentError, "Missing the required parameter 'x509_cert_guard_href' when calling ContentguardsX509Api.partial_update"
267
+ end
268
+ # verify the required parameter 'name' is set
269
+ if @api_client.config.client_side_validation && name.nil?
270
+ fail ArgumentError, "Missing the required parameter 'name' when calling ContentguardsX509Api.partial_update"
271
+ end
272
+ if @api_client.config.client_side_validation && name.to_s.length < 1
273
+ fail ArgumentError, 'invalid value for "name" when calling ContentguardsX509Api.partial_update, the character length must be great than or equal to 1.'
274
+ end
275
+
276
+ # verify the required parameter 'ca_certificate' is set
277
+ if @api_client.config.client_side_validation && ca_certificate.nil?
278
+ fail ArgumentError, "Missing the required parameter 'ca_certificate' when calling ContentguardsX509Api.partial_update"
279
+ end
280
+ if @api_client.config.client_side_validation && !opts[:'description'].nil? && opts[:'description'].to_s.length < 1
281
+ fail ArgumentError, 'invalid value for "opts[:"description"]" when calling ContentguardsX509Api.partial_update, the character length must be great than or equal to 1.'
282
+ end
283
+
284
+ # resource path
285
+ local_var_path = '{x509_cert_guard_href}'.sub('{' + 'x509_cert_guard_href' + '}', CGI.escape(x509_cert_guard_href.to_s).gsub('%2F', '/'))
286
+
287
+ # query parameters
288
+ query_params = opts[:query_params] || {}
289
+
290
+ # header parameters
291
+ header_params = opts[:header_params] || {}
292
+ # HTTP header 'Accept' (if needed)
293
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
294
+ # HTTP header 'Content-Type'
295
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data', 'application/x-www-form-urlencoded'])
296
+
297
+ # form parameters
298
+ form_params = opts[:form_params] || {}
299
+ form_params['name'] = name
300
+ form_params['ca_certificate'] = ca_certificate
301
+ form_params['description'] = opts[:'description'] if !opts[:'description'].nil?
302
+
303
+ # http body (model)
304
+ post_body = opts[:body]
305
+
306
+ # return_type
307
+ return_type = opts[:return_type] || 'CertguardX509CertGuard'
308
+
309
+ # auth_names
310
+ auth_names = opts[:auth_names] || ['Basic']
311
+
312
+ new_options = opts.merge(
313
+ :header_params => header_params,
314
+ :query_params => query_params,
315
+ :form_params => form_params,
316
+ :body => post_body,
317
+ :auth_names => auth_names,
318
+ :return_type => return_type
319
+ )
320
+
321
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
322
+ if @api_client.config.debugging
323
+ @api_client.config.logger.debug "API called: ContentguardsX509Api#partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
324
+ end
325
+ return data, status_code, headers
326
+ end
327
+
328
+ # Inspect a x509 cert guard
329
+ # X509CertGuard API Viewsets.
330
+ # @param x509_cert_guard_href [String] URI of X509 Cert Guard. e.g.: /pulp/api/v3/contentguards/certguard/x509/1/
331
+ # @param [Hash] opts the optional parameters
332
+ # @option opts [String] :fields A list of fields to include in the response.
333
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
334
+ # @return [CertguardX509CertGuard]
335
+ def read(x509_cert_guard_href, opts = {})
336
+ data, _status_code, _headers = read_with_http_info(x509_cert_guard_href, opts)
337
+ data
338
+ end
339
+
340
+ # Inspect a x509 cert guard
341
+ # X509CertGuard API Viewsets.
342
+ # @param x509_cert_guard_href [String] URI of X509 Cert Guard. e.g.: /pulp/api/v3/contentguards/certguard/x509/1/
343
+ # @param [Hash] opts the optional parameters
344
+ # @option opts [String] :fields A list of fields to include in the response.
345
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
346
+ # @return [Array<(CertguardX509CertGuard, Integer, Hash)>] CertguardX509CertGuard data, response status code and response headers
347
+ def read_with_http_info(x509_cert_guard_href, opts = {})
348
+ if @api_client.config.debugging
349
+ @api_client.config.logger.debug 'Calling API: ContentguardsX509Api.read ...'
350
+ end
351
+ # verify the required parameter 'x509_cert_guard_href' is set
352
+ if @api_client.config.client_side_validation && x509_cert_guard_href.nil?
353
+ fail ArgumentError, "Missing the required parameter 'x509_cert_guard_href' when calling ContentguardsX509Api.read"
354
+ end
355
+ # resource path
356
+ local_var_path = '{x509_cert_guard_href}'.sub('{' + 'x509_cert_guard_href' + '}', CGI.escape(x509_cert_guard_href.to_s).gsub('%2F', '/'))
357
+
358
+ # query parameters
359
+ query_params = opts[:query_params] || {}
360
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
361
+ query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
362
+
363
+ # header parameters
364
+ header_params = opts[:header_params] || {}
365
+ # HTTP header 'Accept' (if needed)
366
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
367
+
368
+ # form parameters
369
+ form_params = opts[:form_params] || {}
370
+
371
+ # http body (model)
372
+ post_body = opts[:body]
373
+
374
+ # return_type
375
+ return_type = opts[:return_type] || 'CertguardX509CertGuard'
376
+
377
+ # auth_names
378
+ auth_names = opts[:auth_names] || ['Basic']
379
+
380
+ new_options = opts.merge(
381
+ :header_params => header_params,
382
+ :query_params => query_params,
383
+ :form_params => form_params,
384
+ :body => post_body,
385
+ :auth_names => auth_names,
386
+ :return_type => return_type
387
+ )
388
+
389
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
390
+ if @api_client.config.debugging
391
+ @api_client.config.logger.debug "API called: ContentguardsX509Api#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
392
+ end
393
+ return data, status_code, headers
394
+ end
395
+
396
+ # Update a x509 cert guard
397
+ # X509CertGuard API Viewsets.
398
+ # @param x509_cert_guard_href [String] URI of X509 Cert Guard. e.g.: /pulp/api/v3/contentguards/certguard/x509/1/
399
+ # @param name [String] The unique name.
400
+ # @param ca_certificate [File] The Certificate Authority (CA) certificate.
401
+ # @param [Hash] opts the optional parameters
402
+ # @option opts [String] :description An optional description.
403
+ # @return [CertguardX509CertGuard]
404
+ def update(x509_cert_guard_href, name, ca_certificate, opts = {})
405
+ data, _status_code, _headers = update_with_http_info(x509_cert_guard_href, name, ca_certificate, opts)
406
+ data
407
+ end
408
+
409
+ # Update a x509 cert guard
410
+ # X509CertGuard API Viewsets.
411
+ # @param x509_cert_guard_href [String] URI of X509 Cert Guard. e.g.: /pulp/api/v3/contentguards/certguard/x509/1/
412
+ # @param name [String] The unique name.
413
+ # @param ca_certificate [File] The Certificate Authority (CA) certificate.
414
+ # @param [Hash] opts the optional parameters
415
+ # @option opts [String] :description An optional description.
416
+ # @return [Array<(CertguardX509CertGuard, Integer, Hash)>] CertguardX509CertGuard data, response status code and response headers
417
+ def update_with_http_info(x509_cert_guard_href, name, ca_certificate, opts = {})
418
+ if @api_client.config.debugging
419
+ @api_client.config.logger.debug 'Calling API: ContentguardsX509Api.update ...'
420
+ end
421
+ # verify the required parameter 'x509_cert_guard_href' is set
422
+ if @api_client.config.client_side_validation && x509_cert_guard_href.nil?
423
+ fail ArgumentError, "Missing the required parameter 'x509_cert_guard_href' when calling ContentguardsX509Api.update"
424
+ end
425
+ # verify the required parameter 'name' is set
426
+ if @api_client.config.client_side_validation && name.nil?
427
+ fail ArgumentError, "Missing the required parameter 'name' when calling ContentguardsX509Api.update"
428
+ end
429
+ if @api_client.config.client_side_validation && name.to_s.length < 1
430
+ fail ArgumentError, 'invalid value for "name" when calling ContentguardsX509Api.update, the character length must be great than or equal to 1.'
431
+ end
432
+
433
+ # verify the required parameter 'ca_certificate' is set
434
+ if @api_client.config.client_side_validation && ca_certificate.nil?
435
+ fail ArgumentError, "Missing the required parameter 'ca_certificate' when calling ContentguardsX509Api.update"
436
+ end
437
+ if @api_client.config.client_side_validation && !opts[:'description'].nil? && opts[:'description'].to_s.length < 1
438
+ fail ArgumentError, 'invalid value for "opts[:"description"]" when calling ContentguardsX509Api.update, the character length must be great than or equal to 1.'
439
+ end
440
+
441
+ # resource path
442
+ local_var_path = '{x509_cert_guard_href}'.sub('{' + 'x509_cert_guard_href' + '}', CGI.escape(x509_cert_guard_href.to_s).gsub('%2F', '/'))
443
+
444
+ # query parameters
445
+ query_params = opts[:query_params] || {}
446
+
447
+ # header parameters
448
+ header_params = opts[:header_params] || {}
449
+ # HTTP header 'Accept' (if needed)
450
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
451
+ # HTTP header 'Content-Type'
452
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data', 'application/x-www-form-urlencoded'])
453
+
454
+ # form parameters
455
+ form_params = opts[:form_params] || {}
456
+ form_params['name'] = name
457
+ form_params['ca_certificate'] = ca_certificate
458
+ form_params['description'] = opts[:'description'] if !opts[:'description'].nil?
459
+
460
+ # http body (model)
461
+ post_body = opts[:body]
462
+
463
+ # return_type
464
+ return_type = opts[:return_type] || 'CertguardX509CertGuard'
465
+
466
+ # auth_names
467
+ auth_names = opts[:auth_names] || ['Basic']
468
+
469
+ new_options = opts.merge(
470
+ :header_params => header_params,
471
+ :query_params => query_params,
472
+ :form_params => form_params,
473
+ :body => post_body,
474
+ :auth_names => auth_names,
475
+ :return_type => return_type
476
+ )
477
+
478
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
479
+ if @api_client.config.debugging
480
+ @api_client.config.logger.debug "API called: ContentguardsX509Api#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
481
+ end
482
+ return data, status_code, headers
483
+ end
484
+ end
485
+ end