|
| 1 | +# NEON AI (TM) SOFTWARE, Software Development Kit & Application Development System |
| 2 | +# All trademark and other rights reserved by their respective owners |
| 3 | +# Copyright 2008-2024 Neongecko.com Inc. |
| 4 | +# BSD-3 |
| 5 | +# Redistribution and use in source and binary forms, with or without |
| 6 | +# modification, are permitted provided that the following conditions are met: |
| 7 | +# 1. Redistributions of source code must retain the above copyright notice, |
| 8 | +# this list of conditions and the following disclaimer. |
| 9 | +# 2. Redistributions in binary form must reproduce the above copyright notice, |
| 10 | +# this list of conditions and the following disclaimer in the documentation |
| 11 | +# and/or other materials provided with the distribution. |
| 12 | +# 3. Neither the name of the copyright holder nor the names of its |
| 13 | +# contributors may be used to endorse or promote products derived from this |
| 14 | +# software without specific prior written permission. |
| 15 | +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| 16 | +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, |
| 17 | +# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 18 | +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR |
| 19 | +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
| 20 | +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
| 21 | +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, |
| 22 | +# OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF |
| 23 | +# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
| 24 | +# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
| 25 | +# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 26 | + |
| 27 | +from typing import Optional |
| 28 | +from pydantic import Field |
| 29 | +from neon_data_models.models.base.contexts import MQContext |
| 30 | + |
| 31 | + |
| 32 | +class MQResponse(MQContext): |
| 33 | + is_final: bool = Field(default=True, alias="_is_final", |
| 34 | + description='If False, another response message is ' |
| 35 | + 'expected.') |
| 36 | + part: Optional[int] = Field(default=None, alias="_part", |
| 37 | + description='Index of this response message in ' |
| 38 | + 'a series. (zero-indexed)') |
0 commit comments