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

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

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

        private static volatile TrendLine_Response[] _emptyArray;

        public TrendLine[] historyData;

        public TrendLine lastData;

        public TrendLineRequest.TrendLine_Request requestParam;

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

            private static volatile TrendLine[] _emptyArray;

            private int bitField0_;

            private int closePrice_;

            private int tradeDate_;

            private int tradeTime_;

            public TrendPoint[] trendLines;

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

                private static volatile TrendPoint[] _emptyArray;

                private long amount_;

                private int average_;

                private int bitField0_;

                private int price_;

                private int time_;

                private long volume_;

                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.price_ = 0;
                    this.average_ = 0;
                    this.volume_ = 0;
                    this.amount_ = 0;
                    this.cachedSize = -1;
                    return this;
                }

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

                public TrendPoint clearAverage() {
                    this.average_ = 0;
                    this.bitField0_ &= -5;
                    return this;
                }

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

                public TrendPoint clearTime() {
                    this.time_ = 0;
                    this.bitField0_ &= -2;
                    return this;
                }

                public TrendPoint clearVolume() {
                    this.volume_ = 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.time_);
                    }
                    if ((this.bitField0_ & 2) != 0) {
                        computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(2, this.price_);
                    }
                    if ((this.bitField0_ & 4) != 0) {
                        computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(3, this.average_);
                    }
                    if ((this.bitField0_ & 8) != 0) {
                        computeSerializedSize += CodedOutputByteBufferNano.computeUInt64Size(4, this.volume_);
                    }
                    if ((this.bitField0_ & 16) != 0) {
                        return computeSerializedSize + CodedOutputByteBufferNano.computeInt64Size(5, this.amount_);
                    }
                    return computeSerializedSize;
                }

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

                public int getAverage() {
                    return this.average_;
                }

                public int getPrice() {
                    return this.price_;
                }

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

                public long getVolume() {
                    return this.volume_;
                }

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

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

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

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

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

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

                public TrendPoint setAverage(int i10) {
                    this.average_ = i10;
                    this.bitField0_ |= 4;
                    return this;
                }

                public TrendPoint setPrice(int i10) {
                    this.price_ = i10;
                    this.bitField0_ |= 2;
                    return this;
                }

                public TrendPoint setTime(int i10) {
                    this.time_ = i10;
                    this.bitField0_ |= 1;
                    return this;
                }

                public TrendPoint setVolume(long j10) {
                    this.volume_ = j10;
                    this.bitField0_ |= 8;
                    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.writeUInt32(2, this.price_);
                    }
                    if ((this.bitField0_ & 4) != 0) {
                        codedOutputByteBufferNano.writeUInt32(3, this.average_);
                    }
                    if ((this.bitField0_ & 8) != 0) {
                        codedOutputByteBufferNano.writeUInt64(4, this.volume_);
                    }
                    if ((this.bitField0_ & 16) != 0) {
                        codedOutputByteBufferNano.writeInt64(5, 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.price_ = codedInputByteBufferNano.readUInt32();
                            this.bitField0_ |= 2;
                        } else if (readTag == 24) {
                            this.average_ = codedInputByteBufferNano.readUInt32();
                            this.bitField0_ |= 4;
                        } else if (readTag == 32) {
                            this.volume_ = codedInputByteBufferNano.readUInt64();
                            this.bitField0_ |= 8;
                        } else if (readTag == 40) {
                            this.amount_ = codedInputByteBufferNano.readInt64();
                            this.bitField0_ |= 16;
                        } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                            return this;
                        }
                    }
                }
            }

            public TrendLine() {
                clear();
            }

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

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

            public TrendLine clear() {
                this.bitField0_ = 0;
                this.trendLines = TrendPoint.emptyArray();
                this.closePrice_ = 0;
                this.tradeDate_ = 0;
                this.tradeTime_ = 0;
                this.cachedSize = -1;
                return this;
            }

            public TrendLine clearClosePrice() {
                this.closePrice_ = 0;
                this.bitField0_ &= -2;
                return this;
            }

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

            public TrendLine clearTradeTime() {
                this.tradeTime_ = 0;
                this.bitField0_ &= -5;
                return this;
            }

            /* access modifiers changed from: protected */
            public int computeSerializedSize() {
                int computeSerializedSize = super.computeSerializedSize();
                TrendPoint[] trendPointArr = this.trendLines;
                if (trendPointArr != null && trendPointArr.length > 0) {
                    int i10 = 0;
                    while (true) {
                        TrendPoint[] trendPointArr2 = this.trendLines;
                        if (i10 >= trendPointArr2.length) {
                            break;
                        }
                        TrendPoint trendPoint = trendPointArr2[i10];
                        if (trendPoint != null) {
                            computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(1, trendPoint);
                        }
                        i10++;
                    }
                }
                if ((this.bitField0_ & 1) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(2, this.closePrice_);
                }
                if ((this.bitField0_ & 2) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(3, this.tradeDate_);
                }
                if ((this.bitField0_ & 4) != 0) {
                    return computeSerializedSize + CodedOutputByteBufferNano.computeUInt32Size(4, this.tradeTime_);
                }
                return computeSerializedSize;
            }

            public int getClosePrice() {
                return this.closePrice_;
            }

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

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

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

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

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

            public TrendLine setClosePrice(int i10) {
                this.closePrice_ = i10;
                this.bitField0_ |= 1;
                return this;
            }

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

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

            public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
                TrendPoint[] trendPointArr = this.trendLines;
                if (trendPointArr != null && trendPointArr.length > 0) {
                    int i10 = 0;
                    while (true) {
                        TrendPoint[] trendPointArr2 = this.trendLines;
                        if (i10 >= trendPointArr2.length) {
                            break;
                        }
                        TrendPoint trendPoint = trendPointArr2[i10];
                        if (trendPoint != null) {
                            codedOutputByteBufferNano.writeMessage(1, trendPoint);
                        }
                        i10++;
                    }
                }
                if ((this.bitField0_ & 1) != 0) {
                    codedOutputByteBufferNano.writeUInt32(2, this.closePrice_);
                }
                if ((this.bitField0_ & 2) != 0) {
                    codedOutputByteBufferNano.writeUInt32(3, this.tradeDate_);
                }
                if ((this.bitField0_ & 4) != 0) {
                    codedOutputByteBufferNano.writeUInt32(4, this.tradeTime_);
                }
                super.writeTo(codedOutputByteBufferNano);
            }

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

            public TrendLine 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);
                        TrendPoint[] trendPointArr = this.trendLines;
                        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.trendLines = trendPointArr2;
                    } else if (readTag == 16) {
                        this.closePrice_ = codedInputByteBufferNano.readUInt32();
                        this.bitField0_ |= 1;
                    } else if (readTag == 24) {
                        this.tradeDate_ = codedInputByteBufferNano.readUInt32();
                        this.bitField0_ |= 2;
                    } else if (readTag == 32) {
                        this.tradeTime_ = codedInputByteBufferNano.readUInt32();
                        this.bitField0_ |= 4;
                    } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                        return this;
                    }
                }
            }
        }

        public TrendLine_Response() {
            clear();
        }

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

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

        public TrendLine_Response clear() {
            this.requestParam = null;
            this.lastData = null;
            this.historyData = TrendLine.emptyArray();
            this.cachedSize = -1;
            return this;
        }

        /* access modifiers changed from: protected */
        public int computeSerializedSize() {
            int computeSerializedSize = super.computeSerializedSize();
            TrendLineRequest.TrendLine_Request trendLine_Request = this.requestParam;
            if (trendLine_Request != null) {
                computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(1, trendLine_Request);
            }
            TrendLine trendLine = this.lastData;
            if (trendLine != null) {
                computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(2, trendLine);
            }
            TrendLine[] trendLineArr = this.historyData;
            if (trendLineArr != null && trendLineArr.length > 0) {
                int i10 = 0;
                while (true) {
                    TrendLine[] trendLineArr2 = this.historyData;
                    if (i10 >= trendLineArr2.length) {
                        break;
                    }
                    TrendLine trendLine2 = trendLineArr2[i10];
                    if (trendLine2 != null) {
                        computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(3, trendLine2);
                    }
                    i10++;
                }
            }
            return computeSerializedSize;
        }

        public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
            TrendLineRequest.TrendLine_Request trendLine_Request = this.requestParam;
            if (trendLine_Request != null) {
                codedOutputByteBufferNano.writeMessage(1, trendLine_Request);
            }
            TrendLine trendLine = this.lastData;
            if (trendLine != null) {
                codedOutputByteBufferNano.writeMessage(2, trendLine);
            }
            TrendLine[] trendLineArr = this.historyData;
            if (trendLineArr != null && trendLineArr.length > 0) {
                int i10 = 0;
                while (true) {
                    TrendLine[] trendLineArr2 = this.historyData;
                    if (i10 >= trendLineArr2.length) {
                        break;
                    }
                    TrendLine trendLine2 = trendLineArr2[i10];
                    if (trendLine2 != null) {
                        codedOutputByteBufferNano.writeMessage(3, trendLine2);
                    }
                    i10++;
                }
            }
            super.writeTo(codedOutputByteBufferNano);
        }

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

        public TrendLine_Response mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
            while (true) {
                int readTag = codedInputByteBufferNano.readTag();
                if (readTag == 0) {
                    return this;
                }
                if (readTag == 10) {
                    if (this.requestParam == null) {
                        this.requestParam = new TrendLineRequest.TrendLine_Request();
                    }
                    codedInputByteBufferNano.readMessage(this.requestParam);
                } else if (readTag == 18) {
                    if (this.lastData == null) {
                        this.lastData = new TrendLine();
                    }
                    codedInputByteBufferNano.readMessage(this.lastData);
                } else if (readTag == 26) {
                    int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 26);
                    TrendLine[] trendLineArr = this.historyData;
                    int length = trendLineArr == null ? 0 : trendLineArr.length;
                    int i10 = repeatedFieldArrayLength + length;
                    TrendLine[] trendLineArr2 = new TrendLine[i10];
                    if (length != 0) {
                        System.arraycopy(trendLineArr, 0, trendLineArr2, 0, length);
                    }
                    while (length < i10 - 1) {
                        TrendLine trendLine = new TrendLine();
                        trendLineArr2[length] = trendLine;
                        codedInputByteBufferNano.readMessage(trendLine);
                        codedInputByteBufferNano.readTag();
                        length++;
                    }
                    TrendLine trendLine2 = new TrendLine();
                    trendLineArr2[length] = trendLine2;
                    codedInputByteBufferNano.readMessage(trendLine2);
                    this.historyData = trendLineArr2;
                } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                    return this;
                }
            }
        }
    }
}
