# 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.Activity do
  @moduledoc """
  An *activity* resource contains information about an action that a particular channel, or user, has taken on YouTube.The actions reported in activity feeds include rating a video, sharing a video, marking a video as a favorite, commenting on a video, uploading a video, and so forth. Each activity resource identifies the type of action, the channel associated with the action, and the resource(s) associated with the action, such as the video that was rated or uploaded.

  ## Attributes

  *   `contentDetails` (*type:* `GoogleApi.YouTube.V3.Model.ActivityContentDetails.t`, *default:* `nil`) - The contentDetails object contains information about the content associated with the activity. For example, if the snippet.type value is videoRated, then the contentDetails object's content identifies the rated video.
  *   `etag` (*type:* `String.t`, *default:* `nil`) - Etag of this resource
  *   `id` (*type:* `String.t`, *default:* `nil`) - The ID that YouTube uses to uniquely identify the activity.
  *   `kind` (*type:* `String.t`, *default:* `youtube#activity`) - Identifies what kind of resource this is. Value: the fixed string "youtube#activity".
  *   `snippet` (*type:* `GoogleApi.YouTube.V3.Model.ActivitySnippet.t`, *default:* `nil`) - The snippet object contains basic details about the activity, including the activity's type and group ID.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :contentDetails => GoogleApi.YouTube.V3.Model.ActivityContentDetails.t() | nil,
          :etag => String.t() | nil,
          :id => String.t() | nil,
          :kind => String.t() | nil,
          :snippet => GoogleApi.YouTube.V3.Model.ActivitySnippet.t() | nil
        }

  field(:contentDetails, as: GoogleApi.YouTube.V3.Model.ActivityContentDetails)
  field(:etag)
  field(:id)
  field(:kind)
  field(:snippet, as: GoogleApi.YouTube.V3.Model.ActivitySnippet)
end

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

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