Schema implements ToNode, ToSmithyBuilder<Schema> { public static Builder builder() { return new Builder(); } private  Schema(Builder builder); static Builder builder(); Optional<String> getRef(); Optional<String> getType(); Optional<Collection<String>> getEnumValues(); Optional<Node> getConstValue(); Optional<Node> getDefaultValue(); Optional<Number> getMultipleOf(); Optional<Number> getMaximum(); Optional<Number> getExclusiveMaximum(); Optional<Number> getMinimum(); Optional<Number> getExclusiveMinimum(); Optional<Long> getMaxLength(); Optional<Long> getMinLength(); Optional<String> getPattern(); Optional<Schema> getItems(); Optional<Integer> getMaxItems(); Optional<Integer> getMinItems(); boolean getUniqueItems(); Optional<Integer> getMaxProperties(); Optional<Integer> getMinProperties(); Collection<String> getRequired(); Map<String, Schema> getProperties(); Optional<Schema> getProperty(String key); Optional<Schema> getAdditionalProperties(); Optional<Schema> getPropertyNames(); List<Schema> getAllOf(); List<Schema> getAnyOf(); List<Schema> getOneOf(); Optional<Schema> getNot(); Optional<String> getTitle(); Optional<String> getDescription(); Optional<String> getFormat(); boolean getReadOnly(); boolean getWriteOnly(); Optional<String> getComment(); Optional<Node> getExamples(); Optional<String> getContentEncoding(); Optional<String> getContentMediaType(); Optional<ToNode> getExtension(String key); Map<String, ToNode> getAllExtensions(); @Override Node toNode(); Optional<Schema> selectSchema(String... segments); @Override Builder toBuilder(); @Override boolean equals(Object o); @Override int hashCode();  }
@Test public void canRemoveSettings() { Schema.Builder builder = Schema.builder(); Set<String> values = SetUtils.of( "const", "default", "enum", "multipleOf", "maximum", "exclusiveMaximum", "minimum", "exclusiveMinimum", "maxLength", "minLength", "pattern", "items", "maxItems", "minItems", "uniqueItems", "properties", "additionalProperties", "required", "maxProperties", "minProperties", "propertyNames", "allOf", "anyOf", "oneOf", "not", "title", "description", "format", "readOnly", "writeOnly", "comment", "contentEncoding", "contentMediaType", "examples" ); for (String value : values) { builder.disableProperty(value); } builder.build(); }
@Test public void basicEqualityTest() { Schema a = Schema.builder().title("foo").build(); Schema b = Schema.builder().title("foo").build(); Schema c = Schema.builder().type("string").build(); assertThat(a, equalTo(b)); assertThat(a, equalTo(a)); assertThat(b, equalTo(a)); assertThat(c, not(equalTo(a))); }