Package dev.case.api.models.skills
Class SkillReadResponse.Bundle
-
- All Implemented Interfaces:
public final class SkillReadResponse.BundleSkill bundle metadata for root skills and companion file rows
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceSkillReadResponse.Bundle.VisitorAn interface that defines how to map each variant of Bundle to a value of type T.
public final classSkillReadResponse.Bundle.UnionMember0public final classSkillReadResponse.Bundle.UnionMember1
-
Method Summary
Modifier and Type Method Description final Optional<SkillReadResponse.Bundle.UnionMember0>unionMember0()final Optional<SkillReadResponse.Bundle.UnionMember1>unionMember1()final BooleanisUnionMember0()final BooleanisUnionMember1()final SkillReadResponse.Bundle.UnionMember0asUnionMember0()final SkillReadResponse.Bundle.UnionMember1asUnionMember1()final Optional<JsonValue>_json()final <T extends Any> Taccept(SkillReadResponse.Bundle.Visitor<T> visitor)Maps this instance's current variant to a value of type T using the given visitor. final SkillReadResponse.Bundlevalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static SkillReadResponse.BundleofUnionMember0(SkillReadResponse.Bundle.UnionMember0 unionMember0)final static SkillReadResponse.BundleofUnionMember1(SkillReadResponse.Bundle.UnionMember1 unionMember1)-
-
Method Detail
-
unionMember0
final Optional<SkillReadResponse.Bundle.UnionMember0> unionMember0()
-
unionMember1
final Optional<SkillReadResponse.Bundle.UnionMember1> unionMember1()
-
isUnionMember0
final Boolean isUnionMember0()
-
isUnionMember1
final Boolean isUnionMember1()
-
asUnionMember0
final SkillReadResponse.Bundle.UnionMember0 asUnionMember0()
-
asUnionMember1
final SkillReadResponse.Bundle.UnionMember1 asUnionMember1()
-
accept
final <T extends Any> T accept(SkillReadResponse.Bundle.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 dev.case.api.core.JsonValue; import java.util.Optional; Optional<String> result = bundle.accept(new Bundle.Visitor<Optional<String>>() { @Override public Optional<String> visitUnionMember0(UnionMember0 unionMember0) { return Optional.of(unionMember0.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final SkillReadResponse.Bundle 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.
-
ofUnionMember0
final static SkillReadResponse.Bundle ofUnionMember0(SkillReadResponse.Bundle.UnionMember0 unionMember0)
-
ofUnionMember1
final static SkillReadResponse.Bundle ofUnionMember1(SkillReadResponse.Bundle.UnionMember1 unionMember1)
-
-
-
-