Add string method to TaskProtection type
Add String method to TaskProtection type
@@ -60,3 +60,11 @@ func (taskProtection *taskProtection) GetProtectionEnabled() bool {
func (taskProtection *taskProtection) GetExpiresInMinutes() *int {
return taskProtection.expiresInMinutes
}
+
+func (taskProtection *taskProtection) String() string {
+ jsonBytes, err := taskProtection.MarshalJSON()
+ if err != nil {
+ return fmt.Sprintf("failed to get string representation of taskProtection type: %v", err)
+ }
+ return string(jsonBytes)
+}
