Class MessagesConfigurationBuilder

java.lang.Object
com.commercetools.api.models.message.MessagesConfigurationBuilder
All Implemented Interfaces:
Builder<MessagesConfiguration>
Direct Known Subclasses:
MessageConfigurationBuilder

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

     MessagesConfiguration messagesConfiguration = MessagesConfiguration.builder()
             .enabled(true)
             .build()
 
  • Constructor Details

    • MessagesConfigurationBuilder

      public MessagesConfigurationBuilder()
  • Method Details

    • enabled

      public MessagesConfigurationBuilder enabled(Boolean enabled)

      When true, the Messages Query feature is active.

      Parameters:
      enabled - value to be set
      Returns:
      Builder
    • deleteDaysAfterCreation

      public MessagesConfigurationBuilder deleteDaysAfterCreation(@Nullable Integer deleteDaysAfterCreation)

      Specifies the number of days each Message should be available via the Messages Query API. For Messages older than the specified period, it is not guaranteed that they are still accessible via the API. This field may not be present on Projects created before 8 October 2018.

      Parameters:
      deleteDaysAfterCreation - value to be set
      Returns:
      Builder
    • getEnabled

      public Boolean getEnabled()

      When true, the Messages Query feature is active.

      Returns:
      enabled
    • getDeleteDaysAfterCreation

      @Nullable public Integer getDeleteDaysAfterCreation()

      Specifies the number of days each Message should be available via the Messages Query API. For Messages older than the specified period, it is not guaranteed that they are still accessible via the API. This field may not be present on Projects created before 8 October 2018.

      Returns:
      deleteDaysAfterCreation
    • build

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

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

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

      create builder for MessagesConfiguration instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder