Class ImmutableApplicationLogEntity.ImmutableLogBody
- java.lang.Object
-
- com.sap.cloudfoundry.client.facade.adapters.ImmutableApplicationLogEntity.ImmutableLogBody
-
- All Implemented Interfaces:
ApplicationLogEntity.LogBody
- Enclosing class:
- ImmutableApplicationLogEntity
public static final class ImmutableApplicationLogEntity.ImmutableLogBody extends Object implements ApplicationLogEntity.LogBody
Immutable implementation ofApplicationLogEntity.LogBody.Use the builder to create immutable instances:
ImmutableApplicationLogEntity.ImmutableLogBody.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableApplicationLogEntity.ImmutableLogBody.BuilderBuilds instances of typeImmutableLogBody.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableApplicationLogEntity.ImmutableLogBody.Builderbuilder()Creates a builder forImmutableLogBody.static ImmutableApplicationLogEntity.ImmutableLogBodycopyOf(ApplicationLogEntity.LogBody instance)Creates an immutable copy of aApplicationLogEntity.LogBodyvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableLogBodythat have equal attribute values.StringgetMessage()StringgetMessageType()inthashCode()Computes a hash code from attributes:message,messageType.StringtoString()Prints the immutable valueLogBodywith attribute values.ImmutableApplicationLogEntity.ImmutableLogBodywithMessage(String value)Copy the current immutable object by setting a value for themessageattribute.ImmutableApplicationLogEntity.ImmutableLogBodywithMessageType(String value)Copy the current immutable object by setting a value for themessageTypeattribute.
-
-
-
Method Detail
-
getMessage
public String getMessage()
- Specified by:
getMessagein interfaceApplicationLogEntity.LogBody- Returns:
- The value of the
messageattribute
-
getMessageType
public String getMessageType()
- Specified by:
getMessageTypein interfaceApplicationLogEntity.LogBody- Returns:
- The value of the
messageTypeattribute
-
withMessage
public final ImmutableApplicationLogEntity.ImmutableLogBody withMessage(String value)
Copy the current immutable object by setting a value for themessageattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for message- Returns:
- A modified copy of the
thisobject
-
withMessageType
public final ImmutableApplicationLogEntity.ImmutableLogBody withMessageType(String value)
Copy the current immutable object by setting a value for themessageTypeattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for messageType- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(Object another)
This instance is equal to all instances ofImmutableLogBodythat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:message,messageType.
-
toString
public String toString()
Prints the immutable valueLogBodywith attribute values.
-
copyOf
public static ImmutableApplicationLogEntity.ImmutableLogBody copyOf(ApplicationLogEntity.LogBody instance)
Creates an immutable copy of aApplicationLogEntity.LogBodyvalue. 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 LogBody instance
-
builder
public static ImmutableApplicationLogEntity.ImmutableLogBody.Builder builder()
Creates a builder forImmutableLogBody.ImmutableApplicationLogEntity.ImmutableLogBody.builder() .message(String) // requiredmessage.messageType(String) // requiredmessageType.build();- Returns:
- A new ImmutableLogBody builder
-
-