Example usage for com.amazonaws.services.sns.model CreatePlatformEndpointRequest withAttributes

List of usage examples for com.amazonaws.services.sns.model CreatePlatformEndpointRequest withAttributes

Introduction

In this page you can find the example usage for com.amazonaws.services.sns.model CreatePlatformEndpointRequest withAttributes.

Prototype


public CreatePlatformEndpointRequest withAttributes(java.util.Map<String, String> attributes) 

Source Link

Document

<p> For a list of attributes, see <a href="https://docs.aws.amazon.com/sns/latest/api/API_SetEndpointAttributes.html">SetEndpointAttributes</a>.

Usage

From source file:com.easarrive.aws.plugins.common.service.impl.SNSService.java

License:Open Source License

/**
 * {@inheritDoc}//from  ww w .  j a v  a  2s.  c om
 */
@Override
public CreatePlatformEndpointResult createPlatformEndpoint(AmazonSNS client,
        SNSPlatformEndpointRequest platformEndpointRequest) {
    if (platformEndpointRequest == null) {
        return null;
    }
    CreatePlatformEndpointRequest createPlatformEndpointRequest = new CreatePlatformEndpointRequest();
    createPlatformEndpointRequest.setCustomUserData(platformEndpointRequest.getCustomUserData());
    createPlatformEndpointRequest
            .setPlatformApplicationArn(platformEndpointRequest.getPlatformApplicationArn());
    createPlatformEndpointRequest.setToken(platformEndpointRequest.getToken());
    createPlatformEndpointRequest.withAttributes(platformEndpointRequest.getAttributes());

    CreatePlatformEndpointResult result = client.createPlatformEndpoint(createPlatformEndpointRequest);
    return result;
}