Record Class Tm1Capability
java.lang.Object
java.lang.Record
io.skipcheck.tm1.client.version.Tm1Capability
- Record Components:
kind- what kind of element this istype- the qualified type it belongs to (a bound operation's binding type, a property's structured type), ornullname- the element's name: an entity set or singleton name, a qualified operation name, or a property nameaddedIn- the schema version that added it, ornullif not known
public record Tm1Capability(Tm1Capability.Kind kind, @Nullable String type, String name, @Nullable String addedIn)
extends Record
Something a request needs the server to define in its
$metadata: an entity set,
a singleton, an operation or a property. A request can declare one, and the session
checks it against the connected server before sending anything.
// Does the server's $metadata define the cube's tm1.Reserve action?
Tm1Capability reserve = Tm1Capability.boundOperation("tm1.Cube", "tm1.Reserve").since("11.8.34");
return session.capabilities().map(capabilities -> capabilities.supports(reserve));
Names are qualified by namespace or alias (tm1.Cube or
ibm.tm1.api.v1.Cube), as in $metadata. since(String) records the
schema version that added it, from Core.Revisions, so a server that lacks it
can be told why; the generated model fills it in.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe kinds of element a request can need. -
Constructor Summary
ConstructorsConstructorDescriptionTm1Capability(Tm1Capability.Kind kind, @Nullable String type, String name, @Nullable String addedIn) Checks the components fit together. -
Method Summary
Modifier and TypeMethodDescription@Nullable StringaddedIn()Returns the value of theaddedInrecord component.The schema version that added it.static Tm1CapabilityboundOperation(String bindingType, String operation) An action or function bound to a type, or to one of its base types.describe()How it reads in messages, with aliases and namespaces dropped:Cube.Reserve,entity set GitPlans.static Tm1CapabilityAn entity set.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.kind()Returns the value of thekindrecord component.name()Returns the value of thenamerecord component.static Tm1CapabilityA structural or navigation property of a type, or of one of its base types.A copy recording the schema version that added it.static Tm1CapabilityA singleton.final StringtoString()Returns a string representation of this record class.@Nullable Stringtype()Returns the value of thetyperecord component.static Tm1CapabilityunboundOperation(String name) An action or function import, invoked from the service root.
-
Constructor Details
-
Tm1Capability
public Tm1Capability(Tm1Capability.Kind kind, @Nullable String type, String name, @Nullable String addedIn) Checks the components fit together.- Throws:
IllegalArgumentException- if a bound operation or property has no type
-
-
Method Details
-
entitySet
An entity set.- Parameters:
name- its name, such asGitPlans- Returns:
- the capability
-
singleton
A singleton.- Parameters:
name- its name, such asActiveSession- Returns:
- the capability
-
boundOperation
An action or function bound to a type, or to one of its base types.- Parameters:
bindingType- the qualified type, such astm1.Cubeoperation- the qualified operation name, such astm1.Reserve- Returns:
- the capability
-
unboundOperation
An action or function import, invoked from the service root.- Parameters:
name- the import's name, such asExecuteMDX- Returns:
- the capability
-
property
A structural or navigation property of a type, or of one of its base types.- Parameters:
type- the qualified type, such astm1.Cubeproperty- the property's name, such asRules- Returns:
- the capability
-
since
A copy recording the schema version that added it.- Parameters:
schemaVersion- the version fromCore.Revisions, such as11.8.34- Returns:
- the copy
-
addedInVersion
-
describe
How it reads in messages, with aliases and namespaces dropped:Cube.Reserve,entity set GitPlans.- Returns:
- the description
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
kind
-
type
-
name
-
addedIn
-