-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
18f4459
commit e862afd
Showing
4 changed files
with
1,129 additions
and
0 deletions.
There are no files selected for viewing
44 changes: 44 additions & 0 deletions
44
TestVectors/runtimes/net/Generated/DDBEncryption/DynamoDbEncryptionShim.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// Do not modify this file. This file is machine generated, and any changes to it will be overwritten. | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; namespace AWS.Cryptography.DbEncryptionSDK.DynamoDb.Wrapped { | ||
public class DynamoDbEncryptionShim : software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.IDynamoDbEncryptionClient { | ||
public AWS.Cryptography.DbEncryptionSDK.DynamoDb.DynamoDbEncryption _impl; | ||
public DynamoDbEncryptionShim(AWS.Cryptography.DbEncryptionSDK.DynamoDb.DynamoDbEncryption impl) { | ||
this._impl = impl; | ||
} | ||
public Wrappers_Compile._IResult<software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types._ICreateDynamoDbEncryptionBranchKeyIdSupplierOutput, software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types._IError> CreateDynamoDbEncryptionBranchKeyIdSupplier(software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types._ICreateDynamoDbEncryptionBranchKeyIdSupplierInput request) { | ||
AWS.Cryptography.DbEncryptionSDK.DynamoDb.CreateDynamoDbEncryptionBranchKeyIdSupplierInput unWrappedRequest = TypeConversion.FromDafny_N3_aws__N12_cryptography__N15_dbEncryptionSdk__N8_dynamoDb__S48_CreateDynamoDbEncryptionBranchKeyIdSupplierInput(request); try { | ||
AWS.Cryptography.DbEncryptionSDK.DynamoDb.CreateDynamoDbEncryptionBranchKeyIdSupplierOutput wrappedResponse = | ||
this._impl.CreateDynamoDbEncryptionBranchKeyIdSupplier(unWrappedRequest); | ||
return Wrappers_Compile.Result<software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types._ICreateDynamoDbEncryptionBranchKeyIdSupplierOutput, software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types._IError>.create_Success(TypeConversion.ToDafny_N3_aws__N12_cryptography__N15_dbEncryptionSdk__N8_dynamoDb__S49_CreateDynamoDbEncryptionBranchKeyIdSupplierOutput(wrappedResponse)); | ||
} catch (System.Exception ex) { | ||
return Wrappers_Compile.Result<software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types._ICreateDynamoDbEncryptionBranchKeyIdSupplierOutput, software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types._IError>.create_Failure(this.ConvertError(ex)); | ||
} | ||
|
||
} | ||
private software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types._IError ConvertError(System.Exception error) { | ||
|
||
switch (error) { | ||
case AWS.Cryptography.DbEncryptionSDK.DynamoDb.DynamoDbEncryptionException e: | ||
return TypeConversion.ToDafny_N3_aws__N12_cryptography__N15_dbEncryptionSdk__N8_dynamoDb__S27_DynamoDbEncryptionException(e); | ||
|
||
case CollectionOfErrors collectionOfErrors: | ||
return new software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.Error_CollectionOfErrors( | ||
Dafny.Sequence<software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types._IError> | ||
.FromArray( | ||
collectionOfErrors.list.Select | ||
(x => TypeConversion.ToDafny_CommonError(x)) | ||
.ToArray()), | ||
Dafny.Sequence<char>.FromString(collectionOfErrors.Message) | ||
); | ||
default: | ||
return new software.amazon.cryptography.dbencryptionsdk.dynamodb.internaldafny.types.Error_Opaque(error); | ||
|
||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.