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.PeopleDTOimplementation
This builder provides a fluent API for setting certain object properties and creating a new immutableMovieDTO.PeopleDTOinstance 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.PeopleDTObuild()Builds a newPeopleDTO.MovieDTO.PeopleDTO.Builderfrom(Movie.People instance)Fill a builder with attribute values from the providedcom.github.m0nk3y2k4.thetvdb.api.model.data.Movie.Peopleinstance.MovieDTO.PeopleDTO.Builderfrom(MovieDTO.PeopleDTO instance)Fill a builder with attribute values from the providedcom.github.m0nk3y2k4.thetvdb.internal.api.impl.model.data.MovieDTO.PeopleDTOinstance.MovieDTO.PeopleDTO.Builderid(String id)Initializes the value for theidattribute.MovieDTO.PeopleDTO.BuilderimdbId(String imdbId)Initializes the value for theimdbIdattribute.MovieDTO.PeopleDTO.BuilderisFeatured(Boolean isFeatured)Initializes the value for theisFeaturedattribute.MovieDTO.PeopleDTO.Buildername(String name)Initializes the value for thenameattribute.MovieDTO.PeopleDTO.BuilderpeopleFacebook(String peopleFacebook)Initializes the value for thepeopleFacebookattribute.MovieDTO.PeopleDTO.BuilderpeopleId(String peopleId)Initializes the value for thepeopleIdattribute.MovieDTO.PeopleDTO.BuilderpeopleImage(String peopleImage)Initializes the value for thepeopleImageattribute.MovieDTO.PeopleDTO.BuilderpeopleInstagram(String peopleInstagram)Initializes the value for thepeopleInstagramattribute.MovieDTO.PeopleDTO.BuilderpeopleTwitter(String peopleTwitter)Initializes the value for thepeopleTwitterattribute.MovieDTO.PeopleDTO.Builderrole(String role)Initializes the value for theroleattribute.MovieDTO.PeopleDTO.BuilderroleImage(String roleImage)Initializes the value for theroleImageattribute.
-
-
-
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.Peopleinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder 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.PeopleDTOinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
id
public final MovieDTO.PeopleDTO.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
-
name
public final MovieDTO.PeopleDTO.Builder name(@Nullable String name)
Initializes the value for thenameattribute.- Parameters:
name- The value for name (can benull)- Returns:
thisbuilder for use in a chained invocation
-
role
public final MovieDTO.PeopleDTO.Builder role(@Nullable String role)
Initializes the value for theroleattribute.- Parameters:
role- The value for role (can benull)- Returns:
thisbuilder for use in a chained invocation
-
imdbId
public final MovieDTO.PeopleDTO.Builder imdbId(@Nullable String imdbId)
Initializes the value for theimdbIdattribute.- Parameters:
imdbId- The value for imdbId (can benull)- Returns:
thisbuilder for use in a chained invocation
-
isFeatured
public final MovieDTO.PeopleDTO.Builder isFeatured(@Nullable Boolean isFeatured)
Initializes the value for theisFeaturedattribute.- Parameters:
isFeatured- The value for isFeatured (can benull)- Returns:
thisbuilder for use in a chained invocation
-
peopleFacebook
public final MovieDTO.PeopleDTO.Builder peopleFacebook(@Nullable String peopleFacebook)
Initializes the value for thepeopleFacebookattribute.- Parameters:
peopleFacebook- The value for peopleFacebook (can benull)- Returns:
thisbuilder for use in a chained invocation
-
peopleId
public final MovieDTO.PeopleDTO.Builder peopleId(@Nullable String peopleId)
Initializes the value for thepeopleIdattribute.- Parameters:
peopleId- The value for peopleId (can benull)- Returns:
thisbuilder for use in a chained invocation
-
peopleImage
public final MovieDTO.PeopleDTO.Builder peopleImage(@Nullable String peopleImage)
Initializes the value for thepeopleImageattribute.- Parameters:
peopleImage- The value for peopleImage (can benull)- Returns:
thisbuilder for use in a chained invocation
-
peopleInstagram
public final MovieDTO.PeopleDTO.Builder peopleInstagram(@Nullable String peopleInstagram)
Initializes the value for thepeopleInstagramattribute.- Parameters:
peopleInstagram- The value for peopleInstagram (can benull)- Returns:
thisbuilder for use in a chained invocation
-
peopleTwitter
public final MovieDTO.PeopleDTO.Builder peopleTwitter(@Nullable String peopleTwitter)
Initializes the value for thepeopleTwitterattribute.- Parameters:
peopleTwitter- The value for peopleTwitter (can benull)- Returns:
thisbuilder for use in a chained invocation
-
roleImage
public final MovieDTO.PeopleDTO.Builder roleImage(@Nullable String roleImage)
Initializes the value for theroleImageattribute.- Parameters:
roleImage- The value for roleImage (can benull)- Returns:
thisbuilder 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
-
-