github.com/aws/aws-cryptographic-material-providers-library/releases/go/mpl@v0.2.0/MaterialWrapping/MaterialWrapping.go (about)

     1  // Package MaterialWrapping
     2  // Dafny module MaterialWrapping compiled into Go
     3  
     4  package MaterialWrapping
     5  
     6  import (
     7  	os "os"
     8  
     9  	m_ComAmazonawsDynamodbTypes "github.com/aws/aws-cryptographic-material-providers-library/releases/go/dynamodb/ComAmazonawsDynamodbTypes"
    10  	m_Com_Amazonaws_Dynamodb "github.com/aws/aws-cryptographic-material-providers-library/releases/go/dynamodb/Com_Amazonaws_Dynamodb"
    11  	m_ComAmazonawsKmsTypes "github.com/aws/aws-cryptographic-material-providers-library/releases/go/kms/ComAmazonawsKmsTypes"
    12  	m_Com_Amazonaws_Kms "github.com/aws/aws-cryptographic-material-providers-library/releases/go/kms/Com_Amazonaws_Kms"
    13  	m_AlgorithmSuites "github.com/aws/aws-cryptographic-material-providers-library/releases/go/mpl/AlgorithmSuites"
    14  	m_AwsArnParsing "github.com/aws/aws-cryptographic-material-providers-library/releases/go/mpl/AwsArnParsing"
    15  	m_AwsCryptographyKeyStoreOperations "github.com/aws/aws-cryptographic-material-providers-library/releases/go/mpl/AwsCryptographyKeyStoreOperations"
    16  	m_AwsCryptographyKeyStoreTypes "github.com/aws/aws-cryptographic-material-providers-library/releases/go/mpl/AwsCryptographyKeyStoreTypes"
    17  	m_AwsCryptographyMaterialProvidersTypes "github.com/aws/aws-cryptographic-material-providers-library/releases/go/mpl/AwsCryptographyMaterialProvidersTypes"
    18  	m_AwsKmsMrkAreUnique "github.com/aws/aws-cryptographic-material-providers-library/releases/go/mpl/AwsKmsMrkAreUnique"
    19  	m_AwsKmsMrkMatchForDecrypt "github.com/aws/aws-cryptographic-material-providers-library/releases/go/mpl/AwsKmsMrkMatchForDecrypt"
    20  	m_AwsKmsUtils "github.com/aws/aws-cryptographic-material-providers-library/releases/go/mpl/AwsKmsUtils"
    21  	m_Constants "github.com/aws/aws-cryptographic-material-providers-library/releases/go/mpl/Constants"
    22  	m_CreateKeyStoreTable "github.com/aws/aws-cryptographic-material-providers-library/releases/go/mpl/CreateKeyStoreTable"
    23  	m_CreateKeys "github.com/aws/aws-cryptographic-material-providers-library/releases/go/mpl/CreateKeys"
    24  	m_DDBKeystoreOperations "github.com/aws/aws-cryptographic-material-providers-library/releases/go/mpl/DDBKeystoreOperations"
    25  	m_GetKeys "github.com/aws/aws-cryptographic-material-providers-library/releases/go/mpl/GetKeys"
    26  	m_KMSKeystoreOperations "github.com/aws/aws-cryptographic-material-providers-library/releases/go/mpl/KMSKeystoreOperations"
    27  	m_KeyStore "github.com/aws/aws-cryptographic-material-providers-library/releases/go/mpl/KeyStore"
    28  	m_KeyStoreErrorMessages "github.com/aws/aws-cryptographic-material-providers-library/releases/go/mpl/KeyStoreErrorMessages"
    29  	m_Keyring "github.com/aws/aws-cryptographic-material-providers-library/releases/go/mpl/Keyring"
    30  	m_KmsArn "github.com/aws/aws-cryptographic-material-providers-library/releases/go/mpl/KmsArn"
    31  	m_Materials "github.com/aws/aws-cryptographic-material-providers-library/releases/go/mpl/Materials"
    32  	m_MultiKeyring "github.com/aws/aws-cryptographic-material-providers-library/releases/go/mpl/MultiKeyring"
    33  	m_Structure "github.com/aws/aws-cryptographic-material-providers-library/releases/go/mpl/Structure"
    34  	m_AtomicPrimitives "github.com/aws/aws-cryptographic-material-providers-library/releases/go/primitives/AtomicPrimitives"
    35  	m_AwsCryptographyPrimitivesOperations "github.com/aws/aws-cryptographic-material-providers-library/releases/go/primitives/AwsCryptographyPrimitivesOperations"
    36  	m_AwsCryptographyPrimitivesTypes "github.com/aws/aws-cryptographic-material-providers-library/releases/go/primitives/AwsCryptographyPrimitivesTypes"
    37  	m_Digest "github.com/aws/aws-cryptographic-material-providers-library/releases/go/primitives/Digest"
    38  	m_HKDF "github.com/aws/aws-cryptographic-material-providers-library/releases/go/primitives/HKDF"
    39  	m_KdfCtr "github.com/aws/aws-cryptographic-material-providers-library/releases/go/primitives/KdfCtr"
    40  	m_Random "github.com/aws/aws-cryptographic-material-providers-library/releases/go/primitives/Random"
    41  	m_WrappedHKDF "github.com/aws/aws-cryptographic-material-providers-library/releases/go/primitives/WrappedHKDF"
    42  	m_WrappedHMAC "github.com/aws/aws-cryptographic-material-providers-library/releases/go/primitives/WrappedHMAC"
    43  	m_Actions "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/Actions"
    44  	m_Base64 "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/Base64"
    45  	m_Base64Lemmas "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/Base64Lemmas"
    46  	m_BoundedInts "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/BoundedInts"
    47  	m_DivInternals "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/DivInternals"
    48  	m_DivInternalsNonlinear "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/DivInternalsNonlinear"
    49  	m_DivMod "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/DivMod"
    50  	m_FileIO "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/FileIO"
    51  	m_FloatCompare "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/FloatCompare"
    52  	m_Functions "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/Functions"
    53  	m_GeneralInternals "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/GeneralInternals"
    54  	m_GetOpt "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/GetOpt"
    55  	m_HexStrings "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/HexStrings"
    56  	m_Logarithm "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/Logarithm"
    57  	m__Math "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/Math_"
    58  	m_ModInternals "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/ModInternals"
    59  	m_ModInternalsNonlinear "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/ModInternalsNonlinear"
    60  	m_Mul "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/Mul"
    61  	m_MulInternals "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/MulInternals"
    62  	m_MulInternalsNonlinear "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/MulInternalsNonlinear"
    63  	m_Power "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/Power"
    64  	m_Relations "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/Relations"
    65  	m_Seq "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/Seq"
    66  	m_Seq_MergeSort "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/Seq_MergeSort"
    67  	m_Sorting "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/Sorting"
    68  	m_StandardLibrary "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/StandardLibrary"
    69  	m_StandardLibraryInterop "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/StandardLibraryInterop"
    70  	m_StandardLibrary_Sequence "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/StandardLibrary_Sequence"
    71  	m_StandardLibrary_String "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/StandardLibrary_String"
    72  	m_StandardLibrary_UInt "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/StandardLibrary_UInt"
    73  	m_Streams "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/Streams"
    74  	m_UnicodeStrings "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/UnicodeStrings"
    75  	m__Unicode "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/Unicode_"
    76  	m_Utf16EncodingForm "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/Utf16EncodingForm"
    77  	m_Utf8EncodingForm "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/Utf8EncodingForm"
    78  	m_Wrappers "github.com/aws/aws-cryptographic-material-providers-library/releases/go/smithy-dafny-standard-library/Wrappers"
    79  	m__System "github.com/dafny-lang/DafnyRuntimeGo/v4/System_"
    80  	_dafny "github.com/dafny-lang/DafnyRuntimeGo/v4/dafny"
    81  )
    82  
    83  var _ = os.Args
    84  var _ _dafny.Dummy__
    85  var _ m__System.Dummy__
    86  var _ m_Wrappers.Dummy__
    87  var _ m_BoundedInts.Dummy__
    88  var _ m_StandardLibrary_UInt.Dummy__
    89  var _ m_StandardLibrary_Sequence.Dummy__
    90  var _ m_StandardLibrary_String.Dummy__
    91  var _ m_StandardLibrary.Dummy__
    92  var _ m_AwsCryptographyPrimitivesTypes.Dummy__
    93  var _ m_Random.Dummy__
    94  var _ m_Digest.Dummy__
    95  var _ m_WrappedHMAC.Dummy__
    96  var _ m_HKDF.Dummy__
    97  var _ m_WrappedHKDF.Dummy__
    98  var _ m_KdfCtr.Dummy__
    99  var _ m_AwsCryptographyPrimitivesOperations.Dummy__
   100  var _ m_AtomicPrimitives.Dummy__
   101  var _ m_ComAmazonawsDynamodbTypes.Dummy__
   102  var _ m_ComAmazonawsKmsTypes.Dummy__
   103  var _ m_Relations.Dummy__
   104  var _ m_Seq_MergeSort.Dummy__
   105  var _ m__Math.Dummy__
   106  var _ m_Seq.Dummy__
   107  var _ m__Unicode.Dummy__
   108  var _ m_Functions.Dummy__
   109  var _ m_Utf8EncodingForm.Dummy__
   110  var _ m_Utf16EncodingForm.Dummy__
   111  var _ m_UnicodeStrings.Dummy__
   112  var _ m_FileIO.Dummy__
   113  var _ m_GeneralInternals.Dummy__
   114  var _ m_MulInternalsNonlinear.Dummy__
   115  var _ m_MulInternals.Dummy__
   116  var _ m_Mul.Dummy__
   117  var _ m_ModInternalsNonlinear.Dummy__
   118  var _ m_DivInternalsNonlinear.Dummy__
   119  var _ m_ModInternals.Dummy__
   120  var _ m_DivInternals.Dummy__
   121  var _ m_DivMod.Dummy__
   122  var _ m_Power.Dummy__
   123  var _ m_Logarithm.Dummy__
   124  var _ m_StandardLibraryInterop.Dummy__
   125  var _ m_Streams.Dummy__
   126  var _ m_Sorting.Dummy__
   127  var _ m_HexStrings.Dummy__
   128  var _ m_GetOpt.Dummy__
   129  var _ m_FloatCompare.Dummy__
   130  var _ m_Base64.Dummy__
   131  var _ m_Base64Lemmas.Dummy__
   132  var _ m_Actions.Dummy__
   133  var _ m_AwsCryptographyKeyStoreTypes.Dummy__
   134  var _ m_AwsCryptographyMaterialProvidersTypes.Dummy__
   135  var _ m_AwsArnParsing.Dummy__
   136  var _ m_AwsKmsMrkMatchForDecrypt.Dummy__
   137  var _ m_AwsKmsUtils.Dummy__
   138  var _ m_KeyStoreErrorMessages.Dummy__
   139  var _ m_KmsArn.Dummy__
   140  var _ m_Structure.Dummy__
   141  var _ m_KMSKeystoreOperations.Dummy__
   142  var _ m_DDBKeystoreOperations.Dummy__
   143  var _ m_CreateKeys.Dummy__
   144  var _ m_CreateKeyStoreTable.Dummy__
   145  var _ m_GetKeys.Dummy__
   146  var _ m_AwsCryptographyKeyStoreOperations.Dummy__
   147  var _ m_Com_Amazonaws_Kms.Dummy__
   148  var _ m_Com_Amazonaws_Dynamodb.Dummy__
   149  var _ m_KeyStore.Dummy__
   150  var _ m_AlgorithmSuites.Dummy__
   151  var _ m_Materials.Dummy__
   152  var _ m_Keyring.Dummy__
   153  var _ m_MultiKeyring.Dummy__
   154  var _ m_AwsKmsMrkAreUnique.Dummy__
   155  var _ m_Constants.Dummy__
   156  
   157  type Dummy__ struct{}
   158  
   159  // Definition of datatype GenerateAndWrapInput
   160  type GenerateAndWrapInput struct {
   161  	Data_GenerateAndWrapInput_
   162  }
   163  
   164  func (_this GenerateAndWrapInput) Get_() Data_GenerateAndWrapInput_ {
   165  	return _this.Data_GenerateAndWrapInput_
   166  }
   167  
   168  type Data_GenerateAndWrapInput_ interface {
   169  	isGenerateAndWrapInput()
   170  }
   171  
   172  type CompanionStruct_GenerateAndWrapInput_ struct {
   173  }
   174  
   175  var Companion_GenerateAndWrapInput_ = CompanionStruct_GenerateAndWrapInput_{}
   176  
   177  type GenerateAndWrapInput_GenerateAndWrapInput struct {
   178  	AlgorithmSuite    m_AwsCryptographyMaterialProvidersTypes.AlgorithmSuiteInfo
   179  	EncryptionContext _dafny.Map
   180  }
   181  
   182  func (GenerateAndWrapInput_GenerateAndWrapInput) isGenerateAndWrapInput() {}
   183  
   184  func (CompanionStruct_GenerateAndWrapInput_) Create_GenerateAndWrapInput_(AlgorithmSuite m_AwsCryptographyMaterialProvidersTypes.AlgorithmSuiteInfo, EncryptionContext _dafny.Map) GenerateAndWrapInput {
   185  	return GenerateAndWrapInput{GenerateAndWrapInput_GenerateAndWrapInput{AlgorithmSuite, EncryptionContext}}
   186  }
   187  
   188  func (_this GenerateAndWrapInput) Is_GenerateAndWrapInput() bool {
   189  	_, ok := _this.Get_().(GenerateAndWrapInput_GenerateAndWrapInput)
   190  	return ok
   191  }
   192  
   193  func (CompanionStruct_GenerateAndWrapInput_) Default() GenerateAndWrapInput {
   194  	return Companion_GenerateAndWrapInput_.Create_GenerateAndWrapInput_(m_AwsCryptographyMaterialProvidersTypes.Companion_AlgorithmSuiteInfo_.Default(), _dafny.EmptyMap)
   195  }
   196  
   197  func (_this GenerateAndWrapInput) Dtor_algorithmSuite() m_AwsCryptographyMaterialProvidersTypes.AlgorithmSuiteInfo {
   198  	return _this.Get_().(GenerateAndWrapInput_GenerateAndWrapInput).AlgorithmSuite
   199  }
   200  
   201  func (_this GenerateAndWrapInput) Dtor_encryptionContext() _dafny.Map {
   202  	return _this.Get_().(GenerateAndWrapInput_GenerateAndWrapInput).EncryptionContext
   203  }
   204  
   205  func (_this GenerateAndWrapInput) String() string {
   206  	switch data := _this.Get_().(type) {
   207  	case nil:
   208  		return "null"
   209  	case GenerateAndWrapInput_GenerateAndWrapInput:
   210  		{
   211  			return "MaterialWrapping.GenerateAndWrapInput.GenerateAndWrapInput" + "(" + _dafny.String(data.AlgorithmSuite) + ", " + _dafny.String(data.EncryptionContext) + ")"
   212  		}
   213  	default:
   214  		{
   215  			return "<unexpected>"
   216  		}
   217  	}
   218  }
   219  
   220  func (_this GenerateAndWrapInput) Equals(other GenerateAndWrapInput) bool {
   221  	switch data1 := _this.Get_().(type) {
   222  	case GenerateAndWrapInput_GenerateAndWrapInput:
   223  		{
   224  			data2, ok := other.Get_().(GenerateAndWrapInput_GenerateAndWrapInput)
   225  			return ok && data1.AlgorithmSuite.Equals(data2.AlgorithmSuite) && data1.EncryptionContext.Equals(data2.EncryptionContext)
   226  		}
   227  	default:
   228  		{
   229  			return false // unexpected
   230  		}
   231  	}
   232  }
   233  
   234  func (_this GenerateAndWrapInput) EqualsGeneric(other interface{}) bool {
   235  	typed, ok := other.(GenerateAndWrapInput)
   236  	return ok && _this.Equals(typed)
   237  }
   238  
   239  func Type_GenerateAndWrapInput_() _dafny.TypeDescriptor {
   240  	return type_GenerateAndWrapInput_{}
   241  }
   242  
   243  type type_GenerateAndWrapInput_ struct {
   244  }
   245  
   246  func (_this type_GenerateAndWrapInput_) Default() interface{} {
   247  	return Companion_GenerateAndWrapInput_.Default()
   248  }
   249  
   250  func (_this type_GenerateAndWrapInput_) String() string {
   251  	return "MaterialWrapping.GenerateAndWrapInput"
   252  }
   253  func (_this GenerateAndWrapInput) ParentTraits_() []*_dafny.TraitID {
   254  	return [](*_dafny.TraitID){}
   255  }
   256  
   257  var _ _dafny.TraitOffspring = GenerateAndWrapInput{}
   258  
   259  // End of datatype GenerateAndWrapInput
   260  
   261  // Definition of datatype GenerateAndWrapOutput
   262  type GenerateAndWrapOutput struct {
   263  	Data_GenerateAndWrapOutput_
   264  }
   265  
   266  func (_this GenerateAndWrapOutput) Get_() Data_GenerateAndWrapOutput_ {
   267  	return _this.Data_GenerateAndWrapOutput_
   268  }
   269  
   270  type Data_GenerateAndWrapOutput_ interface {
   271  	isGenerateAndWrapOutput()
   272  }
   273  
   274  type CompanionStruct_GenerateAndWrapOutput_ struct {
   275  }
   276  
   277  var Companion_GenerateAndWrapOutput_ = CompanionStruct_GenerateAndWrapOutput_{}
   278  
   279  type GenerateAndWrapOutput_GenerateAndWrapOutput struct {
   280  	PlaintextMaterial _dafny.Sequence
   281  	WrappedMaterial   _dafny.Sequence
   282  	WrapInfo          interface{}
   283  }
   284  
   285  func (GenerateAndWrapOutput_GenerateAndWrapOutput) isGenerateAndWrapOutput() {}
   286  
   287  func (CompanionStruct_GenerateAndWrapOutput_) Create_GenerateAndWrapOutput_(PlaintextMaterial _dafny.Sequence, WrappedMaterial _dafny.Sequence, WrapInfo interface{}) GenerateAndWrapOutput {
   288  	return GenerateAndWrapOutput{GenerateAndWrapOutput_GenerateAndWrapOutput{PlaintextMaterial, WrappedMaterial, WrapInfo}}
   289  }
   290  
   291  func (_this GenerateAndWrapOutput) Is_GenerateAndWrapOutput() bool {
   292  	_, ok := _this.Get_().(GenerateAndWrapOutput_GenerateAndWrapOutput)
   293  	return ok
   294  }
   295  
   296  func (CompanionStruct_GenerateAndWrapOutput_) Default(_default_T interface{}) GenerateAndWrapOutput {
   297  	return Companion_GenerateAndWrapOutput_.Create_GenerateAndWrapOutput_(_dafny.EmptySeq, _dafny.EmptySeq, _default_T)
   298  }
   299  
   300  func (_this GenerateAndWrapOutput) Dtor_plaintextMaterial() _dafny.Sequence {
   301  	return _this.Get_().(GenerateAndWrapOutput_GenerateAndWrapOutput).PlaintextMaterial
   302  }
   303  
   304  func (_this GenerateAndWrapOutput) Dtor_wrappedMaterial() _dafny.Sequence {
   305  	return _this.Get_().(GenerateAndWrapOutput_GenerateAndWrapOutput).WrappedMaterial
   306  }
   307  
   308  func (_this GenerateAndWrapOutput) Dtor_wrapInfo() interface{} {
   309  	return _this.Get_().(GenerateAndWrapOutput_GenerateAndWrapOutput).WrapInfo
   310  }
   311  
   312  func (_this GenerateAndWrapOutput) String() string {
   313  	switch data := _this.Get_().(type) {
   314  	case nil:
   315  		return "null"
   316  	case GenerateAndWrapOutput_GenerateAndWrapOutput:
   317  		{
   318  			return "MaterialWrapping.GenerateAndWrapOutput.GenerateAndWrapOutput" + "(" + _dafny.String(data.PlaintextMaterial) + ", " + _dafny.String(data.WrappedMaterial) + ", " + _dafny.String(data.WrapInfo) + ")"
   319  		}
   320  	default:
   321  		{
   322  			return "<unexpected>"
   323  		}
   324  	}
   325  }
   326  
   327  func (_this GenerateAndWrapOutput) Equals(other GenerateAndWrapOutput) bool {
   328  	switch data1 := _this.Get_().(type) {
   329  	case GenerateAndWrapOutput_GenerateAndWrapOutput:
   330  		{
   331  			data2, ok := other.Get_().(GenerateAndWrapOutput_GenerateAndWrapOutput)
   332  			return ok && data1.PlaintextMaterial.Equals(data2.PlaintextMaterial) && data1.WrappedMaterial.Equals(data2.WrappedMaterial) && _dafny.AreEqual(data1.WrapInfo, data2.WrapInfo)
   333  		}
   334  	default:
   335  		{
   336  			return false // unexpected
   337  		}
   338  	}
   339  }
   340  
   341  func (_this GenerateAndWrapOutput) EqualsGeneric(other interface{}) bool {
   342  	typed, ok := other.(GenerateAndWrapOutput)
   343  	return ok && _this.Equals(typed)
   344  }
   345  
   346  func Type_GenerateAndWrapOutput_(Type_T_ _dafny.TypeDescriptor) _dafny.TypeDescriptor {
   347  	return type_GenerateAndWrapOutput_{Type_T_}
   348  }
   349  
   350  type type_GenerateAndWrapOutput_ struct {
   351  	Type_T_ _dafny.TypeDescriptor
   352  }
   353  
   354  func (_this type_GenerateAndWrapOutput_) Default() interface{} {
   355  	Type_T_ := _this.Type_T_
   356  	_ = Type_T_
   357  	return Companion_GenerateAndWrapOutput_.Default(Type_T_.Default())
   358  }
   359  
   360  func (_this type_GenerateAndWrapOutput_) String() string {
   361  	return "MaterialWrapping.GenerateAndWrapOutput"
   362  }
   363  func (_this GenerateAndWrapOutput) ParentTraits_() []*_dafny.TraitID {
   364  	return [](*_dafny.TraitID){}
   365  }
   366  
   367  var _ _dafny.TraitOffspring = GenerateAndWrapOutput{}
   368  
   369  // End of datatype GenerateAndWrapOutput
   370  
   371  // Definition of datatype WrapInput
   372  type WrapInput struct {
   373  	Data_WrapInput_
   374  }
   375  
   376  func (_this WrapInput) Get_() Data_WrapInput_ {
   377  	return _this.Data_WrapInput_
   378  }
   379  
   380  type Data_WrapInput_ interface {
   381  	isWrapInput()
   382  }
   383  
   384  type CompanionStruct_WrapInput_ struct {
   385  }
   386  
   387  var Companion_WrapInput_ = CompanionStruct_WrapInput_{}
   388  
   389  type WrapInput_WrapInput struct {
   390  	PlaintextMaterial _dafny.Sequence
   391  	AlgorithmSuite    m_AwsCryptographyMaterialProvidersTypes.AlgorithmSuiteInfo
   392  	EncryptionContext _dafny.Map
   393  }
   394  
   395  func (WrapInput_WrapInput) isWrapInput() {}
   396  
   397  func (CompanionStruct_WrapInput_) Create_WrapInput_(PlaintextMaterial _dafny.Sequence, AlgorithmSuite m_AwsCryptographyMaterialProvidersTypes.AlgorithmSuiteInfo, EncryptionContext _dafny.Map) WrapInput {
   398  	return WrapInput{WrapInput_WrapInput{PlaintextMaterial, AlgorithmSuite, EncryptionContext}}
   399  }
   400  
   401  func (_this WrapInput) Is_WrapInput() bool {
   402  	_, ok := _this.Get_().(WrapInput_WrapInput)
   403  	return ok
   404  }
   405  
   406  func (CompanionStruct_WrapInput_) Default() WrapInput {
   407  	return Companion_WrapInput_.Create_WrapInput_(_dafny.EmptySeq, m_AwsCryptographyMaterialProvidersTypes.Companion_AlgorithmSuiteInfo_.Default(), _dafny.EmptyMap)
   408  }
   409  
   410  func (_this WrapInput) Dtor_plaintextMaterial() _dafny.Sequence {
   411  	return _this.Get_().(WrapInput_WrapInput).PlaintextMaterial
   412  }
   413  
   414  func (_this WrapInput) Dtor_algorithmSuite() m_AwsCryptographyMaterialProvidersTypes.AlgorithmSuiteInfo {
   415  	return _this.Get_().(WrapInput_WrapInput).AlgorithmSuite
   416  }
   417  
   418  func (_this WrapInput) Dtor_encryptionContext() _dafny.Map {
   419  	return _this.Get_().(WrapInput_WrapInput).EncryptionContext
   420  }
   421  
   422  func (_this WrapInput) String() string {
   423  	switch data := _this.Get_().(type) {
   424  	case nil:
   425  		return "null"
   426  	case WrapInput_WrapInput:
   427  		{
   428  			return "MaterialWrapping.WrapInput.WrapInput" + "(" + _dafny.String(data.PlaintextMaterial) + ", " + _dafny.String(data.AlgorithmSuite) + ", " + _dafny.String(data.EncryptionContext) + ")"
   429  		}
   430  	default:
   431  		{
   432  			return "<unexpected>"
   433  		}
   434  	}
   435  }
   436  
   437  func (_this WrapInput) Equals(other WrapInput) bool {
   438  	switch data1 := _this.Get_().(type) {
   439  	case WrapInput_WrapInput:
   440  		{
   441  			data2, ok := other.Get_().(WrapInput_WrapInput)
   442  			return ok && data1.PlaintextMaterial.Equals(data2.PlaintextMaterial) && data1.AlgorithmSuite.Equals(data2.AlgorithmSuite) && data1.EncryptionContext.Equals(data2.EncryptionContext)
   443  		}
   444  	default:
   445  		{
   446  			return false // unexpected
   447  		}
   448  	}
   449  }
   450  
   451  func (_this WrapInput) EqualsGeneric(other interface{}) bool {
   452  	typed, ok := other.(WrapInput)
   453  	return ok && _this.Equals(typed)
   454  }
   455  
   456  func Type_WrapInput_() _dafny.TypeDescriptor {
   457  	return type_WrapInput_{}
   458  }
   459  
   460  type type_WrapInput_ struct {
   461  }
   462  
   463  func (_this type_WrapInput_) Default() interface{} {
   464  	return Companion_WrapInput_.Default()
   465  }
   466  
   467  func (_this type_WrapInput_) String() string {
   468  	return "MaterialWrapping.WrapInput"
   469  }
   470  func (_this WrapInput) ParentTraits_() []*_dafny.TraitID {
   471  	return [](*_dafny.TraitID){}
   472  }
   473  
   474  var _ _dafny.TraitOffspring = WrapInput{}
   475  
   476  // End of datatype WrapInput
   477  
   478  // Definition of datatype WrapOutput
   479  type WrapOutput struct {
   480  	Data_WrapOutput_
   481  }
   482  
   483  func (_this WrapOutput) Get_() Data_WrapOutput_ {
   484  	return _this.Data_WrapOutput_
   485  }
   486  
   487  type Data_WrapOutput_ interface {
   488  	isWrapOutput()
   489  }
   490  
   491  type CompanionStruct_WrapOutput_ struct {
   492  }
   493  
   494  var Companion_WrapOutput_ = CompanionStruct_WrapOutput_{}
   495  
   496  type WrapOutput_WrapOutput struct {
   497  	WrappedMaterial _dafny.Sequence
   498  	WrapInfo        interface{}
   499  }
   500  
   501  func (WrapOutput_WrapOutput) isWrapOutput() {}
   502  
   503  func (CompanionStruct_WrapOutput_) Create_WrapOutput_(WrappedMaterial _dafny.Sequence, WrapInfo interface{}) WrapOutput {
   504  	return WrapOutput{WrapOutput_WrapOutput{WrappedMaterial, WrapInfo}}
   505  }
   506  
   507  func (_this WrapOutput) Is_WrapOutput() bool {
   508  	_, ok := _this.Get_().(WrapOutput_WrapOutput)
   509  	return ok
   510  }
   511  
   512  func (CompanionStruct_WrapOutput_) Default(_default_T interface{}) WrapOutput {
   513  	return Companion_WrapOutput_.Create_WrapOutput_(_dafny.EmptySeq, _default_T)
   514  }
   515  
   516  func (_this WrapOutput) Dtor_wrappedMaterial() _dafny.Sequence {
   517  	return _this.Get_().(WrapOutput_WrapOutput).WrappedMaterial
   518  }
   519  
   520  func (_this WrapOutput) Dtor_wrapInfo() interface{} {
   521  	return _this.Get_().(WrapOutput_WrapOutput).WrapInfo
   522  }
   523  
   524  func (_this WrapOutput) String() string {
   525  	switch data := _this.Get_().(type) {
   526  	case nil:
   527  		return "null"
   528  	case WrapOutput_WrapOutput:
   529  		{
   530  			return "MaterialWrapping.WrapOutput.WrapOutput" + "(" + _dafny.String(data.WrappedMaterial) + ", " + _dafny.String(data.WrapInfo) + ")"
   531  		}
   532  	default:
   533  		{
   534  			return "<unexpected>"
   535  		}
   536  	}
   537  }
   538  
   539  func (_this WrapOutput) Equals(other WrapOutput) bool {
   540  	switch data1 := _this.Get_().(type) {
   541  	case WrapOutput_WrapOutput:
   542  		{
   543  			data2, ok := other.Get_().(WrapOutput_WrapOutput)
   544  			return ok && data1.WrappedMaterial.Equals(data2.WrappedMaterial) && _dafny.AreEqual(data1.WrapInfo, data2.WrapInfo)
   545  		}
   546  	default:
   547  		{
   548  			return false // unexpected
   549  		}
   550  	}
   551  }
   552  
   553  func (_this WrapOutput) EqualsGeneric(other interface{}) bool {
   554  	typed, ok := other.(WrapOutput)
   555  	return ok && _this.Equals(typed)
   556  }
   557  
   558  func Type_WrapOutput_(Type_T_ _dafny.TypeDescriptor) _dafny.TypeDescriptor {
   559  	return type_WrapOutput_{Type_T_}
   560  }
   561  
   562  type type_WrapOutput_ struct {
   563  	Type_T_ _dafny.TypeDescriptor
   564  }
   565  
   566  func (_this type_WrapOutput_) Default() interface{} {
   567  	Type_T_ := _this.Type_T_
   568  	_ = Type_T_
   569  	return Companion_WrapOutput_.Default(Type_T_.Default())
   570  }
   571  
   572  func (_this type_WrapOutput_) String() string {
   573  	return "MaterialWrapping.WrapOutput"
   574  }
   575  func (_this WrapOutput) ParentTraits_() []*_dafny.TraitID {
   576  	return [](*_dafny.TraitID){}
   577  }
   578  
   579  var _ _dafny.TraitOffspring = WrapOutput{}
   580  
   581  // End of datatype WrapOutput
   582  
   583  // Definition of datatype UnwrapInput
   584  type UnwrapInput struct {
   585  	Data_UnwrapInput_
   586  }
   587  
   588  func (_this UnwrapInput) Get_() Data_UnwrapInput_ {
   589  	return _this.Data_UnwrapInput_
   590  }
   591  
   592  type Data_UnwrapInput_ interface {
   593  	isUnwrapInput()
   594  }
   595  
   596  type CompanionStruct_UnwrapInput_ struct {
   597  }
   598  
   599  var Companion_UnwrapInput_ = CompanionStruct_UnwrapInput_{}
   600  
   601  type UnwrapInput_UnwrapInput struct {
   602  	WrappedMaterial   _dafny.Sequence
   603  	AlgorithmSuite    m_AwsCryptographyMaterialProvidersTypes.AlgorithmSuiteInfo
   604  	EncryptionContext _dafny.Map
   605  }
   606  
   607  func (UnwrapInput_UnwrapInput) isUnwrapInput() {}
   608  
   609  func (CompanionStruct_UnwrapInput_) Create_UnwrapInput_(WrappedMaterial _dafny.Sequence, AlgorithmSuite m_AwsCryptographyMaterialProvidersTypes.AlgorithmSuiteInfo, EncryptionContext _dafny.Map) UnwrapInput {
   610  	return UnwrapInput{UnwrapInput_UnwrapInput{WrappedMaterial, AlgorithmSuite, EncryptionContext}}
   611  }
   612  
   613  func (_this UnwrapInput) Is_UnwrapInput() bool {
   614  	_, ok := _this.Get_().(UnwrapInput_UnwrapInput)
   615  	return ok
   616  }
   617  
   618  func (CompanionStruct_UnwrapInput_) Default() UnwrapInput {
   619  	return Companion_UnwrapInput_.Create_UnwrapInput_(_dafny.EmptySeq, m_AwsCryptographyMaterialProvidersTypes.Companion_AlgorithmSuiteInfo_.Default(), _dafny.EmptyMap)
   620  }
   621  
   622  func (_this UnwrapInput) Dtor_wrappedMaterial() _dafny.Sequence {
   623  	return _this.Get_().(UnwrapInput_UnwrapInput).WrappedMaterial
   624  }
   625  
   626  func (_this UnwrapInput) Dtor_algorithmSuite() m_AwsCryptographyMaterialProvidersTypes.AlgorithmSuiteInfo {
   627  	return _this.Get_().(UnwrapInput_UnwrapInput).AlgorithmSuite
   628  }
   629  
   630  func (_this UnwrapInput) Dtor_encryptionContext() _dafny.Map {
   631  	return _this.Get_().(UnwrapInput_UnwrapInput).EncryptionContext
   632  }
   633  
   634  func (_this UnwrapInput) String() string {
   635  	switch data := _this.Get_().(type) {
   636  	case nil:
   637  		return "null"
   638  	case UnwrapInput_UnwrapInput:
   639  		{
   640  			return "MaterialWrapping.UnwrapInput.UnwrapInput" + "(" + _dafny.String(data.WrappedMaterial) + ", " + _dafny.String(data.AlgorithmSuite) + ", " + _dafny.String(data.EncryptionContext) + ")"
   641  		}
   642  	default:
   643  		{
   644  			return "<unexpected>"
   645  		}
   646  	}
   647  }
   648  
   649  func (_this UnwrapInput) Equals(other UnwrapInput) bool {
   650  	switch data1 := _this.Get_().(type) {
   651  	case UnwrapInput_UnwrapInput:
   652  		{
   653  			data2, ok := other.Get_().(UnwrapInput_UnwrapInput)
   654  			return ok && data1.WrappedMaterial.Equals(data2.WrappedMaterial) && data1.AlgorithmSuite.Equals(data2.AlgorithmSuite) && data1.EncryptionContext.Equals(data2.EncryptionContext)
   655  		}
   656  	default:
   657  		{
   658  			return false // unexpected
   659  		}
   660  	}
   661  }
   662  
   663  func (_this UnwrapInput) EqualsGeneric(other interface{}) bool {
   664  	typed, ok := other.(UnwrapInput)
   665  	return ok && _this.Equals(typed)
   666  }
   667  
   668  func Type_UnwrapInput_() _dafny.TypeDescriptor {
   669  	return type_UnwrapInput_{}
   670  }
   671  
   672  type type_UnwrapInput_ struct {
   673  }
   674  
   675  func (_this type_UnwrapInput_) Default() interface{} {
   676  	return Companion_UnwrapInput_.Default()
   677  }
   678  
   679  func (_this type_UnwrapInput_) String() string {
   680  	return "MaterialWrapping.UnwrapInput"
   681  }
   682  func (_this UnwrapInput) ParentTraits_() []*_dafny.TraitID {
   683  	return [](*_dafny.TraitID){}
   684  }
   685  
   686  var _ _dafny.TraitOffspring = UnwrapInput{}
   687  
   688  // End of datatype UnwrapInput
   689  
   690  // Definition of datatype UnwrapOutput
   691  type UnwrapOutput struct {
   692  	Data_UnwrapOutput_
   693  }
   694  
   695  func (_this UnwrapOutput) Get_() Data_UnwrapOutput_ {
   696  	return _this.Data_UnwrapOutput_
   697  }
   698  
   699  type Data_UnwrapOutput_ interface {
   700  	isUnwrapOutput()
   701  }
   702  
   703  type CompanionStruct_UnwrapOutput_ struct {
   704  }
   705  
   706  var Companion_UnwrapOutput_ = CompanionStruct_UnwrapOutput_{}
   707  
   708  type UnwrapOutput_UnwrapOutput struct {
   709  	UnwrappedMaterial _dafny.Sequence
   710  	UnwrapInfo        interface{}
   711  }
   712  
   713  func (UnwrapOutput_UnwrapOutput) isUnwrapOutput() {}
   714  
   715  func (CompanionStruct_UnwrapOutput_) Create_UnwrapOutput_(UnwrappedMaterial _dafny.Sequence, UnwrapInfo interface{}) UnwrapOutput {
   716  	return UnwrapOutput{UnwrapOutput_UnwrapOutput{UnwrappedMaterial, UnwrapInfo}}
   717  }
   718  
   719  func (_this UnwrapOutput) Is_UnwrapOutput() bool {
   720  	_, ok := _this.Get_().(UnwrapOutput_UnwrapOutput)
   721  	return ok
   722  }
   723  
   724  func (CompanionStruct_UnwrapOutput_) Default(_default_T interface{}) UnwrapOutput {
   725  	return Companion_UnwrapOutput_.Create_UnwrapOutput_(_dafny.EmptySeq, _default_T)
   726  }
   727  
   728  func (_this UnwrapOutput) Dtor_unwrappedMaterial() _dafny.Sequence {
   729  	return _this.Get_().(UnwrapOutput_UnwrapOutput).UnwrappedMaterial
   730  }
   731  
   732  func (_this UnwrapOutput) Dtor_unwrapInfo() interface{} {
   733  	return _this.Get_().(UnwrapOutput_UnwrapOutput).UnwrapInfo
   734  }
   735  
   736  func (_this UnwrapOutput) String() string {
   737  	switch data := _this.Get_().(type) {
   738  	case nil:
   739  		return "null"
   740  	case UnwrapOutput_UnwrapOutput:
   741  		{
   742  			return "MaterialWrapping.UnwrapOutput.UnwrapOutput" + "(" + _dafny.String(data.UnwrappedMaterial) + ", " + _dafny.String(data.UnwrapInfo) + ")"
   743  		}
   744  	default:
   745  		{
   746  			return "<unexpected>"
   747  		}
   748  	}
   749  }
   750  
   751  func (_this UnwrapOutput) Equals(other UnwrapOutput) bool {
   752  	switch data1 := _this.Get_().(type) {
   753  	case UnwrapOutput_UnwrapOutput:
   754  		{
   755  			data2, ok := other.Get_().(UnwrapOutput_UnwrapOutput)
   756  			return ok && data1.UnwrappedMaterial.Equals(data2.UnwrappedMaterial) && _dafny.AreEqual(data1.UnwrapInfo, data2.UnwrapInfo)
   757  		}
   758  	default:
   759  		{
   760  			return false // unexpected
   761  		}
   762  	}
   763  }
   764  
   765  func (_this UnwrapOutput) EqualsGeneric(other interface{}) bool {
   766  	typed, ok := other.(UnwrapOutput)
   767  	return ok && _this.Equals(typed)
   768  }
   769  
   770  func Type_UnwrapOutput_(Type_T_ _dafny.TypeDescriptor) _dafny.TypeDescriptor {
   771  	return type_UnwrapOutput_{Type_T_}
   772  }
   773  
   774  type type_UnwrapOutput_ struct {
   775  	Type_T_ _dafny.TypeDescriptor
   776  }
   777  
   778  func (_this type_UnwrapOutput_) Default() interface{} {
   779  	Type_T_ := _this.Type_T_
   780  	_ = Type_T_
   781  	return Companion_UnwrapOutput_.Default(Type_T_.Default())
   782  }
   783  
   784  func (_this type_UnwrapOutput_) String() string {
   785  	return "MaterialWrapping.UnwrapOutput"
   786  }
   787  func (_this UnwrapOutput) ParentTraits_() []*_dafny.TraitID {
   788  	return [](*_dafny.TraitID){}
   789  }
   790  
   791  var _ _dafny.TraitOffspring = UnwrapOutput{}
   792  
   793  // End of datatype UnwrapOutput
   794  
   795  // Definition of trait GenerateAndWrapMaterial
   796  type GenerateAndWrapMaterial interface {
   797  	String() string
   798  	Invoke(a interface{}) interface{}
   799  }
   800  type CompanionStruct_GenerateAndWrapMaterial_ struct {
   801  	TraitID_ *_dafny.TraitID
   802  }
   803  
   804  var Companion_GenerateAndWrapMaterial_ = CompanionStruct_GenerateAndWrapMaterial_{
   805  	TraitID_: &_dafny.TraitID{},
   806  }
   807  
   808  func (CompanionStruct_GenerateAndWrapMaterial_) CastTo_(x interface{}) GenerateAndWrapMaterial {
   809  	var t GenerateAndWrapMaterial
   810  	t, _ = x.(GenerateAndWrapMaterial)
   811  	return t
   812  }
   813  
   814  // End of trait GenerateAndWrapMaterial
   815  
   816  // Definition of trait WrapMaterial
   817  type WrapMaterial interface {
   818  	String() string
   819  	Invoke(a interface{}) interface{}
   820  }
   821  type CompanionStruct_WrapMaterial_ struct {
   822  	TraitID_ *_dafny.TraitID
   823  }
   824  
   825  var Companion_WrapMaterial_ = CompanionStruct_WrapMaterial_{
   826  	TraitID_: &_dafny.TraitID{},
   827  }
   828  
   829  func (CompanionStruct_WrapMaterial_) CastTo_(x interface{}) WrapMaterial {
   830  	var t WrapMaterial
   831  	t, _ = x.(WrapMaterial)
   832  	return t
   833  }
   834  
   835  // End of trait WrapMaterial
   836  
   837  // Definition of trait UnwrapMaterial
   838  type UnwrapMaterial interface {
   839  	String() string
   840  	Invoke(a interface{}) interface{}
   841  }
   842  type CompanionStruct_UnwrapMaterial_ struct {
   843  	TraitID_ *_dafny.TraitID
   844  }
   845  
   846  var Companion_UnwrapMaterial_ = CompanionStruct_UnwrapMaterial_{
   847  	TraitID_: &_dafny.TraitID{},
   848  }
   849  
   850  func (CompanionStruct_UnwrapMaterial_) CastTo_(x interface{}) UnwrapMaterial {
   851  	var t UnwrapMaterial
   852  	t, _ = x.(UnwrapMaterial)
   853  	return t
   854  }
   855  
   856  // End of trait UnwrapMaterial