Package com.launchdarkly.api.model
Class MetricPost
- java.lang.Object
-
- com.launchdarkly.api.model.MetricPost
-
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2026-03-05T10:45:26.516033Z[Etc/UTC]", comments="Generator version: 7.18.0") public class MetricPost extends java.lang.ObjectMetricPost
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMetricPost.CustomTypeAdapterFactorystatic classMetricPost.KindEnumThe kind of event your metric will trackstatic classMetricPost.SuccessCriteriaEnumSuccess criteria.static classMetricPost.UnitAggregationTypeEnumThe method by which multiple unit event values are aggregated
-
Field Summary
Fields Modifier and Type Field Description static java.util.HashSet<java.lang.String>openapiFieldsstatic java.util.HashSet<java.lang.String>openapiRequiredFieldsstatic java.lang.StringSERIALIZED_NAME_ANALYSIS_TYPEstatic java.lang.StringSERIALIZED_NAME_DATA_SOURCEstatic java.lang.StringSERIALIZED_NAME_DESCRIPTIONstatic java.lang.StringSERIALIZED_NAME_EVENT_DEFAULTstatic java.lang.StringSERIALIZED_NAME_EVENT_KEYstatic java.lang.StringSERIALIZED_NAME_FILTERSstatic java.lang.StringSERIALIZED_NAME_IS_NUMERICstatic java.lang.StringSERIALIZED_NAME_KEYstatic java.lang.StringSERIALIZED_NAME_KINDstatic java.lang.StringSERIALIZED_NAME_MAINTAINER_IDstatic java.lang.StringSERIALIZED_NAME_NAMEstatic java.lang.StringSERIALIZED_NAME_PERCENTILE_VALUEstatic java.lang.StringSERIALIZED_NAME_RANDOMIZATION_UNITSstatic java.lang.StringSERIALIZED_NAME_SELECTORstatic java.lang.StringSERIALIZED_NAME_SUCCESS_CRITERIAstatic java.lang.StringSERIALIZED_NAME_TAGSstatic java.lang.StringSERIALIZED_NAME_UNITstatic java.lang.StringSERIALIZED_NAME_UNIT_AGGREGATION_TYPEstatic java.lang.StringSERIALIZED_NAME_URLS
-
Constructor Summary
Constructors Constructor Description MetricPost()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MetricPostaddRandomizationUnitsItem(java.lang.String randomizationUnitsItem)MetricPostaddTagsItem(java.lang.String tagsItem)MetricPostaddUrlsItem(UrlPost urlsItem)MetricPostanalysisType(java.lang.String analysisType)MetricPostdataSource(MetricDataSourceRefRep dataSource)MetricPostdescription(java.lang.String description)booleanequals(java.lang.Object o)MetricPosteventDefault(MetricEventDefaultRep eventDefault)MetricPosteventKey(java.lang.String eventKey)MetricPostfilters(EventFilter filters)static MetricPostfromJson(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.ObjectgetAdditionalProperty(java.lang.String key)Return the additional (undeclared) property with the specified name.java.lang.StringgetAnalysisType()The method for analyzing metric eventsMetricDataSourceRefRepgetDataSource()Get dataSourcejava.lang.StringgetDescription()Description of the metricMetricEventDefaultRepgetEventDefault()Get eventDefaultjava.lang.StringgetEventKey()The event key to use in your code.EventFiltergetFilters()Get filtersjava.lang.BooleangetIsNumeric()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.StringgetKey()A unique key to reference the metricMetricPost.KindEnumgetKind()The kind of event your metric will trackjava.lang.StringgetMaintainerId()The ID of the member who maintains this metricjava.lang.StringgetName()A human-friendly name for the metricjava.lang.IntegergetPercentileValue()The percentile for the analysis method.java.util.List<java.lang.String>getRandomizationUnits()An array of randomization units allowed for this metricjava.lang.StringgetSelector()One or more CSS selectors.MetricPost.SuccessCriteriaEnumgetSuccessCriteria()Success criteria.java.util.List<java.lang.String>getTags()Tags for the metricjava.lang.StringgetUnit()The unit of measure.MetricPost.UnitAggregationTypeEnumgetUnitAggregationType()The method by which multiple unit event values are aggregatedjava.util.List<UrlPost>getUrls()One or more target URLs.inthashCode()MetricPostisNumeric(java.lang.Boolean isNumeric)MetricPostkey(java.lang.String key)MetricPostkind(MetricPost.KindEnum kind)MetricPostmaintainerId(java.lang.String maintainerId)MetricPostname(java.lang.String name)MetricPostpercentileValue(java.lang.Integer percentileValue)MetricPostputAdditionalProperty(java.lang.String key, java.lang.Object value)Set the additional (undeclared) property with the specified name and value.MetricPostrandomizationUnits(java.util.List<java.lang.String> randomizationUnits)MetricPostselector(java.lang.String selector)voidsetAnalysisType(java.lang.String analysisType)voidsetDataSource(MetricDataSourceRefRep dataSource)voidsetDescription(java.lang.String description)voidsetEventDefault(MetricEventDefaultRep eventDefault)voidsetEventKey(java.lang.String eventKey)voidsetFilters(EventFilter filters)voidsetIsNumeric(java.lang.Boolean isNumeric)voidsetKey(java.lang.String key)voidsetKind(MetricPost.KindEnum kind)voidsetMaintainerId(java.lang.String maintainerId)voidsetName(java.lang.String name)voidsetPercentileValue(java.lang.Integer percentileValue)voidsetRandomizationUnits(java.util.List<java.lang.String> randomizationUnits)voidsetSelector(java.lang.String selector)voidsetSuccessCriteria(MetricPost.SuccessCriteriaEnum successCriteria)voidsetTags(java.util.List<java.lang.String> tags)voidsetUnit(java.lang.String unit)voidsetUnitAggregationType(MetricPost.UnitAggregationTypeEnum unitAggregationType)voidsetUrls(java.util.List<UrlPost> urls)MetricPostsuccessCriteria(MetricPost.SuccessCriteriaEnum successCriteria)MetricPosttags(java.util.List<java.lang.String> tags)java.lang.StringtoJson()Convert an instance of MetricPost to an JSON stringjava.lang.StringtoString()MetricPostunit(java.lang.String unit)MetricPostunitAggregationType(MetricPost.UnitAggregationTypeEnum unitAggregationType)MetricPosturls(java.util.List<UrlPost> urls)static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement)Validates the JSON Element 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_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_MAINTAINER_ID
public static final java.lang.String SERIALIZED_NAME_MAINTAINER_ID
- 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
-
SERIALIZED_NAME_ANALYSIS_TYPE
public static final java.lang.String SERIALIZED_NAME_ANALYSIS_TYPE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_PERCENTILE_VALUE
public static final java.lang.String SERIALIZED_NAME_PERCENTILE_VALUE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_EVENT_DEFAULT
public static final java.lang.String SERIALIZED_NAME_EVENT_DEFAULT
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_DATA_SOURCE
public static final java.lang.String SERIALIZED_NAME_DATA_SOURCE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_FILTERS
public static final java.lang.String SERIALIZED_NAME_FILTERS
- 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(@Nonnull java.lang.String key)
-
getKey
@Nonnull public java.lang.String getKey()
A unique key to reference the metric- Returns:
- key
-
setKey
public void setKey(@Nonnull java.lang.String key)
-
name
public MetricPost name(@Nullable java.lang.String name)
-
getName
@Nullable public java.lang.String getName()
A human-friendly name for the metric- Returns:
- name
-
setName
public void setName(@Nullable java.lang.String name)
-
description
public MetricPost description(@Nullable java.lang.String description)
-
getDescription
@Nullable public java.lang.String getDescription()
Description of the metric- Returns:
- description
-
setDescription
public void setDescription(@Nullable java.lang.String description)
-
kind
public MetricPost kind(@Nonnull MetricPost.KindEnum kind)
-
getKind
@Nonnull public MetricPost.KindEnum getKind()
The kind of event your metric will track- Returns:
- kind
-
setKind
public void setKind(@Nonnull MetricPost.KindEnum kind)
-
selector
public MetricPost selector(@Nullable 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(@Nullable java.lang.String selector)
-
urls
public MetricPost urls(@Nullable 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(@Nullable java.util.List<UrlPost> urls)
-
isNumeric
public MetricPost isNumeric(@Nullable 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(@Nullable java.lang.Boolean isNumeric)
-
unit
public MetricPost unit(@Nullable 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(@Nullable java.lang.String unit)
-
eventKey
public MetricPost eventKey(@Nullable java.lang.String eventKey)
-
getEventKey
@Nullable public java.lang.String getEventKey()
The event key to use in your code. Required for custom conversion/binary and custom numeric metrics only.- Returns:
- eventKey
-
setEventKey
public void setEventKey(@Nullable java.lang.String eventKey)
-
successCriteria
public MetricPost successCriteria(@Nullable 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(@Nullable MetricPost.SuccessCriteriaEnum successCriteria)
-
tags
public MetricPost tags(@Nullable 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(@Nullable java.util.List<java.lang.String> tags)
-
randomizationUnits
public MetricPost randomizationUnits(@Nullable 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(@Nullable java.util.List<java.lang.String> randomizationUnits)
-
maintainerId
public MetricPost maintainerId(@Nullable java.lang.String maintainerId)
-
getMaintainerId
@Nullable public java.lang.String getMaintainerId()
The ID of the member who maintains this metric- Returns:
- maintainerId
-
setMaintainerId
public void setMaintainerId(@Nullable java.lang.String maintainerId)
-
unitAggregationType
public MetricPost unitAggregationType(@Nullable MetricPost.UnitAggregationTypeEnum unitAggregationType)
-
getUnitAggregationType
@Nullable public MetricPost.UnitAggregationTypeEnum getUnitAggregationType()
The method by which multiple unit event values are aggregated- Returns:
- unitAggregationType
-
setUnitAggregationType
public void setUnitAggregationType(@Nullable MetricPost.UnitAggregationTypeEnum unitAggregationType)
-
analysisType
public MetricPost analysisType(@Nullable java.lang.String analysisType)
-
getAnalysisType
@Nullable public java.lang.String getAnalysisType()
The method for analyzing metric events- Returns:
- analysisType
-
setAnalysisType
public void setAnalysisType(@Nullable java.lang.String analysisType)
-
percentileValue
public MetricPost percentileValue(@Nullable java.lang.Integer percentileValue)
-
getPercentileValue
@Nullable public java.lang.Integer getPercentileValue()
The percentile for the analysis method. An integer denoting the target percentile between 0 and 100. Required when <code>analysisType</code> is <code>percentile</code>.- Returns:
- percentileValue
-
setPercentileValue
public void setPercentileValue(@Nullable java.lang.Integer percentileValue)
-
eventDefault
public MetricPost eventDefault(@Nullable MetricEventDefaultRep eventDefault)
-
getEventDefault
@Nullable public MetricEventDefaultRep getEventDefault()
Get eventDefault- Returns:
- eventDefault
-
setEventDefault
public void setEventDefault(@Nullable MetricEventDefaultRep eventDefault)
-
dataSource
public MetricPost dataSource(@Nullable MetricDataSourceRefRep dataSource)
-
getDataSource
@Nullable public MetricDataSourceRefRep getDataSource()
Get dataSource- Returns:
- dataSource
-
setDataSource
public void setDataSource(@Nullable MetricDataSourceRefRep dataSource)
-
filters
public MetricPost filters(@Nullable EventFilter filters)
-
getFilters
@Nullable public EventFilter getFilters()
Get filters- Returns:
- filters
-
setFilters
public void setFilters(@Nullable EventFilter filters)
-
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.- Parameters:
key- name of the propertyvalue- value of the property- Returns:
- the MetricPost instance itself
-
getAdditionalProperties
public java.util.Map<java.lang.String,java.lang.Object> getAdditionalProperties()
Return the additional (undeclared) property.- Returns:
- a map of objects
-
getAdditionalProperty
public java.lang.Object getAdditionalProperty(java.lang.String key)
Return the additional (undeclared) property with the specified name.- Parameters:
key- name of the property- Returns:
- an object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
validateJsonElement
public static void validateJsonElement(com.google.gson.JsonElement jsonElement) throws java.io.IOExceptionValidates the JSON Element and throws an exception if issues found- Parameters:
jsonElement- JSON Element- Throws:
java.io.IOException- if the JSON Element 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
-
-