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

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

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

        private static volatile ConnectTurnover_Response[] _emptyArray;

        public ConnectTurnoverRequest.ConnectTurnover_Request requestData;

        public ExchangeConnectTurnover[] responseData;

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

            private static volatile ExchangeConnectTurnover[] _emptyArray;

            private int bitField0_;

            private long buyTurnover_;

            private long sellTurnover_;

            private String statusReasons_;

            private int tradeDate_;

            private int tradeDirection_;

            private int tradeTime_;

            public ExchangeConnectTurnover() {
                clear();
            }

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

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

            public ExchangeConnectTurnover clear() {
                this.bitField0_ = 0;
                this.tradeDirection_ = 0;
                this.tradeDate_ = 0;
                this.tradeTime_ = 0;
                this.buyTurnover_ = 0;
                this.sellTurnover_ = 0;
                this.statusReasons_ = "";
                this.cachedSize = -1;
                return this;
            }

            public ExchangeConnectTurnover clearBuyTurnover() {
                this.buyTurnover_ = 0;
                this.bitField0_ &= -9;
                return this;
            }

            public ExchangeConnectTurnover clearSellTurnover() {
                this.sellTurnover_ = 0;
                this.bitField0_ &= -17;
                return this;
            }

            public ExchangeConnectTurnover clearStatusReasons() {
                this.statusReasons_ = "";
                this.bitField0_ &= -33;
                return this;
            }

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

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

            public ExchangeConnectTurnover clearTradeTime() {
                this.tradeTime_ = 0;
                this.bitField0_ &= -5;
                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) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(2, this.tradeDate_);
                }
                if ((this.bitField0_ & 4) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(3, this.tradeTime_);
                }
                if ((this.bitField0_ & 8) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeInt64Size(4, this.buyTurnover_);
                }
                if ((this.bitField0_ & 16) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeInt64Size(5, this.sellTurnover_);
                }
                if ((this.bitField0_ & 32) != 0) {
                    return computeSerializedSize + CodedOutputByteBufferNano.computeStringSize(6, this.statusReasons_);
                }
                return computeSerializedSize;
            }

            public long getBuyTurnover() {
                return this.buyTurnover_;
            }

            public long getSellTurnover() {
                return this.sellTurnover_;
            }

            public String getStatusReasons() {
                return this.statusReasons_;
            }

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

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

            public int getTradeTime() {
                return this.tradeTime_;
            }

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

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

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

            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 boolean hasTradeTime() {
                if ((this.bitField0_ & 4) != 0) {
                    return true;
                }
                return false;
            }

            public ExchangeConnectTurnover setBuyTurnover(long j10) {
                this.buyTurnover_ = j10;
                this.bitField0_ |= 8;
                return this;
            }

            public ExchangeConnectTurnover setSellTurnover(long j10) {
                this.sellTurnover_ = j10;
                this.bitField0_ |= 16;
                return this;
            }

            public ExchangeConnectTurnover setStatusReasons(String str) {
                str.getClass();
                this.statusReasons_ = str;
                this.bitField0_ |= 32;
                return this;
            }

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

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

            public ExchangeConnectTurnover setTradeTime(int i10) {
                this.tradeTime_ = i10;
                this.bitField0_ |= 4;
                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_);
                }
                if ((this.bitField0_ & 4) != 0) {
                    codedOutputByteBufferNano.writeUInt32(3, this.tradeTime_);
                }
                if ((this.bitField0_ & 8) != 0) {
                    codedOutputByteBufferNano.writeInt64(4, this.buyTurnover_);
                }
                if ((this.bitField0_ & 16) != 0) {
                    codedOutputByteBufferNano.writeInt64(5, this.sellTurnover_);
                }
                if ((this.bitField0_ & 32) != 0) {
                    codedOutputByteBufferNano.writeString(6, this.statusReasons_);
                }
                super.writeTo(codedOutputByteBufferNano);
            }

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

            public ExchangeConnectTurnover 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 (readTag == 24) {
                        this.tradeTime_ = codedInputByteBufferNano.readUInt32();
                        this.bitField0_ |= 4;
                    } else if (readTag == 32) {
                        this.buyTurnover_ = codedInputByteBufferNano.readInt64();
                        this.bitField0_ |= 8;
                    } else if (readTag == 40) {
                        this.sellTurnover_ = codedInputByteBufferNano.readInt64();
                        this.bitField0_ |= 16;
                    } else if (readTag == 50) {
                        this.statusReasons_ = codedInputByteBufferNano.readString();
                        this.bitField0_ |= 32;
                    } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                        return this;
                    }
                }
            }
        }

        public ConnectTurnover_Response() {
            clear();
        }

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

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

        public ConnectTurnover_Response clear() {
            this.responseData = ExchangeConnectTurnover.emptyArray();
            this.requestData = null;
            this.cachedSize = -1;
            return this;
        }

        /* access modifiers changed from: protected */
        public int computeSerializedSize() {
            int computeSerializedSize = super.computeSerializedSize();
            ExchangeConnectTurnover[] exchangeConnectTurnoverArr = this.responseData;
            if (exchangeConnectTurnoverArr != null && exchangeConnectTurnoverArr.length > 0) {
                int i10 = 0;
                while (true) {
                    ExchangeConnectTurnover[] exchangeConnectTurnoverArr2 = this.responseData;
                    if (i10 >= exchangeConnectTurnoverArr2.length) {
                        break;
                    }
                    ExchangeConnectTurnover exchangeConnectTurnover = exchangeConnectTurnoverArr2[i10];
                    if (exchangeConnectTurnover != null) {
                        computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(1, exchangeConnectTurnover);
                    }
                    i10++;
                }
            }
            ConnectTurnoverRequest.ConnectTurnover_Request connectTurnover_Request = this.requestData;
            if (connectTurnover_Request != null) {
                return computeSerializedSize + CodedOutputByteBufferNano.computeMessageSize(2, connectTurnover_Request);
            }
            return computeSerializedSize;
        }

        public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
            ExchangeConnectTurnover[] exchangeConnectTurnoverArr = this.responseData;
            if (exchangeConnectTurnoverArr != null && exchangeConnectTurnoverArr.length > 0) {
                int i10 = 0;
                while (true) {
                    ExchangeConnectTurnover[] exchangeConnectTurnoverArr2 = this.responseData;
                    if (i10 >= exchangeConnectTurnoverArr2.length) {
                        break;
                    }
                    ExchangeConnectTurnover exchangeConnectTurnover = exchangeConnectTurnoverArr2[i10];
                    if (exchangeConnectTurnover != null) {
                        codedOutputByteBufferNano.writeMessage(1, exchangeConnectTurnover);
                    }
                    i10++;
                }
            }
            ConnectTurnoverRequest.ConnectTurnover_Request connectTurnover_Request = this.requestData;
            if (connectTurnover_Request != null) {
                codedOutputByteBufferNano.writeMessage(2, connectTurnover_Request);
            }
            super.writeTo(codedOutputByteBufferNano);
        }

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

        public ConnectTurnover_Response 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);
                    ExchangeConnectTurnover[] exchangeConnectTurnoverArr = this.responseData;
                    int length = exchangeConnectTurnoverArr == null ? 0 : exchangeConnectTurnoverArr.length;
                    int i10 = repeatedFieldArrayLength + length;
                    ExchangeConnectTurnover[] exchangeConnectTurnoverArr2 = new ExchangeConnectTurnover[i10];
                    if (length != 0) {
                        System.arraycopy(exchangeConnectTurnoverArr, 0, exchangeConnectTurnoverArr2, 0, length);
                    }
                    while (length < i10 - 1) {
                        ExchangeConnectTurnover exchangeConnectTurnover = new ExchangeConnectTurnover();
                        exchangeConnectTurnoverArr2[length] = exchangeConnectTurnover;
                        codedInputByteBufferNano.readMessage(exchangeConnectTurnover);
                        codedInputByteBufferNano.readTag();
                        length++;
                    }
                    ExchangeConnectTurnover exchangeConnectTurnover2 = new ExchangeConnectTurnover();
                    exchangeConnectTurnoverArr2[length] = exchangeConnectTurnover2;
                    codedInputByteBufferNano.readMessage(exchangeConnectTurnover2);
                    this.responseData = exchangeConnectTurnoverArr2;
                } else if (readTag == 18) {
                    if (this.requestData == null) {
                        this.requestData = new ConnectTurnoverRequest.ConnectTurnover_Request();
                    }
                    codedInputByteBufferNano.readMessage(this.requestData);
                } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                    return this;
                }
            }
        }
    }
}
