lib/chat_kitty/model/notification_resource.ex

# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://openapi-generator.tech
# Do not edit the class manually.

defmodule ChatKitty.Model.NotificationResource do
  @moduledoc """
  
  """

  @derive [Poison.Encoder]
  defstruct [
    :"id",
    :"body",
    :"channel",
    :"createdTime",
    :"data",
    :"muted",
    :"readTime",
    :"title",
    :"_links"
  ]

  @type t :: %__MODULE__{
    :"id" => integer(),
    :"body" => String.t,
    :"channel" => ChatKitty.Model.NotificationResourceChannel.t | nil,
    :"createdTime" => DateTime.t,
    :"data" => ChatKitty.Model.NotificationData.t,
    :"muted" => boolean(),
    :"readTime" => DateTime.t | nil,
    :"title" => String.t,
    :"_links" => %{optional(String.t) => ChatKitty.Model.Link.t} | nil
  }
end

defimpl Poison.Decoder, for: ChatKitty.Model.NotificationResource do
  import ChatKitty.Deserializer
  def decode(value, options) do
    value
    |> deserialize(:"channel", :struct, ChatKitty.Model.NotificationResourceChannel, options)
    |> deserialize(:"data", :struct, ChatKitty.Model.NotificationData, options)
    |> deserialize(:"_links", :map, ChatKitty.Model.Link, options)
  end
end