# NOTE: This class is auto generated by OpenAPI Generator (
# Do not edit the class manually.

defmodule MailSlurpAPI.Model.PageEmailPreview do
  @moduledoc """
  Paginated email preview results. EmailProjections and EmailPreviews are essentially the same but have legacy naming issues. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls. For emails there are several methods for fetching message bodies and attachments.

  @derive [Poison.Encoder]
  defstruct [

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

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