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.
- checksums.yaml +4 -4
- data/Gemfile +5 -1
- data/Gemfile.lock +35 -21
- data/README.md +0 -7
- data/lib/svix/api/application.rb +96 -0
- data/lib/svix/api/authentication.rb +65 -0
- data/lib/svix/api/background_task.rb +39 -0
- data/lib/svix/api/endpoint.rb +202 -0
- data/lib/svix/api/environment.rb +39 -0
- data/lib/svix/api/event_type.rb +99 -0
- data/lib/svix/api/health.rb +21 -0
- data/lib/svix/api/integration.rb +91 -0
- data/lib/svix/api/message.rb +112 -0
- data/lib/svix/api/message_attempt.rb +123 -0
- data/lib/svix/api/operational_webhook_endpoint.rb +109 -0
- data/lib/svix/api/statistics.rb +36 -0
- data/lib/svix/api_error.rb +7 -17
- data/lib/svix/errors.rb +9 -9
- data/lib/svix/http_error_out.rb +18 -0
- data/lib/svix/http_validation_error.rb +18 -0
- data/lib/svix/internal.rb +0 -9
- data/lib/svix/models/aggregate_event_types_out.rb +32 -292
- data/lib/svix/models/app_portal_access_in.rb +31 -278
- data/lib/svix/models/app_portal_access_out.rb +27 -243
- data/lib/svix/models/app_usage_stats_in.rb +30 -234
- data/lib/svix/models/app_usage_stats_out.rb +31 -320
- data/lib/svix/models/application_in.rb +31 -298
- data/lib/svix/models/application_out.rb +37 -371
- data/lib/svix/models/application_patch.rb +31 -272
- data/lib/svix/models/application_token_expire_in.rb +28 -219
- data/lib/svix/models/background_task_out.rb +31 -307
- data/lib/svix/models/background_task_status.rb +14 -25
- data/lib/svix/models/background_task_type.rb +23 -26
- data/lib/svix/models/connector_in.rb +58 -385
- data/lib/svix/models/connector_kind.rb +28 -26
- data/lib/svix/models/dashboard_access_out.rb +27 -243
- data/lib/svix/models/endpoint_headers_in.rb +25 -202
- data/lib/svix/models/endpoint_headers_out.rb +30 -230
- data/lib/svix/models/endpoint_headers_patch_in.rb +28 -202
- data/lib/svix/models/endpoint_in.rb +61 -449
- data/lib/svix/models/endpoint_message_out.rb +48 -467
- data/lib/svix/models/endpoint_out.rb +67 -528
- data/lib/svix/models/endpoint_patch.rb +61 -383
- data/lib/svix/models/endpoint_secret_out.rb +25 -222
- data/lib/svix/models/endpoint_secret_rotate_in.rb +28 -212
- data/lib/svix/models/endpoint_stats.rb +31 -245
- data/lib/svix/models/endpoint_transformation_in.rb +30 -226
- data/lib/svix/models/endpoint_transformation_out.rb +30 -228
- data/lib/svix/models/endpoint_update.rb +58 -422
- data/lib/svix/models/environment_in.rb +31 -212
- data/lib/svix/models/environment_out.rb +35 -255
- data/lib/svix/models/event_example_in.rb +27 -261
- data/lib/svix/models/event_type_from_open_api.rb +35 -341
- data/lib/svix/models/event_type_import_open_api_in.rb +37 -228
- data/lib/svix/models/event_type_import_open_api_out.rb +28 -200
- data/lib/svix/models/event_type_import_open_api_out_data.rb +31 -211
- data/lib/svix/models/event_type_in.rb +37 -347
- data/lib/svix/models/event_type_out.rb +58 -389
- data/lib/svix/models/event_type_patch.rb +35 -289
- data/lib/svix/models/event_type_update.rb +35 -301
- data/lib/svix/models/expung_all_contents_out.rb +29 -292
- data/lib/svix/models/integration_in.rb +27 -239
- data/lib/svix/models/integration_key_out.rb +25 -200
- data/lib/svix/models/integration_out.rb +33 -324
- data/lib/svix/models/integration_update.rb +27 -239
- data/lib/svix/models/list_response_application_out.rb +34 -237
- data/lib/svix/models/list_response_background_task_out.rb +34 -237
- data/lib/svix/models/list_response_endpoint_message_out.rb +34 -237
- data/lib/svix/models/list_response_endpoint_out.rb +34 -237
- data/lib/svix/models/list_response_event_type_out.rb +34 -237
- data/lib/svix/models/list_response_integration_out.rb +34 -237
- data/lib/svix/models/list_response_message_attempt_out.rb +34 -237
- data/lib/svix/models/list_response_message_endpoint_out.rb +34 -237
- data/lib/svix/models/list_response_message_out.rb +34 -237
- data/lib/svix/models/list_response_operational_webhook_endpoint_out.rb +34 -237
- data/lib/svix/models/message_attempt_out.rb +64 -521
- data/lib/svix/models/message_attempt_trigger_type.rb +20 -28
- data/lib/svix/models/message_endpoint_out.rb +70 -557
- data/lib/svix/models/message_in.rb +58 -450
- data/lib/svix/models/message_out.rb +37 -414
- data/lib/svix/models/message_status.rb +24 -30
- data/lib/svix/models/operational_webhook_endpoint_headers_in.rb +28 -202
- data/lib/svix/models/operational_webhook_endpoint_headers_out.rb +30 -229
- data/lib/svix/models/operational_webhook_endpoint_in.rb +42 -380
- data/lib/svix/models/operational_webhook_endpoint_out.rb +64 -458
- data/lib/svix/models/operational_webhook_endpoint_secret_in.rb +28 -212
- data/lib/svix/models/operational_webhook_endpoint_secret_out.rb +28 -222
- data/lib/svix/models/operational_webhook_endpoint_update.rb +40 -353
- data/lib/svix/models/ordering.rb +15 -25
- data/lib/svix/models/recover_in.rb +28 -210
- data/lib/svix/models/recover_out.rb +29 -292
- data/lib/svix/models/replay_in.rb +28 -210
- data/lib/svix/models/replay_out.rb +29 -292
- data/lib/svix/models/status_code_class.rb +28 -32
- data/lib/svix/models/template_out.rb +70 -514
- data/lib/svix/svix.rb +50 -50
- data/lib/svix/svix_http_client.rb +110 -0
- data/lib/svix/util.rb +44 -25
- data/lib/svix/validation_error.rb +28 -0
- data/lib/svix/version.rb +1 -1
- data/lib/svix/webhook.rb +69 -65
- data/lib/svix.rb +51 -37
- data/svix.gemspec +1 -10
- metadata +22 -194
- data/lib/svix/api/application_api.rb +0 -772
- data/lib/svix/api/authentication_api.rb +0 -791
- data/lib/svix/api/background_tasks_api.rb +0 -191
- data/lib/svix/api/broadcast_api.rb +0 -93
- data/lib/svix/api/endpoint_api.rb +0 -2752
- data/lib/svix/api/environment_api.rb +0 -153
- data/lib/svix/api/environment_settings_api.rb +0 -79
- data/lib/svix/api/event_type_api.rb +0 -852
- data/lib/svix/api/events_api.rb +0 -102
- data/lib/svix/api/health_api.rb +0 -79
- data/lib/svix/api/inbound_api.rb +0 -209
- data/lib/svix/api/integration_api.rb +0 -707
- data/lib/svix/api/message_api.rb +0 -1192
- data/lib/svix/api/message_attempt_api.rb +0 -1245
- data/lib/svix/api/statistics_api.rb +0 -333
- data/lib/svix/api/stream_api.rb +0 -659
- data/lib/svix/api/stream_event_types_api.rb +0 -486
- data/lib/svix/api/transformation_template_api.rb +0 -967
- data/lib/svix/api/webhook_endpoint_api.rb +0 -748
- data/lib/svix/api_client.rb +0 -423
- data/lib/svix/application_api.rb +0 -35
- data/lib/svix/authentication_api.rb +0 -21
- data/lib/svix/background_tasks_api.rb +0 -17
- data/lib/svix/configuration.rb +0 -312
- data/lib/svix/endpoint_api.rb +0 -80
- data/lib/svix/event_type_api.rb +0 -37
- data/lib/svix/integration_api.rb +0 -38
- data/lib/svix/message_api.rb +0 -54
- data/lib/svix/message_attempt_api.rb +0 -51
- data/lib/svix/models/active_application_out.rb +0 -373
- data/lib/svix/models/active_endpoint_out.rb +0 -355
- data/lib/svix/models/aggregated_event_types.rb +0 -305
- data/lib/svix/models/application_message_failure.rb +0 -277
- data/lib/svix/models/application_message_id_pair.rb +0 -317
- data/lib/svix/models/application_stats.rb +0 -323
- data/lib/svix/models/application_stats_out.rb +0 -324
- data/lib/svix/models/attempt_statistics_data.rb +0 -229
- data/lib/svix/models/attempt_statistics_response.rb +0 -291
- data/lib/svix/models/auth_token_out.rb +0 -325
- data/lib/svix/models/azure_blob_storage_config.rb +0 -253
- data/lib/svix/models/background_task_finished_event.rb +0 -272
- data/lib/svix/models/background_task_finished_event2.rb +0 -331
- data/lib/svix/models/big_query_config.rb +0 -271
- data/lib/svix/models/border_radius_config.rb +0 -254
- data/lib/svix/models/border_radius_enum.rb +0 -43
- data/lib/svix/models/client_secret_jwt_params_in.rb +0 -297
- data/lib/svix/models/completion_choice.rb +0 -253
- data/lib/svix/models/completion_message.rb +0 -237
- data/lib/svix/models/count_out.rb +0 -258
- data/lib/svix/models/create_stream_in.rb +0 -232
- data/lib/svix/models/create_token_in.rb +0 -248
- data/lib/svix/models/custom_color_palette.rb +0 -295
- data/lib/svix/models/custom_strings_override.rb +0 -235
- data/lib/svix/models/custom_theme_override.rb +0 -223
- data/lib/svix/models/data.rb +0 -108
- data/lib/svix/models/data_any_of.rb +0 -240
- data/lib/svix/models/data_any_of1.rb +0 -223
- data/lib/svix/models/data_any_of2.rb +0 -241
- data/lib/svix/models/data_any_of3.rb +0 -223
- data/lib/svix/models/data_any_of4.rb +0 -240
- data/lib/svix/models/duration.rb +0 -275
- data/lib/svix/models/endpoint_created_event.rb +0 -272
- data/lib/svix/models/endpoint_created_event_data.rb +0 -410
- data/lib/svix/models/endpoint_deleted_event.rb +0 -272
- data/lib/svix/models/endpoint_deleted_event_data.rb +0 -410
- data/lib/svix/models/endpoint_disabled_event.rb +0 -272
- data/lib/svix/models/endpoint_disabled_event_data.rb +0 -451
- data/lib/svix/models/endpoint_disabled_trigger.rb +0 -40
- data/lib/svix/models/endpoint_enabled_event.rb +0 -272
- data/lib/svix/models/endpoint_enabled_event_data.rb +0 -410
- data/lib/svix/models/endpoint_mtls_config_in.rb +0 -233
- data/lib/svix/models/endpoint_mtls_config_out.rb +0 -215
- data/lib/svix/models/endpoint_oauth_config_in.rb +0 -350
- data/lib/svix/models/endpoint_oauth_config_out.rb +0 -315
- data/lib/svix/models/endpoint_transformation_simulate_in.rb +0 -330
- data/lib/svix/models/endpoint_transformation_simulate_out.rb +0 -296
- data/lib/svix/models/endpoint_updated_event.rb +0 -272
- data/lib/svix/models/endpoint_updated_event_data.rb +0 -410
- data/lib/svix/models/environment_settings_out.rb +0 -455
- data/lib/svix/models/event_in.rb +0 -258
- data/lib/svix/models/event_out.rb +0 -274
- data/lib/svix/models/event_stream_out.rb +0 -255
- data/lib/svix/models/event_type_example_out.rb +0 -221
- data/lib/svix/models/event_type_schema_in.rb +0 -221
- data/lib/svix/models/export_event_type_out.rb +0 -315
- data/lib/svix/models/font_size_config.rb +0 -230
- data/lib/svix/models/generate_in.rb +0 -221
- data/lib/svix/models/generate_out.rb +0 -287
- data/lib/svix/models/google_cloud_storage_config.rb +0 -239
- data/lib/svix/models/http_error_out.rb +0 -237
- data/lib/svix/models/http_validation_error.rb +0 -223
- data/lib/svix/models/hubspot_oauth_config_in.rb +0 -221
- data/lib/svix/models/inbound_path_params.rb +0 -277
- data/lib/svix/models/incoming_webhook_payload_out.rb +0 -235
- data/lib/svix/models/kafka_security_protocol_type.rb +0 -41
- data/lib/svix/models/list_response_active_application_out.rb +0 -261
- data/lib/svix/models/list_response_application_stats.rb +0 -261
- data/lib/svix/models/list_response_message_attempt_endpoint_out.rb +0 -261
- data/lib/svix/models/list_response_sink_out.rb +0 -261
- data/lib/svix/models/list_response_stream_event_type_out.rb +0 -261
- data/lib/svix/models/list_response_stream_out.rb +0 -261
- data/lib/svix/models/list_response_stream_sink_out.rb +0 -261
- data/lib/svix/models/list_response_template_out.rb +0 -261
- data/lib/svix/models/message_attempt_endpoint_out.rb +0 -545
- data/lib/svix/models/message_attempt_exhausted_event.rb +0 -272
- data/lib/svix/models/message_attempt_exhausted_event_data.rb +0 -482
- data/lib/svix/models/message_attempt_failed_data.rb +0 -293
- data/lib/svix/models/message_attempt_failing_event.rb +0 -272
- data/lib/svix/models/message_attempt_failing_event_data.rb +0 -482
- data/lib/svix/models/message_attempt_headers_out.rb +0 -263
- data/lib/svix/models/message_attempt_recovered_event.rb +0 -272
- data/lib/svix/models/message_attempt_recovered_event_data.rb +0 -482
- data/lib/svix/models/message_broadcast_in.rb +0 -423
- data/lib/svix/models/message_broadcast_out.rb +0 -315
- data/lib/svix/models/message_events_out.rb +0 -255
- data/lib/svix/models/message_precheck_in.rb +0 -288
- data/lib/svix/models/message_precheck_out.rb +0 -221
- data/lib/svix/models/message_raw_payload_out.rb +0 -221
- data/lib/svix/models/message_subscriber_auth_token_out.rb +0 -237
- data/lib/svix/models/o_auth_payload_in.rb +0 -237
- data/lib/svix/models/o_auth_payload_out.rb +0 -235
- data/lib/svix/models/oauth2_auth_method_in_out.rb +0 -41
- data/lib/svix/models/oauth2_grant_type_in_out.rb +0 -40
- data/lib/svix/models/oauth_jws_signing_algorithm.rb +0 -39
- data/lib/svix/models/one_time_token_in.rb +0 -221
- data/lib/svix/models/one_time_token_out.rb +0 -221
- data/lib/svix/models/polling_endpoint_message_out.rb +0 -454
- data/lib/svix/models/polling_endpoint_out.rb +0 -255
- data/lib/svix/models/redshift_config.rb +0 -317
- data/lib/svix/models/retry_schedule_in_out.rb +0 -216
- data/lib/svix/models/rotate_poller_token_in.rb +0 -280
- data/lib/svix/models/rotated_url_out.rb +0 -221
- data/lib/svix/models/s3_config.rb +0 -269
- data/lib/svix/models/sink_http_config.rb +0 -242
- data/lib/svix/models/sink_in.rb +0 -108
- data/lib/svix/models/sink_in_one_of.rb +0 -287
- data/lib/svix/models/sink_in_one_of1.rb +0 -319
- data/lib/svix/models/sink_in_one_of2.rb +0 -325
- data/lib/svix/models/sink_in_one_of3.rb +0 -271
- data/lib/svix/models/sink_in_one_of4.rb +0 -255
- data/lib/svix/models/sink_otel_v1_config.rb +0 -221
- data/lib/svix/models/sink_out.rb +0 -108
- data/lib/svix/models/sink_payload_format.rb +0 -39
- data/lib/svix/models/sink_secret_out.rb +0 -233
- data/lib/svix/models/sink_status.rb +0 -41
- data/lib/svix/models/sink_status_in.rb +0 -40
- data/lib/svix/models/sink_transform_in.rb +0 -248
- data/lib/svix/models/sink_transformation_out.rb +0 -226
- data/lib/svix/models/snowflake_config.rb +0 -287
- data/lib/svix/models/statistics_period.rb +0 -40
- data/lib/svix/models/stream_event_type_in.rb +0 -262
- data/lib/svix/models/stream_event_type_out.rb +0 -294
- data/lib/svix/models/stream_event_type_patch.rb +0 -254
- data/lib/svix/models/stream_in.rb +0 -287
- data/lib/svix/models/stream_out.rb +0 -350
- data/lib/svix/models/stream_patch.rb +0 -261
- data/lib/svix/models/stream_portal_access_in.rb +0 -293
- data/lib/svix/models/stream_sink_in.rb +0 -111
- data/lib/svix/models/stream_sink_in_one_of.rb +0 -271
- data/lib/svix/models/stream_sink_in_one_of1.rb +0 -271
- data/lib/svix/models/stream_sink_in_one_of2.rb +0 -271
- data/lib/svix/models/stream_sink_in_one_of3.rb +0 -271
- data/lib/svix/models/stream_sink_in_one_of4.rb +0 -271
- data/lib/svix/models/stream_sink_in_one_of5.rb +0 -271
- data/lib/svix/models/stream_sink_in_one_of6.rb +0 -271
- data/lib/svix/models/stream_sink_in_one_of7.rb +0 -271
- data/lib/svix/models/stream_sink_out.rb +0 -111
- data/lib/svix/models/stream_sink_patch.rb +0 -111
- data/lib/svix/models/template_patch.rb +0 -382
- data/lib/svix/models/template_update.rb +0 -402
- data/lib/svix/models/transformation_http_method.rb +0 -41
- data/lib/svix/models/transformation_simulate_in.rb +0 -330
- data/lib/svix/models/transformation_simulate_out.rb +0 -296
- data/lib/svix/models/validation_error.rb +0 -259
- data/lib/svix/statistics_api.rb +0 -17
@@ -1,481 +1,87 @@
|
|
1
|
-
|
2
|
-
#
|
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'
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
require "json"
|
15
4
|
|
16
5
|
module Svix
|
17
6
|
class OperationalWebhookEndpointOut
|
18
7
|
attr_accessor :created_at
|
19
|
-
|
20
|
-
# An example endpoint name.
|
21
8
|
attr_accessor :description
|
22
|
-
|
23
9
|
attr_accessor :disabled
|
24
|
-
|
25
10
|
attr_accessor :filter_types
|
26
|
-
|
27
|
-
# The Endpoint's ID.
|
28
11
|
attr_accessor :id
|
29
|
-
|
30
12
|
attr_accessor :metadata
|
31
|
-
|
32
13
|
attr_accessor :rate_limit
|
33
|
-
|
34
|
-
# Optional unique identifier for the endpoint.
|
35
14
|
attr_accessor :uid
|
36
|
-
|
37
15
|
attr_accessor :updated_at
|
38
|
-
|
39
16
|
attr_accessor :url
|
40
17
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
}
|
55
|
-
end
|
56
|
-
|
57
|
-
# Returns all the JSON keys this model knows about
|
58
|
-
def self.acceptable_attributes
|
59
|
-
attribute_map.values
|
60
|
-
end
|
61
|
-
|
62
|
-
# Attribute type mapping.
|
63
|
-
def self.openapi_types
|
64
|
-
{
|
65
|
-
:'created_at' => :'Time',
|
66
|
-
:'description' => :'String',
|
67
|
-
:'disabled' => :'Boolean',
|
68
|
-
:'filter_types' => :'Array<String>',
|
69
|
-
:'id' => :'String',
|
70
|
-
:'metadata' => :'Hash<String, String>',
|
71
|
-
:'rate_limit' => :'Integer',
|
72
|
-
:'uid' => :'String',
|
73
|
-
:'updated_at' => :'Time',
|
74
|
-
:'url' => :'String'
|
75
|
-
}
|
76
|
-
end
|
77
|
-
|
78
|
-
# List of attributes with nullable: true
|
79
|
-
def self.openapi_nullable
|
80
|
-
Set.new([
|
81
|
-
:'filter_types',
|
82
|
-
:'rate_limit',
|
83
|
-
:'uid',
|
84
|
-
])
|
85
|
-
end
|
18
|
+
ALL_FIELD ||= [
|
19
|
+
"created_at",
|
20
|
+
"description",
|
21
|
+
"disabled",
|
22
|
+
"filter_types",
|
23
|
+
"id",
|
24
|
+
"metadata",
|
25
|
+
"rate_limit",
|
26
|
+
"uid",
|
27
|
+
"updated_at",
|
28
|
+
"url"
|
29
|
+
].freeze
|
30
|
+
private_constant :ALL_FIELD
|
86
31
|
|
87
|
-
# Initializes the object
|
88
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
89
32
|
def initialize(attributes = {})
|
90
|
-
|
91
|
-
fail
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
96
|
-
if (!self.class.attribute_map.key?(k.to_sym))
|
97
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Svix::OperationalWebhookEndpointOut`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
98
|
-
end
|
99
|
-
h[k.to_sym] = v
|
100
|
-
}
|
101
|
-
|
102
|
-
if attributes.key?(:'created_at')
|
103
|
-
self.created_at = attributes[:'created_at']
|
104
|
-
else
|
105
|
-
self.created_at = nil
|
106
|
-
end
|
107
|
-
|
108
|
-
if attributes.key?(:'description')
|
109
|
-
self.description = attributes[:'description']
|
110
|
-
else
|
111
|
-
self.description = nil
|
112
|
-
end
|
113
|
-
|
114
|
-
if attributes.key?(:'disabled')
|
115
|
-
self.disabled = attributes[:'disabled']
|
116
|
-
else
|
117
|
-
self.disabled = false
|
118
|
-
end
|
119
|
-
|
120
|
-
if attributes.key?(:'filter_types')
|
121
|
-
if (value = attributes[:'filter_types']).is_a?(Array)
|
122
|
-
self.filter_types = value
|
123
|
-
end
|
124
|
-
end
|
125
|
-
|
126
|
-
if attributes.key?(:'id')
|
127
|
-
self.id = attributes[:'id']
|
128
|
-
else
|
129
|
-
self.id = nil
|
130
|
-
end
|
131
|
-
|
132
|
-
if attributes.key?(:'metadata')
|
133
|
-
if (value = attributes[:'metadata']).is_a?(Hash)
|
134
|
-
self.metadata = value
|
135
|
-
end
|
136
|
-
else
|
137
|
-
self.metadata = nil
|
138
|
-
end
|
139
|
-
|
140
|
-
if attributes.key?(:'rate_limit')
|
141
|
-
self.rate_limit = attributes[:'rate_limit']
|
142
|
-
end
|
143
|
-
|
144
|
-
if attributes.key?(:'uid')
|
145
|
-
self.uid = attributes[:'uid']
|
146
|
-
end
|
147
|
-
|
148
|
-
if attributes.key?(:'updated_at')
|
149
|
-
self.updated_at = attributes[:'updated_at']
|
150
|
-
else
|
151
|
-
self.updated_at = nil
|
152
|
-
end
|
153
|
-
|
154
|
-
if attributes.key?(:'url')
|
155
|
-
self.url = attributes[:'url']
|
156
|
-
else
|
157
|
-
self.url = nil
|
158
|
-
end
|
159
|
-
end
|
160
|
-
|
161
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
162
|
-
# @return Array for valid properties with the reasons
|
163
|
-
def list_invalid_properties
|
164
|
-
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
165
|
-
invalid_properties = Array.new
|
166
|
-
if @created_at.nil?
|
167
|
-
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
168
|
-
end
|
169
|
-
|
170
|
-
if @description.nil?
|
171
|
-
invalid_properties.push('invalid value for "description", description cannot be nil.')
|
172
|
-
end
|
173
|
-
|
174
|
-
if !@filter_types.nil? && @filter_types.length < 1
|
175
|
-
invalid_properties.push('invalid value for "filter_types", number of items must be greater than or equal to 1.')
|
176
|
-
end
|
177
|
-
|
178
|
-
if @id.nil?
|
179
|
-
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
180
|
-
end
|
181
|
-
|
182
|
-
if @id.to_s.length > 30
|
183
|
-
invalid_properties.push('invalid value for "id", the character length must be smaller than or equal to 30.')
|
184
|
-
end
|
185
|
-
|
186
|
-
if @id.to_s.length < 30
|
187
|
-
invalid_properties.push('invalid value for "id", the character length must be great than or equal to 30.')
|
188
|
-
end
|
189
|
-
|
190
|
-
pattern = Regexp.new(/^ep_[A-Za-z0-9]{27}$/)
|
191
|
-
if @id !~ pattern
|
192
|
-
invalid_properties.push("invalid value for \"id\", must conform to the pattern #{pattern}.")
|
193
|
-
end
|
194
|
-
|
195
|
-
if @metadata.nil?
|
196
|
-
invalid_properties.push('invalid value for "metadata", metadata cannot be nil.')
|
197
|
-
end
|
198
|
-
|
199
|
-
if !@rate_limit.nil? && @rate_limit < 0
|
200
|
-
invalid_properties.push('invalid value for "rate_limit", must be greater than or equal to 0.')
|
201
|
-
end
|
202
|
-
|
203
|
-
if !@uid.nil? && @uid.to_s.length > 256
|
204
|
-
invalid_properties.push('invalid value for "uid", the character length must be smaller than or equal to 256.')
|
205
|
-
end
|
206
|
-
|
207
|
-
if !@uid.nil? && @uid.to_s.length < 1
|
208
|
-
invalid_properties.push('invalid value for "uid", the character length must be great than or equal to 1.')
|
209
|
-
end
|
210
|
-
|
211
|
-
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
212
|
-
if !@uid.nil? && @uid !~ pattern
|
213
|
-
invalid_properties.push("invalid value for \"uid\", must conform to the pattern #{pattern}.")
|
214
|
-
end
|
215
|
-
|
216
|
-
if @updated_at.nil?
|
217
|
-
invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
|
218
|
-
end
|
219
|
-
|
220
|
-
if @url.nil?
|
221
|
-
invalid_properties.push('invalid value for "url", url cannot be nil.')
|
222
|
-
end
|
223
|
-
|
224
|
-
if @url.to_s.length > 65536
|
225
|
-
invalid_properties.push('invalid value for "url", the character length must be smaller than or equal to 65536.')
|
226
|
-
end
|
227
|
-
|
228
|
-
if @url.to_s.length < 1
|
229
|
-
invalid_properties.push('invalid value for "url", the character length must be great than or equal to 1.')
|
230
|
-
end
|
231
|
-
|
232
|
-
invalid_properties
|
233
|
-
end
|
234
|
-
|
235
|
-
# Check to see if the all the properties in the model are valid
|
236
|
-
# @return true if the model is valid
|
237
|
-
def valid?
|
238
|
-
warn '[DEPRECATED] the `valid?` method is obsolete'
|
239
|
-
return false if @created_at.nil?
|
240
|
-
return false if @description.nil?
|
241
|
-
return false if !@filter_types.nil? && @filter_types.length < 1
|
242
|
-
return false if @id.nil?
|
243
|
-
return false if @id.to_s.length > 30
|
244
|
-
return false if @id.to_s.length < 30
|
245
|
-
return false if @id !~ Regexp.new(/^ep_[A-Za-z0-9]{27}$/)
|
246
|
-
return false if @metadata.nil?
|
247
|
-
return false if !@rate_limit.nil? && @rate_limit < 0
|
248
|
-
return false if !@uid.nil? && @uid.to_s.length > 256
|
249
|
-
return false if !@uid.nil? && @uid.to_s.length < 1
|
250
|
-
return false if !@uid.nil? && @uid !~ Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
251
|
-
return false if @updated_at.nil?
|
252
|
-
return false if @url.nil?
|
253
|
-
return false if @url.to_s.length > 65536
|
254
|
-
return false if @url.to_s.length < 1
|
255
|
-
true
|
256
|
-
end
|
257
|
-
|
258
|
-
# Custom attribute writer method with validation
|
259
|
-
# @param [Object] filter_types Value to be assigned
|
260
|
-
def filter_types=(filter_types)
|
261
|
-
if !filter_types.nil? && filter_types.length < 1
|
262
|
-
fail ArgumentError, 'invalid value for "filter_types", number of items must be greater than or equal to 1.'
|
263
|
-
end
|
264
|
-
|
265
|
-
@filter_types = filter_types
|
266
|
-
end
|
267
|
-
|
268
|
-
# Custom attribute writer method with validation
|
269
|
-
# @param [Object] id Value to be assigned
|
270
|
-
def id=(id)
|
271
|
-
if id.nil?
|
272
|
-
fail ArgumentError, 'id cannot be nil'
|
273
|
-
end
|
274
|
-
|
275
|
-
if id.to_s.length > 30
|
276
|
-
fail ArgumentError, 'invalid value for "id", the character length must be smaller than or equal to 30.'
|
277
|
-
end
|
278
|
-
|
279
|
-
if id.to_s.length < 30
|
280
|
-
fail ArgumentError, 'invalid value for "id", the character length must be great than or equal to 30.'
|
281
|
-
end
|
282
|
-
|
283
|
-
pattern = Regexp.new(/^ep_[A-Za-z0-9]{27}$/)
|
284
|
-
if id !~ pattern
|
285
|
-
fail ArgumentError, "invalid value for \"id\", must conform to the pattern #{pattern}."
|
286
|
-
end
|
287
|
-
|
288
|
-
@id = id
|
289
|
-
end
|
290
|
-
|
291
|
-
# Custom attribute writer method with validation
|
292
|
-
# @param [Object] rate_limit Value to be assigned
|
293
|
-
def rate_limit=(rate_limit)
|
294
|
-
if !rate_limit.nil? && rate_limit < 0
|
295
|
-
fail ArgumentError, 'invalid value for "rate_limit", must be greater than or equal to 0.'
|
33
|
+
unless attributes.is_a?(Hash)
|
34
|
+
fail(
|
35
|
+
ArgumentError,
|
36
|
+
"The input argument (attributes) must be a hash in `Svix::OperationalWebhookEndpointOut` new method"
|
37
|
+
)
|
296
38
|
end
|
297
39
|
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
# Custom attribute writer method with validation
|
302
|
-
# @param [Object] uid Value to be assigned
|
303
|
-
def uid=(uid)
|
304
|
-
if !uid.nil? && uid.to_s.length > 256
|
305
|
-
fail ArgumentError, 'invalid value for "uid", the character length must be smaller than or equal to 256.'
|
306
|
-
end
|
307
|
-
|
308
|
-
if !uid.nil? && uid.to_s.length < 1
|
309
|
-
fail ArgumentError, 'invalid value for "uid", the character length must be great than or equal to 1.'
|
310
|
-
end
|
311
|
-
|
312
|
-
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
313
|
-
if !uid.nil? && uid !~ pattern
|
314
|
-
fail ArgumentError, "invalid value for \"uid\", must conform to the pattern #{pattern}."
|
315
|
-
end
|
316
|
-
|
317
|
-
@uid = uid
|
318
|
-
end
|
319
|
-
|
320
|
-
# Custom attribute writer method with validation
|
321
|
-
# @param [Object] url Value to be assigned
|
322
|
-
def url=(url)
|
323
|
-
if url.nil?
|
324
|
-
fail ArgumentError, 'url cannot be nil'
|
325
|
-
end
|
326
|
-
|
327
|
-
if url.to_s.length > 65536
|
328
|
-
fail ArgumentError, 'invalid value for "url", the character length must be smaller than or equal to 65536.'
|
329
|
-
end
|
330
|
-
|
331
|
-
if url.to_s.length < 1
|
332
|
-
fail ArgumentError, 'invalid value for "url", the character length must be great than or equal to 1.'
|
333
|
-
end
|
334
|
-
|
335
|
-
@url = url
|
336
|
-
end
|
337
|
-
|
338
|
-
# Checks equality by comparing each attribute.
|
339
|
-
# @param [Object] Object to be compared
|
340
|
-
def ==(o)
|
341
|
-
return true if self.equal?(o)
|
342
|
-
self.class == o.class &&
|
343
|
-
created_at == o.created_at &&
|
344
|
-
description == o.description &&
|
345
|
-
disabled == o.disabled &&
|
346
|
-
filter_types == o.filter_types &&
|
347
|
-
id == o.id &&
|
348
|
-
metadata == o.metadata &&
|
349
|
-
rate_limit == o.rate_limit &&
|
350
|
-
uid == o.uid &&
|
351
|
-
updated_at == o.updated_at &&
|
352
|
-
url == o.url
|
353
|
-
end
|
354
|
-
|
355
|
-
# @see the `==` method
|
356
|
-
# @param [Object] Object to be compared
|
357
|
-
def eql?(o)
|
358
|
-
self == o
|
359
|
-
end
|
360
|
-
|
361
|
-
# Calculates hash code according to all attributes.
|
362
|
-
# @return [Integer] Hash code
|
363
|
-
def hash
|
364
|
-
[created_at, description, disabled, filter_types, id, metadata, rate_limit, uid, updated_at, url].hash
|
365
|
-
end
|
366
|
-
|
367
|
-
# Builds the object from hash
|
368
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
369
|
-
# @return [Object] Returns the model itself
|
370
|
-
def self.build_from_hash(attributes)
|
371
|
-
return nil unless attributes.is_a?(Hash)
|
372
|
-
attributes = attributes.transform_keys(&:to_sym)
|
373
|
-
transformed_hash = {}
|
374
|
-
openapi_types.each_pair do |key, type|
|
375
|
-
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
376
|
-
transformed_hash["#{key}"] = nil
|
377
|
-
elsif type =~ /\AArray<(.*)>/i
|
378
|
-
# check to ensure the input is an array given that the attribute
|
379
|
-
# is documented as an array but the input is not
|
380
|
-
if attributes[attribute_map[key]].is_a?(Array)
|
381
|
-
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
382
|
-
end
|
383
|
-
elsif !attributes[attribute_map[key]].nil?
|
384
|
-
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
40
|
+
attributes.each do |k, v|
|
41
|
+
unless ALL_FIELD.include?(k.to_s)
|
42
|
+
fail(ArgumentError, "The field #{k} is not part of Svix::OperationalWebhookEndpointOut")
|
385
43
|
end
|
386
|
-
end
|
387
|
-
new(transformed_hash)
|
388
|
-
end
|
389
44
|
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
end
|
45
|
+
instance_variable_set("@#{k}", v)
|
46
|
+
instance_variable_set("@__#{k}_is_defined", true)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
def self.deserialize(attributes = {})
|
51
|
+
attributes = attributes.transform_keys(&:to_s)
|
52
|
+
attrs = Hash.new
|
53
|
+
attrs["created_at"] = DateTime.rfc3339(attributes["createdAt"]).to_time
|
54
|
+
attrs["description"] = attributes["description"]
|
55
|
+
attrs["disabled"] = attributes["disabled"]
|
56
|
+
attrs["filter_types"] = attributes["filterTypes"]
|
57
|
+
attrs["id"] = attributes["id"]
|
58
|
+
attrs["metadata"] = attributes["metadata"]
|
59
|
+
attrs["rate_limit"] = attributes["rateLimit"]
|
60
|
+
attrs["uid"] = attributes["uid"]
|
61
|
+
attrs["updated_at"] = DateTime.rfc3339(attributes["updatedAt"]).to_time
|
62
|
+
attrs["url"] = attributes["url"]
|
63
|
+
new(attrs)
|
64
|
+
end
|
65
|
+
|
66
|
+
def serialize
|
67
|
+
out = Hash.new
|
68
|
+
out["createdAt"] = Svix::serialize_primitive(@created_at) if @created_at
|
69
|
+
out["description"] = Svix::serialize_primitive(@description) if @description
|
70
|
+
out["disabled"] = Svix::serialize_primitive(@disabled) if @disabled
|
71
|
+
out["filterTypes"] = Svix::serialize_primitive(@filter_types) if @filter_types
|
72
|
+
out["id"] = Svix::serialize_primitive(@id) if @id
|
73
|
+
out["metadata"] = Svix::serialize_primitive(@metadata) if @metadata
|
74
|
+
out["rateLimit"] = Svix::serialize_primitive(@rate_limit) if @rate_limit
|
75
|
+
out["uid"] = Svix::serialize_primitive(@uid) if @uid
|
76
|
+
out["updatedAt"] = Svix::serialize_primitive(@updated_at) if @updated_at
|
77
|
+
out["url"] = Svix::serialize_primitive(@url) if @url
|
78
|
+
out
|
79
|
+
end
|
80
|
+
|
81
|
+
# Serializes the object to a json string
|
82
|
+
# @return String
|
83
|
+
def to_json
|
84
|
+
JSON.dump(serialize)
|
431
85
|
end
|
432
|
-
|
433
|
-
# Returns the string representation of the object
|
434
|
-
# @return [String] String presentation of the object
|
435
|
-
def to_s
|
436
|
-
to_hash.to_s
|
437
|
-
end
|
438
|
-
|
439
|
-
# to_body is an alias to to_hash (backward compatibility)
|
440
|
-
# @return [Hash] Returns the object in the form of hash
|
441
|
-
def to_body
|
442
|
-
to_hash
|
443
|
-
end
|
444
|
-
|
445
|
-
# Returns the object in the form of hash
|
446
|
-
# @return [Hash] Returns the object in the form of hash
|
447
|
-
def to_hash
|
448
|
-
hash = {}
|
449
|
-
self.class.attribute_map.each_pair do |attr, param|
|
450
|
-
value = self.send(attr)
|
451
|
-
if value.nil?
|
452
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
453
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
454
|
-
end
|
455
|
-
|
456
|
-
hash[param] = _to_hash(value)
|
457
|
-
end
|
458
|
-
hash
|
459
|
-
end
|
460
|
-
|
461
|
-
# Outputs non-array value in the form of hash
|
462
|
-
# For object, use to_hash. Otherwise, just return the value
|
463
|
-
# @param [Object] value Any valid value
|
464
|
-
# @return [Hash] Returns the value in the form of hash
|
465
|
-
def _to_hash(value)
|
466
|
-
if value.is_a?(Array)
|
467
|
-
value.compact.map { |v| _to_hash(v) }
|
468
|
-
elsif value.is_a?(Hash)
|
469
|
-
{}.tap do |hash|
|
470
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
471
|
-
end
|
472
|
-
elsif value.respond_to? :to_hash
|
473
|
-
value.to_hash
|
474
|
-
else
|
475
|
-
value
|
476
|
-
end
|
477
|
-
end
|
478
|
-
|
479
86
|
end
|
480
|
-
|
481
87
|
end
|