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

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

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

        private static volatile UpdownStatistic_Response[] _emptyArray;

        public UpdownStatisticRequest.UpdownStatistic_Request inputParam;

        public Statistic_Diagram[] outputParam;

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

            private static volatile Statistic_Diagram[] _emptyArray;

            private int bitField0_;

            public int[] code;

            private String name_;

            private int tag_;

            private int value_;

            public Statistic_Diagram() {
                clear();
            }

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

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

            public Statistic_Diagram clear() {
                this.bitField0_ = 0;
                this.name_ = "";
                this.value_ = 0;
                this.tag_ = 0;
                this.code = WireFormatNano.EMPTY_INT_ARRAY;
                this.cachedSize = -1;
                return this;
            }

            public Statistic_Diagram clearName() {
                this.name_ = "";
                this.bitField0_ &= -2;
                return this;
            }

            public Statistic_Diagram clearTag() {
                this.tag_ = 0;
                this.bitField0_ &= -5;
                return this;
            }

            public Statistic_Diagram clearValue() {
                this.value_ = 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.name_);
                }
                if ((this.bitField0_ & 2) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(2, this.value_);
                }
                if ((this.bitField0_ & 4) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(3, this.tag_);
                }
                int[] iArr = this.code;
                if (iArr == null || iArr.length <= 0) {
                    return computeSerializedSize;
                }
                int i10 = 0;
                int i11 = 0;
                while (true) {
                    int[] iArr2 = this.code;
                    if (i10 >= iArr2.length) {
                        return computeSerializedSize + i11 + iArr2.length;
                    }
                    i11 += CodedOutputByteBufferNano.computeUInt32SizeNoTag(iArr2[i10]);
                    i10++;
                }
            }

            public String getName() {
                return this.name_;
            }

            public int getTag() {
                return this.tag_;
            }

            public int getValue() {
                return this.value_;
            }

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

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

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

            public Statistic_Diagram setName(String str) {
                str.getClass();
                this.name_ = str;
                this.bitField0_ |= 1;
                return this;
            }

            public Statistic_Diagram setTag(int i10) {
                this.tag_ = i10;
                this.bitField0_ |= 4;
                return this;
            }

            public Statistic_Diagram setValue(int i10) {
                this.value_ = i10;
                this.bitField0_ |= 2;
                return this;
            }

            public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
                if ((this.bitField0_ & 1) != 0) {
                    codedOutputByteBufferNano.writeString(1, this.name_);
                }
                if ((this.bitField0_ & 2) != 0) {
                    codedOutputByteBufferNano.writeUInt32(2, this.value_);
                }
                if ((this.bitField0_ & 4) != 0) {
                    codedOutputByteBufferNano.writeUInt32(3, this.tag_);
                }
                int[] iArr = this.code;
                if (iArr != null && iArr.length > 0) {
                    int i10 = 0;
                    while (true) {
                        int[] iArr2 = this.code;
                        if (i10 >= iArr2.length) {
                            break;
                        }
                        codedOutputByteBufferNano.writeUInt32(4, iArr2[i10]);
                        i10++;
                    }
                }
                super.writeTo(codedOutputByteBufferNano);
            }

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

            public Statistic_Diagram mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
                while (true) {
                    int readTag = codedInputByteBufferNano.readTag();
                    if (readTag == 0) {
                        return this;
                    }
                    if (readTag == 10) {
                        this.name_ = codedInputByteBufferNano.readString();
                        this.bitField0_ |= 1;
                    } else if (readTag == 16) {
                        this.value_ = codedInputByteBufferNano.readUInt32();
                        this.bitField0_ |= 2;
                    } else if (readTag == 24) {
                        this.tag_ = codedInputByteBufferNano.readUInt32();
                        this.bitField0_ |= 4;
                    } else if (readTag == 32) {
                        int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 32);
                        int[] iArr = this.code;
                        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.readUInt32();
                            codedInputByteBufferNano.readTag();
                            length++;
                        }
                        iArr2[length] = codedInputByteBufferNano.readUInt32();
                        this.code = iArr2;
                    } else if (readTag == 34) {
                        int pushLimit = codedInputByteBufferNano.pushLimit(codedInputByteBufferNano.readRawVarint32());
                        int position = codedInputByteBufferNano.getPosition();
                        int i11 = 0;
                        while (codedInputByteBufferNano.getBytesUntilLimit() > 0) {
                            codedInputByteBufferNano.readUInt32();
                            i11++;
                        }
                        codedInputByteBufferNano.rewindToPosition(position);
                        int[] iArr3 = this.code;
                        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.readUInt32();
                            length2++;
                        }
                        this.code = iArr4;
                        codedInputByteBufferNano.popLimit(pushLimit);
                    } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                        return this;
                    }
                }
            }
        }

        public UpdownStatistic_Response() {
            clear();
        }

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

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

        public UpdownStatistic_Response clear() {
            this.inputParam = null;
            this.outputParam = Statistic_Diagram.emptyArray();
            this.cachedSize = -1;
            return this;
        }

        /* access modifiers changed from: protected */
        public int computeSerializedSize() {
            int computeSerializedSize = super.computeSerializedSize();
            UpdownStatisticRequest.UpdownStatistic_Request updownStatistic_Request = this.inputParam;
            if (updownStatistic_Request != null) {
                computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(1, updownStatistic_Request);
            }
            Statistic_Diagram[] statistic_DiagramArr = this.outputParam;
            if (statistic_DiagramArr != null && statistic_DiagramArr.length > 0) {
                int i10 = 0;
                while (true) {
                    Statistic_Diagram[] statistic_DiagramArr2 = this.outputParam;
                    if (i10 >= statistic_DiagramArr2.length) {
                        break;
                    }
                    Statistic_Diagram statistic_Diagram = statistic_DiagramArr2[i10];
                    if (statistic_Diagram != null) {
                        computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(2, statistic_Diagram);
                    }
                    i10++;
                }
            }
            return computeSerializedSize;
        }

        public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
            UpdownStatisticRequest.UpdownStatistic_Request updownStatistic_Request = this.inputParam;
            if (updownStatistic_Request != null) {
                codedOutputByteBufferNano.writeMessage(1, updownStatistic_Request);
            }
            Statistic_Diagram[] statistic_DiagramArr = this.outputParam;
            if (statistic_DiagramArr != null && statistic_DiagramArr.length > 0) {
                int i10 = 0;
                while (true) {
                    Statistic_Diagram[] statistic_DiagramArr2 = this.outputParam;
                    if (i10 >= statistic_DiagramArr2.length) {
                        break;
                    }
                    Statistic_Diagram statistic_Diagram = statistic_DiagramArr2[i10];
                    if (statistic_Diagram != null) {
                        codedOutputByteBufferNano.writeMessage(2, statistic_Diagram);
                    }
                    i10++;
                }
            }
            super.writeTo(codedOutputByteBufferNano);
        }

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

        public UpdownStatistic_Response mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
            while (true) {
                int readTag = codedInputByteBufferNano.readTag();
                if (readTag == 0) {
                    return this;
                }
                if (readTag == 10) {
                    if (this.inputParam == null) {
                        this.inputParam = new UpdownStatisticRequest.UpdownStatistic_Request();
                    }
                    codedInputByteBufferNano.readMessage(this.inputParam);
                } else if (readTag == 18) {
                    int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 18);
                    Statistic_Diagram[] statistic_DiagramArr = this.outputParam;
                    int length = statistic_DiagramArr == null ? 0 : statistic_DiagramArr.length;
                    int i10 = repeatedFieldArrayLength + length;
                    Statistic_Diagram[] statistic_DiagramArr2 = new Statistic_Diagram[i10];
                    if (length != 0) {
                        System.arraycopy(statistic_DiagramArr, 0, statistic_DiagramArr2, 0, length);
                    }
                    while (length < i10 - 1) {
                        Statistic_Diagram statistic_Diagram = new Statistic_Diagram();
                        statistic_DiagramArr2[length] = statistic_Diagram;
                        codedInputByteBufferNano.readMessage(statistic_Diagram);
                        codedInputByteBufferNano.readTag();
                        length++;
                    }
                    Statistic_Diagram statistic_Diagram2 = new Statistic_Diagram();
                    statistic_DiagramArr2[length] = statistic_Diagram2;
                    codedInputByteBufferNano.readMessage(statistic_Diagram2);
                    this.outputParam = statistic_DiagramArr2;
                } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                    return this;
                }
            }
        }
    }
}
