Class MovieDTO.PeopleDTO.Builder
- java.lang.Object
-
- com.github.m0nk3y2k4.thetvdb.internal.api.impl.model.data.MovieDTO.PeopleDTO.Builder
-
- Enclosing class:
- MovieDTO.PeopleDTO
public static class MovieDTO.PeopleDTO.Builder extends Object
Builder used to create a new immutableMovieDTO.PeopleDTO
implementation
This builder provides a fluent API for setting certain object properties and creating a new immutableMovieDTO.PeopleDTO
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.PeopleDTO
build()
Builds a newPeopleDTO
.MovieDTO.PeopleDTO.Builder
from(Movie.People instance)
Fill a builder with attribute values from the providedcom.github.m0nk3y2k4.thetvdb.api.model.data.Movie.People
instance.MovieDTO.PeopleDTO.Builder
from(MovieDTO.PeopleDTO instance)
Fill a builder with attribute values from the providedcom.github.m0nk3y2k4.thetvdb.internal.api.impl.model.data.MovieDTO.PeopleDTO
instance.MovieDTO.PeopleDTO.Builder
id(String id)
Initializes the value for theid
attribute.MovieDTO.PeopleDTO.Builder
imdbId(String imdbId)
Initializes the value for theimdbId
attribute.MovieDTO.PeopleDTO.Builder
isFeatured(Boolean isFeatured)
Initializes the value for theisFeatured
attribute.MovieDTO.PeopleDTO.Builder
name(String name)
Initializes the value for thename
attribute.MovieDTO.PeopleDTO.Builder
peopleFacebook(String peopleFacebook)
Initializes the value for thepeopleFacebook
attribute.MovieDTO.PeopleDTO.Builder
peopleId(String peopleId)
Initializes the value for thepeopleId
attribute.MovieDTO.PeopleDTO.Builder
peopleImage(String peopleImage)
Initializes the value for thepeopleImage
attribute.MovieDTO.PeopleDTO.Builder
peopleInstagram(String peopleInstagram)
Initializes the value for thepeopleInstagram
attribute.MovieDTO.PeopleDTO.Builder
peopleTwitter(String peopleTwitter)
Initializes the value for thepeopleTwitter
attribute.MovieDTO.PeopleDTO.Builder
role(String role)
Initializes the value for therole
attribute.MovieDTO.PeopleDTO.Builder
roleImage(String roleImage)
Initializes the value for theroleImage
attribute.
-
-
-
Method Detail
-
from
public final MovieDTO.PeopleDTO.Builder from(Movie.People instance)
Fill a builder with attribute values from the providedcom.github.m0nk3y2k4.thetvdb.api.model.data.Movie.People
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
from
public final MovieDTO.PeopleDTO.Builder from(MovieDTO.PeopleDTO instance)
Fill a builder with attribute values from the providedcom.github.m0nk3y2k4.thetvdb.internal.api.impl.model.data.MovieDTO.PeopleDTO
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
id
public final MovieDTO.PeopleDTO.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
-
name
public final MovieDTO.PeopleDTO.Builder name(@Nullable String name)
Initializes the value for thename
attribute.- Parameters:
name
- The value for name (can benull
)- Returns:
this
builder for use in a chained invocation
-
role
public final MovieDTO.PeopleDTO.Builder role(@Nullable String role)
Initializes the value for therole
attribute.- Parameters:
role
- The value for role (can benull
)- Returns:
this
builder for use in a chained invocation
-
imdbId
public final MovieDTO.PeopleDTO.Builder imdbId(@Nullable String imdbId)
Initializes the value for theimdbId
attribute.- Parameters:
imdbId
- The value for imdbId (can benull
)- Returns:
this
builder for use in a chained invocation
-
isFeatured
public final MovieDTO.PeopleDTO.Builder isFeatured(@Nullable Boolean isFeatured)
Initializes the value for theisFeatured
attribute.- Parameters:
isFeatured
- The value for isFeatured (can benull
)- Returns:
this
builder for use in a chained invocation
-
peopleFacebook
public final MovieDTO.PeopleDTO.Builder peopleFacebook(@Nullable String peopleFacebook)
Initializes the value for thepeopleFacebook
attribute.- Parameters:
peopleFacebook
- The value for peopleFacebook (can benull
)- Returns:
this
builder for use in a chained invocation
-
peopleId
public final MovieDTO.PeopleDTO.Builder peopleId(@Nullable String peopleId)
Initializes the value for thepeopleId
attribute.- Parameters:
peopleId
- The value for peopleId (can benull
)- Returns:
this
builder for use in a chained invocation
-
peopleImage
public final MovieDTO.PeopleDTO.Builder peopleImage(@Nullable String peopleImage)
Initializes the value for thepeopleImage
attribute.- Parameters:
peopleImage
- The value for peopleImage (can benull
)- Returns:
this
builder for use in a chained invocation
-
peopleInstagram
public final MovieDTO.PeopleDTO.Builder peopleInstagram(@Nullable String peopleInstagram)
Initializes the value for thepeopleInstagram
attribute.- Parameters:
peopleInstagram
- The value for peopleInstagram (can benull
)- Returns:
this
builder for use in a chained invocation
-
peopleTwitter
public final MovieDTO.PeopleDTO.Builder peopleTwitter(@Nullable String peopleTwitter)
Initializes the value for thepeopleTwitter
attribute.- Parameters:
peopleTwitter
- The value for peopleTwitter (can benull
)- Returns:
this
builder for use in a chained invocation
-
roleImage
public final MovieDTO.PeopleDTO.Builder roleImage(@Nullable String roleImage)
Initializes the value for theroleImage
attribute.- Parameters:
roleImage
- The value for roleImage (can benull
)- Returns:
this
builder for use in a chained invocation
-
build
public MovieDTO.PeopleDTO build()
Builds a newPeopleDTO
.- Returns:
- An immutable instance of PeopleDTO
- Throws:
IllegalStateException
- if any required attributes are missing
-
-