Class ImmutableCloudEvent
- java.lang.Object
-
- com.sap.cloudfoundry.client.facade.domain.CloudEntity
-
- com.sap.cloudfoundry.client.facade.domain.CloudEvent
-
- com.sap.cloudfoundry.client.facade.domain.ImmutableCloudEvent
-
- All Implemented Interfaces:
Derivable<CloudEvent>
@Generated("org.immutables.processor.ProxyProcessor") public final class ImmutableCloudEvent extends CloudEvent
Immutable implementation ofCloudEvent.Use the builder to create immutable instances:
ImmutableCloudEvent.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableCloudEvent.BuilderBuilds instances of typeImmutableCloudEvent.static classImmutableCloudEvent.ImmutableParticipantImmutable implementation ofCloudEvent.Participant.-
Nested classes/interfaces inherited from class com.sap.cloudfoundry.client.facade.domain.CloudEvent
CloudEvent.Participant
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableCloudEvent.Builderbuilder()Creates a builder forImmutableCloudEvent.static ImmutableCloudEventcopyOf(CloudEvent instance)Creates an immutable copy of aCloudEventvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableCloudEventthat have equal attribute values.CloudEvent.ParticipantgetActor()CloudMetadatagetMetadata()StringgetName()CloudEvent.ParticipantgetTarget()StringgetType()org.cloudfoundry.client.v3.MetadatagetV3Metadata()inthashCode()Computes a hash code from attributes:name,metadata,v3Metadata,type,actor,target.StringtoString()Prints the immutable valueCloudEventwith attribute values.ImmutableCloudEventwithActor(CloudEvent.Participant value)Copy the current immutable object by setting a value for theactorattribute.ImmutableCloudEventwithMetadata(CloudMetadata value)Copy the current immutable object by setting a value for themetadataattribute.ImmutableCloudEventwithName(String value)Copy the current immutable object by setting a value for thenameattribute.ImmutableCloudEventwithTarget(CloudEvent.Participant value)Copy the current immutable object by setting a value for thetargetattribute.ImmutableCloudEventwithType(String value)Copy the current immutable object by setting a value for thetypeattribute.ImmutableCloudEventwithV3Metadata(org.cloudfoundry.client.v3.Metadata value)Copy the current immutable object by setting a value for thev3Metadataattribute.-
Methods inherited from class com.sap.cloudfoundry.client.facade.domain.CloudEvent
derive, getTimestamp
-
Methods inherited from class com.sap.cloudfoundry.client.facade.domain.CloudEntity
getGuid
-
-
-
-
Method Detail
-
getName
public String getName()
- Specified by:
getNamein classCloudEntity- Returns:
- The value of the
nameattribute
-
getMetadata
public CloudMetadata getMetadata()
- Specified by:
getMetadatain classCloudEntity- Returns:
- The value of the
metadataattribute
-
getV3Metadata
public org.cloudfoundry.client.v3.Metadata getV3Metadata()
- Specified by:
getV3Metadatain classCloudEntity- Returns:
- The value of the
v3Metadataattribute
-
getType
public String getType()
- Specified by:
getTypein classCloudEvent- Returns:
- The value of the
typeattribute
-
getActor
public CloudEvent.Participant getActor()
- Specified by:
getActorin classCloudEvent- Returns:
- The value of the
actorattribute
-
getTarget
public CloudEvent.Participant getTarget()
- Specified by:
getTargetin classCloudEvent- Returns:
- The value of the
targetattribute
-
withName
public final ImmutableCloudEvent withName(String value)
Copy the current immutable object by setting a value for thenameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for name (can benull)- Returns:
- A modified copy of the
thisobject
-
withMetadata
public final ImmutableCloudEvent withMetadata(CloudMetadata value)
Copy the current immutable object by setting a value for themetadataattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for metadata (can benull)- Returns:
- A modified copy of the
thisobject
-
withV3Metadata
public final ImmutableCloudEvent withV3Metadata(org.cloudfoundry.client.v3.Metadata value)
Copy the current immutable object by setting a value for thev3Metadataattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for v3Metadata (can benull)- Returns:
- A modified copy of the
thisobject
-
withType
public final ImmutableCloudEvent withType(String value)
Copy the current immutable object by setting a value for thetypeattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for type (can benull)- Returns:
- A modified copy of the
thisobject
-
withActor
public final ImmutableCloudEvent withActor(CloudEvent.Participant value)
Copy the current immutable object by setting a value for theactorattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for actor (can benull)- Returns:
- A modified copy of the
thisobject
-
withTarget
public final ImmutableCloudEvent withTarget(CloudEvent.Participant value)
Copy the current immutable object by setting a value for thetargetattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for target (can benull)- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(Object another)
This instance is equal to all instances ofImmutableCloudEventthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:name,metadata,v3Metadata,type,actor,target.
-
toString
public String toString()
Prints the immutable valueCloudEventwith attribute values.
-
copyOf
public static ImmutableCloudEvent copyOf(CloudEvent instance)
Creates an immutable copy of aCloudEventvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable CloudEvent instance
-
builder
public static ImmutableCloudEvent.Builder builder()
Creates a builder forImmutableCloudEvent.ImmutableCloudEvent.builder() .name(String | null) // nullablename.metadata(com.sap.cloudfoundry.client.facade.domain.CloudMetadata | null) // nullablemetadata.v3Metadata(org.cloudfoundry.client.v3.Metadata | null) // nullablev3Metadata.type(String | null) // nullabletype.actor(com.sap.cloudfoundry.client.facade.domain.CloudEvent.Participant | null) // nullableactor.target(com.sap.cloudfoundry.client.facade.domain.CloudEvent.Participant | null) // nullabletarget.build();- Returns:
- A new ImmutableCloudEvent builder
-
-