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

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

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

        private static volatile TrendTurnover_Response[] _emptyArray;

        public TrendTurnoverRequest.TrendTurnover_Request requestData;

        public ExchangeTrendTurnover[] responseData;

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

            private static volatile ExchangeTrendTurnover[] _emptyArray;

            private int bitField0_;

            private long buyTurnover_;

            private long sellTurnover_;

            private String statusReasons_;

            private int tradeDate_;

            private int tradeDirection_;

            private int tradeTime_;

            public TrendPoint[] trendLine;

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

                private static volatile TrendPoint[] _emptyArray;

                private int bitField0_;

                private long net_;

                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.net_ = 0;
                    this.cachedSize = -1;
                    return this;
                }

                public TrendPoint clearNet() {
                    this.net_ = 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.computeInt64Size(2, this.net_);
                    }
                    return computeSerializedSize;
                }

                public long getNet() {
                    return this.net_;
                }

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

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

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

                public TrendPoint setNet(long j10) {
                    this.net_ = 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.writeInt64(2, this.net_);
                    }
                    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.net_ = codedInputByteBufferNano.readInt64();
                            this.bitField0_ |= 2;
                        } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                            return this;
                        }
                    }
                }
            }

            public ExchangeTrendTurnover() {
                clear();
            }

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

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

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

            public ExchangeTrendTurnover clearBuyTurnover() {
                this.buyTurnover_ = 0;
                this.bitField0_ &= -9;
                return this;
            }

            public ExchangeTrendTurnover clearSellTurnover() {
                this.sellTurnover_ = 0;
                this.bitField0_ &= -17;
                return this;
            }

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

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

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

            public ExchangeTrendTurnover 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.computeInt64Size(4, this.buyTurnover_);
                }
                if ((this.bitField0_ & 16) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeInt64Size(5, this.sellTurnover_);
                }
                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 getBuyTurnover() {
                return this.buyTurnover_;
            }

            public long getSellTurnover() {
                return this.sellTurnover_;
            }

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

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

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

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

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

            public boolean hasSellTurnover() {
                if ((this.bitField0_ & 16) != 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 hasTradeTime() {
                if ((this.bitField0_ & 4) != 0) {
                    return true;
                }
                return false;
            }

            public ExchangeTrendTurnover setBuyTurnover(long j10) {
                this.buyTurnover_ = j10;
                this.bitField0_ |= 8;
                return this;
            }

            public ExchangeTrendTurnover setSellTurnover(long j10) {
                this.sellTurnover_ = j10;
                this.bitField0_ |= 16;
                return this;
            }

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

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

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

            public ExchangeTrendTurnover 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.writeInt64(4, this.buyTurnover_);
                }
                if ((this.bitField0_ & 16) != 0) {
                    codedOutputByteBufferNano.writeInt64(5, this.sellTurnover_);
                }
                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 ExchangeTrendTurnover parseFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
                return new ExchangeTrendTurnover().mergeFrom(codedInputByteBufferNano);
            }

            public ExchangeTrendTurnover 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.buyTurnover_ = codedInputByteBufferNano.readInt64();
                        this.bitField0_ |= 8;
                    } else if (readTag == 40) {
                        this.sellTurnover_ = codedInputByteBufferNano.readInt64();
                        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 TrendTurnover_Response() {
            clear();
        }

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

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

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

        /* access modifiers changed from: protected */
        public int computeSerializedSize() {
            int computeSerializedSize = super.computeSerializedSize();
            ExchangeTrendTurnover[] exchangeTrendTurnoverArr = this.responseData;
            if (exchangeTrendTurnoverArr != null && exchangeTrendTurnoverArr.length > 0) {
                int i10 = 0;
                while (true) {
                    ExchangeTrendTurnover[] exchangeTrendTurnoverArr2 = this.responseData;
                    if (i10 >= exchangeTrendTurnoverArr2.length) {
                        break;
                    }
                    ExchangeTrendTurnover exchangeTrendTurnover = exchangeTrendTurnoverArr2[i10];
                    if (exchangeTrendTurnover != null) {
                        computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(1, exchangeTrendTurnover);
                    }
                    i10++;
                }
            }
            TrendTurnoverRequest.TrendTurnover_Request trendTurnover_Request = this.requestData;
            if (trendTurnover_Request != null) {
                return computeSerializedSize + CodedOutputByteBufferNano.computeMessageSize(2, trendTurnover_Request);
            }
            return computeSerializedSize;
        }

        public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
            ExchangeTrendTurnover[] exchangeTrendTurnoverArr = this.responseData;
            if (exchangeTrendTurnoverArr != null && exchangeTrendTurnoverArr.length > 0) {
                int i10 = 0;
                while (true) {
                    ExchangeTrendTurnover[] exchangeTrendTurnoverArr2 = this.responseData;
                    if (i10 >= exchangeTrendTurnoverArr2.length) {
                        break;
                    }
                    ExchangeTrendTurnover exchangeTrendTurnover = exchangeTrendTurnoverArr2[i10];
                    if (exchangeTrendTurnover != null) {
                        codedOutputByteBufferNano.writeMessage(1, exchangeTrendTurnover);
                    }
                    i10++;
                }
            }
            TrendTurnoverRequest.TrendTurnover_Request trendTurnover_Request = this.requestData;
            if (trendTurnover_Request != null) {
                codedOutputByteBufferNano.writeMessage(2, trendTurnover_Request);
            }
            super.writeTo(codedOutputByteBufferNano);
        }

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

        public TrendTurnover_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);
                    ExchangeTrendTurnover[] exchangeTrendTurnoverArr = this.responseData;
                    int length = exchangeTrendTurnoverArr == null ? 0 : exchangeTrendTurnoverArr.length;
                    int i10 = repeatedFieldArrayLength + length;
                    ExchangeTrendTurnover[] exchangeTrendTurnoverArr2 = new ExchangeTrendTurnover[i10];
                    if (length != 0) {
                        System.arraycopy(exchangeTrendTurnoverArr, 0, exchangeTrendTurnoverArr2, 0, length);
                    }
                    while (length < i10 - 1) {
                        ExchangeTrendTurnover exchangeTrendTurnover = new ExchangeTrendTurnover();
                        exchangeTrendTurnoverArr2[length] = exchangeTrendTurnover;
                        codedInputByteBufferNano.readMessage(exchangeTrendTurnover);
                        codedInputByteBufferNano.readTag();
                        length++;
                    }
                    ExchangeTrendTurnover exchangeTrendTurnover2 = new ExchangeTrendTurnover();
                    exchangeTrendTurnoverArr2[length] = exchangeTrendTurnover2;
                    codedInputByteBufferNano.readMessage(exchangeTrendTurnover2);
                    this.responseData = exchangeTrendTurnoverArr2;
                } else if (readTag == 18) {
                    if (this.requestData == null) {
                        this.requestData = new TrendTurnoverRequest.TrendTurnover_Request();
                    }
                    codedInputByteBufferNano.readMessage(this.requestData);
                } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                    return this;
                }
            }
        }
    }
}
