/* * Copyright 2018-2023 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. *
*/ private Integer itemCount; /** ** One or more URL addresses that contain details about a vulnerability. *
*/ private java.util.List* One or more vulnerabilities that are related to the vulnerability being described. *
*/ private java.util.List* 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. */ 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. */ 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. */ 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* 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* 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* 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* 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* 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* 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* 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