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

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

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

        private static volatile SpecialStocks_Response[] _emptyArray;

        public SpecialStockResponse.SpecialStock_Response[] response;

        public SpecialStocks_Response() {
            clear();
        }

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

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

        public SpecialStocks_Response clear() {
            this.response = SpecialStockResponse.SpecialStock_Response.emptyArray();
            this.cachedSize = -1;
            return this;
        }

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

        public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
            SpecialStockResponse.SpecialStock_Response[] specialStock_ResponseArr = this.response;
            if (specialStock_ResponseArr != null && specialStock_ResponseArr.length > 0) {
                int i10 = 0;
                while (true) {
                    SpecialStockResponse.SpecialStock_Response[] specialStock_ResponseArr2 = this.response;
                    if (i10 >= specialStock_ResponseArr2.length) {
                        break;
                    }
                    SpecialStockResponse.SpecialStock_Response specialStock_Response = specialStock_ResponseArr2[i10];
                    if (specialStock_Response != null) {
                        codedOutputByteBufferNano.writeMessage(1, specialStock_Response);
                    }
                    i10++;
                }
            }
            super.writeTo(codedOutputByteBufferNano);
        }

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

        public SpecialStocks_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);
                    SpecialStockResponse.SpecialStock_Response[] specialStock_ResponseArr = this.response;
                    int length = specialStock_ResponseArr == null ? 0 : specialStock_ResponseArr.length;
                    int i10 = repeatedFieldArrayLength + length;
                    SpecialStockResponse.SpecialStock_Response[] specialStock_ResponseArr2 = new SpecialStockResponse.SpecialStock_Response[i10];
                    if (length != 0) {
                        System.arraycopy(specialStock_ResponseArr, 0, specialStock_ResponseArr2, 0, length);
                    }
                    while (length < i10 - 1) {
                        SpecialStockResponse.SpecialStock_Response specialStock_Response = new SpecialStockResponse.SpecialStock_Response();
                        specialStock_ResponseArr2[length] = specialStock_Response;
                        codedInputByteBufferNano.readMessage(specialStock_Response);
                        codedInputByteBufferNano.readTag();
                        length++;
                    }
                    SpecialStockResponse.SpecialStock_Response specialStock_Response2 = new SpecialStockResponse.SpecialStock_Response();
                    specialStock_ResponseArr2[length] = specialStock_Response2;
                    codedInputByteBufferNano.readMessage(specialStock_Response2);
                    this.response = specialStock_ResponseArr2;
                } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                    return this;
                }
            }
        }
    }
}
