|
| 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, TYPE_CHECKING |
| 7 | + |
| 8 | +from datadog_api_client.model_utils import ( |
| 9 | + ModelNormal, |
| 10 | + cached_property, |
| 11 | + unset, |
| 12 | + UnsetType, |
| 13 | +) |
| 14 | + |
| 15 | + |
| 16 | +if TYPE_CHECKING: |
| 17 | + from datadog_api_client.v1.model.synthetics_test_config import SyntheticsTestConfig |
| 18 | + from datadog_api_client.v1.model.creator import Creator |
| 19 | + from datadog_api_client.v1.model.synthetics_test_options import SyntheticsTestOptions |
| 20 | + from datadog_api_client.v1.model.synthetics_test_pause_status import SyntheticsTestPauseStatus |
| 21 | + from datadog_api_client.v1.model.synthetics_test_details_sub_type import SyntheticsTestDetailsSubType |
| 22 | + from datadog_api_client.v1.model.synthetics_test_details_type import SyntheticsTestDetailsType |
| 23 | + |
| 24 | + |
| 25 | +class SyntheticsTestDetailsWithoutSteps(ModelNormal): |
| 26 | + @cached_property |
| 27 | + def openapi_types(_): |
| 28 | + from datadog_api_client.v1.model.synthetics_test_config import SyntheticsTestConfig |
| 29 | + from datadog_api_client.v1.model.creator import Creator |
| 30 | + from datadog_api_client.v1.model.synthetics_test_options import SyntheticsTestOptions |
| 31 | + from datadog_api_client.v1.model.synthetics_test_pause_status import SyntheticsTestPauseStatus |
| 32 | + from datadog_api_client.v1.model.synthetics_test_details_sub_type import SyntheticsTestDetailsSubType |
| 33 | + from datadog_api_client.v1.model.synthetics_test_details_type import SyntheticsTestDetailsType |
| 34 | + |
| 35 | + return { |
| 36 | + "config": (SyntheticsTestConfig,), |
| 37 | + "creator": (Creator,), |
| 38 | + "locations": ([str],), |
| 39 | + "message": (str,), |
| 40 | + "monitor_id": (int,), |
| 41 | + "name": (str,), |
| 42 | + "options": (SyntheticsTestOptions,), |
| 43 | + "public_id": (str,), |
| 44 | + "status": (SyntheticsTestPauseStatus,), |
| 45 | + "subtype": (SyntheticsTestDetailsSubType,), |
| 46 | + "tags": ([str],), |
| 47 | + "type": (SyntheticsTestDetailsType,), |
| 48 | + } |
| 49 | + |
| 50 | + attribute_map = { |
| 51 | + "config": "config", |
| 52 | + "creator": "creator", |
| 53 | + "locations": "locations", |
| 54 | + "message": "message", |
| 55 | + "monitor_id": "monitor_id", |
| 56 | + "name": "name", |
| 57 | + "options": "options", |
| 58 | + "public_id": "public_id", |
| 59 | + "status": "status", |
| 60 | + "subtype": "subtype", |
| 61 | + "tags": "tags", |
| 62 | + "type": "type", |
| 63 | + } |
| 64 | + read_only_vars = { |
| 65 | + "creator", |
| 66 | + "monitor_id", |
| 67 | + "public_id", |
| 68 | + } |
| 69 | + |
| 70 | + def __init__( |
| 71 | + self_, |
| 72 | + config: Union[SyntheticsTestConfig, UnsetType] = unset, |
| 73 | + creator: Union[Creator, UnsetType] = unset, |
| 74 | + locations: Union[List[str], UnsetType] = unset, |
| 75 | + message: Union[str, UnsetType] = unset, |
| 76 | + monitor_id: Union[int, UnsetType] = unset, |
| 77 | + name: Union[str, UnsetType] = unset, |
| 78 | + options: Union[SyntheticsTestOptions, UnsetType] = unset, |
| 79 | + public_id: Union[str, UnsetType] = unset, |
| 80 | + status: Union[SyntheticsTestPauseStatus, UnsetType] = unset, |
| 81 | + subtype: Union[SyntheticsTestDetailsSubType, UnsetType] = unset, |
| 82 | + tags: Union[List[str], UnsetType] = unset, |
| 83 | + type: Union[SyntheticsTestDetailsType, UnsetType] = unset, |
| 84 | + **kwargs, |
| 85 | + ): |
| 86 | + """ |
| 87 | + Object containing details about your Synthetic test, without test steps. |
| 88 | +
|
| 89 | + :param config: Configuration object for a Synthetic test. |
| 90 | + :type config: SyntheticsTestConfig, optional |
| 91 | +
|
| 92 | + :param creator: Object describing the creator of the shared element. |
| 93 | + :type creator: Creator, optional |
| 94 | +
|
| 95 | + :param locations: Array of locations used to run the test. |
| 96 | + :type locations: [str], optional |
| 97 | +
|
| 98 | + :param message: Notification message associated with the test. |
| 99 | + :type message: str, optional |
| 100 | +
|
| 101 | + :param monitor_id: The associated monitor ID. |
| 102 | + :type monitor_id: int, optional |
| 103 | +
|
| 104 | + :param name: Name of the test. |
| 105 | + :type name: str, optional |
| 106 | +
|
| 107 | + :param options: Object describing the extra options for a Synthetic test. |
| 108 | + :type options: SyntheticsTestOptions, optional |
| 109 | +
|
| 110 | + :param public_id: The test public ID. |
| 111 | + :type public_id: str, optional |
| 112 | +
|
| 113 | + :param status: Define whether you want to start ( ``live`` ) or pause ( ``paused`` ) a |
| 114 | + Synthetic test. |
| 115 | + :type status: SyntheticsTestPauseStatus, optional |
| 116 | +
|
| 117 | + :param subtype: The subtype of the Synthetic API test, ``http`` , ``ssl`` , ``tcp`` , |
| 118 | + ``dns`` , ``icmp`` , ``udp`` , ``websocket`` , ``grpc`` or ``multi``. |
| 119 | + :type subtype: SyntheticsTestDetailsSubType, optional |
| 120 | +
|
| 121 | + :param tags: Array of tags attached to the test. |
| 122 | + :type tags: [str], optional |
| 123 | +
|
| 124 | + :param type: Type of the Synthetic test, either ``api`` or ``browser``. |
| 125 | + :type type: SyntheticsTestDetailsType, optional |
| 126 | + """ |
| 127 | + if config is not unset: |
| 128 | + kwargs["config"] = config |
| 129 | + if creator is not unset: |
| 130 | + kwargs["creator"] = creator |
| 131 | + if locations is not unset: |
| 132 | + kwargs["locations"] = locations |
| 133 | + if message is not unset: |
| 134 | + kwargs["message"] = message |
| 135 | + if monitor_id is not unset: |
| 136 | + kwargs["monitor_id"] = monitor_id |
| 137 | + if name is not unset: |
| 138 | + kwargs["name"] = name |
| 139 | + if options is not unset: |
| 140 | + kwargs["options"] = options |
| 141 | + if public_id is not unset: |
| 142 | + kwargs["public_id"] = public_id |
| 143 | + if status is not unset: |
| 144 | + kwargs["status"] = status |
| 145 | + if subtype is not unset: |
| 146 | + kwargs["subtype"] = subtype |
| 147 | + if tags is not unset: |
| 148 | + kwargs["tags"] = tags |
| 149 | + if type is not unset: |
| 150 | + kwargs["type"] = type |
| 151 | + super().__init__(kwargs) |
0 commit comments