lib/spatio/model/update_draft_request.ex

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

defmodule Spatio.Model.UpdateDraftRequest do
  @moduledoc """
  Partial update — every field optional.
  """

  @derive JSON.Encoder
  defstruct [
    :accountId,
    :to,
    :cc,
    :bcc,
    :subject,
    :body,
    :html,
    :attachments
  ]

  @type t :: %__MODULE__{
    :accountId => String.t | nil,
    :to => [String.t] | nil,
    :cc => [String.t] | nil,
    :bcc => [String.t] | nil,
    :subject => String.t | nil,
    :body => String.t | nil,
    :html => boolean() | nil,
    :attachments => [Spatio.Model.AttachmentInput.t] | nil
  }

  alias Spatio.Deserializer

  def decode(value) do
    value
     |> Deserializer.deserialize(:attachments, :list, Spatio.Model.AttachmentInput)
  end
end