fastly 6.0.2 → 7.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +32 -0
- data/Gemfile.lock +1 -1
- data/README.md +7 -2
- data/docs/Backend.md +1 -0
- data/docs/BackendApi.md +4 -0
- data/docs/BackendResponse.md +1 -0
- data/docs/CacheSetting.md +2 -2
- data/docs/CacheSettingResponse.md +3 -3
- data/docs/CacheSettingsApi.md +8 -8
- data/docs/DomainApi.md +2 -2
- data/docs/GzipResponse.md +1 -1
- data/docs/Header.md +0 -2
- data/docs/HeaderApi.md +8 -8
- data/docs/HeaderResponse.md +3 -3
- data/docs/HeaderResponseAdditional.md +11 -0
- data/docs/{LoggingAzureblobAllOf.md → LoggingAzureblobAdditional.md} +1 -1
- data/docs/LoggingAzureblobApi.md +8 -8
- data/docs/LoggingAzureblobResponse.md +8 -8
- data/docs/{LoggingBigqueryAllOf.md → LoggingBigqueryAdditional.md} +1 -1
- data/docs/LoggingBigqueryApi.md +4 -4
- data/docs/LoggingBigqueryResponse.md +2 -2
- data/docs/{LoggingCloudfilesAllOf.md → LoggingCloudfilesAdditional.md} +1 -1
- data/docs/LoggingCloudfilesApi.md +8 -8
- data/docs/LoggingCloudfilesResponse.md +8 -8
- data/docs/LoggingCommon.md +0 -1
- data/docs/{LoggingPapertrail.md → LoggingCommonResponse.md} +2 -4
- data/docs/{LoggingLogshuttle.md → LoggingCommonResponseAllOf.md} +1 -4
- data/docs/LoggingCommonResponseAllOf1.md +10 -0
- data/docs/{LoggingDatadogAllOf.md → LoggingDatadogAdditional.md} +1 -1
- data/docs/LoggingDatadogApi.md +4 -4
- data/docs/LoggingDatadogResponse.md +2 -2
- data/docs/{LoggingDigitaloceanAllOf.md → LoggingDigitaloceanAdditional.md} +1 -1
- data/docs/LoggingDigitaloceanApi.md +8 -8
- data/docs/LoggingDigitaloceanResponse.md +8 -8
- data/docs/{LoggingElasticsearchAllOf.md → LoggingElasticsearchAdditional.md} +1 -1
- data/docs/LoggingElasticsearchApi.md +4 -4
- data/docs/LoggingElasticsearchResponse.md +2 -2
- data/docs/LoggingFormatVersionInteger.md +10 -0
- data/docs/LoggingFormatVersionString.md +10 -0
- data/docs/{LoggingFtpAllOf.md → LoggingFtpAdditional.md} +1 -2
- data/docs/LoggingFtpApi.md +12 -12
- data/docs/LoggingFtpResponse.md +9 -9
- data/docs/{LoggingFormatVersion.md → LoggingFtpResponseAllOf.md} +2 -1
- data/docs/{LoggingGcsAllOf.md → LoggingGcsAdditional.md} +1 -1
- data/docs/LoggingGcsApi.md +8 -8
- data/docs/LoggingGcsResponse.md +8 -8
- data/docs/LoggingGenericCommon.md +0 -2
- data/docs/LoggingGenericCommonResponse.md +14 -0
- data/docs/LoggingGenericCommonResponseAllOf.md +12 -0
- data/docs/LoggingGenericCommonResponseAllOf1.md +11 -0
- data/docs/{LoggingGooglePubsubAllOf.md → LoggingGooglePubsubAdditional.md} +1 -1
- data/docs/LoggingGooglePubsubResponse.md +2 -2
- data/docs/{LoggingHerokuAllOf.md → LoggingHerokuAdditional.md} +1 -1
- data/docs/LoggingHerokuApi.md +4 -4
- data/docs/LoggingHerokuResponse.md +2 -2
- data/docs/{LoggingHoneycombAllOf.md → LoggingHoneycombAdditional.md} +1 -1
- data/docs/LoggingHoneycombApi.md +8 -8
- data/docs/LoggingHoneycombResponse.md +2 -2
- data/docs/{LoggingHttpsAllOf.md → LoggingHttpsAdditional.md} +1 -1
- data/docs/LoggingHttpsApi.md +4 -4
- data/docs/LoggingHttpsResponse.md +2 -2
- data/docs/{LoggingKafkaAllOf.md → LoggingKafkaAdditional.md} +1 -1
- data/docs/LoggingKafkaApi.md +4 -4
- data/docs/LoggingKafkaResponse.md +6 -6
- data/docs/{LoggingKafka.md → LoggingKafkaResponsePost.md} +7 -2
- data/docs/{LoggingKinesis.md → LoggingKinesisAdditional.md} +1 -2
- data/docs/LoggingKinesisApi.md +2 -2
- data/docs/LoggingKinesisResponse.md +2 -2
- data/docs/{LoggingLogentriesAllOf.md → LoggingLogentriesAdditional.md} +1 -1
- data/docs/LoggingLogentriesApi.md +4 -4
- data/docs/LoggingLogentriesResponse.md +2 -2
- data/docs/{LoggingLogglyAllOf.md → LoggingLogglyAdditional.md} +1 -1
- data/docs/LoggingLogglyApi.md +4 -4
- data/docs/LoggingLogglyResponse.md +2 -2
- data/docs/{LoggingLogshuttleAllOf.md → LoggingLogshuttleAdditional.md} +1 -1
- data/docs/LoggingLogshuttleApi.md +4 -4
- data/docs/LoggingLogshuttleResponse.md +2 -2
- data/docs/{LoggingNewrelicAllOf.md → LoggingNewrelicAdditional.md} +1 -1
- data/docs/LoggingNewrelicApi.md +4 -4
- data/docs/LoggingNewrelicResponse.md +2 -2
- data/docs/LoggingNewrelicotlpAdditional.md +13 -0
- data/docs/LoggingNewrelicotlpApi.md +252 -0
- data/docs/LoggingNewrelicotlpResponse.md +22 -0
- data/docs/{LoggingOpenstackAllOf.md → LoggingOpenstackAdditional.md} +1 -1
- data/docs/LoggingOpenstackApi.md +8 -8
- data/docs/LoggingOpenstackResponse.md +8 -8
- data/docs/LoggingPapertrailApi.md +4 -4
- data/docs/LoggingPapertrailResponse.md +2 -2
- data/docs/LoggingPubsubApi.md +4 -4
- data/docs/{LoggingS3AllOf.md → LoggingS3Additional.md} +1 -1
- data/docs/LoggingS3Api.md +8 -8
- data/docs/LoggingS3Response.md +8 -8
- data/docs/{LoggingScalyrAllOf.md → LoggingScalyrAdditional.md} +1 -1
- data/docs/LoggingScalyrApi.md +4 -4
- data/docs/LoggingScalyrResponse.md +2 -2
- data/docs/{LoggingSftpAllOf.md → LoggingSftpAdditional.md} +1 -2
- data/docs/LoggingSftpApi.md +8 -8
- data/docs/LoggingSftpResponse.md +10 -10
- data/docs/LoggingSftpResponseAllOf.md +13 -0
- data/docs/{LoggingSplunkAllOf.md → LoggingSplunkAdditional.md} +1 -1
- data/docs/LoggingSplunkApi.md +4 -4
- data/docs/LoggingSplunkResponse.md +2 -2
- data/docs/{LoggingSumologicAllOf.md → LoggingSumologicAdditional.md} +1 -1
- data/docs/LoggingSumologicApi.md +4 -4
- data/docs/LoggingSumologicResponse.md +2 -2
- data/docs/{LoggingSyslogAllOf.md → LoggingSyslogAdditional.md} +1 -1
- data/docs/LoggingSyslogApi.md +4 -4
- data/docs/LoggingSyslogResponse.md +2 -2
- data/docs/{PoolAllOf.md → PoolAdditional.md} +1 -6
- data/docs/PoolApi.md +46 -22
- data/docs/PoolResponse.md +12 -11
- data/docs/PoolResponseAllOf.md +1 -1
- data/docs/PoolResponseCommon.md +15 -0
- data/docs/{Pool.md → PoolResponsePost.md} +14 -7
- data/docs/PoolResponsePostAllOf.md +10 -0
- data/docs/RequestSettingsAdditional.md +15 -0
- data/docs/RequestSettingsApi.md +10 -10
- data/docs/RequestSettingsResponse.md +11 -11
- data/docs/RequestSettingsResponseAllOf.md +15 -0
- data/docs/ResponseObject.md +1 -1
- data/docs/ResponseObjectResponse.md +2 -2
- data/docs/SecretStoreApi.md +3 -3
- data/docs/ServiceIdAndVersionString.md +11 -0
- data/docs/TlsCommonResponse.md +14 -0
- data/docs/{TlsCommon.md → TlsCommonResponseAllOf.md} +1 -2
- data/docs/TlsCommonResponseAllOf1.md +10 -0
- data/docs/TlsDomainsApi.md +2 -2
- data/docs/TlsSubscriptionsApi.md +4 -4
- data/lib/fastly/api/backend_api.rb +16 -0
- data/lib/fastly/api/cache_settings_api.rb +8 -8
- data/lib/fastly/api/domain_api.rb +3 -3
- data/lib/fastly/api/header_api.rb +12 -12
- data/lib/fastly/api/logging_azureblob_api.rb +12 -12
- data/lib/fastly/api/logging_bigquery_api.rb +6 -6
- data/lib/fastly/api/logging_cloudfiles_api.rb +12 -12
- data/lib/fastly/api/logging_datadog_api.rb +6 -6
- data/lib/fastly/api/logging_digitalocean_api.rb +12 -12
- data/lib/fastly/api/logging_elasticsearch_api.rb +6 -6
- data/lib/fastly/api/logging_ftp_api.rb +18 -18
- data/lib/fastly/api/logging_gcs_api.rb +12 -12
- data/lib/fastly/api/logging_heroku_api.rb +6 -6
- data/lib/fastly/api/logging_honeycomb_api.rb +12 -12
- data/lib/fastly/api/logging_https_api.rb +6 -6
- data/lib/fastly/api/logging_kafka_api.rb +6 -6
- data/lib/fastly/api/logging_kinesis_api.rb +7 -3
- data/lib/fastly/api/logging_logentries_api.rb +6 -6
- data/lib/fastly/api/logging_loggly_api.rb +6 -6
- data/lib/fastly/api/logging_logshuttle_api.rb +6 -6
- data/lib/fastly/api/logging_newrelic_api.rb +6 -6
- data/lib/fastly/api/logging_newrelicotlp_api.rb +473 -0
- data/lib/fastly/api/logging_openstack_api.rb +12 -12
- data/lib/fastly/api/logging_papertrail_api.rb +6 -6
- data/lib/fastly/api/logging_pubsub_api.rb +6 -6
- data/lib/fastly/api/logging_s3_api.rb +12 -12
- data/lib/fastly/api/logging_scalyr_api.rb +6 -6
- data/lib/fastly/api/logging_sftp_api.rb +12 -12
- data/lib/fastly/api/logging_splunk_api.rb +6 -6
- data/lib/fastly/api/logging_sumologic_api.rb +6 -6
- data/lib/fastly/api/logging_syslog_api.rb +6 -6
- data/lib/fastly/api/pool_api.rb +77 -41
- data/lib/fastly/api/rate_limiter_api.rb +2 -2
- data/lib/fastly/api/request_settings_api.rb +15 -15
- data/lib/fastly/api/secret_store_api.rb +2 -2
- data/lib/fastly/api/tls_domains_api.rb +2 -2
- data/lib/fastly/api/tls_subscriptions_api.rb +4 -4
- data/lib/fastly/configuration.rb +30 -0
- data/lib/fastly/models/backend.rb +29 -1
- data/lib/fastly/models/backend_response.rb +29 -1
- data/lib/fastly/models/cache_setting.rb +2 -2
- data/lib/fastly/models/cache_setting_response.rb +4 -4
- data/lib/fastly/models/gzip_response.rb +2 -2
- data/lib/fastly/models/header.rb +1 -23
- data/lib/fastly/models/header_response.rb +26 -25
- data/lib/fastly/models/header_response_additional.rb +229 -0
- data/lib/fastly/models/{logging_azureblob_all_of.rb → logging_azureblob_additional.rb} +3 -3
- data/lib/fastly/models/logging_azureblob_response.rb +82 -80
- data/lib/fastly/models/{logging_bigquery_all_of.rb → logging_bigquery_additional.rb} +3 -3
- data/lib/fastly/models/logging_bigquery_response.rb +20 -18
- data/lib/fastly/models/{logging_cloudfiles_all_of.rb → logging_cloudfiles_additional.rb} +3 -3
- data/lib/fastly/models/logging_cloudfiles_response.rb +83 -81
- data/lib/fastly/models/logging_common.rb +1 -25
- data/lib/fastly/models/{logging_loggly.rb → logging_common_response.rb} +17 -27
- data/lib/fastly/models/{logging_logshuttle.rb → logging_common_response_all_of.rb} +7 -60
- data/lib/fastly/models/logging_common_response_all_of1.rb +253 -0
- data/lib/fastly/models/{logging_datadog_all_of.rb → logging_datadog_additional.rb} +3 -3
- data/lib/fastly/models/logging_datadog_response.rb +19 -18
- data/lib/fastly/models/{logging_digitalocean_all_of.rb → logging_digitalocean_additional.rb} +3 -3
- data/lib/fastly/models/logging_digitalocean_response.rb +82 -80
- data/lib/fastly/models/{logging_elasticsearch_all_of.rb → logging_elasticsearch_additional.rb} +3 -3
- data/lib/fastly/models/logging_elasticsearch_response.rb +21 -18
- data/lib/fastly/models/logging_format_version_integer.rb +253 -0
- data/lib/fastly/models/logging_format_version_string.rb +253 -0
- data/lib/fastly/models/{logging_ftp_all_of.rb → logging_ftp_additional.rb} +4 -16
- data/lib/fastly/models/logging_ftp_response.rb +88 -85
- data/lib/fastly/models/logging_ftp_response_all_of.rb +219 -0
- data/lib/fastly/models/{logging_gcs_all_of.rb → logging_gcs_additional.rb} +3 -3
- data/lib/fastly/models/logging_gcs_response.rb +80 -77
- data/lib/fastly/models/logging_generic_common.rb +1 -25
- data/lib/fastly/models/{logging_sumologic.rb → logging_generic_common_response.rb} +60 -80
- data/lib/fastly/models/logging_generic_common_response_all_of.rb +286 -0
- data/lib/fastly/models/logging_generic_common_response_all_of1.rb +231 -0
- data/lib/fastly/models/{logging_google_pubsub_all_of.rb → logging_google_pubsub_additional.rb} +3 -3
- data/lib/fastly/models/logging_google_pubsub_response.rb +20 -18
- data/lib/fastly/models/{logging_heroku_all_of.rb → logging_heroku_additional.rb} +3 -3
- data/lib/fastly/models/logging_heroku_response.rb +19 -18
- data/lib/fastly/models/{logging_honeycomb_all_of.rb → logging_honeycomb_additional.rb} +3 -3
- data/lib/fastly/models/logging_honeycomb_response.rb +19 -18
- data/lib/fastly/models/{logging_https_all_of.rb → logging_https_additional.rb} +3 -3
- data/lib/fastly/models/logging_https_response.rb +21 -18
- data/lib/fastly/models/{logging_kafka_all_of.rb → logging_kafka_additional.rb} +3 -3
- data/lib/fastly/models/logging_kafka_response.rb +71 -69
- data/lib/fastly/models/{logging_kafka.rb → logging_kafka_response_post.rb} +72 -18
- data/lib/fastly/models/{logging_kinesis.rb → logging_kinesis_additional.rb} +4 -15
- data/lib/fastly/models/logging_kinesis_response.rb +51 -15
- data/lib/fastly/models/{logging_logentries_all_of.rb → logging_logentries_additional.rb} +3 -3
- data/lib/fastly/models/logging_logentries_response.rb +19 -18
- data/lib/fastly/models/{logging_loggly_all_of.rb → logging_loggly_additional.rb} +3 -3
- data/lib/fastly/models/logging_loggly_response.rb +19 -18
- data/lib/fastly/models/{logging_logshuttle_all_of.rb → logging_logshuttle_additional.rb} +3 -3
- data/lib/fastly/models/logging_logshuttle_response.rb +19 -18
- data/lib/fastly/models/{logging_newrelic_all_of.rb → logging_newrelic_additional.rb} +3 -3
- data/lib/fastly/models/logging_newrelic_response.rb +19 -18
- data/lib/fastly/models/logging_newrelicotlp_additional.rb +288 -0
- data/lib/fastly/models/{logging_newrelic.rb → logging_newrelicotlp_response.rb} +90 -24
- data/lib/fastly/models/{logging_openstack_all_of.rb → logging_openstack_additional.rb} +3 -3
- data/lib/fastly/models/logging_openstack_response.rb +82 -80
- data/lib/fastly/models/logging_papertrail_response.rb +19 -18
- data/lib/fastly/models/{logging_s3_all_of.rb → logging_s3_additional.rb} +3 -3
- data/lib/fastly/models/logging_s3_response.rb +84 -82
- data/lib/fastly/models/{logging_scalyr_all_of.rb → logging_scalyr_additional.rb} +3 -3
- data/lib/fastly/models/logging_scalyr_response.rb +19 -18
- data/lib/fastly/models/{logging_sftp_all_of.rb → logging_sftp_additional.rb} +4 -16
- data/lib/fastly/models/logging_sftp_response.rb +97 -94
- data/lib/fastly/models/{domain_check_item.rb → logging_sftp_response_all_of.rb} +44 -40
- data/lib/fastly/models/{logging_splunk_all_of.rb → logging_splunk_additional.rb} +3 -3
- data/lib/fastly/models/logging_splunk_response.rb +21 -18
- data/lib/fastly/models/{logging_sumologic_all_of.rb → logging_sumologic_additional.rb} +3 -3
- data/lib/fastly/models/logging_sumologic_response.rb +19 -18
- data/lib/fastly/models/{logging_syslog_all_of.rb → logging_syslog_additional.rb} +3 -3
- data/lib/fastly/models/logging_syslog_response.rb +21 -18
- data/lib/fastly/models/{pool_all_of.rb → pool_additional.rb} +4 -83
- data/lib/fastly/models/pool_response.rb +113 -125
- data/lib/fastly/models/pool_response_all_of.rb +10 -7
- data/lib/fastly/models/pool_response_common.rb +269 -0
- data/lib/fastly/models/{pool.rb → pool_response_post.rb} +142 -92
- data/lib/fastly/models/pool_response_post_all_of.rb +219 -0
- data/lib/fastly/models/rate_limiter.rb +2 -2
- data/lib/fastly/models/rate_limiter_response.rb +2 -2
- data/lib/fastly/models/{request_settings.rb → request_settings_additional.rb} +4 -64
- data/lib/fastly/models/request_settings_response.rb +96 -95
- data/lib/fastly/models/request_settings_response_all_of.rb +267 -0
- data/lib/fastly/models/response_object.rb +2 -2
- data/lib/fastly/models/response_object_response.rb +4 -4
- data/lib/fastly/models/{tls_subscription_response_data_all_of.rb → service_id_and_version_string.rb} +16 -16
- data/lib/fastly/models/{tls_common.rb → tls_common_response.rb} +15 -7
- data/lib/fastly/models/tls_common_response_all_of.rb +259 -0
- data/lib/fastly/models/tls_common_response_all_of1.rb +253 -0
- data/lib/fastly/models/tls_subscription_response_data.rb +0 -7
- data/lib/fastly/version.rb +1 -1
- data/lib/fastly.rb +50 -57
- data/sig.json +1 -1
- metadata +102 -116
- data/docs/DomainCheckItem.md +0 -11
- data/docs/LoggingAzureblob.md +0 -25
- data/docs/LoggingBigquery.md +0 -21
- data/docs/LoggingCloudfiles.md +0 -25
- data/docs/LoggingDatadog.md +0 -16
- data/docs/LoggingDigitalocean.md +0 -25
- data/docs/LoggingElasticsearch.md +0 -25
- data/docs/LoggingFtp.md +0 -27
- data/docs/LoggingGcs.md +0 -26
- data/docs/LoggingGooglePubsub.md +0 -19
- data/docs/LoggingHeroku.md +0 -16
- data/docs/LoggingHoneycomb.md +0 -16
- data/docs/LoggingHttps.md +0 -27
- data/docs/LoggingLogentries.md +0 -18
- data/docs/LoggingLoggly.md +0 -15
- data/docs/LoggingNewrelic.md +0 -16
- data/docs/LoggingOpenstack.md +0 -25
- data/docs/LoggingS3.md +0 -30
- data/docs/LoggingScalyr.md +0 -17
- data/docs/LoggingSftp.md +0 -27
- data/docs/LoggingSplunk.md +0 -23
- data/docs/LoggingSumologic.md +0 -16
- data/docs/LoggingSyslog.md +0 -25
- data/docs/RequestSettings.md +0 -21
- data/docs/TlsSubscriptionResponseDataAllOf.md +0 -11
- data/lib/fastly/models/logging_azureblob.rb +0 -480
- data/lib/fastly/models/logging_bigquery.rb +0 -387
- data/lib/fastly/models/logging_cloudfiles.rb +0 -478
- data/lib/fastly/models/logging_datadog.rb +0 -351
- data/lib/fastly/models/logging_digitalocean.rb +0 -467
- data/lib/fastly/models/logging_elasticsearch.rb +0 -446
- data/lib/fastly/models/logging_format_version.rb +0 -35
- data/lib/fastly/models/logging_ftp.rb +0 -484
- data/lib/fastly/models/logging_gcs.rb +0 -474
- data/lib/fastly/models/logging_google_pubsub.rb +0 -368
- data/lib/fastly/models/logging_heroku.rb +0 -337
- data/lib/fastly/models/logging_honeycomb.rb +0 -335
- data/lib/fastly/models/logging_https.rb +0 -501
- data/lib/fastly/models/logging_logentries.rb +0 -372
- data/lib/fastly/models/logging_openstack.rb +0 -465
- data/lib/fastly/models/logging_papertrail.rb +0 -339
- data/lib/fastly/models/logging_s3.rb +0 -527
- data/lib/fastly/models/logging_scalyr.rb +0 -363
- data/lib/fastly/models/logging_sftp.rb +0 -491
- data/lib/fastly/models/logging_splunk.rb +0 -426
- data/lib/fastly/models/logging_syslog.rb +0 -449
@@ -19,15 +19,15 @@ module Fastly
|
|
19
19
|
# Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`.
|
20
20
|
attr_accessor :placement
|
21
21
|
|
22
|
-
# The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`.
|
23
|
-
attr_accessor :format_version
|
24
|
-
|
25
22
|
# The name of an existing condition in the configured endpoint, or leave blank to always execute.
|
26
23
|
attr_accessor :response_condition
|
27
24
|
|
28
25
|
# A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). Must produce valid JSON that New Relic Logs can ingest.
|
29
26
|
attr_accessor :format
|
30
27
|
|
28
|
+
# The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`.
|
29
|
+
attr_accessor :format_version
|
30
|
+
|
31
31
|
# The Insert API key from the Account page of your New Relic account. Required.
|
32
32
|
attr_accessor :token
|
33
33
|
|
@@ -74,9 +74,9 @@ module Fastly
|
|
74
74
|
{
|
75
75
|
:'name' => :'name',
|
76
76
|
:'placement' => :'placement',
|
77
|
-
:'format_version' => :'format_version',
|
78
77
|
:'response_condition' => :'response_condition',
|
79
78
|
:'format' => :'format',
|
79
|
+
:'format_version' => :'format_version',
|
80
80
|
:'token' => :'token',
|
81
81
|
:'region' => :'region',
|
82
82
|
:'created_at' => :'created_at',
|
@@ -97,16 +97,16 @@ module Fastly
|
|
97
97
|
{
|
98
98
|
:'name' => :'String',
|
99
99
|
:'placement' => :'String',
|
100
|
-
:'format_version' => :'Integer',
|
101
100
|
:'response_condition' => :'String',
|
102
101
|
:'format' => :'String',
|
102
|
+
:'format_version' => :'String',
|
103
103
|
:'token' => :'String',
|
104
104
|
:'region' => :'String',
|
105
105
|
:'created_at' => :'Time',
|
106
106
|
:'deleted_at' => :'Time',
|
107
107
|
:'updated_at' => :'Time',
|
108
108
|
:'service_id' => :'String',
|
109
|
-
:'version' => :'
|
109
|
+
:'version' => :'String'
|
110
110
|
}
|
111
111
|
end
|
112
112
|
|
@@ -124,8 +124,9 @@ module Fastly
|
|
124
124
|
# List of class defined in allOf (OpenAPI v3)
|
125
125
|
def self.fastly_all_of
|
126
126
|
[
|
127
|
-
:'
|
128
|
-
:'
|
127
|
+
:'LoggingCommonResponse',
|
128
|
+
:'LoggingNewrelicAdditional',
|
129
|
+
:'ServiceIdAndVersionString',
|
129
130
|
:'Timestamps'
|
130
131
|
]
|
131
132
|
end
|
@@ -153,12 +154,6 @@ module Fastly
|
|
153
154
|
self.placement = attributes[:'placement']
|
154
155
|
end
|
155
156
|
|
156
|
-
if attributes.key?(:'format_version')
|
157
|
-
self.format_version = attributes[:'format_version']
|
158
|
-
else
|
159
|
-
self.format_version = FORMAT_VERSION::v2
|
160
|
-
end
|
161
|
-
|
162
157
|
if attributes.key?(:'response_condition')
|
163
158
|
self.response_condition = attributes[:'response_condition']
|
164
159
|
end
|
@@ -169,6 +164,12 @@ module Fastly
|
|
169
164
|
self.format = '{\"timestamp\":\"%{begin:%Y-%m-%dT%H:%M:%S}t\",\"time_elapsed\":\"%{time.elapsed.usec}V\",\"is_tls\":\"%{if(req.is_ssl, \\\"true\\\", \\\"false\\\")}V\",\"client_ip\":\"%{req.http.Fastly-Client-IP}V\",\"geo_city\":\"%{client.geo.city}V\",\"geo_country_code\":\"%{client.geo.country_code}V\",\"request\":\"%{req.request}V\",\"host\":\"%{req.http.Fastly-Orig-Host}V\",\"url\":\"%{json.escape(req.url)}V\",\"request_referer\":\"%{json.escape(req.http.Referer)}V\",\"request_user_agent\":\"%{json.escape(req.http.User-Agent)}V\",\"request_accept_language\":\"%{json.escape(req.http.Accept-Language)}V\",\"request_accept_charset\":\"%{json.escape(req.http.Accept-Charset)}V\",\"cache_status\":\"%{regsub(fastly_info.state, \\\"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\\\", \\\"\\\\2\\\\3\\\") }V\"}'
|
170
165
|
end
|
171
166
|
|
167
|
+
if attributes.key?(:'format_version')
|
168
|
+
self.format_version = attributes[:'format_version']
|
169
|
+
else
|
170
|
+
self.format_version = '2'
|
171
|
+
end
|
172
|
+
|
172
173
|
if attributes.key?(:'token')
|
173
174
|
self.token = attributes[:'token']
|
174
175
|
end
|
@@ -212,7 +213,7 @@ module Fastly
|
|
212
213
|
def valid?
|
213
214
|
placement_validator = EnumAttributeValidator.new('String', ["none", "waf_debug", "null"])
|
214
215
|
return false unless placement_validator.valid?(@placement)
|
215
|
-
format_version_validator = EnumAttributeValidator.new('
|
216
|
+
format_version_validator = EnumAttributeValidator.new('String', ["1", "2"])
|
216
217
|
return false unless format_version_validator.valid?(@format_version)
|
217
218
|
region_validator = EnumAttributeValidator.new('String', ["US", "EU"])
|
218
219
|
return false unless region_validator.valid?(@region)
|
@@ -232,7 +233,7 @@ module Fastly
|
|
232
233
|
# Custom attribute writer method checking allowed values (enum).
|
233
234
|
# @param [Object] format_version Object to be assigned
|
234
235
|
def format_version=(format_version)
|
235
|
-
validator = EnumAttributeValidator.new('
|
236
|
+
validator = EnumAttributeValidator.new('String', ["1", "2"])
|
236
237
|
unless validator.valid?(format_version)
|
237
238
|
fail ArgumentError, "invalid value for \"format_version\", must be one of #{validator.allowable_values}."
|
238
239
|
end
|
@@ -256,9 +257,9 @@ module Fastly
|
|
256
257
|
self.class == o.class &&
|
257
258
|
name == o.name &&
|
258
259
|
placement == o.placement &&
|
259
|
-
format_version == o.format_version &&
|
260
260
|
response_condition == o.response_condition &&
|
261
261
|
format == o.format &&
|
262
|
+
format_version == o.format_version &&
|
262
263
|
token == o.token &&
|
263
264
|
region == o.region &&
|
264
265
|
created_at == o.created_at &&
|
@@ -277,7 +278,7 @@ module Fastly
|
|
277
278
|
# Calculates hash code according to all attributes.
|
278
279
|
# @return [Integer] Hash code
|
279
280
|
def hash
|
280
|
-
[name, placement,
|
281
|
+
[name, placement, response_condition, format, format_version, token, region, created_at, deleted_at, updated_at, service_id, version].hash
|
281
282
|
end
|
282
283
|
|
283
284
|
# Builds the object from hash
|
@@ -0,0 +1,288 @@
|
|
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 LoggingNewrelicotlpAdditional
|
16
|
+
# A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats).
|
17
|
+
attr_accessor :format
|
18
|
+
|
19
|
+
# The Insert API key from the Account page of your New Relic account. Required.
|
20
|
+
attr_accessor :token
|
21
|
+
|
22
|
+
# The region to which to stream logs.
|
23
|
+
attr_accessor :region
|
24
|
+
|
25
|
+
# (Optional) URL of the New Relic Trace Observer, if you are using New Relic Infinite Tracing.
|
26
|
+
attr_accessor :url
|
27
|
+
|
28
|
+
class EnumAttributeValidator
|
29
|
+
attr_reader :datatype
|
30
|
+
attr_reader :allowable_values
|
31
|
+
|
32
|
+
def initialize(datatype, allowable_values)
|
33
|
+
@allowable_values = allowable_values.map do |value|
|
34
|
+
case datatype.to_s
|
35
|
+
when /Integer/i
|
36
|
+
value.to_i
|
37
|
+
when /Float/i
|
38
|
+
value.to_f
|
39
|
+
else
|
40
|
+
value
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
def valid?(value)
|
46
|
+
!value || allowable_values.include?(value)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
51
|
+
def self.attribute_map
|
52
|
+
{
|
53
|
+
:'format' => :'format',
|
54
|
+
:'token' => :'token',
|
55
|
+
:'region' => :'region',
|
56
|
+
:'url' => :'url'
|
57
|
+
}
|
58
|
+
end
|
59
|
+
|
60
|
+
# Returns all the JSON keys this model knows about
|
61
|
+
def self.acceptable_attributes
|
62
|
+
attribute_map.values
|
63
|
+
end
|
64
|
+
|
65
|
+
# Attribute type mapping.
|
66
|
+
def self.fastly_types
|
67
|
+
{
|
68
|
+
:'format' => :'String',
|
69
|
+
:'token' => :'String',
|
70
|
+
:'region' => :'String',
|
71
|
+
:'url' => :'String'
|
72
|
+
}
|
73
|
+
end
|
74
|
+
|
75
|
+
# List of attributes with nullable: true
|
76
|
+
def self.fastly_nullable
|
77
|
+
Set.new([
|
78
|
+
:'url'
|
79
|
+
])
|
80
|
+
end
|
81
|
+
|
82
|
+
# Initializes the object
|
83
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
84
|
+
def initialize(attributes = {})
|
85
|
+
if (!attributes.is_a?(Hash))
|
86
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::LoggingNewrelicotlpAdditional` initialize method"
|
87
|
+
end
|
88
|
+
|
89
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
90
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
91
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
92
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::LoggingNewrelicotlpAdditional`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
93
|
+
end
|
94
|
+
h[k.to_sym] = v
|
95
|
+
}
|
96
|
+
|
97
|
+
if attributes.key?(:'format')
|
98
|
+
self.format = attributes[:'format']
|
99
|
+
else
|
100
|
+
self.format = '{\"timestamp\":\"%{begin:%Y-%m-%dT%H:%M:%S}t\",\"time_elapsed\":\"%{time.elapsed.usec}V\",\"is_tls\":\"%{if(req.is_ssl, \\\"true\\\", \\\"false\\\")}V\",\"client_ip\":\"%{req.http.Fastly-Client-IP}V\",\"geo_city\":\"%{client.geo.city}V\",\"geo_country_code\":\"%{client.geo.country_code}V\",\"request\":\"%{req.request}V\",\"host\":\"%{req.http.Fastly-Orig-Host}V\",\"url\":\"%{json.escape(req.url)}V\",\"request_referer\":\"%{json.escape(req.http.Referer)}V\",\"request_user_agent\":\"%{json.escape(req.http.User-Agent)}V\",\"request_accept_language\":\"%{json.escape(req.http.Accept-Language)}V\",\"request_accept_charset\":\"%{json.escape(req.http.Accept-Charset)}V\",\"cache_status\":\"%{regsub(fastly_info.state, \\\"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\\\", \\\"\\\\2\\\\3\\\") }V\"}'
|
101
|
+
end
|
102
|
+
|
103
|
+
if attributes.key?(:'token')
|
104
|
+
self.token = attributes[:'token']
|
105
|
+
end
|
106
|
+
|
107
|
+
if attributes.key?(:'region')
|
108
|
+
self.region = attributes[:'region']
|
109
|
+
else
|
110
|
+
self.region = 'US'
|
111
|
+
end
|
112
|
+
|
113
|
+
if attributes.key?(:'url')
|
114
|
+
self.url = attributes[:'url']
|
115
|
+
else
|
116
|
+
self.url = 'null'
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
121
|
+
# @return Array for valid properties with the reasons
|
122
|
+
def list_invalid_properties
|
123
|
+
invalid_properties = Array.new
|
124
|
+
invalid_properties
|
125
|
+
end
|
126
|
+
|
127
|
+
# Check to see if the all the properties in the model are valid
|
128
|
+
# @return true if the model is valid
|
129
|
+
def valid?
|
130
|
+
region_validator = EnumAttributeValidator.new('String', ["US", "EU"])
|
131
|
+
return false unless region_validator.valid?(@region)
|
132
|
+
true
|
133
|
+
end
|
134
|
+
|
135
|
+
# Custom attribute writer method checking allowed values (enum).
|
136
|
+
# @param [Object] region Object to be assigned
|
137
|
+
def region=(region)
|
138
|
+
validator = EnumAttributeValidator.new('String', ["US", "EU"])
|
139
|
+
unless validator.valid?(region)
|
140
|
+
fail ArgumentError, "invalid value for \"region\", must be one of #{validator.allowable_values}."
|
141
|
+
end
|
142
|
+
@region = region
|
143
|
+
end
|
144
|
+
|
145
|
+
# Checks equality by comparing each attribute.
|
146
|
+
# @param [Object] Object to be compared
|
147
|
+
def ==(o)
|
148
|
+
return true if self.equal?(o)
|
149
|
+
self.class == o.class &&
|
150
|
+
format == o.format &&
|
151
|
+
token == o.token &&
|
152
|
+
region == o.region &&
|
153
|
+
url == o.url
|
154
|
+
end
|
155
|
+
|
156
|
+
# @see the `==` method
|
157
|
+
# @param [Object] Object to be compared
|
158
|
+
def eql?(o)
|
159
|
+
self == o
|
160
|
+
end
|
161
|
+
|
162
|
+
# Calculates hash code according to all attributes.
|
163
|
+
# @return [Integer] Hash code
|
164
|
+
def hash
|
165
|
+
[format, token, region, url].hash
|
166
|
+
end
|
167
|
+
|
168
|
+
# Builds the object from hash
|
169
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
170
|
+
# @return [Object] Returns the model itself
|
171
|
+
def self.build_from_hash(attributes)
|
172
|
+
new.build_from_hash(attributes)
|
173
|
+
end
|
174
|
+
|
175
|
+
# Builds the object from hash
|
176
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
177
|
+
# @return [Object] Returns the model itself
|
178
|
+
def build_from_hash(attributes)
|
179
|
+
return nil unless attributes.is_a?(Hash)
|
180
|
+
self.class.fastly_types.each_pair do |key, type|
|
181
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key)
|
182
|
+
self.send("#{key}=", nil)
|
183
|
+
elsif type =~ /\AArray<(.*)>/i
|
184
|
+
# check to ensure the input is an array given that the attribute
|
185
|
+
# is documented as an array but the input is not
|
186
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
187
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
188
|
+
end
|
189
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
190
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
191
|
+
end
|
192
|
+
end
|
193
|
+
|
194
|
+
self
|
195
|
+
end
|
196
|
+
|
197
|
+
# Deserializes the data based on type
|
198
|
+
# @param string type Data type
|
199
|
+
# @param string value Value to be deserialized
|
200
|
+
# @return [Object] Deserialized data
|
201
|
+
def _deserialize(type, value)
|
202
|
+
case type.to_sym
|
203
|
+
when :Time
|
204
|
+
Time.parse(value)
|
205
|
+
when :Date
|
206
|
+
Date.parse(value)
|
207
|
+
when :String
|
208
|
+
value.to_s
|
209
|
+
when :Integer
|
210
|
+
value.to_i
|
211
|
+
when :Float
|
212
|
+
value.to_f
|
213
|
+
when :Boolean
|
214
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
215
|
+
true
|
216
|
+
else
|
217
|
+
false
|
218
|
+
end
|
219
|
+
when :Object
|
220
|
+
# generic object (usually a Hash), return directly
|
221
|
+
value
|
222
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
223
|
+
inner_type = Regexp.last_match[:inner_type]
|
224
|
+
value.map { |v| _deserialize(inner_type, v) }
|
225
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
226
|
+
k_type = Regexp.last_match[:k_type]
|
227
|
+
v_type = Regexp.last_match[:v_type]
|
228
|
+
{}.tap do |hash|
|
229
|
+
value.each do |k, v|
|
230
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
231
|
+
end
|
232
|
+
end
|
233
|
+
else # model
|
234
|
+
# models (e.g. Pet) or oneOf
|
235
|
+
klass = Fastly.const_get(type)
|
236
|
+
klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
237
|
+
end
|
238
|
+
end
|
239
|
+
|
240
|
+
# Returns the string representation of the object
|
241
|
+
# @return [String] String presentation of the object
|
242
|
+
def to_s
|
243
|
+
to_hash.to_s
|
244
|
+
end
|
245
|
+
|
246
|
+
# to_body is an alias to to_hash (backward compatibility)
|
247
|
+
# @return [Hash] Returns the object in the form of hash
|
248
|
+
def to_body
|
249
|
+
to_hash
|
250
|
+
end
|
251
|
+
|
252
|
+
# Returns the object in the form of hash
|
253
|
+
# @return [Hash] Returns the object in the form of hash
|
254
|
+
def to_hash
|
255
|
+
hash = {}
|
256
|
+
self.class.attribute_map.each_pair do |attr, param|
|
257
|
+
value = self.send(attr)
|
258
|
+
if value.nil?
|
259
|
+
is_nullable = self.class.fastly_nullable.include?(attr)
|
260
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
261
|
+
end
|
262
|
+
|
263
|
+
hash[param] = _to_hash(value)
|
264
|
+
end
|
265
|
+
hash
|
266
|
+
end
|
267
|
+
|
268
|
+
# Outputs non-array value in the form of hash
|
269
|
+
# For object, use to_hash. Otherwise, just return the value
|
270
|
+
# @param [Object] value Any valid value
|
271
|
+
# @return [Hash] Returns the value in the form of hash
|
272
|
+
def _to_hash(value)
|
273
|
+
if value.is_a?(Array)
|
274
|
+
value.compact.map { |v| _to_hash(v) }
|
275
|
+
elsif value.is_a?(Hash)
|
276
|
+
{}.tap do |hash|
|
277
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
278
|
+
end
|
279
|
+
elsif value.respond_to? :to_hash
|
280
|
+
value.to_hash
|
281
|
+
else
|
282
|
+
value
|
283
|
+
end
|
284
|
+
end
|
285
|
+
|
286
|
+
end
|
287
|
+
|
288
|
+
end
|
@@ -12,28 +12,44 @@ require 'date'
|
|
12
12
|
require 'time'
|
13
13
|
|
14
14
|
module Fastly
|
15
|
-
class
|
15
|
+
class LoggingNewrelicotlpResponse
|
16
16
|
# The name for the real-time logging configuration.
|
17
17
|
attr_accessor :name
|
18
18
|
|
19
19
|
# Where in the generated VCL the logging call should be placed. If not set, endpoints with `format_version` of 2 are placed in `vcl_log` and those with `format_version` of 1 are placed in `vcl_deliver`.
|
20
20
|
attr_accessor :placement
|
21
21
|
|
22
|
-
# The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`.
|
23
|
-
attr_accessor :format_version
|
24
|
-
|
25
22
|
# The name of an existing condition in the configured endpoint, or leave blank to always execute.
|
26
23
|
attr_accessor :response_condition
|
27
24
|
|
28
|
-
# A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats).
|
25
|
+
# A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats).
|
29
26
|
attr_accessor :format
|
30
27
|
|
28
|
+
# The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`.
|
29
|
+
attr_accessor :format_version
|
30
|
+
|
31
31
|
# The Insert API key from the Account page of your New Relic account. Required.
|
32
32
|
attr_accessor :token
|
33
33
|
|
34
34
|
# The region to which to stream logs.
|
35
35
|
attr_accessor :region
|
36
36
|
|
37
|
+
# (Optional) URL of the New Relic Trace Observer, if you are using New Relic Infinite Tracing.
|
38
|
+
attr_accessor :url
|
39
|
+
|
40
|
+
# Date and time in ISO 8601 format.
|
41
|
+
attr_accessor :created_at
|
42
|
+
|
43
|
+
# Date and time in ISO 8601 format.
|
44
|
+
attr_accessor :deleted_at
|
45
|
+
|
46
|
+
# Date and time in ISO 8601 format.
|
47
|
+
attr_accessor :updated_at
|
48
|
+
|
49
|
+
attr_accessor :service_id
|
50
|
+
|
51
|
+
attr_accessor :version
|
52
|
+
|
37
53
|
class EnumAttributeValidator
|
38
54
|
attr_reader :datatype
|
39
55
|
attr_reader :allowable_values
|
@@ -61,11 +77,17 @@ module Fastly
|
|
61
77
|
{
|
62
78
|
:'name' => :'name',
|
63
79
|
:'placement' => :'placement',
|
64
|
-
:'format_version' => :'format_version',
|
65
80
|
:'response_condition' => :'response_condition',
|
66
81
|
:'format' => :'format',
|
82
|
+
:'format_version' => :'format_version',
|
67
83
|
:'token' => :'token',
|
68
|
-
:'region' => :'region'
|
84
|
+
:'region' => :'region',
|
85
|
+
:'url' => :'url',
|
86
|
+
:'created_at' => :'created_at',
|
87
|
+
:'deleted_at' => :'deleted_at',
|
88
|
+
:'updated_at' => :'updated_at',
|
89
|
+
:'service_id' => :'service_id',
|
90
|
+
:'version' => :'version'
|
69
91
|
}
|
70
92
|
end
|
71
93
|
|
@@ -79,11 +101,17 @@ module Fastly
|
|
79
101
|
{
|
80
102
|
:'name' => :'String',
|
81
103
|
:'placement' => :'String',
|
82
|
-
:'format_version' => :'Integer',
|
83
104
|
:'response_condition' => :'String',
|
84
105
|
:'format' => :'String',
|
106
|
+
:'format_version' => :'String',
|
85
107
|
:'token' => :'String',
|
86
|
-
:'region' => :'String'
|
108
|
+
:'region' => :'String',
|
109
|
+
:'url' => :'String',
|
110
|
+
:'created_at' => :'Time',
|
111
|
+
:'deleted_at' => :'Time',
|
112
|
+
:'updated_at' => :'Time',
|
113
|
+
:'service_id' => :'String',
|
114
|
+
:'version' => :'String'
|
87
115
|
}
|
88
116
|
end
|
89
117
|
|
@@ -92,14 +120,20 @@ module Fastly
|
|
92
120
|
Set.new([
|
93
121
|
:'placement',
|
94
122
|
:'response_condition',
|
123
|
+
:'url',
|
124
|
+
:'created_at',
|
125
|
+
:'deleted_at',
|
126
|
+
:'updated_at',
|
95
127
|
])
|
96
128
|
end
|
97
129
|
|
98
130
|
# List of class defined in allOf (OpenAPI v3)
|
99
131
|
def self.fastly_all_of
|
100
132
|
[
|
101
|
-
:'
|
102
|
-
:'
|
133
|
+
:'LoggingCommonResponse',
|
134
|
+
:'LoggingNewrelicotlpAdditional',
|
135
|
+
:'ServiceIdAndVersionString',
|
136
|
+
:'Timestamps'
|
103
137
|
]
|
104
138
|
end
|
105
139
|
|
@@ -107,13 +141,13 @@ module Fastly
|
|
107
141
|
# @param [Hash] attributes Model attributes in the form of hash
|
108
142
|
def initialize(attributes = {})
|
109
143
|
if (!attributes.is_a?(Hash))
|
110
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::
|
144
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::LoggingNewrelicotlpResponse` initialize method"
|
111
145
|
end
|
112
146
|
|
113
147
|
# check to see if the attribute exists and convert string to symbol for hash key
|
114
148
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
115
149
|
if (!self.class.attribute_map.key?(k.to_sym))
|
116
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::
|
150
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::LoggingNewrelicotlpResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
117
151
|
end
|
118
152
|
h[k.to_sym] = v
|
119
153
|
}
|
@@ -126,12 +160,6 @@ module Fastly
|
|
126
160
|
self.placement = attributes[:'placement']
|
127
161
|
end
|
128
162
|
|
129
|
-
if attributes.key?(:'format_version')
|
130
|
-
self.format_version = attributes[:'format_version']
|
131
|
-
else
|
132
|
-
self.format_version = FORMAT_VERSION::v2
|
133
|
-
end
|
134
|
-
|
135
163
|
if attributes.key?(:'response_condition')
|
136
164
|
self.response_condition = attributes[:'response_condition']
|
137
165
|
end
|
@@ -142,6 +170,12 @@ module Fastly
|
|
142
170
|
self.format = '{\"timestamp\":\"%{begin:%Y-%m-%dT%H:%M:%S}t\",\"time_elapsed\":\"%{time.elapsed.usec}V\",\"is_tls\":\"%{if(req.is_ssl, \\\"true\\\", \\\"false\\\")}V\",\"client_ip\":\"%{req.http.Fastly-Client-IP}V\",\"geo_city\":\"%{client.geo.city}V\",\"geo_country_code\":\"%{client.geo.country_code}V\",\"request\":\"%{req.request}V\",\"host\":\"%{req.http.Fastly-Orig-Host}V\",\"url\":\"%{json.escape(req.url)}V\",\"request_referer\":\"%{json.escape(req.http.Referer)}V\",\"request_user_agent\":\"%{json.escape(req.http.User-Agent)}V\",\"request_accept_language\":\"%{json.escape(req.http.Accept-Language)}V\",\"request_accept_charset\":\"%{json.escape(req.http.Accept-Charset)}V\",\"cache_status\":\"%{regsub(fastly_info.state, \\\"^(HIT-(SYNTH)|(HITPASS|HIT|MISS|PASS|ERROR|PIPE)).*\\\", \\\"\\\\2\\\\3\\\") }V\"}'
|
143
171
|
end
|
144
172
|
|
173
|
+
if attributes.key?(:'format_version')
|
174
|
+
self.format_version = attributes[:'format_version']
|
175
|
+
else
|
176
|
+
self.format_version = '2'
|
177
|
+
end
|
178
|
+
|
145
179
|
if attributes.key?(:'token')
|
146
180
|
self.token = attributes[:'token']
|
147
181
|
end
|
@@ -151,6 +185,32 @@ module Fastly
|
|
151
185
|
else
|
152
186
|
self.region = 'US'
|
153
187
|
end
|
188
|
+
|
189
|
+
if attributes.key?(:'url')
|
190
|
+
self.url = attributes[:'url']
|
191
|
+
else
|
192
|
+
self.url = 'null'
|
193
|
+
end
|
194
|
+
|
195
|
+
if attributes.key?(:'created_at')
|
196
|
+
self.created_at = attributes[:'created_at']
|
197
|
+
end
|
198
|
+
|
199
|
+
if attributes.key?(:'deleted_at')
|
200
|
+
self.deleted_at = attributes[:'deleted_at']
|
201
|
+
end
|
202
|
+
|
203
|
+
if attributes.key?(:'updated_at')
|
204
|
+
self.updated_at = attributes[:'updated_at']
|
205
|
+
end
|
206
|
+
|
207
|
+
if attributes.key?(:'service_id')
|
208
|
+
self.service_id = attributes[:'service_id']
|
209
|
+
end
|
210
|
+
|
211
|
+
if attributes.key?(:'version')
|
212
|
+
self.version = attributes[:'version']
|
213
|
+
end
|
154
214
|
end
|
155
215
|
|
156
216
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -165,7 +225,7 @@ module Fastly
|
|
165
225
|
def valid?
|
166
226
|
placement_validator = EnumAttributeValidator.new('String', ["none", "waf_debug", "null"])
|
167
227
|
return false unless placement_validator.valid?(@placement)
|
168
|
-
format_version_validator = EnumAttributeValidator.new('
|
228
|
+
format_version_validator = EnumAttributeValidator.new('String', ["1", "2"])
|
169
229
|
return false unless format_version_validator.valid?(@format_version)
|
170
230
|
region_validator = EnumAttributeValidator.new('String', ["US", "EU"])
|
171
231
|
return false unless region_validator.valid?(@region)
|
@@ -185,7 +245,7 @@ module Fastly
|
|
185
245
|
# Custom attribute writer method checking allowed values (enum).
|
186
246
|
# @param [Object] format_version Object to be assigned
|
187
247
|
def format_version=(format_version)
|
188
|
-
validator = EnumAttributeValidator.new('
|
248
|
+
validator = EnumAttributeValidator.new('String', ["1", "2"])
|
189
249
|
unless validator.valid?(format_version)
|
190
250
|
fail ArgumentError, "invalid value for \"format_version\", must be one of #{validator.allowable_values}."
|
191
251
|
end
|
@@ -209,11 +269,17 @@ module Fastly
|
|
209
269
|
self.class == o.class &&
|
210
270
|
name == o.name &&
|
211
271
|
placement == o.placement &&
|
212
|
-
format_version == o.format_version &&
|
213
272
|
response_condition == o.response_condition &&
|
214
273
|
format == o.format &&
|
274
|
+
format_version == o.format_version &&
|
215
275
|
token == o.token &&
|
216
|
-
region == o.region
|
276
|
+
region == o.region &&
|
277
|
+
url == o.url &&
|
278
|
+
created_at == o.created_at &&
|
279
|
+
deleted_at == o.deleted_at &&
|
280
|
+
updated_at == o.updated_at &&
|
281
|
+
service_id == o.service_id &&
|
282
|
+
version == o.version
|
217
283
|
end
|
218
284
|
|
219
285
|
# @see the `==` method
|
@@ -225,7 +291,7 @@ module Fastly
|
|
225
291
|
# Calculates hash code according to all attributes.
|
226
292
|
# @return [Integer] Hash code
|
227
293
|
def hash
|
228
|
-
[name, placement,
|
294
|
+
[name, placement, response_condition, format, format_version, token, region, url, created_at, deleted_at, updated_at, service_id, version].hash
|
229
295
|
end
|
230
296
|
|
231
297
|
# Builds the object from hash
|
@@ -12,7 +12,7 @@ require 'date'
|
|
12
12
|
require 'time'
|
13
13
|
|
14
14
|
module Fastly
|
15
|
-
class
|
15
|
+
class LoggingOpenstackAdditional
|
16
16
|
# Your OpenStack account access key.
|
17
17
|
attr_accessor :access_key
|
18
18
|
|
@@ -72,13 +72,13 @@ module Fastly
|
|
72
72
|
# @param [Hash] attributes Model attributes in the form of hash
|
73
73
|
def initialize(attributes = {})
|
74
74
|
if (!attributes.is_a?(Hash))
|
75
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::
|
75
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::LoggingOpenstackAdditional` initialize method"
|
76
76
|
end
|
77
77
|
|
78
78
|
# check to see if the attribute exists and convert string to symbol for hash key
|
79
79
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
80
80
|
if (!self.class.attribute_map.key?(k.to_sym))
|
81
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::
|
81
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::LoggingOpenstackAdditional`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
82
82
|
end
|
83
83
|
h[k.to_sym] = v
|
84
84
|
}
|