Class: OCI::LogAnalytics::Models::LogAnalyticsField

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/log_analytics/models/log_analytics_field.rb

Overview

Field Details

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ LogAnalyticsField

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):

  • :cee_alias (String)

    The value to assign to the #cee_alias property

  • :data_type (String)

    The value to assign to the #data_type property

  • :regular_expression (String)

    The value to assign to the #regular_expression property

  • :description (String)

    The value to assign to the #description property

  • :display_name (String)

    The value to assign to the #display_name property

  • :edit_version (Integer)

    The value to assign to the #edit_version property

  • :facet_priority (Integer)

    The value to assign to the #facet_priority property

  • :name (String)

    The value to assign to the #name property

  • :is_facet_eligible (BOOLEAN)

    The value to assign to the #is_facet_eligible property

  • :is_high_cardinality (BOOLEAN)

    The value to assign to the #is_high_cardinality property

  • :is_large_data (BOOLEAN)

    The value to assign to the #is_large_data property

  • :is_multi_valued (BOOLEAN)

    The value to assign to the #is_multi_valued property

  • :is_primary (BOOLEAN)

    The value to assign to the #is_primary property

  • :is_system (BOOLEAN)

    The value to assign to the #is_system property

  • :is_summarizable (BOOLEAN)

    The value to assign to the #is_summarizable property

  • :mapped_value (String)

    The value to assign to the #mapped_value property

  • :is_metric_key_eligible (BOOLEAN)

    The value to assign to the #is_metric_key_eligible property

  • :is_metric_value_eligible (BOOLEAN)

    The value to assign to the #is_metric_value_eligible property

  • :range_facet_eligible (Integer)

    The value to assign to the #range_facet_eligible property

  • :is_table_eligible (BOOLEAN)

    The value to assign to the #is_table_eligible property

  • :unit_type (String)

    The value to assign to the #unit_type property



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
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
# File 'lib/oci/log_analytics/models/log_analytics_field.rb', line 194

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.cee_alias = attributes[:'ceeAlias'] if attributes[:'ceeAlias']

  raise 'You cannot provide both :ceeAlias and :cee_alias' if attributes.key?(:'ceeAlias') && attributes.key?(:'cee_alias')

  self.cee_alias = attributes[:'cee_alias'] if attributes[:'cee_alias']

  self.data_type = attributes[:'dataType'] if attributes[:'dataType']

  raise 'You cannot provide both :dataType and :data_type' if attributes.key?(:'dataType') && attributes.key?(:'data_type')

  self.data_type = attributes[:'data_type'] if attributes[:'data_type']

  self.regular_expression = attributes[:'regularExpression'] if attributes[:'regularExpression']

  raise 'You cannot provide both :regularExpression and :regular_expression' if attributes.key?(:'regularExpression') && attributes.key?(:'regular_expression')

  self.regular_expression = attributes[:'regular_expression'] if attributes[:'regular_expression']

  self.description = attributes[:'description'] if attributes[:'description']

  self.display_name = attributes[:'displayName'] if attributes[:'displayName']

  raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name')

  self.display_name = attributes[:'display_name'] if attributes[:'display_name']

  self.edit_version = attributes[:'editVersion'] if attributes[:'editVersion']

  raise 'You cannot provide both :editVersion and :edit_version' if attributes.key?(:'editVersion') && attributes.key?(:'edit_version')

  self.edit_version = attributes[:'edit_version'] if attributes[:'edit_version']

  self.facet_priority = attributes[:'facetPriority'] if attributes[:'facetPriority']

  raise 'You cannot provide both :facetPriority and :facet_priority' if attributes.key?(:'facetPriority') && attributes.key?(:'facet_priority')

  self.facet_priority = attributes[:'facet_priority'] if attributes[:'facet_priority']

  self.name = attributes[:'name'] if attributes[:'name']

  self.is_facet_eligible = attributes[:'isFacetEligible'] unless attributes[:'isFacetEligible'].nil?

  raise 'You cannot provide both :isFacetEligible and :is_facet_eligible' if attributes.key?(:'isFacetEligible') && attributes.key?(:'is_facet_eligible')

  self.is_facet_eligible = attributes[:'is_facet_eligible'] unless attributes[:'is_facet_eligible'].nil?

  self.is_high_cardinality = attributes[:'isHighCardinality'] unless attributes[:'isHighCardinality'].nil?

  raise 'You cannot provide both :isHighCardinality and :is_high_cardinality' if attributes.key?(:'isHighCardinality') && attributes.key?(:'is_high_cardinality')

  self.is_high_cardinality = attributes[:'is_high_cardinality'] unless attributes[:'is_high_cardinality'].nil?

  self.is_large_data = attributes[:'isLargeData'] unless attributes[:'isLargeData'].nil?

  raise 'You cannot provide both :isLargeData and :is_large_data' if attributes.key?(:'isLargeData') && attributes.key?(:'is_large_data')

  self.is_large_data = attributes[:'is_large_data'] unless attributes[:'is_large_data'].nil?

  self.is_multi_valued = attributes[:'isMultiValued'] unless attributes[:'isMultiValued'].nil?

  raise 'You cannot provide both :isMultiValued and :is_multi_valued' if attributes.key?(:'isMultiValued') && attributes.key?(:'is_multi_valued')

  self.is_multi_valued = attributes[:'is_multi_valued'] unless attributes[:'is_multi_valued'].nil?

  self.is_primary = attributes[:'isPrimary'] unless attributes[:'isPrimary'].nil?

  raise 'You cannot provide both :isPrimary and :is_primary' if attributes.key?(:'isPrimary') && attributes.key?(:'is_primary')

  self.is_primary = attributes[:'is_primary'] unless attributes[:'is_primary'].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.is_summarizable = attributes[:'isSummarizable'] unless attributes[:'isSummarizable'].nil?

  raise 'You cannot provide both :isSummarizable and :is_summarizable' if attributes.key?(:'isSummarizable') && attributes.key?(:'is_summarizable')

  self.is_summarizable = attributes[:'is_summarizable'] unless attributes[:'is_summarizable'].nil?

  self.mapped_value = attributes[:'mappedValue'] if attributes[:'mappedValue']

  raise 'You cannot provide both :mappedValue and :mapped_value' if attributes.key?(:'mappedValue') && attributes.key?(:'mapped_value')

  self.mapped_value = attributes[:'mapped_value'] if attributes[:'mapped_value']

  self.is_metric_key_eligible = attributes[:'isMetricKeyEligible'] unless attributes[:'isMetricKeyEligible'].nil?

  raise 'You cannot provide both :isMetricKeyEligible and :is_metric_key_eligible' if attributes.key?(:'isMetricKeyEligible') && attributes.key?(:'is_metric_key_eligible')

  self.is_metric_key_eligible = attributes[:'is_metric_key_eligible'] unless attributes[:'is_metric_key_eligible'].nil?

  self.is_metric_value_eligible = attributes[:'isMetricValueEligible'] unless attributes[:'isMetricValueEligible'].nil?

  raise 'You cannot provide both :isMetricValueEligible and :is_metric_value_eligible' if attributes.key?(:'isMetricValueEligible') && attributes.key?(:'is_metric_value_eligible')

  self.is_metric_value_eligible = attributes[:'is_metric_value_eligible'] unless attributes[:'is_metric_value_eligible'].nil?

  self.range_facet_eligible = attributes[:'rangeFacetEligible'] if attributes[:'rangeFacetEligible']

  raise 'You cannot provide both :rangeFacetEligible and :range_facet_eligible' if attributes.key?(:'rangeFacetEligible') && attributes.key?(:'range_facet_eligible')

  self.range_facet_eligible = attributes[:'range_facet_eligible'] if attributes[:'range_facet_eligible']

  self.is_table_eligible = attributes[:'isTableEligible'] unless attributes[:'isTableEligible'].nil?

  raise 'You cannot provide both :isTableEligible and :is_table_eligible' if attributes.key?(:'isTableEligible') && attributes.key?(:'is_table_eligible')

  self.is_table_eligible = attributes[:'is_table_eligible'] unless attributes[:'is_table_eligible'].nil?

  self.unit_type = attributes[:'unitType'] if attributes[:'unitType']

  raise 'You cannot provide both :unitType and :unit_type' if attributes.key?(:'unitType') && attributes.key?(:'unit_type')

  self.unit_type = attributes[:'unit_type'] if attributes[:'unit_type']
end

Instance Attribute Details

#cee_aliasString

The name this field is given in the common event expression standard from mitre.org. This is used for reference when exporting content conforming to CEE standard

Returns:

  • (String)


15
16
17
# File 'lib/oci/log_analytics/models/log_analytics_field.rb', line 15

def cee_alias
  @cee_alias
end

#data_typeString

The field data type.

Returns:

  • (String)


19
20
21
# File 'lib/oci/log_analytics/models/log_analytics_field.rb', line 19

def data_type
  @data_type
end

#descriptionString

The field description.

Returns:

  • (String)


27
28
29
# File 'lib/oci/log_analytics/models/log_analytics_field.rb', line 27

def description
  @description
end

#display_nameString

The field display name.

Returns:

  • (String)


31
32
33
# File 'lib/oci/log_analytics/models/log_analytics_field.rb', line 31

def display_name
  @display_name
end

#edit_versionInteger

The field edit version.

Returns:

  • (Integer)


35
36
37
# File 'lib/oci/log_analytics/models/log_analytics_field.rb', line 35

def edit_version
  @edit_version
end

#facet_priorityInteger

The facet priority.

Returns:

  • (Integer)


39
40
41
# File 'lib/oci/log_analytics/models/log_analytics_field.rb', line 39

def facet_priority
  @facet_priority
end

#is_facet_eligibleBOOLEAN

A flag inidcating whether or not the facet is elibigle for use.

Returns:

  • (BOOLEAN)


48
49
50
# File 'lib/oci/log_analytics/models/log_analytics_field.rb', line 48

def is_facet_eligible
  @is_facet_eligible
end

#is_high_cardinalityBOOLEAN

A flag inidcating whether or not the cardinality of the field is high.

Returns:

  • (BOOLEAN)


53
54
55
# File 'lib/oci/log_analytics/models/log_analytics_field.rb', line 53

def is_high_cardinality
  @is_high_cardinality
end

#is_large_dataBOOLEAN

A flag inidcating whether or not the field is a large data field.

Returns:

  • (BOOLEAN)


58
59
60
# File 'lib/oci/log_analytics/models/log_analytics_field.rb', line 58

def is_large_data
  @is_large_data
end

#is_metric_key_eligibleBOOLEAN

A flag inidcating whether or not the field is metric key eligible.

Returns:

  • (BOOLEAN)


88
89
90
# File 'lib/oci/log_analytics/models/log_analytics_field.rb', line 88

def is_metric_key_eligible
  @is_metric_key_eligible
end

#is_metric_value_eligibleBOOLEAN

A flag inidcating whether or not the field is metric value eligible.

Returns:

  • (BOOLEAN)


93
94
95
# File 'lib/oci/log_analytics/models/log_analytics_field.rb', line 93

def is_metric_value_eligible
  @is_metric_value_eligible
end

#is_multi_valuedBOOLEAN

A flag indicating whether or not the field is multi-valued.

Returns:

  • (BOOLEAN)


63
64
65
# File 'lib/oci/log_analytics/models/log_analytics_field.rb', line 63

def is_multi_valued
  @is_multi_valued
end

#is_primaryBOOLEAN

A flag inidcating whether or not this is a primary field.

Returns:

  • (BOOLEAN)


68
69
70
# File 'lib/oci/log_analytics/models/log_analytics_field.rb', line 68

def is_primary
  @is_primary
end

#is_summarizableBOOLEAN

A flag inidcating whether or not the field can be summarized.

Returns:

  • (BOOLEAN)


79
80
81
# File 'lib/oci/log_analytics/models/log_analytics_field.rb', line 79

def is_summarizable
  @is_summarizable
end

#is_systemBOOLEAN

The system flag. A value of false denotes a custom, or user defined object. A value of true denotes a built in object.

Returns:

  • (BOOLEAN)


74
75
76
# File 'lib/oci/log_analytics/models/log_analytics_field.rb', line 74

def is_system
  @is_system
end

#is_table_eligibleBOOLEAN

A flag inidcating whether or not the field is table eligible.

Returns:

  • (BOOLEAN)


103
104
105
# File 'lib/oci/log_analytics/models/log_analytics_field.rb', line 103

def is_table_eligible
  @is_table_eligible
end

#mapped_valueString

The mapped value.

Returns:

  • (String)


83
84
85
# File 'lib/oci/log_analytics/models/log_analytics_field.rb', line 83

def mapped_value
  @mapped_value
end

#nameString

The field internal name.

Returns:

  • (String)


43
44
45
# File 'lib/oci/log_analytics/models/log_analytics_field.rb', line 43

def name
  @name
end

#range_facet_eligibleInteger

A flag inidcating whether or not the field is range facet eligible.

Returns:

  • (Integer)


98
99
100
# File 'lib/oci/log_analytics/models/log_analytics_field.rb', line 98

def range_facet_eligible
  @range_facet_eligible
end

#regular_expressionString

The field default regular expression.

Returns:

  • (String)


23
24
25
# File 'lib/oci/log_analytics/models/log_analytics_field.rb', line 23

def regular_expression
  @regular_expression
end

#unit_typeString

The field unit type.

Returns:

  • (String)


107
108
109
# File 'lib/oci/log_analytics/models/log_analytics_field.rb', line 107

def unit_type
  @unit_type
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



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
# File 'lib/oci/log_analytics/models/log_analytics_field.rb', line 110

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'cee_alias': :'ceeAlias',
    'data_type': :'dataType',
    'regular_expression': :'regularExpression',
    'description': :'description',
    'display_name': :'displayName',
    'edit_version': :'editVersion',
    'facet_priority': :'facetPriority',
    'name': :'name',
    'is_facet_eligible': :'isFacetEligible',
    'is_high_cardinality': :'isHighCardinality',
    'is_large_data': :'isLargeData',
    'is_multi_valued': :'isMultiValued',
    'is_primary': :'isPrimary',
    'is_system': :'isSystem',
    'is_summarizable': :'isSummarizable',
    'mapped_value': :'mappedValue',
    'is_metric_key_eligible': :'isMetricKeyEligible',
    'is_metric_value_eligible': :'isMetricValueEligible',
    'range_facet_eligible': :'rangeFacetEligible',
    'is_table_eligible': :'isTableEligible',
    'unit_type': :'unitType'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



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
# File 'lib/oci/log_analytics/models/log_analytics_field.rb', line 139

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'cee_alias': :'String',
    'data_type': :'String',
    'regular_expression': :'String',
    'description': :'String',
    'display_name': :'String',
    'edit_version': :'Integer',
    'facet_priority': :'Integer',
    'name': :'String',
    'is_facet_eligible': :'BOOLEAN',
    'is_high_cardinality': :'BOOLEAN',
    'is_large_data': :'BOOLEAN',
    'is_multi_valued': :'BOOLEAN',
    'is_primary': :'BOOLEAN',
    'is_system': :'BOOLEAN',
    'is_summarizable': :'BOOLEAN',
    'mapped_value': :'String',
    'is_metric_key_eligible': :'BOOLEAN',
    'is_metric_value_eligible': :'BOOLEAN',
    'range_facet_eligible': :'Integer',
    'is_table_eligible': :'BOOLEAN',
    'unit_type': :'String'
    # rubocop:enable Style/SymbolLiteral
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • other (Object)

    the other object to be compared



326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
# File 'lib/oci/log_analytics/models/log_analytics_field.rb', line 326

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    cee_alias == other.cee_alias &&
    data_type == other.data_type &&
    regular_expression == other.regular_expression &&
    description == other.description &&
    display_name == other.display_name &&
    edit_version == other.edit_version &&
    facet_priority == other.facet_priority &&
    name == other.name &&
    is_facet_eligible == other.is_facet_eligible &&
    is_high_cardinality == other.is_high_cardinality &&
    is_large_data == other.is_large_data &&
    is_multi_valued == other.is_multi_valued &&
    is_primary == other.is_primary &&
    is_system == other.is_system &&
    is_summarizable == other.is_summarizable &&
    mapped_value == other.mapped_value &&
    is_metric_key_eligible == other.is_metric_key_eligible &&
    is_metric_value_eligible == other.is_metric_value_eligible &&
    range_facet_eligible == other.range_facet_eligible &&
    is_table_eligible == other.is_table_eligible &&
    unit_type == other.unit_type
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
# File 'lib/oci/log_analytics/models/log_analytics_field.rb', line 376

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

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


356
357
358
# File 'lib/oci/log_analytics/models/log_analytics_field.rb', line 356

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



365
366
367
# File 'lib/oci/log_analytics/models/log_analytics_field.rb', line 365

def hash
  [cee_alias, data_type, regular_expression, description, display_name, edit_version, facet_priority, name, is_facet_eligible, is_high_cardinality, is_large_data, is_multi_valued, is_primary, is_system, is_summarizable, mapped_value, is_metric_key_eligible, is_metric_value_eligible, range_facet_eligible, is_table_eligible, unit_type].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



409
410
411
412
413
414
415
416
417
418
# File 'lib/oci/log_analytics/models/log_analytics_field.rb', line 409

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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



403
404
405
# File 'lib/oci/log_analytics/models/log_analytics_field.rb', line 403

def to_s
  to_hash.to_s
end