svix 1.23.0 → 1.25.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 (40) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/lib/svix/api/endpoint_api.rb +475 -2
  4. data/lib/svix/api/message_api.rb +218 -2
  5. data/lib/svix/api/streams_api.rb +185 -0
  6. data/lib/svix/api/transformation_template_api.rb +195 -24
  7. data/lib/svix/models/auth_token_out.rb +272 -0
  8. data/lib/svix/models/client_secret_jwt_params_in.rb +3 -0
  9. data/lib/svix/models/create_message_token_in.rb +250 -0
  10. data/lib/svix/models/create_stream_in.rb +225 -0
  11. data/lib/svix/models/endpoint_created_event_data.rb +1 -0
  12. data/lib/svix/models/endpoint_deleted_event_data.rb +1 -0
  13. data/lib/svix/models/endpoint_mtls_config_in.rb +235 -0
  14. data/lib/svix/models/endpoint_oauth_config_in.rb +42 -2
  15. data/lib/svix/models/endpoint_updated_event_data.rb +1 -0
  16. data/lib/svix/models/environment_settings_out.rb +15 -4
  17. data/lib/svix/models/event_in.rb +223 -0
  18. data/lib/svix/models/event_out.rb +223 -0
  19. data/lib/svix/models/event_type_from_open_api.rb +280 -0
  20. data/lib/svix/models/event_type_import_open_api_in.rb +13 -1
  21. data/lib/svix/models/event_type_import_open_api_out_data.rb +16 -4
  22. data/lib/svix/models/hubspot_oauth_config_in.rb +223 -0
  23. data/lib/svix/models/{oauth_payload_out.rb → incoming_webhook_payload_out.rb} +3 -3
  24. data/lib/svix/models/kafka_security_protocol_type.rb +38 -0
  25. data/lib/svix/models/list_response_event_out.rb +259 -0
  26. data/lib/svix/models/list_response_sink_out.rb +259 -0
  27. data/lib/svix/models/message_subscriber_auth_token_out.rb +237 -0
  28. data/lib/svix/models/{oauth_payload_in.rb → o_auth_payload_in.rb} +3 -3
  29. data/lib/svix/models/o_auth_payload_out.rb +239 -0
  30. data/lib/svix/models/{oauth2_grant_type.rb → oauth2_grant_type_in.rb} +4 -3
  31. data/lib/svix/models/settings_in.rb +15 -4
  32. data/lib/svix/models/settings_out.rb +15 -4
  33. data/lib/svix/models/sink_in.rb +107 -0
  34. data/lib/svix/models/sink_in_one_of.rb +285 -0
  35. data/lib/svix/models/sink_in_one_of1.rb +313 -0
  36. data/lib/svix/models/sink_in_one_of2.rb +321 -0
  37. data/lib/svix/models/sink_in_one_of3.rb +271 -0
  38. data/lib/svix/models/sink_out.rb +107 -0
  39. data/lib/svix/version.rb +1 -1
  40. metadata +25 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d9a1e975f63d58999f477f489e1e061c71a0087f4a21654539ade169531a0af2
4
- data.tar.gz: dab74fe571f4656d1e2d90fde91fdc238a8cf51058adaceeab78ffb2bbf6f37f
3
+ metadata.gz: 9af0966ec6826c9bc23ba8cacfb3463f3b2c62c3842deb31ccd58500bb74a979
4
+ data.tar.gz: d304f7591f15f88cd16264b087442d333bd1f4d373248a6d73efaa933cb0130b
5
5
  SHA512:
6
- metadata.gz: 27ae734208b86525182e502086dc065f446dff33e4ae47709d28a56973bfbc966bdac0bfe7558751f068d2c9ef755ed64b7eac12c564fec6fb538da72fbe46d2
7
- data.tar.gz: 1931001d9a9b84643ea3627a91b415d727f195fe5045e2ec90cf60b908a228d7bcfaaa59412caa8d24507221dafb11c7b0ed91d584313bf514a1443056e73106
6
+ metadata.gz: 43f98aadaeba601b4528811e5a8953655eff727f7c0883c1172a19f9d305214fa3931e16b5f03f974e5c3e004c6ae37586918342ed910d90fadfd28da72a8e19
7
+ data.tar.gz: a3636186efdc429a63a86b08a15a60749c9508aec61cc7feb5fcd16c8d22d34e17fefe834d8dd6318070d3806220baa7f10e08c479417c5257d2ec5e408f2cf5
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- svix (1.23.0)
4
+ svix (1.25.0)
5
5
  typhoeus (~> 1.0, >= 1.0.1)
6
6
 
7
7
  GEM
@@ -10,7 +10,7 @@ GEM
10
10
  diff-lcs (1.4.4)
11
11
  ethon (0.16.0)
12
12
  ffi (>= 1.15.0)
13
- ffi (1.16.3)
13
+ ffi (1.17.0)
14
14
  rake (13.0.6)
15
15
  rspec (3.10.0)
16
16
  rspec-core (~> 3.10.0)
@@ -201,6 +201,101 @@ module Svix
201
201
  return data, status_code, headers
202
202
  end
203
203
 
204
+ # Delete Endpoint Mtls Config
205
+ # Delete endpoint mTLS configuration
206
+ # @param app_id [String] The app's ID or UID
207
+ # @param endpoint_id [String] The ep's ID or UID
208
+ # @param [Hash] opts the optional parameters
209
+ # @return [nil]
210
+ def v1_endpoint_delete_mtls_config(app_id, endpoint_id, opts = {})
211
+ v1_endpoint_delete_mtls_config_with_http_info(app_id, endpoint_id, opts)
212
+ nil
213
+ end
214
+
215
+ # Delete Endpoint Mtls Config
216
+ # Delete endpoint mTLS configuration
217
+ # @param app_id [String] The app's ID or UID
218
+ # @param endpoint_id [String] The ep's ID or UID
219
+ # @param [Hash] opts the optional parameters
220
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
221
+ def v1_endpoint_delete_mtls_config_with_http_info(app_id, endpoint_id, opts = {})
222
+ if @api_client.config.debugging
223
+ @api_client.config.logger.debug 'Calling API: EndpointApi.v1_endpoint_delete_mtls_config ...'
224
+ end
225
+ # verify the required parameter 'app_id' is set
226
+ if @api_client.config.client_side_validation && app_id.nil?
227
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling EndpointApi.v1_endpoint_delete_mtls_config"
228
+ end
229
+ if @api_client.config.client_side_validation && app_id.to_s.length > 256
230
+ fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.v1_endpoint_delete_mtls_config, the character length must be smaller than or equal to 256.'
231
+ end
232
+
233
+ if @api_client.config.client_side_validation && app_id.to_s.length < 1
234
+ fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.v1_endpoint_delete_mtls_config, the character length must be great than or equal to 1.'
235
+ end
236
+
237
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
238
+ if @api_client.config.client_side_validation && app_id !~ pattern
239
+ fail ArgumentError, "invalid value for 'app_id' when calling EndpointApi.v1_endpoint_delete_mtls_config, must conform to the pattern #{pattern}."
240
+ end
241
+
242
+ # verify the required parameter 'endpoint_id' is set
243
+ if @api_client.config.client_side_validation && endpoint_id.nil?
244
+ fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling EndpointApi.v1_endpoint_delete_mtls_config"
245
+ end
246
+ if @api_client.config.client_side_validation && endpoint_id.to_s.length > 256
247
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.v1_endpoint_delete_mtls_config, the character length must be smaller than or equal to 256.'
248
+ end
249
+
250
+ if @api_client.config.client_side_validation && endpoint_id.to_s.length < 1
251
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.v1_endpoint_delete_mtls_config, the character length must be great than or equal to 1.'
252
+ end
253
+
254
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
255
+ if @api_client.config.client_side_validation && endpoint_id !~ pattern
256
+ fail ArgumentError, "invalid value for 'endpoint_id' when calling EndpointApi.v1_endpoint_delete_mtls_config, must conform to the pattern #{pattern}."
257
+ end
258
+
259
+ # resource path
260
+ local_var_path = '/api/v1/app/{app_id}/endpoint/{endpoint_id}/mtls'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'endpoint_id' + '}', CGI.escape(endpoint_id.to_s))
261
+
262
+ # query parameters
263
+ query_params = opts[:query_params] || {}
264
+
265
+ # header parameters
266
+ header_params = opts[:header_params] || {}
267
+ # HTTP header 'Accept' (if needed)
268
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
269
+
270
+ # form parameters
271
+ form_params = opts[:form_params] || {}
272
+
273
+ # http body (model)
274
+ post_body = opts[:debug_body]
275
+
276
+ # return_type
277
+ return_type = opts[:debug_return_type]
278
+
279
+ # auth_names
280
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
281
+
282
+ new_options = opts.merge(
283
+ :operation => :"EndpointApi.v1_endpoint_delete_mtls_config",
284
+ :header_params => header_params,
285
+ :query_params => query_params,
286
+ :form_params => form_params,
287
+ :body => post_body,
288
+ :auth_names => auth_names,
289
+ :return_type => return_type
290
+ )
291
+
292
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
293
+ if @api_client.config.debugging
294
+ @api_client.config.logger.debug "API called: EndpointApi#v1_endpoint_delete_mtls_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
295
+ end
296
+ return data, status_code, headers
297
+ end
298
+
204
299
  # Delete Endpoint Oauth Config
205
300
  # Delete endpoint OAuth configuration
206
301
  # @param app_id [String] The app&#39;s ID or UID
@@ -1300,7 +1395,7 @@ module Svix
1300
1395
  end
1301
1396
 
1302
1397
  # Send Event Type Example Message
1303
- # Send an example message for event
1398
+ # Send an example message for an event
1304
1399
  # @param app_id [String] The app&#39;s ID or UID
1305
1400
  # @param endpoint_id [String] The ep&#39;s ID or UID
1306
1401
  # @param event_example_in [EventExampleIn]
@@ -1313,7 +1408,7 @@ module Svix
1313
1408
  end
1314
1409
 
1315
1410
  # Send Event Type Example Message
1316
- # Send an example message for event
1411
+ # Send an example message for an event
1317
1412
  # @param app_id [String] The app&#39;s ID or UID
1318
1413
  # @param endpoint_id [String] The ep&#39;s ID or UID
1319
1414
  # @param event_example_in [EventExampleIn]
@@ -1915,6 +2010,109 @@ module Svix
1915
2010
  return data, status_code, headers
1916
2011
  end
1917
2012
 
2013
+ # Update Endpoint Mtls Config
2014
+ # Create/update endpoint mTLS configuration
2015
+ # @param app_id [String] The app&#39;s ID or UID
2016
+ # @param endpoint_id [String] The ep&#39;s ID or UID
2017
+ # @param endpoint_mtls_config_in [EndpointMtlsConfigIn]
2018
+ # @param [Hash] opts the optional parameters
2019
+ # @return [nil]
2020
+ def v1_endpoint_update_mtls_config(app_id, endpoint_id, endpoint_mtls_config_in, opts = {})
2021
+ v1_endpoint_update_mtls_config_with_http_info(app_id, endpoint_id, endpoint_mtls_config_in, opts)
2022
+ nil
2023
+ end
2024
+
2025
+ # Update Endpoint Mtls Config
2026
+ # Create/update endpoint mTLS configuration
2027
+ # @param app_id [String] The app&#39;s ID or UID
2028
+ # @param endpoint_id [String] The ep&#39;s ID or UID
2029
+ # @param endpoint_mtls_config_in [EndpointMtlsConfigIn]
2030
+ # @param [Hash] opts the optional parameters
2031
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
2032
+ def v1_endpoint_update_mtls_config_with_http_info(app_id, endpoint_id, endpoint_mtls_config_in, opts = {})
2033
+ if @api_client.config.debugging
2034
+ @api_client.config.logger.debug 'Calling API: EndpointApi.v1_endpoint_update_mtls_config ...'
2035
+ end
2036
+ # verify the required parameter 'app_id' is set
2037
+ if @api_client.config.client_side_validation && app_id.nil?
2038
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling EndpointApi.v1_endpoint_update_mtls_config"
2039
+ end
2040
+ if @api_client.config.client_side_validation && app_id.to_s.length > 256
2041
+ fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.v1_endpoint_update_mtls_config, the character length must be smaller than or equal to 256.'
2042
+ end
2043
+
2044
+ if @api_client.config.client_side_validation && app_id.to_s.length < 1
2045
+ fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.v1_endpoint_update_mtls_config, the character length must be great than or equal to 1.'
2046
+ end
2047
+
2048
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
2049
+ if @api_client.config.client_side_validation && app_id !~ pattern
2050
+ fail ArgumentError, "invalid value for 'app_id' when calling EndpointApi.v1_endpoint_update_mtls_config, must conform to the pattern #{pattern}."
2051
+ end
2052
+
2053
+ # verify the required parameter 'endpoint_id' is set
2054
+ if @api_client.config.client_side_validation && endpoint_id.nil?
2055
+ fail ArgumentError, "Missing the required parameter 'endpoint_id' when calling EndpointApi.v1_endpoint_update_mtls_config"
2056
+ end
2057
+ if @api_client.config.client_side_validation && endpoint_id.to_s.length > 256
2058
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.v1_endpoint_update_mtls_config, the character length must be smaller than or equal to 256.'
2059
+ end
2060
+
2061
+ if @api_client.config.client_side_validation && endpoint_id.to_s.length < 1
2062
+ fail ArgumentError, 'invalid value for "endpoint_id" when calling EndpointApi.v1_endpoint_update_mtls_config, the character length must be great than or equal to 1.'
2063
+ end
2064
+
2065
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
2066
+ if @api_client.config.client_side_validation && endpoint_id !~ pattern
2067
+ fail ArgumentError, "invalid value for 'endpoint_id' when calling EndpointApi.v1_endpoint_update_mtls_config, must conform to the pattern #{pattern}."
2068
+ end
2069
+
2070
+ # verify the required parameter 'endpoint_mtls_config_in' is set
2071
+ if @api_client.config.client_side_validation && endpoint_mtls_config_in.nil?
2072
+ fail ArgumentError, "Missing the required parameter 'endpoint_mtls_config_in' when calling EndpointApi.v1_endpoint_update_mtls_config"
2073
+ end
2074
+ # resource path
2075
+ local_var_path = '/api/v1/app/{app_id}/endpoint/{endpoint_id}/mtls'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'endpoint_id' + '}', CGI.escape(endpoint_id.to_s))
2076
+
2077
+ # query parameters
2078
+ query_params = opts[:query_params] || {}
2079
+
2080
+ # header parameters
2081
+ header_params = opts[:header_params] || {}
2082
+ # HTTP header 'Accept' (if needed)
2083
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2084
+ # HTTP header 'Content-Type'
2085
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2086
+
2087
+ # form parameters
2088
+ form_params = opts[:form_params] || {}
2089
+
2090
+ # http body (model)
2091
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(endpoint_mtls_config_in)
2092
+
2093
+ # return_type
2094
+ return_type = opts[:debug_return_type]
2095
+
2096
+ # auth_names
2097
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
2098
+
2099
+ new_options = opts.merge(
2100
+ :operation => :"EndpointApi.v1_endpoint_update_mtls_config",
2101
+ :header_params => header_params,
2102
+ :query_params => query_params,
2103
+ :form_params => form_params,
2104
+ :body => post_body,
2105
+ :auth_names => auth_names,
2106
+ :return_type => return_type
2107
+ )
2108
+
2109
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
2110
+ if @api_client.config.debugging
2111
+ @api_client.config.logger.debug "API called: EndpointApi#v1_endpoint_update_mtls_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2112
+ end
2113
+ return data, status_code, headers
2114
+ end
2115
+
1918
2116
  # Update Endpoint Oauth Config
1919
2117
  # Create/update endpoint OAuth configuration
1920
2118
  # @param app_id [String] The app&#39;s ID or UID
@@ -2017,5 +2215,280 @@ module Svix
2017
2215
  end
2018
2216
  return data, status_code, headers
2019
2217
  end
2218
+
2219
+ # Create Sink
2220
+ # Create a new sink for the application.
2221
+ # @param app_id [String] The app&#39;s ID or UID
2222
+ # @param sink_in [SinkIn]
2223
+ # @param [Hash] opts the optional parameters
2224
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
2225
+ # @return [SinkOut]
2226
+ def v1_sink_create(app_id, sink_in, opts = {})
2227
+ data, _status_code, _headers = v1_sink_create_with_http_info(app_id, sink_in, opts)
2228
+ data
2229
+ end
2230
+
2231
+ # Create Sink
2232
+ # Create a new sink for the application.
2233
+ # @param app_id [String] The app&#39;s ID or UID
2234
+ # @param sink_in [SinkIn]
2235
+ # @param [Hash] opts the optional parameters
2236
+ # @option opts [String] :idempotency_key The request&#39;s idempotency key
2237
+ # @return [Array<(SinkOut, Integer, Hash)>] SinkOut data, response status code and response headers
2238
+ def v1_sink_create_with_http_info(app_id, sink_in, opts = {})
2239
+ if @api_client.config.debugging
2240
+ @api_client.config.logger.debug 'Calling API: EndpointApi.v1_sink_create ...'
2241
+ end
2242
+ # verify the required parameter 'app_id' is set
2243
+ if @api_client.config.client_side_validation && app_id.nil?
2244
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling EndpointApi.v1_sink_create"
2245
+ end
2246
+ if @api_client.config.client_side_validation && app_id.to_s.length > 256
2247
+ fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.v1_sink_create, the character length must be smaller than or equal to 256.'
2248
+ end
2249
+
2250
+ if @api_client.config.client_side_validation && app_id.to_s.length < 1
2251
+ fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.v1_sink_create, the character length must be great than or equal to 1.'
2252
+ end
2253
+
2254
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
2255
+ if @api_client.config.client_side_validation && app_id !~ pattern
2256
+ fail ArgumentError, "invalid value for 'app_id' when calling EndpointApi.v1_sink_create, must conform to the pattern #{pattern}."
2257
+ end
2258
+
2259
+ # verify the required parameter 'sink_in' is set
2260
+ if @api_client.config.client_side_validation && sink_in.nil?
2261
+ fail ArgumentError, "Missing the required parameter 'sink_in' when calling EndpointApi.v1_sink_create"
2262
+ end
2263
+ # resource path
2264
+ local_var_path = '/api/v1/app/{app_id}/sink'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
2265
+
2266
+ # query parameters
2267
+ query_params = opts[:query_params] || {}
2268
+
2269
+ # header parameters
2270
+ header_params = opts[:header_params] || {}
2271
+ # HTTP header 'Accept' (if needed)
2272
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2273
+ # HTTP header 'Content-Type'
2274
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2275
+ header_params[:'idempotency-key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
2276
+
2277
+ # form parameters
2278
+ form_params = opts[:form_params] || {}
2279
+
2280
+ # http body (model)
2281
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(sink_in)
2282
+
2283
+ # return_type
2284
+ return_type = opts[:debug_return_type] || 'SinkOut'
2285
+
2286
+ # auth_names
2287
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
2288
+
2289
+ new_options = opts.merge(
2290
+ :operation => :"EndpointApi.v1_sink_create",
2291
+ :header_params => header_params,
2292
+ :query_params => query_params,
2293
+ :form_params => form_params,
2294
+ :body => post_body,
2295
+ :auth_names => auth_names,
2296
+ :return_type => return_type
2297
+ )
2298
+
2299
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2300
+ if @api_client.config.debugging
2301
+ @api_client.config.logger.debug "API called: EndpointApi#v1_sink_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2302
+ end
2303
+ return data, status_code, headers
2304
+ end
2305
+
2306
+ # Get Sink
2307
+ # Get a sink.
2308
+ # @param app_id [String] The app&#39;s ID or UID
2309
+ # @param sink_id [String] The ep&#39;s ID or UID
2310
+ # @param [Hash] opts the optional parameters
2311
+ # @return [SinkOut]
2312
+ def v1_sink_get(app_id, sink_id, opts = {})
2313
+ data, _status_code, _headers = v1_sink_get_with_http_info(app_id, sink_id, opts)
2314
+ data
2315
+ end
2316
+
2317
+ # Get Sink
2318
+ # Get a sink.
2319
+ # @param app_id [String] The app&#39;s ID or UID
2320
+ # @param sink_id [String] The ep&#39;s ID or UID
2321
+ # @param [Hash] opts the optional parameters
2322
+ # @return [Array<(SinkOut, Integer, Hash)>] SinkOut data, response status code and response headers
2323
+ def v1_sink_get_with_http_info(app_id, sink_id, opts = {})
2324
+ if @api_client.config.debugging
2325
+ @api_client.config.logger.debug 'Calling API: EndpointApi.v1_sink_get ...'
2326
+ end
2327
+ # verify the required parameter 'app_id' is set
2328
+ if @api_client.config.client_side_validation && app_id.nil?
2329
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling EndpointApi.v1_sink_get"
2330
+ end
2331
+ if @api_client.config.client_side_validation && app_id.to_s.length > 256
2332
+ fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.v1_sink_get, the character length must be smaller than or equal to 256.'
2333
+ end
2334
+
2335
+ if @api_client.config.client_side_validation && app_id.to_s.length < 1
2336
+ fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.v1_sink_get, the character length must be great than or equal to 1.'
2337
+ end
2338
+
2339
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
2340
+ if @api_client.config.client_side_validation && app_id !~ pattern
2341
+ fail ArgumentError, "invalid value for 'app_id' when calling EndpointApi.v1_sink_get, must conform to the pattern #{pattern}."
2342
+ end
2343
+
2344
+ # verify the required parameter 'sink_id' is set
2345
+ if @api_client.config.client_side_validation && sink_id.nil?
2346
+ fail ArgumentError, "Missing the required parameter 'sink_id' when calling EndpointApi.v1_sink_get"
2347
+ end
2348
+ if @api_client.config.client_side_validation && sink_id.to_s.length > 256
2349
+ fail ArgumentError, 'invalid value for "sink_id" when calling EndpointApi.v1_sink_get, the character length must be smaller than or equal to 256.'
2350
+ end
2351
+
2352
+ if @api_client.config.client_side_validation && sink_id.to_s.length < 1
2353
+ fail ArgumentError, 'invalid value for "sink_id" when calling EndpointApi.v1_sink_get, the character length must be great than or equal to 1.'
2354
+ end
2355
+
2356
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
2357
+ if @api_client.config.client_side_validation && sink_id !~ pattern
2358
+ fail ArgumentError, "invalid value for 'sink_id' when calling EndpointApi.v1_sink_get, must conform to the pattern #{pattern}."
2359
+ end
2360
+
2361
+ # resource path
2362
+ local_var_path = '/api/v1/app/{app_id}/sink/{sink_id}'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s)).sub('{' + 'sink_id' + '}', CGI.escape(sink_id.to_s))
2363
+
2364
+ # query parameters
2365
+ query_params = opts[:query_params] || {}
2366
+
2367
+ # header parameters
2368
+ header_params = opts[:header_params] || {}
2369
+ # HTTP header 'Accept' (if needed)
2370
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2371
+
2372
+ # form parameters
2373
+ form_params = opts[:form_params] || {}
2374
+
2375
+ # http body (model)
2376
+ post_body = opts[:debug_body]
2377
+
2378
+ # return_type
2379
+ return_type = opts[:debug_return_type] || 'SinkOut'
2380
+
2381
+ # auth_names
2382
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
2383
+
2384
+ new_options = opts.merge(
2385
+ :operation => :"EndpointApi.v1_sink_get",
2386
+ :header_params => header_params,
2387
+ :query_params => query_params,
2388
+ :form_params => form_params,
2389
+ :body => post_body,
2390
+ :auth_names => auth_names,
2391
+ :return_type => return_type
2392
+ )
2393
+
2394
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2395
+ if @api_client.config.debugging
2396
+ @api_client.config.logger.debug "API called: EndpointApi#v1_sink_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2397
+ end
2398
+ return data, status_code, headers
2399
+ end
2400
+
2401
+ # List Sinks
2402
+ # List the application's sinks.
2403
+ # @param app_id [String] The app&#39;s ID or UID
2404
+ # @param [Hash] opts the optional parameters
2405
+ # @option opts [Integer] :limit Limit the number of returned items
2406
+ # @option opts [String] :iterator The iterator returned from a prior invocation
2407
+ # @option opts [Ordering] :order The sorting order of the returned items
2408
+ # @return [ListResponseSinkOut]
2409
+ def v1_sink_list(app_id, opts = {})
2410
+ data, _status_code, _headers = v1_sink_list_with_http_info(app_id, opts)
2411
+ data
2412
+ end
2413
+
2414
+ # List Sinks
2415
+ # List the application&#39;s sinks.
2416
+ # @param app_id [String] The app&#39;s ID or UID
2417
+ # @param [Hash] opts the optional parameters
2418
+ # @option opts [Integer] :limit Limit the number of returned items
2419
+ # @option opts [String] :iterator The iterator returned from a prior invocation
2420
+ # @option opts [Ordering] :order The sorting order of the returned items
2421
+ # @return [Array<(ListResponseSinkOut, Integer, Hash)>] ListResponseSinkOut data, response status code and response headers
2422
+ def v1_sink_list_with_http_info(app_id, opts = {})
2423
+ if @api_client.config.debugging
2424
+ @api_client.config.logger.debug 'Calling API: EndpointApi.v1_sink_list ...'
2425
+ end
2426
+ # verify the required parameter 'app_id' is set
2427
+ if @api_client.config.client_side_validation && app_id.nil?
2428
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling EndpointApi.v1_sink_list"
2429
+ end
2430
+ if @api_client.config.client_side_validation && app_id.to_s.length > 256
2431
+ fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.v1_sink_list, the character length must be smaller than or equal to 256.'
2432
+ end
2433
+
2434
+ if @api_client.config.client_side_validation && app_id.to_s.length < 1
2435
+ fail ArgumentError, 'invalid value for "app_id" when calling EndpointApi.v1_sink_list, the character length must be great than or equal to 1.'
2436
+ end
2437
+
2438
+ pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
2439
+ if @api_client.config.client_side_validation && app_id !~ pattern
2440
+ fail ArgumentError, "invalid value for 'app_id' when calling EndpointApi.v1_sink_list, must conform to the pattern #{pattern}."
2441
+ end
2442
+
2443
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 250
2444
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling EndpointApi.v1_sink_list, must be smaller than or equal to 250.'
2445
+ end
2446
+
2447
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
2448
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling EndpointApi.v1_sink_list, must be greater than or equal to 1.'
2449
+ end
2450
+
2451
+ # resource path
2452
+ local_var_path = '/api/v1/app/{app_id}/sink'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
2453
+
2454
+ # query parameters
2455
+ query_params = opts[:query_params] || {}
2456
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
2457
+ query_params[:'iterator'] = opts[:'iterator'] if !opts[:'iterator'].nil?
2458
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
2459
+
2460
+ # header parameters
2461
+ header_params = opts[:header_params] || {}
2462
+ # HTTP header 'Accept' (if needed)
2463
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2464
+
2465
+ # form parameters
2466
+ form_params = opts[:form_params] || {}
2467
+
2468
+ # http body (model)
2469
+ post_body = opts[:debug_body]
2470
+
2471
+ # return_type
2472
+ return_type = opts[:debug_return_type] || 'ListResponseSinkOut'
2473
+
2474
+ # auth_names
2475
+ auth_names = opts[:debug_auth_names] || ['HTTPBearer']
2476
+
2477
+ new_options = opts.merge(
2478
+ :operation => :"EndpointApi.v1_sink_list",
2479
+ :header_params => header_params,
2480
+ :query_params => query_params,
2481
+ :form_params => form_params,
2482
+ :body => post_body,
2483
+ :auth_names => auth_names,
2484
+ :return_type => return_type
2485
+ )
2486
+
2487
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
2488
+ if @api_client.config.debugging
2489
+ @api_client.config.logger.debug "API called: EndpointApi#v1_sink_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2490
+ end
2491
+ return data, status_code, headers
2492
+ end
2020
2493
  end
2021
2494
  end