@Override
    public MergeProfilesResult mergeProfiles(MergeProfilesRequest request) {
        request = beforeClientExecution(request);
        return executeMergeProfiles(request);
    }
<p>
Runs an AWS Lambda job that does the following:
</p>
<ol>
<li>
<p>
All the profileKeys in the <code>ProfileToBeMerged</code> will be moved to the main profile.
</p>
</li>
<li>
<p>
All the objects in the <code>ProfileToBeMerged</code> will be moved to the main profile.
</p>
</li>
<li>
<p>
All the <code>ProfileToBeMerged</code> will be deleted at the end.
</p>
</li>
<li>
<p>
All the profileKeys in the <code>ProfileIdsToBeMerged</code> will be moved to the main profile.
</p>
</li>
<li>
<p>
Standard fields are merged as follows:
</p>
<ol>
<li>
<p>
Fields are always "union"-ed if there are no conflicts in standard fields or attributeKeys.
</p>
</li>
<li>
<p>
When there are conflicting fields:
</p>
<ol>
<li>
<p>
If no <code>SourceProfileIds</code> entry is specified, the main Profile value is always taken.
</p>
</li>
<li>
<p>
If a <code>SourceProfileIds</code> entry is specified, the specified profileId is always taken, even if it is a
NULL value.
</p>
</li>
</ol>
</li>
</ol>
</li>
</ol>
<p>
You can use MergeProfiles together with <a
href="https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_GetMatches.html">GetMatches</a>, which
returns potentially matching profiles, or use it with the results of another matching system. After profiles have
been merged, they cannot be separated (unmerged).
</p>

@param mergeProfilesRequest
@return Result of the MergeProfiles operation returned by the service.
@throws BadRequestException
        The input you provided is invalid.
@throws ResourceNotFoundException
        The requested resource does not exist, or access was denied.
@throws ThrottlingException
        You exceeded the maximum number of requests.
@throws InternalServerException
        An internal service error occurred.
@sample AmazonCustomerProfiles.MergeProfiles
@see <a href="http://docs.aws.amazon.com/goto/WebAPI/customer-profiles-2020-08-15/MergeProfiles"
     target="_top">AWS API Documentation</a>
aws-java-sdk-customerprofiles/src/main/java/com/amazonaws/services/customerprofiles/AmazonCustomerProfilesClient.java