Class: OCI::ThreatIntelligence::Models::SummarizeIndicatorsDetails

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/threat_intelligence/models/summarize_indicators_details.rb

Overview

Query parameters to filter indicators

Constant Summary collapse

INDICATOR_TYPE_ENUM =
[
  INDICATOR_TYPE_DOMAIN_NAME = 'DOMAIN_NAME'.freeze,
  INDICATOR_TYPE_FILE_NAME = 'FILE_NAME'.freeze,
  INDICATOR_TYPE_MD5_HASH = 'MD5_HASH'.freeze,
  INDICATOR_TYPE_SHA1_HASH = 'SHA1_HASH'.freeze,
  INDICATOR_TYPE_SHA256_HASH = 'SHA256_HASH'.freeze,
  INDICATOR_TYPE_IP_ADDRESS = 'IP_ADDRESS'.freeze,
  INDICATOR_TYPE_URL = 'URL'.freeze
].freeze
SORT_ORDER_ENUM =
[
  SORT_ORDER_ASC = 'ASC'.freeze,
  SORT_ORDER_DESC = 'DESC'.freeze
].freeze
SORT_BY_ENUM =
[
  SORT_BY_CONFIDENCE = 'CONFIDENCE'.freeze,
  SORT_BY_TIMECREATED = 'TIMECREATED'.freeze,
  SORT_BY_TIMEUPDATED = 'TIMEUPDATED'.freeze,
  SORT_BY_TIMELASTSEEN = 'TIMELASTSEEN'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ SummarizeIndicatorsDetails

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



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
242
243
244
245
246
247
248
249
250
251
# File 'lib/oci/threat_intelligence/models/summarize_indicators_details.rb', line 160

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

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

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

  self.indicator_value = attributes[:'indicatorValue'] if attributes[:'indicatorValue']

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

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

  self.threat_types = attributes[:'threatTypes'] if attributes[:'threatTypes']

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

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

  self.confidence_greater_than_or_equal_to = attributes[:'confidenceGreaterThanOrEqualTo'] if attributes[:'confidenceGreaterThanOrEqualTo']

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

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

  self.time_updated_greater_than_or_equal_to = attributes[:'timeUpdatedGreaterThanOrEqualTo'] if attributes[:'timeUpdatedGreaterThanOrEqualTo']

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

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

  self.time_updated_less_than = attributes[:'timeUpdatedLessThan'] if attributes[:'timeUpdatedLessThan']

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

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

  self.time_last_seen_greater_than_or_equal_to = attributes[:'timeLastSeenGreaterThanOrEqualTo'] if attributes[:'timeLastSeenGreaterThanOrEqualTo']

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

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

  self.time_last_seen_less_than = attributes[:'timeLastSeenLessThan'] if attributes[:'timeLastSeenLessThan']

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

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

  self.time_created_greater_than_or_equal_to = attributes[:'timeCreatedGreaterThanOrEqualTo'] if attributes[:'timeCreatedGreaterThanOrEqualTo']

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

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

  self.time_created_less_than = attributes[:'timeCreatedLessThan'] if attributes[:'timeCreatedLessThan']

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

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

  self.indicator_seen_by = attributes[:'indicatorSeenBy'] if attributes[:'indicatorSeenBy']

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

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

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

  self.threat_actor = attributes[:'threatActor'] if attributes[:'threatActor']

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

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

  self.sort_order = attributes[:'sortOrder'] if attributes[:'sortOrder']

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

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

  self.sort_by = attributes[:'sortBy'] if attributes[:'sortBy']

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

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

Instance Attribute Details

#confidence_greater_than_or_equal_toInteger

The minimum level of confidence to return

Returns:

  • (Integer)


47
48
49
# File 'lib/oci/threat_intelligence/models/summarize_indicators_details.rb', line 47

def confidence_greater_than_or_equal_to
  @confidence_greater_than_or_equal_to
end

#indicator_seen_byString

Filter to include indicators that have been seen by the provided source.

Returns:

  • (String)


75
76
77
# File 'lib/oci/threat_intelligence/models/summarize_indicators_details.rb', line 75

def indicator_seen_by
  @indicator_seen_by
end

#indicator_typeString

The type of indicator this is

Returns:

  • (String)


35
36
37
# File 'lib/oci/threat_intelligence/models/summarize_indicators_details.rb', line 35

def indicator_type
  @indicator_type
end

#indicator_valueString

The value for the type of indicator this is

Returns:

  • (String)


39
40
41
# File 'lib/oci/threat_intelligence/models/summarize_indicators_details.rb', line 39

def indicator_value
  @indicator_value
end

#malwareString

Filter to include indicators associated with the provided malware.

Returns:

  • (String)


79
80
81
# File 'lib/oci/threat_intelligence/models/summarize_indicators_details.rb', line 79

def malware
  @malware
end

#sort_byString

The field to sort by. Only one field to sort by may be provided

Returns:

  • (String)


91
92
93
# File 'lib/oci/threat_intelligence/models/summarize_indicators_details.rb', line 91

def sort_by
  @sort_by
end

#sort_orderString

The sort order to use, either 'ASC' or 'DESC'.

Returns:

  • (String)


87
88
89
# File 'lib/oci/threat_intelligence/models/summarize_indicators_details.rb', line 87

def sort_order
  @sort_order
end

#threat_actorString

Filter to included indicators associated with the provided threat actor.

Returns:

  • (String)


83
84
85
# File 'lib/oci/threat_intelligence/models/summarize_indicators_details.rb', line 83

def threat_actor
  @threat_actor
end

#threat_typesArray<String>

The threat type of entites to be returned.

Returns:

  • (Array<String>)


43
44
45
# File 'lib/oci/threat_intelligence/models/summarize_indicators_details.rb', line 43

def threat_types
  @threat_types
end

#time_created_greater_than_or_equal_toDateTime

The oldest creation time of entities to be returned.

Returns:

  • (DateTime)


67
68
69
# File 'lib/oci/threat_intelligence/models/summarize_indicators_details.rb', line 67

def time_created_greater_than_or_equal_to
  @time_created_greater_than_or_equal_to
end

#time_created_less_thanDateTime

The newest creation time of entities to be returned.

Returns:

  • (DateTime)


71
72
73
# File 'lib/oci/threat_intelligence/models/summarize_indicators_details.rb', line 71

def time_created_less_than
  @time_created_less_than
end

#time_last_seen_greater_than_or_equal_toDateTime

The oldest last seen time of entities to be returned.

Returns:

  • (DateTime)


59
60
61
# File 'lib/oci/threat_intelligence/models/summarize_indicators_details.rb', line 59

def time_last_seen_greater_than_or_equal_to
  @time_last_seen_greater_than_or_equal_to
end

#time_last_seen_less_thanDateTime

The newest last seen time of entities to be returned.

Returns:

  • (DateTime)


63
64
65
# File 'lib/oci/threat_intelligence/models/summarize_indicators_details.rb', line 63

def time_last_seen_less_than
  @time_last_seen_less_than
end

#time_updated_greater_than_or_equal_toDateTime

The oldest update time of entities to be returned.

Returns:

  • (DateTime)


51
52
53
# File 'lib/oci/threat_intelligence/models/summarize_indicators_details.rb', line 51

def time_updated_greater_than_or_equal_to
  @time_updated_greater_than_or_equal_to
end

#time_updated_less_thanDateTime

The newest update time of entities to be returned.

Returns:

  • (DateTime)


55
56
57
# File 'lib/oci/threat_intelligence/models/summarize_indicators_details.rb', line 55

def time_updated_less_than
  @time_updated_less_than
end

Class Method Details

.attribute_mapObject

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



94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# File 'lib/oci/threat_intelligence/models/summarize_indicators_details.rb', line 94

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'indicator_type': :'indicatorType',
    'indicator_value': :'indicatorValue',
    'threat_types': :'threatTypes',
    'confidence_greater_than_or_equal_to': :'confidenceGreaterThanOrEqualTo',
    'time_updated_greater_than_or_equal_to': :'timeUpdatedGreaterThanOrEqualTo',
    'time_updated_less_than': :'timeUpdatedLessThan',
    'time_last_seen_greater_than_or_equal_to': :'timeLastSeenGreaterThanOrEqualTo',
    'time_last_seen_less_than': :'timeLastSeenLessThan',
    'time_created_greater_than_or_equal_to': :'timeCreatedGreaterThanOrEqualTo',
    'time_created_less_than': :'timeCreatedLessThan',
    'indicator_seen_by': :'indicatorSeenBy',
    'malware': :'malware',
    'threat_actor': :'threatActor',
    'sort_order': :'sortOrder',
    'sort_by': :'sortBy'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# File 'lib/oci/threat_intelligence/models/summarize_indicators_details.rb', line 117

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'indicator_type': :'String',
    'indicator_value': :'String',
    'threat_types': :'Array<String>',
    'confidence_greater_than_or_equal_to': :'Integer',
    'time_updated_greater_than_or_equal_to': :'DateTime',
    'time_updated_less_than': :'DateTime',
    'time_last_seen_greater_than_or_equal_to': :'DateTime',
    'time_last_seen_less_than': :'DateTime',
    'time_created_greater_than_or_equal_to': :'DateTime',
    'time_created_less_than': :'DateTime',
    'indicator_seen_by': :'String',
    'malware': :'String',
    'threat_actor': :'String',
    'sort_order': :'String',
    'sort_by': :'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



284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
# File 'lib/oci/threat_intelligence/models/summarize_indicators_details.rb', line 284

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

  self.class == other.class &&
    indicator_type == other.indicator_type &&
    indicator_value == other.indicator_value &&
    threat_types == other.threat_types &&
    confidence_greater_than_or_equal_to == other.confidence_greater_than_or_equal_to &&
    time_updated_greater_than_or_equal_to == other.time_updated_greater_than_or_equal_to &&
    time_updated_less_than == other.time_updated_less_than &&
    time_last_seen_greater_than_or_equal_to == other.time_last_seen_greater_than_or_equal_to &&
    time_last_seen_less_than == other.time_last_seen_less_than &&
    time_created_greater_than_or_equal_to == other.time_created_greater_than_or_equal_to &&
    time_created_less_than == other.time_created_less_than &&
    indicator_seen_by == other.indicator_seen_by &&
    malware == other.malware &&
    threat_actor == other.threat_actor &&
    sort_order == other.sort_order &&
    sort_by == other.sort_by
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



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

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


308
309
310
# File 'lib/oci/threat_intelligence/models/summarize_indicators_details.rb', line 308

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



317
318
319
# File 'lib/oci/threat_intelligence/models/summarize_indicators_details.rb', line 317

def hash
  [indicator_type, indicator_value, threat_types, confidence_greater_than_or_equal_to, time_updated_greater_than_or_equal_to, time_updated_less_than, time_last_seen_greater_than_or_equal_to, time_last_seen_less_than, time_created_greater_than_or_equal_to, time_created_less_than, indicator_seen_by, malware, threat_actor, sort_order, sort_by].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



361
362
363
364
365
366
367
368
369
370
# File 'lib/oci/threat_intelligence/models/summarize_indicators_details.rb', line 361

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



355
356
357
# File 'lib/oci/threat_intelligence/models/summarize_indicators_details.rb', line 355

def to_s
  to_hash.to_s
end