public void read()

in src/main/java/org/apache/flink/benchmark/thrift/MyPojo.java [980:1085]


        public void read(org.apache.thrift.protocol.TProtocol iprot, MyPojo struct)
                throws org.apache.thrift.TException {
            org.apache.thrift.protocol.TField schemeField;
            iprot.readStructBegin();
            while (true) {
                schemeField = iprot.readFieldBegin();
                if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
                    break;
                }
                switch (schemeField.id) {
                    case 1: // ID
                        if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
                            struct.id = iprot.readI32();
                            struct.setIdIsSet(true);
                        } else {
                            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                        }
                        break;
                    case 2: // NAME
                        if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                            struct.name = iprot.readString();
                            struct.setNameIsSet(true);
                        } else {
                            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                        }
                        break;
                    case 3: // OPERATION_NAME
                        if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                            {
                                org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
                                struct.operationName =
                                        new java.util.ArrayList<java.lang.String>(_list0.size);
                                @org.apache.thrift.annotation.Nullable java.lang.String _elem1;
                                for (int _i2 = 0; _i2 < _list0.size; ++_i2) {
                                    _elem1 = iprot.readString();
                                    struct.operationName.add(_elem1);
                                }
                                iprot.readListEnd();
                            }
                            struct.setOperationNameIsSet(true);
                        } else {
                            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                        }
                        break;
                    case 4: // OPERATIONS
                        if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
                            {
                                org.apache.thrift.protocol.TList _list3 = iprot.readListBegin();
                                struct.operations =
                                        new java.util.ArrayList<MyOperation>(_list3.size);
                                @org.apache.thrift.annotation.Nullable MyOperation _elem4;
                                for (int _i5 = 0; _i5 < _list3.size; ++_i5) {
                                    _elem4 = new MyOperation();
                                    _elem4.read(iprot);
                                    struct.operations.add(_elem4);
                                }
                                iprot.readListEnd();
                            }
                            struct.setOperationsIsSet(true);
                        } else {
                            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                        }
                        break;
                    case 5: // OTHER_ID1
                        if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
                            struct.otherId1 = iprot.readI32();
                            struct.setOtherId1IsSet(true);
                        } else {
                            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                        }
                        break;
                    case 6: // OTHER_ID2
                        if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
                            struct.otherId2 = iprot.readI32();
                            struct.setOtherId2IsSet(true);
                        } else {
                            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                        }
                        break;
                    case 7: // OTHER_ID3
                        if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
                            struct.otherId3 = iprot.readI32();
                            struct.setOtherId3IsSet(true);
                        } else {
                            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                        }
                        break;
                    case 8: // SOME_OBJECT
                        if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
                            struct.someObject = iprot.readString();
                            struct.setSomeObjectIsSet(true);
                        } else {
                            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                        }
                        break;
                    default:
                        org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
                }
                iprot.readFieldEnd();
            }
            iprot.readStructEnd();

            // check for required fields of primitive type, which can't be checked in the validate
            // method
            struct.validate();
        }