public async Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) { oprot.IncrementRecursionDepth(); try { var struc = new TStruct("GetSquareMemberResponse"); await oprot.WriteStructBeginAsync(struc, cancellationToken); var field = new TField(); if (SquareMember != null && __isset.squareMember) { field.Name = "squareMember"; field.Type = TType.Struct; field.ID = 1; await oprot.WriteFieldBeginAsync(field, cancellationToken); await SquareMember.WriteAsync(oprot, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if (Relation != null && __isset.relation) { field.Name = "relation"; field.Type = TType.Struct; field.ID = 2; await oprot.WriteFieldBeginAsync(field, cancellationToken); await Relation.WriteAsync(oprot, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if (OneOnOneChatMid != null && __isset.oneOnOneChatMid) { field.Name = "oneOnOneChatMid"; field.Type = TType.String; field.ID = 3; await oprot.WriteFieldBeginAsync(field, cancellationToken); await oprot.WriteStringAsync(OneOnOneChatMid, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } await oprot.WriteFieldStopAsync(cancellationToken); await oprot.WriteStructEndAsync(cancellationToken); } finally { oprot.DecrementRecursionDepth(); } }
public async Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) { oprot.IncrementRecursionDepth(); try { var struc = new TStruct("SquareEventNotifiedCreateSquareMember"); await oprot.WriteStructBeginAsync(struc, cancellationToken); var field = new TField(); if (Square != null && __isset.square) { field.Name = "square"; field.Type = TType.Struct; field.ID = 1; await oprot.WriteFieldBeginAsync(field, cancellationToken); await Square.WriteAsync(oprot, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if (SquareAuthority != null && __isset.squareAuthority) { field.Name = "squareAuthority"; field.Type = TType.Struct; field.ID = 2; await oprot.WriteFieldBeginAsync(field, cancellationToken); await SquareAuthority.WriteAsync(oprot, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if (SquareStatus != null && __isset.squareStatus) { field.Name = "squareStatus"; field.Type = TType.Struct; field.ID = 3; await oprot.WriteFieldBeginAsync(field, cancellationToken); await SquareStatus.WriteAsync(oprot, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if (SquareMember != null && __isset.squareMember) { field.Name = "squareMember"; field.Type = TType.Struct; field.ID = 4; await oprot.WriteFieldBeginAsync(field, cancellationToken); await SquareMember.WriteAsync(oprot, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if (SquareFeatureSet != null && __isset.squareFeatureSet) { field.Name = "squareFeatureSet"; field.Type = TType.Struct; field.ID = 5; await oprot.WriteFieldBeginAsync(field, cancellationToken); await SquareFeatureSet.WriteAsync(oprot, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } await oprot.WriteFieldStopAsync(cancellationToken); await oprot.WriteStructEndAsync(cancellationToken); } finally { oprot.DecrementRecursionDepth(); } }
public async Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) { oprot.IncrementRecursionDepth(); try { var struc = new TStruct("UpdateSquareMemberResponse"); await oprot.WriteStructBeginAsync(struc, cancellationToken); var field = new TField(); if (UpdatedAttrs != null && __isset.updatedAttrs) { field.Name = "updatedAttrs"; field.Type = TType.Set; field.ID = 1; await oprot.WriteFieldBeginAsync(field, cancellationToken); { await oprot.WriteSetBeginAsync(new TSet(TType.I32, UpdatedAttrs.Count), cancellationToken); foreach (SquareMemberAttribute _iter431 in UpdatedAttrs) { await oprot.WriteI32Async((int)_iter431, cancellationToken); } await oprot.WriteSetEndAsync(cancellationToken); } await oprot.WriteFieldEndAsync(cancellationToken); } if (SquareMember != null && __isset.squareMember) { field.Name = "squareMember"; field.Type = TType.Struct; field.ID = 2; await oprot.WriteFieldBeginAsync(field, cancellationToken); await SquareMember.WriteAsync(oprot, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if (UpdatedPreferenceAttrs != null && __isset.updatedPreferenceAttrs) { field.Name = "updatedPreferenceAttrs"; field.Type = TType.Set; field.ID = 3; await oprot.WriteFieldBeginAsync(field, cancellationToken); { await oprot.WriteSetBeginAsync(new TSet(TType.I32, UpdatedPreferenceAttrs.Count), cancellationToken); foreach (SquarePreferenceAttribute _iter432 in UpdatedPreferenceAttrs) { await oprot.WriteI32Async((int)_iter432, cancellationToken); } await oprot.WriteSetEndAsync(cancellationToken); } await oprot.WriteFieldEndAsync(cancellationToken); } await oprot.WriteFieldStopAsync(cancellationToken); await oprot.WriteStructEndAsync(cancellationToken); } finally { oprot.DecrementRecursionDepth(); } }