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

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

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

        private static volatile GetPortfolioTrend_Response[] _emptyArray;

        private int bitField0_;

        private int firstdate_;

        public HisYield[] hisyield;

        private int maxyield_;

        public GetPortfolioTrendRequest.GetPortfolioTrend_Request requestParams;

        private int totalnum_;

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

            private static volatile HisYield[] _emptyArray;

            private int bitField0_;

            private int glyield_;

            private int idx_;

            private int indexyield_;

            private int tradedate_;

            public HisYield() {
                clear();
            }

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

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

            public HisYield clear() {
                this.bitField0_ = 0;
                this.idx_ = 0;
                this.glyield_ = 0;
                this.indexyield_ = 0;
                this.tradedate_ = 0;
                this.cachedSize = -1;
                return this;
            }

            public HisYield clearGlyield() {
                this.glyield_ = 0;
                this.bitField0_ &= -3;
                return this;
            }

            public HisYield clearIdx() {
                this.idx_ = 0;
                this.bitField0_ &= -2;
                return this;
            }

            public HisYield clearIndexyield() {
                this.indexyield_ = 0;
                this.bitField0_ &= -5;
                return this;
            }

            public HisYield clearTradedate() {
                this.tradedate_ = 0;
                this.bitField0_ &= -9;
                return this;
            }

            /* access modifiers changed from: protected */
            public int computeSerializedSize() {
                int computeSerializedSize = super.computeSerializedSize();
                if ((this.bitField0_ & 1) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(1, this.idx_);
                }
                if ((this.bitField0_ & 2) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeInt32Size(2, this.glyield_);
                }
                if ((this.bitField0_ & 4) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeInt32Size(3, this.indexyield_);
                }
                if ((this.bitField0_ & 8) != 0) {
                    return computeSerializedSize + CodedOutputByteBufferNano.computeUInt32Size(4, this.tradedate_);
                }
                return computeSerializedSize;
            }

            public int getGlyield() {
                return this.glyield_;
            }

            public int getIdx() {
                return this.idx_;
            }

            public int getIndexyield() {
                return this.indexyield_;
            }

            public int getTradedate() {
                return this.tradedate_;
            }

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

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

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

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

            public HisYield setGlyield(int i10) {
                this.glyield_ = i10;
                this.bitField0_ |= 2;
                return this;
            }

            public HisYield setIdx(int i10) {
                this.idx_ = i10;
                this.bitField0_ |= 1;
                return this;
            }

            public HisYield setIndexyield(int i10) {
                this.indexyield_ = i10;
                this.bitField0_ |= 4;
                return this;
            }

            public HisYield setTradedate(int i10) {
                this.tradedate_ = i10;
                this.bitField0_ |= 8;
                return this;
            }

            public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
                if ((this.bitField0_ & 1) != 0) {
                    codedOutputByteBufferNano.writeUInt32(1, this.idx_);
                }
                if ((this.bitField0_ & 2) != 0) {
                    codedOutputByteBufferNano.writeInt32(2, this.glyield_);
                }
                if ((this.bitField0_ & 4) != 0) {
                    codedOutputByteBufferNano.writeInt32(3, this.indexyield_);
                }
                if ((this.bitField0_ & 8) != 0) {
                    codedOutputByteBufferNano.writeUInt32(4, this.tradedate_);
                }
                super.writeTo(codedOutputByteBufferNano);
            }

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

            public HisYield mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
                while (true) {
                    int readTag = codedInputByteBufferNano.readTag();
                    if (readTag == 0) {
                        return this;
                    }
                    if (readTag == 8) {
                        this.idx_ = codedInputByteBufferNano.readUInt32();
                        this.bitField0_ |= 1;
                    } else if (readTag == 16) {
                        this.glyield_ = codedInputByteBufferNano.readInt32();
                        this.bitField0_ |= 2;
                    } else if (readTag == 24) {
                        this.indexyield_ = codedInputByteBufferNano.readInt32();
                        this.bitField0_ |= 4;
                    } else if (readTag == 32) {
                        this.tradedate_ = codedInputByteBufferNano.readUInt32();
                        this.bitField0_ |= 8;
                    } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                        return this;
                    }
                }
            }
        }

        public GetPortfolioTrend_Response() {
            clear();
        }

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

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

        public GetPortfolioTrend_Response clear() {
            this.bitField0_ = 0;
            this.requestParams = null;
            this.hisyield = HisYield.emptyArray();
            this.totalnum_ = 0;
            this.firstdate_ = 0;
            this.maxyield_ = 0;
            this.cachedSize = -1;
            return this;
        }

        public GetPortfolioTrend_Response clearFirstdate() {
            this.firstdate_ = 0;
            this.bitField0_ &= -3;
            return this;
        }

        public GetPortfolioTrend_Response clearMaxyield() {
            this.maxyield_ = 0;
            this.bitField0_ &= -5;
            return this;
        }

        public GetPortfolioTrend_Response clearTotalnum() {
            this.totalnum_ = 0;
            this.bitField0_ &= -2;
            return this;
        }

        /* access modifiers changed from: protected */
        public int computeSerializedSize() {
            int computeSerializedSize = super.computeSerializedSize();
            GetPortfolioTrendRequest.GetPortfolioTrend_Request getPortfolioTrend_Request = this.requestParams;
            if (getPortfolioTrend_Request != null) {
                computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(1, getPortfolioTrend_Request);
            }
            HisYield[] hisYieldArr = this.hisyield;
            if (hisYieldArr != null && hisYieldArr.length > 0) {
                int i10 = 0;
                while (true) {
                    HisYield[] hisYieldArr2 = this.hisyield;
                    if (i10 >= hisYieldArr2.length) {
                        break;
                    }
                    HisYield hisYield = hisYieldArr2[i10];
                    if (hisYield != null) {
                        computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(2, hisYield);
                    }
                    i10++;
                }
            }
            if ((this.bitField0_ & 1) != 0) {
                computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(3, this.totalnum_);
            }
            if ((this.bitField0_ & 2) != 0) {
                computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(4, this.firstdate_);
            }
            if ((this.bitField0_ & 4) != 0) {
                return computeSerializedSize + CodedOutputByteBufferNano.computeInt32Size(5, this.maxyield_);
            }
            return computeSerializedSize;
        }

        public int getFirstdate() {
            return this.firstdate_;
        }

        public int getMaxyield() {
            return this.maxyield_;
        }

        public int getTotalnum() {
            return this.totalnum_;
        }

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

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

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

        public GetPortfolioTrend_Response setFirstdate(int i10) {
            this.firstdate_ = i10;
            this.bitField0_ |= 2;
            return this;
        }

        public GetPortfolioTrend_Response setMaxyield(int i10) {
            this.maxyield_ = i10;
            this.bitField0_ |= 4;
            return this;
        }

        public GetPortfolioTrend_Response setTotalnum(int i10) {
            this.totalnum_ = i10;
            this.bitField0_ |= 1;
            return this;
        }

        public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
            GetPortfolioTrendRequest.GetPortfolioTrend_Request getPortfolioTrend_Request = this.requestParams;
            if (getPortfolioTrend_Request != null) {
                codedOutputByteBufferNano.writeMessage(1, getPortfolioTrend_Request);
            }
            HisYield[] hisYieldArr = this.hisyield;
            if (hisYieldArr != null && hisYieldArr.length > 0) {
                int i10 = 0;
                while (true) {
                    HisYield[] hisYieldArr2 = this.hisyield;
                    if (i10 >= hisYieldArr2.length) {
                        break;
                    }
                    HisYield hisYield = hisYieldArr2[i10];
                    if (hisYield != null) {
                        codedOutputByteBufferNano.writeMessage(2, hisYield);
                    }
                    i10++;
                }
            }
            if ((this.bitField0_ & 1) != 0) {
                codedOutputByteBufferNano.writeUInt32(3, this.totalnum_);
            }
            if ((this.bitField0_ & 2) != 0) {
                codedOutputByteBufferNano.writeUInt32(4, this.firstdate_);
            }
            if ((this.bitField0_ & 4) != 0) {
                codedOutputByteBufferNano.writeInt32(5, this.maxyield_);
            }
            super.writeTo(codedOutputByteBufferNano);
        }

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

        public GetPortfolioTrend_Response mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
            while (true) {
                int readTag = codedInputByteBufferNano.readTag();
                if (readTag == 0) {
                    return this;
                }
                if (readTag == 10) {
                    if (this.requestParams == null) {
                        this.requestParams = new GetPortfolioTrendRequest.GetPortfolioTrend_Request();
                    }
                    codedInputByteBufferNano.readMessage(this.requestParams);
                } else if (readTag == 18) {
                    int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 18);
                    HisYield[] hisYieldArr = this.hisyield;
                    int length = hisYieldArr == null ? 0 : hisYieldArr.length;
                    int i10 = repeatedFieldArrayLength + length;
                    HisYield[] hisYieldArr2 = new HisYield[i10];
                    if (length != 0) {
                        System.arraycopy(hisYieldArr, 0, hisYieldArr2, 0, length);
                    }
                    while (length < i10 - 1) {
                        HisYield hisYield = new HisYield();
                        hisYieldArr2[length] = hisYield;
                        codedInputByteBufferNano.readMessage(hisYield);
                        codedInputByteBufferNano.readTag();
                        length++;
                    }
                    HisYield hisYield2 = new HisYield();
                    hisYieldArr2[length] = hisYield2;
                    codedInputByteBufferNano.readMessage(hisYield2);
                    this.hisyield = hisYieldArr2;
                } else if (readTag == 24) {
                    this.totalnum_ = codedInputByteBufferNano.readUInt32();
                    this.bitField0_ |= 1;
                } else if (readTag == 32) {
                    this.firstdate_ = codedInputByteBufferNano.readUInt32();
                    this.bitField0_ |= 2;
                } else if (readTag == 40) {
                    this.maxyield_ = codedInputByteBufferNano.readInt32();
                    this.bitField0_ |= 4;
                } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                    return this;
                }
            }
        }
    }
}
