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 IndexCalcResponse {

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

        private static volatile IndexCalc_Response[] _emptyArray;

        private int bitField0_;

        public IndexCalcRequest.IndexCalc_Request inputParams;

        public int[] lineTime;

        public outputline[] lineValue;

        private boolean masterOverlay_;

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

            private static volatile outputline[] _emptyArray;

            private int bitField0_;

            public String[] 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_STRING_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_);
                }
                String[] strArr = this.lineData;
                if (strArr == null || strArr.length <= 0) {
                    return computeSerializedSize;
                }
                int i10 = 0;
                int i11 = 0;
                int i12 = 0;
                while (true) {
                    String[] strArr2 = this.lineData;
                    if (i10 >= strArr2.length) {
                        return computeSerializedSize + i11 + i12;
                    }
                    String str = strArr2[i10];
                    if (str != null) {
                        i12++;
                        i11 += CodedOutputByteBufferNano.computeStringSizeNoTag(str);
                    }
                    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_);
                }
                String[] strArr = this.lineData;
                if (strArr != null && strArr.length > 0) {
                    int i10 = 0;
                    while (true) {
                        String[] strArr2 = this.lineData;
                        if (i10 >= strArr2.length) {
                            break;
                        }
                        String str = strArr2[i10];
                        if (str != null) {
                            codedOutputByteBufferNano.writeString(3, str);
                        }
                        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 == 26) {
                        int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 26);
                        String[] strArr = this.lineData;
                        int length = strArr == null ? 0 : strArr.length;
                        int i10 = repeatedFieldArrayLength + length;
                        String[] strArr2 = new String[i10];
                        if (length != 0) {
                            System.arraycopy(strArr, 0, strArr2, 0, length);
                        }
                        while (length < i10 - 1) {
                            strArr2[length] = codedInputByteBufferNano.readString();
                            codedInputByteBufferNano.readTag();
                            length++;
                        }
                        strArr2[length] = codedInputByteBufferNano.readString();
                        this.lineData = strArr2;
                    } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                        return this;
                    }
                }
            }
        }

        public IndexCalc_Response() {
            clear();
        }

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

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

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

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

        /* access modifiers changed from: protected */
        public int computeSerializedSize() {
            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;
            if (outputlineArr != null && outputlineArr.length > 0) {
                int i10 = 0;
                while (true) {
                    outputline[] outputlineArr2 = this.lineValue;
                    if (i10 >= outputlineArr2.length) {
                        break;
                    }
                    outputline outputline2 = outputlineArr2[i10];
                    if (outputline2 != null) {
                        computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(2, outputline2);
                    }
                    i10++;
                }
            }
            int[] iArr = this.lineTime;
            if (iArr != null && iArr.length > 0) {
                computeSerializedSize = computeSerializedSize + (iArr.length * 4) + iArr.length;
            }
            if ((this.bitField0_ & 1) != 0) {
                return computeSerializedSize + CodedOutputByteBufferNano.computeBoolSize(4, this.masterOverlay_);
            }
            return computeSerializedSize;
        }

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

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

        public IndexCalc_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++;
                }
            }
            int[] iArr = this.lineTime;
            if (iArr != null && iArr.length > 0) {
                while (true) {
                    int[] iArr2 = this.lineTime;
                    if (i10 >= iArr2.length) {
                        break;
                    }
                    codedOutputByteBufferNano.writeFixed32(3, iArr2[i10]);
                    i10++;
                }
            }
            if ((this.bitField0_ & 1) != 0) {
                codedOutputByteBufferNano.writeBool(4, this.masterOverlay_);
            }
            super.writeTo(codedOutputByteBufferNano);
        }

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

        public IndexCalc_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 == 26) {
                    int readRawVarint32 = codedInputByteBufferNano.readRawVarint32();
                    int pushLimit = codedInputByteBufferNano.pushLimit(readRawVarint32);
                    int i11 = readRawVarint32 / 4;
                    int[] iArr = this.lineTime;
                    int length2 = iArr == null ? 0 : iArr.length;
                    int i12 = i11 + length2;
                    int[] iArr2 = new int[i12];
                    if (length2 != 0) {
                        System.arraycopy(iArr, 0, iArr2, 0, length2);
                    }
                    while (length2 < i12) {
                        iArr2[length2] = codedInputByteBufferNano.readFixed32();
                        length2++;
                    }
                    this.lineTime = iArr2;
                    codedInputByteBufferNano.popLimit(pushLimit);
                } else if (readTag == 29) {
                    int repeatedFieldArrayLength2 = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 29);
                    int[] iArr3 = this.lineTime;
                    int length3 = iArr3 == null ? 0 : iArr3.length;
                    int i13 = repeatedFieldArrayLength2 + length3;
                    int[] iArr4 = new int[i13];
                    if (length3 != 0) {
                        System.arraycopy(iArr3, 0, iArr4, 0, length3);
                    }
                    while (length3 < i13 - 1) {
                        iArr4[length3] = codedInputByteBufferNano.readFixed32();
                        codedInputByteBufferNano.readTag();
                        length3++;
                    }
                    iArr4[length3] = codedInputByteBufferNano.readFixed32();
                    this.lineTime = iArr4;
                } else if (readTag == 32) {
                    this.masterOverlay_ = codedInputByteBufferNano.readBool();
                    this.bitField0_ |= 1;
                } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                    return this;
                }
            }
        }
    }
}
