lib/mail_slurp_api/model/page_sent_email_projection.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 MailSlurpAPI.Model.PageSentEmailProjection do
  @moduledoc """
  Paginated sent email results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full sent email entity use the projection ID with individual method calls.
  """

  @derive [Poison.Encoder]
  defstruct [
    :"content",
    :"pageable",
    :"total",
    :"size",
    :"number",
    :"numberOfElements",
    :"totalElements",
    :"totalPages",
    :"last",
    :"sort",
    :"first",
    :"empty"
  ]

  @type t :: %__MODULE__{
    :"content" => [SentEmailProjection],
    :"pageable" => PageableObject | nil,
    :"total" => integer() | nil,
    :"size" => integer(),
    :"number" => integer(),
    :"numberOfElements" => integer(),
    :"totalElements" => integer(),
    :"totalPages" => integer(),
    :"last" => boolean() | nil,
    :"sort" => Sort | nil,
    :"first" => boolean() | nil,
    :"empty" => boolean() | nil
  }
end

defimpl Poison.Decoder, for: MailSlurpAPI.Model.PageSentEmailProjection do
  import MailSlurpAPI.Deserializer
  def decode(value, options) do
    value
    |> deserialize(:"content", :list, MailSlurpAPI.Model.SentEmailProjection, options)
    |> deserialize(:"pageable", :struct, MailSlurpAPI.Model.PageableObject, options)
    |> deserialize(:"sort", :struct, MailSlurpAPI.Model.Sort, options)
  end
end