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
@@ -0,0 +1,250 @@
|
|
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 CreateMessageTokenIn
|
18
|
+
# How long the token will be valid for, in seconds.
|
19
|
+
attr_accessor :expiry
|
20
|
+
|
21
|
+
# The name of the token.
|
22
|
+
attr_accessor :name
|
23
|
+
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
25
|
+
def self.attribute_map
|
26
|
+
{
|
27
|
+
:'expiry' => :'expiry',
|
28
|
+
:'name' => :'name'
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
# Returns all the JSON keys this model knows about
|
33
|
+
def self.acceptable_attributes
|
34
|
+
attribute_map.values
|
35
|
+
end
|
36
|
+
|
37
|
+
# Attribute type mapping.
|
38
|
+
def self.openapi_types
|
39
|
+
{
|
40
|
+
:'expiry' => :'Integer',
|
41
|
+
:'name' => :'String'
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
# List of attributes with nullable: true
|
46
|
+
def self.openapi_nullable
|
47
|
+
Set.new([
|
48
|
+
:'expiry',
|
49
|
+
])
|
50
|
+
end
|
51
|
+
|
52
|
+
# Initializes the object
|
53
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
54
|
+
def initialize(attributes = {})
|
55
|
+
if (!attributes.is_a?(Hash))
|
56
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Svix::CreateMessageTokenIn` initialize method"
|
57
|
+
end
|
58
|
+
|
59
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
60
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
61
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
62
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Svix::CreateMessageTokenIn`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
63
|
+
end
|
64
|
+
h[k.to_sym] = v
|
65
|
+
}
|
66
|
+
|
67
|
+
if attributes.key?(:'expiry')
|
68
|
+
self.expiry = attributes[:'expiry']
|
69
|
+
end
|
70
|
+
|
71
|
+
if attributes.key?(:'name')
|
72
|
+
self.name = attributes[:'name']
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
77
|
+
# @return Array for valid properties with the reasons
|
78
|
+
def list_invalid_properties
|
79
|
+
invalid_properties = Array.new
|
80
|
+
if !@expiry.nil? && @expiry < 0
|
81
|
+
invalid_properties.push('invalid value for "expiry", must be greater than or equal to 0.')
|
82
|
+
end
|
83
|
+
|
84
|
+
if @name.nil?
|
85
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
86
|
+
end
|
87
|
+
|
88
|
+
invalid_properties
|
89
|
+
end
|
90
|
+
|
91
|
+
# Check to see if the all the properties in the model are valid
|
92
|
+
# @return true if the model is valid
|
93
|
+
def valid?
|
94
|
+
return false if !@expiry.nil? && @expiry < 0
|
95
|
+
return false if @name.nil?
|
96
|
+
true
|
97
|
+
end
|
98
|
+
|
99
|
+
# Custom attribute writer method with validation
|
100
|
+
# @param [Object] expiry Value to be assigned
|
101
|
+
def expiry=(expiry)
|
102
|
+
if !expiry.nil? && expiry < 0
|
103
|
+
fail ArgumentError, 'invalid value for "expiry", must be greater than or equal to 0.'
|
104
|
+
end
|
105
|
+
|
106
|
+
@expiry = expiry
|
107
|
+
end
|
108
|
+
|
109
|
+
# Checks equality by comparing each attribute.
|
110
|
+
# @param [Object] Object to be compared
|
111
|
+
def ==(o)
|
112
|
+
return true if self.equal?(o)
|
113
|
+
self.class == o.class &&
|
114
|
+
expiry == o.expiry &&
|
115
|
+
name == o.name
|
116
|
+
end
|
117
|
+
|
118
|
+
# @see the `==` method
|
119
|
+
# @param [Object] Object to be compared
|
120
|
+
def eql?(o)
|
121
|
+
self == o
|
122
|
+
end
|
123
|
+
|
124
|
+
# Calculates hash code according to all attributes.
|
125
|
+
# @return [Integer] Hash code
|
126
|
+
def hash
|
127
|
+
[expiry, name].hash
|
128
|
+
end
|
129
|
+
|
130
|
+
# Builds the object from hash
|
131
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
132
|
+
# @return [Object] Returns the model itself
|
133
|
+
def self.build_from_hash(attributes)
|
134
|
+
new.build_from_hash(attributes)
|
135
|
+
end
|
136
|
+
|
137
|
+
# Builds the object from hash
|
138
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
139
|
+
# @return [Object] Returns the model itself
|
140
|
+
def build_from_hash(attributes)
|
141
|
+
return nil unless attributes.is_a?(Hash)
|
142
|
+
self.class.openapi_types.each_pair do |key, type|
|
143
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
144
|
+
self.send("#{key}=", nil)
|
145
|
+
elsif type =~ /\AArray<(.*)>/i
|
146
|
+
# check to ensure the input is an array given that the attribute
|
147
|
+
# is documented as an array but the input is not
|
148
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
149
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
150
|
+
end
|
151
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
152
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
156
|
+
self
|
157
|
+
end
|
158
|
+
|
159
|
+
# Deserializes the data based on type
|
160
|
+
# @param string type Data type
|
161
|
+
# @param string value Value to be deserialized
|
162
|
+
# @return [Object] Deserialized data
|
163
|
+
def _deserialize(type, value)
|
164
|
+
case type.to_sym
|
165
|
+
when :Time
|
166
|
+
Time.parse(value)
|
167
|
+
when :Date
|
168
|
+
Date.parse(value)
|
169
|
+
when :String
|
170
|
+
value.to_s
|
171
|
+
when :Integer
|
172
|
+
value.to_i
|
173
|
+
when :Float
|
174
|
+
value.to_f
|
175
|
+
when :Boolean
|
176
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
177
|
+
true
|
178
|
+
else
|
179
|
+
false
|
180
|
+
end
|
181
|
+
when :Object
|
182
|
+
# generic object (usually a Hash), return directly
|
183
|
+
value
|
184
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
185
|
+
inner_type = Regexp.last_match[:inner_type]
|
186
|
+
value.map { |v| _deserialize(inner_type, v) }
|
187
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
188
|
+
k_type = Regexp.last_match[:k_type]
|
189
|
+
v_type = Regexp.last_match[:v_type]
|
190
|
+
{}.tap do |hash|
|
191
|
+
value.each do |k, v|
|
192
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
193
|
+
end
|
194
|
+
end
|
195
|
+
else # model
|
196
|
+
# models (e.g. Pet) or oneOf
|
197
|
+
klass = Svix.const_get(type)
|
198
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
199
|
+
end
|
200
|
+
end
|
201
|
+
|
202
|
+
# Returns the string representation of the object
|
203
|
+
# @return [String] String presentation of the object
|
204
|
+
def to_s
|
205
|
+
to_hash.to_s
|
206
|
+
end
|
207
|
+
|
208
|
+
# to_body is an alias to to_hash (backward compatibility)
|
209
|
+
# @return [Hash] Returns the object in the form of hash
|
210
|
+
def to_body
|
211
|
+
to_hash
|
212
|
+
end
|
213
|
+
|
214
|
+
# Returns the object in the form of hash
|
215
|
+
# @return [Hash] Returns the object in the form of hash
|
216
|
+
def to_hash
|
217
|
+
hash = {}
|
218
|
+
self.class.attribute_map.each_pair do |attr, param|
|
219
|
+
value = self.send(attr)
|
220
|
+
if value.nil?
|
221
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
222
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
223
|
+
end
|
224
|
+
|
225
|
+
hash[param] = _to_hash(value)
|
226
|
+
end
|
227
|
+
hash
|
228
|
+
end
|
229
|
+
|
230
|
+
# Outputs non-array value in the form of hash
|
231
|
+
# For object, use to_hash. Otherwise, just return the value
|
232
|
+
# @param [Object] value Any valid value
|
233
|
+
# @return [Hash] Returns the value in the form of hash
|
234
|
+
def _to_hash(value)
|
235
|
+
if value.is_a?(Array)
|
236
|
+
value.compact.map { |v| _to_hash(v) }
|
237
|
+
elsif value.is_a?(Hash)
|
238
|
+
{}.tap do |hash|
|
239
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
240
|
+
end
|
241
|
+
elsif value.respond_to? :to_hash
|
242
|
+
value.to_hash
|
243
|
+
else
|
244
|
+
value
|
245
|
+
end
|
246
|
+
end
|
247
|
+
|
248
|
+
end
|
249
|
+
|
250
|
+
end
|
@@ -0,0 +1,225 @@
|
|
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 CreateStreamIn
|
18
|
+
attr_accessor :events
|
19
|
+
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
21
|
+
def self.attribute_map
|
22
|
+
{
|
23
|
+
:'events' => :'events'
|
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
|
+
:'events' => :'Array<EventIn>'
|
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::CreateStreamIn` 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::CreateStreamIn`. 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?(:'events')
|
61
|
+
if (value = attributes[:'events']).is_a?(Array)
|
62
|
+
self.events = value
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
68
|
+
# @return Array for valid properties with the reasons
|
69
|
+
def list_invalid_properties
|
70
|
+
invalid_properties = Array.new
|
71
|
+
if @events.nil?
|
72
|
+
invalid_properties.push('invalid value for "events", events cannot be nil.')
|
73
|
+
end
|
74
|
+
|
75
|
+
invalid_properties
|
76
|
+
end
|
77
|
+
|
78
|
+
# Check to see if the all the properties in the model are valid
|
79
|
+
# @return true if the model is valid
|
80
|
+
def valid?
|
81
|
+
return false if @events.nil?
|
82
|
+
true
|
83
|
+
end
|
84
|
+
|
85
|
+
# Checks equality by comparing each attribute.
|
86
|
+
# @param [Object] Object to be compared
|
87
|
+
def ==(o)
|
88
|
+
return true if self.equal?(o)
|
89
|
+
self.class == o.class &&
|
90
|
+
events == o.events
|
91
|
+
end
|
92
|
+
|
93
|
+
# @see the `==` method
|
94
|
+
# @param [Object] Object to be compared
|
95
|
+
def eql?(o)
|
96
|
+
self == o
|
97
|
+
end
|
98
|
+
|
99
|
+
# Calculates hash code according to all attributes.
|
100
|
+
# @return [Integer] Hash code
|
101
|
+
def hash
|
102
|
+
[events].hash
|
103
|
+
end
|
104
|
+
|
105
|
+
# Builds the object from hash
|
106
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
107
|
+
# @return [Object] Returns the model itself
|
108
|
+
def self.build_from_hash(attributes)
|
109
|
+
new.build_from_hash(attributes)
|
110
|
+
end
|
111
|
+
|
112
|
+
# Builds the object from hash
|
113
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
114
|
+
# @return [Object] Returns the model itself
|
115
|
+
def build_from_hash(attributes)
|
116
|
+
return nil unless attributes.is_a?(Hash)
|
117
|
+
self.class.openapi_types.each_pair do |key, type|
|
118
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
119
|
+
self.send("#{key}=", nil)
|
120
|
+
elsif type =~ /\AArray<(.*)>/i
|
121
|
+
# check to ensure the input is an array given that the attribute
|
122
|
+
# is documented as an array but the input is not
|
123
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
124
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
125
|
+
end
|
126
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
127
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
128
|
+
end
|
129
|
+
end
|
130
|
+
|
131
|
+
self
|
132
|
+
end
|
133
|
+
|
134
|
+
# Deserializes the data based on type
|
135
|
+
# @param string type Data type
|
136
|
+
# @param string value Value to be deserialized
|
137
|
+
# @return [Object] Deserialized data
|
138
|
+
def _deserialize(type, value)
|
139
|
+
case type.to_sym
|
140
|
+
when :Time
|
141
|
+
Time.parse(value)
|
142
|
+
when :Date
|
143
|
+
Date.parse(value)
|
144
|
+
when :String
|
145
|
+
value.to_s
|
146
|
+
when :Integer
|
147
|
+
value.to_i
|
148
|
+
when :Float
|
149
|
+
value.to_f
|
150
|
+
when :Boolean
|
151
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
152
|
+
true
|
153
|
+
else
|
154
|
+
false
|
155
|
+
end
|
156
|
+
when :Object
|
157
|
+
# generic object (usually a Hash), return directly
|
158
|
+
value
|
159
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
160
|
+
inner_type = Regexp.last_match[:inner_type]
|
161
|
+
value.map { |v| _deserialize(inner_type, v) }
|
162
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
163
|
+
k_type = Regexp.last_match[:k_type]
|
164
|
+
v_type = Regexp.last_match[:v_type]
|
165
|
+
{}.tap do |hash|
|
166
|
+
value.each do |k, v|
|
167
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
168
|
+
end
|
169
|
+
end
|
170
|
+
else # model
|
171
|
+
# models (e.g. Pet) or oneOf
|
172
|
+
klass = Svix.const_get(type)
|
173
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
174
|
+
end
|
175
|
+
end
|
176
|
+
|
177
|
+
# Returns the string representation of the object
|
178
|
+
# @return [String] String presentation of the object
|
179
|
+
def to_s
|
180
|
+
to_hash.to_s
|
181
|
+
end
|
182
|
+
|
183
|
+
# to_body is an alias to to_hash (backward compatibility)
|
184
|
+
# @return [Hash] Returns the object in the form of hash
|
185
|
+
def to_body
|
186
|
+
to_hash
|
187
|
+
end
|
188
|
+
|
189
|
+
# Returns the object in the form of hash
|
190
|
+
# @return [Hash] Returns the object in the form of hash
|
191
|
+
def to_hash
|
192
|
+
hash = {}
|
193
|
+
self.class.attribute_map.each_pair do |attr, param|
|
194
|
+
value = self.send(attr)
|
195
|
+
if value.nil?
|
196
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
197
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
198
|
+
end
|
199
|
+
|
200
|
+
hash[param] = _to_hash(value)
|
201
|
+
end
|
202
|
+
hash
|
203
|
+
end
|
204
|
+
|
205
|
+
# Outputs non-array value in the form of hash
|
206
|
+
# For object, use to_hash. Otherwise, just return the value
|
207
|
+
# @param [Object] value Any valid value
|
208
|
+
# @return [Hash] Returns the value in the form of hash
|
209
|
+
def _to_hash(value)
|
210
|
+
if value.is_a?(Array)
|
211
|
+
value.compact.map { |v| _to_hash(v) }
|
212
|
+
elsif value.is_a?(Hash)
|
213
|
+
{}.tap do |hash|
|
214
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
215
|
+
end
|
216
|
+
elsif value.respond_to? :to_hash
|
217
|
+
value.to_hash
|
218
|
+
else
|
219
|
+
value
|
220
|
+
end
|
221
|
+
end
|
222
|
+
|
223
|
+
end
|
224
|
+
|
225
|
+
end
|
@@ -15,17 +15,17 @@ require 'time'
|
|
15
15
|
|
16
16
|
module Svix
|
17
17
|
class EndpointMtlsConfigIn
|
18
|
-
# A PEM encoded X509 certificate used to verify the webhook receiver's certificate.
|
19
|
-
attr_accessor :ca_cert
|
20
|
-
|
21
18
|
# A PEM encoded private key and X509 certificate to identify the webhook sender.
|
22
19
|
attr_accessor :identity
|
23
20
|
|
21
|
+
# A PEM encoded X509 certificate used to verify the webhook receiver's certificate.
|
22
|
+
attr_accessor :server_ca_cert
|
23
|
+
|
24
24
|
# Attribute mapping from ruby-style variable name to JSON key.
|
25
25
|
def self.attribute_map
|
26
26
|
{
|
27
|
-
:'
|
28
|
-
:'
|
27
|
+
:'identity' => :'identity',
|
28
|
+
:'server_ca_cert' => :'serverCaCert'
|
29
29
|
}
|
30
30
|
end
|
31
31
|
|
@@ -37,14 +37,15 @@ module Svix
|
|
37
37
|
# Attribute type mapping.
|
38
38
|
def self.openapi_types
|
39
39
|
{
|
40
|
-
:'
|
41
|
-
:'
|
40
|
+
:'identity' => :'String',
|
41
|
+
:'server_ca_cert' => :'String'
|
42
42
|
}
|
43
43
|
end
|
44
44
|
|
45
45
|
# List of attributes with nullable: true
|
46
46
|
def self.openapi_nullable
|
47
47
|
Set.new([
|
48
|
+
:'server_ca_cert'
|
48
49
|
])
|
49
50
|
end
|
50
51
|
|
@@ -63,23 +64,19 @@ module Svix
|
|
63
64
|
h[k.to_sym] = v
|
64
65
|
}
|
65
66
|
|
66
|
-
if attributes.key?(:'ca_cert')
|
67
|
-
self.ca_cert = attributes[:'ca_cert']
|
68
|
-
end
|
69
|
-
|
70
67
|
if attributes.key?(:'identity')
|
71
68
|
self.identity = attributes[:'identity']
|
72
69
|
end
|
70
|
+
|
71
|
+
if attributes.key?(:'server_ca_cert')
|
72
|
+
self.server_ca_cert = attributes[:'server_ca_cert']
|
73
|
+
end
|
73
74
|
end
|
74
75
|
|
75
76
|
# Show invalid properties with the reasons. Usually used together with valid?
|
76
77
|
# @return Array for valid properties with the reasons
|
77
78
|
def list_invalid_properties
|
78
79
|
invalid_properties = Array.new
|
79
|
-
if @ca_cert.nil?
|
80
|
-
invalid_properties.push('invalid value for "ca_cert", ca_cert cannot be nil.')
|
81
|
-
end
|
82
|
-
|
83
80
|
if @identity.nil?
|
84
81
|
invalid_properties.push('invalid value for "identity", identity cannot be nil.')
|
85
82
|
end
|
@@ -90,7 +87,6 @@ module Svix
|
|
90
87
|
# Check to see if the all the properties in the model are valid
|
91
88
|
# @return true if the model is valid
|
92
89
|
def valid?
|
93
|
-
return false if @ca_cert.nil?
|
94
90
|
return false if @identity.nil?
|
95
91
|
true
|
96
92
|
end
|
@@ -100,8 +96,8 @@ module Svix
|
|
100
96
|
def ==(o)
|
101
97
|
return true if self.equal?(o)
|
102
98
|
self.class == o.class &&
|
103
|
-
|
104
|
-
|
99
|
+
identity == o.identity &&
|
100
|
+
server_ca_cert == o.server_ca_cert
|
105
101
|
end
|
106
102
|
|
107
103
|
# @see the `==` method
|
@@ -113,7 +109,7 @@ module Svix
|
|
113
109
|
# Calculates hash code according to all attributes.
|
114
110
|
# @return [Integer] Hash code
|
115
111
|
def hash
|
116
|
-
[
|
112
|
+
[identity, server_ca_cert].hash
|
117
113
|
end
|
118
114
|
|
119
115
|
# Builds the object from hash
|
@@ -30,6 +30,9 @@ module Svix
|
|
30
30
|
|
31
31
|
attr_accessor :jwt_params
|
32
32
|
|
33
|
+
# For `refreshToken` grant type
|
34
|
+
attr_accessor :refresh_token
|
35
|
+
|
33
36
|
# Optional OAuth scopes added to the request body.
|
34
37
|
attr_accessor :scopes
|
35
38
|
|
@@ -45,6 +48,7 @@ module Svix
|
|
45
48
|
:'extra_params' => :'extraParams',
|
46
49
|
:'grant_type' => :'grantType',
|
47
50
|
:'jwt_params' => :'jwtParams',
|
51
|
+
:'refresh_token' => :'refreshToken',
|
48
52
|
:'scopes' => :'scopes',
|
49
53
|
:'token_url' => :'tokenUrl'
|
50
54
|
}
|
@@ -62,8 +66,9 @@ module Svix
|
|
62
66
|
:'client_id' => :'String',
|
63
67
|
:'client_secret' => :'String',
|
64
68
|
:'extra_params' => :'Hash<String, String>',
|
65
|
-
:'grant_type' => :'
|
69
|
+
:'grant_type' => :'Oauth2GrantTypeIn',
|
66
70
|
:'jwt_params' => :'ClientSecretJwtParamsIn',
|
71
|
+
:'refresh_token' => :'String',
|
67
72
|
:'scopes' => :'Array<String>',
|
68
73
|
:'token_url' => :'String'
|
69
74
|
}
|
@@ -74,6 +79,7 @@ module Svix
|
|
74
79
|
Set.new([
|
75
80
|
:'client_secret',
|
76
81
|
:'extra_params',
|
82
|
+
:'refresh_token',
|
77
83
|
:'scopes',
|
78
84
|
])
|
79
85
|
end
|
@@ -119,6 +125,10 @@ module Svix
|
|
119
125
|
self.jwt_params = attributes[:'jwt_params']
|
120
126
|
end
|
121
127
|
|
128
|
+
if attributes.key?(:'refresh_token')
|
129
|
+
self.refresh_token = attributes[:'refresh_token']
|
130
|
+
end
|
131
|
+
|
122
132
|
if attributes.key?(:'scopes')
|
123
133
|
if (value = attributes[:'scopes']).is_a?(Array)
|
124
134
|
self.scopes = value
|
@@ -174,6 +184,7 @@ module Svix
|
|
174
184
|
extra_params == o.extra_params &&
|
175
185
|
grant_type == o.grant_type &&
|
176
186
|
jwt_params == o.jwt_params &&
|
187
|
+
refresh_token == o.refresh_token &&
|
177
188
|
scopes == o.scopes &&
|
178
189
|
token_url == o.token_url
|
179
190
|
end
|
@@ -187,7 +198,7 @@ module Svix
|
|
187
198
|
# Calculates hash code according to all attributes.
|
188
199
|
# @return [Integer] Hash code
|
189
200
|
def hash
|
190
|
-
[auth_method, client_id, client_secret, extra_params, grant_type, jwt_params, scopes, token_url].hash
|
201
|
+
[auth_method, client_id, client_secret, extra_params, grant_type, jwt_params, refresh_token, scopes, token_url].hash
|
191
202
|
end
|
192
203
|
|
193
204
|
# Builds the object from hash
|