svix 2.0.0.pre.rc.2 → 2.0.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.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -0
  3. data/Gemfile.lock +27 -1
  4. data/lib/svix/api/ingest_endpoint_transformation.rb +1 -1
  5. data/lib/svix/models/{azure_blob_storage_patch_config.rb → azure_blob_storage_config_in.rb} +6 -3
  6. data/lib/svix/models/azure_blob_storage_config_out.rb +52 -0
  7. data/lib/svix/models/{azure_blob_storage_config.rb → azure_blob_storage_config_patch.rb} +3 -3
  8. data/lib/svix/models/{big_query_config.rb → big_query_config_in.rb} +3 -3
  9. data/lib/svix/models/big_query_config_out.rb +52 -0
  10. data/lib/svix/models/{big_query_patch_config.rb → big_query_config_patch.rb} +3 -3
  11. data/lib/svix/models/{clickhouse_config.rb → clickhouse_config_in.rb} +11 -7
  12. data/lib/svix/models/clickhouse_config_out.rb +55 -0
  13. data/lib/svix/models/{clickhouse_patch_config.rb → clickhouse_config_patch.rb} +3 -3
  14. data/lib/svix/models/endpoint_patch.rb +1 -1
  15. data/lib/svix/models/endpoint_transformation_patch.rb +1 -1
  16. data/lib/svix/models/{event_bridge_config.rb → event_bridge_config_in.rb} +12 -3
  17. data/lib/svix/models/event_bridge_config_out.rb +55 -0
  18. data/lib/svix/models/{event_bridge_patch_config.rb → event_bridge_config_patch.rb} +3 -3
  19. data/lib/svix/models/event_type_patch.rb +2 -2
  20. data/lib/svix/models/{google_cloud_pub_sub_config.rb → google_cloud_pub_sub_config_in.rb} +3 -3
  21. data/lib/svix/models/google_cloud_pub_sub_config_out.rb +52 -0
  22. data/lib/svix/models/{google_cloud_pub_sub_patch_config.rb → google_cloud_pub_sub_config_patch.rb} +3 -3
  23. data/lib/svix/models/{google_cloud_storage_config.rb → google_cloud_storage_config_in.rb} +3 -3
  24. data/lib/svix/models/google_cloud_storage_config_out.rb +49 -0
  25. data/lib/svix/models/{google_cloud_storage_patch_config.rb → google_cloud_storage_config_patch.rb} +3 -3
  26. data/lib/svix/models/ingest_endpoint_in.rb +4 -1
  27. data/lib/svix/models/ingest_endpoint_secret_in.rb +7 -1
  28. data/lib/svix/models/ingest_endpoint_transformation_out.rb +4 -1
  29. data/lib/svix/models/ingest_endpoint_transformation_patch.rb +5 -2
  30. data/lib/svix/models/operational_webhook_endpoint_in.rb +14 -1
  31. data/lib/svix/models/operational_webhook_endpoint_secret_in.rb +7 -1
  32. data/lib/svix/models/{sink_otel_v1_config.rb → otel_tracing_config_in.rb} +3 -3
  33. data/lib/svix/models/otel_tracing_config_out.rb +49 -0
  34. data/lib/svix/models/{otel_tracing_patch_config.rb → otel_tracing_config_patch.rb} +3 -3
  35. data/lib/svix/models/{rabbit_mq_config.rb → rabbit_mq_config_in.rb} +3 -3
  36. data/lib/svix/models/rabbit_mq_config_out.rb +46 -0
  37. data/lib/svix/models/{rabbit_mq_patch_config.rb → rabbit_mq_config_patch.rb} +3 -3
  38. data/lib/svix/models/{redshift_config.rb → redshift_config_in.rb} +12 -3
  39. data/lib/svix/models/redshift_config_out.rb +85 -0
  40. data/lib/svix/models/{redshift_patch_config.rb → redshift_config_patch.rb} +4 -4
  41. data/lib/svix/models/s3_config_in.rb +67 -0
  42. data/lib/svix/models/{amazon_s3_patch_config.rb → s3_config_out.rb} +4 -7
  43. data/lib/svix/models/{s3_config.rb → s3_config_patch.rb} +3 -3
  44. data/lib/svix/models/{sink_http_config.rb → sink_http_config_in.rb} +3 -3
  45. data/lib/svix/models/sink_http_config_out.rb +49 -0
  46. data/lib/svix/models/{http_patch_config.rb → sink_http_config_patch.rb} +3 -3
  47. data/lib/svix/models/{snowflake_config.rb → snowflake_config_in.rb} +5 -3
  48. data/lib/svix/models/snowflake_config_out.rb +67 -0
  49. data/lib/svix/models/{snowflake_patch_config.rb → snowflake_config_patch.rb} +3 -3
  50. data/lib/svix/models/{sns_config.rb → sns_config_in.rb} +12 -3
  51. data/lib/svix/models/sns_config_out.rb +52 -0
  52. data/lib/svix/models/{sns_patch_config.rb → sns_config_patch.rb} +4 -4
  53. data/lib/svix/models/sqs_config_in.rb +68 -0
  54. data/lib/svix/models/{sqs_config.rb → sqs_config_out.rb} +4 -8
  55. data/lib/svix/models/{sqs_patch_config.rb → sqs_config_patch.rb} +4 -4
  56. data/lib/svix/models/stream_event_type_patch.rb +2 -2
  57. data/lib/svix/models/stream_sink_in.rb +32 -29
  58. data/lib/svix/models/stream_sink_out.rb +37 -33
  59. data/lib/svix/models/stream_sink_patch.rb +32 -29
  60. data/lib/svix/version.rb +1 -1
  61. data/lib/svix/webhook.rb +19 -6
  62. data/lib/svix.rb +42 -28
  63. data/svix.gemspec +2 -1
  64. metadata +58 -30
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8efbb008629fc2362a979b72bef2da4729852247e1ff8d61b42b5b6756bd46ca
4
- data.tar.gz: b022fe4aac3c668fc09c4c37e2a16a40c2b05f1c9986ae49cc407352e7669de0
3
+ metadata.gz: 2fc53bc63b9ae31d227b0d24a99ab9170d73dd7e0269b5606343058a227e0e4e
4
+ data.tar.gz: 14907d267547ac4a479286d291b60b5bc78e3097929280582c207088eac315a2
5
5
  SHA512:
6
- metadata.gz: 3814d3269571af4d6c65c8547b20e7c3629cbe14020dcf1fe50a6c4058bc6a219311626109a8caa9c4e81e094399f094352c7701d8e6fcfc076ea3aed42958b5
7
- data.tar.gz: 0be351c5af78e6a979650affa97f047aa6e01f24507911b447299943ffd90487711c4c79717dfdf944224bf921d73fddf4a910173499ae5ac48d13388795a80a
6
+ metadata.gz: 39001b060e52b61f449713180aa04992764f0cd344ba86c1b1b364349c17facf0045f5fc8a915dc00987941bc8c5dfe3de137e9713099dea0e7847c6bb9dba13
7
+ data.tar.gz: 4a7ded3a8d1fcbdd38f1e30f7747123502d5ce0e8d48819e535c1c9a91472656c182f0da2291f551427fbbf746e2cddf296c718328254ad023eadbfc3afbd29c
data/Gemfile CHANGED
@@ -3,5 +3,6 @@ source "https://rubygems.org"
3
3
  gem 'base64'
4
4
  gem 'logger'
5
5
  gem 'ostruct'
6
+ gem "irb"
6
7
 
7
8
  gemspec
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- svix (2.0.0.pre.rc.2)
4
+ svix (2.0.0)
5
5
  base64 (~> 0.3.0)
6
6
  logger (~> 1.0)
7
7
 
@@ -16,11 +16,33 @@ GEM
16
16
  bigdecimal
17
17
  rexml
18
18
  diff-lcs (1.6.2)
19
+ erb (6.0.7)
19
20
  hashdiff (1.2.1)
21
+ io-console (0.9.2)
22
+ irb (1.18.0)
23
+ pp (>= 0.6.0)
24
+ prism (>= 1.3.0)
25
+ rdoc (>= 4.0.0)
26
+ reline (>= 0.4.2)
20
27
  logger (1.7.0)
21
28
  ostruct (0.6.3)
29
+ pp (0.6.4)
30
+ prettyprint
31
+ prettyprint (0.2.0)
32
+ prism (1.9.0)
22
33
  public_suffix (7.0.5)
23
34
  rake (13.4.1)
35
+ rbs (4.1.3)
36
+ logger
37
+ prism (>= 1.6.0)
38
+ tsort
39
+ rdoc (8.0.0)
40
+ erb
41
+ prism (>= 1.6.0)
42
+ rbs (>= 4.0.0)
43
+ tsort
44
+ reline (0.7.0)
45
+ io-console (~> 0.5)
24
46
  rexml (3.4.4)
25
47
  rspec (3.13.2)
26
48
  rspec-core (~> 3.13.0)
@@ -35,6 +57,8 @@ GEM
35
57
  diff-lcs (>= 1.2.0, < 2.0)
36
58
  rspec-support (~> 3.13.0)
37
59
  rspec-support (3.13.7)
60
+ subprocess (1.5.7)
61
+ tsort (0.2.0)
38
62
  webmock (3.26.2)
39
63
  addressable (>= 2.8.0)
40
64
  crack (>= 0.3.2)
@@ -45,10 +69,12 @@ PLATFORMS
45
69
 
46
70
  DEPENDENCIES
47
71
  base64
72
+ irb
48
73
  logger
49
74
  ostruct
50
75
  rake (~> 13.0)
51
76
  rspec (~> 3.2)
77
+ subprocess (~> 1.5)
52
78
  svix!
53
79
  webmock (~> 3.25)
54
80
 
@@ -9,7 +9,7 @@ module Svix
9
9
  @client = client
10
10
  end
11
11
 
12
- def transformation(source_id, endpoint_id)
12
+ def get(source_id, endpoint_id)
13
13
  res = @client.execute_request(
14
14
  "GET",
15
15
  "/ingest/api/v1/source/#{source_id}/endpoint/#{endpoint_id}/transformation"
@@ -3,9 +3,12 @@
3
3
  require "json"
4
4
 
5
5
  module Svix
6
- class AzureBlobStoragePatchConfig
6
+ class AzureBlobStorageConfigIn
7
7
  attr_accessor :container
8
8
  attr_accessor :account
9
+ # Access key.
10
+ #
11
+ # Currently a required field, but marked as optional because we may add different authentication in the future.
9
12
  attr_accessor :access_key
10
13
 
11
14
  ALL_FIELD ||= ["container", "account", "access_key"].freeze
@@ -15,13 +18,13 @@ module Svix
15
18
  unless attributes.is_a?(Hash)
16
19
  fail(
17
20
  ArgumentError,
18
- "The input argument (attributes) must be a hash in `Svix::AzureBlobStoragePatchConfig` new method"
21
+ "The input argument (attributes) must be a hash in `Svix::AzureBlobStorageConfigIn` new method"
19
22
  )
20
23
  end
21
24
 
22
25
  attributes.each do |k, v|
23
26
  unless ALL_FIELD.include?(k.to_s)
24
- fail(ArgumentError, "The field #{k} is not part of Svix::AzureBlobStoragePatchConfig")
27
+ fail(ArgumentError, "The field #{k} is not part of Svix::AzureBlobStorageConfigIn")
25
28
  end
26
29
 
27
30
  instance_variable_set("@#{k}", v)
@@ -0,0 +1,52 @@
1
+ # frozen_string_literal: true
2
+ # This file is @generated
3
+ require "json"
4
+
5
+ module Svix
6
+ class AzureBlobStorageConfigOut
7
+ attr_accessor :container
8
+ attr_accessor :account
9
+
10
+ ALL_FIELD ||= ["container", "account"].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::AzureBlobStorageConfigOut` 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::AzureBlobStorageConfigOut")
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["container"] = attributes["container"]
35
+ attrs["account"] = attributes["account"]
36
+ new(attrs)
37
+ end
38
+
39
+ def serialize
40
+ out = Hash.new
41
+ out["container"] = Svix::serialize_primitive(@container) if @container
42
+ out["account"] = Svix::serialize_primitive(@account) if @account
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
@@ -3,7 +3,7 @@
3
3
  require "json"
4
4
 
5
5
  module Svix
6
- class AzureBlobStorageConfig
6
+ class AzureBlobStorageConfigPatch
7
7
  attr_accessor :container
8
8
  attr_accessor :account
9
9
  attr_accessor :access_key
@@ -15,13 +15,13 @@ module Svix
15
15
  unless attributes.is_a?(Hash)
16
16
  fail(
17
17
  ArgumentError,
18
- "The input argument (attributes) must be a hash in `Svix::AzureBlobStorageConfig` new method"
18
+ "The input argument (attributes) must be a hash in `Svix::AzureBlobStorageConfigPatch` new method"
19
19
  )
20
20
  end
21
21
 
22
22
  attributes.each do |k, v|
23
23
  unless ALL_FIELD.include?(k.to_s)
24
- fail(ArgumentError, "The field #{k} is not part of Svix::AzureBlobStorageConfig")
24
+ fail(ArgumentError, "The field #{k} is not part of Svix::AzureBlobStorageConfigPatch")
25
25
  end
26
26
 
27
27
  instance_variable_set("@#{k}", v)
@@ -4,7 +4,7 @@ require "json"
4
4
 
5
5
  module Svix
6
6
  # Configuration for a Google Cloud BigQuery sink.
7
- class BigQueryConfig
7
+ class BigQueryConfigIn
8
8
  attr_accessor :project_id
9
9
  attr_accessor :dataset_id
10
10
  attr_accessor :table_id
@@ -16,12 +16,12 @@ module Svix
16
16
 
17
17
  def initialize(attributes = {})
18
18
  unless attributes.is_a?(Hash)
19
- fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::BigQueryConfig` new method")
19
+ fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::BigQueryConfigIn` new method")
20
20
  end
21
21
 
22
22
  attributes.each do |k, v|
23
23
  unless ALL_FIELD.include?(k.to_s)
24
- fail(ArgumentError, "The field #{k} is not part of Svix::BigQueryConfig")
24
+ fail(ArgumentError, "The field #{k} is not part of Svix::BigQueryConfigIn")
25
25
  end
26
26
 
27
27
  instance_variable_set("@#{k}", v)
@@ -0,0 +1,52 @@
1
+ # frozen_string_literal: true
2
+ # This file is @generated
3
+ require "json"
4
+
5
+ module Svix
6
+ class BigQueryConfigOut
7
+ attr_accessor :project_id
8
+ attr_accessor :dataset_id
9
+ attr_accessor :table_id
10
+
11
+ ALL_FIELD ||= ["project_id", "dataset_id", "table_id"].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::BigQueryConfigOut` 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::BigQueryConfigOut")
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["project_id"] = attributes["projectId"]
33
+ attrs["dataset_id"] = attributes["datasetId"]
34
+ attrs["table_id"] = attributes["tableId"]
35
+ new(attrs)
36
+ end
37
+
38
+ def serialize
39
+ out = Hash.new
40
+ out["projectId"] = Svix::serialize_primitive(@project_id) if @project_id
41
+ out["datasetId"] = Svix::serialize_primitive(@dataset_id) if @dataset_id
42
+ out["tableId"] = Svix::serialize_primitive(@table_id) if @table_id
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
@@ -3,7 +3,7 @@
3
3
  require "json"
4
4
 
5
5
  module Svix
6
- class BigQueryPatchConfig
6
+ class BigQueryConfigPatch
7
7
  attr_accessor :project_id
8
8
  attr_accessor :dataset_id
9
9
  attr_accessor :table_id
@@ -14,12 +14,12 @@ module Svix
14
14
 
15
15
  def initialize(attributes = {})
16
16
  unless attributes.is_a?(Hash)
17
- fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::BigQueryPatchConfig` new method")
17
+ fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::BigQueryConfigPatch` new method")
18
18
  end
19
19
 
20
20
  attributes.each do |k, v|
21
21
  unless ALL_FIELD.include?(k.to_s)
22
- fail(ArgumentError, "The field #{k} is not part of Svix::BigQueryPatchConfig")
22
+ fail(ArgumentError, "The field #{k} is not part of Svix::BigQueryConfigPatch")
23
23
  end
24
24
 
25
25
  instance_variable_set("@#{k}", v)
@@ -3,16 +3,20 @@
3
3
  require "json"
4
4
 
5
5
  module Svix
6
- class ClickhouseConfig
6
+ class ClickhouseConfigIn
7
7
  # The HTTP URL of the ClickHouse server (e.g. `https://my_clickhouse:8443`).
8
8
  attr_accessor :url
9
- # Username to access Clickhouse
9
+ # Username to access Clickhouse.
10
+ #
11
+ # Currently a required field, but marked as optional because we may add different authentication in the future.
10
12
  attr_accessor :username
11
- # Password to access Clickhouse
13
+ # Password to access Clickhouse.
14
+ #
15
+ # Currently a required field, but marked as optional because we may add different authentication in the future.
12
16
  attr_accessor :password
13
- # The Clickhouse database to connect to
17
+ # The Clickhouse database to connect to.
14
18
  attr_accessor :database
15
- # The Clickhouse table to write to
19
+ # The Clickhouse table to write to.
16
20
  attr_accessor :table_name
17
21
 
18
22
  ALL_FIELD ||= ["url", "username", "password", "database", "table_name"].freeze
@@ -20,12 +24,12 @@ module Svix
20
24
 
21
25
  def initialize(attributes = {})
22
26
  unless attributes.is_a?(Hash)
23
- fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::ClickhouseConfig` new method")
27
+ fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::ClickhouseConfigIn` new method")
24
28
  end
25
29
 
26
30
  attributes.each do |k, v|
27
31
  unless ALL_FIELD.include?(k.to_s)
28
- fail(ArgumentError, "The field #{k} is not part of Svix::ClickhouseConfig")
32
+ fail(ArgumentError, "The field #{k} is not part of Svix::ClickhouseConfigIn")
29
33
  end
30
34
 
31
35
  instance_variable_set("@#{k}", v)
@@ -0,0 +1,55 @@
1
+ # frozen_string_literal: true
2
+ # This file is @generated
3
+ require "json"
4
+
5
+ module Svix
6
+ class ClickhouseConfigOut
7
+ attr_accessor :url
8
+ attr_accessor :username
9
+ attr_accessor :database
10
+ attr_accessor :table_name
11
+
12
+ ALL_FIELD ||= ["url", "username", "database", "table_name"].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::ClickhouseConfigOut` 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::ClickhouseConfigOut")
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
+ attrs["username"] = attributes["username"]
35
+ attrs["database"] = attributes["database"]
36
+ attrs["table_name"] = attributes["tableName"]
37
+ new(attrs)
38
+ end
39
+
40
+ def serialize
41
+ out = Hash.new
42
+ out["url"] = Svix::serialize_primitive(@url) if @url
43
+ out["username"] = Svix::serialize_primitive(@username) if @username
44
+ out["database"] = Svix::serialize_primitive(@database) if @database
45
+ out["tableName"] = Svix::serialize_primitive(@table_name) if @table_name
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
@@ -3,7 +3,7 @@
3
3
  require "json"
4
4
 
5
5
  module Svix
6
- class ClickhousePatchConfig
6
+ class ClickhouseConfigPatch
7
7
  attr_accessor :url
8
8
  attr_accessor :username
9
9
  attr_accessor :password
@@ -17,13 +17,13 @@ module Svix
17
17
  unless attributes.is_a?(Hash)
18
18
  fail(
19
19
  ArgumentError,
20
- "The input argument (attributes) must be a hash in `Svix::ClickhousePatchConfig` new method"
20
+ "The input argument (attributes) must be a hash in `Svix::ClickhouseConfigPatch` new method"
21
21
  )
22
22
  end
23
23
 
24
24
  attributes.each do |k, v|
25
25
  unless ALL_FIELD.include?(k.to_s)
26
- fail(ArgumentError, "The field #{k} is not part of Svix::ClickhousePatchConfig")
26
+ fail(ArgumentError, "The field #{k} is not part of Svix::ClickhouseConfigPatch")
27
27
  end
28
28
 
29
29
  instance_variable_set("@#{k}", v)
@@ -55,7 +55,7 @@ module Svix
55
55
  out["throttleRate"] = Svix::serialize_primitive(@throttle_rate) if @__throttle_rate_is_defined
56
56
  out["uid"] = Svix::serialize_primitive(@uid) if @__uid_is_defined
57
57
  out["url"] = Svix::serialize_primitive(@url) if @url
58
- out["disabled"] = Svix::serialize_primitive(@disabled) if @disabled
58
+ out["disabled"] = Svix::serialize_primitive(@disabled) unless @disabled.nil?
59
59
  out["eventTypes"] = Svix::serialize_primitive(@event_types) if @__event_types_is_defined
60
60
  out["channels"] = Svix::serialize_primitive(@channels) if @__channels_is_defined
61
61
  out["metadata"] = Svix::serialize_primitive(@metadata) if @metadata
@@ -41,7 +41,7 @@ module Svix
41
41
  def serialize
42
42
  out = Hash.new
43
43
  out["code"] = Svix::serialize_primitive(@code) if @__code_is_defined
44
- out["enabled"] = Svix::serialize_primitive(@enabled) if @enabled
44
+ out["enabled"] = Svix::serialize_primitive(@enabled) unless @enabled.nil?
45
45
  out["variables"] = Svix::serialize_primitive(@variables) if @__variables_is_defined
46
46
  out
47
47
  end
@@ -3,13 +3,22 @@
3
3
  require "json"
4
4
 
5
5
  module Svix
6
- class EventBridgeConfig
6
+ class EventBridgeConfigIn
7
7
  # The name or ARN of the event bus to receive the event
8
8
  attr_accessor :event_bus_name
9
9
  # Free-form string, with a maximum of 128 characters
10
10
  attr_accessor :detail_type
11
+ # Access key ID.
12
+ #
13
+ # Currently a required field, but marked as optional because we may add different authentication in the future.
11
14
  attr_accessor :access_key_id
15
+ # Secret access key.
16
+ #
17
+ # Currently a required field, but marked as optional because we may add different authentication in the future.
12
18
  attr_accessor :secret_access_key
19
+ # The region of the EventBridge bus.
20
+ #
21
+ # Currently a required field, but marked as optional because we may infer it from other fields in the future.
13
22
  attr_accessor :region
14
23
 
15
24
  ALL_FIELD ||= ["event_bus_name", "detail_type", "access_key_id", "secret_access_key", "region"].freeze
@@ -17,12 +26,12 @@ module Svix
17
26
 
18
27
  def initialize(attributes = {})
19
28
  unless attributes.is_a?(Hash)
20
- fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::EventBridgeConfig` new method")
29
+ fail(ArgumentError, "The input argument (attributes) must be a hash in `Svix::EventBridgeConfigIn` new method")
21
30
  end
22
31
 
23
32
  attributes.each do |k, v|
24
33
  unless ALL_FIELD.include?(k.to_s)
25
- fail(ArgumentError, "The field #{k} is not part of Svix::EventBridgeConfig")
34
+ fail(ArgumentError, "The field #{k} is not part of Svix::EventBridgeConfigIn")
26
35
  end
27
36
 
28
37
  instance_variable_set("@#{k}", v)
@@ -0,0 +1,55 @@
1
+ # frozen_string_literal: true
2
+ # This file is @generated
3
+ require "json"
4
+
5
+ module Svix
6
+ class EventBridgeConfigOut
7
+ attr_accessor :event_bus_name
8
+ attr_accessor :detail_type
9
+ attr_accessor :access_key_id
10
+ attr_accessor :region
11
+
12
+ ALL_FIELD ||= ["event_bus_name", "detail_type", "access_key_id", "region"].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::EventBridgeConfigOut` 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::EventBridgeConfigOut")
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_bus_name"] = attributes["eventBusName"]
34
+ attrs["detail_type"] = attributes["detailType"]
35
+ attrs["access_key_id"] = attributes["accessKeyId"]
36
+ attrs["region"] = attributes["region"]
37
+ new(attrs)
38
+ end
39
+
40
+ def serialize
41
+ out = Hash.new
42
+ out["eventBusName"] = Svix::serialize_primitive(@event_bus_name) if @event_bus_name
43
+ out["detailType"] = Svix::serialize_primitive(@detail_type) if @detail_type
44
+ out["accessKeyId"] = Svix::serialize_primitive(@access_key_id) if @access_key_id
45
+ out["region"] = Svix::serialize_primitive(@region) if @region
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
@@ -3,7 +3,7 @@
3
3
  require "json"
4
4
 
5
5
  module Svix
6
- class EventBridgePatchConfig
6
+ class EventBridgeConfigPatch
7
7
  attr_accessor :event_bus_name
8
8
  attr_accessor :detail_type
9
9
  attr_accessor :access_key_id
@@ -17,13 +17,13 @@ module Svix
17
17
  unless attributes.is_a?(Hash)
18
18
  fail(
19
19
  ArgumentError,
20
- "The input argument (attributes) must be a hash in `Svix::EventBridgePatchConfig` new method"
20
+ "The input argument (attributes) must be a hash in `Svix::EventBridgeConfigPatch` new method"
21
21
  )
22
22
  end
23
23
 
24
24
  attributes.each do |k, v|
25
25
  unless ALL_FIELD.include?(k.to_s)
26
- fail(ArgumentError, "The field #{k} is not part of Svix::EventBridgePatchConfig")
26
+ fail(ArgumentError, "The field #{k} is not part of Svix::EventBridgeConfigPatch")
27
27
  end
28
28
 
29
29
  instance_variable_set("@#{k}", v)
@@ -45,8 +45,8 @@ module Svix
45
45
  def serialize
46
46
  out = Hash.new
47
47
  out["description"] = Svix::serialize_primitive(@description) if @description
48
- out["archived"] = Svix::serialize_primitive(@archived) if @archived
49
- out["deprecated"] = Svix::serialize_primitive(@deprecated) if @deprecated
48
+ out["archived"] = Svix::serialize_primitive(@archived) unless @archived.nil?
49
+ out["deprecated"] = Svix::serialize_primitive(@deprecated) unless @deprecated.nil?
50
50
  out["schemas"] = Svix::serialize_primitive(@schemas) if @__schemas_is_defined
51
51
  out["featureFlags"] = Svix::serialize_primitive(@feature_flags) if @__feature_flags_is_defined
52
52
  out["groupName"] = Svix::serialize_primitive(@group_name) if @__group_name_is_defined
@@ -3,7 +3,7 @@
3
3
  require "json"
4
4
 
5
5
  module Svix
6
- class GoogleCloudPubSubConfig
6
+ class GoogleCloudPubSubConfigIn
7
7
  attr_accessor :project_id
8
8
  attr_accessor :topic_id
9
9
  # Google Cloud Credentials JSON Object as a string.
@@ -16,13 +16,13 @@ module Svix
16
16
  unless attributes.is_a?(Hash)
17
17
  fail(
18
18
  ArgumentError,
19
- "The input argument (attributes) must be a hash in `Svix::GoogleCloudPubSubConfig` new method"
19
+ "The input argument (attributes) must be a hash in `Svix::GoogleCloudPubSubConfigIn` new method"
20
20
  )
21
21
  end
22
22
 
23
23
  attributes.each do |k, v|
24
24
  unless ALL_FIELD.include?(k.to_s)
25
- fail(ArgumentError, "The field #{k} is not part of Svix::GoogleCloudPubSubConfig")
25
+ fail(ArgumentError, "The field #{k} is not part of Svix::GoogleCloudPubSubConfigIn")
26
26
  end
27
27
 
28
28
  instance_variable_set("@#{k}", v)
@@ -0,0 +1,52 @@
1
+ # frozen_string_literal: true
2
+ # This file is @generated
3
+ require "json"
4
+
5
+ module Svix
6
+ class GoogleCloudPubSubConfigOut
7
+ attr_accessor :project_id
8
+ attr_accessor :topic_id
9
+
10
+ ALL_FIELD ||= ["project_id", "topic_id"].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::GoogleCloudPubSubConfigOut` 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::GoogleCloudPubSubConfigOut")
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["project_id"] = attributes["projectId"]
35
+ attrs["topic_id"] = attributes["topicId"]
36
+ new(attrs)
37
+ end
38
+
39
+ def serialize
40
+ out = Hash.new
41
+ out["projectId"] = Svix::serialize_primitive(@project_id) if @project_id
42
+ out["topicId"] = Svix::serialize_primitive(@topic_id) if @topic_id
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