-
Notifications
You must be signed in to change notification settings - Fork 53
Expand file tree
/
Copy pathgeomap_widget_definition_view.py
More file actions
50 lines (40 loc) · 1.51 KB
/
geomap_widget_definition_view.py
File metadata and controls
50 lines (40 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2019-Present Datadog, Inc.
from __future__ import annotations
from typing import List, Union
from datadog_api_client.model_utils import (
ModelNormal,
cached_property,
unset,
UnsetType,
)
class GeomapWidgetDefinitionView(ModelNormal):
validations = {
"custom_extent": {
"max_items": 4,
"min_items": 4,
},
}
@cached_property
def openapi_types(_):
return {
"custom_extent": ([float],),
"focus": (str,),
}
attribute_map = {
"custom_extent": "custom_extent",
"focus": "focus",
}
def __init__(self_, focus: str, custom_extent: Union[List[float], UnsetType] = unset, **kwargs):
"""
The view of the world that the map should render.
:param custom_extent: A custom extent of the map defined by an array of four numbers in the order ``[minLongitude, minLatitude, maxLongitude, maxLatitude]``.
:type custom_extent: [float], optional
:param focus: The ISO code of a country, sub-division, or region to focus the map on. Or ``WORLD``. Mutually exclusive with ``custom_extent``.
:type focus: str
"""
if custom_extent is not unset:
kwargs["custom_extent"] = custom_extent
super().__init__(kwargs)
self_.focus = focus