# 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.LiveBroadcastSnippet do
  @moduledoc """
  Basic broadcast information.

  ## Attributes

  *   `actualEndTime` (*type:* `DateTime.t`, *default:* `nil`) - The date and time that the broadcast actually ended. This information is only available once the broadcast's state is complete.
  *   `actualStartTime` (*type:* `DateTime.t`, *default:* `nil`) - The date and time that the broadcast actually started. This information is only available once the broadcast's state is live.
  *   `channelId` (*type:* `String.t`, *default:* `nil`) - The ID that YouTube uses to uniquely identify the channel that is publishing the broadcast.
  *   `description` (*type:* `String.t`, *default:* `nil`) - The broadcast's description. As with the title, you can set this field by modifying the broadcast resource or by setting the description field of the corresponding video resource.
  *   `isDefaultBroadcast` (*type:* `boolean()`, *default:* `nil`) - Indicates whether this broadcast is the default broadcast. Internal only.
  *   `liveChatId` (*type:* `String.t`, *default:* `nil`) - The id of the live chat for this broadcast.
  *   `publishedAt` (*type:* `DateTime.t`, *default:* `nil`) - The date and time that the broadcast was added to YouTube's live broadcast schedule.
  *   `scheduledEndTime` (*type:* `DateTime.t`, *default:* `nil`) - The date and time that the broadcast is scheduled to end.
  *   `scheduledStartTime` (*type:* `DateTime.t`, *default:* `nil`) - The date and time that the broadcast is scheduled to start.
  *   `thumbnails` (*type:* `GoogleApi.YouTube.V3.Model.ThumbnailDetails.t`, *default:* `nil`) - A map of thumbnail images associated with the broadcast. For each nested object in this object, the key is the name of the thumbnail image, and the value is an object that contains other information about the thumbnail.
  *   `title` (*type:* `String.t`, *default:* `nil`) - The broadcast's title. Note that the broadcast represents exactly one YouTube video. You can set this field by modifying the broadcast resource or by setting the title field of the corresponding video resource.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :actualEndTime => DateTime.t() | nil,
          :actualStartTime => DateTime.t() | nil,
          :channelId => String.t() | nil,
          :description => String.t() | nil,
          :isDefaultBroadcast => boolean() | nil,
          :liveChatId => String.t() | nil,
          :publishedAt => DateTime.t() | nil,
          :scheduledEndTime => DateTime.t() | nil,
          :scheduledStartTime => DateTime.t() | nil,
          :thumbnails => GoogleApi.YouTube.V3.Model.ThumbnailDetails.t() | nil,
          :title => String.t() | nil
        }

  field(:actualEndTime, as: DateTime)
  field(:actualStartTime, as: DateTime)
  field(:channelId)
  field(:description)
  field(:isDefaultBroadcast)
  field(:liveChatId)
  field(:publishedAt, as: DateTime)
  field(:scheduledEndTime, as: DateTime)
  field(:scheduledStartTime, as: DateTime)
  field(:thumbnails, as: GoogleApi.YouTube.V3.Model.ThumbnailDetails)
  field(:title)
end

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

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