Пример #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.V1.Asset.Types.SecurityCenterProperties();
         }
         SecurityCenterProperties.MergeFrom(other.SecurityCenterProperties);
     }
     resourceProperties_.Add(other.resourceProperties_);
     if (other.securityMarks_ != null)
     {
         if (securityMarks_ == null)
         {
             SecurityMarks = new global::Google.Cloud.SecurityCenter.V1.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.V1.Asset.Types.IamPolicy();
         }
         IamPolicy.MergeFrom(other.IamPolicy);
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
Пример #2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (Parent.Length != 0)
            {
                hash ^= Parent.GetHashCode();
            }
            if (ResourceName.Length != 0)
            {
                hash ^= ResourceName.GetHashCode();
            }
            if (State != global::Google.Cloud.SecurityCenter.V1.Finding.Types.State.Unspecified)
            {
                hash ^= State.GetHashCode();
            }
            if (Category.Length != 0)
            {
                hash ^= Category.GetHashCode();
            }
            if (ExternalUri.Length != 0)
            {
                hash ^= ExternalUri.GetHashCode();
            }
            hash ^= SourceProperties.GetHashCode();
            if (securityMarks_ != null)
            {
                hash ^= SecurityMarks.GetHashCode();
            }
            if (eventTime_ != null)
            {
                hash ^= EventTime.GetHashCode();
            }
            if (createTime_ != null)
            {
                hash ^= CreateTime.GetHashCode();
            }
            if (Severity != global::Google.Cloud.SecurityCenter.V1.Finding.Types.Severity.Unspecified)
            {
                hash ^= Severity.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Пример #3
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (Parent.Length != 0)
            {
                hash ^= Parent.GetHashCode();
            }
            if (ResourceName.Length != 0)
            {
                hash ^= ResourceName.GetHashCode();
            }
            if (State != 0)
            {
                hash ^= State.GetHashCode();
            }
            if (Category.Length != 0)
            {
                hash ^= Category.GetHashCode();
            }
            if (ExternalUri.Length != 0)
            {
                hash ^= ExternalUri.GetHashCode();
            }
            hash ^= SourceProperties.GetHashCode();
            if (securityMarks_ != null)
            {
                hash ^= SecurityMarks.GetHashCode();
            }
            if (eventTime_ != null)
            {
                hash ^= EventTime.GetHashCode();
            }
            if (createTime_ != null)
            {
                hash ^= CreateTime.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Пример #4
0
 public void MergeFrom(Finding other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Name.Length != 0)
     {
         Name = other.Name;
     }
     if (other.Parent.Length != 0)
     {
         Parent = other.Parent;
     }
     if (other.ResourceName.Length != 0)
     {
         ResourceName = other.ResourceName;
     }
     if (other.State != global::Google.Cloud.SecurityCenter.V1.Finding.Types.State.Unspecified)
     {
         State = other.State;
     }
     if (other.Category.Length != 0)
     {
         Category = other.Category;
     }
     if (other.ExternalUri.Length != 0)
     {
         ExternalUri = other.ExternalUri;
     }
     sourceProperties_.Add(other.sourceProperties_);
     if (other.securityMarks_ != null)
     {
         if (securityMarks_ == null)
         {
             SecurityMarks = new global::Google.Cloud.SecurityCenter.V1.SecurityMarks();
         }
         SecurityMarks.MergeFrom(other.SecurityMarks);
     }
     if (other.eventTime_ != null)
     {
         if (eventTime_ == null)
         {
             EventTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         EventTime.MergeFrom(other.EventTime);
     }
     if (other.createTime_ != null)
     {
         if (createTime_ == null)
         {
             CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         CreateTime.MergeFrom(other.CreateTime);
     }
     if (other.Severity != global::Google.Cloud.SecurityCenter.V1.Finding.Types.Severity.Unspecified)
     {
         Severity = other.Severity;
     }
     if (other.CanonicalName.Length != 0)
     {
         CanonicalName = other.CanonicalName;
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }