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()BooleangetDevMode()com.google.common.collect.ImmutableList<StencilClient.LocaleLabel>getLabels()StringgetValue()inthashCode()Computes a hash code from attributes:value,devMode,articles,labels.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.ImmutableWorkflowwithDevMode(Boolean value)Copy the current immutable object by setting a value for thedevModeattribute.ImmutableWorkflowwithLabels(StencilClient.LocaleLabel... elements)Copy the current immutable object with elements that replace the content oflabels.ImmutableWorkflowwithLabels(Iterable<? extends StencilClient.LocaleLabel> elements)Copy the current immutable object with elements that replace the content oflabels.ImmutableWorkflowwithValue(String value)Copy the current immutable object by setting a value for thevalueattribute.
-
-
-
Method Detail
-
getValue
public String getValue()
- Specified by:
getValuein interfaceStencilClient.Workflow- Returns:
- The value of the
valueattribute
-
getDevMode
@Nullable public Boolean getDevMode()
- Specified by:
getDevModein interfaceStencilClient.Workflow- Returns:
- The value of the
devModeattribute
-
getArticles
public com.google.common.collect.ImmutableList<String> getArticles()
- Specified by:
getArticlesin interfaceStencilClient.Workflow- Returns:
- The value of the
articlesattribute
-
getLabels
public com.google.common.collect.ImmutableList<StencilClient.LocaleLabel> getLabels()
- Specified by:
getLabelsin interfaceStencilClient.Workflow- Returns:
- The value of the
labelsattribute
-
withValue
public final ImmutableWorkflow withValue(String value)
Copy the current immutable object by setting a value for thevalueattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for value- Returns:
- A modified copy of the
thisobject
-
withDevMode
public final ImmutableWorkflow withDevMode(@Nullable Boolean value)
Copy the current immutable object by setting a value for thedevModeattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for devMode (can benull)- 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
-
withLabels
public final ImmutableWorkflow withLabels(StencilClient.LocaleLabel... elements)
Copy the current immutable object with elements that replace the content oflabels.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withLabels
public final ImmutableWorkflow withLabels(Iterable<? extends StencilClient.LocaleLabel> elements)
Copy the current immutable object with elements that replace the content oflabels. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of labels 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:value,devMode,articles,labels.
-
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() .value(String) // requiredvalue.devMode(Boolean | null) // nullabledevMode.addArticles|addAllArticles(String) //articleselements .addLabels|addAllLabels(io.thestencil.client.api.StencilClient.LocaleLabel) //labelselements .build();- Returns:
- A new ImmutableWorkflow builder
-
-