|
| 1 | +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. |
| 2 | +# This product includes software developed at Datadog (https://www.datadoghq.com/). |
| 3 | +# Copyright 2019-Present Datadog, Inc. |
| 4 | +from __future__ import annotations |
| 5 | + |
| 6 | +from typing import Union |
| 7 | + |
| 8 | +from datadog_api_client.model_utils import ( |
| 9 | + ModelNormal, |
| 10 | + cached_property, |
| 11 | + none_type, |
| 12 | + unset, |
| 13 | + UnsetType, |
| 14 | +) |
| 15 | + |
| 16 | + |
| 17 | +class IncidentUserAttributes(ModelNormal): |
| 18 | + @cached_property |
| 19 | + def openapi_types(_): |
| 20 | + return { |
| 21 | + "email": (str,), |
| 22 | + "handle": (str,), |
| 23 | + "icon": (str,), |
| 24 | + "name": (str, none_type), |
| 25 | + "uuid": (str,), |
| 26 | + } |
| 27 | + |
| 28 | + attribute_map = { |
| 29 | + "email": "email", |
| 30 | + "handle": "handle", |
| 31 | + "icon": "icon", |
| 32 | + "name": "name", |
| 33 | + "uuid": "uuid", |
| 34 | + } |
| 35 | + |
| 36 | + def __init__( |
| 37 | + self_, |
| 38 | + email: Union[str, UnsetType] = unset, |
| 39 | + handle: Union[str, UnsetType] = unset, |
| 40 | + icon: Union[str, UnsetType] = unset, |
| 41 | + name: Union[str, none_type, UnsetType] = unset, |
| 42 | + uuid: Union[str, UnsetType] = unset, |
| 43 | + **kwargs, |
| 44 | + ): |
| 45 | + """ |
| 46 | + Attributes of user object returned by the API. |
| 47 | +
|
| 48 | + :param email: Email of the user. |
| 49 | + :type email: str, optional |
| 50 | +
|
| 51 | + :param handle: Handle of the user. |
| 52 | + :type handle: str, optional |
| 53 | +
|
| 54 | + :param icon: URL of the user's icon. |
| 55 | + :type icon: str, optional |
| 56 | +
|
| 57 | + :param name: Name of the user. |
| 58 | + :type name: str, none_type, optional |
| 59 | +
|
| 60 | + :param uuid: UUID of the user. |
| 61 | + :type uuid: str, optional |
| 62 | + """ |
| 63 | + if email is not unset: |
| 64 | + kwargs["email"] = email |
| 65 | + if handle is not unset: |
| 66 | + kwargs["handle"] = handle |
| 67 | + if icon is not unset: |
| 68 | + kwargs["icon"] = icon |
| 69 | + if name is not unset: |
| 70 | + kwargs["name"] = name |
| 71 | + if uuid is not unset: |
| 72 | + kwargs["uuid"] = uuid |
| 73 | + super().__init__(kwargs) |
0 commit comments