Ejemplo n.º 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);
 }
Ejemplo n.º 2
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
                    break;

                case 10: {
                    Name = input.ReadString();
                    break;
                }

                case 18: {
                    if (billingSettings_ == null)
                    {
                        BillingSettings = new global::Google.Cloud.SecurityCenter.Settings.V1Beta1.BillingSettings();
                    }
                    input.ReadMessage(BillingSettings);
                    break;
                }

                case 24: {
                    State = (global::Google.Cloud.SecurityCenter.Settings.V1Beta1.Settings.Types.OnboardingState)input.ReadEnum();
                    break;
                }

                case 42: {
                    OrgServiceAccount = input.ReadString();
                    break;
                }

                case 50: {
                    if (sinkSettings_ == null)
                    {
                        SinkSettings = new global::Google.Cloud.SecurityCenter.Settings.V1Beta1.SinkSettings();
                    }
                    input.ReadMessage(SinkSettings);
                    break;
                }

                case 58: {
                    componentSettings_.AddEntriesFrom(input, _map_componentSettings_codec);
                    break;
                }

                case 66: {
                    detectorGroupSettings_.AddEntriesFrom(input, _map_detectorGroupSettings_codec);
                    break;
                }

                case 74: {
                    Etag = input.ReadString();
                    break;
                }

                case 82: {
                    if (updateTime_ == null)
                    {
                        UpdateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
                    }
                    input.ReadMessage(UpdateTime);
                    break;
                }
                }
            }
        }