Skip to content
This repository was archived by the owner on Dec 25, 2024. It is now read-only.

Latest commit

 

History

History
251 lines (202 loc) · 11.1 KB

File metadata and controls

251 lines (202 loc) · 11.1 KB

GmFruit

org.openapijsonschematools.client.components.schemas.GmFruit.java public class GmFruit

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
  • classes to store validated map payloads, extends FrozenMap
  • classes to build inputs for map payloads

Nested Class Summary

Modifier and Type Class and Description
sealed interface GmFruit.GmFruit1Boxed
sealed interface for validated payloads
record GmFruit.GmFruit1BoxedVoid
boxed class to store validated null payloads
record GmFruit.GmFruit1BoxedBoolean
boxed class to store validated boolean payloads
record GmFruit.GmFruit1BoxedNumber
boxed class to store validated Number payloads
record GmFruit.GmFruit1BoxedString
boxed class to store validated String payloads
record GmFruit.GmFruit1BoxedList
boxed class to store validated List payloads
record GmFruit.GmFruit1BoxedMap
boxed class to store validated Map payloads
static class GmFruit.GmFruit1
schema class
static class GmFruit.GmFruitMapBuilder
builder for Map payloads
static class GmFruit.GmFruitMap
output class for Map payloads
sealed interface GmFruit.ColorBoxed
sealed interface for validated payloads
record GmFruit.ColorBoxedString
boxed class to store validated String payloads
static class GmFruit.Color
schema class

GmFruit1Boxed

public sealed interface GmFruit1Boxed
permits
GmFruit1BoxedVoid, GmFruit1BoxedBoolean, GmFruit1BoxedNumber, GmFruit1BoxedString, GmFruit1BoxedList, GmFruit1BoxedMap

sealed interface that stores validated payloads using boxed classes

GmFruit1BoxedVoid

public record GmFruit1BoxedVoid
implements GmFruit1Boxed

record that stores validated null payloads, sealed permits implementation

Constructor Summary

Constructor and Description
GmFruit1BoxedVoid(Void data)
Creates an instance, private visibility

Method Summary

Modifier and Type Method and Description
Void data()
validated payload
@Nullable Object getData()
validated payload

GmFruit1BoxedBoolean

public record GmFruit1BoxedBoolean
implements GmFruit1Boxed

record that stores validated boolean payloads, sealed permits implementation

Constructor Summary

Constructor and Description
GmFruit1BoxedBoolean(boolean data)
Creates an instance, private visibility

Method Summary

Modifier and Type Method and Description
boolean data()
validated payload
@Nullable Object getData()
validated payload

GmFruit1BoxedNumber

public record GmFruit1BoxedNumber
implements GmFruit1Boxed

record that stores validated Number payloads, sealed permits implementation

Constructor Summary

Constructor and Description
GmFruit1BoxedNumber(Number data)
Creates an instance, private visibility

Method Summary

Modifier and Type Method and Description
Number data()
validated payload
@Nullable Object getData()
validated payload

GmFruit1BoxedString

public record GmFruit1BoxedString
implements GmFruit1Boxed

record that stores validated String payloads, sealed permits implementation

Constructor Summary

Constructor and Description
GmFruit1BoxedString(String data)
Creates an instance, private visibility

Method Summary

Modifier and Type Method and Description
String data()
validated payload
@Nullable Object getData()
validated payload

GmFruit1BoxedList

public record GmFruit1BoxedList
implements GmFruit1Boxed

record that stores validated List payloads, sealed permits implementation

Constructor Summary

Constructor and Description
GmFruit1BoxedList(FrozenList<@Nullable Object> data)
Creates an instance, private visibility

Method Summary

Modifier and Type Method and Description
FrozenList<@Nullable Object> data()
validated payload
@Nullable Object getData()
validated payload

GmFruit1BoxedMap

public record GmFruit1BoxedMap
implements GmFruit1Boxed

record that stores validated Map payloads, sealed permits implementation

Constructor Summary

Constructor and Description
GmFruit1BoxedMap(GmFruitMap data)
Creates an instance, private visibility

Method Summary

Modifier and Type Method and Description
GmFruitMap data()
validated payload
@Nullable Object getData()
validated payload

GmFruit1

public static class GmFruit1
extends JsonSchema

A schema class that validates payloads

Field Summary

Modifier and Type Field and Description
Map<String, Class<? extends JsonSchema>> properties = Map.ofEntries(
    new PropertyEntry("color", Color.class))
)
List<Class<? extends JsonSchema>> anyOf = List.of(
    Apple.Apple1.class,
    Banana.Banana1.class
)

Method Summary

Modifier and Type Method and Description
String validate(String arg, SchemaConfiguration configuration)
Void validate(Void arg, SchemaConfiguration configuration)
int validate(int arg, SchemaConfiguration configuration)
long validate(long arg, SchemaConfiguration configuration)
float validate(float arg, SchemaConfiguration configuration)
double validate(double arg, SchemaConfiguration configuration)
Number validate(Number arg, SchemaConfiguration configuration)
boolean validate(boolean arg, SchemaConfiguration configuration)
GmFruitMap validate(Map<?, ?> arg, SchemaConfiguration configuration)
FrozenList<@Nullable Object> validate(List<?> arg, SchemaConfiguration configuration)
GmFruit1BoxedString validateAndBox(String arg, SchemaConfiguration configuration)
GmFruit1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration)
GmFruit1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration)
GmFruit1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration)
GmFruit1BoxedMap validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration)
GmFruit1BoxedList validateAndBox(List<?> arg, SchemaConfiguration configuration)
GmFruit1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration)
@Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration)

GmFruitMapBuilder

public class GmFruitMapBuilder
builder for Map<String, @Nullable Object>

A class that builds the Map input type

Constructor Summary

Constructor and Description
GmFruitMapBuilder()
Creates a builder that contains an empty map

Method Summary

Modifier and Type Method and Description
Map<String, @Nullable Object> build()
Returns map input that should be used with Schema.validate
GmFruitMapBuilder color(String value)
GmFruitMapBuilder additionalProperty(String key, Void value)
GmFruitMapBuilder additionalProperty(String key, boolean value)
GmFruitMapBuilder additionalProperty(String key, String value)
GmFruitMapBuilder additionalProperty(String key, int value)
GmFruitMapBuilder additionalProperty(String key, float value)
GmFruitMapBuilder additionalProperty(String key, long value)
GmFruitMapBuilder additionalProperty(String key, double value)
GmFruitMapBuilder additionalProperty(String key, List<?> value)
GmFruitMapBuilder additionalProperty(String key, Map<String, ?> value)

GmFruitMap

public static class GmFruitMap
extends FrozenMap<String, @Nullable Object>

A class to store validated Map payloads

Method Summary

Modifier and Type Method and Description
static GmFruitMap of(Map<String, ? extends @Nullable Object> arg, SchemaConfiguration configuration)
String color()
[optional]
@Nullable Object getAdditionalProperty(String name)
provides type safety for additional properties

ColorBoxed

public sealed interface ColorBoxed
permits
ColorBoxedString

sealed interface that stores validated payloads using boxed classes

ColorBoxedString

public record ColorBoxedString
implements ColorBoxed

record that stores validated String payloads, sealed permits implementation

Constructor Summary

Constructor and Description
ColorBoxedString(String data)
Creates an instance, private visibility

Method Summary

Modifier and Type Method and Description
String data()
validated payload
@Nullable Object getData()
validated payload

Color

public static class Color
extends StringJsonSchema.StringJsonSchema1

A schema class that validates payloads

Methods Inherited from class org.openapijsonschematools.client.schemas.StringJsonSchema.StringJsonSchema1
validate
validateAndBox

[Back to top] [Back to Component Schemas] [Back to README]