Current section
Files
Jump to
Current section
Files
lib/voxbone/model/attachment.ex
# NOTE: This class is auto generated by the swagger code generator program.
# https://github.com/swagger-api/swagger-codegen.git
# Do not edit the class manually.
defmodule Voxbone.Model.Attachment do
@moduledoc """
"""
@derive [Poison.Encoder]
defstruct [
:headers,
:object,
:dataHandler,
:contentDisposition,
:contentId,
:contentType
]
@type t :: %__MODULE__{
:headers => %{optional(String.t()) => [String.t()]},
:object => Object,
:dataHandler => DataHandler,
:contentDisposition => ContentDisposition,
:contentId => String.t(),
:contentType => MediaType
}
end
defimpl Poison.Decoder, for: Voxbone.Model.Attachment do
import Voxbone.Deserializer
def decode(value, options) do
value
|> deserialize(:object, :struct, Voxbone.Model.Object, options)
|> deserialize(:dataHandler, :struct, Voxbone.Model.DataHandler, options)
|> deserialize(:contentDisposition, :struct, Voxbone.Model.ContentDisposition, options)
|> deserialize(:contentType, :struct, Voxbone.Model.MediaType, options)
end
end