@@ -27,22 +27,35 @@ class Asset:
27
27
properties : Optional, additional properties for this asset. This is used
28
28
by extensions as a way to serialize and deserialize properties on asset
29
29
object JSON.
30
-
31
- Attributes:
32
- href : Link to the asset object. Relative and absolute links are both
33
- allowed.
34
- title : Optional displayed title for clients and users.
35
- description : A description of the Asset providing additional details,
36
- such as how it was processed or created. CommonMark 0.29 syntax MAY be
37
- used for rich text representation.
38
- media_type : Optional description of the media type. Registered Media Types
39
- are preferred. See :class:`~pystac.MediaType` for common media types.
40
- properties : Optional, additional properties for this asset. This is used
41
- by extensions as a way to serialize and deserialize properties on asset
42
- object JSON.
43
- owner: The Item or Collection this asset belongs to, or None if it has no owner.
44
30
"""
45
31
32
+ href : str
33
+ """Link to the asset object. Relative and absolute links are both allowed."""
34
+
35
+ title : Optional [str ]
36
+ """Optional displayed title for clients and users."""
37
+
38
+ description : Optional [str ]
39
+ """A description of the Asset providing additional details, such as how it was
40
+ processed or created. CommonMark 0.29 syntax MAY be used for rich text
41
+ representation."""
42
+
43
+ media_type : Optional [str ]
44
+ """Optional description of the media type. Registered Media Types are preferred.
45
+ See :class:`~pystac.MediaType` for common media types."""
46
+
47
+ roles : Optional [List [str ]]
48
+ """Optional, Semantic roles (i.e. thumbnail, overview, data, metadata) of the
49
+ asset."""
50
+
51
+ owner : Optional [Union [pystac .Item , pystac .Collection ]]
52
+ """The :class:`~pystac.Item` or :class:`~pystac.Collection` that this asset belongs
53
+ to, or ``None`` if it has no owner."""
54
+
55
+ properties : Optional [Dict [str , Any ]]
56
+ """Optional, additional properties for this asset. This is used by extensions as a
57
+ way to serialize and deserialize properties on asset object JSON."""
58
+
46
59
def __init__ (
47
60
self ,
48
61
href : str ,
@@ -64,7 +77,7 @@ def __init__(
64
77
self .properties = {}
65
78
66
79
# The Item which owns this Asset.
67
- self .owner : Optional [ Union [ pystac . Item , pystac . Collection ]] = None
80
+ self .owner = None
68
81
69
82
def set_owner (self , obj : Union ["Collection_Type" , "Item_Type" ]) -> None :
70
83
"""Sets the owning item of this Asset.
0 commit comments