fastly 5.2.1 → 5.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -0
- data/Gemfile.lock +1 -1
- data/README.md +3 -3
- data/docs/AutomationTokenCreateResponse.md +3 -3
- data/docs/AutomationTokenCreateResponseAllOf.md +3 -3
- data/docs/AutomationTokenResponse.md +2 -2
- data/docs/AutomationTokenResponseAllOf.md +2 -2
- data/docs/AutomationTokensApi.md +4 -3
- data/docs/ErrorResponse.md +13 -0
- data/docs/{HistoricalFieldResponseAllOf.md → HistoricalFieldResponseDataField.md} +1 -1
- data/docs/HistoricalFieldResultsAttributes.md +1 -1
- data/docs/HistoricalFieldResultsAttributesAllOf.md +1 -1
- data/docs/{HistoricalResponseAllOf.md → HistoricalResponseDataField.md} +1 -1
- data/docs/HistoricalService.md +10 -0
- data/docs/HistoricalUsageMonthResponse.md +1 -1
- data/docs/HistoricalUsageMonthResponseAllOf.md +1 -1
- data/docs/{HistoricalUsageMonthResponseAllOfData.md → HistoricalUsageMonthResponseData.md} +2 -2
- data/docs/RateLimiter.md +1 -1
- data/docs/RateLimiterApi.md +122 -0
- data/docs/RateLimiterResponse.md +1 -1
- data/docs/ReadOnlyCustomerId.md +9 -0
- data/docs/ReadOnlyId.md +9 -0
- data/docs/ReadOnlyIdService.md +9 -0
- data/docs/ReadOnlyUserId.md +9 -0
- data/lib/fastly/api/automation_tokens_api.rb +5 -5
- data/lib/fastly/api/rate_limiter_api.rb +345 -0
- data/lib/fastly/configuration.rb +12 -0
- data/lib/fastly/models/automation_token_create_request_attributes.rb +0 -1
- data/lib/fastly/models/automation_token_create_response.rb +3 -6
- data/lib/fastly/models/automation_token_create_response_all_of.rb +3 -6
- data/lib/fastly/models/automation_token_response.rb +2 -4
- data/lib/fastly/models/automation_token_response_all_of.rb +2 -4
- data/lib/fastly/models/{rate_limiter_response1.rb → error_response.rb} +30 -77
- data/lib/fastly/models/historical_field_response.rb +1 -1
- data/lib/fastly/models/{historical_field_response_all_of.rb → historical_field_response_data_field.rb} +3 -3
- data/lib/fastly/models/historical_field_results_attributes.rb +1 -2
- data/lib/fastly/models/historical_field_results_attributes_all_of.rb +1 -2
- data/lib/fastly/models/historical_response.rb +1 -1
- data/lib/fastly/models/{historical_response_all_of.rb → historical_response_data_field.rb} +3 -3
- data/lib/fastly/models/historical_service.rb +217 -0
- data/lib/fastly/models/historical_usage_month_response.rb +1 -1
- data/lib/fastly/models/historical_usage_month_response_all_of.rb +1 -1
- data/lib/fastly/models/{historical_usage_month_response_all_of_data.rb → historical_usage_month_response_data.rb} +4 -4
- data/lib/fastly/models/rate_limiter.rb +5 -2
- data/lib/fastly/models/rate_limiter_response.rb +5 -2
- data/lib/fastly/models/read_only_customer_id.rb +207 -0
- data/lib/fastly/models/read_only_id.rb +207 -0
- data/lib/fastly/models/read_only_id_service.rb +207 -0
- data/lib/fastly/models/read_only_user_id.rb +207 -0
- data/lib/fastly/version.rb +1 -1
- data/lib/fastly.rb +9 -4
- data/sig.json +1 -1
- metadata +20 -10
- data/docs/RateLimiterResponse1.md +0 -12
@@ -0,0 +1,207 @@
|
|
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 ReadOnlyUserId
|
16
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
17
|
+
def self.attribute_map
|
18
|
+
{
|
19
|
+
}
|
20
|
+
end
|
21
|
+
|
22
|
+
# Returns all the JSON keys this model knows about
|
23
|
+
def self.acceptable_attributes
|
24
|
+
attribute_map.values
|
25
|
+
end
|
26
|
+
|
27
|
+
# Attribute type mapping.
|
28
|
+
def self.fastly_types
|
29
|
+
{
|
30
|
+
}
|
31
|
+
end
|
32
|
+
|
33
|
+
# List of attributes with nullable: true
|
34
|
+
def self.fastly_nullable
|
35
|
+
Set.new([
|
36
|
+
])
|
37
|
+
end
|
38
|
+
|
39
|
+
# Initializes the object
|
40
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
41
|
+
def initialize(attributes = {})
|
42
|
+
if (!attributes.is_a?(Hash))
|
43
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::ReadOnlyUserId` initialize method"
|
44
|
+
end
|
45
|
+
|
46
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
47
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
48
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
49
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::ReadOnlyUserId`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
50
|
+
end
|
51
|
+
h[k.to_sym] = v
|
52
|
+
}
|
53
|
+
end
|
54
|
+
|
55
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
56
|
+
# @return Array for valid properties with the reasons
|
57
|
+
def list_invalid_properties
|
58
|
+
invalid_properties = Array.new
|
59
|
+
invalid_properties
|
60
|
+
end
|
61
|
+
|
62
|
+
# Check to see if the all the properties in the model are valid
|
63
|
+
# @return true if the model is valid
|
64
|
+
def valid?
|
65
|
+
true
|
66
|
+
end
|
67
|
+
|
68
|
+
# Checks equality by comparing each attribute.
|
69
|
+
# @param [Object] Object to be compared
|
70
|
+
def ==(o)
|
71
|
+
return true if self.equal?(o)
|
72
|
+
self.class == o.class
|
73
|
+
end
|
74
|
+
|
75
|
+
# @see the `==` method
|
76
|
+
# @param [Object] Object to be compared
|
77
|
+
def eql?(o)
|
78
|
+
self == o
|
79
|
+
end
|
80
|
+
|
81
|
+
# Calculates hash code according to all attributes.
|
82
|
+
# @return [Integer] Hash code
|
83
|
+
def hash
|
84
|
+
[].hash
|
85
|
+
end
|
86
|
+
|
87
|
+
# Builds the object from hash
|
88
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
89
|
+
# @return [Object] Returns the model itself
|
90
|
+
def self.build_from_hash(attributes)
|
91
|
+
new.build_from_hash(attributes)
|
92
|
+
end
|
93
|
+
|
94
|
+
# Builds the object from hash
|
95
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
96
|
+
# @return [Object] Returns the model itself
|
97
|
+
def build_from_hash(attributes)
|
98
|
+
return nil unless attributes.is_a?(Hash)
|
99
|
+
self.class.fastly_types.each_pair do |key, type|
|
100
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key)
|
101
|
+
self.send("#{key}=", nil)
|
102
|
+
elsif type =~ /\AArray<(.*)>/i
|
103
|
+
# check to ensure the input is an array given that the attribute
|
104
|
+
# is documented as an array but the input is not
|
105
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
106
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
107
|
+
end
|
108
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
109
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
self
|
114
|
+
end
|
115
|
+
|
116
|
+
# Deserializes the data based on type
|
117
|
+
# @param string type Data type
|
118
|
+
# @param string value Value to be deserialized
|
119
|
+
# @return [Object] Deserialized data
|
120
|
+
def _deserialize(type, value)
|
121
|
+
case type.to_sym
|
122
|
+
when :Time
|
123
|
+
Time.parse(value)
|
124
|
+
when :Date
|
125
|
+
Date.parse(value)
|
126
|
+
when :String
|
127
|
+
value.to_s
|
128
|
+
when :Integer
|
129
|
+
value.to_i
|
130
|
+
when :Float
|
131
|
+
value.to_f
|
132
|
+
when :Boolean
|
133
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
134
|
+
true
|
135
|
+
else
|
136
|
+
false
|
137
|
+
end
|
138
|
+
when :Object
|
139
|
+
# generic object (usually a Hash), return directly
|
140
|
+
value
|
141
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
142
|
+
inner_type = Regexp.last_match[:inner_type]
|
143
|
+
value.map { |v| _deserialize(inner_type, v) }
|
144
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
145
|
+
k_type = Regexp.last_match[:k_type]
|
146
|
+
v_type = Regexp.last_match[:v_type]
|
147
|
+
{}.tap do |hash|
|
148
|
+
value.each do |k, v|
|
149
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
150
|
+
end
|
151
|
+
end
|
152
|
+
else # model
|
153
|
+
# models (e.g. Pet) or oneOf
|
154
|
+
klass = Fastly.const_get(type)
|
155
|
+
klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
156
|
+
end
|
157
|
+
end
|
158
|
+
|
159
|
+
# Returns the string representation of the object
|
160
|
+
# @return [String] String presentation of the object
|
161
|
+
def to_s
|
162
|
+
to_hash.to_s
|
163
|
+
end
|
164
|
+
|
165
|
+
# to_body is an alias to to_hash (backward compatibility)
|
166
|
+
# @return [Hash] Returns the object in the form of hash
|
167
|
+
def to_body
|
168
|
+
to_hash
|
169
|
+
end
|
170
|
+
|
171
|
+
# Returns the object in the form of hash
|
172
|
+
# @return [Hash] Returns the object in the form of hash
|
173
|
+
def to_hash
|
174
|
+
hash = {}
|
175
|
+
self.class.attribute_map.each_pair do |attr, param|
|
176
|
+
value = self.send(attr)
|
177
|
+
if value.nil?
|
178
|
+
is_nullable = self.class.fastly_nullable.include?(attr)
|
179
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
180
|
+
end
|
181
|
+
|
182
|
+
hash[param] = _to_hash(value)
|
183
|
+
end
|
184
|
+
hash
|
185
|
+
end
|
186
|
+
|
187
|
+
# Outputs non-array value in the form of hash
|
188
|
+
# For object, use to_hash. Otherwise, just return the value
|
189
|
+
# @param [Object] value Any valid value
|
190
|
+
# @return [Hash] Returns the value in the form of hash
|
191
|
+
def _to_hash(value)
|
192
|
+
if value.is_a?(Array)
|
193
|
+
value.compact.map { |v| _to_hash(v) }
|
194
|
+
elsif value.is_a?(Hash)
|
195
|
+
{}.tap do |hash|
|
196
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
197
|
+
end
|
198
|
+
elsif value.respond_to? :to_hash
|
199
|
+
value.to_hash
|
200
|
+
else
|
201
|
+
value
|
202
|
+
end
|
203
|
+
end
|
204
|
+
|
205
|
+
end
|
206
|
+
|
207
|
+
end
|
data/lib/fastly/version.rb
CHANGED
data/lib/fastly.rb
CHANGED
@@ -99,6 +99,7 @@ require 'fastly/models/enabled_product_response'
|
|
99
99
|
require 'fastly/models/enabled_product_response_links'
|
100
100
|
require 'fastly/models/enabled_product_response_product'
|
101
101
|
require 'fastly/models/enabled_product_response_service'
|
102
|
+
require 'fastly/models/error_response'
|
102
103
|
require 'fastly/models/event'
|
103
104
|
require 'fastly/models/event_attributes'
|
104
105
|
require 'fastly/models/event_response'
|
@@ -117,18 +118,19 @@ require 'fastly/models/historical_aggregate_response_all_of'
|
|
117
118
|
require 'fastly/models/historical_field_aggregate_response'
|
118
119
|
require 'fastly/models/historical_field_aggregate_response_all_of'
|
119
120
|
require 'fastly/models/historical_field_response'
|
120
|
-
require 'fastly/models/
|
121
|
+
require 'fastly/models/historical_field_response_data_field'
|
121
122
|
require 'fastly/models/historical_field_results_attributes'
|
122
123
|
require 'fastly/models/historical_field_results_attributes_all_of'
|
123
124
|
require 'fastly/models/historical_meta'
|
124
125
|
require 'fastly/models/historical_regions_response'
|
125
126
|
require 'fastly/models/historical_regions_response_all_of'
|
126
127
|
require 'fastly/models/historical_response'
|
127
|
-
require 'fastly/models/
|
128
|
+
require 'fastly/models/historical_response_data_field'
|
129
|
+
require 'fastly/models/historical_service'
|
128
130
|
require 'fastly/models/historical_usage_aggregate_response'
|
129
131
|
require 'fastly/models/historical_usage_month_response'
|
130
132
|
require 'fastly/models/historical_usage_month_response_all_of'
|
131
|
-
require 'fastly/models/
|
133
|
+
require 'fastly/models/historical_usage_month_response_data'
|
132
134
|
require 'fastly/models/historical_usage_results'
|
133
135
|
require 'fastly/models/historical_usage_service_response'
|
134
136
|
require 'fastly/models/historical_usage_service_response_all_of'
|
@@ -283,8 +285,11 @@ require 'fastly/models/purge_keys'
|
|
283
285
|
require 'fastly/models/purge_response'
|
284
286
|
require 'fastly/models/rate_limiter'
|
285
287
|
require 'fastly/models/rate_limiter_response'
|
286
|
-
require 'fastly/models/rate_limiter_response1'
|
287
288
|
require 'fastly/models/rate_limiter_response_all_of'
|
289
|
+
require 'fastly/models/read_only_customer_id'
|
290
|
+
require 'fastly/models/read_only_id'
|
291
|
+
require 'fastly/models/read_only_id_service'
|
292
|
+
require 'fastly/models/read_only_user_id'
|
288
293
|
require 'fastly/models/realtime'
|
289
294
|
require 'fastly/models/realtime_entry'
|
290
295
|
require 'fastly/models/realtime_measurements'
|
data/sig.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"G": "
|
1
|
+
{"G": "4f949974", "D": "92c7d13f"}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fastly
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-06-
|
11
|
+
date: 2023-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -158,6 +158,7 @@ files:
|
|
158
158
|
- docs/EnabledProductResponseProduct.md
|
159
159
|
- docs/EnabledProductResponseService.md
|
160
160
|
- docs/EnabledProductsApi.md
|
161
|
+
- docs/ErrorResponse.md
|
161
162
|
- docs/Event.md
|
162
163
|
- docs/EventAttributes.md
|
163
164
|
- docs/EventResponse.md
|
@@ -181,18 +182,19 @@ files:
|
|
181
182
|
- docs/HistoricalFieldAggregateResponse.md
|
182
183
|
- docs/HistoricalFieldAggregateResponseAllOf.md
|
183
184
|
- docs/HistoricalFieldResponse.md
|
184
|
-
- docs/
|
185
|
+
- docs/HistoricalFieldResponseDataField.md
|
185
186
|
- docs/HistoricalFieldResultsAttributes.md
|
186
187
|
- docs/HistoricalFieldResultsAttributesAllOf.md
|
187
188
|
- docs/HistoricalMeta.md
|
188
189
|
- docs/HistoricalRegionsResponse.md
|
189
190
|
- docs/HistoricalRegionsResponseAllOf.md
|
190
191
|
- docs/HistoricalResponse.md
|
191
|
-
- docs/
|
192
|
+
- docs/HistoricalResponseDataField.md
|
193
|
+
- docs/HistoricalService.md
|
192
194
|
- docs/HistoricalUsageAggregateResponse.md
|
193
195
|
- docs/HistoricalUsageMonthResponse.md
|
194
196
|
- docs/HistoricalUsageMonthResponseAllOf.md
|
195
|
-
- docs/
|
197
|
+
- docs/HistoricalUsageMonthResponseData.md
|
196
198
|
- docs/HistoricalUsageResults.md
|
197
199
|
- docs/HistoricalUsageServiceResponse.md
|
198
200
|
- docs/HistoricalUsageServiceResponseAllOf.md
|
@@ -389,8 +391,11 @@ files:
|
|
389
391
|
- docs/RateLimiter.md
|
390
392
|
- docs/RateLimiterApi.md
|
391
393
|
- docs/RateLimiterResponse.md
|
392
|
-
- docs/RateLimiterResponse1.md
|
393
394
|
- docs/RateLimiterResponseAllOf.md
|
395
|
+
- docs/ReadOnlyCustomerId.md
|
396
|
+
- docs/ReadOnlyId.md
|
397
|
+
- docs/ReadOnlyIdService.md
|
398
|
+
- docs/ReadOnlyUserId.md
|
394
399
|
- docs/Realtime.md
|
395
400
|
- docs/RealtimeApi.md
|
396
401
|
- docs/RealtimeEntry.md
|
@@ -940,6 +945,7 @@ files:
|
|
940
945
|
- lib/fastly/models/enabled_product_response_links.rb
|
941
946
|
- lib/fastly/models/enabled_product_response_product.rb
|
942
947
|
- lib/fastly/models/enabled_product_response_service.rb
|
948
|
+
- lib/fastly/models/error_response.rb
|
943
949
|
- lib/fastly/models/event.rb
|
944
950
|
- lib/fastly/models/event_attributes.rb
|
945
951
|
- lib/fastly/models/event_response.rb
|
@@ -958,18 +964,19 @@ files:
|
|
958
964
|
- lib/fastly/models/historical_field_aggregate_response.rb
|
959
965
|
- lib/fastly/models/historical_field_aggregate_response_all_of.rb
|
960
966
|
- lib/fastly/models/historical_field_response.rb
|
961
|
-
- lib/fastly/models/
|
967
|
+
- lib/fastly/models/historical_field_response_data_field.rb
|
962
968
|
- lib/fastly/models/historical_field_results_attributes.rb
|
963
969
|
- lib/fastly/models/historical_field_results_attributes_all_of.rb
|
964
970
|
- lib/fastly/models/historical_meta.rb
|
965
971
|
- lib/fastly/models/historical_regions_response.rb
|
966
972
|
- lib/fastly/models/historical_regions_response_all_of.rb
|
967
973
|
- lib/fastly/models/historical_response.rb
|
968
|
-
- lib/fastly/models/
|
974
|
+
- lib/fastly/models/historical_response_data_field.rb
|
975
|
+
- lib/fastly/models/historical_service.rb
|
969
976
|
- lib/fastly/models/historical_usage_aggregate_response.rb
|
970
977
|
- lib/fastly/models/historical_usage_month_response.rb
|
971
978
|
- lib/fastly/models/historical_usage_month_response_all_of.rb
|
972
|
-
- lib/fastly/models/
|
979
|
+
- lib/fastly/models/historical_usage_month_response_data.rb
|
973
980
|
- lib/fastly/models/historical_usage_results.rb
|
974
981
|
- lib/fastly/models/historical_usage_service_response.rb
|
975
982
|
- lib/fastly/models/historical_usage_service_response_all_of.rb
|
@@ -1124,8 +1131,11 @@ files:
|
|
1124
1131
|
- lib/fastly/models/purge_response.rb
|
1125
1132
|
- lib/fastly/models/rate_limiter.rb
|
1126
1133
|
- lib/fastly/models/rate_limiter_response.rb
|
1127
|
-
- lib/fastly/models/rate_limiter_response1.rb
|
1128
1134
|
- lib/fastly/models/rate_limiter_response_all_of.rb
|
1135
|
+
- lib/fastly/models/read_only_customer_id.rb
|
1136
|
+
- lib/fastly/models/read_only_id.rb
|
1137
|
+
- lib/fastly/models/read_only_id_service.rb
|
1138
|
+
- lib/fastly/models/read_only_user_id.rb
|
1129
1139
|
- lib/fastly/models/realtime.rb
|
1130
1140
|
- lib/fastly/models/realtime_entry.rb
|
1131
1141
|
- lib/fastly/models/realtime_measurements.rb
|
@@ -1,12 +0,0 @@
|
|
1
|
-
# Fastly::RateLimiterResponse1
|
2
|
-
|
3
|
-
## Properties
|
4
|
-
|
5
|
-
| Name | Type | Description | Notes |
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **status** | **Integer** | HTTP status code for custom limit enforcement response. | [optional] |
|
8
|
-
| **content_type** | **String** | MIME type for custom limit enforcement response. | [optional] |
|
9
|
-
| **content** | **String** | Response body for custom limit enforcement response. | [optional] |
|
10
|
-
|
11
|
-
[[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
|
12
|
-
|