diff --git a/smithy-aws-apigateway-traits/src/main/java/software/amazon/smithy/aws/apigateway/traits/AuthorizersTrait.java b/smithy-aws-apigateway-traits/src/main/java/software/amazon/smithy/aws/apigateway/traits/AuthorizersTrait.java index f719cd4f0..d71120cf1 100644 --- a/smithy-aws-apigateway-traits/src/main/java/software/amazon/smithy/aws/apigateway/traits/AuthorizersTrait.java +++ b/smithy-aws-apigateway-traits/src/main/java/software/amazon/smithy/aws/apigateway/traits/AuthorizersTrait.java @@ -101,7 +101,7 @@ public final class AuthorizersTrait extends AbstractTrait implements ToSmithyBui @Override public Builder toBuilder() { - return builder().authorizers(authorizers); + return builder().sourceLocation(getSourceLocation()).authorizers(authorizers); } @Override diff --git a/smithy-aws-apigateway-traits/src/main/java/software/amazon/smithy/aws/apigateway/traits/IntegrationTrait.java b/smithy-aws-apigateway-traits/src/main/java/software/amazon/smithy/aws/apigateway/traits/IntegrationTrait.java index fe4484d53..6d7dbc5ab 100644 --- a/smithy-aws-apigateway-traits/src/main/java/software/amazon/smithy/aws/apigateway/traits/IntegrationTrait.java +++ b/smithy-aws-apigateway-traits/src/main/java/software/amazon/smithy/aws/apigateway/traits/IntegrationTrait.java @@ -342,6 +342,7 @@ public final class IntegrationTrait extends AbstractTrait implements ToSmithyBui @Override public Builder toBuilder() { return builder() + .sourceLocation(getSourceLocation()) .type(type) .uri(uri) .credentials(credentials) diff --git a/smithy-aws-apigateway-traits/src/main/java/software/amazon/smithy/aws/apigateway/traits/MockIntegrationTrait.java b/smithy-aws-apigateway-traits/src/main/java/software/amazon/smithy/aws/apigateway/traits/MockIntegrationTrait.java index 7482980ea..00b2c8a54 100644 --- a/smithy-aws-apigateway-traits/src/main/java/software/amazon/smithy/aws/apigateway/traits/MockIntegrationTrait.java +++ b/smithy-aws-apigateway-traits/src/main/java/software/amazon/smithy/aws/apigateway/traits/MockIntegrationTrait.java @@ -163,6 +163,7 @@ public final class MockIntegrationTrait extends AbstractTrait implements ToSmith @Override public Builder toBuilder() { return builder() + .sourceLocation(getSourceLocation()) .passThroughBehavior(passThroughBehavior) .contentHandling(contentHandling) .requestParameters(requestParameters) diff --git a/smithy-aws-cloudformation-traits/src/main/java/software/amazon/smithy/aws/cloudformation/traits/CfnResourceTrait.java b/smithy-aws-cloudformation-traits/src/main/java/software/amazon/smithy/aws/cloudformation/traits/CfnResourceTrait.java index 950893059..c2c3504ea 100644 --- a/smithy-aws-cloudformation-traits/src/main/java/software/amazon/smithy/aws/cloudformation/traits/CfnResourceTrait.java +++ b/smithy-aws-cloudformation-traits/src/main/java/software/amazon/smithy/aws/cloudformation/traits/CfnResourceTrait.java @@ -76,7 +76,7 @@ public final class CfnResourceTrait extends AbstractTrait @Override public SmithyBuilder toBuilder() { - return builder().name(name).additionalSchemas(additionalSchemas); + return builder().sourceLocation(getSourceLocation()).name(name).additionalSchemas(additionalSchemas); } public static final class Provider extends AbstractTrait.Provider { diff --git a/smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/auth/CognitoUserPoolsTrait.java b/smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/auth/CognitoUserPoolsTrait.java index 218cfc0f3..675cd663b 100644 --- a/smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/auth/CognitoUserPoolsTrait.java +++ b/smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/auth/CognitoUserPoolsTrait.java @@ -76,7 +76,7 @@ public final class CognitoUserPoolsTrait extends AbstractTrait implements ToSmit @Override public Builder toBuilder() { - return builder().providerArns(providerArns); + return builder().sourceLocation(getSourceLocation()).providerArns(providerArns); } @Override diff --git a/smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/clientendpointdiscovery/ClientDiscoveredEndpointTrait.java b/smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/clientendpointdiscovery/ClientDiscoveredEndpointTrait.java index 4593dfb80..57303f04e 100644 --- a/smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/clientendpointdiscovery/ClientDiscoveredEndpointTrait.java +++ b/smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/clientendpointdiscovery/ClientDiscoveredEndpointTrait.java @@ -61,7 +61,7 @@ public final class ClientDiscoveredEndpointTrait extends AbstractTrait @Override public SmithyBuilder toBuilder() { - return builder().required(required); + return builder().sourceLocation(getSourceLocation()).required(required); } /** Builder for {@link ClientDiscoveredEndpointTrait}. */ diff --git a/smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/clientendpointdiscovery/ClientEndpointDiscoveryTrait.java b/smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/clientendpointdiscovery/ClientEndpointDiscoveryTrait.java index 7f36aa164..8f7021f7c 100644 --- a/smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/clientendpointdiscovery/ClientEndpointDiscoveryTrait.java +++ b/smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/clientendpointdiscovery/ClientEndpointDiscoveryTrait.java @@ -91,7 +91,8 @@ public final class ClientEndpointDiscoveryTrait extends AbstractTrait @Override public Builder toBuilder() { return new Builder() - .operation(getOperation()) + .sourceLocation(getSourceLocation()) + .operation(operation) .error(error); } diff --git a/smithy-model/src/main/java/software/amazon/smithy/model/traits/EndpointTrait.java b/smithy-model/src/main/java/software/amazon/smithy/model/traits/EndpointTrait.java index 70008ea1b..4795d2064 100644 --- a/smithy-model/src/main/java/software/amazon/smithy/model/traits/EndpointTrait.java +++ b/smithy-model/src/main/java/software/amazon/smithy/model/traits/EndpointTrait.java @@ -101,7 +101,7 @@ public final class EndpointTrait extends AbstractTrait implements ToSmithyBuilde @Override public Builder toBuilder() { - return new Builder().hostPrefix(hostPrefix.toString()); + return new Builder().sourceLocation(getSourceLocation()).hostPrefix(hostPrefix.toString()); } @Override diff --git a/smithy-model/src/main/java/software/amazon/smithy/model/traits/HttpTrait.java b/smithy-model/src/main/java/software/amazon/smithy/model/traits/HttpTrait.java index 6ac4a68ac..38d934b7e 100644 --- a/smithy-model/src/main/java/software/amazon/smithy/model/traits/HttpTrait.java +++ b/smithy-model/src/main/java/software/amazon/smithy/model/traits/HttpTrait.java @@ -89,7 +89,7 @@ public final class HttpTrait extends AbstractTrait implements ToSmithyBuilder