Class: LogStash::Filters::Empow::ClassificationRequest

Inherits:
Struct
  • Object
show all
Defined in:
lib/logstash/filters/classification-request.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(product_type, product, term, is_src_internal, is_dst_internal) ⇒ ClassificationRequest

Returns a new instance of ClassificationRequest.



3
4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/logstash/filters/classification-request.rb', line 3

def initialize(product_type, product, term, is_src_internal, is_dst_internal)
  if product_type.nil?
  	raise ArgumentError, 'product type cannot be empty' 
  end

  product_type = product_type.upcase.strip

  unless product.nil?
    product = product.downcase.strip
  end

  super(product_type, product, term, is_src_internal, is_dst_internal)
end

Instance Attribute Details

#is_dst_internalObject

Returns the value of attribute is_dst_internal

Returns:

  • (Object)

    the current value of is_dst_internal



2
3
4
# File 'lib/logstash/filters/classification-request.rb', line 2

def is_dst_internal
  @is_dst_internal
end

#is_src_internalObject

Returns the value of attribute is_src_internal

Returns:

  • (Object)

    the current value of is_src_internal



2
3
4
# File 'lib/logstash/filters/classification-request.rb', line 2

def is_src_internal
  @is_src_internal
end

#productObject

Returns the value of attribute product

Returns:

  • (Object)

    the current value of product



2
3
4
# File 'lib/logstash/filters/classification-request.rb', line 2

def product
  @product
end

#product_typeObject

Returns the value of attribute product_type

Returns:

  • (Object)

    the current value of product_type



2
3
4
# File 'lib/logstash/filters/classification-request.rb', line 2

def product_type
  @product_type
end

#termObject

Returns the value of attribute term

Returns:

  • (Object)

    the current value of term



2
3
4
# File 'lib/logstash/filters/classification-request.rb', line 2

def term
  @term
end