@@ -92,6 +92,18 @@ def __eq__(self, other):
92
92
and self .destination_arn == other .destination_arn
93
93
)
94
94
95
+ def __str__ (self ):
96
+ """Define string representation of ``Edge``.
97
+
98
+ Format:
99
+ {
100
+ 'source_arn': 'string', 'destination_arn': 'string',
101
+ 'association_type': 'string'
102
+ }
103
+
104
+ """
105
+ return (str (self .__dict__ ))
106
+
95
107
96
108
class Vertex :
97
109
"""A vertex for a lineage graph."""
@@ -130,6 +142,19 @@ def __eq__(self, other):
130
142
and self .lineage_source == other .lineage_source
131
143
)
132
144
145
+ def __str__ (self ):
146
+ """Define string representation of ``Vertex``.
147
+
148
+ Format:
149
+ {
150
+ 'arn': 'string', 'lineage_entity': 'string',
151
+ 'lineage_source': 'string',
152
+ '_session': <sagemaker.session.Session object>
153
+ }
154
+
155
+ """
156
+ return (str (self .__dict__ ))
157
+
133
158
def to_lineage_object (self ):
134
159
"""Convert the ``Vertex`` object to its corresponding lineage object.
135
160
@@ -199,6 +224,32 @@ def __init__(
199
224
if vertices is not None :
200
225
self .vertices = vertices
201
226
227
+ def __str__ (self ):
228
+ """Define string representation of ``LineageQueryResult``.
229
+
230
+ Format:
231
+ {
232
+ 'edges':[
233
+ {
234
+ 'source_arn': 'string', 'destination_arn': 'string',
235
+ 'association_type': 'string'
236
+ },
237
+ ...
238
+ ]
239
+ 'vertices':[
240
+ {
241
+ 'arn': 'string', 'lineage_entity': 'string',
242
+ 'lineage_source': 'string',
243
+ '_session': <sagemaker.session.Session object>
244
+ },
245
+ ...
246
+ ]
247
+ }
248
+
249
+ """
250
+ result_dict = vars (self )
251
+ return (str ({k : [vars (val ) for val in v ] for k , v in result_dict .items ()}))
252
+
202
253
203
254
class LineageFilter (object ):
204
255
"""A filter used in a lineage query."""
0 commit comments