Package io.thestencil.client.api
Class ImmutableWorkflow
- java.lang.Object
-
- io.thestencil.client.api.ImmutableWorkflow
-
- All Implemented Interfaces:
StencilClient.EntityBody,StencilClient.Workflow,Serializable
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableWorkflow extends Object implements StencilClient.Workflow
Immutable implementation ofStencilClient.Workflow.Use the builder to create immutable instances:
ImmutableWorkflow.builder().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableWorkflow.BuilderBuilds instances of typeImmutableWorkflow.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableWorkflow.Builderbuilder()Creates a builder forImmutableWorkflow.static ImmutableWorkflowcopyOf(StencilClient.Workflow instance)Creates an immutable copy of aStencilClient.Workflowvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableWorkflowthat have equal attribute values.com.google.common.collect.ImmutableList<String>getArticles()StringgetContent()StringgetLocale()StringgetName()inthashCode()Computes a hash code from attributes:name,locale,content,articles.StringtoString()Prints the immutable valueWorkflowwith attribute values.ImmutableWorkflowwithArticles(Iterable<String> elements)Copy the current immutable object with elements that replace the content ofarticles.ImmutableWorkflowwithArticles(String... elements)Copy the current immutable object with elements that replace the content ofarticles.ImmutableWorkflowwithContent(String value)Copy the current immutable object by setting a value for thecontentattribute.ImmutableWorkflowwithLocale(String value)Copy the current immutable object by setting a value for thelocaleattribute.ImmutableWorkflowwithName(String value)Copy the current immutable object by setting a value for thenameattribute.
-
-
-
Method Detail
-
getName
public String getName()
- Specified by:
getNamein interfaceStencilClient.Workflow- Returns:
- The value of the
nameattribute
-
getLocale
public String getLocale()
- Specified by:
getLocalein interfaceStencilClient.Workflow- Returns:
- The value of the
localeattribute
-
getContent
public String getContent()
- Specified by:
getContentin interfaceStencilClient.Workflow- Returns:
- The value of the
contentattribute
-
getArticles
public com.google.common.collect.ImmutableList<String> getArticles()
- Specified by:
getArticlesin interfaceStencilClient.Workflow- Returns:
- The value of the
articlesattribute
-
withName
public final ImmutableWorkflow 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
-
withLocale
public final ImmutableWorkflow withLocale(String value)
Copy the current immutable object by setting a value for thelocaleattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for locale- Returns:
- A modified copy of the
thisobject
-
withContent
public final ImmutableWorkflow 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
-
withArticles
public final ImmutableWorkflow withArticles(String... elements)
Copy the current immutable object with elements that replace the content ofarticles.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withArticles
public final ImmutableWorkflow withArticles(Iterable<String> elements)
Copy the current immutable object with elements that replace the content ofarticles. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of articles elements to set- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableWorkflowthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:name,locale,content,articles.
-
toString
public String toString()
Prints the immutable valueWorkflowwith attribute values.
-
copyOf
public static ImmutableWorkflow copyOf(StencilClient.Workflow instance)
Creates an immutable copy of aStencilClient.Workflowvalue. 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 Workflow instance
-
builder
public static ImmutableWorkflow.Builder builder()
Creates a builder forImmutableWorkflow.ImmutableWorkflow.builder() .name(String) // requiredname.locale(String) // requiredlocale.content(String) // requiredcontent.addArticles|addAllArticles(String) //articleselements .build();- Returns:
- A new ImmutableWorkflow builder
-
-