Skip to content

Commit

Permalink
chore(java): mark every class as internal (#2323)
Browse files Browse the repository at this point in the history
This marks all the java classes as internal so the generator can be
published to maven without an expectation of the java code itself
being GA.
  • Loading branch information
JordonPhillips authored May 3, 2021
1 parent c888af2 commit 2384e24
Show file tree
Hide file tree
Showing 47 changed files with 94 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,13 @@
import software.amazon.smithy.utils.ListUtils;
import software.amazon.smithy.utils.MapUtils;
import software.amazon.smithy.utils.SetUtils;
import software.amazon.smithy.utils.SmithyInternalApi;

/**
* Configure clients with AWS auth configurations and plugin.
*/
// TODO: Think about AWS Auth supported for only some operations and not all, when not AWS service, with say @auth([])
@SmithyInternalApi
public final class AddAwsAuthPlugin implements TypeScriptIntegration {
static final String STS_CLIENT_PREFIX = "sts-client-";
static final String ROLE_ASSUMERS_FILE = "defaultRoleAssumers";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import software.amazon.smithy.typescript.codegen.TypeScriptWriter;
import software.amazon.smithy.typescript.codegen.integration.TypeScriptIntegration;
import software.amazon.smithy.utils.MapUtils;
import software.amazon.smithy.utils.SmithyInternalApi;

// TODO: This javadoc is specific to needs of AWS client. However it has elements that would be needed by non-AWS
// clients too, like logger, region for SigV4. We should refactor these into different Integration or rename this
Expand Down Expand Up @@ -74,6 +75,7 @@
* <li>logger: Sets to empty as logger is passed in client configuration</li>
* </ul>
*/
@SmithyInternalApi
public final class AddAwsRuntimeConfig implements TypeScriptIntegration {

private static final Logger LOGGER = Logger.getLogger(AddAwsRuntimeConfig.class.getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,12 @@
import software.amazon.smithy.typescript.codegen.integration.TypeScriptIntegration;
import software.amazon.smithy.utils.MapUtils;
import software.amazon.smithy.utils.SetUtils;
import software.amazon.smithy.utils.SmithyInternalApi;

/**
* Adds blobReader dependency if needed.
*/
@SmithyInternalApi
public class AddBodyChecksumGeneratorDependency implements TypeScriptIntegration {
private static final Set<String> SERVICE_IDS = SetUtils.of("Glacier");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@
import software.amazon.smithy.typescript.codegen.integration.TypeScriptIntegration;
import software.amazon.smithy.utils.ListUtils;
import software.amazon.smithy.utils.SetUtils;
import software.amazon.smithy.utils.SmithyInternalApi;

/**
* Adds all built-in runtime client plugins to clients.
*/
@SmithyInternalApi
public class AddBuiltinPlugins implements TypeScriptIntegration {
private static final Set<String> ROUTE_53_ID_MEMBERS = SetUtils.of("DelegationSetId", "HostedZoneId", "Id");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
import software.amazon.smithy.typescript.codegen.integration.TypeScriptIntegration;
import software.amazon.smithy.utils.ListUtils;
import software.amazon.smithy.utils.SetUtils;
import software.amazon.smithy.utils.SmithyInternalApi;

@SmithyInternalApi
public class AddCrossRegionCopyingPlugin implements TypeScriptIntegration {
private static final Set<String> SHARED_PRESIGNED_URL_OPERATIONS = SetUtils.of(
"CopyDBClusterSnapshot",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@
import software.amazon.smithy.typescript.codegen.TypeScriptWriter;
import software.amazon.smithy.typescript.codegen.integration.TypeScriptIntegration;
import software.amazon.smithy.utils.IoUtils;
import software.amazon.smithy.utils.SmithyInternalApi;

/**
* Generates Client and Commands for DynamoDB Document Client.
*/
@SmithyInternalApi
public class AddDocumentClientPlugin implements TypeScriptIntegration {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,13 @@
import software.amazon.smithy.typescript.codegen.integration.TypeScriptIntegration;
import software.amazon.smithy.utils.ListUtils;
import software.amazon.smithy.utils.MapUtils;
import software.amazon.smithy.utils.SmithyInternalApi;

/**
* Adds runtime client plugins that handle the eventstream flow in request,
* including eventstream payload signing.
*/
@SmithyInternalApi
public class AddEventStreamHandlingDependency implements TypeScriptIntegration {
@Override
public List<RuntimeClientPlugin> getClientPlugins() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@
import software.amazon.smithy.typescript.codegen.integration.TypeScriptIntegration;
import software.amazon.smithy.utils.ListUtils;
import software.amazon.smithy.utils.MapUtils;
import software.amazon.smithy.utils.SmithyInternalApi;

@SmithyInternalApi
public class AddHttp2Dependency implements TypeScriptIntegration {
@Override
public Map<String, Consumer<TypeScriptWriter>> getRuntimeConfigWriters(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@
import software.amazon.smithy.typescript.codegen.integration.TypeScriptIntegration;
import software.amazon.smithy.utils.MapUtils;
import software.amazon.smithy.utils.SetUtils;
import software.amazon.smithy.utils.SmithyInternalApi;

/**
* Adds Md5Hash if needed.
*/
@SmithyInternalApi
public class AddMd5HashDependency implements TypeScriptIntegration {
private static final Set<String> SERVICE_IDS = SetUtils.of("S3", "SQS");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@
import software.amazon.smithy.typescript.codegen.integration.TypeScriptIntegration;
import software.amazon.smithy.utils.ListUtils;
import software.amazon.smithy.utils.SetUtils;
import software.amazon.smithy.utils.SmithyInternalApi;


@SmithyInternalApi
public class AddOmitRetryHeadersDependency implements TypeScriptIntegration {
private static final Set<String> SERVICE_IDS = SetUtils.of(
"ConnectParticipant", // P43593766
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@
import software.amazon.smithy.typescript.codegen.integration.ProtocolGenerator;
import software.amazon.smithy.typescript.codegen.integration.TypeScriptIntegration;
import software.amazon.smithy.utils.ListUtils;
import software.amazon.smithy.utils.SmithyInternalApi;

/**
* Adds all built-in AWS protocols.
*/
@SmithyInternalApi
public class AddProtocols implements TypeScriptIntegration {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,12 @@
import software.amazon.smithy.utils.ListUtils;
import software.amazon.smithy.utils.MapUtils;
import software.amazon.smithy.utils.SetUtils;
import software.amazon.smithy.utils.SmithyInternalApi;

/**
* AWS S3 client configuration.
*/
@SmithyInternalApi
public final class AddS3Config implements TypeScriptIntegration {

private static final Set<String> S3_MD5_OPERATIONS = SetUtils.of(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,12 @@
import software.amazon.smithy.typescript.codegen.integration.RuntimeClientPlugin;
import software.amazon.smithy.typescript.codegen.integration.TypeScriptIntegration;
import software.amazon.smithy.utils.ListUtils;
import software.amazon.smithy.utils.SmithyInternalApi;

/**
* Add S3Control customization.
*/
@SmithyInternalApi
public class AddS3ControlDependency implements TypeScriptIntegration {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@
import software.amazon.smithy.typescript.codegen.TypeScriptWriter;
import software.amazon.smithy.typescript.codegen.integration.TypeScriptIntegration;
import software.amazon.smithy.utils.MapUtils;
import software.amazon.smithy.utils.SmithyInternalApi;

/**
* Adds StreamHasher if needed.
*/
@SmithyInternalApi
public class AddStreamHasherDependency implements TypeScriptIntegration {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@
import software.amazon.smithy.typescript.codegen.integration.TypeScriptIntegration;
import software.amazon.smithy.utils.ListUtils;
import software.amazon.smithy.utils.MapUtils;
import software.amazon.smithy.utils.SmithyInternalApi;

/**
* Add client plugins and configs to support WebSocket streaming for Transcribe
* Streaming service.
**/
@SmithyInternalApi
public class AddTranscribeStreamingDependency implements TypeScriptIntegration {
@Override
public List<RuntimeClientPlugin> getClientPlugins() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,13 @@
import software.amazon.smithy.typescript.codegen.integration.TypeScriptIntegration;
import software.amazon.smithy.utils.ListUtils;
import software.amazon.smithy.utils.MapUtils;
import software.amazon.smithy.utils.SmithyInternalApi;

/**
* Add client plubins and configs to support injecting user agent.
*/
// TODO: Looks to add this back for non-AWS service clients, by fixing the dependency on ClientSharedValues.serviceId
@SmithyInternalApi
public class AddUserAgentDependency implements TypeScriptIntegration {
@Override
public List<RuntimeClientPlugin> getClientPlugins() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@
import java.util.List;
import software.amazon.smithy.codegen.core.SymbolDependency;
import software.amazon.smithy.codegen.core.SymbolDependencyContainer;
import software.amazon.smithy.utils.SmithyInternalApi;

/**
* This enum should define all TypeScript dependencies that are introduced by
* this package.
*/
@SmithyInternalApi
public enum AwsDependency implements SymbolDependencyContainer {

MIDDLEWARE_SIGNING(NORMAL_DEPENDENCY, "@aws-sdk/middleware-signing", "^1.0.0-rc.1"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import software.amazon.smithy.model.traits.TimestampFormatTrait.Format;
import software.amazon.smithy.typescript.codegen.TypeScriptWriter;
import software.amazon.smithy.typescript.codegen.integration.HttpRpcProtocolGenerator;
import software.amazon.smithy.utils.SmithyInternalApi;

/**
* Handles generating the aws.ec2 protocol for services. It handles reading and
Expand All @@ -43,6 +44,7 @@
* @see <a href="https://awslabs.github.io/smithy/spec/xml.html">Smithy XML traits.</a>
* @see <a href="https://awslabs.github.io/smithy/spec/aws-core.html#ec2QueryName-trait">Smithy EC2 Query Name trait.</a>
*/
@SmithyInternalApi
final class AwsEc2 extends HttpRpcProtocolGenerator {

AwsEc2() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,12 @@
import software.amazon.smithy.typescript.codegen.TypeScriptWriter;
import software.amazon.smithy.typescript.codegen.integration.TypeScriptIntegration;
import software.amazon.smithy.utils.MapUtils;
import software.amazon.smithy.utils.SmithyInternalApi;

/**
* Generates an endpoint resolver from endpoints.json.
*/
@SmithyInternalApi
public final class AwsEndpointGeneratorIntegration implements TypeScriptIntegration {
@Override
public void writeAdditionalFiles(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import software.amazon.smithy.aws.traits.protocols.AwsJson1_0Trait;
import software.amazon.smithy.model.shapes.ShapeId;
import software.amazon.smithy.utils.SmithyInternalApi;

/**
* Handles generating the aws.json-1.0 protocol for services.
Expand All @@ -25,6 +26,7 @@
*
* @see JsonRpcProtocolGenerator
*/
@SmithyInternalApi
final class AwsJsonRpc1_0 extends JsonRpcProtocolGenerator {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import software.amazon.smithy.aws.traits.protocols.AwsJson1_1Trait;
import software.amazon.smithy.model.shapes.ShapeId;
import software.amazon.smithy.utils.SmithyInternalApi;

/**
* Handles generating the aws.json-1.1 protocol for services.
Expand All @@ -25,6 +26,7 @@
*
* @see JsonRpcProtocolGenerator
*/
@SmithyInternalApi
final class AwsJsonRpc1_1 extends JsonRpcProtocolGenerator {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@
import software.amazon.smithy.typescript.codegen.TypeScriptWriter;
import software.amazon.smithy.typescript.codegen.integration.TypeScriptIntegration;
import software.amazon.smithy.utils.IoUtils;
import software.amazon.smithy.utils.SmithyInternalApi;
import software.amazon.smithy.utils.StringUtils;

@SmithyInternalApi
public final class AwsPackageFixturesGeneratorIntegration implements TypeScriptIntegration {
@Override
public void writeAdditionalFiles(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,12 @@
import software.amazon.smithy.typescript.codegen.integration.HttpProtocolGeneratorUtils;
import software.amazon.smithy.typescript.codegen.integration.ProtocolGenerator.GenerationContext;
import software.amazon.smithy.utils.IoUtils;
import software.amazon.smithy.utils.SmithyInternalApi;

/**
* Utility methods for generating AWS protocols.
*/
@SmithyInternalApi
final class AwsProtocolUtils {

private AwsProtocolUtils() {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import software.amazon.smithy.model.traits.TimestampFormatTrait.Format;
import software.amazon.smithy.typescript.codegen.TypeScriptWriter;
import software.amazon.smithy.typescript.codegen.integration.HttpRpcProtocolGenerator;
import software.amazon.smithy.utils.SmithyInternalApi;

/**
* Handles generating the aws.query protocol for services. It handles reading and
Expand All @@ -42,6 +43,7 @@
* @see AwsProtocolUtils
* @see <a href="https://awslabs.github.io/smithy/spec/xml.html">Smithy XML traits.</a>
*/
@SmithyInternalApi
final class AwsQuery extends HttpRpcProtocolGenerator {

AwsQuery() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import software.amazon.smithy.aws.traits.protocols.RestJson1Trait;
import software.amazon.smithy.model.shapes.ShapeId;
import software.amazon.smithy.utils.SmithyInternalApi;

/**
* Handles generating the aws.rest-json-1 protocol for services.
Expand All @@ -25,6 +26,7 @@
*
* @see RestJsonProtocolGenerator
*/
@SmithyInternalApi
public final class AwsRestJson1 extends RestJsonProtocolGenerator {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import software.amazon.smithy.model.traits.TimestampFormatTrait.Format;
import software.amazon.smithy.typescript.codegen.TypeScriptWriter;
import software.amazon.smithy.typescript.codegen.integration.HttpBindingProtocolGenerator;
import software.amazon.smithy.utils.SmithyInternalApi;

/**
* Handles generating the aws.rest-xml protocol for services. It handles reading and
Expand All @@ -55,6 +56,7 @@
* @see <a href="https://awslabs.github.io/smithy/spec/http.html">Smithy HTTP protocol bindings.</a>
* @see <a href="https://awslabs.github.io/smithy/spec/xml.html">Smithy XML traits.</a>
*/
@SmithyInternalApi
final class AwsRestXml extends HttpBindingProtocolGenerator {

AwsRestXml() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@
import software.amazon.smithy.model.Model;
import software.amazon.smithy.typescript.codegen.TypeScriptSettings;
import software.amazon.smithy.typescript.codegen.integration.TypeScriptIntegration;
import software.amazon.smithy.utils.SmithyInternalApi;
import software.amazon.smithy.utils.StringUtils;

/**
* Uses the {@code aws.api#service$sdkId} trait property to determine the
* name of a service.
*/
@SmithyInternalApi
public final class AwsServiceIdIntegration implements TypeScriptIntegration {

private static final Logger LOGGER = Logger.getLogger(AwsServiceIdIntegration.class.getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@
import software.amazon.smithy.model.Model;
import software.amazon.smithy.model.shapes.ServiceShape;
import software.amazon.smithy.typescript.codegen.TypeScriptSettings;
import software.amazon.smithy.utils.SmithyInternalApi;

/**
* Utility methods related to AWS traits.
*/
@SmithyInternalApi
final class AwsTraitsUtils {

private AwsTraitsUtils() {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@
import software.amazon.smithy.typescript.codegen.ApplicationProtocol;
import software.amazon.smithy.typescript.codegen.TypeScriptSettings;
import software.amazon.smithy.typescript.codegen.TypeScriptWriter;
import software.amazon.smithy.utils.SmithyInternalApi;

@SmithyInternalApi
final class DocumentClientCommandGenerator implements Runnable {
static final String COMMAND_PROPERTIES_SECTION = "command_properties";
static final String COMMAND_BODY_EXTRA_SECTION = "command_body_extra";
Expand Down
Loading

0 comments on commit 2384e24

Please sign in to comment.