fastly 15.0.0 → 15.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +22 -0
  3. data/Gemfile.lock +1 -1
  4. data/README.md +10 -3
  5. data/docs/DdosProtectionEvent.md +2 -0
  6. data/docs/DdosProtectionEventAllOf.md +2 -0
  7. data/docs/DdosProtectionRequestEnableMode.md +10 -0
  8. data/docs/DomainInspectorHistoricalApi.md +1 -1
  9. data/docs/DomainResearchApi.md +103 -0
  10. data/docs/DomainResearchResponseBodyEnable.md +12 -0
  11. data/docs/DomainResearchResponseCustomer.md +10 -0
  12. data/docs/DomainResearchResponseLinks.md +10 -0
  13. data/docs/DomainResearchResponseLinksLinks.md +10 -0
  14. data/docs/DomainResearchResponseProduct.md +10 -0
  15. data/docs/DomainResearchResponseProductProduct.md +11 -0
  16. data/docs/IamV1RoleResponse.md +1 -0
  17. data/docs/InlineResponse20010.md +2 -1
  18. data/docs/InlineResponse20011.md +10 -0
  19. data/docs/InlineResponse2006.md +1 -2
  20. data/docs/InlineResponse2007.md +1 -1
  21. data/docs/InlineResponse2008.md +1 -1
  22. data/docs/InlineResponse2009.md +1 -1
  23. data/docs/KvStoreApi.md +43 -4
  24. data/docs/KvStoreDetails.md +2 -0
  25. data/docs/KvStoreItemApi.md +2 -2
  26. data/docs/{KvStoreRequestCreate.md → KvStoreRequestCreateOrUpdate.md} +1 -1
  27. data/docs/MetricsPlatformApi.md +75 -0
  28. data/docs/NgwafRequestEnable.md +1 -0
  29. data/docs/Offer.md +12 -0
  30. data/docs/OfferAllOf.md +12 -0
  31. data/docs/OriginInspectorHistoricalApi.md +1 -1
  32. data/docs/PlatformMetadata.md +14 -0
  33. data/docs/PlatformMetricsResponse.md +11 -0
  34. data/docs/PlatformValues.md +25 -0
  35. data/docs/ProductDdosProtectionApi.md +3 -1
  36. data/docs/ProductDomainResearchApi.md +115 -0
  37. data/docs/RealtimeEntryAggregated.md +4 -0
  38. data/docs/RealtimeMeasurements.md +4 -0
  39. data/docs/Results.md +4 -0
  40. data/docs/SecretStoreApi.md +2 -2
  41. data/docs/SecretStoreItemApi.md +2 -2
  42. data/docs/ServiceAuthorizationsApi.md +2 -2
  43. data/docs/Status.md +15 -0
  44. data/docs/StatusAllOf.md +15 -0
  45. data/docs/Suggestion.md +13 -0
  46. data/docs/SuggestionAllOf.md +13 -0
  47. data/lib/fastly/api/domain_inspector_historical_api.rb +1 -1
  48. data/lib/fastly/api/domain_research_api.rb +163 -0
  49. data/lib/fastly/api/kv_store_api.rb +74 -6
  50. data/lib/fastly/api/kv_store_item_api.rb +3 -3
  51. data/lib/fastly/api/metrics_platform_api.rb +134 -0
  52. data/lib/fastly/api/origin_inspector_historical_api.rb +1 -1
  53. data/lib/fastly/api/product_ddos_protection_api.rb +10 -3
  54. data/lib/fastly/api/product_domain_research_api.rb +186 -0
  55. data/lib/fastly/api/secret_store_api.rb +3 -3
  56. data/lib/fastly/api/secret_store_item_api.rb +3 -3
  57. data/lib/fastly/api/service_authorizations_api.rb +3 -3
  58. data/lib/fastly/configuration.rb +42 -0
  59. data/lib/fastly/models/ddos_protection_event.rb +21 -1
  60. data/lib/fastly/models/ddos_protection_event_all_of.rb +21 -1
  61. data/lib/fastly/models/ddos_protection_request_enable_mode.rb +251 -0
  62. data/lib/fastly/models/domain_research_response_body_enable.rb +243 -0
  63. data/lib/fastly/models/domain_research_response_customer.rb +216 -0
  64. data/lib/fastly/models/domain_research_response_links.rb +216 -0
  65. data/lib/fastly/models/domain_research_response_links_links.rb +217 -0
  66. data/lib/fastly/models/domain_research_response_product.rb +216 -0
  67. data/lib/fastly/models/domain_research_response_product_product.rb +227 -0
  68. data/lib/fastly/models/iam_v1_role_response.rb +10 -1
  69. data/lib/fastly/models/inline_response20010.rb +13 -4
  70. data/lib/fastly/models/inline_response20011.rb +218 -0
  71. data/lib/fastly/models/inline_response2006.rb +8 -17
  72. data/lib/fastly/models/inline_response2007.rb +1 -1
  73. data/lib/fastly/models/inline_response2008.rb +1 -1
  74. data/lib/fastly/models/inline_response2009.rb +1 -1
  75. data/lib/fastly/models/kv_store_details.rb +24 -4
  76. data/lib/fastly/models/{kv_store_request_create.rb → kv_store_request_create_or_update.rb} +3 -3
  77. data/lib/fastly/models/ngwaf_request_enable.rb +14 -4
  78. data/lib/fastly/models/offer.rb +245 -0
  79. data/lib/fastly/models/offer_all_of.rb +237 -0
  80. data/lib/fastly/models/platform_metadata.rb +258 -0
  81. data/lib/fastly/models/platform_metrics_response.rb +228 -0
  82. data/lib/fastly/models/platform_values.rb +368 -0
  83. data/lib/fastly/models/realtime_entry_aggregated.rb +44 -4
  84. data/lib/fastly/models/realtime_measurements.rb +44 -4
  85. data/lib/fastly/models/results.rb +41 -1
  86. data/lib/fastly/models/status.rb +276 -0
  87. data/lib/fastly/models/status_all_of.rb +268 -0
  88. data/lib/fastly/models/suggestion.rb +255 -0
  89. data/lib/fastly/models/suggestion_all_of.rb +247 -0
  90. data/lib/fastly/version.rb +1 -1
  91. data/lib/fastly.rb +21 -1
  92. data/sig.json +1 -1
  93. metadata +44 -4
@@ -0,0 +1,268 @@
1
+ =begin
2
+ #Fastly API
3
+
4
+ #Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://www.fastly.com/documentation/reference/api/)
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: oss@fastly.com
8
+
9
+ =end
10
+
11
+ require 'date'
12
+ require 'time'
13
+
14
+ module Fastly
15
+ class StatusAllOf
16
+ # The scope provided in the status request.
17
+ attr_accessor :scope
18
+
19
+ # The domain provided in the status request.
20
+ attr_accessor :domain
21
+
22
+ # The zone of the domain provided of the status request.
23
+ attr_accessor :zone
24
+
25
+ # A space-delimited string of the varying statuses associated with the domain provided.
26
+ attr_accessor :status
27
+
28
+ # A space-delimited string of the varying tags associated with the domain provided.
29
+ attr_accessor :tags
30
+
31
+ attr_accessor :offers
32
+
33
+ # Attribute mapping from ruby-style variable name to JSON key.
34
+ def self.attribute_map
35
+ {
36
+ :'scope' => :'scope',
37
+ :'domain' => :'domain',
38
+ :'zone' => :'zone',
39
+ :'status' => :'status',
40
+ :'tags' => :'tags',
41
+ :'offers' => :'offers'
42
+ }
43
+ end
44
+
45
+ # Returns all the JSON keys this model knows about
46
+ def self.acceptable_attributes
47
+ attribute_map.values
48
+ end
49
+
50
+ # Attribute type mapping.
51
+ def self.fastly_types
52
+ {
53
+ :'scope' => :'String',
54
+ :'domain' => :'String',
55
+ :'zone' => :'String',
56
+ :'status' => :'String',
57
+ :'tags' => :'String',
58
+ :'offers' => :'Array<Offer>'
59
+ }
60
+ end
61
+
62
+ # List of attributes with nullable: true
63
+ def self.fastly_nullable
64
+ Set.new([
65
+ ])
66
+ end
67
+
68
+ # Initializes the object
69
+ # @param [Hash] attributes Model attributes in the form of hash
70
+ def initialize(attributes = {})
71
+ if (!attributes.is_a?(Hash))
72
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::StatusAllOf` initialize method"
73
+ end
74
+
75
+ # check to see if the attribute exists and convert string to symbol for hash key
76
+ attributes = attributes.each_with_object({}) { |(k, v), h|
77
+ if (!self.class.attribute_map.key?(k.to_sym))
78
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::StatusAllOf`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
79
+ end
80
+ h[k.to_sym] = v
81
+ }
82
+
83
+ if attributes.key?(:'scope')
84
+ self.scope = attributes[:'scope']
85
+ end
86
+
87
+ if attributes.key?(:'domain')
88
+ self.domain = attributes[:'domain']
89
+ end
90
+
91
+ if attributes.key?(:'zone')
92
+ self.zone = attributes[:'zone']
93
+ end
94
+
95
+ if attributes.key?(:'status')
96
+ self.status = attributes[:'status']
97
+ end
98
+
99
+ if attributes.key?(:'tags')
100
+ self.tags = attributes[:'tags']
101
+ end
102
+
103
+ if attributes.key?(:'offers')
104
+ if (value = attributes[:'offers']).is_a?(Array)
105
+ self.offers = value
106
+ end
107
+ end
108
+ end
109
+
110
+ # Show invalid properties with the reasons. Usually used together with valid?
111
+ # @return Array for valid properties with the reasons
112
+ def list_invalid_properties
113
+ invalid_properties = Array.new
114
+ invalid_properties
115
+ end
116
+
117
+ # Check to see if the all the properties in the model are valid
118
+ # @return true if the model is valid
119
+ def valid?
120
+ true
121
+ end
122
+
123
+ # Checks equality by comparing each attribute.
124
+ # @param [Object] Object to be compared
125
+ def ==(o)
126
+ return true if self.equal?(o)
127
+ self.class == o.class &&
128
+ scope == o.scope &&
129
+ domain == o.domain &&
130
+ zone == o.zone &&
131
+ status == o.status &&
132
+ tags == o.tags &&
133
+ offers == o.offers
134
+ end
135
+
136
+ # @see the `==` method
137
+ # @param [Object] Object to be compared
138
+ def eql?(o)
139
+ self == o
140
+ end
141
+
142
+ # Calculates hash code according to all attributes.
143
+ # @return [Integer] Hash code
144
+ def hash
145
+ [scope, domain, zone, status, tags, offers].hash
146
+ end
147
+
148
+ # Builds the object from hash
149
+ # @param [Hash] attributes Model attributes in the form of hash
150
+ # @return [Object] Returns the model itself
151
+ def self.build_from_hash(attributes)
152
+ new.build_from_hash(attributes)
153
+ end
154
+
155
+ # Builds the object from hash
156
+ # @param [Hash] attributes Model attributes in the form of hash
157
+ # @return [Object] Returns the model itself
158
+ def build_from_hash(attributes)
159
+ return nil unless attributes.is_a?(Hash)
160
+ self.class.fastly_types.each_pair do |key, type|
161
+ if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key)
162
+ self.send("#{key}=", nil)
163
+ elsif type =~ /\AArray<(.*)>/i
164
+ # check to ensure the input is an array given that the attribute
165
+ # is documented as an array but the input is not
166
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
167
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
168
+ end
169
+ elsif !attributes[self.class.attribute_map[key]].nil?
170
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
171
+ end
172
+ end
173
+
174
+ self
175
+ end
176
+
177
+ # Deserializes the data based on type
178
+ # @param string type Data type
179
+ # @param string value Value to be deserialized
180
+ # @return [Object] Deserialized data
181
+ def _deserialize(type, value)
182
+ case type.to_sym
183
+ when :Time
184
+ Time.parse(value)
185
+ when :Date
186
+ Date.parse(value)
187
+ when :String
188
+ value.to_s
189
+ when :Integer
190
+ value.to_i
191
+ when :Float
192
+ value.to_f
193
+ when :Boolean
194
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
195
+ true
196
+ else
197
+ false
198
+ end
199
+ when :Object
200
+ # generic object (usually a Hash), return directly
201
+ value
202
+ when /\AArray<(?<inner_type>.+)>\z/
203
+ inner_type = Regexp.last_match[:inner_type]
204
+ value.map { |v| _deserialize(inner_type, v) }
205
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
206
+ k_type = Regexp.last_match[:k_type]
207
+ v_type = Regexp.last_match[:v_type]
208
+ {}.tap do |hash|
209
+ value.each do |k, v|
210
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
211
+ end
212
+ end
213
+ else # model
214
+ # models (e.g. Pet) or oneOf
215
+ klass = Fastly.const_get(type)
216
+ klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value)
217
+ end
218
+ end
219
+
220
+ # Returns the string representation of the object
221
+ # @return [String] String presentation of the object
222
+ def to_s
223
+ to_hash.to_s
224
+ end
225
+
226
+ # to_body is an alias to to_hash (backward compatibility)
227
+ # @return [Hash] Returns the object in the form of hash
228
+ def to_body
229
+ to_hash
230
+ end
231
+
232
+ # Returns the object in the form of hash
233
+ # @return [Hash] Returns the object in the form of hash
234
+ def to_hash
235
+ hash = {}
236
+ self.class.attribute_map.each_pair do |attr, param|
237
+ value = self.send(attr)
238
+ if value.nil?
239
+ is_nullable = self.class.fastly_nullable.include?(attr)
240
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
241
+ end
242
+
243
+ hash[param] = _to_hash(value)
244
+ end
245
+ hash
246
+ end
247
+
248
+ # Outputs non-array value in the form of hash
249
+ # For object, use to_hash. Otherwise, just return the value
250
+ # @param [Object] value Any valid value
251
+ # @return [Hash] Returns the value in the form of hash
252
+ def _to_hash(value)
253
+ if value.is_a?(Array)
254
+ value.compact.map { |v| _to_hash(v) }
255
+ elsif value.is_a?(Hash)
256
+ {}.tap do |hash|
257
+ value.each { |k, v| hash[k] = _to_hash(v) }
258
+ end
259
+ elsif value.respond_to? :to_hash
260
+ value.to_hash
261
+ else
262
+ value
263
+ end
264
+ end
265
+
266
+ end
267
+
268
+ end
@@ -0,0 +1,255 @@
1
+ =begin
2
+ #Fastly API
3
+
4
+ #Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://www.fastly.com/documentation/reference/api/)
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: oss@fastly.com
8
+
9
+ =end
10
+
11
+ require 'date'
12
+ require 'time'
13
+
14
+ module Fastly
15
+ # All attributes for a suggested domain.
16
+ class Suggestion
17
+ # The suggested domain, consisting of a subdomain and zone.
18
+ attr_accessor :domain
19
+
20
+ # The subdomain of the suggested domain.
21
+ attr_accessor :subdomain
22
+
23
+ # The zone of the suggested domain.
24
+ attr_accessor :zone
25
+
26
+ # If present, the path is to be appended to the domain to complete the suggestion.
27
+ attr_accessor :path
28
+
29
+ # Attribute mapping from ruby-style variable name to JSON key.
30
+ def self.attribute_map
31
+ {
32
+ :'domain' => :'domain',
33
+ :'subdomain' => :'subdomain',
34
+ :'zone' => :'zone',
35
+ :'path' => :'path'
36
+ }
37
+ end
38
+
39
+ # Returns all the JSON keys this model knows about
40
+ def self.acceptable_attributes
41
+ attribute_map.values
42
+ end
43
+
44
+ # Attribute type mapping.
45
+ def self.fastly_types
46
+ {
47
+ :'domain' => :'String',
48
+ :'subdomain' => :'String',
49
+ :'zone' => :'String',
50
+ :'path' => :'String'
51
+ }
52
+ end
53
+
54
+ # List of attributes with nullable: true
55
+ def self.fastly_nullable
56
+ Set.new([
57
+ ])
58
+ end
59
+
60
+ # List of class defined in allOf (OpenAPI v3)
61
+ def self.fastly_all_of
62
+ [
63
+ :'SuggestionAllOf'
64
+ ]
65
+ end
66
+
67
+ # Initializes the object
68
+ # @param [Hash] attributes Model attributes in the form of hash
69
+ def initialize(attributes = {})
70
+ if (!attributes.is_a?(Hash))
71
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::Suggestion` initialize method"
72
+ end
73
+
74
+ # check to see if the attribute exists and convert string to symbol for hash key
75
+ attributes = attributes.each_with_object({}) { |(k, v), h|
76
+ if (!self.class.attribute_map.key?(k.to_sym))
77
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::Suggestion`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
78
+ end
79
+ h[k.to_sym] = v
80
+ }
81
+
82
+ if attributes.key?(:'domain')
83
+ self.domain = attributes[:'domain']
84
+ end
85
+
86
+ if attributes.key?(:'subdomain')
87
+ self.subdomain = attributes[:'subdomain']
88
+ end
89
+
90
+ if attributes.key?(:'zone')
91
+ self.zone = attributes[:'zone']
92
+ end
93
+
94
+ if attributes.key?(:'path')
95
+ self.path = attributes[:'path']
96
+ end
97
+ end
98
+
99
+ # Show invalid properties with the reasons. Usually used together with valid?
100
+ # @return Array for valid properties with the reasons
101
+ def list_invalid_properties
102
+ invalid_properties = Array.new
103
+ invalid_properties
104
+ end
105
+
106
+ # Check to see if the all the properties in the model are valid
107
+ # @return true if the model is valid
108
+ def valid?
109
+ true
110
+ end
111
+
112
+ # Checks equality by comparing each attribute.
113
+ # @param [Object] Object to be compared
114
+ def ==(o)
115
+ return true if self.equal?(o)
116
+ self.class == o.class &&
117
+ domain == o.domain &&
118
+ subdomain == o.subdomain &&
119
+ zone == o.zone &&
120
+ path == o.path
121
+ end
122
+
123
+ # @see the `==` method
124
+ # @param [Object] Object to be compared
125
+ def eql?(o)
126
+ self == o
127
+ end
128
+
129
+ # Calculates hash code according to all attributes.
130
+ # @return [Integer] Hash code
131
+ def hash
132
+ [domain, subdomain, zone, path].hash
133
+ end
134
+
135
+ # Builds the object from hash
136
+ # @param [Hash] attributes Model attributes in the form of hash
137
+ # @return [Object] Returns the model itself
138
+ def self.build_from_hash(attributes)
139
+ new.build_from_hash(attributes)
140
+ end
141
+
142
+ # Builds the object from hash
143
+ # @param [Hash] attributes Model attributes in the form of hash
144
+ # @return [Object] Returns the model itself
145
+ def build_from_hash(attributes)
146
+ return nil unless attributes.is_a?(Hash)
147
+ self.class.fastly_types.each_pair do |key, type|
148
+ if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key)
149
+ self.send("#{key}=", nil)
150
+ elsif type =~ /\AArray<(.*)>/i
151
+ # check to ensure the input is an array given that the attribute
152
+ # is documented as an array but the input is not
153
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
154
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
155
+ end
156
+ elsif !attributes[self.class.attribute_map[key]].nil?
157
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
158
+ end
159
+ end
160
+
161
+ self
162
+ end
163
+
164
+ # Deserializes the data based on type
165
+ # @param string type Data type
166
+ # @param string value Value to be deserialized
167
+ # @return [Object] Deserialized data
168
+ def _deserialize(type, value)
169
+ case type.to_sym
170
+ when :Time
171
+ Time.parse(value)
172
+ when :Date
173
+ Date.parse(value)
174
+ when :String
175
+ value.to_s
176
+ when :Integer
177
+ value.to_i
178
+ when :Float
179
+ value.to_f
180
+ when :Boolean
181
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
182
+ true
183
+ else
184
+ false
185
+ end
186
+ when :Object
187
+ # generic object (usually a Hash), return directly
188
+ value
189
+ when /\AArray<(?<inner_type>.+)>\z/
190
+ inner_type = Regexp.last_match[:inner_type]
191
+ value.map { |v| _deserialize(inner_type, v) }
192
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
193
+ k_type = Regexp.last_match[:k_type]
194
+ v_type = Regexp.last_match[:v_type]
195
+ {}.tap do |hash|
196
+ value.each do |k, v|
197
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
198
+ end
199
+ end
200
+ else # model
201
+ # models (e.g. Pet) or oneOf
202
+ klass = Fastly.const_get(type)
203
+ klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value)
204
+ end
205
+ end
206
+
207
+ # Returns the string representation of the object
208
+ # @return [String] String presentation of the object
209
+ def to_s
210
+ to_hash.to_s
211
+ end
212
+
213
+ # to_body is an alias to to_hash (backward compatibility)
214
+ # @return [Hash] Returns the object in the form of hash
215
+ def to_body
216
+ to_hash
217
+ end
218
+
219
+ # Returns the object in the form of hash
220
+ # @return [Hash] Returns the object in the form of hash
221
+ def to_hash
222
+ hash = {}
223
+ self.class.attribute_map.each_pair do |attr, param|
224
+ value = self.send(attr)
225
+ if value.nil?
226
+ is_nullable = self.class.fastly_nullable.include?(attr)
227
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
228
+ end
229
+
230
+ hash[param] = _to_hash(value)
231
+ end
232
+ hash
233
+ end
234
+
235
+ # Outputs non-array value in the form of hash
236
+ # For object, use to_hash. Otherwise, just return the value
237
+ # @param [Object] value Any valid value
238
+ # @return [Hash] Returns the value in the form of hash
239
+ def _to_hash(value)
240
+ if value.is_a?(Array)
241
+ value.compact.map { |v| _to_hash(v) }
242
+ elsif value.is_a?(Hash)
243
+ {}.tap do |hash|
244
+ value.each { |k, v| hash[k] = _to_hash(v) }
245
+ end
246
+ elsif value.respond_to? :to_hash
247
+ value.to_hash
248
+ else
249
+ value
250
+ end
251
+ end
252
+
253
+ end
254
+
255
+ end