Class: OCI::LogAnalytics::Models::LogAnalyticsSourceFunction
- Inherits:
-
Object
- Object
- OCI::LogAnalytics::Models::LogAnalyticsSourceFunction
- Defined in:
- lib/oci/log_analytics/models/log_analytics_source_function.rb
Overview
LogAnalyticsSourceFunction
Constant Summary collapse
- FUNCTION_NAME_ENUM =
[ FUNCTION_NAME_GEOLOCATION = 'GEOLOCATION'.freeze, FUNCTION_NAME_LOOKUP = 'LOOKUP'.freeze, FUNCTION_NAME_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#arguments ⇒ Array<OCI::LogAnalytics::Models::LogAnalyticsMetaFunctionArgument>
The function argument.
-
#features ⇒ Array<String>
Features of the source function to use for enrichment.
- #function ⇒ OCI::LogAnalytics::Models::LogAnalyticsMetaFunction
-
#function_id ⇒ Integer
The source function unique identifier.
-
#function_name ⇒ String
The source function name.
-
#function_reference ⇒ String
The source function unique identifier as a string.
-
#is_enabled ⇒ BOOLEAN
A flag inidcating whether or not the source function is enabled.
-
#is_system ⇒ BOOLEAN
The system flag.
-
#lookup_column ⇒ String
The lookup column.
-
#lookup_column_position ⇒ Integer
The lookup column position.
-
#lookup_display_name ⇒ String
The lookup display name.
-
#lookup_mode ⇒ Integer
The lookup mode.
-
#lookup_table ⇒ String
The lookup table.
-
#order ⇒ Integer
The source function order.
-
#source_id ⇒ Integer
The source unique identifier.
-
#source_reference ⇒ String
The source unique identifier as a string.
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 = {}) ⇒ LogAnalyticsSourceFunction
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 = {}) ⇒ LogAnalyticsSourceFunction
Initializes the object
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 |
# File 'lib/oci/log_analytics/models/log_analytics_source_function.rb', line 154 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.arguments = attributes[:'arguments'] if attributes[:'arguments'] 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.function = attributes[:'function'] if attributes[:'function'] self.function_name = attributes[:'functionName'] if attributes[:'functionName'] self.function_name = "LOOKUP" if function_name.nil? && !attributes.key?(:'functionName') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :functionName and :function_name' if attributes.key?(:'functionName') && attributes.key?(:'function_name') self.function_name = attributes[:'function_name'] if attributes[:'function_name'] self.function_name = "LOOKUP" if function_name.nil? && !attributes.key?(:'functionName') && !attributes.key?(:'function_name') # rubocop:disable Style/StringLiterals self.function_reference = attributes[:'functionReference'] if attributes[:'functionReference'] raise 'You cannot provide both :functionReference and :function_reference' if attributes.key?(:'functionReference') && attributes.key?(:'function_reference') self.function_reference = attributes[:'function_reference'] if attributes[:'function_reference'] self.source_reference = attributes[:'sourceReference'] if attributes[:'sourceReference'] raise 'You cannot provide both :sourceReference and :source_reference' if attributes.key?(:'sourceReference') && attributes.key?(:'source_reference') self.source_reference = attributes[:'source_reference'] if attributes[:'source_reference'] self.features = attributes[:'features'] if attributes[:'features'] self.function_id = attributes[:'functionId'] if attributes[:'functionId'] raise 'You cannot provide both :functionId and :function_id' if attributes.key?(:'functionId') && attributes.key?(:'function_id') self.function_id = attributes[:'function_id'] if attributes[:'function_id'] self.order = attributes[:'order'] if attributes[:'order'] 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.lookup_column = attributes[:'lookupColumn'] if attributes[:'lookupColumn'] raise 'You cannot provide both :lookupColumn and :lookup_column' if attributes.key?(:'lookupColumn') && attributes.key?(:'lookup_column') self.lookup_column = attributes[:'lookup_column'] if attributes[:'lookup_column'] self.lookup_column_position = attributes[:'lookupColumnPosition'] if attributes[:'lookupColumnPosition'] raise 'You cannot provide both :lookupColumnPosition and :lookup_column_position' if attributes.key?(:'lookupColumnPosition') && attributes.key?(:'lookup_column_position') self.lookup_column_position = attributes[:'lookup_column_position'] if attributes[:'lookup_column_position'] self.lookup_display_name = attributes[:'lookupDisplayName'] if attributes[:'lookupDisplayName'] raise 'You cannot provide both :lookupDisplayName and :lookup_display_name' if attributes.key?(:'lookupDisplayName') && attributes.key?(:'lookup_display_name') self.lookup_display_name = attributes[:'lookup_display_name'] if attributes[:'lookup_display_name'] self.lookup_mode = attributes[:'lookupMode'] if attributes[:'lookupMode'] raise 'You cannot provide both :lookupMode and :lookup_mode' if attributes.key?(:'lookupMode') && attributes.key?(:'lookup_mode') self.lookup_mode = attributes[:'lookup_mode'] if attributes[:'lookup_mode'] self.lookup_table = attributes[:'lookupTable'] if attributes[:'lookupTable'] raise 'You cannot provide both :lookupTable and :lookup_table' if attributes.key?(:'lookupTable') && attributes.key?(:'lookup_table') self.lookup_table = attributes[:'lookup_table'] if attributes[:'lookup_table'] self.source_id = attributes[:'sourceId'] if attributes[:'sourceId'] raise 'You cannot provide both :sourceId and :source_id' if attributes.key?(:'sourceId') && attributes.key?(:'source_id') self.source_id = attributes[:'source_id'] if attributes[:'source_id'] end |
Instance Attribute Details
#arguments ⇒ Array<OCI::LogAnalytics::Models::LogAnalyticsMetaFunctionArgument>
The function argument.
20 21 22 |
# File 'lib/oci/log_analytics/models/log_analytics_source_function.rb', line 20 def arguments @arguments end |
#features ⇒ Array<String>
Features of the source function to use for enrichment.
44 45 46 |
# File 'lib/oci/log_analytics/models/log_analytics_source_function.rb', line 44 def features @features end |
#function ⇒ OCI::LogAnalytics::Models::LogAnalyticsMetaFunction
28 29 30 |
# File 'lib/oci/log_analytics/models/log_analytics_source_function.rb', line 28 def function @function end |
#function_id ⇒ Integer
The source function unique identifier.
48 49 50 |
# File 'lib/oci/log_analytics/models/log_analytics_source_function.rb', line 48 def function_id @function_id end |
#function_name ⇒ String
The source function name
32 33 34 |
# File 'lib/oci/log_analytics/models/log_analytics_source_function.rb', line 32 def function_name @function_name end |
#function_reference ⇒ String
The source function unique identifier as a string.
36 37 38 |
# File 'lib/oci/log_analytics/models/log_analytics_source_function.rb', line 36 def function_reference @function_reference end |
#is_enabled ⇒ BOOLEAN
A flag inidcating whether or not the source function is enabled.
25 26 27 |
# File 'lib/oci/log_analytics/models/log_analytics_source_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.
58 59 60 |
# File 'lib/oci/log_analytics/models/log_analytics_source_function.rb', line 58 def is_system @is_system end |
#lookup_column ⇒ String
The lookup column.
62 63 64 |
# File 'lib/oci/log_analytics/models/log_analytics_source_function.rb', line 62 def lookup_column @lookup_column end |
#lookup_column_position ⇒ Integer
The lookup column position.
66 67 68 |
# File 'lib/oci/log_analytics/models/log_analytics_source_function.rb', line 66 def lookup_column_position @lookup_column_position end |
#lookup_display_name ⇒ String
The lookup display name.
70 71 72 |
# File 'lib/oci/log_analytics/models/log_analytics_source_function.rb', line 70 def lookup_display_name @lookup_display_name end |
#lookup_mode ⇒ Integer
The lookup mode.
74 75 76 |
# File 'lib/oci/log_analytics/models/log_analytics_source_function.rb', line 74 def lookup_mode @lookup_mode end |
#lookup_table ⇒ String
The lookup table.
78 79 80 |
# File 'lib/oci/log_analytics/models/log_analytics_source_function.rb', line 78 def lookup_table @lookup_table end |
#order ⇒ Integer
The source function order.
52 53 54 |
# File 'lib/oci/log_analytics/models/log_analytics_source_function.rb', line 52 def order @order end |
#source_id ⇒ Integer
The source unique identifier.
82 83 84 |
# File 'lib/oci/log_analytics/models/log_analytics_source_function.rb', line 82 def source_id @source_id end |
#source_reference ⇒ String
The source unique identifier as a string.
40 41 42 |
# File 'lib/oci/log_analytics/models/log_analytics_source_function.rb', line 40 def source_reference @source_reference end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/oci/log_analytics/models/log_analytics_source_function.rb', line 85 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'arguments': :'arguments', 'is_enabled': :'isEnabled', 'function': :'function', 'function_name': :'functionName', 'function_reference': :'functionReference', 'source_reference': :'sourceReference', 'features': :'features', 'function_id': :'functionId', 'order': :'order', 'is_system': :'isSystem', 'lookup_column': :'lookupColumn', 'lookup_column_position': :'lookupColumnPosition', 'lookup_display_name': :'lookupDisplayName', 'lookup_mode': :'lookupMode', 'lookup_table': :'lookupTable', 'source_id': :'sourceId' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
# File 'lib/oci/log_analytics/models/log_analytics_source_function.rb', line 109 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'arguments': :'Array<OCI::LogAnalytics::Models::LogAnalyticsMetaFunctionArgument>', 'is_enabled': :'BOOLEAN', 'function': :'OCI::LogAnalytics::Models::LogAnalyticsMetaFunction', 'function_name': :'String', 'function_reference': :'String', 'source_reference': :'String', 'features': :'Array<String>', 'function_id': :'Integer', 'order': :'Integer', 'is_system': :'BOOLEAN', 'lookup_column': :'String', 'lookup_column_position': :'Integer', 'lookup_display_name': :'String', 'lookup_mode': :'Integer', 'lookup_table': :'String', 'source_id': :'Integer' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 |
# File 'lib/oci/log_analytics/models/log_analytics_source_function.rb', line 263 def ==(other) return true if equal?(other) self.class == other.class && arguments == other.arguments && is_enabled == other.is_enabled && function == other.function && function_name == other.function_name && function_reference == other.function_reference && source_reference == other.source_reference && features == other.features && function_id == other.function_id && order == other.order && is_system == other.is_system && lookup_column == other.lookup_column && lookup_column_position == other.lookup_column_position && lookup_display_name == other.lookup_display_name && lookup_mode == other.lookup_mode && lookup_table == other.lookup_table && source_id == other.source_id end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 |
# File 'lib/oci/log_analytics/models/log_analytics_source_function.rb', line 308 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
288 289 290 |
# File 'lib/oci/log_analytics/models/log_analytics_source_function.rb', line 288 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
297 298 299 |
# File 'lib/oci/log_analytics/models/log_analytics_source_function.rb', line 297 def hash [arguments, is_enabled, function, function_name, function_reference, source_reference, features, function_id, order, is_system, lookup_column, lookup_column_position, lookup_display_name, lookup_mode, lookup_table, source_id].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
341 342 343 344 345 346 347 348 349 350 |
# File 'lib/oci/log_analytics/models/log_analytics_source_function.rb', line 341 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
335 336 337 |
# File 'lib/oci/log_analytics/models/log_analytics_source_function.rb', line 335 def to_s to_hash.to_s end |