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

defmodule DockerEngineAPI.Model.HostConfig do
  @moduledoc """
  Container configuration that depends on the host we are running on
  """

  @derive Jason.Encoder
  defstruct [
    :CpuShares,
    :Memory,
    :CgroupParent,
    :BlkioWeight,
    :BlkioWeightDevice,
    :BlkioDeviceReadBps,
    :BlkioDeviceWriteBps,
    :BlkioDeviceReadIOps,
    :BlkioDeviceWriteIOps,
    :CpuPeriod,
    :CpuQuota,
    :CpuRealtimePeriod,
    :CpuRealtimeRuntime,
    :CpusetCpus,
    :CpusetMems,
    :Devices,
    :DeviceCgroupRules,
    :DeviceRequests,
    :KernelMemoryTCP,
    :MemoryReservation,
    :MemorySwap,
    :MemorySwappiness,
    :NanoCpus,
    :OomKillDisable,
    :Init,
    :PidsLimit,
    :Ulimits,
    :CpuCount,
    :CpuPercent,
    :IOMaximumIOps,
    :IOMaximumBandwidth,
    :Binds,
    :ContainerIDFile,
    :LogConfig,
    :NetworkMode,
    :PortBindings,
    :RestartPolicy,
    :AutoRemove,
    :VolumeDriver,
    :VolumesFrom,
    :Mounts,
    :ConsoleSize,
    :Annotations,
    :CapAdd,
    :CapDrop,
    :CgroupnsMode,
    :Dns,
    :DnsOptions,
    :DnsSearch,
    :ExtraHosts,
    :GroupAdd,
    :IpcMode,
    :Cgroup,
    :Links,
    :OomScoreAdj,
    :PidMode,
    :Privileged,
    :PublishAllPorts,
    :ReadonlyRootfs,
    :SecurityOpt,
    :StorageOpt,
    :Tmpfs,
    :UTSMode,
    :UsernsMode,
    :ShmSize,
    :Sysctls,
    :Runtime,
    :Isolation,
    :MaskedPaths,
    :ReadonlyPaths
  ]

  @type t :: %__MODULE__{
    :CpuShares => integer() | nil,
    :Memory => integer() | nil,
    :CgroupParent => String.t | nil,
    :BlkioWeight => integer() | nil,
    :BlkioWeightDevice => [DockerEngineAPI.Model.ResourcesBlkioWeightDeviceInner.t] | nil,
    :BlkioDeviceReadBps => [DockerEngineAPI.Model.ThrottleDevice.t] | nil,
    :BlkioDeviceWriteBps => [DockerEngineAPI.Model.ThrottleDevice.t] | nil,
    :BlkioDeviceReadIOps => [DockerEngineAPI.Model.ThrottleDevice.t] | nil,
    :BlkioDeviceWriteIOps => [DockerEngineAPI.Model.ThrottleDevice.t] | nil,
    :CpuPeriod => integer() | nil,
    :CpuQuota => integer() | nil,
    :CpuRealtimePeriod => integer() | nil,
    :CpuRealtimeRuntime => integer() | nil,
    :CpusetCpus => String.t | nil,
    :CpusetMems => String.t | nil,
    :Devices => [DockerEngineAPI.Model.DeviceMapping.t] | nil,
    :DeviceCgroupRules => [String.t] | nil,
    :DeviceRequests => [DockerEngineAPI.Model.DeviceRequest.t] | nil,
    :KernelMemoryTCP => integer() | nil,
    :MemoryReservation => integer() | nil,
    :MemorySwap => integer() | nil,
    :MemorySwappiness => integer() | nil,
    :NanoCpus => integer() | nil,
    :OomKillDisable => boolean() | nil,
    :Init => boolean() | nil,
    :PidsLimit => integer() | nil,
    :Ulimits => [DockerEngineAPI.Model.ResourcesUlimitsInner.t] | nil,
    :CpuCount => integer() | nil,
    :CpuPercent => integer() | nil,
    :IOMaximumIOps => integer() | nil,
    :IOMaximumBandwidth => integer() | nil,
    :Binds => [String.t] | nil,
    :ContainerIDFile => String.t | nil,
    :LogConfig => DockerEngineAPI.Model.HostConfigAllOfLogConfig.t | nil,
    :NetworkMode => String.t | nil,
    :PortBindings => %{optional(String.t) => [DockerEngineAPI.Model.PortBinding.t]} | nil,
    :RestartPolicy => DockerEngineAPI.Model.RestartPolicy.t | nil,
    :AutoRemove => boolean() | nil,
    :VolumeDriver => String.t | nil,
    :VolumesFrom => [String.t] | nil,
    :Mounts => [DockerEngineAPI.Model.Mount.t] | nil,
    :ConsoleSize => [integer()] | nil,
    :Annotations => %{optional(String.t) => String.t} | nil,
    :CapAdd => [String.t] | nil,
    :CapDrop => [String.t] | nil,
    :CgroupnsMode => String.t | nil,
    :Dns => [String.t] | nil,
    :DnsOptions => [String.t] | nil,
    :DnsSearch => [String.t] | nil,
    :ExtraHosts => [String.t] | nil,
    :GroupAdd => [String.t] | nil,
    :IpcMode => String.t | nil,
    :Cgroup => String.t | nil,
    :Links => [String.t] | nil,
    :OomScoreAdj => integer() | nil,
    :PidMode => String.t | nil,
    :Privileged => boolean() | nil,
    :PublishAllPorts => boolean() | nil,
    :ReadonlyRootfs => boolean() | nil,
    :SecurityOpt => [String.t] | nil,
    :StorageOpt => %{optional(String.t) => String.t} | nil,
    :Tmpfs => %{optional(String.t) => String.t} | nil,
    :UTSMode => String.t | nil,
    :UsernsMode => String.t | nil,
    :ShmSize => integer() | nil,
    :Sysctls => %{optional(String.t) => String.t} | nil,
    :Runtime => String.t | nil,
    :Isolation => String.t | nil,
    :MaskedPaths => [String.t] | nil,
    :ReadonlyPaths => [String.t] | nil
  }

  alias DockerEngineAPI.Deserializer

  def decode(value) do
    value
     |> Deserializer.deserialize(:BlkioWeightDevice, :list, DockerEngineAPI.Model.ResourcesBlkioWeightDeviceInner)
     |> Deserializer.deserialize(:BlkioDeviceReadBps, :list, DockerEngineAPI.Model.ThrottleDevice)
     |> Deserializer.deserialize(:BlkioDeviceWriteBps, :list, DockerEngineAPI.Model.ThrottleDevice)
     |> Deserializer.deserialize(:BlkioDeviceReadIOps, :list, DockerEngineAPI.Model.ThrottleDevice)
     |> Deserializer.deserialize(:BlkioDeviceWriteIOps, :list, DockerEngineAPI.Model.ThrottleDevice)
     |> Deserializer.deserialize(:Devices, :list, DockerEngineAPI.Model.DeviceMapping)
     |> Deserializer.deserialize(:DeviceRequests, :list, DockerEngineAPI.Model.DeviceRequest)
     |> Deserializer.deserialize(:Ulimits, :list, DockerEngineAPI.Model.ResourcesUlimitsInner)
     |> Deserializer.deserialize(:LogConfig, :struct, DockerEngineAPI.Model.HostConfigAllOfLogConfig)
     |> Deserializer.deserialize(:RestartPolicy, :struct, DockerEngineAPI.Model.RestartPolicy)
     |> Deserializer.deserialize(:Mounts, :list, DockerEngineAPI.Model.Mount)
  end
end

