Package io.thestencil.client.api
Class ImmutableLinkReleaseItem
- java.lang.Object
-
- io.thestencil.client.api.ImmutableLinkReleaseItem
-
- All Implemented Interfaces:
StencilClient.LinkReleaseItem,StencilClient.ReleaseItem,Serializable
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableLinkReleaseItem extends Object implements StencilClient.LinkReleaseItem
Immutable implementation ofStencilClient.LinkReleaseItem.Use the builder to create immutable instances:
ImmutableLinkReleaseItem.builder().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableLinkReleaseItem.BuilderBuilds instances of typeImmutableLinkReleaseItem.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableLinkReleaseItem.Builderbuilder()Creates a builder forImmutableLinkReleaseItem.static ImmutableLinkReleaseItemcopyOf(StencilClient.LinkReleaseItem instance)Creates an immutable copy of aStencilClient.LinkReleaseItemvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableLinkReleaseItemthat have equal attribute values.com.google.common.collect.ImmutableList<String>getArticles()StringgetContentType()StringgetHash()StringgetId()com.google.common.collect.ImmutableList<StencilClient.LocaleLabel>getLabels()StringgetValue()inthashCode()Computes a hash code from attributes:id,hash,value,contentType,articles,labels.StringtoString()Prints the immutable valueLinkReleaseItemwith attribute values.ImmutableLinkReleaseItemwithArticles(Iterable<String> elements)Copy the current immutable object with elements that replace the content ofarticles.ImmutableLinkReleaseItemwithArticles(String... elements)Copy the current immutable object with elements that replace the content ofarticles.ImmutableLinkReleaseItemwithContentType(String value)Copy the current immutable object by setting a value for thecontentTypeattribute.ImmutableLinkReleaseItemwithHash(String value)Copy the current immutable object by setting a value for thehashattribute.ImmutableLinkReleaseItemwithId(String value)Copy the current immutable object by setting a value for theidattribute.ImmutableLinkReleaseItemwithLabels(StencilClient.LocaleLabel... elements)Copy the current immutable object with elements that replace the content oflabels.ImmutableLinkReleaseItemwithLabels(Iterable<? extends StencilClient.LocaleLabel> elements)Copy the current immutable object with elements that replace the content oflabels.ImmutableLinkReleaseItemwithValue(String value)Copy the current immutable object by setting a value for thevalueattribute.
-
-
-
Method Detail
-
getId
public String getId()
- Specified by:
getIdin interfaceStencilClient.ReleaseItem- Returns:
- The value of the
idattribute
-
getHash
public String getHash()
- Specified by:
getHashin interfaceStencilClient.ReleaseItem- Returns:
- The value of the
hashattribute
-
getValue
public String getValue()
- Specified by:
getValuein interfaceStencilClient.LinkReleaseItem- Returns:
- The value of the
valueattribute
-
getContentType
public String getContentType()
- Specified by:
getContentTypein interfaceStencilClient.LinkReleaseItem- Returns:
- The value of the
contentTypeattribute
-
getArticles
public com.google.common.collect.ImmutableList<String> getArticles()
- Specified by:
getArticlesin interfaceStencilClient.LinkReleaseItem- Returns:
- The value of the
articlesattribute
-
getLabels
public com.google.common.collect.ImmutableList<StencilClient.LocaleLabel> getLabels()
- Specified by:
getLabelsin interfaceStencilClient.LinkReleaseItem- Returns:
- The value of the
labelsattribute
-
withId
public final ImmutableLinkReleaseItem withId(String value)
Copy the current immutable object by setting a value for theidattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for id- Returns:
- A modified copy of the
thisobject
-
withHash
public final ImmutableLinkReleaseItem withHash(String value)
Copy the current immutable object by setting a value for thehashattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for hash- Returns:
- A modified copy of the
thisobject
-
withValue
public final ImmutableLinkReleaseItem 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
-
withContentType
public final ImmutableLinkReleaseItem withContentType(String value)
Copy the current immutable object by setting a value for thecontentTypeattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for contentType- Returns:
- A modified copy of the
thisobject
-
withArticles
public final ImmutableLinkReleaseItem 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 ImmutableLinkReleaseItem 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 ImmutableLinkReleaseItem 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 ImmutableLinkReleaseItem 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 ofImmutableLinkReleaseItemthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:id,hash,value,contentType,articles,labels.
-
toString
public String toString()
Prints the immutable valueLinkReleaseItemwith attribute values.
-
copyOf
public static ImmutableLinkReleaseItem copyOf(StencilClient.LinkReleaseItem instance)
Creates an immutable copy of aStencilClient.LinkReleaseItemvalue. 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 LinkReleaseItem instance
-
builder
public static ImmutableLinkReleaseItem.Builder builder()
Creates a builder forImmutableLinkReleaseItem.ImmutableLinkReleaseItem.builder() .id(String) // requiredid.hash(String) // requiredhash.value(String) // requiredvalue.contentType(String) // requiredcontentType.addArticles|addAllArticles(String) //articleselements .addLabels|addAllLabels(io.thestencil.client.api.StencilClient.LocaleLabel) //labelselements .build();- Returns:
- A new ImmutableLinkReleaseItem builder
-
-