svix 2.3.0 → 2.5.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 +1 -1
- data/lib/svix/api/autoconfig_subscription.rb +38 -0
- data/lib/svix/api/destination.rb +75 -0
- data/lib/svix/api/destination_transformation.rb +30 -0
- data/lib/svix/api_internal/autoconfig_subscription.rb +25 -0
- data/lib/svix/api_internal/autoconfig_subscription_destination.rb +22 -0
- data/lib/svix/api_internal/autoconfig_subscription_endpoint.rb +22 -0
- data/lib/svix/api_internal/endpoint.rb +2 -2
- data/lib/svix/api_internal/{endpoint_auto_config.rb → endpoint_auto_config_deprecated.rb} +1 -1
- data/lib/svix/autoconfig.rb +53 -18
- data/lib/svix/autoconfig_consumer.rb +71 -9
- data/lib/svix/models/auto_config_out.rb +53 -0
- data/lib/svix/models/auto_config_sink_type.rb +1 -5
- data/lib/svix/models/auto_config_subscription_out.rb +67 -0
- data/lib/svix/models/destination_in.rb +204 -0
- data/lib/svix/models/destination_out.rb +224 -0
- data/lib/svix/models/destination_patch.rb +190 -0
- data/lib/svix/models/destination_status.rb +31 -0
- data/lib/svix/models/destination_status_in.rb +29 -0
- data/lib/svix/models/destination_transform_in.rb +49 -0
- data/lib/svix/models/destination_transformation_out.rb +52 -0
- data/lib/svix/models/event_bridge_config_in.rb +21 -3
- data/lib/svix/models/event_bridge_config_out.rb +7 -1
- data/lib/svix/models/event_bridge_config_patch.rb +15 -1
- data/lib/svix/models/fifo_endpoint_config_in.rb +52 -0
- data/lib/svix/models/ingest_source_in.rb +6 -5
- data/lib/svix/models/ingest_source_out.rb +6 -5
- data/lib/svix/models/list_response_destination_out.rb +58 -0
- data/lib/svix/models/merge_config.rb +46 -0
- data/lib/svix/models/merge_config_out.rb +43 -0
- data/lib/svix/models/redshift_config_in.rb +14 -2
- data/lib/svix/models/redshift_config_out.rb +8 -0
- data/lib/svix/models/redshift_config_patch.rb +16 -1
- data/lib/svix/models/rotate_subscription_in2.rb +52 -0
- data/lib/svix/models/s3_config_in.rb +1 -1
- data/lib/svix/models/sns_config_in.rb +21 -3
- data/lib/svix/models/sns_config_out.rb +7 -1
- data/lib/svix/models/sns_config_patch.rb +15 -1
- data/lib/svix/models/sqs_config_in.rb +21 -3
- data/lib/svix/models/sqs_config_out.rb +7 -1
- data/lib/svix/models/sqs_config_patch.rb +15 -1
- data/lib/svix/models/status.rb +29 -0
- data/lib/svix/models/stream_sink_in.rb +1 -5
- data/lib/svix/models/stream_sink_out.rb +18 -5
- data/lib/svix/models/stream_sink_patch.rb +1 -5
- data/lib/svix/svix.rb +4 -0
- data/lib/svix/version.rb +1 -1
- data/lib/svix.rb +16 -0
- metadata +24 -3
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file is @generated
|
|
3
|
+
require "json"
|
|
4
|
+
|
|
5
|
+
module Svix
|
|
6
|
+
class DestinationTransformIn
|
|
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(
|
|
15
|
+
ArgumentError,
|
|
16
|
+
"The input argument (attributes) must be a hash in `Svix::DestinationTransformIn` 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::DestinationTransformIn")
|
|
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["code"] = attributes["code"]
|
|
34
|
+
new(attrs)
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def serialize
|
|
38
|
+
out = Hash.new
|
|
39
|
+
out["code"] = Svix::serialize_primitive(@code) unless @code.nil?
|
|
40
|
+
out
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Serializes the object to a json string
|
|
44
|
+
# @return String
|
|
45
|
+
def to_json(*args)
|
|
46
|
+
serialize.to_json(*args)
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file is @generated
|
|
3
|
+
require "json"
|
|
4
|
+
|
|
5
|
+
module Svix
|
|
6
|
+
class DestinationTransformationOut
|
|
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::DestinationTransformationOut` 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::DestinationTransformationOut")
|
|
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) unless @code.nil?
|
|
42
|
+
out["enabled"] = Svix::serialize_primitive(@enabled) unless @enabled.nil?
|
|
43
|
+
out
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Serializes the object to a json string
|
|
47
|
+
# @return String
|
|
48
|
+
def to_json(*args)
|
|
49
|
+
serialize.to_json(*args)
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
@@ -10,18 +10,32 @@ module Svix
|
|
|
10
10
|
attr_accessor :detail_type
|
|
11
11
|
# Access key ID.
|
|
12
12
|
#
|
|
13
|
-
#
|
|
13
|
+
# Required (along with `secret_access_key`) if `role_arn` is blank.
|
|
14
14
|
attr_accessor :access_key_id
|
|
15
15
|
# Secret access key.
|
|
16
16
|
#
|
|
17
|
-
#
|
|
17
|
+
# Required (along with `access_key_id`) if `role_arn` is blank.
|
|
18
18
|
attr_accessor :secret_access_key
|
|
19
|
+
# Role ARN for delegated authentication
|
|
20
|
+
attr_accessor :role_arn
|
|
21
|
+
# Shared secret passed as the STS ExternalId.
|
|
22
|
+
#
|
|
23
|
+
# Can only be set if `role_arn` is Some
|
|
24
|
+
attr_accessor :external_id
|
|
19
25
|
# The region of the EventBridge bus.
|
|
20
26
|
#
|
|
21
27
|
# Currently a required field, but marked as optional because we may infer it from other fields in the future.
|
|
22
28
|
attr_accessor :region
|
|
23
29
|
|
|
24
|
-
ALL_FIELD ||= [
|
|
30
|
+
ALL_FIELD ||= [
|
|
31
|
+
"event_bus_name",
|
|
32
|
+
"detail_type",
|
|
33
|
+
"access_key_id",
|
|
34
|
+
"secret_access_key",
|
|
35
|
+
"role_arn",
|
|
36
|
+
"external_id",
|
|
37
|
+
"region"
|
|
38
|
+
].freeze
|
|
25
39
|
private_constant :ALL_FIELD
|
|
26
40
|
|
|
27
41
|
def initialize(attributes = {})
|
|
@@ -46,6 +60,8 @@ module Svix
|
|
|
46
60
|
attrs["detail_type"] = attributes["detailType"]
|
|
47
61
|
attrs["access_key_id"] = attributes["accessKeyId"]
|
|
48
62
|
attrs["secret_access_key"] = attributes["secretAccessKey"]
|
|
63
|
+
attrs["role_arn"] = attributes["roleArn"]
|
|
64
|
+
attrs["external_id"] = attributes["externalId"]
|
|
49
65
|
attrs["region"] = attributes["region"]
|
|
50
66
|
new(attrs)
|
|
51
67
|
end
|
|
@@ -56,6 +72,8 @@ module Svix
|
|
|
56
72
|
out["detailType"] = Svix::serialize_primitive(@detail_type) unless @detail_type.nil?
|
|
57
73
|
out["accessKeyId"] = Svix::serialize_primitive(@access_key_id) unless @access_key_id.nil?
|
|
58
74
|
out["secretAccessKey"] = Svix::serialize_primitive(@secret_access_key) unless @secret_access_key.nil?
|
|
75
|
+
out["roleArn"] = Svix::serialize_primitive(@role_arn) unless @role_arn.nil?
|
|
76
|
+
out["externalId"] = Svix::serialize_primitive(@external_id) unless @external_id.nil?
|
|
59
77
|
out["region"] = Svix::serialize_primitive(@region) unless @region.nil?
|
|
60
78
|
out
|
|
61
79
|
end
|
|
@@ -7,9 +7,11 @@ module Svix
|
|
|
7
7
|
attr_accessor :event_bus_name
|
|
8
8
|
attr_accessor :detail_type
|
|
9
9
|
attr_accessor :access_key_id
|
|
10
|
+
attr_accessor :role_arn
|
|
11
|
+
attr_accessor :external_id
|
|
10
12
|
attr_accessor :region
|
|
11
13
|
|
|
12
|
-
ALL_FIELD ||= ["event_bus_name", "detail_type", "access_key_id", "region"].freeze
|
|
14
|
+
ALL_FIELD ||= ["event_bus_name", "detail_type", "access_key_id", "role_arn", "external_id", "region"].freeze
|
|
13
15
|
private_constant :ALL_FIELD
|
|
14
16
|
|
|
15
17
|
def initialize(attributes = {})
|
|
@@ -33,6 +35,8 @@ module Svix
|
|
|
33
35
|
attrs["event_bus_name"] = attributes["eventBusName"]
|
|
34
36
|
attrs["detail_type"] = attributes["detailType"]
|
|
35
37
|
attrs["access_key_id"] = attributes["accessKeyId"]
|
|
38
|
+
attrs["role_arn"] = attributes["roleArn"]
|
|
39
|
+
attrs["external_id"] = attributes["externalId"]
|
|
36
40
|
attrs["region"] = attributes["region"]
|
|
37
41
|
new(attrs)
|
|
38
42
|
end
|
|
@@ -42,6 +46,8 @@ module Svix
|
|
|
42
46
|
out["eventBusName"] = Svix::serialize_primitive(@event_bus_name) unless @event_bus_name.nil?
|
|
43
47
|
out["detailType"] = Svix::serialize_primitive(@detail_type) unless @detail_type.nil?
|
|
44
48
|
out["accessKeyId"] = Svix::serialize_primitive(@access_key_id) unless @access_key_id.nil?
|
|
49
|
+
out["roleArn"] = Svix::serialize_primitive(@role_arn) unless @role_arn.nil?
|
|
50
|
+
out["externalId"] = Svix::serialize_primitive(@external_id) unless @external_id.nil?
|
|
45
51
|
out["region"] = Svix::serialize_primitive(@region) unless @region.nil?
|
|
46
52
|
out
|
|
47
53
|
end
|
|
@@ -8,9 +8,19 @@ module Svix
|
|
|
8
8
|
attr_accessor :detail_type
|
|
9
9
|
attr_accessor :access_key_id
|
|
10
10
|
attr_accessor :secret_access_key
|
|
11
|
+
attr_accessor :role_arn
|
|
12
|
+
attr_accessor :external_id
|
|
11
13
|
attr_accessor :region
|
|
12
14
|
|
|
13
|
-
ALL_FIELD ||= [
|
|
15
|
+
ALL_FIELD ||= [
|
|
16
|
+
"event_bus_name",
|
|
17
|
+
"detail_type",
|
|
18
|
+
"access_key_id",
|
|
19
|
+
"secret_access_key",
|
|
20
|
+
"role_arn",
|
|
21
|
+
"external_id",
|
|
22
|
+
"region"
|
|
23
|
+
].freeze
|
|
14
24
|
private_constant :ALL_FIELD
|
|
15
25
|
|
|
16
26
|
def initialize(attributes = {})
|
|
@@ -38,6 +48,8 @@ module Svix
|
|
|
38
48
|
attrs["detail_type"] = attributes["detailType"]
|
|
39
49
|
attrs["access_key_id"] = attributes["accessKeyId"]
|
|
40
50
|
attrs["secret_access_key"] = attributes["secretAccessKey"]
|
|
51
|
+
attrs["role_arn"] = attributes["roleArn"]
|
|
52
|
+
attrs["external_id"] = attributes["externalId"]
|
|
41
53
|
attrs["region"] = attributes["region"]
|
|
42
54
|
new(attrs)
|
|
43
55
|
end
|
|
@@ -48,6 +60,8 @@ module Svix
|
|
|
48
60
|
out["detailType"] = Svix::serialize_primitive(@detail_type) unless @detail_type.nil?
|
|
49
61
|
out["accessKeyId"] = Svix::serialize_primitive(@access_key_id) unless @access_key_id.nil?
|
|
50
62
|
out["secretAccessKey"] = Svix::serialize_primitive(@secret_access_key) unless @secret_access_key.nil?
|
|
63
|
+
out["roleArn"] = Svix::serialize_primitive(@role_arn) unless @role_arn.nil?
|
|
64
|
+
out["externalId"] = Svix::serialize_primitive(@external_id) unless @external_id.nil?
|
|
51
65
|
out["region"] = Svix::serialize_primitive(@region) unless @region.nil?
|
|
52
66
|
out
|
|
53
67
|
end
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file is @generated
|
|
3
|
+
require "json"
|
|
4
|
+
|
|
5
|
+
module Svix
|
|
6
|
+
class FifoEndpointConfigIn
|
|
7
|
+
attr_accessor :url
|
|
8
|
+
attr_accessor :headers
|
|
9
|
+
attr_accessor :key
|
|
10
|
+
|
|
11
|
+
ALL_FIELD ||= ["url", "headers", "key"].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::FifoEndpointConfigIn` 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::FifoEndpointConfigIn")
|
|
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["url"] = attributes["url"]
|
|
33
|
+
attrs["headers"] = attributes["headers"]
|
|
34
|
+
attrs["key"] = attributes["key"]
|
|
35
|
+
new(attrs)
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def serialize
|
|
39
|
+
out = Hash.new
|
|
40
|
+
out["url"] = Svix::serialize_primitive(@url) unless @url.nil?
|
|
41
|
+
out["headers"] = Svix::serialize_primitive(@headers) unless @headers.nil?
|
|
42
|
+
out["key"] = Svix::serialize_primitive(@key) unless @key.nil?
|
|
43
|
+
out
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Serializes the object to a json string
|
|
47
|
+
# @return String
|
|
48
|
+
def to_json(*args)
|
|
49
|
+
serialize.to_json(*args)
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
@@ -10,6 +10,7 @@ require_relative "./docusign_config"
|
|
|
10
10
|
require_relative "./easypost_config"
|
|
11
11
|
require_relative "./github_config"
|
|
12
12
|
require_relative "./hubspot_config"
|
|
13
|
+
require_relative "./merge_config"
|
|
13
14
|
require_relative "./meta_config"
|
|
14
15
|
require_relative "./nango_config"
|
|
15
16
|
require_relative "./open_claw_config"
|
|
@@ -86,6 +87,9 @@ module Svix
|
|
|
86
87
|
class Lithic < SvixConfig
|
|
87
88
|
end
|
|
88
89
|
|
|
90
|
+
class Merge < MergeConfig
|
|
91
|
+
end
|
|
92
|
+
|
|
89
93
|
class Meta < MetaConfig
|
|
90
94
|
end
|
|
91
95
|
|
|
@@ -198,6 +202,7 @@ module Svix
|
|
|
198
202
|
IngestSourceInConfig::Hubspot => "hubspot",
|
|
199
203
|
IngestSourceInConfig::IncidentIo => "incident-io",
|
|
200
204
|
IngestSourceInConfig::Lithic => "lithic",
|
|
205
|
+
IngestSourceInConfig::Merge => "merge",
|
|
201
206
|
IngestSourceInConfig::Meta => "meta",
|
|
202
207
|
IngestSourceInConfig::Nango => "nango",
|
|
203
208
|
IngestSourceInConfig::Nash => "nash",
|
|
@@ -272,11 +277,7 @@ module Svix
|
|
|
272
277
|
fail(ArgumentError, "Invalid type `#{attributes["type"]}` expected on of #{NAME_TO_TYPE.keys}")
|
|
273
278
|
end
|
|
274
279
|
|
|
275
|
-
|
|
276
|
-
fail(ArgumentError, "Missing required field config")
|
|
277
|
-
end
|
|
278
|
-
|
|
279
|
-
attrs["config"] = NAME_TO_TYPE[attributes["type"]].deserialize(attributes["config"])
|
|
280
|
+
attrs["config"] = NAME_TO_TYPE[attributes["type"]].deserialize(attributes["config"] || {})
|
|
280
281
|
new(attrs)
|
|
281
282
|
end
|
|
282
283
|
|
|
@@ -10,6 +10,7 @@ require_relative "./docusign_config_out"
|
|
|
10
10
|
require_relative "./easypost_config_out"
|
|
11
11
|
require_relative "./github_config_out"
|
|
12
12
|
require_relative "./hubspot_config_out"
|
|
13
|
+
require_relative "./merge_config_out"
|
|
13
14
|
require_relative "./meta_config_out"
|
|
14
15
|
require_relative "./nango_config_out"
|
|
15
16
|
require_relative "./open_claw_config_out"
|
|
@@ -86,6 +87,9 @@ module Svix
|
|
|
86
87
|
class Lithic < SvixConfigOut
|
|
87
88
|
end
|
|
88
89
|
|
|
90
|
+
class Merge < MergeConfigOut
|
|
91
|
+
end
|
|
92
|
+
|
|
89
93
|
class Meta < MetaConfigOut
|
|
90
94
|
end
|
|
91
95
|
|
|
@@ -203,6 +207,7 @@ module Svix
|
|
|
203
207
|
IngestSourceOutConfig::Hubspot => "hubspot",
|
|
204
208
|
IngestSourceOutConfig::IncidentIo => "incident-io",
|
|
205
209
|
IngestSourceOutConfig::Lithic => "lithic",
|
|
210
|
+
IngestSourceOutConfig::Merge => "merge",
|
|
206
211
|
IngestSourceOutConfig::Meta => "meta",
|
|
207
212
|
IngestSourceOutConfig::Nango => "nango",
|
|
208
213
|
IngestSourceOutConfig::Nash => "nash",
|
|
@@ -281,11 +286,7 @@ module Svix
|
|
|
281
286
|
fail(ArgumentError, "Invalid type `#{attributes["type"]}` expected on of #{NAME_TO_TYPE.keys}")
|
|
282
287
|
end
|
|
283
288
|
|
|
284
|
-
|
|
285
|
-
fail(ArgumentError, "Missing required field config")
|
|
286
|
-
end
|
|
287
|
-
|
|
288
|
-
attrs["config"] = NAME_TO_TYPE[attributes["type"]].deserialize(attributes["config"])
|
|
289
|
+
attrs["config"] = NAME_TO_TYPE[attributes["type"]].deserialize(attributes["config"] || {})
|
|
289
290
|
new(attrs)
|
|
290
291
|
end
|
|
291
292
|
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file is @generated
|
|
3
|
+
require "json"
|
|
4
|
+
|
|
5
|
+
module Svix
|
|
6
|
+
class ListResponseDestinationOut
|
|
7
|
+
attr_accessor :data
|
|
8
|
+
attr_accessor :iterator
|
|
9
|
+
attr_accessor :prev_iterator
|
|
10
|
+
attr_accessor :done
|
|
11
|
+
|
|
12
|
+
ALL_FIELD ||= ["data", "iterator", "prev_iterator", "done"].freeze
|
|
13
|
+
private_constant :ALL_FIELD
|
|
14
|
+
|
|
15
|
+
def initialize(attributes = {})
|
|
16
|
+
unless attributes.is_a?(Hash)
|
|
17
|
+
fail(
|
|
18
|
+
ArgumentError,
|
|
19
|
+
"The input argument (attributes) must be a hash in `Svix::ListResponseDestinationOut` new method"
|
|
20
|
+
)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
attributes.each do |k, v|
|
|
24
|
+
unless ALL_FIELD.include?(k.to_s)
|
|
25
|
+
fail(ArgumentError, "The field #{k} is not part of Svix::ListResponseDestinationOut")
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
instance_variable_set("@#{k}", v)
|
|
29
|
+
instance_variable_set("@__#{k}_is_defined", true)
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def self.deserialize(attributes = {})
|
|
34
|
+
attributes = attributes.transform_keys(&:to_s)
|
|
35
|
+
attrs = Hash.new
|
|
36
|
+
attrs["data"] = attributes["data"].map { |v| Svix::DestinationOut.deserialize(v) }
|
|
37
|
+
attrs["iterator"] = attributes["iterator"]
|
|
38
|
+
attrs["prev_iterator"] = attributes["prevIterator"]
|
|
39
|
+
attrs["done"] = attributes["done"]
|
|
40
|
+
new(attrs)
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def serialize
|
|
44
|
+
out = Hash.new
|
|
45
|
+
out["data"] = @data.map { |v| v.serialize } unless @data.nil?
|
|
46
|
+
out["iterator"] = Svix::serialize_primitive(@iterator) unless @iterator.nil?
|
|
47
|
+
out["prevIterator"] = Svix::serialize_primitive(@prev_iterator) unless @prev_iterator.nil?
|
|
48
|
+
out["done"] = Svix::serialize_primitive(@done) unless @done.nil?
|
|
49
|
+
out
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Serializes the object to a json string
|
|
53
|
+
# @return String
|
|
54
|
+
def to_json(*args)
|
|
55
|
+
serialize.to_json(*args)
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file is @generated
|
|
3
|
+
require "json"
|
|
4
|
+
|
|
5
|
+
module Svix
|
|
6
|
+
class MergeConfig
|
|
7
|
+
attr_accessor :secret
|
|
8
|
+
|
|
9
|
+
ALL_FIELD ||= ["secret"].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::MergeConfig` 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::MergeConfig")
|
|
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["secret"] = attributes["secret"]
|
|
31
|
+
new(attrs)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def serialize
|
|
35
|
+
out = Hash.new
|
|
36
|
+
out["secret"] = Svix::serialize_primitive(@secret) unless @secret.nil?
|
|
37
|
+
out
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Serializes the object to a json string
|
|
41
|
+
# @return String
|
|
42
|
+
def to_json(*args)
|
|
43
|
+
serialize.to_json(*args)
|
|
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 MergeConfigOut
|
|
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::MergeConfigOut` 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::MergeConfigOut")
|
|
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(*args)
|
|
40
|
+
serialize.to_json(*args)
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -9,12 +9,18 @@ module Svix
|
|
|
9
9
|
class RedshiftConfigIn
|
|
10
10
|
# Access key ID.
|
|
11
11
|
#
|
|
12
|
-
#
|
|
12
|
+
# Required (along with `secret_access_key`) if `role_arn` is blank.
|
|
13
13
|
attr_accessor :access_key_id
|
|
14
14
|
# Secret access key.
|
|
15
15
|
#
|
|
16
|
-
#
|
|
16
|
+
# Required (along with `access_key_id`) if `role_arn` is blank.
|
|
17
17
|
attr_accessor :secret_access_key
|
|
18
|
+
# Role ARN for delegated authentication
|
|
19
|
+
attr_accessor :role_arn
|
|
20
|
+
# Shared secret passed as the STS ExternalId.
|
|
21
|
+
#
|
|
22
|
+
# Can only be set if `role_arn` is Some
|
|
23
|
+
attr_accessor :external_id
|
|
18
24
|
# The region of the Redshift DB.
|
|
19
25
|
#
|
|
20
26
|
# Currently a required field, but marked as optional because we may infer it from other fields in the future.
|
|
@@ -41,6 +47,8 @@ module Svix
|
|
|
41
47
|
ALL_FIELD ||= [
|
|
42
48
|
"access_key_id",
|
|
43
49
|
"secret_access_key",
|
|
50
|
+
"role_arn",
|
|
51
|
+
"external_id",
|
|
44
52
|
"region",
|
|
45
53
|
"cluster_identifier",
|
|
46
54
|
"db_user",
|
|
@@ -71,6 +79,8 @@ module Svix
|
|
|
71
79
|
attrs = Hash.new
|
|
72
80
|
attrs["access_key_id"] = attributes["accessKeyId"]
|
|
73
81
|
attrs["secret_access_key"] = attributes["secretAccessKey"]
|
|
82
|
+
attrs["role_arn"] = attributes["roleArn"]
|
|
83
|
+
attrs["external_id"] = attributes["externalId"]
|
|
74
84
|
attrs["region"] = attributes["region"]
|
|
75
85
|
attrs["cluster_identifier"] = attributes["clusterIdentifier"]
|
|
76
86
|
attrs["db_user"] = attributes["dbUser"]
|
|
@@ -85,6 +95,8 @@ module Svix
|
|
|
85
95
|
out = Hash.new
|
|
86
96
|
out["accessKeyId"] = Svix::serialize_primitive(@access_key_id) unless @access_key_id.nil?
|
|
87
97
|
out["secretAccessKey"] = Svix::serialize_primitive(@secret_access_key) unless @secret_access_key.nil?
|
|
98
|
+
out["roleArn"] = Svix::serialize_primitive(@role_arn) unless @role_arn.nil?
|
|
99
|
+
out["externalId"] = Svix::serialize_primitive(@external_id) unless @external_id.nil?
|
|
88
100
|
out["region"] = Svix::serialize_primitive(@region) unless @region.nil?
|
|
89
101
|
out["clusterIdentifier"] = Svix::serialize_primitive(@cluster_identifier) unless @cluster_identifier.nil?
|
|
90
102
|
out["dbUser"] = Svix::serialize_primitive(@db_user) unless @db_user.nil?
|
|
@@ -5,6 +5,8 @@ require "json"
|
|
|
5
5
|
module Svix
|
|
6
6
|
class RedshiftConfigOut
|
|
7
7
|
attr_accessor :access_key_id
|
|
8
|
+
attr_accessor :role_arn
|
|
9
|
+
attr_accessor :external_id
|
|
8
10
|
attr_accessor :region
|
|
9
11
|
attr_accessor :cluster_identifier
|
|
10
12
|
attr_accessor :db_user
|
|
@@ -24,6 +26,8 @@ module Svix
|
|
|
24
26
|
|
|
25
27
|
ALL_FIELD ||= [
|
|
26
28
|
"access_key_id",
|
|
29
|
+
"role_arn",
|
|
30
|
+
"external_id",
|
|
27
31
|
"region",
|
|
28
32
|
"cluster_identifier",
|
|
29
33
|
"db_user",
|
|
@@ -53,6 +57,8 @@ module Svix
|
|
|
53
57
|
attributes = attributes.transform_keys(&:to_s)
|
|
54
58
|
attrs = Hash.new
|
|
55
59
|
attrs["access_key_id"] = attributes["accessKeyId"]
|
|
60
|
+
attrs["role_arn"] = attributes["roleArn"]
|
|
61
|
+
attrs["external_id"] = attributes["externalId"]
|
|
56
62
|
attrs["region"] = attributes["region"]
|
|
57
63
|
attrs["cluster_identifier"] = attributes["clusterIdentifier"]
|
|
58
64
|
attrs["db_user"] = attributes["dbUser"]
|
|
@@ -66,6 +72,8 @@ module Svix
|
|
|
66
72
|
def serialize
|
|
67
73
|
out = Hash.new
|
|
68
74
|
out["accessKeyId"] = Svix::serialize_primitive(@access_key_id) unless @access_key_id.nil?
|
|
75
|
+
out["roleArn"] = Svix::serialize_primitive(@role_arn) unless @role_arn.nil?
|
|
76
|
+
out["externalId"] = Svix::serialize_primitive(@external_id) unless @external_id.nil?
|
|
69
77
|
out["region"] = Svix::serialize_primitive(@region) unless @region.nil?
|
|
70
78
|
out["clusterIdentifier"] = Svix::serialize_primitive(@cluster_identifier) unless @cluster_identifier.nil?
|
|
71
79
|
out["dbUser"] = Svix::serialize_primitive(@db_user) unless @db_user.nil?
|
|
@@ -6,6 +6,8 @@ module Svix
|
|
|
6
6
|
class RedshiftConfigPatch
|
|
7
7
|
attr_accessor :access_key_id
|
|
8
8
|
attr_accessor :secret_access_key
|
|
9
|
+
attr_accessor :role_arn
|
|
10
|
+
attr_accessor :external_id
|
|
9
11
|
attr_accessor :region
|
|
10
12
|
# Database name.
|
|
11
13
|
#
|
|
@@ -20,7 +22,16 @@ module Svix
|
|
|
20
22
|
# Only required if not using transformations.
|
|
21
23
|
attr_accessor :table_name
|
|
22
24
|
|
|
23
|
-
ALL_FIELD ||= [
|
|
25
|
+
ALL_FIELD ||= [
|
|
26
|
+
"access_key_id",
|
|
27
|
+
"secret_access_key",
|
|
28
|
+
"role_arn",
|
|
29
|
+
"external_id",
|
|
30
|
+
"region",
|
|
31
|
+
"db_name",
|
|
32
|
+
"schema_name",
|
|
33
|
+
"table_name"
|
|
34
|
+
].freeze
|
|
24
35
|
private_constant :ALL_FIELD
|
|
25
36
|
|
|
26
37
|
def initialize(attributes = {})
|
|
@@ -43,6 +54,8 @@ module Svix
|
|
|
43
54
|
attrs = Hash.new
|
|
44
55
|
attrs["access_key_id"] = attributes["accessKeyId"]
|
|
45
56
|
attrs["secret_access_key"] = attributes["secretAccessKey"]
|
|
57
|
+
attrs["role_arn"] = attributes["roleArn"]
|
|
58
|
+
attrs["external_id"] = attributes["externalId"]
|
|
46
59
|
attrs["region"] = attributes["region"]
|
|
47
60
|
attrs["db_name"] = attributes["dbName"]
|
|
48
61
|
attrs["schema_name"] = attributes["schemaName"]
|
|
@@ -54,6 +67,8 @@ module Svix
|
|
|
54
67
|
out = Hash.new
|
|
55
68
|
out["accessKeyId"] = Svix::serialize_primitive(@access_key_id) unless @access_key_id.nil?
|
|
56
69
|
out["secretAccessKey"] = Svix::serialize_primitive(@secret_access_key) unless @secret_access_key.nil?
|
|
70
|
+
out["roleArn"] = Svix::serialize_primitive(@role_arn) unless @role_arn.nil?
|
|
71
|
+
out["externalId"] = Svix::serialize_primitive(@external_id) unless @external_id.nil?
|
|
57
72
|
out["region"] = Svix::serialize_primitive(@region) unless @region.nil?
|
|
58
73
|
out["dbName"] = Svix::serialize_primitive(@db_name) unless @db_name.nil?
|
|
59
74
|
out["schemaName"] = Svix::serialize_primitive(@schema_name) if @__schema_name_is_defined
|