Package io.thestencil.client.api
Class ImmutableLinkResource
- java.lang.Object
-
- io.thestencil.client.api.ImmutableLinkResource
-
- All Implemented Interfaces:
Markdowns.LinkResource
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableLinkResource extends Object implements Markdowns.LinkResource
Immutable implementation ofMarkdowns.LinkResource.Use the builder to create immutable instances:
ImmutableLinkResource.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableLinkResource.BuilderBuilds instances of typeImmutableLinkResource.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableLinkResource.Builderbuilder()Creates a builder forImmutableLinkResource.static ImmutableLinkResourcecopyOf(Markdowns.LinkResource instance)Creates an immutable copy of aMarkdowns.LinkResourcevalue.booleanequals(Object another)This instance is equal to all instances ofImmutableLinkResourcethat have equal attribute values.StringgetDesc()BooleangetGlobal()StringgetId()com.google.common.collect.ImmutableList<String>getLocale()StringgetPath()StringgetType()StringgetValue()BooleangetWorkflow()inthashCode()Computes a hash code from attributes:id,type,path,value,locale,workflow,global,desc.StringtoString()Prints the immutable valueLinkResourcewith attribute values.ImmutableLinkResourcewithDesc(String value)Copy the current immutable object by setting a value for thedescattribute.ImmutableLinkResourcewithGlobal(Boolean value)Copy the current immutable object by setting a value for theglobalattribute.ImmutableLinkResourcewithId(String value)Copy the current immutable object by setting a value for theidattribute.ImmutableLinkResourcewithLocale(Iterable<String> elements)Copy the current immutable object with elements that replace the content oflocale.ImmutableLinkResourcewithLocale(String... elements)Copy the current immutable object with elements that replace the content oflocale.ImmutableLinkResourcewithPath(String value)Copy the current immutable object by setting a value for thepathattribute.ImmutableLinkResourcewithType(String value)Copy the current immutable object by setting a value for thetypeattribute.ImmutableLinkResourcewithValue(String value)Copy the current immutable object by setting a value for thevalueattribute.ImmutableLinkResourcewithWorkflow(Boolean value)Copy the current immutable object by setting a value for theworkflowattribute.
-
-
-
Method Detail
-
getId
public String getId()
- Specified by:
getIdin interfaceMarkdowns.LinkResource- Returns:
- The value of the
idattribute
-
getType
public String getType()
- Specified by:
getTypein interfaceMarkdowns.LinkResource- Returns:
- The value of the
typeattribute
-
getPath
public String getPath()
- Specified by:
getPathin interfaceMarkdowns.LinkResource- Returns:
- The value of the
pathattribute
-
getValue
public String getValue()
- Specified by:
getValuein interfaceMarkdowns.LinkResource- Returns:
- The value of the
valueattribute
-
getLocale
public com.google.common.collect.ImmutableList<String> getLocale()
- Specified by:
getLocalein interfaceMarkdowns.LinkResource- Returns:
- The value of the
localeattribute
-
getWorkflow
public Boolean getWorkflow()
- Specified by:
getWorkflowin interfaceMarkdowns.LinkResource- Returns:
- The value of the
workflowattribute
-
getGlobal
public Boolean getGlobal()
- Specified by:
getGlobalin interfaceMarkdowns.LinkResource- Returns:
- The value of the
globalattribute
-
getDesc
@Nullable public String getDesc()
- Specified by:
getDescin interfaceMarkdowns.LinkResource- Returns:
- The value of the
descattribute
-
withId
public final ImmutableLinkResource 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
-
withType
public final ImmutableLinkResource 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
-
withPath
public final ImmutableLinkResource withPath(String value)
Copy the current immutable object by setting a value for thepathattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for path- Returns:
- A modified copy of the
thisobject
-
withValue
public final ImmutableLinkResource 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
-
withLocale
public final ImmutableLinkResource withLocale(String... elements)
Copy the current immutable object with elements that replace the content oflocale.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withLocale
public final ImmutableLinkResource withLocale(Iterable<String> elements)
Copy the current immutable object with elements that replace the content oflocale. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of locale elements to set- Returns:
- A modified copy of
thisobject
-
withWorkflow
public final ImmutableLinkResource withWorkflow(Boolean value)
Copy the current immutable object by setting a value for theworkflowattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for workflow- Returns:
- A modified copy of the
thisobject
-
withGlobal
public final ImmutableLinkResource withGlobal(Boolean value)
Copy the current immutable object by setting a value for theglobalattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for global- Returns:
- A modified copy of the
thisobject
-
withDesc
public final ImmutableLinkResource withDesc(@Nullable String value)
Copy the current immutable object by setting a value for thedescattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for desc (can benull)- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableLinkResourcethat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:id,type,path,value,locale,workflow,global,desc.
-
toString
public String toString()
Prints the immutable valueLinkResourcewith attribute values.
-
copyOf
public static ImmutableLinkResource copyOf(Markdowns.LinkResource instance)
Creates an immutable copy of aMarkdowns.LinkResourcevalue. 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 LinkResource instance
-
builder
public static ImmutableLinkResource.Builder builder()
Creates a builder forImmutableLinkResource.ImmutableLinkResource.builder() .id(String) // requiredid.type(String) // requiredtype.path(String) // requiredpath.value(String) // requiredvalue.addLocale|addAllLocale(String) //localeelements .workflow(Boolean) // requiredworkflow.global(Boolean) // requiredglobal.desc(String | null) // nullabledesc.build();- Returns:
- A new ImmutableLinkResource builder
-
-