Class ImageDTO.Builder

  • Enclosing class:
    ImageDTO

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


    This builder provides a fluent API for setting certain object properties and creating a new immutable ImageDTO 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 ImageDTO.Builder from​(ImageDTO instance)
        Fill a builder with attribute values from the provided com.github.m0nk3y2k4.thetvdb.internal.api.impl.model.data.ImageDTO instance.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • from

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

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

        public final ImageDTO.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
      • keyType

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

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

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

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

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

        public final ImageDTO.Builder putRatingsInfo​(String key,
                                                     Object value)
        Put one entry to the ratingsInfo map.
        Parameters:
        key - The key in the ratingsInfo map
        value - The associated value in the ratingsInfo map
        Returns:
        this builder for use in a chained invocation
      • putRatingsInfo

        public final ImageDTO.Builder putRatingsInfo​(Map.Entry<String,? extends Object> entry)
        Put one entry to the ratingsInfo map. Nulls are not permitted
        Parameters:
        entry - The key and value entry
        Returns:
        this builder for use in a chained invocation
      • ratingsInfo

        public final ImageDTO.Builder ratingsInfo​(Map<String,? extends Object> entries)
        Sets or replaces all mappings from the specified map as entries for the ratingsInfo map. Nulls are not permitted
        Parameters:
        entries - The entries that will be added to the ratingsInfo map
        Returns:
        this builder for use in a chained invocation
      • putAllRatingsInfo

        public final ImageDTO.Builder putAllRatingsInfo​(Map<String,? extends Object> entries)
        Put all mappings from the specified map as entries to ratingsInfo map. Nulls are not permitted
        Parameters:
        entries - The entries that will be added to the ratingsInfo map
        Returns:
        this builder for use in a chained invocation