svix 1.60.1 → 1.61.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 (279) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +5 -1
  3. data/Gemfile.lock +35 -21
  4. data/README.md +0 -7
  5. data/lib/svix/api/application.rb +96 -0
  6. data/lib/svix/api/authentication.rb +65 -0
  7. data/lib/svix/api/background_task.rb +39 -0
  8. data/lib/svix/api/endpoint.rb +202 -0
  9. data/lib/svix/api/environment.rb +39 -0
  10. data/lib/svix/api/event_type.rb +99 -0
  11. data/lib/svix/api/health.rb +21 -0
  12. data/lib/svix/api/integration.rb +91 -0
  13. data/lib/svix/api/message.rb +112 -0
  14. data/lib/svix/api/message_attempt.rb +123 -0
  15. data/lib/svix/api/operational_webhook_endpoint.rb +109 -0
  16. data/lib/svix/api/statistics.rb +36 -0
  17. data/lib/svix/api_error.rb +7 -17
  18. data/lib/svix/errors.rb +9 -9
  19. data/lib/svix/http_error_out.rb +18 -0
  20. data/lib/svix/http_validation_error.rb +18 -0
  21. data/lib/svix/internal.rb +0 -9
  22. data/lib/svix/models/aggregate_event_types_out.rb +32 -292
  23. data/lib/svix/models/app_portal_access_in.rb +31 -278
  24. data/lib/svix/models/app_portal_access_out.rb +27 -243
  25. data/lib/svix/models/app_usage_stats_in.rb +30 -234
  26. data/lib/svix/models/app_usage_stats_out.rb +31 -320
  27. data/lib/svix/models/application_in.rb +31 -298
  28. data/lib/svix/models/application_out.rb +37 -371
  29. data/lib/svix/models/application_patch.rb +31 -272
  30. data/lib/svix/models/application_token_expire_in.rb +28 -219
  31. data/lib/svix/models/background_task_out.rb +31 -307
  32. data/lib/svix/models/background_task_status.rb +14 -25
  33. data/lib/svix/models/background_task_type.rb +23 -26
  34. data/lib/svix/models/connector_in.rb +58 -385
  35. data/lib/svix/models/connector_kind.rb +28 -26
  36. data/lib/svix/models/dashboard_access_out.rb +27 -243
  37. data/lib/svix/models/endpoint_headers_in.rb +25 -202
  38. data/lib/svix/models/endpoint_headers_out.rb +30 -230
  39. data/lib/svix/models/endpoint_headers_patch_in.rb +28 -202
  40. data/lib/svix/models/endpoint_in.rb +61 -449
  41. data/lib/svix/models/endpoint_message_out.rb +48 -467
  42. data/lib/svix/models/endpoint_out.rb +67 -528
  43. data/lib/svix/models/endpoint_patch.rb +61 -383
  44. data/lib/svix/models/endpoint_secret_out.rb +25 -222
  45. data/lib/svix/models/endpoint_secret_rotate_in.rb +28 -212
  46. data/lib/svix/models/endpoint_stats.rb +31 -245
  47. data/lib/svix/models/endpoint_transformation_in.rb +30 -226
  48. data/lib/svix/models/endpoint_transformation_out.rb +30 -228
  49. data/lib/svix/models/endpoint_update.rb +58 -422
  50. data/lib/svix/models/environment_in.rb +31 -212
  51. data/lib/svix/models/environment_out.rb +35 -255
  52. data/lib/svix/models/event_example_in.rb +27 -261
  53. data/lib/svix/models/event_type_from_open_api.rb +35 -341
  54. data/lib/svix/models/event_type_import_open_api_in.rb +37 -228
  55. data/lib/svix/models/event_type_import_open_api_out.rb +28 -200
  56. data/lib/svix/models/event_type_import_open_api_out_data.rb +31 -211
  57. data/lib/svix/models/event_type_in.rb +37 -347
  58. data/lib/svix/models/event_type_out.rb +58 -389
  59. data/lib/svix/models/event_type_patch.rb +35 -289
  60. data/lib/svix/models/event_type_update.rb +35 -301
  61. data/lib/svix/models/expung_all_contents_out.rb +29 -292
  62. data/lib/svix/models/integration_in.rb +27 -239
  63. data/lib/svix/models/integration_key_out.rb +25 -200
  64. data/lib/svix/models/integration_out.rb +33 -324
  65. data/lib/svix/models/integration_update.rb +27 -239
  66. data/lib/svix/models/list_response_application_out.rb +34 -237
  67. data/lib/svix/models/list_response_background_task_out.rb +34 -237
  68. data/lib/svix/models/list_response_endpoint_message_out.rb +34 -237
  69. data/lib/svix/models/list_response_endpoint_out.rb +34 -237
  70. data/lib/svix/models/list_response_event_type_out.rb +34 -237
  71. data/lib/svix/models/list_response_integration_out.rb +34 -237
  72. data/lib/svix/models/list_response_message_attempt_out.rb +34 -237
  73. data/lib/svix/models/list_response_message_endpoint_out.rb +34 -237
  74. data/lib/svix/models/list_response_message_out.rb +34 -237
  75. data/lib/svix/models/list_response_operational_webhook_endpoint_out.rb +34 -237
  76. data/lib/svix/models/message_attempt_out.rb +64 -521
  77. data/lib/svix/models/message_attempt_trigger_type.rb +20 -28
  78. data/lib/svix/models/message_endpoint_out.rb +70 -557
  79. data/lib/svix/models/message_in.rb +58 -450
  80. data/lib/svix/models/message_out.rb +37 -414
  81. data/lib/svix/models/message_status.rb +24 -30
  82. data/lib/svix/models/operational_webhook_endpoint_headers_in.rb +28 -202
  83. data/lib/svix/models/operational_webhook_endpoint_headers_out.rb +30 -229
  84. data/lib/svix/models/operational_webhook_endpoint_in.rb +42 -380
  85. data/lib/svix/models/operational_webhook_endpoint_out.rb +64 -458
  86. data/lib/svix/models/operational_webhook_endpoint_secret_in.rb +28 -212
  87. data/lib/svix/models/operational_webhook_endpoint_secret_out.rb +28 -222
  88. data/lib/svix/models/operational_webhook_endpoint_update.rb +40 -353
  89. data/lib/svix/models/ordering.rb +15 -25
  90. data/lib/svix/models/recover_in.rb +28 -210
  91. data/lib/svix/models/recover_out.rb +29 -292
  92. data/lib/svix/models/replay_in.rb +28 -210
  93. data/lib/svix/models/replay_out.rb +29 -292
  94. data/lib/svix/models/status_code_class.rb +28 -32
  95. data/lib/svix/models/template_out.rb +70 -514
  96. data/lib/svix/svix.rb +50 -50
  97. data/lib/svix/svix_http_client.rb +110 -0
  98. data/lib/svix/util.rb +44 -25
  99. data/lib/svix/validation_error.rb +28 -0
  100. data/lib/svix/version.rb +1 -1
  101. data/lib/svix/webhook.rb +69 -65
  102. data/lib/svix.rb +51 -37
  103. data/svix.gemspec +1 -10
  104. metadata +22 -194
  105. data/lib/svix/api/application_api.rb +0 -772
  106. data/lib/svix/api/authentication_api.rb +0 -791
  107. data/lib/svix/api/background_tasks_api.rb +0 -191
  108. data/lib/svix/api/broadcast_api.rb +0 -93
  109. data/lib/svix/api/endpoint_api.rb +0 -2752
  110. data/lib/svix/api/environment_api.rb +0 -153
  111. data/lib/svix/api/environment_settings_api.rb +0 -79
  112. data/lib/svix/api/event_type_api.rb +0 -852
  113. data/lib/svix/api/events_api.rb +0 -102
  114. data/lib/svix/api/health_api.rb +0 -79
  115. data/lib/svix/api/inbound_api.rb +0 -209
  116. data/lib/svix/api/integration_api.rb +0 -707
  117. data/lib/svix/api/message_api.rb +0 -1192
  118. data/lib/svix/api/message_attempt_api.rb +0 -1245
  119. data/lib/svix/api/statistics_api.rb +0 -333
  120. data/lib/svix/api/stream_api.rb +0 -659
  121. data/lib/svix/api/stream_event_types_api.rb +0 -486
  122. data/lib/svix/api/transformation_template_api.rb +0 -967
  123. data/lib/svix/api/webhook_endpoint_api.rb +0 -748
  124. data/lib/svix/api_client.rb +0 -423
  125. data/lib/svix/application_api.rb +0 -35
  126. data/lib/svix/authentication_api.rb +0 -21
  127. data/lib/svix/background_tasks_api.rb +0 -17
  128. data/lib/svix/configuration.rb +0 -312
  129. data/lib/svix/endpoint_api.rb +0 -80
  130. data/lib/svix/event_type_api.rb +0 -37
  131. data/lib/svix/integration_api.rb +0 -38
  132. data/lib/svix/message_api.rb +0 -54
  133. data/lib/svix/message_attempt_api.rb +0 -51
  134. data/lib/svix/models/active_application_out.rb +0 -373
  135. data/lib/svix/models/active_endpoint_out.rb +0 -355
  136. data/lib/svix/models/aggregated_event_types.rb +0 -305
  137. data/lib/svix/models/application_message_failure.rb +0 -277
  138. data/lib/svix/models/application_message_id_pair.rb +0 -317
  139. data/lib/svix/models/application_stats.rb +0 -323
  140. data/lib/svix/models/application_stats_out.rb +0 -324
  141. data/lib/svix/models/attempt_statistics_data.rb +0 -229
  142. data/lib/svix/models/attempt_statistics_response.rb +0 -291
  143. data/lib/svix/models/auth_token_out.rb +0 -325
  144. data/lib/svix/models/azure_blob_storage_config.rb +0 -253
  145. data/lib/svix/models/background_task_finished_event.rb +0 -272
  146. data/lib/svix/models/background_task_finished_event2.rb +0 -331
  147. data/lib/svix/models/big_query_config.rb +0 -271
  148. data/lib/svix/models/border_radius_config.rb +0 -254
  149. data/lib/svix/models/border_radius_enum.rb +0 -43
  150. data/lib/svix/models/client_secret_jwt_params_in.rb +0 -297
  151. data/lib/svix/models/completion_choice.rb +0 -253
  152. data/lib/svix/models/completion_message.rb +0 -237
  153. data/lib/svix/models/count_out.rb +0 -258
  154. data/lib/svix/models/create_stream_in.rb +0 -232
  155. data/lib/svix/models/create_token_in.rb +0 -248
  156. data/lib/svix/models/custom_color_palette.rb +0 -295
  157. data/lib/svix/models/custom_strings_override.rb +0 -235
  158. data/lib/svix/models/custom_theme_override.rb +0 -223
  159. data/lib/svix/models/data.rb +0 -108
  160. data/lib/svix/models/data_any_of.rb +0 -240
  161. data/lib/svix/models/data_any_of1.rb +0 -223
  162. data/lib/svix/models/data_any_of2.rb +0 -241
  163. data/lib/svix/models/data_any_of3.rb +0 -223
  164. data/lib/svix/models/data_any_of4.rb +0 -240
  165. data/lib/svix/models/duration.rb +0 -275
  166. data/lib/svix/models/endpoint_created_event.rb +0 -272
  167. data/lib/svix/models/endpoint_created_event_data.rb +0 -410
  168. data/lib/svix/models/endpoint_deleted_event.rb +0 -272
  169. data/lib/svix/models/endpoint_deleted_event_data.rb +0 -410
  170. data/lib/svix/models/endpoint_disabled_event.rb +0 -272
  171. data/lib/svix/models/endpoint_disabled_event_data.rb +0 -451
  172. data/lib/svix/models/endpoint_disabled_trigger.rb +0 -40
  173. data/lib/svix/models/endpoint_enabled_event.rb +0 -272
  174. data/lib/svix/models/endpoint_enabled_event_data.rb +0 -410
  175. data/lib/svix/models/endpoint_mtls_config_in.rb +0 -233
  176. data/lib/svix/models/endpoint_mtls_config_out.rb +0 -215
  177. data/lib/svix/models/endpoint_oauth_config_in.rb +0 -350
  178. data/lib/svix/models/endpoint_oauth_config_out.rb +0 -315
  179. data/lib/svix/models/endpoint_transformation_simulate_in.rb +0 -330
  180. data/lib/svix/models/endpoint_transformation_simulate_out.rb +0 -296
  181. data/lib/svix/models/endpoint_updated_event.rb +0 -272
  182. data/lib/svix/models/endpoint_updated_event_data.rb +0 -410
  183. data/lib/svix/models/environment_settings_out.rb +0 -455
  184. data/lib/svix/models/event_in.rb +0 -258
  185. data/lib/svix/models/event_out.rb +0 -274
  186. data/lib/svix/models/event_stream_out.rb +0 -255
  187. data/lib/svix/models/event_type_example_out.rb +0 -221
  188. data/lib/svix/models/event_type_schema_in.rb +0 -221
  189. data/lib/svix/models/export_event_type_out.rb +0 -315
  190. data/lib/svix/models/font_size_config.rb +0 -230
  191. data/lib/svix/models/generate_in.rb +0 -221
  192. data/lib/svix/models/generate_out.rb +0 -287
  193. data/lib/svix/models/google_cloud_storage_config.rb +0 -239
  194. data/lib/svix/models/http_error_out.rb +0 -237
  195. data/lib/svix/models/http_validation_error.rb +0 -223
  196. data/lib/svix/models/hubspot_oauth_config_in.rb +0 -221
  197. data/lib/svix/models/inbound_path_params.rb +0 -277
  198. data/lib/svix/models/incoming_webhook_payload_out.rb +0 -235
  199. data/lib/svix/models/kafka_security_protocol_type.rb +0 -41
  200. data/lib/svix/models/list_response_active_application_out.rb +0 -261
  201. data/lib/svix/models/list_response_application_stats.rb +0 -261
  202. data/lib/svix/models/list_response_message_attempt_endpoint_out.rb +0 -261
  203. data/lib/svix/models/list_response_sink_out.rb +0 -261
  204. data/lib/svix/models/list_response_stream_event_type_out.rb +0 -261
  205. data/lib/svix/models/list_response_stream_out.rb +0 -261
  206. data/lib/svix/models/list_response_stream_sink_out.rb +0 -261
  207. data/lib/svix/models/list_response_template_out.rb +0 -261
  208. data/lib/svix/models/message_attempt_endpoint_out.rb +0 -545
  209. data/lib/svix/models/message_attempt_exhausted_event.rb +0 -272
  210. data/lib/svix/models/message_attempt_exhausted_event_data.rb +0 -482
  211. data/lib/svix/models/message_attempt_failed_data.rb +0 -293
  212. data/lib/svix/models/message_attempt_failing_event.rb +0 -272
  213. data/lib/svix/models/message_attempt_failing_event_data.rb +0 -482
  214. data/lib/svix/models/message_attempt_headers_out.rb +0 -263
  215. data/lib/svix/models/message_attempt_recovered_event.rb +0 -272
  216. data/lib/svix/models/message_attempt_recovered_event_data.rb +0 -482
  217. data/lib/svix/models/message_broadcast_in.rb +0 -423
  218. data/lib/svix/models/message_broadcast_out.rb +0 -315
  219. data/lib/svix/models/message_events_out.rb +0 -255
  220. data/lib/svix/models/message_precheck_in.rb +0 -288
  221. data/lib/svix/models/message_precheck_out.rb +0 -221
  222. data/lib/svix/models/message_raw_payload_out.rb +0 -221
  223. data/lib/svix/models/message_subscriber_auth_token_out.rb +0 -237
  224. data/lib/svix/models/o_auth_payload_in.rb +0 -237
  225. data/lib/svix/models/o_auth_payload_out.rb +0 -235
  226. data/lib/svix/models/oauth2_auth_method_in_out.rb +0 -41
  227. data/lib/svix/models/oauth2_grant_type_in_out.rb +0 -40
  228. data/lib/svix/models/oauth_jws_signing_algorithm.rb +0 -39
  229. data/lib/svix/models/one_time_token_in.rb +0 -221
  230. data/lib/svix/models/one_time_token_out.rb +0 -221
  231. data/lib/svix/models/polling_endpoint_message_out.rb +0 -454
  232. data/lib/svix/models/polling_endpoint_out.rb +0 -255
  233. data/lib/svix/models/redshift_config.rb +0 -317
  234. data/lib/svix/models/retry_schedule_in_out.rb +0 -216
  235. data/lib/svix/models/rotate_poller_token_in.rb +0 -280
  236. data/lib/svix/models/rotated_url_out.rb +0 -221
  237. data/lib/svix/models/s3_config.rb +0 -269
  238. data/lib/svix/models/sink_http_config.rb +0 -242
  239. data/lib/svix/models/sink_in.rb +0 -108
  240. data/lib/svix/models/sink_in_one_of.rb +0 -287
  241. data/lib/svix/models/sink_in_one_of1.rb +0 -319
  242. data/lib/svix/models/sink_in_one_of2.rb +0 -325
  243. data/lib/svix/models/sink_in_one_of3.rb +0 -271
  244. data/lib/svix/models/sink_in_one_of4.rb +0 -255
  245. data/lib/svix/models/sink_otel_v1_config.rb +0 -221
  246. data/lib/svix/models/sink_out.rb +0 -108
  247. data/lib/svix/models/sink_payload_format.rb +0 -39
  248. data/lib/svix/models/sink_secret_out.rb +0 -233
  249. data/lib/svix/models/sink_status.rb +0 -41
  250. data/lib/svix/models/sink_status_in.rb +0 -40
  251. data/lib/svix/models/sink_transform_in.rb +0 -248
  252. data/lib/svix/models/sink_transformation_out.rb +0 -226
  253. data/lib/svix/models/snowflake_config.rb +0 -287
  254. data/lib/svix/models/statistics_period.rb +0 -40
  255. data/lib/svix/models/stream_event_type_in.rb +0 -262
  256. data/lib/svix/models/stream_event_type_out.rb +0 -294
  257. data/lib/svix/models/stream_event_type_patch.rb +0 -254
  258. data/lib/svix/models/stream_in.rb +0 -287
  259. data/lib/svix/models/stream_out.rb +0 -350
  260. data/lib/svix/models/stream_patch.rb +0 -261
  261. data/lib/svix/models/stream_portal_access_in.rb +0 -293
  262. data/lib/svix/models/stream_sink_in.rb +0 -111
  263. data/lib/svix/models/stream_sink_in_one_of.rb +0 -271
  264. data/lib/svix/models/stream_sink_in_one_of1.rb +0 -271
  265. data/lib/svix/models/stream_sink_in_one_of2.rb +0 -271
  266. data/lib/svix/models/stream_sink_in_one_of3.rb +0 -271
  267. data/lib/svix/models/stream_sink_in_one_of4.rb +0 -271
  268. data/lib/svix/models/stream_sink_in_one_of5.rb +0 -271
  269. data/lib/svix/models/stream_sink_in_one_of6.rb +0 -271
  270. data/lib/svix/models/stream_sink_in_one_of7.rb +0 -271
  271. data/lib/svix/models/stream_sink_out.rb +0 -111
  272. data/lib/svix/models/stream_sink_patch.rb +0 -111
  273. data/lib/svix/models/template_patch.rb +0 -382
  274. data/lib/svix/models/template_update.rb +0 -402
  275. data/lib/svix/models/transformation_http_method.rb +0 -41
  276. data/lib/svix/models/transformation_simulate_in.rb +0 -330
  277. data/lib/svix/models/transformation_simulate_out.rb +0 -296
  278. data/lib/svix/models/validation_error.rb +0 -259
  279. data/lib/svix/statistics_api.rb +0 -17
@@ -1,350 +0,0 @@
1
- =begin
2
- #Svix API
3
-
4
- #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
-
6
- The version of the OpenAPI document: 1.1.1
7
-
8
- Generated by: https://openapi-generator.tech
9
- Generator version: 7.9.0
10
-
11
- =end
12
-
13
- require 'date'
14
- require 'time'
15
-
16
- module Svix
17
- class EndpointOauthConfigIn
18
- attr_accessor :auth_method
19
-
20
- # The client ID. Required for all authentication types.
21
- attr_accessor :client_id
22
-
23
- # Optional client secret. This is only used for `clientSecretBasic` and `clientSecretPost`. For `clientSecretBasic`, the secret will be appended to the `Authorization` header. For `clientSecretPost`, this will be added to the body in a `client_secret` parameter.
24
- attr_accessor :client_secret
25
-
26
- # Extra parameters added to the request body as key-value pairs.
27
- attr_accessor :extra_params
28
-
29
- attr_accessor :grant_type
30
-
31
- attr_accessor :jwt_params
32
-
33
- # For `refreshToken` grant type.
34
- attr_accessor :refresh_token
35
-
36
- # Optional OAuth scopes added to the request body.
37
- attr_accessor :scopes
38
-
39
- # The URL of the authorization server.
40
- attr_accessor :token_url
41
-
42
- class EnumAttributeValidator
43
- attr_reader :datatype
44
- attr_reader :allowable_values
45
-
46
- def initialize(datatype, allowable_values)
47
- @allowable_values = allowable_values.map do |value|
48
- case datatype.to_s
49
- when /Integer/i
50
- value.to_i
51
- when /Float/i
52
- value.to_f
53
- else
54
- value
55
- end
56
- end
57
- end
58
-
59
- def valid?(value)
60
- !value || allowable_values.include?(value)
61
- end
62
- end
63
-
64
- # Attribute mapping from ruby-style variable name to JSON key.
65
- def self.attribute_map
66
- {
67
- :'auth_method' => :'authMethod',
68
- :'client_id' => :'clientId',
69
- :'client_secret' => :'clientSecret',
70
- :'extra_params' => :'extraParams',
71
- :'grant_type' => :'grantType',
72
- :'jwt_params' => :'jwtParams',
73
- :'refresh_token' => :'refreshToken',
74
- :'scopes' => :'scopes',
75
- :'token_url' => :'tokenUrl'
76
- }
77
- end
78
-
79
- # Returns all the JSON keys this model knows about
80
- def self.acceptable_attributes
81
- attribute_map.values
82
- end
83
-
84
- # Attribute type mapping.
85
- def self.openapi_types
86
- {
87
- :'auth_method' => :'Oauth2AuthMethodInOut',
88
- :'client_id' => :'String',
89
- :'client_secret' => :'String',
90
- :'extra_params' => :'Hash<String, String>',
91
- :'grant_type' => :'Oauth2GrantTypeInOut',
92
- :'jwt_params' => :'ClientSecretJwtParamsIn',
93
- :'refresh_token' => :'String',
94
- :'scopes' => :'Array<String>',
95
- :'token_url' => :'String'
96
- }
97
- end
98
-
99
- # List of attributes with nullable: true
100
- def self.openapi_nullable
101
- Set.new([
102
- :'client_secret',
103
- :'extra_params',
104
- :'refresh_token',
105
- :'scopes',
106
- ])
107
- end
108
-
109
- # Initializes the object
110
- # @param [Hash] attributes Model attributes in the form of hash
111
- def initialize(attributes = {})
112
- if (!attributes.is_a?(Hash))
113
- fail ArgumentError, "The input argument (attributes) must be a hash in `Svix::EndpointOauthConfigIn` initialize method"
114
- end
115
-
116
- # check to see if the attribute exists and convert string to symbol for hash key
117
- attributes = attributes.each_with_object({}) { |(k, v), h|
118
- if (!self.class.attribute_map.key?(k.to_sym))
119
- fail ArgumentError, "`#{k}` is not a valid attribute in `Svix::EndpointOauthConfigIn`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
120
- end
121
- h[k.to_sym] = v
122
- }
123
-
124
- if attributes.key?(:'auth_method')
125
- self.auth_method = attributes[:'auth_method']
126
- else
127
- self.auth_method = nil
128
- end
129
-
130
- if attributes.key?(:'client_id')
131
- self.client_id = attributes[:'client_id']
132
- else
133
- self.client_id = nil
134
- end
135
-
136
- if attributes.key?(:'client_secret')
137
- self.client_secret = attributes[:'client_secret']
138
- end
139
-
140
- if attributes.key?(:'extra_params')
141
- if (value = attributes[:'extra_params']).is_a?(Hash)
142
- self.extra_params = value
143
- end
144
- end
145
-
146
- if attributes.key?(:'grant_type')
147
- self.grant_type = attributes[:'grant_type']
148
- else
149
- self.grant_type = nil
150
- end
151
-
152
- if attributes.key?(:'jwt_params')
153
- self.jwt_params = attributes[:'jwt_params']
154
- end
155
-
156
- if attributes.key?(:'refresh_token')
157
- self.refresh_token = attributes[:'refresh_token']
158
- end
159
-
160
- if attributes.key?(:'scopes')
161
- if (value = attributes[:'scopes']).is_a?(Array)
162
- self.scopes = value
163
- end
164
- end
165
-
166
- if attributes.key?(:'token_url')
167
- self.token_url = attributes[:'token_url']
168
- else
169
- self.token_url = nil
170
- end
171
- end
172
-
173
- # Show invalid properties with the reasons. Usually used together with valid?
174
- # @return Array for valid properties with the reasons
175
- def list_invalid_properties
176
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
177
- invalid_properties = Array.new
178
- if @auth_method.nil?
179
- invalid_properties.push('invalid value for "auth_method", auth_method cannot be nil.')
180
- end
181
-
182
- if @client_id.nil?
183
- invalid_properties.push('invalid value for "client_id", client_id cannot be nil.')
184
- end
185
-
186
- if @grant_type.nil?
187
- invalid_properties.push('invalid value for "grant_type", grant_type cannot be nil.')
188
- end
189
-
190
- if @token_url.nil?
191
- invalid_properties.push('invalid value for "token_url", token_url cannot be nil.')
192
- end
193
-
194
- invalid_properties
195
- end
196
-
197
- # Check to see if the all the properties in the model are valid
198
- # @return true if the model is valid
199
- def valid?
200
- warn '[DEPRECATED] the `valid?` method is obsolete'
201
- return false if @auth_method.nil?
202
- return false if @client_id.nil?
203
- return false if @grant_type.nil?
204
- return false if @token_url.nil?
205
- true
206
- end
207
-
208
- # Checks equality by comparing each attribute.
209
- # @param [Object] Object to be compared
210
- def ==(o)
211
- return true if self.equal?(o)
212
- self.class == o.class &&
213
- auth_method == o.auth_method &&
214
- client_id == o.client_id &&
215
- client_secret == o.client_secret &&
216
- extra_params == o.extra_params &&
217
- grant_type == o.grant_type &&
218
- jwt_params == o.jwt_params &&
219
- refresh_token == o.refresh_token &&
220
- scopes == o.scopes &&
221
- token_url == o.token_url
222
- end
223
-
224
- # @see the `==` method
225
- # @param [Object] Object to be compared
226
- def eql?(o)
227
- self == o
228
- end
229
-
230
- # Calculates hash code according to all attributes.
231
- # @return [Integer] Hash code
232
- def hash
233
- [auth_method, client_id, client_secret, extra_params, grant_type, jwt_params, refresh_token, scopes, token_url].hash
234
- end
235
-
236
- # Builds the object from hash
237
- # @param [Hash] attributes Model attributes in the form of hash
238
- # @return [Object] Returns the model itself
239
- def self.build_from_hash(attributes)
240
- return nil unless attributes.is_a?(Hash)
241
- attributes = attributes.transform_keys(&:to_sym)
242
- transformed_hash = {}
243
- openapi_types.each_pair do |key, type|
244
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
245
- transformed_hash["#{key}"] = nil
246
- elsif type =~ /\AArray<(.*)>/i
247
- # check to ensure the input is an array given that the attribute
248
- # is documented as an array but the input is not
249
- if attributes[attribute_map[key]].is_a?(Array)
250
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
251
- end
252
- elsif !attributes[attribute_map[key]].nil?
253
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
254
- end
255
- end
256
- new(transformed_hash)
257
- end
258
-
259
- # Deserializes the data based on type
260
- # @param string type Data type
261
- # @param string value Value to be deserialized
262
- # @return [Object] Deserialized data
263
- def self._deserialize(type, value)
264
- case type.to_sym
265
- when :Time
266
- Time.parse(value)
267
- when :Date
268
- Date.parse(value)
269
- when :String
270
- value.to_s
271
- when :Integer
272
- value.to_i
273
- when :Float
274
- value.to_f
275
- when :Boolean
276
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
277
- true
278
- else
279
- false
280
- end
281
- when :Object
282
- # generic object (usually a Hash), return directly
283
- value
284
- when /\AArray<(?<inner_type>.+)>\z/
285
- inner_type = Regexp.last_match[:inner_type]
286
- value.map { |v| _deserialize(inner_type, v) }
287
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
288
- k_type = Regexp.last_match[:k_type]
289
- v_type = Regexp.last_match[:v_type]
290
- {}.tap do |hash|
291
- value.each do |k, v|
292
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
293
- end
294
- end
295
- else # model
296
- # models (e.g. Pet) or oneOf
297
- klass = Svix.const_get(type)
298
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
299
- end
300
- end
301
-
302
- # Returns the string representation of the object
303
- # @return [String] String presentation of the object
304
- def to_s
305
- to_hash.to_s
306
- end
307
-
308
- # to_body is an alias to to_hash (backward compatibility)
309
- # @return [Hash] Returns the object in the form of hash
310
- def to_body
311
- to_hash
312
- end
313
-
314
- # Returns the object in the form of hash
315
- # @return [Hash] Returns the object in the form of hash
316
- def to_hash
317
- hash = {}
318
- self.class.attribute_map.each_pair do |attr, param|
319
- value = self.send(attr)
320
- if value.nil?
321
- is_nullable = self.class.openapi_nullable.include?(attr)
322
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
323
- end
324
-
325
- hash[param] = _to_hash(value)
326
- end
327
- hash
328
- end
329
-
330
- # Outputs non-array value in the form of hash
331
- # For object, use to_hash. Otherwise, just return the value
332
- # @param [Object] value Any valid value
333
- # @return [Hash] Returns the value in the form of hash
334
- def _to_hash(value)
335
- if value.is_a?(Array)
336
- value.compact.map { |v| _to_hash(v) }
337
- elsif value.is_a?(Hash)
338
- {}.tap do |hash|
339
- value.each { |k, v| hash[k] = _to_hash(v) }
340
- end
341
- elsif value.respond_to? :to_hash
342
- value.to_hash
343
- else
344
- value
345
- end
346
- end
347
-
348
- end
349
-
350
- end
@@ -1,315 +0,0 @@
1
- =begin
2
- #Svix API
3
-
4
- #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
-
6
- The version of the OpenAPI document: 1.1.1
7
-
8
- Generated by: https://openapi-generator.tech
9
- Generator version: 7.9.0
10
-
11
- =end
12
-
13
- require 'date'
14
- require 'time'
15
-
16
- module Svix
17
- class EndpointOauthConfigOut
18
- attr_accessor :auth_method
19
-
20
- attr_accessor :client_id
21
-
22
- attr_accessor :extra_params
23
-
24
- attr_accessor :grant_type
25
-
26
- attr_accessor :scopes
27
-
28
- attr_accessor :token_url
29
-
30
- class EnumAttributeValidator
31
- attr_reader :datatype
32
- attr_reader :allowable_values
33
-
34
- def initialize(datatype, allowable_values)
35
- @allowable_values = allowable_values.map do |value|
36
- case datatype.to_s
37
- when /Integer/i
38
- value.to_i
39
- when /Float/i
40
- value.to_f
41
- else
42
- value
43
- end
44
- end
45
- end
46
-
47
- def valid?(value)
48
- !value || allowable_values.include?(value)
49
- end
50
- end
51
-
52
- # Attribute mapping from ruby-style variable name to JSON key.
53
- def self.attribute_map
54
- {
55
- :'auth_method' => :'authMethod',
56
- :'client_id' => :'clientId',
57
- :'extra_params' => :'extraParams',
58
- :'grant_type' => :'grantType',
59
- :'scopes' => :'scopes',
60
- :'token_url' => :'tokenUrl'
61
- }
62
- end
63
-
64
- # Returns all the JSON keys this model knows about
65
- def self.acceptable_attributes
66
- attribute_map.values
67
- end
68
-
69
- # Attribute type mapping.
70
- def self.openapi_types
71
- {
72
- :'auth_method' => :'Oauth2AuthMethodInOut',
73
- :'client_id' => :'String',
74
- :'extra_params' => :'Hash<String, String>',
75
- :'grant_type' => :'Oauth2GrantTypeInOut',
76
- :'scopes' => :'Array<String>',
77
- :'token_url' => :'String'
78
- }
79
- end
80
-
81
- # List of attributes with nullable: true
82
- def self.openapi_nullable
83
- Set.new([
84
- :'extra_params',
85
- :'scopes',
86
- ])
87
- end
88
-
89
- # Initializes the object
90
- # @param [Hash] attributes Model attributes in the form of hash
91
- def initialize(attributes = {})
92
- if (!attributes.is_a?(Hash))
93
- fail ArgumentError, "The input argument (attributes) must be a hash in `Svix::EndpointOauthConfigOut` initialize method"
94
- end
95
-
96
- # check to see if the attribute exists and convert string to symbol for hash key
97
- attributes = attributes.each_with_object({}) { |(k, v), h|
98
- if (!self.class.attribute_map.key?(k.to_sym))
99
- fail ArgumentError, "`#{k}` is not a valid attribute in `Svix::EndpointOauthConfigOut`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
100
- end
101
- h[k.to_sym] = v
102
- }
103
-
104
- if attributes.key?(:'auth_method')
105
- self.auth_method = attributes[:'auth_method']
106
- else
107
- self.auth_method = nil
108
- end
109
-
110
- if attributes.key?(:'client_id')
111
- self.client_id = attributes[:'client_id']
112
- else
113
- self.client_id = nil
114
- end
115
-
116
- if attributes.key?(:'extra_params')
117
- if (value = attributes[:'extra_params']).is_a?(Hash)
118
- self.extra_params = value
119
- end
120
- end
121
-
122
- if attributes.key?(:'grant_type')
123
- self.grant_type = attributes[:'grant_type']
124
- else
125
- self.grant_type = nil
126
- end
127
-
128
- if attributes.key?(:'scopes')
129
- if (value = attributes[:'scopes']).is_a?(Array)
130
- self.scopes = value
131
- end
132
- end
133
-
134
- if attributes.key?(:'token_url')
135
- self.token_url = attributes[:'token_url']
136
- else
137
- self.token_url = nil
138
- end
139
- end
140
-
141
- # Show invalid properties with the reasons. Usually used together with valid?
142
- # @return Array for valid properties with the reasons
143
- def list_invalid_properties
144
- warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
145
- invalid_properties = Array.new
146
- if @auth_method.nil?
147
- invalid_properties.push('invalid value for "auth_method", auth_method cannot be nil.')
148
- end
149
-
150
- if @client_id.nil?
151
- invalid_properties.push('invalid value for "client_id", client_id cannot be nil.')
152
- end
153
-
154
- if @grant_type.nil?
155
- invalid_properties.push('invalid value for "grant_type", grant_type cannot be nil.')
156
- end
157
-
158
- if @token_url.nil?
159
- invalid_properties.push('invalid value for "token_url", token_url cannot be nil.')
160
- end
161
-
162
- invalid_properties
163
- end
164
-
165
- # Check to see if the all the properties in the model are valid
166
- # @return true if the model is valid
167
- def valid?
168
- warn '[DEPRECATED] the `valid?` method is obsolete'
169
- return false if @auth_method.nil?
170
- return false if @client_id.nil?
171
- return false if @grant_type.nil?
172
- return false if @token_url.nil?
173
- true
174
- end
175
-
176
- # Checks equality by comparing each attribute.
177
- # @param [Object] Object to be compared
178
- def ==(o)
179
- return true if self.equal?(o)
180
- self.class == o.class &&
181
- auth_method == o.auth_method &&
182
- client_id == o.client_id &&
183
- extra_params == o.extra_params &&
184
- grant_type == o.grant_type &&
185
- scopes == o.scopes &&
186
- token_url == o.token_url
187
- end
188
-
189
- # @see the `==` method
190
- # @param [Object] Object to be compared
191
- def eql?(o)
192
- self == o
193
- end
194
-
195
- # Calculates hash code according to all attributes.
196
- # @return [Integer] Hash code
197
- def hash
198
- [auth_method, client_id, extra_params, grant_type, scopes, token_url].hash
199
- end
200
-
201
- # Builds the object from hash
202
- # @param [Hash] attributes Model attributes in the form of hash
203
- # @return [Object] Returns the model itself
204
- def self.build_from_hash(attributes)
205
- return nil unless attributes.is_a?(Hash)
206
- attributes = attributes.transform_keys(&:to_sym)
207
- transformed_hash = {}
208
- openapi_types.each_pair do |key, type|
209
- if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
210
- transformed_hash["#{key}"] = nil
211
- elsif type =~ /\AArray<(.*)>/i
212
- # check to ensure the input is an array given that the attribute
213
- # is documented as an array but the input is not
214
- if attributes[attribute_map[key]].is_a?(Array)
215
- transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
216
- end
217
- elsif !attributes[attribute_map[key]].nil?
218
- transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
219
- end
220
- end
221
- new(transformed_hash)
222
- end
223
-
224
- # Deserializes the data based on type
225
- # @param string type Data type
226
- # @param string value Value to be deserialized
227
- # @return [Object] Deserialized data
228
- def self._deserialize(type, value)
229
- case type.to_sym
230
- when :Time
231
- Time.parse(value)
232
- when :Date
233
- Date.parse(value)
234
- when :String
235
- value.to_s
236
- when :Integer
237
- value.to_i
238
- when :Float
239
- value.to_f
240
- when :Boolean
241
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
242
- true
243
- else
244
- false
245
- end
246
- when :Object
247
- # generic object (usually a Hash), return directly
248
- value
249
- when /\AArray<(?<inner_type>.+)>\z/
250
- inner_type = Regexp.last_match[:inner_type]
251
- value.map { |v| _deserialize(inner_type, v) }
252
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
253
- k_type = Regexp.last_match[:k_type]
254
- v_type = Regexp.last_match[:v_type]
255
- {}.tap do |hash|
256
- value.each do |k, v|
257
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
258
- end
259
- end
260
- else # model
261
- # models (e.g. Pet) or oneOf
262
- klass = Svix.const_get(type)
263
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
264
- end
265
- end
266
-
267
- # Returns the string representation of the object
268
- # @return [String] String presentation of the object
269
- def to_s
270
- to_hash.to_s
271
- end
272
-
273
- # to_body is an alias to to_hash (backward compatibility)
274
- # @return [Hash] Returns the object in the form of hash
275
- def to_body
276
- to_hash
277
- end
278
-
279
- # Returns the object in the form of hash
280
- # @return [Hash] Returns the object in the form of hash
281
- def to_hash
282
- hash = {}
283
- self.class.attribute_map.each_pair do |attr, param|
284
- value = self.send(attr)
285
- if value.nil?
286
- is_nullable = self.class.openapi_nullable.include?(attr)
287
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
288
- end
289
-
290
- hash[param] = _to_hash(value)
291
- end
292
- hash
293
- end
294
-
295
- # Outputs non-array value in the form of hash
296
- # For object, use to_hash. Otherwise, just return the value
297
- # @param [Object] value Any valid value
298
- # @return [Hash] Returns the value in the form of hash
299
- def _to_hash(value)
300
- if value.is_a?(Array)
301
- value.compact.map { |v| _to_hash(v) }
302
- elsif value.is_a?(Hash)
303
- {}.tap do |hash|
304
- value.each { |k, v| hash[k] = _to_hash(v) }
305
- end
306
- elsif value.respond_to? :to_hash
307
- value.to_hash
308
- else
309
- value
310
- end
311
- end
312
-
313
- end
314
-
315
- end