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.
-
Method Summary
Modifier and Type Method Description final Optional<ReadResponseRootBundle>readResponseRoot()final Optional<ReadResponseFileBundle>readResponseFile()final BooleanisReadResponseRoot()final BooleanisReadResponseFile()final ReadResponseRootBundleasReadResponseRoot()final ReadResponseFileBundleasReadResponseFile()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.BundleofReadResponseRoot(ReadResponseRootBundle readResponseRoot)final static SkillReadResponse.BundleofReadResponseFile(ReadResponseFileBundle readResponseFile)-
-
Method Detail
-
readResponseRoot
final Optional<ReadResponseRootBundle> readResponseRoot()
-
readResponseFile
final Optional<ReadResponseFileBundle> readResponseFile()
-
isReadResponseRoot
final Boolean isReadResponseRoot()
-
isReadResponseFile
final Boolean isReadResponseFile()
-
asReadResponseRoot
final ReadResponseRootBundle asReadResponseRoot()
-
asReadResponseFile
final ReadResponseFileBundle asReadResponseFile()
-
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> visitReadResponseRoot(ReadResponseRootBundle readResponseRoot) { return Optional.of(readResponseRoot.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.
-
ofReadResponseRoot
final static SkillReadResponse.Bundle ofReadResponseRoot(ReadResponseRootBundle readResponseRoot)
-
ofReadResponseFile
final static SkillReadResponse.Bundle ofReadResponseFile(ReadResponseFileBundle readResponseFile)
-
-
-
-