|
| 1 | +# coding: utf-8 |
| 2 | + |
| 3 | +""" |
| 4 | + EPIC API |
| 5 | +
|
| 6 | + REST API for interacting with EPIC (https://epic.zenotech.com) services. <br /> Please note this API is in BETA and does not yet contain all EPIC functionality. # noqa: E501 |
| 7 | +
|
| 8 | + The version of the OpenAPI document: v2 |
| 9 | + |
| 10 | + Generated by: https://openapi-generator.tech |
| 11 | +""" |
| 12 | + |
| 13 | + |
| 14 | +import pprint |
| 15 | +import re # noqa: F401 |
| 16 | + |
| 17 | +import six |
| 18 | + |
| 19 | +from epiccore.configuration import Configuration |
| 20 | + |
| 21 | + |
| 22 | +class AcceleratorConfig(object): |
| 23 | + """NOTE: This class is auto generated by OpenAPI Generator. |
| 24 | + Ref: https://openapi-generator.tech |
| 25 | +
|
| 26 | + Do not edit the class manually. |
| 27 | + """ |
| 28 | + |
| 29 | + """ |
| 30 | + Attributes: |
| 31 | + openapi_types (dict): The key is attribute name |
| 32 | + and the value is attribute type. |
| 33 | + attribute_map (dict): The key is attribute name |
| 34 | + and the value is json key in definition. |
| 35 | + """ |
| 36 | + openapi_types = { |
| 37 | + 'name': 'str', |
| 38 | + 'acc_class': 'str', |
| 39 | + 'quantity': 'int', |
| 40 | + 'description': 'str' |
| 41 | + } |
| 42 | + |
| 43 | + attribute_map = { |
| 44 | + 'name': 'name', |
| 45 | + 'acc_class': 'acc_class', |
| 46 | + 'quantity': 'quantity', |
| 47 | + 'description': 'description' |
| 48 | + } |
| 49 | + |
| 50 | + def __init__(self, name=None, acc_class=None, quantity=None, description=None, local_vars_configuration=None): # noqa: E501 |
| 51 | + """AcceleratorConfig - a model defined in OpenAPI""" # noqa: E501 |
| 52 | + if local_vars_configuration is None: |
| 53 | + local_vars_configuration = Configuration() |
| 54 | + self.local_vars_configuration = local_vars_configuration |
| 55 | + |
| 56 | + self._name = None |
| 57 | + self._acc_class = None |
| 58 | + self._quantity = None |
| 59 | + self._description = None |
| 60 | + self.discriminator = None |
| 61 | + |
| 62 | + self.name = name |
| 63 | + self.acc_class = acc_class |
| 64 | + if quantity is not None: |
| 65 | + self.quantity = quantity |
| 66 | + self.description = description |
| 67 | + |
| 68 | + @property |
| 69 | + def name(self): |
| 70 | + """Gets the name of this AcceleratorConfig. # noqa: E501 |
| 71 | +
|
| 72 | +
|
| 73 | + :return: The name of this AcceleratorConfig. # noqa: E501 |
| 74 | + :rtype: str |
| 75 | + """ |
| 76 | + return self._name |
| 77 | + |
| 78 | + @name.setter |
| 79 | + def name(self, name): |
| 80 | + """Sets the name of this AcceleratorConfig. |
| 81 | +
|
| 82 | +
|
| 83 | + :param name: The name of this AcceleratorConfig. # noqa: E501 |
| 84 | + :type name: str |
| 85 | + """ |
| 86 | + if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501 |
| 87 | + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 |
| 88 | + if (self.local_vars_configuration.client_side_validation and |
| 89 | + name is not None and len(name) > 100): |
| 90 | + raise ValueError("Invalid value for `name`, length must be less than or equal to `100`") # noqa: E501 |
| 91 | + if (self.local_vars_configuration.client_side_validation and |
| 92 | + name is not None and len(name) < 1): |
| 93 | + raise ValueError("Invalid value for `name`, length must be greater than or equal to `1`") # noqa: E501 |
| 94 | + |
| 95 | + self._name = name |
| 96 | + |
| 97 | + @property |
| 98 | + def acc_class(self): |
| 99 | + """Gets the acc_class of this AcceleratorConfig. # noqa: E501 |
| 100 | +
|
| 101 | +
|
| 102 | + :return: The acc_class of this AcceleratorConfig. # noqa: E501 |
| 103 | + :rtype: str |
| 104 | + """ |
| 105 | + return self._acc_class |
| 106 | + |
| 107 | + @acc_class.setter |
| 108 | + def acc_class(self, acc_class): |
| 109 | + """Sets the acc_class of this AcceleratorConfig. |
| 110 | +
|
| 111 | +
|
| 112 | + :param acc_class: The acc_class of this AcceleratorConfig. # noqa: E501 |
| 113 | + :type acc_class: str |
| 114 | + """ |
| 115 | + if self.local_vars_configuration.client_side_validation and acc_class is None: # noqa: E501 |
| 116 | + raise ValueError("Invalid value for `acc_class`, must not be `None`") # noqa: E501 |
| 117 | + if (self.local_vars_configuration.client_side_validation and |
| 118 | + acc_class is not None and len(acc_class) > 100): |
| 119 | + raise ValueError("Invalid value for `acc_class`, length must be less than or equal to `100`") # noqa: E501 |
| 120 | + if (self.local_vars_configuration.client_side_validation and |
| 121 | + acc_class is not None and len(acc_class) < 1): |
| 122 | + raise ValueError("Invalid value for `acc_class`, length must be greater than or equal to `1`") # noqa: E501 |
| 123 | + |
| 124 | + self._acc_class = acc_class |
| 125 | + |
| 126 | + @property |
| 127 | + def quantity(self): |
| 128 | + """Gets the quantity of this AcceleratorConfig. # noqa: E501 |
| 129 | +
|
| 130 | +
|
| 131 | + :return: The quantity of this AcceleratorConfig. # noqa: E501 |
| 132 | + :rtype: int |
| 133 | + """ |
| 134 | + return self._quantity |
| 135 | + |
| 136 | + @quantity.setter |
| 137 | + def quantity(self, quantity): |
| 138 | + """Sets the quantity of this AcceleratorConfig. |
| 139 | +
|
| 140 | +
|
| 141 | + :param quantity: The quantity of this AcceleratorConfig. # noqa: E501 |
| 142 | + :type quantity: int |
| 143 | + """ |
| 144 | + if (self.local_vars_configuration.client_side_validation and |
| 145 | + quantity is not None and quantity > 2147483647): # noqa: E501 |
| 146 | + raise ValueError("Invalid value for `quantity`, must be a value less than or equal to `2147483647`") # noqa: E501 |
| 147 | + if (self.local_vars_configuration.client_side_validation and |
| 148 | + quantity is not None and quantity < -2147483648): # noqa: E501 |
| 149 | + raise ValueError("Invalid value for `quantity`, must be a value greater than or equal to `-2147483648`") # noqa: E501 |
| 150 | + |
| 151 | + self._quantity = quantity |
| 152 | + |
| 153 | + @property |
| 154 | + def description(self): |
| 155 | + """Gets the description of this AcceleratorConfig. # noqa: E501 |
| 156 | +
|
| 157 | +
|
| 158 | + :return: The description of this AcceleratorConfig. # noqa: E501 |
| 159 | + :rtype: str |
| 160 | + """ |
| 161 | + return self._description |
| 162 | + |
| 163 | + @description.setter |
| 164 | + def description(self, description): |
| 165 | + """Sets the description of this AcceleratorConfig. |
| 166 | +
|
| 167 | +
|
| 168 | + :param description: The description of this AcceleratorConfig. # noqa: E501 |
| 169 | + :type description: str |
| 170 | + """ |
| 171 | + if (self.local_vars_configuration.client_side_validation and |
| 172 | + description is not None and len(description) > 255): |
| 173 | + raise ValueError("Invalid value for `description`, length must be less than or equal to `255`") # noqa: E501 |
| 174 | + |
| 175 | + self._description = description |
| 176 | + |
| 177 | + def to_dict(self): |
| 178 | + """Returns the model properties as a dict""" |
| 179 | + result = {} |
| 180 | + |
| 181 | + for attr, _ in six.iteritems(self.openapi_types): |
| 182 | + value = getattr(self, attr) |
| 183 | + if isinstance(value, list): |
| 184 | + result[attr] = list(map( |
| 185 | + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, |
| 186 | + value |
| 187 | + )) |
| 188 | + elif hasattr(value, "to_dict"): |
| 189 | + result[attr] = value.to_dict() |
| 190 | + elif isinstance(value, dict): |
| 191 | + result[attr] = dict(map( |
| 192 | + lambda item: (item[0], item[1].to_dict()) |
| 193 | + if hasattr(item[1], "to_dict") else item, |
| 194 | + value.items() |
| 195 | + )) |
| 196 | + else: |
| 197 | + result[attr] = value |
| 198 | + |
| 199 | + return result |
| 200 | + |
| 201 | + def to_str(self): |
| 202 | + """Returns the string representation of the model""" |
| 203 | + return pprint.pformat(self.to_dict()) |
| 204 | + |
| 205 | + def __repr__(self): |
| 206 | + """For `print` and `pprint`""" |
| 207 | + return self.to_str() |
| 208 | + |
| 209 | + def __eq__(self, other): |
| 210 | + """Returns true if both objects are equal""" |
| 211 | + if not isinstance(other, AcceleratorConfig): |
| 212 | + return False |
| 213 | + |
| 214 | + return self.to_dict() == other.to_dict() |
| 215 | + |
| 216 | + def __ne__(self, other): |
| 217 | + """Returns true if both objects are not equal""" |
| 218 | + if not isinstance(other, AcceleratorConfig): |
| 219 | + return True |
| 220 | + |
| 221 | + return self.to_dict() != other.to_dict() |
0 commit comments