UNPKG

@datadog/datadog-api-client

Version:

OpenAPI client for Datadog APIs

954 lines (953 loc) 181 kB
"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.UsageMeteringApi = exports.UsageMeteringApiResponseProcessor = exports.UsageMeteringApiRequestFactory = void 0; const baseapi_1 = require("../../datadog-api-client-common/baseapi"); const configuration_1 = require("../../datadog-api-client-common/configuration"); const http_1 = require("../../datadog-api-client-common/http/http"); const logger_1 = require("../../../logger"); const ObjectSerializer_1 = require("../models/ObjectSerializer"); const exception_1 = require("../../datadog-api-client-common/exception"); class UsageMeteringApiRequestFactory extends baseapi_1.BaseAPIRequestFactory { getDailyCustomReports(pageSize, pageNumber, sortDir, sort, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // Path Params const localVarPath = "/api/v1/daily_custom_reports"; // Make Request Context const requestContext = _config .getServer("v1.UsageMeteringApi.getDailyCustomReports") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json;datetime-format=rfc3339"); requestContext.setHttpConfig(_config.httpConfig); // Query Params if (pageSize !== undefined) { requestContext.setQueryParam("page[size]", ObjectSerializer_1.ObjectSerializer.serialize(pageSize, "number", "int64"), ""); } if (pageNumber !== undefined) { requestContext.setQueryParam("page[number]", ObjectSerializer_1.ObjectSerializer.serialize(pageNumber, "number", "int64"), ""); } if (sortDir !== undefined) { requestContext.setQueryParam("sort_dir", ObjectSerializer_1.ObjectSerializer.serialize(sortDir, "UsageSortDirection", ""), ""); } if (sort !== undefined) { requestContext.setQueryParam("sort", ObjectSerializer_1.ObjectSerializer.serialize(sort, "UsageSort", ""), ""); } // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", ]); return requestContext; }); } getHourlyUsageAttribution(startHr, usageType, endHr, nextRecordId, tagBreakdownKeys, includeDescendants, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'startHr' is not null or undefined if (startHr === null || startHr === undefined) { throw new baseapi_1.RequiredError("startHr", "getHourlyUsageAttribution"); } // verify required parameter 'usageType' is not null or undefined if (usageType === null || usageType === undefined) { throw new baseapi_1.RequiredError("usageType", "getHourlyUsageAttribution"); } // Path Params const localVarPath = "/api/v1/usage/hourly-attribution"; // Make Request Context const requestContext = _config .getServer("v1.UsageMeteringApi.getHourlyUsageAttribution") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json;datetime-format=rfc3339"); requestContext.setHttpConfig(_config.httpConfig); // Query Params if (startHr !== undefined) { requestContext.setQueryParam("start_hr", ObjectSerializer_1.ObjectSerializer.serialize(startHr, "Date", "date-time"), ""); } if (endHr !== undefined) { requestContext.setQueryParam("end_hr", ObjectSerializer_1.ObjectSerializer.serialize(endHr, "Date", "date-time"), ""); } if (usageType !== undefined) { requestContext.setQueryParam("usage_type", ObjectSerializer_1.ObjectSerializer.serialize(usageType, "HourlyUsageAttributionUsageType", ""), ""); } if (nextRecordId !== undefined) { requestContext.setQueryParam("next_record_id", ObjectSerializer_1.ObjectSerializer.serialize(nextRecordId, "string", ""), ""); } if (tagBreakdownKeys !== undefined) { requestContext.setQueryParam("tag_breakdown_keys", ObjectSerializer_1.ObjectSerializer.serialize(tagBreakdownKeys, "string", ""), ""); } if (includeDescendants !== undefined) { requestContext.setQueryParam("include_descendants", ObjectSerializer_1.ObjectSerializer.serialize(includeDescendants, "boolean", ""), ""); } // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } getIncidentManagement(startHr, endHr, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'startHr' is not null or undefined if (startHr === null || startHr === undefined) { throw new baseapi_1.RequiredError("startHr", "getIncidentManagement"); } // Path Params const localVarPath = "/api/v1/usage/incident-management"; // Make Request Context const requestContext = _config .getServer("v1.UsageMeteringApi.getIncidentManagement") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json;datetime-format=rfc3339"); requestContext.setHttpConfig(_config.httpConfig); // Query Params if (startHr !== undefined) { requestContext.setQueryParam("start_hr", ObjectSerializer_1.ObjectSerializer.serialize(startHr, "Date", "date-time"), ""); } if (endHr !== undefined) { requestContext.setQueryParam("end_hr", ObjectSerializer_1.ObjectSerializer.serialize(endHr, "Date", "date-time"), ""); } // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } getIngestedSpans(startHr, endHr, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'startHr' is not null or undefined if (startHr === null || startHr === undefined) { throw new baseapi_1.RequiredError("startHr", "getIngestedSpans"); } // Path Params const localVarPath = "/api/v1/usage/ingested-spans"; // Make Request Context const requestContext = _config .getServer("v1.UsageMeteringApi.getIngestedSpans") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json;datetime-format=rfc3339"); requestContext.setHttpConfig(_config.httpConfig); // Query Params if (startHr !== undefined) { requestContext.setQueryParam("start_hr", ObjectSerializer_1.ObjectSerializer.serialize(startHr, "Date", "date-time"), ""); } if (endHr !== undefined) { requestContext.setQueryParam("end_hr", ObjectSerializer_1.ObjectSerializer.serialize(endHr, "Date", "date-time"), ""); } // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } getMonthlyCustomReports(pageSize, pageNumber, sortDir, sort, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // Path Params const localVarPath = "/api/v1/monthly_custom_reports"; // Make Request Context const requestContext = _config .getServer("v1.UsageMeteringApi.getMonthlyCustomReports") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json;datetime-format=rfc3339"); requestContext.setHttpConfig(_config.httpConfig); // Query Params if (pageSize !== undefined) { requestContext.setQueryParam("page[size]", ObjectSerializer_1.ObjectSerializer.serialize(pageSize, "number", "int64"), ""); } if (pageNumber !== undefined) { requestContext.setQueryParam("page[number]", ObjectSerializer_1.ObjectSerializer.serialize(pageNumber, "number", "int64"), ""); } if (sortDir !== undefined) { requestContext.setQueryParam("sort_dir", ObjectSerializer_1.ObjectSerializer.serialize(sortDir, "UsageSortDirection", ""), ""); } if (sort !== undefined) { requestContext.setQueryParam("sort", ObjectSerializer_1.ObjectSerializer.serialize(sort, "UsageSort", ""), ""); } // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", ]); return requestContext; }); } getMonthlyUsageAttribution(startMonth, fields, endMonth, sortDirection, sortName, tagBreakdownKeys, nextRecordId, includeDescendants, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'startMonth' is not null or undefined if (startMonth === null || startMonth === undefined) { throw new baseapi_1.RequiredError("startMonth", "getMonthlyUsageAttribution"); } // verify required parameter 'fields' is not null or undefined if (fields === null || fields === undefined) { throw new baseapi_1.RequiredError("fields", "getMonthlyUsageAttribution"); } // Path Params const localVarPath = "/api/v1/usage/monthly-attribution"; // Make Request Context const requestContext = _config .getServer("v1.UsageMeteringApi.getMonthlyUsageAttribution") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json;datetime-format=rfc3339"); requestContext.setHttpConfig(_config.httpConfig); // Query Params if (startMonth !== undefined) { requestContext.setQueryParam("start_month", ObjectSerializer_1.ObjectSerializer.serialize(startMonth, "Date", "date-time"), ""); } if (endMonth !== undefined) { requestContext.setQueryParam("end_month", ObjectSerializer_1.ObjectSerializer.serialize(endMonth, "Date", "date-time"), ""); } if (fields !== undefined) { requestContext.setQueryParam("fields", ObjectSerializer_1.ObjectSerializer.serialize(fields, "MonthlyUsageAttributionSupportedMetrics", ""), ""); } if (sortDirection !== undefined) { requestContext.setQueryParam("sort_direction", ObjectSerializer_1.ObjectSerializer.serialize(sortDirection, "UsageSortDirection", ""), ""); } if (sortName !== undefined) { requestContext.setQueryParam("sort_name", ObjectSerializer_1.ObjectSerializer.serialize(sortName, "MonthlyUsageAttributionSupportedMetrics", ""), ""); } if (tagBreakdownKeys !== undefined) { requestContext.setQueryParam("tag_breakdown_keys", ObjectSerializer_1.ObjectSerializer.serialize(tagBreakdownKeys, "string", ""), ""); } if (nextRecordId !== undefined) { requestContext.setQueryParam("next_record_id", ObjectSerializer_1.ObjectSerializer.serialize(nextRecordId, "string", ""), ""); } if (includeDescendants !== undefined) { requestContext.setQueryParam("include_descendants", ObjectSerializer_1.ObjectSerializer.serialize(includeDescendants, "boolean", ""), ""); } // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } getSpecifiedDailyCustomReports(reportId, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'reportId' is not null or undefined if (reportId === null || reportId === undefined) { throw new baseapi_1.RequiredError("reportId", "getSpecifiedDailyCustomReports"); } // Path Params const localVarPath = "/api/v1/daily_custom_reports/{report_id}".replace("{report_id}", encodeURIComponent(String(reportId))); // Make Request Context const requestContext = _config .getServer("v1.UsageMeteringApi.getSpecifiedDailyCustomReports") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json;datetime-format=rfc3339"); requestContext.setHttpConfig(_config.httpConfig); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", ]); return requestContext; }); } getSpecifiedMonthlyCustomReports(reportId, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'reportId' is not null or undefined if (reportId === null || reportId === undefined) { throw new baseapi_1.RequiredError("reportId", "getSpecifiedMonthlyCustomReports"); } // Path Params const localVarPath = "/api/v1/monthly_custom_reports/{report_id}".replace("{report_id}", encodeURIComponent(String(reportId))); // Make Request Context const requestContext = _config .getServer("v1.UsageMeteringApi.getSpecifiedMonthlyCustomReports") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json;datetime-format=rfc3339"); requestContext.setHttpConfig(_config.httpConfig); // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", ]); return requestContext; }); } getUsageAnalyzedLogs(startHr, endHr, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'startHr' is not null or undefined if (startHr === null || startHr === undefined) { throw new baseapi_1.RequiredError("startHr", "getUsageAnalyzedLogs"); } // Path Params const localVarPath = "/api/v1/usage/analyzed_logs"; // Make Request Context const requestContext = _config .getServer("v1.UsageMeteringApi.getUsageAnalyzedLogs") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json;datetime-format=rfc3339"); requestContext.setHttpConfig(_config.httpConfig); // Query Params if (startHr !== undefined) { requestContext.setQueryParam("start_hr", ObjectSerializer_1.ObjectSerializer.serialize(startHr, "Date", "date-time"), ""); } if (endHr !== undefined) { requestContext.setQueryParam("end_hr", ObjectSerializer_1.ObjectSerializer.serialize(endHr, "Date", "date-time"), ""); } // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } getUsageAuditLogs(startHr, endHr, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'startHr' is not null or undefined if (startHr === null || startHr === undefined) { throw new baseapi_1.RequiredError("startHr", "getUsageAuditLogs"); } // Path Params const localVarPath = "/api/v1/usage/audit_logs"; // Make Request Context const requestContext = _config .getServer("v1.UsageMeteringApi.getUsageAuditLogs") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json;datetime-format=rfc3339"); requestContext.setHttpConfig(_config.httpConfig); // Query Params if (startHr !== undefined) { requestContext.setQueryParam("start_hr", ObjectSerializer_1.ObjectSerializer.serialize(startHr, "Date", "date-time"), ""); } if (endHr !== undefined) { requestContext.setQueryParam("end_hr", ObjectSerializer_1.ObjectSerializer.serialize(endHr, "Date", "date-time"), ""); } // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } getUsageBillableSummary(month, includeConnectedAccounts, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // Path Params const localVarPath = "/api/v1/usage/billable-summary"; // Make Request Context const requestContext = _config .getServer("v1.UsageMeteringApi.getUsageBillableSummary") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json;datetime-format=rfc3339"); requestContext.setHttpConfig(_config.httpConfig); // Query Params if (month !== undefined) { requestContext.setQueryParam("month", ObjectSerializer_1.ObjectSerializer.serialize(month, "Date", "date-time"), ""); } if (includeConnectedAccounts !== undefined) { requestContext.setQueryParam("include_connected_accounts", ObjectSerializer_1.ObjectSerializer.serialize(includeConnectedAccounts, "boolean", ""), ""); } // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } getUsageCIApp(startHr, endHr, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'startHr' is not null or undefined if (startHr === null || startHr === undefined) { throw new baseapi_1.RequiredError("startHr", "getUsageCIApp"); } // Path Params const localVarPath = "/api/v1/usage/ci-app"; // Make Request Context const requestContext = _config .getServer("v1.UsageMeteringApi.getUsageCIApp") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json;datetime-format=rfc3339"); requestContext.setHttpConfig(_config.httpConfig); // Query Params if (startHr !== undefined) { requestContext.setQueryParam("start_hr", ObjectSerializer_1.ObjectSerializer.serialize(startHr, "Date", "date-time"), ""); } if (endHr !== undefined) { requestContext.setQueryParam("end_hr", ObjectSerializer_1.ObjectSerializer.serialize(endHr, "Date", "date-time"), ""); } // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } getUsageCloudSecurityPostureManagement(startHr, endHr, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'startHr' is not null or undefined if (startHr === null || startHr === undefined) { throw new baseapi_1.RequiredError("startHr", "getUsageCloudSecurityPostureManagement"); } // Path Params const localVarPath = "/api/v1/usage/cspm"; // Make Request Context const requestContext = _config .getServer("v1.UsageMeteringApi.getUsageCloudSecurityPostureManagement") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json;datetime-format=rfc3339"); requestContext.setHttpConfig(_config.httpConfig); // Query Params if (startHr !== undefined) { requestContext.setQueryParam("start_hr", ObjectSerializer_1.ObjectSerializer.serialize(startHr, "Date", "date-time"), ""); } if (endHr !== undefined) { requestContext.setQueryParam("end_hr", ObjectSerializer_1.ObjectSerializer.serialize(endHr, "Date", "date-time"), ""); } // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } getUsageCWS(startHr, endHr, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'startHr' is not null or undefined if (startHr === null || startHr === undefined) { throw new baseapi_1.RequiredError("startHr", "getUsageCWS"); } // Path Params const localVarPath = "/api/v1/usage/cws"; // Make Request Context const requestContext = _config .getServer("v1.UsageMeteringApi.getUsageCWS") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json;datetime-format=rfc3339"); requestContext.setHttpConfig(_config.httpConfig); // Query Params if (startHr !== undefined) { requestContext.setQueryParam("start_hr", ObjectSerializer_1.ObjectSerializer.serialize(startHr, "Date", "date-time"), ""); } if (endHr !== undefined) { requestContext.setQueryParam("end_hr", ObjectSerializer_1.ObjectSerializer.serialize(endHr, "Date", "date-time"), ""); } // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } getUsageDBM(startHr, endHr, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'startHr' is not null or undefined if (startHr === null || startHr === undefined) { throw new baseapi_1.RequiredError("startHr", "getUsageDBM"); } // Path Params const localVarPath = "/api/v1/usage/dbm"; // Make Request Context const requestContext = _config .getServer("v1.UsageMeteringApi.getUsageDBM") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json;datetime-format=rfc3339"); requestContext.setHttpConfig(_config.httpConfig); // Query Params if (startHr !== undefined) { requestContext.setQueryParam("start_hr", ObjectSerializer_1.ObjectSerializer.serialize(startHr, "Date", "date-time"), ""); } if (endHr !== undefined) { requestContext.setQueryParam("end_hr", ObjectSerializer_1.ObjectSerializer.serialize(endHr, "Date", "date-time"), ""); } // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } getUsageFargate(startHr, endHr, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'startHr' is not null or undefined if (startHr === null || startHr === undefined) { throw new baseapi_1.RequiredError("startHr", "getUsageFargate"); } // Path Params const localVarPath = "/api/v1/usage/fargate"; // Make Request Context const requestContext = _config .getServer("v1.UsageMeteringApi.getUsageFargate") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json;datetime-format=rfc3339"); requestContext.setHttpConfig(_config.httpConfig); // Query Params if (startHr !== undefined) { requestContext.setQueryParam("start_hr", ObjectSerializer_1.ObjectSerializer.serialize(startHr, "Date", "date-time"), ""); } if (endHr !== undefined) { requestContext.setQueryParam("end_hr", ObjectSerializer_1.ObjectSerializer.serialize(endHr, "Date", "date-time"), ""); } // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } getUsageHosts(startHr, endHr, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'startHr' is not null or undefined if (startHr === null || startHr === undefined) { throw new baseapi_1.RequiredError("startHr", "getUsageHosts"); } // Path Params const localVarPath = "/api/v1/usage/hosts"; // Make Request Context const requestContext = _config .getServer("v1.UsageMeteringApi.getUsageHosts") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json;datetime-format=rfc3339"); requestContext.setHttpConfig(_config.httpConfig); // Query Params if (startHr !== undefined) { requestContext.setQueryParam("start_hr", ObjectSerializer_1.ObjectSerializer.serialize(startHr, "Date", "date-time"), ""); } if (endHr !== undefined) { requestContext.setQueryParam("end_hr", ObjectSerializer_1.ObjectSerializer.serialize(endHr, "Date", "date-time"), ""); } // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } getUsageIndexedSpans(startHr, endHr, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'startHr' is not null or undefined if (startHr === null || startHr === undefined) { throw new baseapi_1.RequiredError("startHr", "getUsageIndexedSpans"); } // Path Params const localVarPath = "/api/v1/usage/indexed-spans"; // Make Request Context const requestContext = _config .getServer("v1.UsageMeteringApi.getUsageIndexedSpans") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json;datetime-format=rfc3339"); requestContext.setHttpConfig(_config.httpConfig); // Query Params if (startHr !== undefined) { requestContext.setQueryParam("start_hr", ObjectSerializer_1.ObjectSerializer.serialize(startHr, "Date", "date-time"), ""); } if (endHr !== undefined) { requestContext.setQueryParam("end_hr", ObjectSerializer_1.ObjectSerializer.serialize(endHr, "Date", "date-time"), ""); } // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } getUsageInternetOfThings(startHr, endHr, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'startHr' is not null or undefined if (startHr === null || startHr === undefined) { throw new baseapi_1.RequiredError("startHr", "getUsageInternetOfThings"); } // Path Params const localVarPath = "/api/v1/usage/iot"; // Make Request Context const requestContext = _config .getServer("v1.UsageMeteringApi.getUsageInternetOfThings") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json;datetime-format=rfc3339"); requestContext.setHttpConfig(_config.httpConfig); // Query Params if (startHr !== undefined) { requestContext.setQueryParam("start_hr", ObjectSerializer_1.ObjectSerializer.serialize(startHr, "Date", "date-time"), ""); } if (endHr !== undefined) { requestContext.setQueryParam("end_hr", ObjectSerializer_1.ObjectSerializer.serialize(endHr, "Date", "date-time"), ""); } // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } getUsageLambda(startHr, endHr, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'startHr' is not null or undefined if (startHr === null || startHr === undefined) { throw new baseapi_1.RequiredError("startHr", "getUsageLambda"); } // Path Params const localVarPath = "/api/v1/usage/aws_lambda"; // Make Request Context const requestContext = _config .getServer("v1.UsageMeteringApi.getUsageLambda") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json;datetime-format=rfc3339"); requestContext.setHttpConfig(_config.httpConfig); // Query Params if (startHr !== undefined) { requestContext.setQueryParam("start_hr", ObjectSerializer_1.ObjectSerializer.serialize(startHr, "Date", "date-time"), ""); } if (endHr !== undefined) { requestContext.setQueryParam("end_hr", ObjectSerializer_1.ObjectSerializer.serialize(endHr, "Date", "date-time"), ""); } // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } getUsageLogs(startHr, endHr, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'startHr' is not null or undefined if (startHr === null || startHr === undefined) { throw new baseapi_1.RequiredError("startHr", "getUsageLogs"); } // Path Params const localVarPath = "/api/v1/usage/logs"; // Make Request Context const requestContext = _config .getServer("v1.UsageMeteringApi.getUsageLogs") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json;datetime-format=rfc3339"); requestContext.setHttpConfig(_config.httpConfig); // Query Params if (startHr !== undefined) { requestContext.setQueryParam("start_hr", ObjectSerializer_1.ObjectSerializer.serialize(startHr, "Date", "date-time"), ""); } if (endHr !== undefined) { requestContext.setQueryParam("end_hr", ObjectSerializer_1.ObjectSerializer.serialize(endHr, "Date", "date-time"), ""); } // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } getUsageLogsByIndex(startHr, endHr, indexName, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'startHr' is not null or undefined if (startHr === null || startHr === undefined) { throw new baseapi_1.RequiredError("startHr", "getUsageLogsByIndex"); } // Path Params const localVarPath = "/api/v1/usage/logs_by_index"; // Make Request Context const requestContext = _config .getServer("v1.UsageMeteringApi.getUsageLogsByIndex") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json;datetime-format=rfc3339"); requestContext.setHttpConfig(_config.httpConfig); // Query Params if (startHr !== undefined) { requestContext.setQueryParam("start_hr", ObjectSerializer_1.ObjectSerializer.serialize(startHr, "Date", "date-time"), ""); } if (endHr !== undefined) { requestContext.setQueryParam("end_hr", ObjectSerializer_1.ObjectSerializer.serialize(endHr, "Date", "date-time"), ""); } if (indexName !== undefined) { requestContext.setQueryParam("index_name", ObjectSerializer_1.ObjectSerializer.serialize(indexName, "Array<string>", ""), "multi"); } // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } getUsageLogsByRetention(startHr, endHr, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'startHr' is not null or undefined if (startHr === null || startHr === undefined) { throw new baseapi_1.RequiredError("startHr", "getUsageLogsByRetention"); } // Path Params const localVarPath = "/api/v1/usage/logs-by-retention"; // Make Request Context const requestContext = _config .getServer("v1.UsageMeteringApi.getUsageLogsByRetention") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json;datetime-format=rfc3339"); requestContext.setHttpConfig(_config.httpConfig); // Query Params if (startHr !== undefined) { requestContext.setQueryParam("start_hr", ObjectSerializer_1.ObjectSerializer.serialize(startHr, "Date", "date-time"), ""); } if (endHr !== undefined) { requestContext.setQueryParam("end_hr", ObjectSerializer_1.ObjectSerializer.serialize(endHr, "Date", "date-time"), ""); } // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } getUsageNetworkFlows(startHr, endHr, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'startHr' is not null or undefined if (startHr === null || startHr === undefined) { throw new baseapi_1.RequiredError("startHr", "getUsageNetworkFlows"); } // Path Params const localVarPath = "/api/v1/usage/network_flows"; // Make Request Context const requestContext = _config .getServer("v1.UsageMeteringApi.getUsageNetworkFlows") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json;datetime-format=rfc3339"); requestContext.setHttpConfig(_config.httpConfig); // Query Params if (startHr !== undefined) { requestContext.setQueryParam("start_hr", ObjectSerializer_1.ObjectSerializer.serialize(startHr, "Date", "date-time"), ""); } if (endHr !== undefined) { requestContext.setQueryParam("end_hr", ObjectSerializer_1.ObjectSerializer.serialize(endHr, "Date", "date-time"), ""); } // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } getUsageNetworkHosts(startHr, endHr, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'startHr' is not null or undefined if (startHr === null || startHr === undefined) { throw new baseapi_1.RequiredError("startHr", "getUsageNetworkHosts"); } // Path Params const localVarPath = "/api/v1/usage/network_hosts"; // Make Request Context const requestContext = _config .getServer("v1.UsageMeteringApi.getUsageNetworkHosts") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json;datetime-format=rfc3339"); requestContext.setHttpConfig(_config.httpConfig); // Query Params if (startHr !== undefined) { requestContext.setQueryParam("start_hr", ObjectSerializer_1.ObjectSerializer.serialize(startHr, "Date", "date-time"), ""); } if (endHr !== undefined) { requestContext.setQueryParam("end_hr", ObjectSerializer_1.ObjectSerializer.serialize(endHr, "Date", "date-time"), ""); } // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } getUsageOnlineArchive(startHr, endHr, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'startHr' is not null or undefined if (startHr === null || startHr === undefined) { throw new baseapi_1.RequiredError("startHr", "getUsageOnlineArchive"); } // Path Params const localVarPath = "/api/v1/usage/online-archive"; // Make Request Context const requestContext = _config .getServer("v1.UsageMeteringApi.getUsageOnlineArchive") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json;datetime-format=rfc3339"); requestContext.setHttpConfig(_config.httpConfig); // Query Params if (startHr !== undefined) { requestContext.setQueryParam("start_hr", ObjectSerializer_1.ObjectSerializer.serialize(startHr, "Date", "date-time"), ""); } if (endHr !== undefined) { requestContext.setQueryParam("end_hr", ObjectSerializer_1.ObjectSerializer.serialize(endHr, "Date", "date-time"), ""); } // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } getUsageProfiling(startHr, endHr, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'startHr' is not null or undefined if (startHr === null || startHr === undefined) { throw new baseapi_1.RequiredError("startHr", "getUsageProfiling"); } // Path Params const localVarPath = "/api/v1/usage/profiling"; // Make Request Context const requestContext = _config .getServer("v1.UsageMeteringApi.getUsageProfiling") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json;datetime-format=rfc3339"); requestContext.setHttpConfig(_config.httpConfig); // Query Params if (startHr !== undefined) { requestContext.setQueryParam("start_hr", ObjectSerializer_1.ObjectSerializer.serialize(startHr, "Date", "date-time"), ""); } if (endHr !== undefined) { requestContext.setQueryParam("end_hr", ObjectSerializer_1.ObjectSerializer.serialize(endHr, "Date", "date-time"), ""); } // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } getUsageRumSessions(startHr, endHr, type, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'startHr' is not null or undefined if (startHr === null || startHr === undefined) { throw new baseapi_1.RequiredError("startHr", "getUsageRumSessions"); } // Path Params const localVarPath = "/api/v1/usage/rum_sessions"; // Make Request Context const requestContext = _config .getServer("v1.UsageMeteringApi.getUsageRumSessions") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json;datetime-format=rfc3339"); requestContext.setHttpConfig(_config.httpConfig); // Query Params if (startHr !== undefined) { requestContext.setQueryParam("start_hr", ObjectSerializer_1.ObjectSerializer.serialize(startHr, "Date", "date-time"), ""); } if (endHr !== undefined) { requestContext.setQueryParam("end_hr", ObjectSerializer_1.ObjectSerializer.serialize(endHr, "Date", "date-time"), ""); } if (type !== undefined) { requestContext.setQueryParam("type", ObjectSerializer_1.ObjectSerializer.serialize(type, "string", ""), ""); } // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } getUsageRumUnits(startHr, endHr, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'startHr' is not null or undefined if (startHr === null || startHr === undefined) { throw new baseapi_1.RequiredError("startHr", "getUsageRumUnits"); } // Path Params const localVarPath = "/api/v1/usage/rum"; // Make Request Context const requestContext = _config .getServer("v1.UsageMeteringApi.getUsageRumUnits") .makeRequestContext(localVarPath, http_1.HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json;datetime-format=rfc3339"); requestContext.setHttpConfig(_config.httpConfig); // Query Params if (startHr !== undefined) { requestContext.setQueryParam("start_hr", ObjectSerializer_1.ObjectSerializer.serialize(startHr, "Date", "date-time"), ""); } if (endHr !== undefined) { requestContext.setQueryParam("end_hr", ObjectSerializer_1.ObjectSerializer.serialize(endHr, "Date", "date-time"), ""); } // Apply auth methods (0, configuration_1.applySecurityAuthentication)(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", "AuthZ", ]); return requestContext; }); } getUsageSDS(startHr, endHr, _options) { return __awaiter(this, void 0, void 0, function* () { const _config = _options || this.configuration; // verify required parameter 'startHr' is not null or undefined if (startHr === null || startHr === undefined) { throw new baseapi_1.RequiredError("startHr", "getUsageSDS"); } // Path Params const localVarPath = "/api/v1/usage/sds";