pulp_gem_client 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +160 -0
  4. data/Rakefile +10 -0
  5. data/docs/AsyncOperationResponse.md +17 -0
  6. data/docs/ContentGemApi.md +210 -0
  7. data/docs/ContentSummaryResponse.md +21 -0
  8. data/docs/DistributionsGemApi.md +382 -0
  9. data/docs/GemGemContent.md +21 -0
  10. data/docs/GemGemContentResponse.md +35 -0
  11. data/docs/GemGemDistribution.md +31 -0
  12. data/docs/GemGemDistributionResponse.md +37 -0
  13. data/docs/GemGemPublication.md +19 -0
  14. data/docs/GemGemPublicationResponse.md +23 -0
  15. data/docs/GemGemRemote.md +63 -0
  16. data/docs/GemGemRemoteResponse.md +61 -0
  17. data/docs/GemGemRemoteResponseHiddenFields.md +19 -0
  18. data/docs/GemGemRepository.md +25 -0
  19. data/docs/GemGemRepositoryResponse.md +33 -0
  20. data/docs/PaginatedRepositoryVersionResponseList.md +23 -0
  21. data/docs/PaginatedgemGemContentResponseList.md +23 -0
  22. data/docs/PaginatedgemGemDistributionResponseList.md +23 -0
  23. data/docs/PaginatedgemGemPublicationResponseList.md +23 -0
  24. data/docs/PaginatedgemGemRemoteResponseList.md +23 -0
  25. data/docs/PaginatedgemGemRepositoryResponseList.md +23 -0
  26. data/docs/PatchedgemGemDistribution.md +31 -0
  27. data/docs/PatchedgemGemRemote.md +63 -0
  28. data/docs/PatchedgemGemRepository.md +25 -0
  29. data/docs/PolicyEnum.md +16 -0
  30. data/docs/PublicationsGemApi.md +263 -0
  31. data/docs/RemotesGemApi.md +380 -0
  32. data/docs/Repair.md +17 -0
  33. data/docs/RepositoriesGemApi.md +502 -0
  34. data/docs/RepositoriesGemVersionsApi.md +273 -0
  35. data/docs/RepositoryAddRemoveContent.md +21 -0
  36. data/docs/RepositorySyncURL.md +19 -0
  37. data/docs/RepositoryVersionResponse.md +27 -0
  38. data/lib/pulp_gem_client/api/content_gem_api.rb +259 -0
  39. data/lib/pulp_gem_client/api/distributions_gem_api.rb +476 -0
  40. data/lib/pulp_gem_client/api/publications_gem_api.rb +325 -0
  41. data/lib/pulp_gem_client/api/remotes_gem_api.rb +473 -0
  42. data/lib/pulp_gem_client/api/repositories_gem_api.rb +628 -0
  43. data/lib/pulp_gem_client/api/repositories_gem_versions_api.rb +346 -0
  44. data/lib/pulp_gem_client/api_client.rb +403 -0
  45. data/lib/pulp_gem_client/api_error.rb +57 -0
  46. data/lib/pulp_gem_client/configuration.rb +251 -0
  47. data/lib/pulp_gem_client/models/async_operation_response.rb +213 -0
  48. data/lib/pulp_gem_client/models/content_summary_response.rb +246 -0
  49. data/lib/pulp_gem_client/models/gem_gem_content.rb +228 -0
  50. data/lib/pulp_gem_client/models/gem_gem_content_response.rb +303 -0
  51. data/lib/pulp_gem_client/models/gem_gem_distribution.rb +333 -0
  52. data/lib/pulp_gem_client/models/gem_gem_distribution_response.rb +324 -0
  53. data/lib/pulp_gem_client/models/gem_gem_publication.rb +217 -0
  54. data/lib/pulp_gem_client/models/gem_gem_publication_response.rb +236 -0
  55. data/lib/pulp_gem_client/models/gem_gem_remote.rb +704 -0
  56. data/lib/pulp_gem_client/models/gem_gem_remote_response.rb +532 -0
  57. data/lib/pulp_gem_client/models/gem_gem_remote_response_hidden_fields.rb +215 -0
  58. data/lib/pulp_gem_client/models/gem_gem_repository.rb +306 -0
  59. data/lib/pulp_gem_client/models/gem_gem_repository_response.rb +309 -0
  60. data/lib/pulp_gem_client/models/paginated_repository_version_response_list.rb +237 -0
  61. data/lib/pulp_gem_client/models/paginatedgem_gem_content_response_list.rb +237 -0
  62. data/lib/pulp_gem_client/models/paginatedgem_gem_distribution_response_list.rb +237 -0
  63. data/lib/pulp_gem_client/models/paginatedgem_gem_publication_response_list.rb +237 -0
  64. data/lib/pulp_gem_client/models/paginatedgem_gem_remote_response_list.rb +237 -0
  65. data/lib/pulp_gem_client/models/paginatedgem_gem_repository_response_list.rb +237 -0
  66. data/lib/pulp_gem_client/models/patchedgem_gem_distribution.rb +315 -0
  67. data/lib/pulp_gem_client/models/patchedgem_gem_remote.rb +686 -0
  68. data/lib/pulp_gem_client/models/patchedgem_gem_repository.rb +297 -0
  69. data/lib/pulp_gem_client/models/policy_enum.rb +37 -0
  70. data/lib/pulp_gem_client/models/repair.rb +209 -0
  71. data/lib/pulp_gem_client/models/repository_add_remove_content.rb +232 -0
  72. data/lib/pulp_gem_client/models/repository_sync_url.rb +220 -0
  73. data/lib/pulp_gem_client/models/repository_version_response.rb +255 -0
  74. data/lib/pulp_gem_client/version.rb +15 -0
  75. data/lib/pulp_gem_client.rb +72 -0
  76. data/pulp_gem_client.gemspec +39 -0
  77. data/spec/api/content_gem_api_spec.rb +88 -0
  78. data/spec/api/distributions_gem_api_spec.rb +130 -0
  79. data/spec/api/publications_gem_api_spec.rb +101 -0
  80. data/spec/api/remotes_gem_api_spec.rb +129 -0
  81. data/spec/api/repositories_gem_api_spec.rb +160 -0
  82. data/spec/api/repositories_gem_versions_api_spec.rb +105 -0
  83. data/spec/api_client_spec.rb +188 -0
  84. data/spec/configuration_spec.rb +42 -0
  85. data/spec/models/async_operation_response_spec.rb +41 -0
  86. data/spec/models/content_summary_response_spec.rb +53 -0
  87. data/spec/models/gem_gem_content_response_spec.rb +95 -0
  88. data/spec/models/gem_gem_content_spec.rb +53 -0
  89. data/spec/models/gem_gem_distribution_response_spec.rb +101 -0
  90. data/spec/models/gem_gem_distribution_spec.rb +83 -0
  91. data/spec/models/gem_gem_publication_response_spec.rb +59 -0
  92. data/spec/models/gem_gem_publication_spec.rb +47 -0
  93. data/spec/models/gem_gem_remote_response_hidden_fields_spec.rb +47 -0
  94. data/spec/models/gem_gem_remote_response_spec.rb +173 -0
  95. data/spec/models/gem_gem_remote_spec.rb +179 -0
  96. data/spec/models/gem_gem_repository_response_spec.rb +89 -0
  97. data/spec/models/gem_gem_repository_spec.rb +65 -0
  98. data/spec/models/paginated_repository_version_response_list_spec.rb +59 -0
  99. data/spec/models/paginatedgem_gem_content_response_list_spec.rb +59 -0
  100. data/spec/models/paginatedgem_gem_distribution_response_list_spec.rb +59 -0
  101. data/spec/models/paginatedgem_gem_publication_response_list_spec.rb +59 -0
  102. data/spec/models/paginatedgem_gem_remote_response_list_spec.rb +59 -0
  103. data/spec/models/paginatedgem_gem_repository_response_list_spec.rb +59 -0
  104. data/spec/models/patchedgem_gem_distribution_spec.rb +83 -0
  105. data/spec/models/patchedgem_gem_remote_spec.rb +179 -0
  106. data/spec/models/patchedgem_gem_repository_spec.rb +65 -0
  107. data/spec/models/policy_enum_spec.rb +35 -0
  108. data/spec/models/repair_spec.rb +41 -0
  109. data/spec/models/repository_add_remove_content_spec.rb +53 -0
  110. data/spec/models/repository_sync_url_spec.rb +47 -0
  111. data/spec/models/repository_version_response_spec.rb +71 -0
  112. data/spec/spec_helper.rb +111 -0
  113. metadata +250 -0
@@ -0,0 +1,473 @@
1
+ =begin
2
+ #Pulp 3 API
3
+
4
+ #Fetch, Upload, Organize, and Distribute Software Packages
5
+
6
+ The version of the OpenAPI document: v3
7
+ Contact: pulp-list@redhat.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.1
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module PulpGemClient
16
+ class RemotesGemApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Create a gem remote
23
+ # A ViewSet for GemRemote.
24
+ # @param gem_gem_remote [GemGemRemote]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [GemGemRemoteResponse]
27
+ def create(gem_gem_remote, opts = {})
28
+ data, _status_code, _headers = create_with_http_info(gem_gem_remote, opts)
29
+ data
30
+ end
31
+
32
+ # Create a gem remote
33
+ # A ViewSet for GemRemote.
34
+ # @param gem_gem_remote [GemGemRemote]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(GemGemRemoteResponse, Integer, Hash)>] GemGemRemoteResponse data, response status code and response headers
37
+ def create_with_http_info(gem_gem_remote, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: RemotesGemApi.create ...'
40
+ end
41
+ # verify the required parameter 'gem_gem_remote' is set
42
+ if @api_client.config.client_side_validation && gem_gem_remote.nil?
43
+ fail ArgumentError, "Missing the required parameter 'gem_gem_remote' when calling RemotesGemApi.create"
44
+ end
45
+ # resource path
46
+ local_var_path = '/pulp/api/v3/remotes/gem/gem/'
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
55
+ # HTTP header 'Content-Type'
56
+ header_params['Content-Type'] = @api_client.select_header_content_type(['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(gem_gem_remote)
63
+
64
+ # return_type
65
+ return_type = opts[:return_type] || 'GemGemRemoteResponse'
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: RemotesGemApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
82
+ end
83
+ return data, status_code, headers
84
+ end
85
+
86
+ # Delete a gem remote
87
+ # Trigger an asynchronous delete task
88
+ # @param gem_gem_remote_href [String]
89
+ # @param [Hash] opts the optional parameters
90
+ # @return [AsyncOperationResponse]
91
+ def delete(gem_gem_remote_href, opts = {})
92
+ data, _status_code, _headers = delete_with_http_info(gem_gem_remote_href, opts)
93
+ data
94
+ end
95
+
96
+ # Delete a gem remote
97
+ # Trigger an asynchronous delete task
98
+ # @param gem_gem_remote_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(gem_gem_remote_href, opts = {})
102
+ if @api_client.config.debugging
103
+ @api_client.config.logger.debug 'Calling API: RemotesGemApi.delete ...'
104
+ end
105
+ # verify the required parameter 'gem_gem_remote_href' is set
106
+ if @api_client.config.client_side_validation && gem_gem_remote_href.nil?
107
+ fail ArgumentError, "Missing the required parameter 'gem_gem_remote_href' when calling RemotesGemApi.delete"
108
+ end
109
+ # resource path
110
+ local_var_path = '{gem_gem_remote_href}'.sub('{' + 'gem_gem_remote_href' + '}', CGI.escape(gem_gem_remote_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: RemotesGemApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
144
+ end
145
+ return data, status_code, headers
146
+ end
147
+
148
+ # List gem remotes
149
+ # A ViewSet for GemRemote.
150
+ # @param [Hash] opts the optional parameters
151
+ # @option opts [Integer] :limit Number of results to return per page.
152
+ # @option opts [String] :name Filter results where name matches value
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 [Array<String>] :ordering Ordering * &#x60;pulp_id&#x60; - Pulp id * &#x60;-pulp_id&#x60; - Pulp id (descending) * &#x60;pulp_created&#x60; - Pulp created * &#x60;-pulp_created&#x60; - Pulp created (descending) * &#x60;pulp_last_updated&#x60; - Pulp last updated * &#x60;-pulp_last_updated&#x60; - Pulp last updated (descending) * &#x60;pulp_type&#x60; - Pulp type * &#x60;-pulp_type&#x60; - Pulp type (descending) * &#x60;name&#x60; - Name * &#x60;-name&#x60; - Name (descending) * &#x60;pulp_labels&#x60; - Pulp labels * &#x60;-pulp_labels&#x60; - Pulp labels (descending) * &#x60;url&#x60; - Url * &#x60;-url&#x60; - Url (descending) * &#x60;ca_cert&#x60; - Ca cert * &#x60;-ca_cert&#x60; - Ca cert (descending) * &#x60;client_cert&#x60; - Client cert * &#x60;-client_cert&#x60; - Client cert (descending) * &#x60;client_key&#x60; - Client key * &#x60;-client_key&#x60; - Client key (descending) * &#x60;tls_validation&#x60; - Tls validation * &#x60;-tls_validation&#x60; - Tls validation (descending) * &#x60;username&#x60; - Username * &#x60;-username&#x60; - Username (descending) * &#x60;password&#x60; - Password * &#x60;-password&#x60; - Password (descending) * &#x60;proxy_url&#x60; - Proxy url * &#x60;-proxy_url&#x60; - Proxy url (descending) * &#x60;proxy_username&#x60; - Proxy username * &#x60;-proxy_username&#x60; - Proxy username (descending) * &#x60;proxy_password&#x60; - Proxy password * &#x60;-proxy_password&#x60; - Proxy password (descending) * &#x60;download_concurrency&#x60; - Download concurrency * &#x60;-download_concurrency&#x60; - Download concurrency (descending) * &#x60;max_retries&#x60; - Max retries * &#x60;-max_retries&#x60; - Max retries (descending) * &#x60;policy&#x60; - Policy * &#x60;-policy&#x60; - Policy (descending) * &#x60;total_timeout&#x60; - Total timeout * &#x60;-total_timeout&#x60; - Total timeout (descending) * &#x60;connect_timeout&#x60; - Connect timeout * &#x60;-connect_timeout&#x60; - Connect timeout (descending) * &#x60;sock_connect_timeout&#x60; - Sock connect timeout * &#x60;-sock_connect_timeout&#x60; - Sock connect timeout (descending) * &#x60;sock_read_timeout&#x60; - Sock read timeout * &#x60;-sock_read_timeout&#x60; - Sock read timeout (descending) * &#x60;headers&#x60; - Headers * &#x60;-headers&#x60; - Headers (descending) * &#x60;rate_limit&#x60; - Rate limit * &#x60;-rate_limit&#x60; - Rate limit (descending) * &#x60;pk&#x60; - Pk * &#x60;-pk&#x60; - Pk (descending)
159
+ # @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
160
+ # @option opts [Array<String>] :pulp_id__in Multiple values may be separated by commas.
161
+ # @option opts [String] :pulp_label_select Filter labels by search string
162
+ # @option opts [DateTime] :pulp_last_updated Filter results where pulp_last_updated matches value
163
+ # @option opts [DateTime] :pulp_last_updated__gt Filter results where pulp_last_updated is greater than value
164
+ # @option opts [DateTime] :pulp_last_updated__gte Filter results where pulp_last_updated is greater than or equal to value
165
+ # @option opts [DateTime] :pulp_last_updated__lt Filter results where pulp_last_updated is less than value
166
+ # @option opts [DateTime] :pulp_last_updated__lte Filter results where pulp_last_updated is less than or equal to value
167
+ # @option opts [Array<DateTime>] :pulp_last_updated__range Filter results where pulp_last_updated is between two comma separated values
168
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
169
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
170
+ # @return [PaginatedgemGemRemoteResponseList]
171
+ def list(opts = {})
172
+ data, _status_code, _headers = list_with_http_info(opts)
173
+ data
174
+ end
175
+
176
+ # List gem remotes
177
+ # A ViewSet for GemRemote.
178
+ # @param [Hash] opts the optional parameters
179
+ # @option opts [Integer] :limit Number of results to return per page.
180
+ # @option opts [String] :name Filter results where name matches value
181
+ # @option opts [String] :name__contains Filter results where name contains value
182
+ # @option opts [String] :name__icontains Filter results where name contains value
183
+ # @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
184
+ # @option opts [String] :name__startswith Filter results where name starts with value
185
+ # @option opts [Integer] :offset The initial index from which to return the results.
186
+ # @option opts [Array<String>] :ordering Ordering * &#x60;pulp_id&#x60; - Pulp id * &#x60;-pulp_id&#x60; - Pulp id (descending) * &#x60;pulp_created&#x60; - Pulp created * &#x60;-pulp_created&#x60; - Pulp created (descending) * &#x60;pulp_last_updated&#x60; - Pulp last updated * &#x60;-pulp_last_updated&#x60; - Pulp last updated (descending) * &#x60;pulp_type&#x60; - Pulp type * &#x60;-pulp_type&#x60; - Pulp type (descending) * &#x60;name&#x60; - Name * &#x60;-name&#x60; - Name (descending) * &#x60;pulp_labels&#x60; - Pulp labels * &#x60;-pulp_labels&#x60; - Pulp labels (descending) * &#x60;url&#x60; - Url * &#x60;-url&#x60; - Url (descending) * &#x60;ca_cert&#x60; - Ca cert * &#x60;-ca_cert&#x60; - Ca cert (descending) * &#x60;client_cert&#x60; - Client cert * &#x60;-client_cert&#x60; - Client cert (descending) * &#x60;client_key&#x60; - Client key * &#x60;-client_key&#x60; - Client key (descending) * &#x60;tls_validation&#x60; - Tls validation * &#x60;-tls_validation&#x60; - Tls validation (descending) * &#x60;username&#x60; - Username * &#x60;-username&#x60; - Username (descending) * &#x60;password&#x60; - Password * &#x60;-password&#x60; - Password (descending) * &#x60;proxy_url&#x60; - Proxy url * &#x60;-proxy_url&#x60; - Proxy url (descending) * &#x60;proxy_username&#x60; - Proxy username * &#x60;-proxy_username&#x60; - Proxy username (descending) * &#x60;proxy_password&#x60; - Proxy password * &#x60;-proxy_password&#x60; - Proxy password (descending) * &#x60;download_concurrency&#x60; - Download concurrency * &#x60;-download_concurrency&#x60; - Download concurrency (descending) * &#x60;max_retries&#x60; - Max retries * &#x60;-max_retries&#x60; - Max retries (descending) * &#x60;policy&#x60; - Policy * &#x60;-policy&#x60; - Policy (descending) * &#x60;total_timeout&#x60; - Total timeout * &#x60;-total_timeout&#x60; - Total timeout (descending) * &#x60;connect_timeout&#x60; - Connect timeout * &#x60;-connect_timeout&#x60; - Connect timeout (descending) * &#x60;sock_connect_timeout&#x60; - Sock connect timeout * &#x60;-sock_connect_timeout&#x60; - Sock connect timeout (descending) * &#x60;sock_read_timeout&#x60; - Sock read timeout * &#x60;-sock_read_timeout&#x60; - Sock read timeout (descending) * &#x60;headers&#x60; - Headers * &#x60;-headers&#x60; - Headers (descending) * &#x60;rate_limit&#x60; - Rate limit * &#x60;-rate_limit&#x60; - Rate limit (descending) * &#x60;pk&#x60; - Pk * &#x60;-pk&#x60; - Pk (descending)
187
+ # @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
188
+ # @option opts [Array<String>] :pulp_id__in Multiple values may be separated by commas.
189
+ # @option opts [String] :pulp_label_select Filter labels by search string
190
+ # @option opts [DateTime] :pulp_last_updated Filter results where pulp_last_updated matches value
191
+ # @option opts [DateTime] :pulp_last_updated__gt Filter results where pulp_last_updated is greater than value
192
+ # @option opts [DateTime] :pulp_last_updated__gte Filter results where pulp_last_updated is greater than or equal to value
193
+ # @option opts [DateTime] :pulp_last_updated__lt Filter results where pulp_last_updated is less than value
194
+ # @option opts [DateTime] :pulp_last_updated__lte Filter results where pulp_last_updated is less than or equal to value
195
+ # @option opts [Array<DateTime>] :pulp_last_updated__range Filter results where pulp_last_updated is between two comma separated values
196
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
197
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
198
+ # @return [Array<(PaginatedgemGemRemoteResponseList, Integer, Hash)>] PaginatedgemGemRemoteResponseList data, response status code and response headers
199
+ def list_with_http_info(opts = {})
200
+ if @api_client.config.debugging
201
+ @api_client.config.logger.debug 'Calling API: RemotesGemApi.list ...'
202
+ end
203
+ allowable_values = ["-ca_cert", "-client_cert", "-client_key", "-connect_timeout", "-download_concurrency", "-headers", "-max_retries", "-name", "-password", "-pk", "-policy", "-proxy_password", "-proxy_url", "-proxy_username", "-pulp_created", "-pulp_id", "-pulp_labels", "-pulp_last_updated", "-pulp_type", "-rate_limit", "-sock_connect_timeout", "-sock_read_timeout", "-tls_validation", "-total_timeout", "-url", "-username", "ca_cert", "client_cert", "client_key", "connect_timeout", "download_concurrency", "headers", "max_retries", "name", "password", "pk", "policy", "proxy_password", "proxy_url", "proxy_username", "pulp_created", "pulp_id", "pulp_labels", "pulp_last_updated", "pulp_type", "rate_limit", "sock_connect_timeout", "sock_read_timeout", "tls_validation", "total_timeout", "url", "username"]
204
+ if @api_client.config.client_side_validation && opts[:'ordering'] && !opts[:'ordering'].all? { |item| allowable_values.include?(item) }
205
+ fail ArgumentError, "invalid value for \"ordering\", must include one of #{allowable_values}"
206
+ end
207
+ # resource path
208
+ local_var_path = '/pulp/api/v3/remotes/gem/gem/'
209
+
210
+ # query parameters
211
+ query_params = opts[:query_params] || {}
212
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
213
+ query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
214
+ query_params[:'name__contains'] = opts[:'name__contains'] if !opts[:'name__contains'].nil?
215
+ query_params[:'name__icontains'] = opts[:'name__icontains'] if !opts[:'name__icontains'].nil?
216
+ query_params[:'name__in'] = @api_client.build_collection_param(opts[:'name__in'], :csv) if !opts[:'name__in'].nil?
217
+ query_params[:'name__startswith'] = opts[:'name__startswith'] if !opts[:'name__startswith'].nil?
218
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
219
+ query_params[:'ordering'] = @api_client.build_collection_param(opts[:'ordering'], :csv) if !opts[:'ordering'].nil?
220
+ query_params[:'pulp_href__in'] = @api_client.build_collection_param(opts[:'pulp_href__in'], :csv) if !opts[:'pulp_href__in'].nil?
221
+ query_params[:'pulp_id__in'] = @api_client.build_collection_param(opts[:'pulp_id__in'], :csv) if !opts[:'pulp_id__in'].nil?
222
+ query_params[:'pulp_label_select'] = opts[:'pulp_label_select'] if !opts[:'pulp_label_select'].nil?
223
+ query_params[:'pulp_last_updated'] = opts[:'pulp_last_updated'] if !opts[:'pulp_last_updated'].nil?
224
+ query_params[:'pulp_last_updated__gt'] = opts[:'pulp_last_updated__gt'] if !opts[:'pulp_last_updated__gt'].nil?
225
+ query_params[:'pulp_last_updated__gte'] = opts[:'pulp_last_updated__gte'] if !opts[:'pulp_last_updated__gte'].nil?
226
+ query_params[:'pulp_last_updated__lt'] = opts[:'pulp_last_updated__lt'] if !opts[:'pulp_last_updated__lt'].nil?
227
+ query_params[:'pulp_last_updated__lte'] = opts[:'pulp_last_updated__lte'] if !opts[:'pulp_last_updated__lte'].nil?
228
+ query_params[:'pulp_last_updated__range'] = @api_client.build_collection_param(opts[:'pulp_last_updated__range'], :csv) if !opts[:'pulp_last_updated__range'].nil?
229
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
230
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
231
+
232
+ # header parameters
233
+ header_params = opts[:header_params] || {}
234
+ # HTTP header 'Accept' (if needed)
235
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
236
+
237
+ # form parameters
238
+ form_params = opts[:form_params] || {}
239
+
240
+ # http body (model)
241
+ post_body = opts[:body]
242
+
243
+ # return_type
244
+ return_type = opts[:return_type] || 'PaginatedgemGemRemoteResponseList'
245
+
246
+ # auth_names
247
+ auth_names = opts[:auth_names] || ['basicAuth']
248
+
249
+ new_options = opts.merge(
250
+ :header_params => header_params,
251
+ :query_params => query_params,
252
+ :form_params => form_params,
253
+ :body => post_body,
254
+ :auth_names => auth_names,
255
+ :return_type => return_type
256
+ )
257
+
258
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
259
+ if @api_client.config.debugging
260
+ @api_client.config.logger.debug "API called: RemotesGemApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
261
+ end
262
+ return data, status_code, headers
263
+ end
264
+
265
+ # Update a gem remote
266
+ # Trigger an asynchronous partial update task
267
+ # @param gem_gem_remote_href [String]
268
+ # @param patchedgem_gem_remote [PatchedgemGemRemote]
269
+ # @param [Hash] opts the optional parameters
270
+ # @return [AsyncOperationResponse]
271
+ def partial_update(gem_gem_remote_href, patchedgem_gem_remote, opts = {})
272
+ data, _status_code, _headers = partial_update_with_http_info(gem_gem_remote_href, patchedgem_gem_remote, opts)
273
+ data
274
+ end
275
+
276
+ # Update a gem remote
277
+ # Trigger an asynchronous partial update task
278
+ # @param gem_gem_remote_href [String]
279
+ # @param patchedgem_gem_remote [PatchedgemGemRemote]
280
+ # @param [Hash] opts the optional parameters
281
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
282
+ def partial_update_with_http_info(gem_gem_remote_href, patchedgem_gem_remote, opts = {})
283
+ if @api_client.config.debugging
284
+ @api_client.config.logger.debug 'Calling API: RemotesGemApi.partial_update ...'
285
+ end
286
+ # verify the required parameter 'gem_gem_remote_href' is set
287
+ if @api_client.config.client_side_validation && gem_gem_remote_href.nil?
288
+ fail ArgumentError, "Missing the required parameter 'gem_gem_remote_href' when calling RemotesGemApi.partial_update"
289
+ end
290
+ # verify the required parameter 'patchedgem_gem_remote' is set
291
+ if @api_client.config.client_side_validation && patchedgem_gem_remote.nil?
292
+ fail ArgumentError, "Missing the required parameter 'patchedgem_gem_remote' when calling RemotesGemApi.partial_update"
293
+ end
294
+ # resource path
295
+ local_var_path = '{gem_gem_remote_href}'.sub('{' + 'gem_gem_remote_href' + '}', CGI.escape(gem_gem_remote_href.to_s).gsub('%2F', '/'))
296
+
297
+ # query parameters
298
+ query_params = opts[:query_params] || {}
299
+
300
+ # header parameters
301
+ header_params = opts[:header_params] || {}
302
+ # HTTP header 'Accept' (if needed)
303
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
304
+ # HTTP header 'Content-Type'
305
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
306
+
307
+ # form parameters
308
+ form_params = opts[:form_params] || {}
309
+
310
+ # http body (model)
311
+ post_body = opts[:body] || @api_client.object_to_http_body(patchedgem_gem_remote)
312
+
313
+ # return_type
314
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
315
+
316
+ # auth_names
317
+ auth_names = opts[:auth_names] || ['basicAuth']
318
+
319
+ new_options = opts.merge(
320
+ :header_params => header_params,
321
+ :query_params => query_params,
322
+ :form_params => form_params,
323
+ :body => post_body,
324
+ :auth_names => auth_names,
325
+ :return_type => return_type
326
+ )
327
+
328
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
329
+ if @api_client.config.debugging
330
+ @api_client.config.logger.debug "API called: RemotesGemApi#partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
331
+ end
332
+ return data, status_code, headers
333
+ end
334
+
335
+ # Inspect a gem remote
336
+ # A ViewSet for GemRemote.
337
+ # @param gem_gem_remote_href [String]
338
+ # @param [Hash] opts the optional parameters
339
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
340
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
341
+ # @return [GemGemRemoteResponse]
342
+ def read(gem_gem_remote_href, opts = {})
343
+ data, _status_code, _headers = read_with_http_info(gem_gem_remote_href, opts)
344
+ data
345
+ end
346
+
347
+ # Inspect a gem remote
348
+ # A ViewSet for GemRemote.
349
+ # @param gem_gem_remote_href [String]
350
+ # @param [Hash] opts the optional parameters
351
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
352
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
353
+ # @return [Array<(GemGemRemoteResponse, Integer, Hash)>] GemGemRemoteResponse data, response status code and response headers
354
+ def read_with_http_info(gem_gem_remote_href, opts = {})
355
+ if @api_client.config.debugging
356
+ @api_client.config.logger.debug 'Calling API: RemotesGemApi.read ...'
357
+ end
358
+ # verify the required parameter 'gem_gem_remote_href' is set
359
+ if @api_client.config.client_side_validation && gem_gem_remote_href.nil?
360
+ fail ArgumentError, "Missing the required parameter 'gem_gem_remote_href' when calling RemotesGemApi.read"
361
+ end
362
+ # resource path
363
+ local_var_path = '{gem_gem_remote_href}'.sub('{' + 'gem_gem_remote_href' + '}', CGI.escape(gem_gem_remote_href.to_s).gsub('%2F', '/'))
364
+
365
+ # query parameters
366
+ query_params = opts[:query_params] || {}
367
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
368
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
369
+
370
+ # header parameters
371
+ header_params = opts[:header_params] || {}
372
+ # HTTP header 'Accept' (if needed)
373
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
374
+
375
+ # form parameters
376
+ form_params = opts[:form_params] || {}
377
+
378
+ # http body (model)
379
+ post_body = opts[:body]
380
+
381
+ # return_type
382
+ return_type = opts[:return_type] || 'GemGemRemoteResponse'
383
+
384
+ # auth_names
385
+ auth_names = opts[:auth_names] || ['basicAuth']
386
+
387
+ new_options = opts.merge(
388
+ :header_params => header_params,
389
+ :query_params => query_params,
390
+ :form_params => form_params,
391
+ :body => post_body,
392
+ :auth_names => auth_names,
393
+ :return_type => return_type
394
+ )
395
+
396
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
397
+ if @api_client.config.debugging
398
+ @api_client.config.logger.debug "API called: RemotesGemApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
399
+ end
400
+ return data, status_code, headers
401
+ end
402
+
403
+ # Update a gem remote
404
+ # Trigger an asynchronous update task
405
+ # @param gem_gem_remote_href [String]
406
+ # @param gem_gem_remote [GemGemRemote]
407
+ # @param [Hash] opts the optional parameters
408
+ # @return [AsyncOperationResponse]
409
+ def update(gem_gem_remote_href, gem_gem_remote, opts = {})
410
+ data, _status_code, _headers = update_with_http_info(gem_gem_remote_href, gem_gem_remote, opts)
411
+ data
412
+ end
413
+
414
+ # Update a gem remote
415
+ # Trigger an asynchronous update task
416
+ # @param gem_gem_remote_href [String]
417
+ # @param gem_gem_remote [GemGemRemote]
418
+ # @param [Hash] opts the optional parameters
419
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
420
+ def update_with_http_info(gem_gem_remote_href, gem_gem_remote, opts = {})
421
+ if @api_client.config.debugging
422
+ @api_client.config.logger.debug 'Calling API: RemotesGemApi.update ...'
423
+ end
424
+ # verify the required parameter 'gem_gem_remote_href' is set
425
+ if @api_client.config.client_side_validation && gem_gem_remote_href.nil?
426
+ fail ArgumentError, "Missing the required parameter 'gem_gem_remote_href' when calling RemotesGemApi.update"
427
+ end
428
+ # verify the required parameter 'gem_gem_remote' is set
429
+ if @api_client.config.client_side_validation && gem_gem_remote.nil?
430
+ fail ArgumentError, "Missing the required parameter 'gem_gem_remote' when calling RemotesGemApi.update"
431
+ end
432
+ # resource path
433
+ local_var_path = '{gem_gem_remote_href}'.sub('{' + 'gem_gem_remote_href' + '}', CGI.escape(gem_gem_remote_href.to_s).gsub('%2F', '/'))
434
+
435
+ # query parameters
436
+ query_params = opts[:query_params] || {}
437
+
438
+ # header parameters
439
+ header_params = opts[:header_params] || {}
440
+ # HTTP header 'Accept' (if needed)
441
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
442
+ # HTTP header 'Content-Type'
443
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
444
+
445
+ # form parameters
446
+ form_params = opts[:form_params] || {}
447
+
448
+ # http body (model)
449
+ post_body = opts[:body] || @api_client.object_to_http_body(gem_gem_remote)
450
+
451
+ # return_type
452
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
453
+
454
+ # auth_names
455
+ auth_names = opts[:auth_names] || ['basicAuth']
456
+
457
+ new_options = opts.merge(
458
+ :header_params => header_params,
459
+ :query_params => query_params,
460
+ :form_params => form_params,
461
+ :body => post_body,
462
+ :auth_names => auth_names,
463
+ :return_type => return_type
464
+ )
465
+
466
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
467
+ if @api_client.config.debugging
468
+ @api_client.config.logger.debug "API called: RemotesGemApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
469
+ end
470
+ return data, status_code, headers
471
+ end
472
+ end
473
+ end