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 1:
                    if (field.Type == TType.String)
                    {
                        SquareMid = await iprot.ReadStringAsync(cancellationToken);
                    }
                    else
                    {
                        await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                    }
                    break;

                case 2:
                    if (field.Type == TType.Struct)
                    {
                        Status = new NoteStatus();
                        await Status.ReadAsync(iprot, 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 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 1:
                    if (field.Type == TType.Struct)
                    {
                        Square = new Square();
                        await Square.ReadAsync(iprot, cancellationToken);
                    }
                    else
                    {
                        await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                    }
                    break;

                case 2:
                    if (field.Type == TType.Struct)
                    {
                        SquareAuthority = new SquareAuthority();
                        await SquareAuthority.ReadAsync(iprot, cancellationToken);
                    }
                    else
                    {
                        await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                    }
                    break;

                case 3:
                    if (field.Type == TType.Struct)
                    {
                        SquareStatus = new SquareStatus();
                        await SquareStatus.ReadAsync(iprot, cancellationToken);
                    }
                    else
                    {
                        await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                    }
                    break;

                case 4:
                    if (field.Type == TType.Struct)
                    {
                        SquareMember = new SquareMember();
                        await SquareMember.ReadAsync(iprot, cancellationToken);
                    }
                    else
                    {
                        await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                    }
                    break;

                case 5:
                    if (field.Type == TType.Struct)
                    {
                        SquareFeatureSet = new SquareFeatureSet();
                        await SquareFeatureSet.ReadAsync(iprot, cancellationToken);
                    }
                    else
                    {
                        await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                    }
                    break;

                case 6:
                    if (field.Type == TType.Struct)
                    {
                        NoteStatus = new NoteStatus();
                        await NoteStatus.ReadAsync(iprot, 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 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 1:
                    if (field.Type == TType.List)
                    {
                        {
                            TList _list390 = await iprot.ReadListBeginAsync(cancellationToken);

                            Squares = new List <Square>(_list390.Count);
                            for (int _i391 = 0; _i391 < _list390.Count; ++_i391)
                            {
                                Square _elem392;
                                _elem392 = new Square();
                                await _elem392.ReadAsync(iprot, cancellationToken);

                                Squares.Add(_elem392);
                            }
                            await iprot.ReadListEndAsync(cancellationToken);
                        }
                    }
                    else
                    {
                        await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                    }
                    break;

                case 2:
                    if (field.Type == TType.Map)
                    {
                        {
                            TMap _map393 = await iprot.ReadMapBeginAsync(cancellationToken);

                            SquareStatuses = new Dictionary <string, SquareStatus>(_map393.Count);
                            for (int _i394 = 0; _i394 < _map393.Count; ++_i394)
                            {
                                string       _key395;
                                SquareStatus _val396;
                                _key395 = await iprot.ReadStringAsync(cancellationToken);

                                _val396 = new SquareStatus();
                                await _val396.ReadAsync(iprot, cancellationToken);

                                SquareStatuses[_key395] = _val396;
                            }
                            await iprot.ReadMapEndAsync(cancellationToken);
                        }
                    }
                    else
                    {
                        await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                    }
                    break;

                case 3:
                    if (field.Type == TType.Map)
                    {
                        {
                            TMap _map397 = await iprot.ReadMapBeginAsync(cancellationToken);

                            MyMemberships = new Dictionary <string, SquareMember>(_map397.Count);
                            for (int _i398 = 0; _i398 < _map397.Count; ++_i398)
                            {
                                string       _key399;
                                SquareMember _val400;
                                _key399 = await iprot.ReadStringAsync(cancellationToken);

                                _val400 = new SquareMember();
                                await _val400.ReadAsync(iprot, cancellationToken);

                                MyMemberships[_key399] = _val400;
                            }
                            await iprot.ReadMapEndAsync(cancellationToken);
                        }
                    }
                    else
                    {
                        await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                    }
                    break;

                case 4:
                    if (field.Type == TType.String)
                    {
                        ContinuationToken = await iprot.ReadStringAsync(cancellationToken);
                    }
                    else
                    {
                        await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                    }
                    break;

                case 5:
                    if (field.Type == TType.Map)
                    {
                        {
                            TMap _map401 = await iprot.ReadMapBeginAsync(cancellationToken);

                            NoteStatuses = new Dictionary <string, NoteStatus>(_map401.Count);
                            for (int _i402 = 0; _i402 < _map401.Count; ++_i402)
                            {
                                string     _key403;
                                NoteStatus _val404;
                                _key403 = await iprot.ReadStringAsync(cancellationToken);

                                _val404 = new NoteStatus();
                                await _val404.ReadAsync(iprot, cancellationToken);

                                NoteStatuses[_key403] = _val404;
                            }
                            await iprot.ReadMapEndAsync(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 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 1:
                    if (field.Type == TType.List)
                    {
                        {
                            Squares = new List <Square>();
                            TList _list296 = await iprot.ReadListBeginAsync(cancellationToken);

                            for (int _i297 = 0; _i297 < _list296.Count; ++_i297)
                            {
                                Square _elem298;
                                _elem298 = new Square();
                                await _elem298.ReadAsync(iprot, cancellationToken);

                                Squares.Add(_elem298);
                            }
                            await iprot.ReadListEndAsync(cancellationToken);
                        }
                    }
                    else
                    {
                        await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                    }
                    break;

                case 2:
                    if (field.Type == TType.Map)
                    {
                        {
                            Members = new Dictionary <string, SquareMember>();
                            TMap _map299 = await iprot.ReadMapBeginAsync(cancellationToken);

                            for (int _i300 = 0; _i300 < _map299.Count; ++_i300)
                            {
                                string       _key301;
                                SquareMember _val302;
                                _key301 = await iprot.ReadStringAsync(cancellationToken);

                                _val302 = new SquareMember();
                                await _val302.ReadAsync(iprot, cancellationToken);

                                Members[_key301] = _val302;
                            }
                            await iprot.ReadMapEndAsync(cancellationToken);
                        }
                    }
                    else
                    {
                        await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                    }
                    break;

                case 3:
                    if (field.Type == TType.Map)
                    {
                        {
                            Authorities = new Dictionary <string, SquareAuthority>();
                            TMap _map303 = await iprot.ReadMapBeginAsync(cancellationToken);

                            for (int _i304 = 0; _i304 < _map303.Count; ++_i304)
                            {
                                string          _key305;
                                SquareAuthority _val306;
                                _key305 = await iprot.ReadStringAsync(cancellationToken);

                                _val306 = new SquareAuthority();
                                await _val306.ReadAsync(iprot, cancellationToken);

                                Authorities[_key305] = _val306;
                            }
                            await iprot.ReadMapEndAsync(cancellationToken);
                        }
                    }
                    else
                    {
                        await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                    }
                    break;

                case 4:
                    if (field.Type == TType.Map)
                    {
                        {
                            Statuses = new Dictionary <string, SquareStatus>();
                            TMap _map307 = await iprot.ReadMapBeginAsync(cancellationToken);

                            for (int _i308 = 0; _i308 < _map307.Count; ++_i308)
                            {
                                string       _key309;
                                SquareStatus _val310;
                                _key309 = await iprot.ReadStringAsync(cancellationToken);

                                _val310 = new SquareStatus();
                                await _val310.ReadAsync(iprot, cancellationToken);

                                Statuses[_key309] = _val310;
                            }
                            await iprot.ReadMapEndAsync(cancellationToken);
                        }
                    }
                    else
                    {
                        await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                    }
                    break;

                case 5:
                    if (field.Type == TType.String)
                    {
                        ContinuationToken = await iprot.ReadStringAsync(cancellationToken);
                    }
                    else
                    {
                        await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken);
                    }
                    break;

                case 6:
                    if (field.Type == TType.Map)
                    {
                        {
                            NoteStatuses = new Dictionary <string, NoteStatus>();
                            TMap _map311 = await iprot.ReadMapBeginAsync(cancellationToken);

                            for (int _i312 = 0; _i312 < _map311.Count; ++_i312)
                            {
                                string     _key313;
                                NoteStatus _val314;
                                _key313 = await iprot.ReadStringAsync(cancellationToken);

                                _val314 = new NoteStatus();
                                await _val314.ReadAsync(iprot, cancellationToken);

                                NoteStatuses[_key313] = _val314;
                            }
                            await iprot.ReadMapEndAsync(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();
        }
    }