public override int GetHashCode() { int hash = 1; if (Name.Length != 0) { hash ^= Name.GetHashCode(); } if (DnsLookupFamily != global::Envoy.Api.V3Alpha.Cluster.Types.DnsLookupFamily.Auto) { hash ^= DnsLookupFamily.GetHashCode(); } if (dnsRefreshRate_ != null) { hash ^= DnsRefreshRate.GetHashCode(); } if (hostTtl_ != null) { hash ^= HostTtl.GetHashCode(); } if (maxHosts_ != null) { hash ^= MaxHosts.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public void MergeFrom(DnsCacheConfig other) { if (other == null) { return; } if (other.Name.Length != 0) { Name = other.Name; } if (other.DnsLookupFamily != global::Envoy.Api.V3Alpha.Cluster.Types.DnsLookupFamily.Auto) { DnsLookupFamily = other.DnsLookupFamily; } if (other.dnsRefreshRate_ != null) { if (dnsRefreshRate_ == null) { DnsRefreshRate = new global::Google.Protobuf.WellKnownTypes.Duration(); } DnsRefreshRate.MergeFrom(other.DnsRefreshRate); } if (other.hostTtl_ != null) { if (hostTtl_ == null) { HostTtl = new global::Google.Protobuf.WellKnownTypes.Duration(); } HostTtl.MergeFrom(other.HostTtl); } if (other.maxHosts_ != null) { if (maxHosts_ == null || other.MaxHosts != 0) { MaxHosts = other.MaxHosts; } } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }