Class: TencentCloud::Vm::V20201229::HitInfo

Inherits:
Common::AbstractModel
  • Object
show all
Defined in:
lib/v20201229/models.rb

Overview

文本关键词命中信息

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type = nil, keyword = nil, libname = nil, positions = nil) ⇒ HitInfo

Returns a new instance of HitInfo.



752
753
754
755
756
757
# File 'lib/v20201229/models.rb', line 752

def initialize(type=nil, keyword=nil, libname=nil, positions=nil)
  @Type = type
  @Keyword = keyword
  @LibName = libname
  @Positions = positions
end

Instance Attribute Details

#KeywordObject

Parameters:

  • Type:

    关键词

  • Keyword:

    命中关键词

  • LibName:

    命中的自定义词库名

  • Positions:

    关键词位置信息



750
751
752
# File 'lib/v20201229/models.rb', line 750

def Keyword
  @Keyword
end

#LibNameObject

Parameters:

  • Type:

    关键词

  • Keyword:

    命中关键词

  • LibName:

    命中的自定义词库名

  • Positions:

    关键词位置信息



750
751
752
# File 'lib/v20201229/models.rb', line 750

def LibName
  @LibName
end

#PositionsObject

Parameters:

  • Type:

    关键词

  • Keyword:

    命中关键词

  • LibName:

    命中的自定义词库名

  • Positions:

    关键词位置信息



750
751
752
# File 'lib/v20201229/models.rb', line 750

def Positions
  @Positions
end

#TypeObject

Parameters:

  • Type:

    关键词

  • Keyword:

    命中关键词

  • LibName:

    命中的自定义词库名

  • Positions:

    关键词位置信息



750
751
752
# File 'lib/v20201229/models.rb', line 750

def Type
  @Type
end

Instance Method Details

#deserialize(params) ⇒ Object



759
760
761
762
763
764
765
766
767
768
769
770
771
# File 'lib/v20201229/models.rb', line 759

def deserialize(params)
  @Type = params['Type']
  @Keyword = params['Keyword']
  @LibName = params['LibName']
  unless params['Positions'].nil?
    @Positions = []
    params['Positions'].each do |i|
      textposition_tmp = TextPosition.new
      textposition_tmp.deserialize(i)
      @Positions << textposition_tmp
    end
  end
end