Class SeriesSearchResultDTO.Builder
- java.lang.Object
-
- com.github.m0nk3y2k4.thetvdb.internal.api.impl.model.data.SeriesSearchResultDTO.Builder
-
- Enclosing class:
- SeriesSearchResultDTO
public static class SeriesSearchResultDTO.Builder extends Object
Builder used to create a new immutableSeriesSearchResultDTO
implementation
This builder provides a fluent API for setting certain object properties and creating a new immutableSeriesSearchResultDTO
instance based on these properties. New builders may be initialized with some existing DTO instance, which presets the builders properties to the values of the given DTO, still retaining the option to make additional changes before actually building a new immutable object.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SeriesSearchResultDTO.Builder
addAliases(String element)
Adds one element toaliases
list.SeriesSearchResultDTO.Builder
addAliases(String... elements)
Adds elements toaliases
list.SeriesSearchResultDTO.Builder
addAllAliases(Iterable<String> elements)
Adds elements toaliases
list.SeriesSearchResultDTO.Builder
aliases(Iterable<String> elements)
Sets or replaces all elements foraliases
list.SeriesSearchResultDTO.Builder
banner(String banner)
Initializes the value for thebanner
attribute.SeriesSearchResultDTO
build()
Builds a newSeriesSearchResultDTO
.SeriesSearchResultDTO.Builder
firstAired(String firstAired)
Initializes the value for thefirstAired
attribute.SeriesSearchResultDTO.Builder
from(SeriesSearchResult instance)
Fill a builder with attribute values from the providedcom.github.m0nk3y2k4.thetvdb.api.model.data.SeriesSearchResult
instance.SeriesSearchResultDTO.Builder
from(SeriesSearchResultDTO instance)
Fill a builder with attribute values from the providedcom.github.m0nk3y2k4.thetvdb.internal.api.impl.model.data.SeriesSearchResultDTO
instance.SeriesSearchResultDTO.Builder
id(Long id)
Initializes the value for theid
attribute.SeriesSearchResultDTO.Builder
image(String image)
Initializes the value for theimage
attribute.SeriesSearchResultDTO.Builder
network(String network)
Initializes the value for thenetwork
attribute.SeriesSearchResultDTO.Builder
overview(String overview)
Initializes the value for theoverview
attribute.SeriesSearchResultDTO.Builder
poster(String poster)
Initializes the value for theposter
attribute.SeriesSearchResultDTO.Builder
seriesName(String seriesName)
Initializes the value for theseriesName
attribute.SeriesSearchResultDTO.Builder
slug(String slug)
Initializes the value for theslug
attribute.SeriesSearchResultDTO.Builder
status(String status)
Initializes the value for thestatus
attribute.
-
-
-
Method Detail
-
from
public final SeriesSearchResultDTO.Builder from(SeriesSearchResult instance)
Fill a builder with attribute values from the providedcom.github.m0nk3y2k4.thetvdb.api.model.data.SeriesSearchResult
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
from
public final SeriesSearchResultDTO.Builder from(SeriesSearchResultDTO instance)
Fill a builder with attribute values from the providedcom.github.m0nk3y2k4.thetvdb.internal.api.impl.model.data.SeriesSearchResultDTO
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
addAliases
public final SeriesSearchResultDTO.Builder addAliases(String element)
Adds one element toaliases
list.- Parameters:
element
- A aliases element- Returns:
this
builder for use in a chained invocation
-
addAliases
public final SeriesSearchResultDTO.Builder addAliases(String... elements)
Adds elements toaliases
list.- Parameters:
elements
- An array of aliases elements- Returns:
this
builder for use in a chained invocation
-
aliases
public final SeriesSearchResultDTO.Builder aliases(Iterable<String> elements)
Sets or replaces all elements foraliases
list.- Parameters:
elements
- An iterable of aliases elements- Returns:
this
builder for use in a chained invocation
-
addAllAliases
public final SeriesSearchResultDTO.Builder addAllAliases(Iterable<String> elements)
Adds elements toaliases
list.- Parameters:
elements
- An iterable of aliases elements- Returns:
this
builder for use in a chained invocation
-
banner
public final SeriesSearchResultDTO.Builder banner(@Nullable String banner)
Initializes the value for thebanner
attribute.- Parameters:
banner
- The value for banner (can benull
)- Returns:
this
builder for use in a chained invocation
-
firstAired
public final SeriesSearchResultDTO.Builder firstAired(@Nullable String firstAired)
Initializes the value for thefirstAired
attribute.- Parameters:
firstAired
- The value for firstAired (can benull
)- Returns:
this
builder for use in a chained invocation
-
id
public final SeriesSearchResultDTO.Builder id(@Nullable Long id)
Initializes the value for theid
attribute.- Parameters:
id
- The value for id (can benull
)- Returns:
this
builder for use in a chained invocation
-
image
public final SeriesSearchResultDTO.Builder image(@Nullable String image)
Initializes the value for theimage
attribute.- Parameters:
image
- The value for image (can benull
)- Returns:
this
builder for use in a chained invocation
-
network
public final SeriesSearchResultDTO.Builder network(@Nullable String network)
Initializes the value for thenetwork
attribute.- Parameters:
network
- The value for network (can benull
)- Returns:
this
builder for use in a chained invocation
-
overview
public final SeriesSearchResultDTO.Builder overview(@Nullable String overview)
Initializes the value for theoverview
attribute.- Parameters:
overview
- The value for overview (can benull
)- Returns:
this
builder for use in a chained invocation
-
poster
public final SeriesSearchResultDTO.Builder poster(@Nullable String poster)
Initializes the value for theposter
attribute.- Parameters:
poster
- The value for poster (can benull
)- Returns:
this
builder for use in a chained invocation
-
seriesName
public final SeriesSearchResultDTO.Builder seriesName(@Nullable String seriesName)
Initializes the value for theseriesName
attribute.- Parameters:
seriesName
- The value for seriesName (can benull
)- Returns:
this
builder for use in a chained invocation
-
slug
public final SeriesSearchResultDTO.Builder slug(@Nullable String slug)
Initializes the value for theslug
attribute.- Parameters:
slug
- The value for slug (can benull
)- Returns:
this
builder for use in a chained invocation
-
status
public final SeriesSearchResultDTO.Builder status(@Nullable String status)
Initializes the value for thestatus
attribute.- Parameters:
status
- The value for status (can benull
)- Returns:
this
builder for use in a chained invocation
-
build
public SeriesSearchResultDTO build()
Builds a newSeriesSearchResultDTO
.- Returns:
- An immutable instance of SeriesSearchResultDTO
- Throws:
IllegalStateException
- if any required attributes are missing
-
-