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

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

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

        private static volatile MarginSecuritiesDetail_Response[] _emptyArray;

        public Data[] data;

        public MarginSecuritiesDetailRequest.MarginSecuritiesDetail_Request request;

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

            private static volatile Data[] _emptyArray;

            private long balanceOfMarginSecurities_;

            private long balanceOfMargin_;

            private int bitField0_;

            private int date_;

            private long marginTradingNetBuying_;

            private long percentageOfTradedMarketValue_;

            private long securitiesNetSales_;

            public Data() {
                clear();
            }

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

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

            public Data clear() {
                this.bitField0_ = 0;
                this.date_ = 0;
                this.balanceOfMarginSecurities_ = 0;
                this.percentageOfTradedMarketValue_ = 0;
                this.balanceOfMargin_ = 0;
                this.marginTradingNetBuying_ = 0;
                this.securitiesNetSales_ = 0;
                this.cachedSize = -1;
                return this;
            }

            public Data clearBalanceOfMargin() {
                this.balanceOfMargin_ = 0;
                this.bitField0_ &= -9;
                return this;
            }

            public Data clearBalanceOfMarginSecurities() {
                this.balanceOfMarginSecurities_ = 0;
                this.bitField0_ &= -3;
                return this;
            }

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

            public Data clearMarginTradingNetBuying() {
                this.marginTradingNetBuying_ = 0;
                this.bitField0_ &= -17;
                return this;
            }

            public Data clearPercentageOfTradedMarketValue() {
                this.percentageOfTradedMarketValue_ = 0;
                this.bitField0_ &= -5;
                return this;
            }

            public Data clearSecuritiesNetSales() {
                this.securitiesNetSales_ = 0;
                this.bitField0_ &= -33;
                return this;
            }

            /* access modifiers changed from: protected */
            public int computeSerializedSize() {
                int computeSerializedSize = super.computeSerializedSize();
                if ((this.bitField0_ & 1) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(1, this.date_);
                }
                if ((this.bitField0_ & 2) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeInt64Size(2, this.balanceOfMarginSecurities_);
                }
                if ((this.bitField0_ & 4) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeInt64Size(3, this.percentageOfTradedMarketValue_);
                }
                if ((this.bitField0_ & 8) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeInt64Size(4, this.balanceOfMargin_);
                }
                if ((this.bitField0_ & 16) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeInt64Size(5, this.marginTradingNetBuying_);
                }
                if ((this.bitField0_ & 32) != 0) {
                    return computeSerializedSize + CodedOutputByteBufferNano.computeInt64Size(6, this.securitiesNetSales_);
                }
                return computeSerializedSize;
            }

            public long getBalanceOfMargin() {
                return this.balanceOfMargin_;
            }

            public long getBalanceOfMarginSecurities() {
                return this.balanceOfMarginSecurities_;
            }

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

            public long getMarginTradingNetBuying() {
                return this.marginTradingNetBuying_;
            }

            public long getPercentageOfTradedMarketValue() {
                return this.percentageOfTradedMarketValue_;
            }

            public long getSecuritiesNetSales() {
                return this.securitiesNetSales_;
            }

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

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

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

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

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

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

            public Data setBalanceOfMargin(long j10) {
                this.balanceOfMargin_ = j10;
                this.bitField0_ |= 8;
                return this;
            }

            public Data setBalanceOfMarginSecurities(long j10) {
                this.balanceOfMarginSecurities_ = j10;
                this.bitField0_ |= 2;
                return this;
            }

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

            public Data setMarginTradingNetBuying(long j10) {
                this.marginTradingNetBuying_ = j10;
                this.bitField0_ |= 16;
                return this;
            }

            public Data setPercentageOfTradedMarketValue(long j10) {
                this.percentageOfTradedMarketValue_ = j10;
                this.bitField0_ |= 4;
                return this;
            }

            public Data setSecuritiesNetSales(long j10) {
                this.securitiesNetSales_ = j10;
                this.bitField0_ |= 32;
                return this;
            }

            public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
                if ((this.bitField0_ & 1) != 0) {
                    codedOutputByteBufferNano.writeUInt32(1, this.date_);
                }
                if ((this.bitField0_ & 2) != 0) {
                    codedOutputByteBufferNano.writeInt64(2, this.balanceOfMarginSecurities_);
                }
                if ((this.bitField0_ & 4) != 0) {
                    codedOutputByteBufferNano.writeInt64(3, this.percentageOfTradedMarketValue_);
                }
                if ((this.bitField0_ & 8) != 0) {
                    codedOutputByteBufferNano.writeInt64(4, this.balanceOfMargin_);
                }
                if ((this.bitField0_ & 16) != 0) {
                    codedOutputByteBufferNano.writeInt64(5, this.marginTradingNetBuying_);
                }
                if ((this.bitField0_ & 32) != 0) {
                    codedOutputByteBufferNano.writeInt64(6, this.securitiesNetSales_);
                }
                super.writeTo(codedOutputByteBufferNano);
            }

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

            public Data mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
                while (true) {
                    int readTag = codedInputByteBufferNano.readTag();
                    if (readTag == 0) {
                        return this;
                    }
                    if (readTag == 8) {
                        this.date_ = codedInputByteBufferNano.readUInt32();
                        this.bitField0_ |= 1;
                    } else if (readTag == 16) {
                        this.balanceOfMarginSecurities_ = codedInputByteBufferNano.readInt64();
                        this.bitField0_ |= 2;
                    } else if (readTag == 24) {
                        this.percentageOfTradedMarketValue_ = codedInputByteBufferNano.readInt64();
                        this.bitField0_ |= 4;
                    } else if (readTag == 32) {
                        this.balanceOfMargin_ = codedInputByteBufferNano.readInt64();
                        this.bitField0_ |= 8;
                    } else if (readTag == 40) {
                        this.marginTradingNetBuying_ = codedInputByteBufferNano.readInt64();
                        this.bitField0_ |= 16;
                    } else if (readTag == 48) {
                        this.securitiesNetSales_ = codedInputByteBufferNano.readInt64();
                        this.bitField0_ |= 32;
                    } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                        return this;
                    }
                }
            }
        }

        public MarginSecuritiesDetail_Response() {
            clear();
        }

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

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

        public MarginSecuritiesDetail_Response clear() {
            this.request = null;
            this.data = Data.emptyArray();
            this.cachedSize = -1;
            return this;
        }

        /* access modifiers changed from: protected */
        public int computeSerializedSize() {
            int computeSerializedSize = super.computeSerializedSize();
            MarginSecuritiesDetailRequest.MarginSecuritiesDetail_Request marginSecuritiesDetail_Request = this.request;
            if (marginSecuritiesDetail_Request != null) {
                computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(1, marginSecuritiesDetail_Request);
            }
            Data[] dataArr = this.data;
            if (dataArr != null && dataArr.length > 0) {
                int i10 = 0;
                while (true) {
                    Data[] dataArr2 = this.data;
                    if (i10 >= dataArr2.length) {
                        break;
                    }
                    Data data2 = dataArr2[i10];
                    if (data2 != null) {
                        computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(2, data2);
                    }
                    i10++;
                }
            }
            return computeSerializedSize;
        }

        public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
            MarginSecuritiesDetailRequest.MarginSecuritiesDetail_Request marginSecuritiesDetail_Request = this.request;
            if (marginSecuritiesDetail_Request != null) {
                codedOutputByteBufferNano.writeMessage(1, marginSecuritiesDetail_Request);
            }
            Data[] dataArr = this.data;
            if (dataArr != null && dataArr.length > 0) {
                int i10 = 0;
                while (true) {
                    Data[] dataArr2 = this.data;
                    if (i10 >= dataArr2.length) {
                        break;
                    }
                    Data data2 = dataArr2[i10];
                    if (data2 != null) {
                        codedOutputByteBufferNano.writeMessage(2, data2);
                    }
                    i10++;
                }
            }
            super.writeTo(codedOutputByteBufferNano);
        }

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

        public MarginSecuritiesDetail_Response mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
            while (true) {
                int readTag = codedInputByteBufferNano.readTag();
                if (readTag == 0) {
                    return this;
                }
                if (readTag == 10) {
                    if (this.request == null) {
                        this.request = new MarginSecuritiesDetailRequest.MarginSecuritiesDetail_Request();
                    }
                    codedInputByteBufferNano.readMessage(this.request);
                } else if (readTag == 18) {
                    int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 18);
                    Data[] dataArr = this.data;
                    int length = dataArr == null ? 0 : dataArr.length;
                    int i10 = repeatedFieldArrayLength + length;
                    Data[] dataArr2 = new Data[i10];
                    if (length != 0) {
                        System.arraycopy(dataArr, 0, dataArr2, 0, length);
                    }
                    while (length < i10 - 1) {
                        Data data2 = new Data();
                        dataArr2[length] = data2;
                        codedInputByteBufferNano.readMessage(data2);
                        codedInputByteBufferNano.readTag();
                        length++;
                    }
                    Data data3 = new Data();
                    dataArr2[length] = data3;
                    codedInputByteBufferNano.readMessage(data3);
                    this.data = dataArr2;
                } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                    return this;
                }
            }
        }
    }
}
