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

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

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

        private static volatile NetFlowPreview_Response[] _emptyArray;

        public NetFlowPreviewRequest.NetFlowPreview_Request input;

        public long[] net;

        public NetFlowPreview_Response() {
            clear();
        }

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

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

        public NetFlowPreview_Response clear() {
            this.input = null;
            this.net = WireFormatNano.EMPTY_LONG_ARRAY;
            this.cachedSize = -1;
            return this;
        }

        /* access modifiers changed from: protected */
        public int computeSerializedSize() {
            int computeSerializedSize = super.computeSerializedSize();
            NetFlowPreviewRequest.NetFlowPreview_Request netFlowPreview_Request = this.input;
            if (netFlowPreview_Request != null) {
                computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(1, netFlowPreview_Request);
            }
            long[] jArr = this.net;
            if (jArr == null || jArr.length <= 0) {
                return computeSerializedSize;
            }
            int i10 = 0;
            int i11 = 0;
            while (true) {
                long[] jArr2 = this.net;
                if (i10 >= jArr2.length) {
                    return computeSerializedSize + i11 + jArr2.length;
                }
                i11 += CodedOutputByteBufferNano.computeInt64SizeNoTag(jArr2[i10]);
                i10++;
            }
        }

        public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
            NetFlowPreviewRequest.NetFlowPreview_Request netFlowPreview_Request = this.input;
            if (netFlowPreview_Request != null) {
                codedOutputByteBufferNano.writeMessage(1, netFlowPreview_Request);
            }
            long[] jArr = this.net;
            if (jArr != null && jArr.length > 0) {
                int i10 = 0;
                while (true) {
                    long[] jArr2 = this.net;
                    if (i10 >= jArr2.length) {
                        break;
                    }
                    codedOutputByteBufferNano.writeInt64(2, jArr2[i10]);
                    i10++;
                }
            }
            super.writeTo(codedOutputByteBufferNano);
        }

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

        public NetFlowPreview_Response mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
            while (true) {
                int readTag = codedInputByteBufferNano.readTag();
                if (readTag == 0) {
                    return this;
                }
                if (readTag == 10) {
                    if (this.input == null) {
                        this.input = new NetFlowPreviewRequest.NetFlowPreview_Request();
                    }
                    codedInputByteBufferNano.readMessage(this.input);
                } else if (readTag == 16) {
                    int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 16);
                    long[] jArr = this.net;
                    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.net = jArr2;
                } else if (readTag == 18) {
                    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.net;
                    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.net = jArr4;
                    codedInputByteBufferNano.popLimit(pushLimit);
                } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                    return this;
                }
            }
        }
    }
}
