fastly 14.0.0 → 15.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (222) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +45 -0
  3. data/Gemfile.lock +1 -1
  4. data/README.md +22 -13
  5. data/docs/ApiDiscoveryResponseBodyGetAllServices.md +13 -0
  6. data/docs/ApiDiscoveryResponseCustomer.md +10 -0
  7. data/docs/ApiDiscoveryResponseCustomerCustomer.md +11 -0
  8. data/docs/ApiDiscoveryResponseEnable.md +12 -0
  9. data/docs/ApiDiscoveryResponseEnabledServices.md +10 -0
  10. data/docs/ApiDiscoveryResponseLinks.md +10 -0
  11. data/docs/ApiDiscoveryResponseLinksGetAllServices.md +10 -0
  12. data/docs/ApiDiscoveryResponseLinksGetAllServicesLinks.md +10 -0
  13. data/docs/ApiDiscoveryResponseLinksLinks.md +10 -0
  14. data/docs/ApiDiscoveryResponseProduct.md +10 -0
  15. data/docs/ApiDiscoveryResponseProductProduct.md +11 -0
  16. data/docs/ApiDiscoveryResponseService.md +10 -0
  17. data/docs/{BotManagementResponseServiceService.md → ApiDiscoveryResponseServiceService.md} +1 -1
  18. data/docs/BotManagementResponseBodyEnable.md +1 -1
  19. data/docs/BotManagementResponseService.md +1 -1
  20. data/docs/BrotliCompressionResponseBodyEnable.md +1 -1
  21. data/docs/BrotliCompressionResponseService.md +1 -1
  22. data/docs/DdosProtectionApi.md +2 -0
  23. data/docs/DdosProtectionEvent.md +2 -0
  24. data/docs/DdosProtectionEventAllOf.md +2 -0
  25. data/docs/DdosProtectionRequestEnableMode.md +10 -0
  26. data/docs/DdosProtectionResponseConfigure.md +1 -1
  27. data/docs/DdosProtectionResponseEnable.md +1 -1
  28. data/docs/DdosProtectionResponseService.md +1 -1
  29. data/docs/DdosProtectionRuleWithStats.md +23 -0
  30. data/docs/DdosProtectionRuleWithStatsAllOf.md +10 -0
  31. data/docs/DdosProtectionTrafficStats.md +1 -0
  32. data/docs/DdosProtectionTrafficStatsAllOf.md +1 -0
  33. data/docs/DmDomainsApi.md +220 -0
  34. data/docs/DomainInspectorHistoricalApi.md +1 -1
  35. data/docs/DomainInspectorResponseBodyEnable.md +1 -1
  36. data/docs/DomainInspectorResponseService.md +1 -1
  37. data/docs/DomainOwnershipsApi.md +2 -2
  38. data/docs/DomainResearchApi.md +103 -0
  39. data/docs/DomainResearchResponseBodyEnable.md +12 -0
  40. data/docs/DomainResearchResponseCustomer.md +10 -0
  41. data/docs/DomainResearchResponseLinks.md +10 -0
  42. data/docs/DomainResearchResponseLinksLinks.md +10 -0
  43. data/docs/DomainResearchResponseProduct.md +10 -0
  44. data/docs/DomainResearchResponseProductProduct.md +11 -0
  45. data/docs/FanoutResponseBodyEnable.md +1 -1
  46. data/docs/FanoutResponseService.md +1 -1
  47. data/docs/Healthcheck.md +1 -1
  48. data/docs/HealthcheckApi.md +4 -4
  49. data/docs/HealthcheckResponse.md +1 -1
  50. data/docs/IamRolesApi.md +23 -253
  51. data/docs/IamV1RoleListResponse.md +12 -0
  52. data/docs/IamV1RoleResponse.md +14 -0
  53. data/docs/ImageOptimizerResponseBodyEnable.md +1 -1
  54. data/docs/ImageOptimizerResponseService.md +1 -1
  55. data/docs/InlineResponse20010.md +11 -0
  56. data/docs/InlineResponse20011.md +10 -0
  57. data/docs/InlineResponse2003.md +2 -2
  58. data/docs/InlineResponse2004.md +2 -1
  59. data/docs/InlineResponse2005.md +1 -2
  60. data/docs/InlineResponse2006.md +1 -2
  61. data/docs/InlineResponse2007.md +1 -1
  62. data/docs/InlineResponse2008.md +1 -1
  63. data/docs/InlineResponse2009.md +2 -1
  64. data/docs/InvitationDataAttributes.md +1 -0
  65. data/docs/KvStoreApi.md +43 -4
  66. data/docs/KvStoreDetails.md +2 -0
  67. data/docs/KvStoreItemApi.md +2 -2
  68. data/docs/{KvStoreRequestCreate.md → KvStoreRequestCreateOrUpdate.md} +1 -1
  69. data/docs/LogExplorerInsightsResponseBodyEnable.md +1 -1
  70. data/docs/LogExplorerInsightsResponseService.md +1 -1
  71. data/docs/LoggingHttpsAdditional.md +1 -0
  72. data/docs/LoggingHttpsApi.md +4 -0
  73. data/docs/LoggingHttpsResponse.md +1 -0
  74. data/docs/MetricsPlatformApi.md +75 -0
  75. data/docs/NgwafRequestEnable.md +1 -0
  76. data/docs/NgwafResponseConfigure.md +1 -1
  77. data/docs/NgwafResponseEnable.md +1 -1
  78. data/docs/NgwafResponseService.md +1 -1
  79. data/docs/Offer.md +12 -0
  80. data/docs/OfferAllOf.md +12 -0
  81. data/docs/OriginInspectorHistoricalApi.md +1 -1
  82. data/docs/OriginInspectorResponseBodyEnable.md +1 -1
  83. data/docs/OriginInspectorResponseService.md +1 -1
  84. data/docs/PlatformMetadata.md +14 -0
  85. data/docs/PlatformMetricsResponse.md +11 -0
  86. data/docs/PlatformValues.md +25 -0
  87. data/docs/ProductApiDiscoveryApi.md +163 -0
  88. data/docs/ProductDdosProtectionApi.md +3 -1
  89. data/docs/ProductDomainResearchApi.md +115 -0
  90. data/docs/RealtimeEntryAggregated.md +5 -0
  91. data/docs/RealtimeMeasurements.md +5 -0
  92. data/docs/RequestBodyForCreate.md +12 -0
  93. data/docs/RequestBodyForUpdate.md +11 -0
  94. data/docs/Results.md +5 -0
  95. data/docs/SchemasUserResponse.md +1 -0
  96. data/docs/SecretStoreApi.md +2 -2
  97. data/docs/SecretStoreItemApi.md +2 -2
  98. data/docs/ServiceAuthorizationsApi.md +2 -2
  99. data/docs/Status.md +15 -0
  100. data/docs/StatusAllOf.md +15 -0
  101. data/docs/SuccessfulResponseAsObject.md +17 -0
  102. data/docs/SuccessfulResponseAsObjectAllOf.md +15 -0
  103. data/docs/Suggestion.md +13 -0
  104. data/docs/SuggestionAllOf.md +13 -0
  105. data/docs/User.md +1 -0
  106. data/docs/UserApi.md +4 -0
  107. data/docs/UserResponse.md +1 -0
  108. data/docs/WebsocketsResponseBodyEnable.md +1 -1
  109. data/docs/WebsocketsResponseService.md +1 -1
  110. data/lib/fastly/api/ddos_protection_api.rb +3 -0
  111. data/lib/fastly/api/dm_domains_api.rb +362 -0
  112. data/lib/fastly/api/domain_inspector_historical_api.rb +1 -1
  113. data/lib/fastly/api/domain_ownerships_api.rb +3 -3
  114. data/lib/fastly/api/domain_research_api.rb +163 -0
  115. data/lib/fastly/api/healthcheck_api.rb +20 -4
  116. data/lib/fastly/api/iam_roles_api.rb +43 -435
  117. data/lib/fastly/api/kv_store_api.rb +74 -6
  118. data/lib/fastly/api/kv_store_item_api.rb +3 -3
  119. data/lib/fastly/api/logging_https_api.rb +6 -0
  120. data/lib/fastly/api/metrics_platform_api.rb +134 -0
  121. data/lib/fastly/api/origin_inspector_historical_api.rb +1 -1
  122. data/lib/fastly/api/product_api_discovery_api.rb +263 -0
  123. data/lib/fastly/api/product_ddos_protection_api.rb +10 -3
  124. data/lib/fastly/api/product_domain_research_api.rb +186 -0
  125. data/lib/fastly/api/secret_store_api.rb +3 -3
  126. data/lib/fastly/api/secret_store_item_api.rb +3 -3
  127. data/lib/fastly/api/service_authorizations_api.rb +3 -3
  128. data/lib/fastly/api/user_api.rb +6 -0
  129. data/lib/fastly/configuration.rb +98 -38
  130. data/lib/fastly/models/api_discovery_response_body_get_all_services.rb +256 -0
  131. data/lib/fastly/models/api_discovery_response_customer.rb +216 -0
  132. data/lib/fastly/models/api_discovery_response_customer_customer.rb +227 -0
  133. data/lib/fastly/models/api_discovery_response_enable.rb +243 -0
  134. data/lib/fastly/models/api_discovery_response_enabled_services.rb +219 -0
  135. data/lib/fastly/models/api_discovery_response_links.rb +216 -0
  136. data/lib/fastly/models/api_discovery_response_links_get_all_services.rb +216 -0
  137. data/lib/fastly/models/api_discovery_response_links_get_all_services_links.rb +217 -0
  138. data/lib/fastly/models/api_discovery_response_links_links.rb +217 -0
  139. data/lib/fastly/models/api_discovery_response_product.rb +216 -0
  140. data/lib/fastly/models/api_discovery_response_product_product.rb +227 -0
  141. data/lib/fastly/models/api_discovery_response_service.rb +216 -0
  142. data/lib/fastly/models/{bot_management_response_service_service.rb → api_discovery_response_service_service.rb} +3 -3
  143. data/lib/fastly/models/bot_management_response_body_enable.rb +1 -1
  144. data/lib/fastly/models/bot_management_response_service.rb +1 -1
  145. data/lib/fastly/models/brotli_compression_response_body_enable.rb +1 -1
  146. data/lib/fastly/models/brotli_compression_response_service.rb +1 -1
  147. data/lib/fastly/models/ddos_protection_event.rb +21 -1
  148. data/lib/fastly/models/ddos_protection_event_all_of.rb +21 -1
  149. data/lib/fastly/models/ddos_protection_request_enable_mode.rb +251 -0
  150. data/lib/fastly/models/ddos_protection_response_configure.rb +1 -1
  151. data/lib/fastly/models/ddos_protection_response_enable.rb +1 -1
  152. data/lib/fastly/models/ddos_protection_response_service.rb +1 -1
  153. data/lib/fastly/models/ddos_protection_rule_with_stats.rb +365 -0
  154. data/lib/fastly/models/ddos_protection_rule_with_stats_all_of.rb +216 -0
  155. data/lib/fastly/models/ddos_protection_traffic_stats.rb +20 -4
  156. data/lib/fastly/models/ddos_protection_traffic_stats_all_of.rb +20 -4
  157. data/lib/fastly/models/domain_inspector_response_body_enable.rb +1 -1
  158. data/lib/fastly/models/domain_inspector_response_service.rb +1 -1
  159. data/lib/fastly/models/domain_research_response_body_enable.rb +243 -0
  160. data/lib/fastly/models/domain_research_response_customer.rb +216 -0
  161. data/lib/fastly/models/domain_research_response_links.rb +216 -0
  162. data/lib/fastly/models/domain_research_response_links_links.rb +217 -0
  163. data/lib/fastly/models/domain_research_response_product.rb +216 -0
  164. data/lib/fastly/models/domain_research_response_product_product.rb +227 -0
  165. data/lib/fastly/models/fanout_response_body_enable.rb +1 -1
  166. data/lib/fastly/models/fanout_response_service.rb +1 -1
  167. data/lib/fastly/models/healthcheck.rb +25 -1
  168. data/lib/fastly/models/healthcheck_response.rb +25 -1
  169. data/lib/fastly/models/iam_v1_role_list_response.rb +240 -0
  170. data/lib/fastly/models/{iam_role_all_of.rb → iam_v1_role_response.rb} +23 -34
  171. data/lib/fastly/models/image_optimizer_response_body_enable.rb +1 -1
  172. data/lib/fastly/models/image_optimizer_response_service.rb +1 -1
  173. data/lib/fastly/models/inline_response20010.rb +227 -0
  174. data/lib/fastly/models/inline_response20011.rb +218 -0
  175. data/lib/fastly/models/inline_response2003.rb +11 -1
  176. data/lib/fastly/models/inline_response2004.rb +20 -8
  177. data/lib/fastly/models/inline_response2005.rb +8 -18
  178. data/lib/fastly/models/inline_response2006.rb +8 -17
  179. data/lib/fastly/models/inline_response2007.rb +1 -1
  180. data/lib/fastly/models/inline_response2008.rb +1 -1
  181. data/lib/fastly/models/inline_response2009.rb +13 -4
  182. data/lib/fastly/models/invitation_data_attributes.rb +12 -1
  183. data/lib/fastly/models/kv_store_details.rb +24 -4
  184. data/lib/fastly/models/{kv_store_request_create.rb → kv_store_request_create_or_update.rb} +3 -3
  185. data/lib/fastly/models/log_explorer_insights_response_body_enable.rb +1 -1
  186. data/lib/fastly/models/log_explorer_insights_response_service.rb +1 -1
  187. data/lib/fastly/models/logging_https_additional.rb +16 -4
  188. data/lib/fastly/models/logging_https_response.rb +13 -1
  189. data/lib/fastly/models/ngwaf_request_enable.rb +14 -4
  190. data/lib/fastly/models/ngwaf_response_configure.rb +1 -1
  191. data/lib/fastly/models/ngwaf_response_enable.rb +1 -1
  192. data/lib/fastly/models/ngwaf_response_service.rb +1 -1
  193. data/lib/fastly/models/offer.rb +245 -0
  194. data/lib/fastly/models/offer_all_of.rb +237 -0
  195. data/lib/fastly/models/origin_inspector_response_body_enable.rb +1 -1
  196. data/lib/fastly/models/origin_inspector_response_service.rb +1 -1
  197. data/lib/fastly/models/platform_metadata.rb +258 -0
  198. data/lib/fastly/models/platform_metrics_response.rb +228 -0
  199. data/lib/fastly/models/platform_values.rb +368 -0
  200. data/lib/fastly/models/realtime_entry_aggregated.rb +54 -4
  201. data/lib/fastly/models/realtime_measurements.rb +54 -4
  202. data/lib/fastly/models/request_body_for_create.rb +244 -0
  203. data/lib/fastly/models/request_body_for_update.rb +229 -0
  204. data/lib/fastly/models/results.rb +51 -1
  205. data/lib/fastly/models/role_user.rb +2 -0
  206. data/lib/fastly/models/schemas_user_response.rb +13 -1
  207. data/lib/fastly/models/status.rb +276 -0
  208. data/lib/fastly/models/status_all_of.rb +268 -0
  209. data/lib/fastly/models/{iam_role.rb → successful_response_as_object.rb} +37 -35
  210. data/lib/fastly/models/successful_response_as_object_all_of.rb +268 -0
  211. data/lib/fastly/models/suggestion.rb +255 -0
  212. data/lib/fastly/models/suggestion_all_of.rb +247 -0
  213. data/lib/fastly/models/user.rb +13 -1
  214. data/lib/fastly/models/user_response.rb +13 -1
  215. data/lib/fastly/models/websockets_response_body_enable.rb +1 -1
  216. data/lib/fastly/models/websockets_response_service.rb +1 -1
  217. data/lib/fastly/version.rb +1 -1
  218. data/lib/fastly.rb +45 -4
  219. data/sig.json +1 -1
  220. metadata +92 -10
  221. data/docs/IamRole.md +0 -17
  222. data/docs/IamRoleAllOf.md +0 -15
@@ -0,0 +1,244 @@
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
+ # All attributes for creating a domain
16
+ class RequestBodyForCreate
17
+ # The fully-qualified domain name for your domain. Can be created, but not updated.
18
+ attr_accessor :fqdn
19
+
20
+ # The `service_id` associated with your domain or `null` if there is no association.
21
+ attr_accessor :service_id
22
+
23
+ # A freeform descriptive note.
24
+ attr_accessor :description
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'fqdn' => :'fqdn',
30
+ :'service_id' => :'service_id',
31
+ :'description' => :'description'
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
+ :'fqdn' => :'String',
44
+ :'service_id' => :'String',
45
+ :'description' => :'String'
46
+ }
47
+ end
48
+
49
+ # List of attributes with nullable: true
50
+ def self.fastly_nullable
51
+ Set.new([
52
+ :'service_id',
53
+ ])
54
+ end
55
+
56
+ # Initializes the object
57
+ # @param [Hash] attributes Model attributes in the form of hash
58
+ def initialize(attributes = {})
59
+ if (!attributes.is_a?(Hash))
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::RequestBodyForCreate` initialize method"
61
+ end
62
+
63
+ # check to see if the attribute exists and convert string to symbol for hash key
64
+ attributes = attributes.each_with_object({}) { |(k, v), h|
65
+ if (!self.class.attribute_map.key?(k.to_sym))
66
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::RequestBodyForCreate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
67
+ end
68
+ h[k.to_sym] = v
69
+ }
70
+
71
+ if attributes.key?(:'fqdn')
72
+ self.fqdn = attributes[:'fqdn']
73
+ end
74
+
75
+ if attributes.key?(:'service_id')
76
+ self.service_id = attributes[:'service_id']
77
+ end
78
+
79
+ if attributes.key?(:'description')
80
+ self.description = attributes[:'description']
81
+ end
82
+ end
83
+
84
+ # Show invalid properties with the reasons. Usually used together with valid?
85
+ # @return Array for valid properties with the reasons
86
+ def list_invalid_properties
87
+ invalid_properties = Array.new
88
+ if @fqdn.nil?
89
+ invalid_properties.push('invalid value for "fqdn", fqdn cannot be nil.')
90
+ end
91
+
92
+ invalid_properties
93
+ end
94
+
95
+ # Check to see if the all the properties in the model are valid
96
+ # @return true if the model is valid
97
+ def valid?
98
+ return false if @fqdn.nil?
99
+ true
100
+ end
101
+
102
+ # Checks equality by comparing each attribute.
103
+ # @param [Object] Object to be compared
104
+ def ==(o)
105
+ return true if self.equal?(o)
106
+ self.class == o.class &&
107
+ fqdn == o.fqdn &&
108
+ service_id == o.service_id &&
109
+ description == o.description
110
+ end
111
+
112
+ # @see the `==` method
113
+ # @param [Object] Object to be compared
114
+ def eql?(o)
115
+ self == o
116
+ end
117
+
118
+ # Calculates hash code according to all attributes.
119
+ # @return [Integer] Hash code
120
+ def hash
121
+ [fqdn, service_id, description].hash
122
+ end
123
+
124
+ # Builds the object from hash
125
+ # @param [Hash] attributes Model attributes in the form of hash
126
+ # @return [Object] Returns the model itself
127
+ def self.build_from_hash(attributes)
128
+ new.build_from_hash(attributes)
129
+ end
130
+
131
+ # Builds the object from hash
132
+ # @param [Hash] attributes Model attributes in the form of hash
133
+ # @return [Object] Returns the model itself
134
+ def build_from_hash(attributes)
135
+ return nil unless attributes.is_a?(Hash)
136
+ self.class.fastly_types.each_pair do |key, type|
137
+ if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key)
138
+ self.send("#{key}=", nil)
139
+ elsif type =~ /\AArray<(.*)>/i
140
+ # check to ensure the input is an array given that the attribute
141
+ # is documented as an array but the input is not
142
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
143
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
144
+ end
145
+ elsif !attributes[self.class.attribute_map[key]].nil?
146
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
147
+ end
148
+ end
149
+
150
+ self
151
+ end
152
+
153
+ # Deserializes the data based on type
154
+ # @param string type Data type
155
+ # @param string value Value to be deserialized
156
+ # @return [Object] Deserialized data
157
+ def _deserialize(type, value)
158
+ case type.to_sym
159
+ when :Time
160
+ Time.parse(value)
161
+ when :Date
162
+ Date.parse(value)
163
+ when :String
164
+ value.to_s
165
+ when :Integer
166
+ value.to_i
167
+ when :Float
168
+ value.to_f
169
+ when :Boolean
170
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
171
+ true
172
+ else
173
+ false
174
+ end
175
+ when :Object
176
+ # generic object (usually a Hash), return directly
177
+ value
178
+ when /\AArray<(?<inner_type>.+)>\z/
179
+ inner_type = Regexp.last_match[:inner_type]
180
+ value.map { |v| _deserialize(inner_type, v) }
181
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
182
+ k_type = Regexp.last_match[:k_type]
183
+ v_type = Regexp.last_match[:v_type]
184
+ {}.tap do |hash|
185
+ value.each do |k, v|
186
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
187
+ end
188
+ end
189
+ else # model
190
+ # models (e.g. Pet) or oneOf
191
+ klass = Fastly.const_get(type)
192
+ klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value)
193
+ end
194
+ end
195
+
196
+ # Returns the string representation of the object
197
+ # @return [String] String presentation of the object
198
+ def to_s
199
+ to_hash.to_s
200
+ end
201
+
202
+ # to_body is an alias to to_hash (backward compatibility)
203
+ # @return [Hash] Returns the object in the form of hash
204
+ def to_body
205
+ to_hash
206
+ end
207
+
208
+ # Returns the object in the form of hash
209
+ # @return [Hash] Returns the object in the form of hash
210
+ def to_hash
211
+ hash = {}
212
+ self.class.attribute_map.each_pair do |attr, param|
213
+ value = self.send(attr)
214
+ if value.nil?
215
+ is_nullable = self.class.fastly_nullable.include?(attr)
216
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
217
+ end
218
+
219
+ hash[param] = _to_hash(value)
220
+ end
221
+ hash
222
+ end
223
+
224
+ # Outputs non-array value in the form of hash
225
+ # For object, use to_hash. Otherwise, just return the value
226
+ # @param [Object] value Any valid value
227
+ # @return [Hash] Returns the value in the form of hash
228
+ def _to_hash(value)
229
+ if value.is_a?(Array)
230
+ value.compact.map { |v| _to_hash(v) }
231
+ elsif value.is_a?(Hash)
232
+ {}.tap do |hash|
233
+ value.each { |k, v| hash[k] = _to_hash(v) }
234
+ end
235
+ elsif value.respond_to? :to_hash
236
+ value.to_hash
237
+ else
238
+ value
239
+ end
240
+ end
241
+
242
+ end
243
+
244
+ end
@@ -0,0 +1,229 @@
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
+ # All attributes for updating a domain
16
+ class RequestBodyForUpdate
17
+ # The `service_id` associated with your domain or `null` if there is no association.
18
+ attr_accessor :service_id
19
+
20
+ # A freeform descriptive note.
21
+ attr_accessor :description
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'service_id' => :'service_id',
27
+ :'description' => :'description'
28
+ }
29
+ end
30
+
31
+ # Returns all the JSON keys this model knows about
32
+ def self.acceptable_attributes
33
+ attribute_map.values
34
+ end
35
+
36
+ # Attribute type mapping.
37
+ def self.fastly_types
38
+ {
39
+ :'service_id' => :'String',
40
+ :'description' => :'String'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.fastly_nullable
46
+ Set.new([
47
+ :'service_id',
48
+ ])
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::RequestBodyForUpdate` initialize method"
56
+ end
57
+
58
+ # check to see if the attribute exists and convert string to symbol for hash key
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!self.class.attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::RequestBodyForUpdate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'service_id')
67
+ self.service_id = attributes[:'service_id']
68
+ end
69
+
70
+ if attributes.key?(:'description')
71
+ self.description = attributes[:'description']
72
+ end
73
+ end
74
+
75
+ # Show invalid properties with the reasons. Usually used together with valid?
76
+ # @return Array for valid properties with the reasons
77
+ def list_invalid_properties
78
+ invalid_properties = Array.new
79
+ invalid_properties
80
+ end
81
+
82
+ # Check to see if the all the properties in the model are valid
83
+ # @return true if the model is valid
84
+ def valid?
85
+ true
86
+ end
87
+
88
+ # Checks equality by comparing each attribute.
89
+ # @param [Object] Object to be compared
90
+ def ==(o)
91
+ return true if self.equal?(o)
92
+ self.class == o.class &&
93
+ service_id == o.service_id &&
94
+ description == o.description
95
+ end
96
+
97
+ # @see the `==` method
98
+ # @param [Object] Object to be compared
99
+ def eql?(o)
100
+ self == o
101
+ end
102
+
103
+ # Calculates hash code according to all attributes.
104
+ # @return [Integer] Hash code
105
+ def hash
106
+ [service_id, description].hash
107
+ end
108
+
109
+ # Builds the object from hash
110
+ # @param [Hash] attributes Model attributes in the form of hash
111
+ # @return [Object] Returns the model itself
112
+ def self.build_from_hash(attributes)
113
+ new.build_from_hash(attributes)
114
+ end
115
+
116
+ # Builds the object from hash
117
+ # @param [Hash] attributes Model attributes in the form of hash
118
+ # @return [Object] Returns the model itself
119
+ def build_from_hash(attributes)
120
+ return nil unless attributes.is_a?(Hash)
121
+ self.class.fastly_types.each_pair do |key, type|
122
+ if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key)
123
+ self.send("#{key}=", nil)
124
+ elsif type =~ /\AArray<(.*)>/i
125
+ # check to ensure the input is an array given that the attribute
126
+ # is documented as an array but the input is not
127
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
128
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
129
+ end
130
+ elsif !attributes[self.class.attribute_map[key]].nil?
131
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
132
+ end
133
+ end
134
+
135
+ self
136
+ end
137
+
138
+ # Deserializes the data based on type
139
+ # @param string type Data type
140
+ # @param string value Value to be deserialized
141
+ # @return [Object] Deserialized data
142
+ def _deserialize(type, value)
143
+ case type.to_sym
144
+ when :Time
145
+ Time.parse(value)
146
+ when :Date
147
+ Date.parse(value)
148
+ when :String
149
+ value.to_s
150
+ when :Integer
151
+ value.to_i
152
+ when :Float
153
+ value.to_f
154
+ when :Boolean
155
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
156
+ true
157
+ else
158
+ false
159
+ end
160
+ when :Object
161
+ # generic object (usually a Hash), return directly
162
+ value
163
+ when /\AArray<(?<inner_type>.+)>\z/
164
+ inner_type = Regexp.last_match[:inner_type]
165
+ value.map { |v| _deserialize(inner_type, v) }
166
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
167
+ k_type = Regexp.last_match[:k_type]
168
+ v_type = Regexp.last_match[:v_type]
169
+ {}.tap do |hash|
170
+ value.each do |k, v|
171
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
172
+ end
173
+ end
174
+ else # model
175
+ # models (e.g. Pet) or oneOf
176
+ klass = Fastly.const_get(type)
177
+ klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value)
178
+ end
179
+ end
180
+
181
+ # Returns the string representation of the object
182
+ # @return [String] String presentation of the object
183
+ def to_s
184
+ to_hash.to_s
185
+ end
186
+
187
+ # to_body is an alias to to_hash (backward compatibility)
188
+ # @return [Hash] Returns the object in the form of hash
189
+ def to_body
190
+ to_hash
191
+ end
192
+
193
+ # Returns the object in the form of hash
194
+ # @return [Hash] Returns the object in the form of hash
195
+ def to_hash
196
+ hash = {}
197
+ self.class.attribute_map.each_pair do |attr, param|
198
+ value = self.send(attr)
199
+ if value.nil?
200
+ is_nullable = self.class.fastly_nullable.include?(attr)
201
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
202
+ end
203
+
204
+ hash[param] = _to_hash(value)
205
+ end
206
+ hash
207
+ end
208
+
209
+ # Outputs non-array value in the form of hash
210
+ # For object, use to_hash. Otherwise, just return the value
211
+ # @param [Object] value Any valid value
212
+ # @return [Hash] Returns the value in the form of hash
213
+ def _to_hash(value)
214
+ if value.is_a?(Array)
215
+ value.compact.map { |v| _to_hash(v) }
216
+ elsif value.is_a?(Hash)
217
+ {}.tap do |hash|
218
+ value.each { |k, v| hash[k] = _to_hash(v) }
219
+ end
220
+ elsif value.respond_to? :to_hash
221
+ value.to_hash
222
+ else
223
+ value
224
+ end
225
+ end
226
+
227
+ end
228
+
229
+ end
@@ -818,6 +818,21 @@ module Fastly
818
818
  # Count of Edge WAF requests challenged.
819
819
  attr_accessor :ngwaf_requests_challenged_count
820
820
 
821
+ # Number of requests processed by the API Discovery engine.
822
+ attr_accessor :api_discovery_requests_count
823
+
824
+ # The number of Image Optimizer requests made from Compute services.
825
+ attr_accessor :imgopto_compute_requests
826
+
827
+ # Number of billable DNS responses (e.g., A, CNAME).
828
+ attr_accessor :dns_billable_responses_count
829
+
830
+ # Number of non-billable DNS responses (e.g., NODATA, NXDOMAIN).
831
+ attr_accessor :dns_nonbillable_responses_count
832
+
833
+ # Number of requests that resulted in a WebSocket upgrade.
834
+ attr_accessor :upgrade
835
+
821
836
  attr_accessor :service_id
822
837
 
823
838
  # Timestamp for the start of the time period being reported
@@ -1094,6 +1109,11 @@ module Fastly
1094
1109
  :'ngwaf_requests_blocked_count' => :'ngwaf_requests_blocked_count',
1095
1110
  :'ngwaf_requests_timeout_count' => :'ngwaf_requests_timeout_count',
1096
1111
  :'ngwaf_requests_challenged_count' => :'ngwaf_requests_challenged_count',
1112
+ :'api_discovery_requests_count' => :'api_discovery_requests_count',
1113
+ :'imgopto_compute_requests' => :'imgopto_compute_requests',
1114
+ :'dns_billable_responses_count' => :'dns_billable_responses_count',
1115
+ :'dns_nonbillable_responses_count' => :'dns_nonbillable_responses_count',
1116
+ :'upgrade' => :'upgrade',
1097
1117
  :'service_id' => :'service_id',
1098
1118
  :'start_time' => :'start_time'
1099
1119
  }
@@ -1375,6 +1395,11 @@ module Fastly
1375
1395
  :'ngwaf_requests_blocked_count' => :'Integer',
1376
1396
  :'ngwaf_requests_timeout_count' => :'Integer',
1377
1397
  :'ngwaf_requests_challenged_count' => :'Integer',
1398
+ :'api_discovery_requests_count' => :'Integer',
1399
+ :'imgopto_compute_requests' => :'Integer',
1400
+ :'dns_billable_responses_count' => :'Integer',
1401
+ :'dns_nonbillable_responses_count' => :'Integer',
1402
+ :'upgrade' => :'Integer',
1378
1403
  :'service_id' => :'String',
1379
1404
  :'start_time' => :'Integer'
1380
1405
  }
@@ -2474,6 +2499,26 @@ module Fastly
2474
2499
  self.ngwaf_requests_challenged_count = attributes[:'ngwaf_requests_challenged_count']
2475
2500
  end
2476
2501
 
2502
+ if attributes.key?(:'api_discovery_requests_count')
2503
+ self.api_discovery_requests_count = attributes[:'api_discovery_requests_count']
2504
+ end
2505
+
2506
+ if attributes.key?(:'imgopto_compute_requests')
2507
+ self.imgopto_compute_requests = attributes[:'imgopto_compute_requests']
2508
+ end
2509
+
2510
+ if attributes.key?(:'dns_billable_responses_count')
2511
+ self.dns_billable_responses_count = attributes[:'dns_billable_responses_count']
2512
+ end
2513
+
2514
+ if attributes.key?(:'dns_nonbillable_responses_count')
2515
+ self.dns_nonbillable_responses_count = attributes[:'dns_nonbillable_responses_count']
2516
+ end
2517
+
2518
+ if attributes.key?(:'upgrade')
2519
+ self.upgrade = attributes[:'upgrade']
2520
+ end
2521
+
2477
2522
  if attributes.key?(:'service_id')
2478
2523
  self.service_id = attributes[:'service_id']
2479
2524
  end
@@ -2769,6 +2814,11 @@ module Fastly
2769
2814
  ngwaf_requests_blocked_count == o.ngwaf_requests_blocked_count &&
2770
2815
  ngwaf_requests_timeout_count == o.ngwaf_requests_timeout_count &&
2771
2816
  ngwaf_requests_challenged_count == o.ngwaf_requests_challenged_count &&
2817
+ api_discovery_requests_count == o.api_discovery_requests_count &&
2818
+ imgopto_compute_requests == o.imgopto_compute_requests &&
2819
+ dns_billable_responses_count == o.dns_billable_responses_count &&
2820
+ dns_nonbillable_responses_count == o.dns_nonbillable_responses_count &&
2821
+ upgrade == o.upgrade &&
2772
2822
  service_id == o.service_id &&
2773
2823
  start_time == o.start_time
2774
2824
  end
@@ -2782,7 +2832,7 @@ module Fastly
2782
2832
  # Calculates hash code according to all attributes.
2783
2833
  # @return [Integer] Hash code
2784
2834
  def hash
2785
- [requests, hits, hits_time, miss, miss_time, pass, pass_time, errors, restarts, hit_ratio, bandwidth, body_size, header_size, req_body_bytes, req_header_bytes, resp_body_bytes, resp_header_bytes, bereq_body_bytes, bereq_header_bytes, uncacheable, pipe, synth, tls, tls_v10, tls_v11, tls_v12, tls_v13, edge_requests, edge_resp_header_bytes, edge_resp_body_bytes, edge_hit_requests, edge_miss_requests, origin_fetches, origin_fetch_header_bytes, origin_fetch_body_bytes, origin_fetch_resp_header_bytes, origin_fetch_resp_body_bytes, origin_revalidations, origin_cache_fetches, shield, shield_resp_body_bytes, shield_resp_header_bytes, shield_fetches, shield_fetch_header_bytes, shield_fetch_body_bytes, shield_fetch_resp_header_bytes, shield_fetch_resp_body_bytes, shield_revalidations, shield_cache_fetches, ipv6, otfp, otfp_resp_body_bytes, otfp_resp_header_bytes, otfp_shield_resp_body_bytes, otfp_shield_resp_header_bytes, otfp_manifests, otfp_deliver_time, otfp_shield_time, video, pci, log, log_bytes, http2, http3, waf_logged, waf_blocked, waf_passed, attack_req_body_bytes, attack_req_header_bytes, attack_logged_req_body_bytes, attack_logged_req_header_bytes, attack_blocked_req_body_bytes, attack_blocked_req_header_bytes, attack_passed_req_body_bytes, attack_passed_req_header_bytes, attack_resp_synth_bytes, imgopto, imgopto_resp_body_bytes, imgopto_resp_header_bytes, imgopto_shield, imgopto_shield_resp_body_bytes, imgopto_shield_resp_header_bytes, imgopto_transforms, imgvideo, imgvideo_frames, imgvideo_resp_header_bytes, imgvideo_resp_body_bytes, imgvideo_shield_resp_header_bytes, imgvideo_shield_resp_body_bytes, imgvideo_shield, imgvideo_shield_frames, status_200, status_204, status_206, status_301, status_302, status_304, status_400, status_401, status_403, status_404, status_406, status_416, status_429, status_500, status_501, status_502, status_503, status_504, status_505, status_530, status_1xx, status_2xx, status_3xx, status_4xx, status_5xx, object_size_1k, object_size_10k, object_size_100k, object_size_1m, object_size_10m, object_size_100m, object_size_1g, recv_sub_time, recv_sub_count, hash_sub_time, hash_sub_count, miss_sub_time, miss_sub_count, fetch_sub_time, fetch_sub_count, pass_sub_time, pass_sub_count, pipe_sub_time, pipe_sub_count, deliver_sub_time, deliver_sub_count, error_sub_time, error_sub_count, hit_sub_time, hit_sub_count, prehash_sub_time, prehash_sub_count, predeliver_sub_time, predeliver_sub_count, tls_handshake_sent_bytes, hit_resp_body_bytes, miss_resp_body_bytes, pass_resp_body_bytes, segblock_origin_fetches, segblock_shield_fetches, compute_requests, compute_request_time_ms, compute_request_time_billed_ms, compute_ram_used, compute_execution_time_ms, compute_req_header_bytes, compute_req_body_bytes, compute_resp_header_bytes, compute_resp_body_bytes, compute_resp_status_1xx, compute_resp_status_2xx, compute_resp_status_3xx, compute_resp_status_4xx, compute_resp_status_5xx, compute_bereq_header_bytes, compute_bereq_body_bytes, compute_beresp_header_bytes, compute_beresp_body_bytes, compute_bereqs, compute_bereq_errors, compute_resource_limit_exceeded, compute_heap_limit_exceeded, compute_stack_limit_exceeded, compute_globals_limit_exceeded, compute_guest_errors, compute_runtime_errors, edge_hit_resp_body_bytes, edge_hit_resp_header_bytes, edge_miss_resp_body_bytes, edge_miss_resp_header_bytes, origin_cache_fetch_resp_body_bytes, origin_cache_fetch_resp_header_bytes, shield_hit_requests, shield_miss_requests, shield_hit_resp_header_bytes, shield_hit_resp_body_bytes, shield_miss_resp_header_bytes, shield_miss_resp_body_bytes, websocket_req_header_bytes, websocket_req_body_bytes, websocket_resp_header_bytes, websocket_resp_body_bytes, websocket_bereq_header_bytes, websocket_bereq_body_bytes, websocket_beresp_header_bytes, websocket_beresp_body_bytes, websocket_conn_time_ms, fanout_recv_publishes, fanout_send_publishes, kv_store_class_a_operations, kv_store_class_b_operations, object_store_class_a_operations, object_store_class_b_operations, fanout_req_header_bytes, fanout_req_body_bytes, fanout_resp_header_bytes, fanout_resp_body_bytes, fanout_bereq_header_bytes, fanout_bereq_body_bytes, fanout_beresp_header_bytes, fanout_beresp_body_bytes, fanout_conn_time_ms, ddos_action_limit_streams_connections, ddos_action_limit_streams_requests, ddos_action_tarpit_accept, ddos_action_tarpit, ddos_action_close, ddos_action_blackhole, bot_challenge_starts, bot_challenge_complete_tokens_passed, bot_challenge_complete_tokens_failed, bot_challenge_complete_tokens_checked, bot_challenge_complete_tokens_disabled, bot_challenge_complete_tokens_issued, bot_challenges_issued, bot_challenges_succeeded, bot_challenges_failed, ddos_action_downgrade, ddos_action_downgraded_connections, all_hit_requests, all_miss_requests, all_pass_requests, all_error_requests, all_synth_requests, all_edge_hit_requests, all_edge_miss_requests, all_status_1xx, all_status_2xx, all_status_3xx, all_status_4xx, all_status_5xx, origin_offload, request_denied_get_head_body, ddos_protection_requests_detect_count, ddos_protection_requests_mitigate_count, ddos_protection_requests_allow_count, object_storage_class_a_operations_count, object_storage_class_b_operations_count, aia_requests, aia_status_1xx, aia_status_2xx, aia_status_3xx, aia_status_4xx, aia_status_5xx, aia_response_usage_tokens, aia_origin_usage_tokens, aia_estimated_time_saved_ms, request_collapse_usable_count, request_collapse_unusable_count, compute_cache_operations_count, ngwaf_requests_total_count, ngwaf_requests_unknown_count, ngwaf_requests_allowed_count, ngwaf_requests_logged_count, ngwaf_requests_blocked_count, ngwaf_requests_timeout_count, ngwaf_requests_challenged_count, service_id, start_time].hash
2835
+ [requests, hits, hits_time, miss, miss_time, pass, pass_time, errors, restarts, hit_ratio, bandwidth, body_size, header_size, req_body_bytes, req_header_bytes, resp_body_bytes, resp_header_bytes, bereq_body_bytes, bereq_header_bytes, uncacheable, pipe, synth, tls, tls_v10, tls_v11, tls_v12, tls_v13, edge_requests, edge_resp_header_bytes, edge_resp_body_bytes, edge_hit_requests, edge_miss_requests, origin_fetches, origin_fetch_header_bytes, origin_fetch_body_bytes, origin_fetch_resp_header_bytes, origin_fetch_resp_body_bytes, origin_revalidations, origin_cache_fetches, shield, shield_resp_body_bytes, shield_resp_header_bytes, shield_fetches, shield_fetch_header_bytes, shield_fetch_body_bytes, shield_fetch_resp_header_bytes, shield_fetch_resp_body_bytes, shield_revalidations, shield_cache_fetches, ipv6, otfp, otfp_resp_body_bytes, otfp_resp_header_bytes, otfp_shield_resp_body_bytes, otfp_shield_resp_header_bytes, otfp_manifests, otfp_deliver_time, otfp_shield_time, video, pci, log, log_bytes, http2, http3, waf_logged, waf_blocked, waf_passed, attack_req_body_bytes, attack_req_header_bytes, attack_logged_req_body_bytes, attack_logged_req_header_bytes, attack_blocked_req_body_bytes, attack_blocked_req_header_bytes, attack_passed_req_body_bytes, attack_passed_req_header_bytes, attack_resp_synth_bytes, imgopto, imgopto_resp_body_bytes, imgopto_resp_header_bytes, imgopto_shield, imgopto_shield_resp_body_bytes, imgopto_shield_resp_header_bytes, imgopto_transforms, imgvideo, imgvideo_frames, imgvideo_resp_header_bytes, imgvideo_resp_body_bytes, imgvideo_shield_resp_header_bytes, imgvideo_shield_resp_body_bytes, imgvideo_shield, imgvideo_shield_frames, status_200, status_204, status_206, status_301, status_302, status_304, status_400, status_401, status_403, status_404, status_406, status_416, status_429, status_500, status_501, status_502, status_503, status_504, status_505, status_530, status_1xx, status_2xx, status_3xx, status_4xx, status_5xx, object_size_1k, object_size_10k, object_size_100k, object_size_1m, object_size_10m, object_size_100m, object_size_1g, recv_sub_time, recv_sub_count, hash_sub_time, hash_sub_count, miss_sub_time, miss_sub_count, fetch_sub_time, fetch_sub_count, pass_sub_time, pass_sub_count, pipe_sub_time, pipe_sub_count, deliver_sub_time, deliver_sub_count, error_sub_time, error_sub_count, hit_sub_time, hit_sub_count, prehash_sub_time, prehash_sub_count, predeliver_sub_time, predeliver_sub_count, tls_handshake_sent_bytes, hit_resp_body_bytes, miss_resp_body_bytes, pass_resp_body_bytes, segblock_origin_fetches, segblock_shield_fetches, compute_requests, compute_request_time_ms, compute_request_time_billed_ms, compute_ram_used, compute_execution_time_ms, compute_req_header_bytes, compute_req_body_bytes, compute_resp_header_bytes, compute_resp_body_bytes, compute_resp_status_1xx, compute_resp_status_2xx, compute_resp_status_3xx, compute_resp_status_4xx, compute_resp_status_5xx, compute_bereq_header_bytes, compute_bereq_body_bytes, compute_beresp_header_bytes, compute_beresp_body_bytes, compute_bereqs, compute_bereq_errors, compute_resource_limit_exceeded, compute_heap_limit_exceeded, compute_stack_limit_exceeded, compute_globals_limit_exceeded, compute_guest_errors, compute_runtime_errors, edge_hit_resp_body_bytes, edge_hit_resp_header_bytes, edge_miss_resp_body_bytes, edge_miss_resp_header_bytes, origin_cache_fetch_resp_body_bytes, origin_cache_fetch_resp_header_bytes, shield_hit_requests, shield_miss_requests, shield_hit_resp_header_bytes, shield_hit_resp_body_bytes, shield_miss_resp_header_bytes, shield_miss_resp_body_bytes, websocket_req_header_bytes, websocket_req_body_bytes, websocket_resp_header_bytes, websocket_resp_body_bytes, websocket_bereq_header_bytes, websocket_bereq_body_bytes, websocket_beresp_header_bytes, websocket_beresp_body_bytes, websocket_conn_time_ms, fanout_recv_publishes, fanout_send_publishes, kv_store_class_a_operations, kv_store_class_b_operations, object_store_class_a_operations, object_store_class_b_operations, fanout_req_header_bytes, fanout_req_body_bytes, fanout_resp_header_bytes, fanout_resp_body_bytes, fanout_bereq_header_bytes, fanout_bereq_body_bytes, fanout_beresp_header_bytes, fanout_beresp_body_bytes, fanout_conn_time_ms, ddos_action_limit_streams_connections, ddos_action_limit_streams_requests, ddos_action_tarpit_accept, ddos_action_tarpit, ddos_action_close, ddos_action_blackhole, bot_challenge_starts, bot_challenge_complete_tokens_passed, bot_challenge_complete_tokens_failed, bot_challenge_complete_tokens_checked, bot_challenge_complete_tokens_disabled, bot_challenge_complete_tokens_issued, bot_challenges_issued, bot_challenges_succeeded, bot_challenges_failed, ddos_action_downgrade, ddos_action_downgraded_connections, all_hit_requests, all_miss_requests, all_pass_requests, all_error_requests, all_synth_requests, all_edge_hit_requests, all_edge_miss_requests, all_status_1xx, all_status_2xx, all_status_3xx, all_status_4xx, all_status_5xx, origin_offload, request_denied_get_head_body, ddos_protection_requests_detect_count, ddos_protection_requests_mitigate_count, ddos_protection_requests_allow_count, object_storage_class_a_operations_count, object_storage_class_b_operations_count, aia_requests, aia_status_1xx, aia_status_2xx, aia_status_3xx, aia_status_4xx, aia_status_5xx, aia_response_usage_tokens, aia_origin_usage_tokens, aia_estimated_time_saved_ms, request_collapse_usable_count, request_collapse_unusable_count, compute_cache_operations_count, ngwaf_requests_total_count, ngwaf_requests_unknown_count, ngwaf_requests_allowed_count, ngwaf_requests_logged_count, ngwaf_requests_blocked_count, ngwaf_requests_timeout_count, ngwaf_requests_challenged_count, api_discovery_requests_count, imgopto_compute_requests, dns_billable_responses_count, dns_nonbillable_responses_count, upgrade, service_id, start_time].hash
2786
2836
  end
2787
2837
 
2788
2838
  # Builds the object from hash
@@ -14,6 +14,8 @@ require 'time'
14
14
  module Fastly
15
15
  class RoleUser
16
16
  USER = "user".freeze
17
+ TLS_VIEWER = "tls_viewer".freeze
18
+ TLS_ADMIN = "tls_admin".freeze
17
19
  BILLING = "billing".freeze
18
20
  ENGINEER = "engineer".freeze
19
21
  SUPERUSER = "superuser".freeze
@@ -29,6 +29,9 @@ module Fastly
29
29
 
30
30
  attr_accessor :role
31
31
 
32
+ # A list of role IDs assigned to the user.
33
+ attr_accessor :roles
34
+
32
35
  # Indicates if 2FA is enabled on the user.
33
36
  attr_accessor :two_factor_auth_enabled
34
37
 
@@ -60,6 +63,7 @@ module Fastly
60
63
  :'locked' => :'locked',
61
64
  :'require_new_password' => :'require_new_password',
62
65
  :'role' => :'role',
66
+ :'roles' => :'roles',
63
67
  :'two_factor_auth_enabled' => :'two_factor_auth_enabled',
64
68
  :'two_factor_setup_required' => :'two_factor_setup_required',
65
69
  :'created_at' => :'created_at',
@@ -85,6 +89,7 @@ module Fastly
85
89
  :'locked' => :'Boolean',
86
90
  :'require_new_password' => :'Boolean',
87
91
  :'role' => :'RoleUser',
92
+ :'roles' => :'Array<String>',
88
93
  :'two_factor_auth_enabled' => :'Boolean',
89
94
  :'two_factor_setup_required' => :'Boolean',
90
95
  :'created_at' => :'Time',
@@ -156,6 +161,12 @@ module Fastly
156
161
  self.role = attributes[:'role']
157
162
  end
158
163
 
164
+ if attributes.key?(:'roles')
165
+ if (value = attributes[:'roles']).is_a?(Array)
166
+ self.roles = value
167
+ end
168
+ end
169
+
159
170
  if attributes.key?(:'two_factor_auth_enabled')
160
171
  self.two_factor_auth_enabled = attributes[:'two_factor_auth_enabled']
161
172
  end
@@ -213,6 +224,7 @@ module Fastly
213
224
  locked == o.locked &&
214
225
  require_new_password == o.require_new_password &&
215
226
  role == o.role &&
227
+ roles == o.roles &&
216
228
  two_factor_auth_enabled == o.two_factor_auth_enabled &&
217
229
  two_factor_setup_required == o.two_factor_setup_required &&
218
230
  created_at == o.created_at &&
@@ -232,7 +244,7 @@ module Fastly
232
244
  # Calculates hash code according to all attributes.
233
245
  # @return [Integer] Hash code
234
246
  def hash
235
- [login, name, limit_services, locked, require_new_password, role, two_factor_auth_enabled, two_factor_setup_required, created_at, deleted_at, updated_at, id, email_hash, customer_id].hash
247
+ [login, name, limit_services, locked, require_new_password, role, roles, two_factor_auth_enabled, two_factor_setup_required, created_at, deleted_at, updated_at, id, email_hash, customer_id].hash
236
248
  end
237
249
 
238
250
  # Builds the object from hash