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.BargainDataRequest;

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

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

        private static volatile BargainData_Response[] _emptyArray;

        private int bitField0_;

        private int closePrice_;

        public BargainDataRequest.BargainData_Request inputParams;

        private int lastDate_;

        private int openInterest_;

        public TickByTick[] outputParams;

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

            private static volatile TickByTick[] _emptyArray;

            private int bitField0_;

            private long holdVolume_;

            private int price_;

            private int time_;

            private int tradeDirection_;

            private long tradeNo_;

            private long volume_;

            public TickByTick() {
                clear();
            }

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

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

            public TickByTick clear() {
                this.bitField0_ = 0;
                this.time_ = 0;
                this.price_ = 0;
                this.volume_ = 0;
                this.tradeNo_ = 0;
                this.tradeDirection_ = 0;
                this.holdVolume_ = 0;
                this.cachedSize = -1;
                return this;
            }

            public TickByTick clearHoldVolume() {
                this.holdVolume_ = 0;
                this.bitField0_ &= -33;
                return this;
            }

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

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

            public TickByTick clearTradeDirection() {
                this.tradeDirection_ = 0;
                this.bitField0_ &= -17;
                return this;
            }

            public TickByTick clearTradeNo() {
                this.tradeNo_ = 0;
                this.bitField0_ &= -9;
                return this;
            }

            public TickByTick 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.computeUInt64Size(3, this.volume_);
                }
                if ((this.bitField0_ & 8) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeUInt64Size(4, this.tradeNo_);
                }
                if ((this.bitField0_ & 16) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeInt32Size(5, this.tradeDirection_);
                }
                if ((this.bitField0_ & 32) != 0) {
                    return computeSerializedSize + CodedOutputByteBufferNano.computeUInt64Size(6, this.holdVolume_);
                }
                return computeSerializedSize;
            }

            public long getHoldVolume() {
                return this.holdVolume_;
            }

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

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

            public int getTradeDirection() {
                return this.tradeDirection_;
            }

            public long getTradeNo() {
                return this.tradeNo_;
            }

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

            public boolean hasHoldVolume() {
                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 hasTradeDirection() {
                if ((this.bitField0_ & 16) != 0) {
                    return true;
                }
                return false;
            }

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

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

            public TickByTick setHoldVolume(long j10) {
                this.holdVolume_ = j10;
                this.bitField0_ |= 32;
                return this;
            }

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

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

            public TickByTick setTradeDirection(int i10) {
                this.tradeDirection_ = i10;
                this.bitField0_ |= 16;
                return this;
            }

            public TickByTick setTradeNo(long j10) {
                this.tradeNo_ = j10;
                this.bitField0_ |= 8;
                return this;
            }

            public TickByTick setVolume(long j10) {
                this.volume_ = j10;
                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.writeUInt64(3, this.volume_);
                }
                if ((this.bitField0_ & 8) != 0) {
                    codedOutputByteBufferNano.writeUInt64(4, this.tradeNo_);
                }
                if ((this.bitField0_ & 16) != 0) {
                    codedOutputByteBufferNano.writeInt32(5, this.tradeDirection_);
                }
                if ((this.bitField0_ & 32) != 0) {
                    codedOutputByteBufferNano.writeUInt64(6, this.holdVolume_);
                }
                super.writeTo(codedOutputByteBufferNano);
            }

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

            public TickByTick 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.readUInt64();
                        this.bitField0_ |= 4;
                    } else if (readTag == 32) {
                        this.tradeNo_ = codedInputByteBufferNano.readUInt64();
                        this.bitField0_ |= 8;
                    } else if (readTag == 40) {
                        this.tradeDirection_ = codedInputByteBufferNano.readInt32();
                        this.bitField0_ |= 16;
                    } else if (readTag == 48) {
                        this.holdVolume_ = codedInputByteBufferNano.readUInt64();
                        this.bitField0_ |= 32;
                    } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                        return this;
                    }
                }
            }
        }

        public BargainData_Response() {
            clear();
        }

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

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

        public BargainData_Response clear() {
            this.bitField0_ = 0;
            this.inputParams = null;
            this.outputParams = TickByTick.emptyArray();
            this.lastDate_ = 0;
            this.closePrice_ = 0;
            this.openInterest_ = 0;
            this.cachedSize = -1;
            return this;
        }

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

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

        public BargainData_Response clearOpenInterest() {
            this.openInterest_ = 0;
            this.bitField0_ &= -5;
            return this;
        }

        /* access modifiers changed from: protected */
        public int computeSerializedSize() {
            int computeSerializedSize = super.computeSerializedSize();
            BargainDataRequest.BargainData_Request bargainData_Request = this.inputParams;
            if (bargainData_Request != null) {
                computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(1, bargainData_Request);
            }
            TickByTick[] tickByTickArr = this.outputParams;
            if (tickByTickArr != null && tickByTickArr.length > 0) {
                int i10 = 0;
                while (true) {
                    TickByTick[] tickByTickArr2 = this.outputParams;
                    if (i10 >= tickByTickArr2.length) {
                        break;
                    }
                    TickByTick tickByTick = tickByTickArr2[i10];
                    if (tickByTick != null) {
                        computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(2, tickByTick);
                    }
                    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.openInterest_);
            }
            return computeSerializedSize;
        }

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

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

        public int getOpenInterest() {
            return this.openInterest_;
        }

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

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

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

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

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

        public BargainData_Response setOpenInterest(int i10) {
            this.openInterest_ = i10;
            this.bitField0_ |= 4;
            return this;
        }

        public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
            BargainDataRequest.BargainData_Request bargainData_Request = this.inputParams;
            if (bargainData_Request != null) {
                codedOutputByteBufferNano.writeMessage(1, bargainData_Request);
            }
            TickByTick[] tickByTickArr = this.outputParams;
            if (tickByTickArr != null && tickByTickArr.length > 0) {
                int i10 = 0;
                while (true) {
                    TickByTick[] tickByTickArr2 = this.outputParams;
                    if (i10 >= tickByTickArr2.length) {
                        break;
                    }
                    TickByTick tickByTick = tickByTickArr2[i10];
                    if (tickByTick != null) {
                        codedOutputByteBufferNano.writeMessage(2, tickByTick);
                    }
                    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.openInterest_);
            }
            super.writeTo(codedOutputByteBufferNano);
        }

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

        public BargainData_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 BargainDataRequest.BargainData_Request();
                    }
                    codedInputByteBufferNano.readMessage(this.inputParams);
                } else if (readTag == 18) {
                    int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 18);
                    TickByTick[] tickByTickArr = this.outputParams;
                    int length = tickByTickArr == null ? 0 : tickByTickArr.length;
                    int i10 = repeatedFieldArrayLength + length;
                    TickByTick[] tickByTickArr2 = new TickByTick[i10];
                    if (length != 0) {
                        System.arraycopy(tickByTickArr, 0, tickByTickArr2, 0, length);
                    }
                    while (length < i10 - 1) {
                        TickByTick tickByTick = new TickByTick();
                        tickByTickArr2[length] = tickByTick;
                        codedInputByteBufferNano.readMessage(tickByTick);
                        codedInputByteBufferNano.readTag();
                        length++;
                    }
                    TickByTick tickByTick2 = new TickByTick();
                    tickByTickArr2[length] = tickByTick2;
                    codedInputByteBufferNano.readMessage(tickByTick2);
                    this.outputParams = tickByTickArr2;
                } 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.openInterest_ = codedInputByteBufferNano.readUInt32();
                    this.bitField0_ |= 4;
                } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                    return this;
                }
            }
        }
    }
}
