|
| 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 List, Union |
| 7 | + |
| 8 | +from datadog_api_client.model_utils import ( |
| 9 | + ModelNormal, |
| 10 | + cached_property, |
| 11 | + datetime, |
| 12 | + unset, |
| 13 | + UnsetType, |
| 14 | +) |
| 15 | + |
| 16 | + |
| 17 | +class EmailAttributes(ModelNormal): |
| 18 | + @cached_property |
| 19 | + def openapi_types(_): |
| 20 | + return { |
| 21 | + "active": (bool,), |
| 22 | + "address": (str,), |
| 23 | + "alias": (str,), |
| 24 | + "blocked": (bool,), |
| 25 | + "created_at": (datetime,), |
| 26 | + "formats": ([str],), |
| 27 | + "modified_at": (datetime,), |
| 28 | + } |
| 29 | + |
| 30 | + attribute_map = { |
| 31 | + "active": "active", |
| 32 | + "address": "address", |
| 33 | + "alias": "alias", |
| 34 | + "blocked": "blocked", |
| 35 | + "created_at": "created_at", |
| 36 | + "formats": "formats", |
| 37 | + "modified_at": "modified_at", |
| 38 | + } |
| 39 | + |
| 40 | + def __init__( |
| 41 | + self_, |
| 42 | + active: Union[bool, UnsetType] = unset, |
| 43 | + address: Union[str, UnsetType] = unset, |
| 44 | + alias: Union[str, UnsetType] = unset, |
| 45 | + blocked: Union[bool, UnsetType] = unset, |
| 46 | + created_at: Union[datetime, UnsetType] = unset, |
| 47 | + formats: Union[List[str], UnsetType] = unset, |
| 48 | + modified_at: Union[datetime, UnsetType] = unset, |
| 49 | + **kwargs, |
| 50 | + ): |
| 51 | + """ |
| 52 | + Attributes for an on-call email. |
| 53 | +
|
| 54 | + :param active: Whether the email is currently active. |
| 55 | + :type active: bool, optional |
| 56 | +
|
| 57 | + :param address: Email address. |
| 58 | + :type address: str, optional |
| 59 | +
|
| 60 | + :param alias: Optional display alias for the email. |
| 61 | + :type alias: str, optional |
| 62 | +
|
| 63 | + :param blocked: Whether the email is blocked. |
| 64 | + :type blocked: bool, optional |
| 65 | +
|
| 66 | + :param created_at: Creation time of the email resource. |
| 67 | + :type created_at: datetime, optional |
| 68 | +
|
| 69 | + :param formats: Preferred content formats for notifications. |
| 70 | + :type formats: [str], optional |
| 71 | +
|
| 72 | + :param modified_at: Last modification time of the email resource. |
| 73 | + :type modified_at: datetime, optional |
| 74 | + """ |
| 75 | + if active is not unset: |
| 76 | + kwargs["active"] = active |
| 77 | + if address is not unset: |
| 78 | + kwargs["address"] = address |
| 79 | + if alias is not unset: |
| 80 | + kwargs["alias"] = alias |
| 81 | + if blocked is not unset: |
| 82 | + kwargs["blocked"] = blocked |
| 83 | + if created_at is not unset: |
| 84 | + kwargs["created_at"] = created_at |
| 85 | + if formats is not unset: |
| 86 | + kwargs["formats"] = formats |
| 87 | + if modified_at is not unset: |
| 88 | + kwargs["modified_at"] = modified_at |
| 89 | + super().__init__(kwargs) |
0 commit comments