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.



7287
7288
7289
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 7287

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)


7269
7270
7271
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 7269

def content
  @content
end

#idString

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

Returns:

  • (String)


7274
7275
7276
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 7274

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)


7279
7280
7281
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 7279

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)


7285
7286
7287
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 7285

def title
  @title
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



7292
7293
7294
7295
7296
7297
# File 'lib/google/apis/discoveryengine_v1alpha/classes.rb', line 7292

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