com.amazonaws.services.codegurusecurity.model.CreateScanResult Maven / Gradle / Ivy
Show all versions of aws-java-sdk-codegurusecurity Show documentation
/*
* 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;
/**
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CreateScanResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {
/**
*
* The identifier for the resource object that contains resources that were scanned.
*
*/
private ResourceId resourceId;
/**
*
* 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. Returns either InProgress
, Successful
, or
* Failed
.
*
*/
private String scanState;
/**
*
* The identifier for the resource object that contains resources that were scanned.
*
*
* @param resourceId
* The identifier for the resource object that contains resources that were scanned.
*/
public void setResourceId(ResourceId resourceId) {
this.resourceId = resourceId;
}
/**
*
* The identifier for the resource object that contains resources that were scanned.
*
*
* @return The identifier for the resource object that contains resources that were scanned.
*/
public ResourceId getResourceId() {
return this.resourceId;
}
/**
*
* The identifier for the resource object that contains resources that were scanned.
*
*
* @param resourceId
* The identifier for the resource object that contains resources that were scanned.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateScanResult withResourceId(ResourceId resourceId) {
setResourceId(resourceId);
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 CreateScanResult 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 CreateScanResult 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 CreateScanResult withScanNameArn(String scanNameArn) {
setScanNameArn(scanNameArn);
return this;
}
/**
*
* The current state of the scan. Returns either InProgress
, Successful
, or
* Failed
.
*
*
* @param scanState
* The current state of the scan. Returns either InProgress
, Successful
, or
* Failed
.
* @see ScanState
*/
public void setScanState(String scanState) {
this.scanState = scanState;
}
/**
*
* The current state of the scan. Returns either InProgress
, Successful
, or
* Failed
.
*
*
* @return The current state of the scan. Returns either InProgress
, Successful
, or
* Failed
.
* @see ScanState
*/
public String getScanState() {
return this.scanState;
}
/**
*
* The current state of the scan. Returns either InProgress
, Successful
, or
* Failed
.
*
*
* @param scanState
* The current state of the scan. Returns either InProgress
, Successful
, or
* Failed
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ScanState
*/
public CreateScanResult withScanState(String scanState) {
setScanState(scanState);
return this;
}
/**
*
* The current state of the scan. Returns either InProgress
, Successful
, or
* Failed
.
*
*
* @param scanState
* The current state of the scan. Returns either InProgress
, Successful
, or
* Failed
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ScanState
*/
public CreateScanResult withScanState(ScanState scanState) {
this.scanState = scanState.toString();
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 (getResourceId() != null)
sb.append("ResourceId: ").append(getResourceId()).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());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CreateScanResult == false)
return false;
CreateScanResult other = (CreateScanResult) obj;
if (other.getResourceId() == null ^ this.getResourceId() == null)
return false;
if (other.getResourceId() != null && other.getResourceId().equals(this.getResourceId()) == 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;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getResourceId() == null) ? 0 : getResourceId().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());
return hashCode;
}
@Override
public CreateScanResult clone() {
try {
return (CreateScanResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}