public class EndpointProfile
extends java.lang.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(java.lang.String name,
java.util.List<java.lang.String> values)
Adds a custom attribute to this
EndpointProfile with the specified key. |
void |
addMetric(java.lang.String name,
java.lang.Double value)
Adds a metric to this
EndpointProfile with the specified key. |
java.lang.String |
getAddress()
Returns the Address of the endpoint.
|
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getAllAttributes()
Returns a map of all custom attributes contained within this
EndpointProfile |
java.util.Map<java.lang.String,java.lang.Double> |
getAllMetrics()
Returns a map of all metrics contained within this
EndpointProfile |
java.lang.String |
getApplicationId()
Returns the Mobile Analytics application Id
|
java.util.List<java.lang.String> |
getAttribute(java.lang.String name)
Returns the array of values of the custom attribute with the specified name.
|
java.lang.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.
|
java.lang.String |
getEndpointId()
Returns the EndpointProfile Identifier of the device
|
EndpointProfileLocation |
getLocation()
Returns the Location facet of the endpoint.
|
java.lang.Double |
getMetric(java.lang.String name)
Returns the value of the metric with the specified name.
|
java.lang.String |
getOptOut()
Returns weather the endpoint is opted out of notification.
|
EndpointProfileUser |
getUser()
Returns the User facet of the endpoint.
|
boolean |
hasAttribute(java.lang.String attributeName)
Determines if this
EndpointProfile contains a specific custom attribute |
boolean |
hasMetric(java.lang.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() |
java.lang.String |
toString() |
EndpointProfile |
withAttribute(java.lang.String name,
java.util.List<java.lang.String> values)
Adds a custom attribute to this
EndpointProfile with the specified key. |
EndpointProfile |
withMetric(java.lang.String name,
java.lang.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 java.lang.String getApplicationId()
public java.lang.String getEndpointId()
public java.lang.String getChannelType()
public java.lang.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 java.lang.String getOptOut()
public void addAttribute(java.lang.String name, java.util.List<java.lang.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(java.lang.String attributeName)
EndpointProfile
contains a specific custom attributeattributeName
- The name of the custom attributeEndpointProfile
has a custom attribute with the
specified name, false otherwisepublic java.util.List<java.lang.String> getAttribute(java.lang.String name)
name
- The name of the custom attribute to returnpublic EndpointProfile withAttribute(java.lang.String name, java.util.List<java.lang.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 java.util.Map<java.lang.String,java.util.List<java.lang.String>> getAllAttributes()
EndpointProfile
public void addMetric(java.lang.String name, java.lang.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(java.lang.String metricName)
EndpointProfile
contains a specific metric.metricName
- The name of the metricEndpointProfile
has a metric with the
specified name, false otherwisepublic java.lang.Double getMetric(java.lang.String name)
name
- The name of the metric to returnpublic EndpointProfile withMetric(java.lang.String name, java.lang.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 java.util.Map<java.lang.String,java.lang.Double> getAllMetrics()
EndpointProfile
public EndpointProfileUser getUser()
public void setUser(EndpointProfileUser user)
user
- The user facetpublic java.lang.String toString()
toString
in class java.lang.Object
public org.json.JSONObject toJSONObject()
toJSONObject
in interface com.amazonaws.mobileconnectors.pinpoint.internal.core.util.JSONSerializable
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.