com.mongodb.jdbc.JsonSchema Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mongodb-jdbc Show documentation
Show all versions of mongodb-jdbc Show documentation
JDBC Driver for MongoDB Atlas SQL interface
package com.mongodb.jdbc;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import org.bson.BsonValue;
// Simple POJO for deserializing jsonschema.
// For more details on jsonSchema, see https://docs.mongodb.com/manual/reference/operator/query/jsonSchema/.
public class JsonSchema {
public BsonValue bsonType;
public Map properties;
public Set anyOf;
public Set required;
public BsonValue items;
public BsonValue additionalProperties;
@Override
public boolean equals(Object obj) {
if (!(obj instanceof MongoJsonSchema)) {
return false;
}
MongoJsonSchema other = (MongoJsonSchema) obj;
return Objects.equals(bsonType, other.bsonType)
&& Objects.equals(properties, other.properties)
&& Objects.equals(anyOf, other.anyOf)
&& Objects.equals(required, other.required)
&& Objects.equals(items, other.items)
&& Objects.equals(additionalProperties, other.additionalProperties);
}
@Override
public int hashCode() {
return Objects.hash(bsonType, properties, anyOf, required, items, additionalProperties);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy