org.openapijsonschematools.client.components.schemas.IntegerEnumOneValue.java
public class IntegerEnumOneValue
A class that contains necessary nested
- schema classes (which validate payloads), extends JsonSchema
- sealed interfaces which store validated payloads, java version of a sum type
- boxed classes which store validated payloads, sealed permits class implementations
- enum classes
| Modifier and Type | Class and Description |
|---|---|
| sealed interface | IntegerEnumOneValue.IntegerEnumOneValue1Boxed sealed interface for validated payloads |
| record | IntegerEnumOneValue.IntegerEnumOneValue1BoxedNumber boxed class to store validated Number payloads |
| static class | IntegerEnumOneValue.IntegerEnumOneValue1 schema class |
| enum | IntegerEnumOneValue.IntegerIntegerEnumOneValueEnums Integer enum |
| enum | IntegerEnumOneValue.LongIntegerEnumOneValueEnums Long enum |
| enum | IntegerEnumOneValue.FloatIntegerEnumOneValueEnums Float enum |
| enum | IntegerEnumOneValue.DoubleIntegerEnumOneValueEnums Double enum |
public sealed interface IntegerEnumOneValue1Boxed
permits
IntegerEnumOneValue1BoxedNumber
sealed interface that stores validated payloads using boxed classes
public record IntegerEnumOneValue1BoxedNumber
implements IntegerEnumOneValue1Boxed
record that stores validated Number payloads, sealed permits implementation
| Constructor and Description |
|---|
| IntegerEnumOneValue1BoxedNumber(Number data) Creates an instance, private visibility |
| Modifier and Type | Method and Description |
|---|---|
| Number | data() validated payload |
| @Nullable Object | getData() validated payload |
public static class IntegerEnumOneValue1
extends JsonSchema
A schema class that validates payloads
import org.openapijsonschematools.client.configurations.JsonSchemaKeywordFlags;
import org.openapijsonschematools.client.configurations.SchemaConfiguration;
import org.openapijsonschematools.client.exceptions.ValidationException;
import org.openapijsonschematools.client.schemas.validation.MapUtils;
import org.openapijsonschematools.client.schemas.validation.FrozenList;
import org.openapijsonschematools.client.schemas.validation.FrozenMap;
import org.openapijsonschematools.client.components.schemas.IntegerEnumOneValue;
import java.util.Arrays;
import java.util.List;
import java.util.AbstractMap;
static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build());
// int validation
int validatedPayload = IntegerEnumOneValue.IntegerEnumOneValue1.validate(
1L,
configuration
);
| Modifier and Type | Field and Description |
|---|---|
| Set<Class<?>> | type = Set.of( Integer.class, Long.class, Float.class, Double.class ) |
| String | type = "int"; |
| Set | enumValues = SetMaker.makeSet( 0 ) |
| Modifier and Type | Method and Description |
|---|---|
| long | validate(long arg, SchemaConfiguration configuration) |
| IntegerEnumOneValue1BoxedNumber | validateAndBox(Number arg, SchemaConfiguration configuration) |
| IntegerEnumOneValue1Boxed | validateAndBox(@Nullable Object arg, SchemaConfiguration configuration) |
| @Nullable Object | validate(@Nullable Object arg, SchemaConfiguration configuration) |
public enum IntegerIntegerEnumOneValueEnums
extends Enum<IntegerIntegerEnumOneValueEnums>
A class that stores Integer enum values
| Enum Constant | Description |
|---|---|
| POSITIVE_0 | value = 0 |
public enum LongIntegerEnumOneValueEnums
extends Enum<LongIntegerEnumOneValueEnums>
A class that stores Long enum values
| Enum Constant | Description |
|---|---|
| POSITIVE_0 | value = 0L |
public enum FloatIntegerEnumOneValueEnums
extends Enum<FloatIntegerEnumOneValueEnums>
A class that stores Float enum values
| Enum Constant | Description |
|---|---|
| POSITIVE_0 | value = 0.0f |
public enum DoubleIntegerEnumOneValueEnums
extends Enum<DoubleIntegerEnumOneValueEnums>
A class that stores Double enum values
| Enum Constant | Description |
|---|---|
| POSITIVE_0 | value = 0.0d |