svix 1.38.0 → 1.40.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +5 -5
- data/README.md +8 -1
- data/lib/svix/api/application_api.rb +23 -14
- data/lib/svix/api/authentication_api.rb +23 -11
- data/lib/svix/api/background_tasks_api.rb +3 -3
- data/lib/svix/api/broadcast_api.rb +6 -3
- data/lib/svix/api/endpoint_api.rb +86 -44
- data/lib/svix/api/environment_api.rb +8 -5
- data/lib/svix/api/environment_settings_api.rb +2 -2
- data/lib/svix/api/event_type_api.rb +39 -21
- data/lib/svix/api/events_api.rb +2 -2
- data/lib/svix/api/health_api.rb +2 -2
- data/lib/svix/api/inbound_api.rb +7 -4
- data/lib/svix/api/integration_api.rb +16 -10
- data/lib/svix/api/message_api.rb +21 -15
- data/lib/svix/api/message_attempt_api.rb +25 -25
- data/lib/svix/api/statistics_api.rb +9 -6
- data/lib/svix/api/stream_api.rb +176 -10
- data/lib/svix/api/stream_event_types_api.rb +486 -0
- data/lib/svix/api/transformation_template_api.rb +49 -22
- data/lib/svix/api/webhook_endpoint_api.rb +572 -0
- data/lib/svix/api_client.rb +45 -28
- data/lib/svix/api_error.rb +2 -1
- data/lib/svix/configuration.rb +42 -12
- data/lib/svix/models/aggregate_event_types_out.rb +43 -19
- data/lib/svix/models/app_portal_access_in.rb +19 -19
- data/lib/svix/models/app_portal_access_out.rb +19 -19
- data/lib/svix/models/app_usage_stats_in.rb +19 -19
- data/lib/svix/models/app_usage_stats_out.rb +43 -19
- data/lib/svix/models/application_in.rb +17 -19
- data/lib/svix/models/application_out.rb +25 -19
- data/lib/svix/models/application_patch.rb +15 -19
- data/lib/svix/models/application_stats.rb +19 -19
- data/lib/svix/models/application_token_expire_in.rb +15 -19
- data/lib/svix/models/attempt_statistics_data.rb +15 -19
- data/lib/svix/models/attempt_statistics_response.rb +45 -19
- data/lib/svix/models/auth_token_out.rb +21 -19
- data/lib/svix/models/azure_blob_storage_config.rb +21 -19
- data/lib/svix/models/background_task_out.rb +45 -19
- data/lib/svix/models/background_task_status.rb +7 -4
- data/lib/svix/models/background_task_type.rb +7 -4
- data/lib/svix/models/big_query_config.rb +271 -0
- data/lib/svix/models/border_radius_config.rb +37 -19
- data/lib/svix/models/border_radius_enum.rb +7 -4
- data/lib/svix/models/client_secret_jwt_params_in.rb +41 -19
- data/lib/svix/models/completion_choice.rb +21 -19
- data/lib/svix/models/completion_message.rb +19 -19
- data/lib/svix/models/create_message_token_in.rb +17 -19
- data/lib/svix/models/create_stream_in.rb +30 -23
- data/lib/svix/models/custom_color_palette.rb +15 -19
- data/lib/svix/models/custom_strings_override.rb +15 -19
- data/lib/svix/models/custom_theme_override.rb +15 -19
- data/lib/svix/models/dashboard_access_out.rb +19 -19
- data/lib/svix/models/duration.rb +19 -19
- data/lib/svix/models/endpoint_created_event.rb +17 -19
- data/lib/svix/models/endpoint_created_event_data.rb +19 -19
- data/lib/svix/models/endpoint_deleted_event.rb +17 -19
- data/lib/svix/models/endpoint_deleted_event_data.rb +19 -19
- data/lib/svix/models/endpoint_disabled_event.rb +17 -19
- data/lib/svix/models/endpoint_disabled_event_data.rb +21 -19
- data/lib/svix/models/endpoint_headers_in.rb +17 -19
- data/lib/svix/models/endpoint_headers_out.rb +19 -19
- data/lib/svix/models/endpoint_headers_patch_in.rb +17 -19
- data/lib/svix/models/endpoint_in.rb +17 -19
- data/lib/svix/models/endpoint_message_out.rb +47 -19
- data/lib/svix/models/endpoint_mtls_config_in.rb +17 -19
- data/lib/svix/models/endpoint_oauth_config_in.rb +45 -19
- data/lib/svix/models/endpoint_out.rb +29 -19
- data/lib/svix/models/endpoint_patch.rb +20 -20
- data/lib/svix/models/endpoint_secret_out.rb +17 -19
- data/lib/svix/models/endpoint_secret_rotate_in.rb +15 -21
- data/lib/svix/models/endpoint_stats.rb +23 -19
- data/lib/svix/models/endpoint_transformation_in.rb +15 -19
- data/lib/svix/models/endpoint_transformation_out.rb +15 -19
- data/lib/svix/models/endpoint_transformation_simulate_in.rb +21 -19
- data/lib/svix/models/endpoint_transformation_simulate_out.rb +41 -19
- data/lib/svix/models/endpoint_update.rb +17 -19
- data/lib/svix/models/endpoint_updated_event.rb +17 -19
- data/lib/svix/models/endpoint_updated_event_data.rb +19 -19
- data/lib/svix/models/environment_in.rb +19 -19
- data/lib/svix/models/environment_out.rb +21 -19
- data/lib/svix/models/environment_settings_out.rb +15 -19
- data/lib/svix/models/event_example_in.rb +52 -23
- data/lib/svix/models/event_in.rb +55 -20
- data/lib/svix/models/event_out.rb +57 -20
- data/lib/svix/models/event_stream_out.rb +21 -19
- data/lib/svix/models/event_type_example_out.rb +17 -19
- data/lib/svix/models/event_type_from_open_api.rb +95 -20
- data/lib/svix/models/event_type_import_open_api_in.rb +15 -19
- data/lib/svix/models/event_type_import_open_api_out.rb +17 -19
- data/lib/svix/models/event_type_import_open_api_out_data.rb +17 -19
- data/lib/svix/models/event_type_in.rb +19 -19
- data/lib/svix/models/event_type_out.rb +25 -19
- data/lib/svix/models/event_type_patch.rb +15 -19
- data/lib/svix/models/event_type_schema_in.rb +17 -19
- data/lib/svix/models/event_type_update.rb +17 -19
- data/lib/svix/models/export_event_type_out.rb +43 -19
- data/lib/svix/models/font_size_config.rb +15 -19
- data/lib/svix/models/generate_in.rb +17 -19
- data/lib/svix/models/generate_out.rb +25 -19
- data/lib/svix/models/google_cloud_storage_config.rb +19 -19
- data/lib/svix/models/http_error_out.rb +19 -19
- data/lib/svix/models/http_validation_error.rb +17 -19
- data/lib/svix/models/hubspot_oauth_config_in.rb +17 -19
- data/lib/svix/models/inbound_path_params.rb +19 -19
- data/lib/svix/models/incoming_webhook_payload_out.rb +15 -19
- data/lib/svix/models/integration_in.rb +17 -19
- data/lib/svix/models/integration_key_out.rb +17 -19
- data/lib/svix/models/integration_out.rb +23 -19
- data/lib/svix/models/integration_update.rb +17 -19
- data/lib/svix/models/kafka_security_protocol_type.rb +7 -4
- data/lib/svix/models/list_response_application_out.rb +19 -19
- data/lib/svix/models/list_response_application_stats.rb +19 -19
- data/lib/svix/models/list_response_background_task_out.rb +19 -19
- data/lib/svix/models/list_response_endpoint_message_out.rb +19 -19
- data/lib/svix/models/list_response_endpoint_out.rb +19 -19
- data/lib/svix/models/list_response_event_type_out.rb +19 -19
- data/lib/svix/models/list_response_integration_out.rb +19 -19
- data/lib/svix/models/list_response_message_attempt_endpoint_out.rb +19 -19
- data/lib/svix/models/list_response_message_attempt_out.rb +19 -19
- data/lib/svix/models/list_response_message_endpoint_out.rb +19 -19
- data/lib/svix/models/list_response_message_out.rb +19 -19
- data/lib/svix/models/list_response_operational_webhook_endpoint_out.rb +259 -0
- data/lib/svix/models/list_response_sink_out.rb +19 -19
- data/lib/svix/models/list_response_stream_event_type_out.rb +259 -0
- data/lib/svix/models/list_response_stream_out.rb +19 -19
- data/lib/svix/models/list_response_stream_sink_out.rb +19 -19
- data/lib/svix/models/list_response_template_out.rb +19 -19
- data/lib/svix/models/message_attempt_endpoint_out.rb +57 -19
- data/lib/svix/models/message_attempt_exhausted_event.rb +17 -19
- data/lib/svix/models/message_attempt_exhausted_event_data.rb +23 -19
- data/lib/svix/models/message_attempt_failed_data.rb +21 -19
- data/lib/svix/models/message_attempt_failing_event.rb +17 -19
- data/lib/svix/models/message_attempt_failing_event_data.rb +23 -19
- data/lib/svix/models/message_attempt_headers_out.rb +19 -19
- data/lib/svix/models/message_attempt_out.rb +57 -19
- data/lib/svix/models/message_attempt_recovered_event.rb +17 -19
- data/lib/svix/models/message_attempt_recovered_event_data.rb +23 -19
- data/lib/svix/models/message_attempt_trigger_type.rb +7 -4
- data/lib/svix/models/message_broadcast_in.rb +19 -19
- data/lib/svix/models/message_broadcast_out.rb +43 -19
- data/lib/svix/models/message_endpoint_out.rb +51 -19
- data/lib/svix/models/message_events_out.rb +21 -19
- data/lib/svix/models/message_in.rb +19 -19
- data/lib/svix/models/message_out.rb +23 -19
- data/lib/svix/models/message_raw_payload_out.rb +17 -19
- data/lib/svix/models/message_status.rb +7 -4
- data/lib/svix/models/message_subscriber_auth_token_out.rb +19 -19
- data/lib/svix/models/o_auth_payload_in.rb +19 -19
- data/lib/svix/models/o_auth_payload_out.rb +15 -19
- data/lib/svix/models/oauth2_auth_method_in.rb +7 -4
- data/lib/svix/models/oauth2_grant_type_in.rb +7 -4
- data/lib/svix/models/oauth_jws_signing_algorithm.rb +7 -4
- data/lib/svix/models/one_time_token_in.rb +17 -19
- data/lib/svix/models/one_time_token_out.rb +17 -19
- data/lib/svix/models/operational_webhook_endpoint_in.rb +408 -0
- data/lib/svix/models/operational_webhook_endpoint_out.rb +442 -0
- data/lib/svix/models/operational_webhook_endpoint_secret_in.rb +233 -0
- data/lib/svix/models/operational_webhook_endpoint_secret_out.rb +243 -0
- data/lib/svix/models/operational_webhook_endpoint_update.rb +380 -0
- data/lib/svix/models/ordering.rb +7 -4
- data/lib/svix/models/recover_in.rb +17 -19
- data/lib/svix/models/recover_out.rb +43 -19
- data/lib/svix/models/redshift_config.rb +25 -19
- data/lib/svix/models/replay_in.rb +17 -19
- data/lib/svix/models/replay_out.rb +43 -19
- data/lib/svix/models/retry_schedule_in_out.rb +15 -19
- data/lib/svix/models/rotated_url_out.rb +17 -19
- data/lib/svix/models/s3_config.rb +23 -19
- data/lib/svix/models/settings_in.rb +15 -19
- data/lib/svix/models/settings_out.rb +15 -19
- data/lib/svix/models/sink_http_config.rb +17 -19
- data/lib/svix/models/sink_in.rb +4 -4
- data/lib/svix/models/sink_in_one_of.rb +21 -19
- data/lib/svix/models/sink_in_one_of1.rb +25 -19
- data/lib/svix/models/sink_in_one_of2.rb +23 -19
- data/lib/svix/models/sink_in_one_of3.rb +19 -19
- data/lib/svix/models/sink_otel_v1_config.rb +17 -19
- data/lib/svix/models/sink_out.rb +4 -4
- data/lib/svix/models/sink_payload_format.rb +7 -4
- data/lib/svix/models/sink_status.rb +7 -4
- data/lib/svix/models/sink_status_in.rb +7 -4
- data/lib/svix/models/sink_transform_in.rb +15 -19
- data/lib/svix/models/sink_transformation_out.rb +15 -19
- data/lib/svix/models/snowflake_config.rb +21 -19
- data/lib/svix/models/statistics_period.rb +7 -4
- data/lib/svix/models/status_code_class.rb +7 -4
- data/lib/svix/models/stream_event_type_in.rb +262 -0
- data/lib/svix/models/stream_event_type_out.rb +294 -0
- data/lib/svix/models/stream_event_type_patch.rb +254 -0
- data/lib/svix/models/stream_in.rb +24 -22
- data/lib/svix/models/stream_out.rb +28 -22
- data/lib/svix/models/stream_patch.rb +22 -22
- data/lib/svix/models/stream_sink_in.rb +6 -5
- data/lib/svix/models/stream_sink_in_one_of.rb +19 -19
- data/lib/svix/models/stream_sink_in_one_of1.rb +19 -19
- data/lib/svix/models/stream_sink_in_one_of2.rb +19 -19
- data/lib/svix/models/stream_sink_in_one_of3.rb +19 -19
- data/lib/svix/models/stream_sink_in_one_of4.rb +19 -19
- data/lib/svix/models/stream_sink_in_one_of5.rb +19 -19
- data/lib/svix/models/stream_sink_in_one_of6.rb +19 -19
- data/lib/svix/models/stream_sink_in_one_of7.rb +271 -0
- data/lib/svix/models/stream_sink_out.rb +6 -5
- data/lib/svix/models/stream_sink_patch.rb +6 -5
- data/lib/svix/models/template_in.rb +43 -21
- data/lib/svix/models/template_out.rb +57 -19
- data/lib/svix/models/template_patch.rb +43 -21
- data/lib/svix/models/template_update.rb +41 -19
- data/lib/svix/models/transformation_http_method.rb +7 -4
- data/lib/svix/models/transformation_simulate_in.rb +21 -19
- data/lib/svix/models/transformation_simulate_out.rb +41 -19
- data/lib/svix/models/transformation_template_kind.rb +7 -4
- data/lib/svix/models/validation_error.rb +21 -19
- data/lib/svix/operational_webhook_endpoint_api.rb +37 -0
- data/lib/svix/version.rb +1 -1
- data/svix.gemspec +12 -2
- metadata +45 -22
- data/lib/svix/api/sink_api.rb +0 -176
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 1.1.1
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.9.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -63,16 +63,21 @@ module Svix
|
|
63
63
|
|
64
64
|
if attributes.key?(:'content')
|
65
65
|
self.content = attributes[:'content']
|
66
|
+
else
|
67
|
+
self.content = nil
|
66
68
|
end
|
67
69
|
|
68
70
|
if attributes.key?(:'role')
|
69
71
|
self.role = attributes[:'role']
|
72
|
+
else
|
73
|
+
self.role = nil
|
70
74
|
end
|
71
75
|
end
|
72
76
|
|
73
77
|
# Show invalid properties with the reasons. Usually used together with valid?
|
74
78
|
# @return Array for valid properties with the reasons
|
75
79
|
def list_invalid_properties
|
80
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
76
81
|
invalid_properties = Array.new
|
77
82
|
if @content.nil?
|
78
83
|
invalid_properties.push('invalid value for "content", content cannot be nil.')
|
@@ -88,6 +93,7 @@ module Svix
|
|
88
93
|
# Check to see if the all the properties in the model are valid
|
89
94
|
# @return true if the model is valid
|
90
95
|
def valid?
|
96
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
91
97
|
return false if @content.nil?
|
92
98
|
return false if @role.nil?
|
93
99
|
true
|
@@ -118,36 +124,30 @@ module Svix
|
|
118
124
|
# @param [Hash] attributes Model attributes in the form of hash
|
119
125
|
# @return [Object] Returns the model itself
|
120
126
|
def self.build_from_hash(attributes)
|
121
|
-
new.build_from_hash(attributes)
|
122
|
-
end
|
123
|
-
|
124
|
-
# Builds the object from hash
|
125
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
126
|
-
# @return [Object] Returns the model itself
|
127
|
-
def build_from_hash(attributes)
|
128
127
|
return nil unless attributes.is_a?(Hash)
|
129
|
-
|
130
|
-
|
131
|
-
|
128
|
+
attributes = attributes.transform_keys(&:to_sym)
|
129
|
+
transformed_hash = {}
|
130
|
+
openapi_types.each_pair do |key, type|
|
131
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
132
|
+
transformed_hash["#{key}"] = nil
|
132
133
|
elsif type =~ /\AArray<(.*)>/i
|
133
134
|
# check to ensure the input is an array given that the attribute
|
134
135
|
# is documented as an array but the input is not
|
135
|
-
if attributes[
|
136
|
-
|
136
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
137
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
137
138
|
end
|
138
|
-
elsif !attributes[
|
139
|
-
|
139
|
+
elsif !attributes[attribute_map[key]].nil?
|
140
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
140
141
|
end
|
141
142
|
end
|
142
|
-
|
143
|
-
self
|
143
|
+
new(transformed_hash)
|
144
144
|
end
|
145
145
|
|
146
146
|
# Deserializes the data based on type
|
147
147
|
# @param string type Data type
|
148
148
|
# @param string value Value to be deserialized
|
149
149
|
# @return [Object] Deserialized data
|
150
|
-
def _deserialize(type, value)
|
150
|
+
def self._deserialize(type, value)
|
151
151
|
case type.to_sym
|
152
152
|
when :Time
|
153
153
|
Time.parse(value)
|
@@ -182,7 +182,7 @@ module Svix
|
|
182
182
|
else # model
|
183
183
|
# models (e.g. Pet) or oneOf
|
184
184
|
klass = Svix.const_get(type)
|
185
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
185
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
186
186
|
end
|
187
187
|
end
|
188
188
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 1.1.1
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.9.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -70,12 +70,15 @@ module Svix
|
|
70
70
|
|
71
71
|
if attributes.key?(:'name')
|
72
72
|
self.name = attributes[:'name']
|
73
|
+
else
|
74
|
+
self.name = nil
|
73
75
|
end
|
74
76
|
end
|
75
77
|
|
76
78
|
# Show invalid properties with the reasons. Usually used together with valid?
|
77
79
|
# @return Array for valid properties with the reasons
|
78
80
|
def list_invalid_properties
|
81
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
79
82
|
invalid_properties = Array.new
|
80
83
|
if !@expiry.nil? && @expiry < 0
|
81
84
|
invalid_properties.push('invalid value for "expiry", must be greater than or equal to 0.')
|
@@ -91,6 +94,7 @@ module Svix
|
|
91
94
|
# Check to see if the all the properties in the model are valid
|
92
95
|
# @return true if the model is valid
|
93
96
|
def valid?
|
97
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
94
98
|
return false if !@expiry.nil? && @expiry < 0
|
95
99
|
return false if @name.nil?
|
96
100
|
true
|
@@ -131,36 +135,30 @@ module Svix
|
|
131
135
|
# @param [Hash] attributes Model attributes in the form of hash
|
132
136
|
# @return [Object] Returns the model itself
|
133
137
|
def self.build_from_hash(attributes)
|
134
|
-
new.build_from_hash(attributes)
|
135
|
-
end
|
136
|
-
|
137
|
-
# Builds the object from hash
|
138
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
139
|
-
# @return [Object] Returns the model itself
|
140
|
-
def build_from_hash(attributes)
|
141
138
|
return nil unless attributes.is_a?(Hash)
|
142
|
-
|
143
|
-
|
144
|
-
|
139
|
+
attributes = attributes.transform_keys(&:to_sym)
|
140
|
+
transformed_hash = {}
|
141
|
+
openapi_types.each_pair do |key, type|
|
142
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
143
|
+
transformed_hash["#{key}"] = nil
|
145
144
|
elsif type =~ /\AArray<(.*)>/i
|
146
145
|
# check to ensure the input is an array given that the attribute
|
147
146
|
# is documented as an array but the input is not
|
148
|
-
if attributes[
|
149
|
-
|
147
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
148
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
150
149
|
end
|
151
|
-
elsif !attributes[
|
152
|
-
|
150
|
+
elsif !attributes[attribute_map[key]].nil?
|
151
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
153
152
|
end
|
154
153
|
end
|
155
|
-
|
156
|
-
self
|
154
|
+
new(transformed_hash)
|
157
155
|
end
|
158
156
|
|
159
157
|
# Deserializes the data based on type
|
160
158
|
# @param string type Data type
|
161
159
|
# @param string value Value to be deserialized
|
162
160
|
# @return [Object] Deserialized data
|
163
|
-
def _deserialize(type, value)
|
161
|
+
def self._deserialize(type, value)
|
164
162
|
case type.to_sym
|
165
163
|
when :Time
|
166
164
|
Time.parse(value)
|
@@ -195,7 +193,7 @@ module Svix
|
|
195
193
|
else # model
|
196
194
|
# models (e.g. Pet) or oneOf
|
197
195
|
klass = Svix.const_get(type)
|
198
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
196
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
199
197
|
end
|
200
198
|
end
|
201
199
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 1.1.1
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.9.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -17,10 +17,13 @@ module Svix
|
|
17
17
|
class CreateStreamIn
|
18
18
|
attr_accessor :messages
|
19
19
|
|
20
|
+
attr_accessor :stream
|
21
|
+
|
20
22
|
# Attribute mapping from ruby-style variable name to JSON key.
|
21
23
|
def self.attribute_map
|
22
24
|
{
|
23
|
-
:'messages' => :'messages'
|
25
|
+
:'messages' => :'messages',
|
26
|
+
:'stream' => :'stream'
|
24
27
|
}
|
25
28
|
end
|
26
29
|
|
@@ -32,7 +35,8 @@ module Svix
|
|
32
35
|
# Attribute type mapping.
|
33
36
|
def self.openapi_types
|
34
37
|
{
|
35
|
-
:'messages' => :'Array<EventIn>'
|
38
|
+
:'messages' => :'Array<EventIn>',
|
39
|
+
:'stream' => :'StreamIn'
|
36
40
|
}
|
37
41
|
end
|
38
42
|
|
@@ -61,12 +65,19 @@ module Svix
|
|
61
65
|
if (value = attributes[:'messages']).is_a?(Array)
|
62
66
|
self.messages = value
|
63
67
|
end
|
68
|
+
else
|
69
|
+
self.messages = nil
|
70
|
+
end
|
71
|
+
|
72
|
+
if attributes.key?(:'stream')
|
73
|
+
self.stream = attributes[:'stream']
|
64
74
|
end
|
65
75
|
end
|
66
76
|
|
67
77
|
# Show invalid properties with the reasons. Usually used together with valid?
|
68
78
|
# @return Array for valid properties with the reasons
|
69
79
|
def list_invalid_properties
|
80
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
70
81
|
invalid_properties = Array.new
|
71
82
|
if @messages.nil?
|
72
83
|
invalid_properties.push('invalid value for "messages", messages cannot be nil.')
|
@@ -78,6 +89,7 @@ module Svix
|
|
78
89
|
# Check to see if the all the properties in the model are valid
|
79
90
|
# @return true if the model is valid
|
80
91
|
def valid?
|
92
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
81
93
|
return false if @messages.nil?
|
82
94
|
true
|
83
95
|
end
|
@@ -87,7 +99,8 @@ module Svix
|
|
87
99
|
def ==(o)
|
88
100
|
return true if self.equal?(o)
|
89
101
|
self.class == o.class &&
|
90
|
-
messages == o.messages
|
102
|
+
messages == o.messages &&
|
103
|
+
stream == o.stream
|
91
104
|
end
|
92
105
|
|
93
106
|
# @see the `==` method
|
@@ -99,43 +112,37 @@ module Svix
|
|
99
112
|
# Calculates hash code according to all attributes.
|
100
113
|
# @return [Integer] Hash code
|
101
114
|
def hash
|
102
|
-
[messages].hash
|
115
|
+
[messages, stream].hash
|
103
116
|
end
|
104
117
|
|
105
118
|
# Builds the object from hash
|
106
119
|
# @param [Hash] attributes Model attributes in the form of hash
|
107
120
|
# @return [Object] Returns the model itself
|
108
121
|
def self.build_from_hash(attributes)
|
109
|
-
new.build_from_hash(attributes)
|
110
|
-
end
|
111
|
-
|
112
|
-
# Builds the object from hash
|
113
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
114
|
-
# @return [Object] Returns the model itself
|
115
|
-
def build_from_hash(attributes)
|
116
122
|
return nil unless attributes.is_a?(Hash)
|
117
|
-
|
118
|
-
|
119
|
-
|
123
|
+
attributes = attributes.transform_keys(&:to_sym)
|
124
|
+
transformed_hash = {}
|
125
|
+
openapi_types.each_pair do |key, type|
|
126
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
127
|
+
transformed_hash["#{key}"] = nil
|
120
128
|
elsif type =~ /\AArray<(.*)>/i
|
121
129
|
# check to ensure the input is an array given that the attribute
|
122
130
|
# is documented as an array but the input is not
|
123
|
-
if attributes[
|
124
|
-
|
131
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
132
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
125
133
|
end
|
126
|
-
elsif !attributes[
|
127
|
-
|
134
|
+
elsif !attributes[attribute_map[key]].nil?
|
135
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
128
136
|
end
|
129
137
|
end
|
130
|
-
|
131
|
-
self
|
138
|
+
new(transformed_hash)
|
132
139
|
end
|
133
140
|
|
134
141
|
# Deserializes the data based on type
|
135
142
|
# @param string type Data type
|
136
143
|
# @param string value Value to be deserialized
|
137
144
|
# @return [Object] Deserialized data
|
138
|
-
def _deserialize(type, value)
|
145
|
+
def self._deserialize(type, value)
|
139
146
|
case type.to_sym
|
140
147
|
when :Time
|
141
148
|
Time.parse(value)
|
@@ -170,7 +177,7 @@ module Svix
|
|
170
177
|
else # model
|
171
178
|
# models (e.g. Pet) or oneOf
|
172
179
|
klass = Svix.const_get(type)
|
173
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
180
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
174
181
|
end
|
175
182
|
end
|
176
183
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 1.1.1
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.9.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -138,6 +138,7 @@ module Svix
|
|
138
138
|
# Show invalid properties with the reasons. Usually used together with valid?
|
139
139
|
# @return Array for valid properties with the reasons
|
140
140
|
def list_invalid_properties
|
141
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
141
142
|
invalid_properties = Array.new
|
142
143
|
invalid_properties
|
143
144
|
end
|
@@ -145,6 +146,7 @@ module Svix
|
|
145
146
|
# Check to see if the all the properties in the model are valid
|
146
147
|
# @return true if the model is valid
|
147
148
|
def valid?
|
149
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
148
150
|
true
|
149
151
|
end
|
150
152
|
|
@@ -180,36 +182,30 @@ module Svix
|
|
180
182
|
# @param [Hash] attributes Model attributes in the form of hash
|
181
183
|
# @return [Object] Returns the model itself
|
182
184
|
def self.build_from_hash(attributes)
|
183
|
-
new.build_from_hash(attributes)
|
184
|
-
end
|
185
|
-
|
186
|
-
# Builds the object from hash
|
187
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
188
|
-
# @return [Object] Returns the model itself
|
189
|
-
def build_from_hash(attributes)
|
190
185
|
return nil unless attributes.is_a?(Hash)
|
191
|
-
|
192
|
-
|
193
|
-
|
186
|
+
attributes = attributes.transform_keys(&:to_sym)
|
187
|
+
transformed_hash = {}
|
188
|
+
openapi_types.each_pair do |key, type|
|
189
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
190
|
+
transformed_hash["#{key}"] = nil
|
194
191
|
elsif type =~ /\AArray<(.*)>/i
|
195
192
|
# check to ensure the input is an array given that the attribute
|
196
193
|
# is documented as an array but the input is not
|
197
|
-
if attributes[
|
198
|
-
|
194
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
195
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
199
196
|
end
|
200
|
-
elsif !attributes[
|
201
|
-
|
197
|
+
elsif !attributes[attribute_map[key]].nil?
|
198
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
202
199
|
end
|
203
200
|
end
|
204
|
-
|
205
|
-
self
|
201
|
+
new(transformed_hash)
|
206
202
|
end
|
207
203
|
|
208
204
|
# Deserializes the data based on type
|
209
205
|
# @param string type Data type
|
210
206
|
# @param string value Value to be deserialized
|
211
207
|
# @return [Object] Deserialized data
|
212
|
-
def _deserialize(type, value)
|
208
|
+
def self._deserialize(type, value)
|
213
209
|
case type.to_sym
|
214
210
|
when :Time
|
215
211
|
Time.parse(value)
|
@@ -244,7 +240,7 @@ module Svix
|
|
244
240
|
else # model
|
245
241
|
# models (e.g. Pet) or oneOf
|
246
242
|
klass = Svix.const_get(type)
|
247
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
243
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
248
244
|
end
|
249
245
|
end
|
250
246
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 1.1.1
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.9.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -84,6 +84,7 @@ module Svix
|
|
84
84
|
# Show invalid properties with the reasons. Usually used together with valid?
|
85
85
|
# @return Array for valid properties with the reasons
|
86
86
|
def list_invalid_properties
|
87
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
87
88
|
invalid_properties = Array.new
|
88
89
|
invalid_properties
|
89
90
|
end
|
@@ -91,6 +92,7 @@ module Svix
|
|
91
92
|
# Check to see if the all the properties in the model are valid
|
92
93
|
# @return true if the model is valid
|
93
94
|
def valid?
|
95
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
94
96
|
true
|
95
97
|
end
|
96
98
|
|
@@ -120,36 +122,30 @@ module Svix
|
|
120
122
|
# @param [Hash] attributes Model attributes in the form of hash
|
121
123
|
# @return [Object] Returns the model itself
|
122
124
|
def self.build_from_hash(attributes)
|
123
|
-
new.build_from_hash(attributes)
|
124
|
-
end
|
125
|
-
|
126
|
-
# Builds the object from hash
|
127
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
128
|
-
# @return [Object] Returns the model itself
|
129
|
-
def build_from_hash(attributes)
|
130
125
|
return nil unless attributes.is_a?(Hash)
|
131
|
-
|
132
|
-
|
133
|
-
|
126
|
+
attributes = attributes.transform_keys(&:to_sym)
|
127
|
+
transformed_hash = {}
|
128
|
+
openapi_types.each_pair do |key, type|
|
129
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
130
|
+
transformed_hash["#{key}"] = nil
|
134
131
|
elsif type =~ /\AArray<(.*)>/i
|
135
132
|
# check to ensure the input is an array given that the attribute
|
136
133
|
# is documented as an array but the input is not
|
137
|
-
if attributes[
|
138
|
-
|
134
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
135
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
139
136
|
end
|
140
|
-
elsif !attributes[
|
141
|
-
|
137
|
+
elsif !attributes[attribute_map[key]].nil?
|
138
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
142
139
|
end
|
143
140
|
end
|
144
|
-
|
145
|
-
self
|
141
|
+
new(transformed_hash)
|
146
142
|
end
|
147
143
|
|
148
144
|
# Deserializes the data based on type
|
149
145
|
# @param string type Data type
|
150
146
|
# @param string value Value to be deserialized
|
151
147
|
# @return [Object] Deserialized data
|
152
|
-
def _deserialize(type, value)
|
148
|
+
def self._deserialize(type, value)
|
153
149
|
case type.to_sym
|
154
150
|
when :Time
|
155
151
|
Time.parse(value)
|
@@ -184,7 +180,7 @@ module Svix
|
|
184
180
|
else # model
|
185
181
|
# models (e.g. Pet) or oneOf
|
186
182
|
klass = Svix.const_get(type)
|
187
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
183
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
188
184
|
end
|
189
185
|
end
|
190
186
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 1.1.1
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.9.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -73,6 +73,7 @@ module Svix
|
|
73
73
|
# Show invalid properties with the reasons. Usually used together with valid?
|
74
74
|
# @return Array for valid properties with the reasons
|
75
75
|
def list_invalid_properties
|
76
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
76
77
|
invalid_properties = Array.new
|
77
78
|
invalid_properties
|
78
79
|
end
|
@@ -80,6 +81,7 @@ module Svix
|
|
80
81
|
# Check to see if the all the properties in the model are valid
|
81
82
|
# @return true if the model is valid
|
82
83
|
def valid?
|
84
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
83
85
|
true
|
84
86
|
end
|
85
87
|
|
@@ -108,36 +110,30 @@ module Svix
|
|
108
110
|
# @param [Hash] attributes Model attributes in the form of hash
|
109
111
|
# @return [Object] Returns the model itself
|
110
112
|
def self.build_from_hash(attributes)
|
111
|
-
new.build_from_hash(attributes)
|
112
|
-
end
|
113
|
-
|
114
|
-
# Builds the object from hash
|
115
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
116
|
-
# @return [Object] Returns the model itself
|
117
|
-
def build_from_hash(attributes)
|
118
113
|
return nil unless attributes.is_a?(Hash)
|
119
|
-
|
120
|
-
|
121
|
-
|
114
|
+
attributes = attributes.transform_keys(&:to_sym)
|
115
|
+
transformed_hash = {}
|
116
|
+
openapi_types.each_pair do |key, type|
|
117
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
118
|
+
transformed_hash["#{key}"] = nil
|
122
119
|
elsif type =~ /\AArray<(.*)>/i
|
123
120
|
# check to ensure the input is an array given that the attribute
|
124
121
|
# is documented as an array but the input is not
|
125
|
-
if attributes[
|
126
|
-
|
122
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
123
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
127
124
|
end
|
128
|
-
elsif !attributes[
|
129
|
-
|
125
|
+
elsif !attributes[attribute_map[key]].nil?
|
126
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
130
127
|
end
|
131
128
|
end
|
132
|
-
|
133
|
-
self
|
129
|
+
new(transformed_hash)
|
134
130
|
end
|
135
131
|
|
136
132
|
# Deserializes the data based on type
|
137
133
|
# @param string type Data type
|
138
134
|
# @param string value Value to be deserialized
|
139
135
|
# @return [Object] Deserialized data
|
140
|
-
def _deserialize(type, value)
|
136
|
+
def self._deserialize(type, value)
|
141
137
|
case type.to_sym
|
142
138
|
when :Time
|
143
139
|
Time.parse(value)
|
@@ -172,7 +168,7 @@ module Svix
|
|
172
168
|
else # model
|
173
169
|
# models (e.g. Pet) or oneOf
|
174
170
|
klass = Svix.const_get(type)
|
175
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
171
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
176
172
|
end
|
177
173
|
end
|
178
174
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 1.1.1
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.9.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -63,16 +63,21 @@ module Svix
|
|
63
63
|
|
64
64
|
if attributes.key?(:'token')
|
65
65
|
self.token = attributes[:'token']
|
66
|
+
else
|
67
|
+
self.token = nil
|
66
68
|
end
|
67
69
|
|
68
70
|
if attributes.key?(:'url')
|
69
71
|
self.url = attributes[:'url']
|
72
|
+
else
|
73
|
+
self.url = nil
|
70
74
|
end
|
71
75
|
end
|
72
76
|
|
73
77
|
# Show invalid properties with the reasons. Usually used together with valid?
|
74
78
|
# @return Array for valid properties with the reasons
|
75
79
|
def list_invalid_properties
|
80
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
76
81
|
invalid_properties = Array.new
|
77
82
|
if @token.nil?
|
78
83
|
invalid_properties.push('invalid value for "token", token cannot be nil.')
|
@@ -96,6 +101,7 @@ module Svix
|
|
96
101
|
# Check to see if the all the properties in the model are valid
|
97
102
|
# @return true if the model is valid
|
98
103
|
def valid?
|
104
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
99
105
|
return false if @token.nil?
|
100
106
|
return false if @url.nil?
|
101
107
|
return false if @url.to_s.length > 65536
|
@@ -146,36 +152,30 @@ module Svix
|
|
146
152
|
# @param [Hash] attributes Model attributes in the form of hash
|
147
153
|
# @return [Object] Returns the model itself
|
148
154
|
def self.build_from_hash(attributes)
|
149
|
-
new.build_from_hash(attributes)
|
150
|
-
end
|
151
|
-
|
152
|
-
# Builds the object from hash
|
153
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
154
|
-
# @return [Object] Returns the model itself
|
155
|
-
def build_from_hash(attributes)
|
156
155
|
return nil unless attributes.is_a?(Hash)
|
157
|
-
|
158
|
-
|
159
|
-
|
156
|
+
attributes = attributes.transform_keys(&:to_sym)
|
157
|
+
transformed_hash = {}
|
158
|
+
openapi_types.each_pair do |key, type|
|
159
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
160
|
+
transformed_hash["#{key}"] = nil
|
160
161
|
elsif type =~ /\AArray<(.*)>/i
|
161
162
|
# check to ensure the input is an array given that the attribute
|
162
163
|
# is documented as an array but the input is not
|
163
|
-
if attributes[
|
164
|
-
|
164
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
165
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
165
166
|
end
|
166
|
-
elsif !attributes[
|
167
|
-
|
167
|
+
elsif !attributes[attribute_map[key]].nil?
|
168
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
168
169
|
end
|
169
170
|
end
|
170
|
-
|
171
|
-
self
|
171
|
+
new(transformed_hash)
|
172
172
|
end
|
173
173
|
|
174
174
|
# Deserializes the data based on type
|
175
175
|
# @param string type Data type
|
176
176
|
# @param string value Value to be deserialized
|
177
177
|
# @return [Object] Deserialized data
|
178
|
-
def _deserialize(type, value)
|
178
|
+
def self._deserialize(type, value)
|
179
179
|
case type.to_sym
|
180
180
|
when :Time
|
181
181
|
Time.parse(value)
|
@@ -210,7 +210,7 @@ module Svix
|
|
210
210
|
else # model
|
211
211
|
# models (e.g. Pet) or oneOf
|
212
212
|
klass = Svix.const_get(type)
|
213
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
213
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
214
214
|
end
|
215
215
|
end
|
216
216
|
|