All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.codegurusecurity.model.Vulnerability Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon CodeGuru Security module holds the client classes that are used for communicating with Amazon CodeGuru Security Service

There is a newer version: 1.12.778
Show newest version
/*
 * Copyright 2019-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */
package com.amazonaws.services.codegurusecurity.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Information about a security vulnerability that Amazon CodeGuru Security detected. *

* * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Vulnerability implements Serializable, Cloneable, StructuredPojo { /** *

* An object that describes the location of the detected security vulnerability in your code. *

*/ private FilePath filePath; /** *

* The identifier for the vulnerability. *

*/ private String id; /** *

* The number of times the vulnerability appears in your code. *

*/ @Deprecated private Integer itemCount; /** *

* One or more URL addresses that contain details about a vulnerability. *

*/ private java.util.List referenceUrls; /** *

* One or more vulnerabilities that are related to the vulnerability being described. *

*/ private java.util.List relatedVulnerabilities; /** *

* An object that describes the location of the detected security vulnerability in your code. *

* * @param filePath * An object that describes the location of the detected security vulnerability in your code. */ public void setFilePath(FilePath filePath) { this.filePath = filePath; } /** *

* An object that describes the location of the detected security vulnerability in your code. *

* * @return An object that describes the location of the detected security vulnerability in your code. */ public FilePath getFilePath() { return this.filePath; } /** *

* An object that describes the location of the detected security vulnerability in your code. *

* * @param filePath * An object that describes the location of the detected security vulnerability in your code. * @return Returns a reference to this object so that method calls can be chained together. */ public Vulnerability withFilePath(FilePath filePath) { setFilePath(filePath); return this; } /** *

* The identifier for the vulnerability. *

* * @param id * The identifier for the vulnerability. */ public void setId(String id) { this.id = id; } /** *

* The identifier for the vulnerability. *

* * @return The identifier for the vulnerability. */ public String getId() { return this.id; } /** *

* The identifier for the vulnerability. *

* * @param id * The identifier for the vulnerability. * @return Returns a reference to this object so that method calls can be chained together. */ public Vulnerability withId(String id) { setId(id); return this; } /** *

* The number of times the vulnerability appears in your code. *

* * @param itemCount * The number of times the vulnerability appears in your code. */ @Deprecated public void setItemCount(Integer itemCount) { this.itemCount = itemCount; } /** *

* The number of times the vulnerability appears in your code. *

* * @return The number of times the vulnerability appears in your code. */ @Deprecated public Integer getItemCount() { return this.itemCount; } /** *

* The number of times the vulnerability appears in your code. *

* * @param itemCount * The number of times the vulnerability appears in your code. * @return Returns a reference to this object so that method calls can be chained together. */ @Deprecated public Vulnerability withItemCount(Integer itemCount) { setItemCount(itemCount); return this; } /** *

* One or more URL addresses that contain details about a vulnerability. *

* * @return One or more URL addresses that contain details about a vulnerability. */ public java.util.List getReferenceUrls() { return referenceUrls; } /** *

* One or more URL addresses that contain details about a vulnerability. *

* * @param referenceUrls * One or more URL addresses that contain details about a vulnerability. */ public void setReferenceUrls(java.util.Collection referenceUrls) { if (referenceUrls == null) { this.referenceUrls = null; return; } this.referenceUrls = new java.util.ArrayList(referenceUrls); } /** *

* One or more URL addresses that contain details about a vulnerability. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setReferenceUrls(java.util.Collection)} or {@link #withReferenceUrls(java.util.Collection)} if you want * to override the existing values. *

* * @param referenceUrls * One or more URL addresses that contain details about a vulnerability. * @return Returns a reference to this object so that method calls can be chained together. */ public Vulnerability withReferenceUrls(String... referenceUrls) { if (this.referenceUrls == null) { setReferenceUrls(new java.util.ArrayList(referenceUrls.length)); } for (String ele : referenceUrls) { this.referenceUrls.add(ele); } return this; } /** *

* One or more URL addresses that contain details about a vulnerability. *

* * @param referenceUrls * One or more URL addresses that contain details about a vulnerability. * @return Returns a reference to this object so that method calls can be chained together. */ public Vulnerability withReferenceUrls(java.util.Collection referenceUrls) { setReferenceUrls(referenceUrls); return this; } /** *

* One or more vulnerabilities that are related to the vulnerability being described. *

* * @return One or more vulnerabilities that are related to the vulnerability being described. */ public java.util.List getRelatedVulnerabilities() { return relatedVulnerabilities; } /** *

* One or more vulnerabilities that are related to the vulnerability being described. *

* * @param relatedVulnerabilities * One or more vulnerabilities that are related to the vulnerability being described. */ public void setRelatedVulnerabilities(java.util.Collection relatedVulnerabilities) { if (relatedVulnerabilities == null) { this.relatedVulnerabilities = null; return; } this.relatedVulnerabilities = new java.util.ArrayList(relatedVulnerabilities); } /** *

* One or more vulnerabilities that are related to the vulnerability being described. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setRelatedVulnerabilities(java.util.Collection)} or * {@link #withRelatedVulnerabilities(java.util.Collection)} if you want to override the existing values. *

* * @param relatedVulnerabilities * One or more vulnerabilities that are related to the vulnerability being described. * @return Returns a reference to this object so that method calls can be chained together. */ public Vulnerability withRelatedVulnerabilities(String... relatedVulnerabilities) { if (this.relatedVulnerabilities == null) { setRelatedVulnerabilities(new java.util.ArrayList(relatedVulnerabilities.length)); } for (String ele : relatedVulnerabilities) { this.relatedVulnerabilities.add(ele); } return this; } /** *

* One or more vulnerabilities that are related to the vulnerability being described. *

* * @param relatedVulnerabilities * One or more vulnerabilities that are related to the vulnerability being described. * @return Returns a reference to this object so that method calls can be chained together. */ public Vulnerability withRelatedVulnerabilities(java.util.Collection relatedVulnerabilities) { setRelatedVulnerabilities(relatedVulnerabilities); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getFilePath() != null) sb.append("FilePath: ").append(getFilePath()).append(","); if (getId() != null) sb.append("Id: ").append(getId()).append(","); if (getItemCount() != null) sb.append("ItemCount: ").append(getItemCount()).append(","); if (getReferenceUrls() != null) sb.append("ReferenceUrls: ").append(getReferenceUrls()).append(","); if (getRelatedVulnerabilities() != null) sb.append("RelatedVulnerabilities: ").append(getRelatedVulnerabilities()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Vulnerability == false) return false; Vulnerability other = (Vulnerability) obj; if (other.getFilePath() == null ^ this.getFilePath() == null) return false; if (other.getFilePath() != null && other.getFilePath().equals(this.getFilePath()) == false) return false; if (other.getId() == null ^ this.getId() == null) return false; if (other.getId() != null && other.getId().equals(this.getId()) == false) return false; if (other.getItemCount() == null ^ this.getItemCount() == null) return false; if (other.getItemCount() != null && other.getItemCount().equals(this.getItemCount()) == false) return false; if (other.getReferenceUrls() == null ^ this.getReferenceUrls() == null) return false; if (other.getReferenceUrls() != null && other.getReferenceUrls().equals(this.getReferenceUrls()) == false) return false; if (other.getRelatedVulnerabilities() == null ^ this.getRelatedVulnerabilities() == null) return false; if (other.getRelatedVulnerabilities() != null && other.getRelatedVulnerabilities().equals(this.getRelatedVulnerabilities()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getFilePath() == null) ? 0 : getFilePath().hashCode()); hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode()); hashCode = prime * hashCode + ((getItemCount() == null) ? 0 : getItemCount().hashCode()); hashCode = prime * hashCode + ((getReferenceUrls() == null) ? 0 : getReferenceUrls().hashCode()); hashCode = prime * hashCode + ((getRelatedVulnerabilities() == null) ? 0 : getRelatedVulnerabilities().hashCode()); return hashCode; } @Override public Vulnerability clone() { try { return (Vulnerability) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.codegurusecurity.model.transform.VulnerabilityMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy