All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sinch.sdk.domains.conversation.models.v1.app.DispatchRetentionPolicy Maven / Gradle / Ivy

There is a newer version: 1.4.0
Show newest version
/*
 * Conversation API | Sinch
 *
 * OpenAPI document version: 1.0
 * Contact: [email protected]
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * Do not edit the class manually.
 */

package com.sinch.sdk.domains.conversation.models.v1.app;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;

/**
 * The retention policy configured for messages in Dispatch Mode.
 * Currently only MESSAGE_EXPIRE_POLICY is available. For more information about
 * retention policies, see Retention
 * Policy.
 */
@JsonDeserialize(builder = DispatchRetentionPolicyImpl.Builder.class)
public interface DispatchRetentionPolicy {

  /**
   * Get retentionType
   *
   * @return retentionType
   */
  DispatchRetentionPolicyType getRetentionType();

  /**
   * Optional. The days before a message is eligible for deletion. The valid range is [0 - 7]
   * . In the case of a 0 day TTL, messages aren't stored at all. Note the
   * retention cleanup job runs once every twenty-four hours, so messages are not deleted on the
   * minute they become eligible for deletion.
   *
   * @return ttlDays
   */
  Long getTtlDays();

  /**
   * Getting builder
   *
   * @return New Builder instance
   */
  static Builder builder() {
    return new DispatchRetentionPolicyImpl.Builder();
  }

  /** Dedicated Builder */
  interface Builder {

    /**
     * see getter
     *
     * @param retentionType see getter
     * @return Current builder
     * @see #getRetentionType
     */
    Builder setRetentionType(DispatchRetentionPolicyType retentionType);

    /**
     * see getter
     *
     * @param ttlDays see getter
     * @return Current builder
     * @see #getTtlDays
     */
    Builder setTtlDays(Long ttlDays);

    /**
     * Create instance
     *
     * @return The instance build with current builder values
     */
    DispatchRetentionPolicy build();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy