Package io.thestencil.client.api
Class ImmutableBatchSite.Builder
- java.lang.Object
-
- io.thestencil.client.api.ImmutableBatchSite.Builder
-
- Enclosing class:
- ImmutableBatchSite
@NotThreadSafe public static final class ImmutableBatchSite.Builder extends Object
Builds instances of typeImmutableBatchSite. Initialize attributes and then invoke thebuild()method to create an immutable instance.Builderis not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Method Summary
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableBatchSite.Builder from(CreateBuilder.BatchSite instance)
Fill a builder with attribute values from the providedBatchSiteinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
addLocales
@CanIgnoreReturnValue public final ImmutableBatchSite.Builder addLocales(CreateBuilder.CreateLocale element)
Adds one element tolocaleslist.- Parameters:
element- A locales element- Returns:
thisbuilder for use in a chained invocation
-
addLocales
@CanIgnoreReturnValue public final ImmutableBatchSite.Builder addLocales(CreateBuilder.CreateLocale... elements)
Adds elements tolocaleslist.- Parameters:
elements- An array of locales elements- Returns:
thisbuilder for use in a chained invocation
-
locales
@CanIgnoreReturnValue public final ImmutableBatchSite.Builder locales(Iterable<? extends CreateBuilder.CreateLocale> elements)
Sets or replaces all elements forlocaleslist.- Parameters:
elements- An iterable of locales elements- Returns:
thisbuilder for use in a chained invocation
-
addAllLocales
@CanIgnoreReturnValue public final ImmutableBatchSite.Builder addAllLocales(Iterable<? extends CreateBuilder.CreateLocale> elements)
Adds elements tolocaleslist.- Parameters:
elements- An iterable of locales elements- Returns:
thisbuilder for use in a chained invocation
-
addPages
@CanIgnoreReturnValue public final ImmutableBatchSite.Builder addPages(CreateBuilder.CreatePage element)
Adds one element topageslist.- Parameters:
element- A pages element- Returns:
thisbuilder for use in a chained invocation
-
addPages
@CanIgnoreReturnValue public final ImmutableBatchSite.Builder addPages(CreateBuilder.CreatePage... elements)
Adds elements topageslist.- Parameters:
elements- An array of pages elements- Returns:
thisbuilder for use in a chained invocation
-
pages
@CanIgnoreReturnValue public final ImmutableBatchSite.Builder pages(Iterable<? extends CreateBuilder.CreatePage> elements)
Sets or replaces all elements forpageslist.- Parameters:
elements- An iterable of pages elements- Returns:
thisbuilder for use in a chained invocation
-
addAllPages
@CanIgnoreReturnValue public final ImmutableBatchSite.Builder addAllPages(Iterable<? extends CreateBuilder.CreatePage> elements)
Adds elements topageslist.- Parameters:
elements- An iterable of pages elements- Returns:
thisbuilder for use in a chained invocation
-
addArticles
@CanIgnoreReturnValue public final ImmutableBatchSite.Builder addArticles(CreateBuilder.CreateArticle element)
Adds one element toarticleslist.- Parameters:
element- A articles element- Returns:
thisbuilder for use in a chained invocation
-
addArticles
@CanIgnoreReturnValue public final ImmutableBatchSite.Builder addArticles(CreateBuilder.CreateArticle... elements)
Adds elements toarticleslist.- Parameters:
elements- An array of articles elements- Returns:
thisbuilder for use in a chained invocation
-
articles
@CanIgnoreReturnValue public final ImmutableBatchSite.Builder articles(Iterable<? extends CreateBuilder.CreateArticle> elements)
Sets or replaces all elements forarticleslist.- Parameters:
elements- An iterable of articles elements- Returns:
thisbuilder for use in a chained invocation
-
addAllArticles
@CanIgnoreReturnValue public final ImmutableBatchSite.Builder addAllArticles(Iterable<? extends CreateBuilder.CreateArticle> elements)
Adds elements toarticleslist.- Parameters:
elements- An iterable of articles elements- Returns:
thisbuilder for use in a chained invocation
-
addWorkflows
@CanIgnoreReturnValue public final ImmutableBatchSite.Builder addWorkflows(CreateBuilder.CreateWorkflow element)
Adds one element toworkflowslist.- Parameters:
element- A workflows element- Returns:
thisbuilder for use in a chained invocation
-
addWorkflows
@CanIgnoreReturnValue public final ImmutableBatchSite.Builder addWorkflows(CreateBuilder.CreateWorkflow... elements)
Adds elements toworkflowslist.- Parameters:
elements- An array of workflows elements- Returns:
thisbuilder for use in a chained invocation
-
workflows
@CanIgnoreReturnValue public final ImmutableBatchSite.Builder workflows(Iterable<? extends CreateBuilder.CreateWorkflow> elements)
Sets or replaces all elements forworkflowslist.- Parameters:
elements- An iterable of workflows elements- Returns:
thisbuilder for use in a chained invocation
-
addAllWorkflows
@CanIgnoreReturnValue public final ImmutableBatchSite.Builder addAllWorkflows(Iterable<? extends CreateBuilder.CreateWorkflow> elements)
Adds elements toworkflowslist.- Parameters:
elements- An iterable of workflows elements- Returns:
thisbuilder for use in a chained invocation
-
addLinks
@CanIgnoreReturnValue public final ImmutableBatchSite.Builder addLinks(CreateBuilder.CreateLink element)
Adds one element tolinkslist.- Parameters:
element- A links element- Returns:
thisbuilder for use in a chained invocation
-
addLinks
@CanIgnoreReturnValue public final ImmutableBatchSite.Builder addLinks(CreateBuilder.CreateLink... elements)
Adds elements tolinkslist.- Parameters:
elements- An array of links elements- Returns:
thisbuilder for use in a chained invocation
-
links
@CanIgnoreReturnValue public final ImmutableBatchSite.Builder links(Iterable<? extends CreateBuilder.CreateLink> elements)
Sets or replaces all elements forlinkslist.- Parameters:
elements- An iterable of links elements- Returns:
thisbuilder for use in a chained invocation
-
addAllLinks
@CanIgnoreReturnValue public final ImmutableBatchSite.Builder addAllLinks(Iterable<? extends CreateBuilder.CreateLink> elements)
Adds elements tolinkslist.- Parameters:
elements- An iterable of links elements- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableBatchSite build()
Builds a newImmutableBatchSite.- Returns:
- An immutable instance of BatchSite
- Throws:
IllegalStateException- if any required attributes are missing
-
-