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

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

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

        private static volatile TradeDate_Response[] _emptyArray;

        private int bitField0_;

        public TradeDateRequest.TradeDate_Request input;

        public DateTimeSession output;

        private long timestamp_;

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

            private static volatile DateTimeSession[] _emptyArray;

            private int bitField0_;

            public DateTime[] tradeDate;

            private int tradeSession_;

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

                private static volatile DateTime[] _emptyArray;

                private int bitField0_;

                private int tradeDate_;

                public TimePeriod[] tradeTime;

                public TimePeriod[] virtualTime;

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

                    private static volatile TimePeriod[] _emptyArray;

                    private int begin_;

                    private int bitField0_;

                    private int end_;

                    public TimePeriod() {
                        clear();
                    }

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

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

                    public TimePeriod clear() {
                        this.bitField0_ = 0;
                        this.begin_ = 0;
                        this.end_ = 0;
                        this.cachedSize = -1;
                        return this;
                    }

                    public TimePeriod clearBegin() {
                        this.begin_ = 0;
                        this.bitField0_ &= -2;
                        return this;
                    }

                    public TimePeriod clearEnd() {
                        this.end_ = 0;
                        this.bitField0_ &= -3;
                        return this;
                    }

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

                    public int getBegin() {
                        return this.begin_;
                    }

                    public int getEnd() {
                        return this.end_;
                    }

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

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

                    public TimePeriod setBegin(int i10) {
                        this.begin_ = i10;
                        this.bitField0_ |= 1;
                        return this;
                    }

                    public TimePeriod setEnd(int i10) {
                        this.end_ = i10;
                        this.bitField0_ |= 2;
                        return this;
                    }

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

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

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

                public DateTime() {
                    clear();
                }

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

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

                public DateTime clear() {
                    this.bitField0_ = 0;
                    this.tradeDate_ = 0;
                    this.tradeTime = TimePeriod.emptyArray();
                    this.virtualTime = TimePeriod.emptyArray();
                    this.cachedSize = -1;
                    return this;
                }

                public DateTime clearTradeDate() {
                    this.tradeDate_ = 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.tradeDate_);
                    }
                    TimePeriod[] timePeriodArr = this.tradeTime;
                    int i10 = 0;
                    if (timePeriodArr != null && timePeriodArr.length > 0) {
                        int i11 = 0;
                        while (true) {
                            TimePeriod[] timePeriodArr2 = this.tradeTime;
                            if (i11 >= timePeriodArr2.length) {
                                break;
                            }
                            TimePeriod timePeriod = timePeriodArr2[i11];
                            if (timePeriod != null) {
                                computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(2, timePeriod);
                            }
                            i11++;
                        }
                    }
                    TimePeriod[] timePeriodArr3 = this.virtualTime;
                    if (timePeriodArr3 != null && timePeriodArr3.length > 0) {
                        while (true) {
                            TimePeriod[] timePeriodArr4 = this.virtualTime;
                            if (i10 >= timePeriodArr4.length) {
                                break;
                            }
                            TimePeriod timePeriod2 = timePeriodArr4[i10];
                            if (timePeriod2 != null) {
                                computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(3, timePeriod2);
                            }
                            i10++;
                        }
                    }
                    return computeSerializedSize;
                }

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

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

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

                public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
                    if ((this.bitField0_ & 1) != 0) {
                        codedOutputByteBufferNano.writeUInt32(1, this.tradeDate_);
                    }
                    TimePeriod[] timePeriodArr = this.tradeTime;
                    int i10 = 0;
                    if (timePeriodArr != null && timePeriodArr.length > 0) {
                        int i11 = 0;
                        while (true) {
                            TimePeriod[] timePeriodArr2 = this.tradeTime;
                            if (i11 >= timePeriodArr2.length) {
                                break;
                            }
                            TimePeriod timePeriod = timePeriodArr2[i11];
                            if (timePeriod != null) {
                                codedOutputByteBufferNano.writeMessage(2, timePeriod);
                            }
                            i11++;
                        }
                    }
                    TimePeriod[] timePeriodArr3 = this.virtualTime;
                    if (timePeriodArr3 != null && timePeriodArr3.length > 0) {
                        while (true) {
                            TimePeriod[] timePeriodArr4 = this.virtualTime;
                            if (i10 >= timePeriodArr4.length) {
                                break;
                            }
                            TimePeriod timePeriod2 = timePeriodArr4[i10];
                            if (timePeriod2 != null) {
                                codedOutputByteBufferNano.writeMessage(3, timePeriod2);
                            }
                            i10++;
                        }
                    }
                    super.writeTo(codedOutputByteBufferNano);
                }

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

                public DateTime mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
                    while (true) {
                        int readTag = codedInputByteBufferNano.readTag();
                        if (readTag == 0) {
                            return this;
                        }
                        if (readTag == 8) {
                            this.tradeDate_ = codedInputByteBufferNano.readUInt32();
                            this.bitField0_ |= 1;
                        } else if (readTag == 18) {
                            int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 18);
                            TimePeriod[] timePeriodArr = this.tradeTime;
                            int length = timePeriodArr == null ? 0 : timePeriodArr.length;
                            int i10 = repeatedFieldArrayLength + length;
                            TimePeriod[] timePeriodArr2 = new TimePeriod[i10];
                            if (length != 0) {
                                System.arraycopy(timePeriodArr, 0, timePeriodArr2, 0, length);
                            }
                            while (length < i10 - 1) {
                                TimePeriod timePeriod = new TimePeriod();
                                timePeriodArr2[length] = timePeriod;
                                codedInputByteBufferNano.readMessage(timePeriod);
                                codedInputByteBufferNano.readTag();
                                length++;
                            }
                            TimePeriod timePeriod2 = new TimePeriod();
                            timePeriodArr2[length] = timePeriod2;
                            codedInputByteBufferNano.readMessage(timePeriod2);
                            this.tradeTime = timePeriodArr2;
                        } else if (readTag == 26) {
                            int repeatedFieldArrayLength2 = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 26);
                            TimePeriod[] timePeriodArr3 = this.virtualTime;
                            int length2 = timePeriodArr3 == null ? 0 : timePeriodArr3.length;
                            int i11 = repeatedFieldArrayLength2 + length2;
                            TimePeriod[] timePeriodArr4 = new TimePeriod[i11];
                            if (length2 != 0) {
                                System.arraycopy(timePeriodArr3, 0, timePeriodArr4, 0, length2);
                            }
                            while (length2 < i11 - 1) {
                                TimePeriod timePeriod3 = new TimePeriod();
                                timePeriodArr4[length2] = timePeriod3;
                                codedInputByteBufferNano.readMessage(timePeriod3);
                                codedInputByteBufferNano.readTag();
                                length2++;
                            }
                            TimePeriod timePeriod4 = new TimePeriod();
                            timePeriodArr4[length2] = timePeriod4;
                            codedInputByteBufferNano.readMessage(timePeriod4);
                            this.virtualTime = timePeriodArr4;
                        } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                            return this;
                        }
                    }
                }
            }

            public DateTimeSession() {
                clear();
            }

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

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

            public DateTimeSession clear() {
                this.bitField0_ = 0;
                this.tradeSession_ = 0;
                this.tradeDate = DateTime.emptyArray();
                this.cachedSize = -1;
                return this;
            }

            public DateTimeSession clearTradeSession() {
                this.tradeSession_ = 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.tradeSession_);
                }
                DateTime[] dateTimeArr = this.tradeDate;
                if (dateTimeArr != null && dateTimeArr.length > 0) {
                    int i10 = 0;
                    while (true) {
                        DateTime[] dateTimeArr2 = this.tradeDate;
                        if (i10 >= dateTimeArr2.length) {
                            break;
                        }
                        DateTime dateTime = dateTimeArr2[i10];
                        if (dateTime != null) {
                            computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(2, dateTime);
                        }
                        i10++;
                    }
                }
                return computeSerializedSize;
            }

            public int getTradeSession() {
                return this.tradeSession_;
            }

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

            public DateTimeSession setTradeSession(int i10) {
                this.tradeSession_ = i10;
                this.bitField0_ |= 1;
                return this;
            }

            public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
                if ((this.bitField0_ & 1) != 0) {
                    codedOutputByteBufferNano.writeUInt32(1, this.tradeSession_);
                }
                DateTime[] dateTimeArr = this.tradeDate;
                if (dateTimeArr != null && dateTimeArr.length > 0) {
                    int i10 = 0;
                    while (true) {
                        DateTime[] dateTimeArr2 = this.tradeDate;
                        if (i10 >= dateTimeArr2.length) {
                            break;
                        }
                        DateTime dateTime = dateTimeArr2[i10];
                        if (dateTime != null) {
                            codedOutputByteBufferNano.writeMessage(2, dateTime);
                        }
                        i10++;
                    }
                }
                super.writeTo(codedOutputByteBufferNano);
            }

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

            public DateTimeSession mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
                while (true) {
                    int readTag = codedInputByteBufferNano.readTag();
                    if (readTag == 0) {
                        return this;
                    }
                    if (readTag == 8) {
                        this.tradeSession_ = codedInputByteBufferNano.readUInt32();
                        this.bitField0_ |= 1;
                    } else if (readTag == 18) {
                        int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 18);
                        DateTime[] dateTimeArr = this.tradeDate;
                        int length = dateTimeArr == null ? 0 : dateTimeArr.length;
                        int i10 = repeatedFieldArrayLength + length;
                        DateTime[] dateTimeArr2 = new DateTime[i10];
                        if (length != 0) {
                            System.arraycopy(dateTimeArr, 0, dateTimeArr2, 0, length);
                        }
                        while (length < i10 - 1) {
                            DateTime dateTime = new DateTime();
                            dateTimeArr2[length] = dateTime;
                            codedInputByteBufferNano.readMessage(dateTime);
                            codedInputByteBufferNano.readTag();
                            length++;
                        }
                        DateTime dateTime2 = new DateTime();
                        dateTimeArr2[length] = dateTime2;
                        codedInputByteBufferNano.readMessage(dateTime2);
                        this.tradeDate = dateTimeArr2;
                    } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                        return this;
                    }
                }
            }
        }

        public TradeDate_Response() {
            clear();
        }

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

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

        public TradeDate_Response clear() {
            this.bitField0_ = 0;
            this.input = null;
            this.timestamp_ = 0;
            this.output = null;
            this.cachedSize = -1;
            return this;
        }

        public TradeDate_Response clearTimestamp() {
            this.timestamp_ = 0;
            this.bitField0_ &= -2;
            return this;
        }

        /* access modifiers changed from: protected */
        public int computeSerializedSize() {
            int computeSerializedSize = super.computeSerializedSize();
            TradeDateRequest.TradeDate_Request tradeDate_Request = this.input;
            if (tradeDate_Request != null) {
                computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(1, tradeDate_Request);
            }
            if ((this.bitField0_ & 1) != 0) {
                computeSerializedSize += CodedOutputByteBufferNano.computeUInt64Size(2, this.timestamp_);
            }
            DateTimeSession dateTimeSession = this.output;
            if (dateTimeSession != null) {
                return computeSerializedSize + CodedOutputByteBufferNano.computeMessageSize(3, dateTimeSession);
            }
            return computeSerializedSize;
        }

        public long getTimestamp() {
            return this.timestamp_;
        }

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

        public TradeDate_Response setTimestamp(long j10) {
            this.timestamp_ = j10;
            this.bitField0_ |= 1;
            return this;
        }

        public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
            TradeDateRequest.TradeDate_Request tradeDate_Request = this.input;
            if (tradeDate_Request != null) {
                codedOutputByteBufferNano.writeMessage(1, tradeDate_Request);
            }
            if ((this.bitField0_ & 1) != 0) {
                codedOutputByteBufferNano.writeUInt64(2, this.timestamp_);
            }
            DateTimeSession dateTimeSession = this.output;
            if (dateTimeSession != null) {
                codedOutputByteBufferNano.writeMessage(3, dateTimeSession);
            }
            super.writeTo(codedOutputByteBufferNano);
        }

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

        public TradeDate_Response mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
            while (true) {
                int readTag = codedInputByteBufferNano.readTag();
                if (readTag == 0) {
                    return this;
                }
                if (readTag == 10) {
                    if (this.input == null) {
                        this.input = new TradeDateRequest.TradeDate_Request();
                    }
                    codedInputByteBufferNano.readMessage(this.input);
                } else if (readTag == 16) {
                    this.timestamp_ = codedInputByteBufferNano.readUInt64();
                    this.bitField0_ |= 1;
                } else if (readTag == 26) {
                    if (this.output == null) {
                        this.output = new DateTimeSession();
                    }
                    codedInputByteBufferNano.readMessage(this.output);
                } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                    return this;
                }
            }
        }
    }
}
