Class TimeToLiveConfigBuilder

java.lang.Object
com.commercetools.importapi.models.importcontainers.TimeToLiveConfigBuilder
All Implemented Interfaces:
Builder<TimeToLiveConfig>

public class TimeToLiveConfigBuilder extends Object implements Builder<TimeToLiveConfig>
TimeToLiveConfigBuilder
Example to create an instance using the builder pattern

     TimeToLiveConfig timeToLiveConfig = TimeToLiveConfig.builder()
             .timeToLive("{timeToLive}")
             .build()
 
  • Constructor Details

    • TimeToLiveConfigBuilder

      public TimeToLiveConfigBuilder()
  • Method Details

    • timeToLive

      public TimeToLiveConfigBuilder timeToLive(String timeToLive)

      The time to live of the ImportContainer. Used to generate the expiresAt value of the ImportContainer. The lowest accepted value is 1h and the highest accepted value is 30d.

      Parameters:
      timeToLive - value to be set
      Returns:
      Builder
    • getTimeToLive

      public String getTimeToLive()

      The time to live of the ImportContainer. Used to generate the expiresAt value of the ImportContainer. The lowest accepted value is 1h and the highest accepted value is 30d.

      Returns:
      timeToLive
    • build

      public TimeToLiveConfig build()
      builds TimeToLiveConfig with checking for non-null required values
      Specified by:
      build in interface Builder<TimeToLiveConfig>
      Returns:
      TimeToLiveConfig
    • buildUnchecked

      public TimeToLiveConfig buildUnchecked()
      builds TimeToLiveConfig without checking for non-null required values
      Returns:
      TimeToLiveConfig
    • of

      public static TimeToLiveConfigBuilder of()
      factory method for an instance of TimeToLiveConfigBuilder
      Returns:
      builder
    • of

      public static TimeToLiveConfigBuilder of(TimeToLiveConfig template)
      create builder for TimeToLiveConfig instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder