com.amazonaws.services.guardduty.model.CoverageResource Maven / Gradle / Ivy
Show all versions of aws-java-sdk-guardduty 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.guardduty.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Information about the resource of the GuardDuty account.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CoverageResource implements Serializable, Cloneable, StructuredPojo {
/**
*
* The unique ID of the resource.
*
*/
private String resourceId;
/**
*
* The unique ID of the GuardDuty detector associated with the resource.
*
*/
private String detectorId;
/**
*
* The unique ID of the Amazon Web Services account.
*
*/
private String accountId;
/**
*
* Information about the resource for which the coverage statistics are retrieved.
*
*/
private CoverageResourceDetails resourceDetails;
/**
*
* Represents the status of the EKS cluster coverage.
*
*/
private String coverageStatus;
/**
*
* Represents the reason why a coverage status was UNHEALTHY
for the EKS cluster.
*
*/
private String issue;
/**
*
* The timestamp at which the coverage details for the resource were last updated. This is in UTC format.
*
*/
private java.util.Date updatedAt;
/**
*
* The unique ID of the resource.
*
*
* @param resourceId
* The unique ID of the resource.
*/
public void setResourceId(String resourceId) {
this.resourceId = resourceId;
}
/**
*
* The unique ID of the resource.
*
*
* @return The unique ID of the resource.
*/
public String getResourceId() {
return this.resourceId;
}
/**
*
* The unique ID of the resource.
*
*
* @param resourceId
* The unique ID of the resource.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CoverageResource withResourceId(String resourceId) {
setResourceId(resourceId);
return this;
}
/**
*
* The unique ID of the GuardDuty detector associated with the resource.
*
*
* @param detectorId
* The unique ID of the GuardDuty detector associated with the resource.
*/
public void setDetectorId(String detectorId) {
this.detectorId = detectorId;
}
/**
*
* The unique ID of the GuardDuty detector associated with the resource.
*
*
* @return The unique ID of the GuardDuty detector associated with the resource.
*/
public String getDetectorId() {
return this.detectorId;
}
/**
*
* The unique ID of the GuardDuty detector associated with the resource.
*
*
* @param detectorId
* The unique ID of the GuardDuty detector associated with the resource.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CoverageResource withDetectorId(String detectorId) {
setDetectorId(detectorId);
return this;
}
/**
*
* The unique ID of the Amazon Web Services account.
*
*
* @param accountId
* The unique ID of the Amazon Web Services account.
*/
public void setAccountId(String accountId) {
this.accountId = accountId;
}
/**
*
* The unique ID of the Amazon Web Services account.
*
*
* @return The unique ID of the Amazon Web Services account.
*/
public String getAccountId() {
return this.accountId;
}
/**
*
* The unique ID of the Amazon Web Services account.
*
*
* @param accountId
* The unique ID of the Amazon Web Services account.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CoverageResource withAccountId(String accountId) {
setAccountId(accountId);
return this;
}
/**
*
* Information about the resource for which the coverage statistics are retrieved.
*
*
* @param resourceDetails
* Information about the resource for which the coverage statistics are retrieved.
*/
public void setResourceDetails(CoverageResourceDetails resourceDetails) {
this.resourceDetails = resourceDetails;
}
/**
*
* Information about the resource for which the coverage statistics are retrieved.
*
*
* @return Information about the resource for which the coverage statistics are retrieved.
*/
public CoverageResourceDetails getResourceDetails() {
return this.resourceDetails;
}
/**
*
* Information about the resource for which the coverage statistics are retrieved.
*
*
* @param resourceDetails
* Information about the resource for which the coverage statistics are retrieved.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CoverageResource withResourceDetails(CoverageResourceDetails resourceDetails) {
setResourceDetails(resourceDetails);
return this;
}
/**
*
* Represents the status of the EKS cluster coverage.
*
*
* @param coverageStatus
* Represents the status of the EKS cluster coverage.
* @see CoverageStatus
*/
public void setCoverageStatus(String coverageStatus) {
this.coverageStatus = coverageStatus;
}
/**
*
* Represents the status of the EKS cluster coverage.
*
*
* @return Represents the status of the EKS cluster coverage.
* @see CoverageStatus
*/
public String getCoverageStatus() {
return this.coverageStatus;
}
/**
*
* Represents the status of the EKS cluster coverage.
*
*
* @param coverageStatus
* Represents the status of the EKS cluster coverage.
* @return Returns a reference to this object so that method calls can be chained together.
* @see CoverageStatus
*/
public CoverageResource withCoverageStatus(String coverageStatus) {
setCoverageStatus(coverageStatus);
return this;
}
/**
*
* Represents the status of the EKS cluster coverage.
*
*
* @param coverageStatus
* Represents the status of the EKS cluster coverage.
* @return Returns a reference to this object so that method calls can be chained together.
* @see CoverageStatus
*/
public CoverageResource withCoverageStatus(CoverageStatus coverageStatus) {
this.coverageStatus = coverageStatus.toString();
return this;
}
/**
*
* Represents the reason why a coverage status was UNHEALTHY
for the EKS cluster.
*
*
* @param issue
* Represents the reason why a coverage status was UNHEALTHY
for the EKS cluster.
*/
public void setIssue(String issue) {
this.issue = issue;
}
/**
*
* Represents the reason why a coverage status was UNHEALTHY
for the EKS cluster.
*
*
* @return Represents the reason why a coverage status was UNHEALTHY
for the EKS cluster.
*/
public String getIssue() {
return this.issue;
}
/**
*
* Represents the reason why a coverage status was UNHEALTHY
for the EKS cluster.
*
*
* @param issue
* Represents the reason why a coverage status was UNHEALTHY
for the EKS cluster.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CoverageResource withIssue(String issue) {
setIssue(issue);
return this;
}
/**
*
* The timestamp at which the coverage details for the resource were last updated. This is in UTC format.
*
*
* @param updatedAt
* The timestamp at which the coverage details for the resource were last updated. This is in UTC format.
*/
public void setUpdatedAt(java.util.Date updatedAt) {
this.updatedAt = updatedAt;
}
/**
*
* The timestamp at which the coverage details for the resource were last updated. This is in UTC format.
*
*
* @return The timestamp at which the coverage details for the resource were last updated. This is in UTC format.
*/
public java.util.Date getUpdatedAt() {
return this.updatedAt;
}
/**
*
* The timestamp at which the coverage details for the resource were last updated. This is in UTC format.
*
*
* @param updatedAt
* The timestamp at which the coverage details for the resource were last updated. This is in UTC format.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CoverageResource 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 (getResourceId() != null)
sb.append("ResourceId: ").append(getResourceId()).append(",");
if (getDetectorId() != null)
sb.append("DetectorId: ").append(getDetectorId()).append(",");
if (getAccountId() != null)
sb.append("AccountId: ").append(getAccountId()).append(",");
if (getResourceDetails() != null)
sb.append("ResourceDetails: ").append(getResourceDetails()).append(",");
if (getCoverageStatus() != null)
sb.append("CoverageStatus: ").append(getCoverageStatus()).append(",");
if (getIssue() != null)
sb.append("Issue: ").append(getIssue()).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 CoverageResource == false)
return false;
CoverageResource other = (CoverageResource) obj;
if (other.getResourceId() == null ^ this.getResourceId() == null)
return false;
if (other.getResourceId() != null && other.getResourceId().equals(this.getResourceId()) == false)
return false;
if (other.getDetectorId() == null ^ this.getDetectorId() == null)
return false;
if (other.getDetectorId() != null && other.getDetectorId().equals(this.getDetectorId()) == false)
return false;
if (other.getAccountId() == null ^ this.getAccountId() == null)
return false;
if (other.getAccountId() != null && other.getAccountId().equals(this.getAccountId()) == false)
return false;
if (other.getResourceDetails() == null ^ this.getResourceDetails() == null)
return false;
if (other.getResourceDetails() != null && other.getResourceDetails().equals(this.getResourceDetails()) == false)
return false;
if (other.getCoverageStatus() == null ^ this.getCoverageStatus() == null)
return false;
if (other.getCoverageStatus() != null && other.getCoverageStatus().equals(this.getCoverageStatus()) == false)
return false;
if (other.getIssue() == null ^ this.getIssue() == null)
return false;
if (other.getIssue() != null && other.getIssue().equals(this.getIssue()) == 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 + ((getResourceId() == null) ? 0 : getResourceId().hashCode());
hashCode = prime * hashCode + ((getDetectorId() == null) ? 0 : getDetectorId().hashCode());
hashCode = prime * hashCode + ((getAccountId() == null) ? 0 : getAccountId().hashCode());
hashCode = prime * hashCode + ((getResourceDetails() == null) ? 0 : getResourceDetails().hashCode());
hashCode = prime * hashCode + ((getCoverageStatus() == null) ? 0 : getCoverageStatus().hashCode());
hashCode = prime * hashCode + ((getIssue() == null) ? 0 : getIssue().hashCode());
hashCode = prime * hashCode + ((getUpdatedAt() == null) ? 0 : getUpdatedAt().hashCode());
return hashCode;
}
@Override
public CoverageResource clone() {
try {
return (CoverageResource) 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.guardduty.model.transform.CoverageResourceMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}