Class: Google::Apis::CloudsearchV1::UrlMetadata

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ UrlMetadata

Returns a new instance of UrlMetadata.



17374
17375
17376
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 17374

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

Instance Attribute Details

#domainString

Domain for this url. If it's an IP address the address is returned. Corresponds to the JSON property domain

Returns:

  • (String)


17288
17289
17290
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 17288

def domain
  @domain
end

#gws_urlGoogle::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



17295
17296
17297
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 17295

def gws_url
  @gws_url
end

#gws_url_expiration_timestampFixnum

The expiration timestamp for GWS URL, only set when gws_url is set. Corresponds to the JSON property gwsUrlExpirationTimestamp

Returns:

  • (Fixnum)


17300
17301
17302
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 17300

def gws_url_expiration_timestamp
  @gws_url_expiration_timestamp
end

#image_heightString

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

Returns:

  • (String)


17306
17307
17308
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 17306

def image_height
  @image_height
end

#image_urlString

Representative image of the website. Corresponds to the JSON property imageUrl

Returns:

  • (String)


17311
17312
17313
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 17311

def image_url
  @image_url
end

#image_widthString

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

Returns:

  • (String)


17317
17318
17319
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 17317

def image_width
  @image_width
end

#int_image_heightFixnum

Dimensions of the image: height. Corresponds to the JSON property intImageHeight

Returns:

  • (Fixnum)


17322
17323
17324
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 17322

def int_image_height
  @int_image_height
end

#int_image_widthFixnum

Dimensions of the image: width. Corresponds to the JSON property intImageWidth

Returns:

  • (Fixnum)


17327
17328
17329
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 17327

def int_image_width
  @int_image_width
end

#mime_typeString

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

Returns:

  • (String)


17336
17337
17338
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 17336

def mime_type
  @mime_type
end

#redirect_urlGoogle::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



17343
17344
17345
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 17343

def redirect_url
  @redirect_url
end

#should_not_renderBoolean 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

Returns:

  • (Boolean)


17349
17350
17351
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 17349

def should_not_render
  @should_not_render
end

#snippetString

Snippet/small description of the weblink. Corresponds to the JSON property snippet

Returns:

  • (String)


17355
17356
17357
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 17355

def snippet
  @snippet
end

#titleString

Title of the Weblink. Corresponds to the JSON property title

Returns:

  • (String)


17360
17361
17362
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 17360

def title
  @title
end

#urlGoogle::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



17367
17368
17369
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 17367

def url
  @url
end

#url_sourceString

NEXT TAG : 17 Corresponds to the JSON property urlSource

Returns:

  • (String)


17372
17373
17374
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 17372

def url_source
  @url_source
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



17379
17380
17381
17382
17383
17384
17385
17386
17387
17388
17389
17390
17391
17392
17393
17394
17395
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 17379

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