Class MovieDTO.ArtworkDTO.Builder
- java.lang.Object
-
- com.github.m0nk3y2k4.thetvdb.internal.api.impl.model.data.MovieDTO.ArtworkDTO.Builder
-
- Enclosing class:
- MovieDTO.ArtworkDTO
public static class MovieDTO.ArtworkDTO.Builder extends Object
Builder used to create a new immutableMovieDTO.ArtworkDTOimplementation
This builder provides a fluent API for setting certain object properties and creating a new immutableMovieDTO.ArtworkDTOinstance 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 MovieDTO.ArtworkDTO.BuilderartworkType(String artworkType)Initializes the value for theartworkTypeattribute.MovieDTO.ArtworkDTObuild()Builds a newArtworkDTO.MovieDTO.ArtworkDTO.Builderfrom(Movie.Artwork instance)Fill a builder with attribute values from the providedcom.github.m0nk3y2k4.thetvdb.api.model.data.Movie.Artworkinstance.MovieDTO.ArtworkDTO.Builderfrom(MovieDTO.ArtworkDTO instance)Fill a builder with attribute values from the providedcom.github.m0nk3y2k4.thetvdb.internal.api.impl.model.data.MovieDTO.ArtworkDTOinstance.MovieDTO.ArtworkDTO.Builderheight(Long height)Initializes the value for theheightattribute.MovieDTO.ArtworkDTO.Builderid(String id)Initializes the value for theidattribute.MovieDTO.ArtworkDTO.BuilderisPrimary(Boolean isPrimary)Initializes the value for theisPrimaryattribute.MovieDTO.ArtworkDTO.Buildertags(String tags)Initializes the value for thetagsattribute.MovieDTO.ArtworkDTO.BuilderthumbUrl(String thumbUrl)Initializes the value for thethumbUrlattribute.MovieDTO.ArtworkDTO.Builderurl(String url)Initializes the value for theurlattribute.MovieDTO.ArtworkDTO.Builderwidth(Long width)Initializes the value for thewidthattribute.
-
-
-
Method Detail
-
from
public final MovieDTO.ArtworkDTO.Builder from(MovieDTO.ArtworkDTO instance)
Fill a builder with attribute values from the providedcom.github.m0nk3y2k4.thetvdb.internal.api.impl.model.data.MovieDTO.ArtworkDTOinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
public final MovieDTO.ArtworkDTO.Builder from(Movie.Artwork instance)
Fill a builder with attribute values from the providedcom.github.m0nk3y2k4.thetvdb.api.model.data.Movie.Artworkinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
height
public final MovieDTO.ArtworkDTO.Builder height(@Nullable Long height)
Initializes the value for theheightattribute.- Parameters:
height- The value for height (can benull)- Returns:
thisbuilder for use in a chained invocation
-
id
public final MovieDTO.ArtworkDTO.Builder id(@Nullable String id)
Initializes the value for theidattribute.- Parameters:
id- The value for id (can benull)- Returns:
thisbuilder for use in a chained invocation
-
tags
public final MovieDTO.ArtworkDTO.Builder tags(@Nullable String tags)
Initializes the value for thetagsattribute.- Parameters:
tags- The value for tags (can benull)- Returns:
thisbuilder for use in a chained invocation
-
url
public final MovieDTO.ArtworkDTO.Builder url(@Nullable String url)
Initializes the value for theurlattribute.- Parameters:
url- The value for url (can benull)- Returns:
thisbuilder for use in a chained invocation
-
width
public final MovieDTO.ArtworkDTO.Builder width(@Nullable Long width)
Initializes the value for thewidthattribute.- Parameters:
width- The value for width (can benull)- Returns:
thisbuilder for use in a chained invocation
-
artworkType
public final MovieDTO.ArtworkDTO.Builder artworkType(@Nullable String artworkType)
Initializes the value for theartworkTypeattribute.- Parameters:
artworkType- The value for artworkType (can benull)- Returns:
thisbuilder for use in a chained invocation
-
isPrimary
public final MovieDTO.ArtworkDTO.Builder isPrimary(@Nullable Boolean isPrimary)
Initializes the value for theisPrimaryattribute.- Parameters:
isPrimary- The value for isPrimary (can benull)- Returns:
thisbuilder for use in a chained invocation
-
thumbUrl
public final MovieDTO.ArtworkDTO.Builder thumbUrl(@Nullable String thumbUrl)
Initializes the value for thethumbUrlattribute.- Parameters:
thumbUrl- The value for thumbUrl (can benull)- Returns:
thisbuilder for use in a chained invocation
-
build
public MovieDTO.ArtworkDTO build()
Builds a newArtworkDTO.- Returns:
- An immutable instance of ArtworkDTO
- Throws:
IllegalStateException- if any required attributes are missing
-
-