public class EndpointProfile extends Object implements com.amazonaws.mobileconnectors.pinpoint.internal.core.util.JSONSerializable
Constructor and Description |
---|
EndpointProfile(com.amazonaws.mobileconnectors.pinpoint.internal.core.PinpointContext pinpointContext)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addAttribute(String name,
List<String> values)
Adds a custom attribute to this
EndpointProfile with the specified key. |
void |
addMetric(String name,
Double value)
Adds a metric to this
EndpointProfile with the specified key. |
String |
getAddress()
Returns the Address of the endpoint.
|
Map<String,List<String>> |
getAllAttributes()
Returns a map of all custom attributes contained within this
EndpointProfile |
Map<String,Double> |
getAllMetrics()
Returns a map of all metrics contained within this
EndpointProfile |
String |
getApplicationId()
Returns the Mobile Analytics application Id
|
List<String> |
getAttribute(String name)
Returns the array of values of the custom attribute with the specified name.
|
String |
getChannelType()
Returns the Channel Type of this endpoint, currently defaults to GCM
|
EndpointProfileDemographic |
getDemographic()
Returns the Demographic facet of the endpoint.
|
long |
getEffectiveDate()
Returns the effective date of the endpoint.
|
String |
getEndpointId()
Returns the EndpointProfile Identifier of the device
|
EndpointProfileLocation |
getLocation()
Returns the Location facet of the endpoint.
|
Double |
getMetric(String name)
Returns the value of the metric with the specified name.
|
String |
getOptOut()
Returns weather the endpoint is opted out of notification.
|
EndpointProfileUser |
getUser()
Returns the User facet of the endpoint.
|
boolean |
hasAttribute(String attributeName)
Determines if this
EndpointProfile contains a specific custom attribute |
boolean |
hasMetric(String metricName)
Determines if this
EndpointProfile contains a specific metric. |
void |
setDemographic(EndpointProfileDemographic demographic)
Sets the Demographic facet of the endpoint.
|
void |
setEffectiveDate(long effectiveDate)
Sets the effectiveDate of the endpoint.
|
void |
setLocation(EndpointProfileLocation location)
Sets the Location facet of the endpoint.
|
void |
setUser(EndpointProfileUser user)
Sets the User facet of the endpoint.
|
org.json.JSONObject |
toJSONObject() |
String |
toString() |
EndpointProfile |
withAttribute(String name,
List<String> values)
Adds a custom attribute to this
EndpointProfile with the specified key. |
EndpointProfile |
withMetric(String name,
Double value)
Adds a metric to this
EndpointProfile with the specified key. |
public EndpointProfile(com.amazonaws.mobileconnectors.pinpoint.internal.core.PinpointContext pinpointContext)
pinpointContext
- the pinpoint context.public String getApplicationId()
public String getEndpointId()
public String getChannelType()
public String getAddress()
public EndpointProfileDemographic getDemographic()
public void setDemographic(EndpointProfileDemographic demographic)
demographic
- The demographic facet.public EndpointProfileLocation getLocation()
public void setLocation(EndpointProfileLocation location)
location
- The location facet.public long getEffectiveDate()
public void setEffectiveDate(long effectiveDate)
effectiveDate
- The demographic facet.public String getOptOut()
public void addAttribute(String name, List<String> values)
EndpointProfile
with the specified key.
Only 20 custom attributes/metrics are allowed to be added to a EndpointProfile. If 20
attributes already exist on this EndpointProfile, the call may be ignored.name
- The name of the custom attribute. The name will be truncated if it
exceeds 50 characters.values
- An array of values of the custom attribute. The values will be truncated if
it exceeds 100 characters.public boolean hasAttribute(String attributeName)
EndpointProfile
contains a specific custom attributeattributeName
- The name of the custom attributeEndpointProfile
has a custom attribute with the
specified name, false otherwisepublic List<String> getAttribute(String name)
name
- The name of the custom attribute to returnpublic EndpointProfile withAttribute(String name, List<String> values)
EndpointProfile
with the specified key.
Only 20 custom attributes are allowed to be added to an
EndpointProfile
. If 20 custom attributes/metrics already exist on this
EndpointProfile
, the call may be ignored.name
- The name of the custom attribute. The name will be truncated if it
exceeds 50 characters.values
- An array of values of the custom attribute. The values will be truncated if
it exceeds 100 characters.EndpointProfile
instance is returned to allow for
method chaining.public Map<String,List<String>> getAllAttributes()
EndpointProfile
public void addMetric(String name, Double value)
EndpointProfile
with the specified key. Only
20 attributes/metrics are allowed to be added to an Event. If 20
attribute/metrics already exist on this Event, the call may be ignored.name
- The name of the metric. The name will be truncated if it
exceeds 50 characters.value
- The value of the metric.public boolean hasMetric(String metricName)
EndpointProfile
contains a specific metric.metricName
- The name of the metricEndpointProfile
has a metric with the
specified name, false otherwisepublic Double getMetric(String name)
name
- The name of the metric to returnpublic EndpointProfile withMetric(String name, Double value)
EndpointProfile
with the specified key. Only
20 attributes/metrics are allowed to be added to an
EndpointProfile
. If 20 attribute/metrics already exist on this
EndpointProfile
, the call may be ignored.name
- The name of the metric. The name will be truncated if it
exceeds 50 characters.value
- The value of the metric.EndpointProfile
instance is returned to allow for
method chaining.public Map<String,Double> getAllMetrics()
EndpointProfile
public EndpointProfileUser getUser()
public void setUser(EndpointProfileUser user)
user
- The user facetpublic org.json.JSONObject toJSONObject()
toJSONObject
in interface com.amazonaws.mobileconnectors.pinpoint.internal.core.util.JSONSerializable
Copyright © 2019. All rights reserved.