public async Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) { iprot.IncrementRecursionDepth(); try { TField field; await iprot.ReadStructBeginAsync(cancellationToken); while (true) { field = await iprot.ReadFieldBeginAsync(cancellationToken); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 0: if (field.Type == TType.List) { { TList _list0 = await iprot.ReadListBeginAsync(cancellationToken); Success = new List <BaggageRestriction>(_list0.Count); for (int _i1 = 0; _i1 < _list0.Count; ++_i1) { BaggageRestriction _elem2; _elem2 = new BaggageRestriction(); await _elem2.ReadAsync(iprot, cancellationToken); Success.Add(_elem2); } await iprot.ReadListEndAsync(cancellationToken); } } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; default: await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); break; } await iprot.ReadFieldEndAsync(cancellationToken); } await iprot.ReadStructEndAsync(cancellationToken); } finally { iprot.DecrementRecursionDepth(); } }
public BaggageRestriction DeepCopy() { var tmp0 = new BaggageRestriction(); if ((BaggageKey != null)) { tmp0.BaggageKey = this.BaggageKey; } tmp0.MaxValueLength = this.MaxValueLength; return(tmp0); }