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.



6756
6757
6758
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 6756

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)


6738
6739
6740
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 6738

def content
  @content
end

#idString

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

Returns:

  • (String)


6743
6744
6745
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 6743

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)


6748
6749
6750
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 6748

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)


6754
6755
6756
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 6754

def title
  @title
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



6761
6762
6763
6764
6765
6766
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 6761

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