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

Latest commit

 

History

History
354 lines (281 loc) · 14.5 KB

File metadata and controls

354 lines (281 loc) · 14.5 KB

Name

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

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 Name.Name1Boxed
sealed interface for validated payloads
record Name.Name1BoxedVoid
boxed class to store validated null payloads
record Name.Name1BoxedBoolean
boxed class to store validated boolean payloads
record Name.Name1BoxedNumber
boxed class to store validated Number payloads
record Name.Name1BoxedString
boxed class to store validated String payloads
record Name.Name1BoxedList
boxed class to store validated List payloads
record Name.Name1BoxedMap
boxed class to store validated Map payloads
static class Name.Name1
schema class
static class Name.NameMapBuilder1
builder for Map payloads
static class Name.NameMap
output class for Map payloads
sealed interface Name.PropertyBoxed
sealed interface for validated payloads
record Name.PropertyBoxedString
boxed class to store validated String payloads
static class Name.Property
schema class
sealed interface Name.SnakeCaseBoxed
sealed interface for validated payloads
record Name.SnakeCaseBoxedNumber
boxed class to store validated Number payloads
static class Name.SnakeCase
schema class
sealed interface Name.Name2Boxed
sealed interface for validated payloads
record Name.Name2BoxedNumber
boxed class to store validated Number payloads
static class Name.Name2
schema class

Name1Boxed

public sealed interface Name1Boxed
permits
Name1BoxedVoid, Name1BoxedBoolean, Name1BoxedNumber, Name1BoxedString, Name1BoxedList, Name1BoxedMap

sealed interface that stores validated payloads using boxed classes

Name1BoxedVoid

public record Name1BoxedVoid
implements Name1Boxed

record that stores validated null payloads, sealed permits implementation

Constructor Summary

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

Method Summary

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

Name1BoxedBoolean

public record Name1BoxedBoolean
implements Name1Boxed

record that stores validated boolean payloads, sealed permits implementation

Constructor Summary

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

Method Summary

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

Name1BoxedNumber

public record Name1BoxedNumber
implements Name1Boxed

record that stores validated Number payloads, sealed permits implementation

Constructor Summary

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

Method Summary

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

Name1BoxedString

public record Name1BoxedString
implements Name1Boxed

record that stores validated String payloads, sealed permits implementation

Constructor Summary

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

Method Summary

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

Name1BoxedList

public record Name1BoxedList
implements Name1Boxed

record that stores validated List payloads, sealed permits implementation

Constructor Summary

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

Name1BoxedMap

public record Name1BoxedMap
implements Name1Boxed

record that stores validated Map payloads, sealed permits implementation

Constructor Summary

Constructor and Description
Name1BoxedMap(NameMap data)
Creates an instance, private visibility

Method Summary

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

Name1

public static class Name1
extends JsonSchema

A schema class that validates payloads

Description

Model for testing model name same as property name

Field Summary

Modifier and Type Field and Description
Map<String, Class<? extends JsonSchema>> properties = Map.ofEntries(
    new PropertyEntry("name", Name2.class)),
    new PropertyEntry("snake_case", SnakeCase.class)),
    new PropertyEntry("property", Property.class))
)
Set required = Set.of(
    "name"
)

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)
NameMap validate(Map<?, ?> arg, SchemaConfiguration configuration)
FrozenList<@Nullable Object> validate(List<?> arg, SchemaConfiguration configuration)
Name1BoxedString validateAndBox(String arg, SchemaConfiguration configuration)
Name1BoxedVoid validateAndBox(Void arg, SchemaConfiguration configuration)
Name1BoxedNumber validateAndBox(Number arg, SchemaConfiguration configuration)
Name1BoxedBoolean validateAndBox(boolean arg, SchemaConfiguration configuration)
Name1BoxedMap validateAndBox(Map<?, ?> arg, SchemaConfiguration configuration)
Name1BoxedList validateAndBox(List<?> arg, SchemaConfiguration configuration)
Name1Boxed validateAndBox(@Nullable Object arg, SchemaConfiguration configuration)
@Nullable Object validate(@Nullable Object arg, SchemaConfiguration configuration)

NameMap0Builder

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

A class that builds the Map input type

Constructor Summary

Constructor and Description
NameMap0Builder(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
NameMap0Builder snake_case(int value)
NameMap0Builder snake_case(float value)
NameMap0Builder property(String value)
NameMap0Builder additionalProperty(String key, Void value)
NameMap0Builder additionalProperty(String key, boolean value)
NameMap0Builder additionalProperty(String key, String value)
NameMap0Builder additionalProperty(String key, int value)
NameMap0Builder additionalProperty(String key, float value)
NameMap0Builder additionalProperty(String key, long value)
NameMap0Builder additionalProperty(String key, double value)
NameMap0Builder additionalProperty(String key, List<?> value)
NameMap0Builder additionalProperty(String key, Map<String, ?> value)

NameMapBuilder1

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

A class that builds the Map input type

Constructor Summary

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

Method Summary

Modifier and Type Method and Description
NameMap0Builder name(int value)
NameMap0Builder name(float value)

NameMap

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

A class to store validated Map payloads

Method Summary

Modifier and Type Method and Description
static NameMap of(Map<String, ? extends @Nullable Object> arg, SchemaConfiguration configuration)
Number name()
value must be a 32 bit integer
Number snake_case()
[optional] value must be a 32 bit integer
String property()
[optional]
@Nullable Object getAdditionalProperty(String name)
provides type safety for additional properties

PropertyBoxed

public sealed interface PropertyBoxed
permits
PropertyBoxedString

sealed interface that stores validated payloads using boxed classes

PropertyBoxedString

public record PropertyBoxedString
implements PropertyBoxed

record that stores validated String payloads, sealed permits implementation

Constructor Summary

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

Method Summary

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

Property

public static class Property
extends StringJsonSchema.StringJsonSchema1

A schema class that validates payloads

Description

this is a reserved python keyword

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

SnakeCaseBoxed

public sealed interface SnakeCaseBoxed
permits
SnakeCaseBoxedNumber

sealed interface that stores validated payloads using boxed classes

SnakeCaseBoxedNumber

public record SnakeCaseBoxedNumber
implements SnakeCaseBoxed

record that stores validated Number payloads, sealed permits implementation

Constructor Summary

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

Method Summary

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

SnakeCase

public static class SnakeCase
extends Int32JsonSchema.Int32JsonSchema1

A schema class that validates payloads

Methods Inherited from class org.openapijsonschematools.client.schemas.Int32JsonSchema.Int32JsonSchema1
validate
validateAndBox

Name2Boxed

public sealed interface Name2Boxed
permits
Name2BoxedNumber

sealed interface that stores validated payloads using boxed classes

Name2BoxedNumber

public record Name2BoxedNumber
implements Name2Boxed

record that stores validated Number payloads, sealed permits implementation

Constructor Summary

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

Method Summary

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

Name2

public static class Name2
extends Int32JsonSchema.Int32JsonSchema1

A schema class that validates payloads

Methods Inherited from class org.openapijsonschematools.client.schemas.Int32JsonSchema.Int32JsonSchema1
validate
validateAndBox

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