# 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.Channel do
  @moduledoc """
  A *channel* resource contains information about a YouTube channel.

  ## Attributes

  *   `auditDetails` (*type:* `GoogleApi.YouTube.V3.Model.ChannelAuditDetails.t`, *default:* `nil`) - The auditionDetails object encapsulates channel data that is relevant for YouTube Partners during the audition process.
  *   `brandingSettings` (*type:* `GoogleApi.YouTube.V3.Model.ChannelBrandingSettings.t`, *default:* `nil`) - The brandingSettings object encapsulates information about the branding of the channel.
  *   `contentDetails` (*type:* `GoogleApi.YouTube.V3.Model.ChannelContentDetails.t`, *default:* `nil`) - The contentDetails object encapsulates information about the channel's content.
  *   `contentOwnerDetails` (*type:* `GoogleApi.YouTube.V3.Model.ChannelContentOwnerDetails.t`, *default:* `nil`) - The contentOwnerDetails object encapsulates channel data that is relevant for YouTube Partners linked with the channel.
  *   `conversionPings` (*type:* `GoogleApi.YouTube.V3.Model.ChannelConversionPings.t`, *default:* `nil`) - The conversionPings object encapsulates information about conversion pings that need to be respected by the channel.
  *   `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 channel.
  *   `kind` (*type:* `String.t`, *default:* `youtube#channel`) - Identifies what kind of resource this is. Value: the fixed string "youtube#channel".
  *   `localizations` (*type:* `%{optional(String.t) => GoogleApi.YouTube.V3.Model.ChannelLocalization.t}`, *default:* `nil`) - Localizations for different languages
  *   `snippet` (*type:* `GoogleApi.YouTube.V3.Model.ChannelSnippet.t`, *default:* `nil`) - The snippet object contains basic details about the channel, such as its title, description, and thumbnail images.
  *   `statistics` (*type:* `GoogleApi.YouTube.V3.Model.ChannelStatistics.t`, *default:* `nil`) - The statistics object encapsulates statistics for the channel.
  *   `status` (*type:* `GoogleApi.YouTube.V3.Model.ChannelStatus.t`, *default:* `nil`) - The status object encapsulates information about the privacy status of the channel.
  *   `topicDetails` (*type:* `GoogleApi.YouTube.V3.Model.ChannelTopicDetails.t`, *default:* `nil`) - The topicDetails object encapsulates information about Freebase topics associated with the channel.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :auditDetails => GoogleApi.YouTube.V3.Model.ChannelAuditDetails.t() | nil,
          :brandingSettings => GoogleApi.YouTube.V3.Model.ChannelBrandingSettings.t() | nil,
          :contentDetails => GoogleApi.YouTube.V3.Model.ChannelContentDetails.t() | nil,
          :contentOwnerDetails => GoogleApi.YouTube.V3.Model.ChannelContentOwnerDetails.t() | nil,
          :conversionPings => GoogleApi.YouTube.V3.Model.ChannelConversionPings.t() | nil,
          :etag => String.t() | nil,
          :id => String.t() | nil,
          :kind => String.t() | nil,
          :localizations =>
            %{optional(String.t()) => GoogleApi.YouTube.V3.Model.ChannelLocalization.t()} | nil,
          :snippet => GoogleApi.YouTube.V3.Model.ChannelSnippet.t() | nil,
          :statistics => GoogleApi.YouTube.V3.Model.ChannelStatistics.t() | nil,
          :status => GoogleApi.YouTube.V3.Model.ChannelStatus.t() | nil,
          :topicDetails => GoogleApi.YouTube.V3.Model.ChannelTopicDetails.t() | nil
        }

  field(:auditDetails, as: GoogleApi.YouTube.V3.Model.ChannelAuditDetails)
  field(:brandingSettings, as: GoogleApi.YouTube.V3.Model.ChannelBrandingSettings)
  field(:contentDetails, as: GoogleApi.YouTube.V3.Model.ChannelContentDetails)
  field(:contentOwnerDetails, as: GoogleApi.YouTube.V3.Model.ChannelContentOwnerDetails)
  field(:conversionPings, as: GoogleApi.YouTube.V3.Model.ChannelConversionPings)
  field(:etag)
  field(:id)
  field(:kind)
  field(:localizations, as: GoogleApi.YouTube.V3.Model.ChannelLocalization, type: :map)
  field(:snippet, as: GoogleApi.YouTube.V3.Model.ChannelSnippet)
  field(:statistics, as: GoogleApi.YouTube.V3.Model.ChannelStatistics)
  field(:status, as: GoogleApi.YouTube.V3.Model.ChannelStatus)
  field(:topicDetails, as: GoogleApi.YouTube.V3.Model.ChannelTopicDetails)
end

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

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