Package io.thestencil.client.api
Class ImmutableTemplateMutator
- java.lang.Object
-
- io.thestencil.client.api.ImmutableTemplateMutator
-
- All Implemented Interfaces:
UpdateBuilder.TemplateMutator
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableTemplateMutator extends Object implements UpdateBuilder.TemplateMutator
Immutable implementation ofUpdateBuilder.TemplateMutator.Use the builder to create immutable instances:
ImmutableTemplateMutator.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableTemplateMutator.BuilderBuilds instances of typeImmutableTemplateMutator.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableTemplateMutator.Builderbuilder()Creates a builder forImmutableTemplateMutator.static ImmutableTemplateMutatorcopyOf(UpdateBuilder.TemplateMutator instance)Creates an immutable copy of aUpdateBuilder.TemplateMutatorvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableTemplateMutatorthat have equal attribute values.StringgetContent()StringgetDescription()StringgetName()StringgetTemplateId()StringgetType()inthashCode()Computes a hash code from attributes:templateId,name,description,content,type.StringtoString()Prints the immutable valueTemplateMutatorwith attribute values.ImmutableTemplateMutatorwithContent(String value)Copy the current immutable object by setting a value for thecontentattribute.ImmutableTemplateMutatorwithDescription(String value)Copy the current immutable object by setting a value for thedescriptionattribute.ImmutableTemplateMutatorwithName(String value)Copy the current immutable object by setting a value for thenameattribute.ImmutableTemplateMutatorwithTemplateId(String value)Copy the current immutable object by setting a value for thetemplateIdattribute.ImmutableTemplateMutatorwithType(String value)Copy the current immutable object by setting a value for thetypeattribute.
-
-
-
Method Detail
-
getTemplateId
public String getTemplateId()
- Specified by:
getTemplateIdin interfaceUpdateBuilder.TemplateMutator- Returns:
- The value of the
templateIdattribute
-
getName
public String getName()
- Specified by:
getNamein interfaceUpdateBuilder.TemplateMutator- Returns:
- The value of the
nameattribute
-
getDescription
public String getDescription()
- Specified by:
getDescriptionin interfaceUpdateBuilder.TemplateMutator- Returns:
- The value of the
descriptionattribute
-
getContent
public String getContent()
- Specified by:
getContentin interfaceUpdateBuilder.TemplateMutator- Returns:
- The value of the
contentattribute
-
getType
public String getType()
- Specified by:
getTypein interfaceUpdateBuilder.TemplateMutator- Returns:
- The value of the
typeattribute
-
withTemplateId
public final ImmutableTemplateMutator withTemplateId(String value)
Copy the current immutable object by setting a value for thetemplateIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for templateId- Returns:
- A modified copy of the
thisobject
-
withName
public final ImmutableTemplateMutator 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 ImmutableTemplateMutator 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 ImmutableTemplateMutator 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 ImmutableTemplateMutator 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 ofImmutableTemplateMutatorthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:templateId,name,description,content,type.
-
toString
public String toString()
Prints the immutable valueTemplateMutatorwith attribute values.
-
copyOf
public static ImmutableTemplateMutator copyOf(UpdateBuilder.TemplateMutator instance)
Creates an immutable copy of aUpdateBuilder.TemplateMutatorvalue. 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 TemplateMutator instance
-
builder
public static ImmutableTemplateMutator.Builder builder()
Creates a builder forImmutableTemplateMutator.ImmutableTemplateMutator.builder() .templateId(String) // requiredtemplateId.name(String) // requiredname.description(String) // requireddescription.content(String) // requiredcontent.type(String) // requiredtype.build();- Returns:
- A new ImmutableTemplateMutator builder
-
-