/* * 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.customerprofiles.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class MergeProfilesRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *

* The unique name of the domain. *

*/ private String domainName; /** *

* The identifier of the profile to be taken. *

*/ private String mainProfileId; /** *

* The identifier of the profile to be merged into MainProfileId. *

*/ private java.util.List profileIdsToBeMerged; /** *

* The identifiers of the fields in the profile that has the information you want to apply to the merge. For * example, say you want to merge EmailAddress from Profile1 into MainProfile. This would be the identifier of the * EmailAddress field in Profile1. *

*/ private FieldSourceProfileIds fieldSourceProfileIds; /** *

* The unique name of the domain. *

* * @param domainName * The unique name of the domain. */ public void setDomainName(String domainName) { this.domainName = domainName; } /** *

* The unique name of the domain. *

* * @return The unique name of the domain. */ public String getDomainName() { return this.domainName; } /** *

* The unique name of the domain. *

* * @param domainName * The unique name of the domain. * @return Returns a reference to this object so that method calls can be chained together. */ public MergeProfilesRequest withDomainName(String domainName) { setDomainName(domainName); return this; } /** *

* The identifier of the profile to be taken. *

* * @param mainProfileId * The identifier of the profile to be taken. */ public void setMainProfileId(String mainProfileId) { this.mainProfileId = mainProfileId; } /** *

* The identifier of the profile to be taken. *

* * @return The identifier of the profile to be taken. */ public String getMainProfileId() { return this.mainProfileId; } /** *

* The identifier of the profile to be taken. *

* * @param mainProfileId * The identifier of the profile to be taken. * @return Returns a reference to this object so that method calls can be chained together. */ public MergeProfilesRequest withMainProfileId(String mainProfileId) { setMainProfileId(mainProfileId); return this; } /** *

* The identifier of the profile to be merged into MainProfileId. *

* * @return The identifier of the profile to be merged into MainProfileId. */ public java.util.List getProfileIdsToBeMerged() { return profileIdsToBeMerged; } /** *

* The identifier of the profile to be merged into MainProfileId. *

* * @param profileIdsToBeMerged * The identifier of the profile to be merged into MainProfileId. */ public void setProfileIdsToBeMerged(java.util.Collection profileIdsToBeMerged) { if (profileIdsToBeMerged == null) { this.profileIdsToBeMerged = null; return; } this.profileIdsToBeMerged = new java.util.ArrayList(profileIdsToBeMerged); } /** *

* The identifier of the profile to be merged into MainProfileId. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setProfileIdsToBeMerged(java.util.Collection)} or {@link #withProfileIdsToBeMerged(java.util.Collection)} * if you want to override the existing values. *

* * @param profileIdsToBeMerged * The identifier of the profile to be merged into MainProfileId. * @return Returns a reference to this object so that method calls can be chained together. */ public MergeProfilesRequest withProfileIdsToBeMerged(String... profileIdsToBeMerged) { if (this.profileIdsToBeMerged == null) { setProfileIdsToBeMerged(new java.util.ArrayList(profileIdsToBeMerged.length)); } for (String ele : profileIdsToBeMerged) { this.profileIdsToBeMerged.add(ele); } return this; } /** *

* The identifier of the profile to be merged into MainProfileId. *

* * @param profileIdsToBeMerged * The identifier of the profile to be merged into MainProfileId. * @return Returns a reference to this object so that method calls can be chained together. */ public MergeProfilesRequest withProfileIdsToBeMerged(java.util.Collection profileIdsToBeMerged) { setProfileIdsToBeMerged(profileIdsToBeMerged); return this; } /** *

* The identifiers of the fields in the profile that has the information you want to apply to the merge. For * example, say you want to merge EmailAddress from Profile1 into MainProfile. This would be the identifier of the * EmailAddress field in Profile1. *

* * @param fieldSourceProfileIds * The identifiers of the fields in the profile that has the information you want to apply to the merge. For * example, say you want to merge EmailAddress from Profile1 into MainProfile. This would be the identifier * of the EmailAddress field in Profile1. */ public void setFieldSourceProfileIds(FieldSourceProfileIds fieldSourceProfileIds) { this.fieldSourceProfileIds = fieldSourceProfileIds; } /** *

* The identifiers of the fields in the profile that has the information you want to apply to the merge. For * example, say you want to merge EmailAddress from Profile1 into MainProfile. This would be the identifier of the * EmailAddress field in Profile1. *

* * @return The identifiers of the fields in the profile that has the information you want to apply to the merge. For * example, say you want to merge EmailAddress from Profile1 into MainProfile. This would be the identifier * of the EmailAddress field in Profile1. */ public FieldSourceProfileIds getFieldSourceProfileIds() { return this.fieldSourceProfileIds; } /** *

* The identifiers of the fields in the profile that has the information you want to apply to the merge. For * example, say you want to merge EmailAddress from Profile1 into MainProfile. This would be the identifier of the * EmailAddress field in Profile1. *

* * @param fieldSourceProfileIds * The identifiers of the fields in the profile that has the information you want to apply to the merge. For * example, say you want to merge EmailAddress from Profile1 into MainProfile. This would be the identifier * of the EmailAddress field in Profile1. * @return Returns a reference to this object so that method calls can be chained together. */ public MergeProfilesRequest withFieldSourceProfileIds(FieldSourceProfileIds fieldSourceProfileIds) { setFieldSourceProfileIds(fieldSourceProfileIds); 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 (getDomainName() != null) sb.append("DomainName: ").append(getDomainName()).append(","); if (getMainProfileId() != null) sb.append("MainProfileId: ").append(getMainProfileId()).append(","); if (getProfileIdsToBeMerged() != null) sb.append("ProfileIdsToBeMerged: ").append(getProfileIdsToBeMerged()).append(","); if (getFieldSourceProfileIds() != null) sb.append("FieldSourceProfileIds: ").append(getFieldSourceProfileIds()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof MergeProfilesRequest == false) return false; MergeProfilesRequest other = (MergeProfilesRequest) obj; if (other.getDomainName() == null ^ this.getDomainName() == null) return false; if (other.getDomainName() != null && other.getDomainName().equals(this.getDomainName()) == false) return false; if (other.getMainProfileId() == null ^ this.getMainProfileId() == null) return false; if (other.getMainProfileId() != null && other.getMainProfileId().equals(this.getMainProfileId()) == false) return false; if (other.getProfileIdsToBeMerged() == null ^ this.getProfileIdsToBeMerged() == null) return false; if (other.getProfileIdsToBeMerged() != null && other.getProfileIdsToBeMerged().equals(this.getProfileIdsToBeMerged()) == false) return false; if (other.getFieldSourceProfileIds() == null ^ this.getFieldSourceProfileIds() == null) return false; if (other.getFieldSourceProfileIds() != null && other.getFieldSourceProfileIds().equals(this.getFieldSourceProfileIds()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDomainName() == null) ? 0 : getDomainName().hashCode()); hashCode = prime * hashCode + ((getMainProfileId() == null) ? 0 : getMainProfileId().hashCode()); hashCode = prime * hashCode + ((getProfileIdsToBeMerged() == null) ? 0 : getProfileIdsToBeMerged().hashCode()); hashCode = prime * hashCode + ((getFieldSourceProfileIds() == null) ? 0 : getFieldSourceProfileIds().hashCode()); return hashCode; } @Override public MergeProfilesRequest clone() { return (MergeProfilesRequest) super.clone(); } }