# 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.PlusDomains.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.PlusDomains.V1.Model.ActivityObjectAttachmentsEmbed.t`, *default:* `nil`) - If the attachment is a video, the embeddable link.
  *   `fullImage` (*type:* `GoogleApi.PlusDomains.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.PlusDomains.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.
  *   `previewThumbnails` (*type:* `list(GoogleApi.PlusDomains.V1.Model.ActivityObjectAttachmentsPreviewThumbnails.t)`, *default:* `nil`) - 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.
  *   `thumbnails` (*type:* `list(GoogleApi.PlusDomains.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.PlusDomains.V1.Model.ActivityObjectAttachmentsEmbed.t(),
          :fullImage => GoogleApi.PlusDomains.V1.Model.ActivityObjectAttachmentsFullImage.t(),
          :id => String.t(),
          :image => GoogleApi.PlusDomains.V1.Model.ActivityObjectAttachmentsImage.t(),
          :objectType => String.t(),
          :previewThumbnails =>
            list(GoogleApi.PlusDomains.V1.Model.ActivityObjectAttachmentsPreviewThumbnails.t()),
          :thumbnails =>
            list(GoogleApi.PlusDomains.V1.Model.ActivityObjectAttachmentsThumbnails.t()),
          :url => String.t()
        }

  field(:content)
  field(:displayName)
  field(:embed, as: GoogleApi.PlusDomains.V1.Model.ActivityObjectAttachmentsEmbed)
  field(:fullImage, as: GoogleApi.PlusDomains.V1.Model.ActivityObjectAttachmentsFullImage)
  field(:id)
  field(:image, as: GoogleApi.PlusDomains.V1.Model.ActivityObjectAttachmentsImage)
  field(:objectType)

  field(
    :previewThumbnails,
    as: GoogleApi.PlusDomains.V1.Model.ActivityObjectAttachmentsPreviewThumbnails,
    type: :list
  )

  field(
    :thumbnails,
    as: GoogleApi.PlusDomains.V1.Model.ActivityObjectAttachmentsThumbnails,
    type: :list
  )

  field(:url)
end

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

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