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

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

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

        private static volatile InstitutionalShareholding_Response[] _emptyArray;

        public InstitutionalShareholdingRequest.InstitutionalShareholding_Request input;

        public InstitutionalShareholdingData output;

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

            private static volatile InstitutionalShareholdingData[] _emptyArray;

            private int bitField0_;

            public int[] calendarDate;

            private int date_;

            public InstitutionalShareholdingDetail[] latest;

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

                private static volatile InstitutionalShareholdingDetail[] _emptyArray;

                private int bitField0_;

                private int decr_;

                private int incr_;

                private String name_;

                private String org_;

                private int total_;

                public InstitutionalShareholdingDetail() {
                    clear();
                }

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

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

                public InstitutionalShareholdingDetail clear() {
                    this.bitField0_ = 0;
                    this.org_ = "";
                    this.name_ = "";
                    this.incr_ = 0;
                    this.decr_ = 0;
                    this.total_ = 0;
                    this.cachedSize = -1;
                    return this;
                }

                public InstitutionalShareholdingDetail clearDecr() {
                    this.decr_ = 0;
                    this.bitField0_ &= -9;
                    return this;
                }

                public InstitutionalShareholdingDetail clearIncr() {
                    this.incr_ = 0;
                    this.bitField0_ &= -5;
                    return this;
                }

                public InstitutionalShareholdingDetail clearName() {
                    this.name_ = "";
                    this.bitField0_ &= -3;
                    return this;
                }

                public InstitutionalShareholdingDetail clearOrg() {
                    this.org_ = "";
                    this.bitField0_ &= -2;
                    return this;
                }

                public InstitutionalShareholdingDetail clearTotal() {
                    this.total_ = 0;
                    this.bitField0_ &= -17;
                    return this;
                }

                /* access modifiers changed from: protected */
                public int computeSerializedSize() {
                    int computeSerializedSize = super.computeSerializedSize();
                    if ((this.bitField0_ & 1) != 0) {
                        computeSerializedSize += CodedOutputByteBufferNano.computeStringSize(1, this.org_);
                    }
                    if ((this.bitField0_ & 2) != 0) {
                        computeSerializedSize += CodedOutputByteBufferNano.computeStringSize(2, this.name_);
                    }
                    if ((this.bitField0_ & 4) != 0) {
                        computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(3, this.incr_);
                    }
                    if ((this.bitField0_ & 8) != 0) {
                        computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(4, this.decr_);
                    }
                    if ((this.bitField0_ & 16) != 0) {
                        return computeSerializedSize + CodedOutputByteBufferNano.computeUInt32Size(5, this.total_);
                    }
                    return computeSerializedSize;
                }

                public int getDecr() {
                    return this.decr_;
                }

                public int getIncr() {
                    return this.incr_;
                }

                public String getName() {
                    return this.name_;
                }

                public String getOrg() {
                    return this.org_;
                }

                public int getTotal() {
                    return this.total_;
                }

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

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

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

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

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

                public InstitutionalShareholdingDetail setDecr(int i10) {
                    this.decr_ = i10;
                    this.bitField0_ |= 8;
                    return this;
                }

                public InstitutionalShareholdingDetail setIncr(int i10) {
                    this.incr_ = i10;
                    this.bitField0_ |= 4;
                    return this;
                }

                public InstitutionalShareholdingDetail setName(String str) {
                    str.getClass();
                    this.name_ = str;
                    this.bitField0_ |= 2;
                    return this;
                }

                public InstitutionalShareholdingDetail setOrg(String str) {
                    str.getClass();
                    this.org_ = str;
                    this.bitField0_ |= 1;
                    return this;
                }

                public InstitutionalShareholdingDetail setTotal(int i10) {
                    this.total_ = i10;
                    this.bitField0_ |= 16;
                    return this;
                }

                public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
                    if ((this.bitField0_ & 1) != 0) {
                        codedOutputByteBufferNano.writeString(1, this.org_);
                    }
                    if ((this.bitField0_ & 2) != 0) {
                        codedOutputByteBufferNano.writeString(2, this.name_);
                    }
                    if ((this.bitField0_ & 4) != 0) {
                        codedOutputByteBufferNano.writeUInt32(3, this.incr_);
                    }
                    if ((this.bitField0_ & 8) != 0) {
                        codedOutputByteBufferNano.writeUInt32(4, this.decr_);
                    }
                    if ((this.bitField0_ & 16) != 0) {
                        codedOutputByteBufferNano.writeUInt32(5, this.total_);
                    }
                    super.writeTo(codedOutputByteBufferNano);
                }

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

                public InstitutionalShareholdingDetail mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
                    while (true) {
                        int readTag = codedInputByteBufferNano.readTag();
                        if (readTag == 0) {
                            return this;
                        }
                        if (readTag == 10) {
                            this.org_ = codedInputByteBufferNano.readString();
                            this.bitField0_ |= 1;
                        } else if (readTag == 18) {
                            this.name_ = codedInputByteBufferNano.readString();
                            this.bitField0_ |= 2;
                        } else if (readTag == 24) {
                            this.incr_ = codedInputByteBufferNano.readUInt32();
                            this.bitField0_ |= 4;
                        } else if (readTag == 32) {
                            this.decr_ = codedInputByteBufferNano.readUInt32();
                            this.bitField0_ |= 8;
                        } else if (readTag == 40) {
                            this.total_ = codedInputByteBufferNano.readUInt32();
                            this.bitField0_ |= 16;
                        } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                            return this;
                        }
                    }
                }
            }

            public InstitutionalShareholdingData() {
                clear();
            }

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

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

            public InstitutionalShareholdingData clear() {
                this.bitField0_ = 0;
                this.latest = InstitutionalShareholdingDetail.emptyArray();
                this.date_ = 0;
                this.calendarDate = WireFormatNano.EMPTY_INT_ARRAY;
                this.cachedSize = -1;
                return this;
            }

            public InstitutionalShareholdingData clearDate() {
                this.date_ = 0;
                this.bitField0_ &= -2;
                return this;
            }

            /* access modifiers changed from: protected */
            public int computeSerializedSize() {
                int computeSerializedSize = super.computeSerializedSize();
                InstitutionalShareholdingDetail[] institutionalShareholdingDetailArr = this.latest;
                int i10 = 0;
                if (institutionalShareholdingDetailArr != null && institutionalShareholdingDetailArr.length > 0) {
                    int i11 = 0;
                    while (true) {
                        InstitutionalShareholdingDetail[] institutionalShareholdingDetailArr2 = this.latest;
                        if (i11 >= institutionalShareholdingDetailArr2.length) {
                            break;
                        }
                        InstitutionalShareholdingDetail institutionalShareholdingDetail = institutionalShareholdingDetailArr2[i11];
                        if (institutionalShareholdingDetail != null) {
                            computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(1, institutionalShareholdingDetail);
                        }
                        i11++;
                    }
                }
                if ((this.bitField0_ & 1) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(2, this.date_);
                }
                int[] iArr = this.calendarDate;
                if (iArr == null || iArr.length <= 0) {
                    return computeSerializedSize;
                }
                int i12 = 0;
                while (true) {
                    int[] iArr2 = this.calendarDate;
                    if (i10 >= iArr2.length) {
                        return computeSerializedSize + i12 + iArr2.length;
                    }
                    i12 += CodedOutputByteBufferNano.computeUInt32SizeNoTag(iArr2[i10]);
                    i10++;
                }
            }

            public int getDate() {
                return this.date_;
            }

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

            public InstitutionalShareholdingData setDate(int i10) {
                this.date_ = i10;
                this.bitField0_ |= 1;
                return this;
            }

            public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
                InstitutionalShareholdingDetail[] institutionalShareholdingDetailArr = this.latest;
                int i10 = 0;
                if (institutionalShareholdingDetailArr != null && institutionalShareholdingDetailArr.length > 0) {
                    int i11 = 0;
                    while (true) {
                        InstitutionalShareholdingDetail[] institutionalShareholdingDetailArr2 = this.latest;
                        if (i11 >= institutionalShareholdingDetailArr2.length) {
                            break;
                        }
                        InstitutionalShareholdingDetail institutionalShareholdingDetail = institutionalShareholdingDetailArr2[i11];
                        if (institutionalShareholdingDetail != null) {
                            codedOutputByteBufferNano.writeMessage(1, institutionalShareholdingDetail);
                        }
                        i11++;
                    }
                }
                if ((this.bitField0_ & 1) != 0) {
                    codedOutputByteBufferNano.writeUInt32(2, this.date_);
                }
                int[] iArr = this.calendarDate;
                if (iArr != null && iArr.length > 0) {
                    while (true) {
                        int[] iArr2 = this.calendarDate;
                        if (i10 >= iArr2.length) {
                            break;
                        }
                        codedOutputByteBufferNano.writeUInt32(3, iArr2[i10]);
                        i10++;
                    }
                }
                super.writeTo(codedOutputByteBufferNano);
            }

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

            public InstitutionalShareholdingData mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
                while (true) {
                    int readTag = codedInputByteBufferNano.readTag();
                    if (readTag == 0) {
                        return this;
                    }
                    if (readTag == 10) {
                        int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 10);
                        InstitutionalShareholdingDetail[] institutionalShareholdingDetailArr = this.latest;
                        int length = institutionalShareholdingDetailArr == null ? 0 : institutionalShareholdingDetailArr.length;
                        int i10 = repeatedFieldArrayLength + length;
                        InstitutionalShareholdingDetail[] institutionalShareholdingDetailArr2 = new InstitutionalShareholdingDetail[i10];
                        if (length != 0) {
                            System.arraycopy(institutionalShareholdingDetailArr, 0, institutionalShareholdingDetailArr2, 0, length);
                        }
                        while (length < i10 - 1) {
                            InstitutionalShareholdingDetail institutionalShareholdingDetail = new InstitutionalShareholdingDetail();
                            institutionalShareholdingDetailArr2[length] = institutionalShareholdingDetail;
                            codedInputByteBufferNano.readMessage(institutionalShareholdingDetail);
                            codedInputByteBufferNano.readTag();
                            length++;
                        }
                        InstitutionalShareholdingDetail institutionalShareholdingDetail2 = new InstitutionalShareholdingDetail();
                        institutionalShareholdingDetailArr2[length] = institutionalShareholdingDetail2;
                        codedInputByteBufferNano.readMessage(institutionalShareholdingDetail2);
                        this.latest = institutionalShareholdingDetailArr2;
                    } else if (readTag == 16) {
                        this.date_ = codedInputByteBufferNano.readUInt32();
                        this.bitField0_ |= 1;
                    } else if (readTag == 24) {
                        int repeatedFieldArrayLength2 = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 24);
                        int[] iArr = this.calendarDate;
                        int length2 = iArr == null ? 0 : iArr.length;
                        int i11 = repeatedFieldArrayLength2 + length2;
                        int[] iArr2 = new int[i11];
                        if (length2 != 0) {
                            System.arraycopy(iArr, 0, iArr2, 0, length2);
                        }
                        while (length2 < i11 - 1) {
                            iArr2[length2] = codedInputByteBufferNano.readUInt32();
                            codedInputByteBufferNano.readTag();
                            length2++;
                        }
                        iArr2[length2] = codedInputByteBufferNano.readUInt32();
                        this.calendarDate = iArr2;
                    } else if (readTag == 26) {
                        int pushLimit = codedInputByteBufferNano.pushLimit(codedInputByteBufferNano.readRawVarint32());
                        int position = codedInputByteBufferNano.getPosition();
                        int i12 = 0;
                        while (codedInputByteBufferNano.getBytesUntilLimit() > 0) {
                            codedInputByteBufferNano.readUInt32();
                            i12++;
                        }
                        codedInputByteBufferNano.rewindToPosition(position);
                        int[] iArr3 = this.calendarDate;
                        int length3 = iArr3 == null ? 0 : iArr3.length;
                        int i13 = i12 + length3;
                        int[] iArr4 = new int[i13];
                        if (length3 != 0) {
                            System.arraycopy(iArr3, 0, iArr4, 0, length3);
                        }
                        while (length3 < i13) {
                            iArr4[length3] = codedInputByteBufferNano.readUInt32();
                            length3++;
                        }
                        this.calendarDate = iArr4;
                        codedInputByteBufferNano.popLimit(pushLimit);
                    } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                        return this;
                    }
                }
            }
        }

        public InstitutionalShareholding_Response() {
            clear();
        }

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

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

        public InstitutionalShareholding_Response clear() {
            this.input = null;
            this.output = null;
            this.cachedSize = -1;
            return this;
        }

        /* access modifiers changed from: protected */
        public int computeSerializedSize() {
            int computeSerializedSize = super.computeSerializedSize();
            InstitutionalShareholdingRequest.InstitutionalShareholding_Request institutionalShareholding_Request = this.input;
            if (institutionalShareholding_Request != null) {
                computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(1, institutionalShareholding_Request);
            }
            InstitutionalShareholdingData institutionalShareholdingData = this.output;
            if (institutionalShareholdingData != null) {
                return computeSerializedSize + CodedOutputByteBufferNano.computeMessageSize(2, institutionalShareholdingData);
            }
            return computeSerializedSize;
        }

        public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
            InstitutionalShareholdingRequest.InstitutionalShareholding_Request institutionalShareholding_Request = this.input;
            if (institutionalShareholding_Request != null) {
                codedOutputByteBufferNano.writeMessage(1, institutionalShareholding_Request);
            }
            InstitutionalShareholdingData institutionalShareholdingData = this.output;
            if (institutionalShareholdingData != null) {
                codedOutputByteBufferNano.writeMessage(2, institutionalShareholdingData);
            }
            super.writeTo(codedOutputByteBufferNano);
        }

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

        public InstitutionalShareholding_Response mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
            while (true) {
                int readTag = codedInputByteBufferNano.readTag();
                if (readTag == 0) {
                    return this;
                }
                if (readTag == 10) {
                    if (this.input == null) {
                        this.input = new InstitutionalShareholdingRequest.InstitutionalShareholding_Request();
                    }
                    codedInputByteBufferNano.readMessage(this.input);
                } else if (readTag == 18) {
                    if (this.output == null) {
                        this.output = new InstitutionalShareholdingData();
                    }
                    codedInputByteBufferNano.readMessage(this.output);
                } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                    return this;
                }
            }
        }
    }
}
