All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.gesellix.docker.remote.api.HostConfigJsonAdapter.kt Maven / Gradle / Ivy

There is a newer version: 2024-09-15T19-05-00
Show newest version
// Code generated by moshi-kotlin-codegen. Do not edit.
@file:Suppress("DEPRECATION", "unused", "UNUSED_PARAMETER", "ClassName", "REDUNDANT_PROJECTION",
    "RedundantExplicitType", "LocalVariableName", "RedundantVisibilityModifier",
    "PLATFORM_CLASS_MAPPED_TO_KOTLIN", "IMPLICIT_NOTHING_TYPE_ARGUMENT_IN_RETURN_POSITION")

package de.gesellix.docker.remote.api

import com.squareup.moshi.JsonAdapter
import com.squareup.moshi.JsonReader
import com.squareup.moshi.JsonWriter
import com.squareup.moshi.Moshi
import com.squareup.moshi.Types
import com.squareup.moshi.`internal`.Util
import java.lang.NullPointerException
import java.lang.reflect.Constructor
import kotlin.Boolean
import kotlin.Int
import kotlin.Long
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.MutableList
import kotlin.collections.MutableMap
import kotlin.collections.emptySet
import kotlin.jvm.Volatile
import kotlin.text.buildString

public class HostConfigJsonAdapter(
  moshi: Moshi,
) : JsonAdapter() {
  private val options: JsonReader.Options = JsonReader.Options.of("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")

  private val nullableIntAdapter: JsonAdapter = moshi.adapter(Int::class.javaObjectType,
      emptySet(), "cpuShares")

  private val nullableLongAdapter: JsonAdapter = moshi.adapter(Long::class.javaObjectType,
      emptySet(), "memory")

  private val nullableStringAdapter: JsonAdapter = moshi.adapter(String::class.java,
      emptySet(), "cgroupParent")

  private val nullableMutableListOfResourcesBlkioWeightDeviceInnerAdapter:
      JsonAdapter?> =
      moshi.adapter(Types.newParameterizedType(MutableList::class.java,
      ResourcesBlkioWeightDeviceInner::class.java), emptySet(), "blkioWeightDevice")

  private val nullableMutableListOfThrottleDeviceAdapter: JsonAdapter?>
      = moshi.adapter(Types.newParameterizedType(MutableList::class.java,
      ThrottleDevice::class.java), emptySet(), "blkioDeviceReadBps")

  private val nullableMutableListOfDeviceMappingAdapter: JsonAdapter?> =
      moshi.adapter(Types.newParameterizedType(MutableList::class.java, DeviceMapping::class.java),
      emptySet(), "devices")

  private val nullableMutableListOfStringAdapter: JsonAdapter?> =
      moshi.adapter(Types.newParameterizedType(MutableList::class.java, String::class.java),
      emptySet(), "deviceCgroupRules")

  private val nullableMutableListOfDeviceRequestAdapter: JsonAdapter?> =
      moshi.adapter(Types.newParameterizedType(MutableList::class.java, DeviceRequest::class.java),
      emptySet(), "deviceRequests")

  private val nullableBooleanAdapter: JsonAdapter =
      moshi.adapter(Boolean::class.javaObjectType, emptySet(), "oomKillDisable")

  private val nullableMutableListOfResourcesUlimitsInnerAdapter:
      JsonAdapter?> =
      moshi.adapter(Types.newParameterizedType(MutableList::class.java,
      ResourcesUlimitsInner::class.java), emptySet(), "ulimits")

  private val nullableHostConfigAllOfLogConfigAdapter: JsonAdapter =
      moshi.adapter(HostConfigAllOfLogConfig::class.java, emptySet(), "logConfig")

  private val nullableMutableMapOfStringMutableListOfPortBindingAdapter:
      JsonAdapter>?> =
      moshi.adapter(Types.newParameterizedType(MutableMap::class.java, String::class.java,
      Types.newParameterizedType(MutableList::class.java, PortBinding::class.java)), emptySet(),
      "portBindings")

  private val nullableRestartPolicyAdapter: JsonAdapter =
      moshi.adapter(RestartPolicy::class.java, emptySet(), "restartPolicy")

  private val nullableMutableListOfMountAdapter: JsonAdapter?> =
      moshi.adapter(Types.newParameterizedType(MutableList::class.java, Mount::class.java),
      emptySet(), "mounts")

  private val nullableMutableListOfIntAdapter: JsonAdapter?> =
      moshi.adapter(Types.newParameterizedType(MutableList::class.java, Int::class.javaObjectType),
      emptySet(), "consoleSize")

  private val nullableMutableMapOfStringStringAdapter: JsonAdapter?> =
      moshi.adapter(Types.newParameterizedType(MutableMap::class.java, String::class.java,
      String::class.java), emptySet(), "annotations")

  private val nullableCgroupnsModeAdapter: JsonAdapter =
      moshi.adapter(HostConfig.CgroupnsMode::class.java, emptySet(), "cgroupnsMode")

  private val nullableIsolationAdapter: JsonAdapter =
      moshi.adapter(HostConfig.Isolation::class.java, emptySet(), "isolation")

  @Volatile
  private var constructorRef: Constructor? = null

  public override fun toString(): String = buildString(32) {
      append("GeneratedJsonAdapter(").append("HostConfig").append(')') }

  public override fun fromJson(reader: JsonReader): HostConfig {
    var cpuShares: Int? = null
    var memory: Long? = null
    var cgroupParent: String? = null
    var blkioWeight: Int? = null
    var blkioWeightDevice: MutableList? = null
    var blkioDeviceReadBps: MutableList? = null
    var blkioDeviceWriteBps: MutableList? = null
    var blkioDeviceReadIOps: MutableList? = null
    var blkioDeviceWriteIOps: MutableList? = null
    var cpuPeriod: Long? = null
    var cpuQuota: Long? = null
    var cpuRealtimePeriod: Long? = null
    var cpuRealtimeRuntime: Long? = null
    var cpusetCpus: String? = null
    var cpusetMems: String? = null
    var devices: MutableList? = null
    var deviceCgroupRules: MutableList? = null
    var deviceRequests: MutableList? = null
    var kernelMemoryTCP: Long? = null
    var memoryReservation: Long? = null
    var memorySwap: Long? = null
    var memorySwappiness: Long? = null
    var nanoCpus: Long? = null
    var oomKillDisable: Boolean? = null
    var init_: Boolean? = null
    var pidsLimit: Long? = null
    var ulimits: MutableList? = null
    var cpuCount: Long? = null
    var cpuPercent: Long? = null
    var ioMaximumIOps: Long? = null
    var ioMaximumBandwidth: Long? = null
    var binds: MutableList? = null
    var containerIDFile: String? = null
    var logConfig: HostConfigAllOfLogConfig? = null
    var networkMode: String? = null
    var portBindings: MutableMap>? = null
    var restartPolicy: RestartPolicy? = null
    var autoRemove: Boolean? = null
    var volumeDriver: String? = null
    var volumesFrom: MutableList? = null
    var mounts: MutableList? = null
    var consoleSize: MutableList? = null
    var annotations: MutableMap? = null
    var capAdd: MutableList? = null
    var capDrop: MutableList? = null
    var cgroupnsMode: HostConfig.CgroupnsMode? = null
    var dns: MutableList? = null
    var dnsOptions: MutableList? = null
    var dnsSearch: MutableList? = null
    var extraHosts: MutableList? = null
    var groupAdd: MutableList? = null
    var ipcMode: String? = null
    var cgroup: String? = null
    var links: MutableList? = null
    var oomScoreAdj: Int? = null
    var pidMode: String? = null
    var privileged: Boolean? = null
    var publishAllPorts: Boolean? = null
    var readonlyRootfs: Boolean? = null
    var securityOpt: MutableList? = null
    var storageOpt: MutableMap? = null
    var tmpfs: MutableMap? = null
    var utSMode: String? = null
    var usernsMode: String? = null
    var shmSize: Long? = null
    var sysctls: MutableMap? = null
    var runtime: String? = null
    var isolation: HostConfig.Isolation? = null
    var maskedPaths: MutableList? = null
    var readonlyPaths: MutableList? = null
    var mask0 = -1
    var mask1 = -1
    var mask2 = -1
    reader.beginObject()
    while (reader.hasNext()) {
      when (reader.selectName(options)) {
        0 -> {
          cpuShares = nullableIntAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 0).inv()
          mask0 = mask0 and 0xfffffffe.toInt()
        }
        1 -> {
          memory = nullableLongAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 1).inv()
          mask0 = mask0 and 0xfffffffd.toInt()
        }
        2 -> {
          cgroupParent = nullableStringAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 2).inv()
          mask0 = mask0 and 0xfffffffb.toInt()
        }
        3 -> {
          blkioWeight = nullableIntAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 3).inv()
          mask0 = mask0 and 0xfffffff7.toInt()
        }
        4 -> {
          blkioWeightDevice =
              nullableMutableListOfResourcesBlkioWeightDeviceInnerAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 4).inv()
          mask0 = mask0 and 0xffffffef.toInt()
        }
        5 -> {
          blkioDeviceReadBps = nullableMutableListOfThrottleDeviceAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 5).inv()
          mask0 = mask0 and 0xffffffdf.toInt()
        }
        6 -> {
          blkioDeviceWriteBps = nullableMutableListOfThrottleDeviceAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 6).inv()
          mask0 = mask0 and 0xffffffbf.toInt()
        }
        7 -> {
          blkioDeviceReadIOps = nullableMutableListOfThrottleDeviceAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 7).inv()
          mask0 = mask0 and 0xffffff7f.toInt()
        }
        8 -> {
          blkioDeviceWriteIOps = nullableMutableListOfThrottleDeviceAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 8).inv()
          mask0 = mask0 and 0xfffffeff.toInt()
        }
        9 -> {
          cpuPeriod = nullableLongAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 9).inv()
          mask0 = mask0 and 0xfffffdff.toInt()
        }
        10 -> {
          cpuQuota = nullableLongAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 10).inv()
          mask0 = mask0 and 0xfffffbff.toInt()
        }
        11 -> {
          cpuRealtimePeriod = nullableLongAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 11).inv()
          mask0 = mask0 and 0xfffff7ff.toInt()
        }
        12 -> {
          cpuRealtimeRuntime = nullableLongAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 12).inv()
          mask0 = mask0 and 0xffffefff.toInt()
        }
        13 -> {
          cpusetCpus = nullableStringAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 13).inv()
          mask0 = mask0 and 0xffffdfff.toInt()
        }
        14 -> {
          cpusetMems = nullableStringAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 14).inv()
          mask0 = mask0 and 0xffffbfff.toInt()
        }
        15 -> {
          devices = nullableMutableListOfDeviceMappingAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 15).inv()
          mask0 = mask0 and 0xffff7fff.toInt()
        }
        16 -> {
          deviceCgroupRules = nullableMutableListOfStringAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 16).inv()
          mask0 = mask0 and 0xfffeffff.toInt()
        }
        17 -> {
          deviceRequests = nullableMutableListOfDeviceRequestAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 17).inv()
          mask0 = mask0 and 0xfffdffff.toInt()
        }
        18 -> {
          kernelMemoryTCP = nullableLongAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 18).inv()
          mask0 = mask0 and 0xfffbffff.toInt()
        }
        19 -> {
          memoryReservation = nullableLongAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 19).inv()
          mask0 = mask0 and 0xfff7ffff.toInt()
        }
        20 -> {
          memorySwap = nullableLongAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 20).inv()
          mask0 = mask0 and 0xffefffff.toInt()
        }
        21 -> {
          memorySwappiness = nullableLongAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 21).inv()
          mask0 = mask0 and 0xffdfffff.toInt()
        }
        22 -> {
          nanoCpus = nullableLongAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 22).inv()
          mask0 = mask0 and 0xffbfffff.toInt()
        }
        23 -> {
          oomKillDisable = nullableBooleanAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 23).inv()
          mask0 = mask0 and 0xff7fffff.toInt()
        }
        24 -> {
          init_ = nullableBooleanAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 24).inv()
          mask0 = mask0 and 0xfeffffff.toInt()
        }
        25 -> {
          pidsLimit = nullableLongAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 25).inv()
          mask0 = mask0 and 0xfdffffff.toInt()
        }
        26 -> {
          ulimits = nullableMutableListOfResourcesUlimitsInnerAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 26).inv()
          mask0 = mask0 and 0xfbffffff.toInt()
        }
        27 -> {
          cpuCount = nullableLongAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 27).inv()
          mask0 = mask0 and 0xf7ffffff.toInt()
        }
        28 -> {
          cpuPercent = nullableLongAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 28).inv()
          mask0 = mask0 and 0xefffffff.toInt()
        }
        29 -> {
          ioMaximumIOps = nullableLongAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 29).inv()
          mask0 = mask0 and 0xdfffffff.toInt()
        }
        30 -> {
          ioMaximumBandwidth = nullableLongAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 30).inv()
          mask0 = mask0 and 0xbfffffff.toInt()
        }
        31 -> {
          binds = nullableMutableListOfStringAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 31).inv()
          mask0 = mask0 and 0x7fffffff.toInt()
        }
        32 -> {
          containerIDFile = nullableStringAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 0).inv()
          mask1 = mask1 and 0xfffffffe.toInt()
        }
        33 -> {
          logConfig = nullableHostConfigAllOfLogConfigAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 1).inv()
          mask1 = mask1 and 0xfffffffd.toInt()
        }
        34 -> {
          networkMode = nullableStringAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 2).inv()
          mask1 = mask1 and 0xfffffffb.toInt()
        }
        35 -> {
          portBindings = nullableMutableMapOfStringMutableListOfPortBindingAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 3).inv()
          mask1 = mask1 and 0xfffffff7.toInt()
        }
        36 -> {
          restartPolicy = nullableRestartPolicyAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 4).inv()
          mask1 = mask1 and 0xffffffef.toInt()
        }
        37 -> {
          autoRemove = nullableBooleanAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 5).inv()
          mask1 = mask1 and 0xffffffdf.toInt()
        }
        38 -> {
          volumeDriver = nullableStringAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 6).inv()
          mask1 = mask1 and 0xffffffbf.toInt()
        }
        39 -> {
          volumesFrom = nullableMutableListOfStringAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 7).inv()
          mask1 = mask1 and 0xffffff7f.toInt()
        }
        40 -> {
          mounts = nullableMutableListOfMountAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 8).inv()
          mask1 = mask1 and 0xfffffeff.toInt()
        }
        41 -> {
          consoleSize = nullableMutableListOfIntAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 9).inv()
          mask1 = mask1 and 0xfffffdff.toInt()
        }
        42 -> {
          annotations = nullableMutableMapOfStringStringAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 10).inv()
          mask1 = mask1 and 0xfffffbff.toInt()
        }
        43 -> {
          capAdd = nullableMutableListOfStringAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 11).inv()
          mask1 = mask1 and 0xfffff7ff.toInt()
        }
        44 -> {
          capDrop = nullableMutableListOfStringAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 12).inv()
          mask1 = mask1 and 0xffffefff.toInt()
        }
        45 -> {
          cgroupnsMode = nullableCgroupnsModeAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 13).inv()
          mask1 = mask1 and 0xffffdfff.toInt()
        }
        46 -> {
          dns = nullableMutableListOfStringAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 14).inv()
          mask1 = mask1 and 0xffffbfff.toInt()
        }
        47 -> {
          dnsOptions = nullableMutableListOfStringAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 15).inv()
          mask1 = mask1 and 0xffff7fff.toInt()
        }
        48 -> {
          dnsSearch = nullableMutableListOfStringAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 16).inv()
          mask1 = mask1 and 0xfffeffff.toInt()
        }
        49 -> {
          extraHosts = nullableMutableListOfStringAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 17).inv()
          mask1 = mask1 and 0xfffdffff.toInt()
        }
        50 -> {
          groupAdd = nullableMutableListOfStringAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 18).inv()
          mask1 = mask1 and 0xfffbffff.toInt()
        }
        51 -> {
          ipcMode = nullableStringAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 19).inv()
          mask1 = mask1 and 0xfff7ffff.toInt()
        }
        52 -> {
          cgroup = nullableStringAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 20).inv()
          mask1 = mask1 and 0xffefffff.toInt()
        }
        53 -> {
          links = nullableMutableListOfStringAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 21).inv()
          mask1 = mask1 and 0xffdfffff.toInt()
        }
        54 -> {
          oomScoreAdj = nullableIntAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 22).inv()
          mask1 = mask1 and 0xffbfffff.toInt()
        }
        55 -> {
          pidMode = nullableStringAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 23).inv()
          mask1 = mask1 and 0xff7fffff.toInt()
        }
        56 -> {
          privileged = nullableBooleanAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 24).inv()
          mask1 = mask1 and 0xfeffffff.toInt()
        }
        57 -> {
          publishAllPorts = nullableBooleanAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 25).inv()
          mask1 = mask1 and 0xfdffffff.toInt()
        }
        58 -> {
          readonlyRootfs = nullableBooleanAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 26).inv()
          mask1 = mask1 and 0xfbffffff.toInt()
        }
        59 -> {
          securityOpt = nullableMutableListOfStringAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 27).inv()
          mask1 = mask1 and 0xf7ffffff.toInt()
        }
        60 -> {
          storageOpt = nullableMutableMapOfStringStringAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 28).inv()
          mask1 = mask1 and 0xefffffff.toInt()
        }
        61 -> {
          tmpfs = nullableMutableMapOfStringStringAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 29).inv()
          mask1 = mask1 and 0xdfffffff.toInt()
        }
        62 -> {
          utSMode = nullableStringAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 30).inv()
          mask1 = mask1 and 0xbfffffff.toInt()
        }
        63 -> {
          usernsMode = nullableStringAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 31).inv()
          mask1 = mask1 and 0x7fffffff.toInt()
        }
        64 -> {
          shmSize = nullableLongAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 0).inv()
          mask2 = mask2 and 0xfffffffe.toInt()
        }
        65 -> {
          sysctls = nullableMutableMapOfStringStringAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 1).inv()
          mask2 = mask2 and 0xfffffffd.toInt()
        }
        66 -> {
          runtime = nullableStringAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 2).inv()
          mask2 = mask2 and 0xfffffffb.toInt()
        }
        67 -> {
          isolation = nullableIsolationAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 3).inv()
          mask2 = mask2 and 0xfffffff7.toInt()
        }
        68 -> {
          maskedPaths = nullableMutableListOfStringAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 4).inv()
          mask2 = mask2 and 0xffffffef.toInt()
        }
        69 -> {
          readonlyPaths = nullableMutableListOfStringAdapter.fromJson(reader)
          // $mask = $mask and (1 shl 5).inv()
          mask2 = mask2 and 0xffffffdf.toInt()
        }
        -1 -> {
          // Unknown name, skip it.
          reader.skipName()
          reader.skipValue()
        }
      }
    }
    reader.endObject()
    if (mask0 == 0x0.toInt() && mask1 == 0x0.toInt() && mask2 == 0xffffffc0.toInt()) {
      // All parameters with defaults are set, invoke the constructor directly
      return  HostConfig(
          cpuShares = cpuShares,
          memory = memory,
          cgroupParent = cgroupParent,
          blkioWeight = blkioWeight,
          blkioWeightDevice = blkioWeightDevice,
          blkioDeviceReadBps = blkioDeviceReadBps,
          blkioDeviceWriteBps = blkioDeviceWriteBps,
          blkioDeviceReadIOps = blkioDeviceReadIOps,
          blkioDeviceWriteIOps = blkioDeviceWriteIOps,
          cpuPeriod = cpuPeriod,
          cpuQuota = cpuQuota,
          cpuRealtimePeriod = cpuRealtimePeriod,
          cpuRealtimeRuntime = cpuRealtimeRuntime,
          cpusetCpus = cpusetCpus,
          cpusetMems = cpusetMems,
          devices = devices,
          deviceCgroupRules = deviceCgroupRules,
          deviceRequests = deviceRequests,
          kernelMemoryTCP = kernelMemoryTCP,
          memoryReservation = memoryReservation,
          memorySwap = memorySwap,
          memorySwappiness = memorySwappiness,
          nanoCpus = nanoCpus,
          oomKillDisable = oomKillDisable,
          `init` = init_,
          pidsLimit = pidsLimit,
          ulimits = ulimits,
          cpuCount = cpuCount,
          cpuPercent = cpuPercent,
          ioMaximumIOps = ioMaximumIOps,
          ioMaximumBandwidth = ioMaximumBandwidth,
          binds = binds,
          containerIDFile = containerIDFile,
          logConfig = logConfig,
          networkMode = networkMode,
          portBindings = portBindings,
          restartPolicy = restartPolicy,
          autoRemove = autoRemove,
          volumeDriver = volumeDriver,
          volumesFrom = volumesFrom,
          mounts = mounts,
          consoleSize = consoleSize,
          annotations = annotations,
          capAdd = capAdd,
          capDrop = capDrop,
          cgroupnsMode = cgroupnsMode,
          dns = dns,
          dnsOptions = dnsOptions,
          dnsSearch = dnsSearch,
          extraHosts = extraHosts,
          groupAdd = groupAdd,
          ipcMode = ipcMode,
          cgroup = cgroup,
          links = links,
          oomScoreAdj = oomScoreAdj,
          pidMode = pidMode,
          privileged = privileged,
          publishAllPorts = publishAllPorts,
          readonlyRootfs = readonlyRootfs,
          securityOpt = securityOpt,
          storageOpt = storageOpt,
          tmpfs = tmpfs,
          utSMode = utSMode,
          usernsMode = usernsMode,
          shmSize = shmSize,
          sysctls = sysctls,
          runtime = runtime,
          isolation = isolation,
          maskedPaths = maskedPaths,
          readonlyPaths = readonlyPaths
      )
    } else {
      // Reflectively invoke the synthetic defaults constructor
      @Suppress("UNCHECKED_CAST")
      val localConstructor: Constructor = this.constructorRef ?:
          HostConfig::class.java.getDeclaredConstructor(Int::class.javaObjectType,
          Long::class.javaObjectType, String::class.java, Int::class.javaObjectType,
          MutableList::class.java, MutableList::class.java, MutableList::class.java,
          MutableList::class.java, MutableList::class.java, Long::class.javaObjectType,
          Long::class.javaObjectType, Long::class.javaObjectType, Long::class.javaObjectType,
          String::class.java, String::class.java, MutableList::class.java, MutableList::class.java,
          MutableList::class.java, Long::class.javaObjectType, Long::class.javaObjectType,
          Long::class.javaObjectType, Long::class.javaObjectType, Long::class.javaObjectType,
          Boolean::class.javaObjectType, Boolean::class.javaObjectType, Long::class.javaObjectType,
          MutableList::class.java, Long::class.javaObjectType, Long::class.javaObjectType,
          Long::class.javaObjectType, Long::class.javaObjectType, MutableList::class.java,
          String::class.java, HostConfigAllOfLogConfig::class.java, String::class.java,
          MutableMap::class.java, RestartPolicy::class.java, Boolean::class.javaObjectType,
          String::class.java, MutableList::class.java, MutableList::class.java,
          MutableList::class.java, MutableMap::class.java, MutableList::class.java,
          MutableList::class.java, HostConfig.CgroupnsMode::class.java, MutableList::class.java,
          MutableList::class.java, MutableList::class.java, MutableList::class.java,
          MutableList::class.java, String::class.java, String::class.java, MutableList::class.java,
          Int::class.javaObjectType, String::class.java, Boolean::class.javaObjectType,
          Boolean::class.javaObjectType, Boolean::class.javaObjectType, MutableList::class.java,
          MutableMap::class.java, MutableMap::class.java, String::class.java, String::class.java,
          Long::class.javaObjectType, MutableMap::class.java, String::class.java,
          HostConfig.Isolation::class.java, MutableList::class.java, MutableList::class.java,
          Int::class.javaPrimitiveType, Int::class.javaPrimitiveType, Int::class.javaPrimitiveType,
          Util.DEFAULT_CONSTRUCTOR_MARKER).also { this.constructorRef = it }
      return localConstructor.newInstance(
          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,
          mask0, mask1, mask2,
          /* DefaultConstructorMarker */ null
      )
    }
  }

  public override fun toJson(writer: JsonWriter, value_: HostConfig?): Unit {
    if (value_ == null) {
      throw NullPointerException("value_ was null! Wrap in .nullSafe() to write nullable values.")
    }
    writer.beginObject()
    writer.name("CpuShares")
    nullableIntAdapter.toJson(writer, value_.cpuShares)
    writer.name("Memory")
    nullableLongAdapter.toJson(writer, value_.memory)
    writer.name("CgroupParent")
    nullableStringAdapter.toJson(writer, value_.cgroupParent)
    writer.name("BlkioWeight")
    nullableIntAdapter.toJson(writer, value_.blkioWeight)
    writer.name("BlkioWeightDevice")
    nullableMutableListOfResourcesBlkioWeightDeviceInnerAdapter.toJson(writer,
        value_.blkioWeightDevice)
    writer.name("BlkioDeviceReadBps")
    nullableMutableListOfThrottleDeviceAdapter.toJson(writer, value_.blkioDeviceReadBps)
    writer.name("BlkioDeviceWriteBps")
    nullableMutableListOfThrottleDeviceAdapter.toJson(writer, value_.blkioDeviceWriteBps)
    writer.name("BlkioDeviceReadIOps")
    nullableMutableListOfThrottleDeviceAdapter.toJson(writer, value_.blkioDeviceReadIOps)
    writer.name("BlkioDeviceWriteIOps")
    nullableMutableListOfThrottleDeviceAdapter.toJson(writer, value_.blkioDeviceWriteIOps)
    writer.name("CpuPeriod")
    nullableLongAdapter.toJson(writer, value_.cpuPeriod)
    writer.name("CpuQuota")
    nullableLongAdapter.toJson(writer, value_.cpuQuota)
    writer.name("CpuRealtimePeriod")
    nullableLongAdapter.toJson(writer, value_.cpuRealtimePeriod)
    writer.name("CpuRealtimeRuntime")
    nullableLongAdapter.toJson(writer, value_.cpuRealtimeRuntime)
    writer.name("CpusetCpus")
    nullableStringAdapter.toJson(writer, value_.cpusetCpus)
    writer.name("CpusetMems")
    nullableStringAdapter.toJson(writer, value_.cpusetMems)
    writer.name("Devices")
    nullableMutableListOfDeviceMappingAdapter.toJson(writer, value_.devices)
    writer.name("DeviceCgroupRules")
    nullableMutableListOfStringAdapter.toJson(writer, value_.deviceCgroupRules)
    writer.name("DeviceRequests")
    nullableMutableListOfDeviceRequestAdapter.toJson(writer, value_.deviceRequests)
    writer.name("KernelMemoryTCP")
    nullableLongAdapter.toJson(writer, value_.kernelMemoryTCP)
    writer.name("MemoryReservation")
    nullableLongAdapter.toJson(writer, value_.memoryReservation)
    writer.name("MemorySwap")
    nullableLongAdapter.toJson(writer, value_.memorySwap)
    writer.name("MemorySwappiness")
    nullableLongAdapter.toJson(writer, value_.memorySwappiness)
    writer.name("NanoCpus")
    nullableLongAdapter.toJson(writer, value_.nanoCpus)
    writer.name("OomKillDisable")
    nullableBooleanAdapter.toJson(writer, value_.oomKillDisable)
    writer.name("Init")
    nullableBooleanAdapter.toJson(writer, value_.`init`)
    writer.name("PidsLimit")
    nullableLongAdapter.toJson(writer, value_.pidsLimit)
    writer.name("Ulimits")
    nullableMutableListOfResourcesUlimitsInnerAdapter.toJson(writer, value_.ulimits)
    writer.name("CpuCount")
    nullableLongAdapter.toJson(writer, value_.cpuCount)
    writer.name("CpuPercent")
    nullableLongAdapter.toJson(writer, value_.cpuPercent)
    writer.name("IOMaximumIOps")
    nullableLongAdapter.toJson(writer, value_.ioMaximumIOps)
    writer.name("IOMaximumBandwidth")
    nullableLongAdapter.toJson(writer, value_.ioMaximumBandwidth)
    writer.name("Binds")
    nullableMutableListOfStringAdapter.toJson(writer, value_.binds)
    writer.name("ContainerIDFile")
    nullableStringAdapter.toJson(writer, value_.containerIDFile)
    writer.name("LogConfig")
    nullableHostConfigAllOfLogConfigAdapter.toJson(writer, value_.logConfig)
    writer.name("NetworkMode")
    nullableStringAdapter.toJson(writer, value_.networkMode)
    writer.name("PortBindings")
    nullableMutableMapOfStringMutableListOfPortBindingAdapter.toJson(writer, value_.portBindings)
    writer.name("RestartPolicy")
    nullableRestartPolicyAdapter.toJson(writer, value_.restartPolicy)
    writer.name("AutoRemove")
    nullableBooleanAdapter.toJson(writer, value_.autoRemove)
    writer.name("VolumeDriver")
    nullableStringAdapter.toJson(writer, value_.volumeDriver)
    writer.name("VolumesFrom")
    nullableMutableListOfStringAdapter.toJson(writer, value_.volumesFrom)
    writer.name("Mounts")
    nullableMutableListOfMountAdapter.toJson(writer, value_.mounts)
    writer.name("ConsoleSize")
    nullableMutableListOfIntAdapter.toJson(writer, value_.consoleSize)
    writer.name("Annotations")
    nullableMutableMapOfStringStringAdapter.toJson(writer, value_.annotations)
    writer.name("CapAdd")
    nullableMutableListOfStringAdapter.toJson(writer, value_.capAdd)
    writer.name("CapDrop")
    nullableMutableListOfStringAdapter.toJson(writer, value_.capDrop)
    writer.name("CgroupnsMode")
    nullableCgroupnsModeAdapter.toJson(writer, value_.cgroupnsMode)
    writer.name("Dns")
    nullableMutableListOfStringAdapter.toJson(writer, value_.dns)
    writer.name("DnsOptions")
    nullableMutableListOfStringAdapter.toJson(writer, value_.dnsOptions)
    writer.name("DnsSearch")
    nullableMutableListOfStringAdapter.toJson(writer, value_.dnsSearch)
    writer.name("ExtraHosts")
    nullableMutableListOfStringAdapter.toJson(writer, value_.extraHosts)
    writer.name("GroupAdd")
    nullableMutableListOfStringAdapter.toJson(writer, value_.groupAdd)
    writer.name("IpcMode")
    nullableStringAdapter.toJson(writer, value_.ipcMode)
    writer.name("Cgroup")
    nullableStringAdapter.toJson(writer, value_.cgroup)
    writer.name("Links")
    nullableMutableListOfStringAdapter.toJson(writer, value_.links)
    writer.name("OomScoreAdj")
    nullableIntAdapter.toJson(writer, value_.oomScoreAdj)
    writer.name("PidMode")
    nullableStringAdapter.toJson(writer, value_.pidMode)
    writer.name("Privileged")
    nullableBooleanAdapter.toJson(writer, value_.privileged)
    writer.name("PublishAllPorts")
    nullableBooleanAdapter.toJson(writer, value_.publishAllPorts)
    writer.name("ReadonlyRootfs")
    nullableBooleanAdapter.toJson(writer, value_.readonlyRootfs)
    writer.name("SecurityOpt")
    nullableMutableListOfStringAdapter.toJson(writer, value_.securityOpt)
    writer.name("StorageOpt")
    nullableMutableMapOfStringStringAdapter.toJson(writer, value_.storageOpt)
    writer.name("Tmpfs")
    nullableMutableMapOfStringStringAdapter.toJson(writer, value_.tmpfs)
    writer.name("UTSMode")
    nullableStringAdapter.toJson(writer, value_.utSMode)
    writer.name("UsernsMode")
    nullableStringAdapter.toJson(writer, value_.usernsMode)
    writer.name("ShmSize")
    nullableLongAdapter.toJson(writer, value_.shmSize)
    writer.name("Sysctls")
    nullableMutableMapOfStringStringAdapter.toJson(writer, value_.sysctls)
    writer.name("Runtime")
    nullableStringAdapter.toJson(writer, value_.runtime)
    writer.name("Isolation")
    nullableIsolationAdapter.toJson(writer, value_.isolation)
    writer.name("MaskedPaths")
    nullableMutableListOfStringAdapter.toJson(writer, value_.maskedPaths)
    writer.name("ReadonlyPaths")
    nullableMutableListOfStringAdapter.toJson(writer, value_.readonlyPaths)
    writer.endObject()
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy