in releases/go/encryption-sdk/AwsCryptographyEncryptionSdkTypes/AwsCryptographyEncryptionSdkTypes.go [1410:1447]
func (_this Error) Equals(other Error) bool {
switch data1 := _this.Get_().(type) {
case Error_AwsEncryptionSdkException:
{
data2, ok := other.Get_().(Error_AwsEncryptionSdkException)
return ok && data1.Message.Equals(data2.Message)
}
case Error_AwsCryptographyMaterialProviders:
{
data2, ok := other.Get_().(Error_AwsCryptographyMaterialProviders)
return ok && data1.AwsCryptographyMaterialProviders.Equals(data2.AwsCryptographyMaterialProviders)
}
case Error_AwsCryptographyPrimitives:
{
data2, ok := other.Get_().(Error_AwsCryptographyPrimitives)
return ok && data1.AwsCryptographyPrimitives.Equals(data2.AwsCryptographyPrimitives)
}
case Error_CollectionOfErrors:
{
data2, ok := other.Get_().(Error_CollectionOfErrors)
return ok && data1.List.Equals(data2.List) && data1.Message.Equals(data2.Message)
}
case Error_Opaque:
{
data2, ok := other.Get_().(Error_Opaque)
return ok && _dafny.AreEqual(data1.Obj, data2.Obj)
}
case Error_OpaqueWithText:
{
data2, ok := other.Get_().(Error_OpaqueWithText)
return ok && _dafny.AreEqual(data1.Obj, data2.Obj) && data1.ObjMessage.Equals(data2.ObjMessage)
}
default:
{
return false // unexpected
}
}
}