-
Notifications
You must be signed in to change notification settings - Fork 297
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
namespace k8s.Models | ||
{ | ||
[JsonConverter(typeof(IntOrStringJsonConverter))] | ||
public partial class IntstrIntOrString | ||
public partial record IntstrIntOrString | ||
{ | ||
public static implicit operator IntstrIntOrString(int v) | ||
{ | ||
|
@@ -23,30 +23,30 @@ public static implicit operator IntstrIntOrString(string v) | |
return new IntstrIntOrString(v); | ||
} | ||
|
||
protected bool Equals(IntstrIntOrString other) | ||
{ | ||
return string.Equals(Value, other?.Value); | ||
} | ||
|
||
public override bool Equals(object obj) | ||
{ | ||
if (ReferenceEquals(null, obj)) | ||
{ | ||
return false; | ||
} | ||
|
||
if (ReferenceEquals(this, obj)) | ||
{ | ||
return true; | ||
} | ||
|
||
if (obj.GetType() != GetType()) | ||
{ | ||
return false; | ||
} | ||
|
||
return Equals((IntstrIntOrString)obj); | ||
} | ||
//protected bool Equals(IntstrIntOrString other) | ||
Check warning on line 26 in src/KubernetesClient/Models/IntstrIntOrString.cs GitHub Actions / MSBuild build
Check warning on line 26 in src/KubernetesClient/Models/IntstrIntOrString.cs GitHub Actions / e2e
Check warning on line 26 in src/KubernetesClient/Models/IntstrIntOrString.cs GitHub Actions / e2e
Check warning on line 26 in src/KubernetesClient/Models/IntstrIntOrString.cs GitHub Actions / Analyze (csharp)
|
||
//{ | ||
Check warning on line 27 in src/KubernetesClient/Models/IntstrIntOrString.cs GitHub Actions / MSBuild build
Check warning on line 27 in src/KubernetesClient/Models/IntstrIntOrString.cs GitHub Actions / e2e
Check warning on line 27 in src/KubernetesClient/Models/IntstrIntOrString.cs GitHub Actions / e2e
Check warning on line 27 in src/KubernetesClient/Models/IntstrIntOrString.cs GitHub Actions / Analyze (csharp)
|
||
// return string.Equals(Value, other?.Value); | ||
//} | ||
Check warning on line 29 in src/KubernetesClient/Models/IntstrIntOrString.cs GitHub Actions / MSBuild build
Check warning on line 29 in src/KubernetesClient/Models/IntstrIntOrString.cs GitHub Actions / e2e
Check warning on line 29 in src/KubernetesClient/Models/IntstrIntOrString.cs GitHub Actions / e2e
Check warning on line 29 in src/KubernetesClient/Models/IntstrIntOrString.cs GitHub Actions / Analyze (csharp)
|
||
|
||
//public override bool Equals(object obj) | ||
Check warning on line 31 in src/KubernetesClient/Models/IntstrIntOrString.cs GitHub Actions / MSBuild build
Check warning on line 31 in src/KubernetesClient/Models/IntstrIntOrString.cs GitHub Actions / e2e
Check warning on line 31 in src/KubernetesClient/Models/IntstrIntOrString.cs GitHub Actions / e2e
Check warning on line 31 in src/KubernetesClient/Models/IntstrIntOrString.cs GitHub Actions / Analyze (csharp)
|
||
//V1Status{ | ||
Check warning on line 32 in src/KubernetesClient/Models/IntstrIntOrString.cs GitHub Actions / MSBuild build
Check warning on line 32 in src/KubernetesClient/Models/IntstrIntOrString.cs GitHub Actions / e2e
Check warning on line 32 in src/KubernetesClient/Models/IntstrIntOrString.cs GitHub Actions / e2e
Check warning on line 32 in src/KubernetesClient/Models/IntstrIntOrString.cs GitHub Actions / Analyze (csharp)
|
||
// if (ReferenceEquals(null, obj)) | ||
// { | ||
// return false; | ||
// } | ||
|
||
// if (ReferenceEquals(this, obj)) | ||
Check warning on line 38 in src/KubernetesClient/Models/IntstrIntOrString.cs GitHub Actions / MSBuild build
Check warning on line 38 in src/KubernetesClient/Models/IntstrIntOrString.cs GitHub Actions / e2e
Check warning on line 38 in src/KubernetesClient/Models/IntstrIntOrString.cs GitHub Actions / e2e
Check warning on line 38 in src/KubernetesClient/Models/IntstrIntOrString.cs GitHub Actions / Analyze (csharp)
|
||
// { | ||
// return true; | ||
// } | ||
|
||
// if (obj.GetType() != GetType()) | ||
Check warning on line 43 in src/KubernetesClient/Models/IntstrIntOrString.cs GitHub Actions / MSBuild build
Check warning on line 43 in src/KubernetesClient/Models/IntstrIntOrString.cs GitHub Actions / e2e
Check warning on line 43 in src/KubernetesClient/Models/IntstrIntOrString.cs GitHub Actions / e2e
Check warning on line 43 in src/KubernetesClient/Models/IntstrIntOrString.cs GitHub Actions / Analyze (csharp)
|
||
// { | ||
// return false; | ||
// } | ||
|
||
// return Equals((IntstrIntOrString)obj); | ||
Check warning on line 48 in src/KubernetesClient/Models/IntstrIntOrString.cs GitHub Actions / MSBuild build
Check warning on line 48 in src/KubernetesClient/Models/IntstrIntOrString.cs GitHub Actions / e2e
Check warning on line 48 in src/KubernetesClient/Models/IntstrIntOrString.cs GitHub Actions / e2e
Check warning on line 48 in src/KubernetesClient/Models/IntstrIntOrString.cs GitHub Actions / Analyze (csharp)
|
||
//} | ||
Check warning on line 49 in src/KubernetesClient/Models/IntstrIntOrString.cs GitHub Actions / MSBuild build
Check warning on line 49 in src/KubernetesClient/Models/IntstrIntOrString.cs GitHub Actions / e2e
Check warning on line 49 in src/KubernetesClient/Models/IntstrIntOrString.cs GitHub Actions / e2e
Check warning on line 49 in src/KubernetesClient/Models/IntstrIntOrString.cs GitHub Actions / Analyze (csharp)
|
||
|
||
public override int GetHashCode() | ||
{ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,7 +54,7 @@ namespace k8s.Models | |
/// cause implementors to also use a fixed point implementation. | ||
/// </summary> | ||
[JsonConverter(typeof(ResourceQuantityJsonConverter))] | ||
public partial class ResourceQuantity | ||
public partial record ResourceQuantity | ||
{ | ||
public enum SuffixFormat | ||
{ | ||
|
@@ -97,30 +97,30 @@ public override string ToString() | |
return CanonicalizeString(); | ||
} | ||
|
||
protected bool Equals(ResourceQuantity other) | ||
{ | ||
return _unitlessValue.Equals(other?._unitlessValue); | ||
} | ||
|
||
public override bool Equals(object obj) | ||
{ | ||
if (ReferenceEquals(null, obj)) | ||
{ | ||
return false; | ||
} | ||
|
||
if (ReferenceEquals(this, obj)) | ||
{ | ||
return true; | ||
} | ||
|
||
if (obj.GetType() != GetType()) | ||
{ | ||
return false; | ||
} | ||
|
||
return Equals((ResourceQuantity)obj); | ||
} | ||
//protected bool Equals(ResourceQuantity other) | ||
Check warning on line 100 in src/KubernetesClient/Models/ResourceQuantity.cs GitHub Actions / MSBuild build
Check warning on line 100 in src/KubernetesClient/Models/ResourceQuantity.cs GitHub Actions / e2e
Check warning on line 100 in src/KubernetesClient/Models/ResourceQuantity.cs GitHub Actions / e2e
Check warning on line 100 in src/KubernetesClient/Models/ResourceQuantity.cs GitHub Actions / Analyze (csharp)
|
||
//{ | ||
// return _unitlessValue.Equals(other?._unitlessValue); | ||
//} | ||
|
||
//public override bool Equals(object obj) | ||
//{ | ||
// if (ReferenceEquals(null, obj)) | ||
// { | ||
// return false; | ||
// } | ||
|
||
// if (ReferenceEquals(this, obj)) | ||
// { | ||
// return true; | ||
// } | ||
|
||
// if (obj.GetType() != GetType()) | ||
// { | ||
// return false; | ||
// } | ||
|
||
// return Equals((ResourceQuantity)obj); | ||
//} | ||
|
||
public override int GetHashCode() | ||
{ | ||
|