pulp_cookbook_client 0.1.0b9

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 (114) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +162 -0
  4. data/Rakefile +10 -0
  5. data/docs/AsyncOperationResponse.md +17 -0
  6. data/docs/ContentCookbooksApi.md +208 -0
  7. data/docs/ContentSummary.md +21 -0
  8. data/docs/ContentSummaryResponse.md +21 -0
  9. data/docs/CookbookCookbookDistribution.md +27 -0
  10. data/docs/CookbookCookbookDistributionResponse.md +33 -0
  11. data/docs/CookbookCookbookPackageContent.md +25 -0
  12. data/docs/CookbookCookbookPackageContentResponse.md +29 -0
  13. data/docs/CookbookCookbookPublication.md +19 -0
  14. data/docs/CookbookCookbookPublicationResponse.md +25 -0
  15. data/docs/CookbookCookbookRemote.md +59 -0
  16. data/docs/CookbookCookbookRemoteResponse.md +55 -0
  17. data/docs/CookbookCookbookRepository.md +25 -0
  18. data/docs/CookbookCookbookRepositoryResponse.md +33 -0
  19. data/docs/DistributionsCookbookApi.md +372 -0
  20. data/docs/PaginatedRepositoryVersionResponseList.md +23 -0
  21. data/docs/PaginatedcookbookCookbookDistributionResponseList.md +23 -0
  22. data/docs/PaginatedcookbookCookbookPackageContentResponseList.md +23 -0
  23. data/docs/PaginatedcookbookCookbookPublicationResponseList.md +23 -0
  24. data/docs/PaginatedcookbookCookbookRemoteResponseList.md +23 -0
  25. data/docs/PaginatedcookbookCookbookRepositoryResponseList.md +23 -0
  26. data/docs/PatchedcookbookCookbookDistribution.md +27 -0
  27. data/docs/PatchedcookbookCookbookRemote.md +59 -0
  28. data/docs/PatchedcookbookCookbookRepository.md +25 -0
  29. data/docs/PolicyEnum.md +16 -0
  30. data/docs/PublicationsCookbookApi.md +257 -0
  31. data/docs/RemotesCookbookApi.md +376 -0
  32. data/docs/RepositoriesCookbookApi.md +475 -0
  33. data/docs/RepositoriesCookbookVersionsApi.md +271 -0
  34. data/docs/RepositoryAddRemoveContent.md +21 -0
  35. data/docs/RepositorySyncURL.md +19 -0
  36. data/docs/RepositoryVersion.md +17 -0
  37. data/docs/RepositoryVersionResponse.md +27 -0
  38. data/git_push.sh +58 -0
  39. data/lib/pulp_cookbook_client/api/content_cookbooks_api.rb +264 -0
  40. data/lib/pulp_cookbook_client/api/distributions_cookbook_api.rb +457 -0
  41. data/lib/pulp_cookbook_client/api/publications_cookbook_api.rb +312 -0
  42. data/lib/pulp_cookbook_client/api/remotes_cookbook_api.rb +463 -0
  43. data/lib/pulp_cookbook_client/api/repositories_cookbook_api.rb +583 -0
  44. data/lib/pulp_cookbook_client/api/repositories_cookbook_versions_api.rb +339 -0
  45. data/lib/pulp_cookbook_client/api_client.rb +406 -0
  46. data/lib/pulp_cookbook_client/api_error.rb +57 -0
  47. data/lib/pulp_cookbook_client/configuration.rb +250 -0
  48. data/lib/pulp_cookbook_client/models/async_operation_response.rb +213 -0
  49. data/lib/pulp_cookbook_client/models/content_summary.rb +246 -0
  50. data/lib/pulp_cookbook_client/models/content_summary_response.rb +246 -0
  51. data/lib/pulp_cookbook_client/models/cookbook_cookbook_distribution.rb +308 -0
  52. data/lib/pulp_cookbook_client/models/cookbook_cookbook_distribution_response.rb +299 -0
  53. data/lib/pulp_cookbook_client/models/cookbook_cookbook_package_content.rb +287 -0
  54. data/lib/pulp_cookbook_client/models/cookbook_cookbook_package_content_response.rb +272 -0
  55. data/lib/pulp_cookbook_client/models/cookbook_cookbook_publication.rb +217 -0
  56. data/lib/pulp_cookbook_client/models/cookbook_cookbook_publication_response.rb +248 -0
  57. data/lib/pulp_cookbook_client/models/cookbook_cookbook_remote.rb +677 -0
  58. data/lib/pulp_cookbook_client/models/cookbook_cookbook_remote_response.rb +493 -0
  59. data/lib/pulp_cookbook_client/models/cookbook_cookbook_repository.rb +304 -0
  60. data/lib/pulp_cookbook_client/models/cookbook_cookbook_repository_response.rb +307 -0
  61. data/lib/pulp_cookbook_client/models/paginated_repository_version_response_list.rb +237 -0
  62. data/lib/pulp_cookbook_client/models/paginatedcookbook_cookbook_distribution_response_list.rb +237 -0
  63. data/lib/pulp_cookbook_client/models/paginatedcookbook_cookbook_package_content_response_list.rb +237 -0
  64. data/lib/pulp_cookbook_client/models/paginatedcookbook_cookbook_publication_response_list.rb +237 -0
  65. data/lib/pulp_cookbook_client/models/paginatedcookbook_cookbook_remote_response_list.rb +237 -0
  66. data/lib/pulp_cookbook_client/models/paginatedcookbook_cookbook_repository_response_list.rb +237 -0
  67. data/lib/pulp_cookbook_client/models/patchedcookbook_cookbook_distribution.rb +290 -0
  68. data/lib/pulp_cookbook_client/models/patchedcookbook_cookbook_remote.rb +659 -0
  69. data/lib/pulp_cookbook_client/models/patchedcookbook_cookbook_repository.rb +295 -0
  70. data/lib/pulp_cookbook_client/models/policy_enum.rb +37 -0
  71. data/lib/pulp_cookbook_client/models/repository_add_remove_content.rb +232 -0
  72. data/lib/pulp_cookbook_client/models/repository_sync_url.rb +220 -0
  73. data/lib/pulp_cookbook_client/models/repository_version.rb +208 -0
  74. data/lib/pulp_cookbook_client/models/repository_version_response.rb +255 -0
  75. data/lib/pulp_cookbook_client/version.rb +15 -0
  76. data/lib/pulp_cookbook_client.rb +72 -0
  77. data/pulp_cookbook_client.gemspec +39 -0
  78. data/spec/api/content_cookbooks_api_spec.rb +87 -0
  79. data/spec/api/distributions_cookbook_api_spec.rb +125 -0
  80. data/spec/api/publications_cookbook_api_spec.rb +98 -0
  81. data/spec/api/remotes_cookbook_api_spec.rb +127 -0
  82. data/spec/api/repositories_cookbook_api_spec.rb +146 -0
  83. data/spec/api/repositories_cookbook_versions_api_spec.rb +104 -0
  84. data/spec/api_client_spec.rb +188 -0
  85. data/spec/configuration_spec.rb +42 -0
  86. data/spec/models/async_operation_response_spec.rb +41 -0
  87. data/spec/models/content_summary_response_spec.rb +53 -0
  88. data/spec/models/content_summary_spec.rb +53 -0
  89. data/spec/models/cookbook_cookbook_distribution_response_spec.rb +89 -0
  90. data/spec/models/cookbook_cookbook_distribution_spec.rb +71 -0
  91. data/spec/models/cookbook_cookbook_package_content_response_spec.rb +77 -0
  92. data/spec/models/cookbook_cookbook_package_content_spec.rb +65 -0
  93. data/spec/models/cookbook_cookbook_publication_response_spec.rb +65 -0
  94. data/spec/models/cookbook_cookbook_publication_spec.rb +47 -0
  95. data/spec/models/cookbook_cookbook_remote_response_spec.rb +155 -0
  96. data/spec/models/cookbook_cookbook_remote_spec.rb +167 -0
  97. data/spec/models/cookbook_cookbook_repository_response_spec.rb +89 -0
  98. data/spec/models/cookbook_cookbook_repository_spec.rb +65 -0
  99. data/spec/models/paginated_repository_version_response_list_spec.rb +59 -0
  100. data/spec/models/paginatedcookbook_cookbook_distribution_response_list_spec.rb +59 -0
  101. data/spec/models/paginatedcookbook_cookbook_package_content_response_list_spec.rb +59 -0
  102. data/spec/models/paginatedcookbook_cookbook_publication_response_list_spec.rb +59 -0
  103. data/spec/models/paginatedcookbook_cookbook_remote_response_list_spec.rb +59 -0
  104. data/spec/models/paginatedcookbook_cookbook_repository_response_list_spec.rb +59 -0
  105. data/spec/models/patchedcookbook_cookbook_distribution_spec.rb +71 -0
  106. data/spec/models/patchedcookbook_cookbook_remote_spec.rb +167 -0
  107. data/spec/models/patchedcookbook_cookbook_repository_spec.rb +65 -0
  108. data/spec/models/policy_enum_spec.rb +35 -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/models/repository_version_spec.rb +41 -0
  113. data/spec/spec_helper.rb +111 -0
  114. metadata +251 -0
@@ -0,0 +1,583 @@
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 PulpCookbookClient
16
+ class RepositoriesCookbookApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create a cookbook repository
23
+ # Cookbook Repository Endpoint. CookbookRepository represents a single cookbook repository, to which content can be synced, added, or removed.
24
+ # @param cookbook_cookbook_repository [CookbookCookbookRepository]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [CookbookCookbookRepositoryResponse]
27
+ def create(cookbook_cookbook_repository, opts = {})
28
+ data, _status_code, _headers = create_with_http_info(cookbook_cookbook_repository, opts)
29
+ data
30
+ end
31
+
32
+ # Create a cookbook repository
33
+ # Cookbook Repository Endpoint. CookbookRepository represents a single cookbook repository, to which content can be synced, added, or removed.
34
+ # @param cookbook_cookbook_repository [CookbookCookbookRepository]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(CookbookCookbookRepositoryResponse, Integer, Hash)>] CookbookCookbookRepositoryResponse data, response status code and response headers
37
+ def create_with_http_info(cookbook_cookbook_repository, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: RepositoriesCookbookApi.create ...'
40
+ end
41
+ # verify the required parameter 'cookbook_cookbook_repository' is set
42
+ if @api_client.config.client_side_validation && cookbook_cookbook_repository.nil?
43
+ fail ArgumentError, "Missing the required parameter 'cookbook_cookbook_repository' when calling RepositoriesCookbookApi.create"
44
+ end
45
+ # resource path
46
+ local_var_path = '/pulp/api/v3/repositories/cookbook/cookbook/'
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(cookbook_cookbook_repository)
63
+
64
+ # return_type
65
+ return_type = opts[:return_type] || 'CookbookCookbookRepositoryResponse'
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: RepositoriesCookbookApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
82
+ end
83
+ return data, status_code, headers
84
+ end
85
+
86
+ # Delete a cookbook repository
87
+ # Trigger an asynchronous delete task
88
+ # @param cookbook_cookbook_repository_href [String]
89
+ # @param [Hash] opts the optional parameters
90
+ # @return [AsyncOperationResponse]
91
+ def delete(cookbook_cookbook_repository_href, opts = {})
92
+ data, _status_code, _headers = delete_with_http_info(cookbook_cookbook_repository_href, opts)
93
+ data
94
+ end
95
+
96
+ # Delete a cookbook repository
97
+ # Trigger an asynchronous delete task
98
+ # @param cookbook_cookbook_repository_href [String]
99
+ # @param [Hash] opts the optional parameters
100
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
101
+ def delete_with_http_info(cookbook_cookbook_repository_href, opts = {})
102
+ if @api_client.config.debugging
103
+ @api_client.config.logger.debug 'Calling API: RepositoriesCookbookApi.delete ...'
104
+ end
105
+ # verify the required parameter 'cookbook_cookbook_repository_href' is set
106
+ if @api_client.config.client_side_validation && cookbook_cookbook_repository_href.nil?
107
+ fail ArgumentError, "Missing the required parameter 'cookbook_cookbook_repository_href' when calling RepositoriesCookbookApi.delete"
108
+ end
109
+ # resource path
110
+ local_var_path = '{cookbook_cookbook_repository_href}'.sub('{' + 'cookbook_cookbook_repository_href' + '}', CGI.escape(cookbook_cookbook_repository_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
+ # HTTP header 'Accept' (if needed)
118
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
119
+
120
+ # form parameters
121
+ form_params = opts[:form_params] || {}
122
+
123
+ # http body (model)
124
+ post_body = opts[:body]
125
+
126
+ # return_type
127
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
128
+
129
+ # auth_names
130
+ auth_names = opts[:auth_names] || ['basicAuth']
131
+
132
+ new_options = opts.merge(
133
+ :header_params => header_params,
134
+ :query_params => query_params,
135
+ :form_params => form_params,
136
+ :body => post_body,
137
+ :auth_names => auth_names,
138
+ :return_type => return_type
139
+ )
140
+
141
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
142
+ if @api_client.config.debugging
143
+ @api_client.config.logger.debug "API called: RepositoriesCookbookApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
144
+ end
145
+ return data, status_code, headers
146
+ end
147
+
148
+ # List cookbook repositorys
149
+ # Cookbook Repository Endpoint. CookbookRepository represents a single cookbook repository, to which content can be synced, added, or removed.
150
+ # @param [Hash] opts the optional parameters
151
+ # @option opts [Integer] :limit Number of results to return per page.
152
+ # @option opts [String] :name
153
+ # @option opts [String] :name__contains Filter results where name contains value
154
+ # @option opts [String] :name__icontains Filter results where name contains value
155
+ # @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
156
+ # @option opts [String] :name__startswith Filter results where name starts with value
157
+ # @option opts [Integer] :offset The initial index from which to return the results.
158
+ # @option opts [String] :ordering Which field to use when ordering the results.
159
+ # @option opts [String] :pulp_label_select Filter labels by search string
160
+ # @option opts [String] :fields A list of fields to include in the response.
161
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
162
+ # @return [PaginatedcookbookCookbookRepositoryResponseList]
163
+ def list(opts = {})
164
+ data, _status_code, _headers = list_with_http_info(opts)
165
+ data
166
+ end
167
+
168
+ # List cookbook repositorys
169
+ # Cookbook Repository Endpoint. CookbookRepository represents a single cookbook repository, to which content can be synced, added, or removed.
170
+ # @param [Hash] opts the optional parameters
171
+ # @option opts [Integer] :limit Number of results to return per page.
172
+ # @option opts [String] :name
173
+ # @option opts [String] :name__contains Filter results where name contains value
174
+ # @option opts [String] :name__icontains Filter results where name contains value
175
+ # @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
176
+ # @option opts [String] :name__startswith Filter results where name starts with value
177
+ # @option opts [Integer] :offset The initial index from which to return the results.
178
+ # @option opts [String] :ordering Which field to use when ordering the results.
179
+ # @option opts [String] :pulp_label_select Filter labels by search string
180
+ # @option opts [String] :fields A list of fields to include in the response.
181
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
182
+ # @return [Array<(PaginatedcookbookCookbookRepositoryResponseList, Integer, Hash)>] PaginatedcookbookCookbookRepositoryResponseList data, response status code and response headers
183
+ def list_with_http_info(opts = {})
184
+ if @api_client.config.debugging
185
+ @api_client.config.logger.debug 'Calling API: RepositoriesCookbookApi.list ...'
186
+ end
187
+ # resource path
188
+ local_var_path = '/pulp/api/v3/repositories/cookbook/cookbook/'
189
+
190
+ # query parameters
191
+ query_params = opts[:query_params] || {}
192
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
193
+ query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
194
+ query_params[:'name__contains'] = opts[:'name__contains'] if !opts[:'name__contains'].nil?
195
+ query_params[:'name__icontains'] = opts[:'name__icontains'] if !opts[:'name__icontains'].nil?
196
+ query_params[:'name__in'] = @api_client.build_collection_param(opts[:'name__in'], :csv) if !opts[:'name__in'].nil?
197
+ query_params[:'name__startswith'] = opts[:'name__startswith'] if !opts[:'name__startswith'].nil?
198
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
199
+ query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
200
+ query_params[:'pulp_label_select'] = opts[:'pulp_label_select'] if !opts[:'pulp_label_select'].nil?
201
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
202
+ query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
203
+
204
+ # header parameters
205
+ header_params = opts[:header_params] || {}
206
+ # HTTP header 'Accept' (if needed)
207
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
208
+
209
+ # form parameters
210
+ form_params = opts[:form_params] || {}
211
+
212
+ # http body (model)
213
+ post_body = opts[:body]
214
+
215
+ # return_type
216
+ return_type = opts[:return_type] || 'PaginatedcookbookCookbookRepositoryResponseList'
217
+
218
+ # auth_names
219
+ auth_names = opts[:auth_names] || ['basicAuth']
220
+
221
+ new_options = opts.merge(
222
+ :header_params => header_params,
223
+ :query_params => query_params,
224
+ :form_params => form_params,
225
+ :body => post_body,
226
+ :auth_names => auth_names,
227
+ :return_type => return_type
228
+ )
229
+
230
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
231
+ if @api_client.config.debugging
232
+ @api_client.config.logger.debug "API called: RepositoriesCookbookApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
233
+ end
234
+ return data, status_code, headers
235
+ end
236
+
237
+ # Modify Repository Content
238
+ # Trigger an asynchronous task to create a new repository version.
239
+ # @param cookbook_cookbook_repository_href [String]
240
+ # @param repository_add_remove_content [RepositoryAddRemoveContent]
241
+ # @param [Hash] opts the optional parameters
242
+ # @return [AsyncOperationResponse]
243
+ def modify(cookbook_cookbook_repository_href, repository_add_remove_content, opts = {})
244
+ data, _status_code, _headers = modify_with_http_info(cookbook_cookbook_repository_href, repository_add_remove_content, opts)
245
+ data
246
+ end
247
+
248
+ # Modify Repository Content
249
+ # Trigger an asynchronous task to create a new repository version.
250
+ # @param cookbook_cookbook_repository_href [String]
251
+ # @param repository_add_remove_content [RepositoryAddRemoveContent]
252
+ # @param [Hash] opts the optional parameters
253
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
254
+ def modify_with_http_info(cookbook_cookbook_repository_href, repository_add_remove_content, opts = {})
255
+ if @api_client.config.debugging
256
+ @api_client.config.logger.debug 'Calling API: RepositoriesCookbookApi.modify ...'
257
+ end
258
+ # verify the required parameter 'cookbook_cookbook_repository_href' is set
259
+ if @api_client.config.client_side_validation && cookbook_cookbook_repository_href.nil?
260
+ fail ArgumentError, "Missing the required parameter 'cookbook_cookbook_repository_href' when calling RepositoriesCookbookApi.modify"
261
+ end
262
+ # verify the required parameter 'repository_add_remove_content' is set
263
+ if @api_client.config.client_side_validation && repository_add_remove_content.nil?
264
+ fail ArgumentError, "Missing the required parameter 'repository_add_remove_content' when calling RepositoriesCookbookApi.modify"
265
+ end
266
+ # resource path
267
+ local_var_path = '{cookbook_cookbook_repository_href}modify/'.sub('{' + 'cookbook_cookbook_repository_href' + '}', CGI.escape(cookbook_cookbook_repository_href.to_s).gsub('%2F', '/'))
268
+
269
+ # query parameters
270
+ query_params = opts[:query_params] || {}
271
+
272
+ # header parameters
273
+ header_params = opts[:header_params] || {}
274
+ # HTTP header 'Accept' (if needed)
275
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
276
+ # HTTP header 'Content-Type'
277
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
278
+
279
+ # form parameters
280
+ form_params = opts[:form_params] || {}
281
+
282
+ # http body (model)
283
+ post_body = opts[:body] || @api_client.object_to_http_body(repository_add_remove_content)
284
+
285
+ # return_type
286
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
287
+
288
+ # auth_names
289
+ auth_names = opts[:auth_names] || ['basicAuth']
290
+
291
+ new_options = opts.merge(
292
+ :header_params => header_params,
293
+ :query_params => query_params,
294
+ :form_params => form_params,
295
+ :body => post_body,
296
+ :auth_names => auth_names,
297
+ :return_type => return_type
298
+ )
299
+
300
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
301
+ if @api_client.config.debugging
302
+ @api_client.config.logger.debug "API called: RepositoriesCookbookApi#modify\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
303
+ end
304
+ return data, status_code, headers
305
+ end
306
+
307
+ # Update a cookbook repository
308
+ # Trigger an asynchronous partial update task
309
+ # @param cookbook_cookbook_repository_href [String]
310
+ # @param patchedcookbook_cookbook_repository [PatchedcookbookCookbookRepository]
311
+ # @param [Hash] opts the optional parameters
312
+ # @return [AsyncOperationResponse]
313
+ def partial_update(cookbook_cookbook_repository_href, patchedcookbook_cookbook_repository, opts = {})
314
+ data, _status_code, _headers = partial_update_with_http_info(cookbook_cookbook_repository_href, patchedcookbook_cookbook_repository, opts)
315
+ data
316
+ end
317
+
318
+ # Update a cookbook repository
319
+ # Trigger an asynchronous partial update task
320
+ # @param cookbook_cookbook_repository_href [String]
321
+ # @param patchedcookbook_cookbook_repository [PatchedcookbookCookbookRepository]
322
+ # @param [Hash] opts the optional parameters
323
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
324
+ def partial_update_with_http_info(cookbook_cookbook_repository_href, patchedcookbook_cookbook_repository, opts = {})
325
+ if @api_client.config.debugging
326
+ @api_client.config.logger.debug 'Calling API: RepositoriesCookbookApi.partial_update ...'
327
+ end
328
+ # verify the required parameter 'cookbook_cookbook_repository_href' is set
329
+ if @api_client.config.client_side_validation && cookbook_cookbook_repository_href.nil?
330
+ fail ArgumentError, "Missing the required parameter 'cookbook_cookbook_repository_href' when calling RepositoriesCookbookApi.partial_update"
331
+ end
332
+ # verify the required parameter 'patchedcookbook_cookbook_repository' is set
333
+ if @api_client.config.client_side_validation && patchedcookbook_cookbook_repository.nil?
334
+ fail ArgumentError, "Missing the required parameter 'patchedcookbook_cookbook_repository' when calling RepositoriesCookbookApi.partial_update"
335
+ end
336
+ # resource path
337
+ local_var_path = '{cookbook_cookbook_repository_href}'.sub('{' + 'cookbook_cookbook_repository_href' + '}', CGI.escape(cookbook_cookbook_repository_href.to_s).gsub('%2F', '/'))
338
+
339
+ # query parameters
340
+ query_params = opts[:query_params] || {}
341
+
342
+ # header parameters
343
+ header_params = opts[:header_params] || {}
344
+ # HTTP header 'Accept' (if needed)
345
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
346
+ # HTTP header 'Content-Type'
347
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
348
+
349
+ # form parameters
350
+ form_params = opts[:form_params] || {}
351
+
352
+ # http body (model)
353
+ post_body = opts[:body] || @api_client.object_to_http_body(patchedcookbook_cookbook_repository)
354
+
355
+ # return_type
356
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
357
+
358
+ # auth_names
359
+ auth_names = opts[:auth_names] || ['basicAuth']
360
+
361
+ new_options = opts.merge(
362
+ :header_params => header_params,
363
+ :query_params => query_params,
364
+ :form_params => form_params,
365
+ :body => post_body,
366
+ :auth_names => auth_names,
367
+ :return_type => return_type
368
+ )
369
+
370
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
371
+ if @api_client.config.debugging
372
+ @api_client.config.logger.debug "API called: RepositoriesCookbookApi#partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
373
+ end
374
+ return data, status_code, headers
375
+ end
376
+
377
+ # Inspect a cookbook repository
378
+ # Cookbook Repository Endpoint. CookbookRepository represents a single cookbook repository, to which content can be synced, added, or removed.
379
+ # @param cookbook_cookbook_repository_href [String]
380
+ # @param [Hash] opts the optional parameters
381
+ # @option opts [String] :fields A list of fields to include in the response.
382
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
383
+ # @return [CookbookCookbookRepositoryResponse]
384
+ def read(cookbook_cookbook_repository_href, opts = {})
385
+ data, _status_code, _headers = read_with_http_info(cookbook_cookbook_repository_href, opts)
386
+ data
387
+ end
388
+
389
+ # Inspect a cookbook repository
390
+ # Cookbook Repository Endpoint. CookbookRepository represents a single cookbook repository, to which content can be synced, added, or removed.
391
+ # @param cookbook_cookbook_repository_href [String]
392
+ # @param [Hash] opts the optional parameters
393
+ # @option opts [String] :fields A list of fields to include in the response.
394
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
395
+ # @return [Array<(CookbookCookbookRepositoryResponse, Integer, Hash)>] CookbookCookbookRepositoryResponse data, response status code and response headers
396
+ def read_with_http_info(cookbook_cookbook_repository_href, opts = {})
397
+ if @api_client.config.debugging
398
+ @api_client.config.logger.debug 'Calling API: RepositoriesCookbookApi.read ...'
399
+ end
400
+ # verify the required parameter 'cookbook_cookbook_repository_href' is set
401
+ if @api_client.config.client_side_validation && cookbook_cookbook_repository_href.nil?
402
+ fail ArgumentError, "Missing the required parameter 'cookbook_cookbook_repository_href' when calling RepositoriesCookbookApi.read"
403
+ end
404
+ # resource path
405
+ local_var_path = '{cookbook_cookbook_repository_href}'.sub('{' + 'cookbook_cookbook_repository_href' + '}', CGI.escape(cookbook_cookbook_repository_href.to_s).gsub('%2F', '/'))
406
+
407
+ # query parameters
408
+ query_params = opts[:query_params] || {}
409
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
410
+ query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
411
+
412
+ # header parameters
413
+ header_params = opts[:header_params] || {}
414
+ # HTTP header 'Accept' (if needed)
415
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
416
+
417
+ # form parameters
418
+ form_params = opts[:form_params] || {}
419
+
420
+ # http body (model)
421
+ post_body = opts[:body]
422
+
423
+ # return_type
424
+ return_type = opts[:return_type] || 'CookbookCookbookRepositoryResponse'
425
+
426
+ # auth_names
427
+ auth_names = opts[:auth_names] || ['basicAuth']
428
+
429
+ new_options = opts.merge(
430
+ :header_params => header_params,
431
+ :query_params => query_params,
432
+ :form_params => form_params,
433
+ :body => post_body,
434
+ :auth_names => auth_names,
435
+ :return_type => return_type
436
+ )
437
+
438
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
439
+ if @api_client.config.debugging
440
+ @api_client.config.logger.debug "API called: RepositoriesCookbookApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
441
+ end
442
+ return data, status_code, headers
443
+ end
444
+
445
+ # Trigger an asynchronous task to sync cookbook content.
446
+ # @param cookbook_cookbook_repository_href [String]
447
+ # @param repository_sync_url [RepositorySyncURL]
448
+ # @param [Hash] opts the optional parameters
449
+ # @return [AsyncOperationResponse]
450
+ def sync(cookbook_cookbook_repository_href, repository_sync_url, opts = {})
451
+ data, _status_code, _headers = sync_with_http_info(cookbook_cookbook_repository_href, repository_sync_url, opts)
452
+ data
453
+ end
454
+
455
+ # Trigger an asynchronous task to sync cookbook content.
456
+ # @param cookbook_cookbook_repository_href [String]
457
+ # @param repository_sync_url [RepositorySyncURL]
458
+ # @param [Hash] opts the optional parameters
459
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
460
+ def sync_with_http_info(cookbook_cookbook_repository_href, repository_sync_url, opts = {})
461
+ if @api_client.config.debugging
462
+ @api_client.config.logger.debug 'Calling API: RepositoriesCookbookApi.sync ...'
463
+ end
464
+ # verify the required parameter 'cookbook_cookbook_repository_href' is set
465
+ if @api_client.config.client_side_validation && cookbook_cookbook_repository_href.nil?
466
+ fail ArgumentError, "Missing the required parameter 'cookbook_cookbook_repository_href' when calling RepositoriesCookbookApi.sync"
467
+ end
468
+ # verify the required parameter 'repository_sync_url' is set
469
+ if @api_client.config.client_side_validation && repository_sync_url.nil?
470
+ fail ArgumentError, "Missing the required parameter 'repository_sync_url' when calling RepositoriesCookbookApi.sync"
471
+ end
472
+ # resource path
473
+ local_var_path = '{cookbook_cookbook_repository_href}sync/'.sub('{' + 'cookbook_cookbook_repository_href' + '}', CGI.escape(cookbook_cookbook_repository_href.to_s).gsub('%2F', '/'))
474
+
475
+ # query parameters
476
+ query_params = opts[:query_params] || {}
477
+
478
+ # header parameters
479
+ header_params = opts[:header_params] || {}
480
+ # HTTP header 'Accept' (if needed)
481
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
482
+ # HTTP header 'Content-Type'
483
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
484
+
485
+ # form parameters
486
+ form_params = opts[:form_params] || {}
487
+
488
+ # http body (model)
489
+ post_body = opts[:body] || @api_client.object_to_http_body(repository_sync_url)
490
+
491
+ # return_type
492
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
493
+
494
+ # auth_names
495
+ auth_names = opts[:auth_names] || ['basicAuth']
496
+
497
+ new_options = opts.merge(
498
+ :header_params => header_params,
499
+ :query_params => query_params,
500
+ :form_params => form_params,
501
+ :body => post_body,
502
+ :auth_names => auth_names,
503
+ :return_type => return_type
504
+ )
505
+
506
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
507
+ if @api_client.config.debugging
508
+ @api_client.config.logger.debug "API called: RepositoriesCookbookApi#sync\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
509
+ end
510
+ return data, status_code, headers
511
+ end
512
+
513
+ # Update a cookbook repository
514
+ # Trigger an asynchronous update task
515
+ # @param cookbook_cookbook_repository_href [String]
516
+ # @param cookbook_cookbook_repository [CookbookCookbookRepository]
517
+ # @param [Hash] opts the optional parameters
518
+ # @return [AsyncOperationResponse]
519
+ def update(cookbook_cookbook_repository_href, cookbook_cookbook_repository, opts = {})
520
+ data, _status_code, _headers = update_with_http_info(cookbook_cookbook_repository_href, cookbook_cookbook_repository, opts)
521
+ data
522
+ end
523
+
524
+ # Update a cookbook repository
525
+ # Trigger an asynchronous update task
526
+ # @param cookbook_cookbook_repository_href [String]
527
+ # @param cookbook_cookbook_repository [CookbookCookbookRepository]
528
+ # @param [Hash] opts the optional parameters
529
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
530
+ def update_with_http_info(cookbook_cookbook_repository_href, cookbook_cookbook_repository, opts = {})
531
+ if @api_client.config.debugging
532
+ @api_client.config.logger.debug 'Calling API: RepositoriesCookbookApi.update ...'
533
+ end
534
+ # verify the required parameter 'cookbook_cookbook_repository_href' is set
535
+ if @api_client.config.client_side_validation && cookbook_cookbook_repository_href.nil?
536
+ fail ArgumentError, "Missing the required parameter 'cookbook_cookbook_repository_href' when calling RepositoriesCookbookApi.update"
537
+ end
538
+ # verify the required parameter 'cookbook_cookbook_repository' is set
539
+ if @api_client.config.client_side_validation && cookbook_cookbook_repository.nil?
540
+ fail ArgumentError, "Missing the required parameter 'cookbook_cookbook_repository' when calling RepositoriesCookbookApi.update"
541
+ end
542
+ # resource path
543
+ local_var_path = '{cookbook_cookbook_repository_href}'.sub('{' + 'cookbook_cookbook_repository_href' + '}', CGI.escape(cookbook_cookbook_repository_href.to_s).gsub('%2F', '/'))
544
+
545
+ # query parameters
546
+ query_params = opts[:query_params] || {}
547
+
548
+ # header parameters
549
+ header_params = opts[:header_params] || {}
550
+ # HTTP header 'Accept' (if needed)
551
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
552
+ # HTTP header 'Content-Type'
553
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
554
+
555
+ # form parameters
556
+ form_params = opts[:form_params] || {}
557
+
558
+ # http body (model)
559
+ post_body = opts[:body] || @api_client.object_to_http_body(cookbook_cookbook_repository)
560
+
561
+ # return_type
562
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
563
+
564
+ # auth_names
565
+ auth_names = opts[:auth_names] || ['basicAuth']
566
+
567
+ new_options = opts.merge(
568
+ :header_params => header_params,
569
+ :query_params => query_params,
570
+ :form_params => form_params,
571
+ :body => post_body,
572
+ :auth_names => auth_names,
573
+ :return_type => return_type
574
+ )
575
+
576
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
577
+ if @api_client.config.debugging
578
+ @api_client.config.logger.debug "API called: RepositoriesCookbookApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
579
+ end
580
+ return data, status_code, headers
581
+ end
582
+ end
583
+ end