@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class MetricDefinition extends Object implements Serializable, Cloneable, StructuredPojo
A structure that displays the definition of one extended metric that RUM sends to CloudWatch or CloudWatch Evidently. For more information, see Additional metrics that you can send to CloudWatch and CloudWatch Evidently.
Constructor and Description |
---|
MetricDefinition() |
Modifier and Type | Method and Description |
---|---|
MetricDefinition |
addDimensionKeysEntry(String key,
String value)
Add a single DimensionKeys entry
|
MetricDefinition |
clearDimensionKeysEntries()
Removes all the entries added into DimensionKeys.
|
MetricDefinition |
clone() |
boolean |
equals(Object obj) |
Map<String,String> |
getDimensionKeys()
This field is a map of field paths to dimension names.
|
String |
getEventPattern()
The pattern that defines the metric.
|
String |
getMetricDefinitionId()
The ID of this metric definition.
|
String |
getName()
The name of the metric that is defined in this structure.
|
String |
getNamespace()
If this metric definition is for a custom metric instead of an extended metric, this field displays the metric
namespace that the custom metric is published to.
|
String |
getUnitLabel()
Use this field only if you are sending this metric to CloudWatch.
|
String |
getValueKey()
The field within the event object that the metric value is sourced from.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setDimensionKeys(Map<String,String> dimensionKeys)
This field is a map of field paths to dimension names.
|
void |
setEventPattern(String eventPattern)
The pattern that defines the metric.
|
void |
setMetricDefinitionId(String metricDefinitionId)
The ID of this metric definition.
|
void |
setName(String name)
The name of the metric that is defined in this structure.
|
void |
setNamespace(String namespace)
If this metric definition is for a custom metric instead of an extended metric, this field displays the metric
namespace that the custom metric is published to.
|
void |
setUnitLabel(String unitLabel)
Use this field only if you are sending this metric to CloudWatch.
|
void |
setValueKey(String valueKey)
The field within the event object that the metric value is sourced from.
|
String |
toString()
Returns a string representation of this object.
|
MetricDefinition |
withDimensionKeys(Map<String,String> dimensionKeys)
This field is a map of field paths to dimension names.
|
MetricDefinition |
withEventPattern(String eventPattern)
The pattern that defines the metric.
|
MetricDefinition |
withMetricDefinitionId(String metricDefinitionId)
The ID of this metric definition.
|
MetricDefinition |
withName(String name)
The name of the metric that is defined in this structure.
|
MetricDefinition |
withNamespace(String namespace)
If this metric definition is for a custom metric instead of an extended metric, this field displays the metric
namespace that the custom metric is published to.
|
MetricDefinition |
withUnitLabel(String unitLabel)
Use this field only if you are sending this metric to CloudWatch.
|
MetricDefinition |
withValueKey(String valueKey)
The field within the event object that the metric value is sourced from.
|
public Map<String,String> getDimensionKeys()
This field is a map of field paths to dimension names. It defines the dimensions to associate with this metric in
CloudWatch The value of this field is used only if the metric destination is CloudWatch
. If the
metric destination is Evidently
, the value of DimensionKeys
is ignored.
CloudWatch
. If the metric destination is Evidently
, the value of
DimensionKeys
is ignored.public void setDimensionKeys(Map<String,String> dimensionKeys)
This field is a map of field paths to dimension names. It defines the dimensions to associate with this metric in
CloudWatch The value of this field is used only if the metric destination is CloudWatch
. If the
metric destination is Evidently
, the value of DimensionKeys
is ignored.
dimensionKeys
- This field is a map of field paths to dimension names. It defines the dimensions to associate with this
metric in CloudWatch The value of this field is used only if the metric destination is
CloudWatch
. If the metric destination is Evidently
, the value of
DimensionKeys
is ignored.public MetricDefinition withDimensionKeys(Map<String,String> dimensionKeys)
This field is a map of field paths to dimension names. It defines the dimensions to associate with this metric in
CloudWatch The value of this field is used only if the metric destination is CloudWatch
. If the
metric destination is Evidently
, the value of DimensionKeys
is ignored.
dimensionKeys
- This field is a map of field paths to dimension names. It defines the dimensions to associate with this
metric in CloudWatch The value of this field is used only if the metric destination is
CloudWatch
. If the metric destination is Evidently
, the value of
DimensionKeys
is ignored.public MetricDefinition addDimensionKeysEntry(String key, String value)
public MetricDefinition clearDimensionKeysEntries()
public void setEventPattern(String eventPattern)
The pattern that defines the metric. RUM checks events that happen in a user's session against the pattern, and events that match the pattern are sent to the metric destination.
If the metrics destination is CloudWatch
and the event also matches a value in
DimensionKeys
, then the metric is published with the specified dimensions.
eventPattern
- The pattern that defines the metric. RUM checks events that happen in a user's session against the
pattern, and events that match the pattern are sent to the metric destination.
If the metrics destination is CloudWatch
and the event also matches a value in
DimensionKeys
, then the metric is published with the specified dimensions.
public String getEventPattern()
The pattern that defines the metric. RUM checks events that happen in a user's session against the pattern, and events that match the pattern are sent to the metric destination.
If the metrics destination is CloudWatch
and the event also matches a value in
DimensionKeys
, then the metric is published with the specified dimensions.
If the metrics destination is CloudWatch
and the event also matches a value in
DimensionKeys
, then the metric is published with the specified dimensions.
public MetricDefinition withEventPattern(String eventPattern)
The pattern that defines the metric. RUM checks events that happen in a user's session against the pattern, and events that match the pattern are sent to the metric destination.
If the metrics destination is CloudWatch
and the event also matches a value in
DimensionKeys
, then the metric is published with the specified dimensions.
eventPattern
- The pattern that defines the metric. RUM checks events that happen in a user's session against the
pattern, and events that match the pattern are sent to the metric destination.
If the metrics destination is CloudWatch
and the event also matches a value in
DimensionKeys
, then the metric is published with the specified dimensions.
public void setMetricDefinitionId(String metricDefinitionId)
The ID of this metric definition.
metricDefinitionId
- The ID of this metric definition.public String getMetricDefinitionId()
The ID of this metric definition.
public MetricDefinition withMetricDefinitionId(String metricDefinitionId)
The ID of this metric definition.
metricDefinitionId
- The ID of this metric definition.public void setName(String name)
The name of the metric that is defined in this structure.
name
- The name of the metric that is defined in this structure.public String getName()
The name of the metric that is defined in this structure.
public MetricDefinition withName(String name)
The name of the metric that is defined in this structure.
name
- The name of the metric that is defined in this structure.public void setNamespace(String namespace)
If this metric definition is for a custom metric instead of an extended metric, this field displays the metric namespace that the custom metric is published to.
namespace
- If this metric definition is for a custom metric instead of an extended metric, this field displays the
metric namespace that the custom metric is published to.public String getNamespace()
If this metric definition is for a custom metric instead of an extended metric, this field displays the metric namespace that the custom metric is published to.
public MetricDefinition withNamespace(String namespace)
If this metric definition is for a custom metric instead of an extended metric, this field displays the metric namespace that the custom metric is published to.
namespace
- If this metric definition is for a custom metric instead of an extended metric, this field displays the
metric namespace that the custom metric is published to.public void setUnitLabel(String unitLabel)
Use this field only if you are sending this metric to CloudWatch. It defines the CloudWatch metric unit that this metric is measured in.
unitLabel
- Use this field only if you are sending this metric to CloudWatch. It defines the CloudWatch metric unit
that this metric is measured in.public String getUnitLabel()
Use this field only if you are sending this metric to CloudWatch. It defines the CloudWatch metric unit that this metric is measured in.
public MetricDefinition withUnitLabel(String unitLabel)
Use this field only if you are sending this metric to CloudWatch. It defines the CloudWatch metric unit that this metric is measured in.
unitLabel
- Use this field only if you are sending this metric to CloudWatch. It defines the CloudWatch metric unit
that this metric is measured in.public void setValueKey(String valueKey)
The field within the event object that the metric value is sourced from.
valueKey
- The field within the event object that the metric value is sourced from.public String getValueKey()
The field within the event object that the metric value is sourced from.
public MetricDefinition withValueKey(String valueKey)
The field within the event object that the metric value is sourced from.
valueKey
- The field within the event object that the metric value is sourced from.public String toString()
toString
in class Object
Object.toString()
public MetricDefinition clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.