public ShapeId withNamespace(String namespace) {
        if (this.namespace.equals(namespace)) {
            return this;
        } else if (!isValidNamespace(namespace)) {
            throw new ShapeIdSyntaxException("Invalid shape ID: " + namespace);
        } else {
            return new ShapeId(namespace, name, member);
        }
    }
Creates a shape ID that uses a different namespace than the current ID.

@param namespace Namespace to use.
@return Returns the shape ID with the changed namespace.
@throws ShapeIdSyntaxException if the namespace is invalid.
smithy-model/src/main/java/software/amazon/smithy/model/shapes/ShapeId.java