Class VelocityLimitPeriod
-
- All Implemented Interfaces:
public final class VelocityLimitPeriodVelocity over the current day since 00:00 / 12 AM in Eastern Time
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceVelocityLimitPeriod.VisitorAn interface that defines how to map each variant of VelocityLimitPeriod to a value of type T.
public final classVelocityLimitPeriod.TrailingWindowObjectpublic final classVelocityLimitPeriod.FixedWindowDayVelocity over the current day since 00:00 / 12 AM in Eastern Time
public final classVelocityLimitPeriod.FixedWindowWeekVelocity over the current week since 00:00 / 12 AM in Eastern Time on specified
day_of_weekpublic final classVelocityLimitPeriod.FixedWindowMonthVelocity over the current month since 00:00 / 12 AM in Eastern Time on specified
day_of_month.public final classVelocityLimitPeriod.FixedWindowYearVelocity over the current year since 00:00 / 12 AM in Eastern Time on specified
monthandday_of_month. This validates the month and day of the year to start from is a real date. In the event that February 29th is selected, in non-leap years, the window will start from February 28th.
-
Method Summary
Modifier and Type Method Description final Optional<VelocityLimitPeriod.TrailingWindowObject>trailingWindowObject()final Optional<VelocityLimitPeriod.FixedWindowDay>fixedWindowDay()Velocity over the current day since 00:00 / 12 AM in Eastern Time final Optional<VelocityLimitPeriod.FixedWindowWeek>fixedWindowWeek()Velocity over the current week since 00:00 / 12 AM in Eastern Time on specified day_of_weekfinal Optional<VelocityLimitPeriod.FixedWindowMonth>fixedWindowMonth()Velocity over the current month since 00:00 / 12 AM in Eastern Time on specified day_of_month.final Optional<VelocityLimitPeriod.FixedWindowYear>fixedWindowYear()Velocity over the current year since 00:00 / 12 AM in Eastern Time on specified monthandday_of_month.final BooleanisTrailingWindowObject()final BooleanisFixedWindowDay()final BooleanisFixedWindowWeek()final BooleanisFixedWindowMonth()final BooleanisFixedWindowYear()final VelocityLimitPeriod.TrailingWindowObjectasTrailingWindowObject()final VelocityLimitPeriod.FixedWindowDayasFixedWindowDay()Velocity over the current day since 00:00 / 12 AM in Eastern Time final VelocityLimitPeriod.FixedWindowWeekasFixedWindowWeek()Velocity over the current week since 00:00 / 12 AM in Eastern Time on specified day_of_weekfinal VelocityLimitPeriod.FixedWindowMonthasFixedWindowMonth()Velocity over the current month since 00:00 / 12 AM in Eastern Time on specified day_of_month.final VelocityLimitPeriod.FixedWindowYearasFixedWindowYear()Velocity over the current year since 00:00 / 12 AM in Eastern Time on specified monthandday_of_month.final Optional<JsonValue>_json()final <T extends Any> Taccept(VelocityLimitPeriod.Visitor<T> visitor)Maps this instance's current variant to a value of type T using the given visitor. final VelocityLimitPeriodvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static VelocityLimitPeriodofTrailingWindowObject(VelocityLimitPeriod.TrailingWindowObject trailingWindowObject)final static VelocityLimitPeriodofFixedWindowDay(VelocityLimitPeriod.FixedWindowDay fixedWindowDay)Velocity over the current day since 00:00 / 12 AM in Eastern Time final static VelocityLimitPeriodofFixedWindowWeek(VelocityLimitPeriod.FixedWindowWeek fixedWindowWeek)Velocity over the current week since 00:00 / 12 AM in Eastern Time on specified day_of_weekfinal static VelocityLimitPeriodofFixedWindowMonth(VelocityLimitPeriod.FixedWindowMonth fixedWindowMonth)Velocity over the current month since 00:00 / 12 AM in Eastern Time on specified day_of_month.final static VelocityLimitPeriodofFixedWindowYear(VelocityLimitPeriod.FixedWindowYear fixedWindowYear)Velocity over the current year since 00:00 / 12 AM in Eastern Time on specified monthandday_of_month.-
-
Method Detail
-
trailingWindowObject
final Optional<VelocityLimitPeriod.TrailingWindowObject> trailingWindowObject()
-
fixedWindowDay
final Optional<VelocityLimitPeriod.FixedWindowDay> fixedWindowDay()
Velocity over the current day since 00:00 / 12 AM in Eastern Time
-
fixedWindowWeek
final Optional<VelocityLimitPeriod.FixedWindowWeek> fixedWindowWeek()
Velocity over the current week since 00:00 / 12 AM in Eastern Time on specified
day_of_week
-
fixedWindowMonth
final Optional<VelocityLimitPeriod.FixedWindowMonth> fixedWindowMonth()
Velocity over the current month since 00:00 / 12 AM in Eastern Time on specified
day_of_month.
-
fixedWindowYear
final Optional<VelocityLimitPeriod.FixedWindowYear> fixedWindowYear()
Velocity over the current year since 00:00 / 12 AM in Eastern Time on specified
monthandday_of_month. This validates the month and day of the year to start from is a real date. In the event that February 29th is selected, in non-leap years, the window will start from February 28th.
-
isTrailingWindowObject
final Boolean isTrailingWindowObject()
-
isFixedWindowDay
final Boolean isFixedWindowDay()
-
isFixedWindowWeek
final Boolean isFixedWindowWeek()
-
isFixedWindowMonth
final Boolean isFixedWindowMonth()
-
isFixedWindowYear
final Boolean isFixedWindowYear()
-
asTrailingWindowObject
final VelocityLimitPeriod.TrailingWindowObject asTrailingWindowObject()
-
asFixedWindowDay
final VelocityLimitPeriod.FixedWindowDay asFixedWindowDay()
Velocity over the current day since 00:00 / 12 AM in Eastern Time
-
asFixedWindowWeek
final VelocityLimitPeriod.FixedWindowWeek asFixedWindowWeek()
Velocity over the current week since 00:00 / 12 AM in Eastern Time on specified
day_of_week
-
asFixedWindowMonth
final VelocityLimitPeriod.FixedWindowMonth asFixedWindowMonth()
Velocity over the current month since 00:00 / 12 AM in Eastern Time on specified
day_of_month.
-
asFixedWindowYear
final VelocityLimitPeriod.FixedWindowYear asFixedWindowYear()
Velocity over the current year since 00:00 / 12 AM in Eastern Time on specified
monthandday_of_month. This validates the month and day of the year to start from is a real date. In the event that February 29th is selected, in non-leap years, the window will start from February 28th.
-
accept
final <T extends Any> T accept(VelocityLimitPeriod.Visitor<T> visitor)
Maps this instance's current variant to a value of type T using the given visitor.
Note that this method is not forwards compatible with new variants from the API, unless visitor overrides Visitor.unknown. To handle variants not known to this version of the SDK gracefully, consider overriding Visitor.unknown:
import com.lithic.api.core.JsonValue; import java.util.Optional; Optional<String> result = velocityLimitPeriod.accept(new VelocityLimitPeriod.Visitor<Optional<String>>() { @Override public Optional<String> visitTrailingWindowObject(TrailingWindowObject trailingWindowObject) { return Optional.of(trailingWindowObject.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final VelocityLimitPeriod validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
ofTrailingWindowObject
final static VelocityLimitPeriod ofTrailingWindowObject(VelocityLimitPeriod.TrailingWindowObject trailingWindowObject)
-
ofFixedWindowDay
final static VelocityLimitPeriod ofFixedWindowDay(VelocityLimitPeriod.FixedWindowDay fixedWindowDay)
Velocity over the current day since 00:00 / 12 AM in Eastern Time
-
ofFixedWindowWeek
final static VelocityLimitPeriod ofFixedWindowWeek(VelocityLimitPeriod.FixedWindowWeek fixedWindowWeek)
Velocity over the current week since 00:00 / 12 AM in Eastern Time on specified
day_of_week
-
ofFixedWindowMonth
final static VelocityLimitPeriod ofFixedWindowMonth(VelocityLimitPeriod.FixedWindowMonth fixedWindowMonth)
Velocity over the current month since 00:00 / 12 AM in Eastern Time on specified
day_of_month.
-
ofFixedWindowYear
final static VelocityLimitPeriod ofFixedWindowYear(VelocityLimitPeriod.FixedWindowYear fixedWindowYear)
Velocity over the current year since 00:00 / 12 AM in Eastern Time on specified
monthandday_of_month. This validates the month and day of the year to start from is a real date. In the event that February 29th is selected, in non-leap years, the window will start from February 28th.
-
-
-
-