Class ImmutableCloudEvent.Builder
- java.lang.Object
-
- com.sap.cloudfoundry.client.facade.domain.ImmutableCloudEvent.Builder
-
- Enclosing class:
- ImmutableCloudEvent
public static final class ImmutableCloudEvent.Builder extends Object
Builds instances of typeImmutableCloudEvent. Initialize attributes and then invoke thebuild()method to create an immutable instance.Builderis not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableCloudEvent.Builderactor(CloudEvent.Participant actor)Initializes the value for theactorattribute.ImmutableCloudEventbuild()Builds a newImmutableCloudEvent.ImmutableCloudEvent.Builderfrom(CloudEntity instance)Fill a builder with attribute values from the providedcom.sap.cloudfoundry.client.facade.domain.CloudEntityinstance.ImmutableCloudEvent.Builderfrom(CloudEvent instance)Fill a builder with attribute values from the providedcom.sap.cloudfoundry.client.facade.domain.CloudEventinstance.ImmutableCloudEvent.Buildermetadata(CloudMetadata metadata)Initializes the value for themetadataattribute.ImmutableCloudEvent.Buildername(String name)Initializes the value for thenameattribute.ImmutableCloudEvent.Buildertarget(CloudEvent.Participant target)Initializes the value for thetargetattribute.ImmutableCloudEvent.Buildertype(String type)Initializes the value for thetypeattribute.ImmutableCloudEvent.Builderv3Metadata(org.cloudfoundry.client.v3.Metadata v3Metadata)Initializes the value for thev3Metadataattribute.
-
-
-
Method Detail
-
from
public final ImmutableCloudEvent.Builder from(CloudEvent instance)
Fill a builder with attribute values from the providedcom.sap.cloudfoundry.client.facade.domain.CloudEventinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
public final ImmutableCloudEvent.Builder from(CloudEntity instance)
Fill a builder with attribute values from the providedcom.sap.cloudfoundry.client.facade.domain.CloudEntityinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
name
public final ImmutableCloudEvent.Builder name(String name)
Initializes the value for thenameattribute.- Parameters:
name- The value for name (can benull)- Returns:
thisbuilder for use in a chained invocation
-
metadata
public final ImmutableCloudEvent.Builder metadata(CloudMetadata metadata)
Initializes the value for themetadataattribute.- Parameters:
metadata- The value for metadata (can benull)- Returns:
thisbuilder for use in a chained invocation
-
v3Metadata
public final ImmutableCloudEvent.Builder v3Metadata(org.cloudfoundry.client.v3.Metadata v3Metadata)
Initializes the value for thev3Metadataattribute.- Parameters:
v3Metadata- The value for v3Metadata (can benull)- Returns:
thisbuilder for use in a chained invocation
-
type
public final ImmutableCloudEvent.Builder type(String type)
Initializes the value for thetypeattribute.- Parameters:
type- The value for type (can benull)- Returns:
thisbuilder for use in a chained invocation
-
actor
public final ImmutableCloudEvent.Builder actor(CloudEvent.Participant actor)
Initializes the value for theactorattribute.- Parameters:
actor- The value for actor (can benull)- Returns:
thisbuilder for use in a chained invocation
-
target
public final ImmutableCloudEvent.Builder target(CloudEvent.Participant target)
Initializes the value for thetargetattribute.- Parameters:
target- The value for target (can benull)- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableCloudEvent build()
Builds a newImmutableCloudEvent.- Returns:
- An immutable instance of CloudEvent
- Throws:
IllegalStateException- if any required attributes are missing
-
-