Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ insert_final_newline = true
# it's automatically set to 100 on `ktlint --android ...` (per Android Kotlin Style Guide)
max_line_length = off
trim_trailing_whitespace = true
ktlint_disabled_rules = no-wildcard-imports
# ktlint_disabled_rules = no-wildcard-imports
# ktlint_standard_no-wildcard-imports = disabled
# ktlint_standard_enum-entry-name-case = disabled
# ktlint_standard = disabled
4 changes: 4 additions & 0 deletions api-model-v1-41/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ configure<org.jlleitschuh.gradle.ktlint.KtlintExtension> {
exclude {
it.file.path.startsWith(file(layout.buildDirectory.dir("generated")).path)
}
exclude("**/build.gradle.kts")
exclude {
it.file.path.endsWith("build.gradle.kts")
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"ArrayInDataClass",
"EnumEntryName",
"RemoveRedundantQualifierName",
"UnusedImport"
"UnusedImport",
)

package de.gesellix.docker.remote.api
Expand All @@ -25,15 +25,11 @@ import com.squareup.moshi.JsonClass
* @param prefixLen Mask length of the IP address.
*/
@JsonClass(generateAdapter = true)

data class Address(

/* IP address. */
// IP address.
@Json(name = "Addr")
var addr: kotlin.String? = null,

/* Mask length of the IP address. */
// Mask length of the IP address.
@Json(name = "PrefixLen")
var prefixLen: kotlin.Int? = null

var prefixLen: kotlin.Int? = null,
)
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"ArrayInDataClass",
"EnumEntryName",
"RemoveRedundantQualifierName",
"UnusedImport"
"UnusedImport",
)

package de.gesellix.docker.remote.api
Expand All @@ -27,19 +27,13 @@ import com.squareup.moshi.JsonClass
* @param serveraddress
*/
@JsonClass(generateAdapter = true)

data class AuthConfig(

@Json(name = "username")
var username: kotlin.String? = null,

@Json(name = "password")
var password: kotlin.String? = null,

@Json(name = "email")
var email: kotlin.String? = null,

@Json(name = "serveraddress")
var serveraddress: kotlin.String? = null

var serveraddress: kotlin.String? = null,
)
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"ArrayInDataClass",
"EnumEntryName",
"RemoveRedundantQualifierName",
"UnusedImport"
"UnusedImport",
)

package de.gesellix.docker.remote.api
Expand All @@ -34,54 +34,40 @@ import com.squareup.moshi.JsonClass
* @param usageCount
*/
@JsonClass(generateAdapter = true)

data class BuildCache(

/* Unique ID of the build cache record. */
// Unique ID of the build cache record.
@Json(name = "ID")
var ID: kotlin.String? = null,

/* ID of the parent build cache record. > **Deprecated**: This field is deprecated, and omitted if empty. */
// ID of the parent build cache record. > **Deprecated**: This field is deprecated, and omitted if empty.
@Json(name = "Parent")
var parent: kotlin.String? = null,

/* List of parent build cache record IDs. */
// List of parent build cache record IDs.
@Json(name = "Parents")
var parents: kotlin.collections.MutableList<kotlin.String>? = null,

/* Cache record type. */
// Cache record type.
@Json(name = "Type")
var type: BuildCache.Type? = null,

/* Description of the build-step that produced the build cache. */
// Description of the build-step that produced the build cache.
@Json(name = "Description")
var description: kotlin.String? = null,

/* Indicates if the build cache is in use. */
// Indicates if the build cache is in use.
@Json(name = "InUse")
var inUse: kotlin.Boolean? = null,

/* Indicates if the build cache is shared. */
// Indicates if the build cache is shared.
@Json(name = "Shared")
var shared: kotlin.Boolean? = null,

/* Amount of disk space used by the build cache (in bytes). */
// Amount of disk space used by the build cache (in bytes).
@Json(name = "Size")
var propertySize: kotlin.Int? = null,

/* Date and time at which the build cache was created in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. */
// Date and time at which the build cache was created in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
@Json(name = "CreatedAt")
var createdAt: kotlin.String? = null,

/* Date and time at which the build cache was last used in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. */
// Date and time at which the build cache was last used in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
@Json(name = "LastUsedAt")
var lastUsedAt: kotlin.String? = null,

@Json(name = "UsageCount")
var usageCount: kotlin.Int? = null

var usageCount: kotlin.Int? = null,
) {

/**
* Cache record type.
*
Expand All @@ -105,6 +91,6 @@ data class BuildCache(
ExecPeriodCachemount("exec.cachemount"),

@Json(name = "regular")
Regular("regular");
Regular("regular"),
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"ArrayInDataClass",
"EnumEntryName",
"RemoveRedundantQualifierName",
"UnusedImport"
"UnusedImport",
)

package de.gesellix.docker.remote.api
Expand All @@ -31,31 +31,21 @@ import com.squareup.moshi.JsonClass
* @param aux
*/
@JsonClass(generateAdapter = true)

data class BuildInfo(

@Json(name = "id")
var id: kotlin.String? = null,

@Json(name = "stream")
var stream: kotlin.String? = null,

@Json(name = "error")
var error: kotlin.String? = null,

@Json(name = "errorDetail")
var errorDetail: ErrorDetail? = null,

@Json(name = "status")
var status: kotlin.String? = null,

@Json(name = "progress")
var progress: kotlin.String? = null,

@Json(name = "progressDetail")
var progressDetail: ProgressDetail? = null,

@Json(name = "aux")
var aux: ImageID? = null

var aux: ImageID? = null,
)
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"ArrayInDataClass",
"EnumEntryName",
"RemoveRedundantQualifierName",
"UnusedImport"
"UnusedImport",
)

package de.gesellix.docker.remote.api
Expand All @@ -25,14 +25,10 @@ import com.squareup.moshi.JsonClass
* @param spaceReclaimed Disk space reclaimed in bytes
*/
@JsonClass(generateAdapter = true)

data class BuildPruneResponse(

@Json(name = "CachesDeleted")
var cachesDeleted: kotlin.collections.MutableList<kotlin.String>? = null,

/* Disk space reclaimed in bytes */
// Disk space reclaimed in bytes
@Json(name = "SpaceReclaimed")
var spaceReclaimed: kotlin.Long? = null

var spaceReclaimed: kotlin.Long? = null,
)
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"ArrayInDataClass",
"EnumEntryName",
"RemoveRedundantQualifierName",
"UnusedImport"
"UnusedImport",
)

package de.gesellix.docker.remote.api
Expand All @@ -26,15 +26,15 @@ import com.squareup.moshi.JsonClass

@JsonClass(generateAdapter = false)
enum class ChangeType(val value: kotlin.Int) {

@Json(name = "0")
T0(0),

@Json(name = "1")
T1(1),

@Json(name = "2")
T2(2);
T2(2),
;

/**
* Override [toString()] to avoid using the enum variable name as the value, and instead use
Expand All @@ -54,11 +54,12 @@ enum class ChangeType(val value: kotlin.Int) {
/**
* Returns a valid [ChangeType] for [data], null otherwise.
*/
fun decode(data: kotlin.Any?): ChangeType? = data?.let {
val normalizedData = "$it".lowercase()
values().firstOrNull { value ->
it == value || normalizedData == "$value".lowercase()
fun decode(data: kotlin.Any?): ChangeType? =
data?.let {
val normalizedData = "$it".lowercase()
values().firstOrNull { value ->
it == value || normalizedData == "$value".lowercase()
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"ArrayInDataClass",
"EnumEntryName",
"RemoveRedundantQualifierName",
"UnusedImport"
"UnusedImport",
)

package de.gesellix.docker.remote.api
Expand All @@ -33,44 +33,32 @@ import com.squareup.moshi.JsonClass
* @param subnetSize SubnetSize specifies the subnet size of the networks created from the default subnet pool.
*/
@JsonClass(generateAdapter = true)

data class ClusterInfo(

/* The ID of the swarm. */
// The ID of the swarm.
@Json(name = "ID")
var ID: kotlin.String? = null,

@Json(name = "Version")
var version: ObjectVersion? = null,

/* Date and time at which the swarm was initialised in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. */
// Date and time at which the swarm was initialised in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
@Json(name = "CreatedAt")
var createdAt: kotlin.String? = null,

/* Date and time at which the swarm was last updated in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds. */
// Date and time at which the swarm was last updated in [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.
@Json(name = "UpdatedAt")
var updatedAt: kotlin.String? = null,

@Json(name = "Spec")
var spec: SwarmSpec? = null,

@Json(name = "TLSInfo")
var tlSInfo: TLSInfo? = null,

/* Whether there is currently a root CA rotation in progress for the swarm */
// Whether there is currently a root CA rotation in progress for the swarm
@Json(name = "RootRotationInProgress")
var rootRotationInProgress: kotlin.Boolean? = null,

/* DataPathPort specifies the data path port number for data traffic. Acceptable port range is 1024 to 49151. If no port is set or is set to 0, the default port (4789) is used. */
// DataPathPort specifies the data path port number for data traffic. Acceptable port range is 1024 to 49151. If no port is set or is set to 0, the default port (4789) is used.
@Json(name = "DataPathPort")
var dataPathPort: kotlin.Int? = null,

/* Default Address Pool specifies default subnet pools for global scope networks. */
// Default Address Pool specifies default subnet pools for global scope networks.
@Json(name = "DefaultAddrPool")
var defaultAddrPool: kotlin.collections.MutableList<kotlin.String>? = null,

/* SubnetSize specifies the subnet size of the networks created from the default subnet pool. */
// SubnetSize specifies the subnet size of the networks created from the default subnet pool.
@Json(name = "SubnetSize")
var subnetSize: kotlin.Int? = null

var subnetSize: kotlin.Int? = null,
)
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"ArrayInDataClass",
"EnumEntryName",
"RemoveRedundantQualifierName",
"UnusedImport"
"UnusedImport",
)

package de.gesellix.docker.remote.api
Expand All @@ -30,30 +30,21 @@ import com.squareup.moshi.JsonClass
* @param publishStatus The status of the volume as it pertains to its publishing and use on specific nodes
*/
@JsonClass(generateAdapter = true)

data class ClusterVolume(

/* The Swarm ID of this volume. Because cluster volumes are Swarm objects, they have an ID, unlike non-cluster volumes. This ID can be used to refer to the Volume instead of the name. */
// The Swarm ID of this volume. Because cluster volumes are Swarm objects, they have an ID, unlike non-cluster volumes. This ID can be used to refer to the Volume instead of the name.
@Json(name = "ID")
var ID: kotlin.String? = null,

@Json(name = "Version")
var version: ObjectVersion? = null,

@Json(name = "CreatedAt")
var createdAt: kotlin.String? = null,

@Json(name = "UpdatedAt")
var updatedAt: kotlin.String? = null,

@Json(name = "Spec")
var spec: ClusterVolumeSpec? = null,

@Json(name = "Info")
var info: ClusterVolumeInfo? = null,

/* The status of the volume as it pertains to its publishing and use on specific nodes */
// The status of the volume as it pertains to its publishing and use on specific nodes
@Json(name = "PublishStatus")
var publishStatus: kotlin.collections.MutableList<ClusterVolumePublishStatusInner>? = null

var publishStatus: kotlin.collections.MutableList<ClusterVolumePublishStatusInner>? = null,
)
Loading