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 TopSellRequest {

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

        public static final int DATERANGE_FIELD_NUMBER = 7;

        public static final int DAYS_FIELD_NUMBER = 1;

        private static volatile TopSell_Request[] _emptyArray;

        private int bitField0_;

        private int dateTypeCase_ = 0;

        private Object dateType_;

        private boolean ifGetCalDate_;

        private int marketType_;

        private boolean sortAsc_;

        private int top_;

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

            private static volatile DateRange[] _emptyArray;

            private int bitField0_;

            private int endDate_;

            private int startDate_;

            public DateRange() {
                clear();
            }

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

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

            public DateRange clear() {
                this.bitField0_ = 0;
                this.startDate_ = 0;
                this.endDate_ = 0;
                this.cachedSize = -1;
                return this;
            }

            public DateRange clearEndDate() {
                this.endDate_ = 0;
                this.bitField0_ &= -3;
                return this;
            }

            public DateRange clearStartDate() {
                this.startDate_ = 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.startDate_);
                }
                if ((this.bitField0_ & 2) != 0) {
                    return computeSerializedSize + CodedOutputByteBufferNano.computeUInt32Size(2, this.endDate_);
                }
                return computeSerializedSize;
            }

            public int getEndDate() {
                return this.endDate_;
            }

            public int getStartDate() {
                return this.startDate_;
            }

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

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

            public DateRange setEndDate(int i10) {
                this.endDate_ = i10;
                this.bitField0_ |= 2;
                return this;
            }

            public DateRange setStartDate(int i10) {
                this.startDate_ = i10;
                this.bitField0_ |= 1;
                return this;
            }

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

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

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

        public TopSell_Request() {
            clear();
        }

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

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

        public TopSell_Request clear() {
            this.bitField0_ = 0;
            this.marketType_ = 0;
            this.top_ = 0;
            this.ifGetCalDate_ = false;
            this.sortAsc_ = false;
            clearDateType();
            this.cachedSize = -1;
            return this;
        }

        public TopSell_Request clearDateType() {
            this.dateTypeCase_ = 0;
            this.dateType_ = null;
            return this;
        }

        public TopSell_Request clearIfGetCalDate() {
            this.ifGetCalDate_ = false;
            this.bitField0_ &= -5;
            return this;
        }

        public TopSell_Request clearMarketType() {
            this.marketType_ = 0;
            this.bitField0_ &= -2;
            return this;
        }

        public TopSell_Request clearSortAsc() {
            this.sortAsc_ = false;
            this.bitField0_ &= -9;
            return this;
        }

        public TopSell_Request clearTop() {
            this.top_ = 0;
            this.bitField0_ &= -3;
            return this;
        }

        /* access modifiers changed from: protected */
        public int computeSerializedSize() {
            int computeSerializedSize = super.computeSerializedSize();
            if (this.dateTypeCase_ == 1) {
                computeSerializedSize += CodedOutputByteBufferNano.computeInt32Size(1, ((Integer) this.dateType_).intValue());
            }
            if ((this.bitField0_ & 1) != 0) {
                computeSerializedSize += CodedOutputByteBufferNano.computeInt32Size(2, this.marketType_);
            }
            if ((this.bitField0_ & 2) != 0) {
                computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(3, this.top_);
            }
            if ((this.bitField0_ & 4) != 0) {
                computeSerializedSize += CodedOutputByteBufferNano.computeBoolSize(4, this.ifGetCalDate_);
            }
            if ((this.bitField0_ & 8) != 0) {
                computeSerializedSize += CodedOutputByteBufferNano.computeBoolSize(5, this.sortAsc_);
            }
            if (this.dateTypeCase_ == 7) {
                return computeSerializedSize + CodedOutputByteBufferNano.computeMessageSize(7, (MessageNano) this.dateType_);
            }
            return computeSerializedSize;
        }

        public DateRange getDateRange() {
            if (this.dateTypeCase_ == 7) {
                return (DateRange) this.dateType_;
            }
            return null;
        }

        public int getDateTypeCase() {
            return this.dateTypeCase_;
        }

        public int getDays() {
            if (this.dateTypeCase_ == 1) {
                return ((Integer) this.dateType_).intValue();
            }
            return 0;
        }

        public boolean getIfGetCalDate() {
            return this.ifGetCalDate_;
        }

        public int getMarketType() {
            return this.marketType_;
        }

        public boolean getSortAsc() {
            return this.sortAsc_;
        }

        public int getTop() {
            return this.top_;
        }

        public boolean hasDateRange() {
            if (this.dateTypeCase_ == 7) {
                return true;
            }
            return false;
        }

        public boolean hasDays() {
            if (this.dateTypeCase_ == 1) {
                return true;
            }
            return false;
        }

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

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

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

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

        public TopSell_Request setDateRange(DateRange dateRange) {
            dateRange.getClass();
            this.dateTypeCase_ = 7;
            this.dateType_ = dateRange;
            return this;
        }

        public TopSell_Request setDays(int i10) {
            this.dateTypeCase_ = 1;
            this.dateType_ = Integer.valueOf(i10);
            return this;
        }

        public TopSell_Request setIfGetCalDate(boolean z9) {
            this.ifGetCalDate_ = z9;
            this.bitField0_ |= 4;
            return this;
        }

        public TopSell_Request setMarketType(int i10) {
            this.marketType_ = i10;
            this.bitField0_ |= 1;
            return this;
        }

        public TopSell_Request setSortAsc(boolean z9) {
            this.sortAsc_ = z9;
            this.bitField0_ |= 8;
            return this;
        }

        public TopSell_Request setTop(int i10) {
            this.top_ = i10;
            this.bitField0_ |= 2;
            return this;
        }

        public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
            if (this.dateTypeCase_ == 1) {
                codedOutputByteBufferNano.writeInt32(1, ((Integer) this.dateType_).intValue());
            }
            if ((this.bitField0_ & 1) != 0) {
                codedOutputByteBufferNano.writeInt32(2, this.marketType_);
            }
            if ((this.bitField0_ & 2) != 0) {
                codedOutputByteBufferNano.writeUInt32(3, this.top_);
            }
            if ((this.bitField0_ & 4) != 0) {
                codedOutputByteBufferNano.writeBool(4, this.ifGetCalDate_);
            }
            if ((this.bitField0_ & 8) != 0) {
                codedOutputByteBufferNano.writeBool(5, this.sortAsc_);
            }
            if (this.dateTypeCase_ == 7) {
                codedOutputByteBufferNano.writeMessage(7, (MessageNano) this.dateType_);
            }
            super.writeTo(codedOutputByteBufferNano);
        }

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

        public TopSell_Request mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
            while (true) {
                int readTag = codedInputByteBufferNano.readTag();
                if (readTag == 0) {
                    return this;
                }
                if (readTag == 8) {
                    this.dateType_ = Integer.valueOf(codedInputByteBufferNano.readInt32());
                    this.dateTypeCase_ = 1;
                } else if (readTag == 16) {
                    this.marketType_ = codedInputByteBufferNano.readInt32();
                    this.bitField0_ |= 1;
                } else if (readTag == 24) {
                    this.top_ = codedInputByteBufferNano.readUInt32();
                    this.bitField0_ |= 2;
                } else if (readTag == 32) {
                    this.ifGetCalDate_ = codedInputByteBufferNano.readBool();
                    this.bitField0_ |= 4;
                } else if (readTag == 40) {
                    this.sortAsc_ = codedInputByteBufferNano.readBool();
                    this.bitField0_ |= 8;
                } else if (readTag == 58) {
                    if (this.dateTypeCase_ != 7) {
                        this.dateType_ = new DateRange();
                    }
                    codedInputByteBufferNano.readMessage((MessageNano) this.dateType_);
                    this.dateTypeCase_ = 7;
                } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                    return this;
                }
            }
        }
    }
}
