|
| 1 | +# Copyright (C) 2023 - 2024 ANSYS, Inc. and/or its affiliates. |
| 2 | +# SPDX-License-Identifier: MIT |
| 3 | +# |
| 4 | +# |
| 5 | +# Permission is hereby granted, free of charge, to any person obtaining a copy |
| 6 | +# of this software and associated documentation files (the "Software"), to deal |
| 7 | +# in the Software without restriction, including without limitation the rights |
| 8 | +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 9 | +# copies of the Software, and to permit persons to whom the Software is |
| 10 | +# furnished to do so, subject to the following conditions: |
| 11 | +# |
| 12 | +# The above copyright notice and this permission notice shall be included in all |
| 13 | +# copies or substantial portions of the Software. |
| 14 | +# |
| 15 | +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 16 | +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 17 | +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 18 | +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 19 | +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 20 | +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
| 21 | +# SOFTWARE. |
| 22 | + |
| 23 | +""" |
| 24 | + MI Server API |
| 25 | +
|
| 26 | + No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) |
| 27 | +
|
| 28 | + OpenAPI spec version: v1 |
| 29 | +
|
| 30 | + Generated by: https://github.com/swagger-api/swagger-codegen.git |
| 31 | +""" |
| 32 | + |
| 33 | +import re # noqa: F401 |
| 34 | +from typing import TYPE_CHECKING, Any, BinaryIO, Optional, Union # noqa: F401 |
| 35 | + |
| 36 | +from . import ModelBase, Unset, Unset_Type |
| 37 | + |
| 38 | +if TYPE_CHECKING: |
| 39 | + from datetime import datetime |
| 40 | + import pathlib |
| 41 | + |
| 42 | + from . import * |
| 43 | + |
| 44 | + |
| 45 | +class GsaQueryDiscreteTypeFilter(ModelBase): |
| 46 | + """NOTE: This class is auto generated by the swagger code generator program. |
| 47 | +
|
| 48 | + Do not edit the class manually. |
| 49 | + """ |
| 50 | + |
| 51 | + """ |
| 52 | + Attributes |
| 53 | + ---------- |
| 54 | + swagger_types: dict[str, str] |
| 55 | + The key is attribute name and the value is attribute type. |
| 56 | + attribute_map: dict[str, str] |
| 57 | + The key is attribute name and the value is json key in definition. |
| 58 | + subtype_mapping: dict[str, str] |
| 59 | + The key is the unmangled property name and the value is the corresponding type. |
| 60 | + discriminator: Optional[str] |
| 61 | + Name of the property used as discriminator for subtypes. |
| 62 | + """ |
| 63 | + swagger_types: dict[str, str] = { |
| 64 | + "guid": "list[str]", |
| 65 | + "name": "list[str]", |
| 66 | + } |
| 67 | + |
| 68 | + attribute_map: dict[str, str] = { |
| 69 | + "guid": "guid", |
| 70 | + "name": "name", |
| 71 | + } |
| 72 | + |
| 73 | + subtype_mapping: dict[str, str] = {} |
| 74 | + |
| 75 | + discriminator: Optional[str] = None |
| 76 | + |
| 77 | + def __init__( |
| 78 | + self, |
| 79 | + *, |
| 80 | + guid: "Union[list[str], None, Unset_Type]" = Unset, |
| 81 | + name: "Union[list[str], None, Unset_Type]" = Unset, |
| 82 | + ) -> None: |
| 83 | + """GsaQueryDiscreteTypeFilter - a model defined in Swagger |
| 84 | +
|
| 85 | + Parameters |
| 86 | + ---------- |
| 87 | + guid: list[str], optional |
| 88 | + name: list[str], optional |
| 89 | + """ |
| 90 | + self._name: Union[list[str], None, Unset_Type] = Unset |
| 91 | + self._guid: Union[list[str], None, Unset_Type] = Unset |
| 92 | + |
| 93 | + if name is not Unset: |
| 94 | + self.name = name |
| 95 | + if guid is not Unset: |
| 96 | + self.guid = guid |
| 97 | + |
| 98 | + @property |
| 99 | + def name(self) -> "Union[list[str], None, Unset_Type]": |
| 100 | + """Gets the name of this GsaQueryDiscreteTypeFilter. |
| 101 | + If set, discrete type name must match any of these names. |
| 102 | +
|
| 103 | + Returns |
| 104 | + ------- |
| 105 | + Union[list[str], None, Unset_Type] |
| 106 | + The name of this GsaQueryDiscreteTypeFilter. |
| 107 | + """ |
| 108 | + return self._name |
| 109 | + |
| 110 | + @name.setter |
| 111 | + def name(self, name: "Union[list[str], None, Unset_Type]") -> None: |
| 112 | + """Sets the name of this GsaQueryDiscreteTypeFilter. |
| 113 | + If set, discrete type name must match any of these names. |
| 114 | +
|
| 115 | + Parameters |
| 116 | + ---------- |
| 117 | + name: Union[list[str], None, Unset_Type] |
| 118 | + The name of this GsaQueryDiscreteTypeFilter. |
| 119 | + """ |
| 120 | + self._name = name |
| 121 | + |
| 122 | + @property |
| 123 | + def guid(self) -> "Union[list[str], None, Unset_Type]": |
| 124 | + """Gets the guid of this GsaQueryDiscreteTypeFilter. |
| 125 | + If set, discrete type GUID must match any of these GUIDs. |
| 126 | +
|
| 127 | + Returns |
| 128 | + ------- |
| 129 | + Union[list[str], None, Unset_Type] |
| 130 | + The guid of this GsaQueryDiscreteTypeFilter. |
| 131 | + """ |
| 132 | + return self._guid |
| 133 | + |
| 134 | + @guid.setter |
| 135 | + def guid(self, guid: "Union[list[str], None, Unset_Type]") -> None: |
| 136 | + """Sets the guid of this GsaQueryDiscreteTypeFilter. |
| 137 | + If set, discrete type GUID must match any of these GUIDs. |
| 138 | +
|
| 139 | + Parameters |
| 140 | + ---------- |
| 141 | + guid: Union[list[str], None, Unset_Type] |
| 142 | + The guid of this GsaQueryDiscreteTypeFilter. |
| 143 | + """ |
| 144 | + self._guid = guid |
| 145 | + |
| 146 | + @classmethod |
| 147 | + def get_real_child_model(cls, data: dict[str, str]) -> str: |
| 148 | + """Raises a NotImplementedError for a type without a discriminator defined. |
| 149 | +
|
| 150 | + Parameters |
| 151 | + ---------- |
| 152 | + data: ModelBase |
| 153 | + Object representing a subclass of this class |
| 154 | +
|
| 155 | + Raises |
| 156 | + ------ |
| 157 | + NotImplementedError |
| 158 | + This class has no discriminator, and hence no subclasses |
| 159 | + """ |
| 160 | + raise NotImplementedError() |
| 161 | + |
| 162 | + def __repr__(self) -> str: |
| 163 | + """For 'print' and 'pprint'""" |
| 164 | + return self.to_str() |
| 165 | + |
| 166 | + def __eq__(self, other: Any) -> bool: |
| 167 | + """Returns true if both objects are equal""" |
| 168 | + if not isinstance(other, GsaQueryDiscreteTypeFilter): |
| 169 | + return False |
| 170 | + |
| 171 | + return self.__dict__ == other.__dict__ |
| 172 | + |
| 173 | + def __ne__(self, other: Any) -> bool: |
| 174 | + """Returns true if both objects are not equal""" |
| 175 | + return not self == other |
0 commit comments