Class SeriesDTO.Builder

  • Enclosing class:
    SeriesDTO

    public static class SeriesDTO.Builder
    extends Object
    Builder used to create a new immutable SeriesDTO implementation


    This builder provides a fluent API for setting certain object properties and creating a new immutable SeriesDTO 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 Detail

      • Builder

        public Builder()
    • Method Detail

      • from

        public final SeriesDTO.Builder from​(SeriesSearchResult instance)
        Fill a builder with attribute values from the provided com.github.m0nk3y2k4.thetvdb.api.model.data.SeriesSearchResult instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • from

        public final SeriesDTO.Builder from​(Series instance)
        Fill a builder with attribute values from the provided com.github.m0nk3y2k4.thetvdb.api.model.data.Series instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • from

        public final SeriesDTO.Builder from​(SeriesDTO instance)
        Fill a builder with attribute values from the provided com.github.m0nk3y2k4.thetvdb.internal.api.impl.model.data.SeriesDTO instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • addAliases

        public final SeriesDTO.Builder addAliases​(String element)
        Adds one element to aliases list.
        Parameters:
        element - A aliases element
        Returns:
        this builder for use in a chained invocation
      • addAliases

        public final SeriesDTO.Builder addAliases​(String... elements)
        Adds elements to aliases list.
        Parameters:
        elements - An array of aliases elements
        Returns:
        this builder for use in a chained invocation
      • aliases

        public final SeriesDTO.Builder aliases​(Iterable<String> elements)
        Sets or replaces all elements for aliases list.
        Parameters:
        elements - An iterable of aliases elements
        Returns:
        this builder for use in a chained invocation
      • addAllAliases

        public final SeriesDTO.Builder addAllAliases​(Iterable<String> elements)
        Adds elements to aliases list.
        Parameters:
        elements - An iterable of aliases elements
        Returns:
        this builder for use in a chained invocation
      • banner

        public final SeriesDTO.Builder banner​(@Nullable
                                              String banner)
        Initializes the value for the banner attribute.
        Parameters:
        banner - The value for banner (can be null)
        Returns:
        this builder for use in a chained invocation
      • firstAired

        public final SeriesDTO.Builder firstAired​(@Nullable
                                                  String firstAired)
        Initializes the value for the firstAired attribute.
        Parameters:
        firstAired - The value for firstAired (can be null)
        Returns:
        this builder for use in a chained invocation
      • id

        public final SeriesDTO.Builder id​(@Nullable
                                          Long id)
        Initializes the value for the id attribute.
        Parameters:
        id - The value for id (can be null)
        Returns:
        this builder for use in a chained invocation
      • image

        public final SeriesDTO.Builder image​(@Nullable
                                             String image)
        Initializes the value for the image attribute.
        Parameters:
        image - The value for image (can be null)
        Returns:
        this builder for use in a chained invocation
      • network

        public final SeriesDTO.Builder network​(@Nullable
                                               String network)
        Initializes the value for the network attribute.
        Parameters:
        network - The value for network (can be null)
        Returns:
        this builder for use in a chained invocation
      • overview

        public final SeriesDTO.Builder overview​(@Nullable
                                                String overview)
        Initializes the value for the overview attribute.
        Parameters:
        overview - The value for overview (can be null)
        Returns:
        this builder for use in a chained invocation
      • poster

        public final SeriesDTO.Builder poster​(@Nullable
                                              String poster)
        Initializes the value for the poster attribute.
        Parameters:
        poster - The value for poster (can be null)
        Returns:
        this builder for use in a chained invocation
      • seriesName

        public final SeriesDTO.Builder seriesName​(@Nullable
                                                  String seriesName)
        Initializes the value for the seriesName attribute.
        Parameters:
        seriesName - The value for seriesName (can be null)
        Returns:
        this builder for use in a chained invocation
      • slug

        public final SeriesDTO.Builder slug​(@Nullable
                                            String slug)
        Initializes the value for the slug attribute.
        Parameters:
        slug - The value for slug (can be null)
        Returns:
        this builder for use in a chained invocation
      • status

        public final SeriesDTO.Builder status​(@Nullable
                                              String status)
        Initializes the value for the status attribute.
        Parameters:
        status - The value for status (can be null)
        Returns:
        this builder for use in a chained invocation
      • added

        public final SeriesDTO.Builder added​(@Nullable
                                             String added)
        Initializes the value for the added attribute.
        Parameters:
        added - The value for added (can be null)
        Returns:
        this builder for use in a chained invocation
      • airsDayOfWeek

        public final SeriesDTO.Builder airsDayOfWeek​(@Nullable
                                                     String airsDayOfWeek)
        Initializes the value for the airsDayOfWeek attribute.
        Parameters:
        airsDayOfWeek - The value for airsDayOfWeek (can be null)
        Returns:
        this builder for use in a chained invocation
      • airsTime

        public final SeriesDTO.Builder airsTime​(@Nullable
                                                String airsTime)
        Initializes the value for the airsTime attribute.
        Parameters:
        airsTime - The value for airsTime (can be null)
        Returns:
        this builder for use in a chained invocation
      • addGenre

        public final SeriesDTO.Builder addGenre​(String element)
        Adds one element to genre list.
        Parameters:
        element - A genre element
        Returns:
        this builder for use in a chained invocation
      • addGenre

        public final SeriesDTO.Builder addGenre​(String... elements)
        Adds elements to genre list.
        Parameters:
        elements - An array of genre elements
        Returns:
        this builder for use in a chained invocation
      • genre

        public final SeriesDTO.Builder genre​(Iterable<String> elements)
        Sets or replaces all elements for genre list.
        Parameters:
        elements - An iterable of genre elements
        Returns:
        this builder for use in a chained invocation
      • addAllGenre

        public final SeriesDTO.Builder addAllGenre​(Iterable<String> elements)
        Adds elements to genre list.
        Parameters:
        elements - An iterable of genre elements
        Returns:
        this builder for use in a chained invocation
      • imdbId

        public final SeriesDTO.Builder imdbId​(@Nullable
                                              String imdbId)
        Initializes the value for the imdbId attribute.
        Parameters:
        imdbId - The value for imdbId (can be null)
        Returns:
        this builder for use in a chained invocation
      • lastUpdated

        public final SeriesDTO.Builder lastUpdated​(@Nullable
                                                   Long lastUpdated)
        Initializes the value for the lastUpdated attribute.
        Parameters:
        lastUpdated - The value for lastUpdated (can be null)
        Returns:
        this builder for use in a chained invocation
      • networkId

        public final SeriesDTO.Builder networkId​(@Nullable
                                                 String networkId)
        Initializes the value for the networkId attribute.
        Parameters:
        networkId - The value for networkId (can be null)
        Returns:
        this builder for use in a chained invocation
      • rating

        public final SeriesDTO.Builder rating​(@Nullable
                                              String rating)
        Initializes the value for the rating attribute.
        Parameters:
        rating - The value for rating (can be null)
        Returns:
        this builder for use in a chained invocation
      • runtime

        public final SeriesDTO.Builder runtime​(@Nullable
                                               String runtime)
        Initializes the value for the runtime attribute.
        Parameters:
        runtime - The value for runtime (can be null)
        Returns:
        this builder for use in a chained invocation
      • seriesId

        public final SeriesDTO.Builder seriesId​(@Nullable
                                                String seriesId)
        Initializes the value for the seriesId attribute.
        Parameters:
        seriesId - The value for seriesId (can be null)
        Returns:
        this builder for use in a chained invocation
      • siteRating

        public final SeriesDTO.Builder siteRating​(@Nullable
                                                  Double siteRating)
        Initializes the value for the siteRating attribute.
        Parameters:
        siteRating - The value for siteRating (can be null)
        Returns:
        this builder for use in a chained invocation
      • siteRatingCount

        public final SeriesDTO.Builder siteRatingCount​(@Nullable
                                                       Long siteRatingCount)
        Initializes the value for the siteRatingCount attribute.
        Parameters:
        siteRatingCount - The value for siteRatingCount (can be null)
        Returns:
        this builder for use in a chained invocation
      • zap2itId

        public final SeriesDTO.Builder zap2itId​(@Nullable
                                                String zap2itId)
        Initializes the value for the zap2itId attribute.
        Parameters:
        zap2itId - The value for zap2itId (can be null)
        Returns:
        this builder for use in a chained invocation