Record Class TmdbClientConfig

java.lang.Object
java.lang.Record
dev.reuss.tmdb.core.config.TmdbClientConfig
Record Components:
auth - the TMDB authentication configuration
baseUrl - the TMDB API base URL, usually https://api.themoviedb.org/3
defaultLanguage - the default language used for localized requests
defaultRegion - the optional default region used for regional requests
connectTimeout - the HTTP connection timeout
requestTimeout - the overall HTTP request timeout
metricsRecorder - the metrics recorder used to observe TMDB HTTP requests

public record TmdbClientConfig(TmdbAuth auth, String baseUrl, Language defaultLanguage, Region defaultRegion, Duration connectTimeout, Duration requestTimeout, TmdbMetricsRecorder metricsRecorder) extends Record
Configuration used to create and operate a TMDB client instance.

This record contains authentication, endpoint and default request settings shared by all services created by the client.

The defaultLanguage is used by services when no request-specific language is provided. The defaultRegion is optional and may be null, because not every TMDB endpoint or request requires a region.

  • Field Details

  • Constructor Details

  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • auth

      public TmdbAuth auth()
      Returns the value of the auth record component.
      Returns:
      the value of the auth record component
    • baseUrl

      public String baseUrl()
      Returns the value of the baseUrl record component.
      Returns:
      the value of the baseUrl record component
    • defaultLanguage

      public Language defaultLanguage()
      Returns the value of the defaultLanguage record component.
      Returns:
      the value of the defaultLanguage record component
    • defaultRegion

      public Region defaultRegion()
      Returns the value of the defaultRegion record component.
      Returns:
      the value of the defaultRegion record component
    • connectTimeout

      public Duration connectTimeout()
      Returns the value of the connectTimeout record component.
      Returns:
      the value of the connectTimeout record component
    • requestTimeout

      public Duration requestTimeout()
      Returns the value of the requestTimeout record component.
      Returns:
      the value of the requestTimeout record component
    • metricsRecorder

      public TmdbMetricsRecorder metricsRecorder()
      Returns the value of the metricsRecorder record component.
      Returns:
      the value of the metricsRecorder record component