Record Class OperationParameterSchema.FieldSpec
java.lang.Object
java.lang.Record
zeroecho.pki.server.schema.OperationParameterSchema.FieldSpec
- Record Components:
name- argument nametype- JSON wire typerequired- whether omission is rejectedchoices- permitted enum constants, empty for other types
- Enclosing class:
OperationParameterSchema
public static record OperationParameterSchema.FieldSpec(String name, OperationParameterSchema.FieldType type, boolean required, List<String> choices)
extends Record
Specification for one operation argument field.
-
Constructor Summary
ConstructorsConstructorDescriptionFieldSpec(String name, OperationParameterSchema.FieldType type, boolean required, List<String> choices) Snapshots the choice list. -
Method Summary
Modifier and TypeMethodDescriptionDefines standard Base64 binary data encoded as a JSON string.Defines a boolean argument.choices()Returns the value of thechoicesrecord component.Defines one enum constant encoded as a JSON string.Defines enum constants encoded as a JSON array.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Defines an integer argument; decoder-specific bounds still apply.name()Returns the value of thenamerecord component.Defines a nested JSON argument.booleanrequired()Returns the value of therequiredrecord component.Defines a string argument.Defines a set of strings encoded as a JSON array.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
FieldSpec
public FieldSpec(String name, OperationParameterSchema.FieldType type, boolean required, List<String> choices) Snapshots the choice list.
-
-
Method Details
-
text
Defines a string argument.- Parameters:
name- argument namerequired- whether omission is rejected- Returns:
- immutable string field
-
integer
Defines an integer argument; decoder-specific bounds still apply.- Parameters:
name- argument namerequired- whether omission is rejected- Returns:
- immutable integer field
-
bool
Defines a boolean argument.- Parameters:
name- argument namerequired- whether omission is rejected- Returns:
- immutable boolean field
-
textSet
Defines a set of strings encoded as a JSON array.- Parameters:
name- argument namerequired- whether omission is rejected- Returns:
- immutable string-set field
-
base64
Defines standard Base64 binary data encoded as a JSON string.- Parameters:
name- argument namerequired- whether omission is rejected- Returns:
- immutable binary field
-
object
Defines a nested JSON argument.- Parameters:
name- argument namerequired- whether omission is rejected- Returns:
- immutable field definition
-
enum_
public static OperationParameterSchema.FieldSpec enum_(String name, boolean required, List<String> choices) Defines one enum constant encoded as a JSON string.- Parameters:
name- argument namerequired- whether omission is rejectedchoices- permitted constants- Returns:
- immutable enum field
-
enumSet
public static OperationParameterSchema.FieldSpec enumSet(String name, boolean required, List<String> choices) Defines enum constants encoded as a JSON array.- Parameters:
name- argument namerequired- whether omission is rejectedchoices- permitted constants- Returns:
- immutable enum-set field
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
name
-
type
-
required
-
choices
-