# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Plus.V1.Model.ActivityObjectAttachments do
  @moduledoc """


  ## Attributes

  *   `content` (*type:* `String.t`, *default:* `nil`) - If the attachment is an article, this property contains a snippet of text from the article. It can also include descriptions for other types.
  *   `displayName` (*type:* `String.t`, *default:* `nil`) - The title of the attachment, such as a photo caption or an article title.
  *   `embed` (*type:* `GoogleApi.Plus.V1.Model.ActivityObjectAttachmentsEmbed.t`, *default:* `nil`) - If the attachment is a video, the embeddable link.
  *   `fullImage` (*type:* `GoogleApi.Plus.V1.Model.ActivityObjectAttachmentsFullImage.t`, *default:* `nil`) - The full image URL for photo attachments.
  *   `id` (*type:* `String.t`, *default:* `nil`) - The ID of the attachment.
  *   `image` (*type:* `GoogleApi.Plus.V1.Model.ActivityObjectAttachmentsImage.t`, *default:* `nil`) - The preview image for photos or videos.
  *   `objectType` (*type:* `String.t`, *default:* `nil`) - 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.
  *   `thumbnails` (*type:* `list(GoogleApi.Plus.V1.Model.ActivityObjectAttachmentsThumbnails.t)`, *default:* `nil`) - If the attachment is an album, this property is a list of potential additional thumbnails from the album.
  *   `url` (*type:* `String.t`, *default:* `nil`) - The link to the attachment, which should be of type text/html.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :content => String.t(),
          :displayName => String.t(),
          :embed => GoogleApi.Plus.V1.Model.ActivityObjectAttachmentsEmbed.t(),
          :fullImage => GoogleApi.Plus.V1.Model.ActivityObjectAttachmentsFullImage.t(),
          :id => String.t(),
          :image => GoogleApi.Plus.V1.Model.ActivityObjectAttachmentsImage.t(),
          :objectType => String.t(),
          :thumbnails => list(GoogleApi.Plus.V1.Model.ActivityObjectAttachmentsThumbnails.t()),
          :url => String.t()
        }

  field(:content)
  field(:displayName)
  field(:embed, as: GoogleApi.Plus.V1.Model.ActivityObjectAttachmentsEmbed)
  field(:fullImage, as: GoogleApi.Plus.V1.Model.ActivityObjectAttachmentsFullImage)
  field(:id)
  field(:image, as: GoogleApi.Plus.V1.Model.ActivityObjectAttachmentsImage)
  field(:objectType)
  field(:thumbnails, as: GoogleApi.Plus.V1.Model.ActivityObjectAttachmentsThumbnails, type: :list)
  field(:url)
end

defimpl Poison.Decoder, for: GoogleApi.Plus.V1.Model.ActivityObjectAttachments do
  def decode(value, options) do
    GoogleApi.Plus.V1.Model.ActivityObjectAttachments.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Plus.V1.Model.ActivityObjectAttachments do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
