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
is enabled flag.
-
#is_system ⇒ BOOLEAN
is system flag.
-
#parser_function_id ⇒ Integer
plugin instance Id.
-
#parser_function_name ⇒ String
plugin instance internal name.
-
#parser_function_parameters ⇒ Array<OCI::LogAnalytics::Models::LogAnalyticsParserFunctionParameter>
parameter map list.
-
#parser_function_priority ⇒ Integer
priority.
-
#parser_id ⇒ Integer
parser Id.
- #parser_meta_plugin ⇒ OCI::LogAnalytics::Models::LogAnalyticsParserMetaPlugin
-
#parser_meta_plugin_name ⇒ String
plugin type internal name.
-
#parser_name ⇒ String
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
101 102 103 104 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 |
# File 'lib/oci/log_analytics/models/log_analytics_parser_function.rb', line 101 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
is enabled flag
23 24 25 |
# File 'lib/oci/log_analytics/models/log_analytics_parser_function.rb', line 23 def is_enabled @is_enabled end |
#is_system ⇒ BOOLEAN
is system flag
27 28 29 |
# File 'lib/oci/log_analytics/models/log_analytics_parser_function.rb', line 27 def is_system @is_system end |
#parser_function_id ⇒ Integer
plugin instance Id
15 16 17 |
# File 'lib/oci/log_analytics/models/log_analytics_parser_function.rb', line 15 def parser_function_id @parser_function_id end |
#parser_function_name ⇒ String
plugin instance internal name
19 20 21 |
# File 'lib/oci/log_analytics/models/log_analytics_parser_function.rb', line 19 def parser_function_name @parser_function_name end |
#parser_function_parameters ⇒ Array<OCI::LogAnalytics::Models::LogAnalyticsParserFunctionParameter>
parameter map list
47 48 49 |
# File 'lib/oci/log_analytics/models/log_analytics_parser_function.rb', line 47 def parser_function_parameters @parser_function_parameters end |
#parser_function_priority ⇒ Integer
priority
43 44 45 |
# File 'lib/oci/log_analytics/models/log_analytics_parser_function.rb', line 43 def parser_function_priority @parser_function_priority end |
#parser_id ⇒ Integer
parser Id
31 32 33 |
# File 'lib/oci/log_analytics/models/log_analytics_parser_function.rb', line 31 def parser_id @parser_id end |
#parser_meta_plugin ⇒ OCI::LogAnalytics::Models::LogAnalyticsParserMetaPlugin
11 12 13 |
# File 'lib/oci/log_analytics/models/log_analytics_parser_function.rb', line 11 def end |
#parser_meta_plugin_name ⇒ String
plugin type internal name
39 40 41 |
# File 'lib/oci/log_analytics/models/log_analytics_parser_function.rb', line 39 def end |
#parser_name ⇒ String
parser internal name
35 36 37 |
# File 'lib/oci/log_analytics/models/log_analytics_parser_function.rb', line 35 def parser_name @parser_name end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/oci/log_analytics/models/log_analytics_parser_function.rb', line 50 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.
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/oci/log_analytics/models/log_analytics_parser_function.rb', line 68 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.
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 |
# File 'lib/oci/log_analytics/models/log_analytics_parser_function.rb', line 175 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
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 |
# File 'lib/oci/log_analytics/models/log_analytics_parser_function.rb', line 214 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
194 195 196 |
# File 'lib/oci/log_analytics/models/log_analytics_parser_function.rb', line 194 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
203 204 205 |
# File 'lib/oci/log_analytics/models/log_analytics_parser_function.rb', line 203 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
247 248 249 250 251 252 253 254 255 256 |
# File 'lib/oci/log_analytics/models/log_analytics_parser_function.rb', line 247 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
241 242 243 |
# File 'lib/oci/log_analytics/models/log_analytics_parser_function.rb', line 241 def to_s to_hash.to_s end |