Package io.thestencil.client.api
Class ImmutableTemplate
- java.lang.Object
-
- io.thestencil.client.api.ImmutableTemplate
-
- All Implemented Interfaces:
StencilClient.EntityBody,StencilClient.Template,Serializable
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableTemplate extends Object implements StencilClient.Template
Immutable implementation ofStencilClient.Template.Use the builder to create immutable instances:
ImmutableTemplate.builder().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableTemplate.BuilderBuilds instances of typeImmutableTemplate.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableTemplate.Builderbuilder()Creates a builder forImmutableTemplate.static ImmutableTemplatecopyOf(StencilClient.Template instance)Creates an immutable copy of aStencilClient.Templatevalue.booleanequals(Object another)This instance is equal to all instances ofImmutableTemplatethat have equal attribute values.StringgetContent()StringgetDescription()StringgetName()StringgetType()inthashCode()Computes a hash code from attributes:name,description,content,type.StringtoString()Prints the immutable valueTemplatewith attribute values.ImmutableTemplatewithContent(String value)Copy the current immutable object by setting a value for thecontentattribute.ImmutableTemplatewithDescription(String value)Copy the current immutable object by setting a value for thedescriptionattribute.ImmutableTemplatewithName(String value)Copy the current immutable object by setting a value for thenameattribute.ImmutableTemplatewithType(String value)Copy the current immutable object by setting a value for thetypeattribute.
-
-
-
Method Detail
-
getName
public String getName()
- Specified by:
getNamein interfaceStencilClient.Template- Returns:
- The value of the
nameattribute
-
getDescription
public String getDescription()
- Specified by:
getDescriptionin interfaceStencilClient.Template- Returns:
- The value of the
descriptionattribute
-
getContent
public String getContent()
- Specified by:
getContentin interfaceStencilClient.Template- Returns:
- The value of the
contentattribute
-
getType
public String getType()
- Specified by:
getTypein interfaceStencilClient.Template- Returns:
- The value of the
typeattribute
-
withName
public final ImmutableTemplate 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- Returns:
- A modified copy of the
thisobject
-
withDescription
public final ImmutableTemplate withDescription(String value)
Copy the current immutable object by setting a value for thedescriptionattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for description- Returns:
- A modified copy of the
thisobject
-
withContent
public final ImmutableTemplate withContent(String value)
Copy the current immutable object by setting a value for thecontentattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for content- Returns:
- A modified copy of the
thisobject
-
withType
public final ImmutableTemplate 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- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableTemplatethat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:name,description,content,type.
-
toString
public String toString()
Prints the immutable valueTemplatewith attribute values.
-
copyOf
public static ImmutableTemplate copyOf(StencilClient.Template instance)
Creates an immutable copy of aStencilClient.Templatevalue. 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 Template instance
-
builder
public static ImmutableTemplate.Builder builder()
Creates a builder forImmutableTemplate.ImmutableTemplate.builder() .name(String) // requiredname.description(String) // requireddescription.content(String) // requiredcontent.type(String) // requiredtype.build();- Returns:
- A new ImmutableTemplate builder
-
-