public void MergeFrom(Service other) { if (other == null) { return; } if (other.configVersion_ != null) { if (configVersion_ == null || other.ConfigVersion != 0) { ConfigVersion = other.ConfigVersion; } } if (other.Name.Length != 0) { Name = other.Name; } if (other.Id.Length != 0) { Id = other.Id; } if (other.Title.Length != 0) { Title = other.Title; } if (other.ProducerProjectId.Length != 0) { ProducerProjectId = other.ProducerProjectId; } apis_.Add(other.apis_); types_.Add(other.types_); enums_.Add(other.enums_); if (other.documentation_ != null) { if (documentation_ == null) { documentation_ = new global::Google.Api.Documentation(); } Documentation.MergeFrom(other.Documentation); } if (other.backend_ != null) { if (backend_ == null) { backend_ = new global::Google.Api.Backend(); } Backend.MergeFrom(other.Backend); } if (other.http_ != null) { if (http_ == null) { http_ = new global::Google.Api.Http(); } Http.MergeFrom(other.Http); } if (other.quota_ != null) { if (quota_ == null) { quota_ = new global::Google.Api.Quota(); } Quota.MergeFrom(other.Quota); } if (other.authentication_ != null) { if (authentication_ == null) { authentication_ = new global::Google.Api.Authentication(); } Authentication.MergeFrom(other.Authentication); } if (other.context_ != null) { if (context_ == null) { context_ = new global::Google.Api.Context(); } Context.MergeFrom(other.Context); } if (other.usage_ != null) { if (usage_ == null) { usage_ = new global::Google.Api.Usage(); } Usage.MergeFrom(other.Usage); } endpoints_.Add(other.endpoints_); if (other.control_ != null) { if (control_ == null) { control_ = new global::Google.Api.Control(); } Control.MergeFrom(other.Control); } logs_.Add(other.logs_); metrics_.Add(other.metrics_); monitoredResources_.Add(other.monitoredResources_); if (other.logging_ != null) { if (logging_ == null) { logging_ = new global::Google.Api.Logging(); } Logging.MergeFrom(other.Logging); } if (other.monitoring_ != null) { if (monitoring_ == null) { monitoring_ = new global::Google.Api.Monitoring(); } Monitoring.MergeFrom(other.Monitoring); } if (other.systemParameters_ != null) { if (systemParameters_ == null) { systemParameters_ = new global::Google.Api.SystemParameters(); } SystemParameters.MergeFrom(other.SystemParameters); } if (other.sourceInfo_ != null) { if (sourceInfo_ == null) { sourceInfo_ = new global::Google.Api.SourceInfo(); } SourceInfo.MergeFrom(other.SourceInfo); } if (other.experimental_ != null) { if (experimental_ == null) { experimental_ = new global::Google.Api.Experimental(); } Experimental.MergeFrom(other.Experimental); } }
public override int GetHashCode() { int hash = 1; if (configVersion_ != null) { hash ^= ConfigVersion.GetHashCode(); } if (Name.Length != 0) { hash ^= Name.GetHashCode(); } if (Id.Length != 0) { hash ^= Id.GetHashCode(); } if (Title.Length != 0) { hash ^= Title.GetHashCode(); } if (ProducerProjectId.Length != 0) { hash ^= ProducerProjectId.GetHashCode(); } hash ^= apis_.GetHashCode(); hash ^= types_.GetHashCode(); hash ^= enums_.GetHashCode(); if (documentation_ != null) { hash ^= Documentation.GetHashCode(); } if (backend_ != null) { hash ^= Backend.GetHashCode(); } if (http_ != null) { hash ^= Http.GetHashCode(); } if (quota_ != null) { hash ^= Quota.GetHashCode(); } if (authentication_ != null) { hash ^= Authentication.GetHashCode(); } if (context_ != null) { hash ^= Context.GetHashCode(); } if (usage_ != null) { hash ^= Usage.GetHashCode(); } hash ^= endpoints_.GetHashCode(); if (control_ != null) { hash ^= Control.GetHashCode(); } hash ^= logs_.GetHashCode(); hash ^= metrics_.GetHashCode(); hash ^= monitoredResources_.GetHashCode(); if (logging_ != null) { hash ^= Logging.GetHashCode(); } if (monitoring_ != null) { hash ^= Monitoring.GetHashCode(); } if (systemParameters_ != null) { hash ^= SystemParameters.GetHashCode(); } if (sourceInfo_ != null) { hash ^= SourceInfo.GetHashCode(); } if (experimental_ != null) { hash ^= Experimental.GetHashCode(); } return(hash); }