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

com.pulumi.kubernetes.meta.v1.kotlin.outputs.ManagedFieldsEntry.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 4.18.2.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.kubernetes.meta.v1.kotlin.outputs

import com.google.gson.GsonBuilder
import kotlinx.serialization.json.Json
import kotlinx.serialization.json.JsonElement
import kotlin.String
import kotlin.Suppress

/**
 * ManagedFieldsEntry is a workflow-id, a FieldSet and the group version of the resource that the fieldset applies to.
 * @property apiVersion APIVersion defines the version of this resource that this field set applies to. The format is "group/version" just like the top-level APIVersion field. It is necessary to track the version of a field set because it cannot be automatically converted.
 * @property fieldsType FieldsType is the discriminator for the different fields format and version. There is currently only one possible value: "FieldsV1"
 * @property fieldsV1 FieldsV1 holds the first JSON version format as described in the "FieldsV1" type.
 * @property manager Manager is an identifier of the workflow managing these fields.
 * @property operation Operation is the type of operation which lead to this ManagedFieldsEntry being created. The only valid values for this field are 'Apply' and 'Update'.
 * @property subresource Subresource is the name of the subresource used to update that object, or empty string if the object was updated through the main resource. The value of this field is used to distinguish between managers, even if they share the same name. For example, a status update will be distinct from a regular update using the same manager name. Note that the APIVersion field is not related to the Subresource field and it always corresponds to the version of the main resource.
 * @property time Time is the timestamp of when the ManagedFields entry was added. The timestamp will also be updated if a field is added, the manager changes any of the owned fields value or removes a field. The timestamp does not update when a field is removed from the entry because another manager took it over.
 */
public data class ManagedFieldsEntry(
    public val apiVersion: String? = null,
    public val fieldsType: String? = null,
    public val fieldsV1: JsonElement? = null,
    public val manager: String? = null,
    public val operation: String? = null,
    public val subresource: String? = null,
    public val time: String? = null,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.kubernetes.meta.v1.outputs.ManagedFieldsEntry): ManagedFieldsEntry = ManagedFieldsEntry(
            apiVersion = javaType.apiVersion().map({ args0 -> args0 }).orElse(null),
            fieldsType = javaType.fieldsType().map({ args0 -> args0 }).orElse(null),
            fieldsV1 = javaType.fieldsV1().map({ args0 ->
                Json.parseToJsonElement(GsonBuilder().serializeNulls().create().toJson(args0))
            }).orElse(null),
            manager = javaType.manager().map({ args0 -> args0 }).orElse(null),
            operation = javaType.operation().map({ args0 -> args0 }).orElse(null),
            subresource = javaType.subresource().map({ args0 -> args0 }).orElse(null),
            time = javaType.time().map({ args0 -> args0 }).orElse(null),
        )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy