Class: Google::Apis::CloudsearchV1::LinkData
- Inherits:
-
Object
- Object
- Google::Apis::CloudsearchV1::LinkData
- 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
Link metadata, for LINK segments. Anchor text should be stored in the "text" field of the Segment, which can also serve as a fallback.
Instance Attribute Summary collapse
-
#attachment ⇒ Google::Apis::CloudsearchV1::SocialCommonAttachmentAttachment
An Attachment represents a linked entity associated with a piece of social content.
-
#attachment_render_hint ⇒ String
The hint to use when rendering the associated attachment.
-
#display_url ⇒ String
If we wish to show the user a different (e.g. shortened) version of the URL for display purposes, then that version should be set here.
-
#link_target ⇒ String
link_target is the URL to navigate to when clicked.
-
#link_type ⇒ String
LinkType is an optional field that provides additional information regarding link target.
-
#title ⇒ String
Title is an optional field that provides a short string that describes the link or its destination.
Instance Method Summary collapse
-
#initialize(**args) ⇒ LinkData
constructor
A new instance of LinkData.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ LinkData
Returns a new instance of LinkData.
13204 13205 13206 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 13204 def initialize(**args) update!(**args) end |
Instance Attribute Details
#attachment ⇒ Google::Apis::CloudsearchV1::SocialCommonAttachmentAttachment
An Attachment represents a linked entity associated with a piece of social
content. This may be a 1st-party or 3rd-party entity. In the Papyrus context,
an Attachment is part of a Cent, and sits alongside the main content of the
cent, which is represented as a sequence of Segments. Right now an Attachment
is just a wrapper around an Embed, but we provide the extra layer of
abstraction since, as Embeds move to separate storage in Briefcase, we may
want to add additional fields that are not part of the Embed proper, but that (
for example) relate to the usage of the linked content within the particular
post/cent.
Corresponds to the JSON property attachment
13168 13169 13170 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 13168 def @attachment end |
#attachment_render_hint ⇒ String
The hint to use when rendering the associated attachment. Ignored if there is
no associated attachment.
Corresponds to the JSON property attachmentRenderHint
13174 13175 13176 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 13174 def @attachment_render_hint end |
#display_url ⇒ String
If we wish to show the user a different (e.g. shortened) version of the URL
for display purposes, then that version should be set here. If this field isn'
t set, link_target will be used for both purposes.
Corresponds to the JSON property displayUrl
13181 13182 13183 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 13181 def display_url @display_url end |
#link_target ⇒ String
link_target is the URL to navigate to when clicked. This could be the original
URL, or a URL signed by the GWS URL signing service.
Corresponds to the JSON property linkTarget
13187 13188 13189 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 13187 def link_target @link_target end |
#link_type ⇒ String
LinkType is an optional field that provides additional information regarding
link target. For example, link type can be identified as the SELF_LINK when
the request was executed from the same link as the link target.
Corresponds to the JSON property linkType
13194 13195 13196 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 13194 def link_type @link_type end |
#title ⇒ String
Title is an optional field that provides a short string that describes the
link or its destination. User interfaces often use title as a tooltip or for
accessibility purposes. However, they are of course free to present this data
in any form. This field is plain text.
Corresponds to the JSON property title
13202 13203 13204 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 13202 def title @title end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
13209 13210 13211 13212 13213 13214 13215 13216 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 13209 def update!(**args) @attachment = args[:attachment] if args.key?(:attachment) @attachment_render_hint = args[:attachment_render_hint] if args.key?(:attachment_render_hint) @display_url = args[:display_url] if args.key?(:display_url) @link_target = args[:link_target] if args.key?(:link_target) @link_type = args[:link_type] if args.key?(:link_type) @title = args[:title] if args.key?(:title) end |