Class: Google::Apis::PlusDomainsV1::Activity::Object::Attachment

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

Defined Under Namespace

Classes: Embed, FullImage, Image, PreviewThumbnail, Thumbnail

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) ⇒ Attachment

Returns a new instance of Attachment



636
637
638
# File 'generated/google/apis/plus_domains_v1/classes.rb', line 636

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

Instance Attribute Details

#contentString

If the attachment is an article, this property contains a snippet of text from the article. It can also include descriptions for other types. Corresponds to the JSON property content

Returns:

  • (String)


581
582
583
# File 'generated/google/apis/plus_domains_v1/classes.rb', line 581

def content
  @content
end

#display_nameString

The title of the attachment, such as a photo caption or an article title. Corresponds to the JSON property displayName

Returns:

  • (String)


586
587
588
# File 'generated/google/apis/plus_domains_v1/classes.rb', line 586

def display_name
  @display_name
end

#embedGoogle::Apis::PlusDomainsV1::Activity::Object::Attachment::Embed

If the attachment is a video, the embeddable link. Corresponds to the JSON property embed



591
592
593
# File 'generated/google/apis/plus_domains_v1/classes.rb', line 591

def embed
  @embed
end

#full_imageGoogle::Apis::PlusDomainsV1::Activity::Object::Attachment::FullImage

The full image URL for photo attachments. Corresponds to the JSON property fullImage



596
597
598
# File 'generated/google/apis/plus_domains_v1/classes.rb', line 596

def full_image
  @full_image
end

#idString

The ID of the attachment. Corresponds to the JSON property id

Returns:

  • (String)


601
602
603
# File 'generated/google/apis/plus_domains_v1/classes.rb', line 601

def id
  @id
end

#imageGoogle::Apis::PlusDomainsV1::Activity::Object::Attachment::Image

The preview image for photos or videos. Corresponds to the JSON property image



606
607
608
# File 'generated/google/apis/plus_domains_v1/classes.rb', line 606

def image
  @image
end

#object_typeString

The type of media object. Possible values include, but are not limited to, the following values:

  • "photo" - A photo.
  • "album" - A photo album.
  • "video" - A video.
  • "article" - An article, specified by a link. Corresponds to the JSON property objectType

Returns:

  • (String)


616
617
618
# File 'generated/google/apis/plus_domains_v1/classes.rb', line 616

def object_type
  @object_type
end

#preview_thumbnailsArray<Google::Apis::PlusDomainsV1::Activity::Object::Attachment::PreviewThumbnail>

When previewing, these are the optional thumbnails for the post. When posting an article, choose one by setting the attachment.image.url property. If you don't choose one, one will be chosen for you. Corresponds to the JSON property previewThumbnails



623
624
625
# File 'generated/google/apis/plus_domains_v1/classes.rb', line 623

def preview_thumbnails
  @preview_thumbnails
end

#thumbnailsArray<Google::Apis::PlusDomainsV1::Activity::Object::Attachment::Thumbnail>

If the attachment is an album, this property is a list of potential additional thumbnails from the album. Corresponds to the JSON property thumbnails



629
630
631
# File 'generated/google/apis/plus_domains_v1/classes.rb', line 629

def thumbnails
  @thumbnails
end

#urlString

The link to the attachment, which should be of type text/html. Corresponds to the JSON property url

Returns:

  • (String)


634
635
636
# File 'generated/google/apis/plus_domains_v1/classes.rb', line 634

def url
  @url
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



641
642
643
644
645
646
647
648
649
650
651
652
# File 'generated/google/apis/plus_domains_v1/classes.rb', line 641

def update!(**args)
  @content = args[:content] if args.key?(:content)
  @display_name = args[:display_name] if args.key?(:display_name)
  @embed = args[:embed] if args.key?(:embed)
  @full_image = args[:full_image] if args.key?(:full_image)
  @id = args[:id] if args.key?(:id)
  @image = args[:image] if args.key?(:image)
  @object_type = args[:object_type] if args.key?(:object_type)
  @preview_thumbnails = args[:preview_thumbnails] if args.key?(:preview_thumbnails)
  @thumbnails = args[:thumbnails] if args.key?(:thumbnails)
  @url = args[:url] if args.key?(:url)
end