File tree Expand file tree Collapse file tree 2 files changed +5
-10
lines changed
src/KubernetesClient/Models Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -39,18 +39,13 @@ public enum PatchType
3939
4040 public V1Patch ( object body , PatchType type )
4141 {
42- Content = body ;
43- Type = type ;
44-
45- if ( Content == null )
42+ if ( type == PatchType . Unknown )
4643 {
47- throw new ArgumentNullException ( nameof ( Content ) , "object must be set") ;
44+ throw new ArgumentException ( "patch type must be set", nameof ( type ) ) ;
4845 }
4946
50- if ( Type == PatchType . Unknown )
51- {
52- throw new ArgumentException ( "patch type must be set" , nameof ( Type ) ) ;
53- }
47+ Content = body ?? throw new ArgumentNullException ( nameof ( body ) , "object must be set" ) ;
48+ Type = type ;
5449 }
5550 }
5651}
Original file line number Diff line number Diff line change 22
33namespace k8s . Models
44{
5- public partial record class V1Status
5+ public partial record V1Status
66 {
77 /// <summary>Converts a <see cref="V1Status"/> object into a short description of the status.</summary>
88 /// <returns>string description of the status</returns>
You can’t perform that action at this time.
0 commit comments