public async Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) { oprot.IncrementRecursionDepth(); try { var struc = new TStruct("TScan"); await oprot.WriteStructBeginAsync(struc, cancellationToken); var field = new TField(); if (StartRow != null && __isset.startRow) { field.Name = "startRow"; field.Type = TType.String; field.ID = 1; await oprot.WriteFieldBeginAsync(field, cancellationToken); await oprot.WriteBinaryAsync(StartRow, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if (StopRow != null && __isset.stopRow) { field.Name = "stopRow"; field.Type = TType.String; field.ID = 2; await oprot.WriteFieldBeginAsync(field, cancellationToken); await oprot.WriteBinaryAsync(StopRow, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if (Columns != null && __isset.columns) { field.Name = "columns"; field.Type = TType.List; field.ID = 3; await oprot.WriteFieldBeginAsync(field, cancellationToken); { await oprot.WriteListBeginAsync(new TList(TType.Struct, Columns.Count), cancellationToken); foreach (TColumn _iter60 in Columns) { await _iter60.WriteAsync(oprot, cancellationToken); } await oprot.WriteListEndAsync(cancellationToken); } await oprot.WriteFieldEndAsync(cancellationToken); } if (__isset.caching) { field.Name = "caching"; field.Type = TType.I32; field.ID = 4; await oprot.WriteFieldBeginAsync(field, cancellationToken); await oprot.WriteI32Async(Caching, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if (__isset.maxVersions) { field.Name = "maxVersions"; field.Type = TType.I32; field.ID = 5; await oprot.WriteFieldBeginAsync(field, cancellationToken); await oprot.WriteI32Async(MaxVersions, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if (TimeRange != null && __isset.timeRange) { field.Name = "timeRange"; field.Type = TType.Struct; field.ID = 6; await oprot.WriteFieldBeginAsync(field, cancellationToken); await TimeRange.WriteAsync(oprot, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if (FilterString != null && __isset.filterString) { field.Name = "filterString"; field.Type = TType.String; field.ID = 7; await oprot.WriteFieldBeginAsync(field, cancellationToken); await oprot.WriteBinaryAsync(FilterString, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if (__isset.batchSize) { field.Name = "batchSize"; field.Type = TType.I32; field.ID = 8; await oprot.WriteFieldBeginAsync(field, cancellationToken); await oprot.WriteI32Async(BatchSize, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if (Attributes != null && __isset.attributes) { field.Name = "attributes"; field.Type = TType.Map; field.ID = 9; await oprot.WriteFieldBeginAsync(field, cancellationToken); { await oprot.WriteMapBeginAsync(new TMap(TType.String, TType.String, Attributes.Count), cancellationToken); foreach (byte[] _iter61 in Attributes.Keys) { await oprot.WriteBinaryAsync(_iter61, cancellationToken); await oprot.WriteBinaryAsync(Attributes[_iter61], cancellationToken); } await oprot.WriteMapEndAsync(cancellationToken); } await oprot.WriteFieldEndAsync(cancellationToken); } if (Authorizations != null && __isset.authorizations) { field.Name = "authorizations"; field.Type = TType.Struct; field.ID = 10; await oprot.WriteFieldBeginAsync(field, cancellationToken); await Authorizations.WriteAsync(oprot, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } if (__isset.reversed) { field.Name = "reversed"; field.Type = TType.Bool; field.ID = 11; await oprot.WriteFieldBeginAsync(field, cancellationToken); await oprot.WriteBoolAsync(Reversed, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } await oprot.WriteFieldStopAsync(cancellationToken); await oprot.WriteStructEndAsync(cancellationToken); } finally { oprot.DecrementRecursionDepth(); } }