Class: Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1RankingRecord

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

Overview

Record message for RankService.Rank method.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1RankingRecord

Returns a new instance of GoogleCloudDiscoveryengineV1RankingRecord.



5598
5599
5600
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 5598

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)


5580
5581
5582
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 5580

def content
  @content
end

#idString

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

Returns:

  • (String)


5585
5586
5587
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 5585

def id
  @id
end

#scoreFloat

The score of this record based on the given query and selected model. Corresponds to the JSON property score

Returns:

  • (Float)


5590
5591
5592
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 5590

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)


5596
5597
5598
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 5596

def title
  @title
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5603
5604
5605
5606
5607
5608
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 5603

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