com.pulumi.kubernetes.events.v1beta1.kotlin.EventPatch.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-kubernetes-kotlin Show documentation
Show all versions of pulumi-kubernetes-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.kubernetes.events.v1beta1.kotlin
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.kubernetes.core.v1.kotlin.outputs.EventSourcePatch
import com.pulumi.kubernetes.core.v1.kotlin.outputs.ObjectReferencePatch
import com.pulumi.kubernetes.events.v1beta1.kotlin.outputs.EventSeriesPatch
import com.pulumi.kubernetes.meta.v1.kotlin.outputs.ObjectMetaPatch
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import com.pulumi.kubernetes.core.v1.kotlin.outputs.EventSourcePatch.Companion.toKotlin as eventSourcePatchToKotlin
import com.pulumi.kubernetes.core.v1.kotlin.outputs.ObjectReferencePatch.Companion.toKotlin as objectReferencePatchToKotlin
import com.pulumi.kubernetes.events.v1beta1.kotlin.outputs.EventSeriesPatch.Companion.toKotlin as eventSeriesPatchToKotlin
import com.pulumi.kubernetes.meta.v1.kotlin.outputs.ObjectMetaPatch.Companion.toKotlin as objectMetaPatchToKotlin
/**
* Builder for [EventPatch].
*/
@PulumiTagMarker
public class EventPatchResourceBuilder internal constructor() {
public var name: String? = null
public var args: EventPatchArgs = EventPatchArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend EventPatchArgsBuilder.() -> Unit) {
val builder = EventPatchArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): EventPatch {
val builtJavaResource = com.pulumi.kubernetes.events.v1beta1.EventPatch(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return EventPatch(builtJavaResource)
}
}
/**
* Patch resources are used to modify existing Kubernetes resources by using
* Server-Side Apply updates. The name of the resource must be specified, but all other properties are optional. More than
* one patch may be applied to the same resource, and a random FieldManager name will be used for each Patch resource.
* Conflicts will result in an error by default, but can be forced using the "pulumi.com/patchForce" annotation. See the
* [Server-Side Apply Docs](https://www.pulumi.com/registry/packages/kubernetes/how-to-guides/managing-resources-with-server-side-apply/) for
* additional information about using Server-Side Apply to manage Kubernetes resources with Pulumi.
* Event is a report of an event somewhere in the cluster. It generally denotes some state change in the system.
*/
public class EventPatch internal constructor(
override val javaResource: com.pulumi.kubernetes.events.v1beta1.EventPatch,
) : KotlinCustomResource(javaResource, EventPatchMapper) {
/**
* What action was taken/failed regarding to the regarding object.
*/
public val action: Output?
get() = javaResource.action().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
*/
public val apiVersion: Output?
get() = javaResource.apiVersion().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Deprecated field assuring backward compatibility with core.v1 Event type
*/
public val deprecatedCount: Output?
get() = javaResource.deprecatedCount().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Deprecated field assuring backward compatibility with core.v1 Event type
*/
public val deprecatedFirstTimestamp: Output?
get() = javaResource.deprecatedFirstTimestamp().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Deprecated field assuring backward compatibility with core.v1 Event type
*/
public val deprecatedLastTimestamp: Output?
get() = javaResource.deprecatedLastTimestamp().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Deprecated field assuring backward compatibility with core.v1 Event type
*/
public val deprecatedSource: Output?
get() = javaResource.deprecatedSource().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> eventSourcePatchToKotlin(args0) })
}).orElse(null)
})
/**
* Required. Time when this Event was first observed.
*/
public val eventTime: Output?
get() = javaResource.eventTime().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
*/
public val kind: Output?
get() = javaResource.kind().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
public val metadata: Output?
get() = javaResource.metadata().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
objectMetaPatchToKotlin(args0)
})
}).orElse(null)
})
/**
* Optional. A human-readable description of the status of this operation. Maximal length of the note is 1kB, but libraries should be prepared to handle values up to 64kB.
*/
public val note: Output?
get() = javaResource.note().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* Why the action was taken.
*/
public val reason: Output?
get() = javaResource.reason().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The object this Event is about. In most cases it's an Object reporting controller implements. E.g. ReplicaSetController implements ReplicaSets and this event is emitted because it acts on some changes in a ReplicaSet object.
*/
public val regarding: Output?
get() = javaResource.regarding().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
objectReferencePatchToKotlin(args0)
})
}).orElse(null)
})
/**
* Optional secondary object for more complex actions. E.g. when regarding object triggers a creation or deletion of related object.
*/
public val related: Output?
get() = javaResource.related().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
objectReferencePatchToKotlin(args0)
})
}).orElse(null)
})
/**
* Name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`.
*/
public val reportingController: Output?
get() = javaResource.reportingController().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* ID of the controller instance, e.g. `kubelet-xyzf`.
*/
public val reportingInstance: Output?
get() = javaResource.reportingInstance().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Data about the Event series this event represents or nil if it's a singleton Event.
*/
public val series: Output?
get() = javaResource.series().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
eventSeriesPatchToKotlin(args0)
})
}).orElse(null)
})
/**
* Type of this event (Normal, Warning), new types could be added in the future.
*/
public val type: Output?
get() = javaResource.type().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
}
public object EventPatchMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.kubernetes.events.v1beta1.EventPatch::class == javaResource::class
override fun map(javaResource: Resource): EventPatch = EventPatch(
javaResource as
com.pulumi.kubernetes.events.v1beta1.EventPatch,
)
}
/**
* @see [EventPatch].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [EventPatch].
*/
public suspend fun eventPatch(name: String, block: suspend EventPatchResourceBuilder.() -> Unit): EventPatch {
val builder = EventPatchResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [EventPatch].
* @param name The _unique_ name of the resulting resource.
*/
public fun eventPatch(name: String): EventPatch {
val builder = EventPatchResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy