Package com.launchdarkly.api.model
Class MetricPost
- java.lang.Object
-
- com.launchdarkly.api.model.MetricPost
-
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2023-11-16T23:57:26.096741Z[Etc/UTC]") public class MetricPost extends java.lang.Object
MetricPost
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MetricPost.CustomTypeAdapterFactory
static class
MetricPost.KindEnum
The kind of event your metric will trackstatic class
MetricPost.SuccessCriteriaEnum
Success criteria.static class
MetricPost.UnitAggregationTypeEnum
The method in which multiple unit event values are aggregated
-
Field Summary
Fields Modifier and Type Field Description static java.util.HashSet<java.lang.String>
openapiFields
static java.util.HashSet<java.lang.String>
openapiRequiredFields
static java.lang.String
SERIALIZED_NAME_DESCRIPTION
static java.lang.String
SERIALIZED_NAME_EVENT_KEY
static java.lang.String
SERIALIZED_NAME_IS_ACTIVE
static java.lang.String
SERIALIZED_NAME_IS_NUMERIC
static java.lang.String
SERIALIZED_NAME_KEY
static java.lang.String
SERIALIZED_NAME_KIND
static java.lang.String
SERIALIZED_NAME_NAME
static java.lang.String
SERIALIZED_NAME_RANDOMIZATION_UNITS
static java.lang.String
SERIALIZED_NAME_SELECTOR
static java.lang.String
SERIALIZED_NAME_SUCCESS_CRITERIA
static java.lang.String
SERIALIZED_NAME_TAGS
static java.lang.String
SERIALIZED_NAME_UNIT
static java.lang.String
SERIALIZED_NAME_UNIT_AGGREGATION_TYPE
static java.lang.String
SERIALIZED_NAME_URLS
-
Constructor Summary
Constructors Constructor Description MetricPost()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MetricPost
addRandomizationUnitsItem(java.lang.String randomizationUnitsItem)
MetricPost
addTagsItem(java.lang.String tagsItem)
MetricPost
addUrlsItem(UrlPost urlsItem)
MetricPost
description(java.lang.String description)
boolean
equals(java.lang.Object o)
MetricPost
eventKey(java.lang.String eventKey)
static MetricPost
fromJson(java.lang.String jsonString)
Create an instance of MetricPost given an JSON stringjava.util.Map<java.lang.String,java.lang.Object>
getAdditionalProperties()
Return the additional (undeclared) property.java.lang.Object
getAdditionalProperty(java.lang.String key)
Return the additional (undeclared) property with the specified name.java.lang.String
getDescription()
Description of the metricjava.lang.String
getEventKey()
The event key to use in your code.java.lang.Boolean
getIsActive()
Whether the metric is active.java.lang.Boolean
getIsNumeric()
Whether to track numeric changes in value against a baseline (<code>true</code>) or to track a conversion when an end user takes an action (<code>false</code>).java.lang.String
getKey()
A unique key to reference the metricMetricPost.KindEnum
getKind()
The kind of event your metric will trackjava.lang.String
getName()
A human-friendly name for the metricjava.util.List<java.lang.String>
getRandomizationUnits()
An array of randomization units allowed for this metricjava.lang.String
getSelector()
One or more CSS selectors.MetricPost.SuccessCriteriaEnum
getSuccessCriteria()
Success criteria.java.util.List<java.lang.String>
getTags()
Tags for the metricjava.lang.String
getUnit()
The unit of measure.MetricPost.UnitAggregationTypeEnum
getUnitAggregationType()
The method in which multiple unit event values are aggregatedjava.util.List<UrlPost>
getUrls()
One or more target URLs.int
hashCode()
MetricPost
isActive(java.lang.Boolean isActive)
MetricPost
isNumeric(java.lang.Boolean isNumeric)
MetricPost
key(java.lang.String key)
MetricPost
kind(MetricPost.KindEnum kind)
MetricPost
name(java.lang.String name)
MetricPost
putAdditionalProperty(java.lang.String key, java.lang.Object value)
Set the additional (undeclared) property with the specified name and value.MetricPost
randomizationUnits(java.util.List<java.lang.String> randomizationUnits)
MetricPost
selector(java.lang.String selector)
void
setDescription(java.lang.String description)
void
setEventKey(java.lang.String eventKey)
void
setIsActive(java.lang.Boolean isActive)
void
setIsNumeric(java.lang.Boolean isNumeric)
void
setKey(java.lang.String key)
void
setKind(MetricPost.KindEnum kind)
void
setName(java.lang.String name)
void
setRandomizationUnits(java.util.List<java.lang.String> randomizationUnits)
void
setSelector(java.lang.String selector)
void
setSuccessCriteria(MetricPost.SuccessCriteriaEnum successCriteria)
void
setTags(java.util.List<java.lang.String> tags)
void
setUnit(java.lang.String unit)
void
setUnitAggregationType(MetricPost.UnitAggregationTypeEnum unitAggregationType)
void
setUrls(java.util.List<UrlPost> urls)
MetricPost
successCriteria(MetricPost.SuccessCriteriaEnum successCriteria)
MetricPost
tags(java.util.List<java.lang.String> tags)
java.lang.String
toJson()
Convert an instance of MetricPost to an JSON stringjava.lang.String
toString()
MetricPost
unit(java.lang.String unit)
MetricPost
unitAggregationType(MetricPost.UnitAggregationTypeEnum unitAggregationType)
MetricPost
urls(java.util.List<UrlPost> urls)
static void
validateJsonObject(com.google.gson.JsonObject jsonObj)
Validates the JSON Object and throws an exception if issues found
-
-
-
Field Detail
-
SERIALIZED_NAME_KEY
public static final java.lang.String SERIALIZED_NAME_KEY
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_NAME
public static final java.lang.String SERIALIZED_NAME_NAME
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_DESCRIPTION
public static final java.lang.String SERIALIZED_NAME_DESCRIPTION
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_KIND
public static final java.lang.String SERIALIZED_NAME_KIND
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_SELECTOR
public static final java.lang.String SERIALIZED_NAME_SELECTOR
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_URLS
public static final java.lang.String SERIALIZED_NAME_URLS
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_IS_ACTIVE
public static final java.lang.String SERIALIZED_NAME_IS_ACTIVE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_IS_NUMERIC
public static final java.lang.String SERIALIZED_NAME_IS_NUMERIC
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_UNIT
public static final java.lang.String SERIALIZED_NAME_UNIT
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_EVENT_KEY
public static final java.lang.String SERIALIZED_NAME_EVENT_KEY
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_SUCCESS_CRITERIA
public static final java.lang.String SERIALIZED_NAME_SUCCESS_CRITERIA
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_TAGS
public static final java.lang.String SERIALIZED_NAME_TAGS
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_RANDOMIZATION_UNITS
public static final java.lang.String SERIALIZED_NAME_RANDOMIZATION_UNITS
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_UNIT_AGGREGATION_TYPE
public static final java.lang.String SERIALIZED_NAME_UNIT_AGGREGATION_TYPE
- See Also:
- Constant Field Values
-
openapiFields
public static java.util.HashSet<java.lang.String> openapiFields
-
openapiRequiredFields
public static java.util.HashSet<java.lang.String> openapiRequiredFields
-
-
Method Detail
-
key
public MetricPost key(java.lang.String key)
-
getKey
@Nonnull public java.lang.String getKey()
A unique key to reference the metric- Returns:
- key
-
setKey
public void setKey(java.lang.String key)
-
name
public MetricPost name(java.lang.String name)
-
getName
@Nullable public java.lang.String getName()
A human-friendly name for the metric- Returns:
- name
-
setName
public void setName(java.lang.String name)
-
description
public MetricPost description(java.lang.String description)
-
getDescription
@Nullable public java.lang.String getDescription()
Description of the metric- Returns:
- description
-
setDescription
public void setDescription(java.lang.String description)
-
kind
public MetricPost kind(MetricPost.KindEnum kind)
-
getKind
@Nonnull public MetricPost.KindEnum getKind()
The kind of event your metric will track- Returns:
- kind
-
setKind
public void setKind(MetricPost.KindEnum kind)
-
selector
public MetricPost selector(java.lang.String selector)
-
getSelector
@Nullable public java.lang.String getSelector()
One or more CSS selectors. Required for click metrics only.- Returns:
- selector
-
setSelector
public void setSelector(java.lang.String selector)
-
urls
public MetricPost urls(java.util.List<UrlPost> urls)
-
addUrlsItem
public MetricPost addUrlsItem(UrlPost urlsItem)
-
getUrls
@Nullable public java.util.List<UrlPost> getUrls()
One or more target URLs. Required for click and pageview metrics only.- Returns:
- urls
-
setUrls
public void setUrls(java.util.List<UrlPost> urls)
-
isActive
public MetricPost isActive(java.lang.Boolean isActive)
-
getIsActive
@Nullable public java.lang.Boolean getIsActive()
Whether the metric is active. Set to <code>true</code> to record click or pageview metrics. Not applicable for custom metrics.- Returns:
- isActive
-
setIsActive
public void setIsActive(java.lang.Boolean isActive)
-
isNumeric
public MetricPost isNumeric(java.lang.Boolean isNumeric)
-
getIsNumeric
@Nullable public java.lang.Boolean getIsNumeric()
Whether to track numeric changes in value against a baseline (<code>true</code>) or to track a conversion when an end user takes an action (<code>false</code>). Required for custom metrics only.- Returns:
- isNumeric
-
setIsNumeric
public void setIsNumeric(java.lang.Boolean isNumeric)
-
unit
public MetricPost unit(java.lang.String unit)
-
getUnit
@Nullable public java.lang.String getUnit()
The unit of measure. Applicable for numeric custom metrics only.- Returns:
- unit
-
setUnit
public void setUnit(java.lang.String unit)
-
eventKey
public MetricPost eventKey(java.lang.String eventKey)
-
getEventKey
@Nullable public java.lang.String getEventKey()
The event key to use in your code. Required for custom metrics only.- Returns:
- eventKey
-
setEventKey
public void setEventKey(java.lang.String eventKey)
-
successCriteria
public MetricPost successCriteria(MetricPost.SuccessCriteriaEnum successCriteria)
-
getSuccessCriteria
@Nullable public MetricPost.SuccessCriteriaEnum getSuccessCriteria()
Success criteria. Required for custom numeric metrics, optional for custom conversion metrics.- Returns:
- successCriteria
-
setSuccessCriteria
public void setSuccessCriteria(MetricPost.SuccessCriteriaEnum successCriteria)
-
tags
public MetricPost tags(java.util.List<java.lang.String> tags)
-
addTagsItem
public MetricPost addTagsItem(java.lang.String tagsItem)
-
getTags
@Nullable public java.util.List<java.lang.String> getTags()
Tags for the metric- Returns:
- tags
-
setTags
public void setTags(java.util.List<java.lang.String> tags)
-
randomizationUnits
public MetricPost randomizationUnits(java.util.List<java.lang.String> randomizationUnits)
-
addRandomizationUnitsItem
public MetricPost addRandomizationUnitsItem(java.lang.String randomizationUnitsItem)
-
getRandomizationUnits
@Nullable public java.util.List<java.lang.String> getRandomizationUnits()
An array of randomization units allowed for this metric- Returns:
- randomizationUnits
-
setRandomizationUnits
public void setRandomizationUnits(java.util.List<java.lang.String> randomizationUnits)
-
unitAggregationType
public MetricPost unitAggregationType(MetricPost.UnitAggregationTypeEnum unitAggregationType)
-
getUnitAggregationType
@Nullable public MetricPost.UnitAggregationTypeEnum getUnitAggregationType()
The method in which multiple unit event values are aggregated- Returns:
- unitAggregationType
-
setUnitAggregationType
public void setUnitAggregationType(MetricPost.UnitAggregationTypeEnum unitAggregationType)
-
putAdditionalProperty
public MetricPost putAdditionalProperty(java.lang.String key, java.lang.Object value)
Set the additional (undeclared) property with the specified name and value. If the property does not already exist, create it otherwise replace it.
-
getAdditionalProperties
public java.util.Map<java.lang.String,java.lang.Object> getAdditionalProperties()
Return the additional (undeclared) property.
-
getAdditionalProperty
public java.lang.Object getAdditionalProperty(java.lang.String key)
Return the additional (undeclared) property with the specified name.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
validateJsonObject
public static void validateJsonObject(com.google.gson.JsonObject jsonObj) throws java.io.IOException
Validates the JSON Object and throws an exception if issues found- Parameters:
jsonObj
- JSON Object- Throws:
java.io.IOException
- if the JSON Object is invalid with respect to MetricPost
-
fromJson
public static MetricPost fromJson(java.lang.String jsonString) throws java.io.IOException
Create an instance of MetricPost given an JSON string- Parameters:
jsonString
- JSON string- Returns:
- An instance of MetricPost
- Throws:
java.io.IOException
- if the JSON string is invalid with respect to MetricPost
-
toJson
public java.lang.String toJson()
Convert an instance of MetricPost to an JSON string- Returns:
- JSON string
-
-