Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: scrub public APIs #892

Merged
merged 5 commits into from
Jul 18, 2023
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
8 changes: 8 additions & 0 deletions .changes/4e8e536e-a39c-41a8-acfb-3877528a3837.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"id": "4e8e536e-a39c-41a8-acfb-3877528a3837",
"type": "misc",
"description": "Remove or lower visibility on several internal-only APIs",
"issues": [
"awslabs/aws-sdk-kotlin#947"
]
}
13 changes: 0 additions & 13 deletions runtime/auth/aws-signing-common/api/aws-signing-common.api
Original file line number Diff line number Diff line change
Expand Up @@ -97,19 +97,6 @@ public final class aws/smithy/kotlin/runtime/auth/awssigning/AwsSigningConfig$Co
public final fun invoke (Lkotlin/jvm/functions/Function1;)Laws/smithy/kotlin/runtime/auth/awssigning/AwsSigningConfig;
}

public final class aws/smithy/kotlin/runtime/auth/awssigning/AwsSigningResult {
public fun <init> (Ljava/lang/Object;[B)V
public final fun component1 ()Ljava/lang/Object;
public final fun component2 ()[B
public final fun copy (Ljava/lang/Object;[B)Laws/smithy/kotlin/runtime/auth/awssigning/AwsSigningResult;
public static synthetic fun copy$default (Laws/smithy/kotlin/runtime/auth/awssigning/AwsSigningResult;Ljava/lang/Object;[BILjava/lang/Object;)Laws/smithy/kotlin/runtime/auth/awssigning/AwsSigningResult;
public fun equals (Ljava/lang/Object;)Z
public final fun getOutput ()Ljava/lang/Object;
public final fun getSignature ()[B
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

public abstract class aws/smithy/kotlin/runtime/auth/awssigning/HashSpecification {
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@
*/
package aws.smithy.kotlin.runtime.auth.awssigning

import aws.smithy.kotlin.runtime.InternalApi

/**
* The result of an AWS signing operation
* @param T The type of the result
*/
@InternalApi
public data class AwsSigningResult<T>(
/**
* The signed output.
Expand Down
28 changes: 0 additions & 28 deletions runtime/auth/http-auth-aws/api/http-auth-aws.api
Original file line number Diff line number Diff line change
@@ -1,31 +1,3 @@
public final class aws/smithy/kotlin/runtime/http/auth/AwsHttpSigner$Companion {
public final fun invoke (Lkotlin/jvm/functions/Function1;)Laws/smithy/kotlin/runtime/http/auth/AwsHttpSigner;
}

public final class aws/smithy/kotlin/runtime/http/auth/AwsHttpSigner$Config {
public fun <init> ()V
public final fun getAlgorithm ()Laws/smithy/kotlin/runtime/auth/awssigning/AwsSigningAlgorithm;
public final fun getExpiresAfter-FghU774 ()Lkotlin/time/Duration;
public final fun getNormalizeUriPath ()Z
public final fun getOmitSessionToken ()Z
public final fun getService ()Ljava/lang/String;
public final fun getSignatureType ()Laws/smithy/kotlin/runtime/auth/awssigning/AwsSignatureType;
public final fun getSignedBodyHeader ()Laws/smithy/kotlin/runtime/auth/awssigning/AwsSignedBodyHeader;
public final fun getSigner ()Laws/smithy/kotlin/runtime/auth/awssigning/AwsSigner;
public final fun getUseDoubleUriEncode ()Z
public final fun isUnsignedPayload ()Z
public final fun setAlgorithm (Laws/smithy/kotlin/runtime/auth/awssigning/AwsSigningAlgorithm;)V
public final fun setExpiresAfter-BwNAW2A (Lkotlin/time/Duration;)V
public final fun setNormalizeUriPath (Z)V
public final fun setOmitSessionToken (Z)V
public final fun setService (Ljava/lang/String;)V
public final fun setSignatureType (Laws/smithy/kotlin/runtime/auth/awssigning/AwsSignatureType;)V
public final fun setSignedBodyHeader (Laws/smithy/kotlin/runtime/auth/awssigning/AwsSignedBodyHeader;)V
public final fun setSigner (Laws/smithy/kotlin/runtime/auth/awssigning/AwsSigner;)V
public final fun setUnsignedPayload (Z)V
public final fun setUseDoubleUriEncode (Z)V
}

public final class aws/smithy/kotlin/runtime/http/auth/SigV4AuthSchemeKt {
}

Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import kotlin.time.Duration
*/
@InternalApi
public class AwsHttpSigner(private val config: Config) : HttpSigner {
@InternalApi
public companion object {
public inline operator fun invoke(block: Config.() -> Unit): AwsHttpSigner {
val config = Config().apply(block)
Expand All @@ -31,6 +32,7 @@ public class AwsHttpSigner(private val config: Config) : HttpSigner {
}
}

@InternalApi
public class Config {
/**
* The signer implementation to use for signing
Expand Down
177 changes: 0 additions & 177 deletions runtime/protocol/aws-event-stream/api/aws-event-stream.api
Original file line number Diff line number Diff line change
Expand Up @@ -12,189 +12,12 @@ public final class aws/smithy/kotlin/runtime/awsprotocol/eventstream/FrameDecode
public final class aws/smithy/kotlin/runtime/awsprotocol/eventstream/FrameEncoderKt {
}

public final class aws/smithy/kotlin/runtime/awsprotocol/eventstream/Header$Companion {
public final fun decode (Laws/smithy/kotlin/runtime/io/SdkBufferedSource;)Laws/smithy/kotlin/runtime/awsprotocol/eventstream/Header;
}

public final class aws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue$Bool : aws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue {
public fun <init> (Z)V
public final fun component1 ()Z
public final fun copy (Z)Laws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue$Bool;
public static synthetic fun copy$default (Laws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue$Bool;ZILjava/lang/Object;)Laws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue$Bool;
public fun equals (Ljava/lang/Object;)Z
public final fun getValue ()Z
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

public final class aws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue$Byte : aws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue {
public synthetic fun <init> (BLkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1-w2LRezQ ()B
public final fun copy-7apg3OU (B)Laws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue$Byte;
public static synthetic fun copy-7apg3OU$default (Laws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue$Byte;BILjava/lang/Object;)Laws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue$Byte;
public fun equals (Ljava/lang/Object;)Z
public final fun getValue-w2LRezQ ()B
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

public final class aws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue$ByteArray : aws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue {
public fun <init> ([B)V
public final fun component1 ()[B
public final fun copy ([B)Laws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue$ByteArray;
public static synthetic fun copy$default (Laws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue$ByteArray;[BILjava/lang/Object;)Laws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue$ByteArray;
public fun equals (Ljava/lang/Object;)Z
public final fun getValue ()[B
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

public final class aws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue$Companion {
public final fun decode (Laws/smithy/kotlin/runtime/io/SdkBufferedSource;)Laws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue;
}

public final class aws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue$Int16 : aws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue {
public fun <init> (S)V
public final fun component1 ()S
public final fun copy (S)Laws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue$Int16;
public static synthetic fun copy$default (Laws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue$Int16;SILjava/lang/Object;)Laws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue$Int16;
public fun equals (Ljava/lang/Object;)Z
public final fun getValue ()S
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

public final class aws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue$Int32 : aws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue {
public fun <init> (I)V
public final fun component1 ()I
public final fun copy (I)Laws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue$Int32;
public static synthetic fun copy$default (Laws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue$Int32;IILjava/lang/Object;)Laws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue$Int32;
public fun equals (Ljava/lang/Object;)Z
public final fun getValue ()I
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

public final class aws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue$Int64 : aws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue {
public fun <init> (J)V
public final fun component1 ()J
public final fun copy (J)Laws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue$Int64;
public static synthetic fun copy$default (Laws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue$Int64;JILjava/lang/Object;)Laws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue$Int64;
public fun equals (Ljava/lang/Object;)Z
public final fun getValue ()J
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

public final class aws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue$String : aws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue {
public fun <init> (Ljava/lang/String;)V
public final fun component1 ()Ljava/lang/String;
public final fun copy (Ljava/lang/String;)Laws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue$String;
public static synthetic fun copy$default (Laws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue$String;Ljava/lang/String;ILjava/lang/Object;)Laws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue$String;
public fun equals (Ljava/lang/Object;)Z
public final fun getValue ()Ljava/lang/String;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

public final class aws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue$Timestamp : aws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue {
public fun <init> (Laws/smithy/kotlin/runtime/time/Instant;)V
public final fun component1 ()Laws/smithy/kotlin/runtime/time/Instant;
public final fun copy (Laws/smithy/kotlin/runtime/time/Instant;)Laws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue$Timestamp;
public static synthetic fun copy$default (Laws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue$Timestamp;Laws/smithy/kotlin/runtime/time/Instant;ILjava/lang/Object;)Laws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue$Timestamp;
public fun equals (Ljava/lang/Object;)Z
public final fun getValue ()Laws/smithy/kotlin/runtime/time/Instant;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

public final class aws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue$Uuid : aws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue {
public fun <init> (Laws/smithy/kotlin/runtime/util/Uuid;)V
public final fun component1 ()Laws/smithy/kotlin/runtime/util/Uuid;
public final fun copy (Laws/smithy/kotlin/runtime/util/Uuid;)Laws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue$Uuid;
public static synthetic fun copy$default (Laws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue$Uuid;Laws/smithy/kotlin/runtime/util/Uuid;ILjava/lang/Object;)Laws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue$Uuid;
public fun equals (Ljava/lang/Object;)Z
public final fun getValue ()Laws/smithy/kotlin/runtime/util/Uuid;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

public final class aws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValueKt {
public static final fun expectBool (Laws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue;)Z
public static final fun expectByte (Laws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue;)B
public static final fun expectByteArray (Laws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue;)[B
public static final fun expectInt16 (Laws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue;)S
public static final fun expectInt32 (Laws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue;)I
public static final fun expectInt64 (Laws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue;)J
public static final fun expectString (Laws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue;)Ljava/lang/String;
public static final fun expectTimestamp (Laws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue;)Laws/smithy/kotlin/runtime/time/Instant;
public static final fun expectUuid (Laws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValue;)Laws/smithy/kotlin/runtime/util/Uuid;
}

public final class aws/smithy/kotlin/runtime/awsprotocol/eventstream/Message$Companion {
public final fun decode (Laws/smithy/kotlin/runtime/io/SdkBufferedSource;)Laws/smithy/kotlin/runtime/awsprotocol/eventstream/Message;
}

public final class aws/smithy/kotlin/runtime/awsprotocol/eventstream/MessageKt {
}

public final class aws/smithy/kotlin/runtime/awsprotocol/eventstream/MessageType$Error : aws/smithy/kotlin/runtime/awsprotocol/eventstream/MessageType {
public fun <init> (Ljava/lang/String;Ljava/lang/String;)V
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Ljava/lang/String;
public final fun component2 ()Ljava/lang/String;
public final fun copy (Ljava/lang/String;Ljava/lang/String;)Laws/smithy/kotlin/runtime/awsprotocol/eventstream/MessageType$Error;
public static synthetic fun copy$default (Laws/smithy/kotlin/runtime/awsprotocol/eventstream/MessageType$Error;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Laws/smithy/kotlin/runtime/awsprotocol/eventstream/MessageType$Error;
public fun equals (Ljava/lang/Object;)Z
public final fun getErrorCode ()Ljava/lang/String;
public final fun getMessage ()Ljava/lang/String;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

public final class aws/smithy/kotlin/runtime/awsprotocol/eventstream/MessageType$Event : aws/smithy/kotlin/runtime/awsprotocol/eventstream/MessageType {
public fun <init> (Ljava/lang/String;Ljava/lang/String;)V
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Ljava/lang/String;
public final fun component2 ()Ljava/lang/String;
public final fun copy (Ljava/lang/String;Ljava/lang/String;)Laws/smithy/kotlin/runtime/awsprotocol/eventstream/MessageType$Event;
public static synthetic fun copy$default (Laws/smithy/kotlin/runtime/awsprotocol/eventstream/MessageType$Event;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Laws/smithy/kotlin/runtime/awsprotocol/eventstream/MessageType$Event;
public fun equals (Ljava/lang/Object;)Z
public final fun getContentType ()Ljava/lang/String;
public final fun getShapeType ()Ljava/lang/String;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

public final class aws/smithy/kotlin/runtime/awsprotocol/eventstream/MessageType$Exception : aws/smithy/kotlin/runtime/awsprotocol/eventstream/MessageType {
public fun <init> (Ljava/lang/String;Ljava/lang/String;)V
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Ljava/lang/String;
public final fun component2 ()Ljava/lang/String;
public final fun copy (Ljava/lang/String;Ljava/lang/String;)Laws/smithy/kotlin/runtime/awsprotocol/eventstream/MessageType$Exception;
public static synthetic fun copy$default (Laws/smithy/kotlin/runtime/awsprotocol/eventstream/MessageType$Exception;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Laws/smithy/kotlin/runtime/awsprotocol/eventstream/MessageType$Exception;
public fun equals (Ljava/lang/Object;)Z
public final fun getContentType ()Ljava/lang/String;
public final fun getShapeType ()Ljava/lang/String;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

public final class aws/smithy/kotlin/runtime/awsprotocol/eventstream/MessageType$SdkUnknown : aws/smithy/kotlin/runtime/awsprotocol/eventstream/MessageType {
public fun <init> (Ljava/lang/String;)V
public final fun component1 ()Ljava/lang/String;
public final fun copy (Ljava/lang/String;)Laws/smithy/kotlin/runtime/awsprotocol/eventstream/MessageType$SdkUnknown;
public static synthetic fun copy$default (Laws/smithy/kotlin/runtime/awsprotocol/eventstream/MessageType$SdkUnknown;Ljava/lang/String;ILjava/lang/Object;)Laws/smithy/kotlin/runtime/awsprotocol/eventstream/MessageType$SdkUnknown;
public fun equals (Ljava/lang/Object;)Z
public final fun getMessageType ()Ljava/lang/String;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

public final class aws/smithy/kotlin/runtime/awsprotocol/eventstream/Prelude$Companion {
public final fun decode (Laws/smithy/kotlin/runtime/io/SdkBufferedSource;)Laws/smithy/kotlin/runtime/awsprotocol/eventstream/Prelude;
}

public final class aws/smithy/kotlin/runtime/awsprotocol/eventstream/ResponseHeadersKt {
}

Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ private const val MAX_HEADER_NAME_LEN = 255
*/
@InternalApi
public data class Header(val name: String, val value: HeaderValue) {
@InternalApi
public companion object {
/**
* Read an encoded header from the [source]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,22 @@ internal enum class HeaderType(val value: Byte) {
*/
@InternalApi
public sealed class HeaderValue {
@InternalApi
public data class Bool(val value: Boolean) : HeaderValue()

@InternalApi
public data class Byte(val value: UByte) : HeaderValue()

@InternalApi
public data class Int16(val value: Short) : HeaderValue()

@InternalApi
public data class Int32(val value: Int) : HeaderValue()

@InternalApi
public data class Int64(val value: Long) : HeaderValue()

@InternalApi
public data class ByteArray(val value: kotlin.ByteArray) : HeaderValue() {
override fun equals(other: Any?): Boolean {
if (this === other) return true
Expand All @@ -60,8 +70,13 @@ public sealed class HeaderValue {
override fun hashCode(): Int = value.contentHashCode()
}

@InternalApi
public data class String(val value: kotlin.String) : HeaderValue()

@InternalApi
public data class Timestamp(val value: Instant) : HeaderValue()

@InternalApi
public data class Uuid(val value: aws.smithy.kotlin.runtime.util.Uuid) : HeaderValue()

/**
Expand Down Expand Up @@ -112,6 +127,7 @@ public sealed class HeaderValue {
}
}

@InternalApi
public companion object {
public fun decode(source: SdkBufferedSource): HeaderValue {
val type = source.readByte().let { HeaderType.fromTypeId(it) }
Expand Down Expand Up @@ -148,12 +164,29 @@ public sealed class HeaderValue {

private fun SdkBufferedSink.writeHeader(headerType: HeaderType) = writeByte(headerType.value)

@InternalApi
public fun HeaderValue.expectBool(): Boolean = checkNotNull((this as? HeaderValue.Bool)?.value) { "expected HeaderValue.Bool, found: $this" }

@InternalApi
public fun HeaderValue.expectByte(): Byte = checkNotNull((this as? HeaderValue.Byte)?.value?.toByte()) { "expected HeaderValue.Byte, found: $this" }

@InternalApi
public fun HeaderValue.expectInt16(): Short = checkNotNull((this as? HeaderValue.Int16)?.value) { "expected HeaderValue.Int16, found: $this" }

@InternalApi
public fun HeaderValue.expectInt32(): Int = checkNotNull((this as? HeaderValue.Int32)?.value) { "expected HeaderValue.Int32, found: $this" }

@InternalApi
public fun HeaderValue.expectInt64(): Long = checkNotNull((this as? HeaderValue.Int64)?.value) { "expected HeaderValue.Int64, found: $this" }

@InternalApi
public fun HeaderValue.expectString(): String = checkNotNull((this as? HeaderValue.String)?.value) { "expected HeaderValue.String, found: $this" }

@InternalApi
public fun HeaderValue.expectByteArray(): ByteArray = checkNotNull((this as? HeaderValue.ByteArray)?.value) { "expected HeaderValue.ByteArray, found: $this" }

@InternalApi
public fun HeaderValue.expectTimestamp(): Instant = checkNotNull((this as? HeaderValue.Timestamp)?.value) { "expected HeaderValue.Bool, found: $this" }

@InternalApi
public fun HeaderValue.expectUuid(): Uuid = checkNotNull((this as? HeaderValue.Uuid)?.value) { "expected HeaderValue.Bool, found: $this" }
Loading
Loading