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

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

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

        private static volatile PickStrategy_Response[] _emptyArray;

        public PickStrategyRequest.PickStrategy_Request inputParam;

        public Result outputParam;

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

            private static volatile Item[] _emptyArray;

            private int bitField0_;

            private long category_;

            private String code_;

            private int exchange_;

            private int id_;

            private String name_;

            private int session_;

            public int[] sid;

            public int[] times;

            public Item() {
                clear();
            }

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

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

            public Item clear() {
                this.bitField0_ = 0;
                this.id_ = 0;
                this.exchange_ = 0;
                this.session_ = 0;
                this.name_ = "";
                this.code_ = "";
                this.category_ = 0;
                int[] iArr = WireFormatNano.EMPTY_INT_ARRAY;
                this.sid = iArr;
                this.times = iArr;
                this.cachedSize = -1;
                return this;
            }

            public Item clearCategory() {
                this.category_ = 0;
                this.bitField0_ &= -33;
                return this;
            }

            public Item clearCode() {
                this.code_ = "";
                this.bitField0_ &= -17;
                return this;
            }

            public Item clearExchange() {
                this.exchange_ = 0;
                this.bitField0_ &= -3;
                return this;
            }

            public Item clearId() {
                this.id_ = 0;
                this.bitField0_ &= -2;
                return this;
            }

            public Item clearName() {
                this.name_ = "";
                this.bitField0_ &= -9;
                return this;
            }

            public Item clearSession() {
                this.session_ = 0;
                this.bitField0_ &= -5;
                return this;
            }

            /* access modifiers changed from: protected */
            public int computeSerializedSize() {
                int[] iArr;
                int computeSerializedSize = super.computeSerializedSize();
                if ((this.bitField0_ & 1) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(1, this.id_);
                }
                if ((this.bitField0_ & 2) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(2, this.exchange_);
                }
                if ((this.bitField0_ & 4) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(3, this.session_);
                }
                if ((this.bitField0_ & 8) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeStringSize(4, this.name_);
                }
                if ((this.bitField0_ & 16) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeStringSize(5, this.code_);
                }
                if ((this.bitField0_ & 32) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeUInt64Size(6, this.category_);
                }
                int[] iArr2 = this.sid;
                int i10 = 0;
                if (iArr2 != null && iArr2.length > 0) {
                    int i11 = 0;
                    int i12 = 0;
                    while (true) {
                        iArr = this.sid;
                        if (i11 >= iArr.length) {
                            break;
                        }
                        i12 += CodedOutputByteBufferNano.computeUInt32SizeNoTag(iArr[i11]);
                        i11++;
                    }
                    computeSerializedSize = computeSerializedSize + i12 + iArr.length;
                }
                int[] iArr3 = this.times;
                if (iArr3 == null || iArr3.length <= 0) {
                    return computeSerializedSize;
                }
                int i13 = 0;
                while (true) {
                    int[] iArr4 = this.times;
                    if (i10 >= iArr4.length) {
                        return computeSerializedSize + i13 + iArr4.length;
                    }
                    i13 += CodedOutputByteBufferNano.computeUInt32SizeNoTag(iArr4[i10]);
                    i10++;
                }
            }

            public long getCategory() {
                return this.category_;
            }

            public String getCode() {
                return this.code_;
            }

            public int getExchange() {
                return this.exchange_;
            }

            public int getId() {
                return this.id_;
            }

            public String getName() {
                return this.name_;
            }

            public int getSession() {
                return this.session_;
            }

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

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

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

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

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

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

            public Item setCategory(long j10) {
                this.category_ = j10;
                this.bitField0_ |= 32;
                return this;
            }

            public Item setCode(String str) {
                str.getClass();
                this.code_ = str;
                this.bitField0_ |= 16;
                return this;
            }

            public Item setExchange(int i10) {
                this.exchange_ = i10;
                this.bitField0_ |= 2;
                return this;
            }

            public Item setId(int i10) {
                this.id_ = i10;
                this.bitField0_ |= 1;
                return this;
            }

            public Item setName(String str) {
                str.getClass();
                this.name_ = str;
                this.bitField0_ |= 8;
                return this;
            }

            public Item setSession(int i10) {
                this.session_ = i10;
                this.bitField0_ |= 4;
                return this;
            }

            public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
                if ((this.bitField0_ & 1) != 0) {
                    codedOutputByteBufferNano.writeUInt32(1, this.id_);
                }
                if ((this.bitField0_ & 2) != 0) {
                    codedOutputByteBufferNano.writeUInt32(2, this.exchange_);
                }
                if ((this.bitField0_ & 4) != 0) {
                    codedOutputByteBufferNano.writeUInt32(3, this.session_);
                }
                if ((this.bitField0_ & 8) != 0) {
                    codedOutputByteBufferNano.writeString(4, this.name_);
                }
                if ((this.bitField0_ & 16) != 0) {
                    codedOutputByteBufferNano.writeString(5, this.code_);
                }
                if ((this.bitField0_ & 32) != 0) {
                    codedOutputByteBufferNano.writeUInt64(6, this.category_);
                }
                int[] iArr = this.sid;
                int i10 = 0;
                if (iArr != null && iArr.length > 0) {
                    int i11 = 0;
                    while (true) {
                        int[] iArr2 = this.sid;
                        if (i11 >= iArr2.length) {
                            break;
                        }
                        codedOutputByteBufferNano.writeUInt32(7, iArr2[i11]);
                        i11++;
                    }
                }
                int[] iArr3 = this.times;
                if (iArr3 != null && iArr3.length > 0) {
                    while (true) {
                        int[] iArr4 = this.times;
                        if (i10 >= iArr4.length) {
                            break;
                        }
                        codedOutputByteBufferNano.writeUInt32(8, iArr4[i10]);
                        i10++;
                    }
                }
                super.writeTo(codedOutputByteBufferNano);
            }

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

            public Item mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
                while (true) {
                    int readTag = codedInputByteBufferNano.readTag();
                    switch(readTag) {
                        case 0:
                            return this;
                        case 8:
                            this.id_ = codedInputByteBufferNano.readUInt32();
                            this.bitField0_ |= 1;
                            break;
                        case 16:
                            this.exchange_ = codedInputByteBufferNano.readUInt32();
                            this.bitField0_ |= 2;
                            break;
                        case 24:
                            this.session_ = codedInputByteBufferNano.readUInt32();
                            this.bitField0_ |= 4;
                            break;
                        case 34:
                            this.name_ = codedInputByteBufferNano.readString();
                            this.bitField0_ |= 8;
                            break;
                        case 42:
                            this.code_ = codedInputByteBufferNano.readString();
                            this.bitField0_ |= 16;
                            break;
                        case 48:
                            this.category_ = codedInputByteBufferNano.readUInt64();
                            this.bitField0_ |= 32;
                            break;
                        case 56:
                            int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 56);
                            int[] iArr = this.sid;
                            int length = iArr == null ? 0 : iArr.length;
                            int i10 = repeatedFieldArrayLength + length;
                            int[] iArr2 = new int[i10];
                            if (length != 0) {
                                System.arraycopy(iArr, 0, iArr2, 0, length);
                            }
                            while (length < i10 - 1) {
                                iArr2[length] = codedInputByteBufferNano.readUInt32();
                                codedInputByteBufferNano.readTag();
                                length++;
                            }
                            iArr2[length] = codedInputByteBufferNano.readUInt32();
                            this.sid = iArr2;
                            break;
                        case 58:
                            int pushLimit = codedInputByteBufferNano.pushLimit(codedInputByteBufferNano.readRawVarint32());
                            int position = codedInputByteBufferNano.getPosition();
                            int i11 = 0;
                            while (codedInputByteBufferNano.getBytesUntilLimit() > 0) {
                                codedInputByteBufferNano.readUInt32();
                                i11++;
                            }
                            codedInputByteBufferNano.rewindToPosition(position);
                            int[] iArr3 = this.sid;
                            int length2 = iArr3 == null ? 0 : iArr3.length;
                            int i12 = i11 + length2;
                            int[] iArr4 = new int[i12];
                            if (length2 != 0) {
                                System.arraycopy(iArr3, 0, iArr4, 0, length2);
                            }
                            while (length2 < i12) {
                                iArr4[length2] = codedInputByteBufferNano.readUInt32();
                                length2++;
                            }
                            this.sid = iArr4;
                            codedInputByteBufferNano.popLimit(pushLimit);
                            break;
                        case 64:
                            int repeatedFieldArrayLength2 = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 64);
                            int[] iArr5 = this.times;
                            int length3 = iArr5 == null ? 0 : iArr5.length;
                            int i13 = repeatedFieldArrayLength2 + length3;
                            int[] iArr6 = new int[i13];
                            if (length3 != 0) {
                                System.arraycopy(iArr5, 0, iArr6, 0, length3);
                            }
                            while (length3 < i13 - 1) {
                                iArr6[length3] = codedInputByteBufferNano.readUInt32();
                                codedInputByteBufferNano.readTag();
                                length3++;
                            }
                            iArr6[length3] = codedInputByteBufferNano.readUInt32();
                            this.times = iArr6;
                            break;
                        case 66:
                            int pushLimit2 = codedInputByteBufferNano.pushLimit(codedInputByteBufferNano.readRawVarint32());
                            int position2 = codedInputByteBufferNano.getPosition();
                            int i14 = 0;
                            while (codedInputByteBufferNano.getBytesUntilLimit() > 0) {
                                codedInputByteBufferNano.readUInt32();
                                i14++;
                            }
                            codedInputByteBufferNano.rewindToPosition(position2);
                            int[] iArr7 = this.times;
                            int length4 = iArr7 == null ? 0 : iArr7.length;
                            int i15 = i14 + length4;
                            int[] iArr8 = new int[i15];
                            if (length4 != 0) {
                                System.arraycopy(iArr7, 0, iArr8, 0, length4);
                            }
                            while (length4 < i15) {
                                iArr8[length4] = codedInputByteBufferNano.readUInt32();
                                length4++;
                            }
                            this.times = iArr8;
                            codedInputByteBufferNano.popLimit(pushLimit2);
                            break;
                        default:
                            if (WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                                break;
                            } else {
                                return this;
                            }
                    }
                }
            }
        }

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

            private static volatile Result[] _emptyArray;

            private int bitField0_;

            public Item[] stockList;

            private int totalSize_;

            private int tradeDate_;

            public Result() {
                clear();
            }

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

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

            public Result clear() {
                this.bitField0_ = 0;
                this.stockList = Item.emptyArray();
                this.totalSize_ = 0;
                this.tradeDate_ = 0;
                this.cachedSize = -1;
                return this;
            }

            public Result clearTotalSize() {
                this.totalSize_ = 0;
                this.bitField0_ &= -2;
                return this;
            }

            public Result clearTradeDate() {
                this.tradeDate_ = 0;
                this.bitField0_ &= -3;
                return this;
            }

            /* access modifiers changed from: protected */
            public int computeSerializedSize() {
                int computeSerializedSize = super.computeSerializedSize();
                Item[] itemArr = this.stockList;
                if (itemArr != null && itemArr.length > 0) {
                    int i10 = 0;
                    while (true) {
                        Item[] itemArr2 = this.stockList;
                        if (i10 >= itemArr2.length) {
                            break;
                        }
                        Item item = itemArr2[i10];
                        if (item != null) {
                            computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(1, item);
                        }
                        i10++;
                    }
                }
                if ((this.bitField0_ & 1) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(2, this.totalSize_);
                }
                if ((this.bitField0_ & 2) != 0) {
                    return computeSerializedSize + CodedOutputByteBufferNano.computeUInt32Size(3, this.tradeDate_);
                }
                return computeSerializedSize;
            }

            public int getTotalSize() {
                return this.totalSize_;
            }

            public int getTradeDate() {
                return this.tradeDate_;
            }

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

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

            public Result setTotalSize(int i10) {
                this.totalSize_ = i10;
                this.bitField0_ |= 1;
                return this;
            }

            public Result setTradeDate(int i10) {
                this.tradeDate_ = i10;
                this.bitField0_ |= 2;
                return this;
            }

            public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
                Item[] itemArr = this.stockList;
                if (itemArr != null && itemArr.length > 0) {
                    int i10 = 0;
                    while (true) {
                        Item[] itemArr2 = this.stockList;
                        if (i10 >= itemArr2.length) {
                            break;
                        }
                        Item item = itemArr2[i10];
                        if (item != null) {
                            codedOutputByteBufferNano.writeMessage(1, item);
                        }
                        i10++;
                    }
                }
                if ((this.bitField0_ & 1) != 0) {
                    codedOutputByteBufferNano.writeUInt32(2, this.totalSize_);
                }
                if ((this.bitField0_ & 2) != 0) {
                    codedOutputByteBufferNano.writeUInt32(3, this.tradeDate_);
                }
                super.writeTo(codedOutputByteBufferNano);
            }

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

            public Result 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);
                        Item[] itemArr = this.stockList;
                        int length = itemArr == null ? 0 : itemArr.length;
                        int i10 = repeatedFieldArrayLength + length;
                        Item[] itemArr2 = new Item[i10];
                        if (length != 0) {
                            System.arraycopy(itemArr, 0, itemArr2, 0, length);
                        }
                        while (length < i10 - 1) {
                            Item item = new Item();
                            itemArr2[length] = item;
                            codedInputByteBufferNano.readMessage(item);
                            codedInputByteBufferNano.readTag();
                            length++;
                        }
                        Item item2 = new Item();
                        itemArr2[length] = item2;
                        codedInputByteBufferNano.readMessage(item2);
                        this.stockList = itemArr2;
                    } else if (readTag == 16) {
                        this.totalSize_ = codedInputByteBufferNano.readUInt32();
                        this.bitField0_ |= 1;
                    } else if (readTag == 24) {
                        this.tradeDate_ = codedInputByteBufferNano.readUInt32();
                        this.bitField0_ |= 2;
                    } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                        return this;
                    }
                }
            }
        }

        public PickStrategy_Response() {
            clear();
        }

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

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

        public PickStrategy_Response clear() {
            this.inputParam = null;
            this.outputParam = null;
            this.cachedSize = -1;
            return this;
        }

        /* access modifiers changed from: protected */
        public int computeSerializedSize() {
            int computeSerializedSize = super.computeSerializedSize();
            PickStrategyRequest.PickStrategy_Request pickStrategy_Request = this.inputParam;
            if (pickStrategy_Request != null) {
                computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(1, pickStrategy_Request);
            }
            Result result = this.outputParam;
            if (result != null) {
                return computeSerializedSize + CodedOutputByteBufferNano.computeMessageSize(2, result);
            }
            return computeSerializedSize;
        }

        public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
            PickStrategyRequest.PickStrategy_Request pickStrategy_Request = this.inputParam;
            if (pickStrategy_Request != null) {
                codedOutputByteBufferNano.writeMessage(1, pickStrategy_Request);
            }
            Result result = this.outputParam;
            if (result != null) {
                codedOutputByteBufferNano.writeMessage(2, result);
            }
            super.writeTo(codedOutputByteBufferNano);
        }

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

        public PickStrategy_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 PickStrategyRequest.PickStrategy_Request();
                    }
                    codedInputByteBufferNano.readMessage(this.inputParam);
                } else if (readTag == 18) {
                    if (this.outputParam == null) {
                        this.outputParam = new Result();
                    }
                    codedInputByteBufferNano.readMessage(this.outputParam);
                } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                    return this;
                }
            }
        }
    }
}
