svix 1.56.0 → 1.57.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/application_api.rb +115 -10
- data/lib/svix/api/authentication_api.rb +101 -16
- data/lib/svix/api/background_tasks_api.rb +43 -17
- data/lib/svix/api/endpoint_api.rb +312 -96
- data/lib/svix/api/inbound_api.rb +4 -4
- data/lib/svix/api/integration_api.rb +102 -24
- data/lib/svix/api/message_api.rb +142 -39
- data/lib/svix/api/message_attempt_api.rb +135 -372
- data/lib/svix/api/statistics_api.rb +6 -6
- data/lib/svix/api/stream_api.rb +203 -142
- data/lib/svix/api/transformation_template_api.rb +88 -23
- data/lib/svix/api/webhook_endpoint_api.rb +253 -77
- data/lib/svix/background_tasks_api.rb +2 -2
- data/lib/svix/message_attempt_api.rb +7 -3
- data/lib/svix/models/active_application_out.rb +373 -0
- data/lib/svix/models/active_endpoint_out.rb +355 -0
- data/lib/svix/models/aggregate_event_types_out.rb +40 -0
- data/lib/svix/models/aggregated_event_types.rb +305 -0
- data/lib/svix/models/app_portal_access_in.rb +18 -0
- data/lib/svix/models/app_usage_stats_out.rb +40 -0
- data/lib/svix/models/application_message_failure.rb +277 -0
- data/lib/svix/models/application_message_id_pair.rb +317 -0
- data/lib/svix/models/application_out.rb +41 -2
- data/lib/svix/models/application_patch.rb +1 -1
- data/lib/svix/models/application_stats.rb +41 -2
- data/lib/svix/models/application_stats_out.rb +324 -0
- data/lib/svix/models/auth_token_out.rb +40 -1
- data/lib/svix/models/background_task_finished_event.rb +272 -0
- data/lib/svix/models/background_task_finished_event2.rb +331 -0
- data/lib/svix/models/background_task_out.rb +40 -0
- data/lib/svix/models/background_task_type.rb +2 -1
- data/lib/svix/models/{template_in.rb → connector_in.rb} +4 -4
- data/lib/svix/models/{transformation_template_kind.rb → connector_kind.rb} +3 -3
- data/lib/svix/models/create_stream_in.rb +12 -12
- data/lib/svix/models/data.rb +108 -0
- data/lib/svix/models/data_any_of.rb +240 -0
- data/lib/svix/models/data_any_of1.rb +223 -0
- data/lib/svix/models/data_any_of2.rb +241 -0
- data/lib/svix/models/data_any_of3.rb +223 -0
- data/lib/svix/models/data_any_of4.rb +240 -0
- data/lib/svix/models/endpoint_created_event_data.rb +82 -4
- data/lib/svix/models/endpoint_deleted_event_data.rb +82 -4
- data/lib/svix/models/endpoint_disabled_event.rb +1 -1
- data/lib/svix/models/endpoint_disabled_event_data.rb +119 -16
- data/lib/svix/models/endpoint_disabled_trigger.rb +40 -0
- data/lib/svix/models/endpoint_enabled_event.rb +272 -0
- data/lib/svix/models/endpoint_enabled_event_data.rb +410 -0
- data/lib/svix/models/endpoint_message_out.rb +40 -1
- data/lib/svix/models/endpoint_mtls_config_out.rb +215 -0
- data/lib/svix/models/endpoint_oauth_config_in.rb +2 -2
- data/lib/svix/models/endpoint_oauth_config_out.rb +315 -0
- data/lib/svix/models/endpoint_out.rb +40 -1
- data/lib/svix/models/endpoint_patch.rb +1 -1
- data/lib/svix/models/endpoint_updated_event_data.rb +82 -4
- data/lib/svix/models/environment_in.rb +17 -19
- data/lib/svix/models/environment_settings_out.rb +23 -1
- data/lib/svix/models/event_type_import_open_api_in.rb +14 -2
- data/lib/svix/models/export_event_type_out.rb +40 -0
- data/lib/svix/models/expung_all_contents_out.rb +315 -0
- data/lib/svix/models/inbound_path_params.rb +1 -1
- data/lib/svix/models/integration_in.rb +41 -1
- data/lib/svix/models/integration_out.rb +81 -2
- data/lib/svix/models/integration_update.rb +41 -1
- data/lib/svix/models/list_response_active_application_out.rb +261 -0
- data/lib/svix/models/message_attempt_endpoint_out.rb +120 -3
- data/lib/svix/models/message_attempt_exhausted_event_data.rb +122 -5
- data/lib/svix/models/message_attempt_failed_data.rb +40 -1
- data/lib/svix/models/message_attempt_failing_event_data.rb +122 -5
- data/lib/svix/models/message_attempt_out.rb +120 -3
- data/lib/svix/models/message_attempt_recovered_event_data.rb +122 -5
- data/lib/svix/models/message_broadcast_out.rb +40 -0
- data/lib/svix/models/message_endpoint_out.rb +40 -1
- data/lib/svix/models/message_out.rb +40 -1
- data/lib/svix/models/message_precheck_in.rb +288 -0
- data/lib/svix/models/message_precheck_out.rb +221 -0
- data/lib/svix/models/{oauth2_auth_method_in.rb → oauth2_auth_method_in_out.rb} +3 -3
- data/lib/svix/models/{oauth2_grant_type_in.rb → oauth2_grant_type_in_out.rb} +3 -3
- data/lib/svix/models/operational_webhook_endpoint_headers_in.rb +223 -0
- data/lib/svix/models/operational_webhook_endpoint_headers_out.rb +251 -0
- data/lib/svix/models/operational_webhook_endpoint_out.rb +40 -1
- data/lib/svix/models/polling_endpoint_message_out.rb +454 -0
- data/lib/svix/models/polling_endpoint_out.rb +255 -0
- data/lib/svix/models/recover_out.rb +40 -0
- data/lib/svix/models/replay_out.rb +40 -0
- data/lib/svix/models/rotate_poller_token_in.rb +1 -1
- data/lib/svix/models/sink_secret_out.rb +233 -0
- data/lib/svix/models/stream_in.rb +6 -7
- data/lib/svix/models/stream_out.rb +46 -7
- data/lib/svix/models/stream_patch.rb +6 -7
- data/lib/svix/models/stream_portal_access_in.rb +293 -0
- data/lib/svix/models/template_out.rb +81 -1
- data/lib/svix/models/template_patch.rb +1 -1
- data/lib/svix/models/template_update.rb +1 -1
- data/lib/svix/version.rb +1 -1
- metadata +35 -7
- data/lib/svix/operational_webhook_endpoint_api.rb +0 -37
@@ -15,11 +15,15 @@ require 'time'
|
|
15
15
|
|
16
16
|
module Svix
|
17
17
|
class IntegrationUpdate
|
18
|
+
# The set of feature flags the integration will have access to.
|
19
|
+
attr_accessor :feature_flags
|
20
|
+
|
18
21
|
attr_accessor :name
|
19
22
|
|
20
23
|
# Attribute mapping from ruby-style variable name to JSON key.
|
21
24
|
def self.attribute_map
|
22
25
|
{
|
26
|
+
:'feature_flags' => :'featureFlags',
|
23
27
|
:'name' => :'name'
|
24
28
|
}
|
25
29
|
end
|
@@ -32,6 +36,7 @@ module Svix
|
|
32
36
|
# Attribute type mapping.
|
33
37
|
def self.openapi_types
|
34
38
|
{
|
39
|
+
:'feature_flags' => :'Array<String>',
|
35
40
|
:'name' => :'String'
|
36
41
|
}
|
37
42
|
end
|
@@ -57,6 +62,12 @@ module Svix
|
|
57
62
|
h[k.to_sym] = v
|
58
63
|
}
|
59
64
|
|
65
|
+
if attributes.key?(:'feature_flags')
|
66
|
+
if (value = attributes[:'feature_flags']).is_a?(Array)
|
67
|
+
self.feature_flags = value
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
60
71
|
if attributes.key?(:'name')
|
61
72
|
self.name = attributes[:'name']
|
62
73
|
else
|
@@ -69,6 +80,14 @@ module Svix
|
|
69
80
|
def list_invalid_properties
|
70
81
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
71
82
|
invalid_properties = Array.new
|
83
|
+
if !@feature_flags.nil? && @feature_flags.length > 25
|
84
|
+
invalid_properties.push('invalid value for "feature_flags", number of items must be less than or equal to 25.')
|
85
|
+
end
|
86
|
+
|
87
|
+
if !@feature_flags.nil? && @feature_flags.length < 1
|
88
|
+
invalid_properties.push('invalid value for "feature_flags", number of items must be greater than or equal to 1.')
|
89
|
+
end
|
90
|
+
|
72
91
|
if @name.nil?
|
73
92
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
74
93
|
end
|
@@ -80,15 +99,36 @@ module Svix
|
|
80
99
|
# @return true if the model is valid
|
81
100
|
def valid?
|
82
101
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
102
|
+
return false if !@feature_flags.nil? && @feature_flags.length > 25
|
103
|
+
return false if !@feature_flags.nil? && @feature_flags.length < 1
|
83
104
|
return false if @name.nil?
|
84
105
|
true
|
85
106
|
end
|
86
107
|
|
108
|
+
# Custom attribute writer method with validation
|
109
|
+
# @param [Object] feature_flags Value to be assigned
|
110
|
+
def feature_flags=(feature_flags)
|
111
|
+
if feature_flags.nil?
|
112
|
+
fail ArgumentError, 'feature_flags cannot be nil'
|
113
|
+
end
|
114
|
+
|
115
|
+
if feature_flags.length > 25
|
116
|
+
fail ArgumentError, 'invalid value for "feature_flags", number of items must be less than or equal to 25.'
|
117
|
+
end
|
118
|
+
|
119
|
+
if feature_flags.length < 1
|
120
|
+
fail ArgumentError, 'invalid value for "feature_flags", number of items must be greater than or equal to 1.'
|
121
|
+
end
|
122
|
+
|
123
|
+
@feature_flags = feature_flags
|
124
|
+
end
|
125
|
+
|
87
126
|
# Checks equality by comparing each attribute.
|
88
127
|
# @param [Object] Object to be compared
|
89
128
|
def ==(o)
|
90
129
|
return true if self.equal?(o)
|
91
130
|
self.class == o.class &&
|
131
|
+
feature_flags == o.feature_flags &&
|
92
132
|
name == o.name
|
93
133
|
end
|
94
134
|
|
@@ -101,7 +141,7 @@ module Svix
|
|
101
141
|
# Calculates hash code according to all attributes.
|
102
142
|
# @return [Integer] Hash code
|
103
143
|
def hash
|
104
|
-
[name].hash
|
144
|
+
[feature_flags, name].hash
|
105
145
|
end
|
106
146
|
|
107
147
|
# Builds the object from hash
|
@@ -0,0 +1,261 @@
|
|
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
|
+
Generator version: 7.9.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module Svix
|
17
|
+
class ListResponseActiveApplicationOut
|
18
|
+
attr_accessor :data
|
19
|
+
|
20
|
+
attr_accessor :done
|
21
|
+
|
22
|
+
attr_accessor :iterator
|
23
|
+
|
24
|
+
attr_accessor :prev_iterator
|
25
|
+
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
27
|
+
def self.attribute_map
|
28
|
+
{
|
29
|
+
:'data' => :'data',
|
30
|
+
:'done' => :'done',
|
31
|
+
:'iterator' => :'iterator',
|
32
|
+
:'prev_iterator' => :'prevIterator'
|
33
|
+
}
|
34
|
+
end
|
35
|
+
|
36
|
+
# Returns all the JSON keys this model knows about
|
37
|
+
def self.acceptable_attributes
|
38
|
+
attribute_map.values
|
39
|
+
end
|
40
|
+
|
41
|
+
# Attribute type mapping.
|
42
|
+
def self.openapi_types
|
43
|
+
{
|
44
|
+
:'data' => :'Array<ActiveApplicationOut>',
|
45
|
+
:'done' => :'Boolean',
|
46
|
+
:'iterator' => :'String',
|
47
|
+
:'prev_iterator' => :'String'
|
48
|
+
}
|
49
|
+
end
|
50
|
+
|
51
|
+
# List of attributes with nullable: true
|
52
|
+
def self.openapi_nullable
|
53
|
+
Set.new([
|
54
|
+
:'iterator',
|
55
|
+
:'prev_iterator'
|
56
|
+
])
|
57
|
+
end
|
58
|
+
|
59
|
+
# Initializes the object
|
60
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
61
|
+
def initialize(attributes = {})
|
62
|
+
if (!attributes.is_a?(Hash))
|
63
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Svix::ListResponseActiveApplicationOut` initialize method"
|
64
|
+
end
|
65
|
+
|
66
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
67
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
68
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
69
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Svix::ListResponseActiveApplicationOut`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
70
|
+
end
|
71
|
+
h[k.to_sym] = v
|
72
|
+
}
|
73
|
+
|
74
|
+
if attributes.key?(:'data')
|
75
|
+
if (value = attributes[:'data']).is_a?(Array)
|
76
|
+
self.data = value
|
77
|
+
end
|
78
|
+
else
|
79
|
+
self.data = nil
|
80
|
+
end
|
81
|
+
|
82
|
+
if attributes.key?(:'done')
|
83
|
+
self.done = attributes[:'done']
|
84
|
+
else
|
85
|
+
self.done = nil
|
86
|
+
end
|
87
|
+
|
88
|
+
if attributes.key?(:'iterator')
|
89
|
+
self.iterator = attributes[:'iterator']
|
90
|
+
else
|
91
|
+
self.iterator = nil
|
92
|
+
end
|
93
|
+
|
94
|
+
if attributes.key?(:'prev_iterator')
|
95
|
+
self.prev_iterator = attributes[:'prev_iterator']
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
100
|
+
# @return Array for valid properties with the reasons
|
101
|
+
def list_invalid_properties
|
102
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
103
|
+
invalid_properties = Array.new
|
104
|
+
if @data.nil?
|
105
|
+
invalid_properties.push('invalid value for "data", data cannot be nil.')
|
106
|
+
end
|
107
|
+
|
108
|
+
if @done.nil?
|
109
|
+
invalid_properties.push('invalid value for "done", done cannot be nil.')
|
110
|
+
end
|
111
|
+
|
112
|
+
invalid_properties
|
113
|
+
end
|
114
|
+
|
115
|
+
# Check to see if the all the properties in the model are valid
|
116
|
+
# @return true if the model is valid
|
117
|
+
def valid?
|
118
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
119
|
+
return false if @data.nil?
|
120
|
+
return false if @done.nil?
|
121
|
+
true
|
122
|
+
end
|
123
|
+
|
124
|
+
# Checks equality by comparing each attribute.
|
125
|
+
# @param [Object] Object to be compared
|
126
|
+
def ==(o)
|
127
|
+
return true if self.equal?(o)
|
128
|
+
self.class == o.class &&
|
129
|
+
data == o.data &&
|
130
|
+
done == o.done &&
|
131
|
+
iterator == o.iterator &&
|
132
|
+
prev_iterator == o.prev_iterator
|
133
|
+
end
|
134
|
+
|
135
|
+
# @see the `==` method
|
136
|
+
# @param [Object] Object to be compared
|
137
|
+
def eql?(o)
|
138
|
+
self == o
|
139
|
+
end
|
140
|
+
|
141
|
+
# Calculates hash code according to all attributes.
|
142
|
+
# @return [Integer] Hash code
|
143
|
+
def hash
|
144
|
+
[data, done, iterator, prev_iterator].hash
|
145
|
+
end
|
146
|
+
|
147
|
+
# Builds the object from hash
|
148
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
149
|
+
# @return [Object] Returns the model itself
|
150
|
+
def self.build_from_hash(attributes)
|
151
|
+
return nil unless attributes.is_a?(Hash)
|
152
|
+
attributes = attributes.transform_keys(&:to_sym)
|
153
|
+
transformed_hash = {}
|
154
|
+
openapi_types.each_pair do |key, type|
|
155
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
156
|
+
transformed_hash["#{key}"] = nil
|
157
|
+
elsif type =~ /\AArray<(.*)>/i
|
158
|
+
# check to ensure the input is an array given that the attribute
|
159
|
+
# is documented as an array but the input is not
|
160
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
161
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
162
|
+
end
|
163
|
+
elsif !attributes[attribute_map[key]].nil?
|
164
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
165
|
+
end
|
166
|
+
end
|
167
|
+
new(transformed_hash)
|
168
|
+
end
|
169
|
+
|
170
|
+
# Deserializes the data based on type
|
171
|
+
# @param string type Data type
|
172
|
+
# @param string value Value to be deserialized
|
173
|
+
# @return [Object] Deserialized data
|
174
|
+
def self._deserialize(type, value)
|
175
|
+
case type.to_sym
|
176
|
+
when :Time
|
177
|
+
Time.parse(value)
|
178
|
+
when :Date
|
179
|
+
Date.parse(value)
|
180
|
+
when :String
|
181
|
+
value.to_s
|
182
|
+
when :Integer
|
183
|
+
value.to_i
|
184
|
+
when :Float
|
185
|
+
value.to_f
|
186
|
+
when :Boolean
|
187
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
188
|
+
true
|
189
|
+
else
|
190
|
+
false
|
191
|
+
end
|
192
|
+
when :Object
|
193
|
+
# generic object (usually a Hash), return directly
|
194
|
+
value
|
195
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
196
|
+
inner_type = Regexp.last_match[:inner_type]
|
197
|
+
value.map { |v| _deserialize(inner_type, v) }
|
198
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
199
|
+
k_type = Regexp.last_match[:k_type]
|
200
|
+
v_type = Regexp.last_match[:v_type]
|
201
|
+
{}.tap do |hash|
|
202
|
+
value.each do |k, v|
|
203
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
204
|
+
end
|
205
|
+
end
|
206
|
+
else # model
|
207
|
+
# models (e.g. Pet) or oneOf
|
208
|
+
klass = Svix.const_get(type)
|
209
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
210
|
+
end
|
211
|
+
end
|
212
|
+
|
213
|
+
# Returns the string representation of the object
|
214
|
+
# @return [String] String presentation of the object
|
215
|
+
def to_s
|
216
|
+
to_hash.to_s
|
217
|
+
end
|
218
|
+
|
219
|
+
# to_body is an alias to to_hash (backward compatibility)
|
220
|
+
# @return [Hash] Returns the object in the form of hash
|
221
|
+
def to_body
|
222
|
+
to_hash
|
223
|
+
end
|
224
|
+
|
225
|
+
# Returns the object in the form of hash
|
226
|
+
# @return [Hash] Returns the object in the form of hash
|
227
|
+
def to_hash
|
228
|
+
hash = {}
|
229
|
+
self.class.attribute_map.each_pair do |attr, param|
|
230
|
+
value = self.send(attr)
|
231
|
+
if value.nil?
|
232
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
233
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
234
|
+
end
|
235
|
+
|
236
|
+
hash[param] = _to_hash(value)
|
237
|
+
end
|
238
|
+
hash
|
239
|
+
end
|
240
|
+
|
241
|
+
# Outputs non-array value in the form of hash
|
242
|
+
# For object, use to_hash. Otherwise, just return the value
|
243
|
+
# @param [Object] value Any valid value
|
244
|
+
# @return [Hash] Returns the value in the form of hash
|
245
|
+
def _to_hash(value)
|
246
|
+
if value.is_a?(Array)
|
247
|
+
value.compact.map { |v| _to_hash(v) }
|
248
|
+
elsif value.is_a?(Hash)
|
249
|
+
{}.tap do |hash|
|
250
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
251
|
+
end
|
252
|
+
elsif value.respond_to? :to_hash
|
253
|
+
value.to_hash
|
254
|
+
else
|
255
|
+
value
|
256
|
+
end
|
257
|
+
end
|
258
|
+
|
259
|
+
end
|
260
|
+
|
261
|
+
end
|
@@ -15,15 +15,15 @@ require 'time'
|
|
15
15
|
|
16
16
|
module Svix
|
17
17
|
class MessageAttemptEndpointOut
|
18
|
-
# The
|
18
|
+
# The Endpoint's ID.
|
19
19
|
attr_accessor :endpoint_id
|
20
20
|
|
21
|
-
# The
|
21
|
+
# The MessageAttempt's ID.
|
22
22
|
attr_accessor :id
|
23
23
|
|
24
24
|
attr_accessor :msg
|
25
25
|
|
26
|
-
# The
|
26
|
+
# The Message's ID.
|
27
27
|
attr_accessor :msg_id
|
28
28
|
|
29
29
|
attr_accessor :response
|
@@ -197,14 +197,53 @@ module Svix
|
|
197
197
|
invalid_properties.push('invalid value for "endpoint_id", endpoint_id cannot be nil.')
|
198
198
|
end
|
199
199
|
|
200
|
+
if @endpoint_id.to_s.length > 30
|
201
|
+
invalid_properties.push('invalid value for "endpoint_id", the character length must be smaller than or equal to 30.')
|
202
|
+
end
|
203
|
+
|
204
|
+
if @endpoint_id.to_s.length < 30
|
205
|
+
invalid_properties.push('invalid value for "endpoint_id", the character length must be great than or equal to 30.')
|
206
|
+
end
|
207
|
+
|
208
|
+
pattern = Regexp.new(/^ep_[A-Za-z0-9]{27}$/)
|
209
|
+
if @endpoint_id !~ pattern
|
210
|
+
invalid_properties.push("invalid value for \"endpoint_id\", must conform to the pattern #{pattern}.")
|
211
|
+
end
|
212
|
+
|
200
213
|
if @id.nil?
|
201
214
|
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
202
215
|
end
|
203
216
|
|
217
|
+
if @id.to_s.length > 33
|
218
|
+
invalid_properties.push('invalid value for "id", the character length must be smaller than or equal to 33.')
|
219
|
+
end
|
220
|
+
|
221
|
+
if @id.to_s.length < 33
|
222
|
+
invalid_properties.push('invalid value for "id", the character length must be great than or equal to 33.')
|
223
|
+
end
|
224
|
+
|
225
|
+
pattern = Regexp.new(/^atmpt_[A-Za-z0-9]{27}$/)
|
226
|
+
if @id !~ pattern
|
227
|
+
invalid_properties.push("invalid value for \"id\", must conform to the pattern #{pattern}.")
|
228
|
+
end
|
229
|
+
|
204
230
|
if @msg_id.nil?
|
205
231
|
invalid_properties.push('invalid value for "msg_id", msg_id cannot be nil.')
|
206
232
|
end
|
207
233
|
|
234
|
+
if @msg_id.to_s.length > 31
|
235
|
+
invalid_properties.push('invalid value for "msg_id", the character length must be smaller than or equal to 31.')
|
236
|
+
end
|
237
|
+
|
238
|
+
if @msg_id.to_s.length < 31
|
239
|
+
invalid_properties.push('invalid value for "msg_id", the character length must be great than or equal to 31.')
|
240
|
+
end
|
241
|
+
|
242
|
+
pattern = Regexp.new(/^msg_[A-Za-z0-9]{27}$/)
|
243
|
+
if @msg_id !~ pattern
|
244
|
+
invalid_properties.push("invalid value for \"msg_id\", must conform to the pattern #{pattern}.")
|
245
|
+
end
|
246
|
+
|
208
247
|
if @response.nil?
|
209
248
|
invalid_properties.push('invalid value for "response", response cannot be nil.')
|
210
249
|
end
|
@@ -249,8 +288,17 @@ module Svix
|
|
249
288
|
def valid?
|
250
289
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
251
290
|
return false if @endpoint_id.nil?
|
291
|
+
return false if @endpoint_id.to_s.length > 30
|
292
|
+
return false if @endpoint_id.to_s.length < 30
|
293
|
+
return false if @endpoint_id !~ Regexp.new(/^ep_[A-Za-z0-9]{27}$/)
|
252
294
|
return false if @id.nil?
|
295
|
+
return false if @id.to_s.length > 33
|
296
|
+
return false if @id.to_s.length < 33
|
297
|
+
return false if @id !~ Regexp.new(/^atmpt_[A-Za-z0-9]{27}$/)
|
253
298
|
return false if @msg_id.nil?
|
299
|
+
return false if @msg_id.to_s.length > 31
|
300
|
+
return false if @msg_id.to_s.length < 31
|
301
|
+
return false if @msg_id !~ Regexp.new(/^msg_[A-Za-z0-9]{27}$/)
|
254
302
|
return false if @response.nil?
|
255
303
|
return false if @response_duration_ms.nil?
|
256
304
|
return false if @response_status_code.nil?
|
@@ -263,6 +311,75 @@ module Svix
|
|
263
311
|
true
|
264
312
|
end
|
265
313
|
|
314
|
+
# Custom attribute writer method with validation
|
315
|
+
# @param [Object] endpoint_id Value to be assigned
|
316
|
+
def endpoint_id=(endpoint_id)
|
317
|
+
if endpoint_id.nil?
|
318
|
+
fail ArgumentError, 'endpoint_id cannot be nil'
|
319
|
+
end
|
320
|
+
|
321
|
+
if endpoint_id.to_s.length > 30
|
322
|
+
fail ArgumentError, 'invalid value for "endpoint_id", the character length must be smaller than or equal to 30.'
|
323
|
+
end
|
324
|
+
|
325
|
+
if endpoint_id.to_s.length < 30
|
326
|
+
fail ArgumentError, 'invalid value for "endpoint_id", the character length must be great than or equal to 30.'
|
327
|
+
end
|
328
|
+
|
329
|
+
pattern = Regexp.new(/^ep_[A-Za-z0-9]{27}$/)
|
330
|
+
if endpoint_id !~ pattern
|
331
|
+
fail ArgumentError, "invalid value for \"endpoint_id\", must conform to the pattern #{pattern}."
|
332
|
+
end
|
333
|
+
|
334
|
+
@endpoint_id = endpoint_id
|
335
|
+
end
|
336
|
+
|
337
|
+
# Custom attribute writer method with validation
|
338
|
+
# @param [Object] id Value to be assigned
|
339
|
+
def id=(id)
|
340
|
+
if id.nil?
|
341
|
+
fail ArgumentError, 'id cannot be nil'
|
342
|
+
end
|
343
|
+
|
344
|
+
if id.to_s.length > 33
|
345
|
+
fail ArgumentError, 'invalid value for "id", the character length must be smaller than or equal to 33.'
|
346
|
+
end
|
347
|
+
|
348
|
+
if id.to_s.length < 33
|
349
|
+
fail ArgumentError, 'invalid value for "id", the character length must be great than or equal to 33.'
|
350
|
+
end
|
351
|
+
|
352
|
+
pattern = Regexp.new(/^atmpt_[A-Za-z0-9]{27}$/)
|
353
|
+
if id !~ pattern
|
354
|
+
fail ArgumentError, "invalid value for \"id\", must conform to the pattern #{pattern}."
|
355
|
+
end
|
356
|
+
|
357
|
+
@id = id
|
358
|
+
end
|
359
|
+
|
360
|
+
# Custom attribute writer method with validation
|
361
|
+
# @param [Object] msg_id Value to be assigned
|
362
|
+
def msg_id=(msg_id)
|
363
|
+
if msg_id.nil?
|
364
|
+
fail ArgumentError, 'msg_id cannot be nil'
|
365
|
+
end
|
366
|
+
|
367
|
+
if msg_id.to_s.length > 31
|
368
|
+
fail ArgumentError, 'invalid value for "msg_id", the character length must be smaller than or equal to 31.'
|
369
|
+
end
|
370
|
+
|
371
|
+
if msg_id.to_s.length < 31
|
372
|
+
fail ArgumentError, 'invalid value for "msg_id", the character length must be great than or equal to 31.'
|
373
|
+
end
|
374
|
+
|
375
|
+
pattern = Regexp.new(/^msg_[A-Za-z0-9]{27}$/)
|
376
|
+
if msg_id !~ pattern
|
377
|
+
fail ArgumentError, "invalid value for \"msg_id\", must conform to the pattern #{pattern}."
|
378
|
+
end
|
379
|
+
|
380
|
+
@msg_id = msg_id
|
381
|
+
end
|
382
|
+
|
266
383
|
# Custom attribute writer method with validation
|
267
384
|
# @param [Object] url Value to be assigned
|
268
385
|
def url=(url)
|