Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@

import java.time.Instant;

/**
* Implementation of {@link AwsCredentialsIdentity}.
*/
record AwsCredentialsIdentityRecord(
String accessKeyId,
String secretAccessKey,
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
import software.amazon.smithy.java.core.serde.event.EventStreamingException;
import software.amazon.smithy.model.shapes.ShapeId;

/**
* A encoder for AWS events.
*/
final class AwsEventShapeEncoder implements EventEncoder<AwsEventFrame> {

private final InitialEventType initialEventType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
import software.amazon.smithy.java.core.serde.event.FrameDecoder;
import software.amazon.smithy.java.core.serde.event.FrameProcessor;

/**
* Decodes bytes into {@link AwsEventFrame}.
*/
public final class AwsFrameDecoder implements FrameDecoder<AwsEventFrame> {
private final MessageDecoder decoder = new MessageDecoder();
private final FrameProcessor<AwsEventFrame> frameProcessor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
import java.nio.ByteBuffer;
import software.amazon.smithy.java.core.serde.event.FrameEncoder;

/**
* Encodes a {@link AwsEventFrame} into bytes.
*/
public final class AwsFrameEncoder implements FrameEncoder<AwsEventFrame> {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import software.amazon.smithy.java.core.schema.SerializableStruct;
import software.amazon.smithy.java.core.serde.SpecificShapeSerializer;

class EventHeaderSerializer extends SpecificShapeSerializer {
final class EventHeaderSerializer extends SpecificShapeSerializer {
private final HeadersBuilder headers;

public EventHeaderSerializer(HeadersBuilder headers) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
import software.amazon.smithy.java.core.serde.document.Document;
import software.amazon.smithy.modelbundle.api.BundlePlugin;
import software.amazon.smithy.modelbundle.api.BundlePluginFactory;
import software.amazon.smithy.utils.SmithyUnstableApi;

@SmithyUnstableApi
public final class AwsServiceBundlePluginFactory implements BundlePluginFactory {
public AwsServiceBundlePluginFactory() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@
import software.amazon.smithy.modelbundle.api.ModelBundler;
import software.amazon.smithy.modelbundle.api.model.AdditionalInput;
import software.amazon.smithy.modelbundle.api.model.SmithyBundle;
import software.amazon.smithy.utils.SmithyUnstableApi;

@SmithyUnstableApi
public final class AwsServiceBundler extends ModelBundler {
private static final ShapeId ENDPOINT_TESTS = ShapeId.from("smithy.rules#endpointTests");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* <li>{@code :chunk-signature} - The binary signature for this frame</li>
* </ul>
*/
class SigV4EventSigner implements FrameProcessor<AwsEventFrame> {
final class SigV4EventSigner implements FrameProcessor<AwsEventFrame> {
private static final String ALGORITHM = "AWS4-HMAC-SHA256-PAYLOAD";
private static final String HMAC_SHA_256 = "HmacSHA256";
private static final String TERMINATOR = "aws4_request";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@

package software.amazon.smithy.java.aws.sdkv2.auth;

import java.util.Objects;
import software.amazon.awssdk.auth.credentials.AwsCredentialsProvider;
import software.amazon.awssdk.auth.credentials.AwsSessionCredentials;
import software.amazon.smithy.java.auth.api.identity.IdentityResult;
import software.amazon.smithy.java.aws.auth.api.identity.AwsCredentialsIdentity;
import software.amazon.smithy.java.aws.auth.api.identity.AwsCredentialsResolver;
import software.amazon.smithy.java.context.Context;

public class SdkCredentialsResolver implements AwsCredentialsResolver {
public final class SdkCredentialsResolver implements AwsCredentialsResolver {

/**
* The underlying SDK v2 credentials provider that will be used to resolve AWS credentials.
Expand All @@ -26,7 +27,7 @@ public class SdkCredentialsResolver implements AwsCredentialsResolver {
* Must not be null.
*/
public SdkCredentialsResolver(AwsCredentialsProvider sdkCredentialsProvider) {
this.sdkCredentialsProvider = sdkCredentialsProvider;
this.sdkCredentialsProvider = Objects.requireNonNull(sdkCredentialsProvider, "sdkCredentialsProvider");
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
package software.amazon.smithy.java.aws.sdkv2.retries;

import java.time.Duration;
import java.util.Objects;
import software.amazon.smithy.java.retries.api.AcquireInitialTokenRequest;
import software.amazon.smithy.java.retries.api.AcquireInitialTokenResponse;
import software.amazon.smithy.java.retries.api.RecordSuccessRequest;
Expand All @@ -21,12 +22,12 @@
/**
* A Smithy retry strategy that uses a retry strategy from the AWS SDK for Java V2.
*/
public class SdkRetryStrategy implements RetryStrategy {
public final class SdkRetryStrategy implements RetryStrategy {

private final software.amazon.awssdk.retries.api.RetryStrategy delegate;

private SdkRetryStrategy(software.amazon.awssdk.retries.api.RetryStrategy delegate) {
this.delegate = delegate;
this.delegate = Objects.requireNonNull(delegate, "delegate");
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@
import software.amazon.smithy.java.core.serde.document.Document;
import software.amazon.smithy.model.shapes.ShapeId;
import software.amazon.smithy.utils.SmithyInternalApi;
import software.amazon.smithy.utils.SmithyUnstableApi;

/**
* Contains implementations of the built-in Smithy to/from Java SDK document protocol implementations.
*/
@SmithyUnstableApi
public enum AwsJsonProtocols implements DocumentConverter {
/**
* Converts AWS SDK documents using "aws.protocols#awsJson1_0".
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
import java.util.Objects;
import software.amazon.smithy.java.core.serde.document.Document;
import software.amazon.smithy.model.shapes.ShapeId;
import software.amazon.smithy.utils.SmithyUnstableApi;

/**
* Provides protocol-specific conversions between Smithy documents and AWS SDK for Java V2 documents.
*/
@SmithyUnstableApi
public interface DocumentConverter {
/**
* Get a converter for the given protocol.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
import software.amazon.smithy.java.mcp.model.PromptInfo;
import software.amazon.smithy.java.mcp.model.ToolInfo;
import software.amazon.smithy.model.shapes.ShapeType;
import software.amazon.smithy.utils.SmithyUnstableApi;

@SmithyUnstableApi
public abstract class McpServerProxy {

private static final InternalLogger LOG = InternalLogger.getLogger(McpServerProxy.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@

package software.amazon.smithy.java.mcp.server;

import software.amazon.smithy.utils.SmithyUnstableApi;

@SmithyUnstableApi
public abstract sealed class ProtocolVersion implements Comparable<ProtocolVersion>
permits ProtocolVersion.UnknownVersion, ProtocolVersion.v2024_11_05, ProtocolVersion.v2025_03_26,
ProtocolVersion.v2025_06_18 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
import software.amazon.smithy.java.logging.InternalLogger;
import software.amazon.smithy.java.mcp.model.JsonRpcRequest;
import software.amazon.smithy.java.mcp.model.JsonRpcResponse;
import software.amazon.smithy.utils.SmithyUnstableApi;

@SmithyUnstableApi
public final class StdioProxy extends McpServerProxy {
private static final InternalLogger LOG = InternalLogger.getLogger(StdioProxy.class);
private static final JsonCodec JSON_CODEC = JsonCodec.builder().build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@

package software.amazon.smithy.java.mcp.server;

import software.amazon.smithy.utils.SmithyUnstableApi;

@SmithyUnstableApi
public interface ToolFilter {

boolean allowTool(String mcpServerName, String toolName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@

import software.amazon.smithy.java.client.core.Client;
import software.amazon.smithy.java.client.core.RequestOverrideConfig;
import software.amazon.smithy.utils.SmithyUnstableApi;

/**
* A BundlePlugin applies the settings specified in a {@link software.amazon.smithy.modelbundle.api.model.SmithyBundle}
* on a per-call basis.
*/
@SmithyUnstableApi
public interface BundlePlugin {
/**
* Applies the bundle-specific settings to a client call.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
import software.amazon.smithy.model.traits.StreamingTrait;
import software.amazon.smithy.modelbundle.api.model.ModelBundleVersion;
import software.amazon.smithy.modelbundle.api.model.SmithyBundle;
import software.amazon.smithy.utils.SmithyUnstableApi;

@SmithyUnstableApi
public final class ModelBundles {

private ModelBundles() {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
import java.util.HashMap;
import java.util.Map;
import software.amazon.smithy.java.core.serde.document.Document;
import software.amazon.smithy.utils.SmithyUnstableApi;

@SmithyUnstableApi
public final class PluginProviders {
private final Map<String, BundlePluginFactory> providers;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
import software.amazon.smithy.java.client.core.auth.scheme.AuthSchemeResolverParams;
import software.amazon.smithy.java.context.Context;
import software.amazon.smithy.model.shapes.ShapeId;
import software.amazon.smithy.utils.SmithyUnstableApi;

@SmithyUnstableApi
public final class StaticAuthSchemeResolver implements AuthSchemeResolver {
static final StaticAuthSchemeResolver INSTANCE = new StaticAuthSchemeResolver();
static final ShapeId CONFIGURED_AUTH = ShapeId.from("modelbundle#configuredAuth");
Expand Down