fastly 7.2.2 → 8.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +27 -0
  3. data/Gemfile.lock +2 -2
  4. data/README.md +1 -1
  5. data/docs/CreateResponseObjectRequest.md +16 -0
  6. data/docs/HistoricalApi.md +12 -12
  7. data/docs/{HistoricalAggregateResponse.md → HistoricalStatsAggregatedResponse.md} +1 -1
  8. data/docs/{HistoricalAggregateResponseAllOf.md → HistoricalStatsAggregatedResponseAllOf.md} +1 -1
  9. data/docs/{HistoricalResponse.md → HistoricalStatsByServiceResponse.md} +1 -1
  10. data/docs/{HistoricalResponseDataField.md → HistoricalStatsByServiceResponseAllOf.md} +1 -1
  11. data/docs/{HistoricalFieldResponse.md → HistoricalUsageAggregatedResponse.md} +2 -2
  12. data/docs/{HistoricalFieldResponseDataField.md → HistoricalUsageAggregatedResponseAllOf.md} +2 -2
  13. data/docs/{HistoricalUsageResults.md → HistoricalUsageData.md} +1 -1
  14. data/docs/HistoricalUsageMonthResponseData.md +2 -2
  15. data/docs/{HistoricalService.md → HistoricalUsageService.md} +1 -1
  16. data/docs/HistoricalUsageServiceResponse.md +1 -1
  17. data/docs/HistoricalUsageServiceResponseAllOf.md +1 -1
  18. data/docs/ResponseObjectApi.md +4 -0
  19. data/docs/Results.md +2 -0
  20. data/docs/TlsConfigurationResponseAttributes.md +1 -1
  21. data/docs/TlsConfigurationResponseAttributesAllOf.md +1 -1
  22. data/lib/fastly/api/historical_api.rb +18 -18
  23. data/lib/fastly/api/response_object_api.rb +8 -4
  24. data/lib/fastly/models/{historical_field_aggregate_response.rb → create_response_object_request.rb} +59 -35
  25. data/lib/fastly/models/{historical_aggregate_response.rb → historical_stats_aggregated_response.rb} +4 -4
  26. data/lib/fastly/models/{historical_aggregate_response_all_of.rb → historical_stats_aggregated_response_all_of.rb} +3 -3
  27. data/lib/fastly/models/{historical_response.rb → historical_stats_by_service_response.rb} +4 -4
  28. data/lib/fastly/models/{historical_response_data_field.rb → historical_stats_by_service_response_all_of.rb} +3 -3
  29. data/lib/fastly/models/{historical_field_response.rb → historical_usage_aggregated_response.rb} +6 -5
  30. data/lib/fastly/models/{historical_field_response_data_field.rb → historical_usage_aggregated_response_all_of.rb} +5 -4
  31. data/lib/fastly/models/{historical_usage_results.rb → historical_usage_data.rb} +4 -3
  32. data/lib/fastly/models/historical_usage_month_response_data.rb +7 -3
  33. data/lib/fastly/models/{historical_service.rb → historical_usage_service.rb} +3 -3
  34. data/lib/fastly/models/historical_usage_service_response.rb +5 -2
  35. data/lib/fastly/models/historical_usage_service_response_all_of.rb +5 -2
  36. data/lib/fastly/models/relationship_mutual_authentication.rb +1 -1
  37. data/lib/fastly/models/relationship_tls_domain.rb +1 -1
  38. data/lib/fastly/models/results.rb +24 -5
  39. data/lib/fastly/models/tls_configuration_response_attributes.rb +1 -1
  40. data/lib/fastly/models/tls_configuration_response_attributes_all_of.rb +1 -1
  41. data/lib/fastly/version.rb +1 -1
  42. data/lib/fastly.rb +9 -14
  43. data/sig.json +1 -1
  44. metadata +20 -30
  45. data/docs/HistoricalFieldAggregateResponse.md +0 -13
  46. data/docs/HistoricalFieldAggregateResponseAllOf.md +0 -10
  47. data/docs/HistoricalFieldResultsAttributes.md +0 -236
  48. data/docs/HistoricalFieldResultsAttributesAdditional.md +0 -11
  49. data/docs/HistoricalUsageAggregateResponse.md +0 -13
  50. data/docs/ReadOnlyIdService.md +0 -9
  51. data/lib/fastly/models/historical_field_aggregate_response_all_of.rb +0 -218
  52. data/lib/fastly/models/historical_field_results_attributes.rb +0 -2484
  53. data/lib/fastly/models/historical_field_results_attributes_additional.rb +0 -225
  54. data/lib/fastly/models/historical_usage_aggregate_response.rb +0 -254
  55. data/lib/fastly/models/read_only_id_service.rb +0 -207
@@ -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 HistoricalFieldAggregateResponseAllOf
16
- attr_accessor :data
17
-
18
- # Attribute mapping from ruby-style variable name to JSON key.
19
- def self.attribute_map
20
- {
21
- :'data' => :'data'
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
- :'data' => :'Array<HistoricalFieldResultsAttributes>'
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::HistoricalFieldAggregateResponseAllOf` 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::HistoricalFieldAggregateResponseAllOf`. 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?(:'data')
59
- if (value = attributes[:'data']).is_a?(Array)
60
- self.data = 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
- data == o.data
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
- [data].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