svix 1.76.0 → 1.77.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.lock +2 -2
- data/lib/svix/api/authentication.rb +34 -0
- data/lib/svix/api/streaming.rb +46 -0
- data/lib/svix/api/streaming_event_type.rb +78 -0
- data/lib/svix/api/streaming_events.rb +40 -0
- data/lib/svix/api/streaming_sink.rb +103 -0
- data/lib/svix/api/streaming_stream.rb +73 -0
- data/lib/svix/models/amazon_s3_patch_config.rb +55 -0
- data/lib/svix/models/api_token_out.rb +62 -0
- data/lib/svix/models/azure_blob_storage_config.rb +55 -0
- data/lib/svix/models/azure_blob_storage_patch_config.rb +55 -0
- data/lib/svix/models/connector_in.rb +0 -9
- data/lib/svix/models/connector_kind.rb +2 -0
- data/lib/svix/models/connector_out.rb +0 -8
- data/lib/svix/models/create_stream_events_in.rb +52 -0
- data/lib/svix/models/create_stream_events_out.rb +46 -0
- data/lib/svix/models/empty_response.rb +43 -0
- data/lib/svix/models/endpoint_message_out.rb +4 -0
- data/lib/svix/models/event_in.rb +50 -0
- data/lib/svix/models/event_out.rb +53 -0
- data/lib/svix/models/event_stream_out.rb +52 -0
- data/lib/svix/models/google_cloud_storage_config.rb +56 -0
- data/lib/svix/models/google_cloud_storage_patch_config.rb +52 -0
- data/lib/svix/models/http_patch_config.rb +46 -0
- data/lib/svix/models/http_sink_headers_patch_in.rb +49 -0
- data/lib/svix/models/ingest_endpoint_disabled_event.rb +53 -0
- data/lib/svix/models/ingest_endpoint_disabled_event_data.rb +65 -0
- data/lib/svix/models/ingest_message_attempt_exhausted_event.rb +53 -0
- data/lib/svix/models/ingest_message_attempt_exhausted_event_data.rb +66 -0
- data/lib/svix/models/ingest_message_attempt_failing_event.rb +54 -0
- data/lib/svix/models/ingest_message_attempt_failing_event_data.rb +66 -0
- data/lib/svix/models/ingest_message_attempt_recovered_event.rb +53 -0
- data/lib/svix/models/ingest_message_attempt_recovered_event_data.rb +66 -0
- data/lib/svix/models/list_response_stream_event_type_out.rb +58 -0
- data/lib/svix/models/list_response_stream_out.rb +58 -0
- data/lib/svix/models/list_response_stream_sink_out.rb +58 -0
- data/lib/svix/models/message_in.rb +7 -0
- data/lib/svix/models/message_out.rb +4 -1
- data/lib/svix/models/otel_tracing_patch_config.rb +49 -0
- data/lib/svix/models/polling_endpoint_message_out.rb +4 -1
- data/lib/svix/models/rotate_poller_token_in.rb +55 -0
- data/lib/svix/models/s3_config.rb +55 -0
- data/lib/svix/models/sink_http_config.rb +52 -0
- data/lib/svix/models/sink_otel_v1_config.rb +49 -0
- data/lib/svix/models/sink_secret_out.rb +50 -0
- data/lib/svix/models/sink_status.rb +31 -0
- data/lib/svix/models/sink_status_in.rb +29 -0
- data/lib/svix/models/sink_transform_in.rb +46 -0
- data/lib/svix/models/sink_transformation_out.rb +52 -0
- data/lib/svix/models/stream_event_type_in.rb +59 -0
- data/lib/svix/models/stream_event_type_out.rb +65 -0
- data/lib/svix/models/stream_event_type_patch.rb +59 -0
- data/lib/svix/models/stream_in.rb +54 -0
- data/lib/svix/models/stream_out.rb +64 -0
- data/lib/svix/models/stream_patch.rb +54 -0
- data/lib/svix/models/stream_portal_access_in.rb +59 -0
- data/lib/svix/models/stream_sink_in.rb +153 -0
- data/lib/svix/models/stream_sink_out.rb +174 -0
- data/lib/svix/models/stream_sink_patch.rb +141 -0
- data/lib/svix/version.rb +1 -1
- data/lib/svix.rb +50 -0
- metadata +52 -2
@@ -0,0 +1,49 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module Svix
|
6
|
+
class OtelTracingPatchConfig
|
7
|
+
attr_accessor :url
|
8
|
+
|
9
|
+
ALL_FIELD ||= ["url"].freeze
|
10
|
+
private_constant :ALL_FIELD
|
11
|
+
|
12
|
+
def initialize(attributes = {})
|
13
|
+
unless attributes.is_a?(Hash)
|
14
|
+
fail(
|
15
|
+
ArgumentError,
|
16
|
+
"The input argument (attributes) must be a hash in `Svix::OtelTracingPatchConfig` new method"
|
17
|
+
)
|
18
|
+
end
|
19
|
+
|
20
|
+
attributes.each do |k, v|
|
21
|
+
unless ALL_FIELD.include?(k.to_s)
|
22
|
+
fail(ArgumentError, "The field #{k} is not part of Svix::OtelTracingPatchConfig")
|
23
|
+
end
|
24
|
+
|
25
|
+
instance_variable_set("@#{k}", v)
|
26
|
+
instance_variable_set("@__#{k}_is_defined", true)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
def self.deserialize(attributes = {})
|
31
|
+
attributes = attributes.transform_keys(&:to_s)
|
32
|
+
attrs = Hash.new
|
33
|
+
attrs["url"] = attributes["url"]
|
34
|
+
new(attrs)
|
35
|
+
end
|
36
|
+
|
37
|
+
def serialize
|
38
|
+
out = Hash.new
|
39
|
+
out["url"] = Svix::serialize_primitive(@url) if @url
|
40
|
+
out
|
41
|
+
end
|
42
|
+
|
43
|
+
# Serializes the object to a json string
|
44
|
+
# @return String
|
45
|
+
def to_json
|
46
|
+
JSON.dump(serialize)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -7,6 +7,7 @@ module Svix
|
|
7
7
|
class PollingEndpointMessageOut
|
8
8
|
# List of free-form identifiers that endpoints can filter by
|
9
9
|
attr_accessor :channels
|
10
|
+
attr_accessor :deliver_at
|
10
11
|
# Optional unique identifier for the message
|
11
12
|
attr_accessor :event_id
|
12
13
|
# The event type's name
|
@@ -18,7 +19,7 @@ module Svix
|
|
18
19
|
attr_accessor :tags
|
19
20
|
attr_accessor :timestamp
|
20
21
|
|
21
|
-
ALL_FIELD ||= ["channels", "event_id", "event_type", "headers", "id", "payload", "tags", "timestamp"].freeze
|
22
|
+
ALL_FIELD ||= ["channels", "deliver_at", "event_id", "event_type", "headers", "id", "payload", "tags", "timestamp"].freeze
|
22
23
|
private_constant :ALL_FIELD
|
23
24
|
|
24
25
|
def initialize(attributes = {})
|
@@ -43,6 +44,7 @@ module Svix
|
|
43
44
|
attributes = attributes.transform_keys(&:to_s)
|
44
45
|
attrs = Hash.new
|
45
46
|
attrs["channels"] = attributes["channels"]
|
47
|
+
attrs["deliver_at"] = DateTime.rfc3339(attributes["deliverAt"]).to_time if attributes["deliverAt"]
|
46
48
|
attrs["event_id"] = attributes["eventId"]
|
47
49
|
attrs["event_type"] = attributes["eventType"]
|
48
50
|
attrs["headers"] = attributes["headers"]
|
@@ -56,6 +58,7 @@ module Svix
|
|
56
58
|
def serialize
|
57
59
|
out = Hash.new
|
58
60
|
out["channels"] = Svix::serialize_primitive(@channels) if @channels
|
61
|
+
out["deliverAt"] = Svix::serialize_primitive(@deliver_at) if @deliver_at
|
59
62
|
out["eventId"] = Svix::serialize_primitive(@event_id) if @event_id
|
60
63
|
out["eventType"] = Svix::serialize_primitive(@event_type) if @event_type
|
61
64
|
out["headers"] = Svix::serialize_primitive(@headers) if @headers
|
@@ -0,0 +1,55 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module Svix
|
6
|
+
class RotatePollerTokenIn
|
7
|
+
# How long the token will be valid for, in seconds. Can be up to 31,536,000 seconds (1 year).
|
8
|
+
attr_accessor :expiry
|
9
|
+
# Updates the previous token's expiration, in seconds.
|
10
|
+
#
|
11
|
+
# If set to 0, the old token will immediately be revoked. Must be between 0 and 86,400 seconds (1 day).
|
12
|
+
#
|
13
|
+
# Defaults to 300 seconds (5 minutes).
|
14
|
+
attr_accessor :old_token_expiry
|
15
|
+
|
16
|
+
ALL_FIELD ||= ["expiry", "old_token_expiry"].freeze
|
17
|
+
private_constant :ALL_FIELD
|
18
|
+
|
19
|
+
def initialize(attributes = {})
|
20
|
+
unless attributes.is_a?(Hash)
|
21
|
+
fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::RotatePollerTokenIn` new method")
|
22
|
+
end
|
23
|
+
|
24
|
+
attributes.each do |k, v|
|
25
|
+
unless ALL_FIELD.include?(k.to_s)
|
26
|
+
fail(ArgumentError, "The field #{k} is not part of Svix::RotatePollerTokenIn")
|
27
|
+
end
|
28
|
+
|
29
|
+
instance_variable_set("@#{k}", v)
|
30
|
+
instance_variable_set("@__#{k}_is_defined", true)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def self.deserialize(attributes = {})
|
35
|
+
attributes = attributes.transform_keys(&:to_s)
|
36
|
+
attrs = Hash.new
|
37
|
+
attrs["expiry"] = attributes["expiry"]
|
38
|
+
attrs["old_token_expiry"] = attributes["oldTokenExpiry"]
|
39
|
+
new(attrs)
|
40
|
+
end
|
41
|
+
|
42
|
+
def serialize
|
43
|
+
out = Hash.new
|
44
|
+
out["expiry"] = Svix::serialize_primitive(@expiry) if @expiry
|
45
|
+
out["oldTokenExpiry"] = Svix::serialize_primitive(@old_token_expiry) if @old_token_expiry
|
46
|
+
out
|
47
|
+
end
|
48
|
+
|
49
|
+
# Serializes the object to a json string
|
50
|
+
# @return String
|
51
|
+
def to_json
|
52
|
+
JSON.dump(serialize)
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
@@ -0,0 +1,55 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module Svix
|
6
|
+
class S3Config
|
7
|
+
attr_accessor :access_key_id
|
8
|
+
attr_accessor :bucket
|
9
|
+
attr_accessor :region
|
10
|
+
attr_accessor :secret_access_key
|
11
|
+
|
12
|
+
ALL_FIELD ||= ["access_key_id", "bucket", "region", "secret_access_key"].freeze
|
13
|
+
private_constant :ALL_FIELD
|
14
|
+
|
15
|
+
def initialize(attributes = {})
|
16
|
+
unless attributes.is_a?(Hash)
|
17
|
+
fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::S3Config` new method")
|
18
|
+
end
|
19
|
+
|
20
|
+
attributes.each do |k, v|
|
21
|
+
unless ALL_FIELD.include?(k.to_s)
|
22
|
+
fail(ArgumentError, "The field #{k} is not part of Svix::S3Config")
|
23
|
+
end
|
24
|
+
|
25
|
+
instance_variable_set("@#{k}", v)
|
26
|
+
instance_variable_set("@__#{k}_is_defined", true)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
def self.deserialize(attributes = {})
|
31
|
+
attributes = attributes.transform_keys(&:to_s)
|
32
|
+
attrs = Hash.new
|
33
|
+
attrs["access_key_id"] = attributes["accessKeyId"]
|
34
|
+
attrs["bucket"] = attributes["bucket"]
|
35
|
+
attrs["region"] = attributes["region"]
|
36
|
+
attrs["secret_access_key"] = attributes["secretAccessKey"]
|
37
|
+
new(attrs)
|
38
|
+
end
|
39
|
+
|
40
|
+
def serialize
|
41
|
+
out = Hash.new
|
42
|
+
out["accessKeyId"] = Svix::serialize_primitive(@access_key_id) if @access_key_id
|
43
|
+
out["bucket"] = Svix::serialize_primitive(@bucket) if @bucket
|
44
|
+
out["region"] = Svix::serialize_primitive(@region) if @region
|
45
|
+
out["secretAccessKey"] = Svix::serialize_primitive(@secret_access_key) if @secret_access_key
|
46
|
+
out
|
47
|
+
end
|
48
|
+
|
49
|
+
# Serializes the object to a json string
|
50
|
+
# @return String
|
51
|
+
def to_json
|
52
|
+
JSON.dump(serialize)
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module Svix
|
6
|
+
class SinkHttpConfig
|
7
|
+
attr_accessor :headers
|
8
|
+
attr_accessor :key
|
9
|
+
attr_accessor :url
|
10
|
+
|
11
|
+
ALL_FIELD ||= ["headers", "key", "url"].freeze
|
12
|
+
private_constant :ALL_FIELD
|
13
|
+
|
14
|
+
def initialize(attributes = {})
|
15
|
+
unless attributes.is_a?(Hash)
|
16
|
+
fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::SinkHttpConfig` new method")
|
17
|
+
end
|
18
|
+
|
19
|
+
attributes.each do |k, v|
|
20
|
+
unless ALL_FIELD.include?(k.to_s)
|
21
|
+
fail(ArgumentError, "The field #{k} is not part of Svix::SinkHttpConfig")
|
22
|
+
end
|
23
|
+
|
24
|
+
instance_variable_set("@#{k}", v)
|
25
|
+
instance_variable_set("@__#{k}_is_defined", true)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
def self.deserialize(attributes = {})
|
30
|
+
attributes = attributes.transform_keys(&:to_s)
|
31
|
+
attrs = Hash.new
|
32
|
+
attrs["headers"] = attributes["headers"]
|
33
|
+
attrs["key"] = attributes["key"]
|
34
|
+
attrs["url"] = attributes["url"]
|
35
|
+
new(attrs)
|
36
|
+
end
|
37
|
+
|
38
|
+
def serialize
|
39
|
+
out = Hash.new
|
40
|
+
out["headers"] = Svix::serialize_primitive(@headers) if @headers
|
41
|
+
out["key"] = Svix::serialize_primitive(@key) if @key
|
42
|
+
out["url"] = Svix::serialize_primitive(@url) if @url
|
43
|
+
out
|
44
|
+
end
|
45
|
+
|
46
|
+
# Serializes the object to a json string
|
47
|
+
# @return String
|
48
|
+
def to_json
|
49
|
+
JSON.dump(serialize)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module Svix
|
6
|
+
class SinkOtelV1Config
|
7
|
+
attr_accessor :headers
|
8
|
+
attr_accessor :url
|
9
|
+
|
10
|
+
ALL_FIELD ||= ["headers", "url"].freeze
|
11
|
+
private_constant :ALL_FIELD
|
12
|
+
|
13
|
+
def initialize(attributes = {})
|
14
|
+
unless attributes.is_a?(Hash)
|
15
|
+
fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::SinkOtelV1Config` new method")
|
16
|
+
end
|
17
|
+
|
18
|
+
attributes.each do |k, v|
|
19
|
+
unless ALL_FIELD.include?(k.to_s)
|
20
|
+
fail(ArgumentError, "The field #{k} is not part of Svix::SinkOtelV1Config")
|
21
|
+
end
|
22
|
+
|
23
|
+
instance_variable_set("@#{k}", v)
|
24
|
+
instance_variable_set("@__#{k}_is_defined", true)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
def self.deserialize(attributes = {})
|
29
|
+
attributes = attributes.transform_keys(&:to_s)
|
30
|
+
attrs = Hash.new
|
31
|
+
attrs["headers"] = attributes["headers"]
|
32
|
+
attrs["url"] = attributes["url"]
|
33
|
+
new(attrs)
|
34
|
+
end
|
35
|
+
|
36
|
+
def serialize
|
37
|
+
out = Hash.new
|
38
|
+
out["headers"] = Svix::serialize_primitive(@headers) if @headers
|
39
|
+
out["url"] = Svix::serialize_primitive(@url) if @url
|
40
|
+
out
|
41
|
+
end
|
42
|
+
|
43
|
+
# Serializes the object to a json string
|
44
|
+
# @return String
|
45
|
+
def to_json
|
46
|
+
JSON.dump(serialize)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module Svix
|
6
|
+
class SinkSecretOut
|
7
|
+
# The endpoint's verification secret.
|
8
|
+
#
|
9
|
+
# Format: `base64` encoded random bytes optionally prefixed with `whsec_`.
|
10
|
+
# It is recommended to not set this and let the server generate the secret.
|
11
|
+
attr_accessor :key
|
12
|
+
|
13
|
+
ALL_FIELD ||= ["key"].freeze
|
14
|
+
private_constant :ALL_FIELD
|
15
|
+
|
16
|
+
def initialize(attributes = {})
|
17
|
+
unless attributes.is_a?(Hash)
|
18
|
+
fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::SinkSecretOut` new method")
|
19
|
+
end
|
20
|
+
|
21
|
+
attributes.each do |k, v|
|
22
|
+
unless ALL_FIELD.include?(k.to_s)
|
23
|
+
fail(ArgumentError, "The field #{k} is not part of Svix::SinkSecretOut")
|
24
|
+
end
|
25
|
+
|
26
|
+
instance_variable_set("@#{k}", v)
|
27
|
+
instance_variable_set("@__#{k}_is_defined", true)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
def self.deserialize(attributes = {})
|
32
|
+
attributes = attributes.transform_keys(&:to_s)
|
33
|
+
attrs = Hash.new
|
34
|
+
attrs["key"] = attributes["key"]
|
35
|
+
new(attrs)
|
36
|
+
end
|
37
|
+
|
38
|
+
def serialize
|
39
|
+
out = Hash.new
|
40
|
+
out["key"] = Svix::serialize_primitive(@key) if @key
|
41
|
+
out
|
42
|
+
end
|
43
|
+
|
44
|
+
# Serializes the object to a json string
|
45
|
+
# @return String
|
46
|
+
def to_json
|
47
|
+
JSON.dump(serialize)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
module Svix
|
4
|
+
class SinkStatus
|
5
|
+
ENABLED = "enabled".freeze
|
6
|
+
PAUSED = "paused".freeze
|
7
|
+
DISABLED = "disabled".freeze
|
8
|
+
RETRYING = "retrying".freeze
|
9
|
+
|
10
|
+
def self.all_vars
|
11
|
+
@all_vars ||= [ENABLED, PAUSED, DISABLED, RETRYING].freeze
|
12
|
+
end
|
13
|
+
|
14
|
+
def initialize(value)
|
15
|
+
unless SinkStatus.all_vars.include?(value)
|
16
|
+
raise "Invalid ENUM value '#{value}' for class #SinkStatus"
|
17
|
+
end
|
18
|
+
|
19
|
+
@value = value
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.deserialize(value)
|
23
|
+
return value if SinkStatus.all_vars.include?(value)
|
24
|
+
raise "Invalid ENUM value '#{value}' for class #SinkStatus"
|
25
|
+
end
|
26
|
+
|
27
|
+
def serialize
|
28
|
+
@value
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
module Svix
|
4
|
+
class SinkStatusIn
|
5
|
+
ENABLED = "enabled".freeze
|
6
|
+
DISABLED = "disabled".freeze
|
7
|
+
|
8
|
+
def self.all_vars
|
9
|
+
@all_vars ||= [ENABLED, DISABLED].freeze
|
10
|
+
end
|
11
|
+
|
12
|
+
def initialize(value)
|
13
|
+
unless SinkStatusIn.all_vars.include?(value)
|
14
|
+
raise "Invalid ENUM value '#{value}' for class #SinkStatusIn"
|
15
|
+
end
|
16
|
+
|
17
|
+
@value = value
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.deserialize(value)
|
21
|
+
return value if SinkStatusIn.all_vars.include?(value)
|
22
|
+
raise "Invalid ENUM value '#{value}' for class #SinkStatusIn"
|
23
|
+
end
|
24
|
+
|
25
|
+
def serialize
|
26
|
+
@value
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module Svix
|
6
|
+
class SinkTransformIn
|
7
|
+
attr_accessor :code
|
8
|
+
|
9
|
+
ALL_FIELD ||= ["code"].freeze
|
10
|
+
private_constant :ALL_FIELD
|
11
|
+
|
12
|
+
def initialize(attributes = {})
|
13
|
+
unless attributes.is_a?(Hash)
|
14
|
+
fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::SinkTransformIn` new method")
|
15
|
+
end
|
16
|
+
|
17
|
+
attributes.each do |k, v|
|
18
|
+
unless ALL_FIELD.include?(k.to_s)
|
19
|
+
fail(ArgumentError, "The field #{k} is not part of Svix::SinkTransformIn")
|
20
|
+
end
|
21
|
+
|
22
|
+
instance_variable_set("@#{k}", v)
|
23
|
+
instance_variable_set("@__#{k}_is_defined", true)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def self.deserialize(attributes = {})
|
28
|
+
attributes = attributes.transform_keys(&:to_s)
|
29
|
+
attrs = Hash.new
|
30
|
+
attrs["code"] = attributes["code"]
|
31
|
+
new(attrs)
|
32
|
+
end
|
33
|
+
|
34
|
+
def serialize
|
35
|
+
out = Hash.new
|
36
|
+
out["code"] = Svix::serialize_primitive(@code) if @code
|
37
|
+
out
|
38
|
+
end
|
39
|
+
|
40
|
+
# Serializes the object to a json string
|
41
|
+
# @return String
|
42
|
+
def to_json
|
43
|
+
JSON.dump(serialize)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module Svix
|
6
|
+
class SinkTransformationOut
|
7
|
+
attr_accessor :code
|
8
|
+
attr_accessor :enabled
|
9
|
+
|
10
|
+
ALL_FIELD ||= ["code", "enabled"].freeze
|
11
|
+
private_constant :ALL_FIELD
|
12
|
+
|
13
|
+
def initialize(attributes = {})
|
14
|
+
unless attributes.is_a?(Hash)
|
15
|
+
fail(
|
16
|
+
ArgumentError,
|
17
|
+
"The input argument (attributes) must be a hash in `Svix::SinkTransformationOut` new method"
|
18
|
+
)
|
19
|
+
end
|
20
|
+
|
21
|
+
attributes.each do |k, v|
|
22
|
+
unless ALL_FIELD.include?(k.to_s)
|
23
|
+
fail(ArgumentError, "The field #{k} is not part of Svix::SinkTransformationOut")
|
24
|
+
end
|
25
|
+
|
26
|
+
instance_variable_set("@#{k}", v)
|
27
|
+
instance_variable_set("@__#{k}_is_defined", true)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
def self.deserialize(attributes = {})
|
32
|
+
attributes = attributes.transform_keys(&:to_s)
|
33
|
+
attrs = Hash.new
|
34
|
+
attrs["code"] = attributes["code"]
|
35
|
+
attrs["enabled"] = attributes["enabled"]
|
36
|
+
new(attrs)
|
37
|
+
end
|
38
|
+
|
39
|
+
def serialize
|
40
|
+
out = Hash.new
|
41
|
+
out["code"] = Svix::serialize_primitive(@code) if @code
|
42
|
+
out["enabled"] = Svix::serialize_primitive(@enabled) if @enabled
|
43
|
+
out
|
44
|
+
end
|
45
|
+
|
46
|
+
# Serializes the object to a json string
|
47
|
+
# @return String
|
48
|
+
def to_json
|
49
|
+
JSON.dump(serialize)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module Svix
|
6
|
+
class StreamEventTypeIn
|
7
|
+
attr_accessor :archived
|
8
|
+
attr_accessor :deprecated
|
9
|
+
attr_accessor :description
|
10
|
+
attr_accessor :feature_flags
|
11
|
+
# The event type's name
|
12
|
+
attr_accessor :name
|
13
|
+
|
14
|
+
ALL_FIELD ||= ["archived", "deprecated", "description", "feature_flags", "name"].freeze
|
15
|
+
private_constant :ALL_FIELD
|
16
|
+
|
17
|
+
def initialize(attributes = {})
|
18
|
+
unless attributes.is_a?(Hash)
|
19
|
+
fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::StreamEventTypeIn` new method")
|
20
|
+
end
|
21
|
+
|
22
|
+
attributes.each do |k, v|
|
23
|
+
unless ALL_FIELD.include?(k.to_s)
|
24
|
+
fail(ArgumentError, "The field #{k} is not part of Svix::StreamEventTypeIn")
|
25
|
+
end
|
26
|
+
|
27
|
+
instance_variable_set("@#{k}", v)
|
28
|
+
instance_variable_set("@__#{k}_is_defined", true)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
def self.deserialize(attributes = {})
|
33
|
+
attributes = attributes.transform_keys(&:to_s)
|
34
|
+
attrs = Hash.new
|
35
|
+
attrs["archived"] = attributes["archived"]
|
36
|
+
attrs["deprecated"] = attributes["deprecated"]
|
37
|
+
attrs["description"] = attributes["description"]
|
38
|
+
attrs["feature_flags"] = attributes["featureFlags"]
|
39
|
+
attrs["name"] = attributes["name"]
|
40
|
+
new(attrs)
|
41
|
+
end
|
42
|
+
|
43
|
+
def serialize
|
44
|
+
out = Hash.new
|
45
|
+
out["archived"] = Svix::serialize_primitive(@archived) if @archived
|
46
|
+
out["deprecated"] = Svix::serialize_primitive(@deprecated) if @deprecated
|
47
|
+
out["description"] = Svix::serialize_primitive(@description) if @description
|
48
|
+
out["featureFlags"] = Svix::serialize_primitive(@feature_flags) if @feature_flags
|
49
|
+
out["name"] = Svix::serialize_primitive(@name) if @name
|
50
|
+
out
|
51
|
+
end
|
52
|
+
|
53
|
+
# Serializes the object to a json string
|
54
|
+
# @return String
|
55
|
+
def to_json
|
56
|
+
JSON.dump(serialize)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -0,0 +1,65 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module Svix
|
6
|
+
class StreamEventTypeOut
|
7
|
+
attr_accessor :archived
|
8
|
+
attr_accessor :created_at
|
9
|
+
attr_accessor :deprecated
|
10
|
+
attr_accessor :description
|
11
|
+
attr_accessor :feature_flags
|
12
|
+
# The event type's name
|
13
|
+
attr_accessor :name
|
14
|
+
attr_accessor :updated_at
|
15
|
+
|
16
|
+
ALL_FIELD ||= ["archived", "created_at", "deprecated", "description", "feature_flags", "name", "updated_at"].freeze
|
17
|
+
private_constant :ALL_FIELD
|
18
|
+
|
19
|
+
def initialize(attributes = {})
|
20
|
+
unless attributes.is_a?(Hash)
|
21
|
+
fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::StreamEventTypeOut` new method")
|
22
|
+
end
|
23
|
+
|
24
|
+
attributes.each do |k, v|
|
25
|
+
unless ALL_FIELD.include?(k.to_s)
|
26
|
+
fail(ArgumentError, "The field #{k} is not part of Svix::StreamEventTypeOut")
|
27
|
+
end
|
28
|
+
|
29
|
+
instance_variable_set("@#{k}", v)
|
30
|
+
instance_variable_set("@__#{k}_is_defined", true)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def self.deserialize(attributes = {})
|
35
|
+
attributes = attributes.transform_keys(&:to_s)
|
36
|
+
attrs = Hash.new
|
37
|
+
attrs["archived"] = attributes["archived"]
|
38
|
+
attrs["created_at"] = DateTime.rfc3339(attributes["createdAt"]).to_time
|
39
|
+
attrs["deprecated"] = attributes["deprecated"]
|
40
|
+
attrs["description"] = attributes["description"]
|
41
|
+
attrs["feature_flags"] = attributes["featureFlags"]
|
42
|
+
attrs["name"] = attributes["name"]
|
43
|
+
attrs["updated_at"] = DateTime.rfc3339(attributes["updatedAt"]).to_time
|
44
|
+
new(attrs)
|
45
|
+
end
|
46
|
+
|
47
|
+
def serialize
|
48
|
+
out = Hash.new
|
49
|
+
out["archived"] = Svix::serialize_primitive(@archived) if @archived
|
50
|
+
out["createdAt"] = Svix::serialize_primitive(@created_at) if @created_at
|
51
|
+
out["deprecated"] = Svix::serialize_primitive(@deprecated) if @deprecated
|
52
|
+
out["description"] = Svix::serialize_primitive(@description) if @description
|
53
|
+
out["featureFlags"] = Svix::serialize_primitive(@feature_flags) if @feature_flags
|
54
|
+
out["name"] = Svix::serialize_primitive(@name) if @name
|
55
|
+
out["updatedAt"] = Svix::serialize_primitive(@updated_at) if @updated_at
|
56
|
+
out
|
57
|
+
end
|
58
|
+
|
59
|
+
# Serializes the object to a json string
|
60
|
+
# @return String
|
61
|
+
def to_json
|
62
|
+
JSON.dump(serialize)
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module Svix
|
6
|
+
class StreamEventTypePatch
|
7
|
+
attr_accessor :archived
|
8
|
+
attr_accessor :deprecated
|
9
|
+
attr_accessor :description
|
10
|
+
attr_accessor :feature_flags
|
11
|
+
# The event type's name
|
12
|
+
attr_accessor :name
|
13
|
+
|
14
|
+
ALL_FIELD ||= ["archived", "deprecated", "description", "feature_flags", "name"].freeze
|
15
|
+
private_constant :ALL_FIELD
|
16
|
+
|
17
|
+
def initialize(attributes = {})
|
18
|
+
unless attributes.is_a?(Hash)
|
19
|
+
fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::StreamEventTypePatch` new method")
|
20
|
+
end
|
21
|
+
|
22
|
+
attributes.each do |k, v|
|
23
|
+
unless ALL_FIELD.include?(k.to_s)
|
24
|
+
fail(ArgumentError, "The field #{k} is not part of Svix::StreamEventTypePatch")
|
25
|
+
end
|
26
|
+
|
27
|
+
instance_variable_set("@#{k}", v)
|
28
|
+
instance_variable_set("@__#{k}_is_defined", true)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
def self.deserialize(attributes = {})
|
33
|
+
attributes = attributes.transform_keys(&:to_s)
|
34
|
+
attrs = Hash.new
|
35
|
+
attrs["archived"] = attributes["archived"]
|
36
|
+
attrs["deprecated"] = attributes["deprecated"]
|
37
|
+
attrs["description"] = attributes["description"]
|
38
|
+
attrs["feature_flags"] = attributes["featureFlags"]
|
39
|
+
attrs["name"] = attributes["name"]
|
40
|
+
new(attrs)
|
41
|
+
end
|
42
|
+
|
43
|
+
def serialize
|
44
|
+
out = Hash.new
|
45
|
+
out["archived"] = Svix::serialize_primitive(@archived) if @archived
|
46
|
+
out["deprecated"] = Svix::serialize_primitive(@deprecated) if @deprecated
|
47
|
+
out["description"] = Svix::serialize_primitive(@description) if @__description_is_defined
|
48
|
+
out["featureFlags"] = Svix::serialize_primitive(@feature_flags) if @__feature_flags_is_defined
|
49
|
+
out["name"] = Svix::serialize_primitive(@name) if @__name_is_defined
|
50
|
+
out
|
51
|
+
end
|
52
|
+
|
53
|
+
# Serializes the object to a json string
|
54
|
+
# @return String
|
55
|
+
def to_json
|
56
|
+
JSON.dump(serialize)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|