com.amazonaws.services.ecr.model.VulnerablePackage Maven / Gradle / Ivy
Show all versions of aws-java-sdk-ecr Show documentation
/*
* 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.ecr.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Information on the vulnerable package identified by a finding.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class VulnerablePackage implements Serializable, Cloneable, StructuredPojo {
/**
*
* The architecture of the vulnerable package.
*
*/
private String arch;
/**
*
* The epoch of the vulnerable package.
*
*/
private Integer epoch;
/**
*
* The file path of the vulnerable package.
*
*/
private String filePath;
/**
*
* The name of the vulnerable package.
*
*/
private String name;
/**
*
* The package manager of the vulnerable package.
*
*/
private String packageManager;
/**
*
* The release of the vulnerable package.
*
*/
private String release;
/**
*
* The source layer hash of the vulnerable package.
*
*/
private String sourceLayerHash;
/**
*
* The version of the vulnerable package.
*
*/
private String version;
/**
*
* The architecture of the vulnerable package.
*
*
* @param arch
* The architecture of the vulnerable package.
*/
public void setArch(String arch) {
this.arch = arch;
}
/**
*
* The architecture of the vulnerable package.
*
*
* @return The architecture of the vulnerable package.
*/
public String getArch() {
return this.arch;
}
/**
*
* The architecture of the vulnerable package.
*
*
* @param arch
* The architecture of the vulnerable package.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public VulnerablePackage withArch(String arch) {
setArch(arch);
return this;
}
/**
*
* The epoch of the vulnerable package.
*
*
* @param epoch
* The epoch of the vulnerable package.
*/
public void setEpoch(Integer epoch) {
this.epoch = epoch;
}
/**
*
* The epoch of the vulnerable package.
*
*
* @return The epoch of the vulnerable package.
*/
public Integer getEpoch() {
return this.epoch;
}
/**
*
* The epoch of the vulnerable package.
*
*
* @param epoch
* The epoch of the vulnerable package.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public VulnerablePackage withEpoch(Integer epoch) {
setEpoch(epoch);
return this;
}
/**
*
* The file path of the vulnerable package.
*
*
* @param filePath
* The file path of the vulnerable package.
*/
public void setFilePath(String filePath) {
this.filePath = filePath;
}
/**
*
* The file path of the vulnerable package.
*
*
* @return The file path of the vulnerable package.
*/
public String getFilePath() {
return this.filePath;
}
/**
*
* The file path of the vulnerable package.
*
*
* @param filePath
* The file path of the vulnerable package.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public VulnerablePackage withFilePath(String filePath) {
setFilePath(filePath);
return this;
}
/**
*
* The name of the vulnerable package.
*
*
* @param name
* The name of the vulnerable package.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* The name of the vulnerable package.
*
*
* @return The name of the vulnerable package.
*/
public String getName() {
return this.name;
}
/**
*
* The name of the vulnerable package.
*
*
* @param name
* The name of the vulnerable package.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public VulnerablePackage withName(String name) {
setName(name);
return this;
}
/**
*
* The package manager of the vulnerable package.
*
*
* @param packageManager
* The package manager of the vulnerable package.
*/
public void setPackageManager(String packageManager) {
this.packageManager = packageManager;
}
/**
*
* The package manager of the vulnerable package.
*
*
* @return The package manager of the vulnerable package.
*/
public String getPackageManager() {
return this.packageManager;
}
/**
*
* The package manager of the vulnerable package.
*
*
* @param packageManager
* The package manager of the vulnerable package.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public VulnerablePackage withPackageManager(String packageManager) {
setPackageManager(packageManager);
return this;
}
/**
*
* The release of the vulnerable package.
*
*
* @param release
* The release of the vulnerable package.
*/
public void setRelease(String release) {
this.release = release;
}
/**
*
* The release of the vulnerable package.
*
*
* @return The release of the vulnerable package.
*/
public String getRelease() {
return this.release;
}
/**
*
* The release of the vulnerable package.
*
*
* @param release
* The release of the vulnerable package.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public VulnerablePackage withRelease(String release) {
setRelease(release);
return this;
}
/**
*
* The source layer hash of the vulnerable package.
*
*
* @param sourceLayerHash
* The source layer hash of the vulnerable package.
*/
public void setSourceLayerHash(String sourceLayerHash) {
this.sourceLayerHash = sourceLayerHash;
}
/**
*
* The source layer hash of the vulnerable package.
*
*
* @return The source layer hash of the vulnerable package.
*/
public String getSourceLayerHash() {
return this.sourceLayerHash;
}
/**
*
* The source layer hash of the vulnerable package.
*
*
* @param sourceLayerHash
* The source layer hash of the vulnerable package.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public VulnerablePackage withSourceLayerHash(String sourceLayerHash) {
setSourceLayerHash(sourceLayerHash);
return this;
}
/**
*
* The version of the vulnerable package.
*
*
* @param version
* The version of the vulnerable package.
*/
public void setVersion(String version) {
this.version = version;
}
/**
*
* The version of the vulnerable package.
*
*
* @return The version of the vulnerable package.
*/
public String getVersion() {
return this.version;
}
/**
*
* The version of the vulnerable package.
*
*
* @param version
* The version of the vulnerable package.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public VulnerablePackage withVersion(String version) {
setVersion(version);
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 (getArch() != null)
sb.append("Arch: ").append(getArch()).append(",");
if (getEpoch() != null)
sb.append("Epoch: ").append(getEpoch()).append(",");
if (getFilePath() != null)
sb.append("FilePath: ").append(getFilePath()).append(",");
if (getName() != null)
sb.append("Name: ").append(getName()).append(",");
if (getPackageManager() != null)
sb.append("PackageManager: ").append(getPackageManager()).append(",");
if (getRelease() != null)
sb.append("Release: ").append(getRelease()).append(",");
if (getSourceLayerHash() != null)
sb.append("SourceLayerHash: ").append(getSourceLayerHash()).append(",");
if (getVersion() != null)
sb.append("Version: ").append(getVersion());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof VulnerablePackage == false)
return false;
VulnerablePackage other = (VulnerablePackage) obj;
if (other.getArch() == null ^ this.getArch() == null)
return false;
if (other.getArch() != null && other.getArch().equals(this.getArch()) == false)
return false;
if (other.getEpoch() == null ^ this.getEpoch() == null)
return false;
if (other.getEpoch() != null && other.getEpoch().equals(this.getEpoch()) == false)
return false;
if (other.getFilePath() == null ^ this.getFilePath() == null)
return false;
if (other.getFilePath() != null && other.getFilePath().equals(this.getFilePath()) == false)
return false;
if (other.getName() == null ^ this.getName() == null)
return false;
if (other.getName() != null && other.getName().equals(this.getName()) == false)
return false;
if (other.getPackageManager() == null ^ this.getPackageManager() == null)
return false;
if (other.getPackageManager() != null && other.getPackageManager().equals(this.getPackageManager()) == false)
return false;
if (other.getRelease() == null ^ this.getRelease() == null)
return false;
if (other.getRelease() != null && other.getRelease().equals(this.getRelease()) == false)
return false;
if (other.getSourceLayerHash() == null ^ this.getSourceLayerHash() == null)
return false;
if (other.getSourceLayerHash() != null && other.getSourceLayerHash().equals(this.getSourceLayerHash()) == false)
return false;
if (other.getVersion() == null ^ this.getVersion() == null)
return false;
if (other.getVersion() != null && other.getVersion().equals(this.getVersion()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getArch() == null) ? 0 : getArch().hashCode());
hashCode = prime * hashCode + ((getEpoch() == null) ? 0 : getEpoch().hashCode());
hashCode = prime * hashCode + ((getFilePath() == null) ? 0 : getFilePath().hashCode());
hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode + ((getPackageManager() == null) ? 0 : getPackageManager().hashCode());
hashCode = prime * hashCode + ((getRelease() == null) ? 0 : getRelease().hashCode());
hashCode = prime * hashCode + ((getSourceLayerHash() == null) ? 0 : getSourceLayerHash().hashCode());
hashCode = prime * hashCode + ((getVersion() == null) ? 0 : getVersion().hashCode());
return hashCode;
}
@Override
public VulnerablePackage clone() {
try {
return (VulnerablePackage) 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.ecr.model.transform.VulnerablePackageMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}