예제 #1
0
        public void Read(TProtocol iprot)
        {
            TField field;

            iprot.ReadStructBegin();
            while (true)
            {
                field = iprot.ReadFieldBegin();
                if (field.Type == TType.Stop)
                {
                    break;
                }
                switch (field.ID)
                {
                case 1:
                    if (field.Type == TType.I32)
                    {
                        this.space_id         = iprot.ReadI32();
                        this.__isset.space_id = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 2:
                    if (field.Type == TType.I32)
                    {
                        this.part_id         = iprot.ReadI32();
                        this.__isset.part_id = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 3:
                    if (field.Type == TType.Struct)
                    {
                        this.vertex_id = new nebula.Value();
                        this.vertex_id.Read(iprot);
                        this.__isset.vertex_id = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 4:
                    if (field.Type == TType.I32)
                    {
                        this.tag_id         = iprot.ReadI32();
                        this.__isset.tag_id = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 5:
                    if (field.Type == TType.List)
                    {
                        {
                            this.updated_props = new List <UpdatedProp>();
                            TList _list139 = iprot.ReadListBegin();
                            for (int _i140 = 0; _i140 < _list139.Count; ++_i140)
                            {
                                UpdatedProp _elem141 = new UpdatedProp();
                                _elem141 = new UpdatedProp();
                                _elem141.Read(iprot);
                                this.updated_props.Add(_elem141);
                            }
                            iprot.ReadListEnd();
                        }
                        this.__isset.updated_props = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 6:
                    if (field.Type == TType.Bool)
                    {
                        this.insertable         = iprot.ReadBool();
                        this.__isset.insertable = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 7:
                    if (field.Type == TType.List)
                    {
                        {
                            this.return_props = new List <byte[]>();
                            TList _list142 = iprot.ReadListBegin();
                            for (int _i143 = 0; _i143 < _list142.Count; ++_i143)
                            {
                                byte[] _elem144 = null;
                                _elem144 = iprot.ReadBinary();
                                this.return_props.Add(_elem144);
                            }
                            iprot.ReadListEnd();
                        }
                        this.__isset.return_props = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 8:
                    if (field.Type == TType.String)
                    {
                        this.condition         = iprot.ReadBinary();
                        this.__isset.condition = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
        }
예제 #2
0
        public void Read(TProtocol iprot)
        {
            TField field;

            iprot.ReadStructBegin();
            while (true)
            {
                field = iprot.ReadFieldBegin();
                if (field.Type == TType.Stop)
                {
                    break;
                }
                switch (field.ID)
                {
                case 1:
                    if (field.Type == TType.I32)
                    {
                        this.space_id         = iprot.ReadI32();
                        this.__isset.space_id = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 2:
                    if (field.Type == TType.I32)
                    {
                        this.part_id         = iprot.ReadI32();
                        this.__isset.part_id = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 3:
                    if (field.Type == TType.Struct)
                    {
                        this.edge_key = new EdgeKey();
                        this.edge_key.Read(iprot);
                        this.__isset.edge_key = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 4:
                    if (field.Type == TType.List)
                    {
                        {
                            this.updated_props = new List <UpdatedProp>();
                            TList _list147 = iprot.ReadListBegin();
                            for (int _i148 = 0; _i148 < _list147.Count; ++_i148)
                            {
                                UpdatedProp _elem149 = new UpdatedProp();
                                _elem149 = new UpdatedProp();
                                _elem149.Read(iprot);
                                this.updated_props.Add(_elem149);
                            }
                            iprot.ReadListEnd();
                        }
                        this.__isset.updated_props = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 5:
                    if (field.Type == TType.Bool)
                    {
                        this.insertable         = iprot.ReadBool();
                        this.__isset.insertable = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 6:
                    if (field.Type == TType.List)
                    {
                        {
                            this.return_props = new List <byte[]>();
                            TList _list150 = iprot.ReadListBegin();
                            for (int _i151 = 0; _i151 < _list150.Count; ++_i151)
                            {
                                byte[] _elem152 = null;
                                _elem152 = iprot.ReadBinary();
                                this.return_props.Add(_elem152);
                            }
                            iprot.ReadListEnd();
                        }
                        this.__isset.return_props = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 7:
                    if (field.Type == TType.String)
                    {
                        this.condition         = iprot.ReadBinary();
                        this.__isset.condition = true;
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
        }