Exemplo n.º 1
0
 public void MergeFrom(Asset other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Name.Length != 0)
     {
         Name = other.Name;
     }
     if (other.securityCenterProperties_ != null)
     {
         if (securityCenterProperties_ == null)
         {
             SecurityCenterProperties = new global::Google.Cloud.SecurityCenter.V1P1Beta1.Asset.Types.SecurityCenterProperties();
         }
         SecurityCenterProperties.MergeFrom(other.SecurityCenterProperties);
     }
     resourceProperties_.Add(other.resourceProperties_);
     if (other.securityMarks_ != null)
     {
         if (securityMarks_ == null)
         {
             SecurityMarks = new global::Google.Cloud.SecurityCenter.V1P1Beta1.SecurityMarks();
         }
         SecurityMarks.MergeFrom(other.SecurityMarks);
     }
     if (other.createTime_ != null)
     {
         if (createTime_ == null)
         {
             CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         CreateTime.MergeFrom(other.CreateTime);
     }
     if (other.updateTime_ != null)
     {
         if (updateTime_ == null)
         {
             UpdateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         UpdateTime.MergeFrom(other.UpdateTime);
     }
     if (other.iamPolicy_ != null)
     {
         if (iamPolicy_ == null)
         {
             IamPolicy = new global::Google.Cloud.SecurityCenter.V1P1Beta1.Asset.Types.IamPolicy();
         }
         IamPolicy.MergeFrom(other.IamPolicy);
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
Exemplo 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 (securityCenterProperties_ == null)
                    {
                        SecurityCenterProperties = new global::Google.Cloud.SecurityCenter.V1P1Beta1.Asset.Types.SecurityCenterProperties();
                    }
                    input.ReadMessage(SecurityCenterProperties);
                    break;
                }

                case 58: {
                    resourceProperties_.AddEntriesFrom(input, _map_resourceProperties_codec);
                    break;
                }

                case 66: {
                    if (securityMarks_ == null)
                    {
                        SecurityMarks = new global::Google.Cloud.SecurityCenter.V1P1Beta1.SecurityMarks();
                    }
                    input.ReadMessage(SecurityMarks);
                    break;
                }

                case 74: {
                    if (createTime_ == null)
                    {
                        CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
                    }
                    input.ReadMessage(CreateTime);
                    break;
                }

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

                case 90: {
                    if (iamPolicy_ == null)
                    {
                        IamPolicy = new global::Google.Cloud.SecurityCenter.V1P1Beta1.Asset.Types.IamPolicy();
                    }
                    input.ReadMessage(IamPolicy);
                    break;
                }
                }
            }
        }