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.



8788
8789
8790
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 8788

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)


8770
8771
8772
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 8770

def content
  @content
end

#idString

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

Returns:

  • (String)


8775
8776
8777
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 8775

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)


8780
8781
8782
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 8780

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)


8786
8787
8788
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 8786

def title
  @title
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



8793
8794
8795
8796
8797
8798
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 8793

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