Class: Google::Apis::ContentwarehouseV1::GoogleCloudContentwarehouseV1QaResultHighlight

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

Overview

A text span in the search text snippet that represents a highlighted section ( answer context, highly relevant sentence, etc.).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudContentwarehouseV1QaResultHighlight

Returns a new instance of GoogleCloudContentwarehouseV1QaResultHighlight.



2986
2987
2988
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 2986

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

Instance Attribute Details

#end_indexFixnum

End index of the highlight, exclusive. Corresponds to the JSON property endIndex

Returns:

  • (Fixnum)


2979
2980
2981
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 2979

def end_index
  @end_index
end

#start_indexFixnum

Start index of the highlight. Corresponds to the JSON property startIndex

Returns:

  • (Fixnum)


2984
2985
2986
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 2984

def start_index
  @start_index
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2991
2992
2993
2994
# File 'lib/google/apis/contentwarehouse_v1/classes.rb', line 2991

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