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

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

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

        private static volatile RankList_Response[] _emptyArray;

        public Response[] rankListResponse;

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

            private static volatile Response[] _emptyArray;

            private int bitField0_;

            private String templateName_;

            public SortedListResponse.SortedList_Response templateRankResponse;

            public Response() {
                clear();
            }

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

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

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

            public Response 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_);
                }
                SortedListResponse.SortedList_Response sortedList_Response = this.templateRankResponse;
                if (sortedList_Response != null) {
                    return computeSerializedSize + CodedOutputByteBufferNano.computeMessageSize(2, sortedList_Response);
                }
                return computeSerializedSize;
            }

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

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

            public Response 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_);
                }
                SortedListResponse.SortedList_Response sortedList_Response = this.templateRankResponse;
                if (sortedList_Response != null) {
                    codedOutputByteBufferNano.writeMessage(2, sortedList_Response);
                }
                super.writeTo(codedOutputByteBufferNano);
            }

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

            public Response 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.templateRankResponse == null) {
                            this.templateRankResponse = new SortedListResponse.SortedList_Response();
                        }
                        codedInputByteBufferNano.readMessage(this.templateRankResponse);
                    } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                        return this;
                    }
                }
            }
        }

        public RankList_Response() {
            clear();
        }

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

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

        public RankList_Response clear() {
            this.rankListResponse = Response.emptyArray();
            this.cachedSize = -1;
            return this;
        }

        /* access modifiers changed from: protected */
        public int computeSerializedSize() {
            int computeSerializedSize = super.computeSerializedSize();
            Response[] responseArr = this.rankListResponse;
            if (responseArr != null && responseArr.length > 0) {
                int i10 = 0;
                while (true) {
                    Response[] responseArr2 = this.rankListResponse;
                    if (i10 >= responseArr2.length) {
                        break;
                    }
                    Response response = responseArr2[i10];
                    if (response != null) {
                        computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(1, response);
                    }
                    i10++;
                }
            }
            return computeSerializedSize;
        }

        public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
            Response[] responseArr = this.rankListResponse;
            if (responseArr != null && responseArr.length > 0) {
                int i10 = 0;
                while (true) {
                    Response[] responseArr2 = this.rankListResponse;
                    if (i10 >= responseArr2.length) {
                        break;
                    }
                    Response response = responseArr2[i10];
                    if (response != null) {
                        codedOutputByteBufferNano.writeMessage(1, response);
                    }
                    i10++;
                }
            }
            super.writeTo(codedOutputByteBufferNano);
        }

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

        public RankList_Response 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);
                    Response[] responseArr = this.rankListResponse;
                    int length = responseArr == null ? 0 : responseArr.length;
                    int i10 = repeatedFieldArrayLength + length;
                    Response[] responseArr2 = new Response[i10];
                    if (length != 0) {
                        System.arraycopy(responseArr, 0, responseArr2, 0, length);
                    }
                    while (length < i10 - 1) {
                        Response response = new Response();
                        responseArr2[length] = response;
                        codedInputByteBufferNano.readMessage(response);
                        codedInputByteBufferNano.readTag();
                        length++;
                    }
                    Response response2 = new Response();
                    responseArr2[length] = response2;
                    codedInputByteBufferNano.readMessage(response2);
                    this.rankListResponse = responseArr2;
                } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                    return this;
                }
            }
        }
    }
}
