diff --git a/src/IntstrIntOrString.cs b/src/IntstrIntOrString.cs index 42be179..6f634f1 100644 --- a/src/IntstrIntOrString.cs +++ b/src/IntstrIntOrString.cs @@ -52,5 +52,23 @@ namespace k8s.Models { 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() != this.GetType()) return false; + return Equals((IntstrIntOrString) obj); + } + + public override int GetHashCode() + { + return (Value != null ? Value.GetHashCode() : 0); + } } }