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

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

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

        private static volatile RankList_Request[] _emptyArray;

        public Request[] rankListRequest;

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

            private static volatile Request[] _emptyArray;

            private int bitField0_;

            private String templateName_;

            public SortedListRequest.SortedList_Request templateRankRequest;

            public Request() {
                clear();
            }

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

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

            public Request clear() {
                this.bitField0_ = 0;
                this.templateName_ = "";
                this.templateRankRequest = null;
                this.cachedSize = -1;
                return this;
            }

            public Request clearTemplateName() {
                this.templateName_ = "";
                this.bitField0_ &= -2;
                return this;
            }

            /* access modifiers changed from: protected */
            public int computeSerializedSize() {
                int computeSerializedSize = super.computeSerializedSize();
                if ((this.bitField0_ & 1) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeStringSize(1, this.templateName_);
                }
                SortedListRequest.SortedList_Request sortedList_Request = this.templateRankRequest;
                if (sortedList_Request != null) {
                    return computeSerializedSize + CodedOutputByteBufferNano.computeMessageSize(2, sortedList_Request);
                }
                return computeSerializedSize;
            }

            public String getTemplateName() {
                return this.templateName_;
            }

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

            public Request setTemplateName(String str) {
                str.getClass();
                this.templateName_ = str;
                this.bitField0_ |= 1;
                return this;
            }

            public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
                if ((this.bitField0_ & 1) != 0) {
                    codedOutputByteBufferNano.writeString(1, this.templateName_);
                }
                SortedListRequest.SortedList_Request sortedList_Request = this.templateRankRequest;
                if (sortedList_Request != null) {
                    codedOutputByteBufferNano.writeMessage(2, sortedList_Request);
                }
                super.writeTo(codedOutputByteBufferNano);
            }

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

            public Request mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
                while (true) {
                    int readTag = codedInputByteBufferNano.readTag();
                    if (readTag == 0) {
                        return this;
                    }
                    if (readTag == 10) {
                        this.templateName_ = codedInputByteBufferNano.readString();
                        this.bitField0_ |= 1;
                    } else if (readTag == 18) {
                        if (this.templateRankRequest == null) {
                            this.templateRankRequest = new SortedListRequest.SortedList_Request();
                        }
                        codedInputByteBufferNano.readMessage(this.templateRankRequest);
                    } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                        return this;
                    }
                }
            }
        }

        public RankList_Request() {
            clear();
        }

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

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

        public RankList_Request clear() {
            this.rankListRequest = Request.emptyArray();
            this.cachedSize = -1;
            return this;
        }

        /* access modifiers changed from: protected */
        public int computeSerializedSize() {
            int computeSerializedSize = super.computeSerializedSize();
            Request[] requestArr = this.rankListRequest;
            if (requestArr != null && requestArr.length > 0) {
                int i10 = 0;
                while (true) {
                    Request[] requestArr2 = this.rankListRequest;
                    if (i10 >= requestArr2.length) {
                        break;
                    }
                    Request request = requestArr2[i10];
                    if (request != null) {
                        computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(1, request);
                    }
                    i10++;
                }
            }
            return computeSerializedSize;
        }

        public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
            Request[] requestArr = this.rankListRequest;
            if (requestArr != null && requestArr.length > 0) {
                int i10 = 0;
                while (true) {
                    Request[] requestArr2 = this.rankListRequest;
                    if (i10 >= requestArr2.length) {
                        break;
                    }
                    Request request = requestArr2[i10];
                    if (request != null) {
                        codedOutputByteBufferNano.writeMessage(1, request);
                    }
                    i10++;
                }
            }
            super.writeTo(codedOutputByteBufferNano);
        }

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

        public RankList_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);
                    Request[] requestArr = this.rankListRequest;
                    int length = requestArr == null ? 0 : requestArr.length;
                    int i10 = repeatedFieldArrayLength + length;
                    Request[] requestArr2 = new Request[i10];
                    if (length != 0) {
                        System.arraycopy(requestArr, 0, requestArr2, 0, length);
                    }
                    while (length < i10 - 1) {
                        Request request = new Request();
                        requestArr2[length] = request;
                        codedInputByteBufferNano.readMessage(request);
                        codedInputByteBufferNano.readTag();
                        length++;
                    }
                    Request request2 = new Request();
                    requestArr2[length] = request2;
                    codedInputByteBufferNano.readMessage(request2);
                    this.rankListRequest = requestArr2;
                } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                    return this;
                }
            }
        }
    }
}
