com.mysql.cj.xdevapi

## Class Schema.Validation

- java.lang.Object
- - com.mysql.cj.xdevapi.Schema.Validation

Enclosing interface:
  Schema

    public static class Schema.Validation
    extends Object

Validation options to be passed to `Schema.createCollection(String, CreateCollectionOptions)` or `Schema.modifyCollection(String, ModifyCollectionOptions)`.

Allowed options are:

- schema - JSON schema as a String
- level - `Schema.Validation.ValidationLevel`

### Nested Class Summary

Nested Classes
`static class` `Schema.Validation.ValidationLevel` Defines how validation options are applied.

### Field Summary

Fields
`private Schema.Validation.ValidationLevel` `level`
`private String` `schema`

### Constructor Summary

Constructors
Constructor and Description
`Validation()`

### Method Summary

All Methods Instance Methods Concrete Methods
`Schema.Validation.ValidationLevel` `getLevel()`
`String` `getSchema()`
`Schema.Validation` `setLevel(Schema.Validation.ValidationLevel level)`
`Schema.Validation` `setSchema(String schema)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### level

    private Schema.Validation.ValidationLevel level

#### schema

    private String schema

### Constructor Detail

#### Validation

    public Validation()

### Method Detail

#### setLevel

    public Schema.Validation setLevel(Schema.Validation.ValidationLevel level)

#### getLevel

    public Schema.Validation.ValidationLevel getLevel()

#### setSchema

    public Schema.Validation setSchema(String schema)

#### getSchema

    public String getSchema()

Copyright © 2016, 2025, Oracle and/or its affiliates.