package nano;

import com.google.protobuf.nano.CodedInputByteBufferNano;
import com.google.protobuf.nano.CodedOutputByteBufferNano;
import com.google.protobuf.nano.InternalNano;
import com.google.protobuf.nano.InvalidProtocolBufferNanoException;
import com.google.protobuf.nano.MessageNano;
import com.google.protobuf.nano.WireFormatNano;
import java.io.IOException;
import nano.TradeDataRequest;

/* compiled from: TbsSdkJava */
public interface TradeDataResponse {

    /* compiled from: TbsSdkJava */
    public static final class TradeData_Response extends MessageNano {

        private static volatile TradeData_Response[] _emptyArray;

        private int bitField0_;

        private int closePrice_;

        public TradeDataRequest.TradeData_Request inputParams;

        private int intervalSize_;

        private int lastDate_;

        public TradeData[] outputParams;

        /* compiled from: TbsSdkJava */
        public static final class TradeData extends MessageNano {

            private static volatile TradeData[] _emptyArray;

            private int bitField0_;

            private int direction_;

            private int index_;

            private int number_;

            private int price_;

            private int time_;

            private int volume_;

            public TradeData() {
                clear();
            }

            public static TradeData[] emptyArray() {
                if (_emptyArray == null) {
                    synchronized (InternalNano.LAZY_INIT_LOCK) {
                        try {
                            if (_emptyArray == null) {
                                _emptyArray = new TradeData[0];
                            }
                        } catch (Throwable th) {
                            throw th;
                        }
                    }
                }
                return _emptyArray;
            }

            public static TradeData parseFrom(byte[] bArr) throws InvalidProtocolBufferNanoException {
                return (TradeData) MessageNano.mergeFrom(new TradeData(), bArr);
            }

            public TradeData clear() {
                this.bitField0_ = 0;
                this.time_ = 0;
                this.price_ = 0;
                this.volume_ = 0;
                this.index_ = 0;
                this.direction_ = 0;
                this.number_ = 0;
                this.cachedSize = -1;
                return this;
            }

            public TradeData clearDirection() {
                this.direction_ = 0;
                this.bitField0_ &= -17;
                return this;
            }

            public TradeData clearIndex() {
                this.index_ = 0;
                this.bitField0_ &= -9;
                return this;
            }

            public TradeData clearNumber() {
                this.number_ = 0;
                this.bitField0_ &= -33;
                return this;
            }

            public TradeData clearPrice() {
                this.price_ = 0;
                this.bitField0_ &= -3;
                return this;
            }

            public TradeData clearTime() {
                this.time_ = 0;
                this.bitField0_ &= -2;
                return this;
            }

            public TradeData clearVolume() {
                this.volume_ = 0;
                this.bitField0_ &= -5;
                return this;
            }

            /* access modifiers changed from: protected */
            public int computeSerializedSize() {
                int computeSerializedSize = super.computeSerializedSize();
                if ((this.bitField0_ & 1) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(1, this.time_);
                }
                if ((this.bitField0_ & 2) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(2, this.price_);
                }
                if ((this.bitField0_ & 4) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(3, this.volume_);
                }
                if ((this.bitField0_ & 8) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(4, this.index_);
                }
                if ((this.bitField0_ & 16) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeSInt32Size(5, this.direction_);
                }
                if ((this.bitField0_ & 32) != 0) {
                    return computeSerializedSize + CodedOutputByteBufferNano.computeUInt32Size(6, this.number_);
                }
                return computeSerializedSize;
            }

            public int getDirection() {
                return this.direction_;
            }

            public int getIndex() {
                return this.index_;
            }

            public int getNumber() {
                return this.number_;
            }

            public int getPrice() {
                return this.price_;
            }

            public int getTime() {
                return this.time_;
            }

            public int getVolume() {
                return this.volume_;
            }

            public boolean hasDirection() {
                if ((this.bitField0_ & 16) != 0) {
                    return true;
                }
                return false;
            }

            public boolean hasIndex() {
                if ((this.bitField0_ & 8) != 0) {
                    return true;
                }
                return false;
            }

            public boolean hasNumber() {
                if ((this.bitField0_ & 32) != 0) {
                    return true;
                }
                return false;
            }

            public boolean hasPrice() {
                if ((this.bitField0_ & 2) != 0) {
                    return true;
                }
                return false;
            }

            public boolean hasTime() {
                if ((this.bitField0_ & 1) != 0) {
                    return true;
                }
                return false;
            }

            public boolean hasVolume() {
                if ((this.bitField0_ & 4) != 0) {
                    return true;
                }
                return false;
            }

            public TradeData setDirection(int i10) {
                this.direction_ = i10;
                this.bitField0_ |= 16;
                return this;
            }

            public TradeData setIndex(int i10) {
                this.index_ = i10;
                this.bitField0_ |= 8;
                return this;
            }

            public TradeData setNumber(int i10) {
                this.number_ = i10;
                this.bitField0_ |= 32;
                return this;
            }

            public TradeData setPrice(int i10) {
                this.price_ = i10;
                this.bitField0_ |= 2;
                return this;
            }

            public TradeData setTime(int i10) {
                this.time_ = i10;
                this.bitField0_ |= 1;
                return this;
            }

            public TradeData setVolume(int i10) {
                this.volume_ = i10;
                this.bitField0_ |= 4;
                return this;
            }

            public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
                if ((this.bitField0_ & 1) != 0) {
                    codedOutputByteBufferNano.writeUInt32(1, this.time_);
                }
                if ((this.bitField0_ & 2) != 0) {
                    codedOutputByteBufferNano.writeUInt32(2, this.price_);
                }
                if ((this.bitField0_ & 4) != 0) {
                    codedOutputByteBufferNano.writeUInt32(3, this.volume_);
                }
                if ((this.bitField0_ & 8) != 0) {
                    codedOutputByteBufferNano.writeUInt32(4, this.index_);
                }
                if ((this.bitField0_ & 16) != 0) {
                    codedOutputByteBufferNano.writeSInt32(5, this.direction_);
                }
                if ((this.bitField0_ & 32) != 0) {
                    codedOutputByteBufferNano.writeUInt32(6, this.number_);
                }
                super.writeTo(codedOutputByteBufferNano);
            }

            public static TradeData parseFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
                return new TradeData().mergeFrom(codedInputByteBufferNano);
            }

            public TradeData mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
                while (true) {
                    int readTag = codedInputByteBufferNano.readTag();
                    if (readTag == 0) {
                        return this;
                    }
                    if (readTag == 8) {
                        this.time_ = codedInputByteBufferNano.readUInt32();
                        this.bitField0_ |= 1;
                    } else if (readTag == 16) {
                        this.price_ = codedInputByteBufferNano.readUInt32();
                        this.bitField0_ |= 2;
                    } else if (readTag == 24) {
                        this.volume_ = codedInputByteBufferNano.readUInt32();
                        this.bitField0_ |= 4;
                    } else if (readTag == 32) {
                        this.index_ = codedInputByteBufferNano.readUInt32();
                        this.bitField0_ |= 8;
                    } else if (readTag == 40) {
                        this.direction_ = codedInputByteBufferNano.readSInt32();
                        this.bitField0_ |= 16;
                    } else if (readTag == 48) {
                        this.number_ = codedInputByteBufferNano.readUInt32();
                        this.bitField0_ |= 32;
                    } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                        return this;
                    }
                }
            }
        }

        public TradeData_Response() {
            clear();
        }

        public static TradeData_Response[] emptyArray() {
            if (_emptyArray == null) {
                synchronized (InternalNano.LAZY_INIT_LOCK) {
                    try {
                        if (_emptyArray == null) {
                            _emptyArray = new TradeData_Response[0];
                        }
                    } catch (Throwable th) {
                        throw th;
                    }
                }
            }
            return _emptyArray;
        }

        public static TradeData_Response parseFrom(byte[] bArr) throws InvalidProtocolBufferNanoException {
            return (TradeData_Response) MessageNano.mergeFrom(new TradeData_Response(), bArr);
        }

        public TradeData_Response clear() {
            this.bitField0_ = 0;
            this.inputParams = null;
            this.outputParams = TradeData.emptyArray();
            this.lastDate_ = 0;
            this.closePrice_ = 0;
            this.intervalSize_ = 0;
            this.cachedSize = -1;
            return this;
        }

        public TradeData_Response clearClosePrice() {
            this.closePrice_ = 0;
            this.bitField0_ &= -3;
            return this;
        }

        public TradeData_Response clearIntervalSize() {
            this.intervalSize_ = 0;
            this.bitField0_ &= -5;
            return this;
        }

        public TradeData_Response clearLastDate() {
            this.lastDate_ = 0;
            this.bitField0_ &= -2;
            return this;
        }

        /* access modifiers changed from: protected */
        public int computeSerializedSize() {
            int computeSerializedSize = super.computeSerializedSize();
            TradeDataRequest.TradeData_Request tradeData_Request = this.inputParams;
            if (tradeData_Request != null) {
                computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(1, tradeData_Request);
            }
            TradeData[] tradeDataArr = this.outputParams;
            if (tradeDataArr != null && tradeDataArr.length > 0) {
                int i10 = 0;
                while (true) {
                    TradeData[] tradeDataArr2 = this.outputParams;
                    if (i10 >= tradeDataArr2.length) {
                        break;
                    }
                    TradeData tradeData = tradeDataArr2[i10];
                    if (tradeData != null) {
                        computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(2, tradeData);
                    }
                    i10++;
                }
            }
            if ((this.bitField0_ & 1) != 0) {
                computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(3, this.lastDate_);
            }
            if ((this.bitField0_ & 2) != 0) {
                computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(4, this.closePrice_);
            }
            if ((this.bitField0_ & 4) != 0) {
                return computeSerializedSize + CodedOutputByteBufferNano.computeUInt32Size(5, this.intervalSize_);
            }
            return computeSerializedSize;
        }

        public int getClosePrice() {
            return this.closePrice_;
        }

        public int getIntervalSize() {
            return this.intervalSize_;
        }

        public int getLastDate() {
            return this.lastDate_;
        }

        public boolean hasClosePrice() {
            if ((this.bitField0_ & 2) != 0) {
                return true;
            }
            return false;
        }

        public boolean hasIntervalSize() {
            if ((this.bitField0_ & 4) != 0) {
                return true;
            }
            return false;
        }

        public boolean hasLastDate() {
            if ((this.bitField0_ & 1) != 0) {
                return true;
            }
            return false;
        }

        public TradeData_Response setClosePrice(int i10) {
            this.closePrice_ = i10;
            this.bitField0_ |= 2;
            return this;
        }

        public TradeData_Response setIntervalSize(int i10) {
            this.intervalSize_ = i10;
            this.bitField0_ |= 4;
            return this;
        }

        public TradeData_Response setLastDate(int i10) {
            this.lastDate_ = i10;
            this.bitField0_ |= 1;
            return this;
        }

        public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
            TradeDataRequest.TradeData_Request tradeData_Request = this.inputParams;
            if (tradeData_Request != null) {
                codedOutputByteBufferNano.writeMessage(1, tradeData_Request);
            }
            TradeData[] tradeDataArr = this.outputParams;
            if (tradeDataArr != null && tradeDataArr.length > 0) {
                int i10 = 0;
                while (true) {
                    TradeData[] tradeDataArr2 = this.outputParams;
                    if (i10 >= tradeDataArr2.length) {
                        break;
                    }
                    TradeData tradeData = tradeDataArr2[i10];
                    if (tradeData != null) {
                        codedOutputByteBufferNano.writeMessage(2, tradeData);
                    }
                    i10++;
                }
            }
            if ((this.bitField0_ & 1) != 0) {
                codedOutputByteBufferNano.writeUInt32(3, this.lastDate_);
            }
            if ((this.bitField0_ & 2) != 0) {
                codedOutputByteBufferNano.writeUInt32(4, this.closePrice_);
            }
            if ((this.bitField0_ & 4) != 0) {
                codedOutputByteBufferNano.writeUInt32(5, this.intervalSize_);
            }
            super.writeTo(codedOutputByteBufferNano);
        }

        public static TradeData_Response parseFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
            return new TradeData_Response().mergeFrom(codedInputByteBufferNano);
        }

        public TradeData_Response mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
            while (true) {
                int readTag = codedInputByteBufferNano.readTag();
                if (readTag == 0) {
                    return this;
                }
                if (readTag == 10) {
                    if (this.inputParams == null) {
                        this.inputParams = new TradeDataRequest.TradeData_Request();
                    }
                    codedInputByteBufferNano.readMessage(this.inputParams);
                } else if (readTag == 18) {
                    int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 18);
                    TradeData[] tradeDataArr = this.outputParams;
                    int length = tradeDataArr == null ? 0 : tradeDataArr.length;
                    int i10 = repeatedFieldArrayLength + length;
                    TradeData[] tradeDataArr2 = new TradeData[i10];
                    if (length != 0) {
                        System.arraycopy(tradeDataArr, 0, tradeDataArr2, 0, length);
                    }
                    while (length < i10 - 1) {
                        TradeData tradeData = new TradeData();
                        tradeDataArr2[length] = tradeData;
                        codedInputByteBufferNano.readMessage(tradeData);
                        codedInputByteBufferNano.readTag();
                        length++;
                    }
                    TradeData tradeData2 = new TradeData();
                    tradeDataArr2[length] = tradeData2;
                    codedInputByteBufferNano.readMessage(tradeData2);
                    this.outputParams = tradeDataArr2;
                } else if (readTag == 24) {
                    this.lastDate_ = codedInputByteBufferNano.readUInt32();
                    this.bitField0_ |= 1;
                } else if (readTag == 32) {
                    this.closePrice_ = codedInputByteBufferNano.readUInt32();
                    this.bitField0_ |= 2;
                } else if (readTag == 40) {
                    this.intervalSize_ = codedInputByteBufferNano.readUInt32();
                    this.bitField0_ |= 4;
                } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                    return this;
                }
            }
        }
    }
}
