|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.amazonaws.AmazonWebServiceRequest
com.amazonaws.services.sns.model.CreatePlatformEndpointRequest
public class CreatePlatformEndpointRequest
Container for the parameters to the CreatePlatformEndpoint operation
.
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. The CreatePlatformEndpoint
action is idempotent,
so if the requester already owns an endpoint with the same device
token and attributes, that endpoint's ARN is returned without creating
a new endpoint. For more information, see
Using Amazon SNS Mobile Push Notifications
.
When using CreatePlatformEndpoint
with Baidu, two
attributes must be provided: ChannelId and UserId. The token field
must also contain the ChannelId. For more information, see
Creating an Amazon SNS Endpoint for Baidu
.
AmazonSNS.createPlatformEndpoint(CreatePlatformEndpointRequest)
,
Serialized FormConstructor Summary | |
---|---|
CreatePlatformEndpointRequest()
|
Method Summary | |
---|---|
CreatePlatformEndpointRequest |
addAttributesEntry(java.lang.String key,
java.lang.String value)
For a list of attributes, see SetEndpointAttributes. |
CreatePlatformEndpointRequest |
clearAttributesEntries()
Removes all the entries added into Attributes. |
boolean |
equals(java.lang.Object obj)
|
java.util.Map<java.lang.String,java.lang.String> |
getAttributes()
For a list of attributes, see SetEndpointAttributes. |
java.lang.String |
getCustomUserData()
Arbitrary user data to associate with the endpoint. |
java.lang.String |
getPlatformApplicationArn()
PlatformApplicationArn returned from CreatePlatformApplication is used to create a an endpoint. |
java.lang.String |
getToken()
Unique identifier created by the notification service for an app on a device. |
int |
hashCode()
|
void |
setAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
For a list of attributes, see SetEndpointAttributes. |
void |
setCustomUserData(java.lang.String customUserData)
Arbitrary user data to associate with the endpoint. |
void |
setPlatformApplicationArn(java.lang.String platformApplicationArn)
PlatformApplicationArn returned from CreatePlatformApplication is used to create a an endpoint. |
void |
setToken(java.lang.String token)
Unique identifier created by the notification service for an app on a device. |
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and debugging. |
CreatePlatformEndpointRequest |
withAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
For a list of attributes, see SetEndpointAttributes. |
CreatePlatformEndpointRequest |
withCustomUserData(java.lang.String customUserData)
Arbitrary user data to associate with the endpoint. |
CreatePlatformEndpointRequest |
withPlatformApplicationArn(java.lang.String platformApplicationArn)
PlatformApplicationArn returned from CreatePlatformApplication is used to create a an endpoint. |
CreatePlatformEndpointRequest |
withToken(java.lang.String token)
Unique identifier created by the notification service for an app on a device. |
Methods inherited from class com.amazonaws.AmazonWebServiceRequest |
---|
copyPrivateRequestParameters, getDelegationToken, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setDelegationToken, setRequestCredentials, setRequestMetricCollector, withRequestMetricCollector |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CreatePlatformEndpointRequest()
Method Detail |
---|
public java.lang.String getPlatformApplicationArn()
public void setPlatformApplicationArn(java.lang.String platformApplicationArn)
platformApplicationArn
- PlatformApplicationArn returned from CreatePlatformApplication is used
to create a an endpoint.public CreatePlatformEndpointRequest withPlatformApplicationArn(java.lang.String platformApplicationArn)
Returns a reference to this object so that method calls can be chained together.
platformApplicationArn
- PlatformApplicationArn returned from CreatePlatformApplication is used
to create a an endpoint.
public java.lang.String getToken()
public void setToken(java.lang.String token)
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.public CreatePlatformEndpointRequest withToken(java.lang.String token)
Returns a reference to this object so that method calls can be chained together.
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.
public java.lang.String getCustomUserData()
public void setCustomUserData(java.lang.String customUserData)
customUserData
- Arbitrary user data to associate with the endpoint. Amazon SNS does
not use this data. The data must be in UTF-8 format and less than 2KB.public CreatePlatformEndpointRequest withCustomUserData(java.lang.String customUserData)
Returns a reference to this object so that method calls can be chained together.
customUserData
- Arbitrary user data to associate with the endpoint. Amazon SNS does
not use this data. The data must be in UTF-8 format and less than 2KB.
public java.util.Map<java.lang.String,java.lang.String> getAttributes()
public void setAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
attributes
- For a list of attributes, see SetEndpointAttributes.public CreatePlatformEndpointRequest withAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
Returns a reference to this object so that method calls can be chained together.
attributes
- For a list of attributes, see SetEndpointAttributes.
public CreatePlatformEndpointRequest addAttributesEntry(java.lang.String key, java.lang.String value)
The method adds a new key-value pair into Attributes parameter, and returns a reference to this object so that method calls can be chained together.
key
- The key of the entry to be added into Attributes.value
- The corresponding value of the entry to be added into Attributes.public CreatePlatformEndpointRequest clearAttributesEntries()
Returns a reference to this object so that method calls can be chained together.
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |