Exemple #1
0
 public void MergeFrom(Settings other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Name.Length != 0)
     {
         Name = other.Name;
     }
     if (other.billingSettings_ != null)
     {
         if (billingSettings_ == null)
         {
             BillingSettings = new global::Google.Cloud.SecurityCenter.Settings.V1Beta1.BillingSettings();
         }
         BillingSettings.MergeFrom(other.BillingSettings);
     }
     if (other.State != global::Google.Cloud.SecurityCenter.Settings.V1Beta1.Settings.Types.OnboardingState.Unspecified)
     {
         State = other.State;
     }
     if (other.OrgServiceAccount.Length != 0)
     {
         OrgServiceAccount = other.OrgServiceAccount;
     }
     if (other.sinkSettings_ != null)
     {
         if (sinkSettings_ == null)
         {
             SinkSettings = new global::Google.Cloud.SecurityCenter.Settings.V1Beta1.SinkSettings();
         }
         SinkSettings.MergeFrom(other.SinkSettings);
     }
     componentSettings_.Add(other.componentSettings_);
     detectorGroupSettings_.Add(other.detectorGroupSettings_);
     if (other.Etag.Length != 0)
     {
         Etag = other.Etag;
     }
     if (other.updateTime_ != null)
     {
         if (updateTime_ == null)
         {
             UpdateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         UpdateTime.MergeFrom(other.UpdateTime);
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
Exemple #2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (billingSettings_ != null)
            {
                hash ^= BillingSettings.GetHashCode();
            }
            if (State != global::Google.Cloud.SecurityCenter.Settings.V1Beta1.Settings.Types.OnboardingState.Unspecified)
            {
                hash ^= State.GetHashCode();
            }
            if (OrgServiceAccount.Length != 0)
            {
                hash ^= OrgServiceAccount.GetHashCode();
            }
            if (sinkSettings_ != null)
            {
                hash ^= SinkSettings.GetHashCode();
            }
            hash ^= ComponentSettings.GetHashCode();
            hash ^= DetectorGroupSettings.GetHashCode();
            if (Etag.Length != 0)
            {
                hash ^= Etag.GetHashCode();
            }
            if (updateTime_ != null)
            {
                hash ^= UpdateTime.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }