lib/mail_slurp_api/model/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.EmailProjection do
  @moduledoc """
  A compact representation of a full email. Used in list endpoints to keep response sizes low. Body and attachments are not included. To get all fields of the email use the `getEmail` method with the email projection's ID. See `EmailDto` for documentation on projection properties.
  """

  @derive [Poison.Encoder]
  defstruct [
    :"id",
    :"from",
    :"subject",
    :"inboxId",
    :"attachments",
    :"to",
    :"bcc",
    :"cc",
    :"createdAt",
    :"teamAccess",
    :"read",
    :"bodyMD5Hash",
    :"bodyExcerpt"
  ]

  @type t :: %__MODULE__{
    :"id" => String.t,
    :"from" => String.t | nil,
    :"subject" => String.t | nil,
    :"inboxId" => String.t,
    :"attachments" => [String.t] | nil,
    :"to" => [String.t],
    :"bcc" => [String.t] | nil,
    :"cc" => [String.t] | nil,
    :"createdAt" => DateTime.t,
    :"teamAccess" => boolean(),
    :"read" => boolean(),
    :"bodyMD5Hash" => String.t | nil,
    :"bodyExcerpt" => String.t | nil
  }
end

defimpl Poison.Decoder, for: MailSlurpAPI.Model.EmailProjection do
  def decode(value, _options) do
    value
  end
end