@Override
    public Builder toBuilder() {
        Builder builder = new Builder()
                .ref(ref)
                .type(type)
                .enumValues(enumValues)
                .intEnumValues(intEnumValues)
                .constValue(constValue)
                .defaultValue(defaultValue)

                .multipleOf(multipleOf)
                .maximum(maximum)
                .exclusiveMaximum(exclusiveMaximum)
                .minimum(minimum)
                .exclusiveMinimum(exclusiveMinimum)

                .maxLength(maxLength)
                .minLength(minLength)
                .pattern(pattern)

                .items(items)
                .maxItems(maxItems)
                .minItems(minItems)
                .uniqueItems(uniqueItems)

                .required(required)
                .additionalProperties(additionalProperties)
                .maxProperties(maxProperties)
                .minProperties(minProperties)
                .propertyNames(propertyNames)

                .allOf(allOf)
                .anyOf(anyOf)
                .oneOf(oneOf)
                .not(not)

                .title(title)
                .description(description)
                .format(format)
                .readOnly(readOnly)
                .writeOnly(writeOnly)
                .comment(comment)
                .examples(examples)
                .deprecated(deprecated)

                .contentEncoding(contentEncoding)
                .contentMediaType(contentMediaType);
        properties.forEach(builder::putProperty);
        patternProperties.forEach(builder::putPatternProperty);
        extensions.forEach(builder::putExtension);
        return builder;
    }
Selects a nested schema using a variadic list of property names
to descend into.

<p>For example, this method can be used to get the items schema nested
inside of an array inside of an object:

<pre>{@code
Schema itemsSchema = schema.selectSchema("properties", "foo", "items").get();
}</pre>

@param segments The properties names to retrieve.
@return Returns the selected Schema.
smithy-jsonschema/src/main/java/software/amazon/smithy/jsonschema/Schema.java