Skip to content

Commit 3f23338

Browse files
Mark everything as internal or unstable
This marks all the java classes as either internal or unstable so the generator can be published to maven without an expectation of the java code itself being GA.
1 parent b80afa1 commit 3f23338

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+89
-0
lines changed

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/ApplicationProtocol.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@
1818
import java.util.Objects;
1919
import software.amazon.smithy.codegen.core.Symbol;
2020
import software.amazon.smithy.codegen.core.SymbolReference;
21+
import software.amazon.smithy.utils.SmithyUnstableApi;
2122

2223
/**
2324
* Represents the resolves {@link Symbol}s and references for an
2425
* application protocol (e.g., "http", "mqtt", etc).
2526
*/
27+
@SmithyUnstableApi
2628
public final class ApplicationProtocol {
2729

2830
private final String name;

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/CodegenUtils.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,12 @@
2626
import software.amazon.smithy.model.shapes.Shape;
2727
import software.amazon.smithy.model.shapes.StructureShape;
2828
import software.amazon.smithy.model.traits.StreamingTrait;
29+
import software.amazon.smithy.utils.SmithyUnstableApi;
2930

3031
/**
3132
* Utility methods needed across Java packages.
3233
*/
34+
@SmithyUnstableApi
3335
public final class CodegenUtils {
3436

3537
private CodegenUtils() {}

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/CodegenVisitor.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,11 @@
5050
import software.amazon.smithy.typescript.codegen.integration.RuntimeClientPlugin;
5151
import software.amazon.smithy.typescript.codegen.integration.TypeScriptIntegration;
5252
import software.amazon.smithy.utils.MapUtils;
53+
import software.amazon.smithy.utils.SmithyInternalApi;
5354
import software.amazon.smithy.waiters.WaitableTrait;
5455
import software.amazon.smithy.waiters.Waiter;
5556

57+
@SmithyInternalApi
5658
class CodegenVisitor extends ShapeVisitor.Default<Void> {
5759

5860
private static final Logger LOGGER = Logger.getLogger(CodegenVisitor.class.getName());

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/CommandGenerator.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,12 @@
3232
import software.amazon.smithy.typescript.codegen.integration.ProtocolGenerator;
3333
import software.amazon.smithy.typescript.codegen.integration.RuntimeClientPlugin;
3434
import software.amazon.smithy.utils.OptionalUtils;
35+
import software.amazon.smithy.utils.SmithyInternalApi;
3536

3637
/**
3738
* Generates a client command using plugins.
3839
*/
40+
@SmithyInternalApi
3941
final class CommandGenerator implements Runnable {
4042

4143
static final String COMMAND_PROPERTIES_SECTION = "command_properties";

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/EnumGenerator.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import software.amazon.smithy.model.shapes.StringShape;
2121
import software.amazon.smithy.model.traits.EnumDefinition;
2222
import software.amazon.smithy.model.traits.EnumTrait;
23+
import software.amazon.smithy.utils.SmithyInternalApi;
2324

2425
/**
2526
* Generates an appropriate TypeScript type from a Smithy enum string.
@@ -51,6 +52,7 @@
5152
* }
5253
* }</pre>
5354
*/
55+
@SmithyInternalApi
5456
final class EnumGenerator implements Runnable {
5557

5658
private final Symbol symbol;

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/FrameworkErrorModel.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
package software.amazon.smithy.typescript.codegen;
1717

1818
import software.amazon.smithy.model.Model;
19+
import software.amazon.smithy.utils.SmithyUnstableApi;
1920

21+
@SmithyUnstableApi
2022
public enum FrameworkErrorModel {
2123

2224
INSTANCE;

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/HttpProtocolTestGenerator.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
import software.amazon.smithy.utils.IoUtils;
6767
import software.amazon.smithy.utils.MapUtils;
6868
import software.amazon.smithy.utils.Pair;
69+
import software.amazon.smithy.utils.SmithyInternalApi;
6970

7071
/**
7172
* Generates HTTP protocol test cases to be run using Jest.
@@ -79,6 +80,7 @@
7980
*
8081
* TODO: try/catch and if/else are still cumbersome with TypeScriptWriter.
8182
*/
83+
@SmithyInternalApi
8284
final class HttpProtocolTestGenerator implements Runnable {
8385

8486
private static final Logger LOGGER = Logger.getLogger(HttpProtocolTestGenerator.class.getName());

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/ImportDeclarations.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,12 @@
2121
import java.util.Set;
2222
import java.util.TreeMap;
2323
import software.amazon.smithy.codegen.core.CodegenException;
24+
import software.amazon.smithy.utils.SmithyInternalApi;
2425

2526
/**
2627
* Internal class used for aggregating imports of a file.
2728
*/
29+
@SmithyInternalApi
2830
final class ImportDeclarations {
2931

3032
private final Path relativize;

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/IndexGenerator.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,14 @@
2828
import software.amazon.smithy.model.traits.PaginatedTrait;
2929
import software.amazon.smithy.typescript.codegen.integration.ProtocolGenerator;
3030
import software.amazon.smithy.typescript.codegen.integration.TypeScriptIntegration;
31+
import software.amazon.smithy.utils.SmithyInternalApi;
3132
import software.amazon.smithy.waiters.WaitableTrait;
3233
import software.amazon.smithy.waiters.Waiter;
3334

3435
/**
3536
* Generates an index to export the service client and each command.
3637
*/
38+
@SmithyInternalApi
3739
final class IndexGenerator {
3840

3941
private IndexGenerator() {}

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/LanguageTarget.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,12 @@
1515

1616
package software.amazon.smithy.typescript.codegen;
1717

18+
import software.amazon.smithy.utils.SmithyUnstableApi;
19+
1820
/**
1921
* Represents a possible language target that can be generated.
2022
*/
23+
@SmithyUnstableApi
2124
public enum LanguageTarget {
2225
/**
2326
* Node-specific language target.

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/NonModularServiceGenerator.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import software.amazon.smithy.model.knowledge.TopDownIndex;
2424
import software.amazon.smithy.model.shapes.OperationShape;
2525
import software.amazon.smithy.model.shapes.ServiceShape;
26+
import software.amazon.smithy.utils.SmithyInternalApi;
2627
import software.amazon.smithy.utils.StringUtils;
2728

2829
/**
@@ -33,6 +34,7 @@
3334
* operations of a service are considered referenced, meaning they will
3435
* not be removed by tree-shaking.
3536
*/
37+
@SmithyInternalApi
3638
final class NonModularServiceGenerator implements Runnable {
3739

3840
private final TypeScriptSettings settings;

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/PackageJsonGenerator.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,12 @@
2222
import software.amazon.smithy.model.node.Node;
2323
import software.amazon.smithy.model.node.ObjectNode;
2424
import software.amazon.smithy.utils.IoUtils;
25+
import software.amazon.smithy.utils.SmithyInternalApi;
2526

2627
/**
2728
* Private class used to generates a package.json file for the project.
2829
*/
30+
@SmithyInternalApi
2931
final class PackageJsonGenerator {
3032

3133
private PackageJsonGenerator() {}

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/PaginationGenerator.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
2525
import software.amazon.smithy.model.knowledge.PaginationInfo;
2626
import software.amazon.smithy.model.shapes.OperationShape;
2727
import software.amazon.smithy.model.shapes.ServiceShape;
28+
import software.amazon.smithy.utils.SmithyInternalApi;
2829

30+
@SmithyInternalApi
2931
final class PaginationGenerator implements Runnable {
3032

3133
static final String PAGINATION_INTERFACE_FILE = "pagination/Interfaces.ts";

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/RuntimeConfigGenerator.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,14 @@
2525
import software.amazon.smithy.model.shapes.ServiceShape;
2626
import software.amazon.smithy.typescript.codegen.integration.TypeScriptIntegration;
2727
import software.amazon.smithy.utils.MapUtils;
28+
import software.amazon.smithy.utils.SmithyInternalApi;
2829

2930
/**
3031
* Generates runtime configuration files, files that are used to
3132
* supply different default values based on the targeted language
3233
* environment of the SDK (e.g., Node vs Browser).
3334
*/
35+
@SmithyInternalApi
3436
final class RuntimeConfigGenerator {
3537

3638
private final TypeScriptSettings settings;

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/ServerCommandGenerator.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,12 @@
3030
import software.amazon.smithy.model.shapes.ShapeId;
3131
import software.amazon.smithy.model.shapes.StructureShape;
3232
import software.amazon.smithy.typescript.codegen.integration.ProtocolGenerator;
33+
import software.amazon.smithy.utils.SmithyInternalApi;
3334

3435
/**
3536
* Generates server operation types.
3637
*/
38+
@SmithyInternalApi
3739
final class ServerCommandGenerator implements Runnable {
3840

3941
private final TypeScriptSettings settings;

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/ServerErrorGenerator.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,13 @@
2020
import software.amazon.smithy.model.Model;
2121
import software.amazon.smithy.model.shapes.StructureShape;
2222
import software.amazon.smithy.model.traits.ErrorTrait;
23+
import software.amazon.smithy.utils.SmithyInternalApi;
2324

2425
/**
2526
* Generates convenience error types for servers, since service developers will throw a modeled exception directly,
2627
* while clients typically care only about catching them.
2728
*/
29+
@SmithyInternalApi
2830
final class ServerErrorGenerator implements Runnable {
2931

3032
private final TypeScriptSettings settings;

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/ServerGenerator.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222
import software.amazon.smithy.model.shapes.OperationShape;
2323
import software.amazon.smithy.model.shapes.ServiceShape;
2424
import software.amazon.smithy.model.shapes.Shape;
25+
import software.amazon.smithy.utils.SmithyInternalApi;
2526

27+
@SmithyInternalApi
2628
final class ServerGenerator {
2729

2830
private ServerGenerator() {}

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/ServerSymbolVisitor.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,13 @@
2828
import software.amazon.smithy.model.shapes.ShapeType;
2929
import software.amazon.smithy.model.shapes.ShapeVisitor;
3030
import software.amazon.smithy.model.shapes.ToShapeId;
31+
import software.amazon.smithy.utils.SmithyInternalApi;
3132
import software.amazon.smithy.utils.StringUtils;
3233

3334
/**
3435
* Wraps a client SymbolProvider and generates substitute shapes for server-specific symbols.
3536
*/
37+
@SmithyInternalApi
3638
final class ServerSymbolVisitor extends ShapeVisitor.Default<Symbol> implements SymbolProvider {
3739
private static final Logger LOGGER = Logger.getLogger(ServerSymbolVisitor.class.getName());
3840

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/ServiceGenerator.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,12 @@
3232
import software.amazon.smithy.typescript.codegen.integration.RuntimeClientPlugin;
3333
import software.amazon.smithy.typescript.codegen.integration.TypeScriptIntegration;
3434
import software.amazon.smithy.utils.OptionalUtils;
35+
import software.amazon.smithy.utils.SmithyInternalApi;
3536

3637
/**
3738
* Generates a service client and configuration using plugins.
3839
*/
40+
@SmithyInternalApi
3941
final class ServiceGenerator implements Runnable {
4042

4143
static final String CLIENT_CONFIG_SECTION = "client_config";

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/StructureGenerator.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,12 @@
2424
import software.amazon.smithy.model.shapes.StructureShape;
2525
import software.amazon.smithy.model.traits.ErrorTrait;
2626
import software.amazon.smithy.typescript.codegen.integration.HttpProtocolGeneratorUtils;
27+
import software.amazon.smithy.utils.SmithyInternalApi;
2728

2829
/**
2930
* Generates normal structures and error structures.
3031
*/
32+
@SmithyInternalApi
3133
final class StructureGenerator implements Runnable {
3234

3335
private final Model model;

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/StructuredMemberWriter.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,14 @@
3131
import software.amazon.smithy.model.traits.IdempotencyTokenTrait;
3232
import software.amazon.smithy.model.traits.SensitiveTrait;
3333
import software.amazon.smithy.model.traits.StreamingTrait;
34+
import software.amazon.smithy.utils.SmithyInternalApi;
3435

3536
/**
3637
* Generates objects, interfaces, enums, etc.
3738
*
3839
* TODO: Replace this with a builder for generating classes and interfaces.
3940
*/
41+
@SmithyInternalApi
4042
final class StructuredMemberWriter {
4143

4244
Model model;

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/SymbolVisitor.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
import software.amazon.smithy.model.traits.EnumTrait;
6464
import software.amazon.smithy.model.traits.MediaTypeTrait;
6565
import software.amazon.smithy.model.traits.StreamingTrait;
66+
import software.amazon.smithy.utils.SmithyInternalApi;
6667
import software.amazon.smithy.utils.StringUtils;
6768

6869
/**
@@ -71,6 +72,7 @@
7172
* <p>Reserved words for TypeScript are automatically escaped so that they are
7273
* prefixed with "_". See "reserved-words.txt" for the list of words.
7374
*/
75+
@SmithyInternalApi
7476
final class SymbolVisitor implements SymbolProvider, ShapeVisitor<Symbol> {
7577

7678
static final String IMPLEMENTS_INTERFACE_PROPERTY = "implementsInterface";

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/TypeScriptCodegenPlugin.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,12 @@
2020
import software.amazon.smithy.codegen.core.SymbolProvider;
2121
import software.amazon.smithy.model.Model;
2222
import software.amazon.smithy.typescript.codegen.TypeScriptSettings.ArtifactType;
23+
import software.amazon.smithy.utils.SmithyInternalApi;
2324

2425
/**
2526
* Plugin to trigger TypeScript code generation.
2627
*/
28+
@SmithyInternalApi
2729
public final class TypeScriptCodegenPlugin implements SmithyBuildPlugin {
2830

2931
@Override

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/TypeScriptDelegator.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@
2929
import software.amazon.smithy.model.Model;
3030
import software.amazon.smithy.model.shapes.Shape;
3131
import software.amazon.smithy.typescript.codegen.integration.TypeScriptIntegration;
32+
import software.amazon.smithy.utils.SmithyUnstableApi;
3233

34+
@SmithyUnstableApi
3335
final class TypeScriptDelegator {
3436

3537
private final TypeScriptSettings settings;

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/TypeScriptDependency.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,12 @@
2121
import software.amazon.smithy.codegen.core.Symbol;
2222
import software.amazon.smithy.codegen.core.SymbolDependency;
2323
import software.amazon.smithy.codegen.core.SymbolDependencyContainer;
24+
import software.amazon.smithy.utils.SmithyUnstableApi;
2425

2526
/**
2627
* An enum of all of the built-in dependencies managed by this package.
2728
*/
29+
@SmithyUnstableApi
2830
public enum TypeScriptDependency implements SymbolDependencyContainer {
2931

3032
AWS_SDK_CLIENT_DOCGEN("devDependencies", "@aws-sdk/client-documentation-generator", "3.6.1", true),

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/TypeScriptJmesPathVisitor.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@
3737
import software.amazon.smithy.jmespath.ast.ProjectionExpression;
3838
import software.amazon.smithy.jmespath.ast.SliceExpression;
3939
import software.amazon.smithy.jmespath.ast.Subexpression;
40+
import software.amazon.smithy.utils.SmithyInternalApi;
4041

42+
@SmithyInternalApi
4143
class TypeScriptJmesPathVisitor implements ExpressionVisitor<Void> {
4244

4345
// Execution context is the current "head" of the execution. This is scope on which the expression

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/TypeScriptServerCodegenPlugin.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,12 @@
1818
import software.amazon.smithy.build.PluginContext;
1919
import software.amazon.smithy.build.SmithyBuildPlugin;
2020
import software.amazon.smithy.typescript.codegen.TypeScriptSettings.ArtifactType;
21+
import software.amazon.smithy.utils.SmithyInternalApi;
2122

2223
/**
2324
* Plugin to trigger TypeScript SSDK code generation.
2425
*/
26+
@SmithyInternalApi
2527
public class TypeScriptServerCodegenPlugin implements SmithyBuildPlugin {
2628

2729
@Override

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/TypeScriptSettings.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,12 @@
3333
import software.amazon.smithy.model.shapes.ServiceShape;
3434
import software.amazon.smithy.model.shapes.Shape;
3535
import software.amazon.smithy.model.shapes.ShapeId;
36+
import software.amazon.smithy.utils.SmithyUnstableApi;
3637

3738
/**
3839
* Settings used by {@link TypeScriptCodegenPlugin}.
3940
*/
41+
@SmithyUnstableApi
4042
public final class TypeScriptSettings {
4143

4244
static final String TARGET_NAMESPACE = "targetNamespace";

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/TypeScriptUtils.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,13 @@
2222
import java.util.regex.Pattern;
2323
import java.util.stream.Collectors;
2424
import software.amazon.smithy.utils.IoUtils;
25+
import software.amazon.smithy.utils.SmithyInternalApi;
2526
import software.amazon.smithy.utils.StringUtils;
2627

2728
/**
2829
* Utility methods for TypeScript / JavaScript.
2930
*/
31+
@SmithyInternalApi
3032
final class TypeScriptUtils {
3133

3234
private static final Pattern PROPERTY_NAME_REGEX = Pattern.compile("^(?![0-9])[a-zA-Z0-9$_]+$");

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/TypeScriptWriter.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
import software.amazon.smithy.model.traits.DeprecatedTrait;
3737
import software.amazon.smithy.model.traits.DocumentationTrait;
3838
import software.amazon.smithy.utils.CodeWriter;
39+
import software.amazon.smithy.utils.SmithyUnstableApi;
3940
import software.amazon.smithy.utils.StringUtils;
4041

4142
/**
@@ -52,6 +53,7 @@
5253
* <p>Dependencies introduced via a TypeScriptWriter are added to the package.json
5354
* file if the writer is a part of the {@link TypeScriptDelegator} of the {@link CodegenVisitor}.
5455
*/
56+
@SmithyUnstableApi
5557
public final class TypeScriptWriter extends CodeWriter {
5658

5759
private static final Logger LOGGER = Logger.getLogger(TypeScriptWriter.class.getName());

0 commit comments

Comments
 (0)