com.amazonaws.services.simpleemailv2.model.Recommendation Maven / Gradle / Ivy
Show all versions of aws-java-sdk-sesv2 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.simpleemailv2.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* A recommendation generated for your account.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class Recommendation implements Serializable, Cloneable, StructuredPojo {
/**
*
* The resource affected by the recommendation, with values like
* arn:aws:ses:us-east-1:123456789012:identity/example.com
.
*
*/
private String resourceArn;
/**
*
* The recommendation type, with values like DKIM
, SPF
, DMARC
or
* BIMI
.
*
*/
private String type;
/**
*
* The recommendation description / disambiguator - e.g. DKIM1
and DKIM2
are different
* recommendations about your DKIM setup.
*
*/
private String description;
/**
*
* The recommendation status, with values like OPEN
or FIXED
.
*
*/
private String status;
/**
*
* The first time this issue was encountered and the recommendation was generated.
*
*/
private java.util.Date createdTimestamp;
/**
*
* The last time the recommendation was updated.
*
*/
private java.util.Date lastUpdatedTimestamp;
/**
*
* The recommendation impact, with values like HIGH
or LOW
.
*
*/
private String impact;
/**
*
* The resource affected by the recommendation, with values like
* arn:aws:ses:us-east-1:123456789012:identity/example.com
.
*
*
* @param resourceArn
* The resource affected by the recommendation, with values like
* arn:aws:ses:us-east-1:123456789012:identity/example.com
.
*/
public void setResourceArn(String resourceArn) {
this.resourceArn = resourceArn;
}
/**
*
* The resource affected by the recommendation, with values like
* arn:aws:ses:us-east-1:123456789012:identity/example.com
.
*
*
* @return The resource affected by the recommendation, with values like
* arn:aws:ses:us-east-1:123456789012:identity/example.com
.
*/
public String getResourceArn() {
return this.resourceArn;
}
/**
*
* The resource affected by the recommendation, with values like
* arn:aws:ses:us-east-1:123456789012:identity/example.com
.
*
*
* @param resourceArn
* The resource affected by the recommendation, with values like
* arn:aws:ses:us-east-1:123456789012:identity/example.com
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Recommendation withResourceArn(String resourceArn) {
setResourceArn(resourceArn);
return this;
}
/**
*
* The recommendation type, with values like DKIM
, SPF
, DMARC
or
* BIMI
.
*
*
* @param type
* The recommendation type, with values like DKIM
, SPF
, DMARC
or
* BIMI
.
* @see RecommendationType
*/
public void setType(String type) {
this.type = type;
}
/**
*
* The recommendation type, with values like DKIM
, SPF
, DMARC
or
* BIMI
.
*
*
* @return The recommendation type, with values like DKIM
, SPF
, DMARC
or
* BIMI
.
* @see RecommendationType
*/
public String getType() {
return this.type;
}
/**
*
* The recommendation type, with values like DKIM
, SPF
, DMARC
or
* BIMI
.
*
*
* @param type
* The recommendation type, with values like DKIM
, SPF
, DMARC
or
* BIMI
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see RecommendationType
*/
public Recommendation withType(String type) {
setType(type);
return this;
}
/**
*
* The recommendation type, with values like DKIM
, SPF
, DMARC
or
* BIMI
.
*
*
* @param type
* The recommendation type, with values like DKIM
, SPF
, DMARC
or
* BIMI
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see RecommendationType
*/
public Recommendation withType(RecommendationType type) {
this.type = type.toString();
return this;
}
/**
*
* The recommendation description / disambiguator - e.g. DKIM1
and DKIM2
are different
* recommendations about your DKIM setup.
*
*
* @param description
* The recommendation description / disambiguator - e.g. DKIM1
and DKIM2
are
* different recommendations about your DKIM setup.
*/
public void setDescription(String description) {
this.description = description;
}
/**
*
* The recommendation description / disambiguator - e.g. DKIM1
and DKIM2
are different
* recommendations about your DKIM setup.
*
*
* @return The recommendation description / disambiguator - e.g. DKIM1
and DKIM2
are
* different recommendations about your DKIM setup.
*/
public String getDescription() {
return this.description;
}
/**
*
* The recommendation description / disambiguator - e.g. DKIM1
and DKIM2
are different
* recommendations about your DKIM setup.
*
*
* @param description
* The recommendation description / disambiguator - e.g. DKIM1
and DKIM2
are
* different recommendations about your DKIM setup.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Recommendation withDescription(String description) {
setDescription(description);
return this;
}
/**
*
* The recommendation status, with values like OPEN
or FIXED
.
*
*
* @param status
* The recommendation status, with values like OPEN
or FIXED
.
* @see RecommendationStatus
*/
public void setStatus(String status) {
this.status = status;
}
/**
*
* The recommendation status, with values like OPEN
or FIXED
.
*
*
* @return The recommendation status, with values like OPEN
or FIXED
.
* @see RecommendationStatus
*/
public String getStatus() {
return this.status;
}
/**
*
* The recommendation status, with values like OPEN
or FIXED
.
*
*
* @param status
* The recommendation status, with values like OPEN
or FIXED
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see RecommendationStatus
*/
public Recommendation withStatus(String status) {
setStatus(status);
return this;
}
/**
*
* The recommendation status, with values like OPEN
or FIXED
.
*
*
* @param status
* The recommendation status, with values like OPEN
or FIXED
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see RecommendationStatus
*/
public Recommendation withStatus(RecommendationStatus status) {
this.status = status.toString();
return this;
}
/**
*
* The first time this issue was encountered and the recommendation was generated.
*
*
* @param createdTimestamp
* The first time this issue was encountered and the recommendation was generated.
*/
public void setCreatedTimestamp(java.util.Date createdTimestamp) {
this.createdTimestamp = createdTimestamp;
}
/**
*
* The first time this issue was encountered and the recommendation was generated.
*
*
* @return The first time this issue was encountered and the recommendation was generated.
*/
public java.util.Date getCreatedTimestamp() {
return this.createdTimestamp;
}
/**
*
* The first time this issue was encountered and the recommendation was generated.
*
*
* @param createdTimestamp
* The first time this issue was encountered and the recommendation was generated.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Recommendation withCreatedTimestamp(java.util.Date createdTimestamp) {
setCreatedTimestamp(createdTimestamp);
return this;
}
/**
*
* The last time the recommendation was updated.
*
*
* @param lastUpdatedTimestamp
* The last time the recommendation was updated.
*/
public void setLastUpdatedTimestamp(java.util.Date lastUpdatedTimestamp) {
this.lastUpdatedTimestamp = lastUpdatedTimestamp;
}
/**
*
* The last time the recommendation was updated.
*
*
* @return The last time the recommendation was updated.
*/
public java.util.Date getLastUpdatedTimestamp() {
return this.lastUpdatedTimestamp;
}
/**
*
* The last time the recommendation was updated.
*
*
* @param lastUpdatedTimestamp
* The last time the recommendation was updated.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Recommendation withLastUpdatedTimestamp(java.util.Date lastUpdatedTimestamp) {
setLastUpdatedTimestamp(lastUpdatedTimestamp);
return this;
}
/**
*
* The recommendation impact, with values like HIGH
or LOW
.
*
*
* @param impact
* The recommendation impact, with values like HIGH
or LOW
.
* @see RecommendationImpact
*/
public void setImpact(String impact) {
this.impact = impact;
}
/**
*
* The recommendation impact, with values like HIGH
or LOW
.
*
*
* @return The recommendation impact, with values like HIGH
or LOW
.
* @see RecommendationImpact
*/
public String getImpact() {
return this.impact;
}
/**
*
* The recommendation impact, with values like HIGH
or LOW
.
*
*
* @param impact
* The recommendation impact, with values like HIGH
or LOW
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see RecommendationImpact
*/
public Recommendation withImpact(String impact) {
setImpact(impact);
return this;
}
/**
*
* The recommendation impact, with values like HIGH
or LOW
.
*
*
* @param impact
* The recommendation impact, with values like HIGH
or LOW
.
* @return Returns a reference to this object so that method calls can be chained together.
* @see RecommendationImpact
*/
public Recommendation withImpact(RecommendationImpact impact) {
this.impact = impact.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 (getResourceArn() != null)
sb.append("ResourceArn: ").append(getResourceArn()).append(",");
if (getType() != null)
sb.append("Type: ").append(getType()).append(",");
if (getDescription() != null)
sb.append("Description: ").append(getDescription()).append(",");
if (getStatus() != null)
sb.append("Status: ").append(getStatus()).append(",");
if (getCreatedTimestamp() != null)
sb.append("CreatedTimestamp: ").append(getCreatedTimestamp()).append(",");
if (getLastUpdatedTimestamp() != null)
sb.append("LastUpdatedTimestamp: ").append(getLastUpdatedTimestamp()).append(",");
if (getImpact() != null)
sb.append("Impact: ").append(getImpact());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof Recommendation == false)
return false;
Recommendation other = (Recommendation) obj;
if (other.getResourceArn() == null ^ this.getResourceArn() == null)
return false;
if (other.getResourceArn() != null && other.getResourceArn().equals(this.getResourceArn()) == false)
return false;
if (other.getType() == null ^ this.getType() == null)
return false;
if (other.getType() != null && other.getType().equals(this.getType()) == false)
return false;
if (other.getDescription() == null ^ this.getDescription() == null)
return false;
if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false)
return false;
if (other.getStatus() == null ^ this.getStatus() == null)
return false;
if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false)
return false;
if (other.getCreatedTimestamp() == null ^ this.getCreatedTimestamp() == null)
return false;
if (other.getCreatedTimestamp() != null && other.getCreatedTimestamp().equals(this.getCreatedTimestamp()) == false)
return false;
if (other.getLastUpdatedTimestamp() == null ^ this.getLastUpdatedTimestamp() == null)
return false;
if (other.getLastUpdatedTimestamp() != null && other.getLastUpdatedTimestamp().equals(this.getLastUpdatedTimestamp()) == false)
return false;
if (other.getImpact() == null ^ this.getImpact() == null)
return false;
if (other.getImpact() != null && other.getImpact().equals(this.getImpact()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getResourceArn() == null) ? 0 : getResourceArn().hashCode());
hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode());
hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode());
hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode());
hashCode = prime * hashCode + ((getCreatedTimestamp() == null) ? 0 : getCreatedTimestamp().hashCode());
hashCode = prime * hashCode + ((getLastUpdatedTimestamp() == null) ? 0 : getLastUpdatedTimestamp().hashCode());
hashCode = prime * hashCode + ((getImpact() == null) ? 0 : getImpact().hashCode());
return hashCode;
}
@Override
public Recommendation clone() {
try {
return (Recommendation) 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.simpleemailv2.model.transform.RecommendationMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}