* The type of analysis CodeGuru Security performed in the scan, either Security
or All
.
* The Security
type only generates findings related to security. The All
type generates
* both security findings and quality findings.
*
* The time the scan was created. *
*/ private java.util.Date createdAt; /** ** The number of times a scan has been re-run on a revised resource. *
*/ private Long numberOfRevisions; /** ** UUID that identifies the individual scan run. *
*/ private String runId; /** ** The name of the scan. *
*/ private String scanName; /** ** The ARN for the scan name. *
*/ private String scanNameArn; /** *
* The current state of the scan. Pass either InProgress
, Successful
, or
* Failed
.
*
* The time when the scan was last updated. Only available for STANDARD
scan types.
*
* The type of analysis CodeGuru Security performed in the scan, either Security
or All
.
* The Security
type only generates findings related to security. The All
type generates
* both security findings and quality findings.
*
Security
or
* All
. The Security
type only generates findings related to security. The
* All
type generates both security findings and quality findings.
* @see AnalysisType
*/
public void setAnalysisType(String analysisType) {
this.analysisType = analysisType;
}
/**
*
* The type of analysis CodeGuru Security performed in the scan, either Security
or All
.
* The Security
type only generates findings related to security. The All
type generates
* both security findings and quality findings.
*
Security
or
* All
. The Security
type only generates findings related to security. The
* All
type generates both security findings and quality findings.
* @see AnalysisType
*/
public String getAnalysisType() {
return this.analysisType;
}
/**
*
* The type of analysis CodeGuru Security performed in the scan, either Security
or All
.
* The Security
type only generates findings related to security. The All
type generates
* both security findings and quality findings.
*
Security
or
* All
. The Security
type only generates findings related to security. The
* All
type generates both security findings and quality findings.
* @return Returns a reference to this object so that method calls can be chained together.
* @see AnalysisType
*/
public GetScanResult withAnalysisType(String analysisType) {
setAnalysisType(analysisType);
return this;
}
/**
*
* The type of analysis CodeGuru Security performed in the scan, either Security
or All
.
* The Security
type only generates findings related to security. The All
type generates
* both security findings and quality findings.
*
Security
or
* All
. The Security
type only generates findings related to security. The
* All
type generates both security findings and quality findings.
* @return Returns a reference to this object so that method calls can be chained together.
* @see AnalysisType
*/
public GetScanResult withAnalysisType(AnalysisType analysisType) {
this.analysisType = analysisType.toString();
return this;
}
/**
* * The time the scan was created. *
* * @param createdAt * The time the scan was created. */ public void setCreatedAt(java.util.Date createdAt) { this.createdAt = createdAt; } /** ** The time the scan was created. *
* * @return The time the scan was created. */ public java.util.Date getCreatedAt() { return this.createdAt; } /** ** The time the scan was created. *
* * @param createdAt * The time the scan was created. * @return Returns a reference to this object so that method calls can be chained together. */ public GetScanResult withCreatedAt(java.util.Date createdAt) { setCreatedAt(createdAt); return this; } /** ** The number of times a scan has been re-run on a revised resource. *
* * @param numberOfRevisions * The number of times a scan has been re-run on a revised resource. */ public void setNumberOfRevisions(Long numberOfRevisions) { this.numberOfRevisions = numberOfRevisions; } /** ** The number of times a scan has been re-run on a revised resource. *
* * @return The number of times a scan has been re-run on a revised resource. */ public Long getNumberOfRevisions() { return this.numberOfRevisions; } /** ** The number of times a scan has been re-run on a revised resource. *
* * @param numberOfRevisions * The number of times a scan has been re-run on a revised resource. * @return Returns a reference to this object so that method calls can be chained together. */ public GetScanResult withNumberOfRevisions(Long numberOfRevisions) { setNumberOfRevisions(numberOfRevisions); return this; } /** ** UUID that identifies the individual scan run. *
* * @param runId * UUID that identifies the individual scan run. */ public void setRunId(String runId) { this.runId = runId; } /** ** UUID that identifies the individual scan run. *
* * @return UUID that identifies the individual scan run. */ public String getRunId() { return this.runId; } /** ** UUID that identifies the individual scan run. *
* * @param runId * UUID that identifies the individual scan run. * @return Returns a reference to this object so that method calls can be chained together. */ public GetScanResult withRunId(String runId) { setRunId(runId); return this; } /** ** The name of the scan. *
* * @param scanName * The name of the scan. */ public void setScanName(String scanName) { this.scanName = scanName; } /** ** The name of the scan. *
* * @return The name of the scan. */ public String getScanName() { return this.scanName; } /** ** The name of the scan. *
* * @param scanName * The name of the scan. * @return Returns a reference to this object so that method calls can be chained together. */ public GetScanResult withScanName(String scanName) { setScanName(scanName); return this; } /** ** The ARN for the scan name. *
* * @param scanNameArn * The ARN for the scan name. */ public void setScanNameArn(String scanNameArn) { this.scanNameArn = scanNameArn; } /** ** The ARN for the scan name. *
* * @return The ARN for the scan name. */ public String getScanNameArn() { return this.scanNameArn; } /** ** The ARN for the scan name. *
* * @param scanNameArn * The ARN for the scan name. * @return Returns a reference to this object so that method calls can be chained together. */ public GetScanResult withScanNameArn(String scanNameArn) { setScanNameArn(scanNameArn); return this; } /** *
* The current state of the scan. Pass either InProgress
, Successful
, or
* Failed
.
*
InProgress
, Successful
, or
* Failed
.
* @see ScanState
*/
public void setScanState(String scanState) {
this.scanState = scanState;
}
/**
*
* The current state of the scan. Pass either InProgress
, Successful
, or
* Failed
.
*
InProgress
, Successful
, or
* Failed
.
* @see ScanState
*/
public String getScanState() {
return this.scanState;
}
/**
*
* The current state of the scan. Pass either InProgress
, Successful
, or
* Failed
.
*
InProgress
, Successful
, or
* Failed
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ScanState
*/
public GetScanResult withScanState(String scanState) {
setScanState(scanState);
return this;
}
/**
*
* The current state of the scan. Pass either InProgress
, Successful
, or
* Failed
.
*
InProgress
, Successful
, or
* Failed
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ScanState
*/
public GetScanResult withScanState(ScanState scanState) {
this.scanState = scanState.toString();
return this;
}
/**
*
* The time when the scan was last updated. Only available for STANDARD
scan types.
*
STANDARD
scan types.
*/
public void setUpdatedAt(java.util.Date updatedAt) {
this.updatedAt = updatedAt;
}
/**
*
* The time when the scan was last updated. Only available for STANDARD
scan types.
*
STANDARD
scan types.
*/
public java.util.Date getUpdatedAt() {
return this.updatedAt;
}
/**
*
* The time when the scan was last updated. Only available for STANDARD
scan types.
*
STANDARD
scan types.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetScanResult withUpdatedAt(java.util.Date updatedAt) {
setUpdatedAt(updatedAt);
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 (getAnalysisType() != null)
sb.append("AnalysisType: ").append(getAnalysisType()).append(",");
if (getCreatedAt() != null)
sb.append("CreatedAt: ").append(getCreatedAt()).append(",");
if (getNumberOfRevisions() != null)
sb.append("NumberOfRevisions: ").append(getNumberOfRevisions()).append(",");
if (getRunId() != null)
sb.append("RunId: ").append(getRunId()).append(",");
if (getScanName() != null)
sb.append("ScanName: ").append(getScanName()).append(",");
if (getScanNameArn() != null)
sb.append("ScanNameArn: ").append(getScanNameArn()).append(",");
if (getScanState() != null)
sb.append("ScanState: ").append(getScanState()).append(",");
if (getUpdatedAt() != null)
sb.append("UpdatedAt: ").append(getUpdatedAt());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof GetScanResult == false)
return false;
GetScanResult other = (GetScanResult) obj;
if (other.getAnalysisType() == null ^ this.getAnalysisType() == null)
return false;
if (other.getAnalysisType() != null && other.getAnalysisType().equals(this.getAnalysisType()) == false)
return false;
if (other.getCreatedAt() == null ^ this.getCreatedAt() == null)
return false;
if (other.getCreatedAt() != null && other.getCreatedAt().equals(this.getCreatedAt()) == false)
return false;
if (other.getNumberOfRevisions() == null ^ this.getNumberOfRevisions() == null)
return false;
if (other.getNumberOfRevisions() != null && other.getNumberOfRevisions().equals(this.getNumberOfRevisions()) == false)
return false;
if (other.getRunId() == null ^ this.getRunId() == null)
return false;
if (other.getRunId() != null && other.getRunId().equals(this.getRunId()) == false)
return false;
if (other.getScanName() == null ^ this.getScanName() == null)
return false;
if (other.getScanName() != null && other.getScanName().equals(this.getScanName()) == false)
return false;
if (other.getScanNameArn() == null ^ this.getScanNameArn() == null)
return false;
if (other.getScanNameArn() != null && other.getScanNameArn().equals(this.getScanNameArn()) == false)
return false;
if (other.getScanState() == null ^ this.getScanState() == null)
return false;
if (other.getScanState() != null && other.getScanState().equals(this.getScanState()) == false)
return false;
if (other.getUpdatedAt() == null ^ this.getUpdatedAt() == null)
return false;
if (other.getUpdatedAt() != null && other.getUpdatedAt().equals(this.getUpdatedAt()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getAnalysisType() == null) ? 0 : getAnalysisType().hashCode());
hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
hashCode = prime * hashCode + ((getNumberOfRevisions() == null) ? 0 : getNumberOfRevisions().hashCode());
hashCode = prime * hashCode + ((getRunId() == null) ? 0 : getRunId().hashCode());
hashCode = prime * hashCode + ((getScanName() == null) ? 0 : getScanName().hashCode());
hashCode = prime * hashCode + ((getScanNameArn() == null) ? 0 : getScanNameArn().hashCode());
hashCode = prime * hashCode + ((getScanState() == null) ? 0 : getScanState().hashCode());
hashCode = prime * hashCode + ((getUpdatedAt() == null) ? 0 : getUpdatedAt().hashCode());
return hashCode;
}
@Override
public GetScanResult clone() {
try {
return (GetScanResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}