Did this page help you?

   Yes   No   Tell us about it...

com.amazonaws.services.sns.model
Class CreatePlatformEndpointRequest

java.lang.Object
  extended by com.amazonaws.AmazonWebServiceRequest
      extended by com.amazonaws.services.sns.model.CreatePlatformEndpointRequest
All Implemented Interfaces:
Serializable

public class CreatePlatformEndpointRequest
extends AmazonWebServiceRequest
implements Serializable

Container for the parameters to the CreatePlatformEndpoint operation.

The CreatePlatformEndpoint creates an endpoint for a device and mobile app on one of the supported push notification services, such as GCM and APNS. CreatePlatformEndpoint requires the PlatformApplicationArn that is returned from CreatePlatformApplication . The EndpointArn that is returned when using CreatePlatformEndpoint can then be used by the Publish action to send a message to a mobile app or by the Subscribe action for subscription to a topic. For more information, see Using Amazon SNS Mobile Push Notifications .

See Also:
AmazonSNS.createPlatformEndpoint(CreatePlatformEndpointRequest), Serialized Form

Constructor Summary
CreatePlatformEndpointRequest()
           
 
Method Summary
 boolean equals(Object obj)
           
 Map<String,String> getAttributes()
          For a list of attributes, see SetEndpointAttributes.
 String getCustomUserData()
          Arbitrary user data to associate with the endpoint.
 String getPlatformApplicationArn()
          PlatformApplicationArn returned from CreatePlatformApplication is used to create a an endpoint.
 String getToken()
          Unique identifier created by the notification service for an app on a device.
 int hashCode()
           
 void setAttributes(Map<String,String> attributes)
          For a list of attributes, see SetEndpointAttributes.
 void setCustomUserData(String customUserData)
          Arbitrary user data to associate with the endpoint.
 void setPlatformApplicationArn(String platformApplicationArn)
          PlatformApplicationArn returned from CreatePlatformApplication is used to create a an endpoint.
 void setToken(String token)
          Unique identifier created by the notification service for an app on a device.
 String toString()
          Returns a string representation of this object; useful for testing and debugging.
 CreatePlatformEndpointRequest withAttributes(Map<String,String> attributes)
          For a list of attributes, see SetEndpointAttributes.
 CreatePlatformEndpointRequest withCustomUserData(String customUserData)
          Arbitrary user data to associate with the endpoint.
 CreatePlatformEndpointRequest withPlatformApplicationArn(String platformApplicationArn)
          PlatformApplicationArn returned from CreatePlatformApplication is used to create a an endpoint.
 CreatePlatformEndpointRequest withToken(String token)
          Unique identifier created by the notification service for an app on a device.
 
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyPrivateRequestParameters, getRequestClientOptions, getRequestCredentials, setRequestCredentials
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CreatePlatformEndpointRequest

public CreatePlatformEndpointRequest()
Method Detail

getPlatformApplicationArn

public String getPlatformApplicationArn()
PlatformApplicationArn returned from CreatePlatformApplication is used to create a an endpoint.

Returns:
PlatformApplicationArn returned from CreatePlatformApplication is used to create a an endpoint.

setPlatformApplicationArn

public void setPlatformApplicationArn(String platformApplicationArn)
PlatformApplicationArn returned from CreatePlatformApplication is used to create a an endpoint.

Parameters:
platformApplicationArn - PlatformApplicationArn returned from CreatePlatformApplication is used to create a an endpoint.

withPlatformApplicationArn

public CreatePlatformEndpointRequest withPlatformApplicationArn(String platformApplicationArn)
PlatformApplicationArn returned from CreatePlatformApplication is used to create a an endpoint.

Returns a reference to this object so that method calls can be chained together.

Parameters:
platformApplicationArn - PlatformApplicationArn returned from CreatePlatformApplication is used to create a an endpoint.
Returns:
A reference to this updated object so that method calls can be chained together.

getToken

public String getToken()
Unique identifier created by the notification service for an app on a device. The specific name for Token will vary, depending on which notification service is being used. For example, when using APNS as the notification service, you need the device token. Alternatively, when using GCM or ADM, the device token equivalent is called the registration ID.

Returns:
Unique identifier created by the notification service for an app on a device. The specific name for Token will vary, depending on which notification service is being used. For example, when using APNS as the notification service, you need the device token. Alternatively, when using GCM or ADM, the device token equivalent is called the registration ID.

setToken

public void setToken(String token)
Unique identifier created by the notification service for an app on a device. The specific name for Token will vary, depending on which notification service is being used. For example, when using APNS as the notification service, you need the device token. Alternatively, when using GCM or ADM, the device token equivalent is called the registration ID.

Parameters:
token - Unique identifier created by the notification service for an app on a device. The specific name for Token will vary, depending on which notification service is being used. For example, when using APNS as the notification service, you need the device token. Alternatively, when using GCM or ADM, the device token equivalent is called the registration ID.

withToken

public CreatePlatformEndpointRequest withToken(String token)
Unique identifier created by the notification service for an app on a device. The specific name for Token will vary, depending on which notification service is being used. For example, when using APNS as the notification service, you need the device token. Alternatively, when using GCM or ADM, the device token equivalent is called the registration ID.

Returns a reference to this object so that method calls can be chained together.

Parameters:
token - Unique identifier created by the notification service for an app on a device. The specific name for Token will vary, depending on which notification service is being used. For example, when using APNS as the notification service, you need the device token. Alternatively, when using GCM or ADM, the device token equivalent is called the registration ID.
Returns:
A reference to this updated object so that method calls can be chained together.

getCustomUserData

public String getCustomUserData()
Arbitrary user data to associate with the endpoint. SNS does not use this data. The data must be in UTF-8 format and less than 2KB.

Returns:
Arbitrary user data to associate with the endpoint. SNS does not use this data. The data must be in UTF-8 format and less than 2KB.

setCustomUserData

public void setCustomUserData(String customUserData)
Arbitrary user data to associate with the endpoint. SNS does not use this data. The data must be in UTF-8 format and less than 2KB.

Parameters:
customUserData - Arbitrary user data to associate with the endpoint. SNS does not use this data. The data must be in UTF-8 format and less than 2KB.

withCustomUserData

public CreatePlatformEndpointRequest withCustomUserData(String customUserData)
Arbitrary user data to associate with the endpoint. SNS does not use this data. The data must be in UTF-8 format and less than 2KB.

Returns a reference to this object so that method calls can be chained together.

Parameters:
customUserData - Arbitrary user data to associate with the endpoint. SNS does not use this data. The data must be in UTF-8 format and less than 2KB.
Returns:
A reference to this updated object so that method calls can be chained together.

getAttributes

public Map<String,String> getAttributes()
For a list of attributes, see SetEndpointAttributes.

Returns:
For a list of attributes, see SetEndpointAttributes.

setAttributes

public void setAttributes(Map<String,String> attributes)
For a list of attributes, see SetEndpointAttributes.

Parameters:
attributes - For a list of attributes, see SetEndpointAttributes.

withAttributes

public CreatePlatformEndpointRequest withAttributes(Map<String,String> attributes)
For a list of attributes, see SetEndpointAttributes.

Returns a reference to this object so that method calls can be chained together.

Parameters:
attributes - For a list of attributes, see SetEndpointAttributes.
Returns:
A reference to this updated object so that method calls can be chained together.

toString

public String toString()
Returns a string representation of this object; useful for testing and debugging.

Overrides:
toString in class Object
Returns:
A string representation of this object.
See Also:
Object.toString()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.