public static void Encode(XdrDataOutputStream stream, ClaimPredicate encodedClaimPredicate)
        {
            stream.WriteInt((int)encodedClaimPredicate.Discriminant.InnerValue);
            switch (encodedClaimPredicate.Discriminant.InnerValue)
            {
            case ClaimPredicateType.ClaimPredicateTypeEnum.CLAIM_PREDICATE_UNCONDITIONAL:
                break;

            case ClaimPredicateType.ClaimPredicateTypeEnum.CLAIM_PREDICATE_AND:
                int andPredicatessize = encodedClaimPredicate.AndPredicates.Length;
                stream.WriteInt(andPredicatessize);
                for (int i = 0; i < andPredicatessize; i++)
                {
                    ClaimPredicate.Encode(stream, encodedClaimPredicate.AndPredicates[i]);
                }
                break;

            case ClaimPredicateType.ClaimPredicateTypeEnum.CLAIM_PREDICATE_OR:
                int orPredicatessize = encodedClaimPredicate.OrPredicates.Length;
                stream.WriteInt(orPredicatessize);
                for (int i = 0; i < orPredicatessize; i++)
                {
                    ClaimPredicate.Encode(stream, encodedClaimPredicate.OrPredicates[i]);
                }
                break;

            case ClaimPredicateType.ClaimPredicateTypeEnum.CLAIM_PREDICATE_NOT:
                if (encodedClaimPredicate.NotPredicate != null)
                {
                    stream.WriteInt(1);
                    ClaimPredicate.Encode(stream, encodedClaimPredicate.NotPredicate);
                }
                else
                {
                    stream.WriteInt(0);
                }
                break;

            case ClaimPredicateType.ClaimPredicateTypeEnum.CLAIM_PREDICATE_BEFORE_ABSOLUTE_TIME:
                Int64.Encode(stream, encodedClaimPredicate.AbsBefore);
                break;

            case ClaimPredicateType.ClaimPredicateTypeEnum.CLAIM_PREDICATE_BEFORE_RELATIVE_TIME:
                Int64.Encode(stream, encodedClaimPredicate.RelBefore);
                break;
            }
        }
 public static void Encode(XdrDataOutputStream stream, ClaimantV0 encodedClaimantV0)
 {
     AccountID.Encode(stream, encodedClaimantV0.Destination);
     ClaimPredicate.Encode(stream, encodedClaimantV0.Predicate);
 }