svix 1.24.0 → 1.25.0

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