Class: Google::Apis::DiscoveryengineV1alpha::GoogleCloudDiscoveryengineV1alphaRankingRecord

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

Overview

Record message for RankService.Rank method.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1alphaRankingRecord

Returns a new instance of GoogleCloudDiscoveryengineV1alphaRankingRecord.



13530
13531
13532
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 13530

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)


13510
13511
13512
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 13510

def content
  @content
end

#idString

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

Returns:

  • (String)


13515
13516
13517
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 13515

def id
  @id
end

#scoreFloat

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

Returns:

  • (Float)


13522
13523
13524
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 13522

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)


13528
13529
13530
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 13528

def title
  @title
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



13535
13536
13537
13538
13539
13540
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 13535

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