Class: Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1betaRankingRecord

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/discoveryengine_v1beta/classes.rb,
lib/google/apis/discoveryengine_v1beta/representations.rb,
lib/google/apis/discoveryengine_v1beta/representations.rb

Overview

Record message for RankService.Rank method.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1betaRankingRecord

Returns a new instance of GoogleCloudDiscoveryengineV1betaRankingRecord.



28867
28868
28869
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 28867

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#contentString

The content of the record. Empty by default. At least one of title or content should be set otherwise an INVALID_ARGUMENT error is thrown. Corresponds to the JSON property content

Returns:

  • (String)


28847
28848
28849
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 28847

def content
  @content
end

#idString

The unique ID to represent the record. Corresponds to the JSON property id

Returns:

  • (String)


28852
28853
28854
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 28852

def id
  @id
end

#scoreFloat

The score of this record based on the given query and selected model. The score will be rounded to 4 decimal places. If the score is close to 0, it will be rounded to 0.00001 to avoid returning unset. Corresponds to the JSON property score

Returns:

  • (Float)


28859
28860
28861
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 28859

def score
  @score
end

#titleString

The title of the record. Empty by default. At least one of title or content should be set otherwise an INVALID_ARGUMENT error is thrown. Corresponds to the JSON property title

Returns:

  • (String)


28865
28866
28867
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 28865

def title
  @title
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



28872
28873
28874
28875
28876
28877
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 28872

def update!(**args)
  @content = args[:content] if args.key?(:content)
  @id = args[:id] if args.key?(:id)
  @score = args[:score] if args.key?(:score)
  @title = args[:title] if args.key?(:title)
end