diff --git a/api/docker-kotlin.api b/api/docker-kotlin.api index 5c5837fb..cc8a4611 100644 --- a/api/docker-kotlin.api +++ b/api/docker-kotlin.api @@ -3381,7 +3381,6 @@ public final class me/devnatan/dockerkt/models/secret/SecretSpec$Driver$Companio public final class me/devnatan/dockerkt/models/system/Event { public static final field Companion Lme/devnatan/dockerkt/models/system/Event$Companion; public final fun component1 ()Lme/devnatan/dockerkt/models/system/EventType; - public final fun component2 ()Lme/devnatan/dockerkt/models/system/EventAction; public final fun component3 ()Lme/devnatan/dockerkt/models/system/EventActor; public final fun component4 ()Lme/devnatan/dockerkt/models/system/EventScope; public final fun component5 ()J @@ -3389,6 +3388,7 @@ public final class me/devnatan/dockerkt/models/system/Event { public fun equals (Ljava/lang/Object;)Z public final fun getAction ()Lme/devnatan/dockerkt/models/system/EventAction; public final fun getActor ()Lme/devnatan/dockerkt/models/system/EventActor; + public final fun getResult ()Ljava/lang/String; public final fun getScope ()Lme/devnatan/dockerkt/models/system/EventScope; public final fun getTimeMillis ()J public final fun getTimeNanos ()J @@ -3413,45 +3413,45 @@ public final class me/devnatan/dockerkt/models/system/Event$Companion { } public final class me/devnatan/dockerkt/models/system/EventAction : java/lang/Enum { - public static final field ATTACH Lme/devnatan/dockerkt/models/system/EventAction; - public static final field COMMIT Lme/devnatan/dockerkt/models/system/EventAction; - public static final field COPY Lme/devnatan/dockerkt/models/system/EventAction; - public static final field CREATE Lme/devnatan/dockerkt/models/system/EventAction; + public static final field Attach Lme/devnatan/dockerkt/models/system/EventAction; + public static final field Commit Lme/devnatan/dockerkt/models/system/EventAction; public static final field Companion Lme/devnatan/dockerkt/models/system/EventAction$Companion; - public static final field DAEMON_RELOAD Lme/devnatan/dockerkt/models/system/EventAction; - public static final field DELETE Lme/devnatan/dockerkt/models/system/EventAction; - public static final field DESTROY Lme/devnatan/dockerkt/models/system/EventAction; - public static final field DETACH Lme/devnatan/dockerkt/models/system/EventAction; - public static final field DIE Lme/devnatan/dockerkt/models/system/EventAction; - public static final field EXEC_CREATE Lme/devnatan/dockerkt/models/system/EventAction; - public static final field EXEC_DETACH Lme/devnatan/dockerkt/models/system/EventAction; - public static final field EXEC_DIE Lme/devnatan/dockerkt/models/system/EventAction; - public static final field EXEC_START Lme/devnatan/dockerkt/models/system/EventAction; - public static final field EXPORT Lme/devnatan/dockerkt/models/system/EventAction; - public static final field HEALTH Lme/devnatan/dockerkt/models/system/EventAction; - public static final field IMAGE_LOAD Lme/devnatan/dockerkt/models/system/EventAction; - public static final field IMAGE_PULL Lme/devnatan/dockerkt/models/system/EventAction; - public static final field IMAGE_PUSH Lme/devnatan/dockerkt/models/system/EventAction; - public static final field IMAGE_SAVE Lme/devnatan/dockerkt/models/system/EventAction; - public static final field IMAGE_TAG Lme/devnatan/dockerkt/models/system/EventAction; - public static final field IMAGE_UNTAG Lme/devnatan/dockerkt/models/system/EventAction; - public static final field IMPORT Lme/devnatan/dockerkt/models/system/EventAction; - public static final field KILL Lme/devnatan/dockerkt/models/system/EventAction; - public static final field NET_CONNECT Lme/devnatan/dockerkt/models/system/EventAction; - public static final field NET_DISCONNECT Lme/devnatan/dockerkt/models/system/EventAction; - public static final field OOM Lme/devnatan/dockerkt/models/system/EventAction; - public static final field PAUSE Lme/devnatan/dockerkt/models/system/EventAction; - public static final field PRUNE Lme/devnatan/dockerkt/models/system/EventAction; - public static final field REMOVE Lme/devnatan/dockerkt/models/system/EventAction; - public static final field RENAME Lme/devnatan/dockerkt/models/system/EventAction; - public static final field RESIZE Lme/devnatan/dockerkt/models/system/EventAction; - public static final field RESTART Lme/devnatan/dockerkt/models/system/EventAction; - public static final field START Lme/devnatan/dockerkt/models/system/EventAction; - public static final field STOP Lme/devnatan/dockerkt/models/system/EventAction; - public static final field TOP Lme/devnatan/dockerkt/models/system/EventAction; - public static final field UNKNOWN Lme/devnatan/dockerkt/models/system/EventAction; - public static final field UNPAUSE Lme/devnatan/dockerkt/models/system/EventAction; - public static final field UPDATE Lme/devnatan/dockerkt/models/system/EventAction; + public static final field Copy Lme/devnatan/dockerkt/models/system/EventAction; + public static final field Create Lme/devnatan/dockerkt/models/system/EventAction; + public static final field DaemonReload Lme/devnatan/dockerkt/models/system/EventAction; + public static final field Delete Lme/devnatan/dockerkt/models/system/EventAction; + public static final field Destroy Lme/devnatan/dockerkt/models/system/EventAction; + public static final field Detach Lme/devnatan/dockerkt/models/system/EventAction; + public static final field Die Lme/devnatan/dockerkt/models/system/EventAction; + public static final field ExecCreate Lme/devnatan/dockerkt/models/system/EventAction; + public static final field ExecDetach Lme/devnatan/dockerkt/models/system/EventAction; + public static final field ExecDie Lme/devnatan/dockerkt/models/system/EventAction; + public static final field ExecStart Lme/devnatan/dockerkt/models/system/EventAction; + public static final field Export Lme/devnatan/dockerkt/models/system/EventAction; + public static final field Health Lme/devnatan/dockerkt/models/system/EventAction; + public static final field ImageLoad Lme/devnatan/dockerkt/models/system/EventAction; + public static final field ImagePull Lme/devnatan/dockerkt/models/system/EventAction; + public static final field ImagePush Lme/devnatan/dockerkt/models/system/EventAction; + public static final field ImageSave Lme/devnatan/dockerkt/models/system/EventAction; + public static final field ImageTag Lme/devnatan/dockerkt/models/system/EventAction; + public static final field ImageUntag Lme/devnatan/dockerkt/models/system/EventAction; + public static final field Import Lme/devnatan/dockerkt/models/system/EventAction; + public static final field Kill Lme/devnatan/dockerkt/models/system/EventAction; + public static final field NetworkConnect Lme/devnatan/dockerkt/models/system/EventAction; + public static final field NetworkDisconnect Lme/devnatan/dockerkt/models/system/EventAction; + public static final field Oom Lme/devnatan/dockerkt/models/system/EventAction; + public static final field Pause Lme/devnatan/dockerkt/models/system/EventAction; + public static final field Prune Lme/devnatan/dockerkt/models/system/EventAction; + public static final field Remove Lme/devnatan/dockerkt/models/system/EventAction; + public static final field Rename Lme/devnatan/dockerkt/models/system/EventAction; + public static final field Resize Lme/devnatan/dockerkt/models/system/EventAction; + public static final field Restart Lme/devnatan/dockerkt/models/system/EventAction; + public static final field Start Lme/devnatan/dockerkt/models/system/EventAction; + public static final field Stop Lme/devnatan/dockerkt/models/system/EventAction; + public static final field Top Lme/devnatan/dockerkt/models/system/EventAction; + public static final field Unknown Lme/devnatan/dockerkt/models/system/EventAction; + public static final field Unpause Lme/devnatan/dockerkt/models/system/EventAction; + public static final field Update Lme/devnatan/dockerkt/models/system/EventAction; public static fun getEntries ()Lkotlin/enums/EnumEntries; public static fun valueOf (Ljava/lang/String;)Lme/devnatan/dockerkt/models/system/EventAction; public static fun values ()[Lme/devnatan/dockerkt/models/system/EventAction; @@ -3493,9 +3493,9 @@ public final class me/devnatan/dockerkt/models/system/EventKt { public final class me/devnatan/dockerkt/models/system/EventScope : java/lang/Enum { public static final field Companion Lme/devnatan/dockerkt/models/system/EventScope$Companion; - public static final field LOCAL Lme/devnatan/dockerkt/models/system/EventScope; - public static final field SWARM Lme/devnatan/dockerkt/models/system/EventScope; - public static final field UNKNOWN Lme/devnatan/dockerkt/models/system/EventScope; + public static final field Local Lme/devnatan/dockerkt/models/system/EventScope; + public static final field Swarm Lme/devnatan/dockerkt/models/system/EventScope; + public static final field Unknown Lme/devnatan/dockerkt/models/system/EventScope; public static fun getEntries ()Lkotlin/enums/EnumEntries; public static fun valueOf (Ljava/lang/String;)Lme/devnatan/dockerkt/models/system/EventScope; public static fun values ()[Lme/devnatan/dockerkt/models/system/EventScope; @@ -3506,19 +3506,19 @@ public final class me/devnatan/dockerkt/models/system/EventScope$Companion { } public final class me/devnatan/dockerkt/models/system/EventType : java/lang/Enum { - public static final field BUILDER Lme/devnatan/dockerkt/models/system/EventType; - public static final field CONFIG Lme/devnatan/dockerkt/models/system/EventType; - public static final field CONTAINER Lme/devnatan/dockerkt/models/system/EventType; + public static final field Builder Lme/devnatan/dockerkt/models/system/EventType; public static final field Companion Lme/devnatan/dockerkt/models/system/EventType$Companion; - public static final field DAEMON Lme/devnatan/dockerkt/models/system/EventType; - public static final field IMAGE Lme/devnatan/dockerkt/models/system/EventType; - public static final field NETWORK Lme/devnatan/dockerkt/models/system/EventType; - public static final field NODE Lme/devnatan/dockerkt/models/system/EventType; - public static final field PLUGIN Lme/devnatan/dockerkt/models/system/EventType; - public static final field SECRET Lme/devnatan/dockerkt/models/system/EventType; - public static final field SERVICE Lme/devnatan/dockerkt/models/system/EventType; - public static final field UNKNOWN Lme/devnatan/dockerkt/models/system/EventType; - public static final field VOLUME Lme/devnatan/dockerkt/models/system/EventType; + public static final field Config Lme/devnatan/dockerkt/models/system/EventType; + public static final field Container Lme/devnatan/dockerkt/models/system/EventType; + public static final field Daemon Lme/devnatan/dockerkt/models/system/EventType; + public static final field Image Lme/devnatan/dockerkt/models/system/EventType; + public static final field Network Lme/devnatan/dockerkt/models/system/EventType; + public static final field Node Lme/devnatan/dockerkt/models/system/EventType; + public static final field Plugin Lme/devnatan/dockerkt/models/system/EventType; + public static final field Secret Lme/devnatan/dockerkt/models/system/EventType; + public static final field Service Lme/devnatan/dockerkt/models/system/EventType; + public static final field Unknown Lme/devnatan/dockerkt/models/system/EventType; + public static final field Volume Lme/devnatan/dockerkt/models/system/EventType; public static fun getEntries ()Lkotlin/enums/EnumEntries; public static fun valueOf (Ljava/lang/String;)Lme/devnatan/dockerkt/models/system/EventType; public static fun values ()[Lme/devnatan/dockerkt/models/system/EventType; @@ -3539,6 +3539,7 @@ public final class me/devnatan/dockerkt/models/system/MonitorEventsOptions { public final fun copy (Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;)Lme/devnatan/dockerkt/models/system/MonitorEventsOptions; public static synthetic fun copy$default (Lme/devnatan/dockerkt/models/system/MonitorEventsOptions;Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;ILjava/lang/Object;)Lme/devnatan/dockerkt/models/system/MonitorEventsOptions; public fun equals (Ljava/lang/Object;)Z + public final fun filterByAction ([Lme/devnatan/dockerkt/models/system/EventAction;)Lme/devnatan/dockerkt/models/system/MonitorEventsOptions; public final fun filterByType ([Lme/devnatan/dockerkt/models/system/EventType;)Lme/devnatan/dockerkt/models/system/MonitorEventsOptions; public final fun getFilters ()Ljava/util/Map; public final fun getSince ()Ljava/lang/String; diff --git a/api/docker-kotlin.klib.api b/api/docker-kotlin.klib.api index d7fbea65..52a439e5 100644 --- a/api/docker-kotlin.klib.api +++ b/api/docker-kotlin.klib.api @@ -7,44 +7,44 @@ // Library unique name: final enum class me.devnatan.dockerkt.models.system/EventAction : kotlin/Enum { // me.devnatan.dockerkt.models.system/EventAction|null[0] - enum entry ATTACH // me.devnatan.dockerkt.models.system/EventAction.ATTACH|null[0] - enum entry COMMIT // me.devnatan.dockerkt.models.system/EventAction.COMMIT|null[0] - enum entry COPY // me.devnatan.dockerkt.models.system/EventAction.COPY|null[0] - enum entry CREATE // me.devnatan.dockerkt.models.system/EventAction.CREATE|null[0] - enum entry DAEMON_RELOAD // me.devnatan.dockerkt.models.system/EventAction.DAEMON_RELOAD|null[0] - enum entry DELETE // me.devnatan.dockerkt.models.system/EventAction.DELETE|null[0] - enum entry DESTROY // me.devnatan.dockerkt.models.system/EventAction.DESTROY|null[0] - enum entry DETACH // me.devnatan.dockerkt.models.system/EventAction.DETACH|null[0] - enum entry DIE // me.devnatan.dockerkt.models.system/EventAction.DIE|null[0] - enum entry EXEC_CREATE // me.devnatan.dockerkt.models.system/EventAction.EXEC_CREATE|null[0] - enum entry EXEC_DETACH // me.devnatan.dockerkt.models.system/EventAction.EXEC_DETACH|null[0] - enum entry EXEC_DIE // me.devnatan.dockerkt.models.system/EventAction.EXEC_DIE|null[0] - enum entry EXEC_START // me.devnatan.dockerkt.models.system/EventAction.EXEC_START|null[0] - enum entry EXPORT // me.devnatan.dockerkt.models.system/EventAction.EXPORT|null[0] - enum entry HEALTH // me.devnatan.dockerkt.models.system/EventAction.HEALTH|null[0] - enum entry IMAGE_LOAD // me.devnatan.dockerkt.models.system/EventAction.IMAGE_LOAD|null[0] - enum entry IMAGE_PULL // me.devnatan.dockerkt.models.system/EventAction.IMAGE_PULL|null[0] - enum entry IMAGE_PUSH // me.devnatan.dockerkt.models.system/EventAction.IMAGE_PUSH|null[0] - enum entry IMAGE_SAVE // me.devnatan.dockerkt.models.system/EventAction.IMAGE_SAVE|null[0] - enum entry IMAGE_TAG // me.devnatan.dockerkt.models.system/EventAction.IMAGE_TAG|null[0] - enum entry IMAGE_UNTAG // me.devnatan.dockerkt.models.system/EventAction.IMAGE_UNTAG|null[0] - enum entry IMPORT // me.devnatan.dockerkt.models.system/EventAction.IMPORT|null[0] - enum entry KILL // me.devnatan.dockerkt.models.system/EventAction.KILL|null[0] - enum entry NET_CONNECT // me.devnatan.dockerkt.models.system/EventAction.NET_CONNECT|null[0] - enum entry NET_DISCONNECT // me.devnatan.dockerkt.models.system/EventAction.NET_DISCONNECT|null[0] - enum entry OOM // me.devnatan.dockerkt.models.system/EventAction.OOM|null[0] - enum entry PAUSE // me.devnatan.dockerkt.models.system/EventAction.PAUSE|null[0] - enum entry PRUNE // me.devnatan.dockerkt.models.system/EventAction.PRUNE|null[0] - enum entry REMOVE // me.devnatan.dockerkt.models.system/EventAction.REMOVE|null[0] - enum entry RENAME // me.devnatan.dockerkt.models.system/EventAction.RENAME|null[0] - enum entry RESIZE // me.devnatan.dockerkt.models.system/EventAction.RESIZE|null[0] - enum entry RESTART // me.devnatan.dockerkt.models.system/EventAction.RESTART|null[0] - enum entry START // me.devnatan.dockerkt.models.system/EventAction.START|null[0] - enum entry STOP // me.devnatan.dockerkt.models.system/EventAction.STOP|null[0] - enum entry TOP // me.devnatan.dockerkt.models.system/EventAction.TOP|null[0] - enum entry UNKNOWN // me.devnatan.dockerkt.models.system/EventAction.UNKNOWN|null[0] - enum entry UNPAUSE // me.devnatan.dockerkt.models.system/EventAction.UNPAUSE|null[0] - enum entry UPDATE // me.devnatan.dockerkt.models.system/EventAction.UPDATE|null[0] + enum entry Attach // me.devnatan.dockerkt.models.system/EventAction.Attach|null[0] + enum entry Commit // me.devnatan.dockerkt.models.system/EventAction.Commit|null[0] + enum entry Copy // me.devnatan.dockerkt.models.system/EventAction.Copy|null[0] + enum entry Create // me.devnatan.dockerkt.models.system/EventAction.Create|null[0] + enum entry DaemonReload // me.devnatan.dockerkt.models.system/EventAction.DaemonReload|null[0] + enum entry Delete // me.devnatan.dockerkt.models.system/EventAction.Delete|null[0] + enum entry Destroy // me.devnatan.dockerkt.models.system/EventAction.Destroy|null[0] + enum entry Detach // me.devnatan.dockerkt.models.system/EventAction.Detach|null[0] + enum entry Die // me.devnatan.dockerkt.models.system/EventAction.Die|null[0] + enum entry ExecCreate // me.devnatan.dockerkt.models.system/EventAction.ExecCreate|null[0] + enum entry ExecDetach // me.devnatan.dockerkt.models.system/EventAction.ExecDetach|null[0] + enum entry ExecDie // me.devnatan.dockerkt.models.system/EventAction.ExecDie|null[0] + enum entry ExecStart // me.devnatan.dockerkt.models.system/EventAction.ExecStart|null[0] + enum entry Export // me.devnatan.dockerkt.models.system/EventAction.Export|null[0] + enum entry Health // me.devnatan.dockerkt.models.system/EventAction.Health|null[0] + enum entry ImageLoad // me.devnatan.dockerkt.models.system/EventAction.ImageLoad|null[0] + enum entry ImagePull // me.devnatan.dockerkt.models.system/EventAction.ImagePull|null[0] + enum entry ImagePush // me.devnatan.dockerkt.models.system/EventAction.ImagePush|null[0] + enum entry ImageSave // me.devnatan.dockerkt.models.system/EventAction.ImageSave|null[0] + enum entry ImageTag // me.devnatan.dockerkt.models.system/EventAction.ImageTag|null[0] + enum entry ImageUntag // me.devnatan.dockerkt.models.system/EventAction.ImageUntag|null[0] + enum entry Import // me.devnatan.dockerkt.models.system/EventAction.Import|null[0] + enum entry Kill // me.devnatan.dockerkt.models.system/EventAction.Kill|null[0] + enum entry NetworkConnect // me.devnatan.dockerkt.models.system/EventAction.NetworkConnect|null[0] + enum entry NetworkDisconnect // me.devnatan.dockerkt.models.system/EventAction.NetworkDisconnect|null[0] + enum entry Oom // me.devnatan.dockerkt.models.system/EventAction.Oom|null[0] + enum entry Pause // me.devnatan.dockerkt.models.system/EventAction.Pause|null[0] + enum entry Prune // me.devnatan.dockerkt.models.system/EventAction.Prune|null[0] + enum entry Remove // me.devnatan.dockerkt.models.system/EventAction.Remove|null[0] + enum entry Rename // me.devnatan.dockerkt.models.system/EventAction.Rename|null[0] + enum entry Resize // me.devnatan.dockerkt.models.system/EventAction.Resize|null[0] + enum entry Restart // me.devnatan.dockerkt.models.system/EventAction.Restart|null[0] + enum entry Start // me.devnatan.dockerkt.models.system/EventAction.Start|null[0] + enum entry Stop // me.devnatan.dockerkt.models.system/EventAction.Stop|null[0] + enum entry Top // me.devnatan.dockerkt.models.system/EventAction.Top|null[0] + enum entry Unknown // me.devnatan.dockerkt.models.system/EventAction.Unknown|null[0] + enum entry Unpause // me.devnatan.dockerkt.models.system/EventAction.Unpause|null[0] + enum entry Update // me.devnatan.dockerkt.models.system/EventAction.Update|null[0] final val entries // me.devnatan.dockerkt.models.system/EventAction.entries|#static{}entries[0] final fun (): kotlin.enums/EnumEntries // me.devnatan.dockerkt.models.system/EventAction.entries.|#static(){}[0] @@ -59,9 +59,9 @@ final enum class me.devnatan.dockerkt.models.system/EventAction : kotlin/Enum { // me.devnatan.dockerkt.models.system/EventScope|null[0] - enum entry LOCAL // me.devnatan.dockerkt.models.system/EventScope.LOCAL|null[0] - enum entry SWARM // me.devnatan.dockerkt.models.system/EventScope.SWARM|null[0] - enum entry UNKNOWN // me.devnatan.dockerkt.models.system/EventScope.UNKNOWN|null[0] + enum entry Local // me.devnatan.dockerkt.models.system/EventScope.Local|null[0] + enum entry Swarm // me.devnatan.dockerkt.models.system/EventScope.Swarm|null[0] + enum entry Unknown // me.devnatan.dockerkt.models.system/EventScope.Unknown|null[0] final val entries // me.devnatan.dockerkt.models.system/EventScope.entries|#static{}entries[0] final fun (): kotlin.enums/EnumEntries // me.devnatan.dockerkt.models.system/EventScope.entries.|#static(){}[0] @@ -76,18 +76,18 @@ final enum class me.devnatan.dockerkt.models.system/EventScope : kotlin/Enum { // me.devnatan.dockerkt.models.system/EventType|null[0] - enum entry BUILDER // me.devnatan.dockerkt.models.system/EventType.BUILDER|null[0] - enum entry CONFIG // me.devnatan.dockerkt.models.system/EventType.CONFIG|null[0] - enum entry CONTAINER // me.devnatan.dockerkt.models.system/EventType.CONTAINER|null[0] - enum entry DAEMON // me.devnatan.dockerkt.models.system/EventType.DAEMON|null[0] - enum entry IMAGE // me.devnatan.dockerkt.models.system/EventType.IMAGE|null[0] - enum entry NETWORK // me.devnatan.dockerkt.models.system/EventType.NETWORK|null[0] - enum entry NODE // me.devnatan.dockerkt.models.system/EventType.NODE|null[0] - enum entry PLUGIN // me.devnatan.dockerkt.models.system/EventType.PLUGIN|null[0] - enum entry SECRET // me.devnatan.dockerkt.models.system/EventType.SECRET|null[0] - enum entry SERVICE // me.devnatan.dockerkt.models.system/EventType.SERVICE|null[0] - enum entry UNKNOWN // me.devnatan.dockerkt.models.system/EventType.UNKNOWN|null[0] - enum entry VOLUME // me.devnatan.dockerkt.models.system/EventType.VOLUME|null[0] + enum entry Builder // me.devnatan.dockerkt.models.system/EventType.Builder|null[0] + enum entry Config // me.devnatan.dockerkt.models.system/EventType.Config|null[0] + enum entry Container // me.devnatan.dockerkt.models.system/EventType.Container|null[0] + enum entry Daemon // me.devnatan.dockerkt.models.system/EventType.Daemon|null[0] + enum entry Image // me.devnatan.dockerkt.models.system/EventType.Image|null[0] + enum entry Network // me.devnatan.dockerkt.models.system/EventType.Network|null[0] + enum entry Node // me.devnatan.dockerkt.models.system/EventType.Node|null[0] + enum entry Plugin // me.devnatan.dockerkt.models.system/EventType.Plugin|null[0] + enum entry Secret // me.devnatan.dockerkt.models.system/EventType.Secret|null[0] + enum entry Service // me.devnatan.dockerkt.models.system/EventType.Service|null[0] + enum entry Unknown // me.devnatan.dockerkt.models.system/EventType.Unknown|null[0] + enum entry Volume // me.devnatan.dockerkt.models.system/EventType.Volume|null[0] final val entries // me.devnatan.dockerkt.models.system/EventType.entries|#static{}entries[0] final fun (): kotlin.enums/EnumEntries // me.devnatan.dockerkt.models.system/EventType.entries.|#static(){}[0] @@ -2396,6 +2396,8 @@ final class me.devnatan.dockerkt.models.system/Event { // me.devnatan.dockerkt.m final fun (): me.devnatan.dockerkt.models.system/EventAction // me.devnatan.dockerkt.models.system/Event.action.|(){}[0] final val actor // me.devnatan.dockerkt.models.system/Event.actor|{}actor[0] final fun (): me.devnatan.dockerkt.models.system/EventActor // me.devnatan.dockerkt.models.system/Event.actor.|(){}[0] + final val result // me.devnatan.dockerkt.models.system/Event.result|{}result[0] + final fun (): kotlin/String? // me.devnatan.dockerkt.models.system/Event.result.|(){}[0] final val scope // me.devnatan.dockerkt.models.system/Event.scope|{}scope[0] final fun (): me.devnatan.dockerkt.models.system/EventScope // me.devnatan.dockerkt.models.system/Event.scope.|(){}[0] final val timeMillis // me.devnatan.dockerkt.models.system/Event.timeMillis|{}timeMillis[0] @@ -2406,7 +2408,6 @@ final class me.devnatan.dockerkt.models.system/Event { // me.devnatan.dockerkt.m final fun (): me.devnatan.dockerkt.models.system/EventType // me.devnatan.dockerkt.models.system/Event.type.|(){}[0] final fun component1(): me.devnatan.dockerkt.models.system/EventType // me.devnatan.dockerkt.models.system/Event.component1|component1(){}[0] - final fun component2(): me.devnatan.dockerkt.models.system/EventAction // me.devnatan.dockerkt.models.system/Event.component2|component2(){}[0] final fun component3(): me.devnatan.dockerkt.models.system/EventActor // me.devnatan.dockerkt.models.system/Event.component3|component3(){}[0] final fun component4(): me.devnatan.dockerkt.models.system/EventScope // me.devnatan.dockerkt.models.system/Event.component4|component4(){}[0] final fun component5(): kotlin/Long // me.devnatan.dockerkt.models.system/Event.component5|component5(){}[0] @@ -2478,6 +2479,7 @@ final class me.devnatan.dockerkt.models.system/MonitorEventsOptions { // me.devn final fun component3(): kotlin.collections/MutableMap> // me.devnatan.dockerkt.models.system/MonitorEventsOptions.component3|component3(){}[0] final fun copy(kotlin/String? = ..., kotlin/String? = ..., kotlin.collections/MutableMap> = ...): me.devnatan.dockerkt.models.system/MonitorEventsOptions // me.devnatan.dockerkt.models.system/MonitorEventsOptions.copy|copy(kotlin.String?;kotlin.String?;kotlin.collections.MutableMap>){}[0] final fun equals(kotlin/Any?): kotlin/Boolean // me.devnatan.dockerkt.models.system/MonitorEventsOptions.equals|equals(kotlin.Any?){}[0] + final fun filterByAction(kotlin/Array...): me.devnatan.dockerkt.models.system/MonitorEventsOptions // me.devnatan.dockerkt.models.system/MonitorEventsOptions.filterByAction|filterByAction(kotlin.Array...){}[0] final fun filterByType(kotlin/Array...): me.devnatan.dockerkt.models.system/MonitorEventsOptions // me.devnatan.dockerkt.models.system/MonitorEventsOptions.filterByType|filterByType(kotlin.Array...){}[0] final fun hashCode(): kotlin/Int // me.devnatan.dockerkt.models.system/MonitorEventsOptions.hashCode|hashCode(){}[0] final fun toString(): kotlin/String // me.devnatan.dockerkt.models.system/MonitorEventsOptions.toString|toString(){}[0] diff --git a/src/commonMain/kotlin/me/devnatan/dockerkt/models/system/Event.kt b/src/commonMain/kotlin/me/devnatan/dockerkt/models/system/Event.kt index 73926ff0..3a2ef667 100644 --- a/src/commonMain/kotlin/me/devnatan/dockerkt/models/system/Event.kt +++ b/src/commonMain/kotlin/me/devnatan/dockerkt/models/system/Event.kt @@ -10,165 +10,180 @@ import kotlin.time.Instant @Serializable public data class Event internal constructor( @SerialName("Type") public val type: EventType, - @SerialName("Action") public val action: EventAction, + @SerialName("Action") private val rawAction: String, @SerialName("Actor") public val actor: EventActor, @SerialName("scope") public val scope: EventScope, @SerialName("time") public val timeMillis: Long, @SerialName("timeNano") public val timeNanos: Long, -) +) { + val result: String? by lazy { + rawAction + .substringAfter( + delimiter = ":", + missingDelimiterValue = "", + ).ifEmpty { null } + ?.trim() + } + + val action: EventAction by lazy { + EventAction.entries.first { entry -> + entry.name.equals(rawAction.substringBefore(":").uppercase(), ignoreCase = true) + } + } +} public val Event.time: Instant get() = Instant.fromEpochMilliseconds(timeMillis) @Serializable public enum class EventAction { @SerialName("attach") - ATTACH, + Attach, @SerialName("commit") - COMMIT, + Commit, @SerialName("copy") - COPY, + Copy, @SerialName("create") - CREATE, + Create, @SerialName("delete") - DELETE, + Delete, @SerialName("destroy") - DESTROY, + Destroy, @SerialName("detach") - DETACH, + Detach, @SerialName("die") - DIE, + Die, @SerialName("exec_create") - EXEC_CREATE, + ExecCreate, @SerialName("exec_detach") - EXEC_DETACH, + ExecDetach, @SerialName("exec_start") - EXEC_START, + ExecStart, @SerialName("exec_die") - EXEC_DIE, + ExecDie, @SerialName("import") - IMPORT, + Import, @SerialName("export") - EXPORT, + Export, @SerialName("health_status") - HEALTH, + Health, @SerialName("kill") - KILL, + Kill, @SerialName("oom") - OOM, + Oom, @SerialName("pause") - PAUSE, + Pause, @SerialName("rename") - RENAME, + Rename, @SerialName("resize") - RESIZE, + Resize, @SerialName("restart") - RESTART, + Restart, @SerialName("start") - START, + Start, @SerialName("stop") - STOP, + Stop, @SerialName("top") - TOP, + Top, @SerialName("unpause") - UNPAUSE, + Unpause, @SerialName("update") - UPDATE, + Update, @SerialName("prune") - PRUNE, + Prune, @SerialName("remove") - REMOVE, + Remove, @SerialName("load") - IMAGE_LOAD, + ImageLoad, @SerialName("pull") - IMAGE_PULL, + ImagePull, @SerialName("push") - IMAGE_PUSH, + ImagePush, @SerialName("save") - IMAGE_SAVE, + ImageSave, @SerialName("tag") - IMAGE_TAG, + ImageTag, @SerialName("untag") - IMAGE_UNTAG, + ImageUntag, @SerialName("reload") - DAEMON_RELOAD, + DaemonReload, @SerialName("connect") - NET_CONNECT, + NetworkConnect, @SerialName("disconnect") - NET_DISCONNECT, - UNKNOWN, + NetworkDisconnect, + Unknown, } @Serializable public enum class EventType { @SerialName("builder") - BUILDER, + Builder, @SerialName("config") - CONFIG, + Config, @SerialName("container") - CONTAINER, + Container, @SerialName("daemon") - DAEMON, + Daemon, @SerialName("image") - IMAGE, + Image, @SerialName("network") - NETWORK, + Network, @SerialName("node") - NODE, + Node, @SerialName("plugin") - PLUGIN, + Plugin, @SerialName("secret") - SECRET, + Secret, @SerialName("service") - SERVICE, + Service, @SerialName("volume") - VOLUME, - UNKNOWN, + Volume, + Unknown, } @Serializable @@ -180,9 +195,10 @@ public data class EventActor internal constructor( @Serializable public enum class EventScope { @SerialName("local") - LOCAL, + Local, @SerialName("swarm") - SWARM, - UNKNOWN, + Swarm, + + Unknown, } diff --git a/src/commonMain/kotlin/me/devnatan/dockerkt/models/system/MonitorEventsOptions.kt b/src/commonMain/kotlin/me/devnatan/dockerkt/models/system/MonitorEventsOptions.kt index 96e19f26..8f6e8968 100644 --- a/src/commonMain/kotlin/me/devnatan/dockerkt/models/system/MonitorEventsOptions.kt +++ b/src/commonMain/kotlin/me/devnatan/dockerkt/models/system/MonitorEventsOptions.kt @@ -20,6 +20,11 @@ public data class MonitorEventsOptions( types.forEach { type -> addFilter("type", type.name.lowercase()) } } + public fun filterByAction(vararg actions: EventAction): MonitorEventsOptions = + apply { + actions.forEach { action -> addFilter("event", action.name.lowercase()) } + } + /** * Adds a new filter to the monitor events. *