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

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

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

        private static volatile RecommendStock_Response[] _emptyArray;

        public RecommendStockRequest.RecommendStock_Request inputParam;

        public RecommendStock_Detail[] outputParam;

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

            private static volatile RecommendStock_Detail[] _emptyArray;

            private int bitField0_;

            public stock[] goods;

            private int sid_;

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

                private static volatile stock[] _emptyArray;

                private int bitField0_;

                private long category_;

                private String code_;

                private int exchange_;

                private int id_;

                private String name_;

                private int session_;

                public long[] times;

                public stock() {
                    clear();
                }

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

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

                public stock clear() {
                    this.bitField0_ = 0;
                    this.id_ = 0;
                    this.exchange_ = 0;
                    this.session_ = 0;
                    this.name_ = "";
                    this.code_ = "";
                    this.category_ = 0;
                    this.times = WireFormatNano.EMPTY_LONG_ARRAY;
                    this.cachedSize = -1;
                    return this;
                }

                public stock clearCategory() {
                    this.category_ = 0;
                    this.bitField0_ &= -33;
                    return this;
                }

                public stock clearCode() {
                    this.code_ = "";
                    this.bitField0_ &= -17;
                    return this;
                }

                public stock clearExchange() {
                    this.exchange_ = 0;
                    this.bitField0_ &= -3;
                    return this;
                }

                public stock clearId() {
                    this.id_ = 0;
                    this.bitField0_ &= -2;
                    return this;
                }

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

                public stock clearSession() {
                    this.session_ = 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.id_);
                    }
                    if ((this.bitField0_ & 2) != 0) {
                        computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(2, this.exchange_);
                    }
                    if ((this.bitField0_ & 4) != 0) {
                        computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(3, this.session_);
                    }
                    if ((this.bitField0_ & 8) != 0) {
                        computeSerializedSize += CodedOutputByteBufferNano.computeStringSize(4, this.name_);
                    }
                    if ((this.bitField0_ & 16) != 0) {
                        computeSerializedSize += CodedOutputByteBufferNano.computeStringSize(5, this.code_);
                    }
                    if ((this.bitField0_ & 32) != 0) {
                        computeSerializedSize += CodedOutputByteBufferNano.computeUInt64Size(6, this.category_);
                    }
                    long[] jArr = this.times;
                    if (jArr == null || jArr.length <= 0) {
                        return computeSerializedSize;
                    }
                    int i10 = 0;
                    int i11 = 0;
                    while (true) {
                        long[] jArr2 = this.times;
                        if (i10 >= jArr2.length) {
                            return computeSerializedSize + i11 + jArr2.length;
                        }
                        i11 += CodedOutputByteBufferNano.computeUInt64SizeNoTag(jArr2[i10]);
                        i10++;
                    }
                }

                public long getCategory() {
                    return this.category_;
                }

                public String getCode() {
                    return this.code_;
                }

                public int getExchange() {
                    return this.exchange_;
                }

                public int getId() {
                    return this.id_;
                }

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

                public int getSession() {
                    return this.session_;
                }

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

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

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

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

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

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

                public stock setCategory(long j10) {
                    this.category_ = j10;
                    this.bitField0_ |= 32;
                    return this;
                }

                public stock setCode(String str) {
                    str.getClass();
                    this.code_ = str;
                    this.bitField0_ |= 16;
                    return this;
                }

                public stock setExchange(int i10) {
                    this.exchange_ = i10;
                    this.bitField0_ |= 2;
                    return this;
                }

                public stock setId(int i10) {
                    this.id_ = i10;
                    this.bitField0_ |= 1;
                    return this;
                }

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

                public stock setSession(int i10) {
                    this.session_ = i10;
                    this.bitField0_ |= 4;
                    return this;
                }

                public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
                    if ((this.bitField0_ & 1) != 0) {
                        codedOutputByteBufferNano.writeUInt32(1, this.id_);
                    }
                    if ((this.bitField0_ & 2) != 0) {
                        codedOutputByteBufferNano.writeUInt32(2, this.exchange_);
                    }
                    if ((this.bitField0_ & 4) != 0) {
                        codedOutputByteBufferNano.writeUInt32(3, this.session_);
                    }
                    if ((this.bitField0_ & 8) != 0) {
                        codedOutputByteBufferNano.writeString(4, this.name_);
                    }
                    if ((this.bitField0_ & 16) != 0) {
                        codedOutputByteBufferNano.writeString(5, this.code_);
                    }
                    if ((this.bitField0_ & 32) != 0) {
                        codedOutputByteBufferNano.writeUInt64(6, this.category_);
                    }
                    long[] jArr = this.times;
                    if (jArr != null && jArr.length > 0) {
                        int i10 = 0;
                        while (true) {
                            long[] jArr2 = this.times;
                            if (i10 >= jArr2.length) {
                                break;
                            }
                            codedOutputByteBufferNano.writeUInt64(7, jArr2[i10]);
                            i10++;
                        }
                    }
                    super.writeTo(codedOutputByteBufferNano);
                }

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

                public stock mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
                    while (true) {
                        int readTag = codedInputByteBufferNano.readTag();
                        if (readTag == 0) {
                            return this;
                        }
                        if (readTag == 8) {
                            this.id_ = codedInputByteBufferNano.readUInt32();
                            this.bitField0_ |= 1;
                        } else if (readTag == 16) {
                            this.exchange_ = codedInputByteBufferNano.readUInt32();
                            this.bitField0_ |= 2;
                        } else if (readTag == 24) {
                            this.session_ = codedInputByteBufferNano.readUInt32();
                            this.bitField0_ |= 4;
                        } else if (readTag == 34) {
                            this.name_ = codedInputByteBufferNano.readString();
                            this.bitField0_ |= 8;
                        } else if (readTag == 42) {
                            this.code_ = codedInputByteBufferNano.readString();
                            this.bitField0_ |= 16;
                        } else if (readTag == 48) {
                            this.category_ = codedInputByteBufferNano.readUInt64();
                            this.bitField0_ |= 32;
                        } else if (readTag == 56) {
                            int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 56);
                            long[] jArr = this.times;
                            int length = jArr == null ? 0 : jArr.length;
                            int i10 = repeatedFieldArrayLength + length;
                            long[] jArr2 = new long[i10];
                            if (length != 0) {
                                System.arraycopy(jArr, 0, jArr2, 0, length);
                            }
                            while (length < i10 - 1) {
                                jArr2[length] = codedInputByteBufferNano.readUInt64();
                                codedInputByteBufferNano.readTag();
                                length++;
                            }
                            jArr2[length] = codedInputByteBufferNano.readUInt64();
                            this.times = jArr2;
                        } else if (readTag == 58) {
                            int pushLimit = codedInputByteBufferNano.pushLimit(codedInputByteBufferNano.readRawVarint32());
                            int position = codedInputByteBufferNano.getPosition();
                            int i11 = 0;
                            while (codedInputByteBufferNano.getBytesUntilLimit() > 0) {
                                codedInputByteBufferNano.readUInt64();
                                i11++;
                            }
                            codedInputByteBufferNano.rewindToPosition(position);
                            long[] jArr3 = this.times;
                            int length2 = jArr3 == null ? 0 : jArr3.length;
                            int i12 = i11 + length2;
                            long[] jArr4 = new long[i12];
                            if (length2 != 0) {
                                System.arraycopy(jArr3, 0, jArr4, 0, length2);
                            }
                            while (length2 < i12) {
                                jArr4[length2] = codedInputByteBufferNano.readUInt64();
                                length2++;
                            }
                            this.times = jArr4;
                            codedInputByteBufferNano.popLimit(pushLimit);
                        } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                            return this;
                        }
                    }
                }
            }

            public RecommendStock_Detail() {
                clear();
            }

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

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

            public RecommendStock_Detail clear() {
                this.bitField0_ = 0;
                this.sid_ = 0;
                this.goods = stock.emptyArray();
                this.cachedSize = -1;
                return this;
            }

            public RecommendStock_Detail clearSid() {
                this.sid_ = 0;
                this.bitField0_ &= -2;
                return this;
            }

            /* access modifiers changed from: protected */
            public int computeSerializedSize() {
                int computeSerializedSize = super.computeSerializedSize();
                if ((this.bitField0_ & 1) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(1, this.sid_);
                }
                stock[] stockArr = this.goods;
                if (stockArr != null && stockArr.length > 0) {
                    int i10 = 0;
                    while (true) {
                        stock[] stockArr2 = this.goods;
                        if (i10 >= stockArr2.length) {
                            break;
                        }
                        stock stock2 = stockArr2[i10];
                        if (stock2 != null) {
                            computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(4, stock2);
                        }
                        i10++;
                    }
                }
                return computeSerializedSize;
            }

            public int getSid() {
                return this.sid_;
            }

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

            public RecommendStock_Detail setSid(int i10) {
                this.sid_ = i10;
                this.bitField0_ |= 1;
                return this;
            }

            public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
                if ((this.bitField0_ & 1) != 0) {
                    codedOutputByteBufferNano.writeUInt32(1, this.sid_);
                }
                stock[] stockArr = this.goods;
                if (stockArr != null && stockArr.length > 0) {
                    int i10 = 0;
                    while (true) {
                        stock[] stockArr2 = this.goods;
                        if (i10 >= stockArr2.length) {
                            break;
                        }
                        stock stock2 = stockArr2[i10];
                        if (stock2 != null) {
                            codedOutputByteBufferNano.writeMessage(4, stock2);
                        }
                        i10++;
                    }
                }
                super.writeTo(codedOutputByteBufferNano);
            }

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

            public RecommendStock_Detail mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
                while (true) {
                    int readTag = codedInputByteBufferNano.readTag();
                    if (readTag == 0) {
                        return this;
                    }
                    if (readTag == 8) {
                        this.sid_ = codedInputByteBufferNano.readUInt32();
                        this.bitField0_ |= 1;
                    } else if (readTag == 34) {
                        int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 34);
                        stock[] stockArr = this.goods;
                        int length = stockArr == null ? 0 : stockArr.length;
                        int i10 = repeatedFieldArrayLength + length;
                        stock[] stockArr2 = new stock[i10];
                        if (length != 0) {
                            System.arraycopy(stockArr, 0, stockArr2, 0, length);
                        }
                        while (length < i10 - 1) {
                            stock stock2 = new stock();
                            stockArr2[length] = stock2;
                            codedInputByteBufferNano.readMessage(stock2);
                            codedInputByteBufferNano.readTag();
                            length++;
                        }
                        stock stock3 = new stock();
                        stockArr2[length] = stock3;
                        codedInputByteBufferNano.readMessage(stock3);
                        this.goods = stockArr2;
                    } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                        return this;
                    }
                }
            }
        }

        public RecommendStock_Response() {
            clear();
        }

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

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

        public RecommendStock_Response clear() {
            this.inputParam = null;
            this.outputParam = RecommendStock_Detail.emptyArray();
            this.cachedSize = -1;
            return this;
        }

        /* access modifiers changed from: protected */
        public int computeSerializedSize() {
            int computeSerializedSize = super.computeSerializedSize();
            RecommendStockRequest.RecommendStock_Request recommendStock_Request = this.inputParam;
            if (recommendStock_Request != null) {
                computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(1, recommendStock_Request);
            }
            RecommendStock_Detail[] recommendStock_DetailArr = this.outputParam;
            if (recommendStock_DetailArr != null && recommendStock_DetailArr.length > 0) {
                int i10 = 0;
                while (true) {
                    RecommendStock_Detail[] recommendStock_DetailArr2 = this.outputParam;
                    if (i10 >= recommendStock_DetailArr2.length) {
                        break;
                    }
                    RecommendStock_Detail recommendStock_Detail = recommendStock_DetailArr2[i10];
                    if (recommendStock_Detail != null) {
                        computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(2, recommendStock_Detail);
                    }
                    i10++;
                }
            }
            return computeSerializedSize;
        }

        public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
            RecommendStockRequest.RecommendStock_Request recommendStock_Request = this.inputParam;
            if (recommendStock_Request != null) {
                codedOutputByteBufferNano.writeMessage(1, recommendStock_Request);
            }
            RecommendStock_Detail[] recommendStock_DetailArr = this.outputParam;
            if (recommendStock_DetailArr != null && recommendStock_DetailArr.length > 0) {
                int i10 = 0;
                while (true) {
                    RecommendStock_Detail[] recommendStock_DetailArr2 = this.outputParam;
                    if (i10 >= recommendStock_DetailArr2.length) {
                        break;
                    }
                    RecommendStock_Detail recommendStock_Detail = recommendStock_DetailArr2[i10];
                    if (recommendStock_Detail != null) {
                        codedOutputByteBufferNano.writeMessage(2, recommendStock_Detail);
                    }
                    i10++;
                }
            }
            super.writeTo(codedOutputByteBufferNano);
        }

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

        public RecommendStock_Response mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
            while (true) {
                int readTag = codedInputByteBufferNano.readTag();
                if (readTag == 0) {
                    return this;
                }
                if (readTag == 10) {
                    if (this.inputParam == null) {
                        this.inputParam = new RecommendStockRequest.RecommendStock_Request();
                    }
                    codedInputByteBufferNano.readMessage(this.inputParam);
                } else if (readTag == 18) {
                    int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 18);
                    RecommendStock_Detail[] recommendStock_DetailArr = this.outputParam;
                    int length = recommendStock_DetailArr == null ? 0 : recommendStock_DetailArr.length;
                    int i10 = repeatedFieldArrayLength + length;
                    RecommendStock_Detail[] recommendStock_DetailArr2 = new RecommendStock_Detail[i10];
                    if (length != 0) {
                        System.arraycopy(recommendStock_DetailArr, 0, recommendStock_DetailArr2, 0, length);
                    }
                    while (length < i10 - 1) {
                        RecommendStock_Detail recommendStock_Detail = new RecommendStock_Detail();
                        recommendStock_DetailArr2[length] = recommendStock_Detail;
                        codedInputByteBufferNano.readMessage(recommendStock_Detail);
                        codedInputByteBufferNano.readTag();
                        length++;
                    }
                    RecommendStock_Detail recommendStock_Detail2 = new RecommendStock_Detail();
                    recommendStock_DetailArr2[length] = recommendStock_Detail2;
                    codedInputByteBufferNano.readMessage(recommendStock_Detail2);
                    this.outputParam = recommendStock_DetailArr2;
                } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                    return this;
                }
            }
        }
    }
}
