Class ImageSummaryDTO.Builder
- java.lang.Object
-
- com.github.m0nk3y2k4.thetvdb.internal.api.impl.model.data.ImageSummaryDTO.Builder
-
- Enclosing class:
- ImageSummaryDTO
public static class ImageSummaryDTO.Builder extends Object
Builder used to create a new immutableImageSummaryDTOimplementation
This builder provides a fluent API for setting certain object properties and creating a new immutableImageSummaryDTOinstance 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 ImageSummaryDTObuild()Builds a newImageSummaryDTO.ImageSummaryDTO.BuilderfanartCount(Long fanartCount)Initializes the value for thefanartCountattribute.ImageSummaryDTO.Builderfrom(ImageSummary instance)Fill a builder with attribute values from the providedcom.github.m0nk3y2k4.thetvdb.api.model.data.ImageSummaryinstance.ImageSummaryDTO.Builderfrom(ImageSummaryDTO instance)Fill a builder with attribute values from the providedcom.github.m0nk3y2k4.thetvdb.internal.api.impl.model.data.ImageSummaryDTOinstance.ImageSummaryDTO.BuilderposterCount(Long posterCount)Initializes the value for theposterCountattribute.ImageSummaryDTO.BuilderseasonCount(Long seasonCount)Initializes the value for theseasonCountattribute.ImageSummaryDTO.BuilderseasonwideCount(Long seasonwideCount)Initializes the value for theseasonwideCountattribute.ImageSummaryDTO.BuilderseriesCount(Long seriesCount)Initializes the value for theseriesCountattribute.
-
-
-
Method Detail
-
from
public final ImageSummaryDTO.Builder from(ImageSummaryDTO instance)
Fill a builder with attribute values from the providedcom.github.m0nk3y2k4.thetvdb.internal.api.impl.model.data.ImageSummaryDTOinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
public final ImageSummaryDTO.Builder from(ImageSummary instance)
Fill a builder with attribute values from the providedcom.github.m0nk3y2k4.thetvdb.api.model.data.ImageSummaryinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
fanartCount
public final ImageSummaryDTO.Builder fanartCount(@Nullable Long fanartCount)
Initializes the value for thefanartCountattribute.- Parameters:
fanartCount- The value for fanartCount (can benull)- Returns:
thisbuilder for use in a chained invocation
-
posterCount
public final ImageSummaryDTO.Builder posterCount(@Nullable Long posterCount)
Initializes the value for theposterCountattribute.- Parameters:
posterCount- The value for posterCount (can benull)- Returns:
thisbuilder for use in a chained invocation
-
seasonCount
public final ImageSummaryDTO.Builder seasonCount(@Nullable Long seasonCount)
Initializes the value for theseasonCountattribute.- Parameters:
seasonCount- The value for seasonCount (can benull)- Returns:
thisbuilder for use in a chained invocation
-
seasonwideCount
public final ImageSummaryDTO.Builder seasonwideCount(@Nullable Long seasonwideCount)
Initializes the value for theseasonwideCountattribute.- Parameters:
seasonwideCount- The value for seasonwideCount (can benull)- Returns:
thisbuilder for use in a chained invocation
-
seriesCount
public final ImageSummaryDTO.Builder seriesCount(@Nullable Long seriesCount)
Initializes the value for theseriesCountattribute.- Parameters:
seriesCount- The value for seriesCount (can benull)- Returns:
thisbuilder for use in a chained invocation
-
build
public ImageSummaryDTO build()
Builds a newImageSummaryDTO.- Returns:
- An immutable instance of ImageSummaryDTO
- Throws:
IllegalStateException- if any required attributes are missing
-
-