de.gesellix.docker.remote.api.RestartPolicy.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of docker-remote-api-model-1-41 Show documentation
Show all versions of docker-remote-api-model-1-41 Show documentation
API model for the Docker remote api v1.41
/**
*
* Please note:
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* Do not edit this file manually.
*
*/
@file:Suppress(
"ArrayInDataClass",
"EnumEntryName",
"RemoveRedundantQualifierName",
"UnusedImport",
)
package de.gesellix.docker.remote.api
import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass
/**
* The behavior to apply when the container exits. The default is not to restart. An ever increasing delay (double the previous delay, starting at 100ms) is added before each restart to prevent flooding the server.
*
* @param name - Empty string means not to restart - `no` Do not automatically restart - `always` Always restart - `unless-stopped` Restart always except when the user has manually stopped the container - `on-failure` Restart only when the container exit code is non-zero
* @param maximumRetryCount If `on-failure` is used, the number of times to retry before giving up.
*/
@JsonClass(generateAdapter = true)
data class RestartPolicy(
// - Empty string means not to restart - `no` Do not automatically restart - `always` Always restart - `unless-stopped` Restart always except when the user has manually stopped the container - `on-failure` Restart only when the container exit code is non-zero
@Json(name = "Name")
var name: RestartPolicy.Name? = null,
// If `on-failure` is used, the number of times to retry before giving up.
@Json(name = "MaximumRetryCount")
var maximumRetryCount: kotlin.Int? = null,
) {
/**
* - Empty string means not to restart - `no` Do not automatically restart - `always` Always restart - `unless-stopped` Restart always except when the user has manually stopped the container - `on-failure` Restart only when the container exit code is non-zero
*
* Values: EMPTY,No,Always,UnlessMinusStopped,OnMinusFailure
*/
@JsonClass(generateAdapter = false)
enum class Name(val value: kotlin.String) {
@Json(name = "")
EMPTY(""),
@Json(name = "no")
No("no"),
@Json(name = "always")
Always("always"),
@Json(name = "unless-stopped")
UnlessMinusStopped("unless-stopped"),
@Json(name = "on-failure")
OnMinusFailure("on-failure"),
}
}