6
6
from __future__ import annotations
7
7
8
8
from dataclasses import dataclass , field
9
- from typing import Optional
9
+ from typing import Literal , Optional , Union
10
10
11
11
from botbuilder .schema import Entity
12
12
from msrest .serialization import Model
@@ -47,11 +47,11 @@ class ClientCitation(Model):
47
47
48
48
_attribute_map = {
49
49
"type_" : {"key" : "@type" , "type" : "str" },
50
- "position" : {"key" : "position" , "type" : "str " },
50
+ "position" : {"key" : "position" , "type" : "int " },
51
51
"appearance" : {"key" : "appearance" , "type" : "Appearance" },
52
52
}
53
53
54
- position : str
54
+ position : int
55
55
appearance : Appearance
56
56
type_ : str = field (default = "Claim" , metadata = {"alias" : "@type" }, init = False , repr = False )
57
57
@@ -63,13 +63,13 @@ class Appearance(Model):
63
63
64
64
Attributes:
65
65
@type (str): Required; must be 'DigitalDocument'
66
- name (str): The name of the document
66
+ name (str): The name of the document. (max length 80)
67
67
text (str): Optional; the appearance text of the citation.
68
68
url (str): The url of the document
69
- abstract (str): Content of the citation. Must be clipped if longer than 480 characters
69
+ abstract (str): Extract of the referenced content. (max length 160)
70
70
encodingFormat (str): Encoding format of the `citation.appearance.text` field.
71
- image (str ): Used for icon; for now it is ignored
72
- keywords (list[str]): The optional keywords to the citation
71
+ image (AppearanceImage ): Information about the citation’s icon.
72
+ keywords (list[str]): Optional; set by developer. (max length 3) (max keyword length 28)
73
73
usageInfo (SensitivityUsageInfo): The optional sensitivity content information
74
74
"""
75
75
@@ -82,20 +82,44 @@ class Appearance(Model):
82
82
"text" : {"key" : "text" , "type" : "str" },
83
83
"url" : {"key" : "url" , "type" : "str" },
84
84
"encoding_format" : {"key" : "encodingFormat" , "type" : "str" },
85
- "image" : {"key" : "image" , "type" : "str " },
85
+ "image" : {"key" : "image" , "type" : "AppearanceImage " },
86
86
}
87
87
88
88
name : str
89
89
abstract : str
90
90
keywords : Optional [list [str ]] = field (default = None )
91
91
text : Optional [str ] = field (default = None )
92
92
url : Optional [str ] = field (default = None )
93
- image : Optional [str ] = field (default = None )
94
- encoding_format : Optional [str ] = field (default = None )
93
+ image : Optional [AppearanceImage ] = field (default = None )
94
+ encoding_format : Optional [
95
+ Union [
96
+ Literal ["text/html" ],
97
+ Literal ["application/vnd.microsoft.card.adaptive" ],
98
+ ]
99
+ ] = field (default = None )
95
100
usage_info : Optional [SensitivityUsageInfo ] = field (default = None )
96
101
type_ : str = field (default = "DigitalDocument" , metadata = {"alias" : "@type" })
97
102
98
103
104
+ @dataclass
105
+ class AppearanceImage (Model ):
106
+ """
107
+ Represents how the citation will be rendered
108
+
109
+ Attributes:
110
+ @type (str): Required; must be 'ImageObject'
111
+ name (str): The image/icon name
112
+ """
113
+
114
+ _attribute_map = {
115
+ "type_" : {"key" : "@type" , "type" : "str" },
116
+ "name" : {"key" : "name" , "type" : "str" },
117
+ }
118
+
119
+ name : ClientCitationIconName
120
+ type_ : str = field (default = "ImageObject" , metadata = {"alias" : "@type" })
121
+
122
+
99
123
@dataclass
100
124
class SensitivityUsageInfo (Model ):
101
125
"""
@@ -144,3 +168,26 @@ class Pattern(Model):
144
168
name : str
145
169
term_code : str
146
170
type_ : str = field (default = "DefinedTerm" , metadata = {"alias" : "@type" })
171
+
172
+
173
+ ClientCitationIconName = Union [
174
+ Literal ["Microsoft Workd" ],
175
+ Literal ["Microsoft Excel" ],
176
+ Literal ["Microsoft PowerPoint" ],
177
+ Literal ["Microsoft Visio" ],
178
+ Literal ["Microsoft Loop" ],
179
+ Literal ["Microsoft Whiteboard" ],
180
+ Literal ["Adobe Illustrator" ],
181
+ Literal ["Adobe Photoshop" ],
182
+ Literal ["Adobe InDesign" ],
183
+ Literal ["Adobe Flash" ],
184
+ Literal ["Sketch" ],
185
+ Literal ["Source Code" ],
186
+ Literal ["Image" ],
187
+ Literal ["GIF" ],
188
+ Literal ["Video" ],
189
+ Literal ["Sound" ],
190
+ Literal ["ZIP" ],
191
+ Literal ["Text" ],
192
+ Literal ["PDF" ],
193
+ ]
0 commit comments