Class: OCI::Logging::Models::UnifiedAgentSyslogParser
- Inherits:
-
UnifiedAgentParser
- Object
- UnifiedAgentParser
- OCI::Logging::Models::UnifiedAgentSyslogParser
- Defined in:
- lib/oci/logging/models/unified_agent_syslog_parser.rb
Overview
Syslog Parser.
Constant Summary collapse
- MESSAGE_FORMAT_ENUM =
[ MESSAGE_FORMAT_RFC3164 = 'RFC3164'.freeze, MESSAGE_FORMAT_RFC5424 = 'RFC5424'.freeze, MESSAGE_FORMAT_AUTO = 'AUTO'.freeze, MESSAGE_FORMAT_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- SYSLOG_PARSER_TYPE_ENUM =
[ SYSLOG_PARSER_TYPE_STRING = 'STRING'.freeze, SYSLOG_PARSER_TYPE_REGEXP = 'REGEXP'.freeze, SYSLOG_PARSER_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Constants inherited from UnifiedAgentParser
OCI::Logging::Models::UnifiedAgentParser::PARSER_TYPE_ENUM
Instance Attribute Summary collapse
-
#is_support_colonless_ident ⇒ BOOLEAN
Specifies whether or not to support colonless ident.
-
#is_with_priority ⇒ BOOLEAN
Specifies with priority or not.
-
#message_format ⇒ String
Syslog message format.
-
#rfc5424_time_format ⇒ String
RFC 5424 time format.
-
#syslog_parser_type ⇒ String
Syslog parser type.
-
#time_format ⇒ String
Time format.
Attributes inherited from UnifiedAgentParser
#field_time_key, #is_estimate_current_event, #is_keep_time_key, #is_null_empty_string, #null_value_pattern, #parser_type, #timeout_in_milliseconds, #types
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ UnifiedAgentSyslogParser
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Methods inherited from UnifiedAgentParser
Constructor Details
#initialize(attributes = {}) ⇒ UnifiedAgentSyslogParser
Initializes the object
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 |
# File 'lib/oci/logging/models/unified_agent_syslog_parser.rb', line 113 def initialize(attributes = {}) return unless attributes.is_a?(Hash) attributes['parserType'] = 'SYSLOG' super(attributes) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.time_format = attributes[:'timeFormat'] if attributes[:'timeFormat'] raise 'You cannot provide both :timeFormat and :time_format' if attributes.key?(:'timeFormat') && attributes.key?(:'time_format') self.time_format = attributes[:'time_format'] if attributes[:'time_format'] self.rfc5424_time_format = attributes[:'rfc5424TimeFormat'] if attributes[:'rfc5424TimeFormat'] raise 'You cannot provide both :rfc5424TimeFormat and :rfc5424_time_format' if attributes.key?(:'rfc5424TimeFormat') && attributes.key?(:'rfc5424_time_format') self.rfc5424_time_format = attributes[:'rfc5424_time_format'] if attributes[:'rfc5424_time_format'] self. = attributes[:'messageFormat'] if attributes[:'messageFormat'] raise 'You cannot provide both :messageFormat and :message_format' if attributes.key?(:'messageFormat') && attributes.key?(:'message_format') self. = attributes[:'message_format'] if attributes[:'message_format'] self.is_with_priority = attributes[:'isWithPriority'] unless attributes[:'isWithPriority'].nil? raise 'You cannot provide both :isWithPriority and :is_with_priority' if attributes.key?(:'isWithPriority') && attributes.key?(:'is_with_priority') self.is_with_priority = attributes[:'is_with_priority'] unless attributes[:'is_with_priority'].nil? self.is_support_colonless_ident = attributes[:'isSupportColonlessIdent'] unless attributes[:'isSupportColonlessIdent'].nil? raise 'You cannot provide both :isSupportColonlessIdent and :is_support_colonless_ident' if attributes.key?(:'isSupportColonlessIdent') && attributes.key?(:'is_support_colonless_ident') self.is_support_colonless_ident = attributes[:'is_support_colonless_ident'] unless attributes[:'is_support_colonless_ident'].nil? self.syslog_parser_type = attributes[:'syslogParserType'] if attributes[:'syslogParserType'] raise 'You cannot provide both :syslogParserType and :syslog_parser_type' if attributes.key?(:'syslogParserType') && attributes.key?(:'syslog_parser_type') self.syslog_parser_type = attributes[:'syslog_parser_type'] if attributes[:'syslog_parser_type'] end |
Instance Attribute Details
#is_support_colonless_ident ⇒ BOOLEAN
Specifies whether or not to support colonless ident. Corresponds to the Fluentd support_colonless_ident parameter.
44 45 46 |
# File 'lib/oci/logging/models/unified_agent_syslog_parser.rb', line 44 def is_support_colonless_ident @is_support_colonless_ident end |
#is_with_priority ⇒ BOOLEAN
Specifies with priority or not. Corresponds to the Fluentd with_priority parameter.
40 41 42 |
# File 'lib/oci/logging/models/unified_agent_syslog_parser.rb', line 40 def is_with_priority @is_with_priority end |
#message_format ⇒ String
Syslog message format.
36 37 38 |
# File 'lib/oci/logging/models/unified_agent_syslog_parser.rb', line 36 def @message_format end |
#rfc5424_time_format ⇒ String
RFC 5424 time format.
32 33 34 |
# File 'lib/oci/logging/models/unified_agent_syslog_parser.rb', line 32 def rfc5424_time_format @rfc5424_time_format end |
#syslog_parser_type ⇒ String
Syslog parser type.
48 49 50 |
# File 'lib/oci/logging/models/unified_agent_syslog_parser.rb', line 48 def syslog_parser_type @syslog_parser_type end |
#time_format ⇒ String
Time format.
28 29 30 |
# File 'lib/oci/logging/models/unified_agent_syslog_parser.rb', line 28 def time_format @time_format end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/oci/logging/models/unified_agent_syslog_parser.rb', line 51 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'parser_type': :'parserType', 'field_time_key': :'fieldTimeKey', 'types': :'types', 'null_value_pattern': :'nullValuePattern', 'is_null_empty_string': :'isNullEmptyString', 'is_estimate_current_event': :'isEstimateCurrentEvent', 'is_keep_time_key': :'isKeepTimeKey', 'timeout_in_milliseconds': :'timeoutInMilliseconds', 'time_format': :'timeFormat', 'rfc5424_time_format': :'rfc5424TimeFormat', 'message_format': :'messageFormat', 'is_with_priority': :'isWithPriority', 'is_support_colonless_ident': :'isSupportColonlessIdent', 'syslog_parser_type': :'syslogParserType' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/oci/logging/models/unified_agent_syslog_parser.rb', line 73 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'parser_type': :'String', 'field_time_key': :'String', 'types': :'Hash<String, String>', 'null_value_pattern': :'String', 'is_null_empty_string': :'BOOLEAN', 'is_estimate_current_event': :'BOOLEAN', 'is_keep_time_key': :'BOOLEAN', 'timeout_in_milliseconds': :'Integer', 'time_format': :'String', 'rfc5424_time_format': :'String', 'message_format': :'String', 'is_with_priority': :'BOOLEAN', 'is_support_colonless_ident': :'BOOLEAN', 'syslog_parser_type': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 |
# File 'lib/oci/logging/models/unified_agent_syslog_parser.rb', line 193 def ==(other) return true if equal?(other) self.class == other.class && parser_type == other.parser_type && field_time_key == other.field_time_key && types == other.types && null_value_pattern == other.null_value_pattern && is_null_empty_string == other.is_null_empty_string && is_estimate_current_event == other.is_estimate_current_event && is_keep_time_key == other.is_keep_time_key && timeout_in_milliseconds == other.timeout_in_milliseconds && time_format == other.time_format && rfc5424_time_format == other.rfc5424_time_format && == other. && is_with_priority == other.is_with_priority && is_support_colonless_ident == other.is_support_colonless_ident && syslog_parser_type == other.syslog_parser_type end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 |
# File 'lib/oci/logging/models/unified_agent_syslog_parser.rb', line 236 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? public_method("#{key}=").call( OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]) ) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other) ⇒ Boolean
216 217 218 |
# File 'lib/oci/logging/models/unified_agent_syslog_parser.rb', line 216 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
225 226 227 |
# File 'lib/oci/logging/models/unified_agent_syslog_parser.rb', line 225 def hash [parser_type, field_time_key, types, null_value_pattern, is_null_empty_string, is_estimate_current_event, is_keep_time_key, timeout_in_milliseconds, time_format, rfc5424_time_format, , is_with_priority, is_support_colonless_ident, syslog_parser_type].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
269 270 271 272 273 274 275 276 277 278 |
# File 'lib/oci/logging/models/unified_agent_syslog_parser.rb', line 269 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
263 264 265 |
# File 'lib/oci/logging/models/unified_agent_syslog_parser.rb', line 263 def to_s to_hash.to_s end |