Class: Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerCitation

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

Citation info for a segment.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1AnswerCitation

Returns a new instance of GoogleCloudDiscoveryengineV1AnswerCitation.



379
380
381
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 379

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#end_indexFixnum

End of the attributed segment, exclusive. Corresponds to the JSON property endIndex

Returns:

  • (Fixnum)


367
368
369
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 367

def end_index
  @end_index
end

#sourcesArray<Google::Apis::DiscoveryengineV1::GoogleCloudDiscoveryengineV1AnswerCitationSource>

Citation sources for the attributed segment. Corresponds to the JSON property sources



372
373
374
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 372

def sources
  @sources
end

#start_indexFixnum

Index indicates the start of the segment, measured in bytes (UTF-8 unicode). Corresponds to the JSON property startIndex

Returns:

  • (Fixnum)


377
378
379
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 377

def start_index
  @start_index
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



384
385
386
387
388
# File 'lib/google/apis/discoveryengine_v1/classes.rb', line 384

def update!(**args)
  @end_index = args[:end_index] if args.key?(:end_index)
  @sources = args[:sources] if args.key?(:sources)
  @start_index = args[:start_index] if args.key?(:start_index)
end