Package com.lithic.api.models
Class AuthRuleV2UpdateParams.Body
-
- All Implemented Interfaces:
public final class AuthRuleV2UpdateParams.Body
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceAuthRuleV2UpdateParams.Body.VisitorAn interface that defines how to map each variant of Body to a value of type T.
public final classAuthRuleV2UpdateParams.Body.AccountLevelRulepublic final classAuthRuleV2UpdateParams.Body.CardLevelRulepublic final classAuthRuleV2UpdateParams.Body.ProgramLevelRule
-
Method Summary
-
-
Method Detail
-
accountLevelRule
final Optional<AuthRuleV2UpdateParams.Body.AccountLevelRule> accountLevelRule()
-
cardLevelRule
final Optional<AuthRuleV2UpdateParams.Body.CardLevelRule> cardLevelRule()
-
programLevelRule
final Optional<AuthRuleV2UpdateParams.Body.ProgramLevelRule> programLevelRule()
-
isAccountLevelRule
final Boolean isAccountLevelRule()
-
isCardLevelRule
final Boolean isCardLevelRule()
-
isProgramLevelRule
final Boolean isProgramLevelRule()
-
asAccountLevelRule
final AuthRuleV2UpdateParams.Body.AccountLevelRule asAccountLevelRule()
-
asCardLevelRule
final AuthRuleV2UpdateParams.Body.CardLevelRule asCardLevelRule()
-
asProgramLevelRule
final AuthRuleV2UpdateParams.Body.ProgramLevelRule asProgramLevelRule()
-
accept
final <T extends Any> T accept(AuthRuleV2UpdateParams.Body.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 = body.accept(new Body.Visitor<Optional<String>>() { @Override public Optional<String> visitAccountLevelRule(AccountLevelRule accountLevelRule) { return Optional.of(accountLevelRule.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final AuthRuleV2UpdateParams.Body 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.
-
ofAccountLevelRule
final static AuthRuleV2UpdateParams.Body ofAccountLevelRule(AuthRuleV2UpdateParams.Body.AccountLevelRule accountLevelRule)
-
ofCardLevelRule
final static AuthRuleV2UpdateParams.Body ofCardLevelRule(AuthRuleV2UpdateParams.Body.CardLevelRule cardLevelRule)
-
ofProgramLevelRule
final static AuthRuleV2UpdateParams.Body ofProgramLevelRule(AuthRuleV2UpdateParams.Body.ProgramLevelRule programLevelRule)
-
-
-
-