Class: OCI::LogAnalytics::Models::LogAnalyticsParserFunction
- Inherits:
-
Object
- Object
- OCI::LogAnalytics::Models::LogAnalyticsParserFunction
- Defined in:
- lib/oci/log_analytics/models/log_analytics_parser_function.rb
Overview
LogAnalyticsParserFunction
Instance Attribute Summary collapse
-
#is_enabled ⇒ BOOLEAN
A flag inidcating whether or not the parser function is enabled.
-
#is_system ⇒ BOOLEAN
The system flag.
-
#parser_function_id ⇒ Integer
The parser function unique identifier.
-
#parser_function_name ⇒ String
The parser function internal name.
-
#parser_function_parameters ⇒ Array<OCI::LogAnalytics::Models::LogAnalyticsParserFunctionParameter>
The parser function parameter list.
-
#parser_function_priority ⇒ Integer
The parser function priority.
-
#parser_id ⇒ Integer
The associated parser unique identifier.
- #parser_meta_plugin ⇒ OCI::LogAnalytics::Models::LogAnalyticsParserMetaPlugin
-
#parser_meta_plugin_name ⇒ String
The plugin internal name.
-
#parser_name ⇒ String
The associated parser internal name.
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 = {}) ⇒ LogAnalyticsParserFunction
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.
Constructor Details
#initialize(attributes = {}) ⇒ LogAnalyticsParserFunction
Initializes the object
105 106 107 108 109 110 111 112 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 159 160 161 162 163 164 165 166 167 168 169 170 |
# File 'lib/oci/log_analytics/models/log_analytics_parser_function.rb', line 105 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self. = attributes[:'parserMetaPlugin'] if attributes[:'parserMetaPlugin'] raise 'You cannot provide both :parserMetaPlugin and :parser_meta_plugin' if attributes.key?(:'parserMetaPlugin') && attributes.key?(:'parser_meta_plugin') self. = attributes[:'parser_meta_plugin'] if attributes[:'parser_meta_plugin'] self.parser_function_id = attributes[:'parserFunctionId'] if attributes[:'parserFunctionId'] raise 'You cannot provide both :parserFunctionId and :parser_function_id' if attributes.key?(:'parserFunctionId') && attributes.key?(:'parser_function_id') self.parser_function_id = attributes[:'parser_function_id'] if attributes[:'parser_function_id'] self.parser_function_name = attributes[:'parserFunctionName'] if attributes[:'parserFunctionName'] raise 'You cannot provide both :parserFunctionName and :parser_function_name' if attributes.key?(:'parserFunctionName') && attributes.key?(:'parser_function_name') self.parser_function_name = attributes[:'parser_function_name'] if attributes[:'parser_function_name'] self.is_enabled = attributes[:'isEnabled'] unless attributes[:'isEnabled'].nil? raise 'You cannot provide both :isEnabled and :is_enabled' if attributes.key?(:'isEnabled') && attributes.key?(:'is_enabled') self.is_enabled = attributes[:'is_enabled'] unless attributes[:'is_enabled'].nil? self.is_system = attributes[:'isSystem'] unless attributes[:'isSystem'].nil? raise 'You cannot provide both :isSystem and :is_system' if attributes.key?(:'isSystem') && attributes.key?(:'is_system') self.is_system = attributes[:'is_system'] unless attributes[:'is_system'].nil? self.parser_id = attributes[:'parserId'] if attributes[:'parserId'] raise 'You cannot provide both :parserId and :parser_id' if attributes.key?(:'parserId') && attributes.key?(:'parser_id') self.parser_id = attributes[:'parser_id'] if attributes[:'parser_id'] self.parser_name = attributes[:'parserName'] if attributes[:'parserName'] raise 'You cannot provide both :parserName and :parser_name' if attributes.key?(:'parserName') && attributes.key?(:'parser_name') self.parser_name = attributes[:'parser_name'] if attributes[:'parser_name'] self. = attributes[:'parserMetaPluginName'] if attributes[:'parserMetaPluginName'] raise 'You cannot provide both :parserMetaPluginName and :parser_meta_plugin_name' if attributes.key?(:'parserMetaPluginName') && attributes.key?(:'parser_meta_plugin_name') self. = attributes[:'parser_meta_plugin_name'] if attributes[:'parser_meta_plugin_name'] self.parser_function_priority = attributes[:'parserFunctionPriority'] if attributes[:'parserFunctionPriority'] raise 'You cannot provide both :parserFunctionPriority and :parser_function_priority' if attributes.key?(:'parserFunctionPriority') && attributes.key?(:'parser_function_priority') self.parser_function_priority = attributes[:'parser_function_priority'] if attributes[:'parser_function_priority'] self.parser_function_parameters = attributes[:'parserFunctionParameters'] if attributes[:'parserFunctionParameters'] raise 'You cannot provide both :parserFunctionParameters and :parser_function_parameters' if attributes.key?(:'parserFunctionParameters') && attributes.key?(:'parser_function_parameters') self.parser_function_parameters = attributes[:'parser_function_parameters'] if attributes[:'parser_function_parameters'] end |
Instance Attribute Details
#is_enabled ⇒ BOOLEAN
A flag inidcating whether or not the parser function is enabled.
25 26 27 |
# File 'lib/oci/log_analytics/models/log_analytics_parser_function.rb', line 25 def is_enabled @is_enabled end |
#is_system ⇒ BOOLEAN
The system flag. A value of false denotes a custom, or user defined object. A value of true denotes a built in object.
31 32 33 |
# File 'lib/oci/log_analytics/models/log_analytics_parser_function.rb', line 31 def is_system @is_system end |
#parser_function_id ⇒ Integer
The parser function unique identifier.
16 17 18 |
# File 'lib/oci/log_analytics/models/log_analytics_parser_function.rb', line 16 def parser_function_id @parser_function_id end |
#parser_function_name ⇒ String
The parser function internal name.
20 21 22 |
# File 'lib/oci/log_analytics/models/log_analytics_parser_function.rb', line 20 def parser_function_name @parser_function_name end |
#parser_function_parameters ⇒ Array<OCI::LogAnalytics::Models::LogAnalyticsParserFunctionParameter>
The parser function parameter list.
51 52 53 |
# File 'lib/oci/log_analytics/models/log_analytics_parser_function.rb', line 51 def parser_function_parameters @parser_function_parameters end |
#parser_function_priority ⇒ Integer
The parser function priority.
47 48 49 |
# File 'lib/oci/log_analytics/models/log_analytics_parser_function.rb', line 47 def parser_function_priority @parser_function_priority end |
#parser_id ⇒ Integer
The associated parser unique identifier.
35 36 37 |
# File 'lib/oci/log_analytics/models/log_analytics_parser_function.rb', line 35 def parser_id @parser_id end |
#parser_meta_plugin ⇒ OCI::LogAnalytics::Models::LogAnalyticsParserMetaPlugin
12 13 14 |
# File 'lib/oci/log_analytics/models/log_analytics_parser_function.rb', line 12 def @parser_meta_plugin end |
#parser_meta_plugin_name ⇒ String
The plugin internal name.
43 44 45 |
# File 'lib/oci/log_analytics/models/log_analytics_parser_function.rb', line 43 def @parser_meta_plugin_name end |
#parser_name ⇒ String
The associated parser internal name.
39 40 41 |
# File 'lib/oci/log_analytics/models/log_analytics_parser_function.rb', line 39 def parser_name @parser_name end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/oci/log_analytics/models/log_analytics_parser_function.rb', line 54 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'parser_meta_plugin': :'parserMetaPlugin', 'parser_function_id': :'parserFunctionId', 'parser_function_name': :'parserFunctionName', 'is_enabled': :'isEnabled', 'is_system': :'isSystem', 'parser_id': :'parserId', 'parser_name': :'parserName', 'parser_meta_plugin_name': :'parserMetaPluginName', 'parser_function_priority': :'parserFunctionPriority', 'parser_function_parameters': :'parserFunctionParameters' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/oci/log_analytics/models/log_analytics_parser_function.rb', line 72 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'parser_meta_plugin': :'OCI::LogAnalytics::Models::LogAnalyticsParserMetaPlugin', 'parser_function_id': :'Integer', 'parser_function_name': :'String', 'is_enabled': :'BOOLEAN', 'is_system': :'BOOLEAN', 'parser_id': :'Integer', 'parser_name': :'String', 'parser_meta_plugin_name': :'String', 'parser_function_priority': :'Integer', 'parser_function_parameters': :'Array<OCI::LogAnalytics::Models::LogAnalyticsParserFunctionParameter>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 |
# File 'lib/oci/log_analytics/models/log_analytics_parser_function.rb', line 179 def ==(other) return true if equal?(other) self.class == other.class && == other. && parser_function_id == other.parser_function_id && parser_function_name == other.parser_function_name && is_enabled == other.is_enabled && is_system == other.is_system && parser_id == other.parser_id && parser_name == other.parser_name && == other. && parser_function_priority == other.parser_function_priority && parser_function_parameters == other.parser_function_parameters end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 |
# File 'lib/oci/log_analytics/models/log_analytics_parser_function.rb', line 218 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
198 199 200 |
# File 'lib/oci/log_analytics/models/log_analytics_parser_function.rb', line 198 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
207 208 209 |
# File 'lib/oci/log_analytics/models/log_analytics_parser_function.rb', line 207 def hash [, parser_function_id, parser_function_name, is_enabled, is_system, parser_id, parser_name, , parser_function_priority, parser_function_parameters].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
251 252 253 254 255 256 257 258 259 260 |
# File 'lib/oci/log_analytics/models/log_analytics_parser_function.rb', line 251 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
245 246 247 |
# File 'lib/oci/log_analytics/models/log_analytics_parser_function.rb', line 245 def to_s to_hash.to_s end |