svix 1.35.0 → 1.37.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/svix/models/azure_blob_storage_config.rb +251 -0
- data/lib/svix/models/custom_strings_override.rb +11 -1
- data/lib/svix/models/environment_in.rb +13 -1
- data/lib/svix/models/environment_out.rb +17 -1
- data/lib/svix/models/google_cloud_storage_config.rb +239 -0
- data/lib/svix/models/message_attempt_endpoint_out.rb +1 -0
- data/lib/svix/models/message_attempt_out.rb +1 -0
- data/lib/svix/models/redshift_config.rb +311 -0
- data/lib/svix/models/s3_config.rb +10 -10
- data/lib/svix/models/sink_http_config.rb +12 -1
- data/lib/svix/models/sink_in.rb +1 -2
- data/lib/svix/models/sink_in_one_of3.rb +2 -2
- data/lib/svix/models/sink_out.rb +1 -2
- data/lib/svix/models/snowflake_config.rb +285 -0
- data/lib/svix/models/stream_in.rb +35 -2
- data/lib/svix/models/stream_out.rb +35 -1
- data/lib/svix/models/stream_patch.rb +35 -2
- data/lib/svix/models/stream_sink_in.rb +5 -1
- data/lib/svix/models/stream_sink_in_one_of.rb +3 -3
- data/lib/svix/models/stream_sink_in_one_of1.rb +3 -3
- data/lib/svix/models/stream_sink_in_one_of2.rb +3 -3
- data/lib/svix/models/{sink_in_one_of4.rb → stream_sink_in_one_of3.rb} +23 -23
- data/lib/svix/models/stream_sink_in_one_of4.rb +271 -0
- data/lib/svix/models/stream_sink_in_one_of5.rb +271 -0
- data/lib/svix/models/stream_sink_in_one_of6.rb +271 -0
- data/lib/svix/models/stream_sink_out.rb +5 -1
- data/lib/svix/models/stream_sink_patch.rb +5 -1
- data/lib/svix/version.rb +1 -1
- metadata +10 -3
@@ -0,0 +1,271 @@
|
|
1
|
+
=begin
|
2
|
+
#Svix API
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.1.1
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 5.2.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module Svix
|
17
|
+
class StreamSinkInOneOf6
|
18
|
+
attr_accessor :config
|
19
|
+
|
20
|
+
attr_accessor :type
|
21
|
+
|
22
|
+
class EnumAttributeValidator
|
23
|
+
attr_reader :datatype
|
24
|
+
attr_reader :allowable_values
|
25
|
+
|
26
|
+
def initialize(datatype, allowable_values)
|
27
|
+
@allowable_values = allowable_values.map do |value|
|
28
|
+
case datatype.to_s
|
29
|
+
when /Integer/i
|
30
|
+
value.to_i
|
31
|
+
when /Float/i
|
32
|
+
value.to_f
|
33
|
+
else
|
34
|
+
value
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
def valid?(value)
|
40
|
+
!value || allowable_values.include?(value)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
45
|
+
def self.attribute_map
|
46
|
+
{
|
47
|
+
:'config' => :'config',
|
48
|
+
:'type' => :'type'
|
49
|
+
}
|
50
|
+
end
|
51
|
+
|
52
|
+
# Returns all the JSON keys this model knows about
|
53
|
+
def self.acceptable_attributes
|
54
|
+
attribute_map.values
|
55
|
+
end
|
56
|
+
|
57
|
+
# Attribute type mapping.
|
58
|
+
def self.openapi_types
|
59
|
+
{
|
60
|
+
:'config' => :'RedshiftConfig',
|
61
|
+
:'type' => :'String'
|
62
|
+
}
|
63
|
+
end
|
64
|
+
|
65
|
+
# List of attributes with nullable: true
|
66
|
+
def self.openapi_nullable
|
67
|
+
Set.new([
|
68
|
+
])
|
69
|
+
end
|
70
|
+
|
71
|
+
# Initializes the object
|
72
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
73
|
+
def initialize(attributes = {})
|
74
|
+
if (!attributes.is_a?(Hash))
|
75
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Svix::StreamSinkInOneOf6` initialize method"
|
76
|
+
end
|
77
|
+
|
78
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
79
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
80
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
81
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Svix::StreamSinkInOneOf6`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
82
|
+
end
|
83
|
+
h[k.to_sym] = v
|
84
|
+
}
|
85
|
+
|
86
|
+
if attributes.key?(:'config')
|
87
|
+
self.config = attributes[:'config']
|
88
|
+
end
|
89
|
+
|
90
|
+
if attributes.key?(:'type')
|
91
|
+
self.type = attributes[:'type']
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
96
|
+
# @return Array for valid properties with the reasons
|
97
|
+
def list_invalid_properties
|
98
|
+
invalid_properties = Array.new
|
99
|
+
if @config.nil?
|
100
|
+
invalid_properties.push('invalid value for "config", config cannot be nil.')
|
101
|
+
end
|
102
|
+
|
103
|
+
if @type.nil?
|
104
|
+
invalid_properties.push('invalid value for "type", type cannot be nil.')
|
105
|
+
end
|
106
|
+
|
107
|
+
invalid_properties
|
108
|
+
end
|
109
|
+
|
110
|
+
# Check to see if the all the properties in the model are valid
|
111
|
+
# @return true if the model is valid
|
112
|
+
def valid?
|
113
|
+
return false if @config.nil?
|
114
|
+
return false if @type.nil?
|
115
|
+
type_validator = EnumAttributeValidator.new('String', ["redshift"])
|
116
|
+
return false unless type_validator.valid?(@type)
|
117
|
+
true
|
118
|
+
end
|
119
|
+
|
120
|
+
# Custom attribute writer method checking allowed values (enum).
|
121
|
+
# @param [Object] type Object to be assigned
|
122
|
+
def type=(type)
|
123
|
+
validator = EnumAttributeValidator.new('String', ["redshift"])
|
124
|
+
unless validator.valid?(type)
|
125
|
+
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
126
|
+
end
|
127
|
+
@type = type
|
128
|
+
end
|
129
|
+
|
130
|
+
# Checks equality by comparing each attribute.
|
131
|
+
# @param [Object] Object to be compared
|
132
|
+
def ==(o)
|
133
|
+
return true if self.equal?(o)
|
134
|
+
self.class == o.class &&
|
135
|
+
config == o.config &&
|
136
|
+
type == o.type
|
137
|
+
end
|
138
|
+
|
139
|
+
# @see the `==` method
|
140
|
+
# @param [Object] Object to be compared
|
141
|
+
def eql?(o)
|
142
|
+
self == o
|
143
|
+
end
|
144
|
+
|
145
|
+
# Calculates hash code according to all attributes.
|
146
|
+
# @return [Integer] Hash code
|
147
|
+
def hash
|
148
|
+
[config, type].hash
|
149
|
+
end
|
150
|
+
|
151
|
+
# Builds the object from hash
|
152
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
153
|
+
# @return [Object] Returns the model itself
|
154
|
+
def self.build_from_hash(attributes)
|
155
|
+
new.build_from_hash(attributes)
|
156
|
+
end
|
157
|
+
|
158
|
+
# Builds the object from hash
|
159
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
160
|
+
# @return [Object] Returns the model itself
|
161
|
+
def build_from_hash(attributes)
|
162
|
+
return nil unless attributes.is_a?(Hash)
|
163
|
+
self.class.openapi_types.each_pair do |key, type|
|
164
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
165
|
+
self.send("#{key}=", nil)
|
166
|
+
elsif type =~ /\AArray<(.*)>/i
|
167
|
+
# check to ensure the input is an array given that the attribute
|
168
|
+
# is documented as an array but the input is not
|
169
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
170
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
171
|
+
end
|
172
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
173
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
174
|
+
end
|
175
|
+
end
|
176
|
+
|
177
|
+
self
|
178
|
+
end
|
179
|
+
|
180
|
+
# Deserializes the data based on type
|
181
|
+
# @param string type Data type
|
182
|
+
# @param string value Value to be deserialized
|
183
|
+
# @return [Object] Deserialized data
|
184
|
+
def _deserialize(type, value)
|
185
|
+
case type.to_sym
|
186
|
+
when :Time
|
187
|
+
Time.parse(value)
|
188
|
+
when :Date
|
189
|
+
Date.parse(value)
|
190
|
+
when :String
|
191
|
+
value.to_s
|
192
|
+
when :Integer
|
193
|
+
value.to_i
|
194
|
+
when :Float
|
195
|
+
value.to_f
|
196
|
+
when :Boolean
|
197
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
198
|
+
true
|
199
|
+
else
|
200
|
+
false
|
201
|
+
end
|
202
|
+
when :Object
|
203
|
+
# generic object (usually a Hash), return directly
|
204
|
+
value
|
205
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
206
|
+
inner_type = Regexp.last_match[:inner_type]
|
207
|
+
value.map { |v| _deserialize(inner_type, v) }
|
208
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
209
|
+
k_type = Regexp.last_match[:k_type]
|
210
|
+
v_type = Regexp.last_match[:v_type]
|
211
|
+
{}.tap do |hash|
|
212
|
+
value.each do |k, v|
|
213
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
214
|
+
end
|
215
|
+
end
|
216
|
+
else # model
|
217
|
+
# models (e.g. Pet) or oneOf
|
218
|
+
klass = Svix.const_get(type)
|
219
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
220
|
+
end
|
221
|
+
end
|
222
|
+
|
223
|
+
# Returns the string representation of the object
|
224
|
+
# @return [String] String presentation of the object
|
225
|
+
def to_s
|
226
|
+
to_hash.to_s
|
227
|
+
end
|
228
|
+
|
229
|
+
# to_body is an alias to to_hash (backward compatibility)
|
230
|
+
# @return [Hash] Returns the object in the form of hash
|
231
|
+
def to_body
|
232
|
+
to_hash
|
233
|
+
end
|
234
|
+
|
235
|
+
# Returns the object in the form of hash
|
236
|
+
# @return [Hash] Returns the object in the form of hash
|
237
|
+
def to_hash
|
238
|
+
hash = {}
|
239
|
+
self.class.attribute_map.each_pair do |attr, param|
|
240
|
+
value = self.send(attr)
|
241
|
+
if value.nil?
|
242
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
243
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
244
|
+
end
|
245
|
+
|
246
|
+
hash[param] = _to_hash(value)
|
247
|
+
end
|
248
|
+
hash
|
249
|
+
end
|
250
|
+
|
251
|
+
# Outputs non-array value in the form of hash
|
252
|
+
# For object, use to_hash. Otherwise, just return the value
|
253
|
+
# @param [Object] value Any valid value
|
254
|
+
# @return [Hash] Returns the value in the form of hash
|
255
|
+
def _to_hash(value)
|
256
|
+
if value.is_a?(Array)
|
257
|
+
value.compact.map { |v| _to_hash(v) }
|
258
|
+
elsif value.is_a?(Hash)
|
259
|
+
{}.tap do |hash|
|
260
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
261
|
+
end
|
262
|
+
elsif value.respond_to? :to_hash
|
263
|
+
value.to_hash
|
264
|
+
else
|
265
|
+
value
|
266
|
+
end
|
267
|
+
end
|
268
|
+
|
269
|
+
end
|
270
|
+
|
271
|
+
end
|
data/lib/svix/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: svix
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.37.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Svix
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-10-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -114,6 +114,7 @@ files:
|
|
114
114
|
- lib/svix/models/attempt_statistics_data.rb
|
115
115
|
- lib/svix/models/attempt_statistics_response.rb
|
116
116
|
- lib/svix/models/auth_token_out.rb
|
117
|
+
- lib/svix/models/azure_blob_storage_config.rb
|
117
118
|
- lib/svix/models/background_task_out.rb
|
118
119
|
- lib/svix/models/background_task_status.rb
|
119
120
|
- lib/svix/models/background_task_type.rb
|
@@ -175,6 +176,7 @@ files:
|
|
175
176
|
- lib/svix/models/font_size_config.rb
|
176
177
|
- lib/svix/models/generate_in.rb
|
177
178
|
- lib/svix/models/generate_out.rb
|
179
|
+
- lib/svix/models/google_cloud_storage_config.rb
|
178
180
|
- lib/svix/models/http_error_out.rb
|
179
181
|
- lib/svix/models/http_validation_error.rb
|
180
182
|
- lib/svix/models/hubspot_oauth_config_in.rb
|
@@ -230,6 +232,7 @@ files:
|
|
230
232
|
- lib/svix/models/ordering.rb
|
231
233
|
- lib/svix/models/recover_in.rb
|
232
234
|
- lib/svix/models/recover_out.rb
|
235
|
+
- lib/svix/models/redshift_config.rb
|
233
236
|
- lib/svix/models/replay_in.rb
|
234
237
|
- lib/svix/models/replay_out.rb
|
235
238
|
- lib/svix/models/retry_schedule_in_out.rb
|
@@ -243,7 +246,6 @@ files:
|
|
243
246
|
- lib/svix/models/sink_in_one_of1.rb
|
244
247
|
- lib/svix/models/sink_in_one_of2.rb
|
245
248
|
- lib/svix/models/sink_in_one_of3.rb
|
246
|
-
- lib/svix/models/sink_in_one_of4.rb
|
247
249
|
- lib/svix/models/sink_otel_v1_config.rb
|
248
250
|
- lib/svix/models/sink_out.rb
|
249
251
|
- lib/svix/models/sink_payload_format.rb
|
@@ -251,6 +253,7 @@ files:
|
|
251
253
|
- lib/svix/models/sink_status_in.rb
|
252
254
|
- lib/svix/models/sink_transform_in.rb
|
253
255
|
- lib/svix/models/sink_transformation_out.rb
|
256
|
+
- lib/svix/models/snowflake_config.rb
|
254
257
|
- lib/svix/models/statistics_period.rb
|
255
258
|
- lib/svix/models/status_code_class.rb
|
256
259
|
- lib/svix/models/stream_in.rb
|
@@ -260,6 +263,10 @@ files:
|
|
260
263
|
- lib/svix/models/stream_sink_in_one_of.rb
|
261
264
|
- lib/svix/models/stream_sink_in_one_of1.rb
|
262
265
|
- lib/svix/models/stream_sink_in_one_of2.rb
|
266
|
+
- lib/svix/models/stream_sink_in_one_of3.rb
|
267
|
+
- lib/svix/models/stream_sink_in_one_of4.rb
|
268
|
+
- lib/svix/models/stream_sink_in_one_of5.rb
|
269
|
+
- lib/svix/models/stream_sink_in_one_of6.rb
|
263
270
|
- lib/svix/models/stream_sink_out.rb
|
264
271
|
- lib/svix/models/stream_sink_patch.rb
|
265
272
|
- lib/svix/models/template_in.rb
|