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.ArtworkDTO
implementation
This builder provides a fluent API for setting certain object properties and creating a new immutableMovieDTO.ArtworkDTO
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 MovieDTO.ArtworkDTO.Builder
artworkType(String artworkType)
Initializes the value for theartworkType
attribute.MovieDTO.ArtworkDTO
build()
Builds a newArtworkDTO
.MovieDTO.ArtworkDTO.Builder
from(Movie.Artwork instance)
Fill a builder with attribute values from the providedcom.github.m0nk3y2k4.thetvdb.api.model.data.Movie.Artwork
instance.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.ArtworkDTO
instance.MovieDTO.ArtworkDTO.Builder
height(Long height)
Initializes the value for theheight
attribute.MovieDTO.ArtworkDTO.Builder
id(String id)
Initializes the value for theid
attribute.MovieDTO.ArtworkDTO.Builder
isPrimary(Boolean isPrimary)
Initializes the value for theisPrimary
attribute.MovieDTO.ArtworkDTO.Builder
tags(String tags)
Initializes the value for thetags
attribute.MovieDTO.ArtworkDTO.Builder
thumbUrl(String thumbUrl)
Initializes the value for thethumbUrl
attribute.MovieDTO.ArtworkDTO.Builder
url(String url)
Initializes the value for theurl
attribute.MovieDTO.ArtworkDTO.Builder
width(Long width)
Initializes the value for thewidth
attribute.
-
-
-
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.ArtworkDTO
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder 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.Artwork
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
height
public final MovieDTO.ArtworkDTO.Builder height(@Nullable Long height)
Initializes the value for theheight
attribute.- Parameters:
height
- The value for height (can benull
)- Returns:
this
builder for use in a chained invocation
-
id
public final MovieDTO.ArtworkDTO.Builder id(@Nullable String id)
Initializes the value for theid
attribute.- Parameters:
id
- The value for id (can benull
)- Returns:
this
builder for use in a chained invocation
-
tags
public final MovieDTO.ArtworkDTO.Builder tags(@Nullable String tags)
Initializes the value for thetags
attribute.- Parameters:
tags
- The value for tags (can benull
)- Returns:
this
builder for use in a chained invocation
-
url
public final MovieDTO.ArtworkDTO.Builder url(@Nullable String url)
Initializes the value for theurl
attribute.- Parameters:
url
- The value for url (can benull
)- Returns:
this
builder for use in a chained invocation
-
width
public final MovieDTO.ArtworkDTO.Builder width(@Nullable Long width)
Initializes the value for thewidth
attribute.- Parameters:
width
- The value for width (can benull
)- Returns:
this
builder for use in a chained invocation
-
artworkType
public final MovieDTO.ArtworkDTO.Builder artworkType(@Nullable String artworkType)
Initializes the value for theartworkType
attribute.- Parameters:
artworkType
- The value for artworkType (can benull
)- Returns:
this
builder for use in a chained invocation
-
isPrimary
public final MovieDTO.ArtworkDTO.Builder isPrimary(@Nullable Boolean isPrimary)
Initializes the value for theisPrimary
attribute.- Parameters:
isPrimary
- The value for isPrimary (can benull
)- Returns:
this
builder for use in a chained invocation
-
thumbUrl
public final MovieDTO.ArtworkDTO.Builder thumbUrl(@Nullable String thumbUrl)
Initializes the value for thethumbUrl
attribute.- Parameters:
thumbUrl
- The value for thumbUrl (can benull
)- Returns:
this
builder 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
-
-