Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Mux API
* Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before.
*
* The version of the OpenAPI document: v1
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.mux.sdk;
import com.mux.ApiCallback;
import com.mux.ApiClient;
import com.mux.ApiException;
import com.mux.ApiResponse;
import com.mux.Configuration;
import com.mux.Pair;
import com.mux.ProgressRequestBody;
import com.mux.ProgressResponseBody;
import com.google.gson.reflect.TypeToken;
import java.io.IOException;
import com.mux.sdk.models.GetMetricTimeseriesDataResponse;
import com.mux.sdk.models.GetOverallValuesResponse;
import com.mux.sdk.models.ListAllMetricValuesResponse;
import com.mux.sdk.models.ListBreakdownValuesResponse;
import com.mux.sdk.models.ListInsightsResponse;
// TODO: due to import parsing issues for the RDR type; fix in spec in future
import com.mux.sdk.models.ReferrerDomainRestriction;
import java.lang.reflect.Type;
public class MetricsApi {
private ApiClient localVarApiClient;
public MetricsApi() {
this(Configuration.getDefaultApiClient());
}
public MetricsApi(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
public ApiClient getApiClient() {
return localVarApiClient;
}
public void setApiClient(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
private okhttp3.Call getMetricTimeseriesDataCall(String METRIC_ID, java.util.List timeframe, java.util.List filters, java.util.List metricFilters, String measurement, String orderDirection, String groupBy, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/data/v1/metrics/{METRIC_ID}/timeseries"
.replaceAll("\\{" + "METRIC_ID" + "\\}", localVarApiClient.escapeString(METRIC_ID.toString()));
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarCookieParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
if (timeframe != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "timeframe[]", timeframe));
}
if (filters != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filters[]", filters));
}
if (metricFilters != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "metric_filters[]", metricFilters));
}
if (measurement != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("measurement", measurement));
}
if (orderDirection != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("order_direction", orderDirection));
}
if (groupBy != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("group_by", groupBy));
}
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "accessToken" };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getMetricTimeseriesDataValidateBeforeCall(String METRIC_ID, java.util.List timeframe, java.util.List filters, java.util.List metricFilters, String measurement, String orderDirection, String groupBy, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'METRIC_ID' is set
if (METRIC_ID == null) {
throw new ApiException("Missing the required parameter 'METRIC_ID' when calling getMetricTimeseriesData(Async)");
}
okhttp3.Call localVarCall = getMetricTimeseriesDataCall(METRIC_ID, timeframe, filters, metricFilters, measurement, orderDirection, groupBy, _callback);
return localVarCall;
}
private ApiResponse getMetricTimeseriesDataWithHttpInfo(String METRIC_ID, java.util.List timeframe, java.util.List filters, java.util.List metricFilters, String measurement, String orderDirection, String groupBy) throws ApiException {
okhttp3.Call localVarCall = getMetricTimeseriesDataValidateBeforeCall(METRIC_ID, timeframe, filters, metricFilters, measurement, orderDirection, groupBy, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call getMetricTimeseriesDataAsync(String METRIC_ID, java.util.List timeframe, java.util.List filters, java.util.List metricFilters, String measurement, String orderDirection, String groupBy, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getMetricTimeseriesDataValidateBeforeCall(METRIC_ID, timeframe, filters, metricFilters, measurement, orderDirection, groupBy, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIgetMetricTimeseriesDataRequest {
private final String METRIC_ID;
private java.util.List timeframe;
private java.util.List filters;
private java.util.List metricFilters;
private String measurement;
private String orderDirection;
private String groupBy;
private APIgetMetricTimeseriesDataRequest(String METRIC_ID) {
this.METRIC_ID = METRIC_ID;
}
/**
* Set timeframe
* @param timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. `timeframe[]=1498867200&timeframe[]=1498953600` * duration string e.g. `timeframe[]=24:hours or timeframe[]=7:days` (optional)
* @return APIgetMetricTimeseriesDataRequest
*/
public APIgetMetricTimeseriesDataRequest timeframe(java.util.List timeframe) {
this.timeframe = timeframe;
return this;
}
/**
* Set filters
* @param filters Limit the results to rows that match conditions from provided key:value pairs. Must be provided as an array query string parameter. To exclude rows that match a certain condition, prepend a `!` character to the dimension. Possible filter names are the same as returned by the List Filters endpoint. Example: * `filters[]=operating_system:windows&filters[]=!country:US` (optional)
* @return APIgetMetricTimeseriesDataRequest
*/
public APIgetMetricTimeseriesDataRequest filters(java.util.List filters) {
this.filters = filters;
return this;
}
/**
* Set metricFilters
* @param metricFilters Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` (optional)
* @return APIgetMetricTimeseriesDataRequest
*/
public APIgetMetricTimeseriesDataRequest metricFilters(java.util.List metricFilters) {
this.metricFilters = metricFilters;
return this;
}
/**
* Set measurement
* @param measurement Measurement for the provided metric. If omitted, the default for the metric will be used. The default measurement for each metric is: \"sum\" : `ad_attempt_count`, `ad_break_count`, `ad_break_error_count`, `ad_error_count`, `ad_impression_count`, `playing_time` \"median\" : `ad_preroll_startup_time`, `aggregate_startup_time`, `content_startup_time`, `max_downscale_percentage`, `max_upscale_percentage`, `page_load_time`, `player_average_live_latency`, `player_startup_time`, `rebuffer_count`, `rebuffer_duration`, `requests_for_first_preroll`, `video_startup_preroll_load_time`, `video_startup_preroll_request_time`, `video_startup_time`, `view_average_request_latency`, `view_average_request_throughput`, `view_max_request_latency`, `weighted_average_bitrate` \"avg\" : `ad_break_error_percentage`, `ad_error_percentage`, `ad_exit_before_start_count`, `ad_exit_before_start_percentage`, `ad_playback_failure_percentage`, `ad_startup_error_count`, `ad_startup_error_percentage`, `content_playback_failure_percentage`, `downscale_percentage`, `exits_before_video_start`, `playback_business_exception_percentage`, `playback_failure_percentage`, `playback_success_score`, `rebuffer_frequency`, `rebuffer_percentage`, `seek_latency`, `smoothness_score`, `startup_time_score`, `upscale_percentage`, `video_quality_score`, `video_startup_business_exception_percentage`, `video_startup_failure_percentage`, `view_dropped_percentage`, `viewer_experience_score` \"count\" : `started_views`, `unique_viewers` (optional)
* @return APIgetMetricTimeseriesDataRequest
*/
public APIgetMetricTimeseriesDataRequest measurement(String measurement) {
this.measurement = measurement;
return this;
}
/**
* Set orderDirection
* @param orderDirection Sort order. (optional)
* @return APIgetMetricTimeseriesDataRequest
*/
public APIgetMetricTimeseriesDataRequest orderDirection(String orderDirection) {
this.orderDirection = orderDirection;
return this;
}
/**
* Set groupBy
* @param groupBy Time granularity to group results by. If this value is omitted, a default granularity is chosen based on the timeframe. For timeframes of less than 90 minutes, the default granularity is `minute`. Between 90 minutes and 6 hours, the default granularity is `ten_minutes`. Between 6 hours and 15 days inclusive, the default granularity is `hour`. The granularity of timeframes that exceed 15 days is `day`. This default behavior is subject to change; it is strongly suggested that you explicitly specify the granularity. (optional)
* @return APIgetMetricTimeseriesDataRequest
*/
public APIgetMetricTimeseriesDataRequest groupBy(String groupBy) {
this.groupBy = groupBy;
return this;
}
/**
* Build call for getMetricTimeseriesData
* @param _callback ApiCallback API callback
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Response Summary
Status Code
Description
Response Headers
200
OK
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return getMetricTimeseriesDataCall(METRIC_ID, timeframe, filters, metricFilters, measurement, orderDirection, groupBy, _callback);
}
/**
* Execute getMetricTimeseriesData request
* @return GetMetricTimeseriesDataResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Response Summary
Status Code
Description
Response Headers
200
OK
-
*/
public GetMetricTimeseriesDataResponse execute() throws ApiException {
ApiResponse localVarResp = getMetricTimeseriesDataWithHttpInfo(METRIC_ID, timeframe, filters, metricFilters, measurement, orderDirection, groupBy);
return localVarResp.getData();
}
/**
* Execute getMetricTimeseriesData request with HTTP info returned
* @return ApiResponse<GetMetricTimeseriesDataResponse>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Response Summary
Status Code
Description
Response Headers
200
OK
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return getMetricTimeseriesDataWithHttpInfo(METRIC_ID, timeframe, filters, metricFilters, measurement, orderDirection, groupBy);
}
/**
* Execute getMetricTimeseriesData request (asynchronously)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Response Summary
Status Code
Description
Response Headers
200
OK
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return getMetricTimeseriesDataAsync(METRIC_ID, timeframe, filters, metricFilters, measurement, orderDirection, groupBy, _callback);
}
}
/**
* Get metric timeseries data
* Returns timeseries data for a specific metric. Each interval represented in the data array contains an array with the following values: * the first element is the interval time * the second element is the calculated metric value * the third element is the number of views in the interval that have a valid metric value
* @param METRIC_ID ID of the Metric (required)
* @return APIgetMetricTimeseriesDataRequest
* @http.response.details
Response Summary
Status Code
Description
Response Headers
200
OK
-
*/
public APIgetMetricTimeseriesDataRequest getMetricTimeseriesData(String METRIC_ID) {
return new APIgetMetricTimeseriesDataRequest(METRIC_ID);
}
private okhttp3.Call getOverallValuesCall(String METRIC_ID, java.util.List timeframe, java.util.List filters, java.util.List metricFilters, String measurement, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/data/v1/metrics/{METRIC_ID}/overall"
.replaceAll("\\{" + "METRIC_ID" + "\\}", localVarApiClient.escapeString(METRIC_ID.toString()));
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarCookieParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
if (timeframe != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "timeframe[]", timeframe));
}
if (filters != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filters[]", filters));
}
if (metricFilters != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "metric_filters[]", metricFilters));
}
if (measurement != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("measurement", measurement));
}
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "accessToken" };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getOverallValuesValidateBeforeCall(String METRIC_ID, java.util.List timeframe, java.util.List filters, java.util.List metricFilters, String measurement, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'METRIC_ID' is set
if (METRIC_ID == null) {
throw new ApiException("Missing the required parameter 'METRIC_ID' when calling getOverallValues(Async)");
}
okhttp3.Call localVarCall = getOverallValuesCall(METRIC_ID, timeframe, filters, metricFilters, measurement, _callback);
return localVarCall;
}
private ApiResponse getOverallValuesWithHttpInfo(String METRIC_ID, java.util.List timeframe, java.util.List filters, java.util.List metricFilters, String measurement) throws ApiException {
okhttp3.Call localVarCall = getOverallValuesValidateBeforeCall(METRIC_ID, timeframe, filters, metricFilters, measurement, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call getOverallValuesAsync(String METRIC_ID, java.util.List timeframe, java.util.List filters, java.util.List metricFilters, String measurement, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getOverallValuesValidateBeforeCall(METRIC_ID, timeframe, filters, metricFilters, measurement, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIgetOverallValuesRequest {
private final String METRIC_ID;
private java.util.List timeframe;
private java.util.List filters;
private java.util.List metricFilters;
private String measurement;
private APIgetOverallValuesRequest(String METRIC_ID) {
this.METRIC_ID = METRIC_ID;
}
/**
* Set timeframe
* @param timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. `timeframe[]=1498867200&timeframe[]=1498953600` * duration string e.g. `timeframe[]=24:hours or timeframe[]=7:days` (optional)
* @return APIgetOverallValuesRequest
*/
public APIgetOverallValuesRequest timeframe(java.util.List timeframe) {
this.timeframe = timeframe;
return this;
}
/**
* Set filters
* @param filters Limit the results to rows that match conditions from provided key:value pairs. Must be provided as an array query string parameter. To exclude rows that match a certain condition, prepend a `!` character to the dimension. Possible filter names are the same as returned by the List Filters endpoint. Example: * `filters[]=operating_system:windows&filters[]=!country:US` (optional)
* @return APIgetOverallValuesRequest
*/
public APIgetOverallValuesRequest filters(java.util.List filters) {
this.filters = filters;
return this;
}
/**
* Set metricFilters
* @param metricFilters Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` (optional)
* @return APIgetOverallValuesRequest
*/
public APIgetOverallValuesRequest metricFilters(java.util.List metricFilters) {
this.metricFilters = metricFilters;
return this;
}
/**
* Set measurement
* @param measurement Measurement for the provided metric. If omitted, the default for the metric will be used. The default measurement for each metric is: \"sum\" : `ad_attempt_count`, `ad_break_count`, `ad_break_error_count`, `ad_error_count`, `ad_impression_count`, `playing_time` \"median\" : `ad_preroll_startup_time`, `aggregate_startup_time`, `content_startup_time`, `max_downscale_percentage`, `max_upscale_percentage`, `page_load_time`, `player_average_live_latency`, `player_startup_time`, `rebuffer_count`, `rebuffer_duration`, `requests_for_first_preroll`, `video_startup_preroll_load_time`, `video_startup_preroll_request_time`, `video_startup_time`, `view_average_request_latency`, `view_average_request_throughput`, `view_max_request_latency`, `weighted_average_bitrate` \"avg\" : `ad_break_error_percentage`, `ad_error_percentage`, `ad_exit_before_start_count`, `ad_exit_before_start_percentage`, `ad_playback_failure_percentage`, `ad_startup_error_count`, `ad_startup_error_percentage`, `content_playback_failure_percentage`, `downscale_percentage`, `exits_before_video_start`, `playback_business_exception_percentage`, `playback_failure_percentage`, `playback_success_score`, `rebuffer_frequency`, `rebuffer_percentage`, `seek_latency`, `smoothness_score`, `startup_time_score`, `upscale_percentage`, `video_quality_score`, `video_startup_business_exception_percentage`, `video_startup_failure_percentage`, `view_dropped_percentage`, `viewer_experience_score` \"count\" : `started_views`, `unique_viewers` (optional)
* @return APIgetOverallValuesRequest
*/
public APIgetOverallValuesRequest measurement(String measurement) {
this.measurement = measurement;
return this;
}
/**
* Build call for getOverallValues
* @param _callback ApiCallback API callback
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Response Summary
Status Code
Description
Response Headers
200
OK
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return getOverallValuesCall(METRIC_ID, timeframe, filters, metricFilters, measurement, _callback);
}
/**
* Execute getOverallValues request
* @return GetOverallValuesResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Response Summary
Status Code
Description
Response Headers
200
OK
-
*/
public GetOverallValuesResponse execute() throws ApiException {
ApiResponse localVarResp = getOverallValuesWithHttpInfo(METRIC_ID, timeframe, filters, metricFilters, measurement);
return localVarResp.getData();
}
/**
* Execute getOverallValues request with HTTP info returned
* @return ApiResponse<GetOverallValuesResponse>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Response Summary
Status Code
Description
Response Headers
200
OK
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return getOverallValuesWithHttpInfo(METRIC_ID, timeframe, filters, metricFilters, measurement);
}
/**
* Execute getOverallValues request (asynchronously)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Response Summary
Status Code
Description
Response Headers
200
OK
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return getOverallValuesAsync(METRIC_ID, timeframe, filters, metricFilters, measurement, _callback);
}
}
/**
* Get Overall values
* Returns the overall value for a specific metric, as well as the total view count, watch time, and the Mux Global metric value for the metric.
* @param METRIC_ID ID of the Metric (required)
* @return APIgetOverallValuesRequest
* @http.response.details
Response Summary
Status Code
Description
Response Headers
200
OK
-
*/
public APIgetOverallValuesRequest getOverallValues(String METRIC_ID) {
return new APIgetOverallValuesRequest(METRIC_ID);
}
private okhttp3.Call listAllMetricValuesCall(java.util.List timeframe, java.util.List filters, java.util.List metricFilters, String dimension, String value, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/data/v1/metrics/comparison";
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarCookieParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
if (timeframe != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "timeframe[]", timeframe));
}
if (filters != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filters[]", filters));
}
if (metricFilters != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "metric_filters[]", metricFilters));
}
if (dimension != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("dimension", dimension));
}
if (value != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("value", value));
}
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "accessToken" };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call listAllMetricValuesValidateBeforeCall(java.util.List timeframe, java.util.List filters, java.util.List metricFilters, String dimension, String value, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = listAllMetricValuesCall(timeframe, filters, metricFilters, dimension, value, _callback);
return localVarCall;
}
private ApiResponse listAllMetricValuesWithHttpInfo(java.util.List timeframe, java.util.List filters, java.util.List metricFilters, String dimension, String value) throws ApiException {
okhttp3.Call localVarCall = listAllMetricValuesValidateBeforeCall(timeframe, filters, metricFilters, dimension, value, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call listAllMetricValuesAsync(java.util.List timeframe, java.util.List filters, java.util.List metricFilters, String dimension, String value, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = listAllMetricValuesValidateBeforeCall(timeframe, filters, metricFilters, dimension, value, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIlistAllMetricValuesRequest {
private java.util.List timeframe;
private java.util.List filters;
private java.util.List metricFilters;
private String dimension;
private String value;
private APIlistAllMetricValuesRequest() {
}
/**
* Set timeframe
* @param timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. `timeframe[]=1498867200&timeframe[]=1498953600` * duration string e.g. `timeframe[]=24:hours or timeframe[]=7:days` (optional)
* @return APIlistAllMetricValuesRequest
*/
public APIlistAllMetricValuesRequest timeframe(java.util.List timeframe) {
this.timeframe = timeframe;
return this;
}
/**
* Set filters
* @param filters Limit the results to rows that match conditions from provided key:value pairs. Must be provided as an array query string parameter. To exclude rows that match a certain condition, prepend a `!` character to the dimension. Possible filter names are the same as returned by the List Filters endpoint. Example: * `filters[]=operating_system:windows&filters[]=!country:US` (optional)
* @return APIlistAllMetricValuesRequest
*/
public APIlistAllMetricValuesRequest filters(java.util.List filters) {
this.filters = filters;
return this;
}
/**
* Set metricFilters
* @param metricFilters Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` (optional)
* @return APIlistAllMetricValuesRequest
*/
public APIlistAllMetricValuesRequest metricFilters(java.util.List metricFilters) {
this.metricFilters = metricFilters;
return this;
}
/**
* Set dimension
* @param dimension Dimension the specified value belongs to (optional)
* @return APIlistAllMetricValuesRequest
*/
public APIlistAllMetricValuesRequest dimension(String dimension) {
this.dimension = dimension;
return this;
}
/**
* Set value
* @param value Value to show all available metrics for (optional)
* @return APIlistAllMetricValuesRequest
*/
public APIlistAllMetricValuesRequest value(String value) {
this.value = value;
return this;
}
/**
* Build call for listAllMetricValues
* @param _callback ApiCallback API callback
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Response Summary
Status Code
Description
Response Headers
200
OK
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return listAllMetricValuesCall(timeframe, filters, metricFilters, dimension, value, _callback);
}
/**
* Execute listAllMetricValues request
* @return ListAllMetricValuesResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Response Summary
Status Code
Description
Response Headers
200
OK
-
*/
public ListAllMetricValuesResponse execute() throws ApiException {
ApiResponse localVarResp = listAllMetricValuesWithHttpInfo(timeframe, filters, metricFilters, dimension, value);
return localVarResp.getData();
}
/**
* Execute listAllMetricValues request with HTTP info returned
* @return ApiResponse<ListAllMetricValuesResponse>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Response Summary
Status Code
Description
Response Headers
200
OK
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return listAllMetricValuesWithHttpInfo(timeframe, filters, metricFilters, dimension, value);
}
/**
* Execute listAllMetricValues request (asynchronously)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Response Summary
Status Code
Description
Response Headers
200
OK
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return listAllMetricValuesAsync(timeframe, filters, metricFilters, dimension, value, _callback);
}
}
/**
* List all metric values
* List all of the values across every breakdown for a specific metric.
* @return APIlistAllMetricValuesRequest
* @http.response.details
Response Summary
Status Code
Description
Response Headers
200
OK
-
*/
public APIlistAllMetricValuesRequest listAllMetricValues() {
return new APIlistAllMetricValuesRequest();
}
private okhttp3.Call listBreakdownValuesCall(String METRIC_ID, String groupBy, String measurement, java.util.List filters, java.util.List metricFilters, Integer limit, Integer page, String orderBy, String orderDirection, java.util.List timeframe, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/data/v1/metrics/{METRIC_ID}/breakdown"
.replaceAll("\\{" + "METRIC_ID" + "\\}", localVarApiClient.escapeString(METRIC_ID.toString()));
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarCookieParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
if (groupBy != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("group_by", groupBy));
}
if (measurement != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("measurement", measurement));
}
if (filters != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filters[]", filters));
}
if (metricFilters != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "metric_filters[]", metricFilters));
}
if (limit != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit));
}
if (page != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page));
}
if (orderBy != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("order_by", orderBy));
}
if (orderDirection != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("order_direction", orderDirection));
}
if (timeframe != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "timeframe[]", timeframe));
}
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "accessToken" };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call listBreakdownValuesValidateBeforeCall(String METRIC_ID, String groupBy, String measurement, java.util.List filters, java.util.List metricFilters, Integer limit, Integer page, String orderBy, String orderDirection, java.util.List timeframe, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'METRIC_ID' is set
if (METRIC_ID == null) {
throw new ApiException("Missing the required parameter 'METRIC_ID' when calling listBreakdownValues(Async)");
}
okhttp3.Call localVarCall = listBreakdownValuesCall(METRIC_ID, groupBy, measurement, filters, metricFilters, limit, page, orderBy, orderDirection, timeframe, _callback);
return localVarCall;
}
private ApiResponse listBreakdownValuesWithHttpInfo(String METRIC_ID, String groupBy, String measurement, java.util.List filters, java.util.List metricFilters, Integer limit, Integer page, String orderBy, String orderDirection, java.util.List timeframe) throws ApiException {
okhttp3.Call localVarCall = listBreakdownValuesValidateBeforeCall(METRIC_ID, groupBy, measurement, filters, metricFilters, limit, page, orderBy, orderDirection, timeframe, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call listBreakdownValuesAsync(String METRIC_ID, String groupBy, String measurement, java.util.List filters, java.util.List metricFilters, Integer limit, Integer page, String orderBy, String orderDirection, java.util.List timeframe, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = listBreakdownValuesValidateBeforeCall(METRIC_ID, groupBy, measurement, filters, metricFilters, limit, page, orderBy, orderDirection, timeframe, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIlistBreakdownValuesRequest {
private final String METRIC_ID;
private String groupBy;
private String measurement;
private java.util.List filters;
private java.util.List metricFilters;
private Integer limit;
private Integer page;
private String orderBy;
private String orderDirection;
private java.util.List timeframe;
private APIlistBreakdownValuesRequest(String METRIC_ID) {
this.METRIC_ID = METRIC_ID;
}
/**
* Set groupBy
* @param groupBy Breakdown value to group the results by (optional)
* @return APIlistBreakdownValuesRequest
*/
public APIlistBreakdownValuesRequest groupBy(String groupBy) {
this.groupBy = groupBy;
return this;
}
/**
* Set measurement
* @param measurement Measurement for the provided metric. If omitted, the default for the metric will be used. The default measurement for each metric is: \"sum\" : `ad_attempt_count`, `ad_break_count`, `ad_break_error_count`, `ad_error_count`, `ad_impression_count`, `playing_time` \"median\" : `ad_preroll_startup_time`, `aggregate_startup_time`, `content_startup_time`, `max_downscale_percentage`, `max_upscale_percentage`, `page_load_time`, `player_average_live_latency`, `player_startup_time`, `rebuffer_count`, `rebuffer_duration`, `requests_for_first_preroll`, `video_startup_preroll_load_time`, `video_startup_preroll_request_time`, `video_startup_time`, `view_average_request_latency`, `view_average_request_throughput`, `view_max_request_latency`, `weighted_average_bitrate` \"avg\" : `ad_break_error_percentage`, `ad_error_percentage`, `ad_exit_before_start_count`, `ad_exit_before_start_percentage`, `ad_playback_failure_percentage`, `ad_startup_error_count`, `ad_startup_error_percentage`, `content_playback_failure_percentage`, `downscale_percentage`, `exits_before_video_start`, `playback_business_exception_percentage`, `playback_failure_percentage`, `playback_success_score`, `rebuffer_frequency`, `rebuffer_percentage`, `seek_latency`, `smoothness_score`, `startup_time_score`, `upscale_percentage`, `video_quality_score`, `video_startup_business_exception_percentage`, `video_startup_failure_percentage`, `view_dropped_percentage`, `viewer_experience_score` \"count\" : `started_views`, `unique_viewers` (optional)
* @return APIlistBreakdownValuesRequest
*/
public APIlistBreakdownValuesRequest measurement(String measurement) {
this.measurement = measurement;
return this;
}
/**
* Set filters
* @param filters Limit the results to rows that match conditions from provided key:value pairs. Must be provided as an array query string parameter. To exclude rows that match a certain condition, prepend a `!` character to the dimension. Possible filter names are the same as returned by the List Filters endpoint. Example: * `filters[]=operating_system:windows&filters[]=!country:US` (optional)
* @return APIlistBreakdownValuesRequest
*/
public APIlistBreakdownValuesRequest filters(java.util.List filters) {
this.filters = filters;
return this;
}
/**
* Set metricFilters
* @param metricFilters Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` (optional)
* @return APIlistBreakdownValuesRequest
*/
public APIlistBreakdownValuesRequest metricFilters(java.util.List metricFilters) {
this.metricFilters = metricFilters;
return this;
}
/**
* Set limit
* @param limit Number of items to include in the response (optional, default to 25)
* @return APIlistBreakdownValuesRequest
*/
public APIlistBreakdownValuesRequest limit(Integer limit) {
this.limit = limit;
return this;
}
/**
* Set page
* @param page Offset by this many pages, of the size of `limit` (optional, default to 1)
* @return APIlistBreakdownValuesRequest
*/
public APIlistBreakdownValuesRequest page(Integer page) {
this.page = page;
return this;
}
/**
* Set orderBy
* @param orderBy Value to order the results by (optional)
* @return APIlistBreakdownValuesRequest
*/
public APIlistBreakdownValuesRequest orderBy(String orderBy) {
this.orderBy = orderBy;
return this;
}
/**
* Set orderDirection
* @param orderDirection Sort order. (optional)
* @return APIlistBreakdownValuesRequest
*/
public APIlistBreakdownValuesRequest orderDirection(String orderDirection) {
this.orderDirection = orderDirection;
return this;
}
/**
* Set timeframe
* @param timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. `timeframe[]=1498867200&timeframe[]=1498953600` * duration string e.g. `timeframe[]=24:hours or timeframe[]=7:days` (optional)
* @return APIlistBreakdownValuesRequest
*/
public APIlistBreakdownValuesRequest timeframe(java.util.List timeframe) {
this.timeframe = timeframe;
return this;
}
/**
* Build call for listBreakdownValues
* @param _callback ApiCallback API callback
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Response Summary
Status Code
Description
Response Headers
200
OK
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return listBreakdownValuesCall(METRIC_ID, groupBy, measurement, filters, metricFilters, limit, page, orderBy, orderDirection, timeframe, _callback);
}
/**
* Execute listBreakdownValues request
* @return ListBreakdownValuesResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Response Summary
Status Code
Description
Response Headers
200
OK
-
*/
public ListBreakdownValuesResponse execute() throws ApiException {
ApiResponse localVarResp = listBreakdownValuesWithHttpInfo(METRIC_ID, groupBy, measurement, filters, metricFilters, limit, page, orderBy, orderDirection, timeframe);
return localVarResp.getData();
}
/**
* Execute listBreakdownValues request with HTTP info returned
* @return ApiResponse<ListBreakdownValuesResponse>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Response Summary
Status Code
Description
Response Headers
200
OK
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return listBreakdownValuesWithHttpInfo(METRIC_ID, groupBy, measurement, filters, metricFilters, limit, page, orderBy, orderDirection, timeframe);
}
/**
* Execute listBreakdownValues request (asynchronously)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Response Summary
Status Code
Description
Response Headers
200
OK
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return listBreakdownValuesAsync(METRIC_ID, groupBy, measurement, filters, metricFilters, limit, page, orderBy, orderDirection, timeframe, _callback);
}
}
/**
* List breakdown values
* List the breakdown values for a specific metric.
* @param METRIC_ID ID of the Metric (required)
* @return APIlistBreakdownValuesRequest
* @http.response.details
Response Summary
Status Code
Description
Response Headers
200
OK
-
*/
public APIlistBreakdownValuesRequest listBreakdownValues(String METRIC_ID) {
return new APIlistBreakdownValuesRequest(METRIC_ID);
}
private okhttp3.Call listInsightsCall(String METRIC_ID, String measurement, String orderDirection, java.util.List timeframe, java.util.List filters, java.util.List metricFilters, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/data/v1/metrics/{METRIC_ID}/insights"
.replaceAll("\\{" + "METRIC_ID" + "\\}", localVarApiClient.escapeString(METRIC_ID.toString()));
java.util.List localVarQueryParams = new java.util.ArrayList();
java.util.List localVarCollectionQueryParams = new java.util.ArrayList();
java.util.Map localVarHeaderParams = new java.util.HashMap();
java.util.Map localVarCookieParams = new java.util.HashMap();
java.util.Map localVarFormParams = new java.util.HashMap();
if (measurement != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("measurement", measurement));
}
if (orderDirection != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("order_direction", orderDirection));
}
if (timeframe != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "timeframe[]", timeframe));
}
if (filters != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "filters[]", filters));
}
if (metricFilters != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "metric_filters[]", metricFilters));
}
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "accessToken" };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call listInsightsValidateBeforeCall(String METRIC_ID, String measurement, String orderDirection, java.util.List timeframe, java.util.List filters, java.util.List metricFilters, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'METRIC_ID' is set
if (METRIC_ID == null) {
throw new ApiException("Missing the required parameter 'METRIC_ID' when calling listInsights(Async)");
}
okhttp3.Call localVarCall = listInsightsCall(METRIC_ID, measurement, orderDirection, timeframe, filters, metricFilters, _callback);
return localVarCall;
}
private ApiResponse listInsightsWithHttpInfo(String METRIC_ID, String measurement, String orderDirection, java.util.List timeframe, java.util.List filters, java.util.List metricFilters) throws ApiException {
okhttp3.Call localVarCall = listInsightsValidateBeforeCall(METRIC_ID, measurement, orderDirection, timeframe, filters, metricFilters, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call listInsightsAsync(String METRIC_ID, String measurement, String orderDirection, java.util.List timeframe, java.util.List filters, java.util.List metricFilters, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = listInsightsValidateBeforeCall(METRIC_ID, measurement, orderDirection, timeframe, filters, metricFilters, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIlistInsightsRequest {
private final String METRIC_ID;
private String measurement;
private String orderDirection;
private java.util.List timeframe;
private java.util.List filters;
private java.util.List metricFilters;
private APIlistInsightsRequest(String METRIC_ID) {
this.METRIC_ID = METRIC_ID;
}
/**
* Set measurement
* @param measurement Measurement for the provided metric. If omitted, the default for the metric will be used. The default measurement for each metric is: \"sum\" : `ad_attempt_count`, `ad_break_count`, `ad_break_error_count`, `ad_error_count`, `ad_impression_count`, `playing_time` \"median\" : `ad_preroll_startup_time`, `aggregate_startup_time`, `content_startup_time`, `max_downscale_percentage`, `max_upscale_percentage`, `page_load_time`, `player_average_live_latency`, `player_startup_time`, `rebuffer_count`, `rebuffer_duration`, `requests_for_first_preroll`, `video_startup_preroll_load_time`, `video_startup_preroll_request_time`, `video_startup_time`, `view_average_request_latency`, `view_average_request_throughput`, `view_max_request_latency`, `weighted_average_bitrate` \"avg\" : `ad_break_error_percentage`, `ad_error_percentage`, `ad_exit_before_start_count`, `ad_exit_before_start_percentage`, `ad_playback_failure_percentage`, `ad_startup_error_count`, `ad_startup_error_percentage`, `content_playback_failure_percentage`, `downscale_percentage`, `exits_before_video_start`, `playback_business_exception_percentage`, `playback_failure_percentage`, `playback_success_score`, `rebuffer_frequency`, `rebuffer_percentage`, `seek_latency`, `smoothness_score`, `startup_time_score`, `upscale_percentage`, `video_quality_score`, `video_startup_business_exception_percentage`, `video_startup_failure_percentage`, `view_dropped_percentage`, `viewer_experience_score` \"count\" : `started_views`, `unique_viewers` (optional)
* @return APIlistInsightsRequest
*/
public APIlistInsightsRequest measurement(String measurement) {
this.measurement = measurement;
return this;
}
/**
* Set orderDirection
* @param orderDirection Sort order. (optional)
* @return APIlistInsightsRequest
*/
public APIlistInsightsRequest orderDirection(String orderDirection) {
this.orderDirection = orderDirection;
return this;
}
/**
* Set timeframe
* @param timeframe Timeframe window to limit results by. Must be provided as an array query string parameter (e.g. timeframe[]=). Accepted formats are... * array of epoch timestamps e.g. `timeframe[]=1498867200&timeframe[]=1498953600` * duration string e.g. `timeframe[]=24:hours or timeframe[]=7:days` (optional)
* @return APIlistInsightsRequest
*/
public APIlistInsightsRequest timeframe(java.util.List timeframe) {
this.timeframe = timeframe;
return this;
}
/**
* Set filters
* @param filters Limit the results to rows that match conditions from provided key:value pairs. Must be provided as an array query string parameter. To exclude rows that match a certain condition, prepend a `!` character to the dimension. Possible filter names are the same as returned by the List Filters endpoint. Example: * `filters[]=operating_system:windows&filters[]=!country:US` (optional)
* @return APIlistInsightsRequest
*/
public APIlistInsightsRequest filters(java.util.List filters) {
this.filters = filters;
return this;
}
/**
* Set metricFilters
* @param metricFilters Limit the results to rows that match inequality conditions from provided metric comparison clauses. Must be provided as an array query string parameter. Possible filterable metrics are the same as the set of metric ids, with the exceptions of `exits_before_video_start`, `unique_viewers`, `video_startup_failure_percentage`, `view_dropped_percentage`, and `views`. Example: * `metric_filters[]=aggregate_startup_time>=1000` (optional)
* @return APIlistInsightsRequest
*/
public APIlistInsightsRequest metricFilters(java.util.List metricFilters) {
this.metricFilters = metricFilters;
return this;
}
/**
* Build call for listInsights
* @param _callback ApiCallback API callback
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Response Summary
Status Code
Description
Response Headers
200
OK
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return listInsightsCall(METRIC_ID, measurement, orderDirection, timeframe, filters, metricFilters, _callback);
}
/**
* Execute listInsights request
* @return ListInsightsResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Response Summary
Status Code
Description
Response Headers
200
OK
-
*/
public ListInsightsResponse execute() throws ApiException {
ApiResponse localVarResp = listInsightsWithHttpInfo(METRIC_ID, measurement, orderDirection, timeframe, filters, metricFilters);
return localVarResp.getData();
}
/**
* Execute listInsights request with HTTP info returned
* @return ApiResponse<ListInsightsResponse>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Response Summary
Status Code
Description
Response Headers
200
OK
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return listInsightsWithHttpInfo(METRIC_ID, measurement, orderDirection, timeframe, filters, metricFilters);
}
/**
* Execute listInsights request (asynchronously)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Response Summary
Status Code
Description
Response Headers
200
OK
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return listInsightsAsync(METRIC_ID, measurement, orderDirection, timeframe, filters, metricFilters, _callback);
}
}
/**
* List Insights
* Returns a list of insights for a metric. These are the worst performing values across all breakdowns sorted by how much they negatively impact a specific metric.
* @param METRIC_ID ID of the Metric (required)
* @return APIlistInsightsRequest
* @http.response.details
Response Summary
Status Code
Description
Response Headers
200
OK
-
*/
public APIlistInsightsRequest listInsights(String METRIC_ID) {
return new APIlistInsightsRequest(METRIC_ID);
}
}