Class AutomationAddToBatchRetain.Builder
- java.lang.Object
-
- com.courier.api.resources.automations.types.AutomationAddToBatchRetain.Builder
-
- All Implemented Interfaces:
AutomationAddToBatchRetain._FinalStage,AutomationAddToBatchRetain.CountStage,AutomationAddToBatchRetain.TypeStage
- Enclosing class:
- AutomationAddToBatchRetain
public static final class AutomationAddToBatchRetain.Builder extends java.lang.Object implements AutomationAddToBatchRetain.TypeStage, AutomationAddToBatchRetain.CountStage, AutomationAddToBatchRetain._FinalStage
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AutomationAddToBatchRetainbuild()AutomationAddToBatchRetain._FinalStagecount(int count)The number of records to keep in batch.AutomationAddToBatchRetain.Builderfrom(AutomationAddToBatchRetain other)AutomationAddToBatchRetain._FinalStagesortKey(java.lang.String sortKey)Defines the data value data[sort_key] that is used to sort the stored items.AutomationAddToBatchRetain._FinalStagesortKey(java.util.Optional<java.lang.String> sortKey)AutomationAddToBatchRetain.CountStagetype(AutomationAddToBatchRetainType type)Keep N number of notifications based on the type.
-
-
-
Method Detail
-
from
public AutomationAddToBatchRetain.Builder from(AutomationAddToBatchRetain other)
- Specified by:
fromin interfaceAutomationAddToBatchRetain.TypeStage
-
type
public AutomationAddToBatchRetain.CountStage type(AutomationAddToBatchRetainType type)
Keep N number of notifications based on the type. First/Last N based on notification received. highest/lowest based on a scoring key providing in the data accessed by sort_key
- Specified by:
typein interfaceAutomationAddToBatchRetain.TypeStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
count
public AutomationAddToBatchRetain._FinalStage count(int count)
The number of records to keep in batch. Default is 10 and only configurable by requesting from support. When configurable minimum is 2 and maximum is 100.
- Specified by:
countin interfaceAutomationAddToBatchRetain.CountStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
sortKey
public AutomationAddToBatchRetain._FinalStage sortKey(java.lang.String sortKey)
Defines the data value data[sort_key] that is used to sort the stored items. Required when type is set to highest or lowest.
- Specified by:
sortKeyin interfaceAutomationAddToBatchRetain._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
sortKey
public AutomationAddToBatchRetain._FinalStage sortKey(java.util.Optional<java.lang.String> sortKey)
- Specified by:
sortKeyin interfaceAutomationAddToBatchRetain._FinalStage
-
build
public AutomationAddToBatchRetain build()
- Specified by:
buildin interfaceAutomationAddToBatchRetain._FinalStage
-
-