fastly 4.0.0.alpha4 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (527) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +100 -21
  4. data/docs/AclEntry.md +1 -1
  5. data/docs/AclEntryApi.md +0 -176
  6. data/docs/AclEntryResponse.md +1 -1
  7. data/docs/ApexRedirectApi.md +4 -4
  8. data/docs/AutomationToken.md +14 -0
  9. data/docs/AutomationTokenCreateRequest.md +10 -0
  10. data/docs/AutomationTokenCreateRequestAttributes.md +15 -0
  11. data/docs/AutomationTokenCreateResponse.md +24 -0
  12. data/docs/AutomationTokenCreateResponseAllOf.md +17 -0
  13. data/docs/AutomationTokenResponse.md +23 -0
  14. data/docs/AutomationTokenResponseAllOf.md +18 -0
  15. data/docs/AutomationTokensApi.md +209 -0
  16. data/docs/AwsRegion.md +9 -0
  17. data/docs/Backend.md +1 -0
  18. data/docs/BackendApi.md +4 -0
  19. data/docs/BackendResponse.md +1 -0
  20. data/docs/Billing.md +2 -1
  21. data/docs/BillingAddressRequest.md +1 -0
  22. data/docs/BillingAddressVerificationErrorResponse.md +10 -0
  23. data/docs/BillingAddressVerificationErrorResponseErrors.md +14 -0
  24. data/docs/BillingEstimateResponse.md +2 -1
  25. data/docs/BillingResponse.md +2 -1
  26. data/docs/BulkUpdateAclEntry.md +1 -1
  27. data/docs/ConditionApi.md +4 -4
  28. data/docs/EnabledProduct.md +12 -0
  29. data/docs/EnabledProductLinks.md +11 -0
  30. data/docs/EnabledProductProduct.md +11 -0
  31. data/docs/EnabledProductsApi.md +133 -0
  32. data/docs/ErrorResponse.md +10 -0
  33. data/docs/ErrorResponseData.md +11 -0
  34. data/docs/EventAttributes.md +1 -0
  35. data/docs/EventsApi.md +4 -2
  36. data/docs/HeaderApi.md +4 -4
  37. data/docs/Healthcheck.md +5 -4
  38. data/docs/HealthcheckApi.md +46 -42
  39. data/docs/HealthcheckResponse.md +5 -4
  40. data/docs/Http3Api.md +4 -4
  41. data/docs/HttpResponseFormat.md +14 -0
  42. data/docs/HttpStreamFormat.md +11 -0
  43. data/docs/InlineObject.md +10 -0
  44. data/docs/InlineObject1.md +10 -0
  45. data/docs/InlineResponse2001.md +1 -1
  46. data/docs/LoggingAzureblob.md +3 -3
  47. data/docs/LoggingAzureblobApi.md +12 -12
  48. data/docs/LoggingAzureblobResponse.md +3 -3
  49. data/docs/LoggingBigquery.md +4 -3
  50. data/docs/LoggingBigqueryApi.md +16 -12
  51. data/docs/LoggingBigqueryResponse.md +4 -3
  52. data/docs/LoggingCloudfiles.md +3 -3
  53. data/docs/LoggingCloudfilesApi.md +12 -12
  54. data/docs/LoggingCloudfilesResponse.md +3 -3
  55. data/docs/LoggingCommon.md +1 -1
  56. data/docs/LoggingDatadog.md +1 -1
  57. data/docs/LoggingDatadogApi.md +4 -4
  58. data/docs/LoggingDatadogResponse.md +1 -1
  59. data/docs/LoggingDigitalocean.md +3 -3
  60. data/docs/LoggingDigitaloceanApi.md +12 -12
  61. data/docs/LoggingDigitaloceanResponse.md +3 -3
  62. data/docs/LoggingElasticsearch.md +1 -1
  63. data/docs/LoggingElasticsearchApi.md +4 -4
  64. data/docs/LoggingElasticsearchResponse.md +1 -1
  65. data/docs/LoggingFtp.md +3 -3
  66. data/docs/LoggingFtpApi.md +12 -12
  67. data/docs/LoggingFtpResponse.md +3 -3
  68. data/docs/LoggingGcs.md +7 -5
  69. data/docs/LoggingGcsAllOf.md +1 -0
  70. data/docs/LoggingGcsApi.md +32 -24
  71. data/docs/LoggingGcsCommon.md +3 -2
  72. data/docs/LoggingGcsResponse.md +7 -5
  73. data/docs/LoggingGenericCommon.md +2 -2
  74. data/docs/LoggingGooglePubsub.md +4 -3
  75. data/docs/LoggingGooglePubsubResponse.md +4 -3
  76. data/docs/LoggingHeroku.md +1 -1
  77. data/docs/LoggingHerokuApi.md +4 -4
  78. data/docs/LoggingHerokuResponse.md +1 -1
  79. data/docs/LoggingHoneycomb.md +1 -1
  80. data/docs/LoggingHoneycombApi.md +4 -4
  81. data/docs/LoggingHoneycombResponse.md +1 -1
  82. data/docs/LoggingHttps.md +1 -1
  83. data/docs/LoggingHttpsApi.md +4 -4
  84. data/docs/LoggingHttpsResponse.md +1 -1
  85. data/docs/LoggingKafka.md +1 -1
  86. data/docs/LoggingKafkaApi.md +2 -2
  87. data/docs/LoggingKafkaResponse.md +1 -1
  88. data/docs/LoggingKinesis.md +1 -1
  89. data/docs/LoggingKinesisApi.md +2 -2
  90. data/docs/LoggingKinesisResponse.md +1 -1
  91. data/docs/LoggingLogentries.md +1 -1
  92. data/docs/LoggingLogentriesApi.md +4 -4
  93. data/docs/LoggingLogentriesResponse.md +1 -1
  94. data/docs/LoggingLoggly.md +1 -1
  95. data/docs/LoggingLogglyApi.md +4 -4
  96. data/docs/LoggingLogglyResponse.md +1 -1
  97. data/docs/LoggingLogshuttle.md +1 -1
  98. data/docs/LoggingLogshuttleApi.md +4 -4
  99. data/docs/LoggingLogshuttleResponse.md +1 -1
  100. data/docs/LoggingNewrelic.md +2 -2
  101. data/docs/LoggingNewrelicAllOf.md +1 -1
  102. data/docs/LoggingNewrelicApi.md +8 -8
  103. data/docs/LoggingNewrelicResponse.md +2 -2
  104. data/docs/LoggingOpenstack.md +3 -3
  105. data/docs/LoggingOpenstackApi.md +12 -12
  106. data/docs/LoggingOpenstackResponse.md +3 -3
  107. data/docs/LoggingPapertrail.md +1 -1
  108. data/docs/LoggingPapertrailApi.md +4 -4
  109. data/docs/LoggingPapertrailResponse.md +1 -1
  110. data/docs/LoggingPubsubApi.md +16 -12
  111. data/docs/LoggingS3.md +3 -3
  112. data/docs/LoggingS3Api.md +12 -12
  113. data/docs/LoggingS3Response.md +3 -3
  114. data/docs/LoggingScalyr.md +1 -1
  115. data/docs/LoggingScalyrApi.md +4 -4
  116. data/docs/LoggingScalyrResponse.md +1 -1
  117. data/docs/LoggingSftp.md +4 -4
  118. data/docs/LoggingSftpAllOf.md +1 -1
  119. data/docs/LoggingSftpApi.md +16 -16
  120. data/docs/LoggingSftpResponse.md +4 -4
  121. data/docs/LoggingSplunk.md +1 -1
  122. data/docs/LoggingSplunkApi.md +4 -4
  123. data/docs/LoggingSplunkResponse.md +1 -1
  124. data/docs/LoggingSumologic.md +1 -1
  125. data/docs/LoggingSumologicApi.md +4 -4
  126. data/docs/LoggingSumologicResponse.md +1 -1
  127. data/docs/LoggingSyslog.md +1 -1
  128. data/docs/LoggingSyslogApi.md +4 -4
  129. data/docs/LoggingSyslogResponse.md +1 -1
  130. data/docs/MutualAuthentication.md +10 -0
  131. data/docs/MutualAuthenticationApi.md +207 -0
  132. data/docs/MutualAuthenticationData.md +12 -0
  133. data/docs/MutualAuthenticationDataAttributes.md +12 -0
  134. data/docs/MutualAuthenticationResponse.md +10 -0
  135. data/docs/MutualAuthenticationResponseAttributes.md +13 -0
  136. data/docs/MutualAuthenticationResponseAttributesAllOf.md +10 -0
  137. data/docs/MutualAuthenticationResponseData.md +13 -0
  138. data/docs/MutualAuthenticationResponseDataAllOf.md +11 -0
  139. data/docs/MutualAuthenticationsResponse.md +12 -0
  140. data/docs/MutualAuthenticationsResponseAllOf.md +10 -0
  141. data/docs/PublishApi.md +54 -0
  142. data/docs/PublishItem.md +13 -0
  143. data/docs/PublishItemFormats.md +12 -0
  144. data/docs/PublishRequest.md +10 -0
  145. data/docs/PurgeApi.md +9 -9
  146. data/docs/RealtimeMeasurements.md +23 -0
  147. data/docs/RelationshipCommonName.md +1 -1
  148. data/docs/RelationshipMemberMutualAuthentication.md +11 -0
  149. data/docs/RelationshipMutualAuthentication.md +10 -0
  150. data/docs/RelationshipMutualAuthenticationMutualAuthentication.md +10 -0
  151. data/docs/RelationshipMutualAuthentications.md +10 -0
  152. data/docs/RelationshipMutualAuthenticationsMutualAuthentications.md +10 -0
  153. data/docs/RelationshipService.md +1 -1
  154. data/docs/RelationshipServices.md +1 -1
  155. data/docs/{RelationshipServiceService.md → RelationshipServicesServices.md} +1 -1
  156. data/docs/RelationshipTlsCertificateTlsCertificate.md +1 -1
  157. data/docs/RelationshipTlsCertificates.md +1 -1
  158. data/docs/RelationshipTlsCertificatesTlsCertificates.md +10 -0
  159. data/docs/RelationshipTlsConfigurationTlsConfiguration.md +1 -1
  160. data/docs/RelationshipTlsConfigurations.md +1 -1
  161. data/docs/RelationshipTlsConfigurationsTlsConfigurations.md +10 -0
  162. data/docs/RelationshipTlsDomainTlsDomain.md +1 -1
  163. data/docs/RelationshipTlsDomains.md +1 -1
  164. data/docs/RelationshipTlsDomainsTlsDomains.md +10 -0
  165. data/docs/RelationshipTlsPrivateKeyTlsPrivateKey.md +1 -1
  166. data/docs/RelationshipTlsPrivateKeys.md +1 -1
  167. data/docs/RelationshipTlsPrivateKeysTlsPrivateKeys.md +10 -0
  168. data/docs/RelationshipUserUser.md +1 -1
  169. data/docs/RelationshipsForMutualAuthentication.md +10 -0
  170. data/docs/RelationshipsForStar.md +1 -1
  171. data/docs/RelationshipsForTlsBulkCertificate.md +2 -2
  172. data/docs/RelationshipsForTlsConfiguration.md +1 -1
  173. data/docs/RelationshipsForTlsCsr.md +10 -0
  174. data/docs/RelationshipsForTlsPrivateKey.md +1 -1
  175. data/docs/RelationshipsForTlsSubscription.md +2 -2
  176. data/docs/Results.md +24 -1
  177. data/docs/SchemasUserResponse.md +2 -2
  178. data/docs/Service.md +1 -1
  179. data/docs/ServiceApi.md +4 -4
  180. data/docs/ServiceAuthorizationData.md +1 -1
  181. data/docs/ServiceAuthorizationDataRelationships.md +11 -0
  182. data/docs/ServiceAuthorizationDataRelationshipsUser.md +10 -0
  183. data/docs/{RelationshipUserUserData.md → ServiceAuthorizationDataRelationshipsUserData.md} +1 -1
  184. data/docs/ServiceAuthorizationResponseData.md +1 -1
  185. data/docs/ServiceCreate.md +1 -1
  186. data/docs/ServiceDetail.md +1 -1
  187. data/docs/ServiceInvitationData.md +1 -1
  188. data/docs/ServiceInvitationDataRelationships.md +10 -0
  189. data/docs/ServiceListResponse.md +1 -1
  190. data/docs/ServiceResponse.md +1 -1
  191. data/docs/ServiceVersionDetail.md +1 -1
  192. data/docs/ServiceVersionDetailOrNull.md +1 -1
  193. data/docs/TlsCsr.md +10 -0
  194. data/docs/TlsCsrData.md +12 -0
  195. data/docs/TlsCsrDataAttributes.md +19 -0
  196. data/docs/TlsCsrResponse.md +10 -0
  197. data/docs/TlsCsrResponseAttributes.md +10 -0
  198. data/docs/TlsCsrResponseData.md +13 -0
  199. data/docs/TlsCsrsApi.md +52 -0
  200. data/docs/TypeMutualAuthentication.md +9 -0
  201. data/docs/TypeTlsCsr.md +9 -0
  202. data/docs/UpdateBillingAddressRequest.md +1 -0
  203. data/docs/User.md +1 -1
  204. data/docs/UserApi.md +4 -4
  205. data/docs/UserResponse.md +2 -2
  206. data/docs/UserResponseAllOf.md +1 -1
  207. data/docs/ValidatorResult.md +14 -0
  208. data/docs/ValidatorResultMessages.md +13 -0
  209. data/docs/VclApi.md +78 -0
  210. data/docs/VersionDetail.md +1 -1
  211. data/docs/VersionDetailSettings.md +13 -0
  212. data/docs/WafFirewallVersionDataAttributes.md +1 -1
  213. data/docs/WsMessageFormat.md +11 -0
  214. data/lib/fastly/api/acl_entry_api.rb +0 -332
  215. data/lib/fastly/api/automation_tokens_api.rb +340 -0
  216. data/lib/fastly/api/backend_api.rb +6 -0
  217. data/lib/fastly/api/cache_settings_api.rb +2 -2
  218. data/lib/fastly/api/enabled_products_api.rb +228 -0
  219. data/lib/fastly/api/events_api.rb +6 -3
  220. data/lib/fastly/api/healthcheck_api.rb +48 -42
  221. data/lib/fastly/api/logging_azureblob_api.rb +12 -12
  222. data/lib/fastly/api/logging_bigquery_api.rb +18 -12
  223. data/lib/fastly/api/logging_cloudfiles_api.rb +12 -12
  224. data/lib/fastly/api/logging_datadog_api.rb +4 -4
  225. data/lib/fastly/api/logging_digitalocean_api.rb +12 -12
  226. data/lib/fastly/api/logging_elasticsearch_api.rb +4 -4
  227. data/lib/fastly/api/logging_ftp_api.rb +12 -12
  228. data/lib/fastly/api/logging_gcs_api.rb +32 -20
  229. data/lib/fastly/api/logging_heroku_api.rb +4 -4
  230. data/lib/fastly/api/logging_honeycomb_api.rb +4 -4
  231. data/lib/fastly/api/logging_https_api.rb +4 -4
  232. data/lib/fastly/api/logging_kafka_api.rb +2 -2
  233. data/lib/fastly/api/logging_kinesis_api.rb +2 -6
  234. data/lib/fastly/api/logging_logentries_api.rb +4 -4
  235. data/lib/fastly/api/logging_loggly_api.rb +4 -4
  236. data/lib/fastly/api/logging_logshuttle_api.rb +4 -4
  237. data/lib/fastly/api/logging_newrelic_api.rb +8 -8
  238. data/lib/fastly/api/logging_openstack_api.rb +12 -12
  239. data/lib/fastly/api/logging_papertrail_api.rb +4 -4
  240. data/lib/fastly/api/logging_pubsub_api.rb +18 -12
  241. data/lib/fastly/api/logging_s3_api.rb +12 -12
  242. data/lib/fastly/api/logging_scalyr_api.rb +4 -4
  243. data/lib/fastly/api/logging_sftp_api.rb +16 -16
  244. data/lib/fastly/api/logging_splunk_api.rb +4 -4
  245. data/lib/fastly/api/logging_sumologic_api.rb +4 -4
  246. data/lib/fastly/api/logging_syslog_api.rb +4 -4
  247. data/lib/fastly/api/mutual_authentication_api.rb +347 -0
  248. data/lib/fastly/api/publish_api.rb +90 -0
  249. data/lib/fastly/api/purge_api.rb +14 -15
  250. data/lib/fastly/api/service_api.rb +4 -4
  251. data/lib/fastly/api/{domain_ownerships_api.rb → tls_csrs_api.rb} +24 -17
  252. data/lib/fastly/api/user_api.rb +4 -4
  253. data/lib/fastly/api/vcl_api.rb +143 -0
  254. data/lib/fastly/api_client.rb +16 -0
  255. data/lib/fastly/models/acl_entry.rb +1 -1
  256. data/lib/fastly/models/acl_entry_response.rb +1 -4
  257. data/lib/fastly/models/acl_entry_response_all_of.rb +0 -3
  258. data/lib/fastly/models/acl_response.rb +0 -3
  259. data/lib/fastly/models/acl_response_all_of.rb +0 -1
  260. data/lib/fastly/models/apex_redirect.rb +0 -2
  261. data/lib/fastly/models/automation_token.rb +307 -0
  262. data/lib/fastly/models/automation_token_create_request.rb +216 -0
  263. data/lib/fastly/models/automation_token_create_request_attributes.rb +317 -0
  264. data/lib/fastly/models/automation_token_create_response.rb +416 -0
  265. data/lib/fastly/models/automation_token_create_response_all_of.rb +285 -0
  266. data/lib/fastly/models/automation_token_response.rb +394 -0
  267. data/lib/fastly/models/automation_token_response_all_of.rb +295 -0
  268. data/lib/fastly/models/aws_region.rb +56 -0
  269. data/lib/fastly/models/backend.rb +12 -1
  270. data/lib/fastly/models/backend_response.rb +12 -3
  271. data/lib/fastly/models/billing.rb +12 -3
  272. data/lib/fastly/models/billing_address_attributes.rb +4 -1
  273. data/lib/fastly/models/billing_address_request.rb +11 -1
  274. data/lib/fastly/models/billing_address_verification_error_response.rb +218 -0
  275. data/lib/fastly/models/billing_address_verification_error_response_errors.rb +275 -0
  276. data/lib/fastly/models/billing_estimate_response.rb +12 -3
  277. data/lib/fastly/models/billing_response.rb +12 -3
  278. data/lib/fastly/models/billing_response_line_item.rb +0 -1
  279. data/lib/fastly/models/billing_response_line_item_all_of.rb +0 -1
  280. data/lib/fastly/models/billing_status.rb +0 -1
  281. data/lib/fastly/models/billing_total.rb +1 -0
  282. data/lib/fastly/models/bulk_update_acl_entry.rb +1 -2
  283. data/lib/fastly/models/bulk_update_acl_entry_all_of.rb +0 -1
  284. data/lib/fastly/models/cache_setting.rb +2 -2
  285. data/lib/fastly/models/cache_setting_response.rb +2 -4
  286. data/lib/fastly/models/condition.rb +0 -1
  287. data/lib/fastly/models/condition_response.rb +0 -1
  288. data/lib/fastly/models/contact_response.rb +0 -1
  289. data/lib/fastly/models/contact_response_all_of.rb +0 -1
  290. data/lib/fastly/models/customer_response.rb +0 -1
  291. data/lib/fastly/models/customer_response_all_of.rb +0 -1
  292. data/lib/fastly/models/dictionary_item_response.rb +0 -2
  293. data/lib/fastly/models/dictionary_item_response_all_of.rb +0 -2
  294. data/lib/fastly/models/dictionary_response.rb +0 -3
  295. data/lib/fastly/models/dictionary_response_all_of.rb +0 -1
  296. data/lib/fastly/models/director_backend.rb +0 -2
  297. data/lib/fastly/models/director_response.rb +0 -2
  298. data/lib/fastly/models/domain_response.rb +0 -2
  299. data/lib/fastly/models/enabled_product.rb +234 -0
  300. data/lib/fastly/models/enabled_product_links.rb +225 -0
  301. data/lib/fastly/models/enabled_product_product.rb +225 -0
  302. data/lib/fastly/models/error_response.rb +218 -0
  303. data/lib/fastly/models/error_response_data.rb +225 -0
  304. data/lib/fastly/models/event.rb +0 -1
  305. data/lib/fastly/models/event_attributes.rb +13 -7
  306. data/lib/fastly/models/gzip_response.rb +0 -2
  307. data/lib/fastly/models/header_response.rb +0 -2
  308. data/lib/fastly/models/healthcheck.rb +17 -5
  309. data/lib/fastly/models/healthcheck_response.rb +17 -7
  310. data/lib/fastly/models/historical_usage_month_response_all_of_data.rb +0 -1
  311. data/lib/fastly/models/http3.rb +0 -2
  312. data/lib/fastly/models/http_response_format.rb +262 -0
  313. data/lib/fastly/models/http_stream_format.rb +228 -0
  314. data/lib/fastly/models/inline_object.rb +221 -0
  315. data/lib/fastly/models/inline_object1.rb +221 -0
  316. data/lib/fastly/models/inline_response2001.rb +10 -8
  317. data/lib/fastly/models/invitation_response_data.rb +0 -1
  318. data/lib/fastly/models/invitation_response_data_all_of.rb +0 -1
  319. data/lib/fastly/models/logging_azureblob.rb +3 -3
  320. data/lib/fastly/models/logging_azureblob_response.rb +3 -5
  321. data/lib/fastly/models/logging_bigquery.rb +14 -4
  322. data/lib/fastly/models/logging_bigquery_response.rb +14 -6
  323. data/lib/fastly/models/logging_cloudfiles.rb +3 -3
  324. data/lib/fastly/models/logging_cloudfiles_response.rb +3 -5
  325. data/lib/fastly/models/logging_common.rb +1 -1
  326. data/lib/fastly/models/logging_datadog.rb +1 -1
  327. data/lib/fastly/models/logging_datadog_response.rb +1 -3
  328. data/lib/fastly/models/logging_digitalocean.rb +3 -3
  329. data/lib/fastly/models/logging_digitalocean_response.rb +3 -5
  330. data/lib/fastly/models/logging_elasticsearch.rb +1 -1
  331. data/lib/fastly/models/logging_elasticsearch_response.rb +1 -3
  332. data/lib/fastly/models/logging_ftp.rb +3 -3
  333. data/lib/fastly/models/logging_ftp_response.rb +3 -5
  334. data/lib/fastly/models/logging_gcs.rb +30 -11
  335. data/lib/fastly/models/logging_gcs_all_of.rb +15 -6
  336. data/lib/fastly/models/logging_gcs_common.rb +16 -6
  337. data/lib/fastly/models/logging_gcs_response.rb +26 -9
  338. data/lib/fastly/models/logging_generic_common.rb +2 -2
  339. data/lib/fastly/models/logging_google_pubsub.rb +14 -4
  340. data/lib/fastly/models/logging_google_pubsub_response.rb +14 -6
  341. data/lib/fastly/models/logging_heroku.rb +1 -1
  342. data/lib/fastly/models/logging_heroku_response.rb +1 -3
  343. data/lib/fastly/models/logging_honeycomb.rb +1 -1
  344. data/lib/fastly/models/logging_honeycomb_response.rb +1 -3
  345. data/lib/fastly/models/logging_https.rb +1 -1
  346. data/lib/fastly/models/logging_https_response.rb +1 -3
  347. data/lib/fastly/models/logging_kafka.rb +1 -1
  348. data/lib/fastly/models/logging_kafka_response.rb +1 -3
  349. data/lib/fastly/models/logging_kinesis.rb +1 -36
  350. data/lib/fastly/models/logging_kinesis_response.rb +1 -38
  351. data/lib/fastly/models/logging_logentries.rb +1 -1
  352. data/lib/fastly/models/logging_logentries_response.rb +1 -3
  353. data/lib/fastly/models/logging_loggly.rb +1 -1
  354. data/lib/fastly/models/logging_loggly_response.rb +1 -3
  355. data/lib/fastly/models/logging_logshuttle.rb +1 -1
  356. data/lib/fastly/models/logging_logshuttle_response.rb +1 -3
  357. data/lib/fastly/models/logging_newrelic.rb +4 -3
  358. data/lib/fastly/models/logging_newrelic_all_of.rb +3 -2
  359. data/lib/fastly/models/logging_newrelic_response.rb +4 -5
  360. data/lib/fastly/models/logging_openstack.rb +3 -3
  361. data/lib/fastly/models/logging_openstack_response.rb +3 -5
  362. data/lib/fastly/models/logging_papertrail.rb +1 -1
  363. data/lib/fastly/models/logging_papertrail_response.rb +1 -3
  364. data/lib/fastly/models/logging_s3.rb +3 -3
  365. data/lib/fastly/models/logging_s3_response.rb +3 -5
  366. data/lib/fastly/models/logging_scalyr.rb +1 -1
  367. data/lib/fastly/models/logging_scalyr_response.rb +1 -3
  368. data/lib/fastly/models/logging_sftp.rb +6 -5
  369. data/lib/fastly/models/logging_sftp_all_of.rb +3 -2
  370. data/lib/fastly/models/logging_sftp_response.rb +6 -7
  371. data/lib/fastly/models/logging_splunk.rb +1 -1
  372. data/lib/fastly/models/logging_splunk_response.rb +1 -3
  373. data/lib/fastly/models/logging_sumologic.rb +1 -1
  374. data/lib/fastly/models/logging_sumologic_response.rb +1 -3
  375. data/lib/fastly/models/logging_syslog.rb +1 -1
  376. data/lib/fastly/models/logging_syslog_response.rb +1 -3
  377. data/lib/fastly/models/mutual_authentication.rb +216 -0
  378. data/lib/fastly/models/mutual_authentication_data.rb +236 -0
  379. data/lib/fastly/models/mutual_authentication_data_attributes.rb +237 -0
  380. data/lib/fastly/models/mutual_authentication_response.rb +216 -0
  381. data/lib/fastly/models/mutual_authentication_response_attributes.rb +258 -0
  382. data/lib/fastly/models/mutual_authentication_response_attributes_all_of.rb +217 -0
  383. data/lib/fastly/models/mutual_authentication_response_data.rb +253 -0
  384. data/lib/fastly/models/mutual_authentication_response_data_all_of.rb +225 -0
  385. data/lib/fastly/models/mutual_authentications_response.rb +244 -0
  386. data/lib/fastly/models/mutual_authentications_response_all_of.rb +218 -0
  387. data/lib/fastly/models/package_response.rb +0 -2
  388. data/lib/fastly/models/pool_response.rb +0 -3
  389. data/lib/fastly/models/pool_response_all_of.rb +0 -1
  390. data/lib/fastly/models/publish_item.rb +257 -0
  391. data/lib/fastly/models/publish_item_formats.rb +235 -0
  392. data/lib/fastly/models/publish_request.rb +225 -0
  393. data/lib/fastly/models/purge_response.rb +0 -1
  394. data/lib/fastly/models/rate_limiter_response.rb +0 -2
  395. data/lib/fastly/models/realtime.rb +0 -1
  396. data/lib/fastly/models/realtime_entry.rb +3 -2
  397. data/lib/fastly/models/realtime_measurements.rb +234 -4
  398. data/lib/fastly/models/relationship_common_name.rb +1 -1
  399. data/lib/fastly/models/relationship_member_customer.rb +0 -1
  400. data/lib/fastly/models/relationship_member_mutual_authentication.rb +227 -0
  401. data/lib/fastly/models/relationship_member_service.rb +0 -1
  402. data/lib/fastly/models/relationship_member_tls_activation.rb +0 -1
  403. data/lib/fastly/models/relationship_member_tls_bulk_certificate.rb +0 -1
  404. data/lib/fastly/models/relationship_member_tls_certificate.rb +0 -1
  405. data/lib/fastly/models/relationship_member_tls_configuration.rb +0 -1
  406. data/lib/fastly/models/relationship_member_tls_dns_record.rb +0 -1
  407. data/lib/fastly/models/relationship_member_tls_private_key.rb +0 -1
  408. data/lib/fastly/models/relationship_member_tls_subscription.rb +0 -1
  409. data/lib/fastly/models/relationship_member_waf_active_rule.rb +0 -1
  410. data/lib/fastly/models/relationship_member_waf_firewall.rb +0 -1
  411. data/lib/fastly/models/relationship_member_waf_rule.rb +0 -1
  412. data/lib/fastly/models/relationship_mutual_authentication.rb +216 -0
  413. data/lib/fastly/models/relationship_mutual_authentication_mutual_authentication.rb +216 -0
  414. data/lib/fastly/models/relationship_mutual_authentications.rb +216 -0
  415. data/lib/fastly/models/relationship_mutual_authentications_mutual_authentications.rb +218 -0
  416. data/lib/fastly/models/relationship_service.rb +1 -1
  417. data/lib/fastly/models/relationship_services.rb +1 -1
  418. data/lib/fastly/models/{relationship_service_service.rb → relationship_services_services.rb} +3 -3
  419. data/lib/fastly/models/relationship_tls_certificate_tls_certificate.rb +2 -4
  420. data/lib/fastly/models/relationship_tls_certificates.rb +1 -1
  421. data/lib/fastly/models/relationship_tls_certificates_tls_certificates.rb +218 -0
  422. data/lib/fastly/models/relationship_tls_configuration_tls_configuration.rb +2 -4
  423. data/lib/fastly/models/relationship_tls_configurations.rb +1 -1
  424. data/lib/fastly/models/relationship_tls_configurations_tls_configurations.rb +218 -0
  425. data/lib/fastly/models/relationship_tls_domain_tls_domain.rb +2 -4
  426. data/lib/fastly/models/relationship_tls_domains.rb +1 -1
  427. data/lib/fastly/models/relationship_tls_domains_tls_domains.rb +218 -0
  428. data/lib/fastly/models/relationship_tls_private_key_tls_private_key.rb +2 -4
  429. data/lib/fastly/models/relationship_tls_private_keys.rb +1 -1
  430. data/lib/fastly/models/relationship_tls_private_keys_tls_private_keys.rb +218 -0
  431. data/lib/fastly/models/relationship_user_user.rb +1 -1
  432. data/lib/fastly/models/relationships_for_mutual_authentication.rb +235 -0
  433. data/lib/fastly/models/relationships_for_star.rb +1 -1
  434. data/lib/fastly/models/relationships_for_tls_bulk_certificate.rb +2 -2
  435. data/lib/fastly/models/relationships_for_tls_configuration.rb +1 -1
  436. data/lib/fastly/models/relationships_for_tls_csr.rb +235 -0
  437. data/lib/fastly/models/relationships_for_tls_private_key.rb +1 -1
  438. data/lib/fastly/models/relationships_for_tls_subscription.rb +2 -2
  439. data/lib/fastly/models/request_settings_response.rb +0 -2
  440. data/lib/fastly/models/response_object_response.rb +0 -2
  441. data/lib/fastly/models/results.rb +235 -5
  442. data/lib/fastly/models/schemas_contact_response.rb +0 -1
  443. data/lib/fastly/models/schemas_snippet_response.rb +0 -3
  444. data/lib/fastly/models/schemas_user_response.rb +0 -3
  445. data/lib/fastly/models/schemas_vcl_response.rb +0 -2
  446. data/lib/fastly/models/schemas_version_response.rb +0 -1
  447. data/lib/fastly/models/server_response.rb +0 -3
  448. data/lib/fastly/models/server_response_all_of.rb +0 -3
  449. data/lib/fastly/models/service.rb +1 -1
  450. data/lib/fastly/models/service_authorization_data.rb +1 -2
  451. data/lib/fastly/models/service_authorization_data_relationships.rb +225 -0
  452. data/lib/fastly/models/service_authorization_data_relationships_user.rb +217 -0
  453. data/lib/fastly/models/{relationship_user_user_data.rb → service_authorization_data_relationships_user_data.rb} +3 -4
  454. data/lib/fastly/models/service_authorization_response_data.rb +1 -3
  455. data/lib/fastly/models/service_authorization_response_data_all_of.rb +0 -1
  456. data/lib/fastly/models/service_create.rb +1 -1
  457. data/lib/fastly/models/service_detail.rb +2 -2
  458. data/lib/fastly/models/service_detail_all_of.rb +1 -0
  459. data/lib/fastly/models/service_id_and_version.rb +0 -2
  460. data/lib/fastly/models/service_invitation_data.rb +1 -3
  461. data/lib/fastly/models/service_invitation_data_relationships.rb +217 -0
  462. data/lib/fastly/models/service_invitation_response_all_of_data.rb +0 -1
  463. data/lib/fastly/models/service_list_response.rb +1 -2
  464. data/lib/fastly/models/service_list_response_all_of.rb +0 -1
  465. data/lib/fastly/models/service_response.rb +1 -2
  466. data/lib/fastly/models/service_response_all_of.rb +0 -1
  467. data/lib/fastly/models/service_version_detail.rb +1 -4
  468. data/lib/fastly/models/service_version_detail_or_null.rb +5 -20
  469. data/lib/fastly/models/settings_response.rb +0 -2
  470. data/lib/fastly/models/snippet_response.rb +0 -3
  471. data/lib/fastly/models/snippet_response_all_of.rb +0 -1
  472. data/lib/fastly/models/tls_activation_response_data.rb +0 -1
  473. data/lib/fastly/models/tls_activation_response_data_all_of.rb +0 -1
  474. data/lib/fastly/models/tls_bulk_certificate_response_data.rb +0 -1
  475. data/lib/fastly/models/tls_bulk_certificate_response_data_all_of.rb +0 -1
  476. data/lib/fastly/models/tls_certificate_response_data.rb +0 -1
  477. data/lib/fastly/models/tls_certificate_response_data_all_of.rb +0 -1
  478. data/lib/fastly/models/tls_configuration_response_data.rb +0 -1
  479. data/lib/fastly/models/tls_configuration_response_data_all_of.rb +0 -1
  480. data/lib/fastly/models/tls_csr.rb +216 -0
  481. data/lib/fastly/models/tls_csr_data.rb +236 -0
  482. data/lib/fastly/models/tls_csr_data_attributes.rb +314 -0
  483. data/lib/fastly/models/tls_csr_response.rb +216 -0
  484. data/lib/fastly/models/tls_csr_response_attributes.rb +217 -0
  485. data/lib/fastly/models/tls_csr_response_data.rb +245 -0
  486. data/lib/fastly/models/tls_private_key_response_data.rb +0 -1
  487. data/lib/fastly/models/tls_subscription_response_data.rb +0 -1
  488. data/lib/fastly/models/tls_subscription_response_data_all_of.rb +0 -1
  489. data/lib/fastly/models/token_created_response.rb +0 -2
  490. data/lib/fastly/models/token_response.rb +0 -2
  491. data/lib/fastly/models/token_response_all_of.rb +0 -2
  492. data/lib/fastly/models/type_mutual_authentication.rb +34 -0
  493. data/lib/fastly/models/type_tls_csr.rb +34 -0
  494. data/lib/fastly/models/update_billing_address_request.rb +11 -1
  495. data/lib/fastly/models/user.rb +0 -1
  496. data/lib/fastly/models/user_response.rb +0 -3
  497. data/lib/fastly/models/user_response_all_of.rb +0 -2
  498. data/lib/fastly/models/validator_result.rb +294 -0
  499. data/lib/fastly/models/validator_result_messages.rb +265 -0
  500. data/lib/fastly/models/vcl_response.rb +0 -2
  501. data/lib/fastly/models/version_create_response.rb +0 -2
  502. data/lib/fastly/models/version_detail.rb +1 -3
  503. data/lib/fastly/models/version_detail_settings.rb +252 -0
  504. data/lib/fastly/models/version_response.rb +0 -1
  505. data/lib/fastly/models/version_response_all_of.rb +0 -1
  506. data/lib/fastly/models/waf_active_rule_response_data.rb +0 -1
  507. data/lib/fastly/models/waf_active_rule_response_data_all_of.rb +0 -1
  508. data/lib/fastly/models/waf_firewall_data_attributes.rb +0 -1
  509. data/lib/fastly/models/waf_firewall_response_data.rb +0 -1
  510. data/lib/fastly/models/waf_firewall_response_data_all_of.rb +0 -1
  511. data/lib/fastly/models/waf_firewall_response_data_attributes.rb +0 -1
  512. data/lib/fastly/models/waf_firewall_response_data_attributes_all_of.rb +0 -1
  513. data/lib/fastly/models/waf_firewall_version_data_attributes.rb +1 -2
  514. data/lib/fastly/models/waf_rule.rb +0 -1
  515. data/lib/fastly/models/waf_rule_response_data.rb +0 -1
  516. data/lib/fastly/models/waf_tag_attributes.rb +0 -1
  517. data/lib/fastly/models/ws_message_format.rb +228 -0
  518. data/lib/fastly/version.rb +1 -1
  519. data/lib/fastly.rb +65 -5
  520. data/pkg/fastly-4.0.0.gem +0 -0
  521. data/sig.json +1 -0
  522. metadata +137 -15
  523. data/docs/ContentApi.md +0 -52
  524. data/docs/DocsApi.md +0 -123
  525. data/docs/DomainOwnershipsApi.md +0 -47
  526. data/lib/fastly/api/content_api.rb +0 -79
  527. data/lib/fastly/api/docs_api.rb +0 -210
@@ -0,0 +1,416 @@
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 AutomationTokenCreateResponse
16
+ # The name of the token.
17
+ attr_accessor :name
18
+
19
+ # The role on the token.
20
+ attr_accessor :role
21
+
22
+ # (Optional) The service IDs of the services the token will have access to. Separate service IDs with a space. If no services are specified, the token will have access to all services on the account.
23
+ attr_accessor :services
24
+
25
+ # A space-delimited list of authorization scope.
26
+ attr_accessor :scope
27
+
28
+ # A UTC time-stamp of when the token expires.
29
+ attr_accessor :expires_at
30
+
31
+ # A UTC time-stamp of when the token was created.
32
+ attr_accessor :created_at
33
+
34
+ # Date and time in ISO 8601 format.
35
+ attr_accessor :deleted_at
36
+
37
+ # Date and time in ISO 8601 format.
38
+ attr_accessor :updated_at
39
+
40
+ attr_accessor :id
41
+
42
+ attr_accessor :user_id
43
+
44
+ attr_accessor :customer_id
45
+
46
+ attr_accessor :sudo_expires_at
47
+
48
+ attr_accessor :access_token
49
+
50
+ # A UTC time-stamp of when the token was last used.
51
+ attr_accessor :last_used_at
52
+
53
+ # The User-Agent header of the client that last used the token.
54
+ attr_accessor :user_agent
55
+
56
+ class EnumAttributeValidator
57
+ attr_reader :datatype
58
+ attr_reader :allowable_values
59
+
60
+ def initialize(datatype, allowable_values)
61
+ @allowable_values = allowable_values.map do |value|
62
+ case datatype.to_s
63
+ when /Integer/i
64
+ value.to_i
65
+ when /Float/i
66
+ value.to_f
67
+ else
68
+ value
69
+ end
70
+ end
71
+ end
72
+
73
+ def valid?(value)
74
+ !value || allowable_values.include?(value)
75
+ end
76
+ end
77
+
78
+ # Attribute mapping from ruby-style variable name to JSON key.
79
+ def self.attribute_map
80
+ {
81
+ :'name' => :'name',
82
+ :'role' => :'role',
83
+ :'services' => :'services',
84
+ :'scope' => :'scope',
85
+ :'expires_at' => :'expires_at',
86
+ :'created_at' => :'created_at',
87
+ :'deleted_at' => :'deleted_at',
88
+ :'updated_at' => :'updated_at',
89
+ :'id' => :'id',
90
+ :'user_id' => :'user_id',
91
+ :'customer_id' => :'customer_id',
92
+ :'sudo_expires_at' => :'sudo_expires_at',
93
+ :'access_token' => :'access_token',
94
+ :'last_used_at' => :'last_used_at',
95
+ :'user_agent' => :'user_agent'
96
+ }
97
+ end
98
+
99
+ # Returns all the JSON keys this model knows about
100
+ def self.acceptable_attributes
101
+ attribute_map.values
102
+ end
103
+
104
+ # Attribute type mapping.
105
+ def self.fastly_types
106
+ {
107
+ :'name' => :'String',
108
+ :'role' => :'String',
109
+ :'services' => :'Array<String>',
110
+ :'scope' => :'String',
111
+ :'expires_at' => :'String',
112
+ :'created_at' => :'Time',
113
+ :'deleted_at' => :'Time',
114
+ :'updated_at' => :'Time',
115
+ :'id' => :'String',
116
+ :'user_id' => :'String',
117
+ :'customer_id' => :'String',
118
+ :'sudo_expires_at' => :'Time',
119
+ :'access_token' => :'String',
120
+ :'last_used_at' => :'Time',
121
+ :'user_agent' => :'String'
122
+ }
123
+ end
124
+
125
+ # List of attributes with nullable: true
126
+ def self.fastly_nullable
127
+ Set.new([
128
+ :'deleted_at',
129
+ :'updated_at',
130
+ :'id',
131
+ :'user_id',
132
+ :'customer_id',
133
+ ])
134
+ end
135
+
136
+ # List of class defined in allOf (OpenAPI v3)
137
+ def self.fastly_all_of
138
+ [
139
+ :'AutomationToken',
140
+ :'AutomationTokenCreateResponseAllOf',
141
+ :'Timestamps'
142
+ ]
143
+ end
144
+
145
+ # Initializes the object
146
+ # @param [Hash] attributes Model attributes in the form of hash
147
+ def initialize(attributes = {})
148
+ if (!attributes.is_a?(Hash))
149
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::AutomationTokenCreateResponse` initialize method"
150
+ end
151
+
152
+ # check to see if the attribute exists and convert string to symbol for hash key
153
+ attributes = attributes.each_with_object({}) { |(k, v), h|
154
+ if (!self.class.attribute_map.key?(k.to_sym))
155
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::AutomationTokenCreateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
156
+ end
157
+ h[k.to_sym] = v
158
+ }
159
+
160
+ if attributes.key?(:'name')
161
+ self.name = attributes[:'name']
162
+ end
163
+
164
+ if attributes.key?(:'role')
165
+ self.role = attributes[:'role']
166
+ end
167
+
168
+ if attributes.key?(:'services')
169
+ if (value = attributes[:'services']).is_a?(Array)
170
+ self.services = value
171
+ end
172
+ end
173
+
174
+ if attributes.key?(:'scope')
175
+ self.scope = attributes[:'scope']
176
+ else
177
+ self.scope = 'global'
178
+ end
179
+
180
+ if attributes.key?(:'expires_at')
181
+ self.expires_at = attributes[:'expires_at']
182
+ end
183
+
184
+ if attributes.key?(:'created_at')
185
+ self.created_at = attributes[:'created_at']
186
+ end
187
+
188
+ if attributes.key?(:'deleted_at')
189
+ self.deleted_at = attributes[:'deleted_at']
190
+ end
191
+
192
+ if attributes.key?(:'updated_at')
193
+ self.updated_at = attributes[:'updated_at']
194
+ end
195
+
196
+ if attributes.key?(:'id')
197
+ self.id = attributes[:'id']
198
+ end
199
+
200
+ if attributes.key?(:'user_id')
201
+ self.user_id = attributes[:'user_id']
202
+ end
203
+
204
+ if attributes.key?(:'customer_id')
205
+ self.customer_id = attributes[:'customer_id']
206
+ end
207
+
208
+ if attributes.key?(:'sudo_expires_at')
209
+ self.sudo_expires_at = attributes[:'sudo_expires_at']
210
+ end
211
+
212
+ if attributes.key?(:'access_token')
213
+ self.access_token = attributes[:'access_token']
214
+ end
215
+
216
+ if attributes.key?(:'last_used_at')
217
+ self.last_used_at = attributes[:'last_used_at']
218
+ end
219
+
220
+ if attributes.key?(:'user_agent')
221
+ self.user_agent = attributes[:'user_agent']
222
+ end
223
+ end
224
+
225
+ # Show invalid properties with the reasons. Usually used together with valid?
226
+ # @return Array for valid properties with the reasons
227
+ def list_invalid_properties
228
+ invalid_properties = Array.new
229
+ invalid_properties
230
+ end
231
+
232
+ # Check to see if the all the properties in the model are valid
233
+ # @return true if the model is valid
234
+ def valid?
235
+ role_validator = EnumAttributeValidator.new('String', ["billing", "engineer", "user"])
236
+ return false unless role_validator.valid?(@role)
237
+ scope_validator = EnumAttributeValidator.new('String', ["global", "purge_select", "purge_all", "global:read"])
238
+ return false unless scope_validator.valid?(@scope)
239
+ true
240
+ end
241
+
242
+ # Custom attribute writer method checking allowed values (enum).
243
+ # @param [Object] role Object to be assigned
244
+ def role=(role)
245
+ validator = EnumAttributeValidator.new('String', ["billing", "engineer", "user"])
246
+ unless validator.valid?(role)
247
+ fail ArgumentError, "invalid value for \"role\", must be one of #{validator.allowable_values}."
248
+ end
249
+ @role = role
250
+ end
251
+
252
+ # Custom attribute writer method checking allowed values (enum).
253
+ # @param [Object] scope Object to be assigned
254
+ def scope=(scope)
255
+ validator = EnumAttributeValidator.new('String', ["global", "purge_select", "purge_all", "global:read"])
256
+ unless validator.valid?(scope)
257
+ fail ArgumentError, "invalid value for \"scope\", must be one of #{validator.allowable_values}."
258
+ end
259
+ @scope = scope
260
+ end
261
+
262
+ # Checks equality by comparing each attribute.
263
+ # @param [Object] Object to be compared
264
+ def ==(o)
265
+ return true if self.equal?(o)
266
+ self.class == o.class &&
267
+ name == o.name &&
268
+ role == o.role &&
269
+ services == o.services &&
270
+ scope == o.scope &&
271
+ expires_at == o.expires_at &&
272
+ created_at == o.created_at &&
273
+ deleted_at == o.deleted_at &&
274
+ updated_at == o.updated_at &&
275
+ id == o.id &&
276
+ user_id == o.user_id &&
277
+ customer_id == o.customer_id &&
278
+ sudo_expires_at == o.sudo_expires_at &&
279
+ access_token == o.access_token &&
280
+ last_used_at == o.last_used_at &&
281
+ user_agent == o.user_agent
282
+ end
283
+
284
+ # @see the `==` method
285
+ # @param [Object] Object to be compared
286
+ def eql?(o)
287
+ self == o
288
+ end
289
+
290
+ # Calculates hash code according to all attributes.
291
+ # @return [Integer] Hash code
292
+ def hash
293
+ [name, role, services, scope, expires_at, created_at, deleted_at, updated_at, id, user_id, customer_id, sudo_expires_at, access_token, last_used_at, user_agent].hash
294
+ end
295
+
296
+ # Builds the object from hash
297
+ # @param [Hash] attributes Model attributes in the form of hash
298
+ # @return [Object] Returns the model itself
299
+ def self.build_from_hash(attributes)
300
+ new.build_from_hash(attributes)
301
+ end
302
+
303
+ # Builds the object from hash
304
+ # @param [Hash] attributes Model attributes in the form of hash
305
+ # @return [Object] Returns the model itself
306
+ def build_from_hash(attributes)
307
+ return nil unless attributes.is_a?(Hash)
308
+ self.class.fastly_types.each_pair do |key, type|
309
+ if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key)
310
+ self.send("#{key}=", nil)
311
+ elsif type =~ /\AArray<(.*)>/i
312
+ # check to ensure the input is an array given that the attribute
313
+ # is documented as an array but the input is not
314
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
315
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
316
+ end
317
+ elsif !attributes[self.class.attribute_map[key]].nil?
318
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
319
+ end
320
+ end
321
+
322
+ self
323
+ end
324
+
325
+ # Deserializes the data based on type
326
+ # @param string type Data type
327
+ # @param string value Value to be deserialized
328
+ # @return [Object] Deserialized data
329
+ def _deserialize(type, value)
330
+ case type.to_sym
331
+ when :Time
332
+ Time.parse(value)
333
+ when :Date
334
+ Date.parse(value)
335
+ when :String
336
+ value.to_s
337
+ when :Integer
338
+ value.to_i
339
+ when :Float
340
+ value.to_f
341
+ when :Boolean
342
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
343
+ true
344
+ else
345
+ false
346
+ end
347
+ when :Object
348
+ # generic object (usually a Hash), return directly
349
+ value
350
+ when /\AArray<(?<inner_type>.+)>\z/
351
+ inner_type = Regexp.last_match[:inner_type]
352
+ value.map { |v| _deserialize(inner_type, v) }
353
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
354
+ k_type = Regexp.last_match[:k_type]
355
+ v_type = Regexp.last_match[:v_type]
356
+ {}.tap do |hash|
357
+ value.each do |k, v|
358
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
359
+ end
360
+ end
361
+ else # model
362
+ # models (e.g. Pet) or oneOf
363
+ klass = Fastly.const_get(type)
364
+ klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value)
365
+ end
366
+ end
367
+
368
+ # Returns the string representation of the object
369
+ # @return [String] String presentation of the object
370
+ def to_s
371
+ to_hash.to_s
372
+ end
373
+
374
+ # to_body is an alias to to_hash (backward compatibility)
375
+ # @return [Hash] Returns the object in the form of hash
376
+ def to_body
377
+ to_hash
378
+ end
379
+
380
+ # Returns the object in the form of hash
381
+ # @return [Hash] Returns the object in the form of hash
382
+ def to_hash
383
+ hash = {}
384
+ self.class.attribute_map.each_pair do |attr, param|
385
+ value = self.send(attr)
386
+ if value.nil?
387
+ is_nullable = self.class.fastly_nullable.include?(attr)
388
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
389
+ end
390
+
391
+ hash[param] = _to_hash(value)
392
+ end
393
+ hash
394
+ end
395
+
396
+ # Outputs non-array value in the form of hash
397
+ # For object, use to_hash. Otherwise, just return the value
398
+ # @param [Object] value Any valid value
399
+ # @return [Hash] Returns the value in the form of hash
400
+ def _to_hash(value)
401
+ if value.is_a?(Array)
402
+ value.compact.map { |v| _to_hash(v) }
403
+ elsif value.is_a?(Hash)
404
+ {}.tap do |hash|
405
+ value.each { |k, v| hash[k] = _to_hash(v) }
406
+ end
407
+ elsif value.respond_to? :to_hash
408
+ value.to_hash
409
+ else
410
+ value
411
+ end
412
+ end
413
+
414
+ end
415
+
416
+ end
@@ -0,0 +1,285 @@
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 AutomationTokenCreateResponseAllOf
16
+ attr_accessor :id
17
+
18
+ attr_accessor :user_id
19
+
20
+ attr_accessor :customer_id
21
+
22
+ attr_accessor :sudo_expires_at
23
+
24
+ # A UTC time-stamp of when the token was created.
25
+ attr_accessor :created_at
26
+
27
+ attr_accessor :access_token
28
+
29
+ # A UTC time-stamp of when the token was last used.
30
+ attr_accessor :last_used_at
31
+
32
+ # The User-Agent header of the client that last used the token.
33
+ attr_accessor :user_agent
34
+
35
+ # Attribute mapping from ruby-style variable name to JSON key.
36
+ def self.attribute_map
37
+ {
38
+ :'id' => :'id',
39
+ :'user_id' => :'user_id',
40
+ :'customer_id' => :'customer_id',
41
+ :'sudo_expires_at' => :'sudo_expires_at',
42
+ :'created_at' => :'created_at',
43
+ :'access_token' => :'access_token',
44
+ :'last_used_at' => :'last_used_at',
45
+ :'user_agent' => :'user_agent'
46
+ }
47
+ end
48
+
49
+ # Returns all the JSON keys this model knows about
50
+ def self.acceptable_attributes
51
+ attribute_map.values
52
+ end
53
+
54
+ # Attribute type mapping.
55
+ def self.fastly_types
56
+ {
57
+ :'id' => :'String',
58
+ :'user_id' => :'String',
59
+ :'customer_id' => :'String',
60
+ :'sudo_expires_at' => :'Time',
61
+ :'created_at' => :'Time',
62
+ :'access_token' => :'String',
63
+ :'last_used_at' => :'Time',
64
+ :'user_agent' => :'String'
65
+ }
66
+ end
67
+
68
+ # List of attributes with nullable: true
69
+ def self.fastly_nullable
70
+ Set.new([
71
+ :'id',
72
+ :'user_id',
73
+ :'customer_id',
74
+ ])
75
+ end
76
+
77
+ # Initializes the object
78
+ # @param [Hash] attributes Model attributes in the form of hash
79
+ def initialize(attributes = {})
80
+ if (!attributes.is_a?(Hash))
81
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::AutomationTokenCreateResponseAllOf` initialize method"
82
+ end
83
+
84
+ # check to see if the attribute exists and convert string to symbol for hash key
85
+ attributes = attributes.each_with_object({}) { |(k, v), h|
86
+ if (!self.class.attribute_map.key?(k.to_sym))
87
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::AutomationTokenCreateResponseAllOf`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
88
+ end
89
+ h[k.to_sym] = v
90
+ }
91
+
92
+ if attributes.key?(:'id')
93
+ self.id = attributes[:'id']
94
+ end
95
+
96
+ if attributes.key?(:'user_id')
97
+ self.user_id = attributes[:'user_id']
98
+ end
99
+
100
+ if attributes.key?(:'customer_id')
101
+ self.customer_id = attributes[:'customer_id']
102
+ end
103
+
104
+ if attributes.key?(:'sudo_expires_at')
105
+ self.sudo_expires_at = attributes[:'sudo_expires_at']
106
+ end
107
+
108
+ if attributes.key?(:'created_at')
109
+ self.created_at = attributes[:'created_at']
110
+ end
111
+
112
+ if attributes.key?(:'access_token')
113
+ self.access_token = attributes[:'access_token']
114
+ end
115
+
116
+ if attributes.key?(:'last_used_at')
117
+ self.last_used_at = attributes[:'last_used_at']
118
+ end
119
+
120
+ if attributes.key?(:'user_agent')
121
+ self.user_agent = attributes[:'user_agent']
122
+ end
123
+ end
124
+
125
+ # Show invalid properties with the reasons. Usually used together with valid?
126
+ # @return Array for valid properties with the reasons
127
+ def list_invalid_properties
128
+ invalid_properties = Array.new
129
+ invalid_properties
130
+ end
131
+
132
+ # Check to see if the all the properties in the model are valid
133
+ # @return true if the model is valid
134
+ def valid?
135
+ true
136
+ end
137
+
138
+ # Checks equality by comparing each attribute.
139
+ # @param [Object] Object to be compared
140
+ def ==(o)
141
+ return true if self.equal?(o)
142
+ self.class == o.class &&
143
+ id == o.id &&
144
+ user_id == o.user_id &&
145
+ customer_id == o.customer_id &&
146
+ sudo_expires_at == o.sudo_expires_at &&
147
+ created_at == o.created_at &&
148
+ access_token == o.access_token &&
149
+ last_used_at == o.last_used_at &&
150
+ user_agent == o.user_agent
151
+ end
152
+
153
+ # @see the `==` method
154
+ # @param [Object] Object to be compared
155
+ def eql?(o)
156
+ self == o
157
+ end
158
+
159
+ # Calculates hash code according to all attributes.
160
+ # @return [Integer] Hash code
161
+ def hash
162
+ [id, user_id, customer_id, sudo_expires_at, created_at, access_token, last_used_at, user_agent].hash
163
+ end
164
+
165
+ # Builds the object from hash
166
+ # @param [Hash] attributes Model attributes in the form of hash
167
+ # @return [Object] Returns the model itself
168
+ def self.build_from_hash(attributes)
169
+ new.build_from_hash(attributes)
170
+ end
171
+
172
+ # Builds the object from hash
173
+ # @param [Hash] attributes Model attributes in the form of hash
174
+ # @return [Object] Returns the model itself
175
+ def build_from_hash(attributes)
176
+ return nil unless attributes.is_a?(Hash)
177
+ self.class.fastly_types.each_pair do |key, type|
178
+ if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key)
179
+ self.send("#{key}=", nil)
180
+ elsif type =~ /\AArray<(.*)>/i
181
+ # check to ensure the input is an array given that the attribute
182
+ # is documented as an array but the input is not
183
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
184
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
185
+ end
186
+ elsif !attributes[self.class.attribute_map[key]].nil?
187
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
188
+ end
189
+ end
190
+
191
+ self
192
+ end
193
+
194
+ # Deserializes the data based on type
195
+ # @param string type Data type
196
+ # @param string value Value to be deserialized
197
+ # @return [Object] Deserialized data
198
+ def _deserialize(type, value)
199
+ case type.to_sym
200
+ when :Time
201
+ Time.parse(value)
202
+ when :Date
203
+ Date.parse(value)
204
+ when :String
205
+ value.to_s
206
+ when :Integer
207
+ value.to_i
208
+ when :Float
209
+ value.to_f
210
+ when :Boolean
211
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
212
+ true
213
+ else
214
+ false
215
+ end
216
+ when :Object
217
+ # generic object (usually a Hash), return directly
218
+ value
219
+ when /\AArray<(?<inner_type>.+)>\z/
220
+ inner_type = Regexp.last_match[:inner_type]
221
+ value.map { |v| _deserialize(inner_type, v) }
222
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
223
+ k_type = Regexp.last_match[:k_type]
224
+ v_type = Regexp.last_match[:v_type]
225
+ {}.tap do |hash|
226
+ value.each do |k, v|
227
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
228
+ end
229
+ end
230
+ else # model
231
+ # models (e.g. Pet) or oneOf
232
+ klass = Fastly.const_get(type)
233
+ klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value)
234
+ end
235
+ end
236
+
237
+ # Returns the string representation of the object
238
+ # @return [String] String presentation of the object
239
+ def to_s
240
+ to_hash.to_s
241
+ end
242
+
243
+ # to_body is an alias to to_hash (backward compatibility)
244
+ # @return [Hash] Returns the object in the form of hash
245
+ def to_body
246
+ to_hash
247
+ end
248
+
249
+ # Returns the object in the form of hash
250
+ # @return [Hash] Returns the object in the form of hash
251
+ def to_hash
252
+ hash = {}
253
+ self.class.attribute_map.each_pair do |attr, param|
254
+ value = self.send(attr)
255
+ if value.nil?
256
+ is_nullable = self.class.fastly_nullable.include?(attr)
257
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
258
+ end
259
+
260
+ hash[param] = _to_hash(value)
261
+ end
262
+ hash
263
+ end
264
+
265
+ # Outputs non-array value in the form of hash
266
+ # For object, use to_hash. Otherwise, just return the value
267
+ # @param [Object] value Any valid value
268
+ # @return [Hash] Returns the value in the form of hash
269
+ def _to_hash(value)
270
+ if value.is_a?(Array)
271
+ value.compact.map { |v| _to_hash(v) }
272
+ elsif value.is_a?(Hash)
273
+ {}.tap do |hash|
274
+ value.each { |k, v| hash[k] = _to_hash(v) }
275
+ end
276
+ elsif value.respond_to? :to_hash
277
+ value.to_hash
278
+ else
279
+ value
280
+ end
281
+ end
282
+
283
+ end
284
+
285
+ end