Class MovieDTO.TranslationDTO.Builder
- java.lang.Object
-
- com.github.m0nk3y2k4.thetvdb.internal.api.impl.model.data.MovieDTO.TranslationDTO.Builder
-
- Enclosing class:
- MovieDTO.TranslationDTO
public static class MovieDTO.TranslationDTO.Builder extends Object
Builder used to create a new immutableMovieDTO.TranslationDTO
implementation
This builder provides a fluent API for setting certain object properties and creating a new immutableMovieDTO.TranslationDTO
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.TranslationDTO
build()
Builds a newTranslationDTO
.MovieDTO.TranslationDTO.Builder
from(Movie.Translation instance)
Fill a builder with attribute values from the providedcom.github.m0nk3y2k4.thetvdb.api.model.data.Movie.Translation
instance.MovieDTO.TranslationDTO.Builder
from(MovieDTO.TranslationDTO instance)
Fill a builder with attribute values from the providedcom.github.m0nk3y2k4.thetvdb.internal.api.impl.model.data.MovieDTO.TranslationDTO
instance.MovieDTO.TranslationDTO.Builder
isPrimary(Boolean isPrimary)
Initializes the value for theisPrimary
attribute.MovieDTO.TranslationDTO.Builder
languageCode(String languageCode)
Initializes the value for thelanguageCode
attribute.MovieDTO.TranslationDTO.Builder
name(String name)
Initializes the value for thename
attribute.MovieDTO.TranslationDTO.Builder
overview(String overview)
Initializes the value for theoverview
attribute.MovieDTO.TranslationDTO.Builder
tagline(String tagline)
Initializes the value for thetagline
attribute.
-
-
-
Method Detail
-
from
public final MovieDTO.TranslationDTO.Builder from(MovieDTO.TranslationDTO instance)
Fill a builder with attribute values from the providedcom.github.m0nk3y2k4.thetvdb.internal.api.impl.model.data.MovieDTO.TranslationDTO
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
from
public final MovieDTO.TranslationDTO.Builder from(Movie.Translation instance)
Fill a builder with attribute values from the providedcom.github.m0nk3y2k4.thetvdb.api.model.data.Movie.Translation
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
name
public final MovieDTO.TranslationDTO.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
-
overview
public final MovieDTO.TranslationDTO.Builder overview(@Nullable String overview)
Initializes the value for theoverview
attribute.- Parameters:
overview
- The value for overview (can benull
)- Returns:
this
builder for use in a chained invocation
-
tagline
public final MovieDTO.TranslationDTO.Builder tagline(@Nullable String tagline)
Initializes the value for thetagline
attribute.- Parameters:
tagline
- The value for tagline (can benull
)- Returns:
this
builder for use in a chained invocation
-
isPrimary
public final MovieDTO.TranslationDTO.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
-
languageCode
public final MovieDTO.TranslationDTO.Builder languageCode(@Nullable String languageCode)
Initializes the value for thelanguageCode
attribute.- Parameters:
languageCode
- The value for languageCode (can benull
)- Returns:
this
builder for use in a chained invocation
-
build
public MovieDTO.TranslationDTO build()
Builds a newTranslationDTO
.- Returns:
- An immutable instance of TranslationDTO
- Throws:
IllegalStateException
- if any required attributes are missing
-
-