fastly 4.2.0 → 4.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +27 -5
  3. data/Gemfile.lock +1 -1
  4. data/README.md +87 -8
  5. data/docs/AclEntryApi.md +1 -1
  6. data/docs/DomainOwnershipsApi.md +47 -0
  7. data/docs/InlineResponse2002.md +1 -2
  8. data/docs/InlineResponse2003.md +11 -0
  9. data/docs/{InlineResponse2002Meta.md → InlineResponse2003Meta.md} +1 -1
  10. data/docs/{ErrorResponseData.md → InlineResponse2004.md} +3 -3
  11. data/docs/{ErrorResponse.md → InlineResponse2004Meta.md} +3 -2
  12. data/docs/ObjectStoreApi.md +6 -2
  13. data/docs/ObjectStoreItemApi.md +195 -0
  14. data/docs/RealtimeMeasurements.md +6 -0
  15. data/docs/Results.md +6 -0
  16. data/lib/fastly/api/acl_entry_api.rb +2 -2
  17. data/lib/fastly/api/{tls_csrs_api.rb → domain_ownerships_api.rb} +17 -24
  18. data/lib/fastly/api/object_store_api.rb +9 -3
  19. data/lib/fastly/api/object_store_item_api.rb +331 -0
  20. data/lib/fastly/api/purge_api.rb +1 -1
  21. data/lib/fastly/models/inline_response2002.rb +8 -18
  22. data/lib/fastly/models/{tls_csr_response.rb → inline_response2003.rb} +19 -8
  23. data/lib/fastly/models/{inline_response2002_meta.rb → inline_response2003_meta.rb} +3 -3
  24. data/lib/fastly/models/{tls_csr.rb → inline_response2004.rb} +19 -8
  25. data/lib/fastly/models/{error_response_data.rb → inline_response2004_meta.rb} +16 -16
  26. data/lib/fastly/models/realtime_measurements.rb +64 -4
  27. data/lib/fastly/models/results.rb +64 -4
  28. data/lib/fastly/version.rb +1 -1
  29. data/lib/fastly.rb +6 -12
  30. data/sig.json +1 -1
  31. metadata +14 -26
  32. data/docs/RelationshipsForTlsCsr.md +0 -10
  33. data/docs/TlsCsr.md +0 -10
  34. data/docs/TlsCsrData.md +0 -12
  35. data/docs/TlsCsrDataAttributes.md +0 -19
  36. data/docs/TlsCsrResponse.md +0 -10
  37. data/docs/TlsCsrResponseAttributes.md +0 -10
  38. data/docs/TlsCsrResponseData.md +0 -13
  39. data/docs/TlsCsrsApi.md +0 -52
  40. data/docs/TypeTlsCsr.md +0 -9
  41. data/lib/fastly/models/error_response.rb +0 -218
  42. data/lib/fastly/models/relationships_for_tls_csr.rb +0 -235
  43. data/lib/fastly/models/tls_csr_data.rb +0 -236
  44. data/lib/fastly/models/tls_csr_data_attributes.rb +0 -314
  45. data/lib/fastly/models/tls_csr_response_attributes.rb +0 -217
  46. data/lib/fastly/models/tls_csr_response_data.rb +0 -245
  47. data/lib/fastly/models/type_tls_csr.rb +0 -34
data/docs/TlsCsr.md DELETED
@@ -1,10 +0,0 @@
1
- # Fastly::TlsCsr
2
-
3
- ## Properties
4
-
5
- | Name | Type | Description | Notes |
6
- | ---- | ---- | ----------- | ----- |
7
- | **data** | [**TlsCsrData**](TlsCsrData.md) | | [optional] |
8
-
9
- [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
10
-
data/docs/TlsCsrData.md DELETED
@@ -1,12 +0,0 @@
1
- # Fastly::TlsCsrData
2
-
3
- ## Properties
4
-
5
- | Name | Type | Description | Notes |
6
- | ---- | ---- | ----------- | ----- |
7
- | **type** | [**TypeTlsCsr**](TypeTlsCsr.md) | | [optional][default to 'csr'] |
8
- | **attributes** | [**TlsCsrDataAttributes**](TlsCsrDataAttributes.md) | | [optional] |
9
- | **relationships** | [**RelationshipsForTlsCsr**](RelationshipsForTlsCsr.md) | | [optional] |
10
-
11
- [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
12
-
@@ -1,19 +0,0 @@
1
- # Fastly::TlsCsrDataAttributes
2
-
3
- ## Properties
4
-
5
- | Name | Type | Description | Notes |
6
- | ---- | ---- | ----------- | ----- |
7
- | **sans** | **Array<String>** | Subject Altername Names - An array of one or more fully qualified domain names or public IP addresses to be secured by this certificate. Required. | |
8
- | **common_name** | **String** | Common Name (CN) - The fully qualified domain name (FQDN) to be secured by this certificate. The common name should be one of the entries in the SANs parameter. | [optional] |
9
- | **country** | **String** | Country (C) - The two-letter ISO country code where the organization is located. | [optional] |
10
- | **state** | **String** | State (S) - The state, province, region, or county where the organization is located. This should not be abbreviated. | [optional] |
11
- | **city** | **String** | Locality (L) - The locality, city, town, or village where the organization is located. | [optional] |
12
- | **postal_code** | **String** | Postal Code - The postal code where the organization is located. | [optional] |
13
- | **street_address** | **String** | Street Address - The street address where the organization is located. | [optional] |
14
- | **organization** | **String** | Organization (O) - The legal name of the organization, including any suffixes. This should not be abbreviated. | [optional] |
15
- | **organizational_unit** | **String** | Organizational Unit (OU) - The internal division of the organization managing the certificate. | [optional] |
16
- | **email** | **String** | Email Address (EMAIL) - The organizational contact for this. | [optional] |
17
-
18
- [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
19
-
@@ -1,10 +0,0 @@
1
- # Fastly::TlsCsrResponse
2
-
3
- ## Properties
4
-
5
- | Name | Type | Description | Notes |
6
- | ---- | ---- | ----------- | ----- |
7
- | **data** | [**TlsCsrResponseData**](TlsCsrResponseData.md) | | [optional] |
8
-
9
- [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
10
-
@@ -1,10 +0,0 @@
1
- # Fastly::TlsCsrResponseAttributes
2
-
3
- ## Properties
4
-
5
- | Name | Type | Description | Notes |
6
- | ---- | ---- | ----------- | ----- |
7
- | **content** | **String** | The PEM encoded CSR. | [optional] |
8
-
9
- [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
10
-
@@ -1,13 +0,0 @@
1
- # Fastly::TlsCsrResponseData
2
-
3
- ## Properties
4
-
5
- | Name | Type | Description | Notes |
6
- | ---- | ---- | ----------- | ----- |
7
- | **id** | **String** | | [optional] |
8
- | **type** | [**TypeTlsCsr**](TypeTlsCsr.md) | | [optional][default to 'csr'] |
9
- | **attributes** | [**TlsCsrResponseAttributes**](TlsCsrResponseAttributes.md) | | [optional] |
10
- | **relationships** | [**RelationshipsForTlsCsr**](RelationshipsForTlsCsr.md) | | [optional] |
11
-
12
- [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
13
-
data/docs/TlsCsrsApi.md DELETED
@@ -1,52 +0,0 @@
1
- # Fastly::TlsCsrsApi
2
-
3
-
4
- ```ruby
5
- require 'fastly'
6
- api_instance = Fastly::TlsCsrsApi.new
7
- ```
8
-
9
- ## Methods
10
-
11
- | Method | HTTP request | Description |
12
- | ------ | ------------ | ----------- |
13
- | [**create_csr**](TlsCsrsApi.md#create_csr) | **POST** /tls/certificate_signing_requests | Create CSR |
14
-
15
-
16
- ## `create_csr()`
17
-
18
- ```ruby
19
- create_csr(opts): <TlsCsrResponse> # Create CSR
20
- ```
21
-
22
- Creates a certificate signing request (CSR).
23
-
24
- ### Examples
25
-
26
- ```ruby
27
- api_instance = Fastly::TlsCsrsApi.new
28
- opts = {
29
- tls_csr: Fastly::TlsCsr.new, # TlsCsr |
30
- }
31
-
32
- begin
33
- # Create CSR
34
- result = api_instance.create_csr(opts)
35
- p result
36
- rescue Fastly::ApiError => e
37
- puts "Error when calling TlsCsrsApi->create_csr: #{e}"
38
- end
39
- ```
40
-
41
- ### Options
42
-
43
- | Name | Type | Description | Notes |
44
- | ---- | ---- | ----------- | ----- |
45
- | **tls_csr** | [**TlsCsr**](TlsCsr.md) | | [optional] |
46
-
47
- ### Return type
48
-
49
- [**TlsCsrResponse**](TlsCsrResponse.md)
50
-
51
- [[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
52
- [[Back to README]](../../README.md)
data/docs/TypeTlsCsr.md DELETED
@@ -1,9 +0,0 @@
1
- # Fastly::TypeTlsCsr
2
-
3
- ## Properties
4
-
5
- | Name | Type | Description | Notes |
6
- | ---- | ---- | ----------- | ----- |
7
-
8
- [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
9
-
@@ -1,218 +0,0 @@
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://developer.fastly.com/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 ErrorResponse
16
- attr_accessor :errors
17
-
18
- # Attribute mapping from ruby-style variable name to JSON key.
19
- def self.attribute_map
20
- {
21
- :'errors' => :'errors'
22
- }
23
- end
24
-
25
- # Returns all the JSON keys this model knows about
26
- def self.acceptable_attributes
27
- attribute_map.values
28
- end
29
-
30
- # Attribute type mapping.
31
- def self.fastly_types
32
- {
33
- :'errors' => :'Array<ErrorResponseData>'
34
- }
35
- end
36
-
37
- # List of attributes with nullable: true
38
- def self.fastly_nullable
39
- Set.new([
40
- ])
41
- end
42
-
43
- # Initializes the object
44
- # @param [Hash] attributes Model attributes in the form of hash
45
- def initialize(attributes = {})
46
- if (!attributes.is_a?(Hash))
47
- fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::ErrorResponse` initialize method"
48
- end
49
-
50
- # check to see if the attribute exists and convert string to symbol for hash key
51
- attributes = attributes.each_with_object({}) { |(k, v), h|
52
- if (!self.class.attribute_map.key?(k.to_sym))
53
- fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::ErrorResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
54
- end
55
- h[k.to_sym] = v
56
- }
57
-
58
- if attributes.key?(:'errors')
59
- if (value = attributes[:'errors']).is_a?(Array)
60
- self.errors = value
61
- end
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
- invalid_properties
70
- end
71
-
72
- # Check to see if the all the properties in the model are valid
73
- # @return true if the model is valid
74
- def valid?
75
- true
76
- end
77
-
78
- # Checks equality by comparing each attribute.
79
- # @param [Object] Object to be compared
80
- def ==(o)
81
- return true if self.equal?(o)
82
- self.class == o.class &&
83
- errors == o.errors
84
- end
85
-
86
- # @see the `==` method
87
- # @param [Object] Object to be compared
88
- def eql?(o)
89
- self == o
90
- end
91
-
92
- # Calculates hash code according to all attributes.
93
- # @return [Integer] Hash code
94
- def hash
95
- [errors].hash
96
- end
97
-
98
- # Builds the object from hash
99
- # @param [Hash] attributes Model attributes in the form of hash
100
- # @return [Object] Returns the model itself
101
- def self.build_from_hash(attributes)
102
- new.build_from_hash(attributes)
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 build_from_hash(attributes)
109
- return nil unless attributes.is_a?(Hash)
110
- self.class.fastly_types.each_pair do |key, type|
111
- if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key)
112
- self.send("#{key}=", nil)
113
- elsif type =~ /\AArray<(.*)>/i
114
- # check to ensure the input is an array given that the attribute
115
- # is documented as an array but the input is not
116
- if attributes[self.class.attribute_map[key]].is_a?(Array)
117
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
118
- end
119
- elsif !attributes[self.class.attribute_map[key]].nil?
120
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
121
- end
122
- end
123
-
124
- self
125
- end
126
-
127
- # Deserializes the data based on type
128
- # @param string type Data type
129
- # @param string value Value to be deserialized
130
- # @return [Object] Deserialized data
131
- def _deserialize(type, value)
132
- case type.to_sym
133
- when :Time
134
- Time.parse(value)
135
- when :Date
136
- Date.parse(value)
137
- when :String
138
- value.to_s
139
- when :Integer
140
- value.to_i
141
- when :Float
142
- value.to_f
143
- when :Boolean
144
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
145
- true
146
- else
147
- false
148
- end
149
- when :Object
150
- # generic object (usually a Hash), return directly
151
- value
152
- when /\AArray<(?<inner_type>.+)>\z/
153
- inner_type = Regexp.last_match[:inner_type]
154
- value.map { |v| _deserialize(inner_type, v) }
155
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
156
- k_type = Regexp.last_match[:k_type]
157
- v_type = Regexp.last_match[:v_type]
158
- {}.tap do |hash|
159
- value.each do |k, v|
160
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
161
- end
162
- end
163
- else # model
164
- # models (e.g. Pet) or oneOf
165
- klass = Fastly.const_get(type)
166
- klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value)
167
- end
168
- end
169
-
170
- # Returns the string representation of the object
171
- # @return [String] String presentation of the object
172
- def to_s
173
- to_hash.to_s
174
- end
175
-
176
- # to_body is an alias to to_hash (backward compatibility)
177
- # @return [Hash] Returns the object in the form of hash
178
- def to_body
179
- to_hash
180
- end
181
-
182
- # Returns the object in the form of hash
183
- # @return [Hash] Returns the object in the form of hash
184
- def to_hash
185
- hash = {}
186
- self.class.attribute_map.each_pair do |attr, param|
187
- value = self.send(attr)
188
- if value.nil?
189
- is_nullable = self.class.fastly_nullable.include?(attr)
190
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
191
- end
192
-
193
- hash[param] = _to_hash(value)
194
- end
195
- hash
196
- end
197
-
198
- # Outputs non-array value in the form of hash
199
- # For object, use to_hash. Otherwise, just return the value
200
- # @param [Object] value Any valid value
201
- # @return [Hash] Returns the value in the form of hash
202
- def _to_hash(value)
203
- if value.is_a?(Array)
204
- value.compact.map { |v| _to_hash(v) }
205
- elsif value.is_a?(Hash)
206
- {}.tap do |hash|
207
- value.each { |k, v| hash[k] = _to_hash(v) }
208
- end
209
- elsif value.respond_to? :to_hash
210
- value.to_hash
211
- else
212
- value
213
- end
214
- end
215
-
216
- end
217
-
218
- end
@@ -1,235 +0,0 @@
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://developer.fastly.com/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 RelationshipsForTlsCsr
16
- attr_accessor :tls_private_key
17
-
18
- # Attribute mapping from ruby-style variable name to JSON key.
19
- def self.attribute_map
20
- {
21
- :'tls_private_key' => :'tls_private_key'
22
- }
23
- end
24
-
25
- # Returns all the JSON keys this model knows about
26
- def self.acceptable_attributes
27
- attribute_map.values
28
- end
29
-
30
- # Attribute type mapping.
31
- def self.fastly_types
32
- {
33
- :'tls_private_key' => :'RelationshipTlsPrivateKeyTlsPrivateKey'
34
- }
35
- end
36
-
37
- # List of attributes with nullable: true
38
- def self.fastly_nullable
39
- Set.new([
40
- ])
41
- end
42
-
43
- # List of class defined in anyOf (OpenAPI v3)
44
- def self.fastly_any_of
45
- [
46
- :'RelationshipTlsPrivateKey'
47
- ]
48
- end
49
-
50
- # Initializes the object
51
- # @param [Hash] attributes Model attributes in the form of hash
52
- def initialize(attributes = {})
53
- if (!attributes.is_a?(Hash))
54
- fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::RelationshipsForTlsCsr` initialize method"
55
- end
56
-
57
- # check to see if the attribute exists and convert string to symbol for hash key
58
- attributes = attributes.each_with_object({}) { |(k, v), h|
59
- if (!self.class.attribute_map.key?(k.to_sym))
60
- fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::RelationshipsForTlsCsr`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
61
- end
62
- h[k.to_sym] = v
63
- }
64
-
65
- if attributes.key?(:'tls_private_key')
66
- self.tls_private_key = attributes[:'tls_private_key']
67
- end
68
- end
69
-
70
- # Show invalid properties with the reasons. Usually used together with valid?
71
- # @return Array for valid properties with the reasons
72
- def list_invalid_properties
73
- invalid_properties = Array.new
74
- invalid_properties
75
- end
76
-
77
- # Check to see if the all the properties in the model are valid
78
- # @return true if the model is valid
79
- def valid?
80
- _any_of_found = false
81
- self.class.fastly_any_of.each do |_class|
82
- _any_of = Fastly.const_get(_class).build_from_hash(self.to_hash)
83
- if _any_of.valid?
84
- _any_of_found = true
85
- end
86
- end
87
-
88
- if !_any_of_found
89
- return false
90
- end
91
-
92
- true
93
- end
94
-
95
- # Checks equality by comparing each attribute.
96
- # @param [Object] Object to be compared
97
- def ==(o)
98
- return true if self.equal?(o)
99
- self.class == o.class &&
100
- tls_private_key == o.tls_private_key
101
- end
102
-
103
- # @see the `==` method
104
- # @param [Object] Object to be compared
105
- def eql?(o)
106
- self == o
107
- end
108
-
109
- # Calculates hash code according to all attributes.
110
- # @return [Integer] Hash code
111
- def hash
112
- [tls_private_key].hash
113
- end
114
-
115
- # Builds the object from hash
116
- # @param [Hash] attributes Model attributes in the form of hash
117
- # @return [Object] Returns the model itself
118
- def self.build_from_hash(attributes)
119
- new.build_from_hash(attributes)
120
- end
121
-
122
- # Builds the object from hash
123
- # @param [Hash] attributes Model attributes in the form of hash
124
- # @return [Object] Returns the model itself
125
- def build_from_hash(attributes)
126
- return nil unless attributes.is_a?(Hash)
127
- self.class.fastly_types.each_pair do |key, type|
128
- if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key)
129
- self.send("#{key}=", nil)
130
- elsif type =~ /\AArray<(.*)>/i
131
- # check to ensure the input is an array given that the attribute
132
- # is documented as an array but the input is not
133
- if attributes[self.class.attribute_map[key]].is_a?(Array)
134
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
135
- end
136
- elsif !attributes[self.class.attribute_map[key]].nil?
137
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
138
- end
139
- end
140
-
141
- self
142
- end
143
-
144
- # Deserializes the data based on type
145
- # @param string type Data type
146
- # @param string value Value to be deserialized
147
- # @return [Object] Deserialized data
148
- def _deserialize(type, value)
149
- case type.to_sym
150
- when :Time
151
- Time.parse(value)
152
- when :Date
153
- Date.parse(value)
154
- when :String
155
- value.to_s
156
- when :Integer
157
- value.to_i
158
- when :Float
159
- value.to_f
160
- when :Boolean
161
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
162
- true
163
- else
164
- false
165
- end
166
- when :Object
167
- # generic object (usually a Hash), return directly
168
- value
169
- when /\AArray<(?<inner_type>.+)>\z/
170
- inner_type = Regexp.last_match[:inner_type]
171
- value.map { |v| _deserialize(inner_type, v) }
172
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
173
- k_type = Regexp.last_match[:k_type]
174
- v_type = Regexp.last_match[:v_type]
175
- {}.tap do |hash|
176
- value.each do |k, v|
177
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
178
- end
179
- end
180
- else # model
181
- # models (e.g. Pet) or oneOf
182
- klass = Fastly.const_get(type)
183
- klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value)
184
- end
185
- end
186
-
187
- # Returns the string representation of the object
188
- # @return [String] String presentation of the object
189
- def to_s
190
- to_hash.to_s
191
- end
192
-
193
- # to_body is an alias to to_hash (backward compatibility)
194
- # @return [Hash] Returns the object in the form of hash
195
- def to_body
196
- to_hash
197
- end
198
-
199
- # Returns the object in the form of hash
200
- # @return [Hash] Returns the object in the form of hash
201
- def to_hash
202
- hash = {}
203
- self.class.attribute_map.each_pair do |attr, param|
204
- value = self.send(attr)
205
- if value.nil?
206
- is_nullable = self.class.fastly_nullable.include?(attr)
207
- next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
208
- end
209
-
210
- hash[param] = _to_hash(value)
211
- end
212
- hash
213
- end
214
-
215
- # Outputs non-array value in the form of hash
216
- # For object, use to_hash. Otherwise, just return the value
217
- # @param [Object] value Any valid value
218
- # @return [Hash] Returns the value in the form of hash
219
- def _to_hash(value)
220
- if value.is_a?(Array)
221
- value.compact.map { |v| _to_hash(v) }
222
- elsif value.is_a?(Hash)
223
- {}.tap do |hash|
224
- value.each { |k, v| hash[k] = _to_hash(v) }
225
- end
226
- elsif value.respond_to? :to_hash
227
- value.to_hash
228
- else
229
- value
230
- end
231
- end
232
-
233
- end
234
-
235
- end