lib/fastly/models/logging_kafka_response.rb in fastly-6.0.2 vs lib/fastly/models/logging_kafka_response.rb in fastly-7.0.0

- old
+ new

@@ -17,19 +17,19 @@ 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`. - attr_accessor :format_version - # The name of an existing condition in the configured endpoint, or leave blank to always execute. attr_accessor :response_condition # A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats). attr_accessor :format + # 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 + # A secure certificate to authenticate a server with. Must be in PEM format. attr_accessor :tls_ca_cert # The client certificate used to make authenticated requests. Must be in PEM format. attr_accessor :tls_client_cert @@ -38,10 +38,23 @@ attr_accessor :tls_client_key # The hostname to verify the server's certificate. This should be one of the Subject Alternative Name (SAN) fields for the certificate. Common Names (CN) are not supported. attr_accessor :tls_hostname + # Date and time in ISO 8601 format. + attr_accessor :created_at + + # Date and time in ISO 8601 format. + attr_accessor :deleted_at + + # Date and time in ISO 8601 format. + attr_accessor :updated_at + + attr_accessor :service_id + + attr_accessor :version + # The Kafka topic to send logs to. Required. attr_accessor :topic # A comma-separated list of IP addresses or hostnames of Kafka brokers. Required. attr_accessor :brokers @@ -67,23 +80,10 @@ # SASL password. attr_accessor :password attr_accessor :use_tls - # Date and time in ISO 8601 format. - attr_accessor :created_at - - # Date and time in ISO 8601 format. - attr_accessor :deleted_at - - # Date and time in ISO 8601 format. - attr_accessor :updated_at - - attr_accessor :service_id - - attr_accessor :version - class EnumAttributeValidator attr_reader :datatype attr_reader :allowable_values def initialize(datatype, allowable_values) @@ -107,32 +107,32 @@ # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'name' => :'name', :'placement' => :'placement', - :'format_version' => :'format_version', :'response_condition' => :'response_condition', :'format' => :'format', + :'format_version' => :'format_version', :'tls_ca_cert' => :'tls_ca_cert', :'tls_client_cert' => :'tls_client_cert', :'tls_client_key' => :'tls_client_key', :'tls_hostname' => :'tls_hostname', + :'created_at' => :'created_at', + :'deleted_at' => :'deleted_at', + :'updated_at' => :'updated_at', + :'service_id' => :'service_id', + :'version' => :'version', :'topic' => :'topic', :'brokers' => :'brokers', :'compression_codec' => :'compression_codec', :'required_acks' => :'required_acks', :'request_max_bytes' => :'request_max_bytes', :'parse_log_keyvals' => :'parse_log_keyvals', :'auth_method' => :'auth_method', :'user' => :'user', :'password' => :'password', - :'use_tls' => :'use_tls', - :'created_at' => :'created_at', - :'deleted_at' => :'deleted_at', - :'updated_at' => :'updated_at', - :'service_id' => :'service_id', - :'version' => :'version' + :'use_tls' => :'use_tls' } end # Returns all the JSON keys this model knows about def self.acceptable_attributes @@ -142,32 +142,32 @@ # Attribute type mapping. def self.fastly_types { :'name' => :'String', :'placement' => :'String', - :'format_version' => :'Integer', :'response_condition' => :'String', :'format' => :'String', + :'format_version' => :'String', :'tls_ca_cert' => :'String', :'tls_client_cert' => :'String', :'tls_client_key' => :'String', :'tls_hostname' => :'String', + :'created_at' => :'Time', + :'deleted_at' => :'Time', + :'updated_at' => :'Time', + :'service_id' => :'String', + :'version' => :'String', :'topic' => :'String', :'brokers' => :'String', :'compression_codec' => :'String', :'required_acks' => :'Integer', :'request_max_bytes' => :'Integer', :'parse_log_keyvals' => :'Boolean', :'auth_method' => :'String', :'user' => :'String', :'password' => :'String', - :'use_tls' => :'LoggingUseTls', - :'created_at' => :'Time', - :'deleted_at' => :'Time', - :'updated_at' => :'Time', - :'service_id' => :'String', - :'version' => :'Integer' + :'use_tls' => :'LoggingUseTls' } end # List of attributes with nullable: true def self.fastly_nullable @@ -176,22 +176,24 @@ :'response_condition', :'tls_ca_cert', :'tls_client_cert', :'tls_client_key', :'tls_hostname', - :'compression_codec', :'created_at', :'deleted_at', :'updated_at', + :'compression_codec', ]) end # List of class defined in allOf (OpenAPI v3) def self.fastly_all_of [ - :'LoggingKafka', - :'ServiceIdAndVersion', + :'LoggingCommonResponse', + :'LoggingKafkaAdditional', + :'LoggingTlsCommon', + :'ServiceIdAndVersionString', :'Timestamps' ] end # Initializes the object @@ -215,26 +217,26 @@ if attributes.key?(:'placement') self.placement = attributes[:'placement'] end - if attributes.key?(:'format_version') - self.format_version = attributes[:'format_version'] - else - self.format_version = FORMAT_VERSION::v2 - end - if attributes.key?(:'response_condition') self.response_condition = attributes[:'response_condition'] end if attributes.key?(:'format') self.format = attributes[:'format'] else self.format = '%h %l %u %t \"%r\" %>s %b' end + if attributes.key?(:'format_version') + self.format_version = attributes[:'format_version'] + else + self.format_version = '2' + end + if attributes.key?(:'tls_ca_cert') self.tls_ca_cert = attributes[:'tls_ca_cert'] else self.tls_ca_cert = 'null' end @@ -255,10 +257,30 @@ self.tls_hostname = attributes[:'tls_hostname'] else self.tls_hostname = 'null' end + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'deleted_at') + self.deleted_at = attributes[:'deleted_at'] + end + + if attributes.key?(:'updated_at') + self.updated_at = attributes[:'updated_at'] + end + + if attributes.key?(:'service_id') + self.service_id = attributes[:'service_id'] + end + + if attributes.key?(:'version') + self.version = attributes[:'version'] + end + if attributes.key?(:'topic') self.topic = attributes[:'topic'] end if attributes.key?(:'brokers') @@ -300,30 +322,10 @@ if attributes.key?(:'use_tls') self.use_tls = attributes[:'use_tls'] else self.use_tls = LoggingUseTls::no_tls end - - if attributes.key?(:'created_at') - self.created_at = attributes[:'created_at'] - end - - if attributes.key?(:'deleted_at') - self.deleted_at = attributes[:'deleted_at'] - end - - if attributes.key?(:'updated_at') - self.updated_at = attributes[:'updated_at'] - end - - if attributes.key?(:'service_id') - self.service_id = attributes[:'service_id'] - end - - if attributes.key?(:'version') - self.version = attributes[:'version'] - 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 @@ -334,11 +336,11 @@ # Check to see if the all the properties in the model are valid # @return true if the model is valid def valid? placement_validator = EnumAttributeValidator.new('String', ["none", "waf_debug", "null"]) return false unless placement_validator.valid?(@placement) - format_version_validator = EnumAttributeValidator.new('Integer', [1, 2]) + format_version_validator = EnumAttributeValidator.new('String', ["1", "2"]) return false unless format_version_validator.valid?(@format_version) compression_codec_validator = EnumAttributeValidator.new('String', ["gzip", "snappy", "lz4", "null"]) return false unless compression_codec_validator.valid?(@compression_codec) required_acks_validator = EnumAttributeValidator.new('Integer', [1, 0, -1]) return false unless required_acks_validator.valid?(@required_acks) @@ -358,11 +360,11 @@ end # Custom attribute writer method checking allowed values (enum). # @param [Object] format_version Object to be assigned def format_version=(format_version) - validator = EnumAttributeValidator.new('Integer', [1, 2]) + validator = EnumAttributeValidator.new('String', ["1", "2"]) unless validator.valid?(format_version) fail ArgumentError, "invalid value for \"format_version\", must be one of #{validator.allowable_values}." end @format_version = format_version end @@ -402,32 +404,32 @@ def ==(o) return true if self.equal?(o) self.class == o.class && name == o.name && placement == o.placement && - format_version == o.format_version && response_condition == o.response_condition && format == o.format && + format_version == o.format_version && tls_ca_cert == o.tls_ca_cert && tls_client_cert == o.tls_client_cert && tls_client_key == o.tls_client_key && tls_hostname == o.tls_hostname && + created_at == o.created_at && + deleted_at == o.deleted_at && + updated_at == o.updated_at && + service_id == o.service_id && + version == o.version && topic == o.topic && brokers == o.brokers && compression_codec == o.compression_codec && required_acks == o.required_acks && request_max_bytes == o.request_max_bytes && parse_log_keyvals == o.parse_log_keyvals && auth_method == o.auth_method && user == o.user && password == o.password && - use_tls == o.use_tls && - created_at == o.created_at && - deleted_at == o.deleted_at && - updated_at == o.updated_at && - service_id == o.service_id && - version == o.version + use_tls == o.use_tls end # @see the `==` method # @param [Object] Object to be compared def eql?(o) @@ -435,10 +437,10 @@ end # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [name, placement, format_version, response_condition, format, tls_ca_cert, tls_client_cert, tls_client_key, tls_hostname, topic, brokers, compression_codec, required_acks, request_max_bytes, parse_log_keyvals, auth_method, user, password, use_tls, created_at, deleted_at, updated_at, service_id, version].hash + [name, placement, response_condition, format, format_version, tls_ca_cert, tls_client_cert, tls_client_key, tls_hostname, created_at, deleted_at, updated_at, service_id, version, topic, brokers, compression_codec, required_acks, request_max_bytes, parse_log_keyvals, auth_method, user, password, use_tls].hash end # Builds the object from hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself