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

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

        private static volatile MarginSecuritiesRank_Request[] _emptyArray;

        private int bitField0_;

        public BusinessType[] businessTypeInfo;

        private int date_;

        private int top_;

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

            private static volatile BusinessType[] _emptyArray;

            private int bitField0_;

            private int dataType_;

            private int stockType_;

            public BusinessType() {
                clear();
            }

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

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

            public BusinessType clear() {
                this.bitField0_ = 0;
                this.stockType_ = 0;
                this.dataType_ = 0;
                this.cachedSize = -1;
                return this;
            }

            public BusinessType clearDataType() {
                this.dataType_ = 0;
                this.bitField0_ &= -3;
                return this;
            }

            public BusinessType clearStockType() {
                this.stockType_ = 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.computeInt32Size(1, this.stockType_);
                }
                if ((this.bitField0_ & 2) != 0) {
                    return computeSerializedSize + CodedOutputByteBufferNano.computeInt32Size(2, this.dataType_);
                }
                return computeSerializedSize;
            }

            public int getDataType() {
                return this.dataType_;
            }

            public int getStockType() {
                return this.stockType_;
            }

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

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

            public BusinessType setDataType(int i10) {
                this.dataType_ = i10;
                this.bitField0_ |= 2;
                return this;
            }

            public BusinessType setStockType(int i10) {
                this.stockType_ = i10;
                this.bitField0_ |= 1;
                return this;
            }

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

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

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

        public MarginSecuritiesRank_Request() {
            clear();
        }

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

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

        public MarginSecuritiesRank_Request clear() {
            this.bitField0_ = 0;
            this.businessTypeInfo = BusinessType.emptyArray();
            this.date_ = 0;
            this.top_ = 0;
            this.cachedSize = -1;
            return this;
        }

        public MarginSecuritiesRank_Request clearDate() {
            this.date_ = 0;
            this.bitField0_ &= -2;
            return this;
        }

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

        /* access modifiers changed from: protected */
        public int computeSerializedSize() {
            int computeSerializedSize = super.computeSerializedSize();
            BusinessType[] businessTypeArr = this.businessTypeInfo;
            if (businessTypeArr != null && businessTypeArr.length > 0) {
                int i10 = 0;
                while (true) {
                    BusinessType[] businessTypeArr2 = this.businessTypeInfo;
                    if (i10 >= businessTypeArr2.length) {
                        break;
                    }
                    BusinessType businessType = businessTypeArr2[i10];
                    if (businessType != null) {
                        computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(1, businessType);
                    }
                    i10++;
                }
            }
            if ((this.bitField0_ & 1) != 0) {
                computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(2, this.date_);
            }
            if ((this.bitField0_ & 2) != 0) {
                return computeSerializedSize + CodedOutputByteBufferNano.computeUInt32Size(3, this.top_);
            }
            return computeSerializedSize;
        }

        public int getDate() {
            return this.date_;
        }

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

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

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

        public MarginSecuritiesRank_Request setDate(int i10) {
            this.date_ = i10;
            this.bitField0_ |= 1;
            return this;
        }

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

        public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
            BusinessType[] businessTypeArr = this.businessTypeInfo;
            if (businessTypeArr != null && businessTypeArr.length > 0) {
                int i10 = 0;
                while (true) {
                    BusinessType[] businessTypeArr2 = this.businessTypeInfo;
                    if (i10 >= businessTypeArr2.length) {
                        break;
                    }
                    BusinessType businessType = businessTypeArr2[i10];
                    if (businessType != null) {
                        codedOutputByteBufferNano.writeMessage(1, businessType);
                    }
                    i10++;
                }
            }
            if ((this.bitField0_ & 1) != 0) {
                codedOutputByteBufferNano.writeUInt32(2, this.date_);
            }
            if ((this.bitField0_ & 2) != 0) {
                codedOutputByteBufferNano.writeUInt32(3, this.top_);
            }
            super.writeTo(codedOutputByteBufferNano);
        }

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

        public MarginSecuritiesRank_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);
                    BusinessType[] businessTypeArr = this.businessTypeInfo;
                    int length = businessTypeArr == null ? 0 : businessTypeArr.length;
                    int i10 = repeatedFieldArrayLength + length;
                    BusinessType[] businessTypeArr2 = new BusinessType[i10];
                    if (length != 0) {
                        System.arraycopy(businessTypeArr, 0, businessTypeArr2, 0, length);
                    }
                    while (length < i10 - 1) {
                        BusinessType businessType = new BusinessType();
                        businessTypeArr2[length] = businessType;
                        codedInputByteBufferNano.readMessage(businessType);
                        codedInputByteBufferNano.readTag();
                        length++;
                    }
                    BusinessType businessType2 = new BusinessType();
                    businessTypeArr2[length] = businessType2;
                    codedInputByteBufferNano.readMessage(businessType2);
                    this.businessTypeInfo = businessTypeArr2;
                } else if (readTag == 16) {
                    this.date_ = codedInputByteBufferNano.readUInt32();
                    this.bitField0_ |= 1;
                } else if (readTag == 24) {
                    this.top_ = codedInputByteBufferNano.readUInt32();
                    this.bitField0_ |= 2;
                } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                    return this;
                }
            }
        }
    }
}
