fastly 8.8.0 → 8.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (104) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +29 -1
  3. data/Gemfile.lock +1 -1
  4. data/README.md +30 -3
  5. data/docs/AclsInComputeApi.md +284 -0
  6. data/docs/Backend.md +2 -2
  7. data/docs/BackendApi.md +8 -8
  8. data/docs/BackendResponse.md +2 -2
  9. data/docs/{OriginInspectorRealtimeEntryRecorded.md → ComputeAclCreateAclsRequest.md} +2 -1
  10. data/docs/ComputeAclCreateAclsResponse.md +11 -0
  11. data/docs/ComputeAclListEntries.md +11 -0
  12. data/docs/ComputeAclListEntriesItem.md +11 -0
  13. data/docs/ComputeAclListEntriesMeta.md +11 -0
  14. data/docs/ComputeAclLookup.md +12 -0
  15. data/docs/ComputeAclUpdateEntry.md +12 -0
  16. data/docs/ConfiguredProductResponse.md +13 -0
  17. data/docs/ConfiguredProductResponseConfiguration.md +11 -0
  18. data/docs/ConfiguredProductResponseLinks.md +11 -0
  19. data/docs/ConfiguredProductResponseProduct.md +11 -0
  20. data/docs/ContactApi.md +1 -1
  21. data/docs/CustomerAddress.md +16 -0
  22. data/docs/CustomerAddressesApi.md +127 -0
  23. data/docs/DomainInspector.md +1 -1
  24. data/docs/DomainInspectorRealtimeEntry.md +1 -1
  25. data/docs/EnabledProductsApi.md +93 -9
  26. data/docs/Environment.md +12 -0
  27. data/docs/{RecordedTimestamp.md → EnvironmentName.md} +1 -1
  28. data/docs/{OriginInspectorSubsequentRequestTimestamp.md → InlineResponse201.md} +2 -1
  29. data/docs/{SubsequentRequestTimestamp.md → ListCustomerAddressesResponse.md} +2 -1
  30. data/docs/OriginInspector.md +1 -1
  31. data/docs/OriginInspectorRealtimeEntry.md +1 -1
  32. data/docs/RealtimeEntryAggregated.md +1 -0
  33. data/docs/RealtimeMeasurements.md +1 -0
  34. data/docs/Results.md +1 -0
  35. data/docs/SchemasVersionResponse.md +1 -0
  36. data/docs/ServiceDetail.md +1 -0
  37. data/docs/ServiceListResponse.md +1 -0
  38. data/docs/ServiceListResponseAllOf.md +1 -0
  39. data/docs/ServiceResponse.md +1 -0
  40. data/docs/ServiceResponseAllOf.md +1 -0
  41. data/docs/ServiceVersionDetail.md +1 -0
  42. data/docs/ServiceVersionDetailOrNull.md +1 -0
  43. data/docs/SetConfiguration.md +11 -0
  44. data/docs/SetWorkspaceId.md +10 -0
  45. data/docs/TlsCertificatesApi.md +2 -2
  46. data/docs/TlsDomainsApi.md +2 -2
  47. data/docs/TlsSubscriptionsApi.md +2 -2
  48. data/docs/VersionApi.md +84 -0
  49. data/docs/VersionResponse.md +1 -0
  50. data/docs/VersionResponseAllOf.md +1 -0
  51. data/lib/fastly/api/acls_in_compute_api.rb +470 -0
  52. data/lib/fastly/api/backend_api.rb +8 -8
  53. data/lib/fastly/api/contact_api.rb +1 -1
  54. data/lib/fastly/api/customer_addresses_api.rb +224 -0
  55. data/lib/fastly/api/enabled_products_api.rb +164 -10
  56. data/lib/fastly/api/tls_certificates_api.rb +7 -7
  57. data/lib/fastly/api/tls_domains_api.rb +7 -7
  58. data/lib/fastly/api/tls_subscriptions_api.rb +7 -7
  59. data/lib/fastly/api/version_api.rb +154 -0
  60. data/lib/fastly/configuration.rb +84 -0
  61. data/lib/fastly/models/backend.rb +2 -2
  62. data/lib/fastly/models/backend_response.rb +2 -2
  63. data/lib/fastly/models/billing_response_line_item.rb +10 -0
  64. data/lib/fastly/models/{origin_inspector_realtime_entry_recorded.rb → compute_acl_create_acls_request.rb} +15 -6
  65. data/lib/fastly/models/compute_acl_create_acls_response.rb +227 -0
  66. data/lib/fastly/models/compute_acl_list_entries.rb +228 -0
  67. data/lib/fastly/models/compute_acl_list_entries_item.rb +227 -0
  68. data/lib/fastly/models/compute_acl_list_entries_meta.rb +227 -0
  69. data/lib/fastly/models/compute_acl_lookup.rb +238 -0
  70. data/lib/fastly/models/compute_acl_update_entry.rb +238 -0
  71. data/lib/fastly/models/configured_product_response.rb +243 -0
  72. data/lib/fastly/models/configured_product_response_configuration.rb +227 -0
  73. data/lib/fastly/models/configured_product_response_links.rb +227 -0
  74. data/lib/fastly/models/configured_product_response_product.rb +227 -0
  75. data/lib/fastly/models/customer_address.rb +294 -0
  76. data/lib/fastly/models/domain_inspector.rb +2 -1
  77. data/lib/fastly/models/domain_inspector_realtime_entry.rb +2 -1
  78. data/lib/fastly/models/environment.rb +235 -0
  79. data/lib/fastly/models/environment_name.rb +34 -0
  80. data/lib/fastly/models/event_attributes.rb +2 -2
  81. data/lib/fastly/models/{recorded_timestamp.rb → inline_response201.rb} +15 -6
  82. data/lib/fastly/models/line_item_data.rb +10 -0
  83. data/lib/fastly/models/{origin_inspector_subsequent_request_timestamp.rb → list_customer_addresses_response.rb} +16 -6
  84. data/lib/fastly/models/origin_inspector.rb +2 -1
  85. data/lib/fastly/models/origin_inspector_realtime_entry.rb +2 -1
  86. data/lib/fastly/models/realtime_entry_aggregated.rb +14 -4
  87. data/lib/fastly/models/realtime_measurements.rb +14 -4
  88. data/lib/fastly/models/results.rb +11 -1
  89. data/lib/fastly/models/schemas_version_response.rb +16 -4
  90. data/lib/fastly/models/service_detail.rb +13 -1
  91. data/lib/fastly/models/service_list_response.rb +16 -4
  92. data/lib/fastly/models/service_list_response_all_of.rb +16 -4
  93. data/lib/fastly/models/service_response.rb +16 -4
  94. data/lib/fastly/models/service_response_all_of.rb +16 -4
  95. data/lib/fastly/models/service_version_detail.rb +13 -1
  96. data/lib/fastly/models/service_version_detail_or_null.rb +13 -1
  97. data/lib/fastly/models/set_configuration.rb +227 -0
  98. data/lib/fastly/models/{subsequent_request_timestamp.rb → set_workspace_id.rb} +15 -6
  99. data/lib/fastly/models/version_response.rb +16 -4
  100. data/lib/fastly/models/version_response_all_of.rb +16 -4
  101. data/lib/fastly/version.rb +1 -1
  102. data/lib/fastly.rb +20 -4
  103. data/sig.json +1 -1
  104. metadata +42 -10
@@ -0,0 +1,227 @@
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 ConfiguredProductResponseProduct
16
+ # Product identifier
17
+ attr_accessor :id
18
+
19
+ # Name of the object
20
+ attr_accessor :object
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'id' => :'id',
26
+ :'object' => :'object'
27
+ }
28
+ end
29
+
30
+ # Returns all the JSON keys this model knows about
31
+ def self.acceptable_attributes
32
+ attribute_map.values
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ def self.fastly_types
37
+ {
38
+ :'id' => :'String',
39
+ :'object' => :'String'
40
+ }
41
+ end
42
+
43
+ # List of attributes with nullable: true
44
+ def self.fastly_nullable
45
+ Set.new([
46
+ ])
47
+ end
48
+
49
+ # Initializes the object
50
+ # @param [Hash] attributes Model attributes in the form of hash
51
+ def initialize(attributes = {})
52
+ if (!attributes.is_a?(Hash))
53
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::ConfiguredProductResponseProduct` initialize method"
54
+ end
55
+
56
+ # check to see if the attribute exists and convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}) { |(k, v), h|
58
+ if (!self.class.attribute_map.key?(k.to_sym))
59
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::ConfiguredProductResponseProduct`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
+ end
61
+ h[k.to_sym] = v
62
+ }
63
+
64
+ if attributes.key?(:'id')
65
+ self.id = attributes[:'id']
66
+ end
67
+
68
+ if attributes.key?(:'object')
69
+ self.object = attributes[:'object']
70
+ end
71
+ end
72
+
73
+ # Show invalid properties with the reasons. Usually used together with valid?
74
+ # @return Array for valid properties with the reasons
75
+ def list_invalid_properties
76
+ invalid_properties = Array.new
77
+ invalid_properties
78
+ end
79
+
80
+ # Check to see if the all the properties in the model are valid
81
+ # @return true if the model is valid
82
+ def valid?
83
+ true
84
+ end
85
+
86
+ # Checks equality by comparing each attribute.
87
+ # @param [Object] Object to be compared
88
+ def ==(o)
89
+ return true if self.equal?(o)
90
+ self.class == o.class &&
91
+ id == o.id &&
92
+ object == o.object
93
+ end
94
+
95
+ # @see the `==` method
96
+ # @param [Object] Object to be compared
97
+ def eql?(o)
98
+ self == o
99
+ end
100
+
101
+ # Calculates hash code according to all attributes.
102
+ # @return [Integer] Hash code
103
+ def hash
104
+ [id, object].hash
105
+ end
106
+
107
+ # Builds the object from hash
108
+ # @param [Hash] attributes Model attributes in the form of hash
109
+ # @return [Object] Returns the model itself
110
+ def self.build_from_hash(attributes)
111
+ new.build_from_hash(attributes)
112
+ end
113
+
114
+ # Builds the object from hash
115
+ # @param [Hash] attributes Model attributes in the form of hash
116
+ # @return [Object] Returns the model itself
117
+ def build_from_hash(attributes)
118
+ return nil unless attributes.is_a?(Hash)
119
+ self.class.fastly_types.each_pair do |key, type|
120
+ if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key)
121
+ self.send("#{key}=", nil)
122
+ elsif type =~ /\AArray<(.*)>/i
123
+ # check to ensure the input is an array given that the attribute
124
+ # is documented as an array but the input is not
125
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
126
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
127
+ end
128
+ elsif !attributes[self.class.attribute_map[key]].nil?
129
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
130
+ end
131
+ end
132
+
133
+ self
134
+ end
135
+
136
+ # Deserializes the data based on type
137
+ # @param string type Data type
138
+ # @param string value Value to be deserialized
139
+ # @return [Object] Deserialized data
140
+ def _deserialize(type, value)
141
+ case type.to_sym
142
+ when :Time
143
+ Time.parse(value)
144
+ when :Date
145
+ Date.parse(value)
146
+ when :String
147
+ value.to_s
148
+ when :Integer
149
+ value.to_i
150
+ when :Float
151
+ value.to_f
152
+ when :Boolean
153
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
154
+ true
155
+ else
156
+ false
157
+ end
158
+ when :Object
159
+ # generic object (usually a Hash), return directly
160
+ value
161
+ when /\AArray<(?<inner_type>.+)>\z/
162
+ inner_type = Regexp.last_match[:inner_type]
163
+ value.map { |v| _deserialize(inner_type, v) }
164
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
165
+ k_type = Regexp.last_match[:k_type]
166
+ v_type = Regexp.last_match[:v_type]
167
+ {}.tap do |hash|
168
+ value.each do |k, v|
169
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
170
+ end
171
+ end
172
+ else # model
173
+ # models (e.g. Pet) or oneOf
174
+ klass = Fastly.const_get(type)
175
+ klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value)
176
+ end
177
+ end
178
+
179
+ # Returns the string representation of the object
180
+ # @return [String] String presentation of the object
181
+ def to_s
182
+ to_hash.to_s
183
+ end
184
+
185
+ # to_body is an alias to to_hash (backward compatibility)
186
+ # @return [Hash] Returns the object in the form of hash
187
+ def to_body
188
+ to_hash
189
+ end
190
+
191
+ # Returns the object in the form of hash
192
+ # @return [Hash] Returns the object in the form of hash
193
+ def to_hash
194
+ hash = {}
195
+ self.class.attribute_map.each_pair do |attr, param|
196
+ value = self.send(attr)
197
+ if value.nil?
198
+ is_nullable = self.class.fastly_nullable.include?(attr)
199
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
200
+ end
201
+
202
+ hash[param] = _to_hash(value)
203
+ end
204
+ hash
205
+ end
206
+
207
+ # Outputs non-array value in the form of hash
208
+ # For object, use to_hash. Otherwise, just return the value
209
+ # @param [Object] value Any valid value
210
+ # @return [Hash] Returns the value in the form of hash
211
+ def _to_hash(value)
212
+ if value.is_a?(Array)
213
+ value.compact.map { |v| _to_hash(v) }
214
+ elsif value.is_a?(Hash)
215
+ {}.tap do |hash|
216
+ value.each { |k, v| hash[k] = _to_hash(v) }
217
+ end
218
+ elsif value.respond_to? :to_hash
219
+ value.to_hash
220
+ else
221
+ value
222
+ end
223
+ end
224
+
225
+ end
226
+
227
+ end
@@ -0,0 +1,294 @@
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 CustomerAddress
16
+ # The type of the address.
17
+ attr_accessor :type
18
+
19
+ # The street number and name of the address.
20
+ attr_accessor :address_1
21
+
22
+ # Additional address line for unit number, P.O. Box, etc.
23
+ attr_accessor :address_2
24
+
25
+ # City, town, or locality name the address is located.
26
+ attr_accessor :locality
27
+
28
+ # State, province, or region of the address.
29
+ attr_accessor :region
30
+
31
+ # ISO 3166-1 alpha-2 country code (e.g., \"US\", \"CA\", \"NZ\")
32
+ attr_accessor :country
33
+
34
+ # Postal or Zip code of the address.
35
+ attr_accessor :postal_code
36
+
37
+ # Attribute mapping from ruby-style variable name to JSON key.
38
+ def self.attribute_map
39
+ {
40
+ :'type' => :'type',
41
+ :'address_1' => :'address_1',
42
+ :'address_2' => :'address_2',
43
+ :'locality' => :'locality',
44
+ :'region' => :'region',
45
+ :'country' => :'country',
46
+ :'postal_code' => :'postal_code'
47
+ }
48
+ end
49
+
50
+ # Returns all the JSON keys this model knows about
51
+ def self.acceptable_attributes
52
+ attribute_map.values
53
+ end
54
+
55
+ # Attribute type mapping.
56
+ def self.fastly_types
57
+ {
58
+ :'type' => :'String',
59
+ :'address_1' => :'String',
60
+ :'address_2' => :'String',
61
+ :'locality' => :'String',
62
+ :'region' => :'String',
63
+ :'country' => :'String',
64
+ :'postal_code' => :'String'
65
+ }
66
+ end
67
+
68
+ # List of attributes with nullable: true
69
+ def self.fastly_nullable
70
+ Set.new([
71
+ ])
72
+ end
73
+
74
+ # Initializes the object
75
+ # @param [Hash] attributes Model attributes in the form of hash
76
+ def initialize(attributes = {})
77
+ if (!attributes.is_a?(Hash))
78
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::CustomerAddress` initialize method"
79
+ end
80
+
81
+ # check to see if the attribute exists and convert string to symbol for hash key
82
+ attributes = attributes.each_with_object({}) { |(k, v), h|
83
+ if (!self.class.attribute_map.key?(k.to_sym))
84
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::CustomerAddress`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
85
+ end
86
+ h[k.to_sym] = v
87
+ }
88
+
89
+ if attributes.key?(:'type')
90
+ self.type = attributes[:'type']
91
+ end
92
+
93
+ if attributes.key?(:'address_1')
94
+ self.address_1 = attributes[:'address_1']
95
+ end
96
+
97
+ if attributes.key?(:'address_2')
98
+ self.address_2 = attributes[:'address_2']
99
+ end
100
+
101
+ if attributes.key?(:'locality')
102
+ self.locality = attributes[:'locality']
103
+ end
104
+
105
+ if attributes.key?(:'region')
106
+ self.region = attributes[:'region']
107
+ end
108
+
109
+ if attributes.key?(:'country')
110
+ self.country = attributes[:'country']
111
+ end
112
+
113
+ if attributes.key?(:'postal_code')
114
+ self.postal_code = attributes[:'postal_code']
115
+ end
116
+ end
117
+
118
+ # Show invalid properties with the reasons. Usually used together with valid?
119
+ # @return Array for valid properties with the reasons
120
+ def list_invalid_properties
121
+ invalid_properties = Array.new
122
+ pattern = Regexp.new(/^(tax|billing)$/)
123
+ if !@type.nil? && @type !~ pattern
124
+ invalid_properties.push("invalid value for \"type\", must conform to the pattern #{pattern}.")
125
+ end
126
+
127
+ invalid_properties
128
+ end
129
+
130
+ # Check to see if the all the properties in the model are valid
131
+ # @return true if the model is valid
132
+ def valid?
133
+ return false if !@type.nil? && @type !~ Regexp.new(/^(tax|billing)$/)
134
+ true
135
+ end
136
+
137
+ # Custom attribute writer method with validation
138
+ # @param [Object] type Value to be assigned
139
+ def type=(type)
140
+ pattern = Regexp.new(/^(tax|billing)$/)
141
+ if !type.nil? && type !~ pattern
142
+ fail ArgumentError, "invalid value for \"type\", must conform to the pattern #{pattern}."
143
+ end
144
+
145
+ @type = type
146
+ end
147
+
148
+ # Checks equality by comparing each attribute.
149
+ # @param [Object] Object to be compared
150
+ def ==(o)
151
+ return true if self.equal?(o)
152
+ self.class == o.class &&
153
+ type == o.type &&
154
+ address_1 == o.address_1 &&
155
+ address_2 == o.address_2 &&
156
+ locality == o.locality &&
157
+ region == o.region &&
158
+ country == o.country &&
159
+ postal_code == o.postal_code
160
+ end
161
+
162
+ # @see the `==` method
163
+ # @param [Object] Object to be compared
164
+ def eql?(o)
165
+ self == o
166
+ end
167
+
168
+ # Calculates hash code according to all attributes.
169
+ # @return [Integer] Hash code
170
+ def hash
171
+ [type, address_1, address_2, locality, region, country, postal_code].hash
172
+ end
173
+
174
+ # Builds the object from hash
175
+ # @param [Hash] attributes Model attributes in the form of hash
176
+ # @return [Object] Returns the model itself
177
+ def self.build_from_hash(attributes)
178
+ new.build_from_hash(attributes)
179
+ end
180
+
181
+ # Builds the object from hash
182
+ # @param [Hash] attributes Model attributes in the form of hash
183
+ # @return [Object] Returns the model itself
184
+ def build_from_hash(attributes)
185
+ return nil unless attributes.is_a?(Hash)
186
+ self.class.fastly_types.each_pair do |key, type|
187
+ if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key)
188
+ self.send("#{key}=", nil)
189
+ elsif type =~ /\AArray<(.*)>/i
190
+ # check to ensure the input is an array given that the attribute
191
+ # is documented as an array but the input is not
192
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
193
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
194
+ end
195
+ elsif !attributes[self.class.attribute_map[key]].nil?
196
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
197
+ end
198
+ end
199
+
200
+ self
201
+ end
202
+
203
+ # Deserializes the data based on type
204
+ # @param string type Data type
205
+ # @param string value Value to be deserialized
206
+ # @return [Object] Deserialized data
207
+ def _deserialize(type, value)
208
+ case type.to_sym
209
+ when :Time
210
+ Time.parse(value)
211
+ when :Date
212
+ Date.parse(value)
213
+ when :String
214
+ value.to_s
215
+ when :Integer
216
+ value.to_i
217
+ when :Float
218
+ value.to_f
219
+ when :Boolean
220
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
221
+ true
222
+ else
223
+ false
224
+ end
225
+ when :Object
226
+ # generic object (usually a Hash), return directly
227
+ value
228
+ when /\AArray<(?<inner_type>.+)>\z/
229
+ inner_type = Regexp.last_match[:inner_type]
230
+ value.map { |v| _deserialize(inner_type, v) }
231
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
232
+ k_type = Regexp.last_match[:k_type]
233
+ v_type = Regexp.last_match[:v_type]
234
+ {}.tap do |hash|
235
+ value.each do |k, v|
236
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
237
+ end
238
+ end
239
+ else # model
240
+ # models (e.g. Pet) or oneOf
241
+ klass = Fastly.const_get(type)
242
+ klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value)
243
+ end
244
+ end
245
+
246
+ # Returns the string representation of the object
247
+ # @return [String] String presentation of the object
248
+ def to_s
249
+ to_hash.to_s
250
+ end
251
+
252
+ # to_body is an alias to to_hash (backward compatibility)
253
+ # @return [Hash] Returns the object in the form of hash
254
+ def to_body
255
+ to_hash
256
+ end
257
+
258
+ # Returns the object in the form of hash
259
+ # @return [Hash] Returns the object in the form of hash
260
+ def to_hash
261
+ hash = {}
262
+ self.class.attribute_map.each_pair do |attr, param|
263
+ value = self.send(attr)
264
+ if value.nil?
265
+ is_nullable = self.class.fastly_nullable.include?(attr)
266
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
267
+ end
268
+
269
+ hash[param] = _to_hash(value)
270
+ end
271
+ hash
272
+ end
273
+
274
+ # Outputs non-array value in the form of hash
275
+ # For object, use to_hash. Otherwise, just return the value
276
+ # @param [Object] value Any valid value
277
+ # @return [Hash] Returns the value in the form of hash
278
+ def _to_hash(value)
279
+ if value.is_a?(Array)
280
+ value.compact.map { |v| _to_hash(v) }
281
+ elsif value.is_a?(Hash)
282
+ {}.tap do |hash|
283
+ value.each { |k, v| hash[k] = _to_hash(v) }
284
+ end
285
+ elsif value.respond_to? :to_hash
286
+ value.to_hash
287
+ else
288
+ value
289
+ end
290
+ end
291
+
292
+ end
293
+
294
+ end
@@ -13,6 +13,7 @@ require 'time'
13
13
 
14
14
  module Fastly
15
15
  class DomainInspector
16
+ # Value to use for subsequent requests.
16
17
  attr_accessor :timestamp
17
18
 
18
19
  # Offset of entry timestamps from the current time due to processing time.
@@ -38,7 +39,7 @@ module Fastly
38
39
  # Attribute type mapping.
39
40
  def self.fastly_types
40
41
  {
41
- :'timestamp' => :'SubsequentRequestTimestamp',
42
+ :'timestamp' => :'Integer',
42
43
  :'aggregate_delay' => :'Integer',
43
44
  :'data' => :'Array<DomainInspectorRealtimeEntry>'
44
45
  }
@@ -14,6 +14,7 @@ require 'time'
14
14
  module Fastly
15
15
  # Each reporting period is represented by an entry in the `Data` property of the top level response and provides access to [measurement data](#measurements-data-model) for that time period, grouped in various ways: by domain name, domain IP address, and optionally by POP. The `datacenter` property organizes the measurements by Fastly POP, while the `aggregated` property combines the measurements of all POPs (but still splits by backend name and IP).
16
16
  class DomainInspectorRealtimeEntry
17
+ # The Unix timestamp at which this record's data was generated.
17
18
  attr_accessor :recorded
18
19
 
19
20
  # Groups [measurements](#measurements-data-model) by backend name and then by IP address.
@@ -39,7 +40,7 @@ module Fastly
39
40
  # Attribute type mapping.
40
41
  def self.fastly_types
41
42
  {
42
- :'recorded' => :'RecordedTimestamp',
43
+ :'recorded' => :'Integer',
43
44
  :'aggregated' => :'Hash<String, DomainInspectorMeasurements>',
44
45
  :'datacenter' => :'Hash<String, Hash<String, DomainInspectorMeasurements>>'
45
46
  }