public static ClaimableBalanceEntryExtensionV1 Decode(XdrDataInputStream stream)
        {
            ClaimableBalanceEntryExtensionV1 decodedClaimableBalanceEntryExtensionV1 = new ClaimableBalanceEntryExtensionV1();

            decodedClaimableBalanceEntryExtensionV1.Ext   = ClaimableBalanceEntryExtensionV1Ext.Decode(stream);
            decodedClaimableBalanceEntryExtensionV1.Flags = Uint32.Decode(stream);
            return(decodedClaimableBalanceEntryExtensionV1);
        }
            public static void Encode(XdrDataOutputStream stream, ClaimableBalanceEntryExt encodedClaimableBalanceEntryExt)
            {
                stream.WriteInt((int)encodedClaimableBalanceEntryExt.Discriminant);
                switch (encodedClaimableBalanceEntryExt.Discriminant)
                {
                case 0:
                    break;

                case 1:
                    ClaimableBalanceEntryExtensionV1.Encode(stream, encodedClaimableBalanceEntryExt.V1);
                    break;
                }
            }
            public static ClaimableBalanceEntryExt Decode(XdrDataInputStream stream)
            {
                ClaimableBalanceEntryExt decodedClaimableBalanceEntryExt = new ClaimableBalanceEntryExt();
                int discriminant = stream.ReadInt();

                decodedClaimableBalanceEntryExt.Discriminant = discriminant;
                switch (decodedClaimableBalanceEntryExt.Discriminant)
                {
                case 0:
                    break;

                case 1:
                    decodedClaimableBalanceEntryExt.V1 = ClaimableBalanceEntryExtensionV1.Decode(stream);
                    break;
                }
                return(decodedClaimableBalanceEntryExt);
            }
 public static void Encode(XdrDataOutputStream stream, ClaimableBalanceEntryExtensionV1 encodedClaimableBalanceEntryExtensionV1)
 {
     ClaimableBalanceEntryExtensionV1Ext.Encode(stream, encodedClaimableBalanceEntryExtensionV1.Ext);
     Uint32.Encode(stream, encodedClaimableBalanceEntryExtensionV1.Flags);
 }