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

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

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

        private static volatile SpecialStocks_Request[] _emptyArray;

        public SpecialStockRequest.SpecialStock_Request[] request;

        public SpecialStocks_Request() {
            clear();
        }

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

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

        public SpecialStocks_Request clear() {
            this.request = SpecialStockRequest.SpecialStock_Request.emptyArray();
            this.cachedSize = -1;
            return this;
        }

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

        public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
            SpecialStockRequest.SpecialStock_Request[] specialStock_RequestArr = this.request;
            if (specialStock_RequestArr != null && specialStock_RequestArr.length > 0) {
                int i10 = 0;
                while (true) {
                    SpecialStockRequest.SpecialStock_Request[] specialStock_RequestArr2 = this.request;
                    if (i10 >= specialStock_RequestArr2.length) {
                        break;
                    }
                    SpecialStockRequest.SpecialStock_Request specialStock_Request = specialStock_RequestArr2[i10];
                    if (specialStock_Request != null) {
                        codedOutputByteBufferNano.writeMessage(1, specialStock_Request);
                    }
                    i10++;
                }
            }
            super.writeTo(codedOutputByteBufferNano);
        }

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

        public SpecialStocks_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);
                    SpecialStockRequest.SpecialStock_Request[] specialStock_RequestArr = this.request;
                    int length = specialStock_RequestArr == null ? 0 : specialStock_RequestArr.length;
                    int i10 = repeatedFieldArrayLength + length;
                    SpecialStockRequest.SpecialStock_Request[] specialStock_RequestArr2 = new SpecialStockRequest.SpecialStock_Request[i10];
                    if (length != 0) {
                        System.arraycopy(specialStock_RequestArr, 0, specialStock_RequestArr2, 0, length);
                    }
                    while (length < i10 - 1) {
                        SpecialStockRequest.SpecialStock_Request specialStock_Request = new SpecialStockRequest.SpecialStock_Request();
                        specialStock_RequestArr2[length] = specialStock_Request;
                        codedInputByteBufferNano.readMessage(specialStock_Request);
                        codedInputByteBufferNano.readTag();
                        length++;
                    }
                    SpecialStockRequest.SpecialStock_Request specialStock_Request2 = new SpecialStockRequest.SpecialStock_Request();
                    specialStock_RequestArr2[length] = specialStock_Request2;
                    codedInputByteBufferNano.readMessage(specialStock_Request2);
                    this.request = specialStock_RequestArr2;
                } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                    return this;
                }
            }
        }
    }
}
