# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
# https://openapi-generator.tech
# Do not edit the class manually.
defmodule NomadClient.Model.CsiVolume do
@moduledoc """
"""
@derive [Poison.Encoder]
defstruct [
:ID,
:Name,
:ExternalID,
:Namespace,
:Topologies,
:AccessMode,
:AttachmentMode,
:MountOptions,
:ReadAllocs,
:WriteAllocs,
:Allocations,
:Schedulable,
:PluginID,
:Provider,
:ProviderVersion,
:ControllerRequired,
:ControllersHealthy,
:ControllersExpected,
:NodesHealthy,
:NodesExpected,
:ResourceExhausted,
:CreateIndex,
:ModifyIndex
]
@type t :: %__MODULE__{
:ID => String.t() | nil,
:Name => String.t() | nil,
:ExternalID => String.t() | nil,
:Namespace => String.t() | nil,
:Topologies => [NomadClient.Model.CsiTopology.t()] | nil,
:AccessMode => String.t() | nil,
:AttachmentMode => String.t() | nil,
:MountOptions => NomadClient.Model.CsiMountOptions.t() | nil,
:ReadAllocs => %{optional(String.t()) => NomadClient.Model.Allocation.t()} | nil,
:WriteAllocs => %{optional(String.t()) => NomadClient.Model.Allocation.t()} | nil,
:Allocations => [NomadClient.Model.AllocationListStub.t()] | nil,
:Schedulable => boolean() | nil,
:PluginID => String.t() | nil,
:Provider => String.t() | nil,
:ProviderVersion => String.t() | nil,
:ControllerRequired => boolean() | nil,
:ControllersHealthy => integer() | nil,
:ControllersExpected => integer() | nil,
:NodesHealthy => integer() | nil,
:NodesExpected => integer() | nil,
:ResourceExhausted => DateTime.t() | nil,
:CreateIndex => integer() | nil,
:ModifyIndex => integer() | nil
}
end
defimpl Poison.Decoder, for: NomadClient.Model.CsiVolume do
import NomadClient.Deserializer
def decode(value, options) do
value
|> deserialize(:Topologies, :list, NomadClient.Model.CsiTopology, options)
|> deserialize(:MountOptions, :struct, NomadClient.Model.CsiMountOptions, options)
|> deserialize(:ReadAllocs, :map, NomadClient.Model.Allocation, options)
|> deserialize(:WriteAllocs, :map, NomadClient.Model.Allocation, options)
|> deserialize(:Allocations, :list, NomadClient.Model.AllocationListStub, options)
end
end