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.MarketChangesRequest;
import nano.StrategySelectionResponse;

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

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

        private static volatile MarketChanges_Response[] _emptyArray;

        public MarketChangesRequest.MarketChanges_Request inputParam;

        public StrategySelectionResponse.StrategySelection_Response.Result_Detail[] outputParam;

        public MarketChanges_Response() {
            clear();
        }

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

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

        public MarketChanges_Response clear() {
            this.inputParam = null;
            this.outputParam = StrategySelectionResponse.StrategySelection_Response.Result_Detail.emptyArray();
            this.cachedSize = -1;
            return this;
        }

        /* access modifiers changed from: protected */
        public int computeSerializedSize() {
            int computeSerializedSize = super.computeSerializedSize();
            MarketChangesRequest.MarketChanges_Request marketChanges_Request = this.inputParam;
            if (marketChanges_Request != null) {
                computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(1, marketChanges_Request);
            }
            StrategySelectionResponse.StrategySelection_Response.Result_Detail[] result_DetailArr = this.outputParam;
            if (result_DetailArr != null && result_DetailArr.length > 0) {
                int i10 = 0;
                while (true) {
                    StrategySelectionResponse.StrategySelection_Response.Result_Detail[] result_DetailArr2 = this.outputParam;
                    if (i10 >= result_DetailArr2.length) {
                        break;
                    }
                    StrategySelectionResponse.StrategySelection_Response.Result_Detail result_Detail = result_DetailArr2[i10];
                    if (result_Detail != null) {
                        computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(2, result_Detail);
                    }
                    i10++;
                }
            }
            return computeSerializedSize;
        }

        public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
            MarketChangesRequest.MarketChanges_Request marketChanges_Request = this.inputParam;
            if (marketChanges_Request != null) {
                codedOutputByteBufferNano.writeMessage(1, marketChanges_Request);
            }
            StrategySelectionResponse.StrategySelection_Response.Result_Detail[] result_DetailArr = this.outputParam;
            if (result_DetailArr != null && result_DetailArr.length > 0) {
                int i10 = 0;
                while (true) {
                    StrategySelectionResponse.StrategySelection_Response.Result_Detail[] result_DetailArr2 = this.outputParam;
                    if (i10 >= result_DetailArr2.length) {
                        break;
                    }
                    StrategySelectionResponse.StrategySelection_Response.Result_Detail result_Detail = result_DetailArr2[i10];
                    if (result_Detail != null) {
                        codedOutputByteBufferNano.writeMessage(2, result_Detail);
                    }
                    i10++;
                }
            }
            super.writeTo(codedOutputByteBufferNano);
        }

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

        public MarketChanges_Response mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
            while (true) {
                int readTag = codedInputByteBufferNano.readTag();
                if (readTag == 0) {
                    return this;
                }
                if (readTag == 10) {
                    if (this.inputParam == null) {
                        this.inputParam = new MarketChangesRequest.MarketChanges_Request();
                    }
                    codedInputByteBufferNano.readMessage(this.inputParam);
                } else if (readTag == 18) {
                    int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 18);
                    StrategySelectionResponse.StrategySelection_Response.Result_Detail[] result_DetailArr = this.outputParam;
                    int length = result_DetailArr == null ? 0 : result_DetailArr.length;
                    int i10 = repeatedFieldArrayLength + length;
                    StrategySelectionResponse.StrategySelection_Response.Result_Detail[] result_DetailArr2 = new StrategySelectionResponse.StrategySelection_Response.Result_Detail[i10];
                    if (length != 0) {
                        System.arraycopy(result_DetailArr, 0, result_DetailArr2, 0, length);
                    }
                    while (length < i10 - 1) {
                        StrategySelectionResponse.StrategySelection_Response.Result_Detail result_Detail = new StrategySelectionResponse.StrategySelection_Response.Result_Detail();
                        result_DetailArr2[length] = result_Detail;
                        codedInputByteBufferNano.readMessage(result_Detail);
                        codedInputByteBufferNano.readTag();
                        length++;
                    }
                    StrategySelectionResponse.StrategySelection_Response.Result_Detail result_Detail2 = new StrategySelectionResponse.StrategySelection_Response.Result_Detail();
                    result_DetailArr2[length] = result_Detail2;
                    codedInputByteBufferNano.readMessage(result_Detail2);
                    this.outputParam = result_DetailArr2;
                } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                    return this;
                }
            }
        }
    }
}
