Class: Google::Apis::VisionV1::WebPage

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

Overview

Metadata for web pages.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ WebPage

Returns a new instance of WebPage



2039
2040
2041
# File 'generated/google/apis/vision_v1/classes.rb', line 2039

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

Instance Attribute Details

#full_matching_imagesArray<Google::Apis::VisionV1::WebImage>

Fully matching images on the page. Can include resized copies of the query image. Corresponds to the JSON property fullMatchingImages



2014
2015
2016
# File 'generated/google/apis/vision_v1/classes.rb', line 2014

def full_matching_images
  @full_matching_images
end

#page_titleString

Title for the web page, may contain HTML markups. Corresponds to the JSON property pageTitle

Returns:

  • (String)


2019
2020
2021
# File 'generated/google/apis/vision_v1/classes.rb', line 2019

def page_title
  @page_title
end

#partial_matching_imagesArray<Google::Apis::VisionV1::WebImage>

Partial matching images on the page. Those images are similar enough to share some key-point features. For example an original image will likely have partial matching for its crops. Corresponds to the JSON property partialMatchingImages



2027
2028
2029
# File 'generated/google/apis/vision_v1/classes.rb', line 2027

def partial_matching_images
  @partial_matching_images
end

#scoreFloat

(Deprecated) Overall relevancy score for the web page. Corresponds to the JSON property score

Returns:

  • (Float)


2032
2033
2034
# File 'generated/google/apis/vision_v1/classes.rb', line 2032

def score
  @score
end

#urlString

The result web page URL. Corresponds to the JSON property url

Returns:

  • (String)


2037
2038
2039
# File 'generated/google/apis/vision_v1/classes.rb', line 2037

def url
  @url
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2044
2045
2046
2047
2048
2049
2050
# File 'generated/google/apis/vision_v1/classes.rb', line 2044

def update!(**args)
  @full_matching_images = args[:full_matching_images] if args.key?(:full_matching_images)
  @page_title = args[:page_title] if args.key?(:page_title)
  @partial_matching_images = args[:partial_matching_images] if args.key?(:partial_matching_images)
  @score = args[:score] if args.key?(:score)
  @url = args[:url] if args.key?(:url)
end