@datadog/datadog-api-client 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/README.md +72 -0
- package/dist/packages/datadog-api-client-common/configuration.js +2 -1
- package/dist/packages/datadog-api-client-common/configuration.js.map +1 -1
- package/dist/packages/datadog-api-client-common/http/isomorphic-fetch.js +3 -5
- package/dist/packages/datadog-api-client-common/http/isomorphic-fetch.js.map +1 -1
- package/dist/packages/datadog-api-client-common/servers.js.map +1 -1
- package/dist/packages/datadog-api-client-common/util.d.ts +0 -9
- package/dist/packages/datadog-api-client-common/util.js +1 -32
- package/dist/packages/datadog-api-client-common/util.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/apis/AWSIntegrationApi.js +262 -407
- package/dist/packages/datadog-api-client-v1/apis/AWSIntegrationApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/apis/AWSLogsIntegrationApi.js +201 -291
- package/dist/packages/datadog-api-client-v1/apis/AWSLogsIntegrationApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/apis/AuthenticationApi.js +27 -33
- package/dist/packages/datadog-api-client-v1/apis/AuthenticationApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/apis/AzureIntegrationApi.js +145 -215
- package/dist/packages/datadog-api-client-v1/apis/AzureIntegrationApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/apis/DashboardListsApi.js +144 -215
- package/dist/packages/datadog-api-client-v1/apis/DashboardListsApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/apis/DashboardsApi.js +198 -313
- package/dist/packages/datadog-api-client-v1/apis/DashboardsApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/apis/DowntimesApi.js +201 -308
- package/dist/packages/datadog-api-client-v1/apis/DowntimesApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/apis/EventsApi.js +85 -119
- package/dist/packages/datadog-api-client-v1/apis/EventsApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/apis/GCPIntegrationApi.js +116 -172
- package/dist/packages/datadog-api-client-v1/apis/GCPIntegrationApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/apis/HostsApi.js +116 -172
- package/dist/packages/datadog-api-client-v1/apis/HostsApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/apis/IPRangesApi.js +23 -19
- package/dist/packages/datadog-api-client-v1/apis/IPRangesApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/apis/KeyManagementApi.js +291 -460
- package/dist/packages/datadog-api-client-v1/apis/KeyManagementApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/apis/LogsApi.js +75 -67
- package/dist/packages/datadog-api-client-v1/apis/LogsApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/apis/LogsIndexesApi.js +210 -226
- package/dist/packages/datadog-api-client-v1/apis/LogsIndexesApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/apis/LogsPipelinesApi.js +246 -272
- package/dist/packages/datadog-api-client-v1/apis/LogsPipelinesApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/apis/MetricsApi.js +208 -351
- package/dist/packages/datadog-api-client-v1/apis/MetricsApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/apis/MonitorsApi.js +295 -490
- package/dist/packages/datadog-api-client-v1/apis/MonitorsApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/apis/NotebooksApi.js +146 -251
- package/dist/packages/datadog-api-client-v1/apis/NotebooksApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/apis/OrganizationsApi.js +173 -258
- package/dist/packages/datadog-api-client-v1/apis/OrganizationsApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/apis/PagerDutyIntegrationApi.js +111 -174
- package/dist/packages/datadog-api-client-v1/apis/PagerDutyIntegrationApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/apis/SecurityMonitoringApi.js +90 -159
- package/dist/packages/datadog-api-client-v1/apis/SecurityMonitoringApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/apis/ServiceChecksApi.js +31 -63
- package/dist/packages/datadog-api-client-v1/apis/ServiceChecksApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/apis/ServiceLevelObjectiveCorrectionsApi.js +142 -221
- package/dist/packages/datadog-api-client-v1/apis/ServiceLevelObjectiveCorrectionsApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/apis/ServiceLevelObjectivesApi.d.ts +8 -1
- package/dist/packages/datadog-api-client-v1/apis/ServiceLevelObjectivesApi.js +298 -492
- package/dist/packages/datadog-api-client-v1/apis/ServiceLevelObjectivesApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/apis/SlackIntegrationApi.js +147 -261
- package/dist/packages/datadog-api-client-v1/apis/SlackIntegrationApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/apis/SnapshotsApi.js +29 -43
- package/dist/packages/datadog-api-client-v1/apis/SnapshotsApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/apis/SyntheticsApi.js +765 -1130
- package/dist/packages/datadog-api-client-v1/apis/SyntheticsApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/apis/TagsApi.js +142 -211
- package/dist/packages/datadog-api-client-v1/apis/TagsApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/apis/UsageMeteringApi.js +1093 -1594
- package/dist/packages/datadog-api-client-v1/apis/UsageMeteringApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/apis/UsersApi.js +146 -235
- package/dist/packages/datadog-api-client-v1/apis/UsersApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/apis/WebhooksIntegrationApi.js +230 -376
- package/dist/packages/datadog-api-client-v1/apis/WebhooksIntegrationApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/index.d.ts +20 -0
- package/dist/packages/datadog-api-client-v1/index.js +35 -7
- package/dist/packages/datadog-api-client-v1/index.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/models/DashboardTemplateVariable.d.ts +5 -1
- package/dist/packages/datadog-api-client-v1/models/DashboardTemplateVariable.js +4 -0
- package/dist/packages/datadog-api-client-v1/models/DashboardTemplateVariable.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/models/DashboardTemplateVariablePresetValue.d.ts +5 -1
- package/dist/packages/datadog-api-client-v1/models/DashboardTemplateVariablePresetValue.js +4 -0
- package/dist/packages/datadog-api-client-v1/models/DashboardTemplateVariablePresetValue.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/models/FormulaAndFunctionEventQueryDefinition.d.ts +4 -0
- package/dist/packages/datadog-api-client-v1/models/FormulaAndFunctionEventQueryDefinition.js +4 -0
- package/dist/packages/datadog-api-client-v1/models/FormulaAndFunctionEventQueryDefinition.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/models/HourlyUsageAttributionUsageType.d.ts +2 -1
- package/dist/packages/datadog-api-client-v1/models/HourlyUsageAttributionUsageType.js +2 -1
- package/dist/packages/datadog-api-client-v1/models/HourlyUsageAttributionUsageType.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/models/ListStreamQuery.d.ts +4 -0
- package/dist/packages/datadog-api-client-v1/models/ListStreamQuery.js +4 -0
- package/dist/packages/datadog-api-client-v1/models/ListStreamQuery.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/models/MonthlyUsageAttributionSupportedMetrics.d.ts +3 -1
- package/dist/packages/datadog-api-client-v1/models/MonthlyUsageAttributionSupportedMetrics.js +4 -2
- package/dist/packages/datadog-api-client-v1/models/MonthlyUsageAttributionSupportedMetrics.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/models/MonthlyUsageAttributionValues.d.ts +8 -0
- package/dist/packages/datadog-api-client-v1/models/MonthlyUsageAttributionValues.js +10 -0
- package/dist/packages/datadog-api-client-v1/models/MonthlyUsageAttributionValues.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/models/ObjectSerializer.js +44 -0
- package/dist/packages/datadog-api-client-v1/models/ObjectSerializer.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/models/SLOCreator.d.ts +36 -0
- package/dist/packages/datadog-api-client-v1/models/SLOCreator.js +42 -0
- package/dist/packages/datadog-api-client-v1/models/SLOCreator.js.map +1 -0
- package/dist/packages/datadog-api-client-v1/models/SLOListWidgetDefinition.d.ts +47 -0
- package/dist/packages/datadog-api-client-v1/models/SLOListWidgetDefinition.js +46 -0
- package/dist/packages/datadog-api-client-v1/models/SLOListWidgetDefinition.js.map +1 -0
- package/dist/packages/datadog-api-client-v1/models/SLOListWidgetDefinitionType.d.ts +7 -0
- package/dist/packages/datadog-api-client-v1/models/SLOListWidgetDefinitionType.js +10 -0
- package/dist/packages/datadog-api-client-v1/models/SLOListWidgetDefinitionType.js.map +1 -0
- package/dist/packages/datadog-api-client-v1/models/SLOListWidgetQuery.d.ts +32 -0
- package/dist/packages/datadog-api-client-v1/models/SLOListWidgetQuery.js +39 -0
- package/dist/packages/datadog-api-client-v1/models/SLOListWidgetQuery.js.map +1 -0
- package/dist/packages/datadog-api-client-v1/models/SLOListWidgetRequest.d.ts +34 -0
- package/dist/packages/datadog-api-client-v1/models/SLOListWidgetRequest.js +34 -0
- package/dist/packages/datadog-api-client-v1/models/SLOListWidgetRequest.js.map +1 -0
- package/dist/packages/datadog-api-client-v1/models/SLOListWidgetRequestType.d.ts +7 -0
- package/dist/packages/datadog-api-client-v1/models/SLOListWidgetRequestType.js +10 -0
- package/dist/packages/datadog-api-client-v1/models/SLOListWidgetRequestType.js.map +1 -0
- package/dist/packages/datadog-api-client-v1/models/SLOOverallStatuses.d.ts +55 -0
- package/dist/packages/datadog-api-client-v1/models/SLOOverallStatuses.js +56 -0
- package/dist/packages/datadog-api-client-v1/models/SLOOverallStatuses.js.map +1 -0
- package/dist/packages/datadog-api-client-v1/models/SLORawErrorBudgetRemaining.d.ts +32 -0
- package/dist/packages/datadog-api-client-v1/models/SLORawErrorBudgetRemaining.js +38 -0
- package/dist/packages/datadog-api-client-v1/models/SLORawErrorBudgetRemaining.js.map +1 -0
- package/dist/packages/datadog-api-client-v1/models/SearchSLOQuery.d.ts +39 -0
- package/dist/packages/datadog-api-client-v1/models/SearchSLOQuery.js +43 -0
- package/dist/packages/datadog-api-client-v1/models/SearchSLOQuery.js.map +1 -0
- package/dist/packages/datadog-api-client-v1/models/SearchSLOResponseDataAttributes.d.ts +2 -2
- package/dist/packages/datadog-api-client-v1/models/SearchSLOResponseDataAttributes.js +3 -3
- package/dist/packages/datadog-api-client-v1/models/SearchSLOResponseDataAttributes.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/models/SearchSLOThreshold.d.ts +54 -0
- package/dist/packages/datadog-api-client-v1/models/SearchSLOThreshold.js +48 -0
- package/dist/packages/datadog-api-client-v1/models/SearchSLOThreshold.js.map +1 -0
- package/dist/packages/datadog-api-client-v1/models/SearchSLOTimeframe.d.ts +9 -0
- package/dist/packages/datadog-api-client-v1/models/SearchSLOTimeframe.js +12 -0
- package/dist/packages/datadog-api-client-v1/models/SearchSLOTimeframe.js.map +1 -0
- package/dist/packages/datadog-api-client-v1/models/SearchServiceLevelObjective.d.ts +29 -0
- package/dist/packages/datadog-api-client-v1/models/SearchServiceLevelObjective.js +28 -0
- package/dist/packages/datadog-api-client-v1/models/SearchServiceLevelObjective.js.map +1 -0
- package/dist/packages/datadog-api-client-v1/models/SearchServiceLevelObjectiveAttributes.d.ts +103 -0
- package/dist/packages/datadog-api-client-v1/models/SearchServiceLevelObjectiveAttributes.js +88 -0
- package/dist/packages/datadog-api-client-v1/models/SearchServiceLevelObjectiveAttributes.js.map +1 -0
- package/dist/packages/datadog-api-client-v1/models/SearchServiceLevelObjectiveData.d.ts +40 -0
- package/dist/packages/datadog-api-client-v1/models/SearchServiceLevelObjectiveData.js +36 -0
- package/dist/packages/datadog-api-client-v1/models/SearchServiceLevelObjectiveData.js.map +1 -0
- package/dist/packages/datadog-api-client-v1/models/SyntheticsAssertionOperator.d.ts +2 -1
- package/dist/packages/datadog-api-client-v1/models/SyntheticsAssertionOperator.js +2 -1
- package/dist/packages/datadog-api-client-v1/models/SyntheticsAssertionOperator.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/models/TopologyMapWidgetDefinition.d.ts +52 -0
- package/dist/packages/datadog-api-client-v1/models/TopologyMapWidgetDefinition.js +50 -0
- package/dist/packages/datadog-api-client-v1/models/TopologyMapWidgetDefinition.js.map +1 -0
- package/dist/packages/datadog-api-client-v1/models/TopologyMapWidgetDefinitionType.d.ts +7 -0
- package/dist/packages/datadog-api-client-v1/models/TopologyMapWidgetDefinitionType.js +10 -0
- package/dist/packages/datadog-api-client-v1/models/TopologyMapWidgetDefinitionType.js.map +1 -0
- package/dist/packages/datadog-api-client-v1/models/TopologyQuery.d.ts +37 -0
- package/dist/packages/datadog-api-client-v1/models/TopologyQuery.js +36 -0
- package/dist/packages/datadog-api-client-v1/models/TopologyQuery.js.map +1 -0
- package/dist/packages/datadog-api-client-v1/models/TopologyQueryDataSource.d.ts +8 -0
- package/dist/packages/datadog-api-client-v1/models/TopologyQueryDataSource.js +11 -0
- package/dist/packages/datadog-api-client-v1/models/TopologyQueryDataSource.js.map +1 -0
- package/dist/packages/datadog-api-client-v1/models/TopologyRequest.d.ts +34 -0
- package/dist/packages/datadog-api-client-v1/models/TopologyRequest.js +32 -0
- package/dist/packages/datadog-api-client-v1/models/TopologyRequest.js.map +1 -0
- package/dist/packages/datadog-api-client-v1/models/TopologyRequestType.d.ts +7 -0
- package/dist/packages/datadog-api-client-v1/models/TopologyRequestType.js +10 -0
- package/dist/packages/datadog-api-client-v1/models/TopologyRequestType.js.map +1 -0
- package/dist/packages/datadog-api-client-v1/models/UsageAttributionSort.d.ts +3 -1
- package/dist/packages/datadog-api-client-v1/models/UsageAttributionSort.js +3 -1
- package/dist/packages/datadog-api-client-v1/models/UsageAttributionSort.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/models/UsageAttributionSupportedMetrics.d.ts +3 -1
- package/dist/packages/datadog-api-client-v1/models/UsageAttributionSupportedMetrics.js +3 -1
- package/dist/packages/datadog-api-client-v1/models/UsageAttributionSupportedMetrics.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/models/UsageAttributionValues.d.ts +8 -0
- package/dist/packages/datadog-api-client-v1/models/UsageAttributionValues.js +10 -0
- package/dist/packages/datadog-api-client-v1/models/UsageAttributionValues.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/models/UsageFargateHour.d.ts +4 -0
- package/dist/packages/datadog-api-client-v1/models/UsageFargateHour.js +5 -0
- package/dist/packages/datadog-api-client-v1/models/UsageFargateHour.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/models/UsageSummaryDate.d.ts +4 -0
- package/dist/packages/datadog-api-client-v1/models/UsageSummaryDate.js +5 -0
- package/dist/packages/datadog-api-client-v1/models/UsageSummaryDate.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/models/UsageSummaryDateOrg.d.ts +4 -0
- package/dist/packages/datadog-api-client-v1/models/UsageSummaryDateOrg.js +5 -0
- package/dist/packages/datadog-api-client-v1/models/UsageSummaryDateOrg.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/models/UsageSummaryResponse.d.ts +4 -0
- package/dist/packages/datadog-api-client-v1/models/UsageSummaryResponse.js +5 -0
- package/dist/packages/datadog-api-client-v1/models/UsageSummaryResponse.js.map +1 -1
- package/dist/packages/datadog-api-client-v1/models/WidgetDefinition.d.ts +3 -1
- package/dist/packages/datadog-api-client-v2/apis/AuditApi.js +58 -86
- package/dist/packages/datadog-api-client-v2/apis/AuditApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/apis/AuthNMappingsApi.js +144 -241
- package/dist/packages/datadog-api-client-v2/apis/AuthNMappingsApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/apis/CloudWorkloadSecurityApi.js +167 -260
- package/dist/packages/datadog-api-client-v2/apis/CloudWorkloadSecurityApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/apis/DashboardListsApi.js +119 -202
- package/dist/packages/datadog-api-client-v2/apis/DashboardListsApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/apis/EventsApi.js +57 -86
- package/dist/packages/datadog-api-client-v2/apis/EventsApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/apis/IncidentServicesApi.js +151 -311
- package/dist/packages/datadog-api-client-v2/apis/IncidentServicesApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/apis/IncidentTeamsApi.js +151 -311
- package/dist/packages/datadog-api-client-v2/apis/IncidentTeamsApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/apis/IncidentsApi.d.ts +67 -0
- package/dist/packages/datadog-api-client-v2/apis/IncidentsApi.js +365 -303
- package/dist/packages/datadog-api-client-v2/apis/IncidentsApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/apis/KeyManagementApi.js +403 -650
- package/dist/packages/datadog-api-client-v2/apis/KeyManagementApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/apis/LogsApi.js +121 -222
- package/dist/packages/datadog-api-client-v2/apis/LogsApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/apis/LogsArchivesApi.js +285 -469
- package/dist/packages/datadog-api-client-v2/apis/LogsArchivesApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/apis/LogsMetricsApi.js +142 -221
- package/dist/packages/datadog-api-client-v2/apis/LogsMetricsApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/apis/MetricsApi.d.ts +41 -8
- package/dist/packages/datadog-api-client-v2/apis/MetricsApi.js +428 -560
- package/dist/packages/datadog-api-client-v2/apis/MetricsApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/apis/OpsgenieIntegrationApi.js +146 -261
- package/dist/packages/datadog-api-client-v2/apis/OpsgenieIntegrationApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/apis/OrganizationsApi.js +27 -40
- package/dist/packages/datadog-api-client-v2/apis/OrganizationsApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/apis/ProcessesApi.js +29 -43
- package/dist/packages/datadog-api-client-v2/apis/ProcessesApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/apis/RUMApi.js +222 -310
- package/dist/packages/datadog-api-client-v2/apis/RUMApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/apis/RolesApi.js +380 -625
- package/dist/packages/datadog-api-client-v2/apis/RolesApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/apis/SecurityMonitoringApi.d.ts +21 -0
- package/dist/packages/datadog-api-client-v2/apis/SecurityMonitoringApi.js +522 -685
- package/dist/packages/datadog-api-client-v2/apis/SecurityMonitoringApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/apis/ServiceAccountsApi.js +144 -231
- package/dist/packages/datadog-api-client-v2/apis/ServiceAccountsApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/apis/UsageMeteringApi.d.ts +43 -6
- package/dist/packages/datadog-api-client-v2/apis/UsageMeteringApi.js +284 -265
- package/dist/packages/datadog-api-client-v2/apis/UsageMeteringApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/apis/UsersApi.js +289 -446
- package/dist/packages/datadog-api-client-v2/apis/UsersApi.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/index.d.ts +35 -5
- package/dist/packages/datadog-api-client-v2/index.js +49 -15
- package/dist/packages/datadog-api-client-v2/index.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentAttachmentType.d.ts +8 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentAttachmentType.js +11 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentAttachmentType.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentAttributes.d.ts +12 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentAttributes.js +3 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentAttributes.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentData.d.ts +43 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentData.js +44 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentData.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentLinkAttachmentType.d.ts +7 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentLinkAttachmentType.js +10 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentLinkAttachmentType.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentLinkAttributes.d.ts +34 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentLinkAttributes.js +34 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentLinkAttributes.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentLinkAttributesAttachmentObject.d.ts +32 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentLinkAttributesAttachmentObject.js +39 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentLinkAttributesAttachmentObject.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentPostmortemAttachmentType.d.ts +7 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentPostmortemAttachmentType.js +10 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentPostmortemAttachmentType.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentPostmortemAttributes.d.ts +34 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentPostmortemAttributes.js +34 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentPostmortemAttributes.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentRelatedObject.d.ts +7 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentRelatedObject.js +10 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentRelatedObject.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentRelationships.d.ts +29 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentRelationships.js +28 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentRelationships.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentType.d.ts +7 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentType.js +10 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentType.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentUpdateAttributes.d.ts +12 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentUpdateAttributes.js +3 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentUpdateAttributes.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentUpdateData.d.ts +38 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentUpdateData.js +37 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentUpdateData.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentUpdateRequest.d.ts +32 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentUpdateRequest.js +29 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentUpdateRequest.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentUpdateResponse.d.ts +35 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentUpdateResponse.js +33 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentUpdateResponse.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentsPostmortemAttributesAttachmentObject.d.ts +32 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentsPostmortemAttributesAttachmentObject.js +39 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentsPostmortemAttributesAttachmentObject.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentsResponse.d.ts +34 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentsResponse.js +33 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentsResponse.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentsResponseIncludedItem.d.ts +11 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentsResponseIncludedItem.js +3 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentAttachmentsResponseIncludedItem.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/IncidentRelatedObject.d.ts +2 -1
- package/dist/packages/datadog-api-client-v2/models/IncidentRelatedObject.js +2 -1
- package/dist/packages/datadog-api-client-v2/models/IncidentRelatedObject.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/models/IncidentResponseAttributes.d.ts +0 -4
- package/dist/packages/datadog-api-client-v2/models/IncidentResponseAttributes.js +0 -4
- package/dist/packages/datadog-api-client-v2/models/IncidentResponseAttributes.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/models/IncidentResponseIncludedItem.d.ts +2 -1
- package/dist/packages/datadog-api-client-v2/models/IncidentResponseRelationships.d.ts +5 -5
- package/dist/packages/datadog-api-client-v2/models/IncidentResponseRelationships.js +4 -4
- package/dist/packages/datadog-api-client-v2/models/IncidentResponseRelationships.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/models/MetricActiveConfigurationType.d.ts +7 -0
- package/dist/packages/datadog-api-client-v2/models/MetricActiveConfigurationType.js +10 -0
- package/dist/packages/datadog-api-client-v2/models/MetricActiveConfigurationType.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/MetricSuggestedTagsAndAggregations.d.ts +38 -0
- package/dist/packages/datadog-api-client-v2/models/MetricSuggestedTagsAndAggregations.js +36 -0
- package/dist/packages/datadog-api-client-v2/models/MetricSuggestedTagsAndAggregations.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/MetricSuggestedTagsAndAggregationsResponse.d.ts +29 -0
- package/dist/packages/datadog-api-client-v2/models/MetricSuggestedTagsAndAggregationsResponse.js +28 -0
- package/dist/packages/datadog-api-client-v2/models/MetricSuggestedTagsAndAggregationsResponse.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/MetricSuggestedTagsAttributes.d.ts +33 -0
- package/dist/packages/datadog-api-client-v2/models/MetricSuggestedTagsAttributes.js +32 -0
- package/dist/packages/datadog-api-client-v2/models/MetricSuggestedTagsAttributes.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/ObjectSerializer.js +73 -10
- package/dist/packages/datadog-api-client-v2/models/ObjectSerializer.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/models/RelationshipToIncidentAttachment.d.ts +29 -0
- package/dist/packages/datadog-api-client-v2/models/RelationshipToIncidentAttachment.js +29 -0
- package/dist/packages/datadog-api-client-v2/models/RelationshipToIncidentAttachment.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/RelationshipToIncidentAttachmentData.d.ts +33 -0
- package/dist/packages/datadog-api-client-v2/models/RelationshipToIncidentAttachmentData.js +34 -0
- package/dist/packages/datadog-api-client-v2/models/RelationshipToIncidentAttachmentData.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringRuleCreatePayload.d.ts +4 -61
- package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringRuleCreatePayload.js +0 -67
- package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringRuleCreatePayload.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringRuleQuery.d.ts +4 -46
- package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringRuleQuery.js +0 -49
- package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringRuleQuery.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringRuleQueryAggregation.d.ts +2 -1
- package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringRuleQueryAggregation.js +2 -1
- package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringRuleQueryAggregation.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringRuleResponse.d.ts +5 -90
- package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringRuleResponse.js +0 -93
- package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringRuleResponse.js.map +1 -1
- package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSignalRuleCreatePayload.d.ts +69 -0
- package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSignalRuleCreatePayload.js +70 -0
- package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSignalRuleCreatePayload.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSignalRuleQuery.d.ts +49 -0
- package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSignalRuleQuery.js +50 -0
- package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSignalRuleQuery.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSignalRuleResponse.d.ts +97 -0
- package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSignalRuleResponse.js +96 -0
- package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSignalRuleResponse.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSignalRuleType.d.ts +7 -0
- package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSignalRuleType.js +10 -0
- package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringSignalRuleType.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringStandardRuleCreatePayload.d.ts +69 -0
- package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringStandardRuleCreatePayload.js +70 -0
- package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringStandardRuleCreatePayload.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/{SecurityMonitoringRuleQueryCreate.d.ts → SecurityMonitoringStandardRuleQuery.d.ts} +1 -1
- package/dist/packages/datadog-api-client-v2/models/{SecurityMonitoringRuleQueryCreate.js → SecurityMonitoringStandardRuleQuery.js} +9 -9
- package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringStandardRuleQuery.js.map +1 -0
- package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringStandardRuleResponse.d.ts +97 -0
- package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringStandardRuleResponse.js +96 -0
- package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringStandardRuleResponse.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/dist/packages/datadog-api-client-v2/models/SecurityMonitoringRuleQueryCreate.js.map +0 -1
|
@@ -55,9 +55,9 @@ exports.UsageMeteringApi = exports.UsageMeteringApiResponseProcessor = exports.U
|
|
|
55
55
|
var baseapi_1 = require("../../datadog-api-client-common/baseapi");
|
|
56
56
|
var configuration_1 = require("../../datadog-api-client-common/configuration");
|
|
57
57
|
var http_1 = require("../../datadog-api-client-common/http/http");
|
|
58
|
+
var logger_1 = require("../../../logger");
|
|
58
59
|
var ObjectSerializer_1 = require("../models/ObjectSerializer");
|
|
59
60
|
var exception_1 = require("../../datadog-api-client-common/exception");
|
|
60
|
-
var util_1 = require("../../datadog-api-client-common/util");
|
|
61
61
|
var UsageMeteringApiRequestFactory = /** @class */ (function (_super) {
|
|
62
62
|
__extends(UsageMeteringApiRequestFactory, _super);
|
|
63
63
|
function UsageMeteringApiRequestFactory() {
|
|
@@ -1275,53 +1275,47 @@ var UsageMeteringApiResponseProcessor = /** @class */ (function () {
|
|
|
1275
1275
|
*/
|
|
1276
1276
|
UsageMeteringApiResponseProcessor.prototype.getDailyCustomReports = function (response) {
|
|
1277
1277
|
return __awaiter(this, void 0, void 0, function () {
|
|
1278
|
-
var contentType, body_1, _a, _b, _c, _d,
|
|
1279
|
-
return __generator(this, function (
|
|
1280
|
-
switch (
|
|
1278
|
+
var contentType, body_1, _a, _b, _c, _d, bodyText, _e, _f, body_2, body_3, _g, _h, _j, _k, body;
|
|
1279
|
+
return __generator(this, function (_l) {
|
|
1280
|
+
switch (_l.label) {
|
|
1281
1281
|
case 0:
|
|
1282
1282
|
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
1283
|
-
if (!(
|
|
1283
|
+
if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
|
|
1284
1284
|
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
1285
1285
|
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1286
1286
|
return [4 /*yield*/, response.body.text()];
|
|
1287
1287
|
case 1:
|
|
1288
|
-
body_1 = _b.apply(_a, [_d.apply(_c, [
|
|
1289
|
-
"UsageCustomReportsResponse"
|
|
1290
|
-
""]);
|
|
1288
|
+
body_1 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
|
|
1289
|
+
"UsageCustomReportsResponse"]);
|
|
1291
1290
|
return [2 /*return*/, body_1];
|
|
1292
1291
|
case 2:
|
|
1293
|
-
if (!(
|
|
1294
|
-
_f = (_e = ObjectSerializer_1.ObjectSerializer).
|
|
1295
|
-
_h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1292
|
+
if (!(response.httpStatusCode == 403 || response.httpStatusCode == 429)) return [3 /*break*/, 4];
|
|
1293
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1296
1294
|
return [4 /*yield*/, response.body.text()];
|
|
1297
1295
|
case 3:
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
""
|
|
1301
|
-
|
|
1296
|
+
bodyText = _f.apply(_e, [_l.sent(), contentType]);
|
|
1297
|
+
try {
|
|
1298
|
+
body_2 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
1299
|
+
throw new exception_1.ApiException(response.httpStatusCode, body_2);
|
|
1300
|
+
}
|
|
1301
|
+
catch (error) {
|
|
1302
|
+
logger_1.logger.info("Got error deserializing error: ".concat(error));
|
|
1303
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
1304
|
+
}
|
|
1305
|
+
_l.label = 4;
|
|
1302
1306
|
case 4:
|
|
1303
|
-
if (!(
|
|
1304
|
-
|
|
1305
|
-
|
|
1307
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
|
|
1308
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
1309
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1306
1310
|
return [4 /*yield*/, response.body.text()];
|
|
1307
1311
|
case 5:
|
|
1308
|
-
body_3 =
|
|
1309
|
-
"APIErrorResponse",
|
|
1310
|
-
""]);
|
|
1311
|
-
throw new exception_1.ApiException(429, body_3);
|
|
1312
|
-
case 6:
|
|
1313
|
-
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 8];
|
|
1314
|
-
_p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
1315
|
-
_r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1316
|
-
return [4 /*yield*/, response.body.text()];
|
|
1317
|
-
case 7:
|
|
1318
|
-
body_4 = _p.apply(_o, [_r.apply(_q, [_s.sent(), contentType]),
|
|
1312
|
+
body_3 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
|
|
1319
1313
|
"UsageCustomReportsResponse",
|
|
1320
1314
|
""]);
|
|
1321
|
-
return [2 /*return*/,
|
|
1322
|
-
case
|
|
1323
|
-
case
|
|
1324
|
-
body = (
|
|
1315
|
+
return [2 /*return*/, body_3];
|
|
1316
|
+
case 6: return [4 /*yield*/, response.body.text()];
|
|
1317
|
+
case 7:
|
|
1318
|
+
body = (_l.sent()) || "";
|
|
1325
1319
|
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
1326
1320
|
}
|
|
1327
1321
|
});
|
|
@@ -1336,53 +1330,47 @@ var UsageMeteringApiResponseProcessor = /** @class */ (function () {
|
|
|
1336
1330
|
*/
|
|
1337
1331
|
UsageMeteringApiResponseProcessor.prototype.getHourlyUsageAttribution = function (response) {
|
|
1338
1332
|
return __awaiter(this, void 0, void 0, function () {
|
|
1339
|
-
var contentType,
|
|
1340
|
-
return __generator(this, function (
|
|
1341
|
-
switch (
|
|
1333
|
+
var contentType, body_4, _a, _b, _c, _d, bodyText, _e, _f, body_5, body_6, _g, _h, _j, _k, body;
|
|
1334
|
+
return __generator(this, function (_l) {
|
|
1335
|
+
switch (_l.label) {
|
|
1342
1336
|
case 0:
|
|
1343
1337
|
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
1344
|
-
if (!(
|
|
1338
|
+
if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
|
|
1345
1339
|
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
1346
1340
|
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1347
1341
|
return [4 /*yield*/, response.body.text()];
|
|
1348
1342
|
case 1:
|
|
1349
|
-
|
|
1350
|
-
"HourlyUsageAttributionResponse"
|
|
1351
|
-
|
|
1352
|
-
return [2 /*return*/, body_5];
|
|
1343
|
+
body_4 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
|
|
1344
|
+
"HourlyUsageAttributionResponse"]);
|
|
1345
|
+
return [2 /*return*/, body_4];
|
|
1353
1346
|
case 2:
|
|
1354
|
-
if (!(
|
|
1355
|
-
_f = (_e = ObjectSerializer_1.ObjectSerializer).
|
|
1356
|
-
_h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1347
|
+
if (!(response.httpStatusCode == 403 || response.httpStatusCode == 429)) return [3 /*break*/, 4];
|
|
1348
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1357
1349
|
return [4 /*yield*/, response.body.text()];
|
|
1358
1350
|
case 3:
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
""
|
|
1362
|
-
|
|
1351
|
+
bodyText = _f.apply(_e, [_l.sent(), contentType]);
|
|
1352
|
+
try {
|
|
1353
|
+
body_5 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
1354
|
+
throw new exception_1.ApiException(response.httpStatusCode, body_5);
|
|
1355
|
+
}
|
|
1356
|
+
catch (error) {
|
|
1357
|
+
logger_1.logger.info("Got error deserializing error: ".concat(error));
|
|
1358
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
1359
|
+
}
|
|
1360
|
+
_l.label = 4;
|
|
1363
1361
|
case 4:
|
|
1364
|
-
if (!(
|
|
1365
|
-
|
|
1366
|
-
|
|
1362
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
|
|
1363
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
1364
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1367
1365
|
return [4 /*yield*/, response.body.text()];
|
|
1368
1366
|
case 5:
|
|
1369
|
-
|
|
1370
|
-
"APIErrorResponse",
|
|
1371
|
-
""]);
|
|
1372
|
-
throw new exception_1.ApiException(429, body_7);
|
|
1373
|
-
case 6:
|
|
1374
|
-
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 8];
|
|
1375
|
-
_p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
1376
|
-
_r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1377
|
-
return [4 /*yield*/, response.body.text()];
|
|
1378
|
-
case 7:
|
|
1379
|
-
body_8 = _p.apply(_o, [_r.apply(_q, [_s.sent(), contentType]),
|
|
1367
|
+
body_6 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
|
|
1380
1368
|
"HourlyUsageAttributionResponse",
|
|
1381
1369
|
""]);
|
|
1382
|
-
return [2 /*return*/,
|
|
1383
|
-
case
|
|
1384
|
-
case
|
|
1385
|
-
body = (
|
|
1370
|
+
return [2 /*return*/, body_6];
|
|
1371
|
+
case 6: return [4 /*yield*/, response.body.text()];
|
|
1372
|
+
case 7:
|
|
1373
|
+
body = (_l.sent()) || "";
|
|
1386
1374
|
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
1387
1375
|
}
|
|
1388
1376
|
});
|
|
@@ -1397,63 +1385,49 @@ var UsageMeteringApiResponseProcessor = /** @class */ (function () {
|
|
|
1397
1385
|
*/
|
|
1398
1386
|
UsageMeteringApiResponseProcessor.prototype.getIncidentManagement = function (response) {
|
|
1399
1387
|
return __awaiter(this, void 0, void 0, function () {
|
|
1400
|
-
var contentType,
|
|
1401
|
-
return __generator(this, function (
|
|
1402
|
-
switch (
|
|
1388
|
+
var contentType, body_7, _a, _b, _c, _d, bodyText, _e, _f, body_8, body_9, _g, _h, _j, _k, body;
|
|
1389
|
+
return __generator(this, function (_l) {
|
|
1390
|
+
switch (_l.label) {
|
|
1403
1391
|
case 0:
|
|
1404
1392
|
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
1405
|
-
if (!(
|
|
1393
|
+
if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
|
|
1406
1394
|
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
1407
1395
|
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1408
1396
|
return [4 /*yield*/, response.body.text()];
|
|
1409
1397
|
case 1:
|
|
1410
|
-
|
|
1411
|
-
"UsageIncidentManagementResponse"
|
|
1412
|
-
|
|
1413
|
-
return [2 /*return*/, body_9];
|
|
1398
|
+
body_7 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
|
|
1399
|
+
"UsageIncidentManagementResponse"]);
|
|
1400
|
+
return [2 /*return*/, body_7];
|
|
1414
1401
|
case 2:
|
|
1415
|
-
if (!(
|
|
1416
|
-
|
|
1417
|
-
|
|
1402
|
+
if (!(response.httpStatusCode == 400 ||
|
|
1403
|
+
response.httpStatusCode == 403 ||
|
|
1404
|
+
response.httpStatusCode == 429)) return [3 /*break*/, 4];
|
|
1405
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1418
1406
|
return [4 /*yield*/, response.body.text()];
|
|
1419
1407
|
case 3:
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
""
|
|
1423
|
-
|
|
1408
|
+
bodyText = _f.apply(_e, [_l.sent(), contentType]);
|
|
1409
|
+
try {
|
|
1410
|
+
body_8 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
1411
|
+
throw new exception_1.ApiException(response.httpStatusCode, body_8);
|
|
1412
|
+
}
|
|
1413
|
+
catch (error) {
|
|
1414
|
+
logger_1.logger.info("Got error deserializing error: ".concat(error));
|
|
1415
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
1416
|
+
}
|
|
1417
|
+
_l.label = 4;
|
|
1424
1418
|
case 4:
|
|
1425
|
-
if (!(
|
|
1426
|
-
|
|
1427
|
-
|
|
1419
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
|
|
1420
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
1421
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1428
1422
|
return [4 /*yield*/, response.body.text()];
|
|
1429
1423
|
case 5:
|
|
1430
|
-
|
|
1431
|
-
"APIErrorResponse",
|
|
1432
|
-
""]);
|
|
1433
|
-
throw new exception_1.ApiException(403, body_11);
|
|
1434
|
-
case 6:
|
|
1435
|
-
if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3 /*break*/, 8];
|
|
1436
|
-
_p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
1437
|
-
_r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1438
|
-
return [4 /*yield*/, response.body.text()];
|
|
1439
|
-
case 7:
|
|
1440
|
-
body_12 = _p.apply(_o, [_r.apply(_q, [_w.sent(), contentType]),
|
|
1441
|
-
"APIErrorResponse",
|
|
1442
|
-
""]);
|
|
1443
|
-
throw new exception_1.ApiException(429, body_12);
|
|
1444
|
-
case 8:
|
|
1445
|
-
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 10];
|
|
1446
|
-
_t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
1447
|
-
_v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1448
|
-
return [4 /*yield*/, response.body.text()];
|
|
1449
|
-
case 9:
|
|
1450
|
-
body_13 = _t.apply(_s, [_v.apply(_u, [_w.sent(), contentType]),
|
|
1424
|
+
body_9 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
|
|
1451
1425
|
"UsageIncidentManagementResponse",
|
|
1452
1426
|
""]);
|
|
1453
|
-
return [2 /*return*/,
|
|
1454
|
-
case
|
|
1455
|
-
case
|
|
1456
|
-
body = (
|
|
1427
|
+
return [2 /*return*/, body_9];
|
|
1428
|
+
case 6: return [4 /*yield*/, response.body.text()];
|
|
1429
|
+
case 7:
|
|
1430
|
+
body = (_l.sent()) || "";
|
|
1457
1431
|
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
1458
1432
|
}
|
|
1459
1433
|
});
|
|
@@ -1468,63 +1442,49 @@ var UsageMeteringApiResponseProcessor = /** @class */ (function () {
|
|
|
1468
1442
|
*/
|
|
1469
1443
|
UsageMeteringApiResponseProcessor.prototype.getIngestedSpans = function (response) {
|
|
1470
1444
|
return __awaiter(this, void 0, void 0, function () {
|
|
1471
|
-
var contentType,
|
|
1472
|
-
return __generator(this, function (
|
|
1473
|
-
switch (
|
|
1445
|
+
var contentType, body_10, _a, _b, _c, _d, bodyText, _e, _f, body_11, body_12, _g, _h, _j, _k, body;
|
|
1446
|
+
return __generator(this, function (_l) {
|
|
1447
|
+
switch (_l.label) {
|
|
1474
1448
|
case 0:
|
|
1475
1449
|
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
1476
|
-
if (!(
|
|
1450
|
+
if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
|
|
1477
1451
|
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
1478
1452
|
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1479
1453
|
return [4 /*yield*/, response.body.text()];
|
|
1480
1454
|
case 1:
|
|
1481
|
-
|
|
1482
|
-
"UsageIngestedSpansResponse"
|
|
1483
|
-
|
|
1484
|
-
return [2 /*return*/, body_14];
|
|
1455
|
+
body_10 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
|
|
1456
|
+
"UsageIngestedSpansResponse"]);
|
|
1457
|
+
return [2 /*return*/, body_10];
|
|
1485
1458
|
case 2:
|
|
1486
|
-
if (!(
|
|
1487
|
-
|
|
1488
|
-
|
|
1459
|
+
if (!(response.httpStatusCode == 400 ||
|
|
1460
|
+
response.httpStatusCode == 403 ||
|
|
1461
|
+
response.httpStatusCode == 429)) return [3 /*break*/, 4];
|
|
1462
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1489
1463
|
return [4 /*yield*/, response.body.text()];
|
|
1490
1464
|
case 3:
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
""
|
|
1494
|
-
|
|
1465
|
+
bodyText = _f.apply(_e, [_l.sent(), contentType]);
|
|
1466
|
+
try {
|
|
1467
|
+
body_11 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
1468
|
+
throw new exception_1.ApiException(response.httpStatusCode, body_11);
|
|
1469
|
+
}
|
|
1470
|
+
catch (error) {
|
|
1471
|
+
logger_1.logger.info("Got error deserializing error: ".concat(error));
|
|
1472
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
1473
|
+
}
|
|
1474
|
+
_l.label = 4;
|
|
1495
1475
|
case 4:
|
|
1496
|
-
if (!(
|
|
1497
|
-
|
|
1498
|
-
|
|
1476
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
|
|
1477
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
1478
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1499
1479
|
return [4 /*yield*/, response.body.text()];
|
|
1500
1480
|
case 5:
|
|
1501
|
-
|
|
1502
|
-
"APIErrorResponse",
|
|
1503
|
-
""]);
|
|
1504
|
-
throw new exception_1.ApiException(403, body_16);
|
|
1505
|
-
case 6:
|
|
1506
|
-
if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3 /*break*/, 8];
|
|
1507
|
-
_p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
1508
|
-
_r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1509
|
-
return [4 /*yield*/, response.body.text()];
|
|
1510
|
-
case 7:
|
|
1511
|
-
body_17 = _p.apply(_o, [_r.apply(_q, [_w.sent(), contentType]),
|
|
1512
|
-
"APIErrorResponse",
|
|
1513
|
-
""]);
|
|
1514
|
-
throw new exception_1.ApiException(429, body_17);
|
|
1515
|
-
case 8:
|
|
1516
|
-
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 10];
|
|
1517
|
-
_t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
1518
|
-
_v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1519
|
-
return [4 /*yield*/, response.body.text()];
|
|
1520
|
-
case 9:
|
|
1521
|
-
body_18 = _t.apply(_s, [_v.apply(_u, [_w.sent(), contentType]),
|
|
1481
|
+
body_12 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
|
|
1522
1482
|
"UsageIngestedSpansResponse",
|
|
1523
1483
|
""]);
|
|
1524
|
-
return [2 /*return*/,
|
|
1525
|
-
case
|
|
1526
|
-
case
|
|
1527
|
-
body = (
|
|
1484
|
+
return [2 /*return*/, body_12];
|
|
1485
|
+
case 6: return [4 /*yield*/, response.body.text()];
|
|
1486
|
+
case 7:
|
|
1487
|
+
body = (_l.sent()) || "";
|
|
1528
1488
|
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
1529
1489
|
}
|
|
1530
1490
|
});
|
|
@@ -1539,53 +1499,47 @@ var UsageMeteringApiResponseProcessor = /** @class */ (function () {
|
|
|
1539
1499
|
*/
|
|
1540
1500
|
UsageMeteringApiResponseProcessor.prototype.getMonthlyCustomReports = function (response) {
|
|
1541
1501
|
return __awaiter(this, void 0, void 0, function () {
|
|
1542
|
-
var contentType,
|
|
1543
|
-
return __generator(this, function (
|
|
1544
|
-
switch (
|
|
1502
|
+
var contentType, body_13, _a, _b, _c, _d, bodyText, _e, _f, body_14, body_15, _g, _h, _j, _k, body;
|
|
1503
|
+
return __generator(this, function (_l) {
|
|
1504
|
+
switch (_l.label) {
|
|
1545
1505
|
case 0:
|
|
1546
1506
|
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
1547
|
-
if (!(
|
|
1507
|
+
if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
|
|
1548
1508
|
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
1549
1509
|
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1550
1510
|
return [4 /*yield*/, response.body.text()];
|
|
1551
1511
|
case 1:
|
|
1552
|
-
|
|
1553
|
-
"UsageCustomReportsResponse"
|
|
1554
|
-
|
|
1555
|
-
return [2 /*return*/, body_19];
|
|
1512
|
+
body_13 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
|
|
1513
|
+
"UsageCustomReportsResponse"]);
|
|
1514
|
+
return [2 /*return*/, body_13];
|
|
1556
1515
|
case 2:
|
|
1557
|
-
if (!(
|
|
1558
|
-
_f = (_e = ObjectSerializer_1.ObjectSerializer).
|
|
1559
|
-
_h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1516
|
+
if (!(response.httpStatusCode == 403 || response.httpStatusCode == 429)) return [3 /*break*/, 4];
|
|
1517
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1560
1518
|
return [4 /*yield*/, response.body.text()];
|
|
1561
1519
|
case 3:
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
""
|
|
1565
|
-
|
|
1520
|
+
bodyText = _f.apply(_e, [_l.sent(), contentType]);
|
|
1521
|
+
try {
|
|
1522
|
+
body_14 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
1523
|
+
throw new exception_1.ApiException(response.httpStatusCode, body_14);
|
|
1524
|
+
}
|
|
1525
|
+
catch (error) {
|
|
1526
|
+
logger_1.logger.info("Got error deserializing error: ".concat(error));
|
|
1527
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
1528
|
+
}
|
|
1529
|
+
_l.label = 4;
|
|
1566
1530
|
case 4:
|
|
1567
|
-
if (!(
|
|
1568
|
-
|
|
1569
|
-
|
|
1531
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
|
|
1532
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
1533
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1570
1534
|
return [4 /*yield*/, response.body.text()];
|
|
1571
1535
|
case 5:
|
|
1572
|
-
|
|
1573
|
-
"APIErrorResponse",
|
|
1574
|
-
""]);
|
|
1575
|
-
throw new exception_1.ApiException(429, body_21);
|
|
1576
|
-
case 6:
|
|
1577
|
-
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 8];
|
|
1578
|
-
_p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
1579
|
-
_r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1580
|
-
return [4 /*yield*/, response.body.text()];
|
|
1581
|
-
case 7:
|
|
1582
|
-
body_22 = _p.apply(_o, [_r.apply(_q, [_s.sent(), contentType]),
|
|
1536
|
+
body_15 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
|
|
1583
1537
|
"UsageCustomReportsResponse",
|
|
1584
1538
|
""]);
|
|
1585
|
-
return [2 /*return*/,
|
|
1586
|
-
case
|
|
1587
|
-
case
|
|
1588
|
-
body = (
|
|
1539
|
+
return [2 /*return*/, body_15];
|
|
1540
|
+
case 6: return [4 /*yield*/, response.body.text()];
|
|
1541
|
+
case 7:
|
|
1542
|
+
body = (_l.sent()) || "";
|
|
1589
1543
|
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
1590
1544
|
}
|
|
1591
1545
|
});
|
|
@@ -1600,53 +1554,47 @@ var UsageMeteringApiResponseProcessor = /** @class */ (function () {
|
|
|
1600
1554
|
*/
|
|
1601
1555
|
UsageMeteringApiResponseProcessor.prototype.getMonthlyUsageAttribution = function (response) {
|
|
1602
1556
|
return __awaiter(this, void 0, void 0, function () {
|
|
1603
|
-
var contentType,
|
|
1604
|
-
return __generator(this, function (
|
|
1605
|
-
switch (
|
|
1557
|
+
var contentType, body_16, _a, _b, _c, _d, bodyText, _e, _f, body_17, body_18, _g, _h, _j, _k, body;
|
|
1558
|
+
return __generator(this, function (_l) {
|
|
1559
|
+
switch (_l.label) {
|
|
1606
1560
|
case 0:
|
|
1607
1561
|
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
1608
|
-
if (!(
|
|
1562
|
+
if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
|
|
1609
1563
|
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
1610
1564
|
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1611
1565
|
return [4 /*yield*/, response.body.text()];
|
|
1612
1566
|
case 1:
|
|
1613
|
-
|
|
1614
|
-
"MonthlyUsageAttributionResponse"
|
|
1615
|
-
|
|
1616
|
-
return [2 /*return*/, body_23];
|
|
1567
|
+
body_16 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
|
|
1568
|
+
"MonthlyUsageAttributionResponse"]);
|
|
1569
|
+
return [2 /*return*/, body_16];
|
|
1617
1570
|
case 2:
|
|
1618
|
-
if (!(
|
|
1619
|
-
_f = (_e = ObjectSerializer_1.ObjectSerializer).
|
|
1620
|
-
_h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1571
|
+
if (!(response.httpStatusCode == 403 || response.httpStatusCode == 429)) return [3 /*break*/, 4];
|
|
1572
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1621
1573
|
return [4 /*yield*/, response.body.text()];
|
|
1622
1574
|
case 3:
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
""
|
|
1626
|
-
|
|
1575
|
+
bodyText = _f.apply(_e, [_l.sent(), contentType]);
|
|
1576
|
+
try {
|
|
1577
|
+
body_17 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
1578
|
+
throw new exception_1.ApiException(response.httpStatusCode, body_17);
|
|
1579
|
+
}
|
|
1580
|
+
catch (error) {
|
|
1581
|
+
logger_1.logger.info("Got error deserializing error: ".concat(error));
|
|
1582
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
1583
|
+
}
|
|
1584
|
+
_l.label = 4;
|
|
1627
1585
|
case 4:
|
|
1628
|
-
if (!(
|
|
1629
|
-
|
|
1630
|
-
|
|
1586
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
|
|
1587
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
1588
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1631
1589
|
return [4 /*yield*/, response.body.text()];
|
|
1632
1590
|
case 5:
|
|
1633
|
-
|
|
1634
|
-
"APIErrorResponse",
|
|
1635
|
-
""]);
|
|
1636
|
-
throw new exception_1.ApiException(429, body_25);
|
|
1637
|
-
case 6:
|
|
1638
|
-
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 8];
|
|
1639
|
-
_p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
1640
|
-
_r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1641
|
-
return [4 /*yield*/, response.body.text()];
|
|
1642
|
-
case 7:
|
|
1643
|
-
body_26 = _p.apply(_o, [_r.apply(_q, [_s.sent(), contentType]),
|
|
1591
|
+
body_18 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
|
|
1644
1592
|
"MonthlyUsageAttributionResponse",
|
|
1645
1593
|
""]);
|
|
1646
|
-
return [2 /*return*/,
|
|
1647
|
-
case
|
|
1648
|
-
case
|
|
1649
|
-
body = (
|
|
1594
|
+
return [2 /*return*/, body_18];
|
|
1595
|
+
case 6: return [4 /*yield*/, response.body.text()];
|
|
1596
|
+
case 7:
|
|
1597
|
+
body = (_l.sent()) || "";
|
|
1650
1598
|
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
1651
1599
|
}
|
|
1652
1600
|
});
|
|
@@ -1661,63 +1609,49 @@ var UsageMeteringApiResponseProcessor = /** @class */ (function () {
|
|
|
1661
1609
|
*/
|
|
1662
1610
|
UsageMeteringApiResponseProcessor.prototype.getSpecifiedDailyCustomReports = function (response) {
|
|
1663
1611
|
return __awaiter(this, void 0, void 0, function () {
|
|
1664
|
-
var contentType,
|
|
1665
|
-
return __generator(this, function (
|
|
1666
|
-
switch (
|
|
1612
|
+
var contentType, body_19, _a, _b, _c, _d, bodyText, _e, _f, body_20, body_21, _g, _h, _j, _k, body;
|
|
1613
|
+
return __generator(this, function (_l) {
|
|
1614
|
+
switch (_l.label) {
|
|
1667
1615
|
case 0:
|
|
1668
1616
|
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
1669
|
-
if (!(
|
|
1617
|
+
if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
|
|
1670
1618
|
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
1671
1619
|
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1672
1620
|
return [4 /*yield*/, response.body.text()];
|
|
1673
1621
|
case 1:
|
|
1674
|
-
|
|
1675
|
-
"UsageSpecifiedCustomReportsResponse"
|
|
1676
|
-
|
|
1677
|
-
return [2 /*return*/, body_27];
|
|
1622
|
+
body_19 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
|
|
1623
|
+
"UsageSpecifiedCustomReportsResponse"]);
|
|
1624
|
+
return [2 /*return*/, body_19];
|
|
1678
1625
|
case 2:
|
|
1679
|
-
if (!(
|
|
1680
|
-
|
|
1681
|
-
|
|
1626
|
+
if (!(response.httpStatusCode == 403 ||
|
|
1627
|
+
response.httpStatusCode == 404 ||
|
|
1628
|
+
response.httpStatusCode == 429)) return [3 /*break*/, 4];
|
|
1629
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1682
1630
|
return [4 /*yield*/, response.body.text()];
|
|
1683
1631
|
case 3:
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
""
|
|
1687
|
-
|
|
1632
|
+
bodyText = _f.apply(_e, [_l.sent(), contentType]);
|
|
1633
|
+
try {
|
|
1634
|
+
body_20 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
1635
|
+
throw new exception_1.ApiException(response.httpStatusCode, body_20);
|
|
1636
|
+
}
|
|
1637
|
+
catch (error) {
|
|
1638
|
+
logger_1.logger.info("Got error deserializing error: ".concat(error));
|
|
1639
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
1640
|
+
}
|
|
1641
|
+
_l.label = 4;
|
|
1688
1642
|
case 4:
|
|
1689
|
-
if (!(
|
|
1690
|
-
|
|
1691
|
-
|
|
1643
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
|
|
1644
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
1645
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1692
1646
|
return [4 /*yield*/, response.body.text()];
|
|
1693
1647
|
case 5:
|
|
1694
|
-
|
|
1695
|
-
"APIErrorResponse",
|
|
1696
|
-
""]);
|
|
1697
|
-
throw new exception_1.ApiException(404, body_29);
|
|
1698
|
-
case 6:
|
|
1699
|
-
if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3 /*break*/, 8];
|
|
1700
|
-
_p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
1701
|
-
_r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1702
|
-
return [4 /*yield*/, response.body.text()];
|
|
1703
|
-
case 7:
|
|
1704
|
-
body_30 = _p.apply(_o, [_r.apply(_q, [_w.sent(), contentType]),
|
|
1705
|
-
"APIErrorResponse",
|
|
1706
|
-
""]);
|
|
1707
|
-
throw new exception_1.ApiException(429, body_30);
|
|
1708
|
-
case 8:
|
|
1709
|
-
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 10];
|
|
1710
|
-
_t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
1711
|
-
_v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1712
|
-
return [4 /*yield*/, response.body.text()];
|
|
1713
|
-
case 9:
|
|
1714
|
-
body_31 = _t.apply(_s, [_v.apply(_u, [_w.sent(), contentType]),
|
|
1648
|
+
body_21 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
|
|
1715
1649
|
"UsageSpecifiedCustomReportsResponse",
|
|
1716
1650
|
""]);
|
|
1717
|
-
return [2 /*return*/,
|
|
1718
|
-
case
|
|
1719
|
-
case
|
|
1720
|
-
body = (
|
|
1651
|
+
return [2 /*return*/, body_21];
|
|
1652
|
+
case 6: return [4 /*yield*/, response.body.text()];
|
|
1653
|
+
case 7:
|
|
1654
|
+
body = (_l.sent()) || "";
|
|
1721
1655
|
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
1722
1656
|
}
|
|
1723
1657
|
});
|
|
@@ -1732,73 +1666,50 @@ var UsageMeteringApiResponseProcessor = /** @class */ (function () {
|
|
|
1732
1666
|
*/
|
|
1733
1667
|
UsageMeteringApiResponseProcessor.prototype.getSpecifiedMonthlyCustomReports = function (response) {
|
|
1734
1668
|
return __awaiter(this, void 0, void 0, function () {
|
|
1735
|
-
var contentType,
|
|
1736
|
-
return __generator(this, function (
|
|
1737
|
-
switch (
|
|
1669
|
+
var contentType, body_22, _a, _b, _c, _d, bodyText, _e, _f, body_23, body_24, _g, _h, _j, _k, body;
|
|
1670
|
+
return __generator(this, function (_l) {
|
|
1671
|
+
switch (_l.label) {
|
|
1738
1672
|
case 0:
|
|
1739
1673
|
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
1740
|
-
if (!(
|
|
1674
|
+
if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
|
|
1741
1675
|
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
1742
1676
|
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1743
1677
|
return [4 /*yield*/, response.body.text()];
|
|
1744
1678
|
case 1:
|
|
1745
|
-
|
|
1746
|
-
"UsageSpecifiedCustomReportsResponse"
|
|
1747
|
-
|
|
1748
|
-
return [2 /*return*/, body_32];
|
|
1679
|
+
body_22 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
|
|
1680
|
+
"UsageSpecifiedCustomReportsResponse"]);
|
|
1681
|
+
return [2 /*return*/, body_22];
|
|
1749
1682
|
case 2:
|
|
1750
|
-
if (!(
|
|
1751
|
-
|
|
1752
|
-
|
|
1683
|
+
if (!(response.httpStatusCode == 400 ||
|
|
1684
|
+
response.httpStatusCode == 403 ||
|
|
1685
|
+
response.httpStatusCode == 404 ||
|
|
1686
|
+
response.httpStatusCode == 429)) return [3 /*break*/, 4];
|
|
1687
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1753
1688
|
return [4 /*yield*/, response.body.text()];
|
|
1754
1689
|
case 3:
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
""
|
|
1758
|
-
|
|
1690
|
+
bodyText = _f.apply(_e, [_l.sent(), contentType]);
|
|
1691
|
+
try {
|
|
1692
|
+
body_23 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
1693
|
+
throw new exception_1.ApiException(response.httpStatusCode, body_23);
|
|
1694
|
+
}
|
|
1695
|
+
catch (error) {
|
|
1696
|
+
logger_1.logger.info("Got error deserializing error: ".concat(error));
|
|
1697
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
1698
|
+
}
|
|
1699
|
+
_l.label = 4;
|
|
1759
1700
|
case 4:
|
|
1760
|
-
if (!(
|
|
1761
|
-
|
|
1762
|
-
|
|
1701
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
|
|
1702
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
1703
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1763
1704
|
return [4 /*yield*/, response.body.text()];
|
|
1764
1705
|
case 5:
|
|
1765
|
-
|
|
1766
|
-
"APIErrorResponse",
|
|
1767
|
-
""]);
|
|
1768
|
-
throw new exception_1.ApiException(403, body_34);
|
|
1769
|
-
case 6:
|
|
1770
|
-
if (!(0, util_1.isCodeInRange)("404", response.httpStatusCode)) return [3 /*break*/, 8];
|
|
1771
|
-
_p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
1772
|
-
_r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1773
|
-
return [4 /*yield*/, response.body.text()];
|
|
1774
|
-
case 7:
|
|
1775
|
-
body_35 = _p.apply(_o, [_r.apply(_q, [_0.sent(), contentType]),
|
|
1776
|
-
"APIErrorResponse",
|
|
1777
|
-
""]);
|
|
1778
|
-
throw new exception_1.ApiException(404, body_35);
|
|
1779
|
-
case 8:
|
|
1780
|
-
if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3 /*break*/, 10];
|
|
1781
|
-
_t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
1782
|
-
_v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1783
|
-
return [4 /*yield*/, response.body.text()];
|
|
1784
|
-
case 9:
|
|
1785
|
-
body_36 = _t.apply(_s, [_v.apply(_u, [_0.sent(), contentType]),
|
|
1786
|
-
"APIErrorResponse",
|
|
1787
|
-
""]);
|
|
1788
|
-
throw new exception_1.ApiException(429, body_36);
|
|
1789
|
-
case 10:
|
|
1790
|
-
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 12];
|
|
1791
|
-
_x = (_w = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
1792
|
-
_z = (_y = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1793
|
-
return [4 /*yield*/, response.body.text()];
|
|
1794
|
-
case 11:
|
|
1795
|
-
body_37 = _x.apply(_w, [_z.apply(_y, [_0.sent(), contentType]),
|
|
1706
|
+
body_24 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
|
|
1796
1707
|
"UsageSpecifiedCustomReportsResponse",
|
|
1797
1708
|
""]);
|
|
1798
|
-
return [2 /*return*/,
|
|
1799
|
-
case
|
|
1800
|
-
case
|
|
1801
|
-
body = (
|
|
1709
|
+
return [2 /*return*/, body_24];
|
|
1710
|
+
case 6: return [4 /*yield*/, response.body.text()];
|
|
1711
|
+
case 7:
|
|
1712
|
+
body = (_l.sent()) || "";
|
|
1802
1713
|
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
1803
1714
|
}
|
|
1804
1715
|
});
|
|
@@ -1813,63 +1724,49 @@ var UsageMeteringApiResponseProcessor = /** @class */ (function () {
|
|
|
1813
1724
|
*/
|
|
1814
1725
|
UsageMeteringApiResponseProcessor.prototype.getUsageAnalyzedLogs = function (response) {
|
|
1815
1726
|
return __awaiter(this, void 0, void 0, function () {
|
|
1816
|
-
var contentType,
|
|
1817
|
-
return __generator(this, function (
|
|
1818
|
-
switch (
|
|
1727
|
+
var contentType, body_25, _a, _b, _c, _d, bodyText, _e, _f, body_26, body_27, _g, _h, _j, _k, body;
|
|
1728
|
+
return __generator(this, function (_l) {
|
|
1729
|
+
switch (_l.label) {
|
|
1819
1730
|
case 0:
|
|
1820
1731
|
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
1821
|
-
if (!(
|
|
1732
|
+
if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
|
|
1822
1733
|
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
1823
1734
|
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1824
1735
|
return [4 /*yield*/, response.body.text()];
|
|
1825
1736
|
case 1:
|
|
1826
|
-
|
|
1827
|
-
"UsageAnalyzedLogsResponse"
|
|
1828
|
-
|
|
1829
|
-
return [2 /*return*/, body_38];
|
|
1737
|
+
body_25 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
|
|
1738
|
+
"UsageAnalyzedLogsResponse"]);
|
|
1739
|
+
return [2 /*return*/, body_25];
|
|
1830
1740
|
case 2:
|
|
1831
|
-
if (!(
|
|
1832
|
-
|
|
1833
|
-
|
|
1741
|
+
if (!(response.httpStatusCode == 400 ||
|
|
1742
|
+
response.httpStatusCode == 403 ||
|
|
1743
|
+
response.httpStatusCode == 429)) return [3 /*break*/, 4];
|
|
1744
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1834
1745
|
return [4 /*yield*/, response.body.text()];
|
|
1835
1746
|
case 3:
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
""
|
|
1839
|
-
|
|
1747
|
+
bodyText = _f.apply(_e, [_l.sent(), contentType]);
|
|
1748
|
+
try {
|
|
1749
|
+
body_26 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
1750
|
+
throw new exception_1.ApiException(response.httpStatusCode, body_26);
|
|
1751
|
+
}
|
|
1752
|
+
catch (error) {
|
|
1753
|
+
logger_1.logger.info("Got error deserializing error: ".concat(error));
|
|
1754
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
1755
|
+
}
|
|
1756
|
+
_l.label = 4;
|
|
1840
1757
|
case 4:
|
|
1841
|
-
if (!(
|
|
1842
|
-
|
|
1843
|
-
|
|
1758
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
|
|
1759
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
1760
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1844
1761
|
return [4 /*yield*/, response.body.text()];
|
|
1845
1762
|
case 5:
|
|
1846
|
-
|
|
1847
|
-
"APIErrorResponse",
|
|
1848
|
-
""]);
|
|
1849
|
-
throw new exception_1.ApiException(403, body_40);
|
|
1850
|
-
case 6:
|
|
1851
|
-
if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3 /*break*/, 8];
|
|
1852
|
-
_p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
1853
|
-
_r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1854
|
-
return [4 /*yield*/, response.body.text()];
|
|
1855
|
-
case 7:
|
|
1856
|
-
body_41 = _p.apply(_o, [_r.apply(_q, [_w.sent(), contentType]),
|
|
1857
|
-
"APIErrorResponse",
|
|
1858
|
-
""]);
|
|
1859
|
-
throw new exception_1.ApiException(429, body_41);
|
|
1860
|
-
case 8:
|
|
1861
|
-
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 10];
|
|
1862
|
-
_t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
1863
|
-
_v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1864
|
-
return [4 /*yield*/, response.body.text()];
|
|
1865
|
-
case 9:
|
|
1866
|
-
body_42 = _t.apply(_s, [_v.apply(_u, [_w.sent(), contentType]),
|
|
1763
|
+
body_27 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
|
|
1867
1764
|
"UsageAnalyzedLogsResponse",
|
|
1868
1765
|
""]);
|
|
1869
|
-
return [2 /*return*/,
|
|
1870
|
-
case
|
|
1871
|
-
case
|
|
1872
|
-
body = (
|
|
1766
|
+
return [2 /*return*/, body_27];
|
|
1767
|
+
case 6: return [4 /*yield*/, response.body.text()];
|
|
1768
|
+
case 7:
|
|
1769
|
+
body = (_l.sent()) || "";
|
|
1873
1770
|
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
1874
1771
|
}
|
|
1875
1772
|
});
|
|
@@ -1884,53 +1781,47 @@ var UsageMeteringApiResponseProcessor = /** @class */ (function () {
|
|
|
1884
1781
|
*/
|
|
1885
1782
|
UsageMeteringApiResponseProcessor.prototype.getUsageAttribution = function (response) {
|
|
1886
1783
|
return __awaiter(this, void 0, void 0, function () {
|
|
1887
|
-
var contentType,
|
|
1888
|
-
return __generator(this, function (
|
|
1889
|
-
switch (
|
|
1784
|
+
var contentType, body_28, _a, _b, _c, _d, bodyText, _e, _f, body_29, body_30, _g, _h, _j, _k, body;
|
|
1785
|
+
return __generator(this, function (_l) {
|
|
1786
|
+
switch (_l.label) {
|
|
1890
1787
|
case 0:
|
|
1891
1788
|
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
1892
|
-
if (!(
|
|
1789
|
+
if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
|
|
1893
1790
|
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
1894
1791
|
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1895
1792
|
return [4 /*yield*/, response.body.text()];
|
|
1896
1793
|
case 1:
|
|
1897
|
-
|
|
1898
|
-
"UsageAttributionResponse"
|
|
1899
|
-
|
|
1900
|
-
return [2 /*return*/, body_43];
|
|
1794
|
+
body_28 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
|
|
1795
|
+
"UsageAttributionResponse"]);
|
|
1796
|
+
return [2 /*return*/, body_28];
|
|
1901
1797
|
case 2:
|
|
1902
|
-
if (!(
|
|
1903
|
-
_f = (_e = ObjectSerializer_1.ObjectSerializer).
|
|
1904
|
-
_h = (_g = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1798
|
+
if (!(response.httpStatusCode == 403 || response.httpStatusCode == 429)) return [3 /*break*/, 4];
|
|
1799
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1905
1800
|
return [4 /*yield*/, response.body.text()];
|
|
1906
1801
|
case 3:
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
""
|
|
1910
|
-
|
|
1802
|
+
bodyText = _f.apply(_e, [_l.sent(), contentType]);
|
|
1803
|
+
try {
|
|
1804
|
+
body_29 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
1805
|
+
throw new exception_1.ApiException(response.httpStatusCode, body_29);
|
|
1806
|
+
}
|
|
1807
|
+
catch (error) {
|
|
1808
|
+
logger_1.logger.info("Got error deserializing error: ".concat(error));
|
|
1809
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
1810
|
+
}
|
|
1811
|
+
_l.label = 4;
|
|
1911
1812
|
case 4:
|
|
1912
|
-
if (!(
|
|
1913
|
-
|
|
1914
|
-
|
|
1813
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
|
|
1814
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
1815
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1915
1816
|
return [4 /*yield*/, response.body.text()];
|
|
1916
1817
|
case 5:
|
|
1917
|
-
|
|
1918
|
-
"APIErrorResponse",
|
|
1919
|
-
""]);
|
|
1920
|
-
throw new exception_1.ApiException(429, body_45);
|
|
1921
|
-
case 6:
|
|
1922
|
-
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 8];
|
|
1923
|
-
_p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
1924
|
-
_r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1925
|
-
return [4 /*yield*/, response.body.text()];
|
|
1926
|
-
case 7:
|
|
1927
|
-
body_46 = _p.apply(_o, [_r.apply(_q, [_s.sent(), contentType]),
|
|
1818
|
+
body_30 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
|
|
1928
1819
|
"UsageAttributionResponse",
|
|
1929
1820
|
""]);
|
|
1930
|
-
return [2 /*return*/,
|
|
1931
|
-
case
|
|
1932
|
-
case
|
|
1933
|
-
body = (
|
|
1821
|
+
return [2 /*return*/, body_30];
|
|
1822
|
+
case 6: return [4 /*yield*/, response.body.text()];
|
|
1823
|
+
case 7:
|
|
1824
|
+
body = (_l.sent()) || "";
|
|
1934
1825
|
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
1935
1826
|
}
|
|
1936
1827
|
});
|
|
@@ -1945,63 +1836,49 @@ var UsageMeteringApiResponseProcessor = /** @class */ (function () {
|
|
|
1945
1836
|
*/
|
|
1946
1837
|
UsageMeteringApiResponseProcessor.prototype.getUsageAuditLogs = function (response) {
|
|
1947
1838
|
return __awaiter(this, void 0, void 0, function () {
|
|
1948
|
-
var contentType,
|
|
1949
|
-
return __generator(this, function (
|
|
1950
|
-
switch (
|
|
1839
|
+
var contentType, body_31, _a, _b, _c, _d, bodyText, _e, _f, body_32, body_33, _g, _h, _j, _k, body;
|
|
1840
|
+
return __generator(this, function (_l) {
|
|
1841
|
+
switch (_l.label) {
|
|
1951
1842
|
case 0:
|
|
1952
1843
|
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
1953
|
-
if (!(
|
|
1844
|
+
if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
|
|
1954
1845
|
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
1955
1846
|
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1956
1847
|
return [4 /*yield*/, response.body.text()];
|
|
1957
1848
|
case 1:
|
|
1958
|
-
|
|
1959
|
-
"UsageAuditLogsResponse"
|
|
1960
|
-
|
|
1961
|
-
return [2 /*return*/, body_47];
|
|
1849
|
+
body_31 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
|
|
1850
|
+
"UsageAuditLogsResponse"]);
|
|
1851
|
+
return [2 /*return*/, body_31];
|
|
1962
1852
|
case 2:
|
|
1963
|
-
if (!(
|
|
1964
|
-
|
|
1965
|
-
|
|
1853
|
+
if (!(response.httpStatusCode == 400 ||
|
|
1854
|
+
response.httpStatusCode == 403 ||
|
|
1855
|
+
response.httpStatusCode == 429)) return [3 /*break*/, 4];
|
|
1856
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1966
1857
|
return [4 /*yield*/, response.body.text()];
|
|
1967
1858
|
case 3:
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
""
|
|
1971
|
-
|
|
1859
|
+
bodyText = _f.apply(_e, [_l.sent(), contentType]);
|
|
1860
|
+
try {
|
|
1861
|
+
body_32 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
1862
|
+
throw new exception_1.ApiException(response.httpStatusCode, body_32);
|
|
1863
|
+
}
|
|
1864
|
+
catch (error) {
|
|
1865
|
+
logger_1.logger.info("Got error deserializing error: ".concat(error));
|
|
1866
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
1867
|
+
}
|
|
1868
|
+
_l.label = 4;
|
|
1972
1869
|
case 4:
|
|
1973
|
-
if (!(
|
|
1974
|
-
|
|
1975
|
-
|
|
1870
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
|
|
1871
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
1872
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1976
1873
|
return [4 /*yield*/, response.body.text()];
|
|
1977
1874
|
case 5:
|
|
1978
|
-
|
|
1979
|
-
"APIErrorResponse",
|
|
1980
|
-
""]);
|
|
1981
|
-
throw new exception_1.ApiException(403, body_49);
|
|
1982
|
-
case 6:
|
|
1983
|
-
if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3 /*break*/, 8];
|
|
1984
|
-
_p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
1985
|
-
_r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1986
|
-
return [4 /*yield*/, response.body.text()];
|
|
1987
|
-
case 7:
|
|
1988
|
-
body_50 = _p.apply(_o, [_r.apply(_q, [_w.sent(), contentType]),
|
|
1989
|
-
"APIErrorResponse",
|
|
1990
|
-
""]);
|
|
1991
|
-
throw new exception_1.ApiException(429, body_50);
|
|
1992
|
-
case 8:
|
|
1993
|
-
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 10];
|
|
1994
|
-
_t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
1995
|
-
_v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
|
|
1996
|
-
return [4 /*yield*/, response.body.text()];
|
|
1997
|
-
case 9:
|
|
1998
|
-
body_51 = _t.apply(_s, [_v.apply(_u, [_w.sent(), contentType]),
|
|
1875
|
+
body_33 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
|
|
1999
1876
|
"UsageAuditLogsResponse",
|
|
2000
1877
|
""]);
|
|
2001
|
-
return [2 /*return*/,
|
|
2002
|
-
case
|
|
2003
|
-
case
|
|
2004
|
-
body = (
|
|
1878
|
+
return [2 /*return*/, body_33];
|
|
1879
|
+
case 6: return [4 /*yield*/, response.body.text()];
|
|
1880
|
+
case 7:
|
|
1881
|
+
body = (_l.sent()) || "";
|
|
2005
1882
|
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
2006
1883
|
}
|
|
2007
1884
|
});
|
|
@@ -2016,63 +1893,49 @@ var UsageMeteringApiResponseProcessor = /** @class */ (function () {
|
|
|
2016
1893
|
*/
|
|
2017
1894
|
UsageMeteringApiResponseProcessor.prototype.getUsageBillableSummary = function (response) {
|
|
2018
1895
|
return __awaiter(this, void 0, void 0, function () {
|
|
2019
|
-
var contentType,
|
|
2020
|
-
return __generator(this, function (
|
|
2021
|
-
switch (
|
|
1896
|
+
var contentType, body_34, _a, _b, _c, _d, bodyText, _e, _f, body_35, body_36, _g, _h, _j, _k, body;
|
|
1897
|
+
return __generator(this, function (_l) {
|
|
1898
|
+
switch (_l.label) {
|
|
2022
1899
|
case 0:
|
|
2023
1900
|
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
2024
|
-
if (!(
|
|
1901
|
+
if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
|
|
2025
1902
|
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2026
1903
|
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2027
1904
|
return [4 /*yield*/, response.body.text()];
|
|
2028
1905
|
case 1:
|
|
2029
|
-
|
|
2030
|
-
"UsageBillableSummaryResponse"
|
|
2031
|
-
|
|
2032
|
-
return [2 /*return*/, body_52];
|
|
1906
|
+
body_34 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
|
|
1907
|
+
"UsageBillableSummaryResponse"]);
|
|
1908
|
+
return [2 /*return*/, body_34];
|
|
2033
1909
|
case 2:
|
|
2034
|
-
if (!(
|
|
2035
|
-
|
|
2036
|
-
|
|
1910
|
+
if (!(response.httpStatusCode == 400 ||
|
|
1911
|
+
response.httpStatusCode == 403 ||
|
|
1912
|
+
response.httpStatusCode == 429)) return [3 /*break*/, 4];
|
|
1913
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2037
1914
|
return [4 /*yield*/, response.body.text()];
|
|
2038
1915
|
case 3:
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
""
|
|
2042
|
-
|
|
1916
|
+
bodyText = _f.apply(_e, [_l.sent(), contentType]);
|
|
1917
|
+
try {
|
|
1918
|
+
body_35 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
1919
|
+
throw new exception_1.ApiException(response.httpStatusCode, body_35);
|
|
1920
|
+
}
|
|
1921
|
+
catch (error) {
|
|
1922
|
+
logger_1.logger.info("Got error deserializing error: ".concat(error));
|
|
1923
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
1924
|
+
}
|
|
1925
|
+
_l.label = 4;
|
|
2043
1926
|
case 4:
|
|
2044
|
-
if (!(
|
|
2045
|
-
|
|
2046
|
-
|
|
1927
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
|
|
1928
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
1929
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2047
1930
|
return [4 /*yield*/, response.body.text()];
|
|
2048
1931
|
case 5:
|
|
2049
|
-
|
|
2050
|
-
"APIErrorResponse",
|
|
2051
|
-
""]);
|
|
2052
|
-
throw new exception_1.ApiException(403, body_54);
|
|
2053
|
-
case 6:
|
|
2054
|
-
if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3 /*break*/, 8];
|
|
2055
|
-
_p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2056
|
-
_r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2057
|
-
return [4 /*yield*/, response.body.text()];
|
|
2058
|
-
case 7:
|
|
2059
|
-
body_55 = _p.apply(_o, [_r.apply(_q, [_w.sent(), contentType]),
|
|
2060
|
-
"APIErrorResponse",
|
|
2061
|
-
""]);
|
|
2062
|
-
throw new exception_1.ApiException(429, body_55);
|
|
2063
|
-
case 8:
|
|
2064
|
-
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 10];
|
|
2065
|
-
_t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2066
|
-
_v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2067
|
-
return [4 /*yield*/, response.body.text()];
|
|
2068
|
-
case 9:
|
|
2069
|
-
body_56 = _t.apply(_s, [_v.apply(_u, [_w.sent(), contentType]),
|
|
1932
|
+
body_36 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
|
|
2070
1933
|
"UsageBillableSummaryResponse",
|
|
2071
1934
|
""]);
|
|
2072
|
-
return [2 /*return*/,
|
|
2073
|
-
case
|
|
2074
|
-
case
|
|
2075
|
-
body = (
|
|
1935
|
+
return [2 /*return*/, body_36];
|
|
1936
|
+
case 6: return [4 /*yield*/, response.body.text()];
|
|
1937
|
+
case 7:
|
|
1938
|
+
body = (_l.sent()) || "";
|
|
2076
1939
|
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
2077
1940
|
}
|
|
2078
1941
|
});
|
|
@@ -2087,63 +1950,49 @@ var UsageMeteringApiResponseProcessor = /** @class */ (function () {
|
|
|
2087
1950
|
*/
|
|
2088
1951
|
UsageMeteringApiResponseProcessor.prototype.getUsageCIApp = function (response) {
|
|
2089
1952
|
return __awaiter(this, void 0, void 0, function () {
|
|
2090
|
-
var contentType,
|
|
2091
|
-
return __generator(this, function (
|
|
2092
|
-
switch (
|
|
1953
|
+
var contentType, body_37, _a, _b, _c, _d, bodyText, _e, _f, body_38, body_39, _g, _h, _j, _k, body;
|
|
1954
|
+
return __generator(this, function (_l) {
|
|
1955
|
+
switch (_l.label) {
|
|
2093
1956
|
case 0:
|
|
2094
1957
|
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
2095
|
-
if (!(
|
|
1958
|
+
if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
|
|
2096
1959
|
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2097
1960
|
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2098
1961
|
return [4 /*yield*/, response.body.text()];
|
|
2099
1962
|
case 1:
|
|
2100
|
-
|
|
2101
|
-
"UsageCIVisibilityResponse"
|
|
2102
|
-
|
|
2103
|
-
return [2 /*return*/, body_57];
|
|
1963
|
+
body_37 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
|
|
1964
|
+
"UsageCIVisibilityResponse"]);
|
|
1965
|
+
return [2 /*return*/, body_37];
|
|
2104
1966
|
case 2:
|
|
2105
|
-
if (!(
|
|
2106
|
-
|
|
2107
|
-
|
|
1967
|
+
if (!(response.httpStatusCode == 400 ||
|
|
1968
|
+
response.httpStatusCode == 403 ||
|
|
1969
|
+
response.httpStatusCode == 429)) return [3 /*break*/, 4];
|
|
1970
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2108
1971
|
return [4 /*yield*/, response.body.text()];
|
|
2109
1972
|
case 3:
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
""
|
|
2113
|
-
|
|
1973
|
+
bodyText = _f.apply(_e, [_l.sent(), contentType]);
|
|
1974
|
+
try {
|
|
1975
|
+
body_38 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
1976
|
+
throw new exception_1.ApiException(response.httpStatusCode, body_38);
|
|
1977
|
+
}
|
|
1978
|
+
catch (error) {
|
|
1979
|
+
logger_1.logger.info("Got error deserializing error: ".concat(error));
|
|
1980
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
1981
|
+
}
|
|
1982
|
+
_l.label = 4;
|
|
2114
1983
|
case 4:
|
|
2115
|
-
if (!(
|
|
2116
|
-
|
|
2117
|
-
|
|
1984
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
|
|
1985
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
1986
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2118
1987
|
return [4 /*yield*/, response.body.text()];
|
|
2119
1988
|
case 5:
|
|
2120
|
-
|
|
2121
|
-
"APIErrorResponse",
|
|
2122
|
-
""]);
|
|
2123
|
-
throw new exception_1.ApiException(403, body_59);
|
|
2124
|
-
case 6:
|
|
2125
|
-
if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3 /*break*/, 8];
|
|
2126
|
-
_p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2127
|
-
_r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2128
|
-
return [4 /*yield*/, response.body.text()];
|
|
2129
|
-
case 7:
|
|
2130
|
-
body_60 = _p.apply(_o, [_r.apply(_q, [_w.sent(), contentType]),
|
|
2131
|
-
"APIErrorResponse",
|
|
2132
|
-
""]);
|
|
2133
|
-
throw new exception_1.ApiException(429, body_60);
|
|
2134
|
-
case 8:
|
|
2135
|
-
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 10];
|
|
2136
|
-
_t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2137
|
-
_v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2138
|
-
return [4 /*yield*/, response.body.text()];
|
|
2139
|
-
case 9:
|
|
2140
|
-
body_61 = _t.apply(_s, [_v.apply(_u, [_w.sent(), contentType]),
|
|
1989
|
+
body_39 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
|
|
2141
1990
|
"UsageCIVisibilityResponse",
|
|
2142
1991
|
""]);
|
|
2143
|
-
return [2 /*return*/,
|
|
2144
|
-
case
|
|
2145
|
-
case
|
|
2146
|
-
body = (
|
|
1992
|
+
return [2 /*return*/, body_39];
|
|
1993
|
+
case 6: return [4 /*yield*/, response.body.text()];
|
|
1994
|
+
case 7:
|
|
1995
|
+
body = (_l.sent()) || "";
|
|
2147
1996
|
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
2148
1997
|
}
|
|
2149
1998
|
});
|
|
@@ -2158,63 +2007,49 @@ var UsageMeteringApiResponseProcessor = /** @class */ (function () {
|
|
|
2158
2007
|
*/
|
|
2159
2008
|
UsageMeteringApiResponseProcessor.prototype.getUsageCloudSecurityPostureManagement = function (response) {
|
|
2160
2009
|
return __awaiter(this, void 0, void 0, function () {
|
|
2161
|
-
var contentType,
|
|
2162
|
-
return __generator(this, function (
|
|
2163
|
-
switch (
|
|
2010
|
+
var contentType, body_40, _a, _b, _c, _d, bodyText, _e, _f, body_41, body_42, _g, _h, _j, _k, body;
|
|
2011
|
+
return __generator(this, function (_l) {
|
|
2012
|
+
switch (_l.label) {
|
|
2164
2013
|
case 0:
|
|
2165
2014
|
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
2166
|
-
if (!(
|
|
2015
|
+
if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
|
|
2167
2016
|
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2168
2017
|
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2169
2018
|
return [4 /*yield*/, response.body.text()];
|
|
2170
2019
|
case 1:
|
|
2171
|
-
|
|
2172
|
-
"UsageCloudSecurityPostureManagementResponse"
|
|
2173
|
-
|
|
2174
|
-
return [2 /*return*/, body_62];
|
|
2020
|
+
body_40 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
|
|
2021
|
+
"UsageCloudSecurityPostureManagementResponse"]);
|
|
2022
|
+
return [2 /*return*/, body_40];
|
|
2175
2023
|
case 2:
|
|
2176
|
-
if (!(
|
|
2177
|
-
|
|
2178
|
-
|
|
2024
|
+
if (!(response.httpStatusCode == 400 ||
|
|
2025
|
+
response.httpStatusCode == 403 ||
|
|
2026
|
+
response.httpStatusCode == 429)) return [3 /*break*/, 4];
|
|
2027
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2179
2028
|
return [4 /*yield*/, response.body.text()];
|
|
2180
2029
|
case 3:
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
""
|
|
2184
|
-
|
|
2030
|
+
bodyText = _f.apply(_e, [_l.sent(), contentType]);
|
|
2031
|
+
try {
|
|
2032
|
+
body_41 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
2033
|
+
throw new exception_1.ApiException(response.httpStatusCode, body_41);
|
|
2034
|
+
}
|
|
2035
|
+
catch (error) {
|
|
2036
|
+
logger_1.logger.info("Got error deserializing error: ".concat(error));
|
|
2037
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
2038
|
+
}
|
|
2039
|
+
_l.label = 4;
|
|
2185
2040
|
case 4:
|
|
2186
|
-
if (!(
|
|
2187
|
-
|
|
2188
|
-
|
|
2041
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
|
|
2042
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2043
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2189
2044
|
return [4 /*yield*/, response.body.text()];
|
|
2190
2045
|
case 5:
|
|
2191
|
-
|
|
2192
|
-
"APIErrorResponse",
|
|
2193
|
-
""]);
|
|
2194
|
-
throw new exception_1.ApiException(403, body_64);
|
|
2195
|
-
case 6:
|
|
2196
|
-
if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3 /*break*/, 8];
|
|
2197
|
-
_p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2198
|
-
_r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2199
|
-
return [4 /*yield*/, response.body.text()];
|
|
2200
|
-
case 7:
|
|
2201
|
-
body_65 = _p.apply(_o, [_r.apply(_q, [_w.sent(), contentType]),
|
|
2202
|
-
"APIErrorResponse",
|
|
2203
|
-
""]);
|
|
2204
|
-
throw new exception_1.ApiException(429, body_65);
|
|
2205
|
-
case 8:
|
|
2206
|
-
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 10];
|
|
2207
|
-
_t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2208
|
-
_v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2209
|
-
return [4 /*yield*/, response.body.text()];
|
|
2210
|
-
case 9:
|
|
2211
|
-
body_66 = _t.apply(_s, [_v.apply(_u, [_w.sent(), contentType]),
|
|
2046
|
+
body_42 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
|
|
2212
2047
|
"UsageCloudSecurityPostureManagementResponse",
|
|
2213
2048
|
""]);
|
|
2214
|
-
return [2 /*return*/,
|
|
2215
|
-
case
|
|
2216
|
-
case
|
|
2217
|
-
body = (
|
|
2049
|
+
return [2 /*return*/, body_42];
|
|
2050
|
+
case 6: return [4 /*yield*/, response.body.text()];
|
|
2051
|
+
case 7:
|
|
2052
|
+
body = (_l.sent()) || "";
|
|
2218
2053
|
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
2219
2054
|
}
|
|
2220
2055
|
});
|
|
@@ -2229,63 +2064,49 @@ var UsageMeteringApiResponseProcessor = /** @class */ (function () {
|
|
|
2229
2064
|
*/
|
|
2230
2065
|
UsageMeteringApiResponseProcessor.prototype.getUsageCWS = function (response) {
|
|
2231
2066
|
return __awaiter(this, void 0, void 0, function () {
|
|
2232
|
-
var contentType,
|
|
2233
|
-
return __generator(this, function (
|
|
2234
|
-
switch (
|
|
2067
|
+
var contentType, body_43, _a, _b, _c, _d, bodyText, _e, _f, body_44, body_45, _g, _h, _j, _k, body;
|
|
2068
|
+
return __generator(this, function (_l) {
|
|
2069
|
+
switch (_l.label) {
|
|
2235
2070
|
case 0:
|
|
2236
2071
|
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
2237
|
-
if (!(
|
|
2072
|
+
if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
|
|
2238
2073
|
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2239
2074
|
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2240
2075
|
return [4 /*yield*/, response.body.text()];
|
|
2241
2076
|
case 1:
|
|
2242
|
-
|
|
2243
|
-
"UsageCWSResponse"
|
|
2244
|
-
|
|
2245
|
-
return [2 /*return*/, body_67];
|
|
2077
|
+
body_43 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
|
|
2078
|
+
"UsageCWSResponse"]);
|
|
2079
|
+
return [2 /*return*/, body_43];
|
|
2246
2080
|
case 2:
|
|
2247
|
-
if (!(
|
|
2248
|
-
|
|
2249
|
-
|
|
2081
|
+
if (!(response.httpStatusCode == 400 ||
|
|
2082
|
+
response.httpStatusCode == 403 ||
|
|
2083
|
+
response.httpStatusCode == 429)) return [3 /*break*/, 4];
|
|
2084
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2250
2085
|
return [4 /*yield*/, response.body.text()];
|
|
2251
2086
|
case 3:
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
""
|
|
2255
|
-
|
|
2087
|
+
bodyText = _f.apply(_e, [_l.sent(), contentType]);
|
|
2088
|
+
try {
|
|
2089
|
+
body_44 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
2090
|
+
throw new exception_1.ApiException(response.httpStatusCode, body_44);
|
|
2091
|
+
}
|
|
2092
|
+
catch (error) {
|
|
2093
|
+
logger_1.logger.info("Got error deserializing error: ".concat(error));
|
|
2094
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
2095
|
+
}
|
|
2096
|
+
_l.label = 4;
|
|
2256
2097
|
case 4:
|
|
2257
|
-
if (!(
|
|
2258
|
-
|
|
2259
|
-
|
|
2098
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
|
|
2099
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2100
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2260
2101
|
return [4 /*yield*/, response.body.text()];
|
|
2261
2102
|
case 5:
|
|
2262
|
-
|
|
2263
|
-
"APIErrorResponse",
|
|
2264
|
-
""]);
|
|
2265
|
-
throw new exception_1.ApiException(403, body_69);
|
|
2266
|
-
case 6:
|
|
2267
|
-
if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3 /*break*/, 8];
|
|
2268
|
-
_p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2269
|
-
_r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2270
|
-
return [4 /*yield*/, response.body.text()];
|
|
2271
|
-
case 7:
|
|
2272
|
-
body_70 = _p.apply(_o, [_r.apply(_q, [_w.sent(), contentType]),
|
|
2273
|
-
"APIErrorResponse",
|
|
2274
|
-
""]);
|
|
2275
|
-
throw new exception_1.ApiException(429, body_70);
|
|
2276
|
-
case 8:
|
|
2277
|
-
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 10];
|
|
2278
|
-
_t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2279
|
-
_v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2280
|
-
return [4 /*yield*/, response.body.text()];
|
|
2281
|
-
case 9:
|
|
2282
|
-
body_71 = _t.apply(_s, [_v.apply(_u, [_w.sent(), contentType]),
|
|
2103
|
+
body_45 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
|
|
2283
2104
|
"UsageCWSResponse",
|
|
2284
2105
|
""]);
|
|
2285
|
-
return [2 /*return*/,
|
|
2286
|
-
case
|
|
2287
|
-
case
|
|
2288
|
-
body = (
|
|
2106
|
+
return [2 /*return*/, body_45];
|
|
2107
|
+
case 6: return [4 /*yield*/, response.body.text()];
|
|
2108
|
+
case 7:
|
|
2109
|
+
body = (_l.sent()) || "";
|
|
2289
2110
|
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
2290
2111
|
}
|
|
2291
2112
|
});
|
|
@@ -2300,63 +2121,49 @@ var UsageMeteringApiResponseProcessor = /** @class */ (function () {
|
|
|
2300
2121
|
*/
|
|
2301
2122
|
UsageMeteringApiResponseProcessor.prototype.getUsageDBM = function (response) {
|
|
2302
2123
|
return __awaiter(this, void 0, void 0, function () {
|
|
2303
|
-
var contentType,
|
|
2304
|
-
return __generator(this, function (
|
|
2305
|
-
switch (
|
|
2124
|
+
var contentType, body_46, _a, _b, _c, _d, bodyText, _e, _f, body_47, body_48, _g, _h, _j, _k, body;
|
|
2125
|
+
return __generator(this, function (_l) {
|
|
2126
|
+
switch (_l.label) {
|
|
2306
2127
|
case 0:
|
|
2307
2128
|
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
2308
|
-
if (!(
|
|
2129
|
+
if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
|
|
2309
2130
|
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2310
2131
|
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2311
2132
|
return [4 /*yield*/, response.body.text()];
|
|
2312
2133
|
case 1:
|
|
2313
|
-
|
|
2314
|
-
"UsageDBMResponse"
|
|
2315
|
-
|
|
2316
|
-
return [2 /*return*/, body_72];
|
|
2134
|
+
body_46 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
|
|
2135
|
+
"UsageDBMResponse"]);
|
|
2136
|
+
return [2 /*return*/, body_46];
|
|
2317
2137
|
case 2:
|
|
2318
|
-
if (!(
|
|
2319
|
-
|
|
2320
|
-
|
|
2138
|
+
if (!(response.httpStatusCode == 400 ||
|
|
2139
|
+
response.httpStatusCode == 403 ||
|
|
2140
|
+
response.httpStatusCode == 429)) return [3 /*break*/, 4];
|
|
2141
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2321
2142
|
return [4 /*yield*/, response.body.text()];
|
|
2322
2143
|
case 3:
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
""
|
|
2326
|
-
|
|
2144
|
+
bodyText = _f.apply(_e, [_l.sent(), contentType]);
|
|
2145
|
+
try {
|
|
2146
|
+
body_47 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
2147
|
+
throw new exception_1.ApiException(response.httpStatusCode, body_47);
|
|
2148
|
+
}
|
|
2149
|
+
catch (error) {
|
|
2150
|
+
logger_1.logger.info("Got error deserializing error: ".concat(error));
|
|
2151
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
2152
|
+
}
|
|
2153
|
+
_l.label = 4;
|
|
2327
2154
|
case 4:
|
|
2328
|
-
if (!(
|
|
2329
|
-
|
|
2330
|
-
|
|
2155
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
|
|
2156
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2157
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2331
2158
|
return [4 /*yield*/, response.body.text()];
|
|
2332
2159
|
case 5:
|
|
2333
|
-
|
|
2334
|
-
"APIErrorResponse",
|
|
2335
|
-
""]);
|
|
2336
|
-
throw new exception_1.ApiException(403, body_74);
|
|
2337
|
-
case 6:
|
|
2338
|
-
if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3 /*break*/, 8];
|
|
2339
|
-
_p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2340
|
-
_r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2341
|
-
return [4 /*yield*/, response.body.text()];
|
|
2342
|
-
case 7:
|
|
2343
|
-
body_75 = _p.apply(_o, [_r.apply(_q, [_w.sent(), contentType]),
|
|
2344
|
-
"APIErrorResponse",
|
|
2345
|
-
""]);
|
|
2346
|
-
throw new exception_1.ApiException(429, body_75);
|
|
2347
|
-
case 8:
|
|
2348
|
-
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 10];
|
|
2349
|
-
_t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2350
|
-
_v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2351
|
-
return [4 /*yield*/, response.body.text()];
|
|
2352
|
-
case 9:
|
|
2353
|
-
body_76 = _t.apply(_s, [_v.apply(_u, [_w.sent(), contentType]),
|
|
2160
|
+
body_48 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
|
|
2354
2161
|
"UsageDBMResponse",
|
|
2355
2162
|
""]);
|
|
2356
|
-
return [2 /*return*/,
|
|
2357
|
-
case
|
|
2358
|
-
case
|
|
2359
|
-
body = (
|
|
2163
|
+
return [2 /*return*/, body_48];
|
|
2164
|
+
case 6: return [4 /*yield*/, response.body.text()];
|
|
2165
|
+
case 7:
|
|
2166
|
+
body = (_l.sent()) || "";
|
|
2360
2167
|
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
2361
2168
|
}
|
|
2362
2169
|
});
|
|
@@ -2371,63 +2178,49 @@ var UsageMeteringApiResponseProcessor = /** @class */ (function () {
|
|
|
2371
2178
|
*/
|
|
2372
2179
|
UsageMeteringApiResponseProcessor.prototype.getUsageFargate = function (response) {
|
|
2373
2180
|
return __awaiter(this, void 0, void 0, function () {
|
|
2374
|
-
var contentType,
|
|
2375
|
-
return __generator(this, function (
|
|
2376
|
-
switch (
|
|
2181
|
+
var contentType, body_49, _a, _b, _c, _d, bodyText, _e, _f, body_50, body_51, _g, _h, _j, _k, body;
|
|
2182
|
+
return __generator(this, function (_l) {
|
|
2183
|
+
switch (_l.label) {
|
|
2377
2184
|
case 0:
|
|
2378
2185
|
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
2379
|
-
if (!(
|
|
2186
|
+
if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
|
|
2380
2187
|
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2381
2188
|
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2382
2189
|
return [4 /*yield*/, response.body.text()];
|
|
2383
2190
|
case 1:
|
|
2384
|
-
|
|
2385
|
-
"UsageFargateResponse"
|
|
2386
|
-
|
|
2387
|
-
return [2 /*return*/, body_77];
|
|
2191
|
+
body_49 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
|
|
2192
|
+
"UsageFargateResponse"]);
|
|
2193
|
+
return [2 /*return*/, body_49];
|
|
2388
2194
|
case 2:
|
|
2389
|
-
if (!(
|
|
2390
|
-
|
|
2391
|
-
|
|
2195
|
+
if (!(response.httpStatusCode == 400 ||
|
|
2196
|
+
response.httpStatusCode == 403 ||
|
|
2197
|
+
response.httpStatusCode == 429)) return [3 /*break*/, 4];
|
|
2198
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2392
2199
|
return [4 /*yield*/, response.body.text()];
|
|
2393
2200
|
case 3:
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
""
|
|
2397
|
-
|
|
2201
|
+
bodyText = _f.apply(_e, [_l.sent(), contentType]);
|
|
2202
|
+
try {
|
|
2203
|
+
body_50 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
2204
|
+
throw new exception_1.ApiException(response.httpStatusCode, body_50);
|
|
2205
|
+
}
|
|
2206
|
+
catch (error) {
|
|
2207
|
+
logger_1.logger.info("Got error deserializing error: ".concat(error));
|
|
2208
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
2209
|
+
}
|
|
2210
|
+
_l.label = 4;
|
|
2398
2211
|
case 4:
|
|
2399
|
-
if (!(
|
|
2400
|
-
|
|
2401
|
-
|
|
2212
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
|
|
2213
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2214
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2402
2215
|
return [4 /*yield*/, response.body.text()];
|
|
2403
2216
|
case 5:
|
|
2404
|
-
|
|
2405
|
-
"APIErrorResponse",
|
|
2406
|
-
""]);
|
|
2407
|
-
throw new exception_1.ApiException(403, body_79);
|
|
2408
|
-
case 6:
|
|
2409
|
-
if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3 /*break*/, 8];
|
|
2410
|
-
_p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2411
|
-
_r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2412
|
-
return [4 /*yield*/, response.body.text()];
|
|
2413
|
-
case 7:
|
|
2414
|
-
body_80 = _p.apply(_o, [_r.apply(_q, [_w.sent(), contentType]),
|
|
2415
|
-
"APIErrorResponse",
|
|
2416
|
-
""]);
|
|
2417
|
-
throw new exception_1.ApiException(429, body_80);
|
|
2418
|
-
case 8:
|
|
2419
|
-
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 10];
|
|
2420
|
-
_t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2421
|
-
_v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2422
|
-
return [4 /*yield*/, response.body.text()];
|
|
2423
|
-
case 9:
|
|
2424
|
-
body_81 = _t.apply(_s, [_v.apply(_u, [_w.sent(), contentType]),
|
|
2217
|
+
body_51 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
|
|
2425
2218
|
"UsageFargateResponse",
|
|
2426
2219
|
""]);
|
|
2427
|
-
return [2 /*return*/,
|
|
2428
|
-
case
|
|
2429
|
-
case
|
|
2430
|
-
body = (
|
|
2220
|
+
return [2 /*return*/, body_51];
|
|
2221
|
+
case 6: return [4 /*yield*/, response.body.text()];
|
|
2222
|
+
case 7:
|
|
2223
|
+
body = (_l.sent()) || "";
|
|
2431
2224
|
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
2432
2225
|
}
|
|
2433
2226
|
});
|
|
@@ -2442,63 +2235,49 @@ var UsageMeteringApiResponseProcessor = /** @class */ (function () {
|
|
|
2442
2235
|
*/
|
|
2443
2236
|
UsageMeteringApiResponseProcessor.prototype.getUsageHosts = function (response) {
|
|
2444
2237
|
return __awaiter(this, void 0, void 0, function () {
|
|
2445
|
-
var contentType,
|
|
2446
|
-
return __generator(this, function (
|
|
2447
|
-
switch (
|
|
2238
|
+
var contentType, body_52, _a, _b, _c, _d, bodyText, _e, _f, body_53, body_54, _g, _h, _j, _k, body;
|
|
2239
|
+
return __generator(this, function (_l) {
|
|
2240
|
+
switch (_l.label) {
|
|
2448
2241
|
case 0:
|
|
2449
2242
|
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
2450
|
-
if (!(
|
|
2243
|
+
if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
|
|
2451
2244
|
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2452
2245
|
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2453
2246
|
return [4 /*yield*/, response.body.text()];
|
|
2454
2247
|
case 1:
|
|
2455
|
-
|
|
2456
|
-
"UsageHostsResponse"
|
|
2457
|
-
|
|
2458
|
-
return [2 /*return*/, body_82];
|
|
2248
|
+
body_52 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
|
|
2249
|
+
"UsageHostsResponse"]);
|
|
2250
|
+
return [2 /*return*/, body_52];
|
|
2459
2251
|
case 2:
|
|
2460
|
-
if (!(
|
|
2461
|
-
|
|
2462
|
-
|
|
2252
|
+
if (!(response.httpStatusCode == 400 ||
|
|
2253
|
+
response.httpStatusCode == 403 ||
|
|
2254
|
+
response.httpStatusCode == 429)) return [3 /*break*/, 4];
|
|
2255
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2463
2256
|
return [4 /*yield*/, response.body.text()];
|
|
2464
2257
|
case 3:
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
""
|
|
2468
|
-
|
|
2258
|
+
bodyText = _f.apply(_e, [_l.sent(), contentType]);
|
|
2259
|
+
try {
|
|
2260
|
+
body_53 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
2261
|
+
throw new exception_1.ApiException(response.httpStatusCode, body_53);
|
|
2262
|
+
}
|
|
2263
|
+
catch (error) {
|
|
2264
|
+
logger_1.logger.info("Got error deserializing error: ".concat(error));
|
|
2265
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
2266
|
+
}
|
|
2267
|
+
_l.label = 4;
|
|
2469
2268
|
case 4:
|
|
2470
|
-
if (!(
|
|
2471
|
-
|
|
2472
|
-
|
|
2269
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
|
|
2270
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2271
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2473
2272
|
return [4 /*yield*/, response.body.text()];
|
|
2474
2273
|
case 5:
|
|
2475
|
-
|
|
2476
|
-
"APIErrorResponse",
|
|
2477
|
-
""]);
|
|
2478
|
-
throw new exception_1.ApiException(403, body_84);
|
|
2479
|
-
case 6:
|
|
2480
|
-
if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3 /*break*/, 8];
|
|
2481
|
-
_p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2482
|
-
_r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2483
|
-
return [4 /*yield*/, response.body.text()];
|
|
2484
|
-
case 7:
|
|
2485
|
-
body_85 = _p.apply(_o, [_r.apply(_q, [_w.sent(), contentType]),
|
|
2486
|
-
"APIErrorResponse",
|
|
2487
|
-
""]);
|
|
2488
|
-
throw new exception_1.ApiException(429, body_85);
|
|
2489
|
-
case 8:
|
|
2490
|
-
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 10];
|
|
2491
|
-
_t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2492
|
-
_v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2493
|
-
return [4 /*yield*/, response.body.text()];
|
|
2494
|
-
case 9:
|
|
2495
|
-
body_86 = _t.apply(_s, [_v.apply(_u, [_w.sent(), contentType]),
|
|
2274
|
+
body_54 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
|
|
2496
2275
|
"UsageHostsResponse",
|
|
2497
2276
|
""]);
|
|
2498
|
-
return [2 /*return*/,
|
|
2499
|
-
case
|
|
2500
|
-
case
|
|
2501
|
-
body = (
|
|
2277
|
+
return [2 /*return*/, body_54];
|
|
2278
|
+
case 6: return [4 /*yield*/, response.body.text()];
|
|
2279
|
+
case 7:
|
|
2280
|
+
body = (_l.sent()) || "";
|
|
2502
2281
|
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
2503
2282
|
}
|
|
2504
2283
|
});
|
|
@@ -2513,63 +2292,49 @@ var UsageMeteringApiResponseProcessor = /** @class */ (function () {
|
|
|
2513
2292
|
*/
|
|
2514
2293
|
UsageMeteringApiResponseProcessor.prototype.getUsageIndexedSpans = function (response) {
|
|
2515
2294
|
return __awaiter(this, void 0, void 0, function () {
|
|
2516
|
-
var contentType,
|
|
2517
|
-
return __generator(this, function (
|
|
2518
|
-
switch (
|
|
2295
|
+
var contentType, body_55, _a, _b, _c, _d, bodyText, _e, _f, body_56, body_57, _g, _h, _j, _k, body;
|
|
2296
|
+
return __generator(this, function (_l) {
|
|
2297
|
+
switch (_l.label) {
|
|
2519
2298
|
case 0:
|
|
2520
2299
|
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
2521
|
-
if (!(
|
|
2300
|
+
if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
|
|
2522
2301
|
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2523
2302
|
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2524
2303
|
return [4 /*yield*/, response.body.text()];
|
|
2525
2304
|
case 1:
|
|
2526
|
-
|
|
2527
|
-
"UsageIndexedSpansResponse"
|
|
2528
|
-
|
|
2529
|
-
return [2 /*return*/, body_87];
|
|
2305
|
+
body_55 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
|
|
2306
|
+
"UsageIndexedSpansResponse"]);
|
|
2307
|
+
return [2 /*return*/, body_55];
|
|
2530
2308
|
case 2:
|
|
2531
|
-
if (!(
|
|
2532
|
-
|
|
2533
|
-
|
|
2309
|
+
if (!(response.httpStatusCode == 400 ||
|
|
2310
|
+
response.httpStatusCode == 403 ||
|
|
2311
|
+
response.httpStatusCode == 429)) return [3 /*break*/, 4];
|
|
2312
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2534
2313
|
return [4 /*yield*/, response.body.text()];
|
|
2535
2314
|
case 3:
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
""
|
|
2539
|
-
|
|
2315
|
+
bodyText = _f.apply(_e, [_l.sent(), contentType]);
|
|
2316
|
+
try {
|
|
2317
|
+
body_56 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
2318
|
+
throw new exception_1.ApiException(response.httpStatusCode, body_56);
|
|
2319
|
+
}
|
|
2320
|
+
catch (error) {
|
|
2321
|
+
logger_1.logger.info("Got error deserializing error: ".concat(error));
|
|
2322
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
2323
|
+
}
|
|
2324
|
+
_l.label = 4;
|
|
2540
2325
|
case 4:
|
|
2541
|
-
if (!(
|
|
2542
|
-
|
|
2543
|
-
|
|
2326
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
|
|
2327
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2328
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2544
2329
|
return [4 /*yield*/, response.body.text()];
|
|
2545
2330
|
case 5:
|
|
2546
|
-
|
|
2547
|
-
"APIErrorResponse",
|
|
2548
|
-
""]);
|
|
2549
|
-
throw new exception_1.ApiException(403, body_89);
|
|
2550
|
-
case 6:
|
|
2551
|
-
if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3 /*break*/, 8];
|
|
2552
|
-
_p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2553
|
-
_r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2554
|
-
return [4 /*yield*/, response.body.text()];
|
|
2555
|
-
case 7:
|
|
2556
|
-
body_90 = _p.apply(_o, [_r.apply(_q, [_w.sent(), contentType]),
|
|
2557
|
-
"APIErrorResponse",
|
|
2558
|
-
""]);
|
|
2559
|
-
throw new exception_1.ApiException(429, body_90);
|
|
2560
|
-
case 8:
|
|
2561
|
-
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 10];
|
|
2562
|
-
_t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2563
|
-
_v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2564
|
-
return [4 /*yield*/, response.body.text()];
|
|
2565
|
-
case 9:
|
|
2566
|
-
body_91 = _t.apply(_s, [_v.apply(_u, [_w.sent(), contentType]),
|
|
2331
|
+
body_57 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
|
|
2567
2332
|
"UsageIndexedSpansResponse",
|
|
2568
2333
|
""]);
|
|
2569
|
-
return [2 /*return*/,
|
|
2570
|
-
case
|
|
2571
|
-
case
|
|
2572
|
-
body = (
|
|
2334
|
+
return [2 /*return*/, body_57];
|
|
2335
|
+
case 6: return [4 /*yield*/, response.body.text()];
|
|
2336
|
+
case 7:
|
|
2337
|
+
body = (_l.sent()) || "";
|
|
2573
2338
|
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
2574
2339
|
}
|
|
2575
2340
|
});
|
|
@@ -2584,63 +2349,49 @@ var UsageMeteringApiResponseProcessor = /** @class */ (function () {
|
|
|
2584
2349
|
*/
|
|
2585
2350
|
UsageMeteringApiResponseProcessor.prototype.getUsageInternetOfThings = function (response) {
|
|
2586
2351
|
return __awaiter(this, void 0, void 0, function () {
|
|
2587
|
-
var contentType,
|
|
2588
|
-
return __generator(this, function (
|
|
2589
|
-
switch (
|
|
2352
|
+
var contentType, body_58, _a, _b, _c, _d, bodyText, _e, _f, body_59, body_60, _g, _h, _j, _k, body;
|
|
2353
|
+
return __generator(this, function (_l) {
|
|
2354
|
+
switch (_l.label) {
|
|
2590
2355
|
case 0:
|
|
2591
2356
|
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
2592
|
-
if (!(
|
|
2357
|
+
if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
|
|
2593
2358
|
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2594
2359
|
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2595
2360
|
return [4 /*yield*/, response.body.text()];
|
|
2596
2361
|
case 1:
|
|
2597
|
-
|
|
2598
|
-
"UsageIoTResponse"
|
|
2599
|
-
|
|
2600
|
-
return [2 /*return*/, body_92];
|
|
2362
|
+
body_58 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
|
|
2363
|
+
"UsageIoTResponse"]);
|
|
2364
|
+
return [2 /*return*/, body_58];
|
|
2601
2365
|
case 2:
|
|
2602
|
-
if (!(
|
|
2603
|
-
|
|
2604
|
-
|
|
2366
|
+
if (!(response.httpStatusCode == 400 ||
|
|
2367
|
+
response.httpStatusCode == 403 ||
|
|
2368
|
+
response.httpStatusCode == 429)) return [3 /*break*/, 4];
|
|
2369
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2605
2370
|
return [4 /*yield*/, response.body.text()];
|
|
2606
2371
|
case 3:
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
""
|
|
2610
|
-
|
|
2372
|
+
bodyText = _f.apply(_e, [_l.sent(), contentType]);
|
|
2373
|
+
try {
|
|
2374
|
+
body_59 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
2375
|
+
throw new exception_1.ApiException(response.httpStatusCode, body_59);
|
|
2376
|
+
}
|
|
2377
|
+
catch (error) {
|
|
2378
|
+
logger_1.logger.info("Got error deserializing error: ".concat(error));
|
|
2379
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
2380
|
+
}
|
|
2381
|
+
_l.label = 4;
|
|
2611
2382
|
case 4:
|
|
2612
|
-
if (!(
|
|
2613
|
-
|
|
2614
|
-
|
|
2383
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
|
|
2384
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2385
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2615
2386
|
return [4 /*yield*/, response.body.text()];
|
|
2616
2387
|
case 5:
|
|
2617
|
-
|
|
2618
|
-
"APIErrorResponse",
|
|
2619
|
-
""]);
|
|
2620
|
-
throw new exception_1.ApiException(403, body_94);
|
|
2621
|
-
case 6:
|
|
2622
|
-
if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3 /*break*/, 8];
|
|
2623
|
-
_p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2624
|
-
_r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2625
|
-
return [4 /*yield*/, response.body.text()];
|
|
2626
|
-
case 7:
|
|
2627
|
-
body_95 = _p.apply(_o, [_r.apply(_q, [_w.sent(), contentType]),
|
|
2628
|
-
"APIErrorResponse",
|
|
2629
|
-
""]);
|
|
2630
|
-
throw new exception_1.ApiException(429, body_95);
|
|
2631
|
-
case 8:
|
|
2632
|
-
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 10];
|
|
2633
|
-
_t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2634
|
-
_v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2635
|
-
return [4 /*yield*/, response.body.text()];
|
|
2636
|
-
case 9:
|
|
2637
|
-
body_96 = _t.apply(_s, [_v.apply(_u, [_w.sent(), contentType]),
|
|
2388
|
+
body_60 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
|
|
2638
2389
|
"UsageIoTResponse",
|
|
2639
2390
|
""]);
|
|
2640
|
-
return [2 /*return*/,
|
|
2641
|
-
case
|
|
2642
|
-
case
|
|
2643
|
-
body = (
|
|
2391
|
+
return [2 /*return*/, body_60];
|
|
2392
|
+
case 6: return [4 /*yield*/, response.body.text()];
|
|
2393
|
+
case 7:
|
|
2394
|
+
body = (_l.sent()) || "";
|
|
2644
2395
|
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
2645
2396
|
}
|
|
2646
2397
|
});
|
|
@@ -2655,63 +2406,49 @@ var UsageMeteringApiResponseProcessor = /** @class */ (function () {
|
|
|
2655
2406
|
*/
|
|
2656
2407
|
UsageMeteringApiResponseProcessor.prototype.getUsageLambda = function (response) {
|
|
2657
2408
|
return __awaiter(this, void 0, void 0, function () {
|
|
2658
|
-
var contentType,
|
|
2659
|
-
return __generator(this, function (
|
|
2660
|
-
switch (
|
|
2409
|
+
var contentType, body_61, _a, _b, _c, _d, bodyText, _e, _f, body_62, body_63, _g, _h, _j, _k, body;
|
|
2410
|
+
return __generator(this, function (_l) {
|
|
2411
|
+
switch (_l.label) {
|
|
2661
2412
|
case 0:
|
|
2662
2413
|
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
2663
|
-
if (!(
|
|
2414
|
+
if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
|
|
2664
2415
|
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2665
2416
|
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2666
2417
|
return [4 /*yield*/, response.body.text()];
|
|
2667
2418
|
case 1:
|
|
2668
|
-
|
|
2669
|
-
"UsageLambdaResponse"
|
|
2670
|
-
|
|
2671
|
-
return [2 /*return*/, body_97];
|
|
2419
|
+
body_61 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
|
|
2420
|
+
"UsageLambdaResponse"]);
|
|
2421
|
+
return [2 /*return*/, body_61];
|
|
2672
2422
|
case 2:
|
|
2673
|
-
if (!(
|
|
2674
|
-
|
|
2675
|
-
|
|
2423
|
+
if (!(response.httpStatusCode == 400 ||
|
|
2424
|
+
response.httpStatusCode == 403 ||
|
|
2425
|
+
response.httpStatusCode == 429)) return [3 /*break*/, 4];
|
|
2426
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2676
2427
|
return [4 /*yield*/, response.body.text()];
|
|
2677
2428
|
case 3:
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
""
|
|
2681
|
-
|
|
2429
|
+
bodyText = _f.apply(_e, [_l.sent(), contentType]);
|
|
2430
|
+
try {
|
|
2431
|
+
body_62 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
2432
|
+
throw new exception_1.ApiException(response.httpStatusCode, body_62);
|
|
2433
|
+
}
|
|
2434
|
+
catch (error) {
|
|
2435
|
+
logger_1.logger.info("Got error deserializing error: ".concat(error));
|
|
2436
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
2437
|
+
}
|
|
2438
|
+
_l.label = 4;
|
|
2682
2439
|
case 4:
|
|
2683
|
-
if (!(
|
|
2684
|
-
|
|
2685
|
-
|
|
2440
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
|
|
2441
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2442
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2686
2443
|
return [4 /*yield*/, response.body.text()];
|
|
2687
2444
|
case 5:
|
|
2688
|
-
|
|
2689
|
-
"APIErrorResponse",
|
|
2690
|
-
""]);
|
|
2691
|
-
throw new exception_1.ApiException(403, body_99);
|
|
2692
|
-
case 6:
|
|
2693
|
-
if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3 /*break*/, 8];
|
|
2694
|
-
_p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2695
|
-
_r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2696
|
-
return [4 /*yield*/, response.body.text()];
|
|
2697
|
-
case 7:
|
|
2698
|
-
body_100 = _p.apply(_o, [_r.apply(_q, [_w.sent(), contentType]),
|
|
2699
|
-
"APIErrorResponse",
|
|
2700
|
-
""]);
|
|
2701
|
-
throw new exception_1.ApiException(429, body_100);
|
|
2702
|
-
case 8:
|
|
2703
|
-
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 10];
|
|
2704
|
-
_t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2705
|
-
_v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2706
|
-
return [4 /*yield*/, response.body.text()];
|
|
2707
|
-
case 9:
|
|
2708
|
-
body_101 = _t.apply(_s, [_v.apply(_u, [_w.sent(), contentType]),
|
|
2445
|
+
body_63 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
|
|
2709
2446
|
"UsageLambdaResponse",
|
|
2710
2447
|
""]);
|
|
2711
|
-
return [2 /*return*/,
|
|
2712
|
-
case
|
|
2713
|
-
case
|
|
2714
|
-
body = (
|
|
2448
|
+
return [2 /*return*/, body_63];
|
|
2449
|
+
case 6: return [4 /*yield*/, response.body.text()];
|
|
2450
|
+
case 7:
|
|
2451
|
+
body = (_l.sent()) || "";
|
|
2715
2452
|
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
2716
2453
|
}
|
|
2717
2454
|
});
|
|
@@ -2726,63 +2463,49 @@ var UsageMeteringApiResponseProcessor = /** @class */ (function () {
|
|
|
2726
2463
|
*/
|
|
2727
2464
|
UsageMeteringApiResponseProcessor.prototype.getUsageLogs = function (response) {
|
|
2728
2465
|
return __awaiter(this, void 0, void 0, function () {
|
|
2729
|
-
var contentType,
|
|
2730
|
-
return __generator(this, function (
|
|
2731
|
-
switch (
|
|
2466
|
+
var contentType, body_64, _a, _b, _c, _d, bodyText, _e, _f, body_65, body_66, _g, _h, _j, _k, body;
|
|
2467
|
+
return __generator(this, function (_l) {
|
|
2468
|
+
switch (_l.label) {
|
|
2732
2469
|
case 0:
|
|
2733
2470
|
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
2734
|
-
if (!(
|
|
2471
|
+
if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
|
|
2735
2472
|
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2736
2473
|
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2737
2474
|
return [4 /*yield*/, response.body.text()];
|
|
2738
2475
|
case 1:
|
|
2739
|
-
|
|
2740
|
-
"UsageLogsResponse"
|
|
2741
|
-
|
|
2742
|
-
return [2 /*return*/, body_102];
|
|
2476
|
+
body_64 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
|
|
2477
|
+
"UsageLogsResponse"]);
|
|
2478
|
+
return [2 /*return*/, body_64];
|
|
2743
2479
|
case 2:
|
|
2744
|
-
if (!(
|
|
2745
|
-
|
|
2746
|
-
|
|
2480
|
+
if (!(response.httpStatusCode == 400 ||
|
|
2481
|
+
response.httpStatusCode == 403 ||
|
|
2482
|
+
response.httpStatusCode == 429)) return [3 /*break*/, 4];
|
|
2483
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2747
2484
|
return [4 /*yield*/, response.body.text()];
|
|
2748
2485
|
case 3:
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
""
|
|
2752
|
-
|
|
2486
|
+
bodyText = _f.apply(_e, [_l.sent(), contentType]);
|
|
2487
|
+
try {
|
|
2488
|
+
body_65 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
2489
|
+
throw new exception_1.ApiException(response.httpStatusCode, body_65);
|
|
2490
|
+
}
|
|
2491
|
+
catch (error) {
|
|
2492
|
+
logger_1.logger.info("Got error deserializing error: ".concat(error));
|
|
2493
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
2494
|
+
}
|
|
2495
|
+
_l.label = 4;
|
|
2753
2496
|
case 4:
|
|
2754
|
-
if (!(
|
|
2755
|
-
|
|
2756
|
-
|
|
2497
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
|
|
2498
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2499
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2757
2500
|
return [4 /*yield*/, response.body.text()];
|
|
2758
2501
|
case 5:
|
|
2759
|
-
|
|
2760
|
-
"APIErrorResponse",
|
|
2761
|
-
""]);
|
|
2762
|
-
throw new exception_1.ApiException(403, body_104);
|
|
2763
|
-
case 6:
|
|
2764
|
-
if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3 /*break*/, 8];
|
|
2765
|
-
_p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2766
|
-
_r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2767
|
-
return [4 /*yield*/, response.body.text()];
|
|
2768
|
-
case 7:
|
|
2769
|
-
body_105 = _p.apply(_o, [_r.apply(_q, [_w.sent(), contentType]),
|
|
2770
|
-
"APIErrorResponse",
|
|
2771
|
-
""]);
|
|
2772
|
-
throw new exception_1.ApiException(429, body_105);
|
|
2773
|
-
case 8:
|
|
2774
|
-
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 10];
|
|
2775
|
-
_t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2776
|
-
_v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2777
|
-
return [4 /*yield*/, response.body.text()];
|
|
2778
|
-
case 9:
|
|
2779
|
-
body_106 = _t.apply(_s, [_v.apply(_u, [_w.sent(), contentType]),
|
|
2502
|
+
body_66 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
|
|
2780
2503
|
"UsageLogsResponse",
|
|
2781
2504
|
""]);
|
|
2782
|
-
return [2 /*return*/,
|
|
2783
|
-
case
|
|
2784
|
-
case
|
|
2785
|
-
body = (
|
|
2505
|
+
return [2 /*return*/, body_66];
|
|
2506
|
+
case 6: return [4 /*yield*/, response.body.text()];
|
|
2507
|
+
case 7:
|
|
2508
|
+
body = (_l.sent()) || "";
|
|
2786
2509
|
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
2787
2510
|
}
|
|
2788
2511
|
});
|
|
@@ -2797,63 +2520,49 @@ var UsageMeteringApiResponseProcessor = /** @class */ (function () {
|
|
|
2797
2520
|
*/
|
|
2798
2521
|
UsageMeteringApiResponseProcessor.prototype.getUsageLogsByIndex = function (response) {
|
|
2799
2522
|
return __awaiter(this, void 0, void 0, function () {
|
|
2800
|
-
var contentType,
|
|
2801
|
-
return __generator(this, function (
|
|
2802
|
-
switch (
|
|
2523
|
+
var contentType, body_67, _a, _b, _c, _d, bodyText, _e, _f, body_68, body_69, _g, _h, _j, _k, body;
|
|
2524
|
+
return __generator(this, function (_l) {
|
|
2525
|
+
switch (_l.label) {
|
|
2803
2526
|
case 0:
|
|
2804
2527
|
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
2805
|
-
if (!(
|
|
2528
|
+
if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
|
|
2806
2529
|
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2807
2530
|
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2808
2531
|
return [4 /*yield*/, response.body.text()];
|
|
2809
2532
|
case 1:
|
|
2810
|
-
|
|
2811
|
-
"UsageLogsByIndexResponse"
|
|
2812
|
-
|
|
2813
|
-
return [2 /*return*/, body_107];
|
|
2533
|
+
body_67 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
|
|
2534
|
+
"UsageLogsByIndexResponse"]);
|
|
2535
|
+
return [2 /*return*/, body_67];
|
|
2814
2536
|
case 2:
|
|
2815
|
-
if (!(
|
|
2816
|
-
|
|
2817
|
-
|
|
2537
|
+
if (!(response.httpStatusCode == 400 ||
|
|
2538
|
+
response.httpStatusCode == 403 ||
|
|
2539
|
+
response.httpStatusCode == 429)) return [3 /*break*/, 4];
|
|
2540
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2818
2541
|
return [4 /*yield*/, response.body.text()];
|
|
2819
2542
|
case 3:
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
""
|
|
2823
|
-
|
|
2543
|
+
bodyText = _f.apply(_e, [_l.sent(), contentType]);
|
|
2544
|
+
try {
|
|
2545
|
+
body_68 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
2546
|
+
throw new exception_1.ApiException(response.httpStatusCode, body_68);
|
|
2547
|
+
}
|
|
2548
|
+
catch (error) {
|
|
2549
|
+
logger_1.logger.info("Got error deserializing error: ".concat(error));
|
|
2550
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
2551
|
+
}
|
|
2552
|
+
_l.label = 4;
|
|
2824
2553
|
case 4:
|
|
2825
|
-
if (!(
|
|
2826
|
-
|
|
2827
|
-
|
|
2554
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
|
|
2555
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2556
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2828
2557
|
return [4 /*yield*/, response.body.text()];
|
|
2829
2558
|
case 5:
|
|
2830
|
-
|
|
2831
|
-
"APIErrorResponse",
|
|
2832
|
-
""]);
|
|
2833
|
-
throw new exception_1.ApiException(403, body_109);
|
|
2834
|
-
case 6:
|
|
2835
|
-
if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3 /*break*/, 8];
|
|
2836
|
-
_p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2837
|
-
_r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2838
|
-
return [4 /*yield*/, response.body.text()];
|
|
2839
|
-
case 7:
|
|
2840
|
-
body_110 = _p.apply(_o, [_r.apply(_q, [_w.sent(), contentType]),
|
|
2841
|
-
"APIErrorResponse",
|
|
2842
|
-
""]);
|
|
2843
|
-
throw new exception_1.ApiException(429, body_110);
|
|
2844
|
-
case 8:
|
|
2845
|
-
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 10];
|
|
2846
|
-
_t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2847
|
-
_v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2848
|
-
return [4 /*yield*/, response.body.text()];
|
|
2849
|
-
case 9:
|
|
2850
|
-
body_111 = _t.apply(_s, [_v.apply(_u, [_w.sent(), contentType]),
|
|
2559
|
+
body_69 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
|
|
2851
2560
|
"UsageLogsByIndexResponse",
|
|
2852
2561
|
""]);
|
|
2853
|
-
return [2 /*return*/,
|
|
2854
|
-
case
|
|
2855
|
-
case
|
|
2856
|
-
body = (
|
|
2562
|
+
return [2 /*return*/, body_69];
|
|
2563
|
+
case 6: return [4 /*yield*/, response.body.text()];
|
|
2564
|
+
case 7:
|
|
2565
|
+
body = (_l.sent()) || "";
|
|
2857
2566
|
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
2858
2567
|
}
|
|
2859
2568
|
});
|
|
@@ -2868,63 +2577,49 @@ var UsageMeteringApiResponseProcessor = /** @class */ (function () {
|
|
|
2868
2577
|
*/
|
|
2869
2578
|
UsageMeteringApiResponseProcessor.prototype.getUsageLogsByRetention = function (response) {
|
|
2870
2579
|
return __awaiter(this, void 0, void 0, function () {
|
|
2871
|
-
var contentType,
|
|
2872
|
-
return __generator(this, function (
|
|
2873
|
-
switch (
|
|
2580
|
+
var contentType, body_70, _a, _b, _c, _d, bodyText, _e, _f, body_71, body_72, _g, _h, _j, _k, body;
|
|
2581
|
+
return __generator(this, function (_l) {
|
|
2582
|
+
switch (_l.label) {
|
|
2874
2583
|
case 0:
|
|
2875
2584
|
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
2876
|
-
if (!(
|
|
2585
|
+
if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
|
|
2877
2586
|
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2878
2587
|
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2879
2588
|
return [4 /*yield*/, response.body.text()];
|
|
2880
2589
|
case 1:
|
|
2881
|
-
|
|
2882
|
-
"UsageLogsByRetentionResponse"
|
|
2883
|
-
|
|
2884
|
-
return [2 /*return*/, body_112];
|
|
2590
|
+
body_70 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
|
|
2591
|
+
"UsageLogsByRetentionResponse"]);
|
|
2592
|
+
return [2 /*return*/, body_70];
|
|
2885
2593
|
case 2:
|
|
2886
|
-
if (!(
|
|
2887
|
-
|
|
2888
|
-
|
|
2594
|
+
if (!(response.httpStatusCode == 400 ||
|
|
2595
|
+
response.httpStatusCode == 403 ||
|
|
2596
|
+
response.httpStatusCode == 429)) return [3 /*break*/, 4];
|
|
2597
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2889
2598
|
return [4 /*yield*/, response.body.text()];
|
|
2890
2599
|
case 3:
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
""
|
|
2894
|
-
|
|
2600
|
+
bodyText = _f.apply(_e, [_l.sent(), contentType]);
|
|
2601
|
+
try {
|
|
2602
|
+
body_71 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
2603
|
+
throw new exception_1.ApiException(response.httpStatusCode, body_71);
|
|
2604
|
+
}
|
|
2605
|
+
catch (error) {
|
|
2606
|
+
logger_1.logger.info("Got error deserializing error: ".concat(error));
|
|
2607
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
2608
|
+
}
|
|
2609
|
+
_l.label = 4;
|
|
2895
2610
|
case 4:
|
|
2896
|
-
if (!(
|
|
2897
|
-
|
|
2898
|
-
|
|
2611
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
|
|
2612
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2613
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2899
2614
|
return [4 /*yield*/, response.body.text()];
|
|
2900
2615
|
case 5:
|
|
2901
|
-
|
|
2902
|
-
"APIErrorResponse",
|
|
2903
|
-
""]);
|
|
2904
|
-
throw new exception_1.ApiException(403, body_114);
|
|
2905
|
-
case 6:
|
|
2906
|
-
if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3 /*break*/, 8];
|
|
2907
|
-
_p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2908
|
-
_r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2909
|
-
return [4 /*yield*/, response.body.text()];
|
|
2910
|
-
case 7:
|
|
2911
|
-
body_115 = _p.apply(_o, [_r.apply(_q, [_w.sent(), contentType]),
|
|
2912
|
-
"APIErrorResponse",
|
|
2913
|
-
""]);
|
|
2914
|
-
throw new exception_1.ApiException(429, body_115);
|
|
2915
|
-
case 8:
|
|
2916
|
-
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 10];
|
|
2917
|
-
_t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2918
|
-
_v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2919
|
-
return [4 /*yield*/, response.body.text()];
|
|
2920
|
-
case 9:
|
|
2921
|
-
body_116 = _t.apply(_s, [_v.apply(_u, [_w.sent(), contentType]),
|
|
2616
|
+
body_72 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
|
|
2922
2617
|
"UsageLogsByRetentionResponse",
|
|
2923
2618
|
""]);
|
|
2924
|
-
return [2 /*return*/,
|
|
2925
|
-
case
|
|
2926
|
-
case
|
|
2927
|
-
body = (
|
|
2619
|
+
return [2 /*return*/, body_72];
|
|
2620
|
+
case 6: return [4 /*yield*/, response.body.text()];
|
|
2621
|
+
case 7:
|
|
2622
|
+
body = (_l.sent()) || "";
|
|
2928
2623
|
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
2929
2624
|
}
|
|
2930
2625
|
});
|
|
@@ -2939,63 +2634,49 @@ var UsageMeteringApiResponseProcessor = /** @class */ (function () {
|
|
|
2939
2634
|
*/
|
|
2940
2635
|
UsageMeteringApiResponseProcessor.prototype.getUsageNetworkFlows = function (response) {
|
|
2941
2636
|
return __awaiter(this, void 0, void 0, function () {
|
|
2942
|
-
var contentType,
|
|
2943
|
-
return __generator(this, function (
|
|
2944
|
-
switch (
|
|
2637
|
+
var contentType, body_73, _a, _b, _c, _d, bodyText, _e, _f, body_74, body_75, _g, _h, _j, _k, body;
|
|
2638
|
+
return __generator(this, function (_l) {
|
|
2639
|
+
switch (_l.label) {
|
|
2945
2640
|
case 0:
|
|
2946
2641
|
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
2947
|
-
if (!(
|
|
2642
|
+
if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
|
|
2948
2643
|
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2949
2644
|
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2950
2645
|
return [4 /*yield*/, response.body.text()];
|
|
2951
2646
|
case 1:
|
|
2952
|
-
|
|
2953
|
-
"UsageNetworkFlowsResponse"
|
|
2954
|
-
|
|
2955
|
-
return [2 /*return*/, body_117];
|
|
2647
|
+
body_73 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
|
|
2648
|
+
"UsageNetworkFlowsResponse"]);
|
|
2649
|
+
return [2 /*return*/, body_73];
|
|
2956
2650
|
case 2:
|
|
2957
|
-
if (!(
|
|
2958
|
-
|
|
2959
|
-
|
|
2651
|
+
if (!(response.httpStatusCode == 400 ||
|
|
2652
|
+
response.httpStatusCode == 403 ||
|
|
2653
|
+
response.httpStatusCode == 429)) return [3 /*break*/, 4];
|
|
2654
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2960
2655
|
return [4 /*yield*/, response.body.text()];
|
|
2961
2656
|
case 3:
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
""
|
|
2965
|
-
|
|
2657
|
+
bodyText = _f.apply(_e, [_l.sent(), contentType]);
|
|
2658
|
+
try {
|
|
2659
|
+
body_74 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
2660
|
+
throw new exception_1.ApiException(response.httpStatusCode, body_74);
|
|
2661
|
+
}
|
|
2662
|
+
catch (error) {
|
|
2663
|
+
logger_1.logger.info("Got error deserializing error: ".concat(error));
|
|
2664
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
2665
|
+
}
|
|
2666
|
+
_l.label = 4;
|
|
2966
2667
|
case 4:
|
|
2967
|
-
if (!(
|
|
2968
|
-
|
|
2969
|
-
|
|
2668
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
|
|
2669
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2670
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2970
2671
|
return [4 /*yield*/, response.body.text()];
|
|
2971
2672
|
case 5:
|
|
2972
|
-
|
|
2973
|
-
"APIErrorResponse",
|
|
2974
|
-
""]);
|
|
2975
|
-
throw new exception_1.ApiException(403, body_119);
|
|
2976
|
-
case 6:
|
|
2977
|
-
if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3 /*break*/, 8];
|
|
2978
|
-
_p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2979
|
-
_r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2980
|
-
return [4 /*yield*/, response.body.text()];
|
|
2981
|
-
case 7:
|
|
2982
|
-
body_120 = _p.apply(_o, [_r.apply(_q, [_w.sent(), contentType]),
|
|
2983
|
-
"APIErrorResponse",
|
|
2984
|
-
""]);
|
|
2985
|
-
throw new exception_1.ApiException(429, body_120);
|
|
2986
|
-
case 8:
|
|
2987
|
-
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 10];
|
|
2988
|
-
_t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2989
|
-
_v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
|
|
2990
|
-
return [4 /*yield*/, response.body.text()];
|
|
2991
|
-
case 9:
|
|
2992
|
-
body_121 = _t.apply(_s, [_v.apply(_u, [_w.sent(), contentType]),
|
|
2673
|
+
body_75 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
|
|
2993
2674
|
"UsageNetworkFlowsResponse",
|
|
2994
2675
|
""]);
|
|
2995
|
-
return [2 /*return*/,
|
|
2996
|
-
case
|
|
2997
|
-
case
|
|
2998
|
-
body = (
|
|
2676
|
+
return [2 /*return*/, body_75];
|
|
2677
|
+
case 6: return [4 /*yield*/, response.body.text()];
|
|
2678
|
+
case 7:
|
|
2679
|
+
body = (_l.sent()) || "";
|
|
2999
2680
|
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
3000
2681
|
}
|
|
3001
2682
|
});
|
|
@@ -3010,63 +2691,49 @@ var UsageMeteringApiResponseProcessor = /** @class */ (function () {
|
|
|
3010
2691
|
*/
|
|
3011
2692
|
UsageMeteringApiResponseProcessor.prototype.getUsageNetworkHosts = function (response) {
|
|
3012
2693
|
return __awaiter(this, void 0, void 0, function () {
|
|
3013
|
-
var contentType,
|
|
3014
|
-
return __generator(this, function (
|
|
3015
|
-
switch (
|
|
2694
|
+
var contentType, body_76, _a, _b, _c, _d, bodyText, _e, _f, body_77, body_78, _g, _h, _j, _k, body;
|
|
2695
|
+
return __generator(this, function (_l) {
|
|
2696
|
+
switch (_l.label) {
|
|
3016
2697
|
case 0:
|
|
3017
2698
|
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
3018
|
-
if (!(
|
|
2699
|
+
if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
|
|
3019
2700
|
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3020
2701
|
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3021
2702
|
return [4 /*yield*/, response.body.text()];
|
|
3022
2703
|
case 1:
|
|
3023
|
-
|
|
3024
|
-
"UsageNetworkHostsResponse"
|
|
3025
|
-
|
|
3026
|
-
return [2 /*return*/, body_122];
|
|
2704
|
+
body_76 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
|
|
2705
|
+
"UsageNetworkHostsResponse"]);
|
|
2706
|
+
return [2 /*return*/, body_76];
|
|
3027
2707
|
case 2:
|
|
3028
|
-
if (!(
|
|
3029
|
-
|
|
3030
|
-
|
|
2708
|
+
if (!(response.httpStatusCode == 400 ||
|
|
2709
|
+
response.httpStatusCode == 403 ||
|
|
2710
|
+
response.httpStatusCode == 429)) return [3 /*break*/, 4];
|
|
2711
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3031
2712
|
return [4 /*yield*/, response.body.text()];
|
|
3032
2713
|
case 3:
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
""
|
|
3036
|
-
|
|
2714
|
+
bodyText = _f.apply(_e, [_l.sent(), contentType]);
|
|
2715
|
+
try {
|
|
2716
|
+
body_77 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
2717
|
+
throw new exception_1.ApiException(response.httpStatusCode, body_77);
|
|
2718
|
+
}
|
|
2719
|
+
catch (error) {
|
|
2720
|
+
logger_1.logger.info("Got error deserializing error: ".concat(error));
|
|
2721
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
2722
|
+
}
|
|
2723
|
+
_l.label = 4;
|
|
3037
2724
|
case 4:
|
|
3038
|
-
if (!(
|
|
3039
|
-
|
|
3040
|
-
|
|
2725
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
|
|
2726
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2727
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3041
2728
|
return [4 /*yield*/, response.body.text()];
|
|
3042
2729
|
case 5:
|
|
3043
|
-
|
|
3044
|
-
"APIErrorResponse",
|
|
3045
|
-
""]);
|
|
3046
|
-
throw new exception_1.ApiException(403, body_124);
|
|
3047
|
-
case 6:
|
|
3048
|
-
if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3 /*break*/, 8];
|
|
3049
|
-
_p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3050
|
-
_r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3051
|
-
return [4 /*yield*/, response.body.text()];
|
|
3052
|
-
case 7:
|
|
3053
|
-
body_125 = _p.apply(_o, [_r.apply(_q, [_w.sent(), contentType]),
|
|
3054
|
-
"APIErrorResponse",
|
|
3055
|
-
""]);
|
|
3056
|
-
throw new exception_1.ApiException(429, body_125);
|
|
3057
|
-
case 8:
|
|
3058
|
-
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 10];
|
|
3059
|
-
_t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3060
|
-
_v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3061
|
-
return [4 /*yield*/, response.body.text()];
|
|
3062
|
-
case 9:
|
|
3063
|
-
body_126 = _t.apply(_s, [_v.apply(_u, [_w.sent(), contentType]),
|
|
2730
|
+
body_78 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
|
|
3064
2731
|
"UsageNetworkHostsResponse",
|
|
3065
2732
|
""]);
|
|
3066
|
-
return [2 /*return*/,
|
|
3067
|
-
case
|
|
3068
|
-
case
|
|
3069
|
-
body = (
|
|
2733
|
+
return [2 /*return*/, body_78];
|
|
2734
|
+
case 6: return [4 /*yield*/, response.body.text()];
|
|
2735
|
+
case 7:
|
|
2736
|
+
body = (_l.sent()) || "";
|
|
3070
2737
|
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
3071
2738
|
}
|
|
3072
2739
|
});
|
|
@@ -3081,63 +2748,49 @@ var UsageMeteringApiResponseProcessor = /** @class */ (function () {
|
|
|
3081
2748
|
*/
|
|
3082
2749
|
UsageMeteringApiResponseProcessor.prototype.getUsageOnlineArchive = function (response) {
|
|
3083
2750
|
return __awaiter(this, void 0, void 0, function () {
|
|
3084
|
-
var contentType,
|
|
3085
|
-
return __generator(this, function (
|
|
3086
|
-
switch (
|
|
2751
|
+
var contentType, body_79, _a, _b, _c, _d, bodyText, _e, _f, body_80, body_81, _g, _h, _j, _k, body;
|
|
2752
|
+
return __generator(this, function (_l) {
|
|
2753
|
+
switch (_l.label) {
|
|
3087
2754
|
case 0:
|
|
3088
2755
|
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
3089
|
-
if (!(
|
|
2756
|
+
if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
|
|
3090
2757
|
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3091
2758
|
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3092
2759
|
return [4 /*yield*/, response.body.text()];
|
|
3093
2760
|
case 1:
|
|
3094
|
-
|
|
3095
|
-
"UsageOnlineArchiveResponse"
|
|
3096
|
-
|
|
3097
|
-
return [2 /*return*/, body_127];
|
|
2761
|
+
body_79 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
|
|
2762
|
+
"UsageOnlineArchiveResponse"]);
|
|
2763
|
+
return [2 /*return*/, body_79];
|
|
3098
2764
|
case 2:
|
|
3099
|
-
if (!(
|
|
3100
|
-
|
|
3101
|
-
|
|
2765
|
+
if (!(response.httpStatusCode == 400 ||
|
|
2766
|
+
response.httpStatusCode == 403 ||
|
|
2767
|
+
response.httpStatusCode == 429)) return [3 /*break*/, 4];
|
|
2768
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3102
2769
|
return [4 /*yield*/, response.body.text()];
|
|
3103
2770
|
case 3:
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
""
|
|
3107
|
-
|
|
2771
|
+
bodyText = _f.apply(_e, [_l.sent(), contentType]);
|
|
2772
|
+
try {
|
|
2773
|
+
body_80 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
2774
|
+
throw new exception_1.ApiException(response.httpStatusCode, body_80);
|
|
2775
|
+
}
|
|
2776
|
+
catch (error) {
|
|
2777
|
+
logger_1.logger.info("Got error deserializing error: ".concat(error));
|
|
2778
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
2779
|
+
}
|
|
2780
|
+
_l.label = 4;
|
|
3108
2781
|
case 4:
|
|
3109
|
-
if (!(
|
|
3110
|
-
|
|
3111
|
-
|
|
2782
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
|
|
2783
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2784
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3112
2785
|
return [4 /*yield*/, response.body.text()];
|
|
3113
2786
|
case 5:
|
|
3114
|
-
|
|
3115
|
-
"APIErrorResponse",
|
|
3116
|
-
""]);
|
|
3117
|
-
throw new exception_1.ApiException(403, body_129);
|
|
3118
|
-
case 6:
|
|
3119
|
-
if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3 /*break*/, 8];
|
|
3120
|
-
_p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3121
|
-
_r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3122
|
-
return [4 /*yield*/, response.body.text()];
|
|
3123
|
-
case 7:
|
|
3124
|
-
body_130 = _p.apply(_o, [_r.apply(_q, [_w.sent(), contentType]),
|
|
3125
|
-
"APIErrorResponse",
|
|
3126
|
-
""]);
|
|
3127
|
-
throw new exception_1.ApiException(429, body_130);
|
|
3128
|
-
case 8:
|
|
3129
|
-
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 10];
|
|
3130
|
-
_t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3131
|
-
_v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3132
|
-
return [4 /*yield*/, response.body.text()];
|
|
3133
|
-
case 9:
|
|
3134
|
-
body_131 = _t.apply(_s, [_v.apply(_u, [_w.sent(), contentType]),
|
|
2787
|
+
body_81 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
|
|
3135
2788
|
"UsageOnlineArchiveResponse",
|
|
3136
2789
|
""]);
|
|
3137
|
-
return [2 /*return*/,
|
|
3138
|
-
case
|
|
3139
|
-
case
|
|
3140
|
-
body = (
|
|
2790
|
+
return [2 /*return*/, body_81];
|
|
2791
|
+
case 6: return [4 /*yield*/, response.body.text()];
|
|
2792
|
+
case 7:
|
|
2793
|
+
body = (_l.sent()) || "";
|
|
3141
2794
|
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
3142
2795
|
}
|
|
3143
2796
|
});
|
|
@@ -3152,63 +2805,49 @@ var UsageMeteringApiResponseProcessor = /** @class */ (function () {
|
|
|
3152
2805
|
*/
|
|
3153
2806
|
UsageMeteringApiResponseProcessor.prototype.getUsageProfiling = function (response) {
|
|
3154
2807
|
return __awaiter(this, void 0, void 0, function () {
|
|
3155
|
-
var contentType,
|
|
3156
|
-
return __generator(this, function (
|
|
3157
|
-
switch (
|
|
2808
|
+
var contentType, body_82, _a, _b, _c, _d, bodyText, _e, _f, body_83, body_84, _g, _h, _j, _k, body;
|
|
2809
|
+
return __generator(this, function (_l) {
|
|
2810
|
+
switch (_l.label) {
|
|
3158
2811
|
case 0:
|
|
3159
2812
|
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
3160
|
-
if (!(
|
|
2813
|
+
if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
|
|
3161
2814
|
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3162
2815
|
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3163
2816
|
return [4 /*yield*/, response.body.text()];
|
|
3164
2817
|
case 1:
|
|
3165
|
-
|
|
3166
|
-
"UsageProfilingResponse"
|
|
3167
|
-
|
|
3168
|
-
return [2 /*return*/, body_132];
|
|
2818
|
+
body_82 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
|
|
2819
|
+
"UsageProfilingResponse"]);
|
|
2820
|
+
return [2 /*return*/, body_82];
|
|
3169
2821
|
case 2:
|
|
3170
|
-
if (!(
|
|
3171
|
-
|
|
3172
|
-
|
|
2822
|
+
if (!(response.httpStatusCode == 400 ||
|
|
2823
|
+
response.httpStatusCode == 403 ||
|
|
2824
|
+
response.httpStatusCode == 429)) return [3 /*break*/, 4];
|
|
2825
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3173
2826
|
return [4 /*yield*/, response.body.text()];
|
|
3174
2827
|
case 3:
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
""
|
|
3178
|
-
|
|
2828
|
+
bodyText = _f.apply(_e, [_l.sent(), contentType]);
|
|
2829
|
+
try {
|
|
2830
|
+
body_83 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
2831
|
+
throw new exception_1.ApiException(response.httpStatusCode, body_83);
|
|
2832
|
+
}
|
|
2833
|
+
catch (error) {
|
|
2834
|
+
logger_1.logger.info("Got error deserializing error: ".concat(error));
|
|
2835
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
2836
|
+
}
|
|
2837
|
+
_l.label = 4;
|
|
3179
2838
|
case 4:
|
|
3180
|
-
if (!(
|
|
3181
|
-
|
|
3182
|
-
|
|
2839
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
|
|
2840
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2841
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3183
2842
|
return [4 /*yield*/, response.body.text()];
|
|
3184
2843
|
case 5:
|
|
3185
|
-
|
|
3186
|
-
"APIErrorResponse",
|
|
3187
|
-
""]);
|
|
3188
|
-
throw new exception_1.ApiException(403, body_134);
|
|
3189
|
-
case 6:
|
|
3190
|
-
if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3 /*break*/, 8];
|
|
3191
|
-
_p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3192
|
-
_r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3193
|
-
return [4 /*yield*/, response.body.text()];
|
|
3194
|
-
case 7:
|
|
3195
|
-
body_135 = _p.apply(_o, [_r.apply(_q, [_w.sent(), contentType]),
|
|
3196
|
-
"APIErrorResponse",
|
|
3197
|
-
""]);
|
|
3198
|
-
throw new exception_1.ApiException(429, body_135);
|
|
3199
|
-
case 8:
|
|
3200
|
-
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 10];
|
|
3201
|
-
_t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3202
|
-
_v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3203
|
-
return [4 /*yield*/, response.body.text()];
|
|
3204
|
-
case 9:
|
|
3205
|
-
body_136 = _t.apply(_s, [_v.apply(_u, [_w.sent(), contentType]),
|
|
2844
|
+
body_84 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
|
|
3206
2845
|
"UsageProfilingResponse",
|
|
3207
2846
|
""]);
|
|
3208
|
-
return [2 /*return*/,
|
|
3209
|
-
case
|
|
3210
|
-
case
|
|
3211
|
-
body = (
|
|
2847
|
+
return [2 /*return*/, body_84];
|
|
2848
|
+
case 6: return [4 /*yield*/, response.body.text()];
|
|
2849
|
+
case 7:
|
|
2850
|
+
body = (_l.sent()) || "";
|
|
3212
2851
|
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
3213
2852
|
}
|
|
3214
2853
|
});
|
|
@@ -3223,63 +2862,49 @@ var UsageMeteringApiResponseProcessor = /** @class */ (function () {
|
|
|
3223
2862
|
*/
|
|
3224
2863
|
UsageMeteringApiResponseProcessor.prototype.getUsageRumSessions = function (response) {
|
|
3225
2864
|
return __awaiter(this, void 0, void 0, function () {
|
|
3226
|
-
var contentType,
|
|
3227
|
-
return __generator(this, function (
|
|
3228
|
-
switch (
|
|
2865
|
+
var contentType, body_85, _a, _b, _c, _d, bodyText, _e, _f, body_86, body_87, _g, _h, _j, _k, body;
|
|
2866
|
+
return __generator(this, function (_l) {
|
|
2867
|
+
switch (_l.label) {
|
|
3229
2868
|
case 0:
|
|
3230
2869
|
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
3231
|
-
if (!(
|
|
2870
|
+
if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
|
|
3232
2871
|
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3233
2872
|
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3234
2873
|
return [4 /*yield*/, response.body.text()];
|
|
3235
2874
|
case 1:
|
|
3236
|
-
|
|
3237
|
-
"UsageRumSessionsResponse"
|
|
3238
|
-
|
|
3239
|
-
return [2 /*return*/, body_137];
|
|
2875
|
+
body_85 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
|
|
2876
|
+
"UsageRumSessionsResponse"]);
|
|
2877
|
+
return [2 /*return*/, body_85];
|
|
3240
2878
|
case 2:
|
|
3241
|
-
if (!(
|
|
3242
|
-
|
|
3243
|
-
|
|
2879
|
+
if (!(response.httpStatusCode == 400 ||
|
|
2880
|
+
response.httpStatusCode == 403 ||
|
|
2881
|
+
response.httpStatusCode == 429)) return [3 /*break*/, 4];
|
|
2882
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3244
2883
|
return [4 /*yield*/, response.body.text()];
|
|
3245
2884
|
case 3:
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
""
|
|
3249
|
-
|
|
2885
|
+
bodyText = _f.apply(_e, [_l.sent(), contentType]);
|
|
2886
|
+
try {
|
|
2887
|
+
body_86 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
2888
|
+
throw new exception_1.ApiException(response.httpStatusCode, body_86);
|
|
2889
|
+
}
|
|
2890
|
+
catch (error) {
|
|
2891
|
+
logger_1.logger.info("Got error deserializing error: ".concat(error));
|
|
2892
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
2893
|
+
}
|
|
2894
|
+
_l.label = 4;
|
|
3250
2895
|
case 4:
|
|
3251
|
-
if (!(
|
|
3252
|
-
|
|
3253
|
-
|
|
2896
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
|
|
2897
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2898
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3254
2899
|
return [4 /*yield*/, response.body.text()];
|
|
3255
2900
|
case 5:
|
|
3256
|
-
|
|
3257
|
-
"APIErrorResponse",
|
|
3258
|
-
""]);
|
|
3259
|
-
throw new exception_1.ApiException(403, body_139);
|
|
3260
|
-
case 6:
|
|
3261
|
-
if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3 /*break*/, 8];
|
|
3262
|
-
_p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3263
|
-
_r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3264
|
-
return [4 /*yield*/, response.body.text()];
|
|
3265
|
-
case 7:
|
|
3266
|
-
body_140 = _p.apply(_o, [_r.apply(_q, [_w.sent(), contentType]),
|
|
3267
|
-
"APIErrorResponse",
|
|
3268
|
-
""]);
|
|
3269
|
-
throw new exception_1.ApiException(429, body_140);
|
|
3270
|
-
case 8:
|
|
3271
|
-
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 10];
|
|
3272
|
-
_t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3273
|
-
_v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3274
|
-
return [4 /*yield*/, response.body.text()];
|
|
3275
|
-
case 9:
|
|
3276
|
-
body_141 = _t.apply(_s, [_v.apply(_u, [_w.sent(), contentType]),
|
|
2901
|
+
body_87 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
|
|
3277
2902
|
"UsageRumSessionsResponse",
|
|
3278
2903
|
""]);
|
|
3279
|
-
return [2 /*return*/,
|
|
3280
|
-
case
|
|
3281
|
-
case
|
|
3282
|
-
body = (
|
|
2904
|
+
return [2 /*return*/, body_87];
|
|
2905
|
+
case 6: return [4 /*yield*/, response.body.text()];
|
|
2906
|
+
case 7:
|
|
2907
|
+
body = (_l.sent()) || "";
|
|
3283
2908
|
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
3284
2909
|
}
|
|
3285
2910
|
});
|
|
@@ -3294,63 +2919,49 @@ var UsageMeteringApiResponseProcessor = /** @class */ (function () {
|
|
|
3294
2919
|
*/
|
|
3295
2920
|
UsageMeteringApiResponseProcessor.prototype.getUsageRumUnits = function (response) {
|
|
3296
2921
|
return __awaiter(this, void 0, void 0, function () {
|
|
3297
|
-
var contentType,
|
|
3298
|
-
return __generator(this, function (
|
|
3299
|
-
switch (
|
|
2922
|
+
var contentType, body_88, _a, _b, _c, _d, bodyText, _e, _f, body_89, body_90, _g, _h, _j, _k, body;
|
|
2923
|
+
return __generator(this, function (_l) {
|
|
2924
|
+
switch (_l.label) {
|
|
3300
2925
|
case 0:
|
|
3301
2926
|
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
3302
|
-
if (!(
|
|
2927
|
+
if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
|
|
3303
2928
|
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3304
2929
|
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3305
2930
|
return [4 /*yield*/, response.body.text()];
|
|
3306
2931
|
case 1:
|
|
3307
|
-
|
|
3308
|
-
"UsageRumUnitsResponse"
|
|
3309
|
-
|
|
3310
|
-
return [2 /*return*/, body_142];
|
|
2932
|
+
body_88 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
|
|
2933
|
+
"UsageRumUnitsResponse"]);
|
|
2934
|
+
return [2 /*return*/, body_88];
|
|
3311
2935
|
case 2:
|
|
3312
|
-
if (!(
|
|
3313
|
-
|
|
3314
|
-
|
|
2936
|
+
if (!(response.httpStatusCode == 400 ||
|
|
2937
|
+
response.httpStatusCode == 403 ||
|
|
2938
|
+
response.httpStatusCode == 429)) return [3 /*break*/, 4];
|
|
2939
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3315
2940
|
return [4 /*yield*/, response.body.text()];
|
|
3316
2941
|
case 3:
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
""
|
|
3320
|
-
|
|
2942
|
+
bodyText = _f.apply(_e, [_l.sent(), contentType]);
|
|
2943
|
+
try {
|
|
2944
|
+
body_89 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
2945
|
+
throw new exception_1.ApiException(response.httpStatusCode, body_89);
|
|
2946
|
+
}
|
|
2947
|
+
catch (error) {
|
|
2948
|
+
logger_1.logger.info("Got error deserializing error: ".concat(error));
|
|
2949
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
2950
|
+
}
|
|
2951
|
+
_l.label = 4;
|
|
3321
2952
|
case 4:
|
|
3322
|
-
if (!(
|
|
3323
|
-
|
|
3324
|
-
|
|
2953
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
|
|
2954
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
2955
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3325
2956
|
return [4 /*yield*/, response.body.text()];
|
|
3326
2957
|
case 5:
|
|
3327
|
-
|
|
3328
|
-
"APIErrorResponse",
|
|
3329
|
-
""]);
|
|
3330
|
-
throw new exception_1.ApiException(403, body_144);
|
|
3331
|
-
case 6:
|
|
3332
|
-
if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3 /*break*/, 8];
|
|
3333
|
-
_p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3334
|
-
_r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3335
|
-
return [4 /*yield*/, response.body.text()];
|
|
3336
|
-
case 7:
|
|
3337
|
-
body_145 = _p.apply(_o, [_r.apply(_q, [_w.sent(), contentType]),
|
|
3338
|
-
"APIErrorResponse",
|
|
3339
|
-
""]);
|
|
3340
|
-
throw new exception_1.ApiException(429, body_145);
|
|
3341
|
-
case 8:
|
|
3342
|
-
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 10];
|
|
3343
|
-
_t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3344
|
-
_v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3345
|
-
return [4 /*yield*/, response.body.text()];
|
|
3346
|
-
case 9:
|
|
3347
|
-
body_146 = _t.apply(_s, [_v.apply(_u, [_w.sent(), contentType]),
|
|
2958
|
+
body_90 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
|
|
3348
2959
|
"UsageRumUnitsResponse",
|
|
3349
2960
|
""]);
|
|
3350
|
-
return [2 /*return*/,
|
|
3351
|
-
case
|
|
3352
|
-
case
|
|
3353
|
-
body = (
|
|
2961
|
+
return [2 /*return*/, body_90];
|
|
2962
|
+
case 6: return [4 /*yield*/, response.body.text()];
|
|
2963
|
+
case 7:
|
|
2964
|
+
body = (_l.sent()) || "";
|
|
3354
2965
|
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
3355
2966
|
}
|
|
3356
2967
|
});
|
|
@@ -3365,63 +2976,49 @@ var UsageMeteringApiResponseProcessor = /** @class */ (function () {
|
|
|
3365
2976
|
*/
|
|
3366
2977
|
UsageMeteringApiResponseProcessor.prototype.getUsageSDS = function (response) {
|
|
3367
2978
|
return __awaiter(this, void 0, void 0, function () {
|
|
3368
|
-
var contentType,
|
|
3369
|
-
return __generator(this, function (
|
|
3370
|
-
switch (
|
|
2979
|
+
var contentType, body_91, _a, _b, _c, _d, bodyText, _e, _f, body_92, body_93, _g, _h, _j, _k, body;
|
|
2980
|
+
return __generator(this, function (_l) {
|
|
2981
|
+
switch (_l.label) {
|
|
3371
2982
|
case 0:
|
|
3372
2983
|
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
3373
|
-
if (!(
|
|
2984
|
+
if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
|
|
3374
2985
|
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3375
2986
|
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3376
2987
|
return [4 /*yield*/, response.body.text()];
|
|
3377
2988
|
case 1:
|
|
3378
|
-
|
|
3379
|
-
"UsageSDSResponse"
|
|
3380
|
-
|
|
3381
|
-
return [2 /*return*/, body_147];
|
|
2989
|
+
body_91 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
|
|
2990
|
+
"UsageSDSResponse"]);
|
|
2991
|
+
return [2 /*return*/, body_91];
|
|
3382
2992
|
case 2:
|
|
3383
|
-
if (!(
|
|
3384
|
-
|
|
3385
|
-
|
|
2993
|
+
if (!(response.httpStatusCode == 400 ||
|
|
2994
|
+
response.httpStatusCode == 403 ||
|
|
2995
|
+
response.httpStatusCode == 429)) return [3 /*break*/, 4];
|
|
2996
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3386
2997
|
return [4 /*yield*/, response.body.text()];
|
|
3387
2998
|
case 3:
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
""
|
|
3391
|
-
|
|
2999
|
+
bodyText = _f.apply(_e, [_l.sent(), contentType]);
|
|
3000
|
+
try {
|
|
3001
|
+
body_92 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
3002
|
+
throw new exception_1.ApiException(response.httpStatusCode, body_92);
|
|
3003
|
+
}
|
|
3004
|
+
catch (error) {
|
|
3005
|
+
logger_1.logger.info("Got error deserializing error: ".concat(error));
|
|
3006
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
3007
|
+
}
|
|
3008
|
+
_l.label = 4;
|
|
3392
3009
|
case 4:
|
|
3393
|
-
if (!(
|
|
3394
|
-
|
|
3395
|
-
|
|
3010
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
|
|
3011
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3012
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3396
3013
|
return [4 /*yield*/, response.body.text()];
|
|
3397
3014
|
case 5:
|
|
3398
|
-
|
|
3399
|
-
"APIErrorResponse",
|
|
3400
|
-
""]);
|
|
3401
|
-
throw new exception_1.ApiException(403, body_149);
|
|
3402
|
-
case 6:
|
|
3403
|
-
if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3 /*break*/, 8];
|
|
3404
|
-
_p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3405
|
-
_r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3406
|
-
return [4 /*yield*/, response.body.text()];
|
|
3407
|
-
case 7:
|
|
3408
|
-
body_150 = _p.apply(_o, [_r.apply(_q, [_w.sent(), contentType]),
|
|
3409
|
-
"APIErrorResponse",
|
|
3410
|
-
""]);
|
|
3411
|
-
throw new exception_1.ApiException(429, body_150);
|
|
3412
|
-
case 8:
|
|
3413
|
-
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 10];
|
|
3414
|
-
_t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3415
|
-
_v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3416
|
-
return [4 /*yield*/, response.body.text()];
|
|
3417
|
-
case 9:
|
|
3418
|
-
body_151 = _t.apply(_s, [_v.apply(_u, [_w.sent(), contentType]),
|
|
3015
|
+
body_93 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
|
|
3419
3016
|
"UsageSDSResponse",
|
|
3420
3017
|
""]);
|
|
3421
|
-
return [2 /*return*/,
|
|
3422
|
-
case
|
|
3423
|
-
case
|
|
3424
|
-
body = (
|
|
3018
|
+
return [2 /*return*/, body_93];
|
|
3019
|
+
case 6: return [4 /*yield*/, response.body.text()];
|
|
3020
|
+
case 7:
|
|
3021
|
+
body = (_l.sent()) || "";
|
|
3425
3022
|
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
3426
3023
|
}
|
|
3427
3024
|
});
|
|
@@ -3436,63 +3033,49 @@ var UsageMeteringApiResponseProcessor = /** @class */ (function () {
|
|
|
3436
3033
|
*/
|
|
3437
3034
|
UsageMeteringApiResponseProcessor.prototype.getUsageSNMP = function (response) {
|
|
3438
3035
|
return __awaiter(this, void 0, void 0, function () {
|
|
3439
|
-
var contentType,
|
|
3440
|
-
return __generator(this, function (
|
|
3441
|
-
switch (
|
|
3036
|
+
var contentType, body_94, _a, _b, _c, _d, bodyText, _e, _f, body_95, body_96, _g, _h, _j, _k, body;
|
|
3037
|
+
return __generator(this, function (_l) {
|
|
3038
|
+
switch (_l.label) {
|
|
3442
3039
|
case 0:
|
|
3443
3040
|
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
3444
|
-
if (!(
|
|
3041
|
+
if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
|
|
3445
3042
|
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3446
3043
|
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3447
3044
|
return [4 /*yield*/, response.body.text()];
|
|
3448
3045
|
case 1:
|
|
3449
|
-
|
|
3450
|
-
"UsageSNMPResponse"
|
|
3451
|
-
|
|
3452
|
-
return [2 /*return*/, body_152];
|
|
3046
|
+
body_94 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
|
|
3047
|
+
"UsageSNMPResponse"]);
|
|
3048
|
+
return [2 /*return*/, body_94];
|
|
3453
3049
|
case 2:
|
|
3454
|
-
if (!(
|
|
3455
|
-
|
|
3456
|
-
|
|
3050
|
+
if (!(response.httpStatusCode == 400 ||
|
|
3051
|
+
response.httpStatusCode == 403 ||
|
|
3052
|
+
response.httpStatusCode == 429)) return [3 /*break*/, 4];
|
|
3053
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3457
3054
|
return [4 /*yield*/, response.body.text()];
|
|
3458
3055
|
case 3:
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
""
|
|
3462
|
-
|
|
3056
|
+
bodyText = _f.apply(_e, [_l.sent(), contentType]);
|
|
3057
|
+
try {
|
|
3058
|
+
body_95 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
3059
|
+
throw new exception_1.ApiException(response.httpStatusCode, body_95);
|
|
3060
|
+
}
|
|
3061
|
+
catch (error) {
|
|
3062
|
+
logger_1.logger.info("Got error deserializing error: ".concat(error));
|
|
3063
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
3064
|
+
}
|
|
3065
|
+
_l.label = 4;
|
|
3463
3066
|
case 4:
|
|
3464
|
-
if (!(
|
|
3465
|
-
|
|
3466
|
-
|
|
3067
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
|
|
3068
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3069
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3467
3070
|
return [4 /*yield*/, response.body.text()];
|
|
3468
3071
|
case 5:
|
|
3469
|
-
|
|
3470
|
-
"APIErrorResponse",
|
|
3471
|
-
""]);
|
|
3472
|
-
throw new exception_1.ApiException(403, body_154);
|
|
3473
|
-
case 6:
|
|
3474
|
-
if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3 /*break*/, 8];
|
|
3475
|
-
_p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3476
|
-
_r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3477
|
-
return [4 /*yield*/, response.body.text()];
|
|
3478
|
-
case 7:
|
|
3479
|
-
body_155 = _p.apply(_o, [_r.apply(_q, [_w.sent(), contentType]),
|
|
3480
|
-
"APIErrorResponse",
|
|
3481
|
-
""]);
|
|
3482
|
-
throw new exception_1.ApiException(429, body_155);
|
|
3483
|
-
case 8:
|
|
3484
|
-
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 10];
|
|
3485
|
-
_t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3486
|
-
_v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3487
|
-
return [4 /*yield*/, response.body.text()];
|
|
3488
|
-
case 9:
|
|
3489
|
-
body_156 = _t.apply(_s, [_v.apply(_u, [_w.sent(), contentType]),
|
|
3072
|
+
body_96 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
|
|
3490
3073
|
"UsageSNMPResponse",
|
|
3491
3074
|
""]);
|
|
3492
|
-
return [2 /*return*/,
|
|
3493
|
-
case
|
|
3494
|
-
case
|
|
3495
|
-
body = (
|
|
3075
|
+
return [2 /*return*/, body_96];
|
|
3076
|
+
case 6: return [4 /*yield*/, response.body.text()];
|
|
3077
|
+
case 7:
|
|
3078
|
+
body = (_l.sent()) || "";
|
|
3496
3079
|
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
3497
3080
|
}
|
|
3498
3081
|
});
|
|
@@ -3507,63 +3090,49 @@ var UsageMeteringApiResponseProcessor = /** @class */ (function () {
|
|
|
3507
3090
|
*/
|
|
3508
3091
|
UsageMeteringApiResponseProcessor.prototype.getUsageSummary = function (response) {
|
|
3509
3092
|
return __awaiter(this, void 0, void 0, function () {
|
|
3510
|
-
var contentType,
|
|
3511
|
-
return __generator(this, function (
|
|
3512
|
-
switch (
|
|
3093
|
+
var contentType, body_97, _a, _b, _c, _d, bodyText, _e, _f, body_98, body_99, _g, _h, _j, _k, body;
|
|
3094
|
+
return __generator(this, function (_l) {
|
|
3095
|
+
switch (_l.label) {
|
|
3513
3096
|
case 0:
|
|
3514
3097
|
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
3515
|
-
if (!(
|
|
3098
|
+
if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
|
|
3516
3099
|
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3517
3100
|
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3518
3101
|
return [4 /*yield*/, response.body.text()];
|
|
3519
3102
|
case 1:
|
|
3520
|
-
|
|
3521
|
-
"UsageSummaryResponse"
|
|
3522
|
-
|
|
3523
|
-
return [2 /*return*/, body_157];
|
|
3103
|
+
body_97 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
|
|
3104
|
+
"UsageSummaryResponse"]);
|
|
3105
|
+
return [2 /*return*/, body_97];
|
|
3524
3106
|
case 2:
|
|
3525
|
-
if (!(
|
|
3526
|
-
|
|
3527
|
-
|
|
3107
|
+
if (!(response.httpStatusCode == 400 ||
|
|
3108
|
+
response.httpStatusCode == 403 ||
|
|
3109
|
+
response.httpStatusCode == 429)) return [3 /*break*/, 4];
|
|
3110
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3528
3111
|
return [4 /*yield*/, response.body.text()];
|
|
3529
3112
|
case 3:
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
""
|
|
3533
|
-
|
|
3113
|
+
bodyText = _f.apply(_e, [_l.sent(), contentType]);
|
|
3114
|
+
try {
|
|
3115
|
+
body_98 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
3116
|
+
throw new exception_1.ApiException(response.httpStatusCode, body_98);
|
|
3117
|
+
}
|
|
3118
|
+
catch (error) {
|
|
3119
|
+
logger_1.logger.info("Got error deserializing error: ".concat(error));
|
|
3120
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
3121
|
+
}
|
|
3122
|
+
_l.label = 4;
|
|
3534
3123
|
case 4:
|
|
3535
|
-
if (!(
|
|
3536
|
-
|
|
3537
|
-
|
|
3124
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
|
|
3125
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3126
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3538
3127
|
return [4 /*yield*/, response.body.text()];
|
|
3539
3128
|
case 5:
|
|
3540
|
-
|
|
3541
|
-
"APIErrorResponse",
|
|
3542
|
-
""]);
|
|
3543
|
-
throw new exception_1.ApiException(403, body_159);
|
|
3544
|
-
case 6:
|
|
3545
|
-
if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3 /*break*/, 8];
|
|
3546
|
-
_p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3547
|
-
_r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3548
|
-
return [4 /*yield*/, response.body.text()];
|
|
3549
|
-
case 7:
|
|
3550
|
-
body_160 = _p.apply(_o, [_r.apply(_q, [_w.sent(), contentType]),
|
|
3551
|
-
"APIErrorResponse",
|
|
3552
|
-
""]);
|
|
3553
|
-
throw new exception_1.ApiException(429, body_160);
|
|
3554
|
-
case 8:
|
|
3555
|
-
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 10];
|
|
3556
|
-
_t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3557
|
-
_v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3558
|
-
return [4 /*yield*/, response.body.text()];
|
|
3559
|
-
case 9:
|
|
3560
|
-
body_161 = _t.apply(_s, [_v.apply(_u, [_w.sent(), contentType]),
|
|
3129
|
+
body_99 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
|
|
3561
3130
|
"UsageSummaryResponse",
|
|
3562
3131
|
""]);
|
|
3563
|
-
return [2 /*return*/,
|
|
3564
|
-
case
|
|
3565
|
-
case
|
|
3566
|
-
body = (
|
|
3132
|
+
return [2 /*return*/, body_99];
|
|
3133
|
+
case 6: return [4 /*yield*/, response.body.text()];
|
|
3134
|
+
case 7:
|
|
3135
|
+
body = (_l.sent()) || "";
|
|
3567
3136
|
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
3568
3137
|
}
|
|
3569
3138
|
});
|
|
@@ -3578,63 +3147,49 @@ var UsageMeteringApiResponseProcessor = /** @class */ (function () {
|
|
|
3578
3147
|
*/
|
|
3579
3148
|
UsageMeteringApiResponseProcessor.prototype.getUsageSynthetics = function (response) {
|
|
3580
3149
|
return __awaiter(this, void 0, void 0, function () {
|
|
3581
|
-
var contentType,
|
|
3582
|
-
return __generator(this, function (
|
|
3583
|
-
switch (
|
|
3150
|
+
var contentType, body_100, _a, _b, _c, _d, bodyText, _e, _f, body_101, body_102, _g, _h, _j, _k, body;
|
|
3151
|
+
return __generator(this, function (_l) {
|
|
3152
|
+
switch (_l.label) {
|
|
3584
3153
|
case 0:
|
|
3585
3154
|
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
3586
|
-
if (!(
|
|
3155
|
+
if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
|
|
3587
3156
|
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3588
3157
|
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3589
3158
|
return [4 /*yield*/, response.body.text()];
|
|
3590
3159
|
case 1:
|
|
3591
|
-
|
|
3592
|
-
"UsageSyntheticsResponse"
|
|
3593
|
-
|
|
3594
|
-
return [2 /*return*/, body_162];
|
|
3160
|
+
body_100 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
|
|
3161
|
+
"UsageSyntheticsResponse"]);
|
|
3162
|
+
return [2 /*return*/, body_100];
|
|
3595
3163
|
case 2:
|
|
3596
|
-
if (!(
|
|
3597
|
-
|
|
3598
|
-
|
|
3164
|
+
if (!(response.httpStatusCode == 400 ||
|
|
3165
|
+
response.httpStatusCode == 403 ||
|
|
3166
|
+
response.httpStatusCode == 429)) return [3 /*break*/, 4];
|
|
3167
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3599
3168
|
return [4 /*yield*/, response.body.text()];
|
|
3600
3169
|
case 3:
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
""
|
|
3604
|
-
|
|
3170
|
+
bodyText = _f.apply(_e, [_l.sent(), contentType]);
|
|
3171
|
+
try {
|
|
3172
|
+
body_101 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
3173
|
+
throw new exception_1.ApiException(response.httpStatusCode, body_101);
|
|
3174
|
+
}
|
|
3175
|
+
catch (error) {
|
|
3176
|
+
logger_1.logger.info("Got error deserializing error: ".concat(error));
|
|
3177
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
3178
|
+
}
|
|
3179
|
+
_l.label = 4;
|
|
3605
3180
|
case 4:
|
|
3606
|
-
if (!(
|
|
3607
|
-
|
|
3608
|
-
|
|
3181
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
|
|
3182
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3183
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3609
3184
|
return [4 /*yield*/, response.body.text()];
|
|
3610
3185
|
case 5:
|
|
3611
|
-
|
|
3612
|
-
"APIErrorResponse",
|
|
3613
|
-
""]);
|
|
3614
|
-
throw new exception_1.ApiException(403, body_164);
|
|
3615
|
-
case 6:
|
|
3616
|
-
if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3 /*break*/, 8];
|
|
3617
|
-
_p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3618
|
-
_r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3619
|
-
return [4 /*yield*/, response.body.text()];
|
|
3620
|
-
case 7:
|
|
3621
|
-
body_165 = _p.apply(_o, [_r.apply(_q, [_w.sent(), contentType]),
|
|
3622
|
-
"APIErrorResponse",
|
|
3623
|
-
""]);
|
|
3624
|
-
throw new exception_1.ApiException(429, body_165);
|
|
3625
|
-
case 8:
|
|
3626
|
-
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 10];
|
|
3627
|
-
_t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3628
|
-
_v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3629
|
-
return [4 /*yield*/, response.body.text()];
|
|
3630
|
-
case 9:
|
|
3631
|
-
body_166 = _t.apply(_s, [_v.apply(_u, [_w.sent(), contentType]),
|
|
3186
|
+
body_102 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
|
|
3632
3187
|
"UsageSyntheticsResponse",
|
|
3633
3188
|
""]);
|
|
3634
|
-
return [2 /*return*/,
|
|
3635
|
-
case
|
|
3636
|
-
case
|
|
3637
|
-
body = (
|
|
3189
|
+
return [2 /*return*/, body_102];
|
|
3190
|
+
case 6: return [4 /*yield*/, response.body.text()];
|
|
3191
|
+
case 7:
|
|
3192
|
+
body = (_l.sent()) || "";
|
|
3638
3193
|
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
3639
3194
|
}
|
|
3640
3195
|
});
|
|
@@ -3649,63 +3204,49 @@ var UsageMeteringApiResponseProcessor = /** @class */ (function () {
|
|
|
3649
3204
|
*/
|
|
3650
3205
|
UsageMeteringApiResponseProcessor.prototype.getUsageSyntheticsAPI = function (response) {
|
|
3651
3206
|
return __awaiter(this, void 0, void 0, function () {
|
|
3652
|
-
var contentType,
|
|
3653
|
-
return __generator(this, function (
|
|
3654
|
-
switch (
|
|
3207
|
+
var contentType, body_103, _a, _b, _c, _d, bodyText, _e, _f, body_104, body_105, _g, _h, _j, _k, body;
|
|
3208
|
+
return __generator(this, function (_l) {
|
|
3209
|
+
switch (_l.label) {
|
|
3655
3210
|
case 0:
|
|
3656
3211
|
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
3657
|
-
if (!(
|
|
3212
|
+
if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
|
|
3658
3213
|
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3659
3214
|
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3660
3215
|
return [4 /*yield*/, response.body.text()];
|
|
3661
3216
|
case 1:
|
|
3662
|
-
|
|
3663
|
-
"UsageSyntheticsAPIResponse"
|
|
3664
|
-
|
|
3665
|
-
return [2 /*return*/, body_167];
|
|
3217
|
+
body_103 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
|
|
3218
|
+
"UsageSyntheticsAPIResponse"]);
|
|
3219
|
+
return [2 /*return*/, body_103];
|
|
3666
3220
|
case 2:
|
|
3667
|
-
if (!(
|
|
3668
|
-
|
|
3669
|
-
|
|
3221
|
+
if (!(response.httpStatusCode == 400 ||
|
|
3222
|
+
response.httpStatusCode == 403 ||
|
|
3223
|
+
response.httpStatusCode == 429)) return [3 /*break*/, 4];
|
|
3224
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3670
3225
|
return [4 /*yield*/, response.body.text()];
|
|
3671
3226
|
case 3:
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
""
|
|
3675
|
-
|
|
3227
|
+
bodyText = _f.apply(_e, [_l.sent(), contentType]);
|
|
3228
|
+
try {
|
|
3229
|
+
body_104 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
3230
|
+
throw new exception_1.ApiException(response.httpStatusCode, body_104);
|
|
3231
|
+
}
|
|
3232
|
+
catch (error) {
|
|
3233
|
+
logger_1.logger.info("Got error deserializing error: ".concat(error));
|
|
3234
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
3235
|
+
}
|
|
3236
|
+
_l.label = 4;
|
|
3676
3237
|
case 4:
|
|
3677
|
-
if (!(
|
|
3678
|
-
|
|
3679
|
-
|
|
3238
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
|
|
3239
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3240
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3680
3241
|
return [4 /*yield*/, response.body.text()];
|
|
3681
3242
|
case 5:
|
|
3682
|
-
|
|
3683
|
-
"APIErrorResponse",
|
|
3684
|
-
""]);
|
|
3685
|
-
throw new exception_1.ApiException(403, body_169);
|
|
3686
|
-
case 6:
|
|
3687
|
-
if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3 /*break*/, 8];
|
|
3688
|
-
_p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3689
|
-
_r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3690
|
-
return [4 /*yield*/, response.body.text()];
|
|
3691
|
-
case 7:
|
|
3692
|
-
body_170 = _p.apply(_o, [_r.apply(_q, [_w.sent(), contentType]),
|
|
3693
|
-
"APIErrorResponse",
|
|
3694
|
-
""]);
|
|
3695
|
-
throw new exception_1.ApiException(429, body_170);
|
|
3696
|
-
case 8:
|
|
3697
|
-
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 10];
|
|
3698
|
-
_t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3699
|
-
_v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3700
|
-
return [4 /*yield*/, response.body.text()];
|
|
3701
|
-
case 9:
|
|
3702
|
-
body_171 = _t.apply(_s, [_v.apply(_u, [_w.sent(), contentType]),
|
|
3243
|
+
body_105 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
|
|
3703
3244
|
"UsageSyntheticsAPIResponse",
|
|
3704
3245
|
""]);
|
|
3705
|
-
return [2 /*return*/,
|
|
3706
|
-
case
|
|
3707
|
-
case
|
|
3708
|
-
body = (
|
|
3246
|
+
return [2 /*return*/, body_105];
|
|
3247
|
+
case 6: return [4 /*yield*/, response.body.text()];
|
|
3248
|
+
case 7:
|
|
3249
|
+
body = (_l.sent()) || "";
|
|
3709
3250
|
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
3710
3251
|
}
|
|
3711
3252
|
});
|
|
@@ -3720,63 +3261,49 @@ var UsageMeteringApiResponseProcessor = /** @class */ (function () {
|
|
|
3720
3261
|
*/
|
|
3721
3262
|
UsageMeteringApiResponseProcessor.prototype.getUsageSyntheticsBrowser = function (response) {
|
|
3722
3263
|
return __awaiter(this, void 0, void 0, function () {
|
|
3723
|
-
var contentType,
|
|
3724
|
-
return __generator(this, function (
|
|
3725
|
-
switch (
|
|
3264
|
+
var contentType, body_106, _a, _b, _c, _d, bodyText, _e, _f, body_107, body_108, _g, _h, _j, _k, body;
|
|
3265
|
+
return __generator(this, function (_l) {
|
|
3266
|
+
switch (_l.label) {
|
|
3726
3267
|
case 0:
|
|
3727
3268
|
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
3728
|
-
if (!(
|
|
3269
|
+
if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
|
|
3729
3270
|
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3730
3271
|
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3731
3272
|
return [4 /*yield*/, response.body.text()];
|
|
3732
3273
|
case 1:
|
|
3733
|
-
|
|
3734
|
-
"UsageSyntheticsBrowserResponse"
|
|
3735
|
-
|
|
3736
|
-
return [2 /*return*/, body_172];
|
|
3274
|
+
body_106 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
|
|
3275
|
+
"UsageSyntheticsBrowserResponse"]);
|
|
3276
|
+
return [2 /*return*/, body_106];
|
|
3737
3277
|
case 2:
|
|
3738
|
-
if (!(
|
|
3739
|
-
|
|
3740
|
-
|
|
3278
|
+
if (!(response.httpStatusCode == 400 ||
|
|
3279
|
+
response.httpStatusCode == 403 ||
|
|
3280
|
+
response.httpStatusCode == 429)) return [3 /*break*/, 4];
|
|
3281
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3741
3282
|
return [4 /*yield*/, response.body.text()];
|
|
3742
3283
|
case 3:
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
""
|
|
3746
|
-
|
|
3284
|
+
bodyText = _f.apply(_e, [_l.sent(), contentType]);
|
|
3285
|
+
try {
|
|
3286
|
+
body_107 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
3287
|
+
throw new exception_1.ApiException(response.httpStatusCode, body_107);
|
|
3288
|
+
}
|
|
3289
|
+
catch (error) {
|
|
3290
|
+
logger_1.logger.info("Got error deserializing error: ".concat(error));
|
|
3291
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
3292
|
+
}
|
|
3293
|
+
_l.label = 4;
|
|
3747
3294
|
case 4:
|
|
3748
|
-
if (!(
|
|
3749
|
-
|
|
3750
|
-
|
|
3295
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
|
|
3296
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3297
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3751
3298
|
return [4 /*yield*/, response.body.text()];
|
|
3752
3299
|
case 5:
|
|
3753
|
-
|
|
3754
|
-
"APIErrorResponse",
|
|
3755
|
-
""]);
|
|
3756
|
-
throw new exception_1.ApiException(403, body_174);
|
|
3757
|
-
case 6:
|
|
3758
|
-
if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3 /*break*/, 8];
|
|
3759
|
-
_p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3760
|
-
_r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3761
|
-
return [4 /*yield*/, response.body.text()];
|
|
3762
|
-
case 7:
|
|
3763
|
-
body_175 = _p.apply(_o, [_r.apply(_q, [_w.sent(), contentType]),
|
|
3764
|
-
"APIErrorResponse",
|
|
3765
|
-
""]);
|
|
3766
|
-
throw new exception_1.ApiException(429, body_175);
|
|
3767
|
-
case 8:
|
|
3768
|
-
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 10];
|
|
3769
|
-
_t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3770
|
-
_v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3771
|
-
return [4 /*yield*/, response.body.text()];
|
|
3772
|
-
case 9:
|
|
3773
|
-
body_176 = _t.apply(_s, [_v.apply(_u, [_w.sent(), contentType]),
|
|
3300
|
+
body_108 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
|
|
3774
3301
|
"UsageSyntheticsBrowserResponse",
|
|
3775
3302
|
""]);
|
|
3776
|
-
return [2 /*return*/,
|
|
3777
|
-
case
|
|
3778
|
-
case
|
|
3779
|
-
body = (
|
|
3303
|
+
return [2 /*return*/, body_108];
|
|
3304
|
+
case 6: return [4 /*yield*/, response.body.text()];
|
|
3305
|
+
case 7:
|
|
3306
|
+
body = (_l.sent()) || "";
|
|
3780
3307
|
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
3781
3308
|
}
|
|
3782
3309
|
});
|
|
@@ -3791,63 +3318,49 @@ var UsageMeteringApiResponseProcessor = /** @class */ (function () {
|
|
|
3791
3318
|
*/
|
|
3792
3319
|
UsageMeteringApiResponseProcessor.prototype.getUsageTimeseries = function (response) {
|
|
3793
3320
|
return __awaiter(this, void 0, void 0, function () {
|
|
3794
|
-
var contentType,
|
|
3795
|
-
return __generator(this, function (
|
|
3796
|
-
switch (
|
|
3321
|
+
var contentType, body_109, _a, _b, _c, _d, bodyText, _e, _f, body_110, body_111, _g, _h, _j, _k, body;
|
|
3322
|
+
return __generator(this, function (_l) {
|
|
3323
|
+
switch (_l.label) {
|
|
3797
3324
|
case 0:
|
|
3798
3325
|
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
3799
|
-
if (!(
|
|
3326
|
+
if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
|
|
3800
3327
|
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3801
3328
|
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3802
3329
|
return [4 /*yield*/, response.body.text()];
|
|
3803
3330
|
case 1:
|
|
3804
|
-
|
|
3805
|
-
"UsageTimeseriesResponse"
|
|
3806
|
-
|
|
3807
|
-
return [2 /*return*/, body_177];
|
|
3331
|
+
body_109 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
|
|
3332
|
+
"UsageTimeseriesResponse"]);
|
|
3333
|
+
return [2 /*return*/, body_109];
|
|
3808
3334
|
case 2:
|
|
3809
|
-
if (!(
|
|
3810
|
-
|
|
3811
|
-
|
|
3335
|
+
if (!(response.httpStatusCode == 400 ||
|
|
3336
|
+
response.httpStatusCode == 403 ||
|
|
3337
|
+
response.httpStatusCode == 429)) return [3 /*break*/, 4];
|
|
3338
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3812
3339
|
return [4 /*yield*/, response.body.text()];
|
|
3813
3340
|
case 3:
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
""
|
|
3817
|
-
|
|
3341
|
+
bodyText = _f.apply(_e, [_l.sent(), contentType]);
|
|
3342
|
+
try {
|
|
3343
|
+
body_110 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
3344
|
+
throw new exception_1.ApiException(response.httpStatusCode, body_110);
|
|
3345
|
+
}
|
|
3346
|
+
catch (error) {
|
|
3347
|
+
logger_1.logger.info("Got error deserializing error: ".concat(error));
|
|
3348
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
3349
|
+
}
|
|
3350
|
+
_l.label = 4;
|
|
3818
3351
|
case 4:
|
|
3819
|
-
if (!(
|
|
3820
|
-
|
|
3821
|
-
|
|
3352
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
|
|
3353
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3354
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3822
3355
|
return [4 /*yield*/, response.body.text()];
|
|
3823
3356
|
case 5:
|
|
3824
|
-
|
|
3825
|
-
"APIErrorResponse",
|
|
3826
|
-
""]);
|
|
3827
|
-
throw new exception_1.ApiException(403, body_179);
|
|
3828
|
-
case 6:
|
|
3829
|
-
if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3 /*break*/, 8];
|
|
3830
|
-
_p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3831
|
-
_r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3832
|
-
return [4 /*yield*/, response.body.text()];
|
|
3833
|
-
case 7:
|
|
3834
|
-
body_180 = _p.apply(_o, [_r.apply(_q, [_w.sent(), contentType]),
|
|
3835
|
-
"APIErrorResponse",
|
|
3836
|
-
""]);
|
|
3837
|
-
throw new exception_1.ApiException(429, body_180);
|
|
3838
|
-
case 8:
|
|
3839
|
-
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 10];
|
|
3840
|
-
_t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3841
|
-
_v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3842
|
-
return [4 /*yield*/, response.body.text()];
|
|
3843
|
-
case 9:
|
|
3844
|
-
body_181 = _t.apply(_s, [_v.apply(_u, [_w.sent(), contentType]),
|
|
3357
|
+
body_111 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
|
|
3845
3358
|
"UsageTimeseriesResponse",
|
|
3846
3359
|
""]);
|
|
3847
|
-
return [2 /*return*/,
|
|
3848
|
-
case
|
|
3849
|
-
case
|
|
3850
|
-
body = (
|
|
3360
|
+
return [2 /*return*/, body_111];
|
|
3361
|
+
case 6: return [4 /*yield*/, response.body.text()];
|
|
3362
|
+
case 7:
|
|
3363
|
+
body = (_l.sent()) || "";
|
|
3851
3364
|
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
3852
3365
|
}
|
|
3853
3366
|
});
|
|
@@ -3862,63 +3375,49 @@ var UsageMeteringApiResponseProcessor = /** @class */ (function () {
|
|
|
3862
3375
|
*/
|
|
3863
3376
|
UsageMeteringApiResponseProcessor.prototype.getUsageTopAvgMetrics = function (response) {
|
|
3864
3377
|
return __awaiter(this, void 0, void 0, function () {
|
|
3865
|
-
var contentType,
|
|
3866
|
-
return __generator(this, function (
|
|
3867
|
-
switch (
|
|
3378
|
+
var contentType, body_112, _a, _b, _c, _d, bodyText, _e, _f, body_113, body_114, _g, _h, _j, _k, body;
|
|
3379
|
+
return __generator(this, function (_l) {
|
|
3380
|
+
switch (_l.label) {
|
|
3868
3381
|
case 0:
|
|
3869
3382
|
contentType = ObjectSerializer_1.ObjectSerializer.normalizeMediaType(response.headers["content-type"]);
|
|
3870
|
-
if (!(
|
|
3383
|
+
if (!(response.httpStatusCode == 200)) return [3 /*break*/, 2];
|
|
3871
3384
|
_b = (_a = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3872
3385
|
_d = (_c = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3873
3386
|
return [4 /*yield*/, response.body.text()];
|
|
3874
3387
|
case 1:
|
|
3875
|
-
|
|
3876
|
-
"UsageTopAvgMetricsResponse"
|
|
3877
|
-
|
|
3878
|
-
return [2 /*return*/, body_182];
|
|
3388
|
+
body_112 = _b.apply(_a, [_d.apply(_c, [_l.sent(), contentType]),
|
|
3389
|
+
"UsageTopAvgMetricsResponse"]);
|
|
3390
|
+
return [2 /*return*/, body_112];
|
|
3879
3391
|
case 2:
|
|
3880
|
-
if (!(
|
|
3881
|
-
|
|
3882
|
-
|
|
3392
|
+
if (!(response.httpStatusCode == 400 ||
|
|
3393
|
+
response.httpStatusCode == 403 ||
|
|
3394
|
+
response.httpStatusCode == 429)) return [3 /*break*/, 4];
|
|
3395
|
+
_f = (_e = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3883
3396
|
return [4 /*yield*/, response.body.text()];
|
|
3884
3397
|
case 3:
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
""
|
|
3888
|
-
|
|
3398
|
+
bodyText = _f.apply(_e, [_l.sent(), contentType]);
|
|
3399
|
+
try {
|
|
3400
|
+
body_113 = ObjectSerializer_1.ObjectSerializer.deserialize(bodyText, "APIErrorResponse");
|
|
3401
|
+
throw new exception_1.ApiException(response.httpStatusCode, body_113);
|
|
3402
|
+
}
|
|
3403
|
+
catch (error) {
|
|
3404
|
+
logger_1.logger.info("Got error deserializing error: ".concat(error));
|
|
3405
|
+
throw new exception_1.ApiException(response.httpStatusCode, bodyText);
|
|
3406
|
+
}
|
|
3407
|
+
_l.label = 4;
|
|
3889
3408
|
case 4:
|
|
3890
|
-
if (!(
|
|
3891
|
-
|
|
3892
|
-
|
|
3409
|
+
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 6];
|
|
3410
|
+
_h = (_g = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3411
|
+
_k = (_j = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3893
3412
|
return [4 /*yield*/, response.body.text()];
|
|
3894
3413
|
case 5:
|
|
3895
|
-
|
|
3896
|
-
"APIErrorResponse",
|
|
3897
|
-
""]);
|
|
3898
|
-
throw new exception_1.ApiException(403, body_184);
|
|
3899
|
-
case 6:
|
|
3900
|
-
if (!(0, util_1.isCodeInRange)("429", response.httpStatusCode)) return [3 /*break*/, 8];
|
|
3901
|
-
_p = (_o = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3902
|
-
_r = (_q = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3903
|
-
return [4 /*yield*/, response.body.text()];
|
|
3904
|
-
case 7:
|
|
3905
|
-
body_185 = _p.apply(_o, [_r.apply(_q, [_w.sent(), contentType]),
|
|
3906
|
-
"APIErrorResponse",
|
|
3907
|
-
""]);
|
|
3908
|
-
throw new exception_1.ApiException(429, body_185);
|
|
3909
|
-
case 8:
|
|
3910
|
-
if (!(response.httpStatusCode >= 200 && response.httpStatusCode <= 299)) return [3 /*break*/, 10];
|
|
3911
|
-
_t = (_s = ObjectSerializer_1.ObjectSerializer).deserialize;
|
|
3912
|
-
_v = (_u = ObjectSerializer_1.ObjectSerializer).parse;
|
|
3913
|
-
return [4 /*yield*/, response.body.text()];
|
|
3914
|
-
case 9:
|
|
3915
|
-
body_186 = _t.apply(_s, [_v.apply(_u, [_w.sent(), contentType]),
|
|
3414
|
+
body_114 = _h.apply(_g, [_k.apply(_j, [_l.sent(), contentType]),
|
|
3916
3415
|
"UsageTopAvgMetricsResponse",
|
|
3917
3416
|
""]);
|
|
3918
|
-
return [2 /*return*/,
|
|
3919
|
-
case
|
|
3920
|
-
case
|
|
3921
|
-
body = (
|
|
3417
|
+
return [2 /*return*/, body_114];
|
|
3418
|
+
case 6: return [4 /*yield*/, response.body.text()];
|
|
3419
|
+
case 7:
|
|
3420
|
+
body = (_l.sent()) || "";
|
|
3922
3421
|
throw new exception_1.ApiException(response.httpStatusCode, 'Unknown API Status Code!\nBody: "' + body + '"');
|
|
3923
3422
|
}
|
|
3924
3423
|
});
|