1
1
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
2
2
// SPDX-License-Identifier: Apache-2.0
3
3
// Do not modify this file. This file is machine generated, and any changes to it will be overwritten.
4
- include ".. / .. / private - aws - encryption - sdk - dafny - staging / StandardLibrary/ src/ Index. dfy"
5
- include ".. / .. / StructuredEncryption / src/ Index. dfy"
6
- include ".. / .. / private - aws - encryption - sdk - dafny - staging / AwsCryptographicMaterialProviders/ src/ Index. dfy"
7
- include ".. / .. / private - aws - encryption - sdk - dafny - staging / AwsCryptographyPrimitives/ src/ Index. dfy"
8
- include ".. / .. / private - aws - encryption - sdk - dafny - staging / ComAmazonawsDynamodb/ src/ Index. dfy"
9
- module {:extern "Dafny. Aws. Cryptography. DynamoDbItemEncryptor . Types" } AwsCryptographyDynamoDbItemEncryptorTypes
4
+ include ".. / .. / submodules / MaterialProviders / StandardLibrary/ src/ Index. dfy"
5
+ include ".. / src/ Index. dfy"
6
+ include ".. / .. / submodules / MaterialProviders / AwsCryptographicMaterialProviders/ src/ Index. dfy"
7
+ include ".. / .. / submodules / MaterialProviders / AwsCryptographyPrimitives/ src/ Index. dfy"
8
+ include ".. / .. / submodules / MaterialProviders / ComAmazonawsDynamodb/ src/ Index. dfy"
9
+ module {:extern "Dafny. Aws. Cryptography. DynamoDbEncryption . ItemEncryptor . Types" } AwsCryptographyDynamoDbEncryptionItemEncryptorTypes
10
10
{
11
11
import opened Wrappers
12
12
import opened StandardLibrary. UInt
13
13
import opened UTF8
14
- import AwsCryptographyStructuredEncryptionTypes
14
+ import AwsCryptographyDynamoDbEncryptionTypes
15
15
import AwsCryptographyMaterialProvidersTypes
16
16
import AwsCryptographyPrimitivesTypes
17
17
import ComAmazonawsDynamodbTypes
@@ -20,7 +20,6 @@ include "../../private-aws-encryption-sdk-dafny-staging/StandardLibrary/src/Inde
20
20
21
21
// Begin Generated Types
22
22
23
- type AttributeActions = map < ComAmazonawsDynamodbTypes. AttributeName, AwsCryptographyStructuredEncryptionTypes. CryptoAction>
24
23
datatype DecryptItemInput = | DecryptItemInput (
25
24
nameonly encryptedItem: ComAmazonawsDynamodbTypes .AttributeMap
26
25
)
@@ -97,72 +96,27 @@ include "../../private-aws-encryption-sdk-dafny-staging/StandardLibrary/src/Inde
97
96
nameonly tableName: ComAmazonawsDynamodbTypes .TableName ,
98
97
nameonly partitionKeyName: ComAmazonawsDynamodbTypes .KeySchemaAttributeName ,
99
98
nameonly sortKeyName: Option <ComAmazonawsDynamodbTypes .KeySchemaAttributeName> ,
100
- nameonly attributeActions: AttributeActions ,
99
+ nameonly attributeActions: AwsCryptographyDynamoDbEncryptionTypes . AttributeActions ,
101
100
nameonly allowedUnauthenticatedAttributes: Option <ComAmazonawsDynamodbTypes .AttributeNameList> ,
102
101
nameonly allowedUnauthenticatedAttributePrefix: Option <string > ,
103
102
nameonly algorithmSuiteId: Option <AwsCryptographyMaterialProvidersTypes .DBEAlgorithmSuiteId> ,
104
103
nameonly keyring: Option <AwsCryptographyMaterialProvidersTypes .IKeyring> ,
105
104
nameonly cmm: Option <AwsCryptographyMaterialProvidersTypes .ICryptographicMaterialsManager> ,
106
- nameonly legacyConfig: Option <LegacyConfig >
105
+ nameonly legacyConfig: Option <AwsCryptographyDynamoDbEncryptionTypes . LegacyConfig>
107
106
)
108
107
datatype EncryptItemInput = | EncryptItemInput (
109
108
nameonly plaintextItem: ComAmazonawsDynamodbTypes .AttributeMap
110
109
)
111
110
datatype EncryptItemOutput = | EncryptItemOutput (
112
111
nameonly encryptedItem: ComAmazonawsDynamodbTypes .AttributeMap
113
112
)
114
- datatype LegacyConfig = | LegacyConfig (
115
- nameonly policy: LegacyPolicy ,
116
- nameonly encryptor: ILegacyDynamoDbEncryptor ,
117
- nameonly attributeFlags: AttributeActions ,
118
- nameonly defaultAttributeFlag: Option <AwsCryptographyStructuredEncryptionTypes .CryptoAction>
119
- )
120
- class ILegacyDynamoDbEncryptorCallHistory {
121
- ghost constructor () {
122
-
123
- }
124
-
125
- }
126
- trait {:termination false } ILegacyDynamoDbEncryptor
127
- {
128
- // Helper to define any additional modifies/reads clauses.
129
- // If your operations need to mutate state,
130
- // add it in your constructor function:
131
- // Modifies := {your, fields, here, History};
132
- // If you do not need to mutate anything:
133
- // Modifies := {History};
134
-
135
- ghost const Modifies: set < object >
136
- // For an unassigned field defined in a trait,
137
- // Dafny can only assign a value in the constructor.
138
- // This means that for Dafny to reason about this value,
139
- // it needs some way to know (an invariant),
140
- // about the state of the object.
141
- // This builds on the Valid/Repr paradigm
142
- // To make this kind requires safe to add
143
- // to methods called from unverified code,
144
- // the predicate MUST NOT take any arguments.
145
- // This means that the correctness of this requires
146
- // MUST only be evaluated by the class itself.
147
- // If you require any additional mutation,
148
- // then you MUST ensure everything you need in ValidState.
149
- // You MUST also ensure ValidState in your constructor.
150
- predicate ValidState ()
151
- ensures ValidState () ==> History in Modifies
152
- ghost const History: ILegacyDynamoDbEncryptorCallHistory
153
-
154
- }
155
- datatype LegacyPolicy =
156
- | REQUIRE_ENCRYPT_ALLOW_DECRYPT
157
- | FORBID_ENCRYPT_ALLOW_DECRYPT
158
- | FORBID_ENCRYPT_FORBID_DECRYPT
159
113
datatype Error =
160
114
// Local Error structures are listed here
161
115
| DynamoDbItemEncryptorException (
162
116
nameonly message: string
163
117
)
164
118
// Any dependent models are listed here
165
- | AwsCryptographyStructuredEncryption (AwsCryptographyStructuredEncryption: AwsCryptographyStructuredEncryptionTypes .Error)
119
+ | AwsCryptographyDynamoDbEncryption (AwsCryptographyDynamoDbEncryption: AwsCryptographyDynamoDbEncryptionTypes .Error)
166
120
| AwsCryptographyMaterialProviders (AwsCryptographyMaterialProviders: AwsCryptographyMaterialProvidersTypes .Error)
167
121
| AwsCryptographyPrimitives (AwsCryptographyPrimitives: AwsCryptographyPrimitivesTypes .Error)
168
122
| ComAmazonawsDynamodb (ComAmazonawsDynamodb: ComAmazonawsDynamodbTypes .Error)
@@ -194,13 +148,13 @@ include "../../private-aws-encryption-sdk-dafny-staging/StandardLibrary/src/Inde
194
148
| Opaque (obj: object )
195
149
type OpaqueError = e: Error | e. Opaque? witness *
196
150
}
197
- abstract module AbstractAwsCryptographyDynamoDbItemEncryptorService
151
+ abstract module AbstractAwsCryptographyDynamoDbEncryptionItemEncryptorService
198
152
{
199
153
import opened Wrappers
200
154
import opened StandardLibrary. UInt
201
155
import opened UTF8
202
- import opened Types = AwsCryptographyDynamoDbItemEncryptorTypes
203
- import Operations : AbstractAwsCryptographyDynamoDbItemEncryptorOperations
156
+ import opened Types = AwsCryptographyDynamoDbEncryptionItemEncryptorTypes
157
+ import Operations : AbstractAwsCryptographyDynamoDbEncryptionItemEncryptorOperations
204
158
function method DefaultDynamoDbItemEncryptorConfig (): DynamoDbItemEncryptorConfig
205
159
method DynamoDbItemEncryptor (config: DynamoDbItemEncryptorConfig := DefaultDynamoDbItemEncryptorConfig())
206
160
returns (res: Result< DynamoDbItemEncryptorClient, Error> )
@@ -297,11 +251,11 @@ include "../../private-aws-encryption-sdk-dafny-staging/StandardLibrary/src/Inde
297
251
298
252
}
299
253
}
300
- abstract module AbstractAwsCryptographyDynamoDbItemEncryptorOperations {
254
+ abstract module AbstractAwsCryptographyDynamoDbEncryptionItemEncryptorOperations {
301
255
import opened Wrappers
302
256
import opened StandardLibrary. UInt
303
257
import opened UTF8
304
- import opened Types = AwsCryptographyDynamoDbItemEncryptorTypes
258
+ import opened Types = AwsCryptographyDynamoDbEncryptionItemEncryptorTypes
305
259
type InternalConfig
306
260
predicate ValidInternalConfig?(config: InternalConfig)
307
261
function ModifiesInternalConfig (config: InternalConfig ): set < object >
0 commit comments