Class: Google::Apis::DeveloperknowledgeV1alpha::AnswerCitation

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

Overview

Citation info for a segment.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ AnswerCitation

Returns a new instance of AnswerCitation.



79
80
81
# File 'lib/google/apis/developerknowledge_v1alpha/classes.rb', line 79

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

Instance Attribute Details

#end_indexFixnum

Output only. Indicates the end of the segment, measured in bytes (UTF-8 unicode), exclusive. If there are multi-byte characters, such as non-ASCII characters, the index measurement is longer than the string length. Corresponds to the JSON property endIndex

Returns:

  • (Fixnum)


65
66
67
# File 'lib/google/apis/developerknowledge_v1alpha/classes.rb', line 65

def end_index
  @end_index
end

#sourcesArray<Google::Apis::DeveloperknowledgeV1alpha::CitationSource>

Output only. Contains citation sources for the attributed segment. Corresponds to the JSON property sources



70
71
72
# File 'lib/google/apis/developerknowledge_v1alpha/classes.rb', line 70

def sources
  @sources
end

#start_indexFixnum

Output only. Indicates the start of the segment, measured in bytes (UTF-8 unicode), inclusive. If there are multi-byte characters, such as non-ASCII characters, the index measurement is longer than the string length. Corresponds to the JSON property startIndex

Returns:

  • (Fixnum)


77
78
79
# File 'lib/google/apis/developerknowledge_v1alpha/classes.rb', line 77

def start_index
  @start_index
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



84
85
86
87
88
# File 'lib/google/apis/developerknowledge_v1alpha/classes.rb', line 84

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