Class: Google::Apis::CloudsearchV1::UrlMetadata
- Inherits:
-
Object
- Object
- Google::Apis::CloudsearchV1::UrlMetadata
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/cloudsearch_v1/classes.rb,
lib/google/apis/cloudsearch_v1/representations.rb,
lib/google/apis/cloudsearch_v1/representations.rb
Overview
Annotation metadata for a Weblink. In case of pasted link it can qualify to be other types in addition to being a URL - like DRIVE_DOC/DRIVE_SHEET and so on. The URL metadata will also be present and it's up to the client to decide which metadata to render it with. These fields are filled in using page render service.
Instance Attribute Summary collapse
-
#domain ⇒ String
Domain for this url.
-
#gws_url ⇒ Google::Apis::CloudsearchV1::SafeUrlProto
Message containing a string that is safe to use in URL contexts in DOM APIs and HTML documents, where the URL context does not refer to a resource that loads code.
-
#gws_url_expiration_timestamp ⇒ Fixnum
The expiration timestamp for GWS URL, only set when gws_url is set.
-
#image_height ⇒ String
Dimensions of the image: height.
-
#image_url ⇒ String
Representative image of the website.
-
#image_width ⇒ String
Dimensions of the image: width.
-
#int_image_height ⇒ Fixnum
Dimensions of the image: height.
-
#int_image_width ⇒ Fixnum
Dimensions of the image: width.
-
#mime_type ⇒ String
Mime type of the content (Currently mapped from Page Render Service ItemType) Note that this is not necessarily the mime type of the http resource.
-
#redirect_url ⇒ Google::Apis::CloudsearchV1::SafeUrlProto
Message containing a string that is safe to use in URL contexts in DOM APIs and HTML documents, where the URL context does not refer to a resource that loads code.
-
#should_not_render ⇒ Boolean
(also: #should_not_render?)
If the UrlMetadata is missing data for rendering a chip.
-
#snippet ⇒ String
Snippet/small description of the weblink.
-
#title ⇒ String
Title of the Weblink.
-
#url ⇒ Google::Apis::CloudsearchV1::SafeUrlProto
Message containing a string that is safe to use in URL contexts in DOM APIs and HTML documents, where the URL context does not refer to a resource that loads code.
-
#url_source ⇒ String
Corresponds to the JSON property
urlSource
.
Instance Method Summary collapse
-
#initialize(**args) ⇒ UrlMetadata
constructor
A new instance of UrlMetadata.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ UrlMetadata
Returns a new instance of UrlMetadata.
21289 21290 21291 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 21289 def initialize(**args) update!(**args) end |
Instance Attribute Details
#domain ⇒ String
Domain for this url. If it's an IP address the address is returned.
Corresponds to the JSON property domain
21203 21204 21205 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 21203 def domain @domain end |
#gws_url ⇒ Google::Apis::CloudsearchV1::SafeUrlProto
Message containing a string that is safe to use in URL contexts in DOM APIs
and HTML documents, where the URL context does not refer to a resource that
loads code.
Corresponds to the JSON property gwsUrl
21210 21211 21212 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 21210 def gws_url @gws_url end |
#gws_url_expiration_timestamp ⇒ Fixnum
The expiration timestamp for GWS URL, only set when gws_url is set.
Corresponds to the JSON property gwsUrlExpirationTimestamp
21215 21216 21217 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 21215 def @gws_url_expiration_timestamp end |
#image_height ⇒ String
Dimensions of the image: height. This field is string to match with page
render service response. Deprecated. Use int_image_height instead.
Corresponds to the JSON property imageHeight
21221 21222 21223 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 21221 def image_height @image_height end |
#image_url ⇒ String
Representative image of the website.
Corresponds to the JSON property imageUrl
21226 21227 21228 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 21226 def image_url @image_url end |
#image_width ⇒ String
Dimensions of the image: width. This field is string to match with page render
service response. Deprecated. Use int_image_height instead.
Corresponds to the JSON property imageWidth
21232 21233 21234 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 21232 def image_width @image_width end |
#int_image_height ⇒ Fixnum
Dimensions of the image: height.
Corresponds to the JSON property intImageHeight
21237 21238 21239 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 21237 def int_image_height @int_image_height end |
#int_image_width ⇒ Fixnum
Dimensions of the image: width.
Corresponds to the JSON property intImageWidth
21242 21243 21244 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 21242 def int_image_width @int_image_width end |
#mime_type ⇒ String
Mime type of the content (Currently mapped from Page Render Service ItemType)
Note that this is not necessarily the mime type of the http resource. For
example a text/html from youtube or vimeo may actually be classified as a
video type. Then we shall mark it as video/* since we don't know exactly what
type of video it is.
Corresponds to the JSON property mimeType
21251 21252 21253 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 21251 def mime_type @mime_type end |
#redirect_url ⇒ Google::Apis::CloudsearchV1::SafeUrlProto
Message containing a string that is safe to use in URL contexts in DOM APIs
and HTML documents, where the URL context does not refer to a resource that
loads code.
Corresponds to the JSON property redirectUrl
21258 21259 21260 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 21258 def redirect_url @redirect_url end |
#should_not_render ⇒ Boolean Also known as: should_not_render?
If the UrlMetadata is missing data for rendering a chip. Deprecated. Use
Annotation.ChipRenderType instead.
Corresponds to the JSON property shouldNotRender
21264 21265 21266 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 21264 def should_not_render @should_not_render end |
#snippet ⇒ String
Snippet/small description of the weblink.
Corresponds to the JSON property snippet
21270 21271 21272 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 21270 def snippet @snippet end |
#title ⇒ String
Title of the Weblink.
Corresponds to the JSON property title
21275 21276 21277 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 21275 def title @title end |
#url ⇒ Google::Apis::CloudsearchV1::SafeUrlProto
Message containing a string that is safe to use in URL contexts in DOM APIs
and HTML documents, where the URL context does not refer to a resource that
loads code.
Corresponds to the JSON property url
21282 21283 21284 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 21282 def url @url end |
#url_source ⇒ String
Corresponds to the JSON property urlSource
21287 21288 21289 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 21287 def url_source @url_source end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
21294 21295 21296 21297 21298 21299 21300 21301 21302 21303 21304 21305 21306 21307 21308 21309 21310 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 21294 def update!(**args) @domain = args[:domain] if args.key?(:domain) @gws_url = args[:gws_url] if args.key?(:gws_url) @gws_url_expiration_timestamp = args[:gws_url_expiration_timestamp] if args.key?(:gws_url_expiration_timestamp) @image_height = args[:image_height] if args.key?(:image_height) @image_url = args[:image_url] if args.key?(:image_url) @image_width = args[:image_width] if args.key?(:image_width) @int_image_height = args[:int_image_height] if args.key?(:int_image_height) @int_image_width = args[:int_image_width] if args.key?(:int_image_width) @mime_type = args[:mime_type] if args.key?(:mime_type) @redirect_url = args[:redirect_url] if args.key?(:redirect_url) @should_not_render = args[:should_not_render] if args.key?(:should_not_render) @snippet = args[:snippet] if args.key?(:snippet) @title = args[:title] if args.key?(:title) @url = args[:url] if args.key?(:url) @url_source = args[:url_source] if args.key?(:url_source) end |