lib/fastly/models/logging_gcs.rb in fastly-4.0.0.alpha4 vs lib/fastly/models/logging_gcs.rb in fastly-4.0.0
- old
+ new
@@ -17,11 +17,11 @@
attr_accessor :name
# 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`.
attr_accessor :placement
- # 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`.
+ # 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`.
attr_accessor :format_version
# The name of an existing condition in the configured endpoint, or leave blank to always execute.
attr_accessor :response_condition
@@ -35,31 +35,37 @@
attr_accessor :timestamp_format
# How frequently log files are finalized so they can be available for reading (in seconds).
attr_accessor :period
- # What level of gzip encoding to have when sending logs (default `0`, no compression). If an explicit non-zero value is set, then `compression_codec` will default to \"gzip.\" Specifying both `compression_codec` and `gzip_level` in the same API request will result in an error.
+ # The level of gzip encoding when sending logs (default `0`, no compression). Specifying both `compression_codec` and `gzip_level` in the same API request will result in an error.
attr_accessor :gzip_level
- # The codec used for compression of your logs. Valid values are `zstd`, `snappy`, and `gzip`. If the specified codec is \"gzip\", `gzip_level` will default to 3. To specify a different level, leave `compression_codec` blank and explicitly set the level using `gzip_level`. Specifying both `compression_codec` and `gzip_level` in the same API request will result in an error.
+ # The codec used for compressing your logs. Valid values are `zstd`, `snappy`, and `gzip`. Specifying both `compression_codec` and `gzip_level` in the same API request will result in an error.
attr_accessor :compression_codec
- # Your Google Cloud Platform service account email address. The `client_email` field in your service account authentication JSON. Required.
+ # Your Google Cloud Platform service account email address. The `client_email` field in your service account authentication JSON. Not required if `account_name` is specified.
attr_accessor :user
- # Your Google Cloud Platform account secret key. The `private_key` field in your service account authentication JSON. Required.
+ # Your Google Cloud Platform account secret key. The `private_key` field in your service account authentication JSON. Not required if `account_name` is specified.
attr_accessor :secret_key
+ # The name of the Google Cloud Platform service account associated with the target log collection service. Not required if `user` and `secret_key` are provided.
+ attr_accessor :account_name
+
# The name of the GCS bucket.
attr_accessor :bucket_name
# The path to upload logs to.
attr_accessor :path
# A PGP public key that Fastly will use to encrypt your log files before writing them to disk.
attr_accessor :public_key
+ # Your Google Cloud Platform project ID. Required
+ attr_accessor :project_id
+
class EnumAttributeValidator
attr_reader :datatype
attr_reader :allowable_values
def initialize(datatype, allowable_values)
@@ -93,13 +99,15 @@
:'period' => :'period',
:'gzip_level' => :'gzip_level',
:'compression_codec' => :'compression_codec',
:'user' => :'user',
:'secret_key' => :'secret_key',
+ :'account_name' => :'account_name',
:'bucket_name' => :'bucket_name',
:'path' => :'path',
- :'public_key' => :'public_key'
+ :'public_key' => :'public_key',
+ :'project_id' => :'project_id'
}
end
# Returns all the JSON keys this model knows about
def self.acceptable_attributes
@@ -119,24 +127,25 @@
:'period' => :'Integer',
:'gzip_level' => :'Integer',
:'compression_codec' => :'String',
:'user' => :'String',
:'secret_key' => :'String',
+ :'account_name' => :'String',
:'bucket_name' => :'String',
:'path' => :'String',
- :'public_key' => :'String'
+ :'public_key' => :'String',
+ :'project_id' => :'String'
}
end
# List of attributes with nullable: true
def self.fastly_nullable
Set.new([
:'placement',
:'response_condition',
:'timestamp_format',
- :'path',
- :'public_key'
+ :'public_key',
])
end
# List of class defined in allOf (OpenAPI v3)
def self.fastly_all_of
@@ -219,10 +228,14 @@
if attributes.key?(:'secret_key')
self.secret_key = attributes[:'secret_key']
end
+ if attributes.key?(:'account_name')
+ self.account_name = attributes[:'account_name']
+ end
+
if attributes.key?(:'bucket_name')
self.bucket_name = attributes[:'bucket_name']
end
if attributes.key?(:'path')
@@ -232,10 +245,14 @@
if attributes.key?(:'public_key')
self.public_key = attributes[:'public_key']
else
self.public_key = 'null'
end
+
+ if attributes.key?(:'project_id')
+ self.project_id = attributes[:'project_id']
+ end
end
# Show invalid properties with the reasons. Usually used together with valid?
# @return Array for valid properties with the reasons
def list_invalid_properties
@@ -312,13 +329,15 @@
period == o.period &&
gzip_level == o.gzip_level &&
compression_codec == o.compression_codec &&
user == o.user &&
secret_key == o.secret_key &&
+ account_name == o.account_name &&
bucket_name == o.bucket_name &&
path == o.path &&
- public_key == o.public_key
+ public_key == o.public_key &&
+ project_id == o.project_id
end
# @see the `==` method
# @param [Object] Object to be compared
def eql?(o)
@@ -326,10 +345,10 @@
end
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
- [name, placement, format_version, response_condition, format, message_type, timestamp_format, period, gzip_level, compression_codec, user, secret_key, bucket_name, path, public_key].hash
+ [name, placement, format_version, response_condition, format, message_type, timestamp_format, period, gzip_level, compression_codec, user, secret_key, account_name, bucket_name, path, public_key, project_id].hash
end
# Builds the object from hash
# @param [Hash] attributes Model attributes in the form of hash
# @return [Object] Returns the model itself