svix 1.76.1 → 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
@@ -3,6 +3,7 @@
|
|
3
3
|
module Svix
|
4
4
|
class ConnectorKind
|
5
5
|
CUSTOM = "Custom".freeze
|
6
|
+
AGENTIC_COMMERCE_PROTOCOL = "AgenticCommerceProtocol".freeze
|
6
7
|
CLOSE_CRM = "CloseCRM".freeze
|
7
8
|
CUSTOMER_IO = "CustomerIO".freeze
|
8
9
|
DISCORD = "Discord".freeze
|
@@ -22,6 +23,7 @@ module Svix
|
|
22
23
|
def self.all_vars
|
23
24
|
@all_vars ||= [
|
24
25
|
CUSTOM,
|
26
|
+
AGENTIC_COMMERCE_PROTOCOL,
|
25
27
|
CLOSE_CRM,
|
26
28
|
CUSTOMER_IO,
|
27
29
|
DISCORD,
|
@@ -6,13 +6,11 @@ module Svix
|
|
6
6
|
class ConnectorOut
|
7
7
|
attr_accessor :created_at
|
8
8
|
attr_accessor :description
|
9
|
-
attr_accessor :feature_flag
|
10
9
|
attr_accessor :feature_flags
|
11
10
|
attr_accessor :filter_types
|
12
11
|
# The Connector's ID.
|
13
12
|
attr_accessor :id
|
14
13
|
attr_accessor :instructions
|
15
|
-
attr_accessor :instructions_link
|
16
14
|
attr_accessor :kind
|
17
15
|
attr_accessor :logo
|
18
16
|
attr_accessor :name
|
@@ -24,12 +22,10 @@ module Svix
|
|
24
22
|
ALL_FIELD ||= [
|
25
23
|
"created_at",
|
26
24
|
"description",
|
27
|
-
"feature_flag",
|
28
25
|
"feature_flags",
|
29
26
|
"filter_types",
|
30
27
|
"id",
|
31
28
|
"instructions",
|
32
|
-
"instructions_link",
|
33
29
|
"kind",
|
34
30
|
"logo",
|
35
31
|
"name",
|
@@ -59,12 +55,10 @@ module Svix
|
|
59
55
|
attrs = Hash.new
|
60
56
|
attrs["created_at"] = DateTime.rfc3339(attributes["createdAt"]).to_time
|
61
57
|
attrs["description"] = attributes["description"]
|
62
|
-
attrs["feature_flag"] = attributes["featureFlag"]
|
63
58
|
attrs["feature_flags"] = attributes["featureFlags"]
|
64
59
|
attrs["filter_types"] = attributes["filterTypes"]
|
65
60
|
attrs["id"] = attributes["id"]
|
66
61
|
attrs["instructions"] = attributes["instructions"]
|
67
|
-
attrs["instructions_link"] = attributes["instructionsLink"]
|
68
62
|
attrs["kind"] = Svix::ConnectorKind.deserialize(attributes["kind"])
|
69
63
|
attrs["logo"] = attributes["logo"]
|
70
64
|
attrs["name"] = attributes["name"]
|
@@ -78,12 +72,10 @@ module Svix
|
|
78
72
|
out = Hash.new
|
79
73
|
out["createdAt"] = Svix::serialize_primitive(@created_at) if @created_at
|
80
74
|
out["description"] = Svix::serialize_primitive(@description) if @description
|
81
|
-
out["featureFlag"] = Svix::serialize_primitive(@feature_flag) if @feature_flag
|
82
75
|
out["featureFlags"] = Svix::serialize_primitive(@feature_flags) if @feature_flags
|
83
76
|
out["filterTypes"] = Svix::serialize_primitive(@filter_types) if @filter_types
|
84
77
|
out["id"] = Svix::serialize_primitive(@id) if @id
|
85
78
|
out["instructions"] = Svix::serialize_primitive(@instructions) if @instructions
|
86
|
-
out["instructionsLink"] = Svix::serialize_primitive(@instructions_link) if @instructions_link
|
87
79
|
out["kind"] = Svix::serialize_schema_ref(@kind) if @kind
|
88
80
|
out["logo"] = Svix::serialize_primitive(@logo) if @logo
|
89
81
|
out["name"] = Svix::serialize_primitive(@name) if @name
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module Svix
|
6
|
+
class CreateStreamEventsIn
|
7
|
+
attr_accessor :events
|
8
|
+
# Optionally creates a new Stream alongside the events.
|
9
|
+
#
|
10
|
+
# If the stream id or uid that is used in the path already exists, this argument is ignored.
|
11
|
+
attr_accessor :stream
|
12
|
+
|
13
|
+
ALL_FIELD ||= ["events", "stream"].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::CreateStreamEventsIn` 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::CreateStreamEventsIn")
|
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["events"] = attributes["events"].map { |v| Svix::EventIn.deserialize(v) }
|
35
|
+
attrs["stream"] = Svix::StreamIn.deserialize(attributes["stream"]) if attributes["stream"]
|
36
|
+
new(attrs)
|
37
|
+
end
|
38
|
+
|
39
|
+
def serialize
|
40
|
+
out = Hash.new
|
41
|
+
out["events"] = @events.map { |v| v.serialize } if @events
|
42
|
+
out["stream"] = Svix::serialize_schema_ref(@stream) if @stream
|
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,46 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module Svix
|
6
|
+
class CreateStreamEventsOut
|
7
|
+
|
8
|
+
ALL_FIELD ||= [].freeze
|
9
|
+
private_constant :ALL_FIELD
|
10
|
+
|
11
|
+
def initialize(attributes = {})
|
12
|
+
unless attributes.is_a?(Hash)
|
13
|
+
fail(
|
14
|
+
ArgumentError,
|
15
|
+
"The input argument (attributes) must be a hash in `Svix::CreateStreamEventsOut` new method"
|
16
|
+
)
|
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::CreateStreamEventsOut")
|
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
|
+
new(attrs)
|
33
|
+
end
|
34
|
+
|
35
|
+
def serialize
|
36
|
+
out = Hash.new
|
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,43 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module Svix
|
6
|
+
class EmptyResponse
|
7
|
+
|
8
|
+
ALL_FIELD ||= [].freeze
|
9
|
+
private_constant :ALL_FIELD
|
10
|
+
|
11
|
+
def initialize(attributes = {})
|
12
|
+
unless attributes.is_a?(Hash)
|
13
|
+
fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::EmptyResponse` new method")
|
14
|
+
end
|
15
|
+
|
16
|
+
attributes.each do |k, v|
|
17
|
+
unless ALL_FIELD.include?(k.to_s)
|
18
|
+
fail(ArgumentError, "The field #{k} is not part of Svix::EmptyResponse")
|
19
|
+
end
|
20
|
+
|
21
|
+
instance_variable_set("@#{k}", v)
|
22
|
+
instance_variable_set("@__#{k}_is_defined", true)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
def self.deserialize(attributes = {})
|
27
|
+
attributes = attributes.transform_keys(&:to_s)
|
28
|
+
attrs = Hash.new
|
29
|
+
new(attrs)
|
30
|
+
end
|
31
|
+
|
32
|
+
def serialize
|
33
|
+
out = Hash.new
|
34
|
+
out
|
35
|
+
end
|
36
|
+
|
37
|
+
# Serializes the object to a json string
|
38
|
+
# @return String
|
39
|
+
def to_json
|
40
|
+
JSON.dump(serialize)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -7,6 +7,7 @@ module Svix
|
|
7
7
|
class EndpointMessageOut
|
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
|
@@ -22,6 +23,7 @@ module Svix
|
|
22
23
|
|
23
24
|
ALL_FIELD ||= [
|
24
25
|
"channels",
|
26
|
+
"deliver_at",
|
25
27
|
"event_id",
|
26
28
|
"event_type",
|
27
29
|
"id",
|
@@ -53,6 +55,7 @@ module Svix
|
|
53
55
|
attributes = attributes.transform_keys(&:to_s)
|
54
56
|
attrs = Hash.new
|
55
57
|
attrs["channels"] = attributes["channels"]
|
58
|
+
attrs["deliver_at"] = DateTime.rfc3339(attributes["deliverAt"]).to_time if attributes["deliverAt"]
|
56
59
|
attrs["event_id"] = attributes["eventId"]
|
57
60
|
attrs["event_type"] = attributes["eventType"]
|
58
61
|
attrs["id"] = attributes["id"]
|
@@ -68,6 +71,7 @@ module Svix
|
|
68
71
|
def serialize
|
69
72
|
out = Hash.new
|
70
73
|
out["channels"] = Svix::serialize_primitive(@channels) if @channels
|
74
|
+
out["deliverAt"] = Svix::serialize_primitive(@deliver_at) if @deliver_at
|
71
75
|
out["eventId"] = Svix::serialize_primitive(@event_id) if @event_id
|
72
76
|
out["eventType"] = Svix::serialize_primitive(@event_type) if @event_type
|
73
77
|
out["id"] = Svix::serialize_primitive(@id) if @id
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module Svix
|
6
|
+
class EventIn
|
7
|
+
# The event type's name
|
8
|
+
attr_accessor :event_type
|
9
|
+
attr_accessor :payload
|
10
|
+
|
11
|
+
ALL_FIELD ||= ["event_type", "payload"].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::EventIn` 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::EventIn")
|
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["event_type"] = attributes["eventType"]
|
33
|
+
attrs["payload"] = attributes["payload"]
|
34
|
+
new(attrs)
|
35
|
+
end
|
36
|
+
|
37
|
+
def serialize
|
38
|
+
out = Hash.new
|
39
|
+
out["eventType"] = Svix::serialize_primitive(@event_type) if @event_type
|
40
|
+
out["payload"] = Svix::serialize_primitive(@payload) if @payload
|
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,53 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module Svix
|
6
|
+
class EventOut
|
7
|
+
# The event type's name
|
8
|
+
attr_accessor :event_type
|
9
|
+
attr_accessor :payload
|
10
|
+
attr_accessor :timestamp
|
11
|
+
|
12
|
+
ALL_FIELD ||= ["event_type", "payload", "timestamp"].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::EventOut` 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::EventOut")
|
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["event_type"] = attributes["eventType"]
|
34
|
+
attrs["payload"] = attributes["payload"]
|
35
|
+
attrs["timestamp"] = DateTime.rfc3339(attributes["timestamp"]).to_time
|
36
|
+
new(attrs)
|
37
|
+
end
|
38
|
+
|
39
|
+
def serialize
|
40
|
+
out = Hash.new
|
41
|
+
out["eventType"] = Svix::serialize_primitive(@event_type) if @event_type
|
42
|
+
out["payload"] = Svix::serialize_primitive(@payload) if @payload
|
43
|
+
out["timestamp"] = Svix::serialize_primitive(@timestamp) if @timestamp
|
44
|
+
out
|
45
|
+
end
|
46
|
+
|
47
|
+
# Serializes the object to a json string
|
48
|
+
# @return String
|
49
|
+
def to_json
|
50
|
+
JSON.dump(serialize)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module Svix
|
6
|
+
class EventStreamOut
|
7
|
+
attr_accessor :data
|
8
|
+
attr_accessor :done
|
9
|
+
attr_accessor :iterator
|
10
|
+
|
11
|
+
ALL_FIELD ||= ["data", "done", "iterator"].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::EventStreamOut` 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::EventStreamOut")
|
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["data"] = attributes["data"].map { |v| Svix::EventOut.deserialize(v) }
|
33
|
+
attrs["done"] = attributes["done"]
|
34
|
+
attrs["iterator"] = attributes["iterator"]
|
35
|
+
new(attrs)
|
36
|
+
end
|
37
|
+
|
38
|
+
def serialize
|
39
|
+
out = Hash.new
|
40
|
+
out["data"] = @data.map { |v| v.serialize } if @data
|
41
|
+
out["done"] = Svix::serialize_primitive(@done) if @done
|
42
|
+
out["iterator"] = Svix::serialize_primitive(@iterator) if @iterator
|
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,56 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module Svix
|
6
|
+
# Configuration for a Google Cloud Storage sink.
|
7
|
+
#
|
8
|
+
# Write stream events into the named bucket using the supplied Google Cloud credentials.
|
9
|
+
class GoogleCloudStorageConfig
|
10
|
+
attr_accessor :bucket
|
11
|
+
# Google Cloud Credentials JSON Object as a string.
|
12
|
+
attr_accessor :credentials
|
13
|
+
|
14
|
+
ALL_FIELD ||= ["bucket", "credentials"].freeze
|
15
|
+
private_constant :ALL_FIELD
|
16
|
+
|
17
|
+
def initialize(attributes = {})
|
18
|
+
unless attributes.is_a?(Hash)
|
19
|
+
fail(
|
20
|
+
ArgumentError,
|
21
|
+
"The input argument (attributes) must be a hash in `Svix::GoogleCloudStorageConfig` new method"
|
22
|
+
)
|
23
|
+
end
|
24
|
+
|
25
|
+
attributes.each do |k, v|
|
26
|
+
unless ALL_FIELD.include?(k.to_s)
|
27
|
+
fail(ArgumentError, "The field #{k} is not part of Svix::GoogleCloudStorageConfig")
|
28
|
+
end
|
29
|
+
|
30
|
+
instance_variable_set("@#{k}", v)
|
31
|
+
instance_variable_set("@__#{k}_is_defined", true)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
def self.deserialize(attributes = {})
|
36
|
+
attributes = attributes.transform_keys(&:to_s)
|
37
|
+
attrs = Hash.new
|
38
|
+
attrs["bucket"] = attributes["bucket"]
|
39
|
+
attrs["credentials"] = attributes["credentials"]
|
40
|
+
new(attrs)
|
41
|
+
end
|
42
|
+
|
43
|
+
def serialize
|
44
|
+
out = Hash.new
|
45
|
+
out["bucket"] = Svix::serialize_primitive(@bucket) if @bucket
|
46
|
+
out["credentials"] = Svix::serialize_primitive(@credentials) if @credentials
|
47
|
+
out
|
48
|
+
end
|
49
|
+
|
50
|
+
# Serializes the object to a json string
|
51
|
+
# @return String
|
52
|
+
def to_json
|
53
|
+
JSON.dump(serialize)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module Svix
|
6
|
+
class GoogleCloudStoragePatchConfig
|
7
|
+
attr_accessor :bucket
|
8
|
+
attr_accessor :credentials
|
9
|
+
|
10
|
+
ALL_FIELD ||= ["bucket", "credentials"].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::GoogleCloudStoragePatchConfig` 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::GoogleCloudStoragePatchConfig")
|
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["bucket"] = attributes["bucket"]
|
35
|
+
attrs["credentials"] = attributes["credentials"]
|
36
|
+
new(attrs)
|
37
|
+
end
|
38
|
+
|
39
|
+
def serialize
|
40
|
+
out = Hash.new
|
41
|
+
out["bucket"] = Svix::serialize_primitive(@bucket) if @bucket
|
42
|
+
out["credentials"] = Svix::serialize_primitive(@credentials) if @credentials
|
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,46 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module Svix
|
6
|
+
class HttpPatchConfig
|
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(ArgumentError, "The input argument (attributes) must be a hash in `Svix::HttpPatchConfig` 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::HttpPatchConfig")
|
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["url"] = attributes["url"]
|
31
|
+
new(attrs)
|
32
|
+
end
|
33
|
+
|
34
|
+
def serialize
|
35
|
+
out = Hash.new
|
36
|
+
out["url"] = Svix::serialize_primitive(@url) if @url
|
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,49 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module Svix
|
6
|
+
class HttpSinkHeadersPatchIn
|
7
|
+
attr_accessor :headers
|
8
|
+
|
9
|
+
ALL_FIELD ||= ["headers"].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::HttpSinkHeadersPatchIn` 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::HttpSinkHeadersPatchIn")
|
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["headers"] = attributes["headers"]
|
34
|
+
new(attrs)
|
35
|
+
end
|
36
|
+
|
37
|
+
def serialize
|
38
|
+
out = Hash.new
|
39
|
+
out["headers"] = Svix::serialize_primitive(@headers) if @headers
|
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,53 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file is @generated
|
3
|
+
require "json"
|
4
|
+
|
5
|
+
module Svix
|
6
|
+
# Sent when an ingest endpoint has been automatically disabled after continuous failures, or manually via an API call.
|
7
|
+
class IngestEndpointDisabledEvent
|
8
|
+
attr_accessor :data
|
9
|
+
attr_accessor :type
|
10
|
+
|
11
|
+
ALL_FIELD ||= ["data", "type"].freeze
|
12
|
+
private_constant :ALL_FIELD
|
13
|
+
|
14
|
+
def initialize(attributes = {})
|
15
|
+
unless attributes.is_a?(Hash)
|
16
|
+
fail(
|
17
|
+
ArgumentError,
|
18
|
+
"The input argument (attributes) must be a hash in `Svix::IngestEndpointDisabledEvent` new method"
|
19
|
+
)
|
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::IngestEndpointDisabledEvent")
|
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["data"] = Svix::IngestEndpointDisabledEventData.deserialize(attributes["data"])
|
36
|
+
attrs["type"] = attributes["type"]
|
37
|
+
new(attrs)
|
38
|
+
end
|
39
|
+
|
40
|
+
def serialize
|
41
|
+
out = Hash.new
|
42
|
+
out["data"] = Svix::serialize_schema_ref(@data) if @data
|
43
|
+
out["type"] = Svix::serialize_primitive(@type) if @type
|
44
|
+
out
|
45
|
+
end
|
46
|
+
|
47
|
+
# Serializes the object to a json string
|
48
|
+
# @return String
|
49
|
+
def to_json
|
50
|
+
JSON.dump(serialize)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|