com.pulumi.kubernetes.events.v1.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.
The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.kubernetes.events.v1.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.v1.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.v1.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.v1.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. Events have a limited retention time and triggers and messages may evolve with time. Event consumers should not rely on the timing of an event with a given Reason reflecting a consistent underlying trigger, or the continued existence of events with that Reason. Events should be treated as informative, best-effort, supplemental data.
*/
public class EventPatch internal constructor(
override val javaResource: com.pulumi.kubernetes.events.v1.EventPatch,
) : KotlinCustomResource(javaResource, EventPatchMapper) {
/**
* action is what action was taken/failed regarding to the regarding object. It is machine-readable. This field cannot be empty for new Events and it can have at most 128 characters.
*/
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)
})
/**
* deprecatedCount is the 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)
})
/**
* deprecatedFirstTimestamp is the 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)
})
/**
* deprecatedLastTimestamp is the 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)
})
/**
* deprecatedSource is the 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)
})
/**
* eventTime is the time when this Event was first observed. It is required.
*/
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) })
/**
* Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
*/
public val metadata: Output?
get() = javaResource.metadata().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
objectMetaPatchToKotlin(args0)
})
}).orElse(null)
})
/**
* note is 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) })
/**
* reason is why the action was taken. It is human-readable. This field cannot be empty for new Events and it can have at most 128 characters.
*/
public val reason: Output?
get() = javaResource.reason().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* regarding contains 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)
})
/**
* related is the 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)
})
/**
* reportingController is the name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`. This field cannot be empty for new Events.
*/
public val reportingController: Output?
get() = javaResource.reportingController().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* reportingInstance is the ID of the controller instance, e.g. `kubelet-xyzf`. This field cannot be empty for new Events and it can have at most 128 characters.
*/
public val reportingInstance: Output?
get() = javaResource.reportingInstance().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* series is 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 is the type of this event (Normal, Warning), new types could be added in the future. It is machine-readable. This field cannot be empty for new Events.
*/
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.v1.EventPatch::class == javaResource::class
override fun map(javaResource: Resource): EventPatch = EventPatch(
javaResource as
com.pulumi.kubernetes.events.v1.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