1from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
2import copy as _copy
3
4
5class Marker(_BaseTraceHierarchyType):
6
7    # class properties
8    # --------------------
9    _parent_path_str = "choroplethmapbox.selected"
10    _path_str = "choroplethmapbox.selected.marker"
11    _valid_props = {"opacity"}
12
13    # opacity
14    # -------
15    @property
16    def opacity(self):
17        """
18        Sets the marker opacity of selected points.
19
20        The 'opacity' property is a number and may be specified as:
21          - An int or float in the interval [0, 1]
22
23        Returns
24        -------
25        int|float
26        """
27        return self["opacity"]
28
29    @opacity.setter
30    def opacity(self, val):
31        self["opacity"] = val
32
33    # Self properties description
34    # ---------------------------
35    @property
36    def _prop_descriptions(self):
37        return """\
38        opacity
39            Sets the marker opacity of selected points.
40        """
41
42    def __init__(self, arg=None, opacity=None, **kwargs):
43        """
44        Construct a new Marker object
45
46        Parameters
47        ----------
48        arg
49            dict of properties compatible with this constructor or
50            an instance of :class:`plotly.graph_objs.choroplethmapb
51            ox.selected.Marker`
52        opacity
53            Sets the marker opacity of selected points.
54
55        Returns
56        -------
57        Marker
58        """
59        super(Marker, self).__init__("marker")
60
61        if "_parent" in kwargs:
62            self._parent = kwargs["_parent"]
63            return
64
65        # Validate arg
66        # ------------
67        if arg is None:
68            arg = {}
69        elif isinstance(arg, self.__class__):
70            arg = arg.to_plotly_json()
71        elif isinstance(arg, dict):
72            arg = _copy.copy(arg)
73        else:
74            raise ValueError(
75                """\
76The first argument to the plotly.graph_objs.choroplethmapbox.selected.Marker
77constructor must be a dict or
78an instance of :class:`plotly.graph_objs.choroplethmapbox.selected.Marker`"""
79            )
80
81        # Handle skip_invalid
82        # -------------------
83        self._skip_invalid = kwargs.pop("skip_invalid", False)
84        self._validate = kwargs.pop("_validate", True)
85
86        # Populate data dict with properties
87        # ----------------------------------
88        _v = arg.pop("opacity", None)
89        _v = opacity if opacity is not None else _v
90        if _v is not None:
91            self["opacity"] = _v
92
93        # Process unknown kwargs
94        # ----------------------
95        self._process_kwargs(**dict(arg, **kwargs))
96
97        # Reset skip_invalid
98        # ------------------
99        self._skip_invalid = False
100