|
| 1 | +# coding: utf-8 |
| 2 | + |
| 3 | +""" |
| 4 | +InfluxData Managed Functions CRUD API. |
| 5 | +
|
| 6 | +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 |
| 7 | +
|
| 8 | +OpenAPI spec version: 0.1.0 |
| 9 | +Generated by: https://openapi-generator.tech |
| 10 | +""" |
| 11 | + |
| 12 | + |
| 13 | +import pprint |
| 14 | +import re # noqa: F401 |
| 15 | + |
| 16 | +import six |
| 17 | + |
| 18 | + |
| 19 | +class Function(object): |
| 20 | + """NOTE: This class is auto generated by OpenAPI Generator. |
| 21 | +
|
| 22 | + Ref: https://openapi-generator.tech |
| 23 | +
|
| 24 | + Do not edit the class manually. |
| 25 | + """ |
| 26 | + |
| 27 | + """ |
| 28 | + Attributes: |
| 29 | + openapi_types (dict): The key is attribute name |
| 30 | + and the value is attribute type. |
| 31 | + attribute_map (dict): The key is attribute name |
| 32 | + and the value is json key in definition. |
| 33 | + """ |
| 34 | + openapi_types = { |
| 35 | + 'id': 'str', |
| 36 | + 'name': 'str', |
| 37 | + 'description': 'str', |
| 38 | + 'org_id': 'str', |
| 39 | + 'script': 'str', |
| 40 | + 'language': 'FunctionLanguage', |
| 41 | + 'url': 'str', |
| 42 | + 'created_at': 'datetime', |
| 43 | + 'updated_at': 'datetime' |
| 44 | + } |
| 45 | + |
| 46 | + attribute_map = { |
| 47 | + 'id': 'id', |
| 48 | + 'name': 'name', |
| 49 | + 'description': 'description', |
| 50 | + 'org_id': 'orgID', |
| 51 | + 'script': 'script', |
| 52 | + 'language': 'language', |
| 53 | + 'url': 'url', |
| 54 | + 'created_at': 'createdAt', |
| 55 | + 'updated_at': 'updatedAt' |
| 56 | + } |
| 57 | + |
| 58 | + def __init__(self, id=None, name=None, description=None, org_id=None, script=None, language=None, url=None, created_at=None, updated_at=None): # noqa: E501,D401,D403 |
| 59 | + """Function - a model defined in OpenAPI.""" # noqa: E501 |
| 60 | + self._id = None |
| 61 | + self._name = None |
| 62 | + self._description = None |
| 63 | + self._org_id = None |
| 64 | + self._script = None |
| 65 | + self._language = None |
| 66 | + self._url = None |
| 67 | + self._created_at = None |
| 68 | + self._updated_at = None |
| 69 | + self.discriminator = None |
| 70 | + |
| 71 | + if id is not None: |
| 72 | + self.id = id |
| 73 | + self.name = name |
| 74 | + if description is not None: |
| 75 | + self.description = description |
| 76 | + self.org_id = org_id |
| 77 | + self.script = script |
| 78 | + if language is not None: |
| 79 | + self.language = language |
| 80 | + if url is not None: |
| 81 | + self.url = url |
| 82 | + if created_at is not None: |
| 83 | + self.created_at = created_at |
| 84 | + if updated_at is not None: |
| 85 | + self.updated_at = updated_at |
| 86 | + |
| 87 | + @property |
| 88 | + def id(self): |
| 89 | + """Get the id of this Function. |
| 90 | +
|
| 91 | + :return: The id of this Function. |
| 92 | + :rtype: str |
| 93 | + """ # noqa: E501 |
| 94 | + return self._id |
| 95 | + |
| 96 | + @id.setter |
| 97 | + def id(self, id): |
| 98 | + """Set the id of this Function. |
| 99 | +
|
| 100 | + :param id: The id of this Function. |
| 101 | + :type: str |
| 102 | + """ # noqa: E501 |
| 103 | + self._id = id |
| 104 | + |
| 105 | + @property |
| 106 | + def name(self): |
| 107 | + """Get the name of this Function. |
| 108 | +
|
| 109 | + :return: The name of this Function. |
| 110 | + :rtype: str |
| 111 | + """ # noqa: E501 |
| 112 | + return self._name |
| 113 | + |
| 114 | + @name.setter |
| 115 | + def name(self, name): |
| 116 | + """Set the name of this Function. |
| 117 | +
|
| 118 | + :param name: The name of this Function. |
| 119 | + :type: str |
| 120 | + """ # noqa: E501 |
| 121 | + if name is None: |
| 122 | + raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501 |
| 123 | + self._name = name |
| 124 | + |
| 125 | + @property |
| 126 | + def description(self): |
| 127 | + """Get the description of this Function. |
| 128 | +
|
| 129 | + :return: The description of this Function. |
| 130 | + :rtype: str |
| 131 | + """ # noqa: E501 |
| 132 | + return self._description |
| 133 | + |
| 134 | + @description.setter |
| 135 | + def description(self, description): |
| 136 | + """Set the description of this Function. |
| 137 | +
|
| 138 | + :param description: The description of this Function. |
| 139 | + :type: str |
| 140 | + """ # noqa: E501 |
| 141 | + self._description = description |
| 142 | + |
| 143 | + @property |
| 144 | + def org_id(self): |
| 145 | + """Get the org_id of this Function. |
| 146 | +
|
| 147 | + :return: The org_id of this Function. |
| 148 | + :rtype: str |
| 149 | + """ # noqa: E501 |
| 150 | + return self._org_id |
| 151 | + |
| 152 | + @org_id.setter |
| 153 | + def org_id(self, org_id): |
| 154 | + """Set the org_id of this Function. |
| 155 | +
|
| 156 | + :param org_id: The org_id of this Function. |
| 157 | + :type: str |
| 158 | + """ # noqa: E501 |
| 159 | + if org_id is None: |
| 160 | + raise ValueError("Invalid value for `org_id`, must not be `None`") # noqa: E501 |
| 161 | + self._org_id = org_id |
| 162 | + |
| 163 | + @property |
| 164 | + def script(self): |
| 165 | + """Get the script of this Function. |
| 166 | +
|
| 167 | + script is script to be executed |
| 168 | +
|
| 169 | + :return: The script of this Function. |
| 170 | + :rtype: str |
| 171 | + """ # noqa: E501 |
| 172 | + return self._script |
| 173 | + |
| 174 | + @script.setter |
| 175 | + def script(self, script): |
| 176 | + """Set the script of this Function. |
| 177 | +
|
| 178 | + script is script to be executed |
| 179 | +
|
| 180 | + :param script: The script of this Function. |
| 181 | + :type: str |
| 182 | + """ # noqa: E501 |
| 183 | + if script is None: |
| 184 | + raise ValueError("Invalid value for `script`, must not be `None`") # noqa: E501 |
| 185 | + self._script = script |
| 186 | + |
| 187 | + @property |
| 188 | + def language(self): |
| 189 | + """Get the language of this Function. |
| 190 | +
|
| 191 | + :return: The language of this Function. |
| 192 | + :rtype: FunctionLanguage |
| 193 | + """ # noqa: E501 |
| 194 | + return self._language |
| 195 | + |
| 196 | + @language.setter |
| 197 | + def language(self, language): |
| 198 | + """Set the language of this Function. |
| 199 | +
|
| 200 | + :param language: The language of this Function. |
| 201 | + :type: FunctionLanguage |
| 202 | + """ # noqa: E501 |
| 203 | + self._language = language |
| 204 | + |
| 205 | + @property |
| 206 | + def url(self): |
| 207 | + """Get the url of this Function. |
| 208 | +
|
| 209 | + invocation endpoint address |
| 210 | +
|
| 211 | + :return: The url of this Function. |
| 212 | + :rtype: str |
| 213 | + """ # noqa: E501 |
| 214 | + return self._url |
| 215 | + |
| 216 | + @url.setter |
| 217 | + def url(self, url): |
| 218 | + """Set the url of this Function. |
| 219 | +
|
| 220 | + invocation endpoint address |
| 221 | +
|
| 222 | + :param url: The url of this Function. |
| 223 | + :type: str |
| 224 | + """ # noqa: E501 |
| 225 | + self._url = url |
| 226 | + |
| 227 | + @property |
| 228 | + def created_at(self): |
| 229 | + """Get the created_at of this Function. |
| 230 | +
|
| 231 | + :return: The created_at of this Function. |
| 232 | + :rtype: datetime |
| 233 | + """ # noqa: E501 |
| 234 | + return self._created_at |
| 235 | + |
| 236 | + @created_at.setter |
| 237 | + def created_at(self, created_at): |
| 238 | + """Set the created_at of this Function. |
| 239 | +
|
| 240 | + :param created_at: The created_at of this Function. |
| 241 | + :type: datetime |
| 242 | + """ # noqa: E501 |
| 243 | + self._created_at = created_at |
| 244 | + |
| 245 | + @property |
| 246 | + def updated_at(self): |
| 247 | + """Get the updated_at of this Function. |
| 248 | +
|
| 249 | + :return: The updated_at of this Function. |
| 250 | + :rtype: datetime |
| 251 | + """ # noqa: E501 |
| 252 | + return self._updated_at |
| 253 | + |
| 254 | + @updated_at.setter |
| 255 | + def updated_at(self, updated_at): |
| 256 | + """Set the updated_at of this Function. |
| 257 | +
|
| 258 | + :param updated_at: The updated_at of this Function. |
| 259 | + :type: datetime |
| 260 | + """ # noqa: E501 |
| 261 | + self._updated_at = updated_at |
| 262 | + |
| 263 | + def to_dict(self): |
| 264 | + """Return the model properties as a dict.""" |
| 265 | + result = {} |
| 266 | + |
| 267 | + for attr, _ in six.iteritems(self.openapi_types): |
| 268 | + value = getattr(self, attr) |
| 269 | + if isinstance(value, list): |
| 270 | + result[attr] = list(map( |
| 271 | + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, |
| 272 | + value |
| 273 | + )) |
| 274 | + elif hasattr(value, "to_dict"): |
| 275 | + result[attr] = value.to_dict() |
| 276 | + elif isinstance(value, dict): |
| 277 | + result[attr] = dict(map( |
| 278 | + lambda item: (item[0], item[1].to_dict()) |
| 279 | + if hasattr(item[1], "to_dict") else item, |
| 280 | + value.items() |
| 281 | + )) |
| 282 | + else: |
| 283 | + result[attr] = value |
| 284 | + |
| 285 | + return result |
| 286 | + |
| 287 | + def to_str(self): |
| 288 | + """Return the string representation of the model.""" |
| 289 | + return pprint.pformat(self.to_dict()) |
| 290 | + |
| 291 | + def __repr__(self): |
| 292 | + """For `print` and `pprint`.""" |
| 293 | + return self.to_str() |
| 294 | + |
| 295 | + def __eq__(self, other): |
| 296 | + """Return true if both objects are equal.""" |
| 297 | + if not isinstance(other, Function): |
| 298 | + return False |
| 299 | + |
| 300 | + return self.__dict__ == other.__dict__ |
| 301 | + |
| 302 | + def __ne__(self, other): |
| 303 | + """Return true if both objects are not equal.""" |
| 304 | + return not self == other |
0 commit comments