# 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.SuperChatEventSnippet do
  @moduledoc """


  ## Attributes

  *   `amountMicros` (*type:* `String.t`, *default:* `nil`) - The purchase amount, in micros of the purchase currency. e.g., 1 is represented as 1000000.
  *   `channelId` (*type:* `String.t`, *default:* `nil`) - Channel id where the event occurred.
  *   `commentText` (*type:* `String.t`, *default:* `nil`) - The text contents of the comment left by the user.
  *   `createdAt` (*type:* `DateTime.t`, *default:* `nil`) - The date and time when the event occurred.
  *   `currency` (*type:* `String.t`, *default:* `nil`) - The currency in which the purchase was made. ISO 4217.
  *   `displayString` (*type:* `String.t`, *default:* `nil`) - A rendered string that displays the purchase amount and currency (e.g., "$1.00"). The string is rendered for the given language.
  *   `isSuperStickerEvent` (*type:* `boolean()`, *default:* `nil`) - True if this event is a Super Sticker event.
  *   `messageType` (*type:* `integer()`, *default:* `nil`) - The tier for the paid message, which is based on the amount of money spent to purchase the message.
  *   `superStickerMetadata` (*type:* `GoogleApi.YouTube.V3.Model.SuperStickerMetadata.t`, *default:* `nil`) - If this event is a Super Sticker event, this field will contain metadata about the Super Sticker.
  *   `supporterDetails` (*type:* `GoogleApi.YouTube.V3.Model.ChannelProfileDetails.t`, *default:* `nil`) - Details about the supporter.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :amountMicros => String.t() | nil,
          :channelId => String.t() | nil,
          :commentText => String.t() | nil,
          :createdAt => DateTime.t() | nil,
          :currency => String.t() | nil,
          :displayString => String.t() | nil,
          :isSuperStickerEvent => boolean() | nil,
          :messageType => integer() | nil,
          :superStickerMetadata => GoogleApi.YouTube.V3.Model.SuperStickerMetadata.t() | nil,
          :supporterDetails => GoogleApi.YouTube.V3.Model.ChannelProfileDetails.t() | nil
        }

  field(:amountMicros)
  field(:channelId)
  field(:commentText)
  field(:createdAt, as: DateTime)
  field(:currency)
  field(:displayString)
  field(:isSuperStickerEvent)
  field(:messageType)
  field(:superStickerMetadata, as: GoogleApi.YouTube.V3.Model.SuperStickerMetadata)
  field(:supporterDetails, as: GoogleApi.YouTube.V3.Model.ChannelProfileDetails)
end

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

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