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.NorthCommon;
import nano.NorthStockIncreaseHoldRequest;

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

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

        private static volatile NorthStockIncreaseHold_Response[] _emptyArray;

        private int bitField0_;

        public NorthCommon.TradeDate[] calendarDate;

        public Data[] dataList;

        public NorthStockIncreaseHoldRequest.NorthStockIncreaseHold_Request request;

        private int tradeDate_;

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

            private static volatile Data[] _emptyArray;

            private int bitField0_;

            private long increaseChange_;

            private long increaseValue_;

            public NorthCommon.SecurityInfo stock;

            public Data() {
                clear();
            }

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

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

            public Data clear() {
                this.bitField0_ = 0;
                this.stock = null;
                this.increaseValue_ = 0;
                this.increaseChange_ = 0;
                this.cachedSize = -1;
                return this;
            }

            public Data clearIncreaseChange() {
                this.increaseChange_ = 0;
                this.bitField0_ &= -3;
                return this;
            }

            public Data clearIncreaseValue() {
                this.increaseValue_ = 0;
                this.bitField0_ &= -2;
                return this;
            }

            /* access modifiers changed from: protected */
            public int computeSerializedSize() {
                int computeSerializedSize = super.computeSerializedSize();
                NorthCommon.SecurityInfo securityInfo = this.stock;
                if (securityInfo != null) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(1, securityInfo);
                }
                if ((this.bitField0_ & 1) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeInt64Size(2, this.increaseValue_);
                }
                if ((this.bitField0_ & 2) != 0) {
                    return computeSerializedSize + CodedOutputByteBufferNano.computeInt64Size(3, this.increaseChange_);
                }
                return computeSerializedSize;
            }

            public long getIncreaseChange() {
                return this.increaseChange_;
            }

            public long getIncreaseValue() {
                return this.increaseValue_;
            }

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

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

            public Data setIncreaseChange(long j10) {
                this.increaseChange_ = j10;
                this.bitField0_ |= 2;
                return this;
            }

            public Data setIncreaseValue(long j10) {
                this.increaseValue_ = j10;
                this.bitField0_ |= 1;
                return this;
            }

            public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
                NorthCommon.SecurityInfo securityInfo = this.stock;
                if (securityInfo != null) {
                    codedOutputByteBufferNano.writeMessage(1, securityInfo);
                }
                if ((this.bitField0_ & 1) != 0) {
                    codedOutputByteBufferNano.writeInt64(2, this.increaseValue_);
                }
                if ((this.bitField0_ & 2) != 0) {
                    codedOutputByteBufferNano.writeInt64(3, this.increaseChange_);
                }
                super.writeTo(codedOutputByteBufferNano);
            }

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

            public Data mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
                while (true) {
                    int readTag = codedInputByteBufferNano.readTag();
                    if (readTag == 0) {
                        return this;
                    }
                    if (readTag == 10) {
                        if (this.stock == null) {
                            this.stock = new NorthCommon.SecurityInfo();
                        }
                        codedInputByteBufferNano.readMessage(this.stock);
                    } else if (readTag == 16) {
                        this.increaseValue_ = codedInputByteBufferNano.readInt64();
                        this.bitField0_ |= 1;
                    } else if (readTag == 24) {
                        this.increaseChange_ = codedInputByteBufferNano.readInt64();
                        this.bitField0_ |= 2;
                    } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                        return this;
                    }
                }
            }
        }

        public NorthStockIncreaseHold_Response() {
            clear();
        }

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

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

        public NorthStockIncreaseHold_Response clear() {
            this.bitField0_ = 0;
            this.request = null;
            this.dataList = Data.emptyArray();
            this.tradeDate_ = 0;
            this.calendarDate = NorthCommon.TradeDate.emptyArray();
            this.cachedSize = -1;
            return this;
        }

        public NorthStockIncreaseHold_Response clearTradeDate() {
            this.tradeDate_ = 0;
            this.bitField0_ &= -2;
            return this;
        }

        /* access modifiers changed from: protected */
        public int computeSerializedSize() {
            int computeSerializedSize = super.computeSerializedSize();
            NorthStockIncreaseHoldRequest.NorthStockIncreaseHold_Request northStockIncreaseHold_Request = this.request;
            if (northStockIncreaseHold_Request != null) {
                computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(1, northStockIncreaseHold_Request);
            }
            Data[] dataArr = this.dataList;
            int i10 = 0;
            if (dataArr != null && dataArr.length > 0) {
                int i11 = 0;
                while (true) {
                    Data[] dataArr2 = this.dataList;
                    if (i11 >= dataArr2.length) {
                        break;
                    }
                    Data data = dataArr2[i11];
                    if (data != null) {
                        computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(2, data);
                    }
                    i11++;
                }
            }
            if ((this.bitField0_ & 1) != 0) {
                computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(3, this.tradeDate_);
            }
            NorthCommon.TradeDate[] tradeDateArr = this.calendarDate;
            if (tradeDateArr != null && tradeDateArr.length > 0) {
                while (true) {
                    NorthCommon.TradeDate[] tradeDateArr2 = this.calendarDate;
                    if (i10 >= tradeDateArr2.length) {
                        break;
                    }
                    NorthCommon.TradeDate tradeDate = tradeDateArr2[i10];
                    if (tradeDate != null) {
                        computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(4, tradeDate);
                    }
                    i10++;
                }
            }
            return computeSerializedSize;
        }

        public int getTradeDate() {
            return this.tradeDate_;
        }

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

        public NorthStockIncreaseHold_Response setTradeDate(int i10) {
            this.tradeDate_ = i10;
            this.bitField0_ |= 1;
            return this;
        }

        public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
            NorthStockIncreaseHoldRequest.NorthStockIncreaseHold_Request northStockIncreaseHold_Request = this.request;
            if (northStockIncreaseHold_Request != null) {
                codedOutputByteBufferNano.writeMessage(1, northStockIncreaseHold_Request);
            }
            Data[] dataArr = this.dataList;
            int i10 = 0;
            if (dataArr != null && dataArr.length > 0) {
                int i11 = 0;
                while (true) {
                    Data[] dataArr2 = this.dataList;
                    if (i11 >= dataArr2.length) {
                        break;
                    }
                    Data data = dataArr2[i11];
                    if (data != null) {
                        codedOutputByteBufferNano.writeMessage(2, data);
                    }
                    i11++;
                }
            }
            if ((this.bitField0_ & 1) != 0) {
                codedOutputByteBufferNano.writeUInt32(3, this.tradeDate_);
            }
            NorthCommon.TradeDate[] tradeDateArr = this.calendarDate;
            if (tradeDateArr != null && tradeDateArr.length > 0) {
                while (true) {
                    NorthCommon.TradeDate[] tradeDateArr2 = this.calendarDate;
                    if (i10 >= tradeDateArr2.length) {
                        break;
                    }
                    NorthCommon.TradeDate tradeDate = tradeDateArr2[i10];
                    if (tradeDate != null) {
                        codedOutputByteBufferNano.writeMessage(4, tradeDate);
                    }
                    i10++;
                }
            }
            super.writeTo(codedOutputByteBufferNano);
        }

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

        public NorthStockIncreaseHold_Response mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
            while (true) {
                int readTag = codedInputByteBufferNano.readTag();
                if (readTag == 0) {
                    return this;
                }
                if (readTag == 10) {
                    if (this.request == null) {
                        this.request = new NorthStockIncreaseHoldRequest.NorthStockIncreaseHold_Request();
                    }
                    codedInputByteBufferNano.readMessage(this.request);
                } else if (readTag == 18) {
                    int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 18);
                    Data[] dataArr = this.dataList;
                    int length = dataArr == null ? 0 : dataArr.length;
                    int i10 = repeatedFieldArrayLength + length;
                    Data[] dataArr2 = new Data[i10];
                    if (length != 0) {
                        System.arraycopy(dataArr, 0, dataArr2, 0, length);
                    }
                    while (length < i10 - 1) {
                        Data data = new Data();
                        dataArr2[length] = data;
                        codedInputByteBufferNano.readMessage(data);
                        codedInputByteBufferNano.readTag();
                        length++;
                    }
                    Data data2 = new Data();
                    dataArr2[length] = data2;
                    codedInputByteBufferNano.readMessage(data2);
                    this.dataList = dataArr2;
                } else if (readTag == 24) {
                    this.tradeDate_ = codedInputByteBufferNano.readUInt32();
                    this.bitField0_ |= 1;
                } else if (readTag == 34) {
                    int repeatedFieldArrayLength2 = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 34);
                    NorthCommon.TradeDate[] tradeDateArr = this.calendarDate;
                    int length2 = tradeDateArr == null ? 0 : tradeDateArr.length;
                    int i11 = repeatedFieldArrayLength2 + length2;
                    NorthCommon.TradeDate[] tradeDateArr2 = new NorthCommon.TradeDate[i11];
                    if (length2 != 0) {
                        System.arraycopy(tradeDateArr, 0, tradeDateArr2, 0, length2);
                    }
                    while (length2 < i11 - 1) {
                        NorthCommon.TradeDate tradeDate = new NorthCommon.TradeDate();
                        tradeDateArr2[length2] = tradeDate;
                        codedInputByteBufferNano.readMessage(tradeDate);
                        codedInputByteBufferNano.readTag();
                        length2++;
                    }
                    NorthCommon.TradeDate tradeDate2 = new NorthCommon.TradeDate();
                    tradeDateArr2[length2] = tradeDate2;
                    codedInputByteBufferNano.readMessage(tradeDate2);
                    this.calendarDate = tradeDateArr2;
                } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                    return this;
                }
            }
        }
    }
}
