forestvpn_cloud_api 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +139 -0
  4. data/Rakefile +10 -0
  5. data/docs/Action.md +32 -0
  6. data/docs/Activity.md +36 -0
  7. data/docs/Address.md +28 -0
  8. data/docs/Billing.md +24 -0
  9. data/docs/Country.md +26 -0
  10. data/docs/CreateBillingRequest.md +22 -0
  11. data/docs/CreateOrUpdateDataUsageLimitRequest.md +20 -0
  12. data/docs/CreateOrUpdatePaymentProfileRequest.md +34 -0
  13. data/docs/CreateOrUpdateProfileRequest.md +22 -0
  14. data/docs/DataUsageLimit.md +24 -0
  15. data/docs/Error.md +20 -0
  16. data/docs/GeoApi.md +77 -0
  17. data/docs/LimitsApi.md +447 -0
  18. data/docs/Location.md +28 -0
  19. data/docs/PaymentMethod.md +24 -0
  20. data/docs/PaymentProfile.md +32 -0
  21. data/docs/Profile.md +26 -0
  22. data/docs/ProfileStats.md +26 -0
  23. data/docs/ProfilesApi.md +996 -0
  24. data/docs/Project.md +22 -0
  25. data/docs/ResourceRef.md +20 -0
  26. data/docs/User.md +32 -0
  27. data/forestvpn_cloud_api.gemspec +39 -0
  28. data/git_push.sh +57 -0
  29. data/lib/forestvpn_cloud_api/api/geo_api.rb +77 -0
  30. data/lib/forestvpn_cloud_api/api/limits_api.rb +405 -0
  31. data/lib/forestvpn_cloud_api/api/profiles_api.rb +915 -0
  32. data/lib/forestvpn_cloud_api/api_client.rb +426 -0
  33. data/lib/forestvpn_cloud_api/api_error.rb +57 -0
  34. data/lib/forestvpn_cloud_api/configuration.rb +335 -0
  35. data/lib/forestvpn_cloud_api/models/action.rb +348 -0
  36. data/lib/forestvpn_cloud_api/models/activity.rb +360 -0
  37. data/lib/forestvpn_cloud_api/models/address.rb +269 -0
  38. data/lib/forestvpn_cloud_api/models/billing.rb +266 -0
  39. data/lib/forestvpn_cloud_api/models/country.rb +282 -0
  40. data/lib/forestvpn_cloud_api/models/create_billing_request.rb +252 -0
  41. data/lib/forestvpn_cloud_api/models/create_or_update_data_usage_limit_request.rb +230 -0
  42. data/lib/forestvpn_cloud_api/models/create_or_update_payment_profile_request.rb +328 -0
  43. data/lib/forestvpn_cloud_api/models/create_or_update_profile_request.rb +275 -0
  44. data/lib/forestvpn_cloud_api/models/data_usage_limit.rb +302 -0
  45. data/lib/forestvpn_cloud_api/models/error.rb +238 -0
  46. data/lib/forestvpn_cloud_api/models/location.rb +296 -0
  47. data/lib/forestvpn_cloud_api/models/payment_method.rb +261 -0
  48. data/lib/forestvpn_cloud_api/models/payment_profile.rb +313 -0
  49. data/lib/forestvpn_cloud_api/models/profile.rb +320 -0
  50. data/lib/forestvpn_cloud_api/models/profile_stats.rb +280 -0
  51. data/lib/forestvpn_cloud_api/models/project.rb +254 -0
  52. data/lib/forestvpn_cloud_api/models/resource_ref.rb +238 -0
  53. data/lib/forestvpn_cloud_api/models/user.rb +307 -0
  54. data/lib/forestvpn_cloud_api/version.rb +15 -0
  55. data/lib/forestvpn_cloud_api.rb +61 -0
  56. data/spec/api/geo_api_spec.rb +45 -0
  57. data/spec/api/limits_api_spec.rb +102 -0
  58. data/spec/api/profiles_api_spec.rb +195 -0
  59. data/spec/api_client_spec.rb +188 -0
  60. data/spec/configuration_spec.rb +42 -0
  61. data/spec/models/action_spec.rb +80 -0
  62. data/spec/models/activity_spec.rb +92 -0
  63. data/spec/models/address_spec.rb +64 -0
  64. data/spec/models/billing_spec.rb +52 -0
  65. data/spec/models/country_spec.rb +58 -0
  66. data/spec/models/create_billing_request_spec.rb +46 -0
  67. data/spec/models/create_or_update_data_usage_limit_request_spec.rb +40 -0
  68. data/spec/models/create_or_update_payment_profile_request_spec.rb +82 -0
  69. data/spec/models/create_or_update_profile_request_spec.rb +50 -0
  70. data/spec/models/data_usage_limit_spec.rb +56 -0
  71. data/spec/models/error_spec.rb +40 -0
  72. data/spec/models/location_spec.rb +64 -0
  73. data/spec/models/payment_method_spec.rb +52 -0
  74. data/spec/models/payment_profile_spec.rb +76 -0
  75. data/spec/models/profile_spec.rb +62 -0
  76. data/spec/models/profile_stats_spec.rb +58 -0
  77. data/spec/models/project_spec.rb +46 -0
  78. data/spec/models/resource_ref_spec.rb +40 -0
  79. data/spec/models/user_spec.rb +76 -0
  80. data/spec/spec_helper.rb +111 -0
  81. metadata +203 -0
@@ -0,0 +1,296 @@
1
+ =begin
2
+ #ForestVPN Cloud API
3
+
4
+ #ForestVPN Cloud - it's a Google Cloud but for VPN apps. Ready to use VPN Cloud Platform minimizes efforts to build fast, secure, and modern VPN apps.
5
+
6
+ The version of the OpenAPI document: 2.0
7
+ Contact: support@forestvpn.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.0.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module ForestVPNCloudAPI
17
+ class Location
18
+ attr_accessor :id
19
+
20
+ attr_accessor :name
21
+
22
+ attr_accessor :latitude
23
+
24
+ attr_accessor :longitude
25
+
26
+ attr_accessor :country
27
+
28
+ attr_accessor :alternative_names
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'id' => :'id',
34
+ :'name' => :'name',
35
+ :'latitude' => :'latitude',
36
+ :'longitude' => :'longitude',
37
+ :'country' => :'country',
38
+ :'alternative_names' => :'alternative_names'
39
+ }
40
+ end
41
+
42
+ # Returns all the JSON keys this model knows about
43
+ def self.acceptable_attributes
44
+ attribute_map.values
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ def self.openapi_types
49
+ {
50
+ :'id' => :'String',
51
+ :'name' => :'String',
52
+ :'latitude' => :'Float',
53
+ :'longitude' => :'Float',
54
+ :'country' => :'Country',
55
+ :'alternative_names' => :'Array<String>'
56
+ }
57
+ end
58
+
59
+ # List of attributes with nullable: true
60
+ def self.openapi_nullable
61
+ Set.new([
62
+ ])
63
+ end
64
+
65
+ # Initializes the object
66
+ # @param [Hash] attributes Model attributes in the form of hash
67
+ def initialize(attributes = {})
68
+ if (!attributes.is_a?(Hash))
69
+ fail ArgumentError, "The input argument (attributes) must be a hash in `ForestVPNCloudAPI::Location` initialize method"
70
+ end
71
+
72
+ # check to see if the attribute exists and convert string to symbol for hash key
73
+ attributes = attributes.each_with_object({}) { |(k, v), h|
74
+ if (!self.class.attribute_map.key?(k.to_sym))
75
+ fail ArgumentError, "`#{k}` is not a valid attribute in `ForestVPNCloudAPI::Location`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
76
+ end
77
+ h[k.to_sym] = v
78
+ }
79
+
80
+ if attributes.key?(:'id')
81
+ self.id = attributes[:'id']
82
+ end
83
+
84
+ if attributes.key?(:'name')
85
+ self.name = attributes[:'name']
86
+ end
87
+
88
+ if attributes.key?(:'latitude')
89
+ self.latitude = attributes[:'latitude']
90
+ end
91
+
92
+ if attributes.key?(:'longitude')
93
+ self.longitude = attributes[:'longitude']
94
+ end
95
+
96
+ if attributes.key?(:'country')
97
+ self.country = attributes[:'country']
98
+ end
99
+
100
+ if attributes.key?(:'alternative_names')
101
+ if (value = attributes[:'alternative_names']).is_a?(Array)
102
+ self.alternative_names = value
103
+ end
104
+ end
105
+ end
106
+
107
+ # Show invalid properties with the reasons. Usually used together with valid?
108
+ # @return Array for valid properties with the reasons
109
+ def list_invalid_properties
110
+ invalid_properties = Array.new
111
+ if @id.nil?
112
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
113
+ end
114
+
115
+ if @name.nil?
116
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
117
+ end
118
+
119
+ if @latitude.nil?
120
+ invalid_properties.push('invalid value for "latitude", latitude cannot be nil.')
121
+ end
122
+
123
+ if @longitude.nil?
124
+ invalid_properties.push('invalid value for "longitude", longitude cannot be nil.')
125
+ end
126
+
127
+ if @country.nil?
128
+ invalid_properties.push('invalid value for "country", country cannot be nil.')
129
+ end
130
+
131
+ if @alternative_names.nil?
132
+ invalid_properties.push('invalid value for "alternative_names", alternative_names cannot be nil.')
133
+ end
134
+
135
+ invalid_properties
136
+ end
137
+
138
+ # Check to see if the all the properties in the model are valid
139
+ # @return true if the model is valid
140
+ def valid?
141
+ return false if @id.nil?
142
+ return false if @name.nil?
143
+ return false if @latitude.nil?
144
+ return false if @longitude.nil?
145
+ return false if @country.nil?
146
+ return false if @alternative_names.nil?
147
+ true
148
+ end
149
+
150
+ # Checks equality by comparing each attribute.
151
+ # @param [Object] Object to be compared
152
+ def ==(o)
153
+ return true if self.equal?(o)
154
+ self.class == o.class &&
155
+ id == o.id &&
156
+ name == o.name &&
157
+ latitude == o.latitude &&
158
+ longitude == o.longitude &&
159
+ country == o.country &&
160
+ alternative_names == o.alternative_names
161
+ end
162
+
163
+ # @see the `==` method
164
+ # @param [Object] Object to be compared
165
+ def eql?(o)
166
+ self == o
167
+ end
168
+
169
+ # Calculates hash code according to all attributes.
170
+ # @return [Integer] Hash code
171
+ def hash
172
+ [id, name, latitude, longitude, country, alternative_names].hash
173
+ end
174
+
175
+ # Builds the object from hash
176
+ # @param [Hash] attributes Model attributes in the form of hash
177
+ # @return [Object] Returns the model itself
178
+ def self.build_from_hash(attributes)
179
+ new.build_from_hash(attributes)
180
+ end
181
+
182
+ # Builds the object from hash
183
+ # @param [Hash] attributes Model attributes in the form of hash
184
+ # @return [Object] Returns the model itself
185
+ def build_from_hash(attributes)
186
+ return nil unless attributes.is_a?(Hash)
187
+ attributes = attributes.transform_keys(&:to_sym)
188
+ self.class.openapi_types.each_pair do |key, type|
189
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
190
+ self.send("#{key}=", nil)
191
+ elsif type =~ /\AArray<(.*)>/i
192
+ # check to ensure the input is an array given that the attribute
193
+ # is documented as an array but the input is not
194
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
195
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
196
+ end
197
+ elsif !attributes[self.class.attribute_map[key]].nil?
198
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
199
+ end
200
+ end
201
+
202
+ self
203
+ end
204
+
205
+ # Deserializes the data based on type
206
+ # @param string type Data type
207
+ # @param string value Value to be deserialized
208
+ # @return [Object] Deserialized data
209
+ def _deserialize(type, value)
210
+ case type.to_sym
211
+ when :Time
212
+ Time.parse(value)
213
+ when :Date
214
+ Date.parse(value)
215
+ when :String
216
+ value.to_s
217
+ when :Integer
218
+ value.to_i
219
+ when :Float
220
+ value.to_f
221
+ when :Boolean
222
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
223
+ true
224
+ else
225
+ false
226
+ end
227
+ when :Object
228
+ # generic object (usually a Hash), return directly
229
+ value
230
+ when /\AArray<(?<inner_type>.+)>\z/
231
+ inner_type = Regexp.last_match[:inner_type]
232
+ value.map { |v| _deserialize(inner_type, v) }
233
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
234
+ k_type = Regexp.last_match[:k_type]
235
+ v_type = Regexp.last_match[:v_type]
236
+ {}.tap do |hash|
237
+ value.each do |k, v|
238
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
239
+ end
240
+ end
241
+ else # model
242
+ # models (e.g. Pet) or oneOf
243
+ klass = ForestVPNCloudAPI.const_get(type)
244
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
245
+ end
246
+ end
247
+
248
+ # Returns the string representation of the object
249
+ # @return [String] String presentation of the object
250
+ def to_s
251
+ to_hash.to_s
252
+ end
253
+
254
+ # to_body is an alias to to_hash (backward compatibility)
255
+ # @return [Hash] Returns the object in the form of hash
256
+ def to_body
257
+ to_hash
258
+ end
259
+
260
+ # Returns the object in the form of hash
261
+ # @return [Hash] Returns the object in the form of hash
262
+ def to_hash
263
+ hash = {}
264
+ self.class.attribute_map.each_pair do |attr, param|
265
+ value = self.send(attr)
266
+ if value.nil?
267
+ is_nullable = self.class.openapi_nullable.include?(attr)
268
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
269
+ end
270
+
271
+ hash[param] = _to_hash(value)
272
+ end
273
+ hash
274
+ end
275
+
276
+ # Outputs non-array value in the form of hash
277
+ # For object, use to_hash. Otherwise, just return the value
278
+ # @param [Object] value Any valid value
279
+ # @return [Hash] Returns the value in the form of hash
280
+ def _to_hash(value)
281
+ if value.is_a?(Array)
282
+ value.compact.map { |v| _to_hash(v) }
283
+ elsif value.is_a?(Hash)
284
+ {}.tap do |hash|
285
+ value.each { |k, v| hash[k] = _to_hash(v) }
286
+ end
287
+ elsif value.respond_to? :to_hash
288
+ value.to_hash
289
+ else
290
+ value
291
+ end
292
+ end
293
+
294
+ end
295
+
296
+ end
@@ -0,0 +1,261 @@
1
+ =begin
2
+ #ForestVPN Cloud API
3
+
4
+ #ForestVPN Cloud - it's a Google Cloud but for VPN apps. Ready to use VPN Cloud Platform minimizes efforts to build fast, secure, and modern VPN apps.
5
+
6
+ The version of the OpenAPI document: 2.0
7
+ Contact: support@forestvpn.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.0.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module ForestVPNCloudAPI
17
+ class PaymentMethod
18
+ attr_accessor :id
19
+
20
+ attr_accessor :name
21
+
22
+ attr_accessor :image_url
23
+
24
+ attr_accessor :expires_at
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'id' => :'id',
30
+ :'name' => :'name',
31
+ :'image_url' => :'image_url',
32
+ :'expires_at' => :'expires_at'
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
+ :'id' => :'String',
45
+ :'name' => :'String',
46
+ :'image_url' => :'String',
47
+ :'expires_at' => :'Date'
48
+ }
49
+ end
50
+
51
+ # List of attributes with nullable: true
52
+ def self.openapi_nullable
53
+ Set.new([
54
+ ])
55
+ end
56
+
57
+ # Initializes the object
58
+ # @param [Hash] attributes Model attributes in the form of hash
59
+ def initialize(attributes = {})
60
+ if (!attributes.is_a?(Hash))
61
+ fail ArgumentError, "The input argument (attributes) must be a hash in `ForestVPNCloudAPI::PaymentMethod` initialize method"
62
+ end
63
+
64
+ # check to see if the attribute exists and convert string to symbol for hash key
65
+ attributes = attributes.each_with_object({}) { |(k, v), h|
66
+ if (!self.class.attribute_map.key?(k.to_sym))
67
+ fail ArgumentError, "`#{k}` is not a valid attribute in `ForestVPNCloudAPI::PaymentMethod`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
68
+ end
69
+ h[k.to_sym] = v
70
+ }
71
+
72
+ if attributes.key?(:'id')
73
+ self.id = attributes[:'id']
74
+ end
75
+
76
+ if attributes.key?(:'name')
77
+ self.name = attributes[:'name']
78
+ end
79
+
80
+ if attributes.key?(:'image_url')
81
+ self.image_url = attributes[:'image_url']
82
+ end
83
+
84
+ if attributes.key?(:'expires_at')
85
+ self.expires_at = attributes[:'expires_at']
86
+ end
87
+ end
88
+
89
+ # Show invalid properties with the reasons. Usually used together with valid?
90
+ # @return Array for valid properties with the reasons
91
+ def list_invalid_properties
92
+ invalid_properties = Array.new
93
+ if @id.nil?
94
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
95
+ end
96
+
97
+ if @name.nil?
98
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
99
+ end
100
+
101
+ if @image_url.nil?
102
+ invalid_properties.push('invalid value for "image_url", image_url cannot be nil.')
103
+ end
104
+
105
+ invalid_properties
106
+ end
107
+
108
+ # Check to see if the all the properties in the model are valid
109
+ # @return true if the model is valid
110
+ def valid?
111
+ return false if @id.nil?
112
+ return false if @name.nil?
113
+ return false if @image_url.nil?
114
+ true
115
+ end
116
+
117
+ # Checks equality by comparing each attribute.
118
+ # @param [Object] Object to be compared
119
+ def ==(o)
120
+ return true if self.equal?(o)
121
+ self.class == o.class &&
122
+ id == o.id &&
123
+ name == o.name &&
124
+ image_url == o.image_url &&
125
+ expires_at == o.expires_at
126
+ end
127
+
128
+ # @see the `==` method
129
+ # @param [Object] Object to be compared
130
+ def eql?(o)
131
+ self == o
132
+ end
133
+
134
+ # Calculates hash code according to all attributes.
135
+ # @return [Integer] Hash code
136
+ def hash
137
+ [id, name, image_url, expires_at].hash
138
+ end
139
+
140
+ # Builds the object from hash
141
+ # @param [Hash] attributes Model attributes in the form of hash
142
+ # @return [Object] Returns the model itself
143
+ def self.build_from_hash(attributes)
144
+ new.build_from_hash(attributes)
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 build_from_hash(attributes)
151
+ return nil unless attributes.is_a?(Hash)
152
+ attributes = attributes.transform_keys(&:to_sym)
153
+ self.class.openapi_types.each_pair do |key, type|
154
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
155
+ self.send("#{key}=", nil)
156
+ elsif type =~ /\AArray<(.*)>/i
157
+ # check to ensure the input is an array given that the attribute
158
+ # is documented as an array but the input is not
159
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
160
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
161
+ end
162
+ elsif !attributes[self.class.attribute_map[key]].nil?
163
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
164
+ end
165
+ end
166
+
167
+ self
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 _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 = ForestVPNCloudAPI.const_get(type)
209
+ 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