Class: Google::Apis::PlusV1::Activity::Object::Attachment

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

Defined Under Namespace

Classes: Embed, FullImage, Image, 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.



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

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)


568
569
570
# File 'generated/google/apis/plus_v1/classes.rb', line 568

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)


573
574
575
# File 'generated/google/apis/plus_v1/classes.rb', line 573

def display_name
  @display_name
end

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

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



578
579
580
# File 'generated/google/apis/plus_v1/classes.rb', line 578

def embed
  @embed
end

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

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



583
584
585
# File 'generated/google/apis/plus_v1/classes.rb', line 583

def full_image
  @full_image
end

#idString

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

Returns:

  • (String)


588
589
590
# File 'generated/google/apis/plus_v1/classes.rb', line 588

def id
  @id
end

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

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



593
594
595
# File 'generated/google/apis/plus_v1/classes.rb', line 593

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)


603
604
605
# File 'generated/google/apis/plus_v1/classes.rb', line 603

def object_type
  @object_type
end

#thumbnailsArray<Google::Apis::PlusV1::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



609
610
611
# File 'generated/google/apis/plus_v1/classes.rb', line 609

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)


614
615
616
# File 'generated/google/apis/plus_v1/classes.rb', line 614

def url
  @url
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



621
622
623
624
625
626
627
628
629
630
631
# File 'generated/google/apis/plus_v1/classes.rb', line 621

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)
  @thumbnails = args[:thumbnails] if args.key?(:thumbnails)
  @url = args[:url] if args.key?(:url)
end