コード例 #1
0
 public void MergeFrom(Finding other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Name.Length != 0)
     {
         Name = other.Name;
     }
     if (other.FindingType.Length != 0)
     {
         FindingType = other.FindingType;
     }
     if (other.Severity != global::Google.Cloud.WebSecurityScanner.V1.Finding.Types.Severity.Unspecified)
     {
         Severity = other.Severity;
     }
     if (other.HttpMethod.Length != 0)
     {
         HttpMethod = other.HttpMethod;
     }
     if (other.FuzzedUrl.Length != 0)
     {
         FuzzedUrl = other.FuzzedUrl;
     }
     if (other.Body.Length != 0)
     {
         Body = other.Body;
     }
     if (other.Description.Length != 0)
     {
         Description = other.Description;
     }
     if (other.ReproductionUrl.Length != 0)
     {
         ReproductionUrl = other.ReproductionUrl;
     }
     if (other.FrameUrl.Length != 0)
     {
         FrameUrl = other.FrameUrl;
     }
     if (other.FinalUrl.Length != 0)
     {
         FinalUrl = other.FinalUrl;
     }
     if (other.TrackingId.Length != 0)
     {
         TrackingId = other.TrackingId;
     }
     if (other.form_ != null)
     {
         if (form_ == null)
         {
             Form = new global::Google.Cloud.WebSecurityScanner.V1.Form();
         }
         Form.MergeFrom(other.Form);
     }
     if (other.outdatedLibrary_ != null)
     {
         if (outdatedLibrary_ == null)
         {
             OutdatedLibrary = new global::Google.Cloud.WebSecurityScanner.V1.OutdatedLibrary();
         }
         OutdatedLibrary.MergeFrom(other.OutdatedLibrary);
     }
     if (other.violatingResource_ != null)
     {
         if (violatingResource_ == null)
         {
             ViolatingResource = new global::Google.Cloud.WebSecurityScanner.V1.ViolatingResource();
         }
         ViolatingResource.MergeFrom(other.ViolatingResource);
     }
     if (other.vulnerableHeaders_ != null)
     {
         if (vulnerableHeaders_ == null)
         {
             VulnerableHeaders = new global::Google.Cloud.WebSecurityScanner.V1.VulnerableHeaders();
         }
         VulnerableHeaders.MergeFrom(other.VulnerableHeaders);
     }
     if (other.vulnerableParameters_ != null)
     {
         if (vulnerableParameters_ == null)
         {
             VulnerableParameters = new global::Google.Cloud.WebSecurityScanner.V1.VulnerableParameters();
         }
         VulnerableParameters.MergeFrom(other.VulnerableParameters);
     }
     if (other.xss_ != null)
     {
         if (xss_ == null)
         {
             Xss = new global::Google.Cloud.WebSecurityScanner.V1.Xss();
         }
         Xss.MergeFrom(other.Xss);
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
コード例 #2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (FindingType.Length != 0)
            {
                hash ^= FindingType.GetHashCode();
            }
            if (Severity != global::Google.Cloud.WebSecurityScanner.V1.Finding.Types.Severity.Unspecified)
            {
                hash ^= Severity.GetHashCode();
            }
            if (HttpMethod.Length != 0)
            {
                hash ^= HttpMethod.GetHashCode();
            }
            if (FuzzedUrl.Length != 0)
            {
                hash ^= FuzzedUrl.GetHashCode();
            }
            if (Body.Length != 0)
            {
                hash ^= Body.GetHashCode();
            }
            if (Description.Length != 0)
            {
                hash ^= Description.GetHashCode();
            }
            if (ReproductionUrl.Length != 0)
            {
                hash ^= ReproductionUrl.GetHashCode();
            }
            if (FrameUrl.Length != 0)
            {
                hash ^= FrameUrl.GetHashCode();
            }
            if (FinalUrl.Length != 0)
            {
                hash ^= FinalUrl.GetHashCode();
            }
            if (TrackingId.Length != 0)
            {
                hash ^= TrackingId.GetHashCode();
            }
            if (form_ != null)
            {
                hash ^= Form.GetHashCode();
            }
            if (outdatedLibrary_ != null)
            {
                hash ^= OutdatedLibrary.GetHashCode();
            }
            if (violatingResource_ != null)
            {
                hash ^= ViolatingResource.GetHashCode();
            }
            if (vulnerableHeaders_ != null)
            {
                hash ^= VulnerableHeaders.GetHashCode();
            }
            if (vulnerableParameters_ != null)
            {
                hash ^= VulnerableParameters.GetHashCode();
            }
            if (xss_ != null)
            {
                hash ^= Xss.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }