77
88
99class AssetAttachment (DbObject ):
10- """ Asset attachment provides extra context about an asset while labeling.
10+ """Asset attachment provides extra context about an asset while labeling.
1111
1212 Attributes:
13- attachment_type (str): IMAGE, VIDEO, IMAGE_OVERLAY, HTML, RAW_TEXT, or TEXT_URL . TEXT attachment type is deprecated.
13+ attachment_type (str): IMAGE, VIDEO, IMAGE_OVERLAY, HTML, RAW_TEXT, TEXT_URL, or PDF_URL . TEXT attachment type is deprecated.
1414 attachment_value (str): URL to an external file or a string of text
1515 """
1616
@@ -32,6 +32,7 @@ def __missing__(cls, value: object):
3232 HTML = "HTML"
3333 RAW_TEXT = "RAW_TEXT"
3434 TEXT_URL = "TEXT_URL"
35+ PDF_URL = "PDF_URL"
3536
3637 for topic in AttachmentType :
3738 vars ()[topic .name ] = topic .value
@@ -41,12 +42,12 @@ def __missing__(cls, value: object):
4142
4243 @classmethod
4344 def validate_attachment_json (cls , attachment_json : Dict [str , str ]) -> None :
44- for required_key in [' type' , ' value' ]:
45+ for required_key in [" type" , " value" ]:
4546 if required_key not in attachment_json :
4647 raise ValueError (
4748 f"Must provide a `{ required_key } ` key for each attachment. Found { attachment_json } ."
4849 )
49- cls .validate_attachment_type (attachment_json [' type' ])
50+ cls .validate_attachment_type (attachment_json [" type" ])
5051
5152 @classmethod
5253 def validate_attachment_type (cls , attachment_type : str ) -> None :
0 commit comments