Package io.thestencil.client.api
Class ImmutableArticle
- java.lang.Object
-
- io.thestencil.client.api.ImmutableArticle
-
- All Implemented Interfaces:
StencilClient.Article,StencilClient.EntityBody,Serializable
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableArticle extends Object implements StencilClient.Article
Immutable implementation ofStencilClient.Article.Use the builder to create immutable instances:
ImmutableArticle.builder().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableArticle.BuilderBuilds instances of typeImmutableArticle.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableArticle.Builderbuilder()Creates a builder forImmutableArticle.static ImmutableArticlecopyOf(StencilClient.Article instance)Creates an immutable copy of aStencilClient.Articlevalue.booleanequals(Object another)This instance is equal to all instances ofImmutableArticlethat have equal attribute values.BooleangetDevMode()StringgetName()IntegergetOrder()StringgetParentId()inthashCode()Computes a hash code from attributes:parentId,devMode,name,order.StringtoString()Prints the immutable valueArticlewith attribute values.ImmutableArticlewithDevMode(Boolean value)Copy the current immutable object by setting a value for thedevModeattribute.ImmutableArticlewithName(String value)Copy the current immutable object by setting a value for thenameattribute.ImmutableArticlewithOrder(Integer value)Copy the current immutable object by setting a value for theorderattribute.ImmutableArticlewithParentId(String value)Copy the current immutable object by setting a value for theparentIdattribute.
-
-
-
Method Detail
-
getParentId
@Nullable public String getParentId()
- Specified by:
getParentIdin interfaceStencilClient.Article- Returns:
- The value of the
parentIdattribute
-
getDevMode
@Nullable public Boolean getDevMode()
- Specified by:
getDevModein interfaceStencilClient.Article- Returns:
- The value of the
devModeattribute
-
getName
public String getName()
- Specified by:
getNamein interfaceStencilClient.Article- Returns:
- The value of the
nameattribute
-
getOrder
public Integer getOrder()
- Specified by:
getOrderin interfaceStencilClient.Article- Returns:
- The value of the
orderattribute
-
withParentId
public final ImmutableArticle withParentId(@Nullable String value)
Copy the current immutable object by setting a value for theparentIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for parentId (can benull)- Returns:
- A modified copy of the
thisobject
-
withDevMode
public final ImmutableArticle 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
-
withName
public final ImmutableArticle 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
-
withOrder
public final ImmutableArticle withOrder(Integer value)
Copy the current immutable object by setting a value for theorderattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for order- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableArticlethat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:parentId,devMode,name,order.
-
toString
public String toString()
Prints the immutable valueArticlewith attribute values.
-
copyOf
public static ImmutableArticle copyOf(StencilClient.Article instance)
Creates an immutable copy of aStencilClient.Articlevalue. 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 Article instance
-
builder
public static ImmutableArticle.Builder builder()
Creates a builder forImmutableArticle.ImmutableArticle.builder() .parentId(String | null) // nullableparentId.devMode(Boolean | null) // nullabledevMode.name(String) // requiredname.order(Integer) // requiredorder.build();- Returns:
- A new ImmutableArticle builder
-
-