Class MovieDTO.RemoteIdDTO.Builder
- java.lang.Object
-
- com.github.m0nk3y2k4.thetvdb.internal.api.impl.model.data.MovieDTO.RemoteIdDTO.Builder
-
- Enclosing class:
- MovieDTO.RemoteIdDTO
public static class MovieDTO.RemoteIdDTO.Builder extends Object
Builder used to create a new immutableMovieDTO.RemoteIdDTOimplementation
This builder provides a fluent API for setting certain object properties and creating a new immutableMovieDTO.RemoteIdDTOinstance 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.RemoteIdDTObuild()Builds a newRemoteIdDTO.MovieDTO.RemoteIdDTO.Builderfrom(Movie.RemoteId instance)Fill a builder with attribute values from the providedcom.github.m0nk3y2k4.thetvdb.api.model.data.Movie.RemoteIdinstance.MovieDTO.RemoteIdDTO.Builderfrom(MovieDTO.RemoteIdDTO instance)Fill a builder with attribute values from the providedcom.github.m0nk3y2k4.thetvdb.internal.api.impl.model.data.MovieDTO.RemoteIdDTOinstance.MovieDTO.RemoteIdDTO.Builderid(String id)Initializes the value for theidattribute.MovieDTO.RemoteIdDTO.BuildersourceId(Long sourceId)Initializes the value for thesourceIdattribute.MovieDTO.RemoteIdDTO.BuildersourceName(String sourceName)Initializes the value for thesourceNameattribute.MovieDTO.RemoteIdDTO.BuildersourceUrl(String sourceUrl)Initializes the value for thesourceUrlattribute.MovieDTO.RemoteIdDTO.Builderurl(String url)Initializes the value for theurlattribute.
-
-
-
Method Detail
-
from
public final MovieDTO.RemoteIdDTO.Builder from(MovieDTO.RemoteIdDTO instance)
Fill a builder with attribute values from the providedcom.github.m0nk3y2k4.thetvdb.internal.api.impl.model.data.MovieDTO.RemoteIdDTOinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
public final MovieDTO.RemoteIdDTO.Builder from(Movie.RemoteId instance)
Fill a builder with attribute values from the providedcom.github.m0nk3y2k4.thetvdb.api.model.data.Movie.RemoteIdinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
id
public final MovieDTO.RemoteIdDTO.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
-
url
public final MovieDTO.RemoteIdDTO.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
-
sourceId
public final MovieDTO.RemoteIdDTO.Builder sourceId(@Nullable Long sourceId)
Initializes the value for thesourceIdattribute.- Parameters:
sourceId- The value for sourceId (can benull)- Returns:
thisbuilder for use in a chained invocation
-
sourceName
public final MovieDTO.RemoteIdDTO.Builder sourceName(@Nullable String sourceName)
Initializes the value for thesourceNameattribute.- Parameters:
sourceName- The value for sourceName (can benull)- Returns:
thisbuilder for use in a chained invocation
-
sourceUrl
public final MovieDTO.RemoteIdDTO.Builder sourceUrl(@Nullable String sourceUrl)
Initializes the value for thesourceUrlattribute.- Parameters:
sourceUrl- The value for sourceUrl (can benull)- Returns:
thisbuilder for use in a chained invocation
-
build
public MovieDTO.RemoteIdDTO build()
Builds a newRemoteIdDTO.- Returns:
- An immutable instance of RemoteIdDTO
- Throws:
IllegalStateException- if any required attributes are missing
-
-