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

Latest commit

 

History

History
386 lines (308 loc) · 18.7 KB

File metadata and controls

386 lines (308 loc) · 18.7 KB

QuadrilateralInterface

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

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
  • enum classes

Nested Class Summary

Modifier and Type Class and Description
sealed interface QuadrilateralInterface.QuadrilateralInterface1Boxed
sealed interface for validated payloads
record QuadrilateralInterface.QuadrilateralInterface1BoxedVoid
boxed class to store validated null payloads
record QuadrilateralInterface.QuadrilateralInterface1BoxedBoolean
boxed class to store validated boolean payloads
record QuadrilateralInterface.QuadrilateralInterface1BoxedNumber
boxed class to store validated Number payloads
record QuadrilateralInterface.QuadrilateralInterface1BoxedString
boxed class to store validated String payloads
record QuadrilateralInterface.QuadrilateralInterface1BoxedList
boxed class to store validated List payloads
record QuadrilateralInterface.QuadrilateralInterface1BoxedMap
boxed class to store validated Map payloads
static class QuadrilateralInterface.QuadrilateralInterface1
schema class
static class QuadrilateralInterface.QuadrilateralInterfaceMapBuilder
builder for Map payloads
static class QuadrilateralInterface.QuadrilateralInterfaceMap
output class for Map payloads
sealed interface QuadrilateralInterface.QuadrilateralTypeBoxed
sealed interface for validated payloads
record QuadrilateralInterface.QuadrilateralTypeBoxedString
boxed class to store validated String payloads
static class QuadrilateralInterface.QuadrilateralType
schema class
sealed interface QuadrilateralInterface.ShapeTypeBoxed
sealed interface for validated payloads
record QuadrilateralInterface.ShapeTypeBoxedString
boxed class to store validated String payloads
static class QuadrilateralInterface.ShapeType
schema class
enum QuadrilateralInterface.StringShapeTypeEnums
String enum

QuadrilateralInterface1Boxed

public sealed interface QuadrilateralInterface1Boxed
permits
QuadrilateralInterface1BoxedVoid, QuadrilateralInterface1BoxedBoolean, QuadrilateralInterface1BoxedNumber, QuadrilateralInterface1BoxedString, QuadrilateralInterface1BoxedList, QuadrilateralInterface1BoxedMap

sealed interface that stores validated payloads using boxed classes

QuadrilateralInterface1BoxedVoid

public record QuadrilateralInterface1BoxedVoid
implements QuadrilateralInterface1Boxed

record that stores validated null payloads, sealed permits implementation

Constructor Summary

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

Method Summary

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

QuadrilateralInterface1BoxedBoolean

public record QuadrilateralInterface1BoxedBoolean
implements QuadrilateralInterface1Boxed

record that stores validated boolean payloads, sealed permits implementation

Constructor Summary

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

Method Summary

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

QuadrilateralInterface1BoxedNumber

public record QuadrilateralInterface1BoxedNumber
implements QuadrilateralInterface1Boxed

record that stores validated Number payloads, sealed permits implementation

Constructor Summary

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

Method Summary

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

QuadrilateralInterface1BoxedString

public record QuadrilateralInterface1BoxedString
implements QuadrilateralInterface1Boxed

record that stores validated String payloads, sealed permits implementation

Constructor Summary

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

Method Summary

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

QuadrilateralInterface1BoxedList

public record QuadrilateralInterface1BoxedList
implements QuadrilateralInterface1Boxed

record that stores validated List payloads, sealed permits implementation

Constructor Summary

Constructor and Description
QuadrilateralInterface1BoxedList(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

QuadrilateralInterface1BoxedMap

public record QuadrilateralInterface1BoxedMap
implements QuadrilateralInterface1Boxed

record that stores validated Map payloads, sealed permits implementation

Constructor Summary

Constructor and Description
QuadrilateralInterface1BoxedMap(QuadrilateralInterfaceMap data)
Creates an instance, private visibility

Method Summary

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

QuadrilateralInterface1

public static class QuadrilateralInterface1
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("shapeType", ShapeType.class)),
    new PropertyEntry("quadrilateralType", QuadrilateralType.class))
)
Set required = Set.of(
    "quadrilateralType",
    "shapeType"
)

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)
QuadrilateralInterfaceMap validate(Map<?, ?> arg, SchemaConfiguration configuration)
FrozenList<@Nullable Object> validate(List<?> arg, SchemaConfiguration configuration)
QuadrilateralInterface1BoxedString validateAndBox(String arg, SchemaConfiguration configuration)
QuadrilateralInterface1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration)
QuadrilateralInterface1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration)
QuadrilateralInterface1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration)
QuadrilateralInterface1BoxedMap validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration)
QuadrilateralInterface1BoxedList validateAndBox(List<?> arg, SchemaConfiguration configuration)
QuadrilateralInterface1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration)
@Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration)

QuadrilateralInterfaceMap00Builder

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

A class that builds the Map input type

Constructor Summary

Constructor and Description
QuadrilateralInterfaceMap00Builder(Map<String, @Nullable Object> instance)
Creates a builder that contains the passed instance

Method Summary

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

QuadrilateralInterfaceMap01Builder

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

A class that builds the Map input type

Constructor Summary

Constructor and Description
QuadrilateralInterfaceMap01Builder(Map<String, @Nullable Object> instance)
Creates a builder that contains the passed instance

Method Summary

Modifier and Type Method and Description
QuadrilateralInterfaceMap00Builder shapeType(String value)
QuadrilateralInterfaceMap00Builder shapeType(StringShapeTypeEnums value)

QuadrilateralInterfaceMap10Builder

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

A class that builds the Map input type

Constructor Summary

Constructor and Description
QuadrilateralInterfaceMap10Builder(Map<String, @Nullable Object> instance)
Creates a builder that contains the passed instance

Method Summary

Modifier and Type Method and Description
QuadrilateralInterfaceMap00Builder quadrilateralType(String value)

QuadrilateralInterfaceMapBuilder

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

A class that builds the Map input type

Constructor Summary

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

Method Summary

Modifier and Type Method and Description
QuadrilateralInterfaceMap01Builder quadrilateralType(String value)
QuadrilateralInterfaceMap10Builder shapeType(String value)
QuadrilateralInterfaceMap10Builder shapeType(StringShapeTypeEnums value)

QuadrilateralInterfaceMap

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

A class to store validated Map payloads

Method Summary

Modifier and Type Method and Description
static QuadrilateralInterfaceMap of(Map<String, ? extends @Nullable Object> arg, SchemaConfiguration configuration)
String quadrilateralType()
String shapeType()
must be one of ["Quadrilateral"]
@Nullable Object getAdditionalProperty(String name)
provides type safety for additional properties

QuadrilateralTypeBoxed

public sealed interface QuadrilateralTypeBoxed
permits
QuadrilateralTypeBoxedString

sealed interface that stores validated payloads using boxed classes

QuadrilateralTypeBoxedString

public record QuadrilateralTypeBoxedString
implements QuadrilateralTypeBoxed

record that stores validated String payloads, sealed permits implementation

Constructor Summary

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

Method Summary

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

QuadrilateralType

public static class QuadrilateralType
extends StringJsonSchema.StringJsonSchema1

A schema class that validates payloads

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

ShapeTypeBoxed

public sealed interface ShapeTypeBoxed
permits
ShapeTypeBoxedString

sealed interface that stores validated payloads using boxed classes

ShapeTypeBoxedString

public record ShapeTypeBoxedString
implements ShapeTypeBoxed

record that stores validated String payloads, sealed permits implementation

Constructor Summary

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

Method Summary

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

ShapeType

public static class ShapeType
extends JsonSchema

A schema class that validates payloads

Code Sample

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.QuadrilateralInterface;

import java.util.Arrays;
import java.util.List;
import java.util.AbstractMap;

static final SchemaConfiguration configuration = new SchemaConfiguration(new JsonSchemaKeywordFlags.Builder().build());

// String validation
String validatedPayload = QuadrilateralInterface.ShapeType.validate(
    "Quadrilateral",
    configuration
);

Field Summary

Modifier and Type Field and Description
Set<Class<?>> type = Set.of(
    String.class
)
Set enumValues = SetMaker.makeSet(
    "Quadrilateral"
)

Method Summary

Modifier and Type Method and Description
String validate(String arg, SchemaConfiguration configuration)
String validate(StringShapeTypeEnums arg, SchemaConfiguration configuration)
ShapeTypeBoxedString validateAndBox(String arg, SchemaConfiguration configuration)
ShapeTypeBoxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration)
@Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration)

StringShapeTypeEnums

public enum StringShapeTypeEnums
extends Enum<StringShapeTypeEnums>

A class that stores String enum values

Enum Constant Summary

Enum Constant Description
QUADRILATERAL value = "Quadrilateral"

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