Class AutomationThrottleStep.Builder
- java.lang.Object
-
- com.courier.api.resources.automations.types.AutomationThrottleStep.Builder
-
- All Implemented Interfaces:
AutomationThrottleStep._FinalStage,AutomationThrottleStep.MaxAllowedStage,AutomationThrottleStep.OnThrottleStage,AutomationThrottleStep.PeriodStage,AutomationThrottleStep.ScopeStage
- Enclosing class:
- AutomationThrottleStep
public static final class AutomationThrottleStep.Builder extends java.lang.Object implements AutomationThrottleStep.MaxAllowedStage, AutomationThrottleStep.PeriodStage, AutomationThrottleStep.ScopeStage, AutomationThrottleStep.OnThrottleStage, AutomationThrottleStep._FinalStage
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AutomationThrottleStepbuild()AutomationThrottleStep.Builderfrom(AutomationThrottleStep other)AutomationThrottleStep._FinalStageif_(java.lang.String if_)AutomationThrottleStep._FinalStageif_(java.util.Optional<java.lang.String> if_)AutomationThrottleStep.PeriodStagemaxAllowed(int maxAllowed)Maximum number of allowed notifications in that timeframeAutomationThrottleStep._FinalStageonThrottle(AutomationThrottleOnThrottle onThrottle)AutomationThrottleStep.ScopeStageperiod(java.lang.String period)Defines the throttle period which corresponds to the max_allowed.AutomationThrottleStep._FinalStageref(java.lang.String ref)AutomationThrottleStep._FinalStageref(java.util.Optional<java.lang.String> ref)AutomationThrottleStep.OnThrottleStagescope(AutomationThrottleScope scope)AutomationThrottleStep._FinalStagethrottleKey(java.lang.String throttleKey)If using scope=dynamic, provide the reference (e.g., refs.data.throttle_key) to the how the throttle should be identifiedAutomationThrottleStep._FinalStagethrottleKey(java.util.Optional<java.lang.String> throttleKey)
-
-
-
Method Detail
-
from
public AutomationThrottleStep.Builder from(AutomationThrottleStep other)
- Specified by:
fromin interfaceAutomationThrottleStep.MaxAllowedStage
-
maxAllowed
public AutomationThrottleStep.PeriodStage maxAllowed(int maxAllowed)
Maximum number of allowed notifications in that timeframe
- Specified by:
maxAllowedin interfaceAutomationThrottleStep.MaxAllowedStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
period
public AutomationThrottleStep.ScopeStage period(java.lang.String period)
Defines the throttle period which corresponds to the max_allowed. Specified as an ISO 8601 duration, https://en.wikipedia.org/wiki/ISO_8601#Durations
- Specified by:
periodin interfaceAutomationThrottleStep.PeriodStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
scope
public AutomationThrottleStep.OnThrottleStage scope(AutomationThrottleScope scope)
- Specified by:
scopein interfaceAutomationThrottleStep.ScopeStage
-
onThrottle
public AutomationThrottleStep._FinalStage onThrottle(AutomationThrottleOnThrottle onThrottle)
- Specified by:
onThrottlein interfaceAutomationThrottleStep.OnThrottleStage
-
throttleKey
public AutomationThrottleStep._FinalStage throttleKey(java.lang.String throttleKey)
If using scope=dynamic, provide the reference (e.g., refs.data.throttle_key) to the how the throttle should be identified
- Specified by:
throttleKeyin interfaceAutomationThrottleStep._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
throttleKey
public AutomationThrottleStep._FinalStage throttleKey(java.util.Optional<java.lang.String> throttleKey)
- Specified by:
throttleKeyin interfaceAutomationThrottleStep._FinalStage
-
ref
public AutomationThrottleStep._FinalStage ref(java.lang.String ref)
- Specified by:
refin interfaceAutomationThrottleStep._FinalStage
-
ref
public AutomationThrottleStep._FinalStage ref(java.util.Optional<java.lang.String> ref)
- Specified by:
refin interfaceAutomationThrottleStep._FinalStage
-
if_
public AutomationThrottleStep._FinalStage if_(java.lang.String if_)
- Specified by:
if_in interfaceAutomationThrottleStep._FinalStage
-
if_
public AutomationThrottleStep._FinalStage if_(java.util.Optional<java.lang.String> if_)
- Specified by:
if_in interfaceAutomationThrottleStep._FinalStage
-
build
public AutomationThrottleStep build()
- Specified by:
buildin interfaceAutomationThrottleStep._FinalStage
-
-