Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

Commit

Permalink
chore: Account for smithy dafny conversion library renaming (#5)
Browse files Browse the repository at this point in the history
Account for smithy dafny conversion library renaming

In *.kts files: software.amazon.dafny:conversion -> software.amazon.smithy.dafny:conversion

In *.java files: software.amazon.dafny.conversion -> software.amazon.smithy.dafny.conversion
  • Loading branch information
robin-aws authored May 17, 2023
1 parent 60c4f11 commit 5e1cfdc
Show file tree
Hide file tree
Showing 26 changed files with 1,547 additions and 1,547 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ repositories {

dependencies {
implementation("org.dafny:DafnyRuntime:4.1.0")
implementation("software.amazon.dafny:conversion:1.0-SNAPSHOT")
implementation("software.amazon.smithy.dafny:conversion:1.0-SNAPSHOT")
implementation("software.amazon.cryptography:StandardLibrary:1.0-SNAPSHOT")
implementation("software.amazon.cryptography:AwsCryptographyPrimitives:1.0-SNAPSHOT")
implementation("software.amazon.cryptography:ComAmazonawsKms:1.0-SNAPSHOT")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public static Error Error(OpaqueError nativeValue) {
}

public static Error Error(CollectionOfErrors nativeValue) {
DafnySequence<? extends Error> list = software.amazon.dafny.conversion.ToDafny.Aggregate.GenericToSequence(
DafnySequence<? extends Error> list = software.amazon.smithy.dafny.conversion.ToDafny.Aggregate.GenericToSequence(
nativeValue.list(),
ToDafny::Error,
Error._typeDescriptor());
Expand All @@ -65,14 +65,14 @@ public static Error Error(CollectionOfErrors nativeValue) {
public static BranchKeyStatusResolutionInput BranchKeyStatusResolutionInput(
software.amazon.cryptography.keystore.model.BranchKeyStatusResolutionInput nativeValue) {
DafnySequence<? extends Character> branchKeyIdentifier;
branchKeyIdentifier = software.amazon.dafny.conversion.ToDafny.Simple.CharacterSequence(nativeValue.branchKeyIdentifier());
branchKeyIdentifier = software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence(nativeValue.branchKeyIdentifier());
return new BranchKeyStatusResolutionInput(branchKeyIdentifier);
}

public static CreateKeyOutput CreateKeyOutput(
software.amazon.cryptography.keystore.model.CreateKeyOutput nativeValue) {
DafnySequence<? extends Character> branchKeyIdentifier;
branchKeyIdentifier = software.amazon.dafny.conversion.ToDafny.Simple.CharacterSequence(nativeValue.branchKeyIdentifier());
branchKeyIdentifier = software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence(nativeValue.branchKeyIdentifier());
return new CreateKeyOutput(branchKeyIdentifier);
}

Expand All @@ -84,68 +84,68 @@ public static CreateKeyStoreInput CreateKeyStoreInput(
public static CreateKeyStoreOutput CreateKeyStoreOutput(
software.amazon.cryptography.keystore.model.CreateKeyStoreOutput nativeValue) {
DafnySequence<? extends Character> tableArn;
tableArn = software.amazon.dafny.conversion.ToDafny.Simple.CharacterSequence(nativeValue.tableArn());
tableArn = software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence(nativeValue.tableArn());
return new CreateKeyStoreOutput(tableArn);
}

public static GetActiveBranchKeyInput GetActiveBranchKeyInput(
software.amazon.cryptography.keystore.model.GetActiveBranchKeyInput nativeValue) {
DafnySequence<? extends Character> branchKeyIdentifier;
branchKeyIdentifier = software.amazon.dafny.conversion.ToDafny.Simple.CharacterSequence(nativeValue.branchKeyIdentifier());
branchKeyIdentifier = software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence(nativeValue.branchKeyIdentifier());
return new GetActiveBranchKeyInput(branchKeyIdentifier);
}

public static GetActiveBranchKeyOutput GetActiveBranchKeyOutput(
software.amazon.cryptography.keystore.model.GetActiveBranchKeyOutput nativeValue) {
DafnySequence<? extends Byte> branchKeyVersion;
branchKeyVersion = software.amazon.dafny.conversion.ToDafny.Simple.DafnyUtf8Bytes(nativeValue.branchKeyVersion());
branchKeyVersion = software.amazon.smithy.dafny.conversion.ToDafny.Simple.DafnyUtf8Bytes(nativeValue.branchKeyVersion());
DafnySequence<? extends Byte> branchKey;
branchKey = software.amazon.dafny.conversion.ToDafny.Simple.ByteSequence(nativeValue.branchKey());
branchKey = software.amazon.smithy.dafny.conversion.ToDafny.Simple.ByteSequence(nativeValue.branchKey());
return new GetActiveBranchKeyOutput(branchKeyVersion, branchKey);
}

public static GetBeaconKeyInput GetBeaconKeyInput(
software.amazon.cryptography.keystore.model.GetBeaconKeyInput nativeValue) {
DafnySequence<? extends Character> branchKeyIdentifier;
branchKeyIdentifier = software.amazon.dafny.conversion.ToDafny.Simple.CharacterSequence(nativeValue.branchKeyIdentifier());
branchKeyIdentifier = software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence(nativeValue.branchKeyIdentifier());
return new GetBeaconKeyInput(branchKeyIdentifier);
}

public static GetBeaconKeyOutput GetBeaconKeyOutput(
software.amazon.cryptography.keystore.model.GetBeaconKeyOutput nativeValue) {
DafnySequence<? extends Character> beaconKeyIdentifier;
beaconKeyIdentifier = software.amazon.dafny.conversion.ToDafny.Simple.CharacterSequence(nativeValue.beaconKeyIdentifier());
beaconKeyIdentifier = software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence(nativeValue.beaconKeyIdentifier());
DafnySequence<? extends Byte> beaconKey;
beaconKey = software.amazon.dafny.conversion.ToDafny.Simple.ByteSequence(nativeValue.beaconKey());
beaconKey = software.amazon.smithy.dafny.conversion.ToDafny.Simple.ByteSequence(nativeValue.beaconKey());
return new GetBeaconKeyOutput(beaconKeyIdentifier, beaconKey);
}

public static GetBranchKeyVersionInput GetBranchKeyVersionInput(
software.amazon.cryptography.keystore.model.GetBranchKeyVersionInput nativeValue) {
DafnySequence<? extends Character> branchKeyIdentifier;
branchKeyIdentifier = software.amazon.dafny.conversion.ToDafny.Simple.CharacterSequence(nativeValue.branchKeyIdentifier());
branchKeyIdentifier = software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence(nativeValue.branchKeyIdentifier());
DafnySequence<? extends Character> branchKeyVersion;
branchKeyVersion = software.amazon.dafny.conversion.ToDafny.Simple.CharacterSequence(nativeValue.branchKeyVersion());
branchKeyVersion = software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence(nativeValue.branchKeyVersion());
return new GetBranchKeyVersionInput(branchKeyIdentifier, branchKeyVersion);
}

public static GetBranchKeyVersionOutput GetBranchKeyVersionOutput(
software.amazon.cryptography.keystore.model.GetBranchKeyVersionOutput nativeValue) {
DafnySequence<? extends Byte> branchKeyVersion;
branchKeyVersion = software.amazon.dafny.conversion.ToDafny.Simple.DafnyUtf8Bytes(nativeValue.branchKeyVersion());
branchKeyVersion = software.amazon.smithy.dafny.conversion.ToDafny.Simple.DafnyUtf8Bytes(nativeValue.branchKeyVersion());
DafnySequence<? extends Byte> branchKey;
branchKey = software.amazon.dafny.conversion.ToDafny.Simple.ByteSequence(nativeValue.branchKey());
branchKey = software.amazon.smithy.dafny.conversion.ToDafny.Simple.ByteSequence(nativeValue.branchKey());
return new GetBranchKeyVersionOutput(branchKeyVersion, branchKey);
}

public static GetKeyStoreInfoOutput GetKeyStoreInfoOutput(
software.amazon.cryptography.keystore.model.GetKeyStoreInfoOutput nativeValue) {
DafnySequence<? extends Character> keyStoreId;
keyStoreId = software.amazon.dafny.conversion.ToDafny.Simple.CharacterSequence(nativeValue.keyStoreId());
keyStoreId = software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence(nativeValue.keyStoreId());
DafnySequence<? extends Character> keyStoreName;
keyStoreName = software.amazon.dafny.conversion.ToDafny.Simple.CharacterSequence(nativeValue.keyStoreName());
keyStoreName = software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence(nativeValue.keyStoreName());
DafnySequence<? extends Character> logicalKeyStoreName;
logicalKeyStoreName = software.amazon.dafny.conversion.ToDafny.Simple.CharacterSequence(nativeValue.logicalKeyStoreName());
logicalKeyStoreName = software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence(nativeValue.logicalKeyStoreName());
DafnySequence<? extends DafnySequence<? extends Character>> grantTokens;
grantTokens = ToDafny.GrantTokenList(nativeValue.grantTokens());
KMSConfiguration kmsConfiguration;
Expand All @@ -156,14 +156,14 @@ public static GetKeyStoreInfoOutput GetKeyStoreInfoOutput(
public static KeyStoreConfig KeyStoreConfig(
software.amazon.cryptography.keystore.model.KeyStoreConfig nativeValue) {
DafnySequence<? extends Character> ddbTableName;
ddbTableName = software.amazon.dafny.conversion.ToDafny.Simple.CharacterSequence(nativeValue.ddbTableName());
ddbTableName = software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence(nativeValue.ddbTableName());
KMSConfiguration kmsConfiguration;
kmsConfiguration = ToDafny.KMSConfiguration(nativeValue.kmsConfiguration());
DafnySequence<? extends Character> logicalKeyStoreName;
logicalKeyStoreName = software.amazon.dafny.conversion.ToDafny.Simple.CharacterSequence(nativeValue.logicalKeyStoreName());
logicalKeyStoreName = software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence(nativeValue.logicalKeyStoreName());
Option<DafnySequence<? extends Character>> id;
id = Objects.nonNull(nativeValue.id()) ?
Option.create_Some(software.amazon.dafny.conversion.ToDafny.Simple.CharacterSequence(nativeValue.id()))
Option.create_Some(software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence(nativeValue.id()))
: Option.create_None();
Option<DafnySequence<? extends DafnySequence<? extends Character>>> grantTokens;
grantTokens = (Objects.nonNull(nativeValue.grantTokens()) && nativeValue.grantTokens().size() > 0) ?
Expand All @@ -183,29 +183,29 @@ public static KeyStoreConfig KeyStoreConfig(
public static VersionKeyInput VersionKeyInput(
software.amazon.cryptography.keystore.model.VersionKeyInput nativeValue) {
DafnySequence<? extends Character> branchKeyIdentifier;
branchKeyIdentifier = software.amazon.dafny.conversion.ToDafny.Simple.CharacterSequence(nativeValue.branchKeyIdentifier());
branchKeyIdentifier = software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence(nativeValue.branchKeyIdentifier());
return new VersionKeyInput(branchKeyIdentifier);
}

public static Error Error(KeyStoreException nativeValue) {
DafnySequence<? extends Character> message;
message = software.amazon.dafny.conversion.ToDafny.Simple.CharacterSequence(nativeValue.message());
message = software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence(nativeValue.message());
return new Error_KeyStoreException(message);
}

public static KMSConfiguration KMSConfiguration(
software.amazon.cryptography.keystore.model.KMSConfiguration nativeValue) {
if (Objects.nonNull(nativeValue.kmsKeyArn())) {
return KMSConfiguration.create(software.amazon.dafny.conversion.ToDafny.Simple.CharacterSequence(nativeValue.kmsKeyArn()));
return KMSConfiguration.create(software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence(nativeValue.kmsKeyArn()));
}
throw new IllegalArgumentException("Cannot convert " + nativeValue + " to software.amazon.cryptography.keystore.internaldafny.types.KMSConfiguration.");
}

public static DafnySequence<? extends DafnySequence<? extends Character>> GrantTokenList(
List<String> nativeValue) {
return software.amazon.dafny.conversion.ToDafny.Aggregate.GenericToSequence(
return software.amazon.smithy.dafny.conversion.ToDafny.Aggregate.GenericToSequence(
nativeValue,
software.amazon.dafny.conversion.ToDafny.Simple::CharacterSequence,
software.amazon.smithy.dafny.conversion.ToDafny.Simple::CharacterSequence,
DafnySequence._typeDescriptor(TypeDescriptor.CHAR));
}

Expand Down
Loading

0 comments on commit 5e1cfdc

Please sign in to comment.