We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a615cb0 commit 7fdebf7Copy full SHA for 7fdebf7
dlp/quickstart.py
@@ -72,7 +72,12 @@ def quickstart():
72
except AttributeError:
73
pass
74
print('Info type: {}'.format(finding.info_type.name))
75
- print('Likelihood: {}'.format(finding.likelihood))
+ # Convert likelihood value to string respresentation.
76
+ likelihood = (google.cloud.dlp.types.Finding.DESCRIPTOR
77
+ .fields_by_name['likelihood']
78
+ .enum_type.values_by_number[finding.likelihood]
79
+ .name)
80
+ print('Likelihood: {}'.format(likelihood))
81
else:
82
print('No findings.')
83
# [END quickstart]
0 commit comments