fastly 8.8.0 → 8.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (98) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +23 -1
  3. data/Gemfile.lock +1 -1
  4. data/README.md +30 -3
  5. data/docs/AclsInComputeApi.md +284 -0
  6. data/docs/{OriginInspectorRealtimeEntryRecorded.md → ComputeAclCreateAclsRequest.md} +2 -1
  7. data/docs/ComputeAclCreateAclsResponse.md +11 -0
  8. data/docs/ComputeAclListEntries.md +11 -0
  9. data/docs/ComputeAclListEntriesItem.md +11 -0
  10. data/docs/ComputeAclListEntriesMeta.md +11 -0
  11. data/docs/ComputeAclLookup.md +12 -0
  12. data/docs/ComputeAclUpdateEntry.md +12 -0
  13. data/docs/ConfiguredProductResponse.md +13 -0
  14. data/docs/ConfiguredProductResponseConfiguration.md +11 -0
  15. data/docs/ConfiguredProductResponseLinks.md +11 -0
  16. data/docs/ConfiguredProductResponseProduct.md +11 -0
  17. data/docs/ContactApi.md +1 -1
  18. data/docs/CustomerAddress.md +16 -0
  19. data/docs/CustomerAddressesApi.md +127 -0
  20. data/docs/DomainInspector.md +1 -1
  21. data/docs/DomainInspectorRealtimeEntry.md +1 -1
  22. data/docs/EnabledProductsApi.md +93 -9
  23. data/docs/Environment.md +12 -0
  24. data/docs/{RecordedTimestamp.md → EnvironmentName.md} +1 -1
  25. data/docs/{OriginInspectorSubsequentRequestTimestamp.md → InlineResponse201.md} +2 -1
  26. data/docs/{SubsequentRequestTimestamp.md → ListCustomerAddressesResponse.md} +2 -1
  27. data/docs/OriginInspector.md +1 -1
  28. data/docs/OriginInspectorRealtimeEntry.md +1 -1
  29. data/docs/RealtimeEntryAggregated.md +1 -0
  30. data/docs/RealtimeMeasurements.md +1 -0
  31. data/docs/Results.md +1 -0
  32. data/docs/SchemasVersionResponse.md +1 -0
  33. data/docs/ServiceDetail.md +1 -0
  34. data/docs/ServiceListResponse.md +1 -0
  35. data/docs/ServiceListResponseAllOf.md +1 -0
  36. data/docs/ServiceResponse.md +1 -0
  37. data/docs/ServiceResponseAllOf.md +1 -0
  38. data/docs/ServiceVersionDetail.md +1 -0
  39. data/docs/ServiceVersionDetailOrNull.md +1 -0
  40. data/docs/SetConfiguration.md +11 -0
  41. data/docs/SetWorkspaceId.md +10 -0
  42. data/docs/TlsCertificatesApi.md +2 -2
  43. data/docs/TlsDomainsApi.md +2 -2
  44. data/docs/TlsSubscriptionsApi.md +2 -2
  45. data/docs/VersionApi.md +84 -0
  46. data/docs/VersionResponse.md +1 -0
  47. data/docs/VersionResponseAllOf.md +1 -0
  48. data/lib/fastly/api/acls_in_compute_api.rb +470 -0
  49. data/lib/fastly/api/contact_api.rb +1 -1
  50. data/lib/fastly/api/customer_addresses_api.rb +224 -0
  51. data/lib/fastly/api/enabled_products_api.rb +164 -10
  52. data/lib/fastly/api/tls_certificates_api.rb +7 -7
  53. data/lib/fastly/api/tls_domains_api.rb +7 -7
  54. data/lib/fastly/api/tls_subscriptions_api.rb +7 -7
  55. data/lib/fastly/api/version_api.rb +154 -0
  56. data/lib/fastly/configuration.rb +84 -0
  57. data/lib/fastly/models/billing_response_line_item.rb +10 -0
  58. data/lib/fastly/models/{origin_inspector_realtime_entry_recorded.rb → compute_acl_create_acls_request.rb} +15 -6
  59. data/lib/fastly/models/compute_acl_create_acls_response.rb +227 -0
  60. data/lib/fastly/models/compute_acl_list_entries.rb +228 -0
  61. data/lib/fastly/models/compute_acl_list_entries_item.rb +227 -0
  62. data/lib/fastly/models/compute_acl_list_entries_meta.rb +227 -0
  63. data/lib/fastly/models/compute_acl_lookup.rb +238 -0
  64. data/lib/fastly/models/compute_acl_update_entry.rb +238 -0
  65. data/lib/fastly/models/configured_product_response.rb +243 -0
  66. data/lib/fastly/models/configured_product_response_configuration.rb +227 -0
  67. data/lib/fastly/models/configured_product_response_links.rb +227 -0
  68. data/lib/fastly/models/configured_product_response_product.rb +227 -0
  69. data/lib/fastly/models/customer_address.rb +294 -0
  70. data/lib/fastly/models/domain_inspector.rb +2 -1
  71. data/lib/fastly/models/domain_inspector_realtime_entry.rb +2 -1
  72. data/lib/fastly/models/environment.rb +235 -0
  73. data/lib/fastly/models/environment_name.rb +34 -0
  74. data/lib/fastly/models/event_attributes.rb +2 -2
  75. data/lib/fastly/models/{recorded_timestamp.rb → inline_response201.rb} +15 -6
  76. data/lib/fastly/models/line_item_data.rb +10 -0
  77. data/lib/fastly/models/{origin_inspector_subsequent_request_timestamp.rb → list_customer_addresses_response.rb} +16 -6
  78. data/lib/fastly/models/origin_inspector.rb +2 -1
  79. data/lib/fastly/models/origin_inspector_realtime_entry.rb +2 -1
  80. data/lib/fastly/models/realtime_entry_aggregated.rb +14 -4
  81. data/lib/fastly/models/realtime_measurements.rb +14 -4
  82. data/lib/fastly/models/results.rb +11 -1
  83. data/lib/fastly/models/schemas_version_response.rb +16 -4
  84. data/lib/fastly/models/service_detail.rb +13 -1
  85. data/lib/fastly/models/service_list_response.rb +16 -4
  86. data/lib/fastly/models/service_list_response_all_of.rb +16 -4
  87. data/lib/fastly/models/service_response.rb +16 -4
  88. data/lib/fastly/models/service_response_all_of.rb +16 -4
  89. data/lib/fastly/models/service_version_detail.rb +13 -1
  90. data/lib/fastly/models/service_version_detail_or_null.rb +13 -1
  91. data/lib/fastly/models/set_configuration.rb +227 -0
  92. data/lib/fastly/models/{subsequent_request_timestamp.rb → set_workspace_id.rb} +15 -6
  93. data/lib/fastly/models/version_response.rb +16 -4
  94. data/lib/fastly/models/version_response_all_of.rb +16 -4
  95. data/lib/fastly/version.rb +1 -1
  96. data/lib/fastly.rb +20 -4
  97. data/sig.json +1 -1
  98. metadata +42 -10
@@ -0,0 +1,238 @@
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
+ # An example of an ACL Lookup response.
16
+ class ComputeAclLookup
17
+ # A valid IPv4 or IPv6 address.
18
+ attr_accessor :prefix
19
+
20
+ # The length of address in the IP addressing space.
21
+ attr_accessor :length
22
+
23
+ # One of \"ALLOW\" or \"BLOCK\".
24
+ attr_accessor :action
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'prefix' => :'prefix',
30
+ :'length' => :'length',
31
+ :'action' => :'action'
32
+ }
33
+ end
34
+
35
+ # Returns all the JSON keys this model knows about
36
+ def self.acceptable_attributes
37
+ attribute_map.values
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.fastly_types
42
+ {
43
+ :'prefix' => :'String',
44
+ :'length' => :'Integer',
45
+ :'action' => :'String'
46
+ }
47
+ end
48
+
49
+ # List of attributes with nullable: true
50
+ def self.fastly_nullable
51
+ Set.new([
52
+ ])
53
+ end
54
+
55
+ # Initializes the object
56
+ # @param [Hash] attributes Model attributes in the form of hash
57
+ def initialize(attributes = {})
58
+ if (!attributes.is_a?(Hash))
59
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::ComputeAclLookup` initialize method"
60
+ end
61
+
62
+ # check to see if the attribute exists and convert string to symbol for hash key
63
+ attributes = attributes.each_with_object({}) { |(k, v), h|
64
+ if (!self.class.attribute_map.key?(k.to_sym))
65
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::ComputeAclLookup`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
66
+ end
67
+ h[k.to_sym] = v
68
+ }
69
+
70
+ if attributes.key?(:'prefix')
71
+ self.prefix = attributes[:'prefix']
72
+ end
73
+
74
+ if attributes.key?(:'length')
75
+ self.length = attributes[:'length']
76
+ end
77
+
78
+ if attributes.key?(:'action')
79
+ self.action = attributes[:'action']
80
+ end
81
+ end
82
+
83
+ # Show invalid properties with the reasons. Usually used together with valid?
84
+ # @return Array for valid properties with the reasons
85
+ def list_invalid_properties
86
+ invalid_properties = Array.new
87
+ invalid_properties
88
+ end
89
+
90
+ # Check to see if the all the properties in the model are valid
91
+ # @return true if the model is valid
92
+ def valid?
93
+ true
94
+ end
95
+
96
+ # Checks equality by comparing each attribute.
97
+ # @param [Object] Object to be compared
98
+ def ==(o)
99
+ return true if self.equal?(o)
100
+ self.class == o.class &&
101
+ prefix == o.prefix &&
102
+ length == o.length &&
103
+ action == o.action
104
+ end
105
+
106
+ # @see the `==` method
107
+ # @param [Object] Object to be compared
108
+ def eql?(o)
109
+ self == o
110
+ end
111
+
112
+ # Calculates hash code according to all attributes.
113
+ # @return [Integer] Hash code
114
+ def hash
115
+ [prefix, length, action].hash
116
+ end
117
+
118
+ # Builds the object from hash
119
+ # @param [Hash] attributes Model attributes in the form of hash
120
+ # @return [Object] Returns the model itself
121
+ def self.build_from_hash(attributes)
122
+ new.build_from_hash(attributes)
123
+ end
124
+
125
+ # Builds the object from hash
126
+ # @param [Hash] attributes Model attributes in the form of hash
127
+ # @return [Object] Returns the model itself
128
+ def build_from_hash(attributes)
129
+ return nil unless attributes.is_a?(Hash)
130
+ self.class.fastly_types.each_pair do |key, type|
131
+ if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key)
132
+ self.send("#{key}=", nil)
133
+ elsif type =~ /\AArray<(.*)>/i
134
+ # check to ensure the input is an array given that the attribute
135
+ # is documented as an array but the input is not
136
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
137
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
138
+ end
139
+ elsif !attributes[self.class.attribute_map[key]].nil?
140
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
141
+ end
142
+ end
143
+
144
+ self
145
+ end
146
+
147
+ # Deserializes the data based on type
148
+ # @param string type Data type
149
+ # @param string value Value to be deserialized
150
+ # @return [Object] Deserialized data
151
+ def _deserialize(type, value)
152
+ case type.to_sym
153
+ when :Time
154
+ Time.parse(value)
155
+ when :Date
156
+ Date.parse(value)
157
+ when :String
158
+ value.to_s
159
+ when :Integer
160
+ value.to_i
161
+ when :Float
162
+ value.to_f
163
+ when :Boolean
164
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
165
+ true
166
+ else
167
+ false
168
+ end
169
+ when :Object
170
+ # generic object (usually a Hash), return directly
171
+ value
172
+ when /\AArray<(?<inner_type>.+)>\z/
173
+ inner_type = Regexp.last_match[:inner_type]
174
+ value.map { |v| _deserialize(inner_type, v) }
175
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
176
+ k_type = Regexp.last_match[:k_type]
177
+ v_type = Regexp.last_match[:v_type]
178
+ {}.tap do |hash|
179
+ value.each do |k, v|
180
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
181
+ end
182
+ end
183
+ else # model
184
+ # models (e.g. Pet) or oneOf
185
+ klass = Fastly.const_get(type)
186
+ klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value)
187
+ end
188
+ end
189
+
190
+ # Returns the string representation of the object
191
+ # @return [String] String presentation of the object
192
+ def to_s
193
+ to_hash.to_s
194
+ end
195
+
196
+ # to_body is an alias to to_hash (backward compatibility)
197
+ # @return [Hash] Returns the object in the form of hash
198
+ def to_body
199
+ to_hash
200
+ end
201
+
202
+ # Returns the object in the form of hash
203
+ # @return [Hash] Returns the object in the form of hash
204
+ def to_hash
205
+ hash = {}
206
+ self.class.attribute_map.each_pair do |attr, param|
207
+ value = self.send(attr)
208
+ if value.nil?
209
+ is_nullable = self.class.fastly_nullable.include?(attr)
210
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
211
+ end
212
+
213
+ hash[param] = _to_hash(value)
214
+ end
215
+ hash
216
+ end
217
+
218
+ # Outputs non-array value in the form of hash
219
+ # For object, use to_hash. Otherwise, just return the value
220
+ # @param [Object] value Any valid value
221
+ # @return [Hash] Returns the value in the form of hash
222
+ def _to_hash(value)
223
+ if value.is_a?(Array)
224
+ value.compact.map { |v| _to_hash(v) }
225
+ elsif value.is_a?(Hash)
226
+ {}.tap do |hash|
227
+ value.each { |k, v| hash[k] = _to_hash(v) }
228
+ end
229
+ elsif value.respond_to? :to_hash
230
+ value.to_hash
231
+ else
232
+ value
233
+ end
234
+ end
235
+
236
+ end
237
+
238
+ end
@@ -0,0 +1,238 @@
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
+ # An example of an ACL update request entry.
16
+ class ComputeAclUpdateEntry
17
+ # One of \"create\" or \"update\", indicating that the rest of this entry is to be added to/updated in the ACL.
18
+ attr_accessor :op
19
+
20
+ # An IP prefix defined in Classless Inter-Domain Routing (CIDR) format, i.e. a valid IP address (v4 or v6) followed by a forward slash (/) and a prefix length (0-32 or 0-128, depending on address family).
21
+ attr_accessor :prefix
22
+
23
+ # The action taken on the IP address, either \"block\" or \"allow\".
24
+ attr_accessor :action
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'op' => :'op',
30
+ :'prefix' => :'prefix',
31
+ :'action' => :'action'
32
+ }
33
+ end
34
+
35
+ # Returns all the JSON keys this model knows about
36
+ def self.acceptable_attributes
37
+ attribute_map.values
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.fastly_types
42
+ {
43
+ :'op' => :'String',
44
+ :'prefix' => :'String',
45
+ :'action' => :'String'
46
+ }
47
+ end
48
+
49
+ # List of attributes with nullable: true
50
+ def self.fastly_nullable
51
+ Set.new([
52
+ ])
53
+ end
54
+
55
+ # Initializes the object
56
+ # @param [Hash] attributes Model attributes in the form of hash
57
+ def initialize(attributes = {})
58
+ if (!attributes.is_a?(Hash))
59
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::ComputeAclUpdateEntry` initialize method"
60
+ end
61
+
62
+ # check to see if the attribute exists and convert string to symbol for hash key
63
+ attributes = attributes.each_with_object({}) { |(k, v), h|
64
+ if (!self.class.attribute_map.key?(k.to_sym))
65
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::ComputeAclUpdateEntry`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
66
+ end
67
+ h[k.to_sym] = v
68
+ }
69
+
70
+ if attributes.key?(:'op')
71
+ self.op = attributes[:'op']
72
+ end
73
+
74
+ if attributes.key?(:'prefix')
75
+ self.prefix = attributes[:'prefix']
76
+ end
77
+
78
+ if attributes.key?(:'action')
79
+ self.action = attributes[:'action']
80
+ end
81
+ end
82
+
83
+ # Show invalid properties with the reasons. Usually used together with valid?
84
+ # @return Array for valid properties with the reasons
85
+ def list_invalid_properties
86
+ invalid_properties = Array.new
87
+ invalid_properties
88
+ end
89
+
90
+ # Check to see if the all the properties in the model are valid
91
+ # @return true if the model is valid
92
+ def valid?
93
+ true
94
+ end
95
+
96
+ # Checks equality by comparing each attribute.
97
+ # @param [Object] Object to be compared
98
+ def ==(o)
99
+ return true if self.equal?(o)
100
+ self.class == o.class &&
101
+ op == o.op &&
102
+ prefix == o.prefix &&
103
+ action == o.action
104
+ end
105
+
106
+ # @see the `==` method
107
+ # @param [Object] Object to be compared
108
+ def eql?(o)
109
+ self == o
110
+ end
111
+
112
+ # Calculates hash code according to all attributes.
113
+ # @return [Integer] Hash code
114
+ def hash
115
+ [op, prefix, action].hash
116
+ end
117
+
118
+ # Builds the object from hash
119
+ # @param [Hash] attributes Model attributes in the form of hash
120
+ # @return [Object] Returns the model itself
121
+ def self.build_from_hash(attributes)
122
+ new.build_from_hash(attributes)
123
+ end
124
+
125
+ # Builds the object from hash
126
+ # @param [Hash] attributes Model attributes in the form of hash
127
+ # @return [Object] Returns the model itself
128
+ def build_from_hash(attributes)
129
+ return nil unless attributes.is_a?(Hash)
130
+ self.class.fastly_types.each_pair do |key, type|
131
+ if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key)
132
+ self.send("#{key}=", nil)
133
+ elsif type =~ /\AArray<(.*)>/i
134
+ # check to ensure the input is an array given that the attribute
135
+ # is documented as an array but the input is not
136
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
137
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
138
+ end
139
+ elsif !attributes[self.class.attribute_map[key]].nil?
140
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
141
+ end
142
+ end
143
+
144
+ self
145
+ end
146
+
147
+ # Deserializes the data based on type
148
+ # @param string type Data type
149
+ # @param string value Value to be deserialized
150
+ # @return [Object] Deserialized data
151
+ def _deserialize(type, value)
152
+ case type.to_sym
153
+ when :Time
154
+ Time.parse(value)
155
+ when :Date
156
+ Date.parse(value)
157
+ when :String
158
+ value.to_s
159
+ when :Integer
160
+ value.to_i
161
+ when :Float
162
+ value.to_f
163
+ when :Boolean
164
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
165
+ true
166
+ else
167
+ false
168
+ end
169
+ when :Object
170
+ # generic object (usually a Hash), return directly
171
+ value
172
+ when /\AArray<(?<inner_type>.+)>\z/
173
+ inner_type = Regexp.last_match[:inner_type]
174
+ value.map { |v| _deserialize(inner_type, v) }
175
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
176
+ k_type = Regexp.last_match[:k_type]
177
+ v_type = Regexp.last_match[:v_type]
178
+ {}.tap do |hash|
179
+ value.each do |k, v|
180
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
181
+ end
182
+ end
183
+ else # model
184
+ # models (e.g. Pet) or oneOf
185
+ klass = Fastly.const_get(type)
186
+ klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value)
187
+ end
188
+ end
189
+
190
+ # Returns the string representation of the object
191
+ # @return [String] String presentation of the object
192
+ def to_s
193
+ to_hash.to_s
194
+ end
195
+
196
+ # to_body is an alias to to_hash (backward compatibility)
197
+ # @return [Hash] Returns the object in the form of hash
198
+ def to_body
199
+ to_hash
200
+ end
201
+
202
+ # Returns the object in the form of hash
203
+ # @return [Hash] Returns the object in the form of hash
204
+ def to_hash
205
+ hash = {}
206
+ self.class.attribute_map.each_pair do |attr, param|
207
+ value = self.send(attr)
208
+ if value.nil?
209
+ is_nullable = self.class.fastly_nullable.include?(attr)
210
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
211
+ end
212
+
213
+ hash[param] = _to_hash(value)
214
+ end
215
+ hash
216
+ end
217
+
218
+ # Outputs non-array value in the form of hash
219
+ # For object, use to_hash. Otherwise, just return the value
220
+ # @param [Object] value Any valid value
221
+ # @return [Hash] Returns the value in the form of hash
222
+ def _to_hash(value)
223
+ if value.is_a?(Array)
224
+ value.compact.map { |v| _to_hash(v) }
225
+ elsif value.is_a?(Hash)
226
+ {}.tap do |hash|
227
+ value.each { |k, v| hash[k] = _to_hash(v) }
228
+ end
229
+ elsif value.respond_to? :to_hash
230
+ value.to_hash
231
+ else
232
+ value
233
+ end
234
+ end
235
+
236
+ end
237
+
238
+ end