svix 1.24.0 → 1.26.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 +2 -2
- data/lib/svix/api/authentication_api.rb +87 -0
- data/lib/svix/api/endpoint_api.rb +277 -2
- data/lib/svix/api/events_api.rb +3 -3
- data/lib/svix/api/message_api.rb +317 -101
- data/lib/svix/api/transformation_template_api.rb +195 -24
- data/lib/svix/models/auth_token_out.rb +284 -0
- data/lib/svix/models/create_message_token_in.rb +250 -0
- data/lib/svix/models/create_stream_in.rb +225 -0
- data/lib/svix/models/endpoint_created_event_data.rb +1 -0
- data/lib/svix/models/endpoint_deleted_event_data.rb +1 -0
- data/lib/svix/models/endpoint_mtls_config_in.rb +15 -19
- data/lib/svix/models/endpoint_oauth_config_in.rb +13 -2
- data/lib/svix/models/endpoint_updated_event_data.rb +1 -0
- data/lib/svix/models/environment_settings_out.rb +15 -4
- data/lib/svix/models/event_in.rb +223 -0
- data/lib/svix/models/event_out.rb +237 -0
- data/lib/svix/models/event_stream_out.rb +253 -0
- data/lib/svix/models/event_type_from_open_api.rb +280 -0
- data/lib/svix/models/event_type_import_open_api_in.rb +13 -1
- data/lib/svix/models/event_type_import_open_api_out_data.rb +16 -4
- data/lib/svix/models/event_type_in.rb +38 -1
- data/lib/svix/models/event_type_out.rb +38 -1
- data/lib/svix/models/event_type_patch.rb +38 -1
- data/lib/svix/models/event_type_update.rb +38 -1
- data/lib/svix/models/hubspot_oauth_config_in.rb +223 -0
- data/lib/svix/models/{oauth_payload_out.rb → incoming_webhook_payload_out.rb} +3 -3
- data/lib/svix/models/kafka_security_protocol_type.rb +38 -0
- data/lib/svix/models/list_response_sink_out.rb +259 -0
- data/lib/svix/models/{message_stream_out.rb → message_events_out.rb} +3 -3
- data/lib/svix/models/message_subscriber_auth_token_out.rb +237 -0
- data/lib/svix/models/{oauth_payload_in.rb → o_auth_payload_in.rb} +3 -3
- data/lib/svix/models/o_auth_payload_out.rb +239 -0
- data/lib/svix/models/{oauth2_grant_type.rb → oauth2_grant_type_in.rb} +4 -3
- data/lib/svix/models/settings_in.rb +15 -4
- data/lib/svix/models/settings_out.rb +15 -4
- data/lib/svix/models/sink_in.rb +107 -0
- data/lib/svix/models/sink_in_one_of.rb +285 -0
- data/lib/svix/models/sink_in_one_of1.rb +313 -0
- data/lib/svix/models/sink_in_one_of2.rb +321 -0
- data/lib/svix/models/sink_in_one_of3.rb +271 -0
- data/lib/svix/models/sink_out.rb +107 -0
- data/lib/svix/version.rb +1 -1
- metadata +24 -6
@@ -21,6 +21,9 @@ module Svix
|
|
21
21
|
|
22
22
|
attr_accessor :feature_flag
|
23
23
|
|
24
|
+
# The event type group's name
|
25
|
+
attr_accessor :group_name
|
26
|
+
|
24
27
|
# The event type's name
|
25
28
|
attr_accessor :name
|
26
29
|
|
@@ -33,6 +36,7 @@ module Svix
|
|
33
36
|
:'archived' => :'archived',
|
34
37
|
:'description' => :'description',
|
35
38
|
:'feature_flag' => :'featureFlag',
|
39
|
+
:'group_name' => :'groupName',
|
36
40
|
:'name' => :'name',
|
37
41
|
:'schemas' => :'schemas'
|
38
42
|
}
|
@@ -49,6 +53,7 @@ module Svix
|
|
49
53
|
:'archived' => :'Boolean',
|
50
54
|
:'description' => :'String',
|
51
55
|
:'feature_flag' => :'String',
|
56
|
+
:'group_name' => :'String',
|
52
57
|
:'name' => :'String',
|
53
58
|
:'schemas' => :'Hash<String, Object>'
|
54
59
|
}
|
@@ -58,6 +63,7 @@ module Svix
|
|
58
63
|
def self.openapi_nullable
|
59
64
|
Set.new([
|
60
65
|
:'feature_flag',
|
66
|
+
:'group_name',
|
61
67
|
:'schemas'
|
62
68
|
])
|
63
69
|
end
|
@@ -91,6 +97,10 @@ module Svix
|
|
91
97
|
self.feature_flag = attributes[:'feature_flag']
|
92
98
|
end
|
93
99
|
|
100
|
+
if attributes.key?(:'group_name')
|
101
|
+
self.group_name = attributes[:'group_name']
|
102
|
+
end
|
103
|
+
|
94
104
|
if attributes.key?(:'name')
|
95
105
|
self.name = attributes[:'name']
|
96
106
|
end
|
@@ -119,6 +129,15 @@ module Svix
|
|
119
129
|
invalid_properties.push("invalid value for \"feature_flag\", must conform to the pattern #{pattern}.")
|
120
130
|
end
|
121
131
|
|
132
|
+
if !@group_name.nil? && @group_name.to_s.length > 256
|
133
|
+
invalid_properties.push('invalid value for "group_name", the character length must be smaller than or equal to 256.')
|
134
|
+
end
|
135
|
+
|
136
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
137
|
+
if !@group_name.nil? && @group_name !~ pattern
|
138
|
+
invalid_properties.push("invalid value for \"group_name\", must conform to the pattern #{pattern}.")
|
139
|
+
end
|
140
|
+
|
122
141
|
if @name.nil?
|
123
142
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
124
143
|
end
|
@@ -141,6 +160,8 @@ module Svix
|
|
141
160
|
return false if @description.nil?
|
142
161
|
return false if !@feature_flag.nil? && @feature_flag.to_s.length > 256
|
143
162
|
return false if !@feature_flag.nil? && @feature_flag !~ Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
163
|
+
return false if !@group_name.nil? && @group_name.to_s.length > 256
|
164
|
+
return false if !@group_name.nil? && @group_name !~ Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
144
165
|
return false if @name.nil?
|
145
166
|
return false if @name.to_s.length > 256
|
146
167
|
return false if @name !~ Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
@@ -162,6 +183,21 @@ module Svix
|
|
162
183
|
@feature_flag = feature_flag
|
163
184
|
end
|
164
185
|
|
186
|
+
# Custom attribute writer method with validation
|
187
|
+
# @param [Object] group_name Value to be assigned
|
188
|
+
def group_name=(group_name)
|
189
|
+
if !group_name.nil? && group_name.to_s.length > 256
|
190
|
+
fail ArgumentError, 'invalid value for "group_name", the character length must be smaller than or equal to 256.'
|
191
|
+
end
|
192
|
+
|
193
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
194
|
+
if !group_name.nil? && group_name !~ pattern
|
195
|
+
fail ArgumentError, "invalid value for \"group_name\", must conform to the pattern #{pattern}."
|
196
|
+
end
|
197
|
+
|
198
|
+
@group_name = group_name
|
199
|
+
end
|
200
|
+
|
165
201
|
# Custom attribute writer method with validation
|
166
202
|
# @param [Object] name Value to be assigned
|
167
203
|
def name=(name)
|
@@ -189,6 +225,7 @@ module Svix
|
|
189
225
|
archived == o.archived &&
|
190
226
|
description == o.description &&
|
191
227
|
feature_flag == o.feature_flag &&
|
228
|
+
group_name == o.group_name &&
|
192
229
|
name == o.name &&
|
193
230
|
schemas == o.schemas
|
194
231
|
end
|
@@ -202,7 +239,7 @@ module Svix
|
|
202
239
|
# Calculates hash code according to all attributes.
|
203
240
|
# @return [Integer] Hash code
|
204
241
|
def hash
|
205
|
-
[archived, description, feature_flag, name, schemas].hash
|
242
|
+
[archived, description, feature_flag, group_name, name, schemas].hash
|
206
243
|
end
|
207
244
|
|
208
245
|
# Builds the object from hash
|
@@ -23,6 +23,9 @@ module Svix
|
|
23
23
|
|
24
24
|
attr_accessor :feature_flag
|
25
25
|
|
26
|
+
# The event type group's name
|
27
|
+
attr_accessor :group_name
|
28
|
+
|
26
29
|
# The event type's name
|
27
30
|
attr_accessor :name
|
28
31
|
|
@@ -38,6 +41,7 @@ module Svix
|
|
38
41
|
:'created_at' => :'createdAt',
|
39
42
|
:'description' => :'description',
|
40
43
|
:'feature_flag' => :'featureFlag',
|
44
|
+
:'group_name' => :'groupName',
|
41
45
|
:'name' => :'name',
|
42
46
|
:'schemas' => :'schemas',
|
43
47
|
:'updated_at' => :'updatedAt'
|
@@ -56,6 +60,7 @@ module Svix
|
|
56
60
|
:'created_at' => :'Time',
|
57
61
|
:'description' => :'String',
|
58
62
|
:'feature_flag' => :'String',
|
63
|
+
:'group_name' => :'String',
|
59
64
|
:'name' => :'String',
|
60
65
|
:'schemas' => :'Hash<String, Object>',
|
61
66
|
:'updated_at' => :'Time'
|
@@ -66,6 +71,7 @@ module Svix
|
|
66
71
|
def self.openapi_nullable
|
67
72
|
Set.new([
|
68
73
|
:'feature_flag',
|
74
|
+
:'group_name',
|
69
75
|
:'schemas',
|
70
76
|
])
|
71
77
|
end
|
@@ -103,6 +109,10 @@ module Svix
|
|
103
109
|
self.feature_flag = attributes[:'feature_flag']
|
104
110
|
end
|
105
111
|
|
112
|
+
if attributes.key?(:'group_name')
|
113
|
+
self.group_name = attributes[:'group_name']
|
114
|
+
end
|
115
|
+
|
106
116
|
if attributes.key?(:'name')
|
107
117
|
self.name = attributes[:'name']
|
108
118
|
end
|
@@ -139,6 +149,15 @@ module Svix
|
|
139
149
|
invalid_properties.push("invalid value for \"feature_flag\", must conform to the pattern #{pattern}.")
|
140
150
|
end
|
141
151
|
|
152
|
+
if !@group_name.nil? && @group_name.to_s.length > 256
|
153
|
+
invalid_properties.push('invalid value for "group_name", the character length must be smaller than or equal to 256.')
|
154
|
+
end
|
155
|
+
|
156
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
157
|
+
if !@group_name.nil? && @group_name !~ pattern
|
158
|
+
invalid_properties.push("invalid value for \"group_name\", must conform to the pattern #{pattern}.")
|
159
|
+
end
|
160
|
+
|
142
161
|
if @name.nil?
|
143
162
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
144
163
|
end
|
@@ -166,6 +185,8 @@ module Svix
|
|
166
185
|
return false if @description.nil?
|
167
186
|
return false if !@feature_flag.nil? && @feature_flag.to_s.length > 256
|
168
187
|
return false if !@feature_flag.nil? && @feature_flag !~ Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
188
|
+
return false if !@group_name.nil? && @group_name.to_s.length > 256
|
189
|
+
return false if !@group_name.nil? && @group_name !~ Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
169
190
|
return false if @name.nil?
|
170
191
|
return false if @name.to_s.length > 256
|
171
192
|
return false if @name !~ Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
@@ -188,6 +209,21 @@ module Svix
|
|
188
209
|
@feature_flag = feature_flag
|
189
210
|
end
|
190
211
|
|
212
|
+
# Custom attribute writer method with validation
|
213
|
+
# @param [Object] group_name Value to be assigned
|
214
|
+
def group_name=(group_name)
|
215
|
+
if !group_name.nil? && group_name.to_s.length > 256
|
216
|
+
fail ArgumentError, 'invalid value for "group_name", the character length must be smaller than or equal to 256.'
|
217
|
+
end
|
218
|
+
|
219
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
220
|
+
if !group_name.nil? && group_name !~ pattern
|
221
|
+
fail ArgumentError, "invalid value for \"group_name\", must conform to the pattern #{pattern}."
|
222
|
+
end
|
223
|
+
|
224
|
+
@group_name = group_name
|
225
|
+
end
|
226
|
+
|
191
227
|
# Custom attribute writer method with validation
|
192
228
|
# @param [Object] name Value to be assigned
|
193
229
|
def name=(name)
|
@@ -216,6 +252,7 @@ module Svix
|
|
216
252
|
created_at == o.created_at &&
|
217
253
|
description == o.description &&
|
218
254
|
feature_flag == o.feature_flag &&
|
255
|
+
group_name == o.group_name &&
|
219
256
|
name == o.name &&
|
220
257
|
schemas == o.schemas &&
|
221
258
|
updated_at == o.updated_at
|
@@ -230,7 +267,7 @@ module Svix
|
|
230
267
|
# Calculates hash code according to all attributes.
|
231
268
|
# @return [Integer] Hash code
|
232
269
|
def hash
|
233
|
-
[archived, created_at, description, feature_flag, name, schemas, updated_at].hash
|
270
|
+
[archived, created_at, description, feature_flag, group_name, name, schemas, updated_at].hash
|
234
271
|
end
|
235
272
|
|
236
273
|
# Builds the object from hash
|
@@ -21,6 +21,9 @@ module Svix
|
|
21
21
|
|
22
22
|
attr_accessor :feature_flag
|
23
23
|
|
24
|
+
# The event type group's name
|
25
|
+
attr_accessor :group_name
|
26
|
+
|
24
27
|
attr_accessor :schemas
|
25
28
|
|
26
29
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -29,6 +32,7 @@ module Svix
|
|
29
32
|
:'archived' => :'archived',
|
30
33
|
:'description' => :'description',
|
31
34
|
:'feature_flag' => :'featureFlag',
|
35
|
+
:'group_name' => :'groupName',
|
32
36
|
:'schemas' => :'schemas'
|
33
37
|
}
|
34
38
|
end
|
@@ -44,6 +48,7 @@ module Svix
|
|
44
48
|
:'archived' => :'Boolean',
|
45
49
|
:'description' => :'String',
|
46
50
|
:'feature_flag' => :'String',
|
51
|
+
:'group_name' => :'String',
|
47
52
|
:'schemas' => :'Hash<String, Object>'
|
48
53
|
}
|
49
54
|
end
|
@@ -52,6 +57,7 @@ module Svix
|
|
52
57
|
def self.openapi_nullable
|
53
58
|
Set.new([
|
54
59
|
:'feature_flag',
|
60
|
+
:'group_name',
|
55
61
|
:'schemas'
|
56
62
|
])
|
57
63
|
end
|
@@ -83,6 +89,10 @@ module Svix
|
|
83
89
|
self.feature_flag = attributes[:'feature_flag']
|
84
90
|
end
|
85
91
|
|
92
|
+
if attributes.key?(:'group_name')
|
93
|
+
self.group_name = attributes[:'group_name']
|
94
|
+
end
|
95
|
+
|
86
96
|
if attributes.key?(:'schemas')
|
87
97
|
if (value = attributes[:'schemas']).is_a?(Hash)
|
88
98
|
self.schemas = value
|
@@ -103,6 +113,15 @@ module Svix
|
|
103
113
|
invalid_properties.push("invalid value for \"feature_flag\", must conform to the pattern #{pattern}.")
|
104
114
|
end
|
105
115
|
|
116
|
+
if !@group_name.nil? && @group_name.to_s.length > 256
|
117
|
+
invalid_properties.push('invalid value for "group_name", the character length must be smaller than or equal to 256.')
|
118
|
+
end
|
119
|
+
|
120
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
121
|
+
if !@group_name.nil? && @group_name !~ pattern
|
122
|
+
invalid_properties.push("invalid value for \"group_name\", must conform to the pattern #{pattern}.")
|
123
|
+
end
|
124
|
+
|
106
125
|
invalid_properties
|
107
126
|
end
|
108
127
|
|
@@ -111,6 +130,8 @@ module Svix
|
|
111
130
|
def valid?
|
112
131
|
return false if !@feature_flag.nil? && @feature_flag.to_s.length > 256
|
113
132
|
return false if !@feature_flag.nil? && @feature_flag !~ Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
133
|
+
return false if !@group_name.nil? && @group_name.to_s.length > 256
|
134
|
+
return false if !@group_name.nil? && @group_name !~ Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
114
135
|
true
|
115
136
|
end
|
116
137
|
|
@@ -129,6 +150,21 @@ module Svix
|
|
129
150
|
@feature_flag = feature_flag
|
130
151
|
end
|
131
152
|
|
153
|
+
# Custom attribute writer method with validation
|
154
|
+
# @param [Object] group_name Value to be assigned
|
155
|
+
def group_name=(group_name)
|
156
|
+
if !group_name.nil? && group_name.to_s.length > 256
|
157
|
+
fail ArgumentError, 'invalid value for "group_name", the character length must be smaller than or equal to 256.'
|
158
|
+
end
|
159
|
+
|
160
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
161
|
+
if !group_name.nil? && group_name !~ pattern
|
162
|
+
fail ArgumentError, "invalid value for \"group_name\", must conform to the pattern #{pattern}."
|
163
|
+
end
|
164
|
+
|
165
|
+
@group_name = group_name
|
166
|
+
end
|
167
|
+
|
132
168
|
# Checks equality by comparing each attribute.
|
133
169
|
# @param [Object] Object to be compared
|
134
170
|
def ==(o)
|
@@ -137,6 +173,7 @@ module Svix
|
|
137
173
|
archived == o.archived &&
|
138
174
|
description == o.description &&
|
139
175
|
feature_flag == o.feature_flag &&
|
176
|
+
group_name == o.group_name &&
|
140
177
|
schemas == o.schemas
|
141
178
|
end
|
142
179
|
|
@@ -149,7 +186,7 @@ module Svix
|
|
149
186
|
# Calculates hash code according to all attributes.
|
150
187
|
# @return [Integer] Hash code
|
151
188
|
def hash
|
152
|
-
[archived, description, feature_flag, schemas].hash
|
189
|
+
[archived, description, feature_flag, group_name, schemas].hash
|
153
190
|
end
|
154
191
|
|
155
192
|
# Builds the object from hash
|
@@ -21,6 +21,9 @@ module Svix
|
|
21
21
|
|
22
22
|
attr_accessor :feature_flag
|
23
23
|
|
24
|
+
# The event type group's name
|
25
|
+
attr_accessor :group_name
|
26
|
+
|
24
27
|
# The schema for the event type for a specific version as a JSON schema.
|
25
28
|
attr_accessor :schemas
|
26
29
|
|
@@ -30,6 +33,7 @@ module Svix
|
|
30
33
|
:'archived' => :'archived',
|
31
34
|
:'description' => :'description',
|
32
35
|
:'feature_flag' => :'featureFlag',
|
36
|
+
:'group_name' => :'groupName',
|
33
37
|
:'schemas' => :'schemas'
|
34
38
|
}
|
35
39
|
end
|
@@ -45,6 +49,7 @@ module Svix
|
|
45
49
|
:'archived' => :'Boolean',
|
46
50
|
:'description' => :'String',
|
47
51
|
:'feature_flag' => :'String',
|
52
|
+
:'group_name' => :'String',
|
48
53
|
:'schemas' => :'Hash<String, Object>'
|
49
54
|
}
|
50
55
|
end
|
@@ -53,6 +58,7 @@ module Svix
|
|
53
58
|
def self.openapi_nullable
|
54
59
|
Set.new([
|
55
60
|
:'feature_flag',
|
61
|
+
:'group_name',
|
56
62
|
:'schemas'
|
57
63
|
])
|
58
64
|
end
|
@@ -86,6 +92,10 @@ module Svix
|
|
86
92
|
self.feature_flag = attributes[:'feature_flag']
|
87
93
|
end
|
88
94
|
|
95
|
+
if attributes.key?(:'group_name')
|
96
|
+
self.group_name = attributes[:'group_name']
|
97
|
+
end
|
98
|
+
|
89
99
|
if attributes.key?(:'schemas')
|
90
100
|
if (value = attributes[:'schemas']).is_a?(Hash)
|
91
101
|
self.schemas = value
|
@@ -110,6 +120,15 @@ module Svix
|
|
110
120
|
invalid_properties.push("invalid value for \"feature_flag\", must conform to the pattern #{pattern}.")
|
111
121
|
end
|
112
122
|
|
123
|
+
if !@group_name.nil? && @group_name.to_s.length > 256
|
124
|
+
invalid_properties.push('invalid value for "group_name", the character length must be smaller than or equal to 256.')
|
125
|
+
end
|
126
|
+
|
127
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
128
|
+
if !@group_name.nil? && @group_name !~ pattern
|
129
|
+
invalid_properties.push("invalid value for \"group_name\", must conform to the pattern #{pattern}.")
|
130
|
+
end
|
131
|
+
|
113
132
|
invalid_properties
|
114
133
|
end
|
115
134
|
|
@@ -119,6 +138,8 @@ module Svix
|
|
119
138
|
return false if @description.nil?
|
120
139
|
return false if !@feature_flag.nil? && @feature_flag.to_s.length > 256
|
121
140
|
return false if !@feature_flag.nil? && @feature_flag !~ Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
141
|
+
return false if !@group_name.nil? && @group_name.to_s.length > 256
|
142
|
+
return false if !@group_name.nil? && @group_name !~ Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
122
143
|
true
|
123
144
|
end
|
124
145
|
|
@@ -137,6 +158,21 @@ module Svix
|
|
137
158
|
@feature_flag = feature_flag
|
138
159
|
end
|
139
160
|
|
161
|
+
# Custom attribute writer method with validation
|
162
|
+
# @param [Object] group_name Value to be assigned
|
163
|
+
def group_name=(group_name)
|
164
|
+
if !group_name.nil? && group_name.to_s.length > 256
|
165
|
+
fail ArgumentError, 'invalid value for "group_name", the character length must be smaller than or equal to 256.'
|
166
|
+
end
|
167
|
+
|
168
|
+
pattern = Regexp.new(/^[a-zA-Z0-9\-_.]+$/)
|
169
|
+
if !group_name.nil? && group_name !~ pattern
|
170
|
+
fail ArgumentError, "invalid value for \"group_name\", must conform to the pattern #{pattern}."
|
171
|
+
end
|
172
|
+
|
173
|
+
@group_name = group_name
|
174
|
+
end
|
175
|
+
|
140
176
|
# Checks equality by comparing each attribute.
|
141
177
|
# @param [Object] Object to be compared
|
142
178
|
def ==(o)
|
@@ -145,6 +181,7 @@ module Svix
|
|
145
181
|
archived == o.archived &&
|
146
182
|
description == o.description &&
|
147
183
|
feature_flag == o.feature_flag &&
|
184
|
+
group_name == o.group_name &&
|
148
185
|
schemas == o.schemas
|
149
186
|
end
|
150
187
|
|
@@ -157,7 +194,7 @@ module Svix
|
|
157
194
|
# Calculates hash code according to all attributes.
|
158
195
|
# @return [Integer] Hash code
|
159
196
|
def hash
|
160
|
-
[archived, description, feature_flag, schemas].hash
|
197
|
+
[archived, description, feature_flag, group_name, schemas].hash
|
161
198
|
end
|
162
199
|
|
163
200
|
# Builds the object from hash
|
@@ -0,0 +1,223 @@
|
|
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 HubspotOauthConfigIn
|
18
|
+
attr_accessor :refresh_token
|
19
|
+
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
21
|
+
def self.attribute_map
|
22
|
+
{
|
23
|
+
:'refresh_token' => :'refresh_token'
|
24
|
+
}
|
25
|
+
end
|
26
|
+
|
27
|
+
# Returns all the JSON keys this model knows about
|
28
|
+
def self.acceptable_attributes
|
29
|
+
attribute_map.values
|
30
|
+
end
|
31
|
+
|
32
|
+
# Attribute type mapping.
|
33
|
+
def self.openapi_types
|
34
|
+
{
|
35
|
+
:'refresh_token' => :'String'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# List of attributes with nullable: true
|
40
|
+
def self.openapi_nullable
|
41
|
+
Set.new([
|
42
|
+
])
|
43
|
+
end
|
44
|
+
|
45
|
+
# Initializes the object
|
46
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
47
|
+
def initialize(attributes = {})
|
48
|
+
if (!attributes.is_a?(Hash))
|
49
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Svix::HubspotOauthConfigIn` initialize method"
|
50
|
+
end
|
51
|
+
|
52
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
53
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
54
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
55
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Svix::HubspotOauthConfigIn`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
56
|
+
end
|
57
|
+
h[k.to_sym] = v
|
58
|
+
}
|
59
|
+
|
60
|
+
if attributes.key?(:'refresh_token')
|
61
|
+
self.refresh_token = attributes[:'refresh_token']
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
66
|
+
# @return Array for valid properties with the reasons
|
67
|
+
def list_invalid_properties
|
68
|
+
invalid_properties = Array.new
|
69
|
+
if @refresh_token.nil?
|
70
|
+
invalid_properties.push('invalid value for "refresh_token", refresh_token cannot be nil.')
|
71
|
+
end
|
72
|
+
|
73
|
+
invalid_properties
|
74
|
+
end
|
75
|
+
|
76
|
+
# Check to see if the all the properties in the model are valid
|
77
|
+
# @return true if the model is valid
|
78
|
+
def valid?
|
79
|
+
return false if @refresh_token.nil?
|
80
|
+
true
|
81
|
+
end
|
82
|
+
|
83
|
+
# Checks equality by comparing each attribute.
|
84
|
+
# @param [Object] Object to be compared
|
85
|
+
def ==(o)
|
86
|
+
return true if self.equal?(o)
|
87
|
+
self.class == o.class &&
|
88
|
+
refresh_token == o.refresh_token
|
89
|
+
end
|
90
|
+
|
91
|
+
# @see the `==` method
|
92
|
+
# @param [Object] Object to be compared
|
93
|
+
def eql?(o)
|
94
|
+
self == o
|
95
|
+
end
|
96
|
+
|
97
|
+
# Calculates hash code according to all attributes.
|
98
|
+
# @return [Integer] Hash code
|
99
|
+
def hash
|
100
|
+
[refresh_token].hash
|
101
|
+
end
|
102
|
+
|
103
|
+
# Builds the object from hash
|
104
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
105
|
+
# @return [Object] Returns the model itself
|
106
|
+
def self.build_from_hash(attributes)
|
107
|
+
new.build_from_hash(attributes)
|
108
|
+
end
|
109
|
+
|
110
|
+
# Builds the object from hash
|
111
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
112
|
+
# @return [Object] Returns the model itself
|
113
|
+
def build_from_hash(attributes)
|
114
|
+
return nil unless attributes.is_a?(Hash)
|
115
|
+
self.class.openapi_types.each_pair do |key, type|
|
116
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
117
|
+
self.send("#{key}=", nil)
|
118
|
+
elsif type =~ /\AArray<(.*)>/i
|
119
|
+
# check to ensure the input is an array given that the attribute
|
120
|
+
# is documented as an array but the input is not
|
121
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
122
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
123
|
+
end
|
124
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
125
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
self
|
130
|
+
end
|
131
|
+
|
132
|
+
# Deserializes the data based on type
|
133
|
+
# @param string type Data type
|
134
|
+
# @param string value Value to be deserialized
|
135
|
+
# @return [Object] Deserialized data
|
136
|
+
def _deserialize(type, value)
|
137
|
+
case type.to_sym
|
138
|
+
when :Time
|
139
|
+
Time.parse(value)
|
140
|
+
when :Date
|
141
|
+
Date.parse(value)
|
142
|
+
when :String
|
143
|
+
value.to_s
|
144
|
+
when :Integer
|
145
|
+
value.to_i
|
146
|
+
when :Float
|
147
|
+
value.to_f
|
148
|
+
when :Boolean
|
149
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
150
|
+
true
|
151
|
+
else
|
152
|
+
false
|
153
|
+
end
|
154
|
+
when :Object
|
155
|
+
# generic object (usually a Hash), return directly
|
156
|
+
value
|
157
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
158
|
+
inner_type = Regexp.last_match[:inner_type]
|
159
|
+
value.map { |v| _deserialize(inner_type, v) }
|
160
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
161
|
+
k_type = Regexp.last_match[:k_type]
|
162
|
+
v_type = Regexp.last_match[:v_type]
|
163
|
+
{}.tap do |hash|
|
164
|
+
value.each do |k, v|
|
165
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
166
|
+
end
|
167
|
+
end
|
168
|
+
else # model
|
169
|
+
# models (e.g. Pet) or oneOf
|
170
|
+
klass = Svix.const_get(type)
|
171
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
172
|
+
end
|
173
|
+
end
|
174
|
+
|
175
|
+
# Returns the string representation of the object
|
176
|
+
# @return [String] String presentation of the object
|
177
|
+
def to_s
|
178
|
+
to_hash.to_s
|
179
|
+
end
|
180
|
+
|
181
|
+
# to_body is an alias to to_hash (backward compatibility)
|
182
|
+
# @return [Hash] Returns the object in the form of hash
|
183
|
+
def to_body
|
184
|
+
to_hash
|
185
|
+
end
|
186
|
+
|
187
|
+
# Returns the object in the form of hash
|
188
|
+
# @return [Hash] Returns the object in the form of hash
|
189
|
+
def to_hash
|
190
|
+
hash = {}
|
191
|
+
self.class.attribute_map.each_pair do |attr, param|
|
192
|
+
value = self.send(attr)
|
193
|
+
if value.nil?
|
194
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
195
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
196
|
+
end
|
197
|
+
|
198
|
+
hash[param] = _to_hash(value)
|
199
|
+
end
|
200
|
+
hash
|
201
|
+
end
|
202
|
+
|
203
|
+
# Outputs non-array value in the form of hash
|
204
|
+
# For object, use to_hash. Otherwise, just return the value
|
205
|
+
# @param [Object] value Any valid value
|
206
|
+
# @return [Hash] Returns the value in the form of hash
|
207
|
+
def _to_hash(value)
|
208
|
+
if value.is_a?(Array)
|
209
|
+
value.compact.map { |v| _to_hash(v) }
|
210
|
+
elsif value.is_a?(Hash)
|
211
|
+
{}.tap do |hash|
|
212
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
213
|
+
end
|
214
|
+
elsif value.respond_to? :to_hash
|
215
|
+
value.to_hash
|
216
|
+
else
|
217
|
+
value
|
218
|
+
end
|
219
|
+
end
|
220
|
+
|
221
|
+
end
|
222
|
+
|
223
|
+
end
|
@@ -14,7 +14,7 @@ require 'date'
|
|
14
14
|
require 'time'
|
15
15
|
|
16
16
|
module Svix
|
17
|
-
class
|
17
|
+
class IncomingWebhookPayloadOut
|
18
18
|
attr_accessor :channel
|
19
19
|
|
20
20
|
attr_accessor :error
|
@@ -57,13 +57,13 @@ module Svix
|
|
57
57
|
# @param [Hash] attributes Model attributes in the form of hash
|
58
58
|
def initialize(attributes = {})
|
59
59
|
if (!attributes.is_a?(Hash))
|
60
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Svix::
|
60
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Svix::IncomingWebhookPayloadOut` initialize method"
|
61
61
|
end
|
62
62
|
|
63
63
|
# check to see if the attribute exists and convert string to symbol for hash key
|
64
64
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
65
65
|
if (!self.class.attribute_map.key?(k.to_sym))
|
66
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Svix::
|
66
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Svix::IncomingWebhookPayloadOut`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
67
67
|
end
|
68
68
|
h[k.to_sym] = v
|
69
69
|
}
|