# 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.YouTube.V3.Model.ActivityContentDetails do
  @moduledoc """
  Details about the content of an activity: the video that was shared, the channel that was subscribed to, etc.

  ## Attributes

  *   `bulletin` (*type:* `GoogleApi.YouTube.V3.Model.ActivityContentDetailsBulletin.t`, *default:* `nil`) - The bulletin object contains details about a channel bulletin post. This object is only present if the snippet.type is bulletin.
  *   `channelItem` (*type:* `GoogleApi.YouTube.V3.Model.ActivityContentDetailsChannelItem.t`, *default:* `nil`) - The channelItem object contains details about a resource which was added to a channel. This property is only present if the snippet.type is channelItem.
  *   `comment` (*type:* `GoogleApi.YouTube.V3.Model.ActivityContentDetailsComment.t`, *default:* `nil`) - The comment object contains information about a resource that received a comment. This property is only present if the snippet.type is comment.
  *   `favorite` (*type:* `GoogleApi.YouTube.V3.Model.ActivityContentDetailsFavorite.t`, *default:* `nil`) - The favorite object contains information about a video that was marked as a favorite video. This property is only present if the snippet.type is favorite.
  *   `like` (*type:* `GoogleApi.YouTube.V3.Model.ActivityContentDetailsLike.t`, *default:* `nil`) - The like object contains information about a resource that received a positive (like) rating. This property is only present if the snippet.type is like.
  *   `playlistItem` (*type:* `GoogleApi.YouTube.V3.Model.ActivityContentDetailsPlaylistItem.t`, *default:* `nil`) - The playlistItem object contains information about a new playlist item. This property is only present if the snippet.type is playlistItem.
  *   `promotedItem` (*type:* `GoogleApi.YouTube.V3.Model.ActivityContentDetailsPromotedItem.t`, *default:* `nil`) - The promotedItem object contains details about a resource which is being promoted. This property is only present if the snippet.type is promotedItem.
  *   `recommendation` (*type:* `GoogleApi.YouTube.V3.Model.ActivityContentDetailsRecommendation.t`, *default:* `nil`) - The recommendation object contains information about a recommended resource. This property is only present if the snippet.type is recommendation.
  *   `social` (*type:* `GoogleApi.YouTube.V3.Model.ActivityContentDetailsSocial.t`, *default:* `nil`) - The social object contains details about a social network post. This property is only present if the snippet.type is social.
  *   `subscription` (*type:* `GoogleApi.YouTube.V3.Model.ActivityContentDetailsSubscription.t`, *default:* `nil`) - The subscription object contains information about a channel that a user subscribed to. This property is only present if the snippet.type is subscription.
  *   `upload` (*type:* `GoogleApi.YouTube.V3.Model.ActivityContentDetailsUpload.t`, *default:* `nil`) - The upload object contains information about the uploaded video. This property is only present if the snippet.type is upload.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :bulletin => GoogleApi.YouTube.V3.Model.ActivityContentDetailsBulletin.t() | nil,
          :channelItem => GoogleApi.YouTube.V3.Model.ActivityContentDetailsChannelItem.t() | nil,
          :comment => GoogleApi.YouTube.V3.Model.ActivityContentDetailsComment.t() | nil,
          :favorite => GoogleApi.YouTube.V3.Model.ActivityContentDetailsFavorite.t() | nil,
          :like => GoogleApi.YouTube.V3.Model.ActivityContentDetailsLike.t() | nil,
          :playlistItem =>
            GoogleApi.YouTube.V3.Model.ActivityContentDetailsPlaylistItem.t() | nil,
          :promotedItem =>
            GoogleApi.YouTube.V3.Model.ActivityContentDetailsPromotedItem.t() | nil,
          :recommendation =>
            GoogleApi.YouTube.V3.Model.ActivityContentDetailsRecommendation.t() | nil,
          :social => GoogleApi.YouTube.V3.Model.ActivityContentDetailsSocial.t() | nil,
          :subscription =>
            GoogleApi.YouTube.V3.Model.ActivityContentDetailsSubscription.t() | nil,
          :upload => GoogleApi.YouTube.V3.Model.ActivityContentDetailsUpload.t() | nil
        }

  field(:bulletin, as: GoogleApi.YouTube.V3.Model.ActivityContentDetailsBulletin)
  field(:channelItem, as: GoogleApi.YouTube.V3.Model.ActivityContentDetailsChannelItem)
  field(:comment, as: GoogleApi.YouTube.V3.Model.ActivityContentDetailsComment)
  field(:favorite, as: GoogleApi.YouTube.V3.Model.ActivityContentDetailsFavorite)
  field(:like, as: GoogleApi.YouTube.V3.Model.ActivityContentDetailsLike)
  field(:playlistItem, as: GoogleApi.YouTube.V3.Model.ActivityContentDetailsPlaylistItem)
  field(:promotedItem, as: GoogleApi.YouTube.V3.Model.ActivityContentDetailsPromotedItem)
  field(:recommendation, as: GoogleApi.YouTube.V3.Model.ActivityContentDetailsRecommendation)
  field(:social, as: GoogleApi.YouTube.V3.Model.ActivityContentDetailsSocial)
  field(:subscription, as: GoogleApi.YouTube.V3.Model.ActivityContentDetailsSubscription)
  field(:upload, as: GoogleApi.YouTube.V3.Model.ActivityContentDetailsUpload)
end

defimpl Poison.Decoder, for: GoogleApi.YouTube.V3.Model.ActivityContentDetails do
  def decode(value, options) do
    GoogleApi.YouTube.V3.Model.ActivityContentDetails.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.YouTube.V3.Model.ActivityContentDetails do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
