com.amazonaws.services.pinpointemail.model.IspPlacement Maven / Gradle / Ivy
Show all versions of aws-java-sdk-pinpointemail 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.pinpointemail.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* An object that describes how email sent during the predictive inbox placement test was handled by a certain email
* provider.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class IspPlacement implements Serializable, Cloneable, StructuredPojo {
/**
*
* The name of the email provider that the inbox placement data applies to.
*
*/
private String ispName;
/**
*
* An object that contains inbox placement metrics for a specific email provider.
*
*/
private PlacementStatistics placementStatistics;
/**
*
* The name of the email provider that the inbox placement data applies to.
*
*
* @param ispName
* The name of the email provider that the inbox placement data applies to.
*/
public void setIspName(String ispName) {
this.ispName = ispName;
}
/**
*
* The name of the email provider that the inbox placement data applies to.
*
*
* @return The name of the email provider that the inbox placement data applies to.
*/
public String getIspName() {
return this.ispName;
}
/**
*
* The name of the email provider that the inbox placement data applies to.
*
*
* @param ispName
* The name of the email provider that the inbox placement data applies to.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public IspPlacement withIspName(String ispName) {
setIspName(ispName);
return this;
}
/**
*
* An object that contains inbox placement metrics for a specific email provider.
*
*
* @param placementStatistics
* An object that contains inbox placement metrics for a specific email provider.
*/
public void setPlacementStatistics(PlacementStatistics placementStatistics) {
this.placementStatistics = placementStatistics;
}
/**
*
* An object that contains inbox placement metrics for a specific email provider.
*
*
* @return An object that contains inbox placement metrics for a specific email provider.
*/
public PlacementStatistics getPlacementStatistics() {
return this.placementStatistics;
}
/**
*
* An object that contains inbox placement metrics for a specific email provider.
*
*
* @param placementStatistics
* An object that contains inbox placement metrics for a specific email provider.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public IspPlacement withPlacementStatistics(PlacementStatistics placementStatistics) {
setPlacementStatistics(placementStatistics);
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 (getIspName() != null)
sb.append("IspName: ").append(getIspName()).append(",");
if (getPlacementStatistics() != null)
sb.append("PlacementStatistics: ").append(getPlacementStatistics());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof IspPlacement == false)
return false;
IspPlacement other = (IspPlacement) obj;
if (other.getIspName() == null ^ this.getIspName() == null)
return false;
if (other.getIspName() != null && other.getIspName().equals(this.getIspName()) == false)
return false;
if (other.getPlacementStatistics() == null ^ this.getPlacementStatistics() == null)
return false;
if (other.getPlacementStatistics() != null && other.getPlacementStatistics().equals(this.getPlacementStatistics()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getIspName() == null) ? 0 : getIspName().hashCode());
hashCode = prime * hashCode + ((getPlacementStatistics() == null) ? 0 : getPlacementStatistics().hashCode());
return hashCode;
}
@Override
public IspPlacement clone() {
try {
return (IspPlacement) 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.pinpointemail.model.transform.IspPlacementMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}