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

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

        private static volatile UpsAndDownsStatistics_Request[] _emptyArray;

        public UpdownStatisticRequest.UpdownStatistic_Request[] inputParam;

        public UpsAndDownsStatistics_Request() {
            clear();
        }

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

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

        public UpsAndDownsStatistics_Request clear() {
            this.inputParam = UpdownStatisticRequest.UpdownStatistic_Request.emptyArray();
            this.cachedSize = -1;
            return this;
        }

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

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

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

        public UpsAndDownsStatistics_Request mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
            while (true) {
                int readTag = codedInputByteBufferNano.readTag();
                if (readTag == 0) {
                    return this;
                }
                if (readTag == 10) {
                    int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 10);
                    UpdownStatisticRequest.UpdownStatistic_Request[] updownStatistic_RequestArr = this.inputParam;
                    int length = updownStatistic_RequestArr == null ? 0 : updownStatistic_RequestArr.length;
                    int i10 = repeatedFieldArrayLength + length;
                    UpdownStatisticRequest.UpdownStatistic_Request[] updownStatistic_RequestArr2 = new UpdownStatisticRequest.UpdownStatistic_Request[i10];
                    if (length != 0) {
                        System.arraycopy(updownStatistic_RequestArr, 0, updownStatistic_RequestArr2, 0, length);
                    }
                    while (length < i10 - 1) {
                        UpdownStatisticRequest.UpdownStatistic_Request updownStatistic_Request = new UpdownStatisticRequest.UpdownStatistic_Request();
                        updownStatistic_RequestArr2[length] = updownStatistic_Request;
                        codedInputByteBufferNano.readMessage(updownStatistic_Request);
                        codedInputByteBufferNano.readTag();
                        length++;
                    }
                    UpdownStatisticRequest.UpdownStatistic_Request updownStatistic_Request2 = new UpdownStatisticRequest.UpdownStatistic_Request();
                    updownStatistic_RequestArr2[length] = updownStatistic_Request2;
                    codedInputByteBufferNano.readMessage(updownStatistic_Request2);
                    this.inputParam = updownStatistic_RequestArr2;
                } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                    return this;
                }
            }
        }
    }
}
