pulpcore_client 3.20.0 → 3.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +8 -84
  3. data/docs/ContentApi.md +1 -115
  4. data/docs/ContentguardsApi.md +1 -280
  5. data/docs/DistributionsApi.md +3 -281
  6. data/docs/PublicationsApi.md +0 -113
  7. data/docs/PulpImport.md +3 -1
  8. data/docs/RemotesApi.md +0 -280
  9. data/docs/RepositoriesApi.md +3 -281
  10. data/docs/UploadsApi.md +228 -0
  11. data/lib/pulpcore_client/api/content_api.rb +2 -134
  12. data/lib/pulpcore_client/api/contentguards_api.rb +2 -334
  13. data/lib/pulpcore_client/api/distributions_api.rb +5 -336
  14. data/lib/pulpcore_client/api/publications_api.rb +0 -128
  15. data/lib/pulpcore_client/api/remotes_api.rb +0 -334
  16. data/lib/pulpcore_client/api/repositories_api.rb +5 -336
  17. data/lib/pulpcore_client/api/repository_versions_api.rb +1 -1
  18. data/lib/pulpcore_client/api/uploads_api.rb +268 -0
  19. data/lib/pulpcore_client/api_client.rb +1 -1
  20. data/lib/pulpcore_client/models/pulp_import.rb +16 -4
  21. data/lib/pulpcore_client/version.rb +1 -1
  22. data/lib/pulpcore_client.rb +0 -31
  23. data/pulpcore_client.gemspec +3 -3
  24. data/spec/api/content_api_spec.rb +1 -27
  25. data/spec/api/contentguards_api_spec.rb +1 -65
  26. data/spec/api/distributions_api_spec.rb +2 -65
  27. data/spec/api/publications_api_spec.rb +0 -26
  28. data/spec/api/remotes_api_spec.rb +0 -64
  29. data/spec/api/repositories_api_spec.rb +2 -65
  30. data/spec/api/uploads_api_spec.rb +50 -0
  31. data/spec/models/pulp_import_spec.rb +6 -0
  32. metadata +136 -261
  33. data/docs/AcsApi.md +0 -417
  34. data/docs/AlternateContentSource.md +0 -23
  35. data/docs/AlternateContentSourceResponse.md +0 -27
  36. data/docs/ContentGuard.md +0 -19
  37. data/docs/Distribution.md +0 -25
  38. data/docs/Export.md +0 -17
  39. data/docs/ExportResponse.md +0 -25
  40. data/docs/Exporter.md +0 -17
  41. data/docs/ExporterResponse.md +0 -21
  42. data/docs/ExportersApi.md +0 -362
  43. data/docs/ExportersExportsApi.md +0 -241
  44. data/docs/Import.md +0 -19
  45. data/docs/Importer.md +0 -17
  46. data/docs/ImporterResponse.md +0 -21
  47. data/docs/ImportersApi.md +0 -361
  48. data/docs/ImportersImportsApi.md +0 -241
  49. data/docs/MultipleArtifactContent.md +0 -17
  50. data/docs/PaginatedAlternateContentSourceResponseList.md +0 -23
  51. data/docs/PaginatedExportResponseList.md +0 -23
  52. data/docs/PaginatedExporterResponseList.md +0 -23
  53. data/docs/PaginatedImporterResponseList.md +0 -23
  54. data/docs/PatchedAlternateContentSource.md +0 -23
  55. data/docs/PatchedContentGuard.md +0 -19
  56. data/docs/PatchedDistribution.md +0 -25
  57. data/docs/PatchedExporter.md +0 -17
  58. data/docs/PatchedImporter.md +0 -17
  59. data/docs/PatchedRemote.md +0 -57
  60. data/docs/PatchedRepository.md +0 -25
  61. data/docs/Remote.md +0 -57
  62. data/docs/RepositoriesVersionsApi.md +0 -271
  63. data/docs/Repository.md +0 -25
  64. data/git_push.sh +0 -58
  65. data/lib/pulpcore_client/api/acs_api.rb +0 -514
  66. data/lib/pulpcore_client/api/exporters_api.rb +0 -446
  67. data/lib/pulpcore_client/api/exporters_exports_api.rb +0 -294
  68. data/lib/pulpcore_client/api/importers_api.rb +0 -444
  69. data/lib/pulpcore_client/api/importers_imports_api.rb +0 -294
  70. data/lib/pulpcore_client/api/repositories_versions_api.rb +0 -343
  71. data/lib/pulpcore_client/models/alternate_content_source.rb +0 -270
  72. data/lib/pulpcore_client/models/alternate_content_source_response.rb +0 -270
  73. data/lib/pulpcore_client/models/content_guard.rb +0 -258
  74. data/lib/pulpcore_client/models/distribution.rb +0 -297
  75. data/lib/pulpcore_client/models/export.rb +0 -209
  76. data/lib/pulpcore_client/models/export_response.rb +0 -250
  77. data/lib/pulpcore_client/models/exporter.rb +0 -232
  78. data/lib/pulpcore_client/models/exporter_response.rb +0 -232
  79. data/lib/pulpcore_client/models/import.rb +0 -228
  80. data/lib/pulpcore_client/models/importer.rb +0 -232
  81. data/lib/pulpcore_client/models/importer_response.rb +0 -232
  82. data/lib/pulpcore_client/models/multiple_artifact_content.rb +0 -213
  83. data/lib/pulpcore_client/models/paginated_alternate_content_source_response_list.rb +0 -237
  84. data/lib/pulpcore_client/models/paginated_export_response_list.rb +0 -237
  85. data/lib/pulpcore_client/models/paginated_exporter_response_list.rb +0 -237
  86. data/lib/pulpcore_client/models/paginated_importer_response_list.rb +0 -237
  87. data/lib/pulpcore_client/models/patched_alternate_content_source.rb +0 -256
  88. data/lib/pulpcore_client/models/patched_content_guard.rb +0 -249
  89. data/lib/pulpcore_client/models/patched_distribution.rb +0 -279
  90. data/lib/pulpcore_client/models/patched_exporter.rb +0 -223
  91. data/lib/pulpcore_client/models/patched_importer.rb +0 -223
  92. data/lib/pulpcore_client/models/patched_remote.rb +0 -649
  93. data/lib/pulpcore_client/models/patched_repository.rb +0 -295
  94. data/lib/pulpcore_client/models/remote.rb +0 -667
  95. data/lib/pulpcore_client/models/repository.rb +0 -304
  96. data/spec/api/acs_api_spec.rb +0 -132
  97. data/spec/api/exporters_api_spec.rb +0 -120
  98. data/spec/api/exporters_exports_api_spec.rb +0 -90
  99. data/spec/api/importers_api_spec.rb +0 -120
  100. data/spec/api/importers_imports_api_spec.rb +0 -90
  101. data/spec/api/repositories_versions_api_spec.rb +0 -104
  102. data/spec/models/alternate_content_source_response_spec.rb +0 -71
  103. data/spec/models/alternate_content_source_spec.rb +0 -59
  104. data/spec/models/content_guard_spec.rb +0 -47
  105. data/spec/models/distribution_spec.rb +0 -65
  106. data/spec/models/export_response_spec.rb +0 -65
  107. data/spec/models/export_spec.rb +0 -41
  108. data/spec/models/exporter_response_spec.rb +0 -53
  109. data/spec/models/exporter_spec.rb +0 -41
  110. data/spec/models/import_spec.rb +0 -47
  111. data/spec/models/importer_response_spec.rb +0 -53
  112. data/spec/models/importer_spec.rb +0 -41
  113. data/spec/models/multiple_artifact_content_spec.rb +0 -41
  114. data/spec/models/paginated_alternate_content_source_response_list_spec.rb +0 -59
  115. data/spec/models/paginated_export_response_list_spec.rb +0 -59
  116. data/spec/models/paginated_exporter_response_list_spec.rb +0 -59
  117. data/spec/models/paginated_importer_response_list_spec.rb +0 -59
  118. data/spec/models/patched_alternate_content_source_spec.rb +0 -59
  119. data/spec/models/patched_content_guard_spec.rb +0 -47
  120. data/spec/models/patched_distribution_spec.rb +0 -65
  121. data/spec/models/patched_exporter_spec.rb +0 -41
  122. data/spec/models/patched_importer_spec.rb +0 -41
  123. data/spec/models/patched_remote_spec.rb +0 -161
  124. data/spec/models/patched_repository_spec.rb +0 -65
  125. data/spec/models/remote_spec.rb +0 -161
  126. data/spec/models/repository_spec.rb +0 -65
@@ -19,72 +19,8 @@ module PulpcoreClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
- # Create a content
23
- # Content viewset that supports POST and GET by default.
24
- # @param multiple_artifact_content [MultipleArtifactContent]
25
- # @param [Hash] opts the optional parameters
26
- # @return [MultipleArtifactContentResponse]
27
- def create(multiple_artifact_content, opts = {})
28
- data, _status_code, _headers = create_with_http_info(multiple_artifact_content, opts)
29
- data
30
- end
31
-
32
- # Create a content
33
- # Content viewset that supports POST and GET by default.
34
- # @param multiple_artifact_content [MultipleArtifactContent]
35
- # @param [Hash] opts the optional parameters
36
- # @return [Array<(MultipleArtifactContentResponse, Integer, Hash)>] MultipleArtifactContentResponse data, response status code and response headers
37
- def create_with_http_info(multiple_artifact_content, opts = {})
38
- if @api_client.config.debugging
39
- @api_client.config.logger.debug 'Calling API: ContentApi.create ...'
40
- end
41
- # verify the required parameter 'multiple_artifact_content' is set
42
- if @api_client.config.client_side_validation && multiple_artifact_content.nil?
43
- fail ArgumentError, "Missing the required parameter 'multiple_artifact_content' when calling ContentApi.create"
44
- end
45
- # resource path
46
- local_var_path = '/pulp/api/v3/content/'
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', 'application/x-www-form-urlencoded', 'multipart/form-data'])
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(multiple_artifact_content)
63
-
64
- # return_type
65
- return_type = opts[:return_type] || 'MultipleArtifactContentResponse'
66
-
67
- # auth_names
68
- auth_names = opts[:auth_names] || ['basicAuth']
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: ContentApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
82
- end
83
- return data, status_code, headers
84
- end
85
-
86
22
  # List content
87
- # Content viewset that supports POST and GET by default.
23
+ # Endpoint to list all content.
88
24
  # @param [Hash] opts the optional parameters
89
25
  # @option opts [Integer] :limit Number of results to return per page.
90
26
  # @option opts [Integer] :offset The initial index from which to return the results.
@@ -101,7 +37,7 @@ module PulpcoreClient
101
37
  end
102
38
 
103
39
  # List content
104
- # Content viewset that supports POST and GET by default.
40
+ # Endpoint to list all content.
105
41
  # @param [Hash] opts the optional parameters
106
42
  # @option opts [Integer] :limit Number of results to return per page.
107
43
  # @option opts [Integer] :offset The initial index from which to return the results.
@@ -166,73 +102,5 @@ module PulpcoreClient
166
102
  end
167
103
  return data, status_code, headers
168
104
  end
169
-
170
- # Inspect a content
171
- # Content viewset that supports POST and GET by default.
172
- # @param content_href [String]
173
- # @param [Hash] opts the optional parameters
174
- # @option opts [String] :fields A list of fields to include in the response.
175
- # @option opts [String] :exclude_fields A list of fields to exclude from the response.
176
- # @return [MultipleArtifactContentResponse]
177
- def read(content_href, opts = {})
178
- data, _status_code, _headers = read_with_http_info(content_href, opts)
179
- data
180
- end
181
-
182
- # Inspect a content
183
- # Content viewset that supports POST and GET by default.
184
- # @param content_href [String]
185
- # @param [Hash] opts the optional parameters
186
- # @option opts [String] :fields A list of fields to include in the response.
187
- # @option opts [String] :exclude_fields A list of fields to exclude from the response.
188
- # @return [Array<(MultipleArtifactContentResponse, Integer, Hash)>] MultipleArtifactContentResponse data, response status code and response headers
189
- def read_with_http_info(content_href, opts = {})
190
- if @api_client.config.debugging
191
- @api_client.config.logger.debug 'Calling API: ContentApi.read ...'
192
- end
193
- # verify the required parameter 'content_href' is set
194
- if @api_client.config.client_side_validation && content_href.nil?
195
- fail ArgumentError, "Missing the required parameter 'content_href' when calling ContentApi.read"
196
- end
197
- # resource path
198
- local_var_path = '{content_href}'.sub('{' + 'content_href' + '}', CGI.escape(content_href.to_s).gsub('%2F', '/'))
199
-
200
- # query parameters
201
- query_params = opts[:query_params] || {}
202
- query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
203
- query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
204
-
205
- # header parameters
206
- header_params = opts[:header_params] || {}
207
- # HTTP header 'Accept' (if needed)
208
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
209
-
210
- # form parameters
211
- form_params = opts[:form_params] || {}
212
-
213
- # http body (model)
214
- post_body = opts[:body]
215
-
216
- # return_type
217
- return_type = opts[:return_type] || 'MultipleArtifactContentResponse'
218
-
219
- # auth_names
220
- auth_names = opts[:auth_names] || ['basicAuth']
221
-
222
- new_options = opts.merge(
223
- :header_params => header_params,
224
- :query_params => query_params,
225
- :form_params => form_params,
226
- :body => post_body,
227
- :auth_names => auth_names,
228
- :return_type => return_type
229
- )
230
-
231
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
232
- if @api_client.config.debugging
233
- @api_client.config.logger.debug "API called: ContentApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
234
- end
235
- return data, status_code, headers
236
- end
237
105
  end
238
106
  end
@@ -19,132 +19,8 @@ module PulpcoreClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
- # Create a content guard
23
- # A viewset for contentguards.
24
- # @param content_guard [ContentGuard]
25
- # @param [Hash] opts the optional parameters
26
- # @return [ContentGuardResponse]
27
- def create(content_guard, opts = {})
28
- data, _status_code, _headers = create_with_http_info(content_guard, opts)
29
- data
30
- end
31
-
32
- # Create a content guard
33
- # A viewset for contentguards.
34
- # @param content_guard [ContentGuard]
35
- # @param [Hash] opts the optional parameters
36
- # @return [Array<(ContentGuardResponse, Integer, Hash)>] ContentGuardResponse data, response status code and response headers
37
- def create_with_http_info(content_guard, opts = {})
38
- if @api_client.config.debugging
39
- @api_client.config.logger.debug 'Calling API: ContentguardsApi.create ...'
40
- end
41
- # verify the required parameter 'content_guard' is set
42
- if @api_client.config.client_side_validation && content_guard.nil?
43
- fail ArgumentError, "Missing the required parameter 'content_guard' when calling ContentguardsApi.create"
44
- end
45
- # resource path
46
- local_var_path = '/pulp/api/v3/contentguards/'
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', 'application/x-www-form-urlencoded', 'multipart/form-data'])
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(content_guard)
63
-
64
- # return_type
65
- return_type = opts[:return_type] || 'ContentGuardResponse'
66
-
67
- # auth_names
68
- auth_names = opts[:auth_names] || ['basicAuth']
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: ContentguardsApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
82
- end
83
- return data, status_code, headers
84
- end
85
-
86
- # Delete a content guard
87
- # A viewset for contentguards.
88
- # @param content_guard_href [String]
89
- # @param [Hash] opts the optional parameters
90
- # @return [nil]
91
- def delete(content_guard_href, opts = {})
92
- delete_with_http_info(content_guard_href, opts)
93
- nil
94
- end
95
-
96
- # Delete a content guard
97
- # A viewset for contentguards.
98
- # @param content_guard_href [String]
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(content_guard_href, opts = {})
102
- if @api_client.config.debugging
103
- @api_client.config.logger.debug 'Calling API: ContentguardsApi.delete ...'
104
- end
105
- # verify the required parameter 'content_guard_href' is set
106
- if @api_client.config.client_side_validation && content_guard_href.nil?
107
- fail ArgumentError, "Missing the required parameter 'content_guard_href' when calling ContentguardsApi.delete"
108
- end
109
- # resource path
110
- local_var_path = '{content_guard_href}'.sub('{' + 'content_guard_href' + '}', CGI.escape(content_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] || ['basicAuth']
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: ContentguardsApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
142
- end
143
- return data, status_code, headers
144
- end
145
-
146
22
  # List content guards
147
- # A viewset for contentguards.
23
+ # Endpoint to list all contentguards.
148
24
  # @param [Hash] opts the optional parameters
149
25
  # @option opts [Integer] :limit Number of results to return per page.
150
26
  # @option opts [String] :name
@@ -163,7 +39,7 @@ module PulpcoreClient
163
39
  end
164
40
 
165
41
  # List content guards
166
- # A viewset for contentguards.
42
+ # Endpoint to list all contentguards.
167
43
  # @param [Hash] opts the optional parameters
168
44
  # @option opts [Integer] :limit Number of results to return per page.
169
45
  # @option opts [String] :name
@@ -232,213 +108,5 @@ module PulpcoreClient
232
108
  end
233
109
  return data, status_code, headers
234
110
  end
235
-
236
- # Update a content guard
237
- # A viewset for contentguards.
238
- # @param content_guard_href [String]
239
- # @param patched_content_guard [PatchedContentGuard]
240
- # @param [Hash] opts the optional parameters
241
- # @return [ContentGuardResponse]
242
- def partial_update(content_guard_href, patched_content_guard, opts = {})
243
- data, _status_code, _headers = partial_update_with_http_info(content_guard_href, patched_content_guard, opts)
244
- data
245
- end
246
-
247
- # Update a content guard
248
- # A viewset for contentguards.
249
- # @param content_guard_href [String]
250
- # @param patched_content_guard [PatchedContentGuard]
251
- # @param [Hash] opts the optional parameters
252
- # @return [Array<(ContentGuardResponse, Integer, Hash)>] ContentGuardResponse data, response status code and response headers
253
- def partial_update_with_http_info(content_guard_href, patched_content_guard, opts = {})
254
- if @api_client.config.debugging
255
- @api_client.config.logger.debug 'Calling API: ContentguardsApi.partial_update ...'
256
- end
257
- # verify the required parameter 'content_guard_href' is set
258
- if @api_client.config.client_side_validation && content_guard_href.nil?
259
- fail ArgumentError, "Missing the required parameter 'content_guard_href' when calling ContentguardsApi.partial_update"
260
- end
261
- # verify the required parameter 'patched_content_guard' is set
262
- if @api_client.config.client_side_validation && patched_content_guard.nil?
263
- fail ArgumentError, "Missing the required parameter 'patched_content_guard' when calling ContentguardsApi.partial_update"
264
- end
265
- # resource path
266
- local_var_path = '{content_guard_href}'.sub('{' + 'content_guard_href' + '}', CGI.escape(content_guard_href.to_s).gsub('%2F', '/'))
267
-
268
- # query parameters
269
- query_params = opts[:query_params] || {}
270
-
271
- # header parameters
272
- header_params = opts[:header_params] || {}
273
- # HTTP header 'Accept' (if needed)
274
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
275
- # HTTP header 'Content-Type'
276
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
277
-
278
- # form parameters
279
- form_params = opts[:form_params] || {}
280
-
281
- # http body (model)
282
- post_body = opts[:body] || @api_client.object_to_http_body(patched_content_guard)
283
-
284
- # return_type
285
- return_type = opts[:return_type] || 'ContentGuardResponse'
286
-
287
- # auth_names
288
- auth_names = opts[:auth_names] || ['basicAuth']
289
-
290
- new_options = opts.merge(
291
- :header_params => header_params,
292
- :query_params => query_params,
293
- :form_params => form_params,
294
- :body => post_body,
295
- :auth_names => auth_names,
296
- :return_type => return_type
297
- )
298
-
299
- data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
300
- if @api_client.config.debugging
301
- @api_client.config.logger.debug "API called: ContentguardsApi#partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
302
- end
303
- return data, status_code, headers
304
- end
305
-
306
- # Inspect a content guard
307
- # A viewset for contentguards.
308
- # @param content_guard_href [String]
309
- # @param [Hash] opts the optional parameters
310
- # @option opts [String] :fields A list of fields to include in the response.
311
- # @option opts [String] :exclude_fields A list of fields to exclude from the response.
312
- # @return [ContentGuardResponse]
313
- def read(content_guard_href, opts = {})
314
- data, _status_code, _headers = read_with_http_info(content_guard_href, opts)
315
- data
316
- end
317
-
318
- # Inspect a content guard
319
- # A viewset for contentguards.
320
- # @param content_guard_href [String]
321
- # @param [Hash] opts the optional parameters
322
- # @option opts [String] :fields A list of fields to include in the response.
323
- # @option opts [String] :exclude_fields A list of fields to exclude from the response.
324
- # @return [Array<(ContentGuardResponse, Integer, Hash)>] ContentGuardResponse data, response status code and response headers
325
- def read_with_http_info(content_guard_href, opts = {})
326
- if @api_client.config.debugging
327
- @api_client.config.logger.debug 'Calling API: ContentguardsApi.read ...'
328
- end
329
- # verify the required parameter 'content_guard_href' is set
330
- if @api_client.config.client_side_validation && content_guard_href.nil?
331
- fail ArgumentError, "Missing the required parameter 'content_guard_href' when calling ContentguardsApi.read"
332
- end
333
- # resource path
334
- local_var_path = '{content_guard_href}'.sub('{' + 'content_guard_href' + '}', CGI.escape(content_guard_href.to_s).gsub('%2F', '/'))
335
-
336
- # query parameters
337
- query_params = opts[:query_params] || {}
338
- query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
339
- query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
340
-
341
- # header parameters
342
- header_params = opts[:header_params] || {}
343
- # HTTP header 'Accept' (if needed)
344
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
345
-
346
- # form parameters
347
- form_params = opts[:form_params] || {}
348
-
349
- # http body (model)
350
- post_body = opts[:body]
351
-
352
- # return_type
353
- return_type = opts[:return_type] || 'ContentGuardResponse'
354
-
355
- # auth_names
356
- auth_names = opts[:auth_names] || ['basicAuth']
357
-
358
- new_options = opts.merge(
359
- :header_params => header_params,
360
- :query_params => query_params,
361
- :form_params => form_params,
362
- :body => post_body,
363
- :auth_names => auth_names,
364
- :return_type => return_type
365
- )
366
-
367
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
368
- if @api_client.config.debugging
369
- @api_client.config.logger.debug "API called: ContentguardsApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
370
- end
371
- return data, status_code, headers
372
- end
373
-
374
- # Update a content guard
375
- # A viewset for contentguards.
376
- # @param content_guard_href [String]
377
- # @param content_guard [ContentGuard]
378
- # @param [Hash] opts the optional parameters
379
- # @return [ContentGuardResponse]
380
- def update(content_guard_href, content_guard, opts = {})
381
- data, _status_code, _headers = update_with_http_info(content_guard_href, content_guard, opts)
382
- data
383
- end
384
-
385
- # Update a content guard
386
- # A viewset for contentguards.
387
- # @param content_guard_href [String]
388
- # @param content_guard [ContentGuard]
389
- # @param [Hash] opts the optional parameters
390
- # @return [Array<(ContentGuardResponse, Integer, Hash)>] ContentGuardResponse data, response status code and response headers
391
- def update_with_http_info(content_guard_href, content_guard, opts = {})
392
- if @api_client.config.debugging
393
- @api_client.config.logger.debug 'Calling API: ContentguardsApi.update ...'
394
- end
395
- # verify the required parameter 'content_guard_href' is set
396
- if @api_client.config.client_side_validation && content_guard_href.nil?
397
- fail ArgumentError, "Missing the required parameter 'content_guard_href' when calling ContentguardsApi.update"
398
- end
399
- # verify the required parameter 'content_guard' is set
400
- if @api_client.config.client_side_validation && content_guard.nil?
401
- fail ArgumentError, "Missing the required parameter 'content_guard' when calling ContentguardsApi.update"
402
- end
403
- # resource path
404
- local_var_path = '{content_guard_href}'.sub('{' + 'content_guard_href' + '}', CGI.escape(content_guard_href.to_s).gsub('%2F', '/'))
405
-
406
- # query parameters
407
- query_params = opts[:query_params] || {}
408
-
409
- # header parameters
410
- header_params = opts[:header_params] || {}
411
- # HTTP header 'Accept' (if needed)
412
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
413
- # HTTP header 'Content-Type'
414
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
415
-
416
- # form parameters
417
- form_params = opts[:form_params] || {}
418
-
419
- # http body (model)
420
- post_body = opts[:body] || @api_client.object_to_http_body(content_guard)
421
-
422
- # return_type
423
- return_type = opts[:return_type] || 'ContentGuardResponse'
424
-
425
- # auth_names
426
- auth_names = opts[:auth_names] || ['basicAuth']
427
-
428
- new_options = opts.merge(
429
- :header_params => header_params,
430
- :query_params => query_params,
431
- :form_params => form_params,
432
- :body => post_body,
433
- :auth_names => auth_names,
434
- :return_type => return_type
435
- )
436
-
437
- data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
438
- if @api_client.config.debugging
439
- @api_client.config.logger.debug "API called: ContentguardsApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
440
- end
441
- return data, status_code, headers
442
- end
443
111
  end
444
112
  end