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 immutableImageSummaryDTO
implementation
This builder provides a fluent API for setting certain object properties and creating a new immutableImageSummaryDTO
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 ImageSummaryDTO
build()
Builds a newImageSummaryDTO
.ImageSummaryDTO.Builder
fanartCount(Long fanartCount)
Initializes the value for thefanartCount
attribute.ImageSummaryDTO.Builder
from(ImageSummary instance)
Fill a builder with attribute values from the providedcom.github.m0nk3y2k4.thetvdb.api.model.data.ImageSummary
instance.ImageSummaryDTO.Builder
from(ImageSummaryDTO instance)
Fill a builder with attribute values from the providedcom.github.m0nk3y2k4.thetvdb.internal.api.impl.model.data.ImageSummaryDTO
instance.ImageSummaryDTO.Builder
posterCount(Long posterCount)
Initializes the value for theposterCount
attribute.ImageSummaryDTO.Builder
seasonCount(Long seasonCount)
Initializes the value for theseasonCount
attribute.ImageSummaryDTO.Builder
seasonwideCount(Long seasonwideCount)
Initializes the value for theseasonwideCount
attribute.ImageSummaryDTO.Builder
seriesCount(Long seriesCount)
Initializes the value for theseriesCount
attribute.
-
-
-
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.ImageSummaryDTO
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder 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.ImageSummary
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
fanartCount
public final ImageSummaryDTO.Builder fanartCount(@Nullable Long fanartCount)
Initializes the value for thefanartCount
attribute.- Parameters:
fanartCount
- The value for fanartCount (can benull
)- Returns:
this
builder for use in a chained invocation
-
posterCount
public final ImageSummaryDTO.Builder posterCount(@Nullable Long posterCount)
Initializes the value for theposterCount
attribute.- Parameters:
posterCount
- The value for posterCount (can benull
)- Returns:
this
builder for use in a chained invocation
-
seasonCount
public final ImageSummaryDTO.Builder seasonCount(@Nullable Long seasonCount)
Initializes the value for theseasonCount
attribute.- Parameters:
seasonCount
- The value for seasonCount (can benull
)- Returns:
this
builder for use in a chained invocation
-
seasonwideCount
public final ImageSummaryDTO.Builder seasonwideCount(@Nullable Long seasonwideCount)
Initializes the value for theseasonwideCount
attribute.- Parameters:
seasonwideCount
- The value for seasonwideCount (can benull
)- Returns:
this
builder for use in a chained invocation
-
seriesCount
public final ImageSummaryDTO.Builder seriesCount(@Nullable Long seriesCount)
Initializes the value for theseriesCount
attribute.- Parameters:
seriesCount
- The value for seriesCount (can benull
)- Returns:
this
builder 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
-
-