@@ -7,34 +7,56 @@ namespace Azure.Sdk.Tools.Cli.Models;
77
88public class Response
99{
10+ /// <summary>
11+ /// ResponseError represents a single error message associated with the response.
12+ /// </summary>
1013 [ JsonPropertyName ( "response_error" ) ]
1114 [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingNull ) ]
1215 public string ? ResponseError { get ; set ; }
1316
17+ /// <summary>
18+ /// ResponseErrors represents a list of error messages associated with the response.
19+ /// </summary>
1420 [ JsonPropertyName ( "response_errors" ) ]
1521 [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingNull ) ]
1622 public List < string > ResponseErrors { get ; set ; }
1723
24+ /// <summary>
25+ /// NextSteps provides guidance or recommended actions regarding the response.
26+ /// </summary>
27+ [ JsonPropertyName ( "next_steps" ) ]
28+ [ JsonIgnore ( Condition = JsonIgnoreCondition . WhenWritingNull ) ]
29+ public List < string > ? NextSteps { get ; set ; }
30+
1831 protected string ToString ( StringBuilder value )
1932 {
2033 return ToString ( value . ToString ( ) ) ;
2134 }
2235
2336 protected string ToString ( string value )
2437 {
25- List < string > errors = [ ] ;
38+ List < string > messages = [ ] ;
2639 if ( ! string . IsNullOrEmpty ( ResponseError ) )
2740 {
28- errors . Add ( "[ERROR] " + ResponseError ) ;
41+ messages . Add ( "[ERROR] " + ResponseError ) ;
2942 }
3043 foreach ( var error in ResponseErrors ?? [ ] )
3144 {
32- errors . Add ( "[ERROR] " + error ) ;
45+ messages . Add ( "[ERROR] " + error ) ;
46+ }
47+
48+ if ( NextSteps ? . Count > 0 )
49+ {
50+ messages . Add ( "[NEXT STEPS]" ) ;
51+ foreach ( var step in NextSteps )
52+ {
53+ messages . Add ( step ) ;
54+ }
3355 }
3456
35- if ( errors . Count > 0 )
57+ if ( messages . Count > 0 )
3658 {
37- value = string . Join ( Environment . NewLine , errors ) ;
59+ value = string . Join ( Environment . NewLine , messages ) ;
3860 }
3961
4062 return value ;
0 commit comments