Class: OTX::Pulse

Inherits:
Type::Base show all
Defined in:
lib/otx_ruby/types/pulse.rb

Overview

AlienVault OTX Pulse Record

Author:

  • Stephen Kapp

Instance Attribute Summary collapse

Attributes inherited from Type::Base

#created, #modified

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Pulse

Returns a new instance of Pulse.



30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/otx_ruby/types/pulse.rb', line 30

def initialize(attributes={})
  attributes.each do |key, value|
    # Dynamically Add any missing attributes
    unless self.respond_to?(key)
      self.class.send(:attr_accessor, key)
    end

    if key == 'indicators'
      @indicators = []
      value.each do |indicator|
        @indicators << OTX::Indicators.new(indicator)
      end
    elsif key == 'observation'
      @observation = OTX::Indicator::Pulse::Observation.new(value)
    elsif key == 'indicator_type_counts'
      @indicator_type_counts = OTX::Indicator::Pulse::IndicatorTypeCounts.new(value)
    elsif key == 'author'
      @author = OTX::Indicator::Pulse::Author.new(value)
    else
      send("#{key.downcase}=", value)
    end
  end
end

Instance Attribute Details

#adversaryString

Returns the current value of adversary.

Returns:

  • (String)

    the current value of adversary



24
25
26
# File 'lib/otx_ruby/types/pulse.rb', line 24

def adversary
  @adversary
end

#author_nameString

Name of the pulse author_name

Returns:

  • (String)

    the current value of author_name



24
25
26
# File 'lib/otx_ruby/types/pulse.rb', line 24

def author_name
  @author_name
end

#descriptionString

Description of the pulse

Returns:

  • (String)

    the current value of description



24
25
26
# File 'lib/otx_ruby/types/pulse.rb', line 24

def description
  @description
end

#group_idString

Returns the current value of group_id.

Returns:

  • (String)

    the current value of group_id



24
25
26
# File 'lib/otx_ruby/types/pulse.rb', line 24

def group_id
  @group_id
end

#group_nameString

Returns the current value of group_name.

Returns:

  • (String)

    the current value of group_name



24
25
26
# File 'lib/otx_ruby/types/pulse.rb', line 24

def group_name
  @group_name
end

#groupsArray<String>

Returns the current value of groups.

Returns:

  • (Array<String>)

    the current value of groups



24
25
26
# File 'lib/otx_ruby/types/pulse.rb', line 24

def groups
  @groups
end

#idString

OTX ID value for the pulse Record

Returns:

  • (String)

    the current value of id



24
25
26
# File 'lib/otx_ruby/types/pulse.rb', line 24

def id
  @id
end

#in_groupBoolean

Returns the current value of in_group.

Returns:

  • (Boolean)

    the current value of in_group



24
25
26
# File 'lib/otx_ruby/types/pulse.rb', line 24

def in_group
  @in_group
end

#indicatorsArray<OTX::Indicators>

Array of the IoC attached to the OTX pulse

Returns:



24
25
26
# File 'lib/otx_ruby/types/pulse.rb', line 24

def indicators
  @indicators
end

#industriesArray<String>

Returns the current value of industries.

Returns:

  • (Array<String>)

    the current value of industries



24
25
26
# File 'lib/otx_ruby/types/pulse.rb', line 24

def industries
  @industries
end

#nameString

Pulse Name

Returns:

  • (String)

    the current value of name



24
25
26
# File 'lib/otx_ruby/types/pulse.rb', line 24

def name
  @name
end

#publicBoolean

Privacy setting

Returns:

  • (Boolean)

    the current value of public



24
25
26
# File 'lib/otx_ruby/types/pulse.rb', line 24

def public
  @public
end

#referencesObject

Returns the value of attribute references.



25
26
27
# File 'lib/otx_ruby/types/pulse.rb', line 25

def references
  @references
end

#referenesArray<String>

Array of references attached to the pulse

Returns:

  • (Array<String>)

    the current value of referenes



24
25
26
# File 'lib/otx_ruby/types/pulse.rb', line 24

def referenes
  @referenes
end

#revisionString

Revision number of the OTX Pulse Record

Returns:

  • (String)

    the current value of revision



24
25
26
# File 'lib/otx_ruby/types/pulse.rb', line 24

def revision
  @revision
end

#tagsArray<String>

Array of ‘tags’ to describe the pulse

Returns:

  • (Array<String>)

    the current value of tags



24
25
26
# File 'lib/otx_ruby/types/pulse.rb', line 24

def tags
  @tags
end

#targeted_countriesArray<String>

Returns the current value of targeted_countries.

Returns:

  • (Array<String>)

    the current value of targeted_countries



24
25
26
# File 'lib/otx_ruby/types/pulse.rb', line 24

def targeted_countries
  @targeted_countries
end

#tlpString

Traffic light protocol color as appropriate to U.S. DHS

Returns:

  • (String)

    the current value of tlp



24
25
26
# File 'lib/otx_ruby/types/pulse.rb', line 24

def tlp
  @tlp
end