Package io.thestencil.client.api
Class ImmutableSiteState
- java.lang.Object
-
- io.thestencil.client.api.ImmutableSiteState
-
- All Implemented Interfaces:
StencilClient.SiteState
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableSiteState extends Object implements StencilClient.SiteState
Immutable implementation ofStencilClient.SiteState.Use the builder to create immutable instances:
ImmutableSiteState.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableSiteState.BuilderBuilds instances of typeImmutableSiteState.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableSiteState.Builderbuilder()Creates a builder forImmutableSiteState.static ImmutableSiteStatecopyOf(StencilClient.SiteState instance)Creates an immutable copy of aStencilClient.SiteStatevalue.booleanequals(Object another)This instance is equal to all instances ofImmutableSiteStatethat have equal attribute values.com.google.common.collect.ImmutableMap<String,StencilClient.Entity<StencilClient.Article>>getArticles()StringgetCommit()StencilClient.SiteContentTypegetContentType()com.google.common.collect.ImmutableMap<String,StencilClient.Entity<StencilClient.Link>>getLinks()com.google.common.collect.ImmutableMap<String,StencilClient.Entity<StencilClient.Locale>>getLocales()StringgetName()com.google.common.collect.ImmutableMap<String,StencilClient.Entity<StencilClient.Page>>getPages()com.google.common.collect.ImmutableMap<String,StencilClient.Entity<StencilClient.Release>>getReleases()com.google.common.collect.ImmutableMap<String,StencilClient.Entity<StencilClient.Template>>getTemplates()com.google.common.collect.ImmutableMap<String,StencilClient.Entity<StencilClient.Workflow>>getWorkflows()inthashCode()Computes a hash code from attributes:name,commit,contentType,releases,locales,pages,links,articles,workflows,templates.StringtoString()Prints the immutable valueSiteStatewith attribute values.ImmutableSiteStatewithArticles(Map<String,? extends StencilClient.Entity<StencilClient.Article>> entries)Copy the current immutable object by replacing thearticlesmap with the specified map.ImmutableSiteStatewithCommit(String value)Copy the current immutable object by setting a value for thecommitattribute.ImmutableSiteStatewithContentType(StencilClient.SiteContentType value)Copy the current immutable object by setting a value for thecontentTypeattribute.ImmutableSiteStatewithLinks(Map<String,? extends StencilClient.Entity<StencilClient.Link>> entries)Copy the current immutable object by replacing thelinksmap with the specified map.ImmutableSiteStatewithLocales(Map<String,? extends StencilClient.Entity<StencilClient.Locale>> entries)Copy the current immutable object by replacing thelocalesmap with the specified map.ImmutableSiteStatewithName(String value)Copy the current immutable object by setting a value for thenameattribute.ImmutableSiteStatewithPages(Map<String,? extends StencilClient.Entity<StencilClient.Page>> entries)Copy the current immutable object by replacing thepagesmap with the specified map.ImmutableSiteStatewithReleases(Map<String,? extends StencilClient.Entity<StencilClient.Release>> entries)Copy the current immutable object by replacing thereleasesmap with the specified map.ImmutableSiteStatewithTemplates(Map<String,? extends StencilClient.Entity<StencilClient.Template>> entries)Copy the current immutable object by replacing thetemplatesmap with the specified map.ImmutableSiteStatewithWorkflows(Map<String,? extends StencilClient.Entity<StencilClient.Workflow>> entries)Copy the current immutable object by replacing theworkflowsmap with the specified map.
-
-
-
Method Detail
-
getName
public String getName()
- Specified by:
getNamein interfaceStencilClient.SiteState- Returns:
- The value of the
nameattribute
-
getCommit
@Nullable public String getCommit()
- Specified by:
getCommitin interfaceStencilClient.SiteState- Returns:
- The value of the
commitattribute
-
getContentType
public StencilClient.SiteContentType getContentType()
- Specified by:
getContentTypein interfaceStencilClient.SiteState- Returns:
- The value of the
contentTypeattribute
-
getReleases
public com.google.common.collect.ImmutableMap<String,StencilClient.Entity<StencilClient.Release>> getReleases()
- Specified by:
getReleasesin interfaceStencilClient.SiteState- Returns:
- The value of the
releasesattribute
-
getLocales
public com.google.common.collect.ImmutableMap<String,StencilClient.Entity<StencilClient.Locale>> getLocales()
- Specified by:
getLocalesin interfaceStencilClient.SiteState- Returns:
- The value of the
localesattribute
-
getPages
public com.google.common.collect.ImmutableMap<String,StencilClient.Entity<StencilClient.Page>> getPages()
- Specified by:
getPagesin interfaceStencilClient.SiteState- Returns:
- The value of the
pagesattribute
-
getLinks
public com.google.common.collect.ImmutableMap<String,StencilClient.Entity<StencilClient.Link>> getLinks()
- Specified by:
getLinksin interfaceStencilClient.SiteState- Returns:
- The value of the
linksattribute
-
getArticles
public com.google.common.collect.ImmutableMap<String,StencilClient.Entity<StencilClient.Article>> getArticles()
- Specified by:
getArticlesin interfaceStencilClient.SiteState- Returns:
- The value of the
articlesattribute
-
getWorkflows
public com.google.common.collect.ImmutableMap<String,StencilClient.Entity<StencilClient.Workflow>> getWorkflows()
- Specified by:
getWorkflowsin interfaceStencilClient.SiteState- Returns:
- The value of the
workflowsattribute
-
getTemplates
public com.google.common.collect.ImmutableMap<String,StencilClient.Entity<StencilClient.Template>> getTemplates()
- Specified by:
getTemplatesin interfaceStencilClient.SiteState- Returns:
- The value of the
templatesattribute
-
withName
public final ImmutableSiteState 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
-
withCommit
public final ImmutableSiteState withCommit(@Nullable String value)
Copy the current immutable object by setting a value for thecommitattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for commit (can benull)- Returns:
- A modified copy of the
thisobject
-
withContentType
public final ImmutableSiteState withContentType(StencilClient.SiteContentType value)
Copy the current immutable object by setting a value for thecontentTypeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for contentType- Returns:
- A modified copy of the
thisobject
-
withReleases
public final ImmutableSiteState withReleases(Map<String,? extends StencilClient.Entity<StencilClient.Release>> entries)
Copy the current immutable object by replacing thereleasesmap with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
entries- The entries to be added to the releases map- Returns:
- A modified copy of
thisobject
-
withLocales
public final ImmutableSiteState withLocales(Map<String,? extends StencilClient.Entity<StencilClient.Locale>> entries)
Copy the current immutable object by replacing thelocalesmap with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
entries- The entries to be added to the locales map- Returns:
- A modified copy of
thisobject
-
withPages
public final ImmutableSiteState withPages(Map<String,? extends StencilClient.Entity<StencilClient.Page>> entries)
Copy the current immutable object by replacing thepagesmap with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
entries- The entries to be added to the pages map- Returns:
- A modified copy of
thisobject
-
withLinks
public final ImmutableSiteState withLinks(Map<String,? extends StencilClient.Entity<StencilClient.Link>> entries)
Copy the current immutable object by replacing thelinksmap with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
entries- The entries to be added to the links map- Returns:
- A modified copy of
thisobject
-
withArticles
public final ImmutableSiteState withArticles(Map<String,? extends StencilClient.Entity<StencilClient.Article>> entries)
Copy the current immutable object by replacing thearticlesmap with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
entries- The entries to be added to the articles map- Returns:
- A modified copy of
thisobject
-
withWorkflows
public final ImmutableSiteState withWorkflows(Map<String,? extends StencilClient.Entity<StencilClient.Workflow>> entries)
Copy the current immutable object by replacing theworkflowsmap with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
entries- The entries to be added to the workflows map- Returns:
- A modified copy of
thisobject
-
withTemplates
public final ImmutableSiteState withTemplates(Map<String,? extends StencilClient.Entity<StencilClient.Template>> entries)
Copy the current immutable object by replacing thetemplatesmap with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
entries- The entries to be added to the templates map- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableSiteStatethat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:name,commit,contentType,releases,locales,pages,links,articles,workflows,templates.
-
toString
public String toString()
Prints the immutable valueSiteStatewith attribute values.
-
copyOf
public static ImmutableSiteState copyOf(StencilClient.SiteState instance)
Creates an immutable copy of aStencilClient.SiteStatevalue. 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 SiteState instance
-
builder
public static ImmutableSiteState.Builder builder()
Creates a builder forImmutableSiteState.ImmutableSiteState.builder() .name(String) // requiredname.commit(String | null) // nullablecommit.contentType(io.thestencil.client.api.StencilClient.SiteContentType) // requiredcontentType.putReleases|putAllReleases(String => io.thestencil.client.api.StencilClient.Entity<io.thestencil.client.api.StencilClient.Release>) //releasesmappings .putLocales|putAllLocales(String => io.thestencil.client.api.StencilClient.Entity<io.thestencil.client.api.StencilClient.Locale>) //localesmappings .putPages|putAllPages(String => io.thestencil.client.api.StencilClient.Entity<io.thestencil.client.api.StencilClient.Page>) //pagesmappings .putLinks|putAllLinks(String => io.thestencil.client.api.StencilClient.Entity<io.thestencil.client.api.StencilClient.Link>) //linksmappings .putArticles|putAllArticles(String => io.thestencil.client.api.StencilClient.Entity<io.thestencil.client.api.StencilClient.Article>) //articlesmappings .putWorkflows|putAllWorkflows(String => io.thestencil.client.api.StencilClient.Entity<io.thestencil.client.api.StencilClient.Workflow>) //workflowsmappings .putTemplates|putAllTemplates(String => io.thestencil.client.api.StencilClient.Entity<io.thestencil.client.api.StencilClient.Template>) //templatesmappings .build();- Returns:
- A new ImmutableSiteState builder
-
-