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

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

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

        private static volatile UpsAndDownsStatistics_Response[] _emptyArray;

        public UpdownStatisticResponse.UpdownStatistic_Response[] outputParam;

        public UpsAndDownsStatistics_Response() {
            clear();
        }

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

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

        public UpsAndDownsStatistics_Response clear() {
            this.outputParam = UpdownStatisticResponse.UpdownStatistic_Response.emptyArray();
            this.cachedSize = -1;
            return this;
        }

        /* access modifiers changed from: protected */
        public int computeSerializedSize() {
            int computeSerializedSize = super.computeSerializedSize();
            UpdownStatisticResponse.UpdownStatistic_Response[] updownStatistic_ResponseArr = this.outputParam;
            if (updownStatistic_ResponseArr != null && updownStatistic_ResponseArr.length > 0) {
                int i10 = 0;
                while (true) {
                    UpdownStatisticResponse.UpdownStatistic_Response[] updownStatistic_ResponseArr2 = this.outputParam;
                    if (i10 >= updownStatistic_ResponseArr2.length) {
                        break;
                    }
                    UpdownStatisticResponse.UpdownStatistic_Response updownStatistic_Response = updownStatistic_ResponseArr2[i10];
                    if (updownStatistic_Response != null) {
                        computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(2, updownStatistic_Response);
                    }
                    i10++;
                }
            }
            return computeSerializedSize;
        }

        public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
            UpdownStatisticResponse.UpdownStatistic_Response[] updownStatistic_ResponseArr = this.outputParam;
            if (updownStatistic_ResponseArr != null && updownStatistic_ResponseArr.length > 0) {
                int i10 = 0;
                while (true) {
                    UpdownStatisticResponse.UpdownStatistic_Response[] updownStatistic_ResponseArr2 = this.outputParam;
                    if (i10 >= updownStatistic_ResponseArr2.length) {
                        break;
                    }
                    UpdownStatisticResponse.UpdownStatistic_Response updownStatistic_Response = updownStatistic_ResponseArr2[i10];
                    if (updownStatistic_Response != null) {
                        codedOutputByteBufferNano.writeMessage(2, updownStatistic_Response);
                    }
                    i10++;
                }
            }
            super.writeTo(codedOutputByteBufferNano);
        }

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

        public UpsAndDownsStatistics_Response mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
            while (true) {
                int readTag = codedInputByteBufferNano.readTag();
                if (readTag == 0) {
                    return this;
                }
                if (readTag == 18) {
                    int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 18);
                    UpdownStatisticResponse.UpdownStatistic_Response[] updownStatistic_ResponseArr = this.outputParam;
                    int length = updownStatistic_ResponseArr == null ? 0 : updownStatistic_ResponseArr.length;
                    int i10 = repeatedFieldArrayLength + length;
                    UpdownStatisticResponse.UpdownStatistic_Response[] updownStatistic_ResponseArr2 = new UpdownStatisticResponse.UpdownStatistic_Response[i10];
                    if (length != 0) {
                        System.arraycopy(updownStatistic_ResponseArr, 0, updownStatistic_ResponseArr2, 0, length);
                    }
                    while (length < i10 - 1) {
                        UpdownStatisticResponse.UpdownStatistic_Response updownStatistic_Response = new UpdownStatisticResponse.UpdownStatistic_Response();
                        updownStatistic_ResponseArr2[length] = updownStatistic_Response;
                        codedInputByteBufferNano.readMessage(updownStatistic_Response);
                        codedInputByteBufferNano.readTag();
                        length++;
                    }
                    UpdownStatisticResponse.UpdownStatistic_Response updownStatistic_Response2 = new UpdownStatisticResponse.UpdownStatistic_Response();
                    updownStatistic_ResponseArr2[length] = updownStatistic_Response2;
                    codedInputByteBufferNano.readMessage(updownStatistic_Response2);
                    this.outputParam = updownStatistic_ResponseArr2;
                } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                    return this;
                }
            }
        }
    }
}
