Packages

This is a Swagger Codegen generated library for the Asterisk RESTful Interface (ARI). This is maintained by the Open Source Telephony Integration Project as a dependency for it's projects.

Current section

Files

Jump to
ostip_exari lib swagger client model channel.ex
Raw

lib/swagger/client/model/channel.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 Swagger.Client.Model.Channel do
@moduledoc """
A specific communication connection between Asterisk and an Endpoint.
"""
@derive [Poison.Encoder]
defstruct [
:"id",
:"name",
:"state",
:"caller",
:"connected",
:"accountcode",
:"dialplan",
:"creationtime",
:"language"
]
@type t :: %__MODULE__{
:"id" => String.t,
:"name" => String.t,
:"state" => String.t,
:"caller" => CallerId,
:"connected" => CallerId,
:"accountcode" => String.t,
:"dialplan" => DialplanCep,
:"creationtime" => DateTime,
:"language" => String.t
}
end
defimpl Poison.Decoder, for: Swagger.Client.Model.Channel do
import Swagger.Client.Deserializer
def decode(value, options) do
value
|> deserialize(:"caller", :struct, Swagger.Client.Model.CallerId, options)
|> deserialize(:"connected", :struct, Swagger.Client.Model.CallerId, options)
|> deserialize(:"dialplan", :struct, Swagger.Client.Model.DialplanCep, options)
end
end