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

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

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

        private static volatile TrendAmount_Response[] _emptyArray;

        public TrendAmountRequest.TrendAmount_Request requestData;

        public ExchangeTrendAmount[] responseData;

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

            private static volatile ExchangeTrendAmount[] _emptyArray;

            private int bitField0_;

            private long initAmount_;

            private String statusReasons_;

            private int tradeDate_;

            private int tradeDirection_;

            private int tradeStatus_;

            private int tradeTime_;

            public TrendPoint[] trendLine;

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

                private static volatile TrendPoint[] _emptyArray;

                private long amount_;

                private int bitField0_;

                private int time_;

                public TrendPoint() {
                    clear();
                }

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

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

                public TrendPoint clear() {
                    this.bitField0_ = 0;
                    this.time_ = 0;
                    this.amount_ = 0;
                    this.cachedSize = -1;
                    return this;
                }

                public TrendPoint clearAmount() {
                    this.amount_ = 0;
                    this.bitField0_ &= -3;
                    return this;
                }

                public TrendPoint clearTime() {
                    this.time_ = 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.time_);
                    }
                    if ((this.bitField0_ & 2) != 0) {
                        return computeSerializedSize + CodedOutputByteBufferNano.computeUInt64Size(2, this.amount_);
                    }
                    return computeSerializedSize;
                }

                public long getAmount() {
                    return this.amount_;
                }

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

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

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

                public TrendPoint setAmount(long j10) {
                    this.amount_ = j10;
                    this.bitField0_ |= 2;
                    return this;
                }

                public TrendPoint setTime(int i10) {
                    this.time_ = i10;
                    this.bitField0_ |= 1;
                    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.writeUInt64(2, this.amount_);
                    }
                    super.writeTo(codedOutputByteBufferNano);
                }

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

                public TrendPoint 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.amount_ = codedInputByteBufferNano.readUInt64();
                            this.bitField0_ |= 2;
                        } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                            return this;
                        }
                    }
                }
            }

            public ExchangeTrendAmount() {
                clear();
            }

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

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

            public ExchangeTrendAmount clear() {
                this.bitField0_ = 0;
                this.tradeDirection_ = 0;
                this.tradeDate_ = 0;
                this.tradeTime_ = 0;
                this.initAmount_ = 0;
                this.tradeStatus_ = 0;
                this.trendLine = TrendPoint.emptyArray();
                this.statusReasons_ = "";
                this.cachedSize = -1;
                return this;
            }

            public ExchangeTrendAmount clearInitAmount() {
                this.initAmount_ = 0;
                this.bitField0_ &= -9;
                return this;
            }

            public ExchangeTrendAmount clearStatusReasons() {
                this.statusReasons_ = "";
                this.bitField0_ &= -33;
                return this;
            }

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

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

            public ExchangeTrendAmount clearTradeStatus() {
                this.tradeStatus_ = 0;
                this.bitField0_ &= -17;
                return this;
            }

            public ExchangeTrendAmount clearTradeTime() {
                this.tradeTime_ = 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.tradeDirection_);
                }
                if ((this.bitField0_ & 2) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(2, this.tradeDate_);
                }
                if ((this.bitField0_ & 4) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(3, this.tradeTime_);
                }
                if ((this.bitField0_ & 8) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeUInt64Size(4, this.initAmount_);
                }
                if ((this.bitField0_ & 16) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(5, this.tradeStatus_);
                }
                TrendPoint[] trendPointArr = this.trendLine;
                if (trendPointArr != null && trendPointArr.length > 0) {
                    int i10 = 0;
                    while (true) {
                        TrendPoint[] trendPointArr2 = this.trendLine;
                        if (i10 >= trendPointArr2.length) {
                            break;
                        }
                        TrendPoint trendPoint = trendPointArr2[i10];
                        if (trendPoint != null) {
                            computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(6, trendPoint);
                        }
                        i10++;
                    }
                }
                if ((this.bitField0_ & 32) != 0) {
                    return computeSerializedSize + CodedOutputByteBufferNano.computeStringSize(7, this.statusReasons_);
                }
                return computeSerializedSize;
            }

            public long getInitAmount() {
                return this.initAmount_;
            }

            public String getStatusReasons() {
                return this.statusReasons_;
            }

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

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

            public int getTradeStatus() {
                return this.tradeStatus_;
            }

            public int getTradeTime() {
                return this.tradeTime_;
            }

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

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

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

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

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

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

            public ExchangeTrendAmount setInitAmount(long j10) {
                this.initAmount_ = j10;
                this.bitField0_ |= 8;
                return this;
            }

            public ExchangeTrendAmount setStatusReasons(String str) {
                str.getClass();
                this.statusReasons_ = str;
                this.bitField0_ |= 32;
                return this;
            }

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

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

            public ExchangeTrendAmount setTradeStatus(int i10) {
                this.tradeStatus_ = i10;
                this.bitField0_ |= 16;
                return this;
            }

            public ExchangeTrendAmount setTradeTime(int i10) {
                this.tradeTime_ = i10;
                this.bitField0_ |= 4;
                return this;
            }

            public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
                if ((this.bitField0_ & 1) != 0) {
                    codedOutputByteBufferNano.writeUInt32(1, this.tradeDirection_);
                }
                if ((this.bitField0_ & 2) != 0) {
                    codedOutputByteBufferNano.writeUInt32(2, this.tradeDate_);
                }
                if ((this.bitField0_ & 4) != 0) {
                    codedOutputByteBufferNano.writeUInt32(3, this.tradeTime_);
                }
                if ((this.bitField0_ & 8) != 0) {
                    codedOutputByteBufferNano.writeUInt64(4, this.initAmount_);
                }
                if ((this.bitField0_ & 16) != 0) {
                    codedOutputByteBufferNano.writeUInt32(5, this.tradeStatus_);
                }
                TrendPoint[] trendPointArr = this.trendLine;
                if (trendPointArr != null && trendPointArr.length > 0) {
                    int i10 = 0;
                    while (true) {
                        TrendPoint[] trendPointArr2 = this.trendLine;
                        if (i10 >= trendPointArr2.length) {
                            break;
                        }
                        TrendPoint trendPoint = trendPointArr2[i10];
                        if (trendPoint != null) {
                            codedOutputByteBufferNano.writeMessage(6, trendPoint);
                        }
                        i10++;
                    }
                }
                if ((this.bitField0_ & 32) != 0) {
                    codedOutputByteBufferNano.writeString(7, this.statusReasons_);
                }
                super.writeTo(codedOutputByteBufferNano);
            }

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

            public ExchangeTrendAmount mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
                while (true) {
                    int readTag = codedInputByteBufferNano.readTag();
                    if (readTag == 0) {
                        return this;
                    }
                    if (readTag == 8) {
                        this.tradeDirection_ = codedInputByteBufferNano.readUInt32();
                        this.bitField0_ |= 1;
                    } else if (readTag == 16) {
                        this.tradeDate_ = codedInputByteBufferNano.readUInt32();
                        this.bitField0_ |= 2;
                    } else if (readTag == 24) {
                        this.tradeTime_ = codedInputByteBufferNano.readUInt32();
                        this.bitField0_ |= 4;
                    } else if (readTag == 32) {
                        this.initAmount_ = codedInputByteBufferNano.readUInt64();
                        this.bitField0_ |= 8;
                    } else if (readTag == 40) {
                        this.tradeStatus_ = codedInputByteBufferNano.readUInt32();
                        this.bitField0_ |= 16;
                    } else if (readTag == 50) {
                        int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 50);
                        TrendPoint[] trendPointArr = this.trendLine;
                        int length = trendPointArr == null ? 0 : trendPointArr.length;
                        int i10 = repeatedFieldArrayLength + length;
                        TrendPoint[] trendPointArr2 = new TrendPoint[i10];
                        if (length != 0) {
                            System.arraycopy(trendPointArr, 0, trendPointArr2, 0, length);
                        }
                        while (length < i10 - 1) {
                            TrendPoint trendPoint = new TrendPoint();
                            trendPointArr2[length] = trendPoint;
                            codedInputByteBufferNano.readMessage(trendPoint);
                            codedInputByteBufferNano.readTag();
                            length++;
                        }
                        TrendPoint trendPoint2 = new TrendPoint();
                        trendPointArr2[length] = trendPoint2;
                        codedInputByteBufferNano.readMessage(trendPoint2);
                        this.trendLine = trendPointArr2;
                    } else if (readTag == 58) {
                        this.statusReasons_ = codedInputByteBufferNano.readString();
                        this.bitField0_ |= 32;
                    } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                        return this;
                    }
                }
            }
        }

        public TrendAmount_Response() {
            clear();
        }

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

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

        public TrendAmount_Response clear() {
            this.responseData = ExchangeTrendAmount.emptyArray();
            this.requestData = null;
            this.cachedSize = -1;
            return this;
        }

        /* access modifiers changed from: protected */
        public int computeSerializedSize() {
            int computeSerializedSize = super.computeSerializedSize();
            ExchangeTrendAmount[] exchangeTrendAmountArr = this.responseData;
            if (exchangeTrendAmountArr != null && exchangeTrendAmountArr.length > 0) {
                int i10 = 0;
                while (true) {
                    ExchangeTrendAmount[] exchangeTrendAmountArr2 = this.responseData;
                    if (i10 >= exchangeTrendAmountArr2.length) {
                        break;
                    }
                    ExchangeTrendAmount exchangeTrendAmount = exchangeTrendAmountArr2[i10];
                    if (exchangeTrendAmount != null) {
                        computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(1, exchangeTrendAmount);
                    }
                    i10++;
                }
            }
            TrendAmountRequest.TrendAmount_Request trendAmount_Request = this.requestData;
            if (trendAmount_Request != null) {
                return computeSerializedSize + CodedOutputByteBufferNano.computeMessageSize(2, trendAmount_Request);
            }
            return computeSerializedSize;
        }

        public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
            ExchangeTrendAmount[] exchangeTrendAmountArr = this.responseData;
            if (exchangeTrendAmountArr != null && exchangeTrendAmountArr.length > 0) {
                int i10 = 0;
                while (true) {
                    ExchangeTrendAmount[] exchangeTrendAmountArr2 = this.responseData;
                    if (i10 >= exchangeTrendAmountArr2.length) {
                        break;
                    }
                    ExchangeTrendAmount exchangeTrendAmount = exchangeTrendAmountArr2[i10];
                    if (exchangeTrendAmount != null) {
                        codedOutputByteBufferNano.writeMessage(1, exchangeTrendAmount);
                    }
                    i10++;
                }
            }
            TrendAmountRequest.TrendAmount_Request trendAmount_Request = this.requestData;
            if (trendAmount_Request != null) {
                codedOutputByteBufferNano.writeMessage(2, trendAmount_Request);
            }
            super.writeTo(codedOutputByteBufferNano);
        }

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

        public TrendAmount_Response 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);
                    ExchangeTrendAmount[] exchangeTrendAmountArr = this.responseData;
                    int length = exchangeTrendAmountArr == null ? 0 : exchangeTrendAmountArr.length;
                    int i10 = repeatedFieldArrayLength + length;
                    ExchangeTrendAmount[] exchangeTrendAmountArr2 = new ExchangeTrendAmount[i10];
                    if (length != 0) {
                        System.arraycopy(exchangeTrendAmountArr, 0, exchangeTrendAmountArr2, 0, length);
                    }
                    while (length < i10 - 1) {
                        ExchangeTrendAmount exchangeTrendAmount = new ExchangeTrendAmount();
                        exchangeTrendAmountArr2[length] = exchangeTrendAmount;
                        codedInputByteBufferNano.readMessage(exchangeTrendAmount);
                        codedInputByteBufferNano.readTag();
                        length++;
                    }
                    ExchangeTrendAmount exchangeTrendAmount2 = new ExchangeTrendAmount();
                    exchangeTrendAmountArr2[length] = exchangeTrendAmount2;
                    codedInputByteBufferNano.readMessage(exchangeTrendAmount2);
                    this.responseData = exchangeTrendAmountArr2;
                } else if (readTag == 18) {
                    if (this.requestData == null) {
                        this.requestData = new TrendAmountRequest.TrendAmount_Request();
                    }
                    codedInputByteBufferNano.readMessage(this.requestData);
                } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                    return this;
                }
            }
        }
    }
}
