fastly 8.10.0 → 9.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +27 -1
  3. data/Gemfile.lock +1 -1
  4. data/README.md +15 -4
  5. data/docs/AccessKey.md +12 -0
  6. data/docs/AccessKeyResponse.md +15 -0
  7. data/docs/AclsInComputeApi.md +2 -2
  8. data/docs/BillingUsageMetricsApi.md +13 -19
  9. data/docs/ComputeAclUpdate.md +10 -0
  10. data/docs/DimensionAttributesCountryStats.md +12 -0
  11. data/docs/DimensionAttributesRate.md +10 -0
  12. data/docs/DimensionBrowser.md +10 -0
  13. data/docs/DimensionContentType.md +10 -0
  14. data/docs/DimensionCountry.md +10 -0
  15. data/docs/DimensionDevice.md +10 -0
  16. data/docs/DimensionOs.md +10 -0
  17. data/docs/DimensionResponse.md +10 -0
  18. data/docs/DimensionStatusCode.md +10 -0
  19. data/docs/DimensionUrl.md +10 -0
  20. data/docs/EnabledProductsApi.md +5 -5
  21. data/docs/FilterFieldItem.md +12 -0
  22. data/docs/GetLogInsightsResponse.md +11 -0
  23. data/docs/GetLogRecordsResponse.md +11 -0
  24. data/docs/GetLogRecordsResponseMeta.md +10 -0
  25. data/docs/GetLogRecordsResponseMetaFilters.md +16 -0
  26. data/docs/InsightsApi.md +69 -0
  27. data/docs/KvStoreItemApi.md +2 -0
  28. data/docs/LogExplorerApi.md +65 -0
  29. data/docs/LogInsights.md +12 -0
  30. data/docs/LogInsightsDimensionAttributes.md +49 -0
  31. data/docs/LogInsightsDimensions.md +61 -0
  32. data/docs/LogInsightsMeta.md +10 -0
  33. data/docs/LogInsightsMetaFilter.md +14 -0
  34. data/docs/LogInsightsValues.md +65 -0
  35. data/docs/LogPropertyServiceId.md +9 -0
  36. data/docs/LogRecord.md +37 -0
  37. data/docs/LoggingGrafanacloudlogsAdditional.md +14 -0
  38. data/docs/LoggingGrafanacloudlogsApi.md +259 -0
  39. data/docs/LoggingGrafanacloudlogsResponse.md +23 -0
  40. data/docs/ObjectStorageAccessKeysApi.md +163 -0
  41. data/docs/RealtimeEntryAggregated.md +3 -7
  42. data/docs/RealtimeMeasurements.md +3 -7
  43. data/docs/Results.md +3 -7
  44. data/docs/SetConfiguration.md +1 -0
  45. data/docs/Usagemetric.md +18 -0
  46. data/docs/Usagemetrics.md +10 -0
  47. data/docs/ValueField.md +59 -0
  48. data/docs/Values503Responses.md +12 -0
  49. data/docs/ValuesBandwidth.md +11 -0
  50. data/docs/ValuesBrowser.md +11 -0
  51. data/docs/ValuesCacheHitRatio.md +10 -0
  52. data/docs/ValuesCountryStats.md +12 -0
  53. data/docs/ValuesDuration.md +12 -0
  54. data/docs/ValuesMisses.md +10 -0
  55. data/docs/ValuesRate.md +10 -0
  56. data/docs/ValuesRequests.md +10 -0
  57. data/docs/ValuesStatusCodes.md +12 -0
  58. data/lib/fastly/api/acls_in_compute_api.rb +3 -3
  59. data/lib/fastly/api/billing_usage_metrics_api.rb +30 -57
  60. data/lib/fastly/api/enabled_products_api.rb +10 -10
  61. data/lib/fastly/api/insights_api.rb +125 -0
  62. data/lib/fastly/api/kv_store_item_api.rb +3 -0
  63. data/lib/fastly/api/log_explorer_api.rb +109 -0
  64. data/lib/fastly/api/logging_grafanacloudlogs_api.rb +471 -0
  65. data/lib/fastly/api/object_storage_access_keys_api.rb +263 -0
  66. data/lib/fastly/configuration.rb +67 -1
  67. data/lib/fastly/models/access_key.rb +248 -0
  68. data/lib/fastly/models/access_key_response.rb +269 -0
  69. data/lib/fastly/models/compute_acl_list_entries.rb +1 -1
  70. data/lib/fastly/models/compute_acl_lookup.rb +1 -1
  71. data/lib/fastly/models/compute_acl_update.rb +219 -0
  72. data/lib/fastly/models/compute_acl_update_entry.rb +1 -1
  73. data/lib/fastly/models/dimension_attributes_country_stats.rb +237 -0
  74. data/lib/fastly/models/dimension_attributes_rate.rb +217 -0
  75. data/lib/fastly/models/dimension_browser.rb +217 -0
  76. data/lib/fastly/models/dimension_content_type.rb +217 -0
  77. data/lib/fastly/models/dimension_country.rb +217 -0
  78. data/lib/fastly/models/dimension_device.rb +217 -0
  79. data/lib/fastly/models/dimension_os.rb +217 -0
  80. data/lib/fastly/models/dimension_response.rb +217 -0
  81. data/lib/fastly/models/dimension_status_code.rb +217 -0
  82. data/lib/fastly/models/dimension_url.rb +217 -0
  83. data/lib/fastly/models/filter_field_item.rb +271 -0
  84. data/lib/fastly/models/get_log_insights_response.rb +227 -0
  85. data/lib/fastly/models/get_log_records_response.rb +227 -0
  86. data/lib/fastly/models/get_log_records_response_meta.rb +216 -0
  87. data/lib/fastly/models/get_log_records_response_meta_filters.rb +307 -0
  88. data/lib/fastly/models/log_insights.rb +234 -0
  89. data/lib/fastly/models/log_insights_dimension_attributes.rb +103 -0
  90. data/lib/fastly/models/log_insights_dimensions.rb +109 -0
  91. data/lib/fastly/models/log_insights_meta.rb +217 -0
  92. data/lib/fastly/models/log_insights_meta_filter.rb +284 -0
  93. data/lib/fastly/models/log_insights_values.rb +111 -0
  94. data/lib/fastly/models/log_property_service_id.rb +208 -0
  95. data/lib/fastly/models/log_record.rb +486 -0
  96. data/lib/fastly/models/logging_grafanacloudlogs_additional.rb +257 -0
  97. data/lib/fastly/models/logging_grafanacloudlogs_response.rb +408 -0
  98. data/lib/fastly/models/realtime_entry_aggregated.rb +34 -74
  99. data/lib/fastly/models/realtime_measurements.rb +34 -74
  100. data/lib/fastly/models/results.rb +31 -71
  101. data/lib/fastly/models/set_configuration.rb +14 -4
  102. data/lib/fastly/models/usagemetric.rb +297 -0
  103. data/lib/fastly/models/usagemetrics.rb +218 -0
  104. data/lib/fastly/models/value_field.rb +108 -0
  105. data/lib/fastly/models/values503_responses.rb +237 -0
  106. data/lib/fastly/models/values_bandwidth.rb +227 -0
  107. data/lib/fastly/models/values_browser.rb +227 -0
  108. data/lib/fastly/models/values_cache_hit_ratio.rb +217 -0
  109. data/lib/fastly/models/values_country_stats.rb +237 -0
  110. data/lib/fastly/models/values_duration.rb +237 -0
  111. data/lib/fastly/models/values_misses.rb +217 -0
  112. data/lib/fastly/models/values_rate.rb +217 -0
  113. data/lib/fastly/models/values_requests.rb +217 -0
  114. data/lib/fastly/models/values_status_codes.rb +237 -0
  115. data/lib/fastly/version.rb +1 -1
  116. data/lib/fastly.rb +45 -0
  117. data/sig.json +1 -1
  118. metadata +92 -2
@@ -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 GetLogRecordsResponse
16
+ attr_accessor :data
17
+
18
+ attr_accessor :meta
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'data' => :'data',
24
+ :'meta' => :'meta'
25
+ }
26
+ end
27
+
28
+ # Returns all the JSON keys this model knows about
29
+ def self.acceptable_attributes
30
+ attribute_map.values
31
+ end
32
+
33
+ # Attribute type mapping.
34
+ def self.fastly_types
35
+ {
36
+ :'data' => :'Array<LogRecord>',
37
+ :'meta' => :'GetLogRecordsResponseMeta'
38
+ }
39
+ end
40
+
41
+ # List of attributes with nullable: true
42
+ def self.fastly_nullable
43
+ Set.new([
44
+ ])
45
+ end
46
+
47
+ # Initializes the object
48
+ # @param [Hash] attributes Model attributes in the form of hash
49
+ def initialize(attributes = {})
50
+ if (!attributes.is_a?(Hash))
51
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::GetLogRecordsResponse` initialize method"
52
+ end
53
+
54
+ # check to see if the attribute exists and convert string to symbol for hash key
55
+ attributes = attributes.each_with_object({}) { |(k, v), h|
56
+ if (!self.class.attribute_map.key?(k.to_sym))
57
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::GetLogRecordsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
58
+ end
59
+ h[k.to_sym] = v
60
+ }
61
+
62
+ if attributes.key?(:'data')
63
+ if (value = attributes[:'data']).is_a?(Array)
64
+ self.data = value
65
+ end
66
+ end
67
+
68
+ if attributes.key?(:'meta')
69
+ self.meta = attributes[:'meta']
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
+ data == o.data &&
92
+ meta == o.meta
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
+ [data, meta].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,216 @@
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 GetLogRecordsResponseMeta
16
+ attr_accessor :filters
17
+
18
+ # Attribute mapping from ruby-style variable name to JSON key.
19
+ def self.attribute_map
20
+ {
21
+ :'filters' => :'filters'
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
+ :'filters' => :'GetLogRecordsResponseMetaFilters'
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::GetLogRecordsResponseMeta` 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::GetLogRecordsResponseMeta`. 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?(:'filters')
59
+ self.filters = attributes[:'filters']
60
+ end
61
+ end
62
+
63
+ # Show invalid properties with the reasons. Usually used together with valid?
64
+ # @return Array for valid properties with the reasons
65
+ def list_invalid_properties
66
+ invalid_properties = Array.new
67
+ invalid_properties
68
+ end
69
+
70
+ # Check to see if the all the properties in the model are valid
71
+ # @return true if the model is valid
72
+ def valid?
73
+ true
74
+ end
75
+
76
+ # Checks equality by comparing each attribute.
77
+ # @param [Object] Object to be compared
78
+ def ==(o)
79
+ return true if self.equal?(o)
80
+ self.class == o.class &&
81
+ filters == o.filters
82
+ end
83
+
84
+ # @see the `==` method
85
+ # @param [Object] Object to be compared
86
+ def eql?(o)
87
+ self == o
88
+ end
89
+
90
+ # Calculates hash code according to all attributes.
91
+ # @return [Integer] Hash code
92
+ def hash
93
+ [filters].hash
94
+ end
95
+
96
+ # Builds the object from hash
97
+ # @param [Hash] attributes Model attributes in the form of hash
98
+ # @return [Object] Returns the model itself
99
+ def self.build_from_hash(attributes)
100
+ new.build_from_hash(attributes)
101
+ end
102
+
103
+ # Builds the object from hash
104
+ # @param [Hash] attributes Model attributes in the form of hash
105
+ # @return [Object] Returns the model itself
106
+ def build_from_hash(attributes)
107
+ return nil unless attributes.is_a?(Hash)
108
+ self.class.fastly_types.each_pair do |key, type|
109
+ if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key)
110
+ self.send("#{key}=", nil)
111
+ elsif type =~ /\AArray<(.*)>/i
112
+ # check to ensure the input is an array given that the attribute
113
+ # is documented as an array but the input is not
114
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
115
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
116
+ end
117
+ elsif !attributes[self.class.attribute_map[key]].nil?
118
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
119
+ end
120
+ end
121
+
122
+ self
123
+ end
124
+
125
+ # Deserializes the data based on type
126
+ # @param string type Data type
127
+ # @param string value Value to be deserialized
128
+ # @return [Object] Deserialized data
129
+ def _deserialize(type, value)
130
+ case type.to_sym
131
+ when :Time
132
+ Time.parse(value)
133
+ when :Date
134
+ Date.parse(value)
135
+ when :String
136
+ value.to_s
137
+ when :Integer
138
+ value.to_i
139
+ when :Float
140
+ value.to_f
141
+ when :Boolean
142
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
143
+ true
144
+ else
145
+ false
146
+ end
147
+ when :Object
148
+ # generic object (usually a Hash), return directly
149
+ value
150
+ when /\AArray<(?<inner_type>.+)>\z/
151
+ inner_type = Regexp.last_match[:inner_type]
152
+ value.map { |v| _deserialize(inner_type, v) }
153
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
154
+ k_type = Regexp.last_match[:k_type]
155
+ v_type = Regexp.last_match[:v_type]
156
+ {}.tap do |hash|
157
+ value.each do |k, v|
158
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
159
+ end
160
+ end
161
+ else # model
162
+ # models (e.g. Pet) or oneOf
163
+ klass = Fastly.const_get(type)
164
+ klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value)
165
+ end
166
+ end
167
+
168
+ # Returns the string representation of the object
169
+ # @return [String] String presentation of the object
170
+ def to_s
171
+ to_hash.to_s
172
+ end
173
+
174
+ # to_body is an alias to to_hash (backward compatibility)
175
+ # @return [Hash] Returns the object in the form of hash
176
+ def to_body
177
+ to_hash
178
+ end
179
+
180
+ # Returns the object in the form of hash
181
+ # @return [Hash] Returns the object in the form of hash
182
+ def to_hash
183
+ hash = {}
184
+ self.class.attribute_map.each_pair do |attr, param|
185
+ value = self.send(attr)
186
+ if value.nil?
187
+ is_nullable = self.class.fastly_nullable.include?(attr)
188
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
189
+ end
190
+
191
+ hash[param] = _to_hash(value)
192
+ end
193
+ hash
194
+ end
195
+
196
+ # Outputs non-array value in the form of hash
197
+ # For object, use to_hash. Otherwise, just return the value
198
+ # @param [Object] value Any valid value
199
+ # @return [Hash] Returns the value in the form of hash
200
+ def _to_hash(value)
201
+ if value.is_a?(Array)
202
+ value.compact.map { |v| _to_hash(v) }
203
+ elsif value.is_a?(Hash)
204
+ {}.tap do |hash|
205
+ value.each { |k, v| hash[k] = _to_hash(v) }
206
+ end
207
+ elsif value.respond_to? :to_hash
208
+ value.to_hash
209
+ else
210
+ value
211
+ end
212
+ end
213
+
214
+ end
215
+
216
+ end