Package org.cdk8s.plus24.k8s
Class KubeEventProps.Builder
- java.lang.Object
-
- org.cdk8s.plus24.k8s.KubeEventProps.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<KubeEventProps>
- Enclosing interface:
- KubeEventProps
@Stability(Stable) public static final class KubeEventProps.Builder extends Object implements software.amazon.jsii.Builder<KubeEventProps>
A builder forKubeEventProps
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
eventTime
@Stability(Stable) public KubeEventProps.Builder eventTime(Instant eventTime)
Sets the value ofKubeEventProps.getEventTime()
- Parameters:
eventTime
- eventTime is the time when this Event was first observed. This parameter is required. It is required.- Returns:
this
-
action
@Stability(Stable) public KubeEventProps.Builder action(String action)
Sets the value ofKubeEventProps.getAction()
- Parameters:
action
- 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.- Returns:
this
-
deprecatedCount
@Stability(Stable) public KubeEventProps.Builder deprecatedCount(Number deprecatedCount)
Sets the value ofKubeEventProps.getDeprecatedCount()
- Parameters:
deprecatedCount
- deprecatedCount is the deprecated field assuring backward compatibility with core.v1 Event type.- Returns:
this
-
deprecatedFirstTimestamp
@Stability(Stable) public KubeEventProps.Builder deprecatedFirstTimestamp(Instant deprecatedFirstTimestamp)
Sets the value ofKubeEventProps.getDeprecatedFirstTimestamp()
- Parameters:
deprecatedFirstTimestamp
- deprecatedFirstTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.- Returns:
this
-
deprecatedLastTimestamp
@Stability(Stable) public KubeEventProps.Builder deprecatedLastTimestamp(Instant deprecatedLastTimestamp)
Sets the value ofKubeEventProps.getDeprecatedLastTimestamp()
- Parameters:
deprecatedLastTimestamp
- deprecatedLastTimestamp is the deprecated field assuring backward compatibility with core.v1 Event type.- Returns:
this
-
deprecatedSource
@Stability(Stable) public KubeEventProps.Builder deprecatedSource(EventSource deprecatedSource)
Sets the value ofKubeEventProps.getDeprecatedSource()
- Parameters:
deprecatedSource
- deprecatedSource is the deprecated field assuring backward compatibility with core.v1 Event type.- Returns:
this
-
metadata
@Stability(Stable) public KubeEventProps.Builder metadata(ObjectMeta metadata)
Sets the value ofKubeEventProps.getMetadata()
- Parameters:
metadata
- Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata- Returns:
this
-
note
@Stability(Stable) public KubeEventProps.Builder note(String note)
Sets the value ofKubeEventProps.getNote()
- Parameters:
note
- 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.- Returns:
this
-
reason
@Stability(Stable) public KubeEventProps.Builder reason(String reason)
Sets the value ofKubeEventProps.getReason()
- Parameters:
reason
- 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.- Returns:
this
-
regarding
@Stability(Stable) public KubeEventProps.Builder regarding(ObjectReference regarding)
Sets the value ofKubeEventProps.getRegarding()
- Parameters:
regarding
- 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.- Returns:
this
-
related
@Stability(Stable) public KubeEventProps.Builder related(ObjectReference related)
Sets the value ofKubeEventProps.getRelated()
- Parameters:
related
- related is the optional secondary object for more complex actions. E.g. when regarding object triggers a creation or deletion of related object.- Returns:
this
-
reportingController
@Stability(Stable) public KubeEventProps.Builder reportingController(String reportingController)
Sets the value ofKubeEventProps.getReportingController()
- Parameters:
reportingController
- reportingController is the name of the controller that emitted this Event, e.g. `kubernetes.io/kubelet`. This field cannot be empty for new Events.- Returns:
this
-
reportingInstance
@Stability(Stable) public KubeEventProps.Builder reportingInstance(String reportingInstance)
Sets the value ofKubeEventProps.getReportingInstance()
- Parameters:
reportingInstance
- 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.- Returns:
this
-
series
@Stability(Stable) public KubeEventProps.Builder series(EventSeries series)
Sets the value ofKubeEventProps.getSeries()
- Parameters:
series
- series is data about the Event series this event represents or nil if it's a singleton Event.- Returns:
this
-
type
@Stability(Stable) public KubeEventProps.Builder type(String type)
Sets the value ofKubeEventProps.getType()
- Parameters:
type
- 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.- Returns:
this
-
build
@Stability(Stable) public KubeEventProps build()
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<KubeEventProps>
- Returns:
- a new instance of
KubeEventProps
- Throws:
NullPointerException
- if any required attribute was not provided
-
-