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;

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

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

        private static volatile TopTen_Request[] _emptyArray;

        public TopTenExchange[] requestData;

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

            private static volatile TopTenExchange[] _emptyArray;

            private int bitField0_;

            private int tradeDate_;

            private int tradeDirection_;

            public TopTenExchange() {
                clear();
            }

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

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

            public TopTenExchange clear() {
                this.bitField0_ = 0;
                this.tradeDirection_ = 0;
                this.tradeDate_ = 0;
                this.cachedSize = -1;
                return this;
            }

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

            public TopTenExchange clearTradeDirection() {
                this.tradeDirection_ = 0;
                this.bitField0_ &= -2;
                return this;
            }

            /* access modifiers changed from: protected */
            public int computeSerializedSize() {
                int computeSerializedSize = super.computeSerializedSize();
                if ((this.bitField0_ & 1) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(1, this.tradeDirection_);
                }
                if ((this.bitField0_ & 2) != 0) {
                    return computeSerializedSize + CodedOutputByteBufferNano.computeUInt32Size(2, this.tradeDate_);
                }
                return computeSerializedSize;
            }

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

            public int getTradeDirection() {
                return this.tradeDirection_;
            }

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

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

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

            public TopTenExchange setTradeDirection(int i10) {
                this.tradeDirection_ = i10;
                this.bitField0_ |= 1;
                return this;
            }

            public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
                if ((this.bitField0_ & 1) != 0) {
                    codedOutputByteBufferNano.writeUInt32(1, this.tradeDirection_);
                }
                if ((this.bitField0_ & 2) != 0) {
                    codedOutputByteBufferNano.writeUInt32(2, this.tradeDate_);
                }
                super.writeTo(codedOutputByteBufferNano);
            }

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

            public TopTenExchange mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
                while (true) {
                    int readTag = codedInputByteBufferNano.readTag();
                    if (readTag == 0) {
                        return this;
                    }
                    if (readTag == 8) {
                        this.tradeDirection_ = codedInputByteBufferNano.readUInt32();
                        this.bitField0_ |= 1;
                    } else if (readTag == 16) {
                        this.tradeDate_ = codedInputByteBufferNano.readUInt32();
                        this.bitField0_ |= 2;
                    } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                        return this;
                    }
                }
            }
        }

        public TopTen_Request() {
            clear();
        }

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

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

        public TopTen_Request clear() {
            this.requestData = TopTenExchange.emptyArray();
            this.cachedSize = -1;
            return this;
        }

        /* access modifiers changed from: protected */
        public int computeSerializedSize() {
            int computeSerializedSize = super.computeSerializedSize();
            TopTenExchange[] topTenExchangeArr = this.requestData;
            if (topTenExchangeArr != null && topTenExchangeArr.length > 0) {
                int i10 = 0;
                while (true) {
                    TopTenExchange[] topTenExchangeArr2 = this.requestData;
                    if (i10 >= topTenExchangeArr2.length) {
                        break;
                    }
                    TopTenExchange topTenExchange = topTenExchangeArr2[i10];
                    if (topTenExchange != null) {
                        computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(1, topTenExchange);
                    }
                    i10++;
                }
            }
            return computeSerializedSize;
        }

        public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
            TopTenExchange[] topTenExchangeArr = this.requestData;
            if (topTenExchangeArr != null && topTenExchangeArr.length > 0) {
                int i10 = 0;
                while (true) {
                    TopTenExchange[] topTenExchangeArr2 = this.requestData;
                    if (i10 >= topTenExchangeArr2.length) {
                        break;
                    }
                    TopTenExchange topTenExchange = topTenExchangeArr2[i10];
                    if (topTenExchange != null) {
                        codedOutputByteBufferNano.writeMessage(1, topTenExchange);
                    }
                    i10++;
                }
            }
            super.writeTo(codedOutputByteBufferNano);
        }

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

        public TopTen_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);
                    TopTenExchange[] topTenExchangeArr = this.requestData;
                    int length = topTenExchangeArr == null ? 0 : topTenExchangeArr.length;
                    int i10 = repeatedFieldArrayLength + length;
                    TopTenExchange[] topTenExchangeArr2 = new TopTenExchange[i10];
                    if (length != 0) {
                        System.arraycopy(topTenExchangeArr, 0, topTenExchangeArr2, 0, length);
                    }
                    while (length < i10 - 1) {
                        TopTenExchange topTenExchange = new TopTenExchange();
                        topTenExchangeArr2[length] = topTenExchange;
                        codedInputByteBufferNano.readMessage(topTenExchange);
                        codedInputByteBufferNano.readTag();
                        length++;
                    }
                    TopTenExchange topTenExchange2 = new TopTenExchange();
                    topTenExchangeArr2[length] = topTenExchange2;
                    codedInputByteBufferNano.readMessage(topTenExchange2);
                    this.requestData = topTenExchangeArr2;
                } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                    return this;
                }
            }
        }
    }
}
