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

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

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

        private static volatile IndexCalcNewEx_Response[] _emptyArray;

        private int bitField0_;

        public IndexCalcRequest.IndexCalc_Request inputParams;

        public color_ex[] lineColor;

        public long[] lineTime;

        public outputline[] lineValue;

        private boolean masterOverlay_;

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

            private static volatile color_ex[] _emptyArray;

            private int bitField0_;

            public int[] dataColor;

            private String nameColor_;

            public color_ex() {
                clear();
            }

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

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

            public color_ex clear() {
                this.bitField0_ = 0;
                this.nameColor_ = "";
                this.dataColor = WireFormatNano.EMPTY_INT_ARRAY;
                this.cachedSize = -1;
                return this;
            }

            public color_ex clearNameColor() {
                this.nameColor_ = "";
                this.bitField0_ &= -2;
                return this;
            }

            /* access modifiers changed from: protected */
            public int computeSerializedSize() {
                int computeSerializedSize = super.computeSerializedSize();
                if ((this.bitField0_ & 1) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeStringSize(1, this.nameColor_);
                }
                int[] iArr = this.dataColor;
                if (iArr == null || iArr.length <= 0) {
                    return computeSerializedSize;
                }
                int i10 = 0;
                int i11 = 0;
                while (true) {
                    int[] iArr2 = this.dataColor;
                    if (i10 >= iArr2.length) {
                        return computeSerializedSize + i11 + iArr2.length;
                    }
                    i11 += CodedOutputByteBufferNano.computeInt32SizeNoTag(iArr2[i10]);
                    i10++;
                }
            }

            public String getNameColor() {
                return this.nameColor_;
            }

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

            public color_ex setNameColor(String str) {
                str.getClass();
                this.nameColor_ = str;
                this.bitField0_ |= 1;
                return this;
            }

            public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
                if ((this.bitField0_ & 1) != 0) {
                    codedOutputByteBufferNano.writeString(1, this.nameColor_);
                }
                int[] iArr = this.dataColor;
                if (iArr != null && iArr.length > 0) {
                    int i10 = 0;
                    while (true) {
                        int[] iArr2 = this.dataColor;
                        if (i10 >= iArr2.length) {
                            break;
                        }
                        codedOutputByteBufferNano.writeInt32(2, iArr2[i10]);
                        i10++;
                    }
                }
                super.writeTo(codedOutputByteBufferNano);
            }

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

            public color_ex mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
                while (true) {
                    int readTag = codedInputByteBufferNano.readTag();
                    if (readTag == 0) {
                        return this;
                    }
                    if (readTag == 10) {
                        this.nameColor_ = codedInputByteBufferNano.readString();
                        this.bitField0_ |= 1;
                    } else if (readTag == 16) {
                        int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 16);
                        int[] iArr = this.dataColor;
                        int length = iArr == null ? 0 : iArr.length;
                        int i10 = repeatedFieldArrayLength + length;
                        int[] iArr2 = new int[i10];
                        if (length != 0) {
                            System.arraycopy(iArr, 0, iArr2, 0, length);
                        }
                        while (length < i10 - 1) {
                            iArr2[length] = codedInputByteBufferNano.readInt32();
                            codedInputByteBufferNano.readTag();
                            length++;
                        }
                        iArr2[length] = codedInputByteBufferNano.readInt32();
                        this.dataColor = iArr2;
                    } else if (readTag == 18) {
                        int pushLimit = codedInputByteBufferNano.pushLimit(codedInputByteBufferNano.readRawVarint32());
                        int position = codedInputByteBufferNano.getPosition();
                        int i11 = 0;
                        while (codedInputByteBufferNano.getBytesUntilLimit() > 0) {
                            codedInputByteBufferNano.readInt32();
                            i11++;
                        }
                        codedInputByteBufferNano.rewindToPosition(position);
                        int[] iArr3 = this.dataColor;
                        int length2 = iArr3 == null ? 0 : iArr3.length;
                        int i12 = i11 + length2;
                        int[] iArr4 = new int[i12];
                        if (length2 != 0) {
                            System.arraycopy(iArr3, 0, iArr4, 0, length2);
                        }
                        while (length2 < i12) {
                            iArr4[length2] = codedInputByteBufferNano.readInt32();
                            length2++;
                        }
                        this.dataColor = iArr4;
                        codedInputByteBufferNano.popLimit(pushLimit);
                    } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                        return this;
                    }
                }
            }
        }

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

            private static volatile outputline[] _emptyArray;

            private int bitField0_;

            public long[] lineData;

            private String lineName_;

            private int lineShape_;

            public outputline() {
                clear();
            }

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

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

            public outputline clear() {
                this.bitField0_ = 0;
                this.lineName_ = "";
                this.lineShape_ = 0;
                this.lineData = WireFormatNano.EMPTY_LONG_ARRAY;
                this.cachedSize = -1;
                return this;
            }

            public outputline clearLineName() {
                this.lineName_ = "";
                this.bitField0_ &= -2;
                return this;
            }

            public outputline clearLineShape() {
                this.lineShape_ = 0;
                this.bitField0_ &= -3;
                return this;
            }

            /* access modifiers changed from: protected */
            public int computeSerializedSize() {
                int computeSerializedSize = super.computeSerializedSize();
                if ((this.bitField0_ & 1) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeStringSize(1, this.lineName_);
                }
                if ((this.bitField0_ & 2) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(2, this.lineShape_);
                }
                long[] jArr = this.lineData;
                if (jArr == null || jArr.length <= 0) {
                    return computeSerializedSize;
                }
                int i10 = 0;
                int i11 = 0;
                while (true) {
                    long[] jArr2 = this.lineData;
                    if (i10 >= jArr2.length) {
                        return computeSerializedSize + i11 + jArr2.length;
                    }
                    i11 += CodedOutputByteBufferNano.computeInt64SizeNoTag(jArr2[i10]);
                    i10++;
                }
            }

            public String getLineName() {
                return this.lineName_;
            }

            public int getLineShape() {
                return this.lineShape_;
            }

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

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

            public outputline setLineName(String str) {
                str.getClass();
                this.lineName_ = str;
                this.bitField0_ |= 1;
                return this;
            }

            public outputline setLineShape(int i10) {
                this.lineShape_ = i10;
                this.bitField0_ |= 2;
                return this;
            }

            public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
                if ((this.bitField0_ & 1) != 0) {
                    codedOutputByteBufferNano.writeString(1, this.lineName_);
                }
                if ((this.bitField0_ & 2) != 0) {
                    codedOutputByteBufferNano.writeUInt32(2, this.lineShape_);
                }
                long[] jArr = this.lineData;
                if (jArr != null && jArr.length > 0) {
                    int i10 = 0;
                    while (true) {
                        long[] jArr2 = this.lineData;
                        if (i10 >= jArr2.length) {
                            break;
                        }
                        codedOutputByteBufferNano.writeInt64(3, jArr2[i10]);
                        i10++;
                    }
                }
                super.writeTo(codedOutputByteBufferNano);
            }

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

            public outputline mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
                while (true) {
                    int readTag = codedInputByteBufferNano.readTag();
                    if (readTag == 0) {
                        return this;
                    }
                    if (readTag == 10) {
                        this.lineName_ = codedInputByteBufferNano.readString();
                        this.bitField0_ |= 1;
                    } else if (readTag == 16) {
                        this.lineShape_ = codedInputByteBufferNano.readUInt32();
                        this.bitField0_ |= 2;
                    } else if (readTag == 24) {
                        int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 24);
                        long[] jArr = this.lineData;
                        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.readInt64();
                            codedInputByteBufferNano.readTag();
                            length++;
                        }
                        jArr2[length] = codedInputByteBufferNano.readInt64();
                        this.lineData = jArr2;
                    } else if (readTag == 26) {
                        int pushLimit = codedInputByteBufferNano.pushLimit(codedInputByteBufferNano.readRawVarint32());
                        int position = codedInputByteBufferNano.getPosition();
                        int i11 = 0;
                        while (codedInputByteBufferNano.getBytesUntilLimit() > 0) {
                            codedInputByteBufferNano.readInt64();
                            i11++;
                        }
                        codedInputByteBufferNano.rewindToPosition(position);
                        long[] jArr3 = this.lineData;
                        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.readInt64();
                            length2++;
                        }
                        this.lineData = jArr4;
                        codedInputByteBufferNano.popLimit(pushLimit);
                    } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                        return this;
                    }
                }
            }
        }

        public IndexCalcNewEx_Response() {
            clear();
        }

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

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

        public IndexCalcNewEx_Response clear() {
            this.bitField0_ = 0;
            this.inputParams = null;
            this.lineValue = outputline.emptyArray();
            this.lineTime = WireFormatNano.EMPTY_LONG_ARRAY;
            this.masterOverlay_ = false;
            this.lineColor = color_ex.emptyArray();
            this.cachedSize = -1;
            return this;
        }

        public IndexCalcNewEx_Response clearMasterOverlay() {
            this.masterOverlay_ = false;
            this.bitField0_ &= -2;
            return this;
        }

        /* access modifiers changed from: protected */
        public int computeSerializedSize() {
            long[] jArr;
            int computeSerializedSize = super.computeSerializedSize();
            IndexCalcRequest.IndexCalc_Request indexCalc_Request = this.inputParams;
            if (indexCalc_Request != null) {
                computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(1, indexCalc_Request);
            }
            outputline[] outputlineArr = this.lineValue;
            int i10 = 0;
            if (outputlineArr != null && outputlineArr.length > 0) {
                int i11 = 0;
                while (true) {
                    outputline[] outputlineArr2 = this.lineValue;
                    if (i11 >= outputlineArr2.length) {
                        break;
                    }
                    outputline outputline2 = outputlineArr2[i11];
                    if (outputline2 != null) {
                        computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(2, outputline2);
                    }
                    i11++;
                }
            }
            long[] jArr2 = this.lineTime;
            if (jArr2 != null && jArr2.length > 0) {
                int i12 = 0;
                int i13 = 0;
                while (true) {
                    jArr = this.lineTime;
                    if (i12 >= jArr.length) {
                        break;
                    }
                    i13 += CodedOutputByteBufferNano.computeInt64SizeNoTag(jArr[i12]);
                    i12++;
                }
                computeSerializedSize = computeSerializedSize + i13 + jArr.length;
            }
            if ((this.bitField0_ & 1) != 0) {
                computeSerializedSize += CodedOutputByteBufferNano.computeBoolSize(4, this.masterOverlay_);
            }
            color_ex[] color_exArr = this.lineColor;
            if (color_exArr != null && color_exArr.length > 0) {
                while (true) {
                    color_ex[] color_exArr2 = this.lineColor;
                    if (i10 >= color_exArr2.length) {
                        break;
                    }
                    color_ex color_ex2 = color_exArr2[i10];
                    if (color_ex2 != null) {
                        computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(5, color_ex2);
                    }
                    i10++;
                }
            }
            return computeSerializedSize;
        }

        public boolean getMasterOverlay() {
            return this.masterOverlay_;
        }

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

        public IndexCalcNewEx_Response setMasterOverlay(boolean z9) {
            this.masterOverlay_ = z9;
            this.bitField0_ |= 1;
            return this;
        }

        public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
            IndexCalcRequest.IndexCalc_Request indexCalc_Request = this.inputParams;
            if (indexCalc_Request != null) {
                codedOutputByteBufferNano.writeMessage(1, indexCalc_Request);
            }
            outputline[] outputlineArr = this.lineValue;
            int i10 = 0;
            if (outputlineArr != null && outputlineArr.length > 0) {
                int i11 = 0;
                while (true) {
                    outputline[] outputlineArr2 = this.lineValue;
                    if (i11 >= outputlineArr2.length) {
                        break;
                    }
                    outputline outputline2 = outputlineArr2[i11];
                    if (outputline2 != null) {
                        codedOutputByteBufferNano.writeMessage(2, outputline2);
                    }
                    i11++;
                }
            }
            long[] jArr = this.lineTime;
            if (jArr != null && jArr.length > 0) {
                int i12 = 0;
                while (true) {
                    long[] jArr2 = this.lineTime;
                    if (i12 >= jArr2.length) {
                        break;
                    }
                    codedOutputByteBufferNano.writeInt64(3, jArr2[i12]);
                    i12++;
                }
            }
            if ((this.bitField0_ & 1) != 0) {
                codedOutputByteBufferNano.writeBool(4, this.masterOverlay_);
            }
            color_ex[] color_exArr = this.lineColor;
            if (color_exArr != null && color_exArr.length > 0) {
                while (true) {
                    color_ex[] color_exArr2 = this.lineColor;
                    if (i10 >= color_exArr2.length) {
                        break;
                    }
                    color_ex color_ex2 = color_exArr2[i10];
                    if (color_ex2 != null) {
                        codedOutputByteBufferNano.writeMessage(5, color_ex2);
                    }
                    i10++;
                }
            }
            super.writeTo(codedOutputByteBufferNano);
        }

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

        public IndexCalcNewEx_Response mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
            while (true) {
                int readTag = codedInputByteBufferNano.readTag();
                if (readTag == 0) {
                    return this;
                }
                if (readTag == 10) {
                    if (this.inputParams == null) {
                        this.inputParams = new IndexCalcRequest.IndexCalc_Request();
                    }
                    codedInputByteBufferNano.readMessage(this.inputParams);
                } else if (readTag == 18) {
                    int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 18);
                    outputline[] outputlineArr = this.lineValue;
                    int length = outputlineArr == null ? 0 : outputlineArr.length;
                    int i10 = repeatedFieldArrayLength + length;
                    outputline[] outputlineArr2 = new outputline[i10];
                    if (length != 0) {
                        System.arraycopy(outputlineArr, 0, outputlineArr2, 0, length);
                    }
                    while (length < i10 - 1) {
                        outputline outputline2 = new outputline();
                        outputlineArr2[length] = outputline2;
                        codedInputByteBufferNano.readMessage(outputline2);
                        codedInputByteBufferNano.readTag();
                        length++;
                    }
                    outputline outputline3 = new outputline();
                    outputlineArr2[length] = outputline3;
                    codedInputByteBufferNano.readMessage(outputline3);
                    this.lineValue = outputlineArr2;
                } else if (readTag == 24) {
                    int repeatedFieldArrayLength2 = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 24);
                    long[] jArr = this.lineTime;
                    int length2 = jArr == null ? 0 : jArr.length;
                    int i11 = repeatedFieldArrayLength2 + length2;
                    long[] jArr2 = new long[i11];
                    if (length2 != 0) {
                        System.arraycopy(jArr, 0, jArr2, 0, length2);
                    }
                    while (length2 < i11 - 1) {
                        jArr2[length2] = codedInputByteBufferNano.readInt64();
                        codedInputByteBufferNano.readTag();
                        length2++;
                    }
                    jArr2[length2] = codedInputByteBufferNano.readInt64();
                    this.lineTime = jArr2;
                } else if (readTag == 26) {
                    int pushLimit = codedInputByteBufferNano.pushLimit(codedInputByteBufferNano.readRawVarint32());
                    int position = codedInputByteBufferNano.getPosition();
                    int i12 = 0;
                    while (codedInputByteBufferNano.getBytesUntilLimit() > 0) {
                        codedInputByteBufferNano.readInt64();
                        i12++;
                    }
                    codedInputByteBufferNano.rewindToPosition(position);
                    long[] jArr3 = this.lineTime;
                    int length3 = jArr3 == null ? 0 : jArr3.length;
                    int i13 = i12 + length3;
                    long[] jArr4 = new long[i13];
                    if (length3 != 0) {
                        System.arraycopy(jArr3, 0, jArr4, 0, length3);
                    }
                    while (length3 < i13) {
                        jArr4[length3] = codedInputByteBufferNano.readInt64();
                        length3++;
                    }
                    this.lineTime = jArr4;
                    codedInputByteBufferNano.popLimit(pushLimit);
                } else if (readTag == 32) {
                    this.masterOverlay_ = codedInputByteBufferNano.readBool();
                    this.bitField0_ |= 1;
                } else if (readTag == 42) {
                    int repeatedFieldArrayLength3 = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 42);
                    color_ex[] color_exArr = this.lineColor;
                    int length4 = color_exArr == null ? 0 : color_exArr.length;
                    int i14 = repeatedFieldArrayLength3 + length4;
                    color_ex[] color_exArr2 = new color_ex[i14];
                    if (length4 != 0) {
                        System.arraycopy(color_exArr, 0, color_exArr2, 0, length4);
                    }
                    while (length4 < i14 - 1) {
                        color_ex color_ex2 = new color_ex();
                        color_exArr2[length4] = color_ex2;
                        codedInputByteBufferNano.readMessage(color_ex2);
                        codedInputByteBufferNano.readTag();
                        length4++;
                    }
                    color_ex color_ex3 = new color_ex();
                    color_exArr2[length4] = color_ex3;
                    codedInputByteBufferNano.readMessage(color_ex3);
                    this.lineColor = color_exArr2;
                } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                    return this;
                }
            }
        }
    }
}
