From bd93a36ca891822679efd8a69aa4260f2ce56b46 Mon Sep 17 00:00:00 2001 From: samvaity Date: Sun, 5 Mar 2023 20:48:02 -0800 Subject: [PATCH 1/5] generate with swagger on public github --- .../MetricsAdvisorAsyncClient.java | 14 +- .../MetricsAdvisorClientBuilder.java | 12 +- ...tricsAdvisorAdministrationAsyncClient.java | 62 +- .../MetricsAdvisorAdministrationClient.java | 2 +- ...icsAdvisorAdministrationClientBuilder.java | 15 +- .../models/DataFeedIngestionProgress.java | 30 +- .../models/DataFeedIngestionStatus.java | 38 +- ...icsAdvisorRestAPIOpenAPIV2ImplBuilder.java | 215 -- ...APIV2Impl.java => MetricsAdvisorImpl.java} | 2668 +++++++++++------ .../MetricsAdvisorImplBuilder.java | 250 ++ .../implementation/models/AlertResult.java | 73 - .../models/AlertResultList.java | 3 + .../models/AlertingResultQuery.java | 10 +- .../models/AnomalyAlertingConfiguration.java | 6 +- .../AnomalyAlertingConfigurationList.java | 3 + ...AnomalyAlertingConfigurationLogicType.java | 20 +- .../AnomalyAlertingConfigurationPatch.java | 3 + .../models/AnomalyDetectionConfiguration.java | 3 + .../AnomalyDetectionConfigurationList.java | 3 + ...nomalyDetectionConfigurationLogicType.java | 20 +- .../AnomalyDetectionConfigurationPatch.java | 3 + .../models/AnomalyDetectorDirection.java | 49 + .../models/AnomalyDimensionList.java | 3 + .../models/AnomalyDimensionQuery.java | 3 + .../models/AnomalyFeedback.java | 20 +- .../models/AnomalyFeedbackValue.java | 3 + .../models/AnomalyProperty.java | 10 +- .../implementation/models/AnomalyResult.java | 3 + .../models/AnomalyResultList.java | 3 + .../implementation/models/AnomalyScope.java | 16 +- .../models/AuthenticationTypeEnum.java | 16 +- .../AzureApplicationInsightsDataFeed.java | 173 ++ ...AzureApplicationInsightsDataFeedPatch.java | 152 + .../AzureApplicationInsightsParameter.java | 3 + ...zureApplicationInsightsParameterPatch.java | 3 + .../models/AzureBlobDataFeed.java | 173 ++ .../models/AzureBlobDataFeedPatch.java | 152 + .../models/AzureBlobParameter.java | 3 + .../models/AzureBlobParameterPatch.java | 3 + .../models/AzureCosmosDBDataFeed.java | 173 ++ .../models/AzureCosmosDBDataFeedPatch.java | 152 + .../models/AzureCosmosDBParameter.java | 3 + .../models/AzureCosmosDBParameterPatch.java | 3 + .../models/AzureDataExplorerDataFeed.java | 173 ++ .../AzureDataExplorerDataFeedPatch.java | 152 + .../AzureDataLakeStorageGen2DataFeed.java | 173 ++ ...AzureDataLakeStorageGen2DataFeedPatch.java | 152 + .../AzureDataLakeStorageGen2Parameter.java | 3 + ...zureDataLakeStorageGen2ParameterPatch.java | 3 + .../models/AzureEventHubsDataFeed.java | 173 ++ .../models/AzureEventHubsDataFeedPatch.java | 152 + .../models/AzureEventHubsParameter.java | 3 + .../models/AzureEventHubsParameterPatch.java | 3 + .../models/AzureLogAnalyticsDataFeed.java | 173 ++ .../AzureLogAnalyticsDataFeedPatch.java | 152 + .../models/AzureLogAnalyticsParameter.java | 15 +- .../AzureLogAnalyticsParameterPatch.java | 15 +- .../AzureSQLConnectionStringCredential.java | 18 + ...ureSQLConnectionStringCredentialPatch.java | 18 + .../models/AzureSQLConnectionStringParam.java | 3 + .../AzureSQLConnectionStringParamPatch.java | 3 + .../models/AzureTableDataFeed.java | 173 ++ .../models/AzureTableDataFeedPatch.java | 152 + .../models/AzureTableParameter.java | 6 +- .../models/AzureTableParameterPatch.java | 6 +- .../models/ChangePointFeedback.java | 21 +- .../models/ChangePointFeedbackValue.java | 3 + .../models/ChangeThresholdCondition.java | 11 +- .../models/ChangeThresholdConditionPatch.java | 11 +- .../models/CommentFeedback.java | 21 +- .../models/CommentFeedbackValue.java | 3 + ...teAnomalyAlertingConfigurationHeaders.java | 12 + ...eAnomalyDetectionConfigurationHeaders.java | 12 + .../models/CreateCredentialHeaders.java | 12 + .../models/CreateDataFeedHeaders.java | 12 + .../models/CreateHookHeaders.java | 12 + .../models/CreateMetricFeedbackHeaders.java | 12 + .../implementation/models/DataFeedDetail.java | 16 +- .../models/DataFeedDetailPatch.java | 16 +- .../DataFeedDetailPatchDataSourceType.java | 69 - ...aFeedDetailPatchFillMissingPointForAd.java | 41 - .../models/DataFeedDetailPatchNeedRollup.java | 37 - .../DataFeedDetailPatchRollUpMethod.java | 46 - .../models/DataFeedDetailPatchStatus.java | 34 - .../models/DataFeedDetailPatchViewMode.java | 34 - .../models/DataFeedDetailRollUpMethod.java | 46 - .../models/DataFeedDimension.java | 23 +- .../models/DataFeedIngestionProgress.java | 51 + .../models/DataFeedIngestionStatus.java | 62 + .../implementation/models/DataFeedList.java | 3 + .../implementation/models/DataFeedMetric.java | 67 +- .../DataLakeGen2SharedKeyCredential.java | 17 + .../DataLakeGen2SharedKeyCredentialPatch.java | 18 + .../models/DataLakeGen2SharedKeyParam.java | 3 + .../DataLakeGen2SharedKeyParamPatch.java | 3 + .../models/DataSourceCredential.java | 3 + .../models/DataSourceCredentialList.java | 3 + .../models/DataSourceCredentialPatch.java | 3 + .../models/DataSourceCredentialType.java | 16 +- .../implementation/models/DataSourceType.java | 16 +- .../DetectionAnomalyFilterCondition.java | 3 + .../models/DetectionAnomalyResultQuery.java | 3 + .../DetectionIncidentFilterCondition.java | 3 + .../models/DetectionIncidentResultQuery.java | 3 + .../models/DetectionSeriesQuery.java | 14 +- .../models/DimensionGroupConfiguration.java | 3 + .../models/DimensionGroupIdentity.java | 3 + .../implementation/models/Direction.java | 16 +- .../implementation/models/EmailHookInfo.java | 32 + .../models/EmailHookInfoPatch.java | 32 + .../models/EmailHookParameter.java | 3 + .../models/EmailHookParameterPatch.java | 3 + .../models/EnrichmentStatusList.java | 3 + .../models/EnrichmentStatusQueryOption.java | 3 + .../implementation/models/EntityStatus.java | 16 +- .../models/FeedbackDimensionFilter.java | 3 + .../models/FeedbackQueryTimeMode.java | 34 - .../models/FillMissingPointType.java | 16 +- .../implementation/models/Granularity.java | 16 +- .../models/HardThresholdCondition.java | 4 +- .../models/HardThresholdConditionPatch.java | 4 +- .../implementation/models/HookInfo.java | 3 + .../implementation/models/HookInfoPatch.java | 3 + .../models/HookInfoPatchHookType.java | 34 - .../implementation/models/HookList.java | 3 + .../implementation/models/HookType.java | 16 +- .../models/IncidentProperty.java | 15 +- .../implementation/models/IncidentResult.java | 3 + .../models/IncidentResultList.java | 3 + .../implementation/models/IncidentStatus.java | 50 + .../models/InfluxDBDataFeed.java | 173 ++ .../models/InfluxDBDataFeedPatch.java | 152 + .../models/InfluxDBParameter.java | 3 + .../models/InfluxDBParameterPatch.java | 3 + .../models/IngestionProgressResetOptions.java | 3 + .../models/IngestionStatusList.java | 4 +- .../models/IngestionStatusQueryOptions.java | 3 + .../models/IngestionStatusType.java | 64 + .../models/MetricAlertingConfiguration.java | 3 + .../MetricAnomalyAlertSnoozeCondition.java | 5 +- .../implementation/models/MetricDataList.java | 3 + .../models/MetricDataQueryOptions.java | 13 +- .../models/MetricDimensionList.java | 3 + .../models/MetricDimensionQueryOptions.java | 3 + .../implementation/models/MetricFeedback.java | 3 + .../models/MetricFeedbackFilter.java | 4 + .../models/MetricFeedbackList.java | 3 + .../models/MetricSeriesData.java | 3 + .../models/MetricSeriesDefinition.java | 44 - .../models/MetricSeriesItem.java | 3 + .../models/MetricSeriesList.java | 3 + .../models/MetricSeriesQueryOptions.java | 6 +- .../models/MongoDBDataFeed.java | 173 ++ .../models/MongoDBDataFeedPatch.java | 152 + .../models/MongoDBParameter.java | 3 + .../models/MongoDBParameterPatch.java | 3 + .../implementation/models/MySqlDataFeed.java | 173 ++ .../models/MySqlDataFeedPatch.java | 152 + .../implementation/models/NeedRollupEnum.java | 16 +- .../implementation/models/PeriodFeedback.java | 18 + .../models/PeriodFeedbackValue.java | 3 + .../models/PostgreSqlDataFeed.java | 173 ++ .../models/PostgreSqlDataFeedPatch.java | 152 + .../implementation/models/RollUpMethod.java | 16 +- .../implementation/models/RootCause.java | 3 + .../implementation/models/RootCauseList.java | 3 + .../models/SQLServerDataFeed.java | 173 ++ .../models/SQLServerDataFeedPatch.java | 152 + .../models/SQLSourceParameterPatch.java | 3 + .../models/SeriesConfiguration.java | 3 + .../implementation/models/SeriesIdentity.java | 3 + .../implementation/models/SeriesResult.java | 3 + .../models/SeriesResultList.java | 3 + .../models/ServicePrincipalCredential.java | 17 + .../ServicePrincipalCredentialPatch.java | 17 + .../ServicePrincipalInKVCredential.java | 17 + .../ServicePrincipalInKVCredentialPatch.java | 18 + .../models/ServicePrincipalInKVParam.java | 6 +- .../ServicePrincipalInKVParamPatch.java | 6 +- .../models/ServicePrincipalParam.java | 3 + .../models/ServicePrincipalParamPatch.java | 3 + .../implementation/models/Severity.java | 49 + .../models/SeverityCondition.java | 16 +- .../models/SeverityFilterCondition.java | 16 +- .../models/SmartDetectionCondition.java | 4 +- .../models/SmartDetectionConditionPatch.java | 4 +- .../implementation/models/SnoozeScope.java | 35 + .../models/SqlSourceParameter.java | 3 + .../models/SuppressCondition.java | 3 + .../models/SuppressConditionPatch.java | 3 + .../implementation/models/TimeMode.java | 49 + .../implementation/models/TopNGroupScope.java | 3 + .../implementation/models/UsageStats.java | 3 + .../implementation/models/ValueCondition.java | 6 +- .../implementation/models/ValueType.java | 16 +- .../implementation/models/ViewMode.java | 16 +- .../models/WebhookHookInfo.java | 32 + .../models/WebhookHookInfoPatch.java | 32 + .../models/WebhookHookParameter.java | 12 +- .../models/WebhookHookParameterPatch.java | 6 +- .../models/WholeMetricConfiguration.java | 3 + .../models/WholeMetricConfigurationPatch.java | 3 + .../implementation/models/package-info.java | 5 +- .../implementation/package-info.java | 5 +- .../util/AlertConfigurationTransforms.java | 71 +- .../util/AnomalyTransforms.java | 11 +- .../util/DataFeedIngestionProgressHelper.java | 43 + .../util/DataFeedIngestionStatusHelper.java | 49 + .../util/DataFeedTransforms.java | 22 +- .../DetectionConfigurationTransforms.java | 35 +- .../util/IncidentTransforms.java | 8 +- .../util/MetricFeedbackTransforms.java | 2 +- .../implementation/util/Utility.java | 9 + .../metricsadvisor/models/AnomalyAlert.java | 3 + .../metricsadvisor/models/AnomalyStatus.java | 20 +- .../metricsadvisor/models/AnomalyValue.java | 14 +- .../models/ChangePointValue.java | 14 +- .../models/EnrichmentStatus.java | 3 + .../models/FeedbackQueryTimeMode.java | 16 +- .../metricsadvisor/models/FeedbackType.java | 16 +- .../ai/metricsadvisor/models/PeriodType.java | 16 +- .../metricsadvisor/models/package-info.java | 5 +- .../src/main/java/module-info.java | 1 + ...trationAsyncClientJavaDocCodeSnippets.java | 2 +- .../DataFeedIngestionOperationAsyncTest.java | 2 +- .../DataFeedIngestionOperationTest.java | 2 +- .../DataFeedIngestionOperationTestBase.java | 2 +- .../azure-ai-metricsadvisor/swagger/README.md | 34 +- 228 files changed, 8232 insertions(+), 1872 deletions(-) delete mode 100644 sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2ImplBuilder.java rename sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/{AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2Impl.java => MetricsAdvisorImpl.java} (77%) create mode 100644 sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/MetricsAdvisorImplBuilder.java delete mode 100644 sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AlertResult.java create mode 100644 sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyDetectorDirection.java delete mode 100644 sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDetailPatchDataSourceType.java delete mode 100644 sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDetailPatchFillMissingPointForAd.java delete mode 100644 sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDetailPatchNeedRollup.java delete mode 100644 sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDetailPatchRollUpMethod.java delete mode 100644 sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDetailPatchStatus.java delete mode 100644 sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDetailPatchViewMode.java delete mode 100644 sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDetailRollUpMethod.java create mode 100644 sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedIngestionProgress.java create mode 100644 sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedIngestionStatus.java delete mode 100644 sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/FeedbackQueryTimeMode.java delete mode 100644 sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/HookInfoPatchHookType.java create mode 100644 sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IncidentStatus.java create mode 100644 sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IngestionStatusType.java delete mode 100644 sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricSeriesDefinition.java create mode 100644 sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/Severity.java create mode 100644 sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SnoozeScope.java create mode 100644 sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/TimeMode.java create mode 100644 sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/util/DataFeedIngestionProgressHelper.java create mode 100644 sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/util/DataFeedIngestionStatusHelper.java diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/MetricsAdvisorAsyncClient.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/MetricsAdvisorAsyncClient.java index 3e84673233a22..2c7830fc30096 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/MetricsAdvisorAsyncClient.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/MetricsAdvisorAsyncClient.java @@ -3,7 +3,7 @@ package com.azure.ai.metricsadvisor; -import com.azure.ai.metricsadvisor.implementation.AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2Impl; +import com.azure.ai.metricsadvisor.implementation.MetricsAdvisorImpl; import com.azure.ai.metricsadvisor.implementation.models.AlertingResultQuery; import com.azure.ai.metricsadvisor.implementation.models.AnomalyDimensionQuery; import com.azure.ai.metricsadvisor.implementation.models.AnomalyFeedback; @@ -27,6 +27,7 @@ import com.azure.ai.metricsadvisor.implementation.models.PeriodFeedback; import com.azure.ai.metricsadvisor.implementation.models.PeriodFeedbackValue; import com.azure.ai.metricsadvisor.implementation.models.SeriesIdentity; +import com.azure.ai.metricsadvisor.implementation.models.TimeMode; import com.azure.ai.metricsadvisor.implementation.util.AnomalyTransforms; import com.azure.ai.metricsadvisor.implementation.util.DetectionConfigurationTransforms; import com.azure.ai.metricsadvisor.implementation.util.IncidentHelper; @@ -41,7 +42,6 @@ import com.azure.ai.metricsadvisor.models.DataPointAnomaly; import com.azure.ai.metricsadvisor.models.DimensionKey; import com.azure.ai.metricsadvisor.models.EnrichmentStatus; -import com.azure.ai.metricsadvisor.models.MetricsAdvisorResponseException; import com.azure.ai.metricsadvisor.models.IncidentRootCause; import com.azure.ai.metricsadvisor.models.ListAlertOptions; import com.azure.ai.metricsadvisor.models.ListAnomaliesAlertedOptions; @@ -61,6 +61,7 @@ import com.azure.ai.metricsadvisor.models.MetricPeriodFeedback; import com.azure.ai.metricsadvisor.models.MetricSeriesData; import com.azure.ai.metricsadvisor.models.MetricSeriesDefinition; +import com.azure.ai.metricsadvisor.models.MetricsAdvisorResponseException; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceClient; import com.azure.core.annotation.ServiceMethod; @@ -85,6 +86,7 @@ import java.util.stream.Collectors; import static com.azure.ai.metricsadvisor.implementation.util.Utility.parseOperationId; +import static com.azure.ai.metricsadvisor.implementation.util.Utility.toStringOrNull; import static com.azure.core.util.FluxUtil.monoError; import static com.azure.core.util.FluxUtil.withContext; @@ -107,7 +109,7 @@ @ServiceClient(builder = MetricsAdvisorClientBuilder.class, isAsync = true) public final class MetricsAdvisorAsyncClient { final ClientLogger logger = new ClientLogger(MetricsAdvisorAsyncClient.class); - private final AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2Impl service; + private final MetricsAdvisorImpl service; /** * Create a {@link MetricsAdvisorAsyncClient} that sends requests to the Metrics Advisor @@ -117,7 +119,7 @@ public final class MetricsAdvisorAsyncClient { * @param service The proxy service used to perform REST calls. * @param serviceVersion The versions of Azure Metrics Advisor supported by this client library. */ - MetricsAdvisorAsyncClient(AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2Impl service, + MetricsAdvisorAsyncClient(MetricsAdvisorImpl service, MetricsAdvisorServiceVersion serviceVersion) { this.service = service; } @@ -1484,7 +1486,7 @@ private Mono> listAlertsSinglePageAsync( AlertingResultQuery query = new AlertingResultQuery(); query.setStartTime(startTime); query.setEndTime(endTime); - query.setTimeMode(options.getTimeMode()); + query.setTimeMode(TimeMode.fromString(toStringOrNull(options.getTimeMode()))); return service.getAlertsByAnomalyAlertingConfigurationSinglePageAsync( UUID.fromString(alertConfigurationId), @@ -1508,7 +1510,7 @@ private Mono> listAlertsNextPageAsync( AlertingResultQuery query = new AlertingResultQuery(); query.setStartTime(startTime); query.setEndTime(endTime); - query.setTimeMode(options.getTimeMode()); + query.setTimeMode(TimeMode.fromString(toStringOrNull(options.getTimeMode()))); return service.getAlertsByAnomalyAlertingConfigurationNextSinglePageAsync(nextPageLink, query, diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/MetricsAdvisorClientBuilder.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/MetricsAdvisorClientBuilder.java index a4b5bc94e7085..a43a49801267d 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/MetricsAdvisorClientBuilder.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/MetricsAdvisorClientBuilder.java @@ -3,8 +3,8 @@ package com.azure.ai.metricsadvisor; -import com.azure.ai.metricsadvisor.implementation.AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2Impl; -import com.azure.ai.metricsadvisor.implementation.AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2ImplBuilder; +import com.azure.ai.metricsadvisor.implementation.MetricsAdvisorImpl; +import com.azure.ai.metricsadvisor.implementation.MetricsAdvisorImplBuilder; import com.azure.ai.metricsadvisor.models.MetricsAdvisorKeyCredential; import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.client.traits.ConfigurationTrait; @@ -32,8 +32,8 @@ import com.azure.core.util.ClientOptions; import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; -import com.azure.core.util.TracingOptions; import com.azure.core.util.HttpClientOptions; +import com.azure.core.util.TracingOptions; import com.azure.core.util.builder.ClientBuilderUtil; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.tracing.Tracer; @@ -220,8 +220,8 @@ public MetricsAdvisorAsyncClient buildAsyncClient() { if (pipeline == null) { pipeline = getDefaultHttpPipeline(buildConfiguration); } - final AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2Impl advisorRestAPIOpenAPIV2 = - new AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2ImplBuilder() + final MetricsAdvisorImpl advisorRestAPIOpenAPIV2 = + new MetricsAdvisorImplBuilder() .endpoint(endpoint) .pipeline(pipeline) .buildClient(); @@ -267,7 +267,7 @@ private HttpPipeline getDefaultHttpPipeline(Configuration buildConfiguration) { if (clientOptions != null) { tracingOptions = clientOptions.getTracingOptions(); } - + Tracer tracer = TracerProvider.getDefaultProvider() .createTracer(clientName, clientVersion, METRICS_ADVISOR_TRACING_NAMESPACE_VALUE, tracingOptions); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/administration/MetricsAdvisorAdministrationAsyncClient.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/administration/MetricsAdvisorAdministrationAsyncClient.java index 5bbe935655120..571188a2d43f3 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/administration/MetricsAdvisorAdministrationAsyncClient.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/administration/MetricsAdvisorAdministrationAsyncClient.java @@ -17,6 +17,7 @@ import com.azure.ai.metricsadvisor.administration.models.DataFeedRollupSettings; import com.azure.ai.metricsadvisor.administration.models.DataFeedSchema; import com.azure.ai.metricsadvisor.administration.models.DataSourceCredentialEntity; +import com.azure.ai.metricsadvisor.administration.models.IngestionStatusType; import com.azure.ai.metricsadvisor.administration.models.ListAnomalyAlertConfigsOptions; import com.azure.ai.metricsadvisor.administration.models.ListCredentialEntityOptions; import com.azure.ai.metricsadvisor.administration.models.ListDataFeedFilter; @@ -25,7 +26,7 @@ import com.azure.ai.metricsadvisor.administration.models.ListDetectionConfigsOptions; import com.azure.ai.metricsadvisor.administration.models.ListHookOptions; import com.azure.ai.metricsadvisor.administration.models.NotificationHook; -import com.azure.ai.metricsadvisor.implementation.AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2Impl; +import com.azure.ai.metricsadvisor.implementation.MetricsAdvisorImpl; import com.azure.ai.metricsadvisor.implementation.models.AnomalyAlertingConfiguration; import com.azure.ai.metricsadvisor.implementation.models.AnomalyAlertingConfigurationPatch; import com.azure.ai.metricsadvisor.implementation.models.AnomalyDetectionConfigurationPatch; @@ -41,6 +42,8 @@ import com.azure.ai.metricsadvisor.implementation.models.RollUpMethod; import com.azure.ai.metricsadvisor.implementation.models.ViewMode; import com.azure.ai.metricsadvisor.implementation.util.AlertConfigurationTransforms; +import com.azure.ai.metricsadvisor.implementation.util.DataFeedIngestionProgressHelper; +import com.azure.ai.metricsadvisor.implementation.util.DataFeedIngestionStatusHelper; import com.azure.ai.metricsadvisor.implementation.util.DataFeedTransforms; import com.azure.ai.metricsadvisor.implementation.util.DataSourceCredentialEntityTransforms; import com.azure.ai.metricsadvisor.implementation.util.DetectionConfigurationTransforms; @@ -63,12 +66,14 @@ import reactor.core.publisher.Mono; import java.time.OffsetDateTime; +import java.util.List; import java.util.Objects; import java.util.UUID; import java.util.stream.Collectors; import static com.azure.ai.metricsadvisor.administration.models.DataFeedGranularityType.CUSTOM; import static com.azure.ai.metricsadvisor.implementation.util.Utility.parseOperationId; +import static com.azure.ai.metricsadvisor.implementation.util.Utility.toStringOrNull; import static com.azure.core.util.FluxUtil.monoError; import static com.azure.core.util.FluxUtil.withContext; @@ -90,7 +95,7 @@ @ServiceClient(builder = MetricsAdvisorAdministrationClientBuilder.class, isAsync = true) public final class MetricsAdvisorAdministrationAsyncClient { private final ClientLogger logger = new ClientLogger(MetricsAdvisorAdministrationAsyncClient.class); - private final AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2Impl service; + private final MetricsAdvisorImpl service; /** * Create a {@link MetricsAdvisorAdministrationAsyncClient} that sends requests to the Metrics Advisor @@ -100,7 +105,7 @@ public final class MetricsAdvisorAdministrationAsyncClient { * @param service The proxy service used to perform REST calls. * @param serviceVersion The versions of Azure Metrics Advisor supported by this client library. */ - MetricsAdvisorAdministrationAsyncClient(AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2Impl service, + MetricsAdvisorAdministrationAsyncClient(MetricsAdvisorImpl service, MetricsAdvisorServiceVersion serviceVersion) { this.service = service; } @@ -184,8 +189,6 @@ public Mono createDataFeed(DataFeed dataFeed) { * }); * * - * - * * @param dataFeed The data feed to be created. * @return A {@link Response} of a {@link Mono} containing the created {@link DataFeed data feed}. * @throws NullPointerException If {@code dataFeed}, {@code dataFeedName}, {@code dataFeedSource}, {@code metrics}, @@ -731,7 +734,26 @@ private Mono> listDataFeedIngestionStatus context) .doOnRequest(ignoredValue -> logger.info("Listing ingestion status for data feed")) .doOnSuccess(response -> logger.info("Listed ingestion status {}", response)) - .doOnError(error -> logger.warning("Failed to ingestion status for data feed", error)); + .doOnError(error -> logger.warning("Failed to ingestion status for data feed", error)) + .map(res -> new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + toDataFeedIngestionStatus(res.getValue()), + res.getContinuationToken(), + null)); + } + + private List toDataFeedIngestionStatus(List ingestionStatusList) { + return ingestionStatusList + .stream() + .map(ingestionStatus -> { + DataFeedIngestionStatus dataFeedIngestionStatus = new DataFeedIngestionStatus(); + DataFeedIngestionStatusHelper.setMessage(dataFeedIngestionStatus, ingestionStatus.getMessage()); + DataFeedIngestionStatusHelper.setIngestionStatusType(dataFeedIngestionStatus, IngestionStatusType.fromString(toStringOrNull(ingestionStatus.getStatus()))); + DataFeedIngestionStatusHelper.setTimestamp(dataFeedIngestionStatus, ingestionStatus.getTimestamp()); + return dataFeedIngestionStatus; + }).collect(Collectors.toList()); } private Mono> listDataFeedIngestionStatusNextPageAsync( @@ -751,7 +773,14 @@ private Mono> listDataFeedIngestionStatus .doOnSuccess(response -> logger.info("Retrieved the next listing page - Page {} {}", nextPageLink, response)) .doOnError(error -> logger.warning("Failed to retrieve the next listing page - Page {}", nextPageLink, - error)); + error)) + .map(res -> new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + toDataFeedIngestionStatus(res.getValue()), + res.getContinuationToken(), + null)); } /** @@ -918,7 +947,16 @@ Mono> getDataFeedIngestionProgressWithRespon return service.getIngestionProgressWithResponseAsync(UUID.fromString(dataFeedId), context) .doOnRequest(ignoredValue -> logger.info("Retrieving ingestion progress for metric")) .doOnSuccess(response -> logger.info("Retrieved ingestion progress {}", response)) - .doOnError(error -> logger.warning("Failed to retrieve ingestion progress for metric", error)); + .doOnError(error -> logger.warning("Failed to retrieve ingestion progress for metric", error)) + .map(response -> new SimpleResponse<>(response, toDataFeedIngestionProgress(response.getValue()))); + } + + private DataFeedIngestionProgress toDataFeedIngestionProgress( + com.azure.ai.metricsadvisor.implementation.models.DataFeedIngestionProgress dataFeedIngestionProgressResponse) { + DataFeedIngestionProgress dataFeedIngestionProgress = new DataFeedIngestionProgress(); + DataFeedIngestionProgressHelper.setLatestActiveTimestamp(dataFeedIngestionProgress, dataFeedIngestionProgressResponse.getLatestActiveTimestamp()); + DataFeedIngestionProgressHelper.setLatestSuccessTimestamp(dataFeedIngestionProgress, dataFeedIngestionProgressResponse.getLatestSuccessTimestamp()); + return dataFeedIngestionProgress; } /** @@ -1774,7 +1812,7 @@ private Mono> listAnomalyDetectionC .doOnRequest(ignoredValue -> logger.info("Listing MetricAnomalyDetectionConfigs")) .doOnSuccess(response -> logger.info("Listed MetricAnomalyDetectionConfigs {}", response)) .doOnError(error -> logger.warning("Failed to list the MetricAnomalyDetectionConfigs", error)) - .map(response -> DetectionConfigurationTransforms.fromInnerPagedResponse(response)); + .map(DetectionConfigurationTransforms::fromInnerPagedResponse); } private Mono> listAnomalyDetectionConfigsNextPageAsync( @@ -1789,7 +1827,7 @@ private Mono> listAnomalyDetectionC response)) .doOnError(error -> logger.warning("Failed to retrieve the next listing page - Page {}", nextPageLink, error)) - .map(response -> DetectionConfigurationTransforms.fromInnerPagedResponse(response)); + .map(DetectionConfigurationTransforms::fromInnerPagedResponse); } /** @@ -2748,7 +2786,7 @@ private Mono> listAnomalyAlertConfigsSi .doOnRequest(ignoredValue -> logger.info("Listing AnomalyAlertConfigs")) .doOnSuccess(response -> logger.info("Listed AnomalyAlertConfigs {}", response)) .doOnError(error -> logger.warning("Failed to list the AnomalyAlertConfigs", error)) - .map(response -> AlertConfigurationTransforms.fromInnerPagedResponse(response)); + .map(AlertConfigurationTransforms::fromInnerPagedResponse); } private Mono> listAnomalyAlertConfigsNextPageAsync( @@ -2763,7 +2801,7 @@ private Mono> listAnomalyAlertConfigsNe response)) .doOnError(error -> logger.warning("Failed to retrieve the next listing page - Page {}", nextPageLink, error)) - .map(response -> AlertConfigurationTransforms.fromInnerPagedResponse(response)); + .map(AlertConfigurationTransforms::fromInnerPagedResponse); } /** diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/administration/MetricsAdvisorAdministrationClient.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/administration/MetricsAdvisorAdministrationClient.java index eef93c8c88390..d4e25831856a0 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/administration/MetricsAdvisorAdministrationClient.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/administration/MetricsAdvisorAdministrationClient.java @@ -6,7 +6,6 @@ import com.azure.ai.metricsadvisor.administration.models.AnomalyAlertConfiguration; import com.azure.ai.metricsadvisor.administration.models.AnomalyDetectionConfiguration; import com.azure.ai.metricsadvisor.administration.models.DataFeed; -import com.azure.ai.metricsadvisor.administration.models.DataFeedIngestionProgress; import com.azure.ai.metricsadvisor.administration.models.DataFeedIngestionStatus; import com.azure.ai.metricsadvisor.administration.models.DataSourceCredentialEntity; import com.azure.ai.metricsadvisor.administration.models.ListAnomalyAlertConfigsOptions; @@ -16,6 +15,7 @@ import com.azure.ai.metricsadvisor.administration.models.ListDetectionConfigsOptions; import com.azure.ai.metricsadvisor.administration.models.ListHookOptions; import com.azure.ai.metricsadvisor.administration.models.NotificationHook; +import com.azure.ai.metricsadvisor.administration.models.DataFeedIngestionProgress; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceClient; import com.azure.core.annotation.ServiceMethod; diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/administration/MetricsAdvisorAdministrationClientBuilder.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/administration/MetricsAdvisorAdministrationClientBuilder.java index be051e483206c..2ab5860a1dff4 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/administration/MetricsAdvisorAdministrationClientBuilder.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/administration/MetricsAdvisorAdministrationClientBuilder.java @@ -3,8 +3,9 @@ package com.azure.ai.metricsadvisor.administration; -import com.azure.ai.metricsadvisor.implementation.AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2Impl; -import com.azure.ai.metricsadvisor.implementation.AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2ImplBuilder; +import com.azure.ai.metricsadvisor.implementation.MetricsAdvisorImpl; +import com.azure.ai.metricsadvisor.implementation.MetricsAdvisorImplBuilder; +import com.azure.ai.metricsadvisor.implementation.MetricsAdvisorImpl; import com.azure.ai.metricsadvisor.models.MetricsAdvisorKeyCredential; import com.azure.ai.metricsadvisor.MetricsAdvisorServiceVersion; import com.azure.core.annotation.ServiceClientBuilder; @@ -124,7 +125,7 @@ public final class MetricsAdvisorAdministrationClientBuilder implements private static final String METRICSADVISOR_PROPERTIES = "azure-ai-metricsadvisor.properties"; private static final String NAME = "name"; private static final String VERSION = "version"; - private static final String METRICS_ADVISOR_TRACING_NAMESPACE_VALUE = "Microsoft.CognitiveServices"; + private static final String METRICS_ADVISOR_TRACING_NAMESPACE_VALUE = "Microsoft.CognitiveServices"; private static final RetryPolicy DEFAULT_RETRY_POLICY = new RetryPolicy("retry-after-ms", ChronoUnit.MILLIS); private static final String DEFAULT_SCOPE = "https://cognitiveservices.azure.com/.default"; @@ -224,9 +225,9 @@ public MetricsAdvisorAdministrationAsyncClient buildAsyncClient() { if (pipeline == null) { pipeline = getDefaultHttpPipeline(buildConfiguration); } - - final AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2Impl advisorRestAPIOpenAPIV2 = - new AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2ImplBuilder() + + final MetricsAdvisorImpl advisorRestAPIOpenAPIV2 = + new MetricsAdvisorImplBuilder() .endpoint(endpoint) .pipeline(pipeline) .buildClient(); @@ -272,7 +273,7 @@ private HttpPipeline getDefaultHttpPipeline(Configuration buildConfiguration) { if (clientOptions != null) { tracingOptions = clientOptions.getTracingOptions(); } - + Tracer tracer = TracerProvider.getDefaultProvider() .createTracer(clientName, clientVersion, METRICS_ADVISOR_TRACING_NAMESPACE_VALUE, tracingOptions); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/administration/models/DataFeedIngestionProgress.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/administration/models/DataFeedIngestionProgress.java index ea41a0fa573df..a4b9df89598aa 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/administration/models/DataFeedIngestionProgress.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/administration/models/DataFeedIngestionProgress.java @@ -4,8 +4,9 @@ package com.azure.ai.metricsadvisor.administration.models; +import com.azure.ai.metricsadvisor.implementation.util.DataFeedIngestionProgressHelper; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; + import java.time.OffsetDateTime; /** The DataFeedIngestionProgress model. */ @@ -15,16 +16,17 @@ public final class DataFeedIngestionProgress { * the timestamp of latest success ingestion job. * null indicates not available */ - @JsonProperty(value = "latestSuccessTimestamp", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime latestSuccessTimestamp; /* * the timestamp of latest ingestion job with status update. * null indicates not available */ - @JsonProperty(value = "latestActiveTimestamp", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime latestActiveTimestamp; + /** Creates an instance of DataFeedIngestionProgress class. */ + public DataFeedIngestionProgress() {} + /** * Get the latestSuccessTimestamp property: the timestamp of latest success ingestion job. null indicates not * available. @@ -44,4 +46,26 @@ public OffsetDateTime getLatestSuccessTimestamp() { public OffsetDateTime getLatestActiveTimestamp() { return this.latestActiveTimestamp; } + + static { + DataFeedIngestionProgressHelper + .setAccessor(new DataFeedIngestionProgressHelper.DataFeedIngestionProgressAccessor() { + @Override + public void setLatestActiveTimestamp(DataFeedIngestionProgress ingestionStatus, OffsetDateTime offsetDateTime) { + ingestionStatus.setLatestActiveTimestamp(offsetDateTime); + } + + @Override + public void setLatestSuccessTimestamp(DataFeedIngestionProgress ingestionStatus, OffsetDateTime offsetDateTime) { + ingestionStatus.setLatestSuccessTimestamp(offsetDateTime); + } + }); + } + void setLatestActiveTimestamp(OffsetDateTime timestamp) { + this.latestActiveTimestamp = timestamp; + } + void setLatestSuccessTimestamp(OffsetDateTime timestamp) { + this.latestSuccessTimestamp = timestamp; + } + } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/administration/models/DataFeedIngestionStatus.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/administration/models/DataFeedIngestionStatus.java index b976f24278f22..fda68d356c9d8 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/administration/models/DataFeedIngestionStatus.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/administration/models/DataFeedIngestionStatus.java @@ -4,9 +4,11 @@ package com.azure.ai.metricsadvisor.administration.models; +import com.azure.ai.metricsadvisor.implementation.util.DataFeedIngestionStatusHelper; import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; + import java.time.OffsetDateTime; +import java.util.List; /** The DataFeedIngestionStatus model. */ @Immutable @@ -14,19 +16,16 @@ public final class DataFeedIngestionStatus { /* * data slice timestamp. */ - @JsonProperty(value = "timestamp", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime timestamp; /* * latest ingestion task status for this data slice. */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private IngestionStatusType status; /* * the trimmed message of last ingestion job. */ - @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) private String message; /** @@ -55,4 +54,35 @@ public IngestionStatusType getStatus() { public String getMessage() { return this.message; } + + static { + DataFeedIngestionStatusHelper + .setAccessor(new DataFeedIngestionStatusHelper.DataFeedIngestionStatusAccessor() { + @Override + public void setTimestamp(DataFeedIngestionStatus ingestionStatus, OffsetDateTime offsetDateTime) { + ingestionStatus.setTimestamp(offsetDateTime); + } + + @Override + public void setIngestionStatusType(DataFeedIngestionStatus ingestionStatus, IngestionStatusType statusType) { + ingestionStatus.setStatus(statusType); + } + + @Override + public void setMessage(DataFeedIngestionStatus ingestionStatus, String message) { + ingestionStatus.setMessage(message); + } + }); + } + + void setTimestamp(OffsetDateTime timestamp) { + this.timestamp = timestamp; + } + + void setStatus(IngestionStatusType ingestionStatusType) { + this.status = ingestionStatusType; + } + void setMessage(String message) { + this.message = message; + } } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2ImplBuilder.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2ImplBuilder.java deleted file mode 100644 index 0d956be3d03c0..0000000000000 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2ImplBuilder.java +++ /dev/null @@ -1,215 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.ai.metricsadvisor.implementation; - -import com.azure.core.annotation.ServiceClientBuilder; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.policy.CookiePolicy; -import com.azure.core.http.policy.HttpLogOptions; -import com.azure.core.http.policy.HttpLoggingPolicy; -import com.azure.core.http.policy.HttpPipelinePolicy; -import com.azure.core.http.policy.HttpPolicyProviders; -import com.azure.core.http.policy.RetryPolicy; -import com.azure.core.http.policy.UserAgentPolicy; -import com.azure.core.util.Configuration; -import com.azure.core.util.serializer.JacksonAdapter; -import com.azure.core.util.serializer.SerializerAdapter; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** A builder for creating a new instance of the AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2 type. */ -@ServiceClientBuilder(serviceClients = {AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2Impl.class}) -public final class AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2ImplBuilder { - private static final String SDK_NAME = "name"; - - private static final String SDK_VERSION = "version"; - - private final Map properties = new HashMap<>(); - - /** Create an instance of the AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2ImplBuilder. */ - public AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2ImplBuilder() { - this.pipelinePolicies = new ArrayList<>(); - } - - /* - * Supported Cognitive Services endpoints (protocol and hostname, for - * example: https://.cognitiveservices.azure.com). - */ - private String endpoint; - - /** - * Sets Supported Cognitive Services endpoints (protocol and hostname, for example: - * https://<resource-name>.cognitiveservices.azure.com). - * - * @param endpoint the endpoint value. - * @return the AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2ImplBuilder. - */ - public AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2ImplBuilder endpoint(String endpoint) { - this.endpoint = endpoint; - return this; - } - - /* - * The HTTP pipeline to send requests through - */ - private HttpPipeline pipeline; - - /** - * Sets The HTTP pipeline to send requests through. - * - * @param pipeline the pipeline value. - * @return the AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2ImplBuilder. - */ - public AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2ImplBuilder pipeline(HttpPipeline pipeline) { - this.pipeline = pipeline; - return this; - } - - /* - * The serializer to serialize an object into a string - */ - private SerializerAdapter serializerAdapter; - - /** - * Sets The serializer to serialize an object into a string. - * - * @param serializerAdapter the serializerAdapter value. - * @return the AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2ImplBuilder. - */ - public AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2ImplBuilder serializerAdapter( - SerializerAdapter serializerAdapter) { - this.serializerAdapter = serializerAdapter; - return this; - } - - /* - * The HTTP client used to send the request. - */ - private HttpClient httpClient; - - /** - * Sets The HTTP client used to send the request. - * - * @param httpClient the httpClient value. - * @return the AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2ImplBuilder. - */ - public AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2ImplBuilder httpClient(HttpClient httpClient) { - this.httpClient = httpClient; - return this; - } - - /* - * The configuration store that is used during construction of the service - * client. - */ - private Configuration configuration; - - /** - * Sets The configuration store that is used during construction of the service client. - * - * @param configuration the configuration value. - * @return the AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2ImplBuilder. - */ - public AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2ImplBuilder configuration(Configuration configuration) { - this.configuration = configuration; - return this; - } - - /* - * The logging configuration for HTTP requests and responses. - */ - private HttpLogOptions httpLogOptions; - - /** - * Sets The logging configuration for HTTP requests and responses. - * - * @param httpLogOptions the httpLogOptions value. - * @return the AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2ImplBuilder. - */ - public AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2ImplBuilder httpLogOptions( - HttpLogOptions httpLogOptions) { - this.httpLogOptions = httpLogOptions; - return this; - } - - /* - * The retry policy that will attempt to retry failed requests, if - * applicable. - */ - private RetryPolicy retryPolicy; - - /** - * Sets The retry policy that will attempt to retry failed requests, if applicable. - * - * @param retryPolicy the retryPolicy value. - * @return the AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2ImplBuilder. - */ - public AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2ImplBuilder retryPolicy(RetryPolicy retryPolicy) { - this.retryPolicy = retryPolicy; - return this; - } - - /* - * The list of Http pipeline policies to add. - */ - private final List pipelinePolicies; - - /** - * Adds a custom Http pipeline policy. - * - * @param customPolicy The custom Http pipeline policy to add. - * @return the AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2ImplBuilder. - */ - public AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2ImplBuilder addPolicy(HttpPipelinePolicy customPolicy) { - pipelinePolicies.add(customPolicy); - return this; - } - - /** - * Builds an instance of AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2Impl with the provided parameters. - * - * @return an instance of AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2Impl. - */ - public AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2Impl buildClient() { - if (pipeline == null) { - this.pipeline = createHttpPipeline(); - } - if (serializerAdapter == null) { - this.serializerAdapter = JacksonAdapter.createDefaultSerializerAdapter(); - } - AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2Impl client = - new AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2Impl(pipeline, serializerAdapter, endpoint); - return client; - } - - private HttpPipeline createHttpPipeline() { - Configuration buildConfiguration = - (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; - if (httpLogOptions == null) { - httpLogOptions = new HttpLogOptions(); - } - List policies = new ArrayList<>(); - String clientName = properties.getOrDefault(SDK_NAME, "UnknownName"); - String clientVersion = properties.getOrDefault(SDK_VERSION, "UnknownVersion"); - policies.add( - new UserAgentPolicy(httpLogOptions.getApplicationId(), clientName, clientVersion, buildConfiguration)); - HttpPolicyProviders.addBeforeRetryPolicies(policies); - policies.add(retryPolicy == null ? new RetryPolicy() : retryPolicy); - policies.add(new CookiePolicy()); - policies.addAll(this.pipelinePolicies); - HttpPolicyProviders.addAfterRetryPolicies(policies); - policies.add(new HttpLoggingPolicy(httpLogOptions)); - HttpPipeline httpPipeline = - new HttpPipelineBuilder() - .policies(policies.toArray(new HttpPipelinePolicy[0])) - .httpClient(httpClient) - .build(); - return httpPipeline; - } -} diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2Impl.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/MetricsAdvisorImpl.java similarity index 77% rename from sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2Impl.java rename to sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/MetricsAdvisorImpl.java index 1973569dcff7e..6d033b70c80c2 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2Impl.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/MetricsAdvisorImpl.java @@ -58,8 +58,8 @@ import com.azure.ai.metricsadvisor.implementation.models.SeriesResultList; import com.azure.ai.metricsadvisor.implementation.models.UsageStats; import com.azure.ai.metricsadvisor.models.AnomalyAlert; -import com.azure.ai.metricsadvisor.administration.models.DataFeedIngestionProgress; -import com.azure.ai.metricsadvisor.administration.models.DataFeedIngestionStatus; +import com.azure.ai.metricsadvisor.implementation.models.DataFeedIngestionProgress; +import com.azure.ai.metricsadvisor.implementation.models.DataFeedIngestionStatus; import com.azure.ai.metricsadvisor.models.EnrichmentStatus; import com.azure.ai.metricsadvisor.models.MetricsAdvisorResponseException; import com.azure.core.annotation.BodyParam; @@ -95,10 +95,10 @@ import java.util.UUID; import reactor.core.publisher.Mono; -/** Initializes a new instance of the AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2 type. */ -public final class AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2Impl { +/** Initializes a new instance of the MetricsAdvisor type. */ +public final class MetricsAdvisorImpl { /** The proxy service used to perform REST calls. */ - private final AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2Service service; + private final MetricsAdvisorService service; /** * Supported Cognitive Services endpoints (protocol and hostname, for example: @@ -141,12 +141,12 @@ public SerializerAdapter getSerializerAdapter() { } /** - * Initializes an instance of AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2 client. + * Initializes an instance of MetricsAdvisor client. * * @param endpoint Supported Cognitive Services endpoints (protocol and hostname, for example: * https://<resource-name>.cognitiveservices.azure.com). */ - AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2Impl(String endpoint) { + MetricsAdvisorImpl(String endpoint) { this( new HttpPipelineBuilder() .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()) @@ -156,43 +156,37 @@ public SerializerAdapter getSerializerAdapter() { } /** - * Initializes an instance of AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2 client. + * Initializes an instance of MetricsAdvisor client. * * @param httpPipeline The HTTP pipeline to send requests through. * @param endpoint Supported Cognitive Services endpoints (protocol and hostname, for example: * https://<resource-name>.cognitiveservices.azure.com). */ - AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2Impl(HttpPipeline httpPipeline, String endpoint) { + MetricsAdvisorImpl(HttpPipeline httpPipeline, String endpoint) { this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), endpoint); } /** - * Initializes an instance of AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2 client. + * Initializes an instance of MetricsAdvisor client. * * @param httpPipeline The HTTP pipeline to send requests through. * @param serializerAdapter The serializer to serialize an object into a string. * @param endpoint Supported Cognitive Services endpoints (protocol and hostname, for example: * https://<resource-name>.cognitiveservices.azure.com). */ - AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2Impl( - HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, String endpoint) { + MetricsAdvisorImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, String endpoint) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.endpoint = endpoint; - this.service = - RestProxy.create( - AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2Service.class, - this.httpPipeline, - this.getSerializerAdapter()); + this.service = RestProxy.create(MetricsAdvisorService.class, this.httpPipeline, this.getSerializerAdapter()); } /** - * The interface defining all the services for AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2 to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for MetricsAdvisor to be used by the proxy service to perform REST calls. */ @Host("{endpoint}/metricsadvisor/v1.0") - @ServiceInterface(name = "AzureCognitiveServic") - public interface AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2Service { + @ServiceInterface(name = "MetricsAdvisor") + public interface MetricsAdvisorService { @Get("/stats/latest") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(MetricsAdvisorResponseException.class) @@ -651,7 +645,7 @@ Mono> getEnrichmentStatusByMetric( @HeaderParam("Accept") String accept, Context context); - @Post("{nextLink}") + @Post("/{nextLink}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(MetricsAdvisorResponseException.class) Mono> getAlertsByAnomalyAlertingConfigurationNext( @@ -661,7 +655,7 @@ Mono> getAlertsByAnomalyAlertingConfigurationNext( @HeaderParam("Accept") String accept, Context context); - @Post("{nextLink}") + @Post("/{nextLink}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(MetricsAdvisorResponseException.class) Mono> getAnomaliesByAnomalyDetectionConfigurationNext( @@ -671,7 +665,7 @@ Mono> getAnomaliesByAnomalyDetectionConfigurationNex @HeaderParam("Accept") String accept, Context context); - @Post("{nextLink}") + @Post("/{nextLink}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(MetricsAdvisorResponseException.class) Mono> getDimensionOfAnomaliesByAnomalyDetectionConfigurationNext( @@ -681,7 +675,7 @@ Mono> getDimensionOfAnomaliesByAnomalyDetectionCo @HeaderParam("Accept") String accept, Context context); - @Post("{nextLink}") + @Post("/{nextLink}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(MetricsAdvisorResponseException.class) Mono> listMetricFeedbacksNext( @@ -691,7 +685,7 @@ Mono> listMetricFeedbacksNext( @HeaderParam("Accept") String accept, Context context); - @Post("{nextLink}") + @Post("/{nextLink}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(MetricsAdvisorResponseException.class) Mono> getDataFeedIngestionStatusNext( @@ -701,7 +695,7 @@ Mono> getDataFeedIngestionStatusNext( @HeaderParam("Accept") String accept, Context context); - @Post("{nextLink}") + @Post("/{nextLink}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(MetricsAdvisorResponseException.class) Mono> getMetricSeriesNext( @@ -711,7 +705,7 @@ Mono> getMetricSeriesNext( @HeaderParam("Accept") String accept, Context context); - @Post("{nextLink}") + @Post("/{nextLink}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(MetricsAdvisorResponseException.class) Mono> getMetricDimensionNext( @@ -721,7 +715,7 @@ Mono> getMetricDimensionNext( @HeaderParam("Accept") String accept, Context context); - @Post("{nextLink}") + @Post("/{nextLink}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(MetricsAdvisorResponseException.class) Mono> getEnrichmentStatusByMetricNext( @@ -819,7 +813,7 @@ Mono> getAnomalyDetectionConfigurati * * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return latest usage stats. + * @return latest usage stats along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getActiveSeriesCountWithResponseAsync() { @@ -834,7 +828,7 @@ public Mono> getActiveSeriesCountWithResponseAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return latest usage stats. + * @return latest usage stats along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getActiveSeriesCountWithResponseAsync(Context context) { @@ -847,19 +841,11 @@ public Mono> getActiveSeriesCountWithResponseAsync(Context * * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return latest usage stats. + * @return latest usage stats on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getActiveSeriesCountAsync() { - return getActiveSeriesCountWithResponseAsync() - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return getActiveSeriesCountWithResponseAsync().flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -869,45 +855,37 @@ public Mono getActiveSeriesCountAsync() { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return latest usage stats. + * @return latest usage stats on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getActiveSeriesCountAsync(Context context) { - return getActiveSeriesCountWithResponseAsync(context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return getActiveSeriesCountWithResponseAsync(context).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Get latest usage stats. * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return latest usage stats. + * @return latest usage stats along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public UsageStats getActiveSeriesCount() { - return getActiveSeriesCountAsync().block(); + public Response getActiveSeriesCountWithResponse(Context context) { + return getActiveSeriesCountWithResponseAsync(context).block(); } /** * Get latest usage stats. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return latest usage stats. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getActiveSeriesCountWithResponse(Context context) { - return getActiveSeriesCountWithResponseAsync(context).block(); + public UsageStats getActiveSeriesCount() { + return getActiveSeriesCountWithResponse(Context.NONE).getValue(); } /** @@ -917,7 +895,7 @@ public Response getActiveSeriesCountWithResponse(Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getAnomalyAlertingConfigurationWithResponseAsync( @@ -936,7 +914,7 @@ public Mono> getAnomalyAlertingConfigurat * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getAnomalyAlertingConfigurationWithResponseAsync( @@ -952,19 +930,12 @@ public Mono> getAnomalyAlertingConfigurat * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getAnomalyAlertingConfigurationAsync(UUID configurationId) { return getAnomalyAlertingConfigurationWithResponseAsync(configurationId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -975,50 +946,43 @@ public Mono getAnomalyAlertingConfigurationAsync(U * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getAnomalyAlertingConfigurationAsync( UUID configurationId, Context context) { return getAnomalyAlertingConfigurationWithResponseAsync(configurationId, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Query a single anomaly alerting configuration. * * @param configurationId anomaly alerting configuration unique id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AnomalyAlertingConfiguration getAnomalyAlertingConfiguration(UUID configurationId) { - return getAnomalyAlertingConfigurationAsync(configurationId).block(); + public Response getAnomalyAlertingConfigurationWithResponse( + UUID configurationId, Context context) { + return getAnomalyAlertingConfigurationWithResponseAsync(configurationId, context).block(); } /** * Query a single anomaly alerting configuration. * * @param configurationId anomaly alerting configuration unique id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getAnomalyAlertingConfigurationWithResponse( - UUID configurationId, Context context) { - return getAnomalyAlertingConfigurationWithResponseAsync(configurationId, context).block(); + public AnomalyAlertingConfiguration getAnomalyAlertingConfiguration(UUID configurationId) { + return getAnomalyAlertingConfigurationWithResponse(configurationId, Context.NONE).getValue(); } /** @@ -1029,7 +993,7 @@ public Response getAnomalyAlertingConfigurationWit * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> updateAnomalyAlertingConfigurationWithResponseAsync( @@ -1050,7 +1014,7 @@ public Mono> updateAnomalyAlertingConfigu * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> updateAnomalyAlertingConfigurationWithResponseAsync( @@ -1067,20 +1031,13 @@ public Mono> updateAnomalyAlertingConfigu * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono updateAnomalyAlertingConfigurationAsync( UUID configurationId, AnomalyAlertingConfigurationPatch body) { return updateAnomalyAlertingConfigurationWithResponseAsync(configurationId, body) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -1092,20 +1049,13 @@ public Mono updateAnomalyAlertingConfigurationAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono updateAnomalyAlertingConfigurationAsync( UUID configurationId, AnomalyAlertingConfigurationPatch body, Context context) { return updateAnomalyAlertingConfigurationWithResponseAsync(configurationId, body, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -1113,15 +1063,16 @@ public Mono updateAnomalyAlertingConfigurationAsyn * * @param configurationId anomaly alerting configuration unique id. * @param body anomaly alerting configuration. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AnomalyAlertingConfiguration updateAnomalyAlertingConfiguration( - UUID configurationId, AnomalyAlertingConfigurationPatch body) { - return updateAnomalyAlertingConfigurationAsync(configurationId, body).block(); + public Response updateAnomalyAlertingConfigurationWithResponse( + UUID configurationId, AnomalyAlertingConfigurationPatch body, Context context) { + return updateAnomalyAlertingConfigurationWithResponseAsync(configurationId, body, context).block(); } /** @@ -1129,16 +1080,15 @@ public AnomalyAlertingConfiguration updateAnomalyAlertingConfiguration( * * @param configurationId anomaly alerting configuration unique id. * @param body anomaly alerting configuration. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateAnomalyAlertingConfigurationWithResponse( - UUID configurationId, AnomalyAlertingConfigurationPatch body, Context context) { - return updateAnomalyAlertingConfigurationWithResponseAsync(configurationId, body, context).block(); + public AnomalyAlertingConfiguration updateAnomalyAlertingConfiguration( + UUID configurationId, AnomalyAlertingConfigurationPatch body) { + return updateAnomalyAlertingConfigurationWithResponse(configurationId, body, Context.NONE).getValue(); } /** @@ -1148,7 +1098,7 @@ public Response updateAnomalyAlertingConfiguration * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> deleteAnomalyAlertingConfigurationWithResponseAsync(UUID configurationId) { @@ -1167,7 +1117,7 @@ public Mono> deleteAnomalyAlertingConfigurationWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> deleteAnomalyAlertingConfigurationWithResponseAsync( @@ -1183,12 +1133,11 @@ public Mono> deleteAnomalyAlertingConfigurationWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteAnomalyAlertingConfigurationAsync(UUID configurationId) { - return deleteAnomalyAlertingConfigurationWithResponseAsync(configurationId) - .flatMap((Response res) -> Mono.empty()); + return deleteAnomalyAlertingConfigurationWithResponseAsync(configurationId).flatMap(ignored -> Mono.empty()); } /** @@ -1199,40 +1148,40 @@ public Mono deleteAnomalyAlertingConfigurationAsync(UUID configurationId) * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteAnomalyAlertingConfigurationAsync(UUID configurationId, Context context) { return deleteAnomalyAlertingConfigurationWithResponseAsync(configurationId, context) - .flatMap((Response res) -> Mono.empty()); + .flatMap(ignored -> Mono.empty()); } /** * Delete anomaly alerting configuration. * * @param configurationId anomaly alerting configuration unique id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteAnomalyAlertingConfiguration(UUID configurationId) { - deleteAnomalyAlertingConfigurationAsync(configurationId).block(); + public Response deleteAnomalyAlertingConfigurationWithResponse(UUID configurationId, Context context) { + return deleteAnomalyAlertingConfigurationWithResponseAsync(configurationId, context).block(); } /** * Delete anomaly alerting configuration. * * @param configurationId anomaly alerting configuration unique id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteAnomalyAlertingConfigurationWithResponse(UUID configurationId, Context context) { - return deleteAnomalyAlertingConfigurationWithResponseAsync(configurationId, context).block(); + public void deleteAnomalyAlertingConfiguration(UUID configurationId) { + deleteAnomalyAlertingConfigurationWithResponse(configurationId, Context.NONE); } /** @@ -1242,7 +1191,7 @@ public Response deleteAnomalyAlertingConfigurationWithResponse(UUID config * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createAnomalyAlertingConfigurationWithResponseAsync( @@ -1260,7 +1209,7 @@ public Mono createAnomalyAlertingCon * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createAnomalyAlertingConfigurationWithResponseAsync( @@ -1276,12 +1225,11 @@ public Mono createAnomalyAlertingCon * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createAnomalyAlertingConfigurationAsync(AnomalyAlertingConfiguration body) { - return createAnomalyAlertingConfigurationWithResponseAsync(body) - .flatMap((CreateAnomalyAlertingConfigurationResponse res) -> Mono.empty()); + return createAnomalyAlertingConfigurationWithResponseAsync(body).flatMap(ignored -> Mono.empty()); } /** @@ -1292,41 +1240,40 @@ public Mono createAnomalyAlertingConfigurationAsync(AnomalyAlertingConfigu * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createAnomalyAlertingConfigurationAsync(AnomalyAlertingConfiguration body, Context context) { - return createAnomalyAlertingConfigurationWithResponseAsync(body, context) - .flatMap((CreateAnomalyAlertingConfigurationResponse res) -> Mono.empty()); + return createAnomalyAlertingConfigurationWithResponseAsync(body, context).flatMap(ignored -> Mono.empty()); } /** * Create anomaly alerting configuration. * * @param body anomaly alerting configuration. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void createAnomalyAlertingConfiguration(AnomalyAlertingConfiguration body) { - createAnomalyAlertingConfigurationAsync(body).block(); + public CreateAnomalyAlertingConfigurationResponse createAnomalyAlertingConfigurationWithResponse( + AnomalyAlertingConfiguration body, Context context) { + return createAnomalyAlertingConfigurationWithResponseAsync(body, context).block(); } /** * Create anomaly alerting configuration. * * @param body anomaly alerting configuration. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createAnomalyAlertingConfigurationWithResponse( - AnomalyAlertingConfiguration body, Context context) { - return createAnomalyAlertingConfigurationWithResponseAsync(body, context).block(); + public void createAnomalyAlertingConfiguration(AnomalyAlertingConfiguration body) { + createAnomalyAlertingConfigurationWithResponse(body, Context.NONE); } /** @@ -1339,7 +1286,7 @@ public Response createAnomalyAlertingConfigurationWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getAlertsByAnomalyAlertingConfigurationSinglePageAsync( @@ -1371,7 +1318,7 @@ public Mono> getAlertsByAnomalyAlertingConfiguration * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getAlertsByAnomalyAlertingConfigurationSinglePageAsync( @@ -1400,7 +1347,7 @@ public Mono> getAlertsByAnomalyAlertingConfiguration * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux getAlertsByAnomalyAlertingConfigurationAsync( @@ -1421,7 +1368,7 @@ public PagedFlux getAlertsByAnomalyAlertingConfigurationAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux getAlertsByAnomalyAlertingConfigurationAsync( @@ -1443,7 +1390,45 @@ public PagedFlux getAlertsByAnomalyAlertingConfigurationAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getAlertsByAnomalyAlertingConfigurationSinglePage( + UUID configurationId, AlertingResultQuery body, Integer skip, Integer maxpagesize) { + return getAlertsByAnomalyAlertingConfigurationSinglePageAsync(configurationId, body, skip, maxpagesize).block(); + } + + /** + * Query alerts under anomaly alerting configuration. + * + * @param configurationId anomaly alerting configuration unique id. + * @param body query alerting result request. + * @param skip for paging, skipped number. + * @param maxpagesize the maximum number of items in one page. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getAlertsByAnomalyAlertingConfigurationSinglePage( + UUID configurationId, AlertingResultQuery body, Integer skip, Integer maxpagesize, Context context) { + return getAlertsByAnomalyAlertingConfigurationSinglePageAsync(configurationId, body, skip, maxpagesize, context) + .block(); + } + + /** + * Query alerts under anomaly alerting configuration. + * + * @param configurationId anomaly alerting configuration unique id. + * @param body query alerting result request. + * @param skip for paging, skipped number. + * @param maxpagesize the maximum number of items in one page. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable getAlertsByAnomalyAlertingConfiguration( @@ -1463,7 +1448,7 @@ public PagedIterable getAlertsByAnomalyAlertingConfiguration( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable getAlertsByAnomalyAlertingConfiguration( @@ -1482,7 +1467,7 @@ public PagedIterable getAlertsByAnomalyAlertingConfiguration( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getAnomaliesFromAlertByAnomalyAlertingConfigurationSinglePageAsync( @@ -1520,7 +1505,7 @@ public Mono> getAnomaliesFromAlertByAnomalyAlerting * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getAnomaliesFromAlertByAnomalyAlertingConfigurationSinglePageAsync( @@ -1549,7 +1534,7 @@ public Mono> getAnomaliesFromAlertByAnomalyAlerting * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux getAnomaliesFromAlertByAnomalyAlertingConfigurationAsync( @@ -1572,7 +1557,7 @@ public PagedFlux getAnomaliesFromAlertByAnomalyAlertingConfigurat * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux getAnomaliesFromAlertByAnomalyAlertingConfigurationAsync( @@ -1594,7 +1579,48 @@ public PagedFlux getAnomaliesFromAlertByAnomalyAlertingConfigurat * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getAnomaliesFromAlertByAnomalyAlertingConfigurationSinglePage( + UUID configurationId, String alertId, Integer skip, Integer maxpagesize) { + return getAnomaliesFromAlertByAnomalyAlertingConfigurationSinglePageAsync( + configurationId, alertId, skip, maxpagesize) + .block(); + } + + /** + * Query anomalies under a specific alert. + * + * @param configurationId anomaly alerting configuration unique id. + * @param alertId alert id. + * @param skip for paging, skipped number. + * @param maxpagesize the maximum number of items in one page. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getAnomaliesFromAlertByAnomalyAlertingConfigurationSinglePage( + UUID configurationId, String alertId, Integer skip, Integer maxpagesize, Context context) { + return getAnomaliesFromAlertByAnomalyAlertingConfigurationSinglePageAsync( + configurationId, alertId, skip, maxpagesize, context) + .block(); + } + + /** + * Query anomalies under a specific alert. + * + * @param configurationId anomaly alerting configuration unique id. + * @param alertId alert id. + * @param skip for paging, skipped number. + * @param maxpagesize the maximum number of items in one page. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable getAnomaliesFromAlertByAnomalyAlertingConfiguration( @@ -1614,7 +1640,7 @@ public PagedIterable getAnomaliesFromAlertByAnomalyAlertingConfig * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable getAnomaliesFromAlertByAnomalyAlertingConfiguration( @@ -1634,7 +1660,7 @@ public PagedIterable getAnomaliesFromAlertByAnomalyAlertingConfig * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getIncidentsFromAlertByAnomalyAlertingConfigurationSinglePageAsync( @@ -1672,7 +1698,7 @@ public Mono> getIncidentsFromAlertByAnomalyAlertin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getIncidentsFromAlertByAnomalyAlertingConfigurationSinglePageAsync( @@ -1701,7 +1727,7 @@ public Mono> getIncidentsFromAlertByAnomalyAlertin * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux getIncidentsFromAlertByAnomalyAlertingConfigurationAsync( @@ -1724,7 +1750,7 @@ public PagedFlux getIncidentsFromAlertByAnomalyAlertingConfigura * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux getIncidentsFromAlertByAnomalyAlertingConfigurationAsync( @@ -1746,7 +1772,48 @@ public PagedFlux getIncidentsFromAlertByAnomalyAlertingConfigura * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getIncidentsFromAlertByAnomalyAlertingConfigurationSinglePage( + UUID configurationId, String alertId, Integer skip, Integer maxpagesize) { + return getIncidentsFromAlertByAnomalyAlertingConfigurationSinglePageAsync( + configurationId, alertId, skip, maxpagesize) + .block(); + } + + /** + * Query incidents under a specific alert. + * + * @param configurationId anomaly alerting configuration unique id. + * @param alertId alert id. + * @param skip for paging, skipped number. + * @param maxpagesize the maximum number of items in one page. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getIncidentsFromAlertByAnomalyAlertingConfigurationSinglePage( + UUID configurationId, String alertId, Integer skip, Integer maxpagesize, Context context) { + return getIncidentsFromAlertByAnomalyAlertingConfigurationSinglePageAsync( + configurationId, alertId, skip, maxpagesize, context) + .block(); + } + + /** + * Query incidents under a specific alert. + * + * @param configurationId anomaly alerting configuration unique id. + * @param alertId alert id. + * @param skip for paging, skipped number. + * @param maxpagesize the maximum number of items in one page. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable getIncidentsFromAlertByAnomalyAlertingConfiguration( @@ -1766,7 +1833,7 @@ public PagedIterable getIncidentsFromAlertByAnomalyAlertingConfi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable getIncidentsFromAlertByAnomalyAlertingConfiguration( @@ -1783,7 +1850,7 @@ public PagedIterable getIncidentsFromAlertByAnomalyAlertingConfi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getAnomalyDetectionConfigurationWithResponseAsync( @@ -1802,7 +1869,7 @@ public Mono> getAnomalyDetectionConfigur * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getAnomalyDetectionConfigurationWithResponseAsync( @@ -1818,19 +1885,12 @@ public Mono> getAnomalyDetectionConfigur * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getAnomalyDetectionConfigurationAsync(UUID configurationId) { return getAnomalyDetectionConfigurationWithResponseAsync(configurationId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -1841,50 +1901,43 @@ public Mono getAnomalyDetectionConfigurationAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getAnomalyDetectionConfigurationAsync( UUID configurationId, Context context) { return getAnomalyDetectionConfigurationWithResponseAsync(configurationId, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Query a single anomaly detection configuration. * * @param configurationId anomaly detection configuration unique id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AnomalyDetectionConfiguration getAnomalyDetectionConfiguration(UUID configurationId) { - return getAnomalyDetectionConfigurationAsync(configurationId).block(); + public Response getAnomalyDetectionConfigurationWithResponse( + UUID configurationId, Context context) { + return getAnomalyDetectionConfigurationWithResponseAsync(configurationId, context).block(); } /** * Query a single anomaly detection configuration. * * @param configurationId anomaly detection configuration unique id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getAnomalyDetectionConfigurationWithResponse( - UUID configurationId, Context context) { - return getAnomalyDetectionConfigurationWithResponseAsync(configurationId, context).block(); + public AnomalyDetectionConfiguration getAnomalyDetectionConfiguration(UUID configurationId) { + return getAnomalyDetectionConfigurationWithResponse(configurationId, Context.NONE).getValue(); } /** @@ -1895,7 +1948,7 @@ public Response getAnomalyDetectionConfigurationW * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> updateAnomalyDetectionConfigurationWithResponseAsync( @@ -1916,7 +1969,7 @@ public Mono> updateAnomalyDetectionConfi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> updateAnomalyDetectionConfigurationWithResponseAsync( @@ -1933,20 +1986,13 @@ public Mono> updateAnomalyDetectionConfi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono updateAnomalyDetectionConfigurationAsync( UUID configurationId, AnomalyDetectionConfigurationPatch body) { return updateAnomalyDetectionConfigurationWithResponseAsync(configurationId, body) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -1958,20 +2004,13 @@ public Mono updateAnomalyDetectionConfigurationAs * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono updateAnomalyDetectionConfigurationAsync( UUID configurationId, AnomalyDetectionConfigurationPatch body, Context context) { return updateAnomalyDetectionConfigurationWithResponseAsync(configurationId, body, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -1979,15 +2018,16 @@ public Mono updateAnomalyDetectionConfigurationAs * * @param configurationId anomaly detection configuration unique id. * @param body anomaly detection configuration. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AnomalyDetectionConfiguration updateAnomalyDetectionConfiguration( - UUID configurationId, AnomalyDetectionConfigurationPatch body) { - return updateAnomalyDetectionConfigurationAsync(configurationId, body).block(); + public Response updateAnomalyDetectionConfigurationWithResponse( + UUID configurationId, AnomalyDetectionConfigurationPatch body, Context context) { + return updateAnomalyDetectionConfigurationWithResponseAsync(configurationId, body, context).block(); } /** @@ -1995,16 +2035,15 @@ public AnomalyDetectionConfiguration updateAnomalyDetectionConfiguration( * * @param configurationId anomaly detection configuration unique id. * @param body anomaly detection configuration. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateAnomalyDetectionConfigurationWithResponse( - UUID configurationId, AnomalyDetectionConfigurationPatch body, Context context) { - return updateAnomalyDetectionConfigurationWithResponseAsync(configurationId, body, context).block(); + public AnomalyDetectionConfiguration updateAnomalyDetectionConfiguration( + UUID configurationId, AnomalyDetectionConfigurationPatch body) { + return updateAnomalyDetectionConfigurationWithResponse(configurationId, body, Context.NONE).getValue(); } /** @@ -2014,7 +2053,7 @@ public Response updateAnomalyDetectionConfigurati * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> deleteAnomalyDetectionConfigurationWithResponseAsync(UUID configurationId) { @@ -2033,7 +2072,7 @@ public Mono> deleteAnomalyDetectionConfigurationWithResponseAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> deleteAnomalyDetectionConfigurationWithResponseAsync( @@ -2049,12 +2088,11 @@ public Mono> deleteAnomalyDetectionConfigurationWithResponseAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteAnomalyDetectionConfigurationAsync(UUID configurationId) { - return deleteAnomalyDetectionConfigurationWithResponseAsync(configurationId) - .flatMap((Response res) -> Mono.empty()); + return deleteAnomalyDetectionConfigurationWithResponseAsync(configurationId).flatMap(ignored -> Mono.empty()); } /** @@ -2065,40 +2103,40 @@ public Mono deleteAnomalyDetectionConfigurationAsync(UUID configurationId) * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteAnomalyDetectionConfigurationAsync(UUID configurationId, Context context) { return deleteAnomalyDetectionConfigurationWithResponseAsync(configurationId, context) - .flatMap((Response res) -> Mono.empty()); + .flatMap(ignored -> Mono.empty()); } /** * Delete anomaly detection configuration. * * @param configurationId anomaly detection configuration unique id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteAnomalyDetectionConfiguration(UUID configurationId) { - deleteAnomalyDetectionConfigurationAsync(configurationId).block(); + public Response deleteAnomalyDetectionConfigurationWithResponse(UUID configurationId, Context context) { + return deleteAnomalyDetectionConfigurationWithResponseAsync(configurationId, context).block(); } /** * Delete anomaly detection configuration. * * @param configurationId anomaly detection configuration unique id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteAnomalyDetectionConfigurationWithResponse(UUID configurationId, Context context) { - return deleteAnomalyDetectionConfigurationWithResponseAsync(configurationId, context).block(); + public void deleteAnomalyDetectionConfiguration(UUID configurationId) { + deleteAnomalyDetectionConfigurationWithResponse(configurationId, Context.NONE); } /** @@ -2108,7 +2146,7 @@ public Response deleteAnomalyDetectionConfigurationWithResponse(UUID confi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createAnomalyDetectionConfigurationWithResponseAsync( @@ -2126,7 +2164,7 @@ public Mono createAnomalyDetectionC * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createAnomalyDetectionConfigurationWithResponseAsync( @@ -2142,12 +2180,11 @@ public Mono createAnomalyDetectionC * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createAnomalyDetectionConfigurationAsync(AnomalyDetectionConfiguration body) { - return createAnomalyDetectionConfigurationWithResponseAsync(body) - .flatMap((CreateAnomalyDetectionConfigurationResponse res) -> Mono.empty()); + return createAnomalyDetectionConfigurationWithResponseAsync(body).flatMap(ignored -> Mono.empty()); } /** @@ -2158,41 +2195,40 @@ public Mono createAnomalyDetectionConfigurationAsync(AnomalyDetectionConfi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createAnomalyDetectionConfigurationAsync(AnomalyDetectionConfiguration body, Context context) { - return createAnomalyDetectionConfigurationWithResponseAsync(body, context) - .flatMap((CreateAnomalyDetectionConfigurationResponse res) -> Mono.empty()); + return createAnomalyDetectionConfigurationWithResponseAsync(body, context).flatMap(ignored -> Mono.empty()); } /** * Create anomaly detection configuration. * * @param body anomaly detection configuration. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void createAnomalyDetectionConfiguration(AnomalyDetectionConfiguration body) { - createAnomalyDetectionConfigurationAsync(body).block(); + public CreateAnomalyDetectionConfigurationResponse createAnomalyDetectionConfigurationWithResponse( + AnomalyDetectionConfiguration body, Context context) { + return createAnomalyDetectionConfigurationWithResponseAsync(body, context).block(); } /** * Create anomaly detection configuration. * * @param body anomaly detection configuration. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createAnomalyDetectionConfigurationWithResponse( - AnomalyDetectionConfiguration body, Context context) { - return createAnomalyDetectionConfigurationWithResponseAsync(body, context).block(); + public void createAnomalyDetectionConfiguration(AnomalyDetectionConfiguration body) { + createAnomalyDetectionConfigurationWithResponse(body, Context.NONE); } /** @@ -2204,7 +2240,7 @@ public Response createAnomalyDetectionConfigurationWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> @@ -2236,7 +2272,7 @@ public Response createAnomalyDetectionConfigurationWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> @@ -2265,7 +2301,7 @@ public Response createAnomalyDetectionConfigurationWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux getAnomalyAlertingConfigurationsByAnomalyDetectionConfigurationAsync( @@ -2288,7 +2324,7 @@ public PagedFlux getAnomalyAlertingConfigurationsB * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux getAnomalyAlertingConfigurationsByAnomalyDetectionConfigurationAsync( @@ -2311,14 +2347,15 @@ public PagedFlux getAnomalyAlertingConfigurationsB * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable getAnomalyAlertingConfigurationsByAnomalyDetectionConfiguration( - UUID configurationId, Integer skip, Integer maxpagesize) { - return new PagedIterable<>( - getAnomalyAlertingConfigurationsByAnomalyDetectionConfigurationAsync( - configurationId, skip, maxpagesize)); + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse + getAnomalyAlertingConfigurationsByAnomalyDetectionConfigurationSinglePage( + UUID configurationId, Integer skip, Integer maxpagesize) { + return getAnomalyAlertingConfigurationsByAnomalyDetectionConfigurationSinglePageAsync( + configurationId, skip, maxpagesize) + .block(); } /** @@ -2331,16 +2368,56 @@ public PagedIterable getAnomalyAlertingConfigurati * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable getAnomalyAlertingConfigurationsByAnomalyDetectionConfiguration( - UUID configurationId, Integer skip, Integer maxpagesize, Context context) { - return new PagedIterable<>( - getAnomalyAlertingConfigurationsByAnomalyDetectionConfigurationAsync( - configurationId, skip, maxpagesize, context)); - } - + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse + getAnomalyAlertingConfigurationsByAnomalyDetectionConfigurationSinglePage( + UUID configurationId, Integer skip, Integer maxpagesize, Context context) { + return getAnomalyAlertingConfigurationsByAnomalyDetectionConfigurationSinglePageAsync( + configurationId, skip, maxpagesize, context) + .block(); + } + + /** + * List all anomaly alerting configurations for specific anomaly detection configuration. + * + * @param configurationId anomaly detection configuration unique id. + * @param skip for paging, skipped number. + * @param maxpagesize the maximum number of items in one page. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getAnomalyAlertingConfigurationsByAnomalyDetectionConfiguration( + UUID configurationId, Integer skip, Integer maxpagesize) { + return new PagedIterable<>( + getAnomalyAlertingConfigurationsByAnomalyDetectionConfigurationAsync( + configurationId, skip, maxpagesize)); + } + + /** + * List all anomaly alerting configurations for specific anomaly detection configuration. + * + * @param configurationId anomaly detection configuration unique id. + * @param skip for paging, skipped number. + * @param maxpagesize the maximum number of items in one page. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable getAnomalyAlertingConfigurationsByAnomalyDetectionConfiguration( + UUID configurationId, Integer skip, Integer maxpagesize, Context context) { + return new PagedIterable<>( + getAnomalyAlertingConfigurationsByAnomalyDetectionConfigurationAsync( + configurationId, skip, maxpagesize, context)); + } + /** * Query series enriched by anomaly detection. * @@ -2349,7 +2426,7 @@ public PagedIterable getAnomalyAlertingConfigurati * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getSeriesByAnomalyDetectionConfigurationWithResponseAsync( @@ -2370,7 +2447,7 @@ public Mono> getSeriesByAnomalyDetectionConfiguration * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getSeriesByAnomalyDetectionConfigurationWithResponseAsync( @@ -2388,20 +2465,13 @@ public Mono> getSeriesByAnomalyDetectionConfiguration * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getSeriesByAnomalyDetectionConfigurationAsync( UUID configurationId, DetectionSeriesQuery body) { return getSeriesByAnomalyDetectionConfigurationWithResponseAsync(configurationId, body) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -2413,20 +2483,13 @@ public Mono getSeriesByAnomalyDetectionConfigurationAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getSeriesByAnomalyDetectionConfigurationAsync( UUID configurationId, DetectionSeriesQuery body, Context context) { return getSeriesByAnomalyDetectionConfigurationWithResponseAsync(configurationId, body, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -2434,14 +2497,16 @@ public Mono getSeriesByAnomalyDetectionConfigurationAsync( * * @param configurationId anomaly detection configuration unique id. * @param body query series detection result request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SeriesResultList getSeriesByAnomalyDetectionConfiguration(UUID configurationId, DetectionSeriesQuery body) { - return getSeriesByAnomalyDetectionConfigurationAsync(configurationId, body).block(); + public Response getSeriesByAnomalyDetectionConfigurationWithResponse( + UUID configurationId, DetectionSeriesQuery body, Context context) { + return getSeriesByAnomalyDetectionConfigurationWithResponseAsync(configurationId, body, context).block(); } /** @@ -2449,16 +2514,14 @@ public SeriesResultList getSeriesByAnomalyDetectionConfiguration(UUID configurat * * @param configurationId anomaly detection configuration unique id. * @param body query series detection result request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getSeriesByAnomalyDetectionConfigurationWithResponse( - UUID configurationId, DetectionSeriesQuery body, Context context) { - return getSeriesByAnomalyDetectionConfigurationWithResponseAsync(configurationId, body, context).block(); + public SeriesResultList getSeriesByAnomalyDetectionConfiguration(UUID configurationId, DetectionSeriesQuery body) { + return getSeriesByAnomalyDetectionConfigurationWithResponse(configurationId, body, Context.NONE).getValue(); } /** @@ -2471,7 +2534,7 @@ public Response getSeriesByAnomalyDetectionConfigurationWithRe * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getAnomaliesByAnomalyDetectionConfigurationSinglePageAsync( @@ -2503,7 +2566,7 @@ public Mono> getAnomaliesByAnomalyDetectionConfigur * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getAnomaliesByAnomalyDetectionConfigurationSinglePageAsync( @@ -2536,7 +2599,7 @@ public Mono> getAnomaliesByAnomalyDetectionConfigur * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux getAnomaliesByAnomalyDetectionConfigurationAsync( @@ -2559,7 +2622,7 @@ public PagedFlux getAnomaliesByAnomalyDetectionConfigurationAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux getAnomaliesByAnomalyDetectionConfigurationAsync( @@ -2585,7 +2648,51 @@ public PagedFlux getAnomaliesByAnomalyDetectionConfigurationAsync * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getAnomaliesByAnomalyDetectionConfigurationSinglePage( + UUID configurationId, DetectionAnomalyResultQuery body, Integer skip, Integer maxpagesize) { + return getAnomaliesByAnomalyDetectionConfigurationSinglePageAsync(configurationId, body, skip, maxpagesize) + .block(); + } + + /** + * Query anomalies under anomaly detection configuration. + * + * @param configurationId anomaly detection configuration unique id. + * @param body query detection anomaly result request. + * @param skip for paging, skipped number. + * @param maxpagesize the maximum number of items in one page. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getAnomaliesByAnomalyDetectionConfigurationSinglePage( + UUID configurationId, + DetectionAnomalyResultQuery body, + Integer skip, + Integer maxpagesize, + Context context) { + return getAnomaliesByAnomalyDetectionConfigurationSinglePageAsync( + configurationId, body, skip, maxpagesize, context) + .block(); + } + + /** + * Query anomalies under anomaly detection configuration. + * + * @param configurationId anomaly detection configuration unique id. + * @param body query detection anomaly result request. + * @param skip for paging, skipped number. + * @param maxpagesize the maximum number of items in one page. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable getAnomaliesByAnomalyDetectionConfiguration( @@ -2605,7 +2712,7 @@ public PagedIterable getAnomaliesByAnomalyDetectionConfiguration( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable getAnomaliesByAnomalyDetectionConfiguration( @@ -2628,7 +2735,7 @@ public PagedIterable getAnomaliesByAnomalyDetectionConfiguration( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getDimensionOfAnomaliesByAnomalyDetectionConfigurationSinglePageAsync( @@ -2660,7 +2767,7 @@ public Mono> getDimensionOfAnomaliesByAnomalyDetectionConf * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getDimensionOfAnomaliesByAnomalyDetectionConfigurationSinglePageAsync( @@ -2689,7 +2796,7 @@ public Mono> getDimensionOfAnomaliesByAnomalyDetectionConf * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux getDimensionOfAnomaliesByAnomalyDetectionConfigurationAsync( @@ -2712,7 +2819,7 @@ public PagedFlux getDimensionOfAnomaliesByAnomalyDetectionConfigurationA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux getDimensionOfAnomaliesByAnomalyDetectionConfigurationAsync( @@ -2736,7 +2843,48 @@ public PagedFlux getDimensionOfAnomaliesByAnomalyDetectionConfigurationA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getDimensionOfAnomaliesByAnomalyDetectionConfigurationSinglePage( + UUID configurationId, AnomalyDimensionQuery body, Integer skip, Integer maxpagesize) { + return getDimensionOfAnomaliesByAnomalyDetectionConfigurationSinglePageAsync( + configurationId, body, skip, maxpagesize) + .block(); + } + + /** + * Query dimension values of anomalies. + * + * @param configurationId anomaly detection configuration unique id. + * @param body query dimension values request. + * @param skip for paging, skipped number. + * @param maxpagesize the maximum number of items in one page. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getDimensionOfAnomaliesByAnomalyDetectionConfigurationSinglePage( + UUID configurationId, AnomalyDimensionQuery body, Integer skip, Integer maxpagesize, Context context) { + return getDimensionOfAnomaliesByAnomalyDetectionConfigurationSinglePageAsync( + configurationId, body, skip, maxpagesize, context) + .block(); + } + + /** + * Query dimension values of anomalies. + * + * @param configurationId anomaly detection configuration unique id. + * @param body query dimension values request. + * @param skip for paging, skipped number. + * @param maxpagesize the maximum number of items in one page. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable getDimensionOfAnomaliesByAnomalyDetectionConfiguration( @@ -2756,7 +2904,7 @@ public PagedIterable getDimensionOfAnomaliesByAnomalyDetectionConfigurat * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable getDimensionOfAnomaliesByAnomalyDetectionConfiguration( @@ -2775,7 +2923,7 @@ public PagedIterable getDimensionOfAnomaliesByAnomalyDetectionConfigurat * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getIncidentsByAnomalyDetectionConfigurationSinglePageAsync( @@ -2806,7 +2954,7 @@ public Mono> getIncidentsByAnomalyDetectionConfigu * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getIncidentsByAnomalyDetectionConfigurationSinglePageAsync( @@ -2834,7 +2982,7 @@ public Mono> getIncidentsByAnomalyDetectionConfigu * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux getIncidentsByAnomalyDetectionConfigurationAsync( @@ -2854,7 +3002,7 @@ public PagedFlux getIncidentsByAnomalyDetectionConfigurationAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux getIncidentsByAnomalyDetectionConfigurationAsync( @@ -2875,7 +3023,43 @@ public PagedFlux getIncidentsByAnomalyDetectionConfigurationAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getIncidentsByAnomalyDetectionConfigurationSinglePage( + UUID configurationId, DetectionIncidentResultQuery body, Integer maxpagesize) { + return getIncidentsByAnomalyDetectionConfigurationSinglePageAsync(configurationId, body, maxpagesize).block(); + } + + /** + * Query incidents under anomaly detection configuration. + * + * @param configurationId anomaly detection configuration unique id. + * @param body query detection incident result request. + * @param maxpagesize the maximum number of items in one page. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getIncidentsByAnomalyDetectionConfigurationSinglePage( + UUID configurationId, DetectionIncidentResultQuery body, Integer maxpagesize, Context context) { + return getIncidentsByAnomalyDetectionConfigurationSinglePageAsync(configurationId, body, maxpagesize, context) + .block(); + } + + /** + * Query incidents under anomaly detection configuration. + * + * @param configurationId anomaly detection configuration unique id. + * @param body query detection incident result request. + * @param maxpagesize the maximum number of items in one page. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable getIncidentsByAnomalyDetectionConfiguration( @@ -2894,7 +3078,7 @@ public PagedIterable getIncidentsByAnomalyDetectionConfiguration * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable getIncidentsByAnomalyDetectionConfiguration( @@ -2912,7 +3096,7 @@ public PagedIterable getIncidentsByAnomalyDetectionConfiguration * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getIncidentsByAnomalyDetectionConfigurationNextPagesSinglePageAsync( @@ -2943,7 +3127,7 @@ public Mono> getIncidentsByAnomalyDetectionConfigu * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getIncidentsByAnomalyDetectionConfigurationNextPagesSinglePageAsync( @@ -2971,7 +3155,7 @@ public Mono> getIncidentsByAnomalyDetectionConfigu * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux getIncidentsByAnomalyDetectionConfigurationNextPagesAsync( @@ -2993,7 +3177,7 @@ public PagedFlux getIncidentsByAnomalyDetectionConfigurationNext * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux getIncidentsByAnomalyDetectionConfigurationNextPagesAsync( @@ -3014,7 +3198,45 @@ public PagedFlux getIncidentsByAnomalyDetectionConfigurationNext * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getIncidentsByAnomalyDetectionConfigurationNextPagesSinglePage( + UUID configurationId, Integer maxpagesize, String token) { + return getIncidentsByAnomalyDetectionConfigurationNextPagesSinglePageAsync(configurationId, maxpagesize, token) + .block(); + } + + /** + * Query incidents under anomaly detection configuration. + * + * @param configurationId anomaly detection configuration unique id. + * @param maxpagesize the maximum number of items in one page. + * @param token the token for getting the next page. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getIncidentsByAnomalyDetectionConfigurationNextPagesSinglePage( + UUID configurationId, Integer maxpagesize, String token, Context context) { + return getIncidentsByAnomalyDetectionConfigurationNextPagesSinglePageAsync( + configurationId, maxpagesize, token, context) + .block(); + } + + /** + * Query incidents under anomaly detection configuration. + * + * @param configurationId anomaly detection configuration unique id. + * @param maxpagesize the maximum number of items in one page. + * @param token the token for getting the next page. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable getIncidentsByAnomalyDetectionConfigurationNextPages( @@ -3033,7 +3255,7 @@ public PagedIterable getIncidentsByAnomalyDetectionConfiguration * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable getIncidentsByAnomalyDetectionConfigurationNextPages( @@ -3051,7 +3273,7 @@ public PagedIterable getIncidentsByAnomalyDetectionConfiguration * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getRootCauseOfIncidentByAnomalyDetectionConfigurationWithResponseAsync( @@ -3072,7 +3294,7 @@ public Mono> getRootCauseOfIncidentByAnomalyDetectionCon * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getRootCauseOfIncidentByAnomalyDetectionConfigurationWithResponseAsync( @@ -3090,20 +3312,13 @@ public Mono> getRootCauseOfIncidentByAnomalyDetectionCon * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getRootCauseOfIncidentByAnomalyDetectionConfigurationAsync( UUID configurationId, String incidentId) { return getRootCauseOfIncidentByAnomalyDetectionConfigurationWithResponseAsync(configurationId, incidentId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -3115,21 +3330,14 @@ public Mono getRootCauseOfIncidentByAnomalyDetectionConfiguration * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getRootCauseOfIncidentByAnomalyDetectionConfigurationAsync( UUID configurationId, String incidentId, Context context) { return getRootCauseOfIncidentByAnomalyDetectionConfigurationWithResponseAsync( configurationId, incidentId, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -3137,15 +3345,18 @@ public Mono getRootCauseOfIncidentByAnomalyDetectionConfiguration * * @param configurationId anomaly detection configuration unique id. * @param incidentId incident id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RootCauseList getRootCauseOfIncidentByAnomalyDetectionConfiguration( - UUID configurationId, String incidentId) { - return getRootCauseOfIncidentByAnomalyDetectionConfigurationAsync(configurationId, incidentId).block(); + public Response getRootCauseOfIncidentByAnomalyDetectionConfigurationWithResponse( + UUID configurationId, String incidentId, Context context) { + return getRootCauseOfIncidentByAnomalyDetectionConfigurationWithResponseAsync( + configurationId, incidentId, context) + .block(); } /** @@ -3153,18 +3364,17 @@ public RootCauseList getRootCauseOfIncidentByAnomalyDetectionConfiguration( * * @param configurationId anomaly detection configuration unique id. * @param incidentId incident id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getRootCauseOfIncidentByAnomalyDetectionConfigurationWithResponse( - UUID configurationId, String incidentId, Context context) { - return getRootCauseOfIncidentByAnomalyDetectionConfigurationWithResponseAsync( - configurationId, incidentId, context) - .block(); + public RootCauseList getRootCauseOfIncidentByAnomalyDetectionConfiguration( + UUID configurationId, String incidentId) { + return getRootCauseOfIncidentByAnomalyDetectionConfigurationWithResponse( + configurationId, incidentId, Context.NONE) + .getValue(); } /** @@ -3174,7 +3384,7 @@ public Response getRootCauseOfIncidentByAnomalyDetectionConfigura * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createCredentialWithResponseAsync(DataSourceCredential body) { @@ -3190,7 +3400,7 @@ public Mono createCredentialWithResponseAsync(DataSour * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createCredentialWithResponseAsync( @@ -3206,11 +3416,11 @@ public Mono createCredentialWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createCredentialAsync(DataSourceCredential body) { - return createCredentialWithResponseAsync(body).flatMap((CreateCredentialResponse res) -> Mono.empty()); + return createCredentialWithResponseAsync(body).flatMap(ignored -> Mono.empty()); } /** @@ -3221,39 +3431,39 @@ public Mono createCredentialAsync(DataSourceCredential body) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createCredentialAsync(DataSourceCredential body, Context context) { - return createCredentialWithResponseAsync(body, context).flatMap((CreateCredentialResponse res) -> Mono.empty()); + return createCredentialWithResponseAsync(body, context).flatMap(ignored -> Mono.empty()); } /** * Create a new data source credential. * * @param body Create data source credential request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void createCredential(DataSourceCredential body) { - createCredentialAsync(body).block(); + public CreateCredentialResponse createCredentialWithResponse(DataSourceCredential body, Context context) { + return createCredentialWithResponseAsync(body, context).block(); } /** * Create a new data source credential. * * @param body Create data source credential request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createCredentialWithResponse(DataSourceCredential body, Context context) { - return createCredentialWithResponseAsync(body, context).block(); + public void createCredential(DataSourceCredential body) { + createCredentialWithResponse(body, Context.NONE); } /** @@ -3264,7 +3474,7 @@ public Response createCredentialWithResponse(DataSourceCredential body, Co * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> listCredentialsSinglePageAsync(Integer skip, Integer maxpagesize) { @@ -3291,7 +3501,7 @@ public Mono> listCredentialsSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> listCredentialsSinglePageAsync( @@ -3317,7 +3527,7 @@ public Mono> listCredentialsSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listCredentialsAsync(Integer skip, Integer maxpagesize) { @@ -3335,7 +3545,7 @@ public PagedFlux listCredentialsAsync(Integer skip, Intege * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listCredentialsAsync(Integer skip, Integer maxpagesize, Context context) { @@ -3352,11 +3562,11 @@ public PagedFlux listCredentialsAsync(Integer skip, Intege * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listCredentials(Integer skip, Integer maxpagesize) { - return new PagedIterable<>(listCredentialsAsync(skip, maxpagesize)); + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse listCredentialsSinglePage(Integer skip, Integer maxpagesize) { + return listCredentialsSinglePageAsync(skip, maxpagesize).block(); } /** @@ -3368,11 +3578,43 @@ public PagedIterable listCredentials(Integer skip, Integer * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listCredentials(Integer skip, Integer maxpagesize, Context context) { - return new PagedIterable<>(listCredentialsAsync(skip, maxpagesize, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse listCredentialsSinglePage( + Integer skip, Integer maxpagesize, Context context) { + return listCredentialsSinglePageAsync(skip, maxpagesize, context).block(); + } + + /** + * List all credentials. + * + * @param skip for paging, skipped number. + * @param maxpagesize the maximum number of items in one page. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listCredentials(Integer skip, Integer maxpagesize) { + return new PagedIterable<>(listCredentialsAsync(skip, maxpagesize)); + } + + /** + * List all credentials. + * + * @param skip for paging, skipped number. + * @param maxpagesize the maximum number of items in one page. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listCredentials(Integer skip, Integer maxpagesize, Context context) { + return new PagedIterable<>(listCredentialsAsync(skip, maxpagesize, context)); } /** @@ -3383,7 +3625,7 @@ public PagedIterable listCredentials(Integer skip, Integer * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> updateCredentialWithResponseAsync( @@ -3402,7 +3644,7 @@ public Mono> updateCredentialWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> updateCredentialWithResponseAsync( @@ -3419,19 +3661,11 @@ public Mono> updateCredentialWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono updateCredentialAsync(UUID credentialId, DataSourceCredentialPatch body) { - return updateCredentialWithResponseAsync(credentialId, body) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return updateCredentialWithResponseAsync(credentialId, body).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -3443,20 +3677,13 @@ public Mono updateCredentialAsync(UUID credentialId, DataS * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono updateCredentialAsync( UUID credentialId, DataSourceCredentialPatch body, Context context) { return updateCredentialWithResponseAsync(credentialId, body, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -3464,14 +3691,16 @@ public Mono updateCredentialAsync( * * @param credentialId Data source credential unique ID. * @param body Update data source credential request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DataSourceCredential updateCredential(UUID credentialId, DataSourceCredentialPatch body) { - return updateCredentialAsync(credentialId, body).block(); + public Response updateCredentialWithResponse( + UUID credentialId, DataSourceCredentialPatch body, Context context) { + return updateCredentialWithResponseAsync(credentialId, body, context).block(); } /** @@ -3479,16 +3708,14 @@ public DataSourceCredential updateCredential(UUID credentialId, DataSourceCreden * * @param credentialId Data source credential unique ID. * @param body Update data source credential request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateCredentialWithResponse( - UUID credentialId, DataSourceCredentialPatch body, Context context) { - return updateCredentialWithResponseAsync(credentialId, body, context).block(); + public DataSourceCredential updateCredential(UUID credentialId, DataSourceCredentialPatch body) { + return updateCredentialWithResponse(credentialId, body, Context.NONE).getValue(); } /** @@ -3498,7 +3725,7 @@ public Response updateCredentialWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> deleteCredentialWithResponseAsync(UUID credentialId) { @@ -3515,7 +3742,7 @@ public Mono> deleteCredentialWithResponseAsync(UUID credentialId) * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> deleteCredentialWithResponseAsync(UUID credentialId, Context context) { @@ -3530,11 +3757,11 @@ public Mono> deleteCredentialWithResponseAsync(UUID credentialId, * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteCredentialAsync(UUID credentialId) { - return deleteCredentialWithResponseAsync(credentialId).flatMap((Response res) -> Mono.empty()); + return deleteCredentialWithResponseAsync(credentialId).flatMap(ignored -> Mono.empty()); } /** @@ -3545,39 +3772,39 @@ public Mono deleteCredentialAsync(UUID credentialId) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteCredentialAsync(UUID credentialId, Context context) { - return deleteCredentialWithResponseAsync(credentialId, context).flatMap((Response res) -> Mono.empty()); + return deleteCredentialWithResponseAsync(credentialId, context).flatMap(ignored -> Mono.empty()); } /** * Delete a data source credential. * * @param credentialId Data source credential unique ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteCredential(UUID credentialId) { - deleteCredentialAsync(credentialId).block(); + public Response deleteCredentialWithResponse(UUID credentialId, Context context) { + return deleteCredentialWithResponseAsync(credentialId, context).block(); } /** * Delete a data source credential. * * @param credentialId Data source credential unique ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteCredentialWithResponse(UUID credentialId, Context context) { - return deleteCredentialWithResponseAsync(credentialId, context).block(); + public void deleteCredential(UUID credentialId) { + deleteCredentialWithResponse(credentialId, Context.NONE); } /** @@ -3587,7 +3814,7 @@ public Response deleteCredentialWithResponse(UUID credentialId, Context co * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a data source credential. + * @return a data source credential along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getCredentialWithResponseAsync(UUID credentialId) { @@ -3604,7 +3831,7 @@ public Mono> getCredentialWithResponseAsync(UUID * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a data source credential. + * @return a data source credential along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getCredentialWithResponseAsync(UUID credentialId, Context context) { @@ -3619,19 +3846,11 @@ public Mono> getCredentialWithResponseAsync(UUID * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a data source credential. + * @return a data source credential on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getCredentialAsync(UUID credentialId) { - return getCredentialWithResponseAsync(credentialId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return getCredentialWithResponseAsync(credentialId).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -3642,48 +3861,40 @@ public Mono getCredentialAsync(UUID credentialId) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a data source credential. + * @return a data source credential on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getCredentialAsync(UUID credentialId, Context context) { - return getCredentialWithResponseAsync(credentialId, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return getCredentialWithResponseAsync(credentialId, context).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Get a data source credential. * * @param credentialId Data source credential unique ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a data source credential. + * @return a data source credential along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DataSourceCredential getCredential(UUID credentialId) { - return getCredentialAsync(credentialId).block(); + public Response getCredentialWithResponse(UUID credentialId, Context context) { + return getCredentialWithResponseAsync(credentialId, context).block(); } /** * Get a data source credential. * * @param credentialId Data source credential unique ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a data source credential. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getCredentialWithResponse(UUID credentialId, Context context) { - return getCredentialWithResponseAsync(credentialId, context).block(); + public DataSourceCredential getCredential(UUID credentialId) { + return getCredentialWithResponse(credentialId, Context.NONE).getValue(); } /** @@ -3699,7 +3910,7 @@ public Response getCredentialWithResponse(UUID credentialI * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> listDataFeedsSinglePageAsync( @@ -3749,7 +3960,7 @@ public Mono> listDataFeedsSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> listDataFeedsSinglePageAsync( @@ -3797,7 +4008,7 @@ public Mono> listDataFeedsSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listDataFeedsAsync( @@ -3829,7 +4040,7 @@ public PagedFlux listDataFeedsAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listDataFeedsAsync( @@ -3868,7 +4079,67 @@ public PagedFlux listDataFeedsAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse listDataFeedsSinglePage( + String dataFeedName, + DataSourceType dataSourceType, + Granularity granularityName, + EntityStatus status, + String creator, + Integer skip, + Integer maxpagesize) { + return listDataFeedsSinglePageAsync( + dataFeedName, dataSourceType, granularityName, status, creator, skip, maxpagesize) + .block(); + } + + /** + * List all data feeds. + * + * @param dataFeedName filter data feed by its name. + * @param dataSourceType filter data feed by its source type. + * @param granularityName filter data feed by its granularity. + * @param status filter data feed by its status. + * @param creator filter data feed by its creator. + * @param skip for paging, skipped number. + * @param maxpagesize the maximum number of items in one page. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse listDataFeedsSinglePage( + String dataFeedName, + DataSourceType dataSourceType, + Granularity granularityName, + EntityStatus status, + String creator, + Integer skip, + Integer maxpagesize, + Context context) { + return listDataFeedsSinglePageAsync( + dataFeedName, dataSourceType, granularityName, status, creator, skip, maxpagesize, context) + .block(); + } + + /** + * List all data feeds. + * + * @param dataFeedName filter data feed by its name. + * @param dataSourceType filter data feed by its source type. + * @param granularityName filter data feed by its granularity. + * @param status filter data feed by its status. + * @param creator filter data feed by its creator. + * @param skip for paging, skipped number. + * @param maxpagesize the maximum number of items in one page. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listDataFeeds( @@ -3897,7 +4168,7 @@ public PagedIterable listDataFeeds( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listDataFeeds( @@ -3921,7 +4192,7 @@ public PagedIterable listDataFeeds( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createDataFeedWithResponseAsync(DataFeedDetail body) { @@ -3937,7 +4208,7 @@ public Mono createDataFeedWithResponseAsync(DataFeedDeta * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createDataFeedWithResponseAsync(DataFeedDetail body, Context context) { @@ -3952,11 +4223,11 @@ public Mono createDataFeedWithResponseAsync(DataFeedDeta * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createDataFeedAsync(DataFeedDetail body) { - return createDataFeedWithResponseAsync(body).flatMap((CreateDataFeedResponse res) -> Mono.empty()); + return createDataFeedWithResponseAsync(body).flatMap(ignored -> Mono.empty()); } /** @@ -3967,39 +4238,39 @@ public Mono createDataFeedAsync(DataFeedDetail body) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createDataFeedAsync(DataFeedDetail body, Context context) { - return createDataFeedWithResponseAsync(body, context).flatMap((CreateDataFeedResponse res) -> Mono.empty()); + return createDataFeedWithResponseAsync(body, context).flatMap(ignored -> Mono.empty()); } /** * Create a new data feed. * * @param body parameters to create a data feed. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void createDataFeed(DataFeedDetail body) { - createDataFeedAsync(body).block(); + public CreateDataFeedResponse createDataFeedWithResponse(DataFeedDetail body, Context context) { + return createDataFeedWithResponseAsync(body, context).block(); } /** * Create a new data feed. * * @param body parameters to create a data feed. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createDataFeedWithResponse(DataFeedDetail body, Context context) { - return createDataFeedWithResponseAsync(body, context).block(); + public void createDataFeed(DataFeedDetail body) { + createDataFeedWithResponse(body, Context.NONE); } /** @@ -4009,7 +4280,7 @@ public Response createDataFeedWithResponse(DataFeedDetail body, Context co * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a data feed by its id. + * @return a data feed by its id along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getDataFeedByIdWithResponseAsync(UUID dataFeedId) { @@ -4026,7 +4297,7 @@ public Mono> getDataFeedByIdWithResponseAsync(UUID data * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a data feed by its id. + * @return a data feed by its id along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getDataFeedByIdWithResponseAsync(UUID dataFeedId, Context context) { @@ -4041,19 +4312,11 @@ public Mono> getDataFeedByIdWithResponseAsync(UUID data * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a data feed by its id. + * @return a data feed by its id on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getDataFeedByIdAsync(UUID dataFeedId) { - return getDataFeedByIdWithResponseAsync(dataFeedId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return getDataFeedByIdWithResponseAsync(dataFeedId).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -4064,48 +4327,40 @@ public Mono getDataFeedByIdAsync(UUID dataFeedId) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a data feed by its id. + * @return a data feed by its id on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getDataFeedByIdAsync(UUID dataFeedId, Context context) { - return getDataFeedByIdWithResponseAsync(dataFeedId, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return getDataFeedByIdWithResponseAsync(dataFeedId, context).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Get a data feed by its id. * * @param dataFeedId The data feed unique id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a data feed by its id. + * @return a data feed by its id along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DataFeedDetail getDataFeedById(UUID dataFeedId) { - return getDataFeedByIdAsync(dataFeedId).block(); + public Response getDataFeedByIdWithResponse(UUID dataFeedId, Context context) { + return getDataFeedByIdWithResponseAsync(dataFeedId, context).block(); } /** * Get a data feed by its id. * * @param dataFeedId The data feed unique id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a data feed by its id. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getDataFeedByIdWithResponse(UUID dataFeedId, Context context) { - return getDataFeedByIdWithResponseAsync(dataFeedId, context).block(); + public DataFeedDetail getDataFeedById(UUID dataFeedId) { + return getDataFeedByIdWithResponse(dataFeedId, Context.NONE).getValue(); } /** @@ -4116,7 +4371,7 @@ public Response getDataFeedByIdWithResponse(UUID dataFeedId, Con * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> updateDataFeedWithResponseAsync(UUID dataFeedId, DataFeedDetailPatch body) { @@ -4134,7 +4389,7 @@ public Mono> updateDataFeedWithResponseAsync(UUID dataF * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> updateDataFeedWithResponseAsync( @@ -4151,19 +4406,11 @@ public Mono> updateDataFeedWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono updateDataFeedAsync(UUID dataFeedId, DataFeedDetailPatch body) { - return updateDataFeedWithResponseAsync(dataFeedId, body) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return updateDataFeedWithResponseAsync(dataFeedId, body).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -4175,19 +4422,12 @@ public Mono updateDataFeedAsync(UUID dataFeedId, DataFeedDetailP * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono updateDataFeedAsync(UUID dataFeedId, DataFeedDetailPatch body, Context context) { return updateDataFeedWithResponseAsync(dataFeedId, body, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -4195,14 +4435,16 @@ public Mono updateDataFeedAsync(UUID dataFeedId, DataFeedDetailP * * @param dataFeedId The data feed unique id. * @param body parameters to update a data feed. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DataFeedDetail updateDataFeed(UUID dataFeedId, DataFeedDetailPatch body) { - return updateDataFeedAsync(dataFeedId, body).block(); + public Response updateDataFeedWithResponse( + UUID dataFeedId, DataFeedDetailPatch body, Context context) { + return updateDataFeedWithResponseAsync(dataFeedId, body, context).block(); } /** @@ -4210,16 +4452,14 @@ public DataFeedDetail updateDataFeed(UUID dataFeedId, DataFeedDetailPatch body) * * @param dataFeedId The data feed unique id. * @param body parameters to update a data feed. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateDataFeedWithResponse( - UUID dataFeedId, DataFeedDetailPatch body, Context context) { - return updateDataFeedWithResponseAsync(dataFeedId, body, context).block(); + public DataFeedDetail updateDataFeed(UUID dataFeedId, DataFeedDetailPatch body) { + return updateDataFeedWithResponse(dataFeedId, body, Context.NONE).getValue(); } /** @@ -4229,7 +4469,7 @@ public Response updateDataFeedWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> deleteDataFeedWithResponseAsync(UUID dataFeedId) { @@ -4245,7 +4485,7 @@ public Mono> deleteDataFeedWithResponseAsync(UUID dataFeedId) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> deleteDataFeedWithResponseAsync(UUID dataFeedId, Context context) { @@ -4260,11 +4500,11 @@ public Mono> deleteDataFeedWithResponseAsync(UUID dataFeedId, Con * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteDataFeedAsync(UUID dataFeedId) { - return deleteDataFeedWithResponseAsync(dataFeedId).flatMap((Response res) -> Mono.empty()); + return deleteDataFeedWithResponseAsync(dataFeedId).flatMap(ignored -> Mono.empty()); } /** @@ -4275,39 +4515,39 @@ public Mono deleteDataFeedAsync(UUID dataFeedId) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteDataFeedAsync(UUID dataFeedId, Context context) { - return deleteDataFeedWithResponseAsync(dataFeedId, context).flatMap((Response res) -> Mono.empty()); + return deleteDataFeedWithResponseAsync(dataFeedId, context).flatMap(ignored -> Mono.empty()); } /** * Delete a data feed. * * @param dataFeedId The data feed unique id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteDataFeed(UUID dataFeedId) { - deleteDataFeedAsync(dataFeedId).block(); + public Response deleteDataFeedWithResponse(UUID dataFeedId, Context context) { + return deleteDataFeedWithResponseAsync(dataFeedId, context).block(); } /** * Delete a data feed. * * @param dataFeedId The data feed unique id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteDataFeedWithResponse(UUID dataFeedId, Context context) { - return deleteDataFeedWithResponseAsync(dataFeedId, context).block(); + public void deleteDataFeed(UUID dataFeedId) { + deleteDataFeedWithResponse(dataFeedId, Context.NONE); } /** @@ -4317,7 +4557,7 @@ public Response deleteDataFeedWithResponse(UUID dataFeedId, Context contex * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a metric feedback by its id. + * @return a metric feedback by its id along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getMetricFeedbackWithResponseAsync(UUID feedbackId) { @@ -4334,7 +4574,7 @@ public Mono> getMetricFeedbackWithResponseAsync(UUID fe * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a metric feedback by its id. + * @return a metric feedback by its id along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getMetricFeedbackWithResponseAsync(UUID feedbackId, Context context) { @@ -4349,19 +4589,11 @@ public Mono> getMetricFeedbackWithResponseAsync(UUID fe * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a metric feedback by its id. + * @return a metric feedback by its id on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getMetricFeedbackAsync(UUID feedbackId) { - return getMetricFeedbackWithResponseAsync(feedbackId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return getMetricFeedbackWithResponseAsync(feedbackId).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -4372,48 +4604,40 @@ public Mono getMetricFeedbackAsync(UUID feedbackId) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a metric feedback by its id. + * @return a metric feedback by its id on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getMetricFeedbackAsync(UUID feedbackId, Context context) { - return getMetricFeedbackWithResponseAsync(feedbackId, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return getMetricFeedbackWithResponseAsync(feedbackId, context).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Get a metric feedback by its id. * * @param feedbackId the unique feedback ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a metric feedback by its id. + * @return a metric feedback by its id along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MetricFeedback getMetricFeedback(UUID feedbackId) { - return getMetricFeedbackAsync(feedbackId).block(); + public Response getMetricFeedbackWithResponse(UUID feedbackId, Context context) { + return getMetricFeedbackWithResponseAsync(feedbackId, context).block(); } /** * Get a metric feedback by its id. * * @param feedbackId the unique feedback ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a metric feedback by its id. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getMetricFeedbackWithResponse(UUID feedbackId, Context context) { - return getMetricFeedbackWithResponseAsync(feedbackId, context).block(); + public MetricFeedback getMetricFeedback(UUID feedbackId) { + return getMetricFeedbackWithResponse(feedbackId, Context.NONE).getValue(); } /** @@ -4425,7 +4649,7 @@ public Response getMetricFeedbackWithResponse(UUID feedbackId, C * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> listMetricFeedbacksSinglePageAsync( @@ -4456,7 +4680,7 @@ public Mono> listMetricFeedbacksSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> listMetricFeedbacksSinglePageAsync( @@ -4483,7 +4707,7 @@ public Mono> listMetricFeedbacksSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listMetricFeedbacksAsync( @@ -4503,7 +4727,7 @@ public PagedFlux listMetricFeedbacksAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listMetricFeedbacksAsync( @@ -4522,7 +4746,42 @@ public PagedFlux listMetricFeedbacksAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse listMetricFeedbacksSinglePage( + MetricFeedbackFilter body, Integer skip, Integer maxpagesize) { + return listMetricFeedbacksSinglePageAsync(body, skip, maxpagesize).block(); + } + + /** + * List feedback on the given metric. + * + * @param body metric feedback filter. + * @param skip for paging, skipped number. + * @param maxpagesize the maximum number of items in one page. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse listMetricFeedbacksSinglePage( + MetricFeedbackFilter body, Integer skip, Integer maxpagesize, Context context) { + return listMetricFeedbacksSinglePageAsync(body, skip, maxpagesize, context).block(); + } + + /** + * List feedback on the given metric. + * + * @param body metric feedback filter. + * @param skip for paging, skipped number. + * @param maxpagesize the maximum number of items in one page. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listMetricFeedbacks( @@ -4540,7 +4799,7 @@ public PagedIterable listMetricFeedbacks( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listMetricFeedbacks( @@ -4555,7 +4814,7 @@ public PagedIterable listMetricFeedbacks( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createMetricFeedbackWithResponseAsync(MetricFeedback body) { @@ -4571,7 +4830,7 @@ public Mono createMetricFeedbackWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createMetricFeedbackWithResponseAsync( @@ -4587,11 +4846,11 @@ public Mono createMetricFeedbackWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createMetricFeedbackAsync(MetricFeedback body) { - return createMetricFeedbackWithResponseAsync(body).flatMap((CreateMetricFeedbackResponse res) -> Mono.empty()); + return createMetricFeedbackWithResponseAsync(body).flatMap(ignored -> Mono.empty()); } /** @@ -4602,40 +4861,39 @@ public Mono createMetricFeedbackAsync(MetricFeedback body) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createMetricFeedbackAsync(MetricFeedback body, Context context) { - return createMetricFeedbackWithResponseAsync(body, context) - .flatMap((CreateMetricFeedbackResponse res) -> Mono.empty()); + return createMetricFeedbackWithResponseAsync(body, context).flatMap(ignored -> Mono.empty()); } /** * Create a new metric feedback. * * @param body metric feedback. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void createMetricFeedback(MetricFeedback body) { - createMetricFeedbackAsync(body).block(); + public CreateMetricFeedbackResponse createMetricFeedbackWithResponse(MetricFeedback body, Context context) { + return createMetricFeedbackWithResponseAsync(body, context).block(); } /** * Create a new metric feedback. * * @param body metric feedback. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createMetricFeedbackWithResponse(MetricFeedback body, Context context) { - return createMetricFeedbackWithResponseAsync(body, context).block(); + public void createMetricFeedback(MetricFeedback body) { + createMetricFeedbackWithResponse(body, Context.NONE); } /** @@ -4647,7 +4905,7 @@ public Response createMetricFeedbackWithResponse(MetricFeedback body, Cont * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> listHooksSinglePageAsync(String hookName, Integer skip, Integer maxpagesize) { @@ -4675,7 +4933,7 @@ public Mono> listHooksSinglePageAsync(String hookName, I * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> listHooksSinglePageAsync( @@ -4702,7 +4960,7 @@ public Mono> listHooksSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listHooksAsync(String hookName, Integer skip, Integer maxpagesize) { @@ -4721,7 +4979,7 @@ public PagedFlux listHooksAsync(String hookName, Integer skip, Integer * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux listHooksAsync(String hookName, Integer skip, Integer maxpagesize, Context context) { @@ -4739,11 +4997,11 @@ public PagedFlux listHooksAsync(String hookName, Integer skip, Integer * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listHooks(String hookName, Integer skip, Integer maxpagesize) { - return new PagedIterable<>(listHooksAsync(hookName, skip, maxpagesize)); + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse listHooksSinglePage(String hookName, Integer skip, Integer maxpagesize) { + return listHooksSinglePageAsync(hookName, skip, maxpagesize).block(); } /** @@ -4756,37 +5014,71 @@ public PagedIterable listHooks(String hookName, Integer skip, Integer * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse}. */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listHooks(String hookName, Integer skip, Integer maxpagesize, Context context) { - return new PagedIterable<>(listHooksAsync(hookName, skip, maxpagesize, context)); + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse listHooksSinglePage( + String hookName, Integer skip, Integer maxpagesize, Context context) { + return listHooksSinglePageAsync(hookName, skip, maxpagesize, context).block(); } /** - * Create a new hook. + * List all hooks. * - * @param body Create hook request. + * @param hookName filter hook by its name. + * @param skip for paging, skipped number. + * @param maxpagesize the maximum number of items in one page. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the paginated response with {@link PagedIterable}. */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Mono createHookWithResponseAsync(HookInfo body) { - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.createHook(this.getEndpoint(), body, accept, context)); + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listHooks(String hookName, Integer skip, Integer maxpagesize) { + return new PagedIterable<>(listHooksAsync(hookName, skip, maxpagesize)); } /** - * Create a new hook. + * List all hooks. * - * @param body Create hook request. + * @param hookName filter hook by its name. + * @param skip for paging, skipped number. + * @param maxpagesize the maximum number of items in one page. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listHooks(String hookName, Integer skip, Integer maxpagesize, Context context) { + return new PagedIterable<>(listHooksAsync(hookName, skip, maxpagesize, context)); + } + + /** + * Create a new hook. + * + * @param body Create hook request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createHookWithResponseAsync(HookInfo body) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.createHook(this.getEndpoint(), body, accept, context)); + } + + /** + * Create a new hook. + * + * @param body Create hook request. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createHookWithResponseAsync(HookInfo body, Context context) { @@ -4801,11 +5093,11 @@ public Mono createHookWithResponseAsync(HookInfo body, Conte * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createHookAsync(HookInfo body) { - return createHookWithResponseAsync(body).flatMap((CreateHookResponse res) -> Mono.empty()); + return createHookWithResponseAsync(body).flatMap(ignored -> Mono.empty()); } /** @@ -4816,39 +5108,39 @@ public Mono createHookAsync(HookInfo body) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono createHookAsync(HookInfo body, Context context) { - return createHookWithResponseAsync(body, context).flatMap((CreateHookResponse res) -> Mono.empty()); + return createHookWithResponseAsync(body, context).flatMap(ignored -> Mono.empty()); } /** * Create a new hook. * * @param body Create hook request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void createHook(HookInfo body) { - createHookAsync(body).block(); + public CreateHookResponse createHookWithResponse(HookInfo body, Context context) { + return createHookWithResponseAsync(body, context).block(); } /** * Create a new hook. * * @param body Create hook request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createHookWithResponse(HookInfo body, Context context) { - return createHookWithResponseAsync(body, context).block(); + public void createHook(HookInfo body) { + createHookWithResponse(body, Context.NONE); } /** @@ -4858,7 +5150,7 @@ public Response createHookWithResponse(HookInfo body, Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a hook by its id. + * @return a hook by its id along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getHookWithResponseAsync(UUID hookId) { @@ -4874,7 +5166,7 @@ public Mono> getHookWithResponseAsync(UUID hookId) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a hook by its id. + * @return a hook by its id along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getHookWithResponseAsync(UUID hookId, Context context) { @@ -4889,19 +5181,11 @@ public Mono> getHookWithResponseAsync(UUID hookId, Context co * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a hook by its id. + * @return a hook by its id on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getHookAsync(UUID hookId) { - return getHookWithResponseAsync(hookId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return getHookWithResponseAsync(hookId).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -4912,48 +5196,40 @@ public Mono getHookAsync(UUID hookId) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a hook by its id. + * @return a hook by its id on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getHookAsync(UUID hookId, Context context) { - return getHookWithResponseAsync(hookId, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return getHookWithResponseAsync(hookId, context).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Get a hook by its id. * * @param hookId Hook unique ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a hook by its id. + * @return a hook by its id along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public HookInfo getHook(UUID hookId) { - return getHookAsync(hookId).block(); + public Response getHookWithResponse(UUID hookId, Context context) { + return getHookWithResponseAsync(hookId, context).block(); } /** * Get a hook by its id. * * @param hookId Hook unique ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a hook by its id. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getHookWithResponse(UUID hookId, Context context) { - return getHookWithResponseAsync(hookId, context).block(); + public HookInfo getHook(UUID hookId) { + return getHookWithResponse(hookId, Context.NONE).getValue(); } /** @@ -4964,7 +5240,7 @@ public Response getHookWithResponse(UUID hookId, Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> updateHookWithResponseAsync(UUID hookId, HookInfoPatch body) { @@ -4981,7 +5257,7 @@ public Mono> updateHookWithResponseAsync(UUID hookId, HookInf * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> updateHookWithResponseAsync(UUID hookId, HookInfoPatch body, Context context) { @@ -4997,19 +5273,11 @@ public Mono> updateHookWithResponseAsync(UUID hookId, HookInf * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono updateHookAsync(UUID hookId, HookInfoPatch body) { - return updateHookWithResponseAsync(hookId, body) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return updateHookWithResponseAsync(hookId, body).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -5021,19 +5289,11 @@ public Mono updateHookAsync(UUID hookId, HookInfoPatch body) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono updateHookAsync(UUID hookId, HookInfoPatch body, Context context) { - return updateHookWithResponseAsync(hookId, body, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return updateHookWithResponseAsync(hookId, body, context).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -5041,14 +5301,15 @@ public Mono updateHookAsync(UUID hookId, HookInfoPatch body, Context c * * @param hookId Hook unique ID. * @param body Update hook request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public HookInfo updateHook(UUID hookId, HookInfoPatch body) { - return updateHookAsync(hookId, body).block(); + public Response updateHookWithResponse(UUID hookId, HookInfoPatch body, Context context) { + return updateHookWithResponseAsync(hookId, body, context).block(); } /** @@ -5056,15 +5317,14 @@ public HookInfo updateHook(UUID hookId, HookInfoPatch body) { * * @param hookId Hook unique ID. * @param body Update hook request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateHookWithResponse(UUID hookId, HookInfoPatch body, Context context) { - return updateHookWithResponseAsync(hookId, body, context).block(); + public HookInfo updateHook(UUID hookId, HookInfoPatch body) { + return updateHookWithResponse(hookId, body, Context.NONE).getValue(); } /** @@ -5074,7 +5334,7 @@ public Response updateHookWithResponse(UUID hookId, HookInfoPatch body * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> deleteHookWithResponseAsync(UUID hookId) { @@ -5090,7 +5350,7 @@ public Mono> deleteHookWithResponseAsync(UUID hookId) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> deleteHookWithResponseAsync(UUID hookId, Context context) { @@ -5105,11 +5365,11 @@ public Mono> deleteHookWithResponseAsync(UUID hookId, Context con * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteHookAsync(UUID hookId) { - return deleteHookWithResponseAsync(hookId).flatMap((Response res) -> Mono.empty()); + return deleteHookWithResponseAsync(hookId).flatMap(ignored -> Mono.empty()); } /** @@ -5120,39 +5380,39 @@ public Mono deleteHookAsync(UUID hookId) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono deleteHookAsync(UUID hookId, Context context) { - return deleteHookWithResponseAsync(hookId, context).flatMap((Response res) -> Mono.empty()); + return deleteHookWithResponseAsync(hookId, context).flatMap(ignored -> Mono.empty()); } /** * Delete a hook. * * @param hookId Hook unique ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void deleteHook(UUID hookId) { - deleteHookAsync(hookId).block(); + public Response deleteHookWithResponse(UUID hookId, Context context) { + return deleteHookWithResponseAsync(hookId, context).block(); } /** * Delete a hook. * * @param hookId Hook unique ID. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteHookWithResponse(UUID hookId, Context context) { - return deleteHookWithResponseAsync(hookId, context).block(); + public void deleteHook(UUID hookId) { + deleteHookWithResponse(hookId, Context.NONE); } /** @@ -5165,7 +5425,8 @@ public Response deleteHookWithResponse(UUID hookId, Context context) { * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data ingestion status by data feed. + * @return data ingestion status by data feed along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getDataFeedIngestionStatusSinglePageAsync( @@ -5197,7 +5458,8 @@ public Mono> getDataFeedIngestionStatusSi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data ingestion status by data feed. + * @return data ingestion status by data feed along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getDataFeedIngestionStatusSinglePageAsync( @@ -5226,7 +5488,7 @@ public Mono> getDataFeedIngestionStatusSi * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data ingestion status by data feed. + * @return data ingestion status by data feed as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux getDataFeedIngestionStatusAsync( @@ -5247,7 +5509,7 @@ public PagedFlux getDataFeedIngestionStatusAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data ingestion status by data feed. + * @return data ingestion status by data feed as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux getDataFeedIngestionStatusAsync( @@ -5267,7 +5529,44 @@ public PagedFlux getDataFeedIngestionStatusAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data ingestion status by data feed. + * @return data ingestion status by data feed along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getDataFeedIngestionStatusSinglePage( + UUID dataFeedId, IngestionStatusQueryOptions body, Integer skip, Integer maxpagesize) { + return getDataFeedIngestionStatusSinglePageAsync(dataFeedId, body, skip, maxpagesize).block(); + } + + /** + * Get data ingestion status by data feed. + * + * @param dataFeedId The data feed unique id. + * @param body The query time range. + * @param skip for paging, skipped number. + * @param maxpagesize the maximum number of items in one page. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return data ingestion status by data feed along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getDataFeedIngestionStatusSinglePage( + UUID dataFeedId, IngestionStatusQueryOptions body, Integer skip, Integer maxpagesize, Context context) { + return getDataFeedIngestionStatusSinglePageAsync(dataFeedId, body, skip, maxpagesize, context).block(); + } + + /** + * Get data ingestion status by data feed. + * + * @param dataFeedId The data feed unique id. + * @param body The query time range. + * @param skip for paging, skipped number. + * @param maxpagesize the maximum number of items in one page. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return data ingestion status by data feed as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable getDataFeedIngestionStatus( @@ -5286,7 +5585,7 @@ public PagedIterable getDataFeedIngestionStatus( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data ingestion status by data feed. + * @return data ingestion status by data feed as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable getDataFeedIngestionStatus( @@ -5302,7 +5601,7 @@ public PagedIterable getDataFeedIngestionStatus( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> resetDataFeedIngestionStatusWithResponseAsync( @@ -5321,7 +5620,7 @@ public Mono> resetDataFeedIngestionStatusWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> resetDataFeedIngestionStatusWithResponseAsync( @@ -5338,12 +5637,11 @@ public Mono> resetDataFeedIngestionStatusWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono resetDataFeedIngestionStatusAsync(UUID dataFeedId, IngestionProgressResetOptions body) { - return resetDataFeedIngestionStatusWithResponseAsync(dataFeedId, body) - .flatMap((Response res) -> Mono.empty()); + return resetDataFeedIngestionStatusWithResponseAsync(dataFeedId, body).flatMap(ignored -> Mono.empty()); } /** @@ -5355,13 +5653,13 @@ public Mono resetDataFeedIngestionStatusAsync(UUID dataFeedId, IngestionPr * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the completion. + * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono resetDataFeedIngestionStatusAsync( UUID dataFeedId, IngestionProgressResetOptions body, Context context) { return resetDataFeedIngestionStatusWithResponseAsync(dataFeedId, body, context) - .flatMap((Response res) -> Mono.empty()); + .flatMap(ignored -> Mono.empty()); } /** @@ -5369,13 +5667,16 @@ public Mono resetDataFeedIngestionStatusAsync( * * @param dataFeedId The data feed unique id. * @param body The backfill time range. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void resetDataFeedIngestionStatus(UUID dataFeedId, IngestionProgressResetOptions body) { - resetDataFeedIngestionStatusAsync(dataFeedId, body).block(); + public Response resetDataFeedIngestionStatusWithResponse( + UUID dataFeedId, IngestionProgressResetOptions body, Context context) { + return resetDataFeedIngestionStatusWithResponseAsync(dataFeedId, body, context).block(); } /** @@ -5383,16 +5684,13 @@ public void resetDataFeedIngestionStatus(UUID dataFeedId, IngestionProgressReset * * @param dataFeedId The data feed unique id. * @param body The backfill time range. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response resetDataFeedIngestionStatusWithResponse( - UUID dataFeedId, IngestionProgressResetOptions body, Context context) { - return resetDataFeedIngestionStatusWithResponseAsync(dataFeedId, body, context).block(); + public void resetDataFeedIngestionStatus(UUID dataFeedId, IngestionProgressResetOptions body) { + resetDataFeedIngestionStatusWithResponse(dataFeedId, body, Context.NONE); } /** @@ -5402,7 +5700,8 @@ public Response resetDataFeedIngestionStatusWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data last success ingestion job timestamp by data feed. + * @return data last success ingestion job timestamp by data feed along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getIngestionProgressWithResponseAsync(UUID dataFeedId) { @@ -5419,7 +5718,8 @@ public Mono> getIngestionProgressWithRespons * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data last success ingestion job timestamp by data feed. + * @return data last success ingestion job timestamp by data feed along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getIngestionProgressWithResponseAsync( @@ -5435,19 +5735,11 @@ public Mono> getIngestionProgressWithRespons * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data last success ingestion job timestamp by data feed. + * @return data last success ingestion job timestamp by data feed on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getIngestionProgressAsync(UUID dataFeedId) { - return getIngestionProgressWithResponseAsync(dataFeedId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return getIngestionProgressWithResponseAsync(dataFeedId).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -5458,48 +5750,41 @@ public Mono getIngestionProgressAsync(UUID dataFeedId * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data last success ingestion job timestamp by data feed. + * @return data last success ingestion job timestamp by data feed on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getIngestionProgressAsync(UUID dataFeedId, Context context) { return getIngestionProgressWithResponseAsync(dataFeedId, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Get data last success ingestion job timestamp by data feed. * * @param dataFeedId The data feed unique id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data last success ingestion job timestamp by data feed. + * @return data last success ingestion job timestamp by data feed along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DataFeedIngestionProgress getIngestionProgress(UUID dataFeedId) { - return getIngestionProgressAsync(dataFeedId).block(); + public Response getIngestionProgressWithResponse(UUID dataFeedId, Context context) { + return getIngestionProgressWithResponseAsync(dataFeedId, context).block(); } /** * Get data last success ingestion job timestamp by data feed. * * @param dataFeedId The data feed unique id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return data last success ingestion job timestamp by data feed. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getIngestionProgressWithResponse(UUID dataFeedId, Context context) { - return getIngestionProgressWithResponseAsync(dataFeedId, context).block(); + public DataFeedIngestionProgress getIngestionProgress(UUID dataFeedId) { + return getIngestionProgressWithResponse(dataFeedId, Context.NONE).getValue(); } /** @@ -5510,7 +5795,7 @@ public Response getIngestionProgressWithResponse(UUID * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return time series data from metric. + * @return time series data from metric along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getMetricDataWithResponseAsync(UUID metricId, MetricDataQueryOptions body) { @@ -5528,7 +5813,7 @@ public Mono> getMetricDataWithResponseAsync(UUID metric * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return time series data from metric. + * @return time series data from metric along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getMetricDataWithResponseAsync( @@ -5545,19 +5830,11 @@ public Mono> getMetricDataWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return time series data from metric. + * @return time series data from metric on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getMetricDataAsync(UUID metricId, MetricDataQueryOptions body) { - return getMetricDataWithResponseAsync(metricId, body) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return getMetricDataWithResponseAsync(metricId, body).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -5569,19 +5846,11 @@ public Mono getMetricDataAsync(UUID metricId, MetricDataQueryOpt * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return time series data from metric. + * @return time series data from metric on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono getMetricDataAsync(UUID metricId, MetricDataQueryOptions body, Context context) { - return getMetricDataWithResponseAsync(metricId, body, context) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return getMetricDataWithResponseAsync(metricId, body, context).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -5589,14 +5858,16 @@ public Mono getMetricDataAsync(UUID metricId, MetricDataQueryOpt * * @param metricId metric unique id. * @param body query time series data condition. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return time series data from metric. + * @return time series data from metric along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public MetricDataList getMetricData(UUID metricId, MetricDataQueryOptions body) { - return getMetricDataAsync(metricId, body).block(); + public Response getMetricDataWithResponse( + UUID metricId, MetricDataQueryOptions body, Context context) { + return getMetricDataWithResponseAsync(metricId, body, context).block(); } /** @@ -5604,16 +5875,14 @@ public MetricDataList getMetricData(UUID metricId, MetricDataQueryOptions body) * * @param metricId metric unique id. * @param body query time series data condition. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return time series data from metric. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getMetricDataWithResponse( - UUID metricId, MetricDataQueryOptions body, Context context) { - return getMetricDataWithResponseAsync(metricId, body, context).block(); + public MetricDataList getMetricData(UUID metricId, MetricDataQueryOptions body) { + return getMetricDataWithResponse(metricId, body, Context.NONE).getValue(); } /** @@ -5626,7 +5895,7 @@ public Response getMetricDataWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getMetricSeriesSinglePageAsync( @@ -5658,7 +5927,7 @@ public Mono> getMetricSeriesSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getMetricSeriesSinglePageAsync( @@ -5686,7 +5955,7 @@ public Mono> getMetricSeriesSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux getMetricSeriesAsync( @@ -5707,7 +5976,7 @@ public PagedFlux getMetricSeriesAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux getMetricSeriesAsync( @@ -5727,7 +5996,44 @@ public PagedFlux getMetricSeriesAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getMetricSeriesSinglePage( + UUID metricId, MetricSeriesQueryOptions body, Integer skip, Integer maxpagesize) { + return getMetricSeriesSinglePageAsync(metricId, body, skip, maxpagesize).block(); + } + + /** + * List series (dimension combinations) from metric. + * + * @param metricId metric unique id. + * @param body filter to query series. + * @param skip for paging, skipped number. + * @param maxpagesize the maximum number of items in one page. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getMetricSeriesSinglePage( + UUID metricId, MetricSeriesQueryOptions body, Integer skip, Integer maxpagesize, Context context) { + return getMetricSeriesSinglePageAsync(metricId, body, skip, maxpagesize, context).block(); + } + + /** + * List series (dimension combinations) from metric. + * + * @param metricId metric unique id. + * @param body filter to query series. + * @param skip for paging, skipped number. + * @param maxpagesize the maximum number of items in one page. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable getMetricSeries( @@ -5746,7 +6052,7 @@ public PagedIterable getMetricSeries( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable getMetricSeries( @@ -5764,7 +6070,7 @@ public PagedIterable getMetricSeries( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getMetricDimensionSinglePageAsync( @@ -5796,7 +6102,7 @@ public Mono> getMetricDimensionSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getMetricDimensionSinglePageAsync( @@ -5824,7 +6130,7 @@ public Mono> getMetricDimensionSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux getMetricDimensionAsync( @@ -5845,7 +6151,7 @@ public PagedFlux getMetricDimensionAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux getMetricDimensionAsync( @@ -5865,7 +6171,44 @@ public PagedFlux getMetricDimensionAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getMetricDimensionSinglePage( + UUID metricId, MetricDimensionQueryOptions body, Integer skip, Integer maxpagesize) { + return getMetricDimensionSinglePageAsync(metricId, body, skip, maxpagesize).block(); + } + + /** + * List dimension from certain metric. + * + * @param metricId metric unique id. + * @param body query dimension option. + * @param skip for paging, skipped number. + * @param maxpagesize the maximum number of items in one page. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getMetricDimensionSinglePage( + UUID metricId, MetricDimensionQueryOptions body, Integer skip, Integer maxpagesize, Context context) { + return getMetricDimensionSinglePageAsync(metricId, body, skip, maxpagesize, context).block(); + } + + /** + * List dimension from certain metric. + * + * @param metricId metric unique id. + * @param body query dimension option. + * @param skip for paging, skipped number. + * @param maxpagesize the maximum number of items in one page. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable getMetricDimension( @@ -5884,7 +6227,7 @@ public PagedIterable getMetricDimension( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable getMetricDimension( @@ -5901,7 +6244,7 @@ public PagedIterable getMetricDimension( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getAnomalyDetectionConfigurationsByMetricSinglePageAsync( @@ -5932,7 +6275,7 @@ public Mono> getAnomalyDetectionCon * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getAnomalyDetectionConfigurationsByMetricSinglePageAsync( @@ -5960,7 +6303,7 @@ public Mono> getAnomalyDetectionCon * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux getAnomalyDetectionConfigurationsByMetricAsync( @@ -5980,7 +6323,7 @@ public PagedFlux getAnomalyDetectionConfiguration * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux getAnomalyDetectionConfigurationsByMetricAsync( @@ -5999,7 +6342,42 @@ public PagedFlux getAnomalyDetectionConfiguration * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getAnomalyDetectionConfigurationsByMetricSinglePage( + UUID metricId, Integer skip, Integer maxpagesize) { + return getAnomalyDetectionConfigurationsByMetricSinglePageAsync(metricId, skip, maxpagesize).block(); + } + + /** + * List all anomaly detection configurations for specific metric. + * + * @param metricId metric unique id. + * @param skip for paging, skipped number. + * @param maxpagesize the maximum number of items in one page. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getAnomalyDetectionConfigurationsByMetricSinglePage( + UUID metricId, Integer skip, Integer maxpagesize, Context context) { + return getAnomalyDetectionConfigurationsByMetricSinglePageAsync(metricId, skip, maxpagesize, context).block(); + } + + /** + * List all anomaly detection configurations for specific metric. + * + * @param metricId metric unique id. + * @param skip for paging, skipped number. + * @param maxpagesize the maximum number of items in one page. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable getAnomalyDetectionConfigurationsByMetric( @@ -6017,7 +6395,7 @@ public PagedIterable getAnomalyDetectionConfigura * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable getAnomalyDetectionConfigurationsByMetric( @@ -6036,7 +6414,7 @@ public PagedIterable getAnomalyDetectionConfigura * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getEnrichmentStatusByMetricSinglePageAsync( @@ -6068,7 +6446,7 @@ public Mono> getEnrichmentStatusByMetricSinglePa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getEnrichmentStatusByMetricSinglePageAsync( @@ -6097,7 +6475,7 @@ public Mono> getEnrichmentStatusByMetricSinglePa * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux getEnrichmentStatusByMetricAsync( @@ -6118,7 +6496,7 @@ public PagedFlux getEnrichmentStatusByMetricAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedFlux getEnrichmentStatusByMetricAsync( @@ -6138,7 +6516,44 @@ public PagedFlux getEnrichmentStatusByMetricAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getEnrichmentStatusByMetricSinglePage( + UUID metricId, EnrichmentStatusQueryOption body, Integer skip, Integer maxpagesize) { + return getEnrichmentStatusByMetricSinglePageAsync(metricId, body, skip, maxpagesize).block(); + } + + /** + * Query anomaly detection status. + * + * @param metricId metric unique id. + * @param body query options. + * @param skip for paging, skipped number. + * @param maxpagesize the maximum number of items in one page. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getEnrichmentStatusByMetricSinglePage( + UUID metricId, EnrichmentStatusQueryOption body, Integer skip, Integer maxpagesize, Context context) { + return getEnrichmentStatusByMetricSinglePageAsync(metricId, body, skip, maxpagesize, context).block(); + } + + /** + * Query anomaly detection status. + * + * @param metricId metric unique id. + * @param body query options. + * @param skip for paging, skipped number. + * @param maxpagesize the maximum number of items in one page. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable getEnrichmentStatusByMetric( @@ -6157,7 +6572,7 @@ public PagedIterable getEnrichmentStatusByMetric( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable getEnrichmentStatusByMetric( @@ -6173,7 +6588,7 @@ public PagedIterable getEnrichmentStatusByMetric( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getAlertsByAnomalyAlertingConfigurationNextSinglePageAsync( @@ -6190,7 +6605,7 @@ public Mono> getAlertsByAnomalyAlertingConfiguration res.getStatusCode(), res.getHeaders(), res.getValue().getValue(), - res.getValue().getNextLink(), + null, null)); } @@ -6203,7 +6618,7 @@ public Mono> getAlertsByAnomalyAlertingConfiguration * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getAlertsByAnomalyAlertingConfigurationNextSinglePageAsync( @@ -6217,10 +6632,43 @@ public Mono> getAlertsByAnomalyAlertingConfiguration res.getStatusCode(), res.getHeaders(), res.getValue().getValue(), - res.getValue().getNextLink(), + null, null)); } + /** + * Query alerts under anomaly alerting configuration. + * + * @param nextLink the next link. + * @param body query alerting result request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getAlertsByAnomalyAlertingConfigurationNextSinglePage( + String nextLink, AlertingResultQuery body) { + return getAlertsByAnomalyAlertingConfigurationNextSinglePageAsync(nextLink, body).block(); + } + + /** + * Query alerts under anomaly alerting configuration. + * + * @param nextLink the next link. + * @param body query alerting result request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getAlertsByAnomalyAlertingConfigurationNextSinglePage( + String nextLink, AlertingResultQuery body, Context context) { + return getAlertsByAnomalyAlertingConfigurationNextSinglePageAsync(nextLink, body, context).block(); + } + /** * Query anomalies under anomaly detection configuration. * @@ -6229,7 +6677,7 @@ public Mono> getAlertsByAnomalyAlertingConfiguration * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getAnomaliesByAnomalyDetectionConfigurationNextSinglePageAsync( @@ -6246,7 +6694,7 @@ public Mono> getAnomaliesByAnomalyDetectionConfigur res.getStatusCode(), res.getHeaders(), res.getValue().getValue(), - res.getValue().getNextLink(), + null, null)); } @@ -6259,7 +6707,7 @@ public Mono> getAnomaliesByAnomalyDetectionConfigur * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getAnomaliesByAnomalyDetectionConfigurationNextSinglePageAsync( @@ -6274,10 +6722,43 @@ public Mono> getAnomaliesByAnomalyDetectionConfigur res.getStatusCode(), res.getHeaders(), res.getValue().getValue(), - res.getValue().getNextLink(), + null, null)); } + /** + * Query anomalies under anomaly detection configuration. + * + * @param nextLink the next link. + * @param body query detection anomaly result request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getAnomaliesByAnomalyDetectionConfigurationNextSinglePage( + String nextLink, DetectionAnomalyResultQuery body) { + return getAnomaliesByAnomalyDetectionConfigurationNextSinglePageAsync(nextLink, body).block(); + } + + /** + * Query anomalies under anomaly detection configuration. + * + * @param nextLink the next link. + * @param body query detection anomaly result request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getAnomaliesByAnomalyDetectionConfigurationNextSinglePage( + String nextLink, DetectionAnomalyResultQuery body, Context context) { + return getAnomaliesByAnomalyDetectionConfigurationNextSinglePageAsync(nextLink, body, context).block(); + } + /** * Query dimension values of anomalies. * @@ -6286,7 +6767,7 @@ public Mono> getAnomaliesByAnomalyDetectionConfigur * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getDimensionOfAnomaliesByAnomalyDetectionConfigurationNextSinglePageAsync( @@ -6303,7 +6784,7 @@ public Mono> getDimensionOfAnomaliesByAnomalyDetectionConf res.getStatusCode(), res.getHeaders(), res.getValue().getValue(), - res.getValue().getNextLink(), + null, null)); } @@ -6316,7 +6797,7 @@ public Mono> getDimensionOfAnomaliesByAnomalyDetectionConf * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getDimensionOfAnomaliesByAnomalyDetectionConfigurationNextSinglePageAsync( @@ -6331,10 +6812,44 @@ public Mono> getDimensionOfAnomaliesByAnomalyDetectionConf res.getStatusCode(), res.getHeaders(), res.getValue().getValue(), - res.getValue().getNextLink(), + null, null)); } + /** + * Query dimension values of anomalies. + * + * @param nextLink the next link. + * @param body query dimension values request. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getDimensionOfAnomaliesByAnomalyDetectionConfigurationNextSinglePage( + String nextLink, AnomalyDimensionQuery body) { + return getDimensionOfAnomaliesByAnomalyDetectionConfigurationNextSinglePageAsync(nextLink, body).block(); + } + + /** + * Query dimension values of anomalies. + * + * @param nextLink the next link. + * @param body query dimension values request. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getDimensionOfAnomaliesByAnomalyDetectionConfigurationNextSinglePage( + String nextLink, AnomalyDimensionQuery body, Context context) { + return getDimensionOfAnomaliesByAnomalyDetectionConfigurationNextSinglePageAsync(nextLink, body, context) + .block(); + } + /** * List feedback on the given metric. * @@ -6343,7 +6858,7 @@ public Mono> getDimensionOfAnomaliesByAnomalyDetectionConf * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> listMetricFeedbacksNextSinglePageAsync( @@ -6358,7 +6873,7 @@ public Mono> listMetricFeedbacksNextSinglePageAsyn res.getStatusCode(), res.getHeaders(), res.getValue().getValue(), - res.getValue().getNextLink(), + null, null)); } @@ -6371,7 +6886,7 @@ public Mono> listMetricFeedbacksNextSinglePageAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> listMetricFeedbacksNextSinglePageAsync( @@ -6385,10 +6900,42 @@ public Mono> listMetricFeedbacksNextSinglePageAsyn res.getStatusCode(), res.getHeaders(), res.getValue().getValue(), - res.getValue().getNextLink(), + null, null)); } + /** + * List feedback on the given metric. + * + * @param nextLink the next link. + * @param body metric feedback filter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse listMetricFeedbacksNextSinglePage(String nextLink, MetricFeedbackFilter body) { + return listMetricFeedbacksNextSinglePageAsync(nextLink, body).block(); + } + + /** + * List feedback on the given metric. + * + * @param nextLink the next link. + * @param body metric feedback filter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse listMetricFeedbacksNextSinglePage( + String nextLink, MetricFeedbackFilter body, Context context) { + return listMetricFeedbacksNextSinglePageAsync(nextLink, body, context).block(); + } + /** * Get data ingestion status by data feed. * @@ -6397,7 +6944,8 @@ public Mono> listMetricFeedbacksNextSinglePageAsyn * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data ingestion status by data feed. + * @return data ingestion status by data feed along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getDataFeedIngestionStatusNextSinglePageAsync( @@ -6414,7 +6962,7 @@ public Mono> getDataFeedIngestionStatusNe res.getStatusCode(), res.getHeaders(), res.getValue().getValue(), - res.getValue().getNextLink(), + null, null)); } @@ -6427,7 +6975,8 @@ public Mono> getDataFeedIngestionStatusNe * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return data ingestion status by data feed. + * @return data ingestion status by data feed along with {@link PagedResponse} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getDataFeedIngestionStatusNextSinglePageAsync( @@ -6441,10 +6990,43 @@ public Mono> getDataFeedIngestionStatusNe res.getStatusCode(), res.getHeaders(), res.getValue().getValue(), - res.getValue().getNextLink(), + null, null)); } + /** + * Get data ingestion status by data feed. + * + * @param nextLink the next link. + * @param body The query time range. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return data ingestion status by data feed along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getDataFeedIngestionStatusNextSinglePage( + String nextLink, IngestionStatusQueryOptions body) { + return getDataFeedIngestionStatusNextSinglePageAsync(nextLink, body).block(); + } + + /** + * Get data ingestion status by data feed. + * + * @param nextLink the next link. + * @param body The query time range. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return data ingestion status by data feed along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getDataFeedIngestionStatusNextSinglePage( + String nextLink, IngestionStatusQueryOptions body, Context context) { + return getDataFeedIngestionStatusNextSinglePageAsync(nextLink, body, context).block(); + } + /** * List series (dimension combinations) from metric. * @@ -6453,7 +7035,7 @@ public Mono> getDataFeedIngestionStatusNe * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getMetricSeriesNextSinglePageAsync( @@ -6468,7 +7050,7 @@ public Mono> getMetricSeriesNextSinglePageAsync( res.getStatusCode(), res.getHeaders(), res.getValue().getValue(), - res.getValue().getNextLink(), + null, null)); } @@ -6481,7 +7063,7 @@ public Mono> getMetricSeriesNextSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getMetricSeriesNextSinglePageAsync( @@ -6495,10 +7077,43 @@ public Mono> getMetricSeriesNextSinglePageAsync( res.getStatusCode(), res.getHeaders(), res.getValue().getValue(), - res.getValue().getNextLink(), + null, null)); } + /** + * List series (dimension combinations) from metric. + * + * @param nextLink the next link. + * @param body filter to query series. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getMetricSeriesNextSinglePage( + String nextLink, MetricSeriesQueryOptions body) { + return getMetricSeriesNextSinglePageAsync(nextLink, body).block(); + } + + /** + * List series (dimension combinations) from metric. + * + * @param nextLink the next link. + * @param body filter to query series. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getMetricSeriesNextSinglePage( + String nextLink, MetricSeriesQueryOptions body, Context context) { + return getMetricSeriesNextSinglePageAsync(nextLink, body, context).block(); + } + /** * List dimension from certain metric. * @@ -6507,7 +7122,7 @@ public Mono> getMetricSeriesNextSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getMetricDimensionNextSinglePageAsync( @@ -6522,8 +7137,8 @@ public Mono> getMetricDimensionNextSinglePageAsync( res.getStatusCode(), res.getHeaders(), res.getValue().getValue(), - res.getValue().getNextLink(), - null)); + null, + null)); } /** @@ -6535,7 +7150,7 @@ public Mono> getMetricDimensionNextSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getMetricDimensionNextSinglePageAsync( @@ -6549,8 +7164,40 @@ public Mono> getMetricDimensionNextSinglePageAsync( res.getStatusCode(), res.getHeaders(), res.getValue().getValue(), - res.getValue().getNextLink(), - null)); + null, + null)); + } + + /** + * List dimension from certain metric. + * + * @param nextLink the next link. + * @param body query dimension option. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getMetricDimensionNextSinglePage(String nextLink, MetricDimensionQueryOptions body) { + return getMetricDimensionNextSinglePageAsync(nextLink, body).block(); + } + + /** + * List dimension from certain metric. + * + * @param nextLink the next link. + * @param body query dimension option. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getMetricDimensionNextSinglePage( + String nextLink, MetricDimensionQueryOptions body, Context context) { + return getMetricDimensionNextSinglePageAsync(nextLink, body, context).block(); } /** @@ -6561,7 +7208,7 @@ public Mono> getMetricDimensionNextSinglePageAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getEnrichmentStatusByMetricNextSinglePageAsync( @@ -6578,8 +7225,8 @@ public Mono> getEnrichmentStatusByMetricNextSing res.getStatusCode(), res.getHeaders(), res.getValue().getValue(), - res.getValue().getNextLink(), - null)); + null, + null)); } /** @@ -6591,7 +7238,7 @@ public Mono> getEnrichmentStatusByMetricNextSing * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getEnrichmentStatusByMetricNextSinglePageAsync( @@ -6605,18 +7252,52 @@ public Mono> getEnrichmentStatusByMetricNextSing res.getStatusCode(), res.getHeaders(), res.getValue().getValue(), - res.getValue().getNextLink(), + null, null)); } + /** + * Query anomaly detection status. + * + * @param nextLink the next link. + * @param body query options. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getEnrichmentStatusByMetricNextSinglePage( + String nextLink, EnrichmentStatusQueryOption body) { + return getEnrichmentStatusByMetricNextSinglePageAsync(nextLink, body).block(); + } + + /** + * Query anomaly detection status. + * + * @param nextLink the next link. + * @param body query options. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getEnrichmentStatusByMetricNextSinglePage( + String nextLink, EnrichmentStatusQueryOption body, Context context) { + return getEnrichmentStatusByMetricNextSinglePageAsync(nextLink, body, context).block(); + } + /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getAnomaliesFromAlertByAnomalyAlertingConfigurationNextSinglePageAsync( @@ -6640,12 +7321,13 @@ public Mono> getAnomaliesFromAlertByAnomalyAlerting /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getAnomaliesFromAlertByAnomalyAlertingConfigurationNextSinglePageAsync( @@ -6667,11 +7349,45 @@ public Mono> getAnomaliesFromAlertByAnomalyAlerting /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getAnomaliesFromAlertByAnomalyAlertingConfigurationNextSinglePage( + String nextLink) { + return getAnomaliesFromAlertByAnomalyAlertingConfigurationNextSinglePageAsync(nextLink).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getAnomaliesFromAlertByAnomalyAlertingConfigurationNextSinglePage( + String nextLink, Context context) { + return getAnomaliesFromAlertByAnomalyAlertingConfigurationNextSinglePageAsync(nextLink, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getIncidentsFromAlertByAnomalyAlertingConfigurationNextSinglePageAsync( @@ -6695,12 +7411,13 @@ public Mono> getIncidentsFromAlertByAnomalyAlertin /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getIncidentsFromAlertByAnomalyAlertingConfigurationNextSinglePageAsync( @@ -6722,11 +7439,45 @@ public Mono> getIncidentsFromAlertByAnomalyAlertin /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getIncidentsFromAlertByAnomalyAlertingConfigurationNextSinglePage( + String nextLink) { + return getIncidentsFromAlertByAnomalyAlertingConfigurationNextSinglePageAsync(nextLink).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getIncidentsFromAlertByAnomalyAlertingConfigurationNextSinglePage( + String nextLink, Context context) { + return getIncidentsFromAlertByAnomalyAlertingConfigurationNextSinglePageAsync(nextLink, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> @@ -6750,12 +7501,13 @@ public Mono> getIncidentsFromAlertByAnomalyAlertin /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> @@ -6778,11 +7530,47 @@ public Mono> getIncidentsFromAlertByAnomalyAlertin /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse + getAnomalyAlertingConfigurationsByAnomalyDetectionConfigurationNextSinglePage(String nextLink) { + return getAnomalyAlertingConfigurationsByAnomalyDetectionConfigurationNextSinglePageAsync(nextLink).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse + getAnomalyAlertingConfigurationsByAnomalyDetectionConfigurationNextSinglePage( + String nextLink, Context context) { + return getAnomalyAlertingConfigurationsByAnomalyDetectionConfigurationNextSinglePageAsync(nextLink, context) + .block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getIncidentsByAnomalyDetectionConfigurationNextSinglePageAsync( @@ -6806,12 +7594,13 @@ public Mono> getIncidentsByAnomalyDetectionConfigu /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getIncidentsByAnomalyDetectionConfigurationNextSinglePageAsync( @@ -6832,11 +7621,44 @@ public Mono> getIncidentsByAnomalyDetectionConfigu /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getIncidentsByAnomalyDetectionConfigurationNextSinglePage(String nextLink) { + return getIncidentsByAnomalyDetectionConfigurationNextSinglePageAsync(nextLink).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getIncidentsByAnomalyDetectionConfigurationNextSinglePage( + String nextLink, Context context) { + return getIncidentsByAnomalyDetectionConfigurationNextSinglePageAsync(nextLink, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getIncidentsByAnomalyDetectionConfigurationNextPagesNextSinglePageAsync( @@ -6860,12 +7682,13 @@ public Mono> getIncidentsByAnomalyDetectionConfigu /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> getIncidentsByAnomalyDetectionConfigurationNextPagesNextSinglePageAsync( @@ -6887,11 +7710,45 @@ public Mono> getIncidentsByAnomalyDetectionConfigu /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getIncidentsByAnomalyDetectionConfigurationNextPagesNextSinglePage( + String nextLink) { + return getIncidentsByAnomalyDetectionConfigurationNextPagesNextSinglePageAsync(nextLink).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getIncidentsByAnomalyDetectionConfigurationNextPagesNextSinglePage( + String nextLink, Context context) { + return getIncidentsByAnomalyDetectionConfigurationNextPagesNextSinglePageAsync(nextLink, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> listCredentialsNextSinglePageAsync(String nextLink) { @@ -6912,12 +7769,13 @@ public Mono> listCredentialsNextSinglePageAs /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> listCredentialsNextSinglePageAsync( @@ -6938,11 +7796,43 @@ public Mono> listCredentialsNextSinglePageAs /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse listCredentialsNextSinglePage(String nextLink) { + return listCredentialsNextSinglePageAsync(nextLink).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse listCredentialsNextSinglePage(String nextLink, Context context) { + return listCredentialsNextSinglePageAsync(nextLink, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> listDataFeedsNextSinglePageAsync(String nextLink) { @@ -6962,12 +7852,13 @@ public Mono> listDataFeedsNextSinglePageAsync(Stri /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> listDataFeedsNextSinglePageAsync(String nextLink, Context context) { @@ -6987,11 +7878,43 @@ public Mono> listDataFeedsNextSinglePageAsync(Stri /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse listDataFeedsNextSinglePage(String nextLink) { + return listDataFeedsNextSinglePageAsync(nextLink).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse listDataFeedsNextSinglePage(String nextLink, Context context) { + return listDataFeedsNextSinglePageAsync(nextLink, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> listHooksNextSinglePageAsync(String nextLink) { @@ -7011,12 +7934,13 @@ public Mono> listHooksNextSinglePageAsync(String nextLin /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> listHooksNextSinglePageAsync(String nextLink, Context context) { @@ -7036,11 +7960,43 @@ public Mono> listHooksNextSinglePageAsync(String nextLin /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse listHooksNextSinglePage(String nextLink) { + return listHooksNextSinglePageAsync(nextLink).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse listHooksNextSinglePage(String nextLink, Context context) { + return listHooksNextSinglePageAsync(nextLink, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> @@ -7064,12 +8020,13 @@ public Mono> listHooksNextSinglePageAsync(String nextLin /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) public Mono> @@ -7086,4 +8043,37 @@ public Mono> listHooksNextSinglePageAsync(String nextLin res.getValue().getNextLink(), null)); } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getAnomalyDetectionConfigurationsByMetricNextSinglePage( + String nextLink) { + return getAnomalyDetectionConfigurationsByMetricNextSinglePageAsync(nextLink).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws MetricsAdvisorResponseException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PagedResponse getAnomalyDetectionConfigurationsByMetricNextSinglePage( + String nextLink, Context context) { + return getAnomalyDetectionConfigurationsByMetricNextSinglePageAsync(nextLink, context).block(); + } } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/MetricsAdvisorImplBuilder.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/MetricsAdvisorImplBuilder.java new file mode 100644 index 0000000000000..04bb03e23117a --- /dev/null +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/MetricsAdvisorImplBuilder.java @@ -0,0 +1,250 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.ai.metricsadvisor.implementation; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.client.traits.ConfigurationTrait; +import com.azure.core.client.traits.EndpointTrait; +import com.azure.core.client.traits.HttpTrait; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; +import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; +import com.azure.core.http.policy.AddHeadersPolicy; +import com.azure.core.http.policy.CookiePolicy; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.ClientOptions; +import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.core.util.serializer.SerializerAdapter; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.stream.Collectors; + +/** A builder for creating a new instance of the MetricsAdvisor type. */ +@ServiceClientBuilder(serviceClients = {MetricsAdvisorImpl.class}) +public final class MetricsAdvisorImplBuilder + implements HttpTrait, + ConfigurationTrait, + EndpointTrait { + @Generated private static final String SDK_NAME = "name"; + + @Generated private static final String SDK_VERSION = "version"; + + @Generated private static final Map PROPERTIES = new HashMap<>(); + + @Generated private final List pipelinePolicies; + + /** Create an instance of the MetricsAdvisorImplBuilder. */ + @Generated + public MetricsAdvisorImplBuilder() { + this.pipelinePolicies = new ArrayList<>(); + } + + /* + * The HTTP pipeline to send requests through. + */ + @Generated private HttpPipeline pipeline; + + /** {@inheritDoc}. */ + @Generated + @Override + public MetricsAdvisorImplBuilder pipeline(HttpPipeline pipeline) { + this.pipeline = pipeline; + return this; + } + + /* + * The HTTP client used to send the request. + */ + @Generated private HttpClient httpClient; + + /** {@inheritDoc}. */ + @Generated + @Override + public MetricsAdvisorImplBuilder httpClient(HttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + /* + * The logging configuration for HTTP requests and responses. + */ + @Generated private HttpLogOptions httpLogOptions; + + /** {@inheritDoc}. */ + @Generated + @Override + public MetricsAdvisorImplBuilder httpLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = httpLogOptions; + return this; + } + + /* + * The client options such as application ID and custom headers to set on a request. + */ + @Generated private ClientOptions clientOptions; + + /** {@inheritDoc}. */ + @Generated + @Override + public MetricsAdvisorImplBuilder clientOptions(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + return this; + } + + /* + * The retry options to configure retry policy for failed requests. + */ + @Generated private RetryOptions retryOptions; + + /** {@inheritDoc}. */ + @Generated + @Override + public MetricsAdvisorImplBuilder retryOptions(RetryOptions retryOptions) { + this.retryOptions = retryOptions; + return this; + } + + /** {@inheritDoc}. */ + @Generated + @Override + public MetricsAdvisorImplBuilder addPolicy(HttpPipelinePolicy customPolicy) { + Objects.requireNonNull(customPolicy, "'customPolicy' cannot be null."); + pipelinePolicies.add(customPolicy); + return this; + } + + /* + * The configuration store that is used during construction of the service client. + */ + @Generated private Configuration configuration; + + /** {@inheritDoc}. */ + @Generated + @Override + public MetricsAdvisorImplBuilder configuration(Configuration configuration) { + this.configuration = configuration; + return this; + } + + /* + * The service endpoint + */ + @Generated private String endpoint; + + /** {@inheritDoc}. */ + @Generated + @Override + public MetricsAdvisorImplBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * The serializer to serialize an object into a string + */ + @Generated private SerializerAdapter serializerAdapter; + + /** + * Sets The serializer to serialize an object into a string. + * + * @param serializerAdapter the serializerAdapter value. + * @return the MetricsAdvisorImplBuilder. + */ + @Generated + public MetricsAdvisorImplBuilder serializerAdapter(SerializerAdapter serializerAdapter) { + this.serializerAdapter = serializerAdapter; + return this; + } + + /* + * The retry policy that will attempt to retry failed requests, if applicable. + */ + @Generated private RetryPolicy retryPolicy; + + /** + * Sets The retry policy that will attempt to retry failed requests, if applicable. + * + * @param retryPolicy the retryPolicy value. + * @return the MetricsAdvisorImplBuilder. + */ + @Generated + public MetricsAdvisorImplBuilder retryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = retryPolicy; + return this; + } + + /** + * Builds an instance of MetricsAdvisorImpl with the provided parameters. + * + * @return an instance of MetricsAdvisorImpl. + */ + @Generated + public MetricsAdvisorImpl buildClient() { + HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); + SerializerAdapter localSerializerAdapter = + (serializerAdapter != null) ? serializerAdapter : JacksonAdapter.createDefaultSerializerAdapter(); + MetricsAdvisorImpl client = new MetricsAdvisorImpl(localPipeline, localSerializerAdapter, endpoint); + return client; + } + + @Generated + private HttpPipeline createHttpPipeline() { + Configuration buildConfiguration = + (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; + HttpLogOptions localHttpLogOptions = this.httpLogOptions == null ? new HttpLogOptions() : this.httpLogOptions; + ClientOptions localClientOptions = this.clientOptions == null ? new ClientOptions() : this.clientOptions; + List policies = new ArrayList<>(); + String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + String applicationId = CoreUtils.getApplicationId(localClientOptions, localHttpLogOptions); + policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); + policies.add(new RequestIdPolicy()); + policies.add(new AddHeadersFromContextPolicy()); + HttpHeaders headers = new HttpHeaders(); + localClientOptions.getHeaders().forEach(header -> headers.set(header.getName(), header.getValue())); + if (headers.getSize() > 0) { + policies.add(new AddHeadersPolicy(headers)); + } + policies.addAll( + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .collect(Collectors.toList())); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy())); + policies.add(new AddDatePolicy()); + policies.add(new CookiePolicy()); + policies.addAll( + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .collect(Collectors.toList())); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(httpLogOptions)); + HttpPipeline httpPipeline = + new HttpPipelineBuilder() + .policies(policies.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient) + .clientOptions(localClientOptions) + .build(); + return httpPipeline; + } +} diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AlertResult.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AlertResult.java deleted file mode 100644 index 005de671a23f9..0000000000000 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AlertResult.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.ai.metricsadvisor.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** The AlertResult model. */ -@Immutable -public final class AlertResult { - /* - * alert id - */ - @JsonProperty(value = "alertId", access = JsonProperty.Access.WRITE_ONLY) - private String alertId; - - /* - * anomaly time - */ - @JsonProperty(value = "timestamp", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime timestamp; - - /* - * created time - */ - @JsonProperty(value = "createdTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime createdTime; - - /* - * modified time - */ - @JsonProperty(value = "modifiedTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime modifiedTime; - - /** - * Get the alertId property: alert id. - * - * @return the alertId value. - */ - public String getAlertId() { - return this.alertId; - } - - /** - * Get the timestamp property: anomaly time. - * - * @return the timestamp value. - */ - public OffsetDateTime getTimestamp() { - return this.timestamp; - } - - /** - * Get the createdTime property: created time. - * - * @return the createdTime value. - */ - public OffsetDateTime getCreatedTime() { - return this.createdTime; - } - - /** - * Get the modifiedTime property: modified time. - * - * @return the modifiedTime value. - */ - public OffsetDateTime getModifiedTime() { - return this.modifiedTime; - } -} diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AlertResultList.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AlertResultList.java index 875c4a1b684dd..27cf0294bf48f 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AlertResultList.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AlertResultList.java @@ -24,6 +24,9 @@ public final class AlertResultList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of AlertResultList class. */ + public AlertResultList() {} + /** * Get the nextLink property: The @nextLink property. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AlertingResultQuery.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AlertingResultQuery.java index 32d7fb5768cf1..3ef6d28eb7c85 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AlertingResultQuery.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AlertingResultQuery.java @@ -4,7 +4,6 @@ package com.azure.ai.metricsadvisor.implementation.models; -import com.azure.ai.metricsadvisor.models.AlertQueryTimeMode; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; @@ -28,7 +27,10 @@ public final class AlertingResultQuery { * time mode */ @JsonProperty(value = "timeMode", required = true) - private AlertQueryTimeMode timeMode; + private TimeMode timeMode; + + /** Creates an instance of AlertingResultQuery class. */ + public AlertingResultQuery() {} /** * Get the startTime property: start time. @@ -75,7 +77,7 @@ public AlertingResultQuery setEndTime(OffsetDateTime endTime) { * * @return the timeMode value. */ - public AlertQueryTimeMode getTimeMode() { + public TimeMode getTimeMode() { return this.timeMode; } @@ -85,7 +87,7 @@ public AlertQueryTimeMode getTimeMode() { * @param timeMode the timeMode value to set. * @return the AlertingResultQuery object itself. */ - public AlertingResultQuery setTimeMode(AlertQueryTimeMode timeMode) { + public AlertingResultQuery setTimeMode(TimeMode timeMode) { this.timeMode = timeMode; return this; } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyAlertingConfiguration.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyAlertingConfiguration.java index 4280c4e1e6598..b139a187691d9 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyAlertingConfiguration.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyAlertingConfiguration.java @@ -33,8 +33,7 @@ public final class AnomalyAlertingConfiguration { /* * cross metrics operator * - * should be specified when setting up multiple metric alerting - * configurations + * should be specified when setting up multiple metric alerting configurations */ @JsonProperty(value = "crossMetricsOperator") private AnomalyAlertingConfigurationLogicType crossMetricsOperator; @@ -57,6 +56,9 @@ public final class AnomalyAlertingConfiguration { @JsonProperty(value = "metricAlertingConfigurations", required = true) private List metricAlertingConfigurations; + /** Creates an instance of AnomalyAlertingConfiguration class. */ + public AnomalyAlertingConfiguration() {} + /** * Get the anomalyAlertingConfigurationId property: anomaly alerting configuration unique id. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyAlertingConfigurationList.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyAlertingConfigurationList.java index 5519dca63b4a2..d52c6cb387c04 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyAlertingConfigurationList.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyAlertingConfigurationList.java @@ -23,6 +23,9 @@ public final class AnomalyAlertingConfigurationList { @JsonProperty(value = "@nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of AnomalyAlertingConfigurationList class. */ + public AnomalyAlertingConfigurationList() {} + /** * Get the value property: The value property. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyAlertingConfigurationLogicType.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyAlertingConfigurationLogicType.java index 9f1819e98f8e5..69ecaaf5bcab8 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyAlertingConfigurationLogicType.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyAlertingConfigurationLogicType.java @@ -8,7 +8,11 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for AnomalyAlertingConfigurationLogicType. */ +/** + * cross metrics operator + * + *

should be specified when setting up multiple metric alerting configurations. + */ public final class AnomalyAlertingConfigurationLogicType extends ExpandableStringEnum { /** Static value AND for AnomalyAlertingConfigurationLogicType. */ @@ -20,6 +24,14 @@ public final class AnomalyAlertingConfigurationLogicType /** Static value XOR for AnomalyAlertingConfigurationLogicType. */ public static final AnomalyAlertingConfigurationLogicType XOR = fromString("XOR"); + /** + * Creates a new instance of AnomalyAlertingConfigurationLogicType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AnomalyAlertingConfigurationLogicType() {} + /** * Creates or finds a AnomalyAlertingConfigurationLogicType from its string representation. * @@ -31,7 +43,11 @@ public static AnomalyAlertingConfigurationLogicType fromString(String name) { return fromString(name, AnomalyAlertingConfigurationLogicType.class); } - /** @return known AnomalyAlertingConfigurationLogicType values. */ + /** + * Gets known AnomalyAlertingConfigurationLogicType values. + * + * @return known AnomalyAlertingConfigurationLogicType values. + */ public static Collection values() { return values(AnomalyAlertingConfigurationLogicType.class); } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyAlertingConfigurationPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyAlertingConfigurationPatch.java index a5ea6d71189bc..74585d353df44 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyAlertingConfigurationPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyAlertingConfigurationPatch.java @@ -48,6 +48,9 @@ public final class AnomalyAlertingConfigurationPatch { @JsonProperty(value = "metricAlertingConfigurations") private List metricAlertingConfigurations; + /** Creates an instance of AnomalyAlertingConfigurationPatch class. */ + public AnomalyAlertingConfigurationPatch() {} + /** * Get the name property: Anomaly alerting configuration name. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyDetectionConfiguration.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyDetectionConfiguration.java index 6b187a7708bcd..a20c01d54de8e 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyDetectionConfiguration.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyDetectionConfiguration.java @@ -54,6 +54,9 @@ public final class AnomalyDetectionConfiguration { @JsonProperty(value = "seriesOverrideConfigurations") private List seriesOverrideConfigurations; + /** Creates an instance of AnomalyDetectionConfiguration class. */ + public AnomalyDetectionConfiguration() {} + /** * Get the anomalyDetectionConfigurationId property: anomaly detection configuration unique id. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyDetectionConfigurationList.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyDetectionConfigurationList.java index 6c857cabeadaf..eac10a749748d 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyDetectionConfigurationList.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyDetectionConfigurationList.java @@ -23,6 +23,9 @@ public final class AnomalyDetectionConfigurationList { @JsonProperty(value = "@nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of AnomalyDetectionConfigurationList class. */ + public AnomalyDetectionConfigurationList() {} + /** * Get the value property: The value property. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyDetectionConfigurationLogicType.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyDetectionConfigurationLogicType.java index 5ded00e254a70..d924fb10aee0d 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyDetectionConfigurationLogicType.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyDetectionConfigurationLogicType.java @@ -8,7 +8,11 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for AnomalyDetectionConfigurationLogicType. */ +/** + * condition operator + * + *

should be specified when combining multiple detection conditions. + */ public final class AnomalyDetectionConfigurationLogicType extends ExpandableStringEnum { /** Static value AND for AnomalyDetectionConfigurationLogicType. */ @@ -17,6 +21,14 @@ public final class AnomalyDetectionConfigurationLogicType /** Static value OR for AnomalyDetectionConfigurationLogicType. */ public static final AnomalyDetectionConfigurationLogicType OR = fromString("OR"); + /** + * Creates a new instance of AnomalyDetectionConfigurationLogicType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AnomalyDetectionConfigurationLogicType() {} + /** * Creates or finds a AnomalyDetectionConfigurationLogicType from its string representation. * @@ -28,7 +40,11 @@ public static AnomalyDetectionConfigurationLogicType fromString(String name) { return fromString(name, AnomalyDetectionConfigurationLogicType.class); } - /** @return known AnomalyDetectionConfigurationLogicType values. */ + /** + * Gets known AnomalyDetectionConfigurationLogicType values. + * + * @return known AnomalyDetectionConfigurationLogicType values. + */ public static Collection values() { return values(AnomalyDetectionConfigurationLogicType.class); } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyDetectionConfigurationPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyDetectionConfigurationPatch.java index 0f80c99bf4037..c64d50d2630b3 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyDetectionConfigurationPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyDetectionConfigurationPatch.java @@ -41,6 +41,9 @@ public final class AnomalyDetectionConfigurationPatch { @JsonProperty(value = "seriesOverrideConfigurations") private List seriesOverrideConfigurations; + /** Creates an instance of AnomalyDetectionConfigurationPatch class. */ + public AnomalyDetectionConfigurationPatch() {} + /** * Get the name property: anomaly detection configuration name. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyDetectorDirection.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyDetectorDirection.java new file mode 100644 index 0000000000000..61e14fcae2445 --- /dev/null +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyDetectorDirection.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.ai.metricsadvisor.implementation.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** detection direction. */ +public final class AnomalyDetectorDirection extends ExpandableStringEnum { + /** Static value Both for AnomalyDetectorDirection. */ + public static final AnomalyDetectorDirection BOTH = fromString("Both"); + + /** Static value Down for AnomalyDetectorDirection. */ + public static final AnomalyDetectorDirection DOWN = fromString("Down"); + + /** Static value Up for AnomalyDetectorDirection. */ + public static final AnomalyDetectorDirection UP = fromString("Up"); + + /** + * Creates a new instance of AnomalyDetectorDirection value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AnomalyDetectorDirection() {} + + /** + * Creates or finds a AnomalyDetectorDirection from its string representation. + * + * @param name a name to look for. + * @return the corresponding AnomalyDetectorDirection. + */ + @JsonCreator + public static AnomalyDetectorDirection fromString(String name) { + return fromString(name, AnomalyDetectorDirection.class); + } + + /** + * Gets known AnomalyDetectorDirection values. + * + * @return known AnomalyDetectorDirection values. + */ + public static Collection values() { + return values(AnomalyDetectorDirection.class); + } +} diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyDimensionList.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyDimensionList.java index 4ed5993b751e1..cd73d7cb35aaa 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyDimensionList.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyDimensionList.java @@ -23,6 +23,9 @@ public final class AnomalyDimensionList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of AnomalyDimensionList class. */ + public AnomalyDimensionList() {} + /** * Get the nextLink property: The @nextLink property. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyDimensionQuery.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyDimensionQuery.java index 03e50e9a8ef90..f8ac42b9a0bf8 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyDimensionQuery.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyDimensionQuery.java @@ -35,6 +35,9 @@ public final class AnomalyDimensionQuery { @JsonProperty(value = "dimensionFilter") private DimensionGroupIdentity dimensionFilter; + /** Creates an instance of AnomalyDimensionQuery class. */ + public AnomalyDimensionQuery() {} + /** * Get the startTime property: start time. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyFeedback.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyFeedback.java index afd374fce60ed..b30dc9f70e338 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyFeedback.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyFeedback.java @@ -23,8 +23,7 @@ public final class AnomalyFeedback extends MetricFeedback { private OffsetDateTime startTime; /* - * the end timestamp of feedback time range, when equals to startTime means - * only one timestamp + * the end timestamp of feedback time range, when equals to startTime means only one timestamp */ @JsonProperty(value = "endTime", required = true) private OffsetDateTime endTime; @@ -47,6 +46,9 @@ public final class AnomalyFeedback extends MetricFeedback { @JsonProperty(value = "anomalyDetectionConfigurationSnapshot") private AnomalyDetectionConfiguration anomalyDetectionConfigurationSnapshot; + /** Creates an instance of AnomalyFeedback class. */ + public AnomalyFeedback() {} + /** * Get the startTime property: the start timestamp of feedback time range. * @@ -151,4 +153,18 @@ public AnomalyFeedback setAnomalyDetectionConfigurationSnapshot( this.anomalyDetectionConfigurationSnapshot = anomalyDetectionConfigurationSnapshot; return this; } + + /** {@inheritDoc} */ + @Override + public AnomalyFeedback setMetricId(UUID metricId) { + super.setMetricId(metricId); + return this; + } + + /** {@inheritDoc} */ + @Override + public AnomalyFeedback setDimensionFilter(FeedbackDimensionFilter dimensionFilter) { + super.setDimensionFilter(dimensionFilter); + return this; + } } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyFeedbackValue.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyFeedbackValue.java index 93bccb6738567..087db60bf00f2 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyFeedbackValue.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyFeedbackValue.java @@ -17,6 +17,9 @@ public final class AnomalyFeedbackValue { @JsonProperty(value = "anomalyValue", required = true) private AnomalyValue anomalyValue; + /** Creates an instance of AnomalyFeedbackValue class. */ + public AnomalyFeedbackValue() {} + /** * Get the anomalyValue property: The anomalyValue property. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyProperty.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyProperty.java index 0e65b3bd46731..d0a9bbbb5a6f2 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyProperty.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyProperty.java @@ -4,7 +4,6 @@ package com.azure.ai.metricsadvisor.implementation.models; -import com.azure.ai.metricsadvisor.administration.models.AnomalySeverity; import com.azure.ai.metricsadvisor.models.AnomalyStatus; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; @@ -16,7 +15,7 @@ public final class AnomalyProperty { * anomaly severity */ @JsonProperty(value = "anomalySeverity", required = true) - private AnomalySeverity anomalySeverity; + private Severity anomalySeverity; /* * anomaly status @@ -38,12 +37,15 @@ public final class AnomalyProperty { @JsonProperty(value = "expectedValue", access = JsonProperty.Access.WRITE_ONLY) private Double expectedValue; + /** Creates an instance of AnomalyProperty class. */ + public AnomalyProperty() {} + /** * Get the anomalySeverity property: anomaly severity. * * @return the anomalySeverity value. */ - public AnomalySeverity getAnomalySeverity() { + public Severity getAnomalySeverity() { return this.anomalySeverity; } @@ -53,7 +55,7 @@ public AnomalySeverity getAnomalySeverity() { * @param anomalySeverity the anomalySeverity value to set. * @return the AnomalyProperty object itself. */ - public AnomalyProperty setAnomalySeverity(AnomalySeverity anomalySeverity) { + public AnomalyProperty setAnomalySeverity(Severity anomalySeverity) { this.anomalySeverity = anomalySeverity; return this; } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyResult.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyResult.java index 16bd8d0507d30..1768aba3f9eb2 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyResult.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyResult.java @@ -71,6 +71,9 @@ public final class AnomalyResult { @JsonProperty(value = "property", required = true) private AnomalyProperty property; + /** Creates an instance of AnomalyResult class. */ + public AnomalyResult() {} + /** * Get the dataFeedId property: data feed unique id * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyResultList.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyResultList.java index dbabdf5ede2a0..b8e9947f3a7f4 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyResultList.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyResultList.java @@ -23,6 +23,9 @@ public final class AnomalyResultList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of AnomalyResultList class. */ + public AnomalyResultList() {} + /** * Get the nextLink property: The @nextLink property. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyScope.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyScope.java index ad490aee9f8f4..f5b4d48529a97 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyScope.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AnomalyScope.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for AnomalyScope. */ +/** Anomaly scope. */ public final class AnomalyScope extends ExpandableStringEnum { /** Static value All for AnomalyScope. */ public static final AnomalyScope ALL = fromString("All"); @@ -19,6 +19,14 @@ public final class AnomalyScope extends ExpandableStringEnum { /** Static value TopN for AnomalyScope. */ public static final AnomalyScope TOPN = fromString("TopN"); + /** + * Creates a new instance of AnomalyScope value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AnomalyScope() {} + /** * Creates or finds a AnomalyScope from its string representation. * @@ -30,7 +38,11 @@ public static AnomalyScope fromString(String name) { return fromString(name, AnomalyScope.class); } - /** @return known AnomalyScope values. */ + /** + * Gets known AnomalyScope values. + * + * @return known AnomalyScope values. + */ public static Collection values() { return values(AnomalyScope.class); } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AuthenticationTypeEnum.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AuthenticationTypeEnum.java index f79e8a71bc86e..3dc483800e68c 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AuthenticationTypeEnum.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AuthenticationTypeEnum.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for AuthenticationTypeEnum. */ +/** authentication type for corresponding data source. */ public final class AuthenticationTypeEnum extends ExpandableStringEnum { /** Static value Basic for AuthenticationTypeEnum. */ public static final AuthenticationTypeEnum BASIC = fromString("Basic"); @@ -28,6 +28,14 @@ public final class AuthenticationTypeEnum extends ExpandableStringEnum values() { return values(AuthenticationTypeEnum.class); } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureApplicationInsightsDataFeed.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureApplicationInsightsDataFeed.java index 1d28622312a46..4048a05ab5e35 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureApplicationInsightsDataFeed.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureApplicationInsightsDataFeed.java @@ -8,6 +8,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import java.time.OffsetDateTime; +import java.util.List; /** The AzureApplicationInsightsDataFeed model. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dataSourceType") @@ -20,6 +22,9 @@ public final class AzureApplicationInsightsDataFeed extends DataFeedDetail { @JsonProperty(value = "dataSourceParameter", required = true) private AzureApplicationInsightsParameter dataSourceParameter; + /** Creates an instance of AzureApplicationInsightsDataFeed class. */ + public AzureApplicationInsightsDataFeed() {} + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -40,4 +45,172 @@ public AzureApplicationInsightsDataFeed setDataSourceParameter( this.dataSourceParameter = dataSourceParameter; return this; } + + /** {@inheritDoc} */ + @Override + public AzureApplicationInsightsDataFeed setDataFeedName(String dataFeedName) { + super.setDataFeedName(dataFeedName); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureApplicationInsightsDataFeed setDataFeedDescription(String dataFeedDescription) { + super.setDataFeedDescription(dataFeedDescription); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureApplicationInsightsDataFeed setGranularityName(Granularity granularityName) { + super.setGranularityName(granularityName); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureApplicationInsightsDataFeed setGranularityAmount(Integer granularityAmount) { + super.setGranularityAmount(granularityAmount); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureApplicationInsightsDataFeed setMetrics(List metrics) { + super.setMetrics(metrics); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureApplicationInsightsDataFeed setDimension(List dimension) { + super.setDimension(dimension); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureApplicationInsightsDataFeed setTimestampColumn(String timestampColumn) { + super.setTimestampColumn(timestampColumn); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureApplicationInsightsDataFeed setDataStartFrom(OffsetDateTime dataStartFrom) { + super.setDataStartFrom(dataStartFrom); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureApplicationInsightsDataFeed setStartOffsetInSeconds(Long startOffsetInSeconds) { + super.setStartOffsetInSeconds(startOffsetInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureApplicationInsightsDataFeed setMaxConcurrency(Integer maxConcurrency) { + super.setMaxConcurrency(maxConcurrency); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureApplicationInsightsDataFeed setMinRetryIntervalInSeconds(Long minRetryIntervalInSeconds) { + super.setMinRetryIntervalInSeconds(minRetryIntervalInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureApplicationInsightsDataFeed setStopRetryAfterInSeconds(Long stopRetryAfterInSeconds) { + super.setStopRetryAfterInSeconds(stopRetryAfterInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureApplicationInsightsDataFeed setNeedRollup(NeedRollupEnum needRollup) { + super.setNeedRollup(needRollup); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureApplicationInsightsDataFeed setRollUpMethod(RollUpMethod rollUpMethod) { + super.setRollUpMethod(rollUpMethod); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureApplicationInsightsDataFeed setRollUpColumns(List rollUpColumns) { + super.setRollUpColumns(rollUpColumns); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureApplicationInsightsDataFeed setAllUpIdentification(String allUpIdentification) { + super.setAllUpIdentification(allUpIdentification); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureApplicationInsightsDataFeed setFillMissingPointType(FillMissingPointType fillMissingPointType) { + super.setFillMissingPointType(fillMissingPointType); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureApplicationInsightsDataFeed setFillMissingPointValue(Double fillMissingPointValue) { + super.setFillMissingPointValue(fillMissingPointValue); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureApplicationInsightsDataFeed setViewMode(ViewMode viewMode) { + super.setViewMode(viewMode); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureApplicationInsightsDataFeed setAdmins(List admins) { + super.setAdmins(admins); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureApplicationInsightsDataFeed setViewers(List viewers) { + super.setViewers(viewers); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureApplicationInsightsDataFeed setActionLinkTemplate(String actionLinkTemplate) { + super.setActionLinkTemplate(actionLinkTemplate); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureApplicationInsightsDataFeed setAuthenticationType(AuthenticationTypeEnum authenticationType) { + super.setAuthenticationType(authenticationType); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureApplicationInsightsDataFeed setCredentialId(String credentialId) { + super.setCredentialId(credentialId); + return this; + } } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureApplicationInsightsDataFeedPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureApplicationInsightsDataFeedPatch.java index 3b2a394bf55bd..8e0f7b202e922 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureApplicationInsightsDataFeedPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureApplicationInsightsDataFeedPatch.java @@ -8,6 +8,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import java.time.OffsetDateTime; +import java.util.List; /** The AzureApplicationInsightsDataFeedPatch model. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dataSourceType") @@ -20,6 +22,9 @@ public final class AzureApplicationInsightsDataFeedPatch extends DataFeedDetailP @JsonProperty(value = "dataSourceParameter") private AzureApplicationInsightsParameterPatch dataSourceParameter; + /** Creates an instance of AzureApplicationInsightsDataFeedPatch class. */ + public AzureApplicationInsightsDataFeedPatch() {} + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -40,4 +45,151 @@ public AzureApplicationInsightsDataFeedPatch setDataSourceParameter( this.dataSourceParameter = dataSourceParameter; return this; } + + /** {@inheritDoc} */ + @Override + public AzureApplicationInsightsDataFeedPatch setDataFeedName(String dataFeedName) { + super.setDataFeedName(dataFeedName); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureApplicationInsightsDataFeedPatch setDataFeedDescription(String dataFeedDescription) { + super.setDataFeedDescription(dataFeedDescription); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureApplicationInsightsDataFeedPatch setTimestampColumn(String timestampColumn) { + super.setTimestampColumn(timestampColumn); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureApplicationInsightsDataFeedPatch setDataStartFrom(OffsetDateTime dataStartFrom) { + super.setDataStartFrom(dataStartFrom); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureApplicationInsightsDataFeedPatch setStartOffsetInSeconds(Long startOffsetInSeconds) { + super.setStartOffsetInSeconds(startOffsetInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureApplicationInsightsDataFeedPatch setMaxConcurrency(Integer maxConcurrency) { + super.setMaxConcurrency(maxConcurrency); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureApplicationInsightsDataFeedPatch setMinRetryIntervalInSeconds(Long minRetryIntervalInSeconds) { + super.setMinRetryIntervalInSeconds(minRetryIntervalInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureApplicationInsightsDataFeedPatch setStopRetryAfterInSeconds(Long stopRetryAfterInSeconds) { + super.setStopRetryAfterInSeconds(stopRetryAfterInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureApplicationInsightsDataFeedPatch setNeedRollup(NeedRollupEnum needRollup) { + super.setNeedRollup(needRollup); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureApplicationInsightsDataFeedPatch setRollUpMethod(RollUpMethod rollUpMethod) { + super.setRollUpMethod(rollUpMethod); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureApplicationInsightsDataFeedPatch setRollUpColumns(List rollUpColumns) { + super.setRollUpColumns(rollUpColumns); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureApplicationInsightsDataFeedPatch setAllUpIdentification(String allUpIdentification) { + super.setAllUpIdentification(allUpIdentification); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureApplicationInsightsDataFeedPatch setFillMissingPointType(FillMissingPointType fillMissingPointType) { + super.setFillMissingPointType(fillMissingPointType); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureApplicationInsightsDataFeedPatch setFillMissingPointValue(Double fillMissingPointValue) { + super.setFillMissingPointValue(fillMissingPointValue); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureApplicationInsightsDataFeedPatch setViewMode(ViewMode viewMode) { + super.setViewMode(viewMode); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureApplicationInsightsDataFeedPatch setAdmins(List admins) { + super.setAdmins(admins); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureApplicationInsightsDataFeedPatch setViewers(List viewers) { + super.setViewers(viewers); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureApplicationInsightsDataFeedPatch setStatus(EntityStatus status) { + super.setStatus(status); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureApplicationInsightsDataFeedPatch setActionLinkTemplate(String actionLinkTemplate) { + super.setActionLinkTemplate(actionLinkTemplate); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureApplicationInsightsDataFeedPatch setAuthenticationType(AuthenticationTypeEnum authenticationType) { + super.setAuthenticationType(authenticationType); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureApplicationInsightsDataFeedPatch setCredentialId(String credentialId) { + super.setCredentialId(credentialId); + return this; + } } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureApplicationInsightsParameter.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureApplicationInsightsParameter.java index dcca77c34150c..c9b589db3d0e0 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureApplicationInsightsParameter.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureApplicationInsightsParameter.java @@ -34,6 +34,9 @@ public final class AzureApplicationInsightsParameter { @JsonProperty(value = "query", required = true) private String query; + /** Creates an instance of AzureApplicationInsightsParameter class. */ + public AzureApplicationInsightsParameter() {} + /** * Get the azureCloud property: The Azure cloud that this Azure Application Insights in. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureApplicationInsightsParameterPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureApplicationInsightsParameterPatch.java index 39c4099a8ba04..b00a5088d0f0c 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureApplicationInsightsParameterPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureApplicationInsightsParameterPatch.java @@ -34,6 +34,9 @@ public final class AzureApplicationInsightsParameterPatch { @JsonProperty(value = "query") private String query; + /** Creates an instance of AzureApplicationInsightsParameterPatch class. */ + public AzureApplicationInsightsParameterPatch() {} + /** * Get the azureCloud property: The Azure cloud that this Azure Application Insights in. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureBlobDataFeed.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureBlobDataFeed.java index bcf8ff1e9db02..a5b813c587358 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureBlobDataFeed.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureBlobDataFeed.java @@ -8,6 +8,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import java.time.OffsetDateTime; +import java.util.List; /** The AzureBlobDataFeed model. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dataSourceType") @@ -20,6 +22,9 @@ public final class AzureBlobDataFeed extends DataFeedDetail { @JsonProperty(value = "dataSourceParameter", required = true) private AzureBlobParameter dataSourceParameter; + /** Creates an instance of AzureBlobDataFeed class. */ + public AzureBlobDataFeed() {} + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -39,4 +44,172 @@ public AzureBlobDataFeed setDataSourceParameter(AzureBlobParameter dataSourcePar this.dataSourceParameter = dataSourceParameter; return this; } + + /** {@inheritDoc} */ + @Override + public AzureBlobDataFeed setDataFeedName(String dataFeedName) { + super.setDataFeedName(dataFeedName); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureBlobDataFeed setDataFeedDescription(String dataFeedDescription) { + super.setDataFeedDescription(dataFeedDescription); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureBlobDataFeed setGranularityName(Granularity granularityName) { + super.setGranularityName(granularityName); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureBlobDataFeed setGranularityAmount(Integer granularityAmount) { + super.setGranularityAmount(granularityAmount); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureBlobDataFeed setMetrics(List metrics) { + super.setMetrics(metrics); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureBlobDataFeed setDimension(List dimension) { + super.setDimension(dimension); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureBlobDataFeed setTimestampColumn(String timestampColumn) { + super.setTimestampColumn(timestampColumn); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureBlobDataFeed setDataStartFrom(OffsetDateTime dataStartFrom) { + super.setDataStartFrom(dataStartFrom); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureBlobDataFeed setStartOffsetInSeconds(Long startOffsetInSeconds) { + super.setStartOffsetInSeconds(startOffsetInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureBlobDataFeed setMaxConcurrency(Integer maxConcurrency) { + super.setMaxConcurrency(maxConcurrency); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureBlobDataFeed setMinRetryIntervalInSeconds(Long minRetryIntervalInSeconds) { + super.setMinRetryIntervalInSeconds(minRetryIntervalInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureBlobDataFeed setStopRetryAfterInSeconds(Long stopRetryAfterInSeconds) { + super.setStopRetryAfterInSeconds(stopRetryAfterInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureBlobDataFeed setNeedRollup(NeedRollupEnum needRollup) { + super.setNeedRollup(needRollup); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureBlobDataFeed setRollUpMethod(RollUpMethod rollUpMethod) { + super.setRollUpMethod(rollUpMethod); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureBlobDataFeed setRollUpColumns(List rollUpColumns) { + super.setRollUpColumns(rollUpColumns); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureBlobDataFeed setAllUpIdentification(String allUpIdentification) { + super.setAllUpIdentification(allUpIdentification); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureBlobDataFeed setFillMissingPointType(FillMissingPointType fillMissingPointType) { + super.setFillMissingPointType(fillMissingPointType); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureBlobDataFeed setFillMissingPointValue(Double fillMissingPointValue) { + super.setFillMissingPointValue(fillMissingPointValue); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureBlobDataFeed setViewMode(ViewMode viewMode) { + super.setViewMode(viewMode); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureBlobDataFeed setAdmins(List admins) { + super.setAdmins(admins); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureBlobDataFeed setViewers(List viewers) { + super.setViewers(viewers); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureBlobDataFeed setActionLinkTemplate(String actionLinkTemplate) { + super.setActionLinkTemplate(actionLinkTemplate); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureBlobDataFeed setAuthenticationType(AuthenticationTypeEnum authenticationType) { + super.setAuthenticationType(authenticationType); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureBlobDataFeed setCredentialId(String credentialId) { + super.setCredentialId(credentialId); + return this; + } } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureBlobDataFeedPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureBlobDataFeedPatch.java index 3a2d7627a0e42..3ee9e7aa145f2 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureBlobDataFeedPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureBlobDataFeedPatch.java @@ -8,6 +8,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import java.time.OffsetDateTime; +import java.util.List; /** The AzureBlobDataFeedPatch model. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dataSourceType") @@ -20,6 +22,9 @@ public final class AzureBlobDataFeedPatch extends DataFeedDetailPatch { @JsonProperty(value = "dataSourceParameter") private AzureBlobParameterPatch dataSourceParameter; + /** Creates an instance of AzureBlobDataFeedPatch class. */ + public AzureBlobDataFeedPatch() {} + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -39,4 +44,151 @@ public AzureBlobDataFeedPatch setDataSourceParameter(AzureBlobParameterPatch dat this.dataSourceParameter = dataSourceParameter; return this; } + + /** {@inheritDoc} */ + @Override + public AzureBlobDataFeedPatch setDataFeedName(String dataFeedName) { + super.setDataFeedName(dataFeedName); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureBlobDataFeedPatch setDataFeedDescription(String dataFeedDescription) { + super.setDataFeedDescription(dataFeedDescription); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureBlobDataFeedPatch setTimestampColumn(String timestampColumn) { + super.setTimestampColumn(timestampColumn); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureBlobDataFeedPatch setDataStartFrom(OffsetDateTime dataStartFrom) { + super.setDataStartFrom(dataStartFrom); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureBlobDataFeedPatch setStartOffsetInSeconds(Long startOffsetInSeconds) { + super.setStartOffsetInSeconds(startOffsetInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureBlobDataFeedPatch setMaxConcurrency(Integer maxConcurrency) { + super.setMaxConcurrency(maxConcurrency); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureBlobDataFeedPatch setMinRetryIntervalInSeconds(Long minRetryIntervalInSeconds) { + super.setMinRetryIntervalInSeconds(minRetryIntervalInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureBlobDataFeedPatch setStopRetryAfterInSeconds(Long stopRetryAfterInSeconds) { + super.setStopRetryAfterInSeconds(stopRetryAfterInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureBlobDataFeedPatch setNeedRollup(NeedRollupEnum needRollup) { + super.setNeedRollup(needRollup); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureBlobDataFeedPatch setRollUpMethod(RollUpMethod rollUpMethod) { + super.setRollUpMethod(rollUpMethod); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureBlobDataFeedPatch setRollUpColumns(List rollUpColumns) { + super.setRollUpColumns(rollUpColumns); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureBlobDataFeedPatch setAllUpIdentification(String allUpIdentification) { + super.setAllUpIdentification(allUpIdentification); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureBlobDataFeedPatch setFillMissingPointType(FillMissingPointType fillMissingPointType) { + super.setFillMissingPointType(fillMissingPointType); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureBlobDataFeedPatch setFillMissingPointValue(Double fillMissingPointValue) { + super.setFillMissingPointValue(fillMissingPointValue); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureBlobDataFeedPatch setViewMode(ViewMode viewMode) { + super.setViewMode(viewMode); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureBlobDataFeedPatch setAdmins(List admins) { + super.setAdmins(admins); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureBlobDataFeedPatch setViewers(List viewers) { + super.setViewers(viewers); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureBlobDataFeedPatch setStatus(EntityStatus status) { + super.setStatus(status); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureBlobDataFeedPatch setActionLinkTemplate(String actionLinkTemplate) { + super.setActionLinkTemplate(actionLinkTemplate); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureBlobDataFeedPatch setAuthenticationType(AuthenticationTypeEnum authenticationType) { + super.setAuthenticationType(authenticationType); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureBlobDataFeedPatch setCredentialId(String credentialId) { + super.setCredentialId(credentialId); + return this; + } } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureBlobParameter.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureBlobParameter.java index a29864aeb722d..e036ac266cede 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureBlobParameter.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureBlobParameter.java @@ -28,6 +28,9 @@ public final class AzureBlobParameter { @JsonProperty(value = "blobTemplate", required = true) private String blobTemplate; + /** Creates an instance of AzureBlobParameter class. */ + public AzureBlobParameter() {} + /** * Get the connectionString property: The connection string of this Azure Blob. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureBlobParameterPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureBlobParameterPatch.java index 94c16da388362..95f5fbbcade28 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureBlobParameterPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureBlobParameterPatch.java @@ -28,6 +28,9 @@ public final class AzureBlobParameterPatch { @JsonProperty(value = "blobTemplate") private String blobTemplate; + /** Creates an instance of AzureBlobParameterPatch class. */ + public AzureBlobParameterPatch() {} + /** * Get the connectionString property: The connection string of this Azure Blob. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureCosmosDBDataFeed.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureCosmosDBDataFeed.java index b60e2bd3845fd..7a9b4ded0850c 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureCosmosDBDataFeed.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureCosmosDBDataFeed.java @@ -8,6 +8,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import java.time.OffsetDateTime; +import java.util.List; /** The AzureCosmosDBDataFeed model. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dataSourceType") @@ -20,6 +22,9 @@ public final class AzureCosmosDBDataFeed extends DataFeedDetail { @JsonProperty(value = "dataSourceParameter", required = true) private AzureCosmosDBParameter dataSourceParameter; + /** Creates an instance of AzureCosmosDBDataFeed class. */ + public AzureCosmosDBDataFeed() {} + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -39,4 +44,172 @@ public AzureCosmosDBDataFeed setDataSourceParameter(AzureCosmosDBParameter dataS this.dataSourceParameter = dataSourceParameter; return this; } + + /** {@inheritDoc} */ + @Override + public AzureCosmosDBDataFeed setDataFeedName(String dataFeedName) { + super.setDataFeedName(dataFeedName); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureCosmosDBDataFeed setDataFeedDescription(String dataFeedDescription) { + super.setDataFeedDescription(dataFeedDescription); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureCosmosDBDataFeed setGranularityName(Granularity granularityName) { + super.setGranularityName(granularityName); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureCosmosDBDataFeed setGranularityAmount(Integer granularityAmount) { + super.setGranularityAmount(granularityAmount); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureCosmosDBDataFeed setMetrics(List metrics) { + super.setMetrics(metrics); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureCosmosDBDataFeed setDimension(List dimension) { + super.setDimension(dimension); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureCosmosDBDataFeed setTimestampColumn(String timestampColumn) { + super.setTimestampColumn(timestampColumn); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureCosmosDBDataFeed setDataStartFrom(OffsetDateTime dataStartFrom) { + super.setDataStartFrom(dataStartFrom); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureCosmosDBDataFeed setStartOffsetInSeconds(Long startOffsetInSeconds) { + super.setStartOffsetInSeconds(startOffsetInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureCosmosDBDataFeed setMaxConcurrency(Integer maxConcurrency) { + super.setMaxConcurrency(maxConcurrency); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureCosmosDBDataFeed setMinRetryIntervalInSeconds(Long minRetryIntervalInSeconds) { + super.setMinRetryIntervalInSeconds(minRetryIntervalInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureCosmosDBDataFeed setStopRetryAfterInSeconds(Long stopRetryAfterInSeconds) { + super.setStopRetryAfterInSeconds(stopRetryAfterInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureCosmosDBDataFeed setNeedRollup(NeedRollupEnum needRollup) { + super.setNeedRollup(needRollup); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureCosmosDBDataFeed setRollUpMethod(RollUpMethod rollUpMethod) { + super.setRollUpMethod(rollUpMethod); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureCosmosDBDataFeed setRollUpColumns(List rollUpColumns) { + super.setRollUpColumns(rollUpColumns); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureCosmosDBDataFeed setAllUpIdentification(String allUpIdentification) { + super.setAllUpIdentification(allUpIdentification); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureCosmosDBDataFeed setFillMissingPointType(FillMissingPointType fillMissingPointType) { + super.setFillMissingPointType(fillMissingPointType); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureCosmosDBDataFeed setFillMissingPointValue(Double fillMissingPointValue) { + super.setFillMissingPointValue(fillMissingPointValue); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureCosmosDBDataFeed setViewMode(ViewMode viewMode) { + super.setViewMode(viewMode); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureCosmosDBDataFeed setAdmins(List admins) { + super.setAdmins(admins); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureCosmosDBDataFeed setViewers(List viewers) { + super.setViewers(viewers); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureCosmosDBDataFeed setActionLinkTemplate(String actionLinkTemplate) { + super.setActionLinkTemplate(actionLinkTemplate); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureCosmosDBDataFeed setAuthenticationType(AuthenticationTypeEnum authenticationType) { + super.setAuthenticationType(authenticationType); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureCosmosDBDataFeed setCredentialId(String credentialId) { + super.setCredentialId(credentialId); + return this; + } } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureCosmosDBDataFeedPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureCosmosDBDataFeedPatch.java index eed9abd974e8e..17dcfaee388e1 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureCosmosDBDataFeedPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureCosmosDBDataFeedPatch.java @@ -8,6 +8,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import java.time.OffsetDateTime; +import java.util.List; /** The AzureCosmosDBDataFeedPatch model. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dataSourceType") @@ -20,6 +22,9 @@ public final class AzureCosmosDBDataFeedPatch extends DataFeedDetailPatch { @JsonProperty(value = "dataSourceParameter") private AzureCosmosDBParameterPatch dataSourceParameter; + /** Creates an instance of AzureCosmosDBDataFeedPatch class. */ + public AzureCosmosDBDataFeedPatch() {} + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -39,4 +44,151 @@ public AzureCosmosDBDataFeedPatch setDataSourceParameter(AzureCosmosDBParameterP this.dataSourceParameter = dataSourceParameter; return this; } + + /** {@inheritDoc} */ + @Override + public AzureCosmosDBDataFeedPatch setDataFeedName(String dataFeedName) { + super.setDataFeedName(dataFeedName); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureCosmosDBDataFeedPatch setDataFeedDescription(String dataFeedDescription) { + super.setDataFeedDescription(dataFeedDescription); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureCosmosDBDataFeedPatch setTimestampColumn(String timestampColumn) { + super.setTimestampColumn(timestampColumn); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureCosmosDBDataFeedPatch setDataStartFrom(OffsetDateTime dataStartFrom) { + super.setDataStartFrom(dataStartFrom); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureCosmosDBDataFeedPatch setStartOffsetInSeconds(Long startOffsetInSeconds) { + super.setStartOffsetInSeconds(startOffsetInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureCosmosDBDataFeedPatch setMaxConcurrency(Integer maxConcurrency) { + super.setMaxConcurrency(maxConcurrency); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureCosmosDBDataFeedPatch setMinRetryIntervalInSeconds(Long minRetryIntervalInSeconds) { + super.setMinRetryIntervalInSeconds(minRetryIntervalInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureCosmosDBDataFeedPatch setStopRetryAfterInSeconds(Long stopRetryAfterInSeconds) { + super.setStopRetryAfterInSeconds(stopRetryAfterInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureCosmosDBDataFeedPatch setNeedRollup(NeedRollupEnum needRollup) { + super.setNeedRollup(needRollup); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureCosmosDBDataFeedPatch setRollUpMethod(RollUpMethod rollUpMethod) { + super.setRollUpMethod(rollUpMethod); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureCosmosDBDataFeedPatch setRollUpColumns(List rollUpColumns) { + super.setRollUpColumns(rollUpColumns); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureCosmosDBDataFeedPatch setAllUpIdentification(String allUpIdentification) { + super.setAllUpIdentification(allUpIdentification); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureCosmosDBDataFeedPatch setFillMissingPointType(FillMissingPointType fillMissingPointType) { + super.setFillMissingPointType(fillMissingPointType); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureCosmosDBDataFeedPatch setFillMissingPointValue(Double fillMissingPointValue) { + super.setFillMissingPointValue(fillMissingPointValue); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureCosmosDBDataFeedPatch setViewMode(ViewMode viewMode) { + super.setViewMode(viewMode); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureCosmosDBDataFeedPatch setAdmins(List admins) { + super.setAdmins(admins); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureCosmosDBDataFeedPatch setViewers(List viewers) { + super.setViewers(viewers); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureCosmosDBDataFeedPatch setStatus(EntityStatus status) { + super.setStatus(status); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureCosmosDBDataFeedPatch setActionLinkTemplate(String actionLinkTemplate) { + super.setActionLinkTemplate(actionLinkTemplate); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureCosmosDBDataFeedPatch setAuthenticationType(AuthenticationTypeEnum authenticationType) { + super.setAuthenticationType(authenticationType); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureCosmosDBDataFeedPatch setCredentialId(String credentialId) { + super.setCredentialId(credentialId); + return this; + } } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureCosmosDBParameter.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureCosmosDBParameter.java index 92695dae49850..5809a21f1bfdb 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureCosmosDBParameter.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureCosmosDBParameter.java @@ -34,6 +34,9 @@ public final class AzureCosmosDBParameter { @JsonProperty(value = "collectionId", required = true) private String collectionId; + /** Creates an instance of AzureCosmosDBParameter class. */ + public AzureCosmosDBParameter() {} + /** * Get the connectionString property: The connection string of this Azure CosmosDB. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureCosmosDBParameterPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureCosmosDBParameterPatch.java index 9c373cf7e7a71..0924b7e508e98 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureCosmosDBParameterPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureCosmosDBParameterPatch.java @@ -34,6 +34,9 @@ public final class AzureCosmosDBParameterPatch { @JsonProperty(value = "collectionId") private String collectionId; + /** Creates an instance of AzureCosmosDBParameterPatch class. */ + public AzureCosmosDBParameterPatch() {} + /** * Get the connectionString property: The connection string of this Azure CosmosDB. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureDataExplorerDataFeed.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureDataExplorerDataFeed.java index 1143bc10317a6..5ed3e8a1202c5 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureDataExplorerDataFeed.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureDataExplorerDataFeed.java @@ -8,6 +8,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import java.time.OffsetDateTime; +import java.util.List; /** The AzureDataExplorerDataFeed model. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dataSourceType") @@ -20,6 +22,9 @@ public final class AzureDataExplorerDataFeed extends DataFeedDetail { @JsonProperty(value = "dataSourceParameter", required = true) private SqlSourceParameter dataSourceParameter; + /** Creates an instance of AzureDataExplorerDataFeed class. */ + public AzureDataExplorerDataFeed() {} + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -39,4 +44,172 @@ public AzureDataExplorerDataFeed setDataSourceParameter(SqlSourceParameter dataS this.dataSourceParameter = dataSourceParameter; return this; } + + /** {@inheritDoc} */ + @Override + public AzureDataExplorerDataFeed setDataFeedName(String dataFeedName) { + super.setDataFeedName(dataFeedName); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataExplorerDataFeed setDataFeedDescription(String dataFeedDescription) { + super.setDataFeedDescription(dataFeedDescription); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataExplorerDataFeed setGranularityName(Granularity granularityName) { + super.setGranularityName(granularityName); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataExplorerDataFeed setGranularityAmount(Integer granularityAmount) { + super.setGranularityAmount(granularityAmount); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataExplorerDataFeed setMetrics(List metrics) { + super.setMetrics(metrics); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataExplorerDataFeed setDimension(List dimension) { + super.setDimension(dimension); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataExplorerDataFeed setTimestampColumn(String timestampColumn) { + super.setTimestampColumn(timestampColumn); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataExplorerDataFeed setDataStartFrom(OffsetDateTime dataStartFrom) { + super.setDataStartFrom(dataStartFrom); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataExplorerDataFeed setStartOffsetInSeconds(Long startOffsetInSeconds) { + super.setStartOffsetInSeconds(startOffsetInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataExplorerDataFeed setMaxConcurrency(Integer maxConcurrency) { + super.setMaxConcurrency(maxConcurrency); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataExplorerDataFeed setMinRetryIntervalInSeconds(Long minRetryIntervalInSeconds) { + super.setMinRetryIntervalInSeconds(minRetryIntervalInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataExplorerDataFeed setStopRetryAfterInSeconds(Long stopRetryAfterInSeconds) { + super.setStopRetryAfterInSeconds(stopRetryAfterInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataExplorerDataFeed setNeedRollup(NeedRollupEnum needRollup) { + super.setNeedRollup(needRollup); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataExplorerDataFeed setRollUpMethod(RollUpMethod rollUpMethod) { + super.setRollUpMethod(rollUpMethod); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataExplorerDataFeed setRollUpColumns(List rollUpColumns) { + super.setRollUpColumns(rollUpColumns); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataExplorerDataFeed setAllUpIdentification(String allUpIdentification) { + super.setAllUpIdentification(allUpIdentification); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataExplorerDataFeed setFillMissingPointType(FillMissingPointType fillMissingPointType) { + super.setFillMissingPointType(fillMissingPointType); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataExplorerDataFeed setFillMissingPointValue(Double fillMissingPointValue) { + super.setFillMissingPointValue(fillMissingPointValue); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataExplorerDataFeed setViewMode(ViewMode viewMode) { + super.setViewMode(viewMode); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataExplorerDataFeed setAdmins(List admins) { + super.setAdmins(admins); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataExplorerDataFeed setViewers(List viewers) { + super.setViewers(viewers); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataExplorerDataFeed setActionLinkTemplate(String actionLinkTemplate) { + super.setActionLinkTemplate(actionLinkTemplate); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataExplorerDataFeed setAuthenticationType(AuthenticationTypeEnum authenticationType) { + super.setAuthenticationType(authenticationType); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataExplorerDataFeed setCredentialId(String credentialId) { + super.setCredentialId(credentialId); + return this; + } } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureDataExplorerDataFeedPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureDataExplorerDataFeedPatch.java index 4a092fc601a47..eb96f1d7c2bce 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureDataExplorerDataFeedPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureDataExplorerDataFeedPatch.java @@ -8,6 +8,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import java.time.OffsetDateTime; +import java.util.List; /** The AzureDataExplorerDataFeedPatch model. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dataSourceType") @@ -20,6 +22,9 @@ public final class AzureDataExplorerDataFeedPatch extends DataFeedDetailPatch { @JsonProperty(value = "dataSourceParameter") private SQLSourceParameterPatch dataSourceParameter; + /** Creates an instance of AzureDataExplorerDataFeedPatch class. */ + public AzureDataExplorerDataFeedPatch() {} + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -39,4 +44,151 @@ public AzureDataExplorerDataFeedPatch setDataSourceParameter(SQLSourceParameterP this.dataSourceParameter = dataSourceParameter; return this; } + + /** {@inheritDoc} */ + @Override + public AzureDataExplorerDataFeedPatch setDataFeedName(String dataFeedName) { + super.setDataFeedName(dataFeedName); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataExplorerDataFeedPatch setDataFeedDescription(String dataFeedDescription) { + super.setDataFeedDescription(dataFeedDescription); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataExplorerDataFeedPatch setTimestampColumn(String timestampColumn) { + super.setTimestampColumn(timestampColumn); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataExplorerDataFeedPatch setDataStartFrom(OffsetDateTime dataStartFrom) { + super.setDataStartFrom(dataStartFrom); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataExplorerDataFeedPatch setStartOffsetInSeconds(Long startOffsetInSeconds) { + super.setStartOffsetInSeconds(startOffsetInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataExplorerDataFeedPatch setMaxConcurrency(Integer maxConcurrency) { + super.setMaxConcurrency(maxConcurrency); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataExplorerDataFeedPatch setMinRetryIntervalInSeconds(Long minRetryIntervalInSeconds) { + super.setMinRetryIntervalInSeconds(minRetryIntervalInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataExplorerDataFeedPatch setStopRetryAfterInSeconds(Long stopRetryAfterInSeconds) { + super.setStopRetryAfterInSeconds(stopRetryAfterInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataExplorerDataFeedPatch setNeedRollup(NeedRollupEnum needRollup) { + super.setNeedRollup(needRollup); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataExplorerDataFeedPatch setRollUpMethod(RollUpMethod rollUpMethod) { + super.setRollUpMethod(rollUpMethod); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataExplorerDataFeedPatch setRollUpColumns(List rollUpColumns) { + super.setRollUpColumns(rollUpColumns); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataExplorerDataFeedPatch setAllUpIdentification(String allUpIdentification) { + super.setAllUpIdentification(allUpIdentification); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataExplorerDataFeedPatch setFillMissingPointType(FillMissingPointType fillMissingPointType) { + super.setFillMissingPointType(fillMissingPointType); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataExplorerDataFeedPatch setFillMissingPointValue(Double fillMissingPointValue) { + super.setFillMissingPointValue(fillMissingPointValue); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataExplorerDataFeedPatch setViewMode(ViewMode viewMode) { + super.setViewMode(viewMode); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataExplorerDataFeedPatch setAdmins(List admins) { + super.setAdmins(admins); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataExplorerDataFeedPatch setViewers(List viewers) { + super.setViewers(viewers); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataExplorerDataFeedPatch setStatus(EntityStatus status) { + super.setStatus(status); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataExplorerDataFeedPatch setActionLinkTemplate(String actionLinkTemplate) { + super.setActionLinkTemplate(actionLinkTemplate); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataExplorerDataFeedPatch setAuthenticationType(AuthenticationTypeEnum authenticationType) { + super.setAuthenticationType(authenticationType); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataExplorerDataFeedPatch setCredentialId(String credentialId) { + super.setCredentialId(credentialId); + return this; + } } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureDataLakeStorageGen2DataFeed.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureDataLakeStorageGen2DataFeed.java index 8bde979cffb13..274884c36bd00 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureDataLakeStorageGen2DataFeed.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureDataLakeStorageGen2DataFeed.java @@ -8,6 +8,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import java.time.OffsetDateTime; +import java.util.List; /** The AzureDataLakeStorageGen2DataFeed model. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dataSourceType") @@ -20,6 +22,9 @@ public final class AzureDataLakeStorageGen2DataFeed extends DataFeedDetail { @JsonProperty(value = "dataSourceParameter", required = true) private AzureDataLakeStorageGen2Parameter dataSourceParameter; + /** Creates an instance of AzureDataLakeStorageGen2DataFeed class. */ + public AzureDataLakeStorageGen2DataFeed() {} + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -40,4 +45,172 @@ public AzureDataLakeStorageGen2DataFeed setDataSourceParameter( this.dataSourceParameter = dataSourceParameter; return this; } + + /** {@inheritDoc} */ + @Override + public AzureDataLakeStorageGen2DataFeed setDataFeedName(String dataFeedName) { + super.setDataFeedName(dataFeedName); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataLakeStorageGen2DataFeed setDataFeedDescription(String dataFeedDescription) { + super.setDataFeedDescription(dataFeedDescription); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataLakeStorageGen2DataFeed setGranularityName(Granularity granularityName) { + super.setGranularityName(granularityName); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataLakeStorageGen2DataFeed setGranularityAmount(Integer granularityAmount) { + super.setGranularityAmount(granularityAmount); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataLakeStorageGen2DataFeed setMetrics(List metrics) { + super.setMetrics(metrics); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataLakeStorageGen2DataFeed setDimension(List dimension) { + super.setDimension(dimension); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataLakeStorageGen2DataFeed setTimestampColumn(String timestampColumn) { + super.setTimestampColumn(timestampColumn); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataLakeStorageGen2DataFeed setDataStartFrom(OffsetDateTime dataStartFrom) { + super.setDataStartFrom(dataStartFrom); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataLakeStorageGen2DataFeed setStartOffsetInSeconds(Long startOffsetInSeconds) { + super.setStartOffsetInSeconds(startOffsetInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataLakeStorageGen2DataFeed setMaxConcurrency(Integer maxConcurrency) { + super.setMaxConcurrency(maxConcurrency); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataLakeStorageGen2DataFeed setMinRetryIntervalInSeconds(Long minRetryIntervalInSeconds) { + super.setMinRetryIntervalInSeconds(minRetryIntervalInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataLakeStorageGen2DataFeed setStopRetryAfterInSeconds(Long stopRetryAfterInSeconds) { + super.setStopRetryAfterInSeconds(stopRetryAfterInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataLakeStorageGen2DataFeed setNeedRollup(NeedRollupEnum needRollup) { + super.setNeedRollup(needRollup); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataLakeStorageGen2DataFeed setRollUpMethod(RollUpMethod rollUpMethod) { + super.setRollUpMethod(rollUpMethod); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataLakeStorageGen2DataFeed setRollUpColumns(List rollUpColumns) { + super.setRollUpColumns(rollUpColumns); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataLakeStorageGen2DataFeed setAllUpIdentification(String allUpIdentification) { + super.setAllUpIdentification(allUpIdentification); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataLakeStorageGen2DataFeed setFillMissingPointType(FillMissingPointType fillMissingPointType) { + super.setFillMissingPointType(fillMissingPointType); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataLakeStorageGen2DataFeed setFillMissingPointValue(Double fillMissingPointValue) { + super.setFillMissingPointValue(fillMissingPointValue); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataLakeStorageGen2DataFeed setViewMode(ViewMode viewMode) { + super.setViewMode(viewMode); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataLakeStorageGen2DataFeed setAdmins(List admins) { + super.setAdmins(admins); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataLakeStorageGen2DataFeed setViewers(List viewers) { + super.setViewers(viewers); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataLakeStorageGen2DataFeed setActionLinkTemplate(String actionLinkTemplate) { + super.setActionLinkTemplate(actionLinkTemplate); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataLakeStorageGen2DataFeed setAuthenticationType(AuthenticationTypeEnum authenticationType) { + super.setAuthenticationType(authenticationType); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataLakeStorageGen2DataFeed setCredentialId(String credentialId) { + super.setCredentialId(credentialId); + return this; + } } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureDataLakeStorageGen2DataFeedPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureDataLakeStorageGen2DataFeedPatch.java index a56222e01597f..35c5a487813e2 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureDataLakeStorageGen2DataFeedPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureDataLakeStorageGen2DataFeedPatch.java @@ -8,6 +8,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import java.time.OffsetDateTime; +import java.util.List; /** The AzureDataLakeStorageGen2DataFeedPatch model. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dataSourceType") @@ -20,6 +22,9 @@ public final class AzureDataLakeStorageGen2DataFeedPatch extends DataFeedDetailP @JsonProperty(value = "dataSourceParameter") private AzureDataLakeStorageGen2ParameterPatch dataSourceParameter; + /** Creates an instance of AzureDataLakeStorageGen2DataFeedPatch class. */ + public AzureDataLakeStorageGen2DataFeedPatch() {} + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -40,4 +45,151 @@ public AzureDataLakeStorageGen2DataFeedPatch setDataSourceParameter( this.dataSourceParameter = dataSourceParameter; return this; } + + /** {@inheritDoc} */ + @Override + public AzureDataLakeStorageGen2DataFeedPatch setDataFeedName(String dataFeedName) { + super.setDataFeedName(dataFeedName); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataLakeStorageGen2DataFeedPatch setDataFeedDescription(String dataFeedDescription) { + super.setDataFeedDescription(dataFeedDescription); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataLakeStorageGen2DataFeedPatch setTimestampColumn(String timestampColumn) { + super.setTimestampColumn(timestampColumn); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataLakeStorageGen2DataFeedPatch setDataStartFrom(OffsetDateTime dataStartFrom) { + super.setDataStartFrom(dataStartFrom); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataLakeStorageGen2DataFeedPatch setStartOffsetInSeconds(Long startOffsetInSeconds) { + super.setStartOffsetInSeconds(startOffsetInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataLakeStorageGen2DataFeedPatch setMaxConcurrency(Integer maxConcurrency) { + super.setMaxConcurrency(maxConcurrency); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataLakeStorageGen2DataFeedPatch setMinRetryIntervalInSeconds(Long minRetryIntervalInSeconds) { + super.setMinRetryIntervalInSeconds(minRetryIntervalInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataLakeStorageGen2DataFeedPatch setStopRetryAfterInSeconds(Long stopRetryAfterInSeconds) { + super.setStopRetryAfterInSeconds(stopRetryAfterInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataLakeStorageGen2DataFeedPatch setNeedRollup(NeedRollupEnum needRollup) { + super.setNeedRollup(needRollup); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataLakeStorageGen2DataFeedPatch setRollUpMethod(RollUpMethod rollUpMethod) { + super.setRollUpMethod(rollUpMethod); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataLakeStorageGen2DataFeedPatch setRollUpColumns(List rollUpColumns) { + super.setRollUpColumns(rollUpColumns); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataLakeStorageGen2DataFeedPatch setAllUpIdentification(String allUpIdentification) { + super.setAllUpIdentification(allUpIdentification); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataLakeStorageGen2DataFeedPatch setFillMissingPointType(FillMissingPointType fillMissingPointType) { + super.setFillMissingPointType(fillMissingPointType); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataLakeStorageGen2DataFeedPatch setFillMissingPointValue(Double fillMissingPointValue) { + super.setFillMissingPointValue(fillMissingPointValue); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataLakeStorageGen2DataFeedPatch setViewMode(ViewMode viewMode) { + super.setViewMode(viewMode); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataLakeStorageGen2DataFeedPatch setAdmins(List admins) { + super.setAdmins(admins); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataLakeStorageGen2DataFeedPatch setViewers(List viewers) { + super.setViewers(viewers); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataLakeStorageGen2DataFeedPatch setStatus(EntityStatus status) { + super.setStatus(status); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataLakeStorageGen2DataFeedPatch setActionLinkTemplate(String actionLinkTemplate) { + super.setActionLinkTemplate(actionLinkTemplate); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataLakeStorageGen2DataFeedPatch setAuthenticationType(AuthenticationTypeEnum authenticationType) { + super.setAuthenticationType(authenticationType); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureDataLakeStorageGen2DataFeedPatch setCredentialId(String credentialId) { + super.setCredentialId(credentialId); + return this; + } } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureDataLakeStorageGen2Parameter.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureDataLakeStorageGen2Parameter.java index 4c58ebdd9ec09..e0a377870933b 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureDataLakeStorageGen2Parameter.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureDataLakeStorageGen2Parameter.java @@ -40,6 +40,9 @@ public final class AzureDataLakeStorageGen2Parameter { @JsonProperty(value = "fileTemplate", required = true) private String fileTemplate; + /** Creates an instance of AzureDataLakeStorageGen2Parameter class. */ + public AzureDataLakeStorageGen2Parameter() {} + /** * Get the accountName property: The account name of this Azure Data Lake. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureDataLakeStorageGen2ParameterPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureDataLakeStorageGen2ParameterPatch.java index a2fe86943467e..252e37149fc81 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureDataLakeStorageGen2ParameterPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureDataLakeStorageGen2ParameterPatch.java @@ -40,6 +40,9 @@ public final class AzureDataLakeStorageGen2ParameterPatch { @JsonProperty(value = "fileTemplate") private String fileTemplate; + /** Creates an instance of AzureDataLakeStorageGen2ParameterPatch class. */ + public AzureDataLakeStorageGen2ParameterPatch() {} + /** * Get the accountName property: The account name of this Azure Data Lake. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureEventHubsDataFeed.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureEventHubsDataFeed.java index 9267543977e22..53651c9a5c9ca 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureEventHubsDataFeed.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureEventHubsDataFeed.java @@ -8,6 +8,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import java.time.OffsetDateTime; +import java.util.List; /** The AzureEventHubsDataFeed model. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dataSourceType") @@ -20,6 +22,9 @@ public final class AzureEventHubsDataFeed extends DataFeedDetail { @JsonProperty(value = "dataSourceParameter", required = true) private AzureEventHubsParameter dataSourceParameter; + /** Creates an instance of AzureEventHubsDataFeed class. */ + public AzureEventHubsDataFeed() {} + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -39,4 +44,172 @@ public AzureEventHubsDataFeed setDataSourceParameter(AzureEventHubsParameter dat this.dataSourceParameter = dataSourceParameter; return this; } + + /** {@inheritDoc} */ + @Override + public AzureEventHubsDataFeed setDataFeedName(String dataFeedName) { + super.setDataFeedName(dataFeedName); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureEventHubsDataFeed setDataFeedDescription(String dataFeedDescription) { + super.setDataFeedDescription(dataFeedDescription); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureEventHubsDataFeed setGranularityName(Granularity granularityName) { + super.setGranularityName(granularityName); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureEventHubsDataFeed setGranularityAmount(Integer granularityAmount) { + super.setGranularityAmount(granularityAmount); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureEventHubsDataFeed setMetrics(List metrics) { + super.setMetrics(metrics); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureEventHubsDataFeed setDimension(List dimension) { + super.setDimension(dimension); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureEventHubsDataFeed setTimestampColumn(String timestampColumn) { + super.setTimestampColumn(timestampColumn); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureEventHubsDataFeed setDataStartFrom(OffsetDateTime dataStartFrom) { + super.setDataStartFrom(dataStartFrom); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureEventHubsDataFeed setStartOffsetInSeconds(Long startOffsetInSeconds) { + super.setStartOffsetInSeconds(startOffsetInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureEventHubsDataFeed setMaxConcurrency(Integer maxConcurrency) { + super.setMaxConcurrency(maxConcurrency); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureEventHubsDataFeed setMinRetryIntervalInSeconds(Long minRetryIntervalInSeconds) { + super.setMinRetryIntervalInSeconds(minRetryIntervalInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureEventHubsDataFeed setStopRetryAfterInSeconds(Long stopRetryAfterInSeconds) { + super.setStopRetryAfterInSeconds(stopRetryAfterInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureEventHubsDataFeed setNeedRollup(NeedRollupEnum needRollup) { + super.setNeedRollup(needRollup); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureEventHubsDataFeed setRollUpMethod(RollUpMethod rollUpMethod) { + super.setRollUpMethod(rollUpMethod); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureEventHubsDataFeed setRollUpColumns(List rollUpColumns) { + super.setRollUpColumns(rollUpColumns); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureEventHubsDataFeed setAllUpIdentification(String allUpIdentification) { + super.setAllUpIdentification(allUpIdentification); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureEventHubsDataFeed setFillMissingPointType(FillMissingPointType fillMissingPointType) { + super.setFillMissingPointType(fillMissingPointType); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureEventHubsDataFeed setFillMissingPointValue(Double fillMissingPointValue) { + super.setFillMissingPointValue(fillMissingPointValue); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureEventHubsDataFeed setViewMode(ViewMode viewMode) { + super.setViewMode(viewMode); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureEventHubsDataFeed setAdmins(List admins) { + super.setAdmins(admins); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureEventHubsDataFeed setViewers(List viewers) { + super.setViewers(viewers); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureEventHubsDataFeed setActionLinkTemplate(String actionLinkTemplate) { + super.setActionLinkTemplate(actionLinkTemplate); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureEventHubsDataFeed setAuthenticationType(AuthenticationTypeEnum authenticationType) { + super.setAuthenticationType(authenticationType); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureEventHubsDataFeed setCredentialId(String credentialId) { + super.setCredentialId(credentialId); + return this; + } } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureEventHubsDataFeedPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureEventHubsDataFeedPatch.java index 090ce300cb7ec..f34a9213a1567 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureEventHubsDataFeedPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureEventHubsDataFeedPatch.java @@ -8,6 +8,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import java.time.OffsetDateTime; +import java.util.List; /** The AzureEventHubsDataFeedPatch model. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dataSourceType") @@ -20,6 +22,9 @@ public final class AzureEventHubsDataFeedPatch extends DataFeedDetailPatch { @JsonProperty(value = "dataSourceParameter") private AzureEventHubsParameterPatch dataSourceParameter; + /** Creates an instance of AzureEventHubsDataFeedPatch class. */ + public AzureEventHubsDataFeedPatch() {} + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -39,4 +44,151 @@ public AzureEventHubsDataFeedPatch setDataSourceParameter(AzureEventHubsParamete this.dataSourceParameter = dataSourceParameter; return this; } + + /** {@inheritDoc} */ + @Override + public AzureEventHubsDataFeedPatch setDataFeedName(String dataFeedName) { + super.setDataFeedName(dataFeedName); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureEventHubsDataFeedPatch setDataFeedDescription(String dataFeedDescription) { + super.setDataFeedDescription(dataFeedDescription); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureEventHubsDataFeedPatch setTimestampColumn(String timestampColumn) { + super.setTimestampColumn(timestampColumn); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureEventHubsDataFeedPatch setDataStartFrom(OffsetDateTime dataStartFrom) { + super.setDataStartFrom(dataStartFrom); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureEventHubsDataFeedPatch setStartOffsetInSeconds(Long startOffsetInSeconds) { + super.setStartOffsetInSeconds(startOffsetInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureEventHubsDataFeedPatch setMaxConcurrency(Integer maxConcurrency) { + super.setMaxConcurrency(maxConcurrency); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureEventHubsDataFeedPatch setMinRetryIntervalInSeconds(Long minRetryIntervalInSeconds) { + super.setMinRetryIntervalInSeconds(minRetryIntervalInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureEventHubsDataFeedPatch setStopRetryAfterInSeconds(Long stopRetryAfterInSeconds) { + super.setStopRetryAfterInSeconds(stopRetryAfterInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureEventHubsDataFeedPatch setNeedRollup(NeedRollupEnum needRollup) { + super.setNeedRollup(needRollup); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureEventHubsDataFeedPatch setRollUpMethod(RollUpMethod rollUpMethod) { + super.setRollUpMethod(rollUpMethod); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureEventHubsDataFeedPatch setRollUpColumns(List rollUpColumns) { + super.setRollUpColumns(rollUpColumns); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureEventHubsDataFeedPatch setAllUpIdentification(String allUpIdentification) { + super.setAllUpIdentification(allUpIdentification); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureEventHubsDataFeedPatch setFillMissingPointType(FillMissingPointType fillMissingPointType) { + super.setFillMissingPointType(fillMissingPointType); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureEventHubsDataFeedPatch setFillMissingPointValue(Double fillMissingPointValue) { + super.setFillMissingPointValue(fillMissingPointValue); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureEventHubsDataFeedPatch setViewMode(ViewMode viewMode) { + super.setViewMode(viewMode); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureEventHubsDataFeedPatch setAdmins(List admins) { + super.setAdmins(admins); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureEventHubsDataFeedPatch setViewers(List viewers) { + super.setViewers(viewers); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureEventHubsDataFeedPatch setStatus(EntityStatus status) { + super.setStatus(status); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureEventHubsDataFeedPatch setActionLinkTemplate(String actionLinkTemplate) { + super.setActionLinkTemplate(actionLinkTemplate); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureEventHubsDataFeedPatch setAuthenticationType(AuthenticationTypeEnum authenticationType) { + super.setAuthenticationType(authenticationType); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureEventHubsDataFeedPatch setCredentialId(String credentialId) { + super.setCredentialId(credentialId); + return this; + } } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureEventHubsParameter.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureEventHubsParameter.java index ae60c513931c0..73e2c132fc31c 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureEventHubsParameter.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureEventHubsParameter.java @@ -22,6 +22,9 @@ public final class AzureEventHubsParameter { @JsonProperty(value = "consumerGroup", required = true) private String consumerGroup; + /** Creates an instance of AzureEventHubsParameter class. */ + public AzureEventHubsParameter() {} + /** * Get the connectionString property: The connection string of this Azure Event Hubs. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureEventHubsParameterPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureEventHubsParameterPatch.java index cc6b33e8869be..d98daf52346ba 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureEventHubsParameterPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureEventHubsParameterPatch.java @@ -22,6 +22,9 @@ public final class AzureEventHubsParameterPatch { @JsonProperty(value = "consumerGroup") private String consumerGroup; + /** Creates an instance of AzureEventHubsParameterPatch class. */ + public AzureEventHubsParameterPatch() {} + /** * Get the connectionString property: The connection string of this Azure Event Hubs. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureLogAnalyticsDataFeed.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureLogAnalyticsDataFeed.java index 5834140311922..5494f42ea8621 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureLogAnalyticsDataFeed.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureLogAnalyticsDataFeed.java @@ -8,6 +8,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import java.time.OffsetDateTime; +import java.util.List; /** The AzureLogAnalyticsDataFeed model. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dataSourceType") @@ -20,6 +22,9 @@ public final class AzureLogAnalyticsDataFeed extends DataFeedDetail { @JsonProperty(value = "dataSourceParameter", required = true) private AzureLogAnalyticsParameter dataSourceParameter; + /** Creates an instance of AzureLogAnalyticsDataFeed class. */ + public AzureLogAnalyticsDataFeed() {} + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -39,4 +44,172 @@ public AzureLogAnalyticsDataFeed setDataSourceParameter(AzureLogAnalyticsParamet this.dataSourceParameter = dataSourceParameter; return this; } + + /** {@inheritDoc} */ + @Override + public AzureLogAnalyticsDataFeed setDataFeedName(String dataFeedName) { + super.setDataFeedName(dataFeedName); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureLogAnalyticsDataFeed setDataFeedDescription(String dataFeedDescription) { + super.setDataFeedDescription(dataFeedDescription); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureLogAnalyticsDataFeed setGranularityName(Granularity granularityName) { + super.setGranularityName(granularityName); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureLogAnalyticsDataFeed setGranularityAmount(Integer granularityAmount) { + super.setGranularityAmount(granularityAmount); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureLogAnalyticsDataFeed setMetrics(List metrics) { + super.setMetrics(metrics); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureLogAnalyticsDataFeed setDimension(List dimension) { + super.setDimension(dimension); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureLogAnalyticsDataFeed setTimestampColumn(String timestampColumn) { + super.setTimestampColumn(timestampColumn); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureLogAnalyticsDataFeed setDataStartFrom(OffsetDateTime dataStartFrom) { + super.setDataStartFrom(dataStartFrom); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureLogAnalyticsDataFeed setStartOffsetInSeconds(Long startOffsetInSeconds) { + super.setStartOffsetInSeconds(startOffsetInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureLogAnalyticsDataFeed setMaxConcurrency(Integer maxConcurrency) { + super.setMaxConcurrency(maxConcurrency); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureLogAnalyticsDataFeed setMinRetryIntervalInSeconds(Long minRetryIntervalInSeconds) { + super.setMinRetryIntervalInSeconds(minRetryIntervalInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureLogAnalyticsDataFeed setStopRetryAfterInSeconds(Long stopRetryAfterInSeconds) { + super.setStopRetryAfterInSeconds(stopRetryAfterInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureLogAnalyticsDataFeed setNeedRollup(NeedRollupEnum needRollup) { + super.setNeedRollup(needRollup); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureLogAnalyticsDataFeed setRollUpMethod(RollUpMethod rollUpMethod) { + super.setRollUpMethod(rollUpMethod); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureLogAnalyticsDataFeed setRollUpColumns(List rollUpColumns) { + super.setRollUpColumns(rollUpColumns); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureLogAnalyticsDataFeed setAllUpIdentification(String allUpIdentification) { + super.setAllUpIdentification(allUpIdentification); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureLogAnalyticsDataFeed setFillMissingPointType(FillMissingPointType fillMissingPointType) { + super.setFillMissingPointType(fillMissingPointType); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureLogAnalyticsDataFeed setFillMissingPointValue(Double fillMissingPointValue) { + super.setFillMissingPointValue(fillMissingPointValue); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureLogAnalyticsDataFeed setViewMode(ViewMode viewMode) { + super.setViewMode(viewMode); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureLogAnalyticsDataFeed setAdmins(List admins) { + super.setAdmins(admins); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureLogAnalyticsDataFeed setViewers(List viewers) { + super.setViewers(viewers); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureLogAnalyticsDataFeed setActionLinkTemplate(String actionLinkTemplate) { + super.setActionLinkTemplate(actionLinkTemplate); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureLogAnalyticsDataFeed setAuthenticationType(AuthenticationTypeEnum authenticationType) { + super.setAuthenticationType(authenticationType); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureLogAnalyticsDataFeed setCredentialId(String credentialId) { + super.setCredentialId(credentialId); + return this; + } } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureLogAnalyticsDataFeedPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureLogAnalyticsDataFeedPatch.java index 195bc8c4350c3..9663a72157143 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureLogAnalyticsDataFeedPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureLogAnalyticsDataFeedPatch.java @@ -8,6 +8,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import java.time.OffsetDateTime; +import java.util.List; /** The AzureLogAnalyticsDataFeedPatch model. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dataSourceType") @@ -20,6 +22,9 @@ public final class AzureLogAnalyticsDataFeedPatch extends DataFeedDetailPatch { @JsonProperty(value = "dataSourceParameter") private AzureLogAnalyticsParameterPatch dataSourceParameter; + /** Creates an instance of AzureLogAnalyticsDataFeedPatch class. */ + public AzureLogAnalyticsDataFeedPatch() {} + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -39,4 +44,151 @@ public AzureLogAnalyticsDataFeedPatch setDataSourceParameter(AzureLogAnalyticsPa this.dataSourceParameter = dataSourceParameter; return this; } + + /** {@inheritDoc} */ + @Override + public AzureLogAnalyticsDataFeedPatch setDataFeedName(String dataFeedName) { + super.setDataFeedName(dataFeedName); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureLogAnalyticsDataFeedPatch setDataFeedDescription(String dataFeedDescription) { + super.setDataFeedDescription(dataFeedDescription); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureLogAnalyticsDataFeedPatch setTimestampColumn(String timestampColumn) { + super.setTimestampColumn(timestampColumn); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureLogAnalyticsDataFeedPatch setDataStartFrom(OffsetDateTime dataStartFrom) { + super.setDataStartFrom(dataStartFrom); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureLogAnalyticsDataFeedPatch setStartOffsetInSeconds(Long startOffsetInSeconds) { + super.setStartOffsetInSeconds(startOffsetInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureLogAnalyticsDataFeedPatch setMaxConcurrency(Integer maxConcurrency) { + super.setMaxConcurrency(maxConcurrency); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureLogAnalyticsDataFeedPatch setMinRetryIntervalInSeconds(Long minRetryIntervalInSeconds) { + super.setMinRetryIntervalInSeconds(minRetryIntervalInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureLogAnalyticsDataFeedPatch setStopRetryAfterInSeconds(Long stopRetryAfterInSeconds) { + super.setStopRetryAfterInSeconds(stopRetryAfterInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureLogAnalyticsDataFeedPatch setNeedRollup(NeedRollupEnum needRollup) { + super.setNeedRollup(needRollup); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureLogAnalyticsDataFeedPatch setRollUpMethod(RollUpMethod rollUpMethod) { + super.setRollUpMethod(rollUpMethod); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureLogAnalyticsDataFeedPatch setRollUpColumns(List rollUpColumns) { + super.setRollUpColumns(rollUpColumns); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureLogAnalyticsDataFeedPatch setAllUpIdentification(String allUpIdentification) { + super.setAllUpIdentification(allUpIdentification); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureLogAnalyticsDataFeedPatch setFillMissingPointType(FillMissingPointType fillMissingPointType) { + super.setFillMissingPointType(fillMissingPointType); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureLogAnalyticsDataFeedPatch setFillMissingPointValue(Double fillMissingPointValue) { + super.setFillMissingPointValue(fillMissingPointValue); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureLogAnalyticsDataFeedPatch setViewMode(ViewMode viewMode) { + super.setViewMode(viewMode); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureLogAnalyticsDataFeedPatch setAdmins(List admins) { + super.setAdmins(admins); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureLogAnalyticsDataFeedPatch setViewers(List viewers) { + super.setViewers(viewers); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureLogAnalyticsDataFeedPatch setStatus(EntityStatus status) { + super.setStatus(status); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureLogAnalyticsDataFeedPatch setActionLinkTemplate(String actionLinkTemplate) { + super.setActionLinkTemplate(actionLinkTemplate); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureLogAnalyticsDataFeedPatch setAuthenticationType(AuthenticationTypeEnum authenticationType) { + super.setAuthenticationType(authenticationType); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureLogAnalyticsDataFeedPatch setCredentialId(String credentialId) { + super.setCredentialId(credentialId); + return this; + } } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureLogAnalyticsParameter.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureLogAnalyticsParameter.java index cd4458b2988e1..eda1c3459db88 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureLogAnalyticsParameter.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureLogAnalyticsParameter.java @@ -11,22 +11,19 @@ @Fluent public final class AzureLogAnalyticsParameter { /* - * The tenant id of service principal that have access to this Log - * Analytics + * The tenant id of service principal that have access to this Log Analytics */ @JsonProperty(value = "tenantId") private String tenantId; /* - * The client id of service principal that have access to this Log - * Analytics + * The client id of service principal that have access to this Log Analytics */ @JsonProperty(value = "clientId") private String clientId; /* - * The client secret of service principal that have access to this Log - * Analytics + * The client secret of service principal that have access to this Log Analytics */ @JsonProperty(value = "clientSecret") private String clientSecret; @@ -38,12 +35,14 @@ public final class AzureLogAnalyticsParameter { private String workspaceId; /* - * The KQL (Kusto Query Language) query to fetch data from this Log - * Analytics + * The KQL (Kusto Query Language) query to fetch data from this Log Analytics */ @JsonProperty(value = "query", required = true) private String query; + /** Creates an instance of AzureLogAnalyticsParameter class. */ + public AzureLogAnalyticsParameter() {} + /** * Get the tenantId property: The tenant id of service principal that have access to this Log Analytics. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureLogAnalyticsParameterPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureLogAnalyticsParameterPatch.java index 32d8c163ef97c..ad47a0a0ca623 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureLogAnalyticsParameterPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureLogAnalyticsParameterPatch.java @@ -11,22 +11,19 @@ @Fluent public final class AzureLogAnalyticsParameterPatch { /* - * The tenant id of service principal that have access to this Log - * Analytics + * The tenant id of service principal that have access to this Log Analytics */ @JsonProperty(value = "tenantId") private String tenantId; /* - * The client id of service principal that have access to this Log - * Analytics + * The client id of service principal that have access to this Log Analytics */ @JsonProperty(value = "clientId") private String clientId; /* - * The client secret of service principal that have access to this Log - * Analytics + * The client secret of service principal that have access to this Log Analytics */ @JsonProperty(value = "clientSecret") private String clientSecret; @@ -38,12 +35,14 @@ public final class AzureLogAnalyticsParameterPatch { private String workspaceId; /* - * The KQL (Kusto Query Language) query to fetch data from this Log - * Analytics + * The KQL (Kusto Query Language) query to fetch data from this Log Analytics */ @JsonProperty(value = "query") private String query; + /** Creates an instance of AzureLogAnalyticsParameterPatch class. */ + public AzureLogAnalyticsParameterPatch() {} + /** * Get the tenantId property: The tenant id of service principal that have access to this Log Analytics. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureSQLConnectionStringCredential.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureSQLConnectionStringCredential.java index ab304074f124a..0249e07e09c06 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureSQLConnectionStringCredential.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureSQLConnectionStringCredential.java @@ -20,6 +20,9 @@ public final class AzureSQLConnectionStringCredential extends DataSourceCredenti @JsonProperty(value = "parameters", required = true) private AzureSQLConnectionStringParam parameters; + /** Creates an instance of AzureSQLConnectionStringCredential class. */ + public AzureSQLConnectionStringCredential() {} + /** * Get the parameters property: The parameters property. * @@ -39,4 +42,19 @@ public AzureSQLConnectionStringCredential setParameters(AzureSQLConnectionString this.parameters = parameters; return this; } + + /** {@inheritDoc} */ + @Override + public AzureSQLConnectionStringCredential setDataSourceCredentialName(String dataSourceCredentialName) { + super.setDataSourceCredentialName(dataSourceCredentialName); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureSQLConnectionStringCredential setDataSourceCredentialDescription( + String dataSourceCredentialDescription) { + super.setDataSourceCredentialDescription(dataSourceCredentialDescription); + return this; + } } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureSQLConnectionStringCredentialPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureSQLConnectionStringCredentialPatch.java index 612ecde89165b..08c1619124282 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureSQLConnectionStringCredentialPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureSQLConnectionStringCredentialPatch.java @@ -20,6 +20,9 @@ public final class AzureSQLConnectionStringCredentialPatch extends DataSourceCre @JsonProperty(value = "parameters") private AzureSQLConnectionStringParamPatch parameters; + /** Creates an instance of AzureSQLConnectionStringCredentialPatch class. */ + public AzureSQLConnectionStringCredentialPatch() {} + /** * Get the parameters property: The parameters property. * @@ -39,4 +42,19 @@ public AzureSQLConnectionStringCredentialPatch setParameters(AzureSQLConnectionS this.parameters = parameters; return this; } + + /** {@inheritDoc} */ + @Override + public AzureSQLConnectionStringCredentialPatch setDataSourceCredentialName(String dataSourceCredentialName) { + super.setDataSourceCredentialName(dataSourceCredentialName); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureSQLConnectionStringCredentialPatch setDataSourceCredentialDescription( + String dataSourceCredentialDescription) { + super.setDataSourceCredentialDescription(dataSourceCredentialDescription); + return this; + } } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureSQLConnectionStringParam.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureSQLConnectionStringParam.java index d4406a26fe4d7..a149042aaca90 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureSQLConnectionStringParam.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureSQLConnectionStringParam.java @@ -16,6 +16,9 @@ public final class AzureSQLConnectionStringParam { @JsonProperty(value = "connectionString") private String connectionString; + /** Creates an instance of AzureSQLConnectionStringParam class. */ + public AzureSQLConnectionStringParam() {} + /** * Get the connectionString property: The connection string to access the Azure SQL. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureSQLConnectionStringParamPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureSQLConnectionStringParamPatch.java index f534fcfebf2dd..3cdea2695409a 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureSQLConnectionStringParamPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureSQLConnectionStringParamPatch.java @@ -16,6 +16,9 @@ public final class AzureSQLConnectionStringParamPatch { @JsonProperty(value = "connectionString") private String connectionString; + /** Creates an instance of AzureSQLConnectionStringParamPatch class. */ + public AzureSQLConnectionStringParamPatch() {} + /** * Get the connectionString property: The connection string to access the Azure SQL. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureTableDataFeed.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureTableDataFeed.java index ea01861af286a..a76a051049eb2 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureTableDataFeed.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureTableDataFeed.java @@ -8,6 +8,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import java.time.OffsetDateTime; +import java.util.List; /** The AzureTableDataFeed model. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dataSourceType") @@ -20,6 +22,9 @@ public final class AzureTableDataFeed extends DataFeedDetail { @JsonProperty(value = "dataSourceParameter", required = true) private AzureTableParameter dataSourceParameter; + /** Creates an instance of AzureTableDataFeed class. */ + public AzureTableDataFeed() {} + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -39,4 +44,172 @@ public AzureTableDataFeed setDataSourceParameter(AzureTableParameter dataSourceP this.dataSourceParameter = dataSourceParameter; return this; } + + /** {@inheritDoc} */ + @Override + public AzureTableDataFeed setDataFeedName(String dataFeedName) { + super.setDataFeedName(dataFeedName); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureTableDataFeed setDataFeedDescription(String dataFeedDescription) { + super.setDataFeedDescription(dataFeedDescription); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureTableDataFeed setGranularityName(Granularity granularityName) { + super.setGranularityName(granularityName); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureTableDataFeed setGranularityAmount(Integer granularityAmount) { + super.setGranularityAmount(granularityAmount); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureTableDataFeed setMetrics(List metrics) { + super.setMetrics(metrics); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureTableDataFeed setDimension(List dimension) { + super.setDimension(dimension); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureTableDataFeed setTimestampColumn(String timestampColumn) { + super.setTimestampColumn(timestampColumn); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureTableDataFeed setDataStartFrom(OffsetDateTime dataStartFrom) { + super.setDataStartFrom(dataStartFrom); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureTableDataFeed setStartOffsetInSeconds(Long startOffsetInSeconds) { + super.setStartOffsetInSeconds(startOffsetInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureTableDataFeed setMaxConcurrency(Integer maxConcurrency) { + super.setMaxConcurrency(maxConcurrency); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureTableDataFeed setMinRetryIntervalInSeconds(Long minRetryIntervalInSeconds) { + super.setMinRetryIntervalInSeconds(minRetryIntervalInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureTableDataFeed setStopRetryAfterInSeconds(Long stopRetryAfterInSeconds) { + super.setStopRetryAfterInSeconds(stopRetryAfterInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureTableDataFeed setNeedRollup(NeedRollupEnum needRollup) { + super.setNeedRollup(needRollup); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureTableDataFeed setRollUpMethod(RollUpMethod rollUpMethod) { + super.setRollUpMethod(rollUpMethod); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureTableDataFeed setRollUpColumns(List rollUpColumns) { + super.setRollUpColumns(rollUpColumns); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureTableDataFeed setAllUpIdentification(String allUpIdentification) { + super.setAllUpIdentification(allUpIdentification); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureTableDataFeed setFillMissingPointType(FillMissingPointType fillMissingPointType) { + super.setFillMissingPointType(fillMissingPointType); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureTableDataFeed setFillMissingPointValue(Double fillMissingPointValue) { + super.setFillMissingPointValue(fillMissingPointValue); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureTableDataFeed setViewMode(ViewMode viewMode) { + super.setViewMode(viewMode); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureTableDataFeed setAdmins(List admins) { + super.setAdmins(admins); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureTableDataFeed setViewers(List viewers) { + super.setViewers(viewers); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureTableDataFeed setActionLinkTemplate(String actionLinkTemplate) { + super.setActionLinkTemplate(actionLinkTemplate); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureTableDataFeed setAuthenticationType(AuthenticationTypeEnum authenticationType) { + super.setAuthenticationType(authenticationType); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureTableDataFeed setCredentialId(String credentialId) { + super.setCredentialId(credentialId); + return this; + } } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureTableDataFeedPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureTableDataFeedPatch.java index 7b45869c683dc..bdd03da0e5ee0 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureTableDataFeedPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureTableDataFeedPatch.java @@ -8,6 +8,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import java.time.OffsetDateTime; +import java.util.List; /** The AzureTableDataFeedPatch model. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dataSourceType") @@ -20,6 +22,9 @@ public final class AzureTableDataFeedPatch extends DataFeedDetailPatch { @JsonProperty(value = "dataSourceParameter") private AzureTableParameterPatch dataSourceParameter; + /** Creates an instance of AzureTableDataFeedPatch class. */ + public AzureTableDataFeedPatch() {} + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -39,4 +44,151 @@ public AzureTableDataFeedPatch setDataSourceParameter(AzureTableParameterPatch d this.dataSourceParameter = dataSourceParameter; return this; } + + /** {@inheritDoc} */ + @Override + public AzureTableDataFeedPatch setDataFeedName(String dataFeedName) { + super.setDataFeedName(dataFeedName); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureTableDataFeedPatch setDataFeedDescription(String dataFeedDescription) { + super.setDataFeedDescription(dataFeedDescription); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureTableDataFeedPatch setTimestampColumn(String timestampColumn) { + super.setTimestampColumn(timestampColumn); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureTableDataFeedPatch setDataStartFrom(OffsetDateTime dataStartFrom) { + super.setDataStartFrom(dataStartFrom); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureTableDataFeedPatch setStartOffsetInSeconds(Long startOffsetInSeconds) { + super.setStartOffsetInSeconds(startOffsetInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureTableDataFeedPatch setMaxConcurrency(Integer maxConcurrency) { + super.setMaxConcurrency(maxConcurrency); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureTableDataFeedPatch setMinRetryIntervalInSeconds(Long minRetryIntervalInSeconds) { + super.setMinRetryIntervalInSeconds(minRetryIntervalInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureTableDataFeedPatch setStopRetryAfterInSeconds(Long stopRetryAfterInSeconds) { + super.setStopRetryAfterInSeconds(stopRetryAfterInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureTableDataFeedPatch setNeedRollup(NeedRollupEnum needRollup) { + super.setNeedRollup(needRollup); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureTableDataFeedPatch setRollUpMethod(RollUpMethod rollUpMethod) { + super.setRollUpMethod(rollUpMethod); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureTableDataFeedPatch setRollUpColumns(List rollUpColumns) { + super.setRollUpColumns(rollUpColumns); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureTableDataFeedPatch setAllUpIdentification(String allUpIdentification) { + super.setAllUpIdentification(allUpIdentification); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureTableDataFeedPatch setFillMissingPointType(FillMissingPointType fillMissingPointType) { + super.setFillMissingPointType(fillMissingPointType); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureTableDataFeedPatch setFillMissingPointValue(Double fillMissingPointValue) { + super.setFillMissingPointValue(fillMissingPointValue); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureTableDataFeedPatch setViewMode(ViewMode viewMode) { + super.setViewMode(viewMode); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureTableDataFeedPatch setAdmins(List admins) { + super.setAdmins(admins); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureTableDataFeedPatch setViewers(List viewers) { + super.setViewers(viewers); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureTableDataFeedPatch setStatus(EntityStatus status) { + super.setStatus(status); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureTableDataFeedPatch setActionLinkTemplate(String actionLinkTemplate) { + super.setActionLinkTemplate(actionLinkTemplate); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureTableDataFeedPatch setAuthenticationType(AuthenticationTypeEnum authenticationType) { + super.setAuthenticationType(authenticationType); + return this; + } + + /** {@inheritDoc} */ + @Override + public AzureTableDataFeedPatch setCredentialId(String credentialId) { + super.setCredentialId(credentialId); + return this; + } } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureTableParameter.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureTableParameter.java index 51b08f58dc74a..a79aa0be1496c 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureTableParameter.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureTableParameter.java @@ -23,12 +23,14 @@ public final class AzureTableParameter { private String table; /* - * The statement to query this table. Please find syntax and details from - * Azure Table documents. + * The statement to query this table. Please find syntax and details from Azure Table documents. */ @JsonProperty(value = "query", required = true) private String query; + /** Creates an instance of AzureTableParameter class. */ + public AzureTableParameter() {} + /** * Get the connectionString property: The connection string of this Azure Table. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureTableParameterPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureTableParameterPatch.java index 77e4c8898067f..94634365e89a2 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureTableParameterPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/AzureTableParameterPatch.java @@ -23,12 +23,14 @@ public final class AzureTableParameterPatch { private String table; /* - * The statement to query this table. Please find syntax and details from - * Azure Table documents. + * The statement to query this table. Please find syntax and details from Azure Table documents. */ @JsonProperty(value = "query") private String query; + /** Creates an instance of AzureTableParameterPatch class. */ + public AzureTableParameterPatch() {} + /** * Get the connectionString property: The connection string of this Azure Table. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ChangePointFeedback.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ChangePointFeedback.java index 96fe09b522ee3..fb5e64953b975 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ChangePointFeedback.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ChangePointFeedback.java @@ -9,6 +9,7 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import java.time.OffsetDateTime; +import java.util.UUID; /** The ChangePointFeedback model. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "feedbackType") @@ -22,8 +23,7 @@ public final class ChangePointFeedback extends MetricFeedback { private OffsetDateTime startTime; /* - * the end timestamp of feedback time range, when equals to startTime means - * only one timestamp + * the end timestamp of feedback time range, when equals to startTime means only one timestamp */ @JsonProperty(value = "endTime", required = true) private OffsetDateTime endTime; @@ -34,6 +34,9 @@ public final class ChangePointFeedback extends MetricFeedback { @JsonProperty(value = "value", required = true) private ChangePointFeedbackValue value; + /** Creates an instance of ChangePointFeedback class. */ + public ChangePointFeedback() {} + /** * Get the startTime property: the start timestamp of feedback time range. * @@ -95,4 +98,18 @@ public ChangePointFeedback setValue(ChangePointFeedbackValue value) { this.value = value; return this; } + + /** {@inheritDoc} */ + @Override + public ChangePointFeedback setMetricId(UUID metricId) { + super.setMetricId(metricId); + return this; + } + + /** {@inheritDoc} */ + @Override + public ChangePointFeedback setDimensionFilter(FeedbackDimensionFilter dimensionFilter) { + super.setDimensionFilter(dimensionFilter); + return this; + } } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ChangePointFeedbackValue.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ChangePointFeedbackValue.java index 2e51fc4a801a9..534acde1db3c1 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ChangePointFeedbackValue.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ChangePointFeedbackValue.java @@ -17,6 +17,9 @@ public final class ChangePointFeedbackValue { @JsonProperty(value = "changePointValue", required = true) private ChangePointValue changePointValue; + /** Creates an instance of ChangePointFeedbackValue class. */ + public ChangePointFeedbackValue() {} + /** * Get the changePointValue property: The changePointValue property. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ChangeThresholdCondition.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ChangeThresholdCondition.java index 93326fd39c631..37b059d0dc5f3 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ChangeThresholdCondition.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ChangeThresholdCondition.java @@ -4,7 +4,6 @@ package com.azure.ai.metricsadvisor.implementation.models; -import com.azure.ai.metricsadvisor.administration.models.AnomalyDetectorDirection; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; @@ -24,10 +23,9 @@ public final class ChangeThresholdCondition { private int shiftPoint; /* - * if the withinRange = true, detected data is abnormal when the value - * falls in the range, in this case anomalyDetectorDirection must be Both - * if the withinRange = false, detected data is abnormal when the value - * falls out of the range + * if the withinRange = true, detected data is abnormal when the value falls in the range, in this case + * anomalyDetectorDirection must be Both + * if the withinRange = false, detected data is abnormal when the value falls out of the range */ @JsonProperty(value = "withinRange", required = true) private boolean withinRange; @@ -44,6 +42,9 @@ public final class ChangeThresholdCondition { @JsonProperty(value = "suppressCondition", required = true) private SuppressCondition suppressCondition; + /** Creates an instance of ChangeThresholdCondition class. */ + public ChangeThresholdCondition() {} + /** * Get the changePercentage property: change percentage, value range : [0, +∞). * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ChangeThresholdConditionPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ChangeThresholdConditionPatch.java index 8b60ad04497bf..54e5996672d6d 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ChangeThresholdConditionPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ChangeThresholdConditionPatch.java @@ -4,7 +4,6 @@ package com.azure.ai.metricsadvisor.implementation.models; -import com.azure.ai.metricsadvisor.administration.models.AnomalyDetectorDirection; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; @@ -24,10 +23,9 @@ public final class ChangeThresholdConditionPatch { private Integer shiftPoint; /* - * if the withinRange = true, detected data is abnormal when the value - * falls in the range, in this case anomalyDetectorDirection must be Both - * if the withinRange = false, detected data is abnormal when the value - * falls out of the range + * if the withinRange = true, detected data is abnormal when the value falls in the range, in this case + * anomalyDetectorDirection must be Both + * if the withinRange = false, detected data is abnormal when the value falls out of the range */ @JsonProperty(value = "withinRange") private Boolean withinRange; @@ -44,6 +42,9 @@ public final class ChangeThresholdConditionPatch { @JsonProperty(value = "suppressCondition") private SuppressConditionPatch suppressCondition; + /** Creates an instance of ChangeThresholdConditionPatch class. */ + public ChangeThresholdConditionPatch() {} + /** * Get the changePercentage property: change percentage, value range : [0, +∞). * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CommentFeedback.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CommentFeedback.java index 76699c207d007..21efdd49afac8 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CommentFeedback.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CommentFeedback.java @@ -9,6 +9,7 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import java.time.OffsetDateTime; +import java.util.UUID; /** The CommentFeedback model. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "feedbackType") @@ -22,8 +23,7 @@ public final class CommentFeedback extends MetricFeedback { private OffsetDateTime startTime; /* - * the end timestamp of feedback time range, when equals to startTime means - * only one timestamp + * the end timestamp of feedback time range, when equals to startTime means only one timestamp */ @JsonProperty(value = "endTime") private OffsetDateTime endTime; @@ -34,6 +34,9 @@ public final class CommentFeedback extends MetricFeedback { @JsonProperty(value = "value", required = true) private CommentFeedbackValue value; + /** Creates an instance of CommentFeedback class. */ + public CommentFeedback() {} + /** * Get the startTime property: the start timestamp of feedback time range. * @@ -95,4 +98,18 @@ public CommentFeedback setValue(CommentFeedbackValue value) { this.value = value; return this; } + + /** {@inheritDoc} */ + @Override + public CommentFeedback setMetricId(UUID metricId) { + super.setMetricId(metricId); + return this; + } + + /** {@inheritDoc} */ + @Override + public CommentFeedback setDimensionFilter(FeedbackDimensionFilter dimensionFilter) { + super.setDimensionFilter(dimensionFilter); + return this; + } } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CommentFeedbackValue.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CommentFeedbackValue.java index 830e8ea38475e..1adc3410642cf 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CommentFeedbackValue.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CommentFeedbackValue.java @@ -16,6 +16,9 @@ public final class CommentFeedbackValue { @JsonProperty(value = "commentValue", required = true) private String commentValue; + /** Creates an instance of CommentFeedbackValue class. */ + public CommentFeedbackValue() {} + /** * Get the commentValue property: the comment string. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CreateAnomalyAlertingConfigurationHeaders.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CreateAnomalyAlertingConfigurationHeaders.java index e15964f7364bd..97b6c8b4c462f 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CreateAnomalyAlertingConfigurationHeaders.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CreateAnomalyAlertingConfigurationHeaders.java @@ -5,6 +5,8 @@ package com.azure.ai.metricsadvisor.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; import com.fasterxml.jackson.annotation.JsonProperty; /** The CreateAnomalyAlertingConfigurationHeaders model. */ @@ -16,6 +18,16 @@ public final class CreateAnomalyAlertingConfigurationHeaders { @JsonProperty(value = "Location") private String location; + // HttpHeaders containing the raw property values. + /** + * Creates an instance of CreateAnomalyAlertingConfigurationHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public CreateAnomalyAlertingConfigurationHeaders(HttpHeaders rawHeaders) { + this.location = rawHeaders.getValue(HttpHeaderName.LOCATION); + } + /** * Get the location property: The Location property. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CreateAnomalyDetectionConfigurationHeaders.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CreateAnomalyDetectionConfigurationHeaders.java index e56905a6a64f6..7b17e7ad2192c 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CreateAnomalyDetectionConfigurationHeaders.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CreateAnomalyDetectionConfigurationHeaders.java @@ -5,6 +5,8 @@ package com.azure.ai.metricsadvisor.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; import com.fasterxml.jackson.annotation.JsonProperty; /** The CreateAnomalyDetectionConfigurationHeaders model. */ @@ -16,6 +18,16 @@ public final class CreateAnomalyDetectionConfigurationHeaders { @JsonProperty(value = "Location") private String location; + // HttpHeaders containing the raw property values. + /** + * Creates an instance of CreateAnomalyDetectionConfigurationHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public CreateAnomalyDetectionConfigurationHeaders(HttpHeaders rawHeaders) { + this.location = rawHeaders.getValue(HttpHeaderName.LOCATION); + } + /** * Get the location property: The Location property. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CreateCredentialHeaders.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CreateCredentialHeaders.java index 5b4298a5127ac..203af995b4fc1 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CreateCredentialHeaders.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CreateCredentialHeaders.java @@ -5,6 +5,8 @@ package com.azure.ai.metricsadvisor.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; import com.fasterxml.jackson.annotation.JsonProperty; /** The CreateCredentialHeaders model. */ @@ -16,6 +18,16 @@ public final class CreateCredentialHeaders { @JsonProperty(value = "Location") private String location; + // HttpHeaders containing the raw property values. + /** + * Creates an instance of CreateCredentialHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public CreateCredentialHeaders(HttpHeaders rawHeaders) { + this.location = rawHeaders.getValue(HttpHeaderName.LOCATION); + } + /** * Get the location property: The Location property. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CreateDataFeedHeaders.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CreateDataFeedHeaders.java index 37b8fe932af9c..9582cb0585124 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CreateDataFeedHeaders.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CreateDataFeedHeaders.java @@ -5,6 +5,8 @@ package com.azure.ai.metricsadvisor.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; import com.fasterxml.jackson.annotation.JsonProperty; /** The CreateDataFeedHeaders model. */ @@ -16,6 +18,16 @@ public final class CreateDataFeedHeaders { @JsonProperty(value = "Location") private String location; + // HttpHeaders containing the raw property values. + /** + * Creates an instance of CreateDataFeedHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public CreateDataFeedHeaders(HttpHeaders rawHeaders) { + this.location = rawHeaders.getValue(HttpHeaderName.LOCATION); + } + /** * Get the location property: The Location property. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CreateHookHeaders.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CreateHookHeaders.java index 99bb80c20adc1..7bcca5c254adc 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CreateHookHeaders.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CreateHookHeaders.java @@ -5,6 +5,8 @@ package com.azure.ai.metricsadvisor.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; import com.fasterxml.jackson.annotation.JsonProperty; /** The CreateHookHeaders model. */ @@ -16,6 +18,16 @@ public final class CreateHookHeaders { @JsonProperty(value = "Location") private String location; + // HttpHeaders containing the raw property values. + /** + * Creates an instance of CreateHookHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public CreateHookHeaders(HttpHeaders rawHeaders) { + this.location = rawHeaders.getValue(HttpHeaderName.LOCATION); + } + /** * Get the location property: The Location property. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CreateMetricFeedbackHeaders.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CreateMetricFeedbackHeaders.java index fb959a9de12ae..3e76ff7ec63af 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CreateMetricFeedbackHeaders.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/CreateMetricFeedbackHeaders.java @@ -5,6 +5,8 @@ package com.azure.ai.metricsadvisor.implementation.models; import com.azure.core.annotation.Fluent; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; import com.fasterxml.jackson.annotation.JsonProperty; /** The CreateMetricFeedbackHeaders model. */ @@ -16,6 +18,16 @@ public final class CreateMetricFeedbackHeaders { @JsonProperty(value = "Location") private String location; + // HttpHeaders containing the raw property values. + /** + * Creates an instance of CreateMetricFeedbackHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public CreateMetricFeedbackHeaders(HttpHeaders rawHeaders) { + this.location = rawHeaders.getValue(HttpHeaderName.LOCATION); + } + /** * Get the location property: The Location property. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDetail.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDetail.java index 74612b6e3aa58..f3159ff0daa20 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDetail.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDetail.java @@ -80,8 +80,8 @@ public class DataFeedDetail { private List dimension; /* - * user-defined timestamp column. if timestampColumn is null, start time of - * every time slice will be used as default value. + * user-defined timestamp column. if timestampColumn is null, start time of every time slice will be used as + * default value. */ @JsonProperty(value = "timestampColumn") private String timestampColumn; @@ -93,15 +93,13 @@ public class DataFeedDetail { private OffsetDateTime dataStartFrom; /* - * the time that the beginning of data ingestion task will delay for every - * data slice according to this offset. + * the time that the beginning of data ingestion task will delay for every data slice according to this offset. */ @JsonProperty(value = "startOffsetInSeconds") private Long startOffsetInSeconds; /* - * the max concurrency of data ingestion queries against user data source. - * 0 means no limitation. + * the max concurrency of data ingestion queries against user data source. 0 means no limitation. */ @JsonProperty(value = "maxConcurrency") private Integer maxConcurrency; @@ -113,8 +111,7 @@ public class DataFeedDetail { private Long minRetryIntervalInSeconds; /* - * stop retry data ingestion after the data slice first schedule time in - * seconds. + * stop retry data ingestion after the data slice first schedule time in seconds. */ @JsonProperty(value = "stopRetryAfterInSeconds") private Long stopRetryAfterInSeconds; @@ -215,6 +212,9 @@ public class DataFeedDetail { @JsonProperty(value = "credentialId") private String credentialId; + /** Creates an instance of DataFeedDetail class. */ + public DataFeedDetail() {} + /** * Get the dataFeedId property: data feed unique id. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDetailPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDetailPatch.java index 770544a5af6ba..db4d08f74568c 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDetailPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDetailPatch.java @@ -49,8 +49,8 @@ public class DataFeedDetailPatch { private String dataFeedDescription; /* - * user-defined timestamp column. if timestampColumn is null, start time of - * every time slice will be used as default value. + * user-defined timestamp column. if timestampColumn is null, start time of every time slice will be used as + * default value. */ @JsonProperty(value = "timestampColumn") private String timestampColumn; @@ -62,15 +62,13 @@ public class DataFeedDetailPatch { private OffsetDateTime dataStartFrom; /* - * the time that the beginning of data ingestion task will delay for every - * data slice according to this offset. + * the time that the beginning of data ingestion task will delay for every data slice according to this offset. */ @JsonProperty(value = "startOffsetInSeconds") private Long startOffsetInSeconds; /* - * the max concurrency of data ingestion queries against user data source. - * 0 means no limitation. + * the max concurrency of data ingestion queries against user data source. 0 means no limitation. */ @JsonProperty(value = "maxConcurrency") private Integer maxConcurrency; @@ -82,8 +80,7 @@ public class DataFeedDetailPatch { private Long minRetryIntervalInSeconds; /* - * stop retry data ingestion after the data slice first schedule time in - * seconds. + * stop retry data ingestion after the data slice first schedule time in seconds. */ @JsonProperty(value = "stopRetryAfterInSeconds") private Long stopRetryAfterInSeconds; @@ -166,6 +163,9 @@ public class DataFeedDetailPatch { @JsonProperty(value = "credentialId") private String credentialId; + /** Creates an instance of DataFeedDetailPatch class. */ + public DataFeedDetailPatch() {} + /** * Get the dataFeedName property: data feed name. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDetailPatchDataSourceType.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDetailPatchDataSourceType.java deleted file mode 100644 index 3f503ce4d90d6..0000000000000 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDetailPatchDataSourceType.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.ai.metricsadvisor.implementation.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for DataFeedDetailPatchDataSourceType. */ -public final class DataFeedDetailPatchDataSourceType extends ExpandableStringEnum { - /** Static value AzureApplicationInsights for DataFeedDetailPatchDataSourceType. */ - public static final DataFeedDetailPatchDataSourceType AZURE_APPLICATION_INSIGHTS = - fromString("AzureApplicationInsights"); - - /** Static value AzureBlob for DataFeedDetailPatchDataSourceType. */ - public static final DataFeedDetailPatchDataSourceType AZURE_BLOB = fromString("AzureBlob"); - - /** Static value AzureCosmosDB for DataFeedDetailPatchDataSourceType. */ - public static final DataFeedDetailPatchDataSourceType AZURE_COSMOS_DB = fromString("AzureCosmosDB"); - - /** Static value AzureDataExplorer for DataFeedDetailPatchDataSourceType. */ - public static final DataFeedDetailPatchDataSourceType AZURE_DATA_EXPLORER = fromString("AzureDataExplorer"); - - /** Static value AzureDataLakeStorageGen2 for DataFeedDetailPatchDataSourceType. */ - public static final DataFeedDetailPatchDataSourceType AZURE_DATA_LAKE_STORAGE_GEN2 = - fromString("AzureDataLakeStorageGen2"); - - /** Static value AzureTable for DataFeedDetailPatchDataSourceType. */ - public static final DataFeedDetailPatchDataSourceType AZURE_TABLE = fromString("AzureTable"); - - /** Static value Elasticsearch for DataFeedDetailPatchDataSourceType. */ - public static final DataFeedDetailPatchDataSourceType ELASTICSEARCH = fromString("Elasticsearch"); - - /** Static value HttpRequest for DataFeedDetailPatchDataSourceType. */ - public static final DataFeedDetailPatchDataSourceType HTTP_REQUEST = fromString("HttpRequest"); - - /** Static value InfluxDB for DataFeedDetailPatchDataSourceType. */ - public static final DataFeedDetailPatchDataSourceType INFLUX_DB = fromString("InfluxDB"); - - /** Static value MongoDB for DataFeedDetailPatchDataSourceType. */ - public static final DataFeedDetailPatchDataSourceType MONGO_DB = fromString("MongoDB"); - - /** Static value MySql for DataFeedDetailPatchDataSourceType. */ - public static final DataFeedDetailPatchDataSourceType MY_SQL = fromString("MySql"); - - /** Static value PostgreSql for DataFeedDetailPatchDataSourceType. */ - public static final DataFeedDetailPatchDataSourceType POSTGRE_SQL = fromString("PostgreSql"); - - /** Static value SqlServer for DataFeedDetailPatchDataSourceType. */ - public static final DataFeedDetailPatchDataSourceType SQL_SERVER = fromString("SqlServer"); - - /** - * Creates or finds a DataFeedDetailPatchDataSourceType from its string representation. - * - * @param name a name to look for. - * @return the corresponding DataFeedDetailPatchDataSourceType. - */ - @JsonCreator - public static DataFeedDetailPatchDataSourceType fromString(String name) { - return fromString(name, DataFeedDetailPatchDataSourceType.class); - } - - /** @return known DataFeedDetailPatchDataSourceType values. */ - public static Collection values() { - return values(DataFeedDetailPatchDataSourceType.class); - } -} diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDetailPatchFillMissingPointForAd.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDetailPatchFillMissingPointForAd.java deleted file mode 100644 index caa140a7587c4..0000000000000 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDetailPatchFillMissingPointForAd.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.ai.metricsadvisor.implementation.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for DataFeedDetailPatchFillMissingPointForAd. */ -public final class DataFeedDetailPatchFillMissingPointForAd - extends ExpandableStringEnum { - /** Static value SmartFilling for DataFeedDetailPatchFillMissingPointForAd. */ - public static final DataFeedDetailPatchFillMissingPointForAd SMART_FILLING = fromString("SmartFilling"); - - /** Static value PreviousValue for DataFeedDetailPatchFillMissingPointForAd. */ - public static final DataFeedDetailPatchFillMissingPointForAd PREVIOUS_VALUE = fromString("PreviousValue"); - - /** Static value CustomValue for DataFeedDetailPatchFillMissingPointForAd. */ - public static final DataFeedDetailPatchFillMissingPointForAd CUSTOM_VALUE = fromString("CustomValue"); - - /** Static value NoFilling for DataFeedDetailPatchFillMissingPointForAd. */ - public static final DataFeedDetailPatchFillMissingPointForAd NO_FILLING = fromString("NoFilling"); - - /** - * Creates or finds a DataFeedDetailPatchFillMissingPointForAd from its string representation. - * - * @param name a name to look for. - * @return the corresponding DataFeedDetailPatchFillMissingPointForAd. - */ - @JsonCreator - public static DataFeedDetailPatchFillMissingPointForAd fromString(String name) { - return fromString(name, DataFeedDetailPatchFillMissingPointForAd.class); - } - - /** @return known DataFeedDetailPatchFillMissingPointForAd values. */ - public static Collection values() { - return values(DataFeedDetailPatchFillMissingPointForAd.class); - } -} diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDetailPatchNeedRollup.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDetailPatchNeedRollup.java deleted file mode 100644 index 02305ba522752..0000000000000 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDetailPatchNeedRollup.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.ai.metricsadvisor.implementation.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for DataFeedDetailPatchNeedRollup. */ -public final class DataFeedDetailPatchNeedRollup extends ExpandableStringEnum { - /** Static value NoRollup for DataFeedDetailPatchNeedRollup. */ - public static final DataFeedDetailPatchNeedRollup NO_ROLLUP = fromString("NoRollup"); - - /** Static value NeedRollup for DataFeedDetailPatchNeedRollup. */ - public static final DataFeedDetailPatchNeedRollup NEED_ROLLUP = fromString("NeedRollup"); - - /** Static value AlreadyRollup for DataFeedDetailPatchNeedRollup. */ - public static final DataFeedDetailPatchNeedRollup ALREADY_ROLLUP = fromString("AlreadyRollup"); - - /** - * Creates or finds a DataFeedDetailPatchNeedRollup from its string representation. - * - * @param name a name to look for. - * @return the corresponding DataFeedDetailPatchNeedRollup. - */ - @JsonCreator - public static DataFeedDetailPatchNeedRollup fromString(String name) { - return fromString(name, DataFeedDetailPatchNeedRollup.class); - } - - /** @return known DataFeedDetailPatchNeedRollup values. */ - public static Collection values() { - return values(DataFeedDetailPatchNeedRollup.class); - } -} diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDetailPatchRollUpMethod.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDetailPatchRollUpMethod.java deleted file mode 100644 index ad2fe69246560..0000000000000 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDetailPatchRollUpMethod.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.ai.metricsadvisor.implementation.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for DataFeedDetailPatchRollUpMethod. */ -public final class DataFeedDetailPatchRollUpMethod extends ExpandableStringEnum { - /** Static value None for DataFeedDetailPatchRollUpMethod. */ - public static final DataFeedDetailPatchRollUpMethod NONE = fromString("None"); - - /** Static value Sum for DataFeedDetailPatchRollUpMethod. */ - public static final DataFeedDetailPatchRollUpMethod SUM = fromString("Sum"); - - /** Static value Max for DataFeedDetailPatchRollUpMethod. */ - public static final DataFeedDetailPatchRollUpMethod MAX = fromString("Max"); - - /** Static value Min for DataFeedDetailPatchRollUpMethod. */ - public static final DataFeedDetailPatchRollUpMethod MIN = fromString("Min"); - - /** Static value Avg for DataFeedDetailPatchRollUpMethod. */ - public static final DataFeedDetailPatchRollUpMethod AVG = fromString("Avg"); - - /** Static value Count for DataFeedDetailPatchRollUpMethod. */ - public static final DataFeedDetailPatchRollUpMethod COUNT = fromString("Count"); - - /** - * Creates or finds a DataFeedDetailPatchRollUpMethod from its string representation. - * - * @param name a name to look for. - * @return the corresponding DataFeedDetailPatchRollUpMethod. - */ - @JsonCreator - public static DataFeedDetailPatchRollUpMethod fromString(String name) { - return fromString(name, DataFeedDetailPatchRollUpMethod.class); - } - - /** @return known DataFeedDetailPatchRollUpMethod values. */ - public static Collection values() { - return values(DataFeedDetailPatchRollUpMethod.class); - } -} diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDetailPatchStatus.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDetailPatchStatus.java deleted file mode 100644 index 6e03ed014f11b..0000000000000 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDetailPatchStatus.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.ai.metricsadvisor.implementation.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for DataFeedDetailPatchStatus. */ -public final class DataFeedDetailPatchStatus extends ExpandableStringEnum { - /** Static value Active for DataFeedDetailPatchStatus. */ - public static final DataFeedDetailPatchStatus ACTIVE = fromString("Active"); - - /** Static value Paused for DataFeedDetailPatchStatus. */ - public static final DataFeedDetailPatchStatus PAUSED = fromString("Paused"); - - /** - * Creates or finds a DataFeedDetailPatchStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding DataFeedDetailPatchStatus. - */ - @JsonCreator - public static DataFeedDetailPatchStatus fromString(String name) { - return fromString(name, DataFeedDetailPatchStatus.class); - } - - /** @return known DataFeedDetailPatchStatus values. */ - public static Collection values() { - return values(DataFeedDetailPatchStatus.class); - } -} diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDetailPatchViewMode.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDetailPatchViewMode.java deleted file mode 100644 index a14ee4690199e..0000000000000 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDetailPatchViewMode.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.ai.metricsadvisor.implementation.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for DataFeedDetailPatchViewMode. */ -public final class DataFeedDetailPatchViewMode extends ExpandableStringEnum { - /** Static value Private for DataFeedDetailPatchViewMode. */ - public static final DataFeedDetailPatchViewMode PRIVATE = fromString("Private"); - - /** Static value Public for DataFeedDetailPatchViewMode. */ - public static final DataFeedDetailPatchViewMode PUBLIC = fromString("Public"); - - /** - * Creates or finds a DataFeedDetailPatchViewMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding DataFeedDetailPatchViewMode. - */ - @JsonCreator - public static DataFeedDetailPatchViewMode fromString(String name) { - return fromString(name, DataFeedDetailPatchViewMode.class); - } - - /** @return known DataFeedDetailPatchViewMode values. */ - public static Collection values() { - return values(DataFeedDetailPatchViewMode.class); - } -} diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDetailRollUpMethod.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDetailRollUpMethod.java deleted file mode 100644 index 1d58d8042330a..0000000000000 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDetailRollUpMethod.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.ai.metricsadvisor.implementation.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for DataFeedDetailRollUpMethod. */ -public final class DataFeedDetailRollUpMethod extends ExpandableStringEnum { - /** Static value None for DataFeedDetailRollUpMethod. */ - public static final DataFeedDetailRollUpMethod NONE = fromString("None"); - - /** Static value Sum for DataFeedDetailRollUpMethod. */ - public static final DataFeedDetailRollUpMethod SUM = fromString("Sum"); - - /** Static value Max for DataFeedDetailRollUpMethod. */ - public static final DataFeedDetailRollUpMethod MAX = fromString("Max"); - - /** Static value Min for DataFeedDetailRollUpMethod. */ - public static final DataFeedDetailRollUpMethod MIN = fromString("Min"); - - /** Static value Avg for DataFeedDetailRollUpMethod. */ - public static final DataFeedDetailRollUpMethod AVG = fromString("Avg"); - - /** Static value Count for DataFeedDetailRollUpMethod. */ - public static final DataFeedDetailRollUpMethod COUNT = fromString("Count"); - - /** - * Creates or finds a DataFeedDetailRollUpMethod from its string representation. - * - * @param name a name to look for. - * @return the corresponding DataFeedDetailRollUpMethod. - */ - @JsonCreator - public static DataFeedDetailRollUpMethod fromString(String name) { - return fromString(name, DataFeedDetailRollUpMethod.class); - } - - /** @return known DataFeedDetailRollUpMethod values. */ - public static Collection values() { - return values(DataFeedDetailRollUpMethod.class); - } -} diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDimension.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDimension.java index e4a093136e81c..868f8102c154e 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDimension.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedDimension.java @@ -14,21 +14,24 @@ public final class DataFeedDimension { * dimension name */ @JsonProperty(value = "dimensionName", required = true) - private String name; + private String dimensionName; /* * dimension display name */ @JsonProperty(value = "dimensionDisplayName") - private String displayName; + private String dimensionDisplayName; + + /** Creates an instance of DataFeedDimension class. */ + public DataFeedDimension() {} /** * Get the dimensionName property: dimension name. * * @return the dimensionName value. */ - public String getName() { - return this.name; + public String getDimensionName() { + return this.dimensionName; } /** @@ -37,8 +40,8 @@ public String getName() { * @param dimensionName the dimensionName value to set. * @return the DataFeedDimension object itself. */ - public DataFeedDimension setName(String dimensionName) { - this.name = dimensionName; + public DataFeedDimension setDimensionName(String dimensionName) { + this.dimensionName = dimensionName; return this; } @@ -47,8 +50,8 @@ public DataFeedDimension setName(String dimensionName) { * * @return the dimensionDisplayName value. */ - public String getDisplayName() { - return this.displayName; + public String getDimensionDisplayName() { + return this.dimensionDisplayName; } /** @@ -57,8 +60,8 @@ public String getDisplayName() { * @param dimensionDisplayName the dimensionDisplayName value to set. * @return the DataFeedDimension object itself. */ - public DataFeedDimension setDisplayName(String dimensionDisplayName) { - this.displayName = dimensionDisplayName; + public DataFeedDimension setDimensionDisplayName(String dimensionDisplayName) { + this.dimensionDisplayName = dimensionDisplayName; return this; } } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedIngestionProgress.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedIngestionProgress.java new file mode 100644 index 0000000000000..754ced3c624da --- /dev/null +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedIngestionProgress.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.ai.metricsadvisor.implementation.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +import java.time.OffsetDateTime; + +/** The DataFeedIngestionProgress model. */ +@Immutable +public final class DataFeedIngestionProgress { + /* + * the timestamp of latest success ingestion job. + * null indicates not available + */ + @JsonProperty(value = "latestSuccessTimestamp", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime latestSuccessTimestamp; + + /* + * the timestamp of latest ingestion job with status update. + * null indicates not available + */ + @JsonProperty(value = "latestActiveTimestamp", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime latestActiveTimestamp; + + /** Creates an instance of DataFeedIngestionProgress class. */ + public DataFeedIngestionProgress() {} + + /** + * Get the latestSuccessTimestamp property: the timestamp of latest success ingestion job. null indicates not + * available. + * + * @return the latestSuccessTimestamp value. + */ + public OffsetDateTime getLatestSuccessTimestamp() { + return this.latestSuccessTimestamp; + } + + /** + * Get the latestActiveTimestamp property: the timestamp of latest ingestion job with status update. null indicates + * not available. + * + * @return the latestActiveTimestamp value. + */ + public OffsetDateTime getLatestActiveTimestamp() { + return this.latestActiveTimestamp; + } +} diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedIngestionStatus.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedIngestionStatus.java new file mode 100644 index 0000000000000..b173ee0d3a56f --- /dev/null +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedIngestionStatus.java @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.ai.metricsadvisor.implementation.models; + +import com.azure.ai.metricsadvisor.implementation.models.IngestionStatusType; +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The DataFeedIngestionStatus model. */ +@Immutable +public final class DataFeedIngestionStatus { + /* + * data slice timestamp. + */ + @JsonProperty(value = "timestamp", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime timestamp; + + /* + * latest ingestion task status for this data slice. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private IngestionStatusType status; + + /* + * the trimmed message of last ingestion job. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /** Creates an instance of DataFeedIngestionStatus class. */ + public DataFeedIngestionStatus() {} + + /** + * Get the timestamp property: data slice timestamp. + * + * @return the timestamp value. + */ + public OffsetDateTime getTimestamp() { + return this.timestamp; + } + + /** + * Get the status property: latest ingestion task status for this data slice. + * + * @return the status value. + */ + public IngestionStatusType getStatus() { + return this.status; + } + + /** + * Get the message property: the trimmed message of last ingestion job. + * + * @return the message value. + */ + public String getMessage() { + return this.message; + } +} diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedList.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedList.java index 6c809fec79cf0..a250ac5d02b91 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedList.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedList.java @@ -23,6 +23,9 @@ public final class DataFeedList { @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; + /** Creates an instance of DataFeedList class. */ + public DataFeedList() {} + /** * Get the nextLink property: The @nextLink property. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedMetric.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedMetric.java index 57cb7faf0d0e9..6620c4a4f2f47 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedMetric.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedMetric.java @@ -14,92 +14,95 @@ public final class DataFeedMetric { * metric id */ @JsonProperty(value = "metricId", access = JsonProperty.Access.WRITE_ONLY) - private String id; + private String metricId; /* * metric name */ @JsonProperty(value = "metricName", required = true) - private String name; + private String metricName; /* * metric display name */ @JsonProperty(value = "metricDisplayName") - private String displayName; + private String metricDisplayName; /* * metric description */ @JsonProperty(value = "metricDescription") - private String description; + private String metricDescription; + + /** Creates an instance of DataFeedMetric class. */ + public DataFeedMetric() {} /** - * Get the id property: metric id. + * Get the metricId property: metric id. * - * @return the id value. + * @return the metricId value. */ - public String getId() { - return this.id; + public String getMetricId() { + return this.metricId; } /** - * Get the name property: metric name. + * Get the metricName property: metric name. * - * @return the name value. + * @return the metricName value. */ - public String getName() { - return this.name; + public String getMetricName() { + return this.metricName; } /** - * Set the name property: metric name. + * Set the metricName property: metric name. * - * @param name the name value to set. + * @param metricName the metricName value to set. * @return the DataFeedMetric object itself. */ - public DataFeedMetric setName(String name) { - this.name = name; + public DataFeedMetric setMetricName(String metricName) { + this.metricName = metricName; return this; } /** - * Get the displayName property: metric display name. + * Get the metricDisplayName property: metric display name. * - * @return the displayName value. + * @return the metricDisplayName value. */ - public String getDisplayName() { - return this.displayName; + public String getMetricDisplayName() { + return this.metricDisplayName; } /** - * Set the displayName property: metric display name. + * Set the metricDisplayName property: metric display name. * - * @param displayName the displayName value to set. + * @param metricDisplayName the metricDisplayName value to set. * @return the DataFeedMetric object itself. */ - public DataFeedMetric setDisplayName(String displayName) { - this.displayName = displayName; + public DataFeedMetric setMetricDisplayName(String metricDisplayName) { + this.metricDisplayName = metricDisplayName; return this; } /** - * Get the description property: metric description. + * Get the metricDescription property: metric description. * - * @return the description value. + * @return the metricDescription value. */ - public String getDescription() { - return this.description; + public String getMetricDescription() { + return this.metricDescription; } /** - * Set the description property: metric description. + * Set the metricDescription property: metric description. * - * @param description the description value to set. + * @param metricDescription the metricDescription value to set. * @return the DataFeedMetric object itself. */ - public DataFeedMetric setDescription(String description) { - this.description = description; + public DataFeedMetric setMetricDescription(String metricDescription) { + this.metricDescription = metricDescription; return this; } } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataLakeGen2SharedKeyCredential.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataLakeGen2SharedKeyCredential.java index 673c4cf4a1566..9bc5278572509 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataLakeGen2SharedKeyCredential.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataLakeGen2SharedKeyCredential.java @@ -20,6 +20,9 @@ public final class DataLakeGen2SharedKeyCredential extends DataSourceCredential @JsonProperty(value = "parameters", required = true) private DataLakeGen2SharedKeyParam parameters; + /** Creates an instance of DataLakeGen2SharedKeyCredential class. */ + public DataLakeGen2SharedKeyCredential() {} + /** * Get the parameters property: The parameters property. * @@ -39,4 +42,18 @@ public DataLakeGen2SharedKeyCredential setParameters(DataLakeGen2SharedKeyParam this.parameters = parameters; return this; } + + /** {@inheritDoc} */ + @Override + public DataLakeGen2SharedKeyCredential setDataSourceCredentialName(String dataSourceCredentialName) { + super.setDataSourceCredentialName(dataSourceCredentialName); + return this; + } + + /** {@inheritDoc} */ + @Override + public DataLakeGen2SharedKeyCredential setDataSourceCredentialDescription(String dataSourceCredentialDescription) { + super.setDataSourceCredentialDescription(dataSourceCredentialDescription); + return this; + } } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataLakeGen2SharedKeyCredentialPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataLakeGen2SharedKeyCredentialPatch.java index 95f388d4195ef..dfb9b904a76fe 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataLakeGen2SharedKeyCredentialPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataLakeGen2SharedKeyCredentialPatch.java @@ -20,6 +20,9 @@ public final class DataLakeGen2SharedKeyCredentialPatch extends DataSourceCreden @JsonProperty(value = "parameters") private DataLakeGen2SharedKeyParamPatch parameters; + /** Creates an instance of DataLakeGen2SharedKeyCredentialPatch class. */ + public DataLakeGen2SharedKeyCredentialPatch() {} + /** * Get the parameters property: The parameters property. * @@ -39,4 +42,19 @@ public DataLakeGen2SharedKeyCredentialPatch setParameters(DataLakeGen2SharedKeyP this.parameters = parameters; return this; } + + /** {@inheritDoc} */ + @Override + public DataLakeGen2SharedKeyCredentialPatch setDataSourceCredentialName(String dataSourceCredentialName) { + super.setDataSourceCredentialName(dataSourceCredentialName); + return this; + } + + /** {@inheritDoc} */ + @Override + public DataLakeGen2SharedKeyCredentialPatch setDataSourceCredentialDescription( + String dataSourceCredentialDescription) { + super.setDataSourceCredentialDescription(dataSourceCredentialDescription); + return this; + } } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataLakeGen2SharedKeyParam.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataLakeGen2SharedKeyParam.java index e53e8b8489068..4f194079493c2 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataLakeGen2SharedKeyParam.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataLakeGen2SharedKeyParam.java @@ -16,6 +16,9 @@ public final class DataLakeGen2SharedKeyParam { @JsonProperty(value = "accountKey") private String accountKey; + /** Creates an instance of DataLakeGen2SharedKeyParam class. */ + public DataLakeGen2SharedKeyParam() {} + /** * Get the accountKey property: The account key to access the Azure Data Lake Storage Gen2. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataLakeGen2SharedKeyParamPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataLakeGen2SharedKeyParamPatch.java index b7eed8c2cea5b..ed5fb0fc5baa2 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataLakeGen2SharedKeyParamPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataLakeGen2SharedKeyParamPatch.java @@ -16,6 +16,9 @@ public final class DataLakeGen2SharedKeyParamPatch { @JsonProperty(value = "accountKey") private String accountKey; + /** Creates an instance of DataLakeGen2SharedKeyParamPatch class. */ + public DataLakeGen2SharedKeyParamPatch() {} + /** * Get the accountKey property: The account key to access the Azure Data Lake Storage Gen2. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataSourceCredential.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataSourceCredential.java index df4db02e7686d..8eef4d0f2e6c7 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataSourceCredential.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataSourceCredential.java @@ -44,6 +44,9 @@ public class DataSourceCredential { @JsonProperty(value = "dataSourceCredentialDescription") private String dataSourceCredentialDescription; + /** Creates an instance of DataSourceCredential class. */ + public DataSourceCredential() {} + /** * Get the dataSourceCredentialId property: Unique id of data source credential. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataSourceCredentialList.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataSourceCredentialList.java index ed41986524df3..696c968d2404f 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataSourceCredentialList.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataSourceCredentialList.java @@ -23,6 +23,9 @@ public final class DataSourceCredentialList { @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; + /** Creates an instance of DataSourceCredentialList class. */ + public DataSourceCredentialList() {} + /** * Get the nextLink property: The @nextLink property. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataSourceCredentialPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataSourceCredentialPatch.java index 67cc2ac7607b7..74e81d7eece6c 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataSourceCredentialPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataSourceCredentialPatch.java @@ -37,6 +37,9 @@ public class DataSourceCredentialPatch { @JsonProperty(value = "dataSourceCredentialDescription") private String dataSourceCredentialDescription; + /** Creates an instance of DataSourceCredentialPatch class. */ + public DataSourceCredentialPatch() {} + /** * Get the dataSourceCredentialName property: Name of data source credential. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataSourceCredentialType.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataSourceCredentialType.java index f5b8a6601618b..bf2bf11e48530 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataSourceCredentialType.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataSourceCredentialType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for DataSourceCredentialType. */ +/** Type of data source credential. */ public final class DataSourceCredentialType extends ExpandableStringEnum { /** Static value AzureSQLConnectionString for DataSourceCredentialType. */ public static final DataSourceCredentialType AZURE_SQLCONNECTION_STRING = fromString("AzureSQLConnectionString"); @@ -22,6 +22,14 @@ public final class DataSourceCredentialType extends ExpandableStringEnum values() { return values(DataSourceCredentialType.class); } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataSourceType.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataSourceType.java index 3710a5504a1a5..9582cd5ddbb23 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataSourceType.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataSourceType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for DataSourceType. */ +/** data source type. */ public final class DataSourceType extends ExpandableStringEnum { /** Static value AzureApplicationInsights for DataSourceType. */ public static final DataSourceType AZURE_APPLICATION_INSIGHTS = fromString("AzureApplicationInsights"); @@ -49,6 +49,14 @@ public final class DataSourceType extends ExpandableStringEnum { /** Static value SqlServer for DataSourceType. */ public static final DataSourceType SQL_SERVER = fromString("SqlServer"); + /** + * Creates a new instance of DataSourceType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DataSourceType() {} + /** * Creates or finds a DataSourceType from its string representation. * @@ -60,7 +68,11 @@ public static DataSourceType fromString(String name) { return fromString(name, DataSourceType.class); } - /** @return known DataSourceType values. */ + /** + * Gets known DataSourceType values. + * + * @return known DataSourceType values. + */ public static Collection values() { return values(DataSourceType.class); } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DetectionAnomalyFilterCondition.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DetectionAnomalyFilterCondition.java index 16e9fd9067441..39f2de9eb6e88 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DetectionAnomalyFilterCondition.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DetectionAnomalyFilterCondition.java @@ -23,6 +23,9 @@ public final class DetectionAnomalyFilterCondition { @JsonProperty(value = "severityFilter") private SeverityFilterCondition severityFilter; + /** Creates an instance of DetectionAnomalyFilterCondition class. */ + public DetectionAnomalyFilterCondition() {} + /** * Get the dimensionFilter property: dimension filter. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DetectionAnomalyResultQuery.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DetectionAnomalyResultQuery.java index 0acbe315d45ec..c7a303edc4b7c 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DetectionAnomalyResultQuery.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DetectionAnomalyResultQuery.java @@ -29,6 +29,9 @@ public final class DetectionAnomalyResultQuery { @JsonProperty(value = "filter") private DetectionAnomalyFilterCondition filter; + /** Creates an instance of DetectionAnomalyResultQuery class. */ + public DetectionAnomalyResultQuery() {} + /** * Get the startTime property: start time. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DetectionIncidentFilterCondition.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DetectionIncidentFilterCondition.java index 6364a88e8de09..f54596ab2a8cc 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DetectionIncidentFilterCondition.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DetectionIncidentFilterCondition.java @@ -17,6 +17,9 @@ public final class DetectionIncidentFilterCondition { @JsonProperty(value = "dimensionFilter") private List dimensionFilter; + /** Creates an instance of DetectionIncidentFilterCondition class. */ + public DetectionIncidentFilterCondition() {} + /** * Get the dimensionFilter property: dimension filter. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DetectionIncidentResultQuery.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DetectionIncidentResultQuery.java index 797b1887205fa..02c7b651bacbb 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DetectionIncidentResultQuery.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DetectionIncidentResultQuery.java @@ -29,6 +29,9 @@ public final class DetectionIncidentResultQuery { @JsonProperty(value = "filter") private DetectionIncidentFilterCondition filter; + /** Creates an instance of DetectionIncidentResultQuery class. */ + public DetectionIncidentResultQuery() {} + /** * Get the startTime property: start time. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DetectionSeriesQuery.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DetectionSeriesQuery.java index 826d0e27affd4..7a1c43c1bdee2 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DetectionSeriesQuery.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DetectionSeriesQuery.java @@ -13,27 +13,27 @@ @Fluent public final class DetectionSeriesQuery { /* - * This is inclusive. The maximum number of data points (series number * - * time range) is 10000. + * This is inclusive. The maximum number of data points (series number * time range) is 10000. */ @JsonProperty(value = "startTime", required = true) private OffsetDateTime startTime; /* - * This is exclusive. The maximum number of data points (series number * - * time range) is 10000. + * This is exclusive. The maximum number of data points (series number * time range) is 10000. */ @JsonProperty(value = "endTime", required = true) private OffsetDateTime endTime; /* - * The series to be queried. The identity must be able to define one single - * time series instead of a group of time series. The maximum number of - * series is 100. + * The series to be queried. The identity must be able to define one single time series instead of a group of time + * series. The maximum number of series is 100. */ @JsonProperty(value = "series", required = true) private List series; + /** Creates an instance of DetectionSeriesQuery class. */ + public DetectionSeriesQuery() {} + /** * Get the startTime property: This is inclusive. The maximum number of data points (series number * time range) is * 10000. diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DimensionGroupConfiguration.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DimensionGroupConfiguration.java index 6f19e20a67295..a90a3328e5a99 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DimensionGroupConfiguration.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DimensionGroupConfiguration.java @@ -42,6 +42,9 @@ public final class DimensionGroupConfiguration { @JsonProperty(value = "changeThresholdCondition") private ChangeThresholdCondition changeThresholdCondition; + /** Creates an instance of DimensionGroupConfiguration class. */ + public DimensionGroupConfiguration() {} + /** * Get the group property: The group property. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DimensionGroupIdentity.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DimensionGroupIdentity.java index 8d708bbf6bbfb..3e60e85f0b3dc 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DimensionGroupIdentity.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DimensionGroupIdentity.java @@ -17,6 +17,9 @@ public final class DimensionGroupIdentity { @JsonProperty(value = "dimension", required = true) private Map dimension; + /** Creates an instance of DimensionGroupIdentity class. */ + public DimensionGroupIdentity() {} + /** * Get the dimension property: dimension specified for series group. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/Direction.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/Direction.java index 770bf9211dea3..782a3342f7d20 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/Direction.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/Direction.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for Direction. */ +/** value filter direction. */ public final class Direction extends ExpandableStringEnum { /** Static value Both for Direction. */ public static final Direction BOTH = fromString("Both"); @@ -19,6 +19,14 @@ public final class Direction extends ExpandableStringEnum { /** Static value Up for Direction. */ public static final Direction UP = fromString("Up"); + /** + * Creates a new instance of Direction value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Direction() {} + /** * Creates or finds a Direction from its string representation. * @@ -30,7 +38,11 @@ public static Direction fromString(String name) { return fromString(name, Direction.class); } - /** @return known Direction values. */ + /** + * Gets known Direction values. + * + * @return known Direction values. + */ public static Collection values() { return values(Direction.class); } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EmailHookInfo.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EmailHookInfo.java index 585fab541dbc6..e8ce3a4feade1 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EmailHookInfo.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EmailHookInfo.java @@ -8,6 +8,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; /** The EmailHookInfo model. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "hookType") @@ -20,6 +21,9 @@ public final class EmailHookInfo extends HookInfo { @JsonProperty(value = "hookParameter", required = true) private EmailHookParameter hookParameter; + /** Creates an instance of EmailHookInfo class. */ + public EmailHookInfo() {} + /** * Get the hookParameter property: The hookParameter property. * @@ -39,4 +43,32 @@ public EmailHookInfo setHookParameter(EmailHookParameter hookParameter) { this.hookParameter = hookParameter; return this; } + + /** {@inheritDoc} */ + @Override + public EmailHookInfo setHookName(String hookName) { + super.setHookName(hookName); + return this; + } + + /** {@inheritDoc} */ + @Override + public EmailHookInfo setDescription(String description) { + super.setDescription(description); + return this; + } + + /** {@inheritDoc} */ + @Override + public EmailHookInfo setExternalLink(String externalLink) { + super.setExternalLink(externalLink); + return this; + } + + /** {@inheritDoc} */ + @Override + public EmailHookInfo setAdmins(List admins) { + super.setAdmins(admins); + return this; + } } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EmailHookInfoPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EmailHookInfoPatch.java index 0facbeece74b4..7e9c08b4a0b29 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EmailHookInfoPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EmailHookInfoPatch.java @@ -8,6 +8,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; /** The EmailHookInfoPatch model. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "hookType") @@ -20,6 +21,9 @@ public final class EmailHookInfoPatch extends HookInfoPatch { @JsonProperty(value = "hookParameter") private EmailHookParameterPatch hookParameter; + /** Creates an instance of EmailHookInfoPatch class. */ + public EmailHookInfoPatch() {} + /** * Get the hookParameter property: The hookParameter property. * @@ -39,4 +43,32 @@ public EmailHookInfoPatch setHookParameter(EmailHookParameterPatch hookParameter this.hookParameter = hookParameter; return this; } + + /** {@inheritDoc} */ + @Override + public EmailHookInfoPatch setHookName(String hookName) { + super.setHookName(hookName); + return this; + } + + /** {@inheritDoc} */ + @Override + public EmailHookInfoPatch setDescription(String description) { + super.setDescription(description); + return this; + } + + /** {@inheritDoc} */ + @Override + public EmailHookInfoPatch setExternalLink(String externalLink) { + super.setExternalLink(externalLink); + return this; + } + + /** {@inheritDoc} */ + @Override + public EmailHookInfoPatch setAdmins(List admins) { + super.setAdmins(admins); + return this; + } } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EmailHookParameter.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EmailHookParameter.java index 41bb1422da258..281f22658d39d 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EmailHookParameter.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EmailHookParameter.java @@ -17,6 +17,9 @@ public final class EmailHookParameter { @JsonProperty(value = "toList", required = true) private List toList; + /** Creates an instance of EmailHookParameter class. */ + public EmailHookParameter() {} + /** * Get the toList property: Email TO: list. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EmailHookParameterPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EmailHookParameterPatch.java index a6aa7c596354a..2f1a52866b881 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EmailHookParameterPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EmailHookParameterPatch.java @@ -17,6 +17,9 @@ public final class EmailHookParameterPatch { @JsonProperty(value = "toList") private List toList; + /** Creates an instance of EmailHookParameterPatch class. */ + public EmailHookParameterPatch() {} + /** * Get the toList property: Email TO: list. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EnrichmentStatusList.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EnrichmentStatusList.java index c254a68692d90..d4b7605f01c66 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EnrichmentStatusList.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EnrichmentStatusList.java @@ -24,6 +24,9 @@ public final class EnrichmentStatusList { @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; + /** Creates an instance of EnrichmentStatusList class. */ + public EnrichmentStatusList() {} + /** * Get the nextLink property: The @nextLink property. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EnrichmentStatusQueryOption.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EnrichmentStatusQueryOption.java index a58d3902eb140..2ec86efaaaf88 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EnrichmentStatusQueryOption.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EnrichmentStatusQueryOption.java @@ -23,6 +23,9 @@ public final class EnrichmentStatusQueryOption { @JsonProperty(value = "endTime", required = true) private OffsetDateTime endTime; + /** Creates an instance of EnrichmentStatusQueryOption class. */ + public EnrichmentStatusQueryOption() {} + /** * Get the startTime property: the start point of time range to query anomaly detection status. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EntityStatus.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EntityStatus.java index e0c2903b71efa..6b8082b04514e 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EntityStatus.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/EntityStatus.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for EntityStatus. */ +/** data feed status. */ public final class EntityStatus extends ExpandableStringEnum { /** Static value Active for EntityStatus. */ public static final EntityStatus ACTIVE = fromString("Active"); @@ -16,6 +16,14 @@ public final class EntityStatus extends ExpandableStringEnum { /** Static value Paused for EntityStatus. */ public static final EntityStatus PAUSED = fromString("Paused"); + /** + * Creates a new instance of EntityStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public EntityStatus() {} + /** * Creates or finds a EntityStatus from its string representation. * @@ -27,7 +35,11 @@ public static EntityStatus fromString(String name) { return fromString(name, EntityStatus.class); } - /** @return known EntityStatus values. */ + /** + * Gets known EntityStatus values. + * + * @return known EntityStatus values. + */ public static Collection values() { return values(EntityStatus.class); } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/FeedbackDimensionFilter.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/FeedbackDimensionFilter.java index ccda974298cbc..07a6daa7b2369 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/FeedbackDimensionFilter.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/FeedbackDimensionFilter.java @@ -17,6 +17,9 @@ public final class FeedbackDimensionFilter { @JsonProperty(value = "dimension", required = true) private Map dimension; + /** Creates an instance of FeedbackDimensionFilter class. */ + public FeedbackDimensionFilter() {} + /** * Get the dimension property: metric dimension filter. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/FeedbackQueryTimeMode.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/FeedbackQueryTimeMode.java deleted file mode 100644 index bcc1afb388e26..0000000000000 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/FeedbackQueryTimeMode.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.ai.metricsadvisor.implementation.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for FeedbackQueryTimeMode. */ -public final class FeedbackQueryTimeMode extends ExpandableStringEnum { - /** Static value MetricTimestamp for FeedbackQueryTimeMode. */ - public static final FeedbackQueryTimeMode METRIC_TIMESTAMP = fromString("MetricTimestamp"); - - /** Static value FeedbackCreatedTime for FeedbackQueryTimeMode. */ - public static final FeedbackQueryTimeMode FEEDBACK_CREATED_TIME = fromString("FeedbackCreatedTime"); - - /** - * Creates or finds a FeedbackQueryTimeMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding FeedbackQueryTimeMode. - */ - @JsonCreator - public static FeedbackQueryTimeMode fromString(String name) { - return fromString(name, FeedbackQueryTimeMode.class); - } - - /** @return known FeedbackQueryTimeMode values. */ - public static Collection values() { - return values(FeedbackQueryTimeMode.class); - } -} diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/FillMissingPointType.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/FillMissingPointType.java index c0f23c0ae4869..cbccd5f2a5012 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/FillMissingPointType.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/FillMissingPointType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for FillMissingPointType. */ +/** the type of fill missing point for anomaly detection. */ public final class FillMissingPointType extends ExpandableStringEnum { /** Static value SmartFilling for FillMissingPointType. */ public static final FillMissingPointType SMART_FILLING = fromString("SmartFilling"); @@ -22,6 +22,14 @@ public final class FillMissingPointType extends ExpandableStringEnum values() { return values(FillMissingPointType.class); } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/Granularity.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/Granularity.java index 82e53d0dfa9dc..9a6ad5792fe3d 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/Granularity.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/Granularity.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for Granularity. */ +/** granularity of the time series. */ public final class Granularity extends ExpandableStringEnum { /** Static value Yearly for Granularity. */ public static final Granularity YEARLY = fromString("Yearly"); @@ -31,6 +31,14 @@ public final class Granularity extends ExpandableStringEnum { /** Static value Custom for Granularity. */ public static final Granularity CUSTOM = fromString("Custom"); + /** + * Creates a new instance of Granularity value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Granularity() {} + /** * Creates or finds a Granularity from its string representation. * @@ -42,7 +50,11 @@ public static Granularity fromString(String name) { return fromString(name, Granularity.class); } - /** @return known Granularity values. */ + /** + * Gets known Granularity values. + * + * @return known Granularity values. + */ public static Collection values() { return values(Granularity.class); } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/HardThresholdCondition.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/HardThresholdCondition.java index 28345f7400afc..317078e26b0d6 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/HardThresholdCondition.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/HardThresholdCondition.java @@ -4,7 +4,6 @@ package com.azure.ai.metricsadvisor.implementation.models; -import com.azure.ai.metricsadvisor.administration.models.AnomalyDetectorDirection; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; @@ -39,6 +38,9 @@ public final class HardThresholdCondition { @JsonProperty(value = "suppressCondition", required = true) private SuppressCondition suppressCondition; + /** Creates an instance of HardThresholdCondition class. */ + public HardThresholdCondition() {} + /** * Get the lowerBound property: lower bound * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/HardThresholdConditionPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/HardThresholdConditionPatch.java index 411b33611b31b..0377273c6fbb5 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/HardThresholdConditionPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/HardThresholdConditionPatch.java @@ -4,7 +4,6 @@ package com.azure.ai.metricsadvisor.implementation.models; -import com.azure.ai.metricsadvisor.administration.models.AnomalyDetectorDirection; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; @@ -39,6 +38,9 @@ public final class HardThresholdConditionPatch { @JsonProperty(value = "suppressCondition") private SuppressConditionPatch suppressCondition; + /** Creates an instance of HardThresholdConditionPatch class. */ + public HardThresholdConditionPatch() {} + /** * Get the lowerBound property: lower bound * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/HookInfo.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/HookInfo.java index 46d06fa1e729e..e30a26fb4a8f5 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/HookInfo.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/HookInfo.java @@ -55,6 +55,9 @@ public class HookInfo { @JsonProperty(value = "admins") private List admins; + /** Creates an instance of HookInfo class. */ + public HookInfo() {} + /** * Get the hookId property: Hook unique id. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/HookInfoPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/HookInfoPatch.java index c85c99ecba9e4..14b8efaa40f89 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/HookInfoPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/HookInfoPatch.java @@ -48,6 +48,9 @@ public class HookInfoPatch { @JsonProperty(value = "admins") private List admins; + /** Creates an instance of HookInfoPatch class. */ + public HookInfoPatch() {} + /** * Get the hookName property: hook unique name. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/HookInfoPatchHookType.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/HookInfoPatchHookType.java deleted file mode 100644 index bd0ae07c0a29d..0000000000000 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/HookInfoPatchHookType.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.ai.metricsadvisor.implementation.models; - -import com.azure.core.util.ExpandableStringEnum; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.Collection; - -/** Defines values for HookInfoPatchHookType. */ -public final class HookInfoPatchHookType extends ExpandableStringEnum { - /** Static value Webhook for HookInfoPatchHookType. */ - public static final HookInfoPatchHookType WEBHOOK = fromString("Webhook"); - - /** Static value Email for HookInfoPatchHookType. */ - public static final HookInfoPatchHookType EMAIL = fromString("Email"); - - /** - * Creates or finds a HookInfoPatchHookType from its string representation. - * - * @param name a name to look for. - * @return the corresponding HookInfoPatchHookType. - */ - @JsonCreator - public static HookInfoPatchHookType fromString(String name) { - return fromString(name, HookInfoPatchHookType.class); - } - - /** @return known HookInfoPatchHookType values. */ - public static Collection values() { - return values(HookInfoPatchHookType.class); - } -} diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/HookList.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/HookList.java index 348ec9d4ca9d8..e0549eaa2c003 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/HookList.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/HookList.java @@ -23,6 +23,9 @@ public final class HookList { @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; + /** Creates an instance of HookList class. */ + public HookList() {} + /** * Get the nextLink property: The @nextLink property. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/HookType.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/HookType.java index 8390a38b71941..b35277203b31b 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/HookType.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/HookType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for HookType. */ +/** hook type. */ public final class HookType extends ExpandableStringEnum { /** Static value Webhook for HookType. */ public static final HookType WEBHOOK = fromString("Webhook"); @@ -16,6 +16,14 @@ public final class HookType extends ExpandableStringEnum { /** Static value Email for HookType. */ public static final HookType EMAIL = fromString("Email"); + /** + * Creates a new instance of HookType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public HookType() {} + /** * Creates or finds a HookType from its string representation. * @@ -27,7 +35,11 @@ public static HookType fromString(String name) { return fromString(name, HookType.class); } - /** @return known HookType values. */ + /** + * Gets known HookType values. + * + * @return known HookType values. + */ public static Collection values() { return values(HookType.class); } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IncidentProperty.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IncidentProperty.java index 775b0325321ab..1ca7cad9a86a4 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IncidentProperty.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IncidentProperty.java @@ -4,8 +4,6 @@ package com.azure.ai.metricsadvisor.implementation.models; -import com.azure.ai.metricsadvisor.models.AnomalyIncidentStatus; -import com.azure.ai.metricsadvisor.administration.models.AnomalySeverity; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; @@ -16,7 +14,7 @@ public final class IncidentProperty { * max severity of latest anomalies in the incident */ @JsonProperty(value = "maxSeverity", required = true) - private AnomalySeverity maxSeverity; + private Severity maxSeverity; /* * incident status @@ -24,7 +22,7 @@ public final class IncidentProperty { * only return for alerting incident result */ @JsonProperty(value = "incidentStatus", access = JsonProperty.Access.WRITE_ONLY) - private AnomalyIncidentStatus incidentStatus; + private IncidentStatus incidentStatus; /* * value of the root node @@ -38,12 +36,15 @@ public final class IncidentProperty { @JsonProperty(value = "expectedValueOfRootNode", access = JsonProperty.Access.WRITE_ONLY) private Double expectedValueOfRootNode; + /** Creates an instance of IncidentProperty class. */ + public IncidentProperty() {} + /** * Get the maxSeverity property: max severity of latest anomalies in the incident. * * @return the maxSeverity value. */ - public AnomalySeverity getMaxSeverity() { + public Severity getMaxSeverity() { return this.maxSeverity; } @@ -53,7 +54,7 @@ public AnomalySeverity getMaxSeverity() { * @param maxSeverity the maxSeverity value to set. * @return the IncidentProperty object itself. */ - public IncidentProperty setMaxSeverity(AnomalySeverity maxSeverity) { + public IncidentProperty setMaxSeverity(Severity maxSeverity) { this.maxSeverity = maxSeverity; return this; } @@ -65,7 +66,7 @@ public IncidentProperty setMaxSeverity(AnomalySeverity maxSeverity) { * * @return the incidentStatus value. */ - public AnomalyIncidentStatus getIncidentStatus() { + public IncidentStatus getIncidentStatus() { return this.incidentStatus; } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IncidentResult.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IncidentResult.java index 2e7b55cc68aa8..e07a84562e03f 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IncidentResult.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IncidentResult.java @@ -66,6 +66,9 @@ public final class IncidentResult { @JsonProperty(value = "property", required = true) private IncidentProperty property; + /** Creates an instance of IncidentResult class. */ + public IncidentResult() {} + /** * Get the dataFeedId property: data feed unique id * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IncidentResultList.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IncidentResultList.java index 73e5714b2ded9..4485628b55244 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IncidentResultList.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IncidentResultList.java @@ -23,6 +23,9 @@ public final class IncidentResultList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of IncidentResultList class. */ + public IncidentResultList() {} + /** * Get the nextLink property: The @nextLink property. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IncidentStatus.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IncidentStatus.java new file mode 100644 index 0000000000000..97238c31a831e --- /dev/null +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IncidentStatus.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.ai.metricsadvisor.implementation.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * incident status + * + *

only return for alerting incident result. + */ +public final class IncidentStatus extends ExpandableStringEnum { + /** Static value Active for IncidentStatus. */ + public static final IncidentStatus ACTIVE = fromString("Active"); + + /** Static value Resolved for IncidentStatus. */ + public static final IncidentStatus RESOLVED = fromString("Resolved"); + + /** + * Creates a new instance of IncidentStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public IncidentStatus() {} + + /** + * Creates or finds a IncidentStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding IncidentStatus. + */ + @JsonCreator + public static IncidentStatus fromString(String name) { + return fromString(name, IncidentStatus.class); + } + + /** + * Gets known IncidentStatus values. + * + * @return known IncidentStatus values. + */ + public static Collection values() { + return values(IncidentStatus.class); + } +} diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/InfluxDBDataFeed.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/InfluxDBDataFeed.java index 193a194cc02d7..6cdc8c1c35a5b 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/InfluxDBDataFeed.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/InfluxDBDataFeed.java @@ -8,6 +8,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import java.time.OffsetDateTime; +import java.util.List; /** The InfluxDBDataFeed model. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dataSourceType") @@ -20,6 +22,9 @@ public final class InfluxDBDataFeed extends DataFeedDetail { @JsonProperty(value = "dataSourceParameter", required = true) private InfluxDBParameter dataSourceParameter; + /** Creates an instance of InfluxDBDataFeed class. */ + public InfluxDBDataFeed() {} + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -39,4 +44,172 @@ public InfluxDBDataFeed setDataSourceParameter(InfluxDBParameter dataSourceParam this.dataSourceParameter = dataSourceParameter; return this; } + + /** {@inheritDoc} */ + @Override + public InfluxDBDataFeed setDataFeedName(String dataFeedName) { + super.setDataFeedName(dataFeedName); + return this; + } + + /** {@inheritDoc} */ + @Override + public InfluxDBDataFeed setDataFeedDescription(String dataFeedDescription) { + super.setDataFeedDescription(dataFeedDescription); + return this; + } + + /** {@inheritDoc} */ + @Override + public InfluxDBDataFeed setGranularityName(Granularity granularityName) { + super.setGranularityName(granularityName); + return this; + } + + /** {@inheritDoc} */ + @Override + public InfluxDBDataFeed setGranularityAmount(Integer granularityAmount) { + super.setGranularityAmount(granularityAmount); + return this; + } + + /** {@inheritDoc} */ + @Override + public InfluxDBDataFeed setMetrics(List metrics) { + super.setMetrics(metrics); + return this; + } + + /** {@inheritDoc} */ + @Override + public InfluxDBDataFeed setDimension(List dimension) { + super.setDimension(dimension); + return this; + } + + /** {@inheritDoc} */ + @Override + public InfluxDBDataFeed setTimestampColumn(String timestampColumn) { + super.setTimestampColumn(timestampColumn); + return this; + } + + /** {@inheritDoc} */ + @Override + public InfluxDBDataFeed setDataStartFrom(OffsetDateTime dataStartFrom) { + super.setDataStartFrom(dataStartFrom); + return this; + } + + /** {@inheritDoc} */ + @Override + public InfluxDBDataFeed setStartOffsetInSeconds(Long startOffsetInSeconds) { + super.setStartOffsetInSeconds(startOffsetInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public InfluxDBDataFeed setMaxConcurrency(Integer maxConcurrency) { + super.setMaxConcurrency(maxConcurrency); + return this; + } + + /** {@inheritDoc} */ + @Override + public InfluxDBDataFeed setMinRetryIntervalInSeconds(Long minRetryIntervalInSeconds) { + super.setMinRetryIntervalInSeconds(minRetryIntervalInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public InfluxDBDataFeed setStopRetryAfterInSeconds(Long stopRetryAfterInSeconds) { + super.setStopRetryAfterInSeconds(stopRetryAfterInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public InfluxDBDataFeed setNeedRollup(NeedRollupEnum needRollup) { + super.setNeedRollup(needRollup); + return this; + } + + /** {@inheritDoc} */ + @Override + public InfluxDBDataFeed setRollUpMethod(RollUpMethod rollUpMethod) { + super.setRollUpMethod(rollUpMethod); + return this; + } + + /** {@inheritDoc} */ + @Override + public InfluxDBDataFeed setRollUpColumns(List rollUpColumns) { + super.setRollUpColumns(rollUpColumns); + return this; + } + + /** {@inheritDoc} */ + @Override + public InfluxDBDataFeed setAllUpIdentification(String allUpIdentification) { + super.setAllUpIdentification(allUpIdentification); + return this; + } + + /** {@inheritDoc} */ + @Override + public InfluxDBDataFeed setFillMissingPointType(FillMissingPointType fillMissingPointType) { + super.setFillMissingPointType(fillMissingPointType); + return this; + } + + /** {@inheritDoc} */ + @Override + public InfluxDBDataFeed setFillMissingPointValue(Double fillMissingPointValue) { + super.setFillMissingPointValue(fillMissingPointValue); + return this; + } + + /** {@inheritDoc} */ + @Override + public InfluxDBDataFeed setViewMode(ViewMode viewMode) { + super.setViewMode(viewMode); + return this; + } + + /** {@inheritDoc} */ + @Override + public InfluxDBDataFeed setAdmins(List admins) { + super.setAdmins(admins); + return this; + } + + /** {@inheritDoc} */ + @Override + public InfluxDBDataFeed setViewers(List viewers) { + super.setViewers(viewers); + return this; + } + + /** {@inheritDoc} */ + @Override + public InfluxDBDataFeed setActionLinkTemplate(String actionLinkTemplate) { + super.setActionLinkTemplate(actionLinkTemplate); + return this; + } + + /** {@inheritDoc} */ + @Override + public InfluxDBDataFeed setAuthenticationType(AuthenticationTypeEnum authenticationType) { + super.setAuthenticationType(authenticationType); + return this; + } + + /** {@inheritDoc} */ + @Override + public InfluxDBDataFeed setCredentialId(String credentialId) { + super.setCredentialId(credentialId); + return this; + } } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/InfluxDBDataFeedPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/InfluxDBDataFeedPatch.java index f1b3c787a46cc..d2f81128b3176 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/InfluxDBDataFeedPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/InfluxDBDataFeedPatch.java @@ -8,6 +8,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import java.time.OffsetDateTime; +import java.util.List; /** The InfluxDBDataFeedPatch model. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dataSourceType") @@ -20,6 +22,9 @@ public final class InfluxDBDataFeedPatch extends DataFeedDetailPatch { @JsonProperty(value = "dataSourceParameter") private InfluxDBParameterPatch dataSourceParameter; + /** Creates an instance of InfluxDBDataFeedPatch class. */ + public InfluxDBDataFeedPatch() {} + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -39,4 +44,151 @@ public InfluxDBDataFeedPatch setDataSourceParameter(InfluxDBParameterPatch dataS this.dataSourceParameter = dataSourceParameter; return this; } + + /** {@inheritDoc} */ + @Override + public InfluxDBDataFeedPatch setDataFeedName(String dataFeedName) { + super.setDataFeedName(dataFeedName); + return this; + } + + /** {@inheritDoc} */ + @Override + public InfluxDBDataFeedPatch setDataFeedDescription(String dataFeedDescription) { + super.setDataFeedDescription(dataFeedDescription); + return this; + } + + /** {@inheritDoc} */ + @Override + public InfluxDBDataFeedPatch setTimestampColumn(String timestampColumn) { + super.setTimestampColumn(timestampColumn); + return this; + } + + /** {@inheritDoc} */ + @Override + public InfluxDBDataFeedPatch setDataStartFrom(OffsetDateTime dataStartFrom) { + super.setDataStartFrom(dataStartFrom); + return this; + } + + /** {@inheritDoc} */ + @Override + public InfluxDBDataFeedPatch setStartOffsetInSeconds(Long startOffsetInSeconds) { + super.setStartOffsetInSeconds(startOffsetInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public InfluxDBDataFeedPatch setMaxConcurrency(Integer maxConcurrency) { + super.setMaxConcurrency(maxConcurrency); + return this; + } + + /** {@inheritDoc} */ + @Override + public InfluxDBDataFeedPatch setMinRetryIntervalInSeconds(Long minRetryIntervalInSeconds) { + super.setMinRetryIntervalInSeconds(minRetryIntervalInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public InfluxDBDataFeedPatch setStopRetryAfterInSeconds(Long stopRetryAfterInSeconds) { + super.setStopRetryAfterInSeconds(stopRetryAfterInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public InfluxDBDataFeedPatch setNeedRollup(NeedRollupEnum needRollup) { + super.setNeedRollup(needRollup); + return this; + } + + /** {@inheritDoc} */ + @Override + public InfluxDBDataFeedPatch setRollUpMethod(RollUpMethod rollUpMethod) { + super.setRollUpMethod(rollUpMethod); + return this; + } + + /** {@inheritDoc} */ + @Override + public InfluxDBDataFeedPatch setRollUpColumns(List rollUpColumns) { + super.setRollUpColumns(rollUpColumns); + return this; + } + + /** {@inheritDoc} */ + @Override + public InfluxDBDataFeedPatch setAllUpIdentification(String allUpIdentification) { + super.setAllUpIdentification(allUpIdentification); + return this; + } + + /** {@inheritDoc} */ + @Override + public InfluxDBDataFeedPatch setFillMissingPointType(FillMissingPointType fillMissingPointType) { + super.setFillMissingPointType(fillMissingPointType); + return this; + } + + /** {@inheritDoc} */ + @Override + public InfluxDBDataFeedPatch setFillMissingPointValue(Double fillMissingPointValue) { + super.setFillMissingPointValue(fillMissingPointValue); + return this; + } + + /** {@inheritDoc} */ + @Override + public InfluxDBDataFeedPatch setViewMode(ViewMode viewMode) { + super.setViewMode(viewMode); + return this; + } + + /** {@inheritDoc} */ + @Override + public InfluxDBDataFeedPatch setAdmins(List admins) { + super.setAdmins(admins); + return this; + } + + /** {@inheritDoc} */ + @Override + public InfluxDBDataFeedPatch setViewers(List viewers) { + super.setViewers(viewers); + return this; + } + + /** {@inheritDoc} */ + @Override + public InfluxDBDataFeedPatch setStatus(EntityStatus status) { + super.setStatus(status); + return this; + } + + /** {@inheritDoc} */ + @Override + public InfluxDBDataFeedPatch setActionLinkTemplate(String actionLinkTemplate) { + super.setActionLinkTemplate(actionLinkTemplate); + return this; + } + + /** {@inheritDoc} */ + @Override + public InfluxDBDataFeedPatch setAuthenticationType(AuthenticationTypeEnum authenticationType) { + super.setAuthenticationType(authenticationType); + return this; + } + + /** {@inheritDoc} */ + @Override + public InfluxDBDataFeedPatch setCredentialId(String credentialId) { + super.setCredentialId(credentialId); + return this; + } } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/InfluxDBParameter.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/InfluxDBParameter.java index ffac497217a82..0b1052b0afed8 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/InfluxDBParameter.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/InfluxDBParameter.java @@ -40,6 +40,9 @@ public final class InfluxDBParameter { @JsonProperty(value = "query", required = true) private String query; + /** Creates an instance of InfluxDBParameter class. */ + public InfluxDBParameter() {} + /** * Get the connectionString property: The connection string of this InfluxDB. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/InfluxDBParameterPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/InfluxDBParameterPatch.java index b80c614e17bb5..12ce280a91dc2 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/InfluxDBParameterPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/InfluxDBParameterPatch.java @@ -40,6 +40,9 @@ public final class InfluxDBParameterPatch { @JsonProperty(value = "query") private String query; + /** Creates an instance of InfluxDBParameterPatch class. */ + public InfluxDBParameterPatch() {} + /** * Get the connectionString property: The connection string of this InfluxDB. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IngestionProgressResetOptions.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IngestionProgressResetOptions.java index c84f32c02b578..b5de35e247b24 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IngestionProgressResetOptions.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IngestionProgressResetOptions.java @@ -23,6 +23,9 @@ public final class IngestionProgressResetOptions { @JsonProperty(value = "endTime", required = true) private OffsetDateTime endTime; + /** Creates an instance of IngestionProgressResetOptions class. */ + public IngestionProgressResetOptions() {} + /** * Get the startTime property: the start point of time range to reset data ingestion status. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IngestionStatusList.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IngestionStatusList.java index e5e5f75c72808..263523511f3ba 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IngestionStatusList.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IngestionStatusList.java @@ -4,7 +4,6 @@ package com.azure.ai.metricsadvisor.implementation.models; -import com.azure.ai.metricsadvisor.administration.models.DataFeedIngestionStatus; import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -24,6 +23,9 @@ public final class IngestionStatusList { @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; + /** Creates an instance of IngestionStatusList class. */ + public IngestionStatusList() {} + /** * Get the nextLink property: The @nextLink property. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IngestionStatusQueryOptions.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IngestionStatusQueryOptions.java index cf73f28d432bb..b2080dc0c24b9 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IngestionStatusQueryOptions.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IngestionStatusQueryOptions.java @@ -23,6 +23,9 @@ public final class IngestionStatusQueryOptions { @JsonProperty(value = "endTime", required = true) private OffsetDateTime endTime; + /** Creates an instance of IngestionStatusQueryOptions class. */ + public IngestionStatusQueryOptions() {} + /** * Get the startTime property: the start point of time range to query data ingestion status. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IngestionStatusType.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IngestionStatusType.java new file mode 100644 index 0000000000000..fdf82c17fb9ae --- /dev/null +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/IngestionStatusType.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.ai.metricsadvisor.implementation.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** latest ingestion task status for this data slice. */ +public final class IngestionStatusType extends ExpandableStringEnum { + /** Static value NotStarted for IngestionStatusType. */ + public static final IngestionStatusType NOT_STARTED = fromString("NotStarted"); + + /** Static value Scheduled for IngestionStatusType. */ + public static final IngestionStatusType SCHEDULED = fromString("Scheduled"); + + /** Static value Running for IngestionStatusType. */ + public static final IngestionStatusType RUNNING = fromString("Running"); + + /** Static value Succeeded for IngestionStatusType. */ + public static final IngestionStatusType SUCCEEDED = fromString("Succeeded"); + + /** Static value Failed for IngestionStatusType. */ + public static final IngestionStatusType FAILED = fromString("Failed"); + + /** Static value NoData for IngestionStatusType. */ + public static final IngestionStatusType NO_DATA = fromString("NoData"); + + /** Static value Error for IngestionStatusType. */ + public static final IngestionStatusType ERROR = fromString("Error"); + + /** Static value Paused for IngestionStatusType. */ + public static final IngestionStatusType PAUSED = fromString("Paused"); + + /** + * Creates a new instance of IngestionStatusType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public IngestionStatusType() {} + + /** + * Creates or finds a IngestionStatusType from its string representation. + * + * @param name a name to look for. + * @return the corresponding IngestionStatusType. + */ + @JsonCreator + public static IngestionStatusType fromString(String name) { + return fromString(name, IngestionStatusType.class); + } + + /** + * Gets known IngestionStatusType values. + * + * @return known IngestionStatusType values. + */ + public static Collection values() { + return values(IngestionStatusType.class); + } +} diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricAlertingConfiguration.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricAlertingConfiguration.java index a71e559112f0c..6c1faacc072fd 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricAlertingConfiguration.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricAlertingConfiguration.java @@ -59,6 +59,9 @@ public final class MetricAlertingConfiguration { @JsonProperty(value = "valueFilter") private ValueCondition valueFilter; + /** Creates an instance of MetricAlertingConfiguration class. */ + public MetricAlertingConfiguration() {} + /** * Get the anomalyDetectionConfigurationId property: Anomaly detection configuration unique id. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricAnomalyAlertSnoozeCondition.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricAnomalyAlertSnoozeCondition.java index 6ac3f3899e10e..54e4911abc5c7 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricAnomalyAlertSnoozeCondition.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricAnomalyAlertSnoozeCondition.java @@ -4,7 +4,7 @@ package com.azure.ai.metricsadvisor.implementation.models; -import com.azure.ai.metricsadvisor.administration.models.SnoozeScope; +import com.azure.ai.metricsadvisor.implementation.models.SnoozeScope; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; @@ -29,6 +29,9 @@ public final class MetricAnomalyAlertSnoozeCondition { @JsonProperty(value = "onlyForSuccessive", required = true) private boolean onlyForSuccessive; + /** Creates an instance of MetricAnomalyAlertSnoozeCondition class. */ + public MetricAnomalyAlertSnoozeCondition() {} + /** * Get the autoSnooze property: snooze point count, value range : [0, +∞). * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricDataList.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricDataList.java index 4846bb1863c5d..4714ee72a3874 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricDataList.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricDataList.java @@ -17,6 +17,9 @@ public final class MetricDataList { @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; + /** Creates an instance of MetricDataList class. */ + public MetricDataList() {} + /** * Get the value property: The value property. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricDataQueryOptions.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricDataQueryOptions.java index eb552acae7dc2..28d8c1f1f9bb0 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricDataQueryOptions.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricDataQueryOptions.java @@ -14,17 +14,15 @@ @Fluent public final class MetricDataQueryOptions { /* - * start time of query a time series data, and format should be - * yyyy-MM-ddThh:mm:ssZ. The maximum number of data points (series number * - * time range) is 10000. + * start time of query a time series data, and format should be yyyy-MM-ddThh:mm:ssZ. The maximum number of data + * points (series number * time range) is 10000. */ @JsonProperty(value = "startTime", required = true) private OffsetDateTime startTime; /* - * start time of query a time series data, and format should be - * yyyy-MM-ddThh:mm:ssZ. The maximum number of data points (series number * - * time range) is 10000. + * start time of query a time series data, and format should be yyyy-MM-ddThh:mm:ssZ. The maximum number of data + * points (series number * time range) is 10000. */ @JsonProperty(value = "endTime", required = true) private OffsetDateTime endTime; @@ -35,6 +33,9 @@ public final class MetricDataQueryOptions { @JsonProperty(value = "series", required = true) private List> series; + /** Creates an instance of MetricDataQueryOptions class. */ + public MetricDataQueryOptions() {} + /** * Get the startTime property: start time of query a time series data, and format should be yyyy-MM-ddThh:mm:ssZ. * The maximum number of data points (series number * time range) is 10000. diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricDimensionList.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricDimensionList.java index c5d3f4e45dd44..59e6a5b2ba0f5 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricDimensionList.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricDimensionList.java @@ -23,6 +23,9 @@ public final class MetricDimensionList { @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; + /** Creates an instance of MetricDimensionList class. */ + public MetricDimensionList() {} + /** * Get the nextLink property: The @nextLink property. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricDimensionQueryOptions.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricDimensionQueryOptions.java index 40229247ffd53..f093e300184ed 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricDimensionQueryOptions.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricDimensionQueryOptions.java @@ -22,6 +22,9 @@ public final class MetricDimensionQueryOptions { @JsonProperty(value = "dimensionValueFilter") private String dimensionValueFilter; + /** Creates an instance of MetricDimensionQueryOptions class. */ + public MetricDimensionQueryOptions() {} + /** * Get the dimensionName property: dimension name. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricFeedback.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricFeedback.java index 27ab8b7b77592..27418b47a7d9e 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricFeedback.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricFeedback.java @@ -57,6 +57,9 @@ public class MetricFeedback { @JsonProperty(value = "dimensionFilter", required = true) private FeedbackDimensionFilter dimensionFilter; + /** Creates an instance of MetricFeedback class. */ + public MetricFeedback() {} + /** * Get the feedbackId property: feedback unique id. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricFeedbackFilter.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricFeedbackFilter.java index d6b785f0cf20b..77f89ac5e831a 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricFeedbackFilter.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricFeedbackFilter.java @@ -4,6 +4,7 @@ package com.azure.ai.metricsadvisor.implementation.models; +import com.azure.ai.metricsadvisor.models.FeedbackQueryTimeMode; import com.azure.ai.metricsadvisor.models.FeedbackType; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; @@ -49,6 +50,9 @@ public final class MetricFeedbackFilter { @JsonProperty(value = "timeMode") private FeedbackQueryTimeMode timeMode; + /** Creates an instance of MetricFeedbackFilter class. */ + public MetricFeedbackFilter() {} + /** * Get the metricId property: filter feedbacks by metric id. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricFeedbackList.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricFeedbackList.java index 3da9a61a26087..442ddae098e5d 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricFeedbackList.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricFeedbackList.java @@ -23,6 +23,9 @@ public final class MetricFeedbackList { @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; + /** Creates an instance of MetricFeedbackList class. */ + public MetricFeedbackList() {} + /** * Get the nextLink property: The @nextLink property. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricSeriesData.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricSeriesData.java index 7197fbc01709e..fd692fc3a76ef 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricSeriesData.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricSeriesData.java @@ -30,6 +30,9 @@ public final class MetricSeriesData { @JsonProperty(value = "valueList", access = JsonProperty.Access.WRITE_ONLY) private List valueList; + /** Creates an instance of MetricSeriesData class. */ + public MetricSeriesData() {} + /** * Get the id property: The id property. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricSeriesDefinition.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricSeriesDefinition.java deleted file mode 100644 index fbeb853784c62..0000000000000 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricSeriesDefinition.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.ai.metricsadvisor.implementation.models; - -import com.azure.core.annotation.Immutable; -import com.fasterxml.jackson.annotation.JsonProperty; - -import java.util.Map; - -/** The MetricSeriesDefinition model. */ -@Immutable -public final class MetricSeriesDefinition { - /* - * metric unique id - */ - @JsonProperty(value = "metricId", access = JsonProperty.Access.WRITE_ONLY) - private String metricId; - - /* - * dimension name and value pair - */ - @JsonProperty(value = "dimension", access = JsonProperty.Access.WRITE_ONLY) - private Map dimension; - - /** - * Get the metricId property: metric unique id. - * - * @return the metricId value. - */ - public String getMetricId() { - return this.metricId; - } - - /** - * Get the dimension property: dimension name and value pair. - * - * @return the dimension value. - */ - public Map getDimension() { - return this.dimension; - } -} diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricSeriesItem.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricSeriesItem.java index 976a1f344b573..dedd28885cfaf 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricSeriesItem.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricSeriesItem.java @@ -24,6 +24,9 @@ public final class MetricSeriesItem { @JsonProperty(value = "dimension", access = JsonProperty.Access.WRITE_ONLY) private Map dimension; + /** Creates an instance of MetricSeriesItem class. */ + public MetricSeriesItem() {} + /** * Get the metricId property: metric unique id. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricSeriesList.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricSeriesList.java index 9cea73d882b08..baa4175f78096 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricSeriesList.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricSeriesList.java @@ -23,6 +23,9 @@ public final class MetricSeriesList { @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private List value; + /** Creates an instance of MetricSeriesList class. */ + public MetricSeriesList() {} + /** * Get the nextLink property: The @nextLink property. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricSeriesQueryOptions.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricSeriesQueryOptions.java index cdaf8a8789152..3612d817c43cb 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricSeriesQueryOptions.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricSeriesQueryOptions.java @@ -14,8 +14,7 @@ @Fluent public final class MetricSeriesQueryOptions { /* - * query series ingested after this time, the format should be - * yyyy-MM-ddTHH:mm:ssZ + * query series ingested after this time, the format should be yyyy-MM-ddTHH:mm:ssZ */ @JsonProperty(value = "activeSince", required = true) private OffsetDateTime activeSince; @@ -26,6 +25,9 @@ public final class MetricSeriesQueryOptions { @JsonProperty(value = "dimensionFilter") private Map> dimensionFilter; + /** Creates an instance of MetricSeriesQueryOptions class. */ + public MetricSeriesQueryOptions() {} + /** * Get the activeSince property: query series ingested after this time, the format should be yyyy-MM-ddTHH:mm:ssZ. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MongoDBDataFeed.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MongoDBDataFeed.java index ff443de1e44af..ff36033ae1967 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MongoDBDataFeed.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MongoDBDataFeed.java @@ -8,6 +8,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import java.time.OffsetDateTime; +import java.util.List; /** The MongoDBDataFeed model. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dataSourceType") @@ -20,6 +22,9 @@ public final class MongoDBDataFeed extends DataFeedDetail { @JsonProperty(value = "dataSourceParameter", required = true) private MongoDBParameter dataSourceParameter; + /** Creates an instance of MongoDBDataFeed class. */ + public MongoDBDataFeed() {} + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -39,4 +44,172 @@ public MongoDBDataFeed setDataSourceParameter(MongoDBParameter dataSourceParamet this.dataSourceParameter = dataSourceParameter; return this; } + + /** {@inheritDoc} */ + @Override + public MongoDBDataFeed setDataFeedName(String dataFeedName) { + super.setDataFeedName(dataFeedName); + return this; + } + + /** {@inheritDoc} */ + @Override + public MongoDBDataFeed setDataFeedDescription(String dataFeedDescription) { + super.setDataFeedDescription(dataFeedDescription); + return this; + } + + /** {@inheritDoc} */ + @Override + public MongoDBDataFeed setGranularityName(Granularity granularityName) { + super.setGranularityName(granularityName); + return this; + } + + /** {@inheritDoc} */ + @Override + public MongoDBDataFeed setGranularityAmount(Integer granularityAmount) { + super.setGranularityAmount(granularityAmount); + return this; + } + + /** {@inheritDoc} */ + @Override + public MongoDBDataFeed setMetrics(List metrics) { + super.setMetrics(metrics); + return this; + } + + /** {@inheritDoc} */ + @Override + public MongoDBDataFeed setDimension(List dimension) { + super.setDimension(dimension); + return this; + } + + /** {@inheritDoc} */ + @Override + public MongoDBDataFeed setTimestampColumn(String timestampColumn) { + super.setTimestampColumn(timestampColumn); + return this; + } + + /** {@inheritDoc} */ + @Override + public MongoDBDataFeed setDataStartFrom(OffsetDateTime dataStartFrom) { + super.setDataStartFrom(dataStartFrom); + return this; + } + + /** {@inheritDoc} */ + @Override + public MongoDBDataFeed setStartOffsetInSeconds(Long startOffsetInSeconds) { + super.setStartOffsetInSeconds(startOffsetInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public MongoDBDataFeed setMaxConcurrency(Integer maxConcurrency) { + super.setMaxConcurrency(maxConcurrency); + return this; + } + + /** {@inheritDoc} */ + @Override + public MongoDBDataFeed setMinRetryIntervalInSeconds(Long minRetryIntervalInSeconds) { + super.setMinRetryIntervalInSeconds(minRetryIntervalInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public MongoDBDataFeed setStopRetryAfterInSeconds(Long stopRetryAfterInSeconds) { + super.setStopRetryAfterInSeconds(stopRetryAfterInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public MongoDBDataFeed setNeedRollup(NeedRollupEnum needRollup) { + super.setNeedRollup(needRollup); + return this; + } + + /** {@inheritDoc} */ + @Override + public MongoDBDataFeed setRollUpMethod(RollUpMethod rollUpMethod) { + super.setRollUpMethod(rollUpMethod); + return this; + } + + /** {@inheritDoc} */ + @Override + public MongoDBDataFeed setRollUpColumns(List rollUpColumns) { + super.setRollUpColumns(rollUpColumns); + return this; + } + + /** {@inheritDoc} */ + @Override + public MongoDBDataFeed setAllUpIdentification(String allUpIdentification) { + super.setAllUpIdentification(allUpIdentification); + return this; + } + + /** {@inheritDoc} */ + @Override + public MongoDBDataFeed setFillMissingPointType(FillMissingPointType fillMissingPointType) { + super.setFillMissingPointType(fillMissingPointType); + return this; + } + + /** {@inheritDoc} */ + @Override + public MongoDBDataFeed setFillMissingPointValue(Double fillMissingPointValue) { + super.setFillMissingPointValue(fillMissingPointValue); + return this; + } + + /** {@inheritDoc} */ + @Override + public MongoDBDataFeed setViewMode(ViewMode viewMode) { + super.setViewMode(viewMode); + return this; + } + + /** {@inheritDoc} */ + @Override + public MongoDBDataFeed setAdmins(List admins) { + super.setAdmins(admins); + return this; + } + + /** {@inheritDoc} */ + @Override + public MongoDBDataFeed setViewers(List viewers) { + super.setViewers(viewers); + return this; + } + + /** {@inheritDoc} */ + @Override + public MongoDBDataFeed setActionLinkTemplate(String actionLinkTemplate) { + super.setActionLinkTemplate(actionLinkTemplate); + return this; + } + + /** {@inheritDoc} */ + @Override + public MongoDBDataFeed setAuthenticationType(AuthenticationTypeEnum authenticationType) { + super.setAuthenticationType(authenticationType); + return this; + } + + /** {@inheritDoc} */ + @Override + public MongoDBDataFeed setCredentialId(String credentialId) { + super.setCredentialId(credentialId); + return this; + } } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MongoDBDataFeedPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MongoDBDataFeedPatch.java index 22825c9cf3030..f9736d0863991 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MongoDBDataFeedPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MongoDBDataFeedPatch.java @@ -8,6 +8,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import java.time.OffsetDateTime; +import java.util.List; /** The MongoDBDataFeedPatch model. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dataSourceType") @@ -20,6 +22,9 @@ public final class MongoDBDataFeedPatch extends DataFeedDetailPatch { @JsonProperty(value = "dataSourceParameter") private MongoDBParameterPatch dataSourceParameter; + /** Creates an instance of MongoDBDataFeedPatch class. */ + public MongoDBDataFeedPatch() {} + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -39,4 +44,151 @@ public MongoDBDataFeedPatch setDataSourceParameter(MongoDBParameterPatch dataSou this.dataSourceParameter = dataSourceParameter; return this; } + + /** {@inheritDoc} */ + @Override + public MongoDBDataFeedPatch setDataFeedName(String dataFeedName) { + super.setDataFeedName(dataFeedName); + return this; + } + + /** {@inheritDoc} */ + @Override + public MongoDBDataFeedPatch setDataFeedDescription(String dataFeedDescription) { + super.setDataFeedDescription(dataFeedDescription); + return this; + } + + /** {@inheritDoc} */ + @Override + public MongoDBDataFeedPatch setTimestampColumn(String timestampColumn) { + super.setTimestampColumn(timestampColumn); + return this; + } + + /** {@inheritDoc} */ + @Override + public MongoDBDataFeedPatch setDataStartFrom(OffsetDateTime dataStartFrom) { + super.setDataStartFrom(dataStartFrom); + return this; + } + + /** {@inheritDoc} */ + @Override + public MongoDBDataFeedPatch setStartOffsetInSeconds(Long startOffsetInSeconds) { + super.setStartOffsetInSeconds(startOffsetInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public MongoDBDataFeedPatch setMaxConcurrency(Integer maxConcurrency) { + super.setMaxConcurrency(maxConcurrency); + return this; + } + + /** {@inheritDoc} */ + @Override + public MongoDBDataFeedPatch setMinRetryIntervalInSeconds(Long minRetryIntervalInSeconds) { + super.setMinRetryIntervalInSeconds(minRetryIntervalInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public MongoDBDataFeedPatch setStopRetryAfterInSeconds(Long stopRetryAfterInSeconds) { + super.setStopRetryAfterInSeconds(stopRetryAfterInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public MongoDBDataFeedPatch setNeedRollup(NeedRollupEnum needRollup) { + super.setNeedRollup(needRollup); + return this; + } + + /** {@inheritDoc} */ + @Override + public MongoDBDataFeedPatch setRollUpMethod(RollUpMethod rollUpMethod) { + super.setRollUpMethod(rollUpMethod); + return this; + } + + /** {@inheritDoc} */ + @Override + public MongoDBDataFeedPatch setRollUpColumns(List rollUpColumns) { + super.setRollUpColumns(rollUpColumns); + return this; + } + + /** {@inheritDoc} */ + @Override + public MongoDBDataFeedPatch setAllUpIdentification(String allUpIdentification) { + super.setAllUpIdentification(allUpIdentification); + return this; + } + + /** {@inheritDoc} */ + @Override + public MongoDBDataFeedPatch setFillMissingPointType(FillMissingPointType fillMissingPointType) { + super.setFillMissingPointType(fillMissingPointType); + return this; + } + + /** {@inheritDoc} */ + @Override + public MongoDBDataFeedPatch setFillMissingPointValue(Double fillMissingPointValue) { + super.setFillMissingPointValue(fillMissingPointValue); + return this; + } + + /** {@inheritDoc} */ + @Override + public MongoDBDataFeedPatch setViewMode(ViewMode viewMode) { + super.setViewMode(viewMode); + return this; + } + + /** {@inheritDoc} */ + @Override + public MongoDBDataFeedPatch setAdmins(List admins) { + super.setAdmins(admins); + return this; + } + + /** {@inheritDoc} */ + @Override + public MongoDBDataFeedPatch setViewers(List viewers) { + super.setViewers(viewers); + return this; + } + + /** {@inheritDoc} */ + @Override + public MongoDBDataFeedPatch setStatus(EntityStatus status) { + super.setStatus(status); + return this; + } + + /** {@inheritDoc} */ + @Override + public MongoDBDataFeedPatch setActionLinkTemplate(String actionLinkTemplate) { + super.setActionLinkTemplate(actionLinkTemplate); + return this; + } + + /** {@inheritDoc} */ + @Override + public MongoDBDataFeedPatch setAuthenticationType(AuthenticationTypeEnum authenticationType) { + super.setAuthenticationType(authenticationType); + return this; + } + + /** {@inheritDoc} */ + @Override + public MongoDBDataFeedPatch setCredentialId(String credentialId) { + super.setCredentialId(credentialId); + return this; + } } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MongoDBParameter.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MongoDBParameter.java index e4180901f5b5d..7e4ec28ce78ce 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MongoDBParameter.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MongoDBParameter.java @@ -28,6 +28,9 @@ public final class MongoDBParameter { @JsonProperty(value = "command", required = true) private String command; + /** Creates an instance of MongoDBParameter class. */ + public MongoDBParameter() {} + /** * Get the connectionString property: The connection string of this MongoDB. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MongoDBParameterPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MongoDBParameterPatch.java index 4ea5741b08e2f..fa8ef1f99b294 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MongoDBParameterPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MongoDBParameterPatch.java @@ -28,6 +28,9 @@ public final class MongoDBParameterPatch { @JsonProperty(value = "command") private String command; + /** Creates an instance of MongoDBParameterPatch class. */ + public MongoDBParameterPatch() {} + /** * Get the connectionString property: The connection string of this MongoDB. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MySqlDataFeed.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MySqlDataFeed.java index 076e662367572..f64af831e346a 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MySqlDataFeed.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MySqlDataFeed.java @@ -8,6 +8,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import java.time.OffsetDateTime; +import java.util.List; /** The MySqlDataFeed model. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dataSourceType") @@ -20,6 +22,9 @@ public final class MySqlDataFeed extends DataFeedDetail { @JsonProperty(value = "dataSourceParameter", required = true) private SqlSourceParameter dataSourceParameter; + /** Creates an instance of MySqlDataFeed class. */ + public MySqlDataFeed() {} + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -39,4 +44,172 @@ public MySqlDataFeed setDataSourceParameter(SqlSourceParameter dataSourceParamet this.dataSourceParameter = dataSourceParameter; return this; } + + /** {@inheritDoc} */ + @Override + public MySqlDataFeed setDataFeedName(String dataFeedName) { + super.setDataFeedName(dataFeedName); + return this; + } + + /** {@inheritDoc} */ + @Override + public MySqlDataFeed setDataFeedDescription(String dataFeedDescription) { + super.setDataFeedDescription(dataFeedDescription); + return this; + } + + /** {@inheritDoc} */ + @Override + public MySqlDataFeed setGranularityName(Granularity granularityName) { + super.setGranularityName(granularityName); + return this; + } + + /** {@inheritDoc} */ + @Override + public MySqlDataFeed setGranularityAmount(Integer granularityAmount) { + super.setGranularityAmount(granularityAmount); + return this; + } + + /** {@inheritDoc} */ + @Override + public MySqlDataFeed setMetrics(List metrics) { + super.setMetrics(metrics); + return this; + } + + /** {@inheritDoc} */ + @Override + public MySqlDataFeed setDimension(List dimension) { + super.setDimension(dimension); + return this; + } + + /** {@inheritDoc} */ + @Override + public MySqlDataFeed setTimestampColumn(String timestampColumn) { + super.setTimestampColumn(timestampColumn); + return this; + } + + /** {@inheritDoc} */ + @Override + public MySqlDataFeed setDataStartFrom(OffsetDateTime dataStartFrom) { + super.setDataStartFrom(dataStartFrom); + return this; + } + + /** {@inheritDoc} */ + @Override + public MySqlDataFeed setStartOffsetInSeconds(Long startOffsetInSeconds) { + super.setStartOffsetInSeconds(startOffsetInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public MySqlDataFeed setMaxConcurrency(Integer maxConcurrency) { + super.setMaxConcurrency(maxConcurrency); + return this; + } + + /** {@inheritDoc} */ + @Override + public MySqlDataFeed setMinRetryIntervalInSeconds(Long minRetryIntervalInSeconds) { + super.setMinRetryIntervalInSeconds(minRetryIntervalInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public MySqlDataFeed setStopRetryAfterInSeconds(Long stopRetryAfterInSeconds) { + super.setStopRetryAfterInSeconds(stopRetryAfterInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public MySqlDataFeed setNeedRollup(NeedRollupEnum needRollup) { + super.setNeedRollup(needRollup); + return this; + } + + /** {@inheritDoc} */ + @Override + public MySqlDataFeed setRollUpMethod(RollUpMethod rollUpMethod) { + super.setRollUpMethod(rollUpMethod); + return this; + } + + /** {@inheritDoc} */ + @Override + public MySqlDataFeed setRollUpColumns(List rollUpColumns) { + super.setRollUpColumns(rollUpColumns); + return this; + } + + /** {@inheritDoc} */ + @Override + public MySqlDataFeed setAllUpIdentification(String allUpIdentification) { + super.setAllUpIdentification(allUpIdentification); + return this; + } + + /** {@inheritDoc} */ + @Override + public MySqlDataFeed setFillMissingPointType(FillMissingPointType fillMissingPointType) { + super.setFillMissingPointType(fillMissingPointType); + return this; + } + + /** {@inheritDoc} */ + @Override + public MySqlDataFeed setFillMissingPointValue(Double fillMissingPointValue) { + super.setFillMissingPointValue(fillMissingPointValue); + return this; + } + + /** {@inheritDoc} */ + @Override + public MySqlDataFeed setViewMode(ViewMode viewMode) { + super.setViewMode(viewMode); + return this; + } + + /** {@inheritDoc} */ + @Override + public MySqlDataFeed setAdmins(List admins) { + super.setAdmins(admins); + return this; + } + + /** {@inheritDoc} */ + @Override + public MySqlDataFeed setViewers(List viewers) { + super.setViewers(viewers); + return this; + } + + /** {@inheritDoc} */ + @Override + public MySqlDataFeed setActionLinkTemplate(String actionLinkTemplate) { + super.setActionLinkTemplate(actionLinkTemplate); + return this; + } + + /** {@inheritDoc} */ + @Override + public MySqlDataFeed setAuthenticationType(AuthenticationTypeEnum authenticationType) { + super.setAuthenticationType(authenticationType); + return this; + } + + /** {@inheritDoc} */ + @Override + public MySqlDataFeed setCredentialId(String credentialId) { + super.setCredentialId(credentialId); + return this; + } } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MySqlDataFeedPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MySqlDataFeedPatch.java index bb9d33b17cbdc..bda62f5bcd548 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MySqlDataFeedPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MySqlDataFeedPatch.java @@ -8,6 +8,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import java.time.OffsetDateTime; +import java.util.List; /** The MySqlDataFeedPatch model. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dataSourceType") @@ -20,6 +22,9 @@ public final class MySqlDataFeedPatch extends DataFeedDetailPatch { @JsonProperty(value = "dataSourceParameter") private SQLSourceParameterPatch dataSourceParameter; + /** Creates an instance of MySqlDataFeedPatch class. */ + public MySqlDataFeedPatch() {} + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -39,4 +44,151 @@ public MySqlDataFeedPatch setDataSourceParameter(SQLSourceParameterPatch dataSou this.dataSourceParameter = dataSourceParameter; return this; } + + /** {@inheritDoc} */ + @Override + public MySqlDataFeedPatch setDataFeedName(String dataFeedName) { + super.setDataFeedName(dataFeedName); + return this; + } + + /** {@inheritDoc} */ + @Override + public MySqlDataFeedPatch setDataFeedDescription(String dataFeedDescription) { + super.setDataFeedDescription(dataFeedDescription); + return this; + } + + /** {@inheritDoc} */ + @Override + public MySqlDataFeedPatch setTimestampColumn(String timestampColumn) { + super.setTimestampColumn(timestampColumn); + return this; + } + + /** {@inheritDoc} */ + @Override + public MySqlDataFeedPatch setDataStartFrom(OffsetDateTime dataStartFrom) { + super.setDataStartFrom(dataStartFrom); + return this; + } + + /** {@inheritDoc} */ + @Override + public MySqlDataFeedPatch setStartOffsetInSeconds(Long startOffsetInSeconds) { + super.setStartOffsetInSeconds(startOffsetInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public MySqlDataFeedPatch setMaxConcurrency(Integer maxConcurrency) { + super.setMaxConcurrency(maxConcurrency); + return this; + } + + /** {@inheritDoc} */ + @Override + public MySqlDataFeedPatch setMinRetryIntervalInSeconds(Long minRetryIntervalInSeconds) { + super.setMinRetryIntervalInSeconds(minRetryIntervalInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public MySqlDataFeedPatch setStopRetryAfterInSeconds(Long stopRetryAfterInSeconds) { + super.setStopRetryAfterInSeconds(stopRetryAfterInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public MySqlDataFeedPatch setNeedRollup(NeedRollupEnum needRollup) { + super.setNeedRollup(needRollup); + return this; + } + + /** {@inheritDoc} */ + @Override + public MySqlDataFeedPatch setRollUpMethod(RollUpMethod rollUpMethod) { + super.setRollUpMethod(rollUpMethod); + return this; + } + + /** {@inheritDoc} */ + @Override + public MySqlDataFeedPatch setRollUpColumns(List rollUpColumns) { + super.setRollUpColumns(rollUpColumns); + return this; + } + + /** {@inheritDoc} */ + @Override + public MySqlDataFeedPatch setAllUpIdentification(String allUpIdentification) { + super.setAllUpIdentification(allUpIdentification); + return this; + } + + /** {@inheritDoc} */ + @Override + public MySqlDataFeedPatch setFillMissingPointType(FillMissingPointType fillMissingPointType) { + super.setFillMissingPointType(fillMissingPointType); + return this; + } + + /** {@inheritDoc} */ + @Override + public MySqlDataFeedPatch setFillMissingPointValue(Double fillMissingPointValue) { + super.setFillMissingPointValue(fillMissingPointValue); + return this; + } + + /** {@inheritDoc} */ + @Override + public MySqlDataFeedPatch setViewMode(ViewMode viewMode) { + super.setViewMode(viewMode); + return this; + } + + /** {@inheritDoc} */ + @Override + public MySqlDataFeedPatch setAdmins(List admins) { + super.setAdmins(admins); + return this; + } + + /** {@inheritDoc} */ + @Override + public MySqlDataFeedPatch setViewers(List viewers) { + super.setViewers(viewers); + return this; + } + + /** {@inheritDoc} */ + @Override + public MySqlDataFeedPatch setStatus(EntityStatus status) { + super.setStatus(status); + return this; + } + + /** {@inheritDoc} */ + @Override + public MySqlDataFeedPatch setActionLinkTemplate(String actionLinkTemplate) { + super.setActionLinkTemplate(actionLinkTemplate); + return this; + } + + /** {@inheritDoc} */ + @Override + public MySqlDataFeedPatch setAuthenticationType(AuthenticationTypeEnum authenticationType) { + super.setAuthenticationType(authenticationType); + return this; + } + + /** {@inheritDoc} */ + @Override + public MySqlDataFeedPatch setCredentialId(String credentialId) { + super.setCredentialId(credentialId); + return this; + } } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/NeedRollupEnum.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/NeedRollupEnum.java index 1ed1fb7fd7d5a..e18a258a67502 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/NeedRollupEnum.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/NeedRollupEnum.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for NeedRollupEnum. */ +/** mark if the data feed need rollup. */ public final class NeedRollupEnum extends ExpandableStringEnum { /** Static value NoRollup for NeedRollupEnum. */ public static final NeedRollupEnum NO_ROLLUP = fromString("NoRollup"); @@ -19,6 +19,14 @@ public final class NeedRollupEnum extends ExpandableStringEnum { /** Static value AlreadyRollup for NeedRollupEnum. */ public static final NeedRollupEnum ALREADY_ROLLUP = fromString("AlreadyRollup"); + /** + * Creates a new instance of NeedRollupEnum value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public NeedRollupEnum() {} + /** * Creates or finds a NeedRollupEnum from its string representation. * @@ -30,7 +38,11 @@ public static NeedRollupEnum fromString(String name) { return fromString(name, NeedRollupEnum.class); } - /** @return known NeedRollupEnum values. */ + /** + * Gets known NeedRollupEnum values. + * + * @return known NeedRollupEnum values. + */ public static Collection values() { return values(NeedRollupEnum.class); } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/PeriodFeedback.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/PeriodFeedback.java index 16f0f822ae306..63667dafa4fcf 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/PeriodFeedback.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/PeriodFeedback.java @@ -8,6 +8,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.UUID; /** The PeriodFeedback model. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "feedbackType") @@ -20,6 +21,9 @@ public final class PeriodFeedback extends MetricFeedback { @JsonProperty(value = "value", required = true) private PeriodFeedbackValue value; + /** Creates an instance of PeriodFeedback class. */ + public PeriodFeedback() {} + /** * Get the value property: The value property. * @@ -39,4 +43,18 @@ public PeriodFeedback setValue(PeriodFeedbackValue value) { this.value = value; return this; } + + /** {@inheritDoc} */ + @Override + public PeriodFeedback setMetricId(UUID metricId) { + super.setMetricId(metricId); + return this; + } + + /** {@inheritDoc} */ + @Override + public PeriodFeedback setDimensionFilter(FeedbackDimensionFilter dimensionFilter) { + super.setDimensionFilter(dimensionFilter); + return this; + } } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/PeriodFeedbackValue.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/PeriodFeedbackValue.java index 5d136ef4e75ca..a19a859d36f0c 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/PeriodFeedbackValue.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/PeriodFeedbackValue.java @@ -23,6 +23,9 @@ public final class PeriodFeedbackValue { @JsonProperty(value = "periodValue", required = true) private int periodValue; + /** Creates an instance of PeriodFeedbackValue class. */ + public PeriodFeedbackValue() {} + /** * Get the periodType property: the type of setting period. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/PostgreSqlDataFeed.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/PostgreSqlDataFeed.java index cef2f91e29342..6dc28a9ef7cd6 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/PostgreSqlDataFeed.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/PostgreSqlDataFeed.java @@ -8,6 +8,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import java.time.OffsetDateTime; +import java.util.List; /** The PostgreSqlDataFeed model. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dataSourceType") @@ -20,6 +22,9 @@ public final class PostgreSqlDataFeed extends DataFeedDetail { @JsonProperty(value = "dataSourceParameter", required = true) private SqlSourceParameter dataSourceParameter; + /** Creates an instance of PostgreSqlDataFeed class. */ + public PostgreSqlDataFeed() {} + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -39,4 +44,172 @@ public PostgreSqlDataFeed setDataSourceParameter(SqlSourceParameter dataSourcePa this.dataSourceParameter = dataSourceParameter; return this; } + + /** {@inheritDoc} */ + @Override + public PostgreSqlDataFeed setDataFeedName(String dataFeedName) { + super.setDataFeedName(dataFeedName); + return this; + } + + /** {@inheritDoc} */ + @Override + public PostgreSqlDataFeed setDataFeedDescription(String dataFeedDescription) { + super.setDataFeedDescription(dataFeedDescription); + return this; + } + + /** {@inheritDoc} */ + @Override + public PostgreSqlDataFeed setGranularityName(Granularity granularityName) { + super.setGranularityName(granularityName); + return this; + } + + /** {@inheritDoc} */ + @Override + public PostgreSqlDataFeed setGranularityAmount(Integer granularityAmount) { + super.setGranularityAmount(granularityAmount); + return this; + } + + /** {@inheritDoc} */ + @Override + public PostgreSqlDataFeed setMetrics(List metrics) { + super.setMetrics(metrics); + return this; + } + + /** {@inheritDoc} */ + @Override + public PostgreSqlDataFeed setDimension(List dimension) { + super.setDimension(dimension); + return this; + } + + /** {@inheritDoc} */ + @Override + public PostgreSqlDataFeed setTimestampColumn(String timestampColumn) { + super.setTimestampColumn(timestampColumn); + return this; + } + + /** {@inheritDoc} */ + @Override + public PostgreSqlDataFeed setDataStartFrom(OffsetDateTime dataStartFrom) { + super.setDataStartFrom(dataStartFrom); + return this; + } + + /** {@inheritDoc} */ + @Override + public PostgreSqlDataFeed setStartOffsetInSeconds(Long startOffsetInSeconds) { + super.setStartOffsetInSeconds(startOffsetInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public PostgreSqlDataFeed setMaxConcurrency(Integer maxConcurrency) { + super.setMaxConcurrency(maxConcurrency); + return this; + } + + /** {@inheritDoc} */ + @Override + public PostgreSqlDataFeed setMinRetryIntervalInSeconds(Long minRetryIntervalInSeconds) { + super.setMinRetryIntervalInSeconds(minRetryIntervalInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public PostgreSqlDataFeed setStopRetryAfterInSeconds(Long stopRetryAfterInSeconds) { + super.setStopRetryAfterInSeconds(stopRetryAfterInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public PostgreSqlDataFeed setNeedRollup(NeedRollupEnum needRollup) { + super.setNeedRollup(needRollup); + return this; + } + + /** {@inheritDoc} */ + @Override + public PostgreSqlDataFeed setRollUpMethod(RollUpMethod rollUpMethod) { + super.setRollUpMethod(rollUpMethod); + return this; + } + + /** {@inheritDoc} */ + @Override + public PostgreSqlDataFeed setRollUpColumns(List rollUpColumns) { + super.setRollUpColumns(rollUpColumns); + return this; + } + + /** {@inheritDoc} */ + @Override + public PostgreSqlDataFeed setAllUpIdentification(String allUpIdentification) { + super.setAllUpIdentification(allUpIdentification); + return this; + } + + /** {@inheritDoc} */ + @Override + public PostgreSqlDataFeed setFillMissingPointType(FillMissingPointType fillMissingPointType) { + super.setFillMissingPointType(fillMissingPointType); + return this; + } + + /** {@inheritDoc} */ + @Override + public PostgreSqlDataFeed setFillMissingPointValue(Double fillMissingPointValue) { + super.setFillMissingPointValue(fillMissingPointValue); + return this; + } + + /** {@inheritDoc} */ + @Override + public PostgreSqlDataFeed setViewMode(ViewMode viewMode) { + super.setViewMode(viewMode); + return this; + } + + /** {@inheritDoc} */ + @Override + public PostgreSqlDataFeed setAdmins(List admins) { + super.setAdmins(admins); + return this; + } + + /** {@inheritDoc} */ + @Override + public PostgreSqlDataFeed setViewers(List viewers) { + super.setViewers(viewers); + return this; + } + + /** {@inheritDoc} */ + @Override + public PostgreSqlDataFeed setActionLinkTemplate(String actionLinkTemplate) { + super.setActionLinkTemplate(actionLinkTemplate); + return this; + } + + /** {@inheritDoc} */ + @Override + public PostgreSqlDataFeed setAuthenticationType(AuthenticationTypeEnum authenticationType) { + super.setAuthenticationType(authenticationType); + return this; + } + + /** {@inheritDoc} */ + @Override + public PostgreSqlDataFeed setCredentialId(String credentialId) { + super.setCredentialId(credentialId); + return this; + } } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/PostgreSqlDataFeedPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/PostgreSqlDataFeedPatch.java index c555fb36537c7..54e723e563c94 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/PostgreSqlDataFeedPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/PostgreSqlDataFeedPatch.java @@ -8,6 +8,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import java.time.OffsetDateTime; +import java.util.List; /** The PostgreSqlDataFeedPatch model. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dataSourceType") @@ -20,6 +22,9 @@ public final class PostgreSqlDataFeedPatch extends DataFeedDetailPatch { @JsonProperty(value = "dataSourceParameter") private SQLSourceParameterPatch dataSourceParameter; + /** Creates an instance of PostgreSqlDataFeedPatch class. */ + public PostgreSqlDataFeedPatch() {} + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -39,4 +44,151 @@ public PostgreSqlDataFeedPatch setDataSourceParameter(SQLSourceParameterPatch da this.dataSourceParameter = dataSourceParameter; return this; } + + /** {@inheritDoc} */ + @Override + public PostgreSqlDataFeedPatch setDataFeedName(String dataFeedName) { + super.setDataFeedName(dataFeedName); + return this; + } + + /** {@inheritDoc} */ + @Override + public PostgreSqlDataFeedPatch setDataFeedDescription(String dataFeedDescription) { + super.setDataFeedDescription(dataFeedDescription); + return this; + } + + /** {@inheritDoc} */ + @Override + public PostgreSqlDataFeedPatch setTimestampColumn(String timestampColumn) { + super.setTimestampColumn(timestampColumn); + return this; + } + + /** {@inheritDoc} */ + @Override + public PostgreSqlDataFeedPatch setDataStartFrom(OffsetDateTime dataStartFrom) { + super.setDataStartFrom(dataStartFrom); + return this; + } + + /** {@inheritDoc} */ + @Override + public PostgreSqlDataFeedPatch setStartOffsetInSeconds(Long startOffsetInSeconds) { + super.setStartOffsetInSeconds(startOffsetInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public PostgreSqlDataFeedPatch setMaxConcurrency(Integer maxConcurrency) { + super.setMaxConcurrency(maxConcurrency); + return this; + } + + /** {@inheritDoc} */ + @Override + public PostgreSqlDataFeedPatch setMinRetryIntervalInSeconds(Long minRetryIntervalInSeconds) { + super.setMinRetryIntervalInSeconds(minRetryIntervalInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public PostgreSqlDataFeedPatch setStopRetryAfterInSeconds(Long stopRetryAfterInSeconds) { + super.setStopRetryAfterInSeconds(stopRetryAfterInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public PostgreSqlDataFeedPatch setNeedRollup(NeedRollupEnum needRollup) { + super.setNeedRollup(needRollup); + return this; + } + + /** {@inheritDoc} */ + @Override + public PostgreSqlDataFeedPatch setRollUpMethod(RollUpMethod rollUpMethod) { + super.setRollUpMethod(rollUpMethod); + return this; + } + + /** {@inheritDoc} */ + @Override + public PostgreSqlDataFeedPatch setRollUpColumns(List rollUpColumns) { + super.setRollUpColumns(rollUpColumns); + return this; + } + + /** {@inheritDoc} */ + @Override + public PostgreSqlDataFeedPatch setAllUpIdentification(String allUpIdentification) { + super.setAllUpIdentification(allUpIdentification); + return this; + } + + /** {@inheritDoc} */ + @Override + public PostgreSqlDataFeedPatch setFillMissingPointType(FillMissingPointType fillMissingPointType) { + super.setFillMissingPointType(fillMissingPointType); + return this; + } + + /** {@inheritDoc} */ + @Override + public PostgreSqlDataFeedPatch setFillMissingPointValue(Double fillMissingPointValue) { + super.setFillMissingPointValue(fillMissingPointValue); + return this; + } + + /** {@inheritDoc} */ + @Override + public PostgreSqlDataFeedPatch setViewMode(ViewMode viewMode) { + super.setViewMode(viewMode); + return this; + } + + /** {@inheritDoc} */ + @Override + public PostgreSqlDataFeedPatch setAdmins(List admins) { + super.setAdmins(admins); + return this; + } + + /** {@inheritDoc} */ + @Override + public PostgreSqlDataFeedPatch setViewers(List viewers) { + super.setViewers(viewers); + return this; + } + + /** {@inheritDoc} */ + @Override + public PostgreSqlDataFeedPatch setStatus(EntityStatus status) { + super.setStatus(status); + return this; + } + + /** {@inheritDoc} */ + @Override + public PostgreSqlDataFeedPatch setActionLinkTemplate(String actionLinkTemplate) { + super.setActionLinkTemplate(actionLinkTemplate); + return this; + } + + /** {@inheritDoc} */ + @Override + public PostgreSqlDataFeedPatch setAuthenticationType(AuthenticationTypeEnum authenticationType) { + super.setAuthenticationType(authenticationType); + return this; + } + + /** {@inheritDoc} */ + @Override + public PostgreSqlDataFeedPatch setCredentialId(String credentialId) { + super.setCredentialId(credentialId); + return this; + } } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/RollUpMethod.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/RollUpMethod.java index 96896d6704b3f..723a344e565e7 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/RollUpMethod.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/RollUpMethod.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for RollUpMethod. */ +/** roll up method. */ public final class RollUpMethod extends ExpandableStringEnum { /** Static value None for RollUpMethod. */ public static final RollUpMethod NONE = fromString("None"); @@ -28,6 +28,14 @@ public final class RollUpMethod extends ExpandableStringEnum { /** Static value Count for RollUpMethod. */ public static final RollUpMethod COUNT = fromString("Count"); + /** + * Creates a new instance of RollUpMethod value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public RollUpMethod() {} + /** * Creates or finds a RollUpMethod from its string representation. * @@ -39,7 +47,11 @@ public static RollUpMethod fromString(String name) { return fromString(name, RollUpMethod.class); } - /** @return known RollUpMethod values. */ + /** + * Gets known RollUpMethod values. + * + * @return known RollUpMethod values. + */ public static Collection values() { return values(RollUpMethod.class); } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/RootCause.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/RootCause.java index cfe1f72e3a876..439fb72e3e4ad 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/RootCause.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/RootCause.java @@ -35,6 +35,9 @@ public final class RootCause { @JsonProperty(value = "description", required = true) private String description; + /** Creates an instance of RootCause class. */ + public RootCause() {} + /** * Get the rootCause property: The rootCause property. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/RootCauseList.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/RootCauseList.java index 89fd278aa223e..eb69cbedd80c2 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/RootCauseList.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/RootCauseList.java @@ -17,6 +17,9 @@ public final class RootCauseList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of RootCauseList class. */ + public RootCauseList() {} + /** * Get the value property: The value property. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SQLServerDataFeed.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SQLServerDataFeed.java index 47af731e120a1..93f8d5403ffb7 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SQLServerDataFeed.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SQLServerDataFeed.java @@ -8,6 +8,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import java.time.OffsetDateTime; +import java.util.List; /** The SQLServerDataFeed model. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dataSourceType") @@ -20,6 +22,9 @@ public final class SQLServerDataFeed extends DataFeedDetail { @JsonProperty(value = "dataSourceParameter", required = true) private SqlSourceParameter dataSourceParameter; + /** Creates an instance of SQLServerDataFeed class. */ + public SQLServerDataFeed() {} + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -39,4 +44,172 @@ public SQLServerDataFeed setDataSourceParameter(SqlSourceParameter dataSourcePar this.dataSourceParameter = dataSourceParameter; return this; } + + /** {@inheritDoc} */ + @Override + public SQLServerDataFeed setDataFeedName(String dataFeedName) { + super.setDataFeedName(dataFeedName); + return this; + } + + /** {@inheritDoc} */ + @Override + public SQLServerDataFeed setDataFeedDescription(String dataFeedDescription) { + super.setDataFeedDescription(dataFeedDescription); + return this; + } + + /** {@inheritDoc} */ + @Override + public SQLServerDataFeed setGranularityName(Granularity granularityName) { + super.setGranularityName(granularityName); + return this; + } + + /** {@inheritDoc} */ + @Override + public SQLServerDataFeed setGranularityAmount(Integer granularityAmount) { + super.setGranularityAmount(granularityAmount); + return this; + } + + /** {@inheritDoc} */ + @Override + public SQLServerDataFeed setMetrics(List metrics) { + super.setMetrics(metrics); + return this; + } + + /** {@inheritDoc} */ + @Override + public SQLServerDataFeed setDimension(List dimension) { + super.setDimension(dimension); + return this; + } + + /** {@inheritDoc} */ + @Override + public SQLServerDataFeed setTimestampColumn(String timestampColumn) { + super.setTimestampColumn(timestampColumn); + return this; + } + + /** {@inheritDoc} */ + @Override + public SQLServerDataFeed setDataStartFrom(OffsetDateTime dataStartFrom) { + super.setDataStartFrom(dataStartFrom); + return this; + } + + /** {@inheritDoc} */ + @Override + public SQLServerDataFeed setStartOffsetInSeconds(Long startOffsetInSeconds) { + super.setStartOffsetInSeconds(startOffsetInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public SQLServerDataFeed setMaxConcurrency(Integer maxConcurrency) { + super.setMaxConcurrency(maxConcurrency); + return this; + } + + /** {@inheritDoc} */ + @Override + public SQLServerDataFeed setMinRetryIntervalInSeconds(Long minRetryIntervalInSeconds) { + super.setMinRetryIntervalInSeconds(minRetryIntervalInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public SQLServerDataFeed setStopRetryAfterInSeconds(Long stopRetryAfterInSeconds) { + super.setStopRetryAfterInSeconds(stopRetryAfterInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public SQLServerDataFeed setNeedRollup(NeedRollupEnum needRollup) { + super.setNeedRollup(needRollup); + return this; + } + + /** {@inheritDoc} */ + @Override + public SQLServerDataFeed setRollUpMethod(RollUpMethod rollUpMethod) { + super.setRollUpMethod(rollUpMethod); + return this; + } + + /** {@inheritDoc} */ + @Override + public SQLServerDataFeed setRollUpColumns(List rollUpColumns) { + super.setRollUpColumns(rollUpColumns); + return this; + } + + /** {@inheritDoc} */ + @Override + public SQLServerDataFeed setAllUpIdentification(String allUpIdentification) { + super.setAllUpIdentification(allUpIdentification); + return this; + } + + /** {@inheritDoc} */ + @Override + public SQLServerDataFeed setFillMissingPointType(FillMissingPointType fillMissingPointType) { + super.setFillMissingPointType(fillMissingPointType); + return this; + } + + /** {@inheritDoc} */ + @Override + public SQLServerDataFeed setFillMissingPointValue(Double fillMissingPointValue) { + super.setFillMissingPointValue(fillMissingPointValue); + return this; + } + + /** {@inheritDoc} */ + @Override + public SQLServerDataFeed setViewMode(ViewMode viewMode) { + super.setViewMode(viewMode); + return this; + } + + /** {@inheritDoc} */ + @Override + public SQLServerDataFeed setAdmins(List admins) { + super.setAdmins(admins); + return this; + } + + /** {@inheritDoc} */ + @Override + public SQLServerDataFeed setViewers(List viewers) { + super.setViewers(viewers); + return this; + } + + /** {@inheritDoc} */ + @Override + public SQLServerDataFeed setActionLinkTemplate(String actionLinkTemplate) { + super.setActionLinkTemplate(actionLinkTemplate); + return this; + } + + /** {@inheritDoc} */ + @Override + public SQLServerDataFeed setAuthenticationType(AuthenticationTypeEnum authenticationType) { + super.setAuthenticationType(authenticationType); + return this; + } + + /** {@inheritDoc} */ + @Override + public SQLServerDataFeed setCredentialId(String credentialId) { + super.setCredentialId(credentialId); + return this; + } } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SQLServerDataFeedPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SQLServerDataFeedPatch.java index e70bf2301c195..c0f2251d9d4a3 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SQLServerDataFeedPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SQLServerDataFeedPatch.java @@ -8,6 +8,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import java.time.OffsetDateTime; +import java.util.List; /** The SQLServerDataFeedPatch model. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "dataSourceType") @@ -20,6 +22,9 @@ public final class SQLServerDataFeedPatch extends DataFeedDetailPatch { @JsonProperty(value = "dataSourceParameter") private SQLSourceParameterPatch dataSourceParameter; + /** Creates an instance of SQLServerDataFeedPatch class. */ + public SQLServerDataFeedPatch() {} + /** * Get the dataSourceParameter property: The dataSourceParameter property. * @@ -39,4 +44,151 @@ public SQLServerDataFeedPatch setDataSourceParameter(SQLSourceParameterPatch dat this.dataSourceParameter = dataSourceParameter; return this; } + + /** {@inheritDoc} */ + @Override + public SQLServerDataFeedPatch setDataFeedName(String dataFeedName) { + super.setDataFeedName(dataFeedName); + return this; + } + + /** {@inheritDoc} */ + @Override + public SQLServerDataFeedPatch setDataFeedDescription(String dataFeedDescription) { + super.setDataFeedDescription(dataFeedDescription); + return this; + } + + /** {@inheritDoc} */ + @Override + public SQLServerDataFeedPatch setTimestampColumn(String timestampColumn) { + super.setTimestampColumn(timestampColumn); + return this; + } + + /** {@inheritDoc} */ + @Override + public SQLServerDataFeedPatch setDataStartFrom(OffsetDateTime dataStartFrom) { + super.setDataStartFrom(dataStartFrom); + return this; + } + + /** {@inheritDoc} */ + @Override + public SQLServerDataFeedPatch setStartOffsetInSeconds(Long startOffsetInSeconds) { + super.setStartOffsetInSeconds(startOffsetInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public SQLServerDataFeedPatch setMaxConcurrency(Integer maxConcurrency) { + super.setMaxConcurrency(maxConcurrency); + return this; + } + + /** {@inheritDoc} */ + @Override + public SQLServerDataFeedPatch setMinRetryIntervalInSeconds(Long minRetryIntervalInSeconds) { + super.setMinRetryIntervalInSeconds(minRetryIntervalInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public SQLServerDataFeedPatch setStopRetryAfterInSeconds(Long stopRetryAfterInSeconds) { + super.setStopRetryAfterInSeconds(stopRetryAfterInSeconds); + return this; + } + + /** {@inheritDoc} */ + @Override + public SQLServerDataFeedPatch setNeedRollup(NeedRollupEnum needRollup) { + super.setNeedRollup(needRollup); + return this; + } + + /** {@inheritDoc} */ + @Override + public SQLServerDataFeedPatch setRollUpMethod(RollUpMethod rollUpMethod) { + super.setRollUpMethod(rollUpMethod); + return this; + } + + /** {@inheritDoc} */ + @Override + public SQLServerDataFeedPatch setRollUpColumns(List rollUpColumns) { + super.setRollUpColumns(rollUpColumns); + return this; + } + + /** {@inheritDoc} */ + @Override + public SQLServerDataFeedPatch setAllUpIdentification(String allUpIdentification) { + super.setAllUpIdentification(allUpIdentification); + return this; + } + + /** {@inheritDoc} */ + @Override + public SQLServerDataFeedPatch setFillMissingPointType(FillMissingPointType fillMissingPointType) { + super.setFillMissingPointType(fillMissingPointType); + return this; + } + + /** {@inheritDoc} */ + @Override + public SQLServerDataFeedPatch setFillMissingPointValue(Double fillMissingPointValue) { + super.setFillMissingPointValue(fillMissingPointValue); + return this; + } + + /** {@inheritDoc} */ + @Override + public SQLServerDataFeedPatch setViewMode(ViewMode viewMode) { + super.setViewMode(viewMode); + return this; + } + + /** {@inheritDoc} */ + @Override + public SQLServerDataFeedPatch setAdmins(List admins) { + super.setAdmins(admins); + return this; + } + + /** {@inheritDoc} */ + @Override + public SQLServerDataFeedPatch setViewers(List viewers) { + super.setViewers(viewers); + return this; + } + + /** {@inheritDoc} */ + @Override + public SQLServerDataFeedPatch setStatus(EntityStatus status) { + super.setStatus(status); + return this; + } + + /** {@inheritDoc} */ + @Override + public SQLServerDataFeedPatch setActionLinkTemplate(String actionLinkTemplate) { + super.setActionLinkTemplate(actionLinkTemplate); + return this; + } + + /** {@inheritDoc} */ + @Override + public SQLServerDataFeedPatch setAuthenticationType(AuthenticationTypeEnum authenticationType) { + super.setAuthenticationType(authenticationType); + return this; + } + + /** {@inheritDoc} */ + @Override + public SQLServerDataFeedPatch setCredentialId(String credentialId) { + super.setCredentialId(credentialId); + return this; + } } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SQLSourceParameterPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SQLSourceParameterPatch.java index a5356069f6768..18c6f3f636eaa 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SQLSourceParameterPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SQLSourceParameterPatch.java @@ -22,6 +22,9 @@ public final class SQLSourceParameterPatch { @JsonProperty(value = "query") private String query; + /** Creates an instance of SQLSourceParameterPatch class. */ + public SQLSourceParameterPatch() {} + /** * Get the connectionString property: The connection string of this database. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SeriesConfiguration.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SeriesConfiguration.java index b7f2703e84ab2..32e6f911cee8d 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SeriesConfiguration.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SeriesConfiguration.java @@ -42,6 +42,9 @@ public final class SeriesConfiguration { @JsonProperty(value = "changeThresholdCondition") private ChangeThresholdCondition changeThresholdCondition; + /** Creates an instance of SeriesConfiguration class. */ + public SeriesConfiguration() {} + /** * Get the series property: The series property. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SeriesIdentity.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SeriesIdentity.java index 16a82b4f5a5c7..6be79994d1fb6 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SeriesIdentity.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SeriesIdentity.java @@ -17,6 +17,9 @@ public final class SeriesIdentity { @JsonProperty(value = "dimension", required = true) private Map dimension; + /** Creates an instance of SeriesIdentity class. */ + public SeriesIdentity() {} + /** * Get the dimension property: dimension specified for series. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SeriesResult.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SeriesResult.java index e4d3037be7e5a..41ed332f981d0 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SeriesResult.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SeriesResult.java @@ -60,6 +60,9 @@ public final class SeriesResult { @JsonProperty(value = "upperBoundaryList", required = true) private List upperBoundaryList; + /** Creates an instance of SeriesResult class. */ + public SeriesResult() {} + /** * Get the series property: The series property. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SeriesResultList.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SeriesResultList.java index 340ea20ea849d..f1086bd2c62e6 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SeriesResultList.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SeriesResultList.java @@ -17,6 +17,9 @@ public final class SeriesResultList { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of SeriesResultList class. */ + public SeriesResultList() {} + /** * Get the value property: The value property. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalCredential.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalCredential.java index c1ebf9311aa7f..6ecaa50e3b940 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalCredential.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalCredential.java @@ -20,6 +20,9 @@ public final class ServicePrincipalCredential extends DataSourceCredential { @JsonProperty(value = "parameters", required = true) private ServicePrincipalParam parameters; + /** Creates an instance of ServicePrincipalCredential class. */ + public ServicePrincipalCredential() {} + /** * Get the parameters property: The parameters property. * @@ -39,4 +42,18 @@ public ServicePrincipalCredential setParameters(ServicePrincipalParam parameters this.parameters = parameters; return this; } + + /** {@inheritDoc} */ + @Override + public ServicePrincipalCredential setDataSourceCredentialName(String dataSourceCredentialName) { + super.setDataSourceCredentialName(dataSourceCredentialName); + return this; + } + + /** {@inheritDoc} */ + @Override + public ServicePrincipalCredential setDataSourceCredentialDescription(String dataSourceCredentialDescription) { + super.setDataSourceCredentialDescription(dataSourceCredentialDescription); + return this; + } } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalCredentialPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalCredentialPatch.java index 013dc4660f7a2..7efa01a6a484a 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalCredentialPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalCredentialPatch.java @@ -20,6 +20,9 @@ public final class ServicePrincipalCredentialPatch extends DataSourceCredentialP @JsonProperty(value = "parameters") private ServicePrincipalParamPatch parameters; + /** Creates an instance of ServicePrincipalCredentialPatch class. */ + public ServicePrincipalCredentialPatch() {} + /** * Get the parameters property: The parameters property. * @@ -39,4 +42,18 @@ public ServicePrincipalCredentialPatch setParameters(ServicePrincipalParamPatch this.parameters = parameters; return this; } + + /** {@inheritDoc} */ + @Override + public ServicePrincipalCredentialPatch setDataSourceCredentialName(String dataSourceCredentialName) { + super.setDataSourceCredentialName(dataSourceCredentialName); + return this; + } + + /** {@inheritDoc} */ + @Override + public ServicePrincipalCredentialPatch setDataSourceCredentialDescription(String dataSourceCredentialDescription) { + super.setDataSourceCredentialDescription(dataSourceCredentialDescription); + return this; + } } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalInKVCredential.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalInKVCredential.java index bfb44e2d8dc72..b5581357e7889 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalInKVCredential.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalInKVCredential.java @@ -20,6 +20,9 @@ public final class ServicePrincipalInKVCredential extends DataSourceCredential { @JsonProperty(value = "parameters", required = true) private ServicePrincipalInKVParam parameters; + /** Creates an instance of ServicePrincipalInKVCredential class. */ + public ServicePrincipalInKVCredential() {} + /** * Get the parameters property: The parameters property. * @@ -39,4 +42,18 @@ public ServicePrincipalInKVCredential setParameters(ServicePrincipalInKVParam pa this.parameters = parameters; return this; } + + /** {@inheritDoc} */ + @Override + public ServicePrincipalInKVCredential setDataSourceCredentialName(String dataSourceCredentialName) { + super.setDataSourceCredentialName(dataSourceCredentialName); + return this; + } + + /** {@inheritDoc} */ + @Override + public ServicePrincipalInKVCredential setDataSourceCredentialDescription(String dataSourceCredentialDescription) { + super.setDataSourceCredentialDescription(dataSourceCredentialDescription); + return this; + } } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalInKVCredentialPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalInKVCredentialPatch.java index da2f57f91595a..a80c8ffb7a3f9 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalInKVCredentialPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalInKVCredentialPatch.java @@ -20,6 +20,9 @@ public final class ServicePrincipalInKVCredentialPatch extends DataSourceCredent @JsonProperty(value = "parameters") private ServicePrincipalInKVParamPatch parameters; + /** Creates an instance of ServicePrincipalInKVCredentialPatch class. */ + public ServicePrincipalInKVCredentialPatch() {} + /** * Get the parameters property: The parameters property. * @@ -39,4 +42,19 @@ public ServicePrincipalInKVCredentialPatch setParameters(ServicePrincipalInKVPar this.parameters = parameters; return this; } + + /** {@inheritDoc} */ + @Override + public ServicePrincipalInKVCredentialPatch setDataSourceCredentialName(String dataSourceCredentialName) { + super.setDataSourceCredentialName(dataSourceCredentialName); + return this; + } + + /** {@inheritDoc} */ + @Override + public ServicePrincipalInKVCredentialPatch setDataSourceCredentialDescription( + String dataSourceCredentialDescription) { + super.setDataSourceCredentialDescription(dataSourceCredentialDescription); + return this; + } } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalInKVParam.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalInKVParam.java index d436ff5ada1ae..a1b01fba563f2 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalInKVParam.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalInKVParam.java @@ -35,8 +35,7 @@ public final class ServicePrincipalInKVParam { private String servicePrincipalIdNameInKV; /* - * The secret name of the service principal's client secret in the Key - * Vault. + * The secret name of the service principal's client secret in the Key Vault. */ @JsonProperty(value = "servicePrincipalSecretNameInKV", required = true) private String servicePrincipalSecretNameInKV; @@ -47,6 +46,9 @@ public final class ServicePrincipalInKVParam { @JsonProperty(value = "tenantId", required = true) private String tenantId; + /** Creates an instance of ServicePrincipalInKVParam class. */ + public ServicePrincipalInKVParam() {} + /** * Get the keyVaultEndpoint property: The Key Vault endpoint that storing the service principal. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalInKVParamPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalInKVParamPatch.java index 0b3431f853cbd..5fe807e856056 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalInKVParamPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalInKVParamPatch.java @@ -35,8 +35,7 @@ public final class ServicePrincipalInKVParamPatch { private String servicePrincipalIdNameInKV; /* - * The secret name of the service principal's client secret in the Key - * Vault. + * The secret name of the service principal's client secret in the Key Vault. */ @JsonProperty(value = "servicePrincipalSecretNameInKV") private String servicePrincipalSecretNameInKV; @@ -47,6 +46,9 @@ public final class ServicePrincipalInKVParamPatch { @JsonProperty(value = "tenantId") private String tenantId; + /** Creates an instance of ServicePrincipalInKVParamPatch class. */ + public ServicePrincipalInKVParamPatch() {} + /** * Get the keyVaultEndpoint property: The Key Vault endpoint that storing the service principal. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalParam.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalParam.java index 1b983a4cfa75f..1826d34d6d684 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalParam.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalParam.java @@ -28,6 +28,9 @@ public final class ServicePrincipalParam { @JsonProperty(value = "tenantId", required = true) private String tenantId; + /** Creates an instance of ServicePrincipalParam class. */ + public ServicePrincipalParam() {} + /** * Get the clientId property: The client id of the service principal. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalParamPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalParamPatch.java index b3641d3e2fdaa..bddfdcde01b35 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalParamPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ServicePrincipalParamPatch.java @@ -28,6 +28,9 @@ public final class ServicePrincipalParamPatch { @JsonProperty(value = "tenantId") private String tenantId; + /** Creates an instance of ServicePrincipalParamPatch class. */ + public ServicePrincipalParamPatch() {} + /** * Get the clientId property: The client id of the service principal. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/Severity.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/Severity.java new file mode 100644 index 0000000000000..306808ec8fe10 --- /dev/null +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/Severity.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.ai.metricsadvisor.implementation.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** min alert severity. */ +public final class Severity extends ExpandableStringEnum { + /** Static value Low for Severity. */ + public static final Severity LOW = fromString("Low"); + + /** Static value Medium for Severity. */ + public static final Severity MEDIUM = fromString("Medium"); + + /** Static value High for Severity. */ + public static final Severity HIGH = fromString("High"); + + /** + * Creates a new instance of Severity value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Severity() {} + + /** + * Creates or finds a Severity from its string representation. + * + * @param name a name to look for. + * @return the corresponding Severity. + */ + @JsonCreator + public static Severity fromString(String name) { + return fromString(name, Severity.class); + } + + /** + * Gets known Severity values. + * + * @return known Severity values. + */ + public static Collection values() { + return values(Severity.class); + } +} diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SeverityCondition.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SeverityCondition.java index b805d9e8cd0f6..ffdfb21a0efab 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SeverityCondition.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SeverityCondition.java @@ -4,7 +4,6 @@ package com.azure.ai.metricsadvisor.implementation.models; -import com.azure.ai.metricsadvisor.administration.models.AnomalySeverity; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; @@ -15,20 +14,23 @@ public final class SeverityCondition { * min alert severity */ @JsonProperty(value = "minAlertSeverity", required = true) - private AnomalySeverity minAlertSeverity; + private Severity minAlertSeverity; /* * max alert severity */ @JsonProperty(value = "maxAlertSeverity", required = true) - private AnomalySeverity maxAlertSeverity; + private Severity maxAlertSeverity; + + /** Creates an instance of SeverityCondition class. */ + public SeverityCondition() {} /** * Get the minAlertSeverity property: min alert severity. * * @return the minAlertSeverity value. */ - public AnomalySeverity getMinAlertSeverity() { + public Severity getMinAlertSeverity() { return this.minAlertSeverity; } @@ -38,7 +40,7 @@ public AnomalySeverity getMinAlertSeverity() { * @param minAlertSeverity the minAlertSeverity value to set. * @return the SeverityCondition object itself. */ - public SeverityCondition setMinAlertSeverity(AnomalySeverity minAlertSeverity) { + public SeverityCondition setMinAlertSeverity(Severity minAlertSeverity) { this.minAlertSeverity = minAlertSeverity; return this; } @@ -48,7 +50,7 @@ public SeverityCondition setMinAlertSeverity(AnomalySeverity minAlertSeverity) { * * @return the maxAlertSeverity value. */ - public AnomalySeverity getMaxAlertSeverity() { + public Severity getMaxAlertSeverity() { return this.maxAlertSeverity; } @@ -58,7 +60,7 @@ public AnomalySeverity getMaxAlertSeverity() { * @param maxAlertSeverity the maxAlertSeverity value to set. * @return the SeverityCondition object itself. */ - public SeverityCondition setMaxAlertSeverity(AnomalySeverity maxAlertSeverity) { + public SeverityCondition setMaxAlertSeverity(Severity maxAlertSeverity) { this.maxAlertSeverity = maxAlertSeverity; return this; } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SeverityFilterCondition.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SeverityFilterCondition.java index 17df8d565107a..bc3567a75cf97 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SeverityFilterCondition.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SeverityFilterCondition.java @@ -4,7 +4,6 @@ package com.azure.ai.metricsadvisor.implementation.models; -import com.azure.ai.metricsadvisor.administration.models.AnomalySeverity; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; @@ -15,20 +14,23 @@ public final class SeverityFilterCondition { * min severity */ @JsonProperty(value = "min", required = true) - private AnomalySeverity min; + private Severity min; /* * max severity */ @JsonProperty(value = "max", required = true) - private AnomalySeverity max; + private Severity max; + + /** Creates an instance of SeverityFilterCondition class. */ + public SeverityFilterCondition() {} /** * Get the min property: min severity. * * @return the min value. */ - public AnomalySeverity getMin() { + public Severity getMin() { return this.min; } @@ -38,7 +40,7 @@ public AnomalySeverity getMin() { * @param min the min value to set. * @return the SeverityFilterCondition object itself. */ - public SeverityFilterCondition setMin(AnomalySeverity min) { + public SeverityFilterCondition setMin(Severity min) { this.min = min; return this; } @@ -48,7 +50,7 @@ public SeverityFilterCondition setMin(AnomalySeverity min) { * * @return the max value. */ - public AnomalySeverity getMax() { + public Severity getMax() { return this.max; } @@ -58,7 +60,7 @@ public AnomalySeverity getMax() { * @param max the max value to set. * @return the SeverityFilterCondition object itself. */ - public SeverityFilterCondition setMax(AnomalySeverity max) { + public SeverityFilterCondition setMax(Severity max) { this.max = max; return this; } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SmartDetectionCondition.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SmartDetectionCondition.java index aa247828abac1..f817fdc329c89 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SmartDetectionCondition.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SmartDetectionCondition.java @@ -4,7 +4,6 @@ package com.azure.ai.metricsadvisor.implementation.models; -import com.azure.ai.metricsadvisor.administration.models.AnomalyDetectorDirection; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; @@ -29,6 +28,9 @@ public final class SmartDetectionCondition { @JsonProperty(value = "suppressCondition", required = true) private SuppressCondition suppressCondition; + /** Creates an instance of SmartDetectionCondition class. */ + public SmartDetectionCondition() {} + /** * Get the sensitivity property: sensitivity, value range : (0, 100]. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SmartDetectionConditionPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SmartDetectionConditionPatch.java index 3e9c985cc870c..96941b02ed5bb 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SmartDetectionConditionPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SmartDetectionConditionPatch.java @@ -4,7 +4,6 @@ package com.azure.ai.metricsadvisor.implementation.models; -import com.azure.ai.metricsadvisor.administration.models.AnomalyDetectorDirection; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; @@ -29,6 +28,9 @@ public final class SmartDetectionConditionPatch { @JsonProperty(value = "suppressCondition") private SuppressConditionPatch suppressCondition; + /** Creates an instance of SmartDetectionConditionPatch class. */ + public SmartDetectionConditionPatch() {} + /** * Get the sensitivity property: sensitivity, value range : (0, 100]. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SnoozeScope.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SnoozeScope.java new file mode 100644 index 0000000000000..39d06ded41d0e --- /dev/null +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SnoozeScope.java @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.ai.metricsadvisor.implementation.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; + +import java.util.Collection; + +/** Defines values for SnoozeScope. */ +public final class SnoozeScope extends ExpandableStringEnum { + /** Static value Metric for SnoozeScope. */ + public static final SnoozeScope METRIC = fromString("Metric"); + + /** Static value Series for SnoozeScope. */ + public static final SnoozeScope SERIES = fromString("Series"); + + /** + * Creates or finds a SnoozeScope from its string representation. + * + * @param name a name to look for. + * @return the corresponding SnoozeScope. + */ + @JsonCreator + public static SnoozeScope fromString(String name) { + return fromString(name, SnoozeScope.class); + } + + /** @return known SnoozeScope values. */ + public static Collection values() { + return values(SnoozeScope.class); + } +} diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SqlSourceParameter.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SqlSourceParameter.java index 898d33549692d..7afa81b90c01c 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SqlSourceParameter.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SqlSourceParameter.java @@ -22,6 +22,9 @@ public final class SqlSourceParameter { @JsonProperty(value = "query", required = true) private String query; + /** Creates an instance of SqlSourceParameter class. */ + public SqlSourceParameter() {} + /** * Get the connectionString property: The connection string of this database. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SuppressCondition.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SuppressCondition.java index 15e59b11ba34b..2549b5989900b 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SuppressCondition.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SuppressCondition.java @@ -22,6 +22,9 @@ public final class SuppressCondition { @JsonProperty(value = "minRatio", required = true) private double minRatio; + /** Creates an instance of SuppressCondition class. */ + public SuppressCondition() {} + /** * Get the minNumber property: min point number, value range : [1, +∞). * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SuppressConditionPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SuppressConditionPatch.java index cbe36371f3223..a544b5cf9a2a2 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SuppressConditionPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SuppressConditionPatch.java @@ -22,6 +22,9 @@ public final class SuppressConditionPatch { @JsonProperty(value = "minRatio") private Double minRatio; + /** Creates an instance of SuppressConditionPatch class. */ + public SuppressConditionPatch() {} + /** * Get the minNumber property: min point number, value range : [1, +∞). * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/TimeMode.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/TimeMode.java new file mode 100644 index 0000000000000..3365e6ccc0654 --- /dev/null +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/TimeMode.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.ai.metricsadvisor.implementation.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** time mode. */ +public final class TimeMode extends ExpandableStringEnum { + /** Static value AnomalyTime for TimeMode. */ + public static final TimeMode ANOMALY_TIME = fromString("AnomalyTime"); + + /** Static value CreatedTime for TimeMode. */ + public static final TimeMode CREATED_TIME = fromString("CreatedTime"); + + /** Static value ModifiedTime for TimeMode. */ + public static final TimeMode MODIFIED_TIME = fromString("ModifiedTime"); + + /** + * Creates a new instance of TimeMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public TimeMode() {} + + /** + * Creates or finds a TimeMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding TimeMode. + */ + @JsonCreator + public static TimeMode fromString(String name) { + return fromString(name, TimeMode.class); + } + + /** + * Gets known TimeMode values. + * + * @return known TimeMode values. + */ + public static Collection values() { + return values(TimeMode.class); + } +} diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/TopNGroupScope.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/TopNGroupScope.java index b6731dc6008b8..d632bf76f5006 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/TopNGroupScope.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/TopNGroupScope.java @@ -30,6 +30,9 @@ public final class TopNGroupScope { @JsonProperty(value = "minTopCount", required = true) private int minTopCount; + /** Creates an instance of TopNGroupScope class. */ + public TopNGroupScope() {} + /** * Get the top property: top N, value range : [1, +∞). * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/UsageStats.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/UsageStats.java index 1f5171a1d7825..c180001b1e95e 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/UsageStats.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/UsageStats.java @@ -41,6 +41,9 @@ public final class UsageStats { @JsonProperty(value = "dataFeedCount", access = JsonProperty.Access.WRITE_ONLY) private Integer dataFeedCount; + /** Creates an instance of UsageStats class. */ + public UsageStats() {} + /** * Get the timestamp property: The timestamp of the stats. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ValueCondition.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ValueCondition.java index 6dbfe17728c67..61ed9428b131e 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ValueCondition.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ValueCondition.java @@ -46,14 +46,16 @@ public final class ValueCondition { private UUID metricId; /* - * trigger alert when the corresponding point is missing in the other - * metric + * trigger alert when the corresponding point is missing in the other metric * * should be specified only when using other metric to filter */ @JsonProperty(value = "triggerForMissing") private Boolean triggerForMissing; + /** Creates an instance of ValueCondition class. */ + public ValueCondition() {} + /** * Get the lower property: lower bound * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ValueType.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ValueType.java index 7913a3c84d109..cb134cfdb8bf5 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ValueType.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ValueType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ValueType. */ +/** data used to implement value filter. */ public final class ValueType extends ExpandableStringEnum { /** Static value Value for ValueType. */ public static final ValueType VALUE = fromString("Value"); @@ -16,6 +16,14 @@ public final class ValueType extends ExpandableStringEnum { /** Static value Mean for ValueType. */ public static final ValueType MEAN = fromString("Mean"); + /** + * Creates a new instance of ValueType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ValueType() {} + /** * Creates or finds a ValueType from its string representation. * @@ -27,7 +35,11 @@ public static ValueType fromString(String name) { return fromString(name, ValueType.class); } - /** @return known ValueType values. */ + /** + * Gets known ValueType values. + * + * @return known ValueType values. + */ public static Collection values() { return values(ValueType.class); } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ViewMode.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ViewMode.java index bff0750a643bd..0a7a23e9d8867 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ViewMode.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ViewMode.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ViewMode. */ +/** data feed access mode, default is Private. */ public final class ViewMode extends ExpandableStringEnum { /** Static value Private for ViewMode. */ public static final ViewMode PRIVATE = fromString("Private"); @@ -16,6 +16,14 @@ public final class ViewMode extends ExpandableStringEnum { /** Static value Public for ViewMode. */ public static final ViewMode PUBLIC = fromString("Public"); + /** + * Creates a new instance of ViewMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ViewMode() {} + /** * Creates or finds a ViewMode from its string representation. * @@ -27,7 +35,11 @@ public static ViewMode fromString(String name) { return fromString(name, ViewMode.class); } - /** @return known ViewMode values. */ + /** + * Gets known ViewMode values. + * + * @return known ViewMode values. + */ public static Collection values() { return values(ViewMode.class); } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/WebhookHookInfo.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/WebhookHookInfo.java index 02e668ef0d0cc..18f8d676a5d0a 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/WebhookHookInfo.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/WebhookHookInfo.java @@ -8,6 +8,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; /** The WebhookHookInfo model. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "hookType") @@ -20,6 +21,9 @@ public final class WebhookHookInfo extends HookInfo { @JsonProperty(value = "hookParameter", required = true) private WebhookHookParameter hookParameter; + /** Creates an instance of WebhookHookInfo class. */ + public WebhookHookInfo() {} + /** * Get the hookParameter property: The hookParameter property. * @@ -39,4 +43,32 @@ public WebhookHookInfo setHookParameter(WebhookHookParameter hookParameter) { this.hookParameter = hookParameter; return this; } + + /** {@inheritDoc} */ + @Override + public WebhookHookInfo setHookName(String hookName) { + super.setHookName(hookName); + return this; + } + + /** {@inheritDoc} */ + @Override + public WebhookHookInfo setDescription(String description) { + super.setDescription(description); + return this; + } + + /** {@inheritDoc} */ + @Override + public WebhookHookInfo setExternalLink(String externalLink) { + super.setExternalLink(externalLink); + return this; + } + + /** {@inheritDoc} */ + @Override + public WebhookHookInfo setAdmins(List admins) { + super.setAdmins(admins); + return this; + } } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/WebhookHookInfoPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/WebhookHookInfoPatch.java index 54ee31ff47dad..2c1d6d30cd4bb 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/WebhookHookInfoPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/WebhookHookInfoPatch.java @@ -8,6 +8,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; /** The WebhookHookInfoPatch model. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "hookType") @@ -20,6 +21,9 @@ public final class WebhookHookInfoPatch extends HookInfoPatch { @JsonProperty(value = "hookParameter") private WebhookHookParameterPatch hookParameter; + /** Creates an instance of WebhookHookInfoPatch class. */ + public WebhookHookInfoPatch() {} + /** * Get the hookParameter property: The hookParameter property. * @@ -39,4 +43,32 @@ public WebhookHookInfoPatch setHookParameter(WebhookHookParameterPatch hookParam this.hookParameter = hookParameter; return this; } + + /** {@inheritDoc} */ + @Override + public WebhookHookInfoPatch setHookName(String hookName) { + super.setHookName(hookName); + return this; + } + + /** {@inheritDoc} */ + @Override + public WebhookHookInfoPatch setDescription(String description) { + super.setDescription(description); + return this; + } + + /** {@inheritDoc} */ + @Override + public WebhookHookInfoPatch setExternalLink(String externalLink) { + super.setExternalLink(externalLink); + return this; + } + + /** {@inheritDoc} */ + @Override + public WebhookHookInfoPatch setAdmins(List admins) { + super.setAdmins(admins); + return this; + } } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/WebhookHookParameter.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/WebhookHookParameter.java index 6bb463bd2c034..01f833549d725 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/WebhookHookParameter.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/WebhookHookParameter.java @@ -12,8 +12,7 @@ @Fluent public final class WebhookHookParameter { /* - * API address, will be called when alert is triggered, only support POST - * method via SSL + * API address, will be called when alert is triggered, only support POST method via SSL */ @JsonProperty(value = "endpoint", required = true) private String endpoint; @@ -37,19 +36,20 @@ public final class WebhookHookParameter { private Map headers; /* - * The certificate key/URL, if using client certificate, please read - * documents for more informations. + * The certificate key/URL, if using client certificate, please read documents for more informations. */ @JsonProperty(value = "certificateKey") private String certificateKey; /* - * The certificate password, if using client certificate, please read - * documents for more informations. + * The certificate password, if using client certificate, please read documents for more informations. */ @JsonProperty(value = "certificatePassword") private String certificatePassword; + /** Creates an instance of WebhookHookParameter class. */ + public WebhookHookParameter() {} + /** * Get the endpoint property: API address, will be called when alert is triggered, only support POST method via SSL. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/WebhookHookParameterPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/WebhookHookParameterPatch.java index 66c540a9ce722..9c6289631575b 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/WebhookHookParameterPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/WebhookHookParameterPatch.java @@ -12,8 +12,7 @@ @Fluent public final class WebhookHookParameterPatch { /* - * API address, will be called when alert is triggered, only support POST - * method via SSL + * API address, will be called when alert is triggered, only support POST method via SSL */ @JsonProperty(value = "endpoint") private String endpoint; @@ -48,6 +47,9 @@ public final class WebhookHookParameterPatch { @JsonProperty(value = "certificatePassword") private String certificatePassword; + /** Creates an instance of WebhookHookParameterPatch class. */ + public WebhookHookParameterPatch() {} + /** * Get the endpoint property: API address, will be called when alert is triggered, only support POST method via SSL. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/WholeMetricConfiguration.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/WholeMetricConfiguration.java index 243677a182bd3..fb39084b09fa1 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/WholeMetricConfiguration.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/WholeMetricConfiguration.java @@ -36,6 +36,9 @@ public final class WholeMetricConfiguration { @JsonProperty(value = "changeThresholdCondition") private ChangeThresholdCondition changeThresholdCondition; + /** Creates an instance of WholeMetricConfiguration class. */ + public WholeMetricConfiguration() {} + /** * Get the conditionOperator property: condition operator * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/WholeMetricConfigurationPatch.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/WholeMetricConfigurationPatch.java index 1080dbe734e0f..0a14c493c3aa2 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/WholeMetricConfigurationPatch.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/WholeMetricConfigurationPatch.java @@ -36,6 +36,9 @@ public final class WholeMetricConfigurationPatch { @JsonProperty(value = "changeThresholdCondition") private ChangeThresholdConditionPatch changeThresholdCondition; + /** Creates an instance of WholeMetricConfigurationPatch class. */ + public WholeMetricConfigurationPatch() {} + /** * Get the conditionOperator property: condition operator * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/package-info.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/package-info.java index 6a00408efaa02..bf4117534f82c 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/package-info.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/package-info.java @@ -2,8 +2,5 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** - * Package containing the data models for AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2. Azure Cognitive Service - * Metrics Advisor REST API (OpenAPI v2). - */ +/** Package containing the data models for MetricsAdvisor. Microsoft Azure Metrics Advisor REST API (OpenAPI v2). */ package com.azure.ai.metricsadvisor.implementation.models; diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/package-info.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/package-info.java index 3508f38148bad..c007cab0c8e46 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/package-info.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/package-info.java @@ -2,8 +2,5 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** - * Package containing the implementations for AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2. Azure Cognitive - * Service Metrics Advisor REST API (OpenAPI v2). - */ +/** Package containing the implementations for MetricsAdvisor. Microsoft Azure Metrics Advisor REST API (OpenAPI v2). */ package com.azure.ai.metricsadvisor.implementation; diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/util/AlertConfigurationTransforms.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/util/AlertConfigurationTransforms.java index 2774e2b417446..e119cfd76de91 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/util/AlertConfigurationTransforms.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/util/AlertConfigurationTransforms.java @@ -3,8 +3,18 @@ package com.azure.ai.metricsadvisor.implementation.util; +import com.azure.ai.metricsadvisor.administration.models.AnomalyAlertConfiguration; +import com.azure.ai.metricsadvisor.administration.models.AnomalySeverity; +import com.azure.ai.metricsadvisor.administration.models.BoundaryDirection; import com.azure.ai.metricsadvisor.administration.models.BoundaryMeasureType; +import com.azure.ai.metricsadvisor.administration.models.MetricAlertConfiguration; +import com.azure.ai.metricsadvisor.administration.models.MetricAlertConfigurationsOperator; +import com.azure.ai.metricsadvisor.administration.models.MetricAnomalyAlertConditions; +import com.azure.ai.metricsadvisor.administration.models.MetricAnomalyAlertScope; +import com.azure.ai.metricsadvisor.administration.models.MetricAnomalyAlertScopeType; import com.azure.ai.metricsadvisor.administration.models.MetricAnomalyAlertSnoozeCondition; +import com.azure.ai.metricsadvisor.administration.models.MetricBoundaryCondition; +import com.azure.ai.metricsadvisor.administration.models.TopNGroupScope; import com.azure.ai.metricsadvisor.implementation.models.AnomalyAlertingConfiguration; import com.azure.ai.metricsadvisor.implementation.models.AnomalyAlertingConfigurationLogicType; import com.azure.ai.metricsadvisor.implementation.models.AnomalyAlertingConfigurationPatch; @@ -12,21 +22,14 @@ import com.azure.ai.metricsadvisor.implementation.models.DimensionGroupIdentity; import com.azure.ai.metricsadvisor.implementation.models.Direction; import com.azure.ai.metricsadvisor.implementation.models.MetricAlertingConfiguration; +import com.azure.ai.metricsadvisor.implementation.models.Severity; import com.azure.ai.metricsadvisor.implementation.models.SeverityCondition; +import com.azure.ai.metricsadvisor.implementation.models.SnoozeScope; import com.azure.ai.metricsadvisor.implementation.models.ValueCondition; -import com.azure.ai.metricsadvisor.administration.models.AnomalyAlertConfiguration; -import com.azure.ai.metricsadvisor.administration.models.BoundaryDirection; import com.azure.ai.metricsadvisor.implementation.models.ValueType; import com.azure.ai.metricsadvisor.models.DimensionKey; -import com.azure.ai.metricsadvisor.administration.models.MetricAnomalyAlertConditions; -import com.azure.ai.metricsadvisor.administration.models.MetricAlertConfiguration; -import com.azure.ai.metricsadvisor.administration.models.MetricAlertConfigurationsOperator; -import com.azure.ai.metricsadvisor.administration.models.MetricAnomalyAlertScope; -import com.azure.ai.metricsadvisor.administration.models.MetricAnomalyAlertScopeType; -import com.azure.ai.metricsadvisor.administration.models.MetricBoundaryCondition; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.PagedResponseBase; -import com.azure.ai.metricsadvisor.administration.models.TopNGroupScope; import com.azure.core.util.logging.ClientLogger; import java.util.ArrayList; @@ -35,6 +38,8 @@ import java.util.UUID; import java.util.stream.Collectors; +import static com.azure.ai.metricsadvisor.implementation.util.Utility.toStringOrNull; + /** * Helper class to convert service level alert configuration models to SDK models. */ @@ -57,9 +62,8 @@ public static AnomalyAlertingConfiguration toInnerForCreate( innerAlertConfiguration.setName(alertConfiguration.getName()); innerAlertConfiguration.setDescription(alertConfiguration.getDescription()); - innerAlertConfiguration.setCrossMetricsOperator(alertConfiguration.getCrossMetricsOperator() == null - ? null : AnomalyAlertingConfigurationLogicType.fromString( - alertConfiguration.getCrossMetricsOperator().toString())); + innerAlertConfiguration.setCrossMetricsOperator(AnomalyAlertingConfigurationLogicType.fromString( + toStringOrNull(alertConfiguration.getCrossMetricsOperator()))); List rawIds = AnomalyAlertConfigurationHelper.getHookIdsToAlertRaw(alertConfiguration); if (rawIds != null) { @@ -93,9 +97,8 @@ public static AnomalyAlertingConfigurationPatch toInnerForUpdate( innerAlertConfiguration.setName(alertConfiguration.getName()); innerAlertConfiguration.setDescription(alertConfiguration.getDescription()); - innerAlertConfiguration.setCrossMetricsOperator(alertConfiguration.getCrossMetricsOperator() == null - ? null : AnomalyAlertingConfigurationLogicType.fromString( - alertConfiguration.getCrossMetricsOperator().toString())); + innerAlertConfiguration.setCrossMetricsOperator(AnomalyAlertingConfigurationLogicType.fromString( + toStringOrNull(alertConfiguration.getCrossMetricsOperator()))); List rawIds = AnomalyAlertConfigurationHelper.getHookIdsToAlertRaw(alertConfiguration); if (rawIds != null) { @@ -158,11 +161,14 @@ private static List getMetricAlertConfigList( // 2. Set alert conditions (boundary and boundary conditions). final MetricAnomalyAlertConditions alertConditions = metricAnomalyAlertConfiguration.getAlertConditions(); + if (alertConditions != null) { - if (alertConditions.getSeverityCondition() != null) { + com.azure.ai.metricsadvisor.administration.models.SeverityCondition severityCondition + = alertConditions.getSeverityCondition(); + if (severityCondition != null) { innerMetricAlertConfiguration.setSeverityFilter(new SeverityCondition() - .setMaxAlertSeverity(alertConditions.getSeverityCondition().getMinAlertSeverity()) - .setMaxAlertSeverity(alertConditions.getSeverityCondition().getMaxAlertSeverity())); + .setMaxAlertSeverity(Severity.fromString(toStringOrNull(severityCondition.getMinAlertSeverity()))) + .setMaxAlertSeverity(Severity.fromString(toStringOrNull(severityCondition.getMaxAlertSeverity())))); } final MetricBoundaryCondition boundaryConditions = alertConditions.getMetricBoundaryCondition(); ValueCondition innerValueCondition = new ValueCondition(); @@ -185,23 +191,23 @@ private static List getMetricAlertConfigList( .setMetricId(UUID.fromString(boundaryConditions.getCompanionMetricId())); innerValueCondition.setTriggerForMissing(boundaryConditions.shouldAlertIfDataPointMissing()); } - if (boundaryConditions.getMeasureType() != null) { - innerValueCondition.setType( - ValueType.fromString(boundaryConditions.getMeasureType().toString())); - } + innerValueCondition.setType( + ValueType.fromString(toStringOrNull(boundaryConditions.getMeasureType()))); innerMetricAlertConfiguration.setValueFilter(innerValueCondition); } } // 3. Set alert snooze conditions - if (metricAnomalyAlertConfiguration.getAlertSnoozeCondition() != null) { + MetricAnomalyAlertSnoozeCondition alertSnoozeCondition = + metricAnomalyAlertConfiguration.getAlertSnoozeCondition(); + if (alertSnoozeCondition != null) { com.azure.ai.metricsadvisor.implementation.models.MetricAnomalyAlertSnoozeCondition innerSnoozeCondition = new com.azure.ai.metricsadvisor.implementation.models.MetricAnomalyAlertSnoozeCondition(); innerSnoozeCondition - .setAutoSnooze(metricAnomalyAlertConfiguration.getAlertSnoozeCondition().getAutoSnooze()) - .setSnoozeScope(metricAnomalyAlertConfiguration.getAlertSnoozeCondition().getSnoozeScope()) - .setOnlyForSuccessive(metricAnomalyAlertConfiguration.getAlertSnoozeCondition().isOnlyForSuccessive()); + .setAutoSnooze(alertSnoozeCondition.getAutoSnooze()) + .setSnoozeScope(SnoozeScope.fromString(toStringOrNull(alertSnoozeCondition.getSnoozeScope()))) + .setOnlyForSuccessive(alertSnoozeCondition.isOnlyForSuccessive()); innerMetricAlertConfiguration.setSnoozeFilter(innerSnoozeCondition); } @@ -289,15 +295,16 @@ public static AnomalyAlertConfiguration fromInner( innerMetricAlertConfiguration.getAnomalyDetectionConfigurationId().toString(), alertScope, innerMetricAlertConfiguration.isNegationOperation()); // Set alert condition - if (innerMetricAlertConfiguration.getSeverityFilter() != null + SeverityCondition severityFilter = innerMetricAlertConfiguration.getSeverityFilter(); + if (severityFilter != null || innerMetricAlertConfiguration.getValueFilter() != null) { MetricAnomalyAlertConditions alertConditions = new MetricAnomalyAlertConditions(); // Set severity based condition. - if (innerMetricAlertConfiguration.getSeverityFilter() != null) { + if (severityFilter != null) { alertConditions.setSeverityRangeCondition( new com.azure.ai.metricsadvisor.administration.models.SeverityCondition( - innerMetricAlertConfiguration.getSeverityFilter().getMinAlertSeverity(), - innerMetricAlertConfiguration.getSeverityFilter().getMaxAlertSeverity())); + AnomalySeverity.fromString(toStringOrNull(severityFilter.getMinAlertSeverity())), + AnomalySeverity.fromString(toStringOrNull(severityFilter.getMaxAlertSeverity())))); } // Set boundary based condition. ValueCondition innerValueCondition = innerMetricAlertConfiguration.getValueFilter(); @@ -325,7 +332,7 @@ public static AnomalyAlertConfiguration fromInner( } if (innerValueCondition.getType() != null) { boundaryCondition.setMeasureType( - BoundaryMeasureType.fromString(innerValueCondition.getType().toString())); + BoundaryMeasureType.fromString(toStringOrNull(innerValueCondition.getType()))); } alertConditions.setMetricBoundaryCondition(boundaryCondition); } @@ -338,7 +345,7 @@ public static AnomalyAlertConfiguration fromInner( if (innerSnoozeCondition != null) { metricAlertConfiguration.setAlertSnoozeCondition(new MetricAnomalyAlertSnoozeCondition( innerSnoozeCondition.getAutoSnooze(), - innerSnoozeCondition.getSnoozeScope(), + com.azure.ai.metricsadvisor.administration.models.SnoozeScope.fromString(toStringOrNull(innerSnoozeCondition.getSnoozeScope())), innerSnoozeCondition.isOnlyForSuccessive())); } metricAlertConfigurations.add(metricAlertConfiguration); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/util/AnomalyTransforms.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/util/AnomalyTransforms.java index 6ab04cfe9350b..d76084b2b5f03 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/util/AnomalyTransforms.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/util/AnomalyTransforms.java @@ -3,11 +3,12 @@ package com.azure.ai.metricsadvisor.implementation.util; +import com.azure.ai.metricsadvisor.administration.models.AnomalySeverity; import com.azure.ai.metricsadvisor.implementation.models.AnomalyResult; import com.azure.ai.metricsadvisor.implementation.models.DetectionAnomalyFilterCondition; import com.azure.ai.metricsadvisor.implementation.models.DimensionGroupIdentity; +import com.azure.ai.metricsadvisor.implementation.models.Severity; import com.azure.ai.metricsadvisor.implementation.models.SeverityFilterCondition; -import com.azure.ai.metricsadvisor.administration.models.AnomalySeverity; import com.azure.ai.metricsadvisor.models.DataPointAnomaly; import com.azure.ai.metricsadvisor.models.DimensionKey; import com.azure.ai.metricsadvisor.models.ListAnomaliesDetectedFilter; @@ -21,6 +22,8 @@ import java.util.List; import java.util.stream.Collectors; +import static com.azure.ai.metricsadvisor.implementation.util.Utility.toStringOrNull; + public class AnomalyTransforms { public static DetectionAnomalyFilterCondition toInnerFilter(ListAnomaliesDetectedFilter filter, ClientLogger logger) { @@ -33,8 +36,8 @@ public static DetectionAnomalyFilterCondition toInnerFilter(ListAnomaliesDetecte } if (minSeverity != null) { innerFilter.setSeverityFilter(new SeverityFilterCondition() - .setMin(minSeverity). - setMax(maxSeverity)); + .setMin(Severity.fromString(minSeverity.toString())). + setMax(Severity.fromString(maxSeverity.toString()))); } List seriesKeys = filter.getSeriesGroupKeys(); if (seriesKeys != null && !seriesKeys.isEmpty()) { @@ -90,7 +93,7 @@ private static DataPointAnomaly fromInner(AnomalyResult innerAnomaly) { AnomalyHelper.setSeriesKey(dataPointAnomaly, new DimensionKey(innerAnomaly.getDimension())); } if (innerAnomaly.getProperty() != null) { - AnomalyHelper.setSeverity(dataPointAnomaly, innerAnomaly.getProperty().getAnomalySeverity()); + AnomalyHelper.setSeverity(dataPointAnomaly, AnomalySeverity.fromString(toStringOrNull(innerAnomaly.getProperty().getAnomalySeverity()))); AnomalyHelper.setStatus(dataPointAnomaly, innerAnomaly.getProperty().getAnomalyStatus()); AnomalyHelper.setValue(dataPointAnomaly, innerAnomaly.getProperty().getValue()); AnomalyHelper.setExpectedValue(dataPointAnomaly, innerAnomaly.getProperty().getExpectedValue()); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/util/DataFeedIngestionProgressHelper.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/util/DataFeedIngestionProgressHelper.java new file mode 100644 index 0000000000000..88ffab37da518 --- /dev/null +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/util/DataFeedIngestionProgressHelper.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.metricsadvisor.implementation.util; + +import com.azure.ai.metricsadvisor.administration.models.DataFeedIngestionProgress; + +import java.time.OffsetDateTime; + +/** + * The helper class to set the non-public properties of an {@link DataFeedIngestionProgress} instance. + */ +public final class DataFeedIngestionProgressHelper { + private static DataFeedIngestionProgressAccessor accessor; + + private DataFeedIngestionProgressHelper() { } + + /** + * Type defining the methods to set the non-public properties of an {@link DataFeedIngestionProgress} instance. + */ + public interface DataFeedIngestionProgressAccessor { + void setLatestActiveTimestamp(DataFeedIngestionProgress ingestionProgress, OffsetDateTime dataTime); + void setLatestSuccessTimestamp(DataFeedIngestionProgress ingestionProgress, OffsetDateTime dataTime); + } + + /** + * The method called from {@link DataFeedIngestionProgress} to set it's accessor. + * + * @param dataFeedIngestionStatusAccessor The accessor. + */ + public static void setAccessor(final DataFeedIngestionProgressAccessor dataFeedIngestionStatusAccessor) { + accessor = dataFeedIngestionStatusAccessor; + } + + public static void setLatestActiveTimestamp(DataFeedIngestionProgress ingestionProgress, OffsetDateTime dataTime) { + accessor.setLatestActiveTimestamp(ingestionProgress, dataTime); + } + + public static void setLatestSuccessTimestamp(DataFeedIngestionProgress ingestionProgress, OffsetDateTime dataTime) { + accessor.setLatestSuccessTimestamp(ingestionProgress, dataTime); + } +} + diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/util/DataFeedIngestionStatusHelper.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/util/DataFeedIngestionStatusHelper.java new file mode 100644 index 0000000000000..22a64dace7f21 --- /dev/null +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/util/DataFeedIngestionStatusHelper.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +package com.azure.ai.metricsadvisor.implementation.util; + +import com.azure.ai.metricsadvisor.administration.models.DataFeedIngestionStatus; +import com.azure.ai.metricsadvisor.administration.models.IngestionStatusType; + +import java.time.OffsetDateTime; + +/** + * The helper class to set the non-public properties of an {@link DataFeedIngestionStatus} instance. + */ +public final class DataFeedIngestionStatusHelper { + private static DataFeedIngestionStatusAccessor accessor; + + private DataFeedIngestionStatusHelper() { } + + /** + * Type defining the methods to set the non-public properties of an {@link DataFeedIngestionStatus} instance. + */ + public interface DataFeedIngestionStatusAccessor { + void setTimestamp(DataFeedIngestionStatus ingestionStatus, OffsetDateTime dataTime); + void setMessage(DataFeedIngestionStatus ingestionStatus, String message); + void setIngestionStatusType(DataFeedIngestionStatus ingestionStatus, IngestionStatusType ingestionStatusType); + } + + /** + * The method called from {@link DataFeedIngestionStatus} to set it's accessor. + * + * @param dataFeedIngestionStatusAccessor The accessor. + */ + public static void setAccessor(final DataFeedIngestionStatusAccessor dataFeedIngestionStatusAccessor) { + accessor = dataFeedIngestionStatusAccessor; + } + + public static void setTimestamp(DataFeedIngestionStatus ingestionStatus, OffsetDateTime dataTime) { + accessor.setTimestamp(ingestionStatus, dataTime); + } + + public static void setMessage(DataFeedIngestionStatus ingestionStatus, String message) { + accessor.setMessage(ingestionStatus, message); + } + + public static void setIngestionStatusType(DataFeedIngestionStatus ingestionStatus, IngestionStatusType ingestionStatusType) { + accessor.setIngestionStatusType(ingestionStatus, ingestionStatusType); + } +} + diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/util/DataFeedTransforms.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/util/DataFeedTransforms.java index 589c3494214cc..622448852f839 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/util/DataFeedTransforms.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/util/DataFeedTransforms.java @@ -143,8 +143,8 @@ public static DataFeed fromInner(final DataFeedDetail dataFeedDetail) { DataFeedHelper.setStatus(dataFeed, DataFeedStatus.fromString(dataFeedDetail.getStatus().toString())); DataFeedHelper.setMetricIds(dataFeed, dataFeedDetail.getMetrics().stream() - .collect(Collectors.toMap(com.azure.ai.metricsadvisor.implementation.models.DataFeedMetric::getId, - com.azure.ai.metricsadvisor.implementation.models.DataFeedMetric::getName))); + .collect(Collectors.toMap(com.azure.ai.metricsadvisor.implementation.models.DataFeedMetric::getMetricId, + com.azure.ai.metricsadvisor.implementation.models.DataFeedMetric::getMetricName))); return dataFeed; } @@ -656,7 +656,7 @@ public static DataFeedDetailPatch toInnerForUpdate(final DataFeedSource dataFeed innerDimensions = new ArrayList<>(); for (DataFeedDimension dimension : dimensions) { innerDimensions.add(new com.azure.ai.metricsadvisor.implementation.models.DataFeedDimension() - .setName(dimension.getName()).setDisplayName(dimension.getDisplayName())); + .setDimensionName(dimension.getName()).setDimensionDisplayName(dimension.getDisplayName())); } } return innerDimensions; @@ -669,9 +669,9 @@ public static DataFeedDetailPatch toInnerForUpdate(final DataFeedSource dataFeed innerMetrics = new ArrayList<>(); for (DataFeedMetric metric : metrics) { innerMetrics.add(new com.azure.ai.metricsadvisor.implementation.models.DataFeedMetric() - .setName(metric.getName()) - .setDisplayName(metric.getDisplayName()) - .setDescription(metric.getDescription())); + .setMetricName(metric.getName()) + .setMetricDisplayName(metric.getDisplayName()) + .setMetricDescription(metric.getDescription())); } } return innerMetrics; @@ -684,7 +684,7 @@ public static DataFeedDetailPatch toInnerForUpdate(final DataFeedSource dataFeed } else { List dimensions = new ArrayList<>(); for (com.azure.ai.metricsadvisor.implementation.models.DataFeedDimension inner : innerList) { - dimensions.add(new DataFeedDimension(inner.getName()).setDisplayName(inner.getDisplayName())); + dimensions.add(new DataFeedDimension(inner.getDimensionName()).setDisplayName(inner.getDimensionDisplayName())); } return dimensions; } @@ -697,10 +697,10 @@ private static List fromInnerMetricList( } else { List metrics = new ArrayList<>(); for (com.azure.ai.metricsadvisor.implementation.models.DataFeedMetric inner : innerList) { - DataFeedMetric metric = new DataFeedMetric(inner.getName()) - .setDisplayName(inner.getDisplayName()) - .setDescription(inner.getDescription()); - DataFeedMetricAccessor.setId(metric, inner.getId()); + DataFeedMetric metric = new DataFeedMetric(inner.getMetricName()) + .setDisplayName(inner.getMetricDisplayName()) + .setDescription(inner.getMetricDescription()); + DataFeedMetricAccessor.setId(metric, inner.getMetricId()); metrics.add(metric); } return metrics; diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/util/DetectionConfigurationTransforms.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/util/DetectionConfigurationTransforms.java index dc9af952a4f3e..0a1cd1b58e77d 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/util/DetectionConfigurationTransforms.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/util/DetectionConfigurationTransforms.java @@ -3,7 +3,13 @@ package com.azure.ai.metricsadvisor.implementation.util; +import com.azure.ai.metricsadvisor.administration.models.AnomalyDetectionConfiguration; +import com.azure.ai.metricsadvisor.administration.models.ChangeThresholdCondition; +import com.azure.ai.metricsadvisor.administration.models.DetectionConditionOperator; import com.azure.ai.metricsadvisor.administration.models.HardThresholdCondition; +import com.azure.ai.metricsadvisor.administration.models.MetricSeriesGroupDetectionCondition; +import com.azure.ai.metricsadvisor.administration.models.MetricSingleSeriesDetectionCondition; +import com.azure.ai.metricsadvisor.administration.models.MetricWholeSeriesDetectionCondition; import com.azure.ai.metricsadvisor.administration.models.SmartDetectionCondition; import com.azure.ai.metricsadvisor.administration.models.SuppressCondition; import com.azure.ai.metricsadvisor.implementation.models.AnomalyDetectionConfigurationLogicType; @@ -17,13 +23,8 @@ import com.azure.ai.metricsadvisor.implementation.models.SmartDetectionConditionPatch; import com.azure.ai.metricsadvisor.implementation.models.WholeMetricConfiguration; import com.azure.ai.metricsadvisor.implementation.models.WholeMetricConfigurationPatch; -import com.azure.ai.metricsadvisor.administration.models.ChangeThresholdCondition; -import com.azure.ai.metricsadvisor.administration.models.DetectionConditionOperator; +import com.azure.ai.metricsadvisor.implementation.models.AnomalyDetectorDirection; import com.azure.ai.metricsadvisor.models.DimensionKey; -import com.azure.ai.metricsadvisor.administration.models.MetricWholeSeriesDetectionCondition; -import com.azure.ai.metricsadvisor.administration.models.AnomalyDetectionConfiguration; -import com.azure.ai.metricsadvisor.administration.models.MetricSeriesGroupDetectionCondition; -import com.azure.ai.metricsadvisor.administration.models.MetricSingleSeriesDetectionCondition; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.util.CoreUtils; @@ -36,6 +37,8 @@ import java.util.stream.Collectors; import java.util.stream.Stream; +import static com.azure.ai.metricsadvisor.implementation.util.Utility.toStringOrNull; + /** * Expose transformation methods to transform {@link AnomalyDetectionConfiguration} * model to REST API wire model and vice-versa. @@ -53,7 +56,7 @@ public static PagedResponse fromInnerPagedRespons if (innerConfigurationList != null) { configurationList = innerConfigurationList .stream() - .map(innerConfiguration -> DetectionConfigurationTransforms.fromInner(innerConfiguration)) + .map(DetectionConfigurationTransforms::fromInner) .collect(Collectors.toList()); } else { configurationList = new ArrayList<>(); @@ -417,7 +420,7 @@ private static ChangeThresholdCondition fromInner( inner.getChangePercentage(), inner.getShiftPoint(), inner.isWithinRange(), - inner.getAnomalyDetectorDirection(), + com.azure.ai.metricsadvisor.administration.models.AnomalyDetectorDirection.fromString(toStringOrNull(inner.getAnomalyDetectorDirection())), fromInner(inner.getSuppressCondition())); } @@ -427,7 +430,7 @@ private static com.azure.ai.metricsadvisor.implementation.models.ChangeThreshold return null; } return new com.azure.ai.metricsadvisor.implementation.models.ChangeThresholdCondition() - .setAnomalyDetectorDirection(condition.getAnomalyDetectorDirection()) + .setAnomalyDetectorDirection(AnomalyDetectorDirection.fromString(toStringOrNull(condition.getAnomalyDetectorDirection()))) .setChangePercentage(condition.getChangePercentage()) .setShiftPoint(condition.getShiftPoint()) .setWithinRange(condition.isWithinRange()) @@ -439,7 +442,7 @@ private static ChangeThresholdConditionPatch toInnerForUpdate(ChangeThresholdCon return null; } ChangeThresholdConditionPatch inner = new ChangeThresholdConditionPatch(); - inner.setAnomalyDetectorDirection(condition.getAnomalyDetectorDirection()) + inner.setAnomalyDetectorDirection(AnomalyDetectorDirection.fromString(toStringOrNull(condition.getAnomalyDetectorDirection()))) .setChangePercentage(condition.getChangePercentage()) .setShiftPoint(condition.getShiftPoint()) .setWithinRange(condition.isWithinRange()); @@ -455,7 +458,7 @@ private static HardThresholdCondition fromInner( if (inner == null) { return null; } - return new HardThresholdCondition(inner.getAnomalyDetectorDirection(), fromInner(inner.getSuppressCondition())) + return new HardThresholdCondition(com.azure.ai.metricsadvisor.administration.models.AnomalyDetectorDirection.fromString(toStringOrNull(inner.getAnomalyDetectorDirection())), fromInner(inner.getSuppressCondition())) .setLowerBound(inner.getLowerBound()) .setUpperBound(inner.getUpperBound()); } @@ -466,7 +469,7 @@ private static com.azure.ai.metricsadvisor.implementation.models.HardThresholdCo return null; } return new com.azure.ai.metricsadvisor.implementation.models.HardThresholdCondition() - .setAnomalyDetectorDirection(condition.getAnomalyDetectorDirection()) + .setAnomalyDetectorDirection(AnomalyDetectorDirection.fromString(toStringOrNull(condition.getAnomalyDetectorDirection()))) .setSuppressCondition(toInnerForCreate(condition.getSuppressCondition())) .setLowerBound(condition.getLowerBound()) .setUpperBound(condition.getUpperBound()); @@ -477,7 +480,7 @@ private static HardThresholdConditionPatch toInnerForUpdate(HardThresholdConditi return null; } HardThresholdConditionPatch inner = new HardThresholdConditionPatch(); - inner.setAnomalyDetectorDirection(condition.getAnomalyDetectorDirection()) + inner.setAnomalyDetectorDirection(AnomalyDetectorDirection.fromString(toStringOrNull(condition.getAnomalyDetectorDirection()))) .setLowerBound(condition.getLowerBound()) .setUpperBound(condition.getUpperBound()); @@ -493,7 +496,7 @@ private static SmartDetectionCondition fromInner( return null; } return new SmartDetectionCondition(inner.getSensitivity(), - inner.getAnomalyDetectorDirection(), + com.azure.ai.metricsadvisor.administration.models.AnomalyDetectorDirection.fromString(toStringOrNull(inner.getAnomalyDetectorDirection())), fromInner(inner.getSuppressCondition())); } @@ -504,7 +507,7 @@ private static com.azure.ai.metricsadvisor.implementation.models.SmartDetectionC } return new com.azure.ai.metricsadvisor.implementation.models.SmartDetectionCondition() .setSensitivity(condition.getSensitivity()) - .setAnomalyDetectorDirection(condition.getAnomalyDetectorDirection()) + .setAnomalyDetectorDirection(AnomalyDetectorDirection.fromString(toStringOrNull(condition.getAnomalyDetectorDirection()))) .setSuppressCondition(toInnerForCreate(condition.getSuppressCondition())); } @@ -515,7 +518,7 @@ private static SmartDetectionConditionPatch toInnerForUpdate(SmartDetectionCondi SmartDetectionConditionPatch inner = new SmartDetectionConditionPatch(); inner .setSensitivity(condition.getSensitivity()) - .setAnomalyDetectorDirection(condition.getAnomalyDetectorDirection()); + .setAnomalyDetectorDirection(AnomalyDetectorDirection.fromString(toStringOrNull(condition.getAnomalyDetectorDirection()))); if (condition.getSuppressCondition() != null) { inner.setSuppressCondition(toInnerForUpdate(condition.getSuppressCondition())); diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/util/IncidentTransforms.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/util/IncidentTransforms.java index 553f2ff1bd5e5..1bd7d8199751f 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/util/IncidentTransforms.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/util/IncidentTransforms.java @@ -3,8 +3,10 @@ package com.azure.ai.metricsadvisor.implementation.util; +import com.azure.ai.metricsadvisor.administration.models.AnomalySeverity; import com.azure.ai.metricsadvisor.implementation.models.IncidentResult; import com.azure.ai.metricsadvisor.models.AnomalyIncident; +import com.azure.ai.metricsadvisor.models.AnomalyIncidentStatus; import com.azure.ai.metricsadvisor.models.DimensionKey; import com.azure.core.http.rest.Page; import com.azure.core.http.rest.PagedResponse; @@ -15,6 +17,8 @@ import java.util.List; import java.util.stream.Collectors; +import static com.azure.ai.metricsadvisor.implementation.util.Utility.toStringOrNull; + public class IncidentTransforms { public static PagedResponse fromInnerPagedResponse(PagedResponse innerResponse) { List anomalyIncidentList; @@ -57,8 +61,8 @@ private static AnomalyIncident fromInner(IncidentResult innerIncident) { new DimensionKey(innerIncident.getRootNode().getDimension())); } if (innerIncident.getProperty() != null) { - IncidentHelper.setSeverity(incident, innerIncident.getProperty().getMaxSeverity()); - IncidentHelper.setStatus(incident, innerIncident.getProperty().getIncidentStatus()); + IncidentHelper.setSeverity(incident, AnomalySeverity.fromString(toStringOrNull(innerIncident.getProperty().getMaxSeverity()))); + IncidentHelper.setStatus(incident, AnomalyIncidentStatus.fromString(toStringOrNull(innerIncident.getProperty().getIncidentStatus()))); IncidentHelper.setValue(incident, innerIncident.getProperty().getValueOfRootNode()); IncidentHelper.setExpectedValue(incident, innerIncident.getProperty().getExpectedValueOfRootNode()); } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/util/MetricFeedbackTransforms.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/util/MetricFeedbackTransforms.java index ab01a5c3dc337..574e83b0b9769 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/util/MetricFeedbackTransforms.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/util/MetricFeedbackTransforms.java @@ -7,12 +7,12 @@ import com.azure.ai.metricsadvisor.implementation.models.ChangePointFeedback; import com.azure.ai.metricsadvisor.implementation.models.CommentFeedback; import com.azure.ai.metricsadvisor.implementation.models.FeedbackDimensionFilter; -import com.azure.ai.metricsadvisor.implementation.models.FeedbackQueryTimeMode; import com.azure.ai.metricsadvisor.implementation.models.MetricFeedbackFilter; import com.azure.ai.metricsadvisor.implementation.models.PeriodFeedback; import com.azure.ai.metricsadvisor.models.AnomalyValue; import com.azure.ai.metricsadvisor.models.ChangePointValue; import com.azure.ai.metricsadvisor.models.DimensionKey; +import com.azure.ai.metricsadvisor.models.FeedbackQueryTimeMode; import com.azure.ai.metricsadvisor.models.FeedbackType; import com.azure.ai.metricsadvisor.models.ListMetricFeedbackFilter; import com.azure.ai.metricsadvisor.models.ListMetricFeedbackOptions; diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/util/Utility.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/util/Utility.java index 46e7d14101aff..5bc1c3e19ecbb 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/util/Utility.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/util/Utility.java @@ -30,4 +30,13 @@ public static String parseOperationId(String operationLocation) { throw LOGGER.logExceptionAsError( new RuntimeException("Failed to parse operation header for result Id from: " + operationLocation)); } + + /** + * Returns toString or null if object passed is null. + * @param obj the object + * @return Returns toString or null if object passed is null. + */ + public static String toStringOrNull(Object obj) { + return obj != null ? obj.toString() : null; + } } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/AnomalyAlert.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/AnomalyAlert.java index dfe10528ae20d..03f6a74399532 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/AnomalyAlert.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/AnomalyAlert.java @@ -35,6 +35,9 @@ public final class AnomalyAlert { @JsonProperty(value = "modifiedTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime modifiedTime; + /** Creates an instance of AnomalyAlert class. */ + public AnomalyAlert() {} + /** * Get the alertId property: alert id. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/AnomalyStatus.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/AnomalyStatus.java index bf7f7c5bf2818..55666975731c0 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/AnomalyStatus.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/AnomalyStatus.java @@ -8,7 +8,11 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for AnomalyStatus. */ +/** + * anomaly status + * + *

only return for alerting anomaly result. + */ public final class AnomalyStatus extends ExpandableStringEnum { /** Static value Active for AnomalyStatus. */ public static final AnomalyStatus ACTIVE = fromString("Active"); @@ -16,6 +20,14 @@ public final class AnomalyStatus extends ExpandableStringEnum { /** Static value Resolved for AnomalyStatus. */ public static final AnomalyStatus RESOLVED = fromString("Resolved"); + /** + * Creates a new instance of AnomalyStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AnomalyStatus() {} + /** * Creates or finds a AnomalyStatus from its string representation. * @@ -27,7 +39,11 @@ public static AnomalyStatus fromString(String name) { return fromString(name, AnomalyStatus.class); } - /** @return known AnomalyStatus values. */ + /** + * Gets known AnomalyStatus values. + * + * @return known AnomalyStatus values. + */ public static Collection values() { return values(AnomalyStatus.class); } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/AnomalyValue.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/AnomalyValue.java index 9df148ba3053e..e4a674bb2548b 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/AnomalyValue.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/AnomalyValue.java @@ -19,6 +19,14 @@ public final class AnomalyValue extends ExpandableStringEnum { /** Static value NotAnomaly for AnomalyValue. */ public static final AnomalyValue NOT_ANOMALY = fromString("NotAnomaly"); + /** + * Creates a new instance of AnomalyValue value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public AnomalyValue() {} + /** * Creates or finds a AnomalyValue from its string representation. * @@ -30,7 +38,11 @@ public static AnomalyValue fromString(String name) { return fromString(name, AnomalyValue.class); } - /** @return known AnomalyValue values. */ + /** + * Gets known AnomalyValue values. + * + * @return known AnomalyValue values. + */ public static Collection values() { return values(AnomalyValue.class); } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/ChangePointValue.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/ChangePointValue.java index d3b4c7846f1d8..0a90cd6a049ef 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/ChangePointValue.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/ChangePointValue.java @@ -19,6 +19,14 @@ public final class ChangePointValue extends ExpandableStringEnum values() { return values(ChangePointValue.class); } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/EnrichmentStatus.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/EnrichmentStatus.java index cb81649a9fd83..b5d01d18ce3cd 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/EnrichmentStatus.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/EnrichmentStatus.java @@ -29,6 +29,9 @@ public final class EnrichmentStatus { @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) private String message; + /** Creates an instance of EnrichmentStatus class. */ + public EnrichmentStatus() {} + /** * Get the timestamp property: data slice timestamp. * diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/FeedbackQueryTimeMode.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/FeedbackQueryTimeMode.java index 065b7e623c307..8b14f18be08ad 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/FeedbackQueryTimeMode.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/FeedbackQueryTimeMode.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for FeedbackQueryTimeMode. */ +/** time mode to filter feedback. */ public final class FeedbackQueryTimeMode extends ExpandableStringEnum { /** Static value MetricTimestamp for FeedbackQueryTimeMode. */ public static final FeedbackQueryTimeMode METRIC_TIMESTAMP = fromString("MetricTimestamp"); @@ -16,6 +16,14 @@ public final class FeedbackQueryTimeMode extends ExpandableStringEnum values() { return values(FeedbackQueryTimeMode.class); } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/FeedbackType.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/FeedbackType.java index c2319e3f7bdd0..5e15bd93010f8 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/FeedbackType.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/FeedbackType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for FeedbackType. */ +/** feedback type. */ public final class FeedbackType extends ExpandableStringEnum { /** Static value Anomaly for FeedbackType. */ public static final FeedbackType ANOMALY = fromString("Anomaly"); @@ -22,6 +22,14 @@ public final class FeedbackType extends ExpandableStringEnum { /** Static value Comment for FeedbackType. */ public static final FeedbackType COMMENT = fromString("Comment"); + /** + * Creates a new instance of FeedbackType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public FeedbackType() {} + /** * Creates or finds a FeedbackType from its string representation. * @@ -33,7 +41,11 @@ public static FeedbackType fromString(String name) { return fromString(name, FeedbackType.class); } - /** @return known FeedbackType values. */ + /** + * Gets known FeedbackType values. + * + * @return known FeedbackType values. + */ public static Collection values() { return values(FeedbackType.class); } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/PeriodType.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/PeriodType.java index 9112c97b38ed8..b7a70582c4b9c 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/PeriodType.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/PeriodType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for PeriodType. */ +/** the type of setting period. */ public final class PeriodType extends ExpandableStringEnum { /** Static value AutoDetect for PeriodType. */ public static final PeriodType AUTO_DETECT = fromString("AutoDetect"); @@ -16,6 +16,14 @@ public final class PeriodType extends ExpandableStringEnum { /** Static value AssignValue for PeriodType. */ public static final PeriodType ASSIGN_VALUE = fromString("AssignValue"); + /** + * Creates a new instance of PeriodType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PeriodType() {} + /** * Creates or finds a PeriodType from its string representation. * @@ -27,7 +35,11 @@ public static PeriodType fromString(String name) { return fromString(name, PeriodType.class); } - /** @return known PeriodType values. */ + /** + * Gets known PeriodType values. + * + * @return known PeriodType values. + */ public static Collection values() { return values(PeriodType.class); } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/package-info.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/package-info.java index b38aa187fe683..c471d0279c340 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/package-info.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/package-info.java @@ -2,8 +2,5 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** - * Package containing classes for AzureCognitiveServiceMetricsAdvisorRestAPIOpenAPIV2. Azure Cognitive Service Metrics - * Advisor REST API (OpenAPI v2). - */ +/** Package containing the data models for MetricsAdvisor. Microsoft Azure Metrics Advisor REST API (OpenAPI v2). */ package com.azure.ai.metricsadvisor.models; diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/module-info.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/module-info.java index 1c53ff113d938..244dba9b346eb 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/module-info.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/module-info.java @@ -13,4 +13,5 @@ opens com.azure.ai.metricsadvisor.administration.models to com.fasterxml.jackson.databind; opens com.azure.ai.metricsadvisor.models to com.fasterxml.jackson.databind; opens com.azure.ai.metricsadvisor.implementation.models to com.fasterxml.jackson.databind, com.azure.core; + exports com.azure.ai.metricsadvisor.implementation.models; } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/samples/java/com/azure/ai/metricsadvisor/administration/MetricsAdvisorAdministrationAsyncClientJavaDocCodeSnippets.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/samples/java/com/azure/ai/metricsadvisor/administration/MetricsAdvisorAdministrationAsyncClientJavaDocCodeSnippets.java index 6d1189be9db6c..ae894c7888aad 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/samples/java/com/azure/ai/metricsadvisor/administration/MetricsAdvisorAdministrationAsyncClientJavaDocCodeSnippets.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/samples/java/com/azure/ai/metricsadvisor/administration/MetricsAdvisorAdministrationAsyncClientJavaDocCodeSnippets.java @@ -12,7 +12,6 @@ import com.azure.ai.metricsadvisor.administration.models.DataFeedDimension; import com.azure.ai.metricsadvisor.administration.models.DataFeedGranularity; import com.azure.ai.metricsadvisor.administration.models.DataFeedGranularityType; -import com.azure.ai.metricsadvisor.administration.models.DataFeedIngestionProgress; import com.azure.ai.metricsadvisor.administration.models.DataFeedIngestionSettings; import com.azure.ai.metricsadvisor.administration.models.DataFeedMetric; import com.azure.ai.metricsadvisor.administration.models.DataFeedOptions; @@ -23,6 +22,7 @@ import com.azure.ai.metricsadvisor.administration.models.DataSourceCredentialEntity; import com.azure.ai.metricsadvisor.administration.models.DataSourceServicePrincipalInKeyVault; import com.azure.ai.metricsadvisor.administration.models.DetectionConditionOperator; +import com.azure.ai.metricsadvisor.administration.models.DataFeedIngestionProgress; import com.azure.ai.metricsadvisor.models.DimensionKey; import com.azure.ai.metricsadvisor.administration.models.EmailNotificationHook; import com.azure.ai.metricsadvisor.administration.models.HardThresholdCondition; diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/test/java/com/azure/ai/metricsadvisor/DataFeedIngestionOperationAsyncTest.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/test/java/com/azure/ai/metricsadvisor/DataFeedIngestionOperationAsyncTest.java index 0b9aadeb762b6..c88475206ab7e 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/test/java/com/azure/ai/metricsadvisor/DataFeedIngestionOperationAsyncTest.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/test/java/com/azure/ai/metricsadvisor/DataFeedIngestionOperationAsyncTest.java @@ -4,8 +4,8 @@ package com.azure.ai.metricsadvisor; import com.azure.ai.metricsadvisor.administration.MetricsAdvisorAdministrationAsyncClient; -import com.azure.ai.metricsadvisor.administration.models.DataFeedIngestionProgress; import com.azure.ai.metricsadvisor.administration.models.DataFeedIngestionStatus; +import com.azure.ai.metricsadvisor.administration.models.DataFeedIngestionProgress; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedFlux; import com.azure.core.http.rest.Response; diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/test/java/com/azure/ai/metricsadvisor/DataFeedIngestionOperationTest.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/test/java/com/azure/ai/metricsadvisor/DataFeedIngestionOperationTest.java index d80716f282420..1f1c24f948b4e 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/test/java/com/azure/ai/metricsadvisor/DataFeedIngestionOperationTest.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/test/java/com/azure/ai/metricsadvisor/DataFeedIngestionOperationTest.java @@ -4,8 +4,8 @@ package com.azure.ai.metricsadvisor; import com.azure.ai.metricsadvisor.administration.MetricsAdvisorAdministrationClient; -import com.azure.ai.metricsadvisor.administration.models.DataFeedIngestionProgress; import com.azure.ai.metricsadvisor.administration.models.DataFeedIngestionStatus; +import com.azure.ai.metricsadvisor.administration.models.DataFeedIngestionProgress; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/test/java/com/azure/ai/metricsadvisor/DataFeedIngestionOperationTestBase.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/test/java/com/azure/ai/metricsadvisor/DataFeedIngestionOperationTestBase.java index 1a434c438d523..c671243327564 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/test/java/com/azure/ai/metricsadvisor/DataFeedIngestionOperationTestBase.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/test/java/com/azure/ai/metricsadvisor/DataFeedIngestionOperationTestBase.java @@ -3,9 +3,9 @@ package com.azure.ai.metricsadvisor; -import com.azure.ai.metricsadvisor.administration.models.DataFeedIngestionProgress; import com.azure.ai.metricsadvisor.administration.models.DataFeedIngestionStatus; import com.azure.ai.metricsadvisor.administration.models.ListDataFeedIngestionOptions; +import com.azure.ai.metricsadvisor.administration.models.DataFeedIngestionProgress; import com.azure.core.http.HttpClient; import com.azure.core.http.rest.Response; import org.junit.jupiter.api.Assertions; diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/swagger/README.md b/sdk/metricsadvisor/azure-ai-metricsadvisor/swagger/README.md index 99840fb77915f..c5856e982304d 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/swagger/README.md +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/swagger/README.md @@ -20,7 +20,7 @@ autorest --java --use=C:/work/autorest.java ### Code generation settings ``` yaml -input-file: ./metricsadvisor_1.20200903_openapi.v2.json +input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/cognitiveservices/data-plane/MetricsAdvisor/stable/v1.0/MetricsAdvisor.json java: true output-folder: ..\ generate-client-as-impl: true @@ -33,17 +33,25 @@ add-context-parameter: true models-subpackage: implementation.models context-client-method-parameter: true custom-types-subpackage: models -custom-types: AnomalyDetectorDirection,AnomalyStatus,AnomalyValue,ChangePointValue,DataFeedIngestionProgress,EnrichmentStatus,FeedbackType,AnomalyIncidentStatus,IngestionStatusType,PeriodType,AnomalySeverity,SnoozeScope,AlertQueryTimeMode,DataFeedIngestionStatus,MetricSeriesDefinition,FeedbackQueryTimeMode,AnomalyAlert,DataFeedGranularityType,DataFeedRollupType,DataFeedAutoRollUpMethod,DataFeedStatus,MetricsAdvisorErrorCodeException,MetricsAdvisorErrorCode +custom-types: AnomalyStatus,AnomalyValue,ChangePointValue,EnrichmentStatus,FeedbackType,AnomalyIncidentStatus,PeriodType,AnomalySeverity,AlertQueryTimeMode,MetricSeriesDefinition,FeedbackQueryTimeMode,AnomalyAlert,DataFeedGranularityType,DataFeedRollupType,DataFeedAutoRollUpMethod,DataFeedStatus,MetricsAdvisorErrorCodeException,MetricsAdvisorErrorCode ``` ### Generated types renamed and moved to model -#### ErrorCode -> MetricsAdvisorErrorCode +#### MetricsAdvisorErrorCodeException -> MetricsAdvisorResponseException ```yaml directive: - rename-model: - from: ErrorCode - to: MetricsAdvisorErrorCode + from: MetricsAdvisorErrorCodeException + to: MetricsAdvisorResponseException +``` + +#### MetricsAdvisorErrorCode -> MetricsAdvisorError +```yaml +directive: + - rename-model: + from: MetricsAdvisorErrorCode + to: MetricsAdvisorError ``` #### TimeMode -> AlertQueryTimeMode @@ -165,6 +173,22 @@ directive: } ``` +#### AnomalyAlert properties rename + +``` yaml +directive: +- from: swagger-document + where: $.definitions + transform: > + if (!$.AnomalyAlert) { + const alertId = $.AnomalyAlert.properties.alertId; + if (alertId && !metricId["x-ms-client-name"]) { + metricId["x-ms-client-name"] = "id"; + $.Metric.properties.alertId = alertId; + } + } +``` + #### Dimension properties rename ``` yaml From ff0ca39a125d14bdf19e4d9f82928f93bfe33432 Mon Sep 17 00:00:00 2001 From: samvaity Date: Mon, 6 Mar 2023 11:59:34 -0800 Subject: [PATCH 2/5] cleanup swagger transforms --- .../implementation/MetricsAdvisorImpl.java | 4 +- .../models/DataFeedIngestionProgress.java | 1 - .../models/DataFeedIngestionStatus.java | 1 - .../implementation/models/ErrorCode.java | 67 +++++++++++++++++++ .../models/ErrorCodeException.java | 38 +++++++++++ .../MetricAnomalyAlertSnoozeCondition.java | 1 - .../implementation/models/SnoozeScope.java | 17 ++++- .../metricsadvisor/models/AnomalyAlert.java | 6 +- .../azure-ai-metricsadvisor/swagger/README.md | 49 +++----------- 9 files changed, 133 insertions(+), 51 deletions(-) create mode 100644 sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ErrorCode.java create mode 100644 sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ErrorCodeException.java diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/MetricsAdvisorImpl.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/MetricsAdvisorImpl.java index 6d033b70c80c2..5d9aca8d67b10 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/MetricsAdvisorImpl.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/MetricsAdvisorImpl.java @@ -24,6 +24,8 @@ import com.azure.ai.metricsadvisor.implementation.models.CreateMetricFeedbackResponse; import com.azure.ai.metricsadvisor.implementation.models.DataFeedDetail; import com.azure.ai.metricsadvisor.implementation.models.DataFeedDetailPatch; +import com.azure.ai.metricsadvisor.implementation.models.DataFeedIngestionProgress; +import com.azure.ai.metricsadvisor.implementation.models.DataFeedIngestionStatus; import com.azure.ai.metricsadvisor.implementation.models.DataFeedList; import com.azure.ai.metricsadvisor.implementation.models.DataSourceCredential; import com.azure.ai.metricsadvisor.implementation.models.DataSourceCredentialList; @@ -58,8 +60,6 @@ import com.azure.ai.metricsadvisor.implementation.models.SeriesResultList; import com.azure.ai.metricsadvisor.implementation.models.UsageStats; import com.azure.ai.metricsadvisor.models.AnomalyAlert; -import com.azure.ai.metricsadvisor.implementation.models.DataFeedIngestionProgress; -import com.azure.ai.metricsadvisor.implementation.models.DataFeedIngestionStatus; import com.azure.ai.metricsadvisor.models.EnrichmentStatus; import com.azure.ai.metricsadvisor.models.MetricsAdvisorResponseException; import com.azure.core.annotation.BodyParam; diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedIngestionProgress.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedIngestionProgress.java index 754ced3c624da..2d85fd5a862eb 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedIngestionProgress.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedIngestionProgress.java @@ -6,7 +6,6 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; - import java.time.OffsetDateTime; /** The DataFeedIngestionProgress model. */ diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedIngestionStatus.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedIngestionStatus.java index b173ee0d3a56f..d585cf329d644 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedIngestionStatus.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/DataFeedIngestionStatus.java @@ -4,7 +4,6 @@ package com.azure.ai.metricsadvisor.implementation.models; -import com.azure.ai.metricsadvisor.implementation.models.IngestionStatusType; import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ErrorCode.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ErrorCode.java new file mode 100644 index 0000000000000..bf698af0c6a21 --- /dev/null +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ErrorCode.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.ai.metricsadvisor.implementation.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The ErrorCode model. */ +@Fluent +public final class ErrorCode { + /* + * The message property. + */ + @JsonProperty(value = "message") + private String message; + + /* + * The code property. + */ + @JsonProperty(value = "code") + private String code; + + /** Creates an instance of ErrorCode class. */ + public ErrorCode() {} + + /** + * Get the message property: The message property. + * + * @return the message value. + */ + public String getMessage() { + return this.message; + } + + /** + * Set the message property: The message property. + * + * @param message the message value to set. + * @return the ErrorCode object itself. + */ + public ErrorCode setMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the code property: The code property. + * + * @return the code value. + */ + public String getCode() { + return this.code; + } + + /** + * Set the code property: The code property. + * + * @param code the code value to set. + * @return the ErrorCode object itself. + */ + public ErrorCode setCode(String code) { + this.code = code; + return this; + } +} diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ErrorCodeException.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ErrorCodeException.java new file mode 100644 index 0000000000000..f87f5943347ea --- /dev/null +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/ErrorCodeException.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.ai.metricsadvisor.implementation.models; + +import com.azure.core.exception.HttpResponseException; +import com.azure.core.http.HttpResponse; + +/** Exception thrown for an invalid response with ErrorCode information. */ +public final class ErrorCodeException extends HttpResponseException { + /** + * Initializes a new instance of the ErrorCodeException class. + * + * @param message the exception message or the response content if a message is not available. + * @param response the HTTP response. + */ + public ErrorCodeException(String message, HttpResponse response) { + super(message, response); + } + + /** + * Initializes a new instance of the ErrorCodeException class. + * + * @param message the exception message or the response content if a message is not available. + * @param response the HTTP response. + * @param value the deserialized response value. + */ + public ErrorCodeException(String message, HttpResponse response, ErrorCode value) { + super(message, response, value); + } + + /** {@inheritDoc} */ + @Override + public ErrorCode getValue() { + return (ErrorCode) super.getValue(); + } +} diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricAnomalyAlertSnoozeCondition.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricAnomalyAlertSnoozeCondition.java index 54e4911abc5c7..f79e68163fce0 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricAnomalyAlertSnoozeCondition.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/MetricAnomalyAlertSnoozeCondition.java @@ -4,7 +4,6 @@ package com.azure.ai.metricsadvisor.implementation.models; -import com.azure.ai.metricsadvisor.implementation.models.SnoozeScope; import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SnoozeScope.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SnoozeScope.java index 39d06ded41d0e..ebd9b044a63b3 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SnoozeScope.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/models/SnoozeScope.java @@ -6,10 +6,9 @@ import com.azure.core.util.ExpandableStringEnum; import com.fasterxml.jackson.annotation.JsonCreator; - import java.util.Collection; -/** Defines values for SnoozeScope. */ +/** snooze scope. */ public final class SnoozeScope extends ExpandableStringEnum { /** Static value Metric for SnoozeScope. */ public static final SnoozeScope METRIC = fromString("Metric"); @@ -17,6 +16,14 @@ public final class SnoozeScope extends ExpandableStringEnum { /** Static value Series for SnoozeScope. */ public static final SnoozeScope SERIES = fromString("Series"); + /** + * Creates a new instance of SnoozeScope value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SnoozeScope() {} + /** * Creates or finds a SnoozeScope from its string representation. * @@ -28,7 +35,11 @@ public static SnoozeScope fromString(String name) { return fromString(name, SnoozeScope.class); } - /** @return known SnoozeScope values. */ + /** + * Gets known SnoozeScope values. + * + * @return known SnoozeScope values. + */ public static Collection values() { return values(SnoozeScope.class); } diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/AnomalyAlert.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/AnomalyAlert.java index 03f6a74399532..66379a08cb1d1 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/AnomalyAlert.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/AnomalyAlert.java @@ -15,7 +15,7 @@ public final class AnomalyAlert { * alert id */ @JsonProperty(value = "alertId", access = JsonProperty.Access.WRITE_ONLY) - private String id; + private String alertId; /* * anomaly time @@ -43,8 +43,8 @@ public AnomalyAlert() {} * * @return the alertId value. */ - public String getId() { - return this.id; + public String getAlertId() { + return this.alertId; } /** diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/swagger/README.md b/sdk/metricsadvisor/azure-ai-metricsadvisor/swagger/README.md index c5856e982304d..3d9d4aacbb8dd 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/swagger/README.md +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/swagger/README.md @@ -34,26 +34,11 @@ models-subpackage: implementation.models context-client-method-parameter: true custom-types-subpackage: models custom-types: AnomalyStatus,AnomalyValue,ChangePointValue,EnrichmentStatus,FeedbackType,AnomalyIncidentStatus,PeriodType,AnomalySeverity,AlertQueryTimeMode,MetricSeriesDefinition,FeedbackQueryTimeMode,AnomalyAlert,DataFeedGranularityType,DataFeedRollupType,DataFeedAutoRollUpMethod,DataFeedStatus,MetricsAdvisorErrorCodeException,MetricsAdvisorErrorCode +default-http-exception-type: com.azure.ai.metricsadvisor.models.MetricsAdvisorResponseException ``` ### Generated types renamed and moved to model -#### MetricsAdvisorErrorCodeException -> MetricsAdvisorResponseException -```yaml -directive: - - rename-model: - from: MetricsAdvisorErrorCodeException - to: MetricsAdvisorResponseException -``` - -#### MetricsAdvisorErrorCode -> MetricsAdvisorError -```yaml -directive: - - rename-model: - from: MetricsAdvisorErrorCode - to: MetricsAdvisorError -``` - #### TimeMode -> AlertQueryTimeMode ```yaml directive: @@ -173,22 +158,6 @@ directive: } ``` -#### AnomalyAlert properties rename - -``` yaml -directive: -- from: swagger-document - where: $.definitions - transform: > - if (!$.AnomalyAlert) { - const alertId = $.AnomalyAlert.properties.alertId; - if (alertId && !metricId["x-ms-client-name"]) { - metricId["x-ms-client-name"] = "id"; - $.Metric.properties.alertId = alertId; - } - } -``` - #### Dimension properties rename ``` yaml @@ -324,7 +293,7 @@ directive: "default": { "description": "Client error or server error (4xx or 5xx)", "schema": { - "$ref": "#/definitions/MetricsAdvisorErrorCode" + "$ref": "#/definitions/ErrorCode" } } }, @@ -396,7 +365,7 @@ directive: "default": { "description": "Client error or server error (4xx or 5xx)", "schema": { - "$ref": "#/definitions/MetricsAdvisorErrorCode" + "$ref": "#/definitions/ErrorCode" } } }, @@ -468,7 +437,7 @@ directive: "default": { "description": "Client error or server error (4xx or 5xx)", "schema": { - "$ref": "#/definitions/MetricsAdvisorErrorCode" + "$ref": "#/definitions/ErrorCode" } } }, @@ -540,7 +509,7 @@ directive: "default": { "description": "Client error or server error (4xx or 5xx)", "schema": { - "$ref": "#/definitions/MetricsAdvisorErrorCode" + "$ref": "#/definitions/ErrorCode" } } }, @@ -612,7 +581,7 @@ directive: "default": { "description": "Client error or server error (4xx or 5xx)", "schema": { - "$ref": "#/definitions/MetricsAdvisorErrorCode" + "$ref": "#/definitions/ErrorCode" } } }, @@ -684,7 +653,7 @@ directive: "default": { "description": "Client error or server error (4xx or 5xx)", "schema": { - "$ref": "#/definitions/MetricsAdvisorErrorCode" + "$ref": "#/definitions/ErrorCode" } } }, @@ -756,7 +725,7 @@ directive: "default": { "description": "Client error or server error (4xx or 5xx)", "schema": { - "$ref": "#/definitions/MetricsAdvisorErrorCode" + "$ref": "#/definitions/ErrorCode" } } }, @@ -828,7 +797,7 @@ directive: "default": { "description": "Client error or server error (4xx or 5xx)", "schema": { - "$ref": "#/definitions/MetricsAdvisorErrorCode" + "$ref": "#/definitions/ErrorCode" } } }, From 3d468f46f78daa0cbf2e4466f3b9329d99398ca9 Mon Sep 17 00:00:00 2001 From: samvaity Date: Tue, 7 Mar 2023 20:10:55 -0800 Subject: [PATCH 3/5] anomaly alert properties rename --- .../MetricsAdvisorImplBuilder.java | 15 ++-- .../metricsadvisor/models/AnomalyAlert.java | 10 +-- .../azure-ai-metricsadvisor/swagger/README.md | 69 ++----------------- 3 files changed, 16 insertions(+), 78 deletions(-) diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/MetricsAdvisorImplBuilder.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/MetricsAdvisorImplBuilder.java index 04bb03e23117a..7c7ff09cbe844 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/MetricsAdvisorImplBuilder.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/MetricsAdvisorImplBuilder.java @@ -37,7 +37,6 @@ import java.util.List; import java.util.Map; import java.util.Objects; -import java.util.stream.Collectors; /** A builder for creating a new instance of the MetricsAdvisor type. */ @ServiceClientBuilder(serviceClients = {MetricsAdvisorImpl.class}) @@ -225,18 +224,16 @@ private HttpPipeline createHttpPipeline() { if (headers.getSize() > 0) { policies.add(new AddHeadersPolicy(headers)); } - policies.addAll( - this.pipelinePolicies.stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) - .collect(Collectors.toList())); + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .forEach(p -> policies.add(p)); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy())); policies.add(new AddDatePolicy()); policies.add(new CookiePolicy()); - policies.addAll( - this.pipelinePolicies.stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) - .collect(Collectors.toList())); + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .forEach(p -> policies.add(p)); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); HttpPipeline httpPipeline = diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/AnomalyAlert.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/AnomalyAlert.java index 66379a08cb1d1..6cefb42638a3c 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/AnomalyAlert.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/models/AnomalyAlert.java @@ -15,7 +15,7 @@ public final class AnomalyAlert { * alert id */ @JsonProperty(value = "alertId", access = JsonProperty.Access.WRITE_ONLY) - private String alertId; + private String id; /* * anomaly time @@ -39,12 +39,12 @@ public final class AnomalyAlert { public AnomalyAlert() {} /** - * Get the alertId property: alert id. + * Get the id property: alert id. * - * @return the alertId value. + * @return the id value. */ - public String getAlertId() { - return this.alertId; + public String getId() { + return this.id; } /** diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/swagger/README.md b/sdk/metricsadvisor/azure-ai-metricsadvisor/swagger/README.md index 3d9d4aacbb8dd..eed35d5a5a83e 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/swagger/README.md +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/swagger/README.md @@ -127,72 +127,13 @@ directive: to: DataFeedStatus ``` -#### Metric properties rename - -``` yaml -directive: -- from: swagger-document - where: $.definitions - transform: > - if (!$.Metric) { - const metricId = $.Metric.properties.metricId; - if (metricId && !metricId["x-ms-client-name"]) { - metricId["x-ms-client-name"] = "id"; - $.Metric.properties.metricId = metricId; - } - const metricName = $.Metric.properties.metricName; - if (metricName && !metricId["x-ms-client-name"]) { - metricName["x-ms-client-name"] = "name"; - $.Metric.properties.metricName = metricName; - } - const metricDisplayName = $.Metric.properties.metricDisplayName; - if (metricDisplayName && !metricDisplayName["x-ms-client-name"]) { - metricDisplayName["x-ms-client-name"] = "displayName"; - $.Metric.properties.metricDisplayName = metricDisplayName; - } - const metricDescription = $.Metric.properties.metricDescription; - if (metricDescription && !metricDescription["x-ms-client-name"]) { - metricDescription["x-ms-client-name"] = "description"; - $.Metric.properties.metricDescription = metricDescription; - } - } -``` - -#### Dimension properties rename - +### Change AnomalyAlert alertId to id ``` yaml directive: -- from: swagger-document - where: $.definitions - transform: > - if (!$.Dimension) { - const dimensionName = $.Metric.properties.dimensionName; - if (dimensionName && !dimensionName["x-ms-client-name"]) { - dimensionName["x-ms-client-name"] = "name"; - $.Metric.properties.dimensionName = dimensionName; - } - const dimensionDisplayName = $.Metric.properties.dimensionDisplayName; - if (dimensionDisplayName && !dimensionDisplayName["x-ms-client-name"]) { - dimensionDisplayName["x-ms-client-name"] = "displayName"; - $.Metric.properties.dimensionDisplayName = dimensionDisplayName; - } - } -``` - -#### Alert properties rename - -``` yaml -directive: -- from: swagger-document - where: $.definitions - transform: > - if (!$.AlertResult) { - const alertId = $.AlertResult.properties.alertId; - if (alertId && !alertId["x-ms-client-name"]) { - alertId["x-ms-client-name"] = "id"; - $.AlertResult.properties.alertId = alertId; - } - } + - from: swagger-document + where: $.definitions.AnomalyAlert.properties + transform: > + $.alertId["x-ms-client-name"] = "id"; ``` ### Expose MetricId as String From 75ca5b976f6f837d8c2cd65c91d253ce30081e79 Mon Sep 17 00:00:00 2001 From: samvaity Date: Wed, 8 Mar 2023 16:31:43 -0800 Subject: [PATCH 4/5] nextLink remove / --- ...tricsAdvisorAdministrationAsyncClient.java | 19 ++++++++++--------- ...icsAdvisorAdministrationClientBuilder.java | 5 ++--- .../models/DataFeedIngestionStatus.java | 1 - .../implementation/MetricsAdvisorImpl.java | 2 +- .../azure-ai-metricsadvisor/swagger/README.md | 2 +- 5 files changed, 14 insertions(+), 15 deletions(-) diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/administration/MetricsAdvisorAdministrationAsyncClient.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/administration/MetricsAdvisorAdministrationAsyncClient.java index 571188a2d43f3..d5bdec10d695b 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/administration/MetricsAdvisorAdministrationAsyncClient.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/administration/MetricsAdvisorAdministrationAsyncClient.java @@ -745,15 +745,16 @@ private Mono> listDataFeedIngestionStatus } private List toDataFeedIngestionStatus(List ingestionStatusList) { - return ingestionStatusList - .stream() - .map(ingestionStatus -> { - DataFeedIngestionStatus dataFeedIngestionStatus = new DataFeedIngestionStatus(); - DataFeedIngestionStatusHelper.setMessage(dataFeedIngestionStatus, ingestionStatus.getMessage()); - DataFeedIngestionStatusHelper.setIngestionStatusType(dataFeedIngestionStatus, IngestionStatusType.fromString(toStringOrNull(ingestionStatus.getStatus()))); - DataFeedIngestionStatusHelper.setTimestamp(dataFeedIngestionStatus, ingestionStatus.getTimestamp()); - return dataFeedIngestionStatus; - }).collect(Collectors.toList()); + return ingestionStatusList + .stream() + .map(ingestionStatus -> { + DataFeedIngestionStatus dataFeedIngestionStatus = new DataFeedIngestionStatus(); + DataFeedIngestionStatusHelper.setMessage(dataFeedIngestionStatus, ingestionStatus.getMessage()); + DataFeedIngestionStatusHelper.setIngestionStatusType(dataFeedIngestionStatus, IngestionStatusType.fromString(toStringOrNull(ingestionStatus.getStatus()))); + DataFeedIngestionStatusHelper.setTimestamp(dataFeedIngestionStatus, ingestionStatus.getTimestamp()); + return dataFeedIngestionStatus; + }) + .collect(Collectors.toList()); } private Mono> listDataFeedIngestionStatusNextPageAsync( diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/administration/MetricsAdvisorAdministrationClientBuilder.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/administration/MetricsAdvisorAdministrationClientBuilder.java index 2ab5860a1dff4..394c6675822e7 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/administration/MetricsAdvisorAdministrationClientBuilder.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/administration/MetricsAdvisorAdministrationClientBuilder.java @@ -3,11 +3,10 @@ package com.azure.ai.metricsadvisor.administration; +import com.azure.ai.metricsadvisor.MetricsAdvisorServiceVersion; import com.azure.ai.metricsadvisor.implementation.MetricsAdvisorImpl; import com.azure.ai.metricsadvisor.implementation.MetricsAdvisorImplBuilder; -import com.azure.ai.metricsadvisor.implementation.MetricsAdvisorImpl; import com.azure.ai.metricsadvisor.models.MetricsAdvisorKeyCredential; -import com.azure.ai.metricsadvisor.MetricsAdvisorServiceVersion; import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.client.traits.ConfigurationTrait; import com.azure.core.client.traits.EndpointTrait; @@ -34,8 +33,8 @@ import com.azure.core.util.ClientOptions; import com.azure.core.util.Configuration; import com.azure.core.util.CoreUtils; -import com.azure.core.util.TracingOptions; import com.azure.core.util.HttpClientOptions; +import com.azure.core.util.TracingOptions; import com.azure.core.util.builder.ClientBuilderUtil; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.tracing.Tracer; diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/administration/models/DataFeedIngestionStatus.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/administration/models/DataFeedIngestionStatus.java index fda68d356c9d8..011fd61f91376 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/administration/models/DataFeedIngestionStatus.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/administration/models/DataFeedIngestionStatus.java @@ -8,7 +8,6 @@ import com.azure.core.annotation.Immutable; import java.time.OffsetDateTime; -import java.util.List; /** The DataFeedIngestionStatus model. */ @Immutable diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/MetricsAdvisorImpl.java b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/MetricsAdvisorImpl.java index 5d9aca8d67b10..db8370ed29458 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/MetricsAdvisorImpl.java +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/src/main/java/com/azure/ai/metricsadvisor/implementation/MetricsAdvisorImpl.java @@ -675,7 +675,7 @@ Mono> getDimensionOfAnomaliesByAnomalyDetectionCo @HeaderParam("Accept") String accept, Context context); - @Post("/{nextLink}") + @Post("{nextLink}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(MetricsAdvisorResponseException.class) Mono> listMetricFeedbacksNext( diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/swagger/README.md b/sdk/metricsadvisor/azure-ai-metricsadvisor/swagger/README.md index eed35d5a5a83e..a30df2eb8fc3d 100644 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/swagger/README.md +++ b/sdk/metricsadvisor/azure-ai-metricsadvisor/swagger/README.md @@ -408,7 +408,7 @@ directive: - from: swagger-document where: $["x-ms-paths"] transform: > - $["/{nextLink}?listMetricFeedbacksNext"] = { + $["{nextLink}?listMetricFeedbacksNext"] = { "post": { "tags": [ "Feedback" From 5d6dd113b5d0348bc91ca729af7b13809e771aff Mon Sep 17 00:00:00 2001 From: samvaity Date: Thu, 9 Mar 2023 11:01:10 -0800 Subject: [PATCH 5/5] delete local swagger file --- .../metricsadvisor_1.20200903_openapi.v2.json | 6533 ----------------- 1 file changed, 6533 deletions(-) delete mode 100644 sdk/metricsadvisor/azure-ai-metricsadvisor/swagger/metricsadvisor_1.20200903_openapi.v2.json diff --git a/sdk/metricsadvisor/azure-ai-metricsadvisor/swagger/metricsadvisor_1.20200903_openapi.v2.json b/sdk/metricsadvisor/azure-ai-metricsadvisor/swagger/metricsadvisor_1.20200903_openapi.v2.json deleted file mode 100644 index 1dc04548dec37..0000000000000 --- a/sdk/metricsadvisor/azure-ai-metricsadvisor/swagger/metricsadvisor_1.20200903_openapi.v2.json +++ /dev/null @@ -1,6533 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "Azure Cognitive Service Metrics Advisor REST API (OpenAPI v2)", - "description": "Azure Cognitive Service Metrics Advisor REST API (OpenAPI v2)", - "version": "1.0" - }, - "paths": { - "/stats/latest": { - "get": { - "tags": [ - "Admin" - ], - "summary": "Get latest usage stats", - "operationId": "getActiveSeriesCount", - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/UsageStats" - } - }, - "default": { - "description": "Client error or server error (4xx or 5xx)", - "schema": { - "$ref": "#/definitions/ErrorCode" - } - } - }, - "x-ms-examples": { - "Get latest usage stats": { - "$ref": "./examples/getActiveSeriesCount.json" - } - } - } - }, - "/alert/anomaly/configurations/{configurationId}": { - "get": { - "tags": [ - "AnomalyAlerting" - ], - "summary": "Query a single anomaly alerting configuration", - "operationId": "getAnomalyAlertingConfiguration", - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "path", - "name": "configurationId", - "description": "anomaly alerting configuration unique id", - "required": true, - "type": "string", - "format": "uuid" - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/AnomalyAlertingConfiguration" - } - }, - "default": { - "description": "Client error or server error (4xx or 5xx)", - "schema": { - "$ref": "#/definitions/ErrorCode" - } - } - }, - "x-ms-examples": { - "Query a single anomaly alerting configuration": { - "$ref": "./examples/getAnomalyAlertingConfiguration.json" - } - } - }, - "patch": { - "tags": [ - "AnomalyAlerting" - ], - "summary": "Update anomaly alerting configuration", - "operationId": "updateAnomalyAlertingConfiguration", - "consumes": [ - "application/merge-patch+json" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "path", - "name": "configurationId", - "description": "anomaly alerting configuration unique id", - "required": true, - "type": "string", - "format": "uuid" - }, - { - "in": "body", - "name": "body", - "description": "anomaly alerting configuration", - "required": true, - "schema": { - "$ref": "#/definitions/AnomalyAlertingConfigurationPatch" - } - } - ], - "responses": { - "204": { - "description": "Success" - }, - "default": { - "description": "Client error or server error (4xx or 5xx)", - "schema": { - "$ref": "#/definitions/ErrorCode" - } - } - }, - "x-ms-examples": { - "Update anomaly alerting configuration": { - "$ref": "./examples/updateAnomalyAlertingConfiguration.json" - } - } - }, - "delete": { - "tags": [ - "AnomalyAlerting" - ], - "summary": "Delete anomaly alerting configuration", - "operationId": "deleteAnomalyAlertingConfiguration", - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "path", - "name": "configurationId", - "description": "anomaly alerting configuration unique id", - "required": true, - "type": "string", - "format": "uuid" - } - ], - "responses": { - "204": { - "description": "The resource is deleted successfully or does not exist." - }, - "default": { - "description": "Client error or server error (4xx or 5xx)", - "schema": { - "$ref": "#/definitions/ErrorCode" - } - } - }, - "x-ms-examples": { - "Delete anomaly alerting configuration": { - "$ref": "./examples/deleteAnomalyAlertingConfiguration.json" - } - } - } - }, - "/alert/anomaly/configurations": { - "post": { - "tags": [ - "AnomalyAlerting" - ], - "summary": "Create anomaly alerting configuration", - "operationId": "createAnomalyAlertingConfiguration", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "body", - "name": "body", - "description": "anomaly alerting configuration", - "required": true, - "schema": { - "$ref": "#/definitions/AnomalyAlertingConfiguration" - } - } - ], - "responses": { - "201": { - "description": "Success", - "headers": { - "Location": { - "description": "Location of the newly created resource.", - "type": "string" - } - } - }, - "default": { - "description": "Client error or server error (4xx or 5xx)", - "schema": { - "$ref": "#/definitions/ErrorCode" - } - } - }, - "x-ms-examples": { - "Create anomaly alerting configuration": { - "$ref": "./examples/createAnomalyAlertingConfiguration.json" - } - } - } - }, - "/alert/anomaly/configurations/{configurationId}/alerts/query": { - "post": { - "tags": [ - "AnomalyAlerting" - ], - "summary": "Query alerts under anomaly alerting configuration", - "operationId": "getAlertsByAnomalyAlertingConfiguration", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "path", - "name": "configurationId", - "description": "anomaly alerting configuration unique id", - "required": true, - "type": "string", - "format": "uuid" - }, - { - "in": "query", - "name": "$skip", - "description": "for paging, skipped number", - "type": "integer", - "format": "int32" - }, - { - "in": "query", - "name": "$maxpagesize", - "description": "the maximum number of items in one page", - "type": "integer", - "format": "int32" - }, - { - "in": "body", - "name": "body", - "description": "query alerting result request", - "required": true, - "schema": { - "$ref": "#/definitions/AlertingResultQuery" - } - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/AlertResultList" - } - }, - "default": { - "description": "Client error or server error (4xx or 5xx)", - "schema": { - "$ref": "#/definitions/ErrorCode" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "@nextLink" - }, - "x-ms-examples": { - "Query alerts under anomaly alerting configuration": { - "$ref": "./examples/getAlertsByAnomalyAlertingConfiguration.json" - } - } - } - }, - "/alert/anomaly/configurations/{configurationId}/alerts/{alertId}/anomalies": { - "get": { - "tags": [ - "AnomalyAlerting" - ], - "summary": "Query anomalies under a specific alert", - "operationId": "getAnomaliesFromAlertByAnomalyAlertingConfiguration", - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "path", - "name": "configurationId", - "description": "anomaly alerting configuration unique id", - "required": true, - "type": "string", - "format": "uuid" - }, - { - "in": "path", - "name": "alertId", - "description": "alert id", - "required": true, - "type": "string" - }, - { - "in": "query", - "name": "$skip", - "description": "for paging, skipped number", - "type": "integer", - "format": "int32" - }, - { - "in": "query", - "name": "$maxpagesize", - "description": "the maximum number of items in one page", - "type": "integer", - "format": "int32" - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/AnomalyResultList" - } - }, - "default": { - "description": "Client error or server error (4xx or 5xx)", - "schema": { - "$ref": "#/definitions/ErrorCode" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "@nextLink" - }, - "x-ms-examples": { - "Query anomalies under a specific alert": { - "$ref": "./examples/getAnomaliesFromAlertByAnomalyAlertingConfiguration.json" - } - } - } - }, - "/alert/anomaly/configurations/{configurationId}/alerts/{alertId}/incidents": { - "get": { - "tags": [ - "AnomalyAlerting" - ], - "summary": "Query incidents under a specific alert", - "operationId": "getIncidentsFromAlertByAnomalyAlertingConfiguration", - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "path", - "name": "configurationId", - "description": "anomaly alerting configuration unique id", - "required": true, - "type": "string", - "format": "uuid" - }, - { - "in": "path", - "name": "alertId", - "description": "alert id", - "required": true, - "type": "string" - }, - { - "in": "query", - "name": "$skip", - "description": "for paging, skipped number", - "type": "integer", - "format": "int32" - }, - { - "in": "query", - "name": "$maxpagesize", - "description": "the maximum number of items in one page", - "type": "integer", - "format": "int32" - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/IncidentResultList" - } - }, - "default": { - "description": "Client error or server error (4xx or 5xx)", - "schema": { - "$ref": "#/definitions/ErrorCode" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "@nextLink" - }, - "x-ms-examples": { - "Query incidents under a specific alert": { - "$ref": "./examples/getIncidentsFromAlertByAnomalyAlertingConfiguration.json" - } - } - } - }, - "/enrichment/anomalyDetection/configurations/{configurationId}": { - "get": { - "tags": [ - "AnomalyDetection" - ], - "summary": "Query a single anomaly detection configuration", - "operationId": "getAnomalyDetectionConfiguration", - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "path", - "name": "configurationId", - "description": "anomaly detection configuration unique id", - "required": true, - "type": "string", - "format": "uuid" - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/AnomalyDetectionConfiguration" - } - }, - "default": { - "description": "Client error or server error (4xx or 5xx)", - "schema": { - "$ref": "#/definitions/ErrorCode" - } - } - }, - "x-ms-examples": { - "Query a single anomaly detection configuration": { - "$ref": "./examples/getAnomalyDetectionConfiguration.json" - } - } - }, - "patch": { - "tags": [ - "AnomalyDetection" - ], - "summary": "Update anomaly detection configuration", - "operationId": "updateAnomalyDetectionConfiguration", - "consumes": [ - "application/merge-patch+json" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "path", - "name": "configurationId", - "description": "anomaly detection configuration unique id", - "required": true, - "type": "string", - "format": "uuid" - }, - { - "in": "body", - "name": "body", - "description": "anomaly detection configuration", - "required": true, - "schema": { - "$ref": "#/definitions/AnomalyDetectionConfigurationPatch" - } - } - ], - "responses": { - "204": { - "description": "Success" - }, - "default": { - "description": "Client error or server error (4xx or 5xx)", - "schema": { - "$ref": "#/definitions/ErrorCode" - } - } - }, - "x-ms-examples": { - "Update anomaly detection configuration": { - "$ref": "./examples/updateAnomalyDetectionConfiguration.json" - } - } - }, - "delete": { - "tags": [ - "AnomalyDetection" - ], - "summary": "Delete anomaly detection configuration", - "operationId": "deleteAnomalyDetectionConfiguration", - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "path", - "name": "configurationId", - "description": "anomaly detection configuration unique id", - "required": true, - "type": "string", - "format": "uuid" - } - ], - "responses": { - "204": { - "description": "The resource is deleted successfully or does not exist." - }, - "default": { - "description": "Client error or server error (4xx or 5xx)", - "schema": { - "$ref": "#/definitions/ErrorCode" - } - } - }, - "x-ms-examples": { - "Delete anomaly detection configuration": { - "$ref": "./examples/deleteAnomalyDetectionConfiguration.json" - } - } - } - }, - "/enrichment/anomalyDetection/configurations": { - "post": { - "tags": [ - "AnomalyDetection" - ], - "summary": "Create anomaly detection configuration", - "operationId": "createAnomalyDetectionConfiguration", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "body", - "name": "body", - "description": "anomaly detection configuration", - "required": true, - "schema": { - "$ref": "#/definitions/AnomalyDetectionConfiguration" - } - } - ], - "responses": { - "201": { - "description": "Success", - "headers": { - "Location": { - "description": "Location of the newly created resource.", - "type": "string" - } - } - }, - "default": { - "description": "Client error or server error (4xx or 5xx)", - "schema": { - "$ref": "#/definitions/ErrorCode" - } - } - }, - "x-ms-examples": { - "Create anomaly detection configuration": { - "$ref": "./examples/createAnomalyDetectionConfiguration.json" - } - } - } - }, - "/enrichment/anomalyDetection/configurations/{configurationId}/alert/anomaly/configurations": { - "get": { - "tags": [ - "AnomalyDetection" - ], - "summary": "Query all anomaly alerting configurations for specific anomaly detection configuration", - "operationId": "getAnomalyAlertingConfigurationsByAnomalyDetectionConfiguration", - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "path", - "name": "configurationId", - "description": "anomaly detection configuration unique id", - "required": true, - "type": "string", - "format": "uuid" - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/AnomalyAlertingConfigurationList" - } - }, - "default": { - "description": "Client error or server error (4xx or 5xx)", - "schema": { - "$ref": "#/definitions/ErrorCode" - } - } - }, - "x-ms-examples": { - "Query all anomaly alerting configurations for specific anomaly detection configuration": { - "$ref": "./examples/getAnomalyAlertingConfigurationsByAnomalyDetectionConfiguration.json" - } - } - } - }, - "/enrichment/anomalyDetection/configurations/{configurationId}/series/query": { - "post": { - "tags": [ - "AnomalyDetection" - ], - "summary": "Query series enriched by anomaly detection", - "operationId": "getSeriesByAnomalyDetectionConfiguration", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "path", - "name": "configurationId", - "description": "anomaly detection configuration unique id", - "required": true, - "type": "string", - "format": "uuid" - }, - { - "in": "body", - "name": "body", - "description": "query series detection result request", - "required": true, - "schema": { - "$ref": "#/definitions/DetectionSeriesQuery" - } - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/SeriesResultList" - } - }, - "default": { - "description": "Client error or server error (4xx or 5xx)", - "schema": { - "$ref": "#/definitions/ErrorCode" - } - } - }, - "x-ms-examples": { - "Query series enriched by anomaly detection": { - "$ref": "./examples/getSeriesByAnomalyDetectionConfiguration.json" - } - } - } - }, - "/enrichment/anomalyDetection/configurations/{configurationId}/anomalies/query": { - "post": { - "tags": [ - "AnomalyDetection" - ], - "summary": "Query anomalies under anomaly detection configuration", - "operationId": "getAnomaliesByAnomalyDetectionConfiguration", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "path", - "name": "configurationId", - "description": "anomaly detection configuration unique id", - "required": true, - "type": "string", - "format": "uuid" - }, - { - "in": "query", - "name": "$skip", - "description": "for paging, skipped number", - "type": "integer", - "format": "int32" - }, - { - "in": "query", - "name": "$maxpagesize", - "description": "the maximum number of items in one page", - "type": "integer", - "format": "int32" - }, - { - "in": "body", - "name": "body", - "description": "query detection anomaly result request", - "required": true, - "schema": { - "$ref": "#/definitions/DetectionAnomalyResultQuery" - } - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/AnomalyResultList" - } - }, - "default": { - "description": "Client error or server error (4xx or 5xx)", - "schema": { - "$ref": "#/definitions/ErrorCode" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "@nextLink" - }, - "x-ms-examples": { - "Query anomalies under anomaly detection configuration": { - "$ref": "./examples/getAnomaliesByAnomalyDetectionConfiguration.json" - } - } - } - }, - "/enrichment/anomalyDetection/configurations/{configurationId}/anomalies/dimension/query": { - "post": { - "tags": [ - "AnomalyDetection" - ], - "summary": "Query dimension values of anomalies", - "operationId": "getDimensionOfAnomaliesByAnomalyDetectionConfiguration", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "path", - "name": "configurationId", - "description": "anomaly detection configuration unique id", - "required": true, - "type": "string", - "format": "uuid" - }, - { - "in": "query", - "name": "$skip", - "description": "for paging, skipped number", - "type": "integer", - "format": "int32" - }, - { - "in": "query", - "name": "$maxpagesize", - "description": "the maximum number of items in one page", - "type": "integer", - "format": "int32" - }, - { - "in": "body", - "name": "body", - "description": "query dimension values request", - "required": true, - "schema": { - "$ref": "#/definitions/AnomalyDimensionQuery" - } - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/AnomalyDimensionList" - } - }, - "default": { - "description": "Client error or server error (4xx or 5xx)", - "schema": { - "$ref": "#/definitions/ErrorCode" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "@nextLink" - }, - "x-ms-examples": { - "Query dimension values of anomalies": { - "$ref": "./examples/getDimensionOfAnomaliesByAnomalyDetectionConfiguration.json" - } - } - } - }, - "/enrichment/anomalyDetection/configurations/{configurationId}/incidents/query": { - "post": { - "tags": [ - "AnomalyDetection" - ], - "summary": "Query incidents under anomaly detection configuration", - "operationId": "getIncidentsByAnomalyDetectionConfiguration", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "path", - "name": "configurationId", - "description": "anomaly detection configuration unique id", - "required": true, - "type": "string", - "format": "uuid" - }, - { - "in": "query", - "name": "$maxpagesize", - "description": "the maximum number of items in one page", - "type": "integer", - "format": "int32" - }, - { - "in": "body", - "name": "body", - "description": "query detection incident result request", - "required": true, - "schema": { - "$ref": "#/definitions/DetectionIncidentResultQuery" - } - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/IncidentResultList" - } - }, - "default": { - "description": "Client error or server error (4xx or 5xx)", - "schema": { - "$ref": "#/definitions/ErrorCode" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "@nextLink" - }, - "x-ms-examples": { - "Query incidents under anomaly detection configuration": { - "$ref": "./examples/getIncidentsByAnomalyDetectionConfiguration.json" - } - } - }, - "get": { - "tags": [ - "AnomalyDetection" - ], - "summary": "Query incidents under anomaly detection configuration", - "operationId": "getIncidentsByAnomalyDetectionConfigurationNextPages", - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "path", - "name": "configurationId", - "description": "anomaly detection configuration unique id", - "required": true, - "type": "string", - "format": "uuid" - }, - { - "in": "query", - "name": "$maxpagesize", - "description": "the maximum number of items in one page", - "type": "integer", - "format": "int32" - }, - { - "in": "query", - "name": "$token", - "description": "the token for getting the next page", - "type": "string" - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/IncidentResultList" - } - }, - "default": { - "description": "Client error or server error (4xx or 5xx)", - "schema": { - "$ref": "#/definitions/ErrorCode" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "@nextLink" - }, - "x-ms-examples": { - "Query incidents under anomaly detection configuration": { - "$ref": "./examples/getIncidentsByAnomalyDetectionConfigurationNextPages.json" - } - } - } - }, - "/enrichment/anomalyDetection/configurations/{configurationId}/incidents/{incidentId}/rootCause": { - "get": { - "tags": [ - "AnomalyDetection" - ], - "summary": "Query root cause for incident", - "operationId": "getRootCauseOfIncidentByAnomalyDetectionConfiguration", - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "path", - "name": "configurationId", - "description": "anomaly detection configuration unique id", - "required": true, - "type": "string", - "format": "uuid" - }, - { - "in": "path", - "name": "incidentId", - "description": "incident id", - "required": true, - "type": "string" - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/RootCauseList" - } - }, - "default": { - "description": "Client error or server error (4xx or 5xx)", - "schema": { - "$ref": "#/definitions/ErrorCode" - } - } - }, - "x-ms-examples": { - "Query root cause for incident": { - "$ref": "./examples/getRootCauseOfIncidentByAnomalyDetectionConfiguration.json" - } - } - } - }, - "/credentials": { - "post": { - "tags": [ - "Credential" - ], - "summary": "Create a new data source credential", - "operationId": "createCredential", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "body", - "name": "body", - "description": "Create data source credential request", - "required": true, - "schema": { - "$ref": "#/definitions/DataSourceCredential" - } - } - ], - "responses": { - "201": { - "description": "Success", - "headers": { - "Location": { - "description": "Location of the newly created resource.", - "type": "string" - } - } - }, - "default": { - "description": "Client error or server error (4xx or 5xx)", - "schema": { - "$ref": "#/definitions/ErrorCode" - } - } - }, - "x-ms-examples": { - "Create a new data source credential": { - "$ref": "./examples/createCredential.json" - } - } - }, - "get": { - "tags": [ - "Credential" - ], - "summary": "List all credentials", - "operationId": "listCredentials", - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "query", - "name": "$skip", - "description": "for paging, skipped number", - "type": "integer", - "format": "int32" - }, - { - "in": "query", - "name": "$maxpagesize", - "description": "the maximum number of items in one page", - "type": "integer", - "format": "int32" - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/DataSourceCredentialList" - } - }, - "default": { - "description": "Client error or server error (4xx or 5xx)", - "schema": { - "$ref": "#/definitions/ErrorCode" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "@nextLink" - }, - "x-ms-examples": { - "List all credentials": { - "$ref": "./examples/listCredentials.json" - } - } - } - }, - "/credentials/{credentialId}": { - "patch": { - "tags": [ - "Credential" - ], - "summary": "Update a data source credential", - "operationId": "updateCredential", - "consumes": [ - "application/merge-patch+json" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "path", - "name": "credentialId", - "description": "Data source credential unique ID", - "required": true, - "type": "string", - "format": "uuid" - }, - { - "in": "body", - "name": "body", - "description": "Update data source credential request", - "required": true, - "schema": { - "$ref": "#/definitions/DataSourceCredentialPatch" - } - } - ], - "responses": { - "204": { - "description": "Success" - }, - "default": { - "description": "Client error or server error (4xx or 5xx)", - "schema": { - "$ref": "#/definitions/ErrorCode" - } - } - }, - "x-ms-examples": { - "Update a data source credential": { - "$ref": "./examples/updateCredential.json" - } - } - }, - "delete": { - "tags": [ - "Credential" - ], - "summary": "Delete a data source credential", - "operationId": "deleteCredential", - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "path", - "name": "credentialId", - "description": "Data source credential unique ID", - "required": true, - "type": "string", - "format": "uuid" - } - ], - "responses": { - "204": { - "description": "The resource is deleted successfully or does not exist." - }, - "default": { - "description": "Client error or server error (4xx or 5xx)", - "schema": { - "$ref": "#/definitions/ErrorCode" - } - } - }, - "x-ms-examples": { - "Delete a data source credential": { - "$ref": "./examples/deleteCredential.json" - } - } - }, - "get": { - "tags": [ - "Credential" - ], - "summary": "Get a data source credential", - "operationId": "getCredential", - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "path", - "name": "credentialId", - "description": "Data source credential unique ID", - "required": true, - "type": "string", - "format": "uuid" - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/DataSourceCredential" - } - }, - "default": { - "description": "Client error or server error (4xx or 5xx)", - "schema": { - "$ref": "#/definitions/ErrorCode" - } - } - }, - "x-ms-examples": { - "Get a data source credential": { - "$ref": "./examples/getCredential.json" - } - } - } - }, - "/dataFeeds": { - "get": { - "tags": [ - "DataFeed" - ], - "summary": "List all data feeds", - "operationId": "listDataFeeds", - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "query", - "name": "dataFeedName", - "description": "filter data feed by its name", - "type": "string" - }, - { - "in": "query", - "name": "dataSourceType", - "description": "filter data feed by its source type", - "type": "string", - "enum": [ - "AzureApplicationInsights", - "AzureBlob", - "AzureCosmosDB", - "AzureDataExplorer", - "AzureDataLakeStorageGen2", - "AzureEventHubs", - "AzureTable", - "Elasticsearch", - "HttpRequest", - "InfluxDB", - "MongoDB", - "MySql", - "PostgreSql", - "SqlServer" - ], - "x-ms-enum": { - "name": "DataSourceType", - "modelAsString": true - } - }, - { - "in": "query", - "name": "granularityName", - "description": "filter data feed by its granularity", - "type": "string", - "enum": [ - "Yearly", - "Monthly", - "Weekly", - "Daily", - "Hourly", - "Minutely", - "Secondly", - "Custom" - ], - "x-ms-enum": { - "name": "Granularity", - "modelAsString": true - } - }, - { - "in": "query", - "name": "status", - "description": "filter data feed by its status", - "type": "string", - "enum": [ - "Active", - "Paused" - ], - "x-ms-enum": { - "name": "EntityStatus", - "modelAsString": true - } - }, - { - "in": "query", - "name": "creator", - "description": "filter data feed by its creator", - "type": "string" - }, - { - "in": "query", - "name": "$skip", - "description": "for paging, skipped number", - "type": "integer", - "format": "int32" - }, - { - "in": "query", - "name": "$maxpagesize", - "description": "the maximum number of items in one page", - "type": "integer", - "format": "int32" - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/DataFeedList" - } - }, - "default": { - "description": "Client error or server error (4xx or 5xx)", - "schema": { - "$ref": "#/definitions/ErrorCode" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "@nextLink" - }, - "x-ms-examples": { - "List all data feeds": { - "$ref": "./examples/listDataFeeds.json" - } - } - }, - "post": { - "tags": [ - "DataFeed" - ], - "summary": "Create a new data feed", - "operationId": "createDataFeed", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "body", - "name": "body", - "description": "parameters to create a data feed", - "required": true, - "schema": { - "$ref": "#/definitions/DataFeedDetail" - } - } - ], - "responses": { - "201": { - "description": "Success", - "headers": { - "Location": { - "description": "Location of the newly created resource.", - "type": "string" - } - } - }, - "default": { - "description": "Client error or server error (4xx or 5xx)", - "schema": { - "$ref": "#/definitions/ErrorCode" - } - } - }, - "x-ms-examples": { - "Create a new data feed": { - "$ref": "./examples/createDataFeed.json" - } - } - } - }, - "/dataFeeds/{dataFeedId}": { - "get": { - "tags": [ - "DataFeed" - ], - "summary": "Get a data feed by its id", - "operationId": "getDataFeedById", - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "path", - "name": "dataFeedId", - "description": "The data feed unique id", - "required": true, - "type": "string", - "format": "uuid" - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/DataFeedDetail" - } - }, - "default": { - "description": "Client error or server error (4xx or 5xx)", - "schema": { - "$ref": "#/definitions/ErrorCode" - } - } - }, - "x-ms-examples": { - "Get a data feed by its id": { - "$ref": "./examples/getDataFeedById.json" - } - } - }, - "patch": { - "tags": [ - "DataFeed" - ], - "summary": "Update a data feed", - "operationId": "updateDataFeed", - "consumes": [ - "application/merge-patch+json" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "path", - "name": "dataFeedId", - "description": "The data feed unique id", - "required": true, - "type": "string", - "format": "uuid" - }, - { - "in": "body", - "name": "body", - "description": "parameters to update a data feed", - "required": true, - "schema": { - "$ref": "#/definitions/DataFeedDetailPatch" - } - } - ], - "responses": { - "204": { - "description": "Success" - }, - "default": { - "description": "Client error or server error (4xx or 5xx)", - "schema": { - "$ref": "#/definitions/ErrorCode" - } - } - }, - "x-ms-examples": { - "Update a data feed": { - "$ref": "./examples/updateDataFeed.json" - } - } - }, - "delete": { - "tags": [ - "DataFeed" - ], - "summary": "Delete a data feed", - "operationId": "deleteDataFeed", - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "path", - "name": "dataFeedId", - "description": "The data feed unique id", - "required": true, - "type": "string", - "format": "uuid" - } - ], - "responses": { - "204": { - "description": "The resource is deleted successfully or does not exist." - }, - "default": { - "description": "Client error or server error (4xx or 5xx)", - "schema": { - "$ref": "#/definitions/ErrorCode" - } - } - }, - "x-ms-examples": { - "Delete a data feed": { - "$ref": "./examples/deleteDataFeed.json" - } - } - } - }, - "/feedback/metric/{feedbackId}": { - "get": { - "tags": [ - "Feedback" - ], - "summary": "Get a metric feedback by its id", - "operationId": "getMetricFeedback", - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "path", - "name": "feedbackId", - "description": "the unique feedback ID", - "required": true, - "type": "string", - "format": "uuid" - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/MetricFeedback" - } - }, - "default": { - "description": "Client error or server error (4xx or 5xx)", - "schema": { - "$ref": "#/definitions/ErrorCode" - } - } - }, - "x-ms-examples": { - "Get a metric feedback by its id": { - "$ref": "./examples/getMetricFeedback.json" - } - } - } - }, - "/feedback/metric/query": { - "post": { - "tags": [ - "Feedback" - ], - "summary": "List feedback on the given metric", - "operationId": "listMetricFeedbacks", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "query", - "name": "$skip", - "description": "for paging, skipped number", - "type": "integer", - "format": "int32" - }, - { - "in": "query", - "name": "$maxpagesize", - "description": "the maximum number of items in one page", - "type": "integer", - "format": "int32" - }, - { - "in": "body", - "name": "body", - "description": "metric feedback filter", - "required": true, - "schema": { - "$ref": "#/definitions/MetricFeedbackFilter" - } - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/MetricFeedbackList" - } - }, - "default": { - "description": "Client error or server error (4xx or 5xx)", - "schema": { - "$ref": "#/definitions/ErrorCode" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "@nextLink" - }, - "x-ms-examples": { - "List feedback on the given metric": { - "$ref": "./examples/listMetricFeedbacks.json" - } - } - } - }, - "/feedback/metric": { - "post": { - "tags": [ - "Feedback" - ], - "summary": "Create a new metric feedback", - "operationId": "createMetricFeedback", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "body", - "name": "body", - "description": "metric feedback", - "required": true, - "schema": { - "$ref": "#/definitions/MetricFeedback" - } - } - ], - "responses": { - "201": { - "description": "Success", - "headers": { - "Location": { - "description": "Location of the newly created resource.", - "type": "string" - } - } - }, - "default": { - "description": "Client error or server error (4xx or 5xx)", - "schema": { - "$ref": "#/definitions/ErrorCode" - } - } - }, - "x-ms-examples": { - "Create a new metric feedback": { - "$ref": "./examples/createMetricFeedback.json" - } - } - } - }, - "/hooks": { - "get": { - "tags": [ - "Hook" - ], - "summary": "List all hooks", - "operationId": "listHooks", - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "query", - "name": "hookName", - "description": "filter hook by its name", - "type": "string" - }, - { - "in": "query", - "name": "$skip", - "description": "for paging, skipped number", - "type": "integer", - "format": "int32" - }, - { - "in": "query", - "name": "$maxpagesize", - "description": "the maximum number of items in one page", - "type": "integer", - "format": "int32" - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/HookList" - } - }, - "default": { - "description": "Client error or server error (4xx or 5xx)", - "schema": { - "$ref": "#/definitions/ErrorCode" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "@nextLink" - }, - "x-ms-examples": { - "List all hooks": { - "$ref": "./examples/listHooks.json" - } - } - }, - "post": { - "tags": [ - "Hook" - ], - "summary": "Create a new hook", - "operationId": "createHook", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "body", - "name": "body", - "description": "Create hook request", - "required": true, - "schema": { - "$ref": "#/definitions/HookInfo" - } - } - ], - "responses": { - "201": { - "description": "Success", - "headers": { - "Location": { - "description": "Location of the newly created resource.", - "type": "string" - } - } - }, - "default": { - "description": "Client error or server error (4xx or 5xx)", - "schema": { - "$ref": "#/definitions/ErrorCode" - } - } - }, - "x-ms-examples": { - "Create a new hook": { - "$ref": "./examples/createHook.json" - } - } - } - }, - "/hooks/{hookId}": { - "get": { - "tags": [ - "Hook" - ], - "summary": "Get a hook by its id", - "operationId": "getHook", - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "path", - "name": "hookId", - "description": "Hook unique ID", - "required": true, - "type": "string", - "format": "uuid" - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/HookInfo" - } - }, - "default": { - "description": "Client error or server error (4xx or 5xx)", - "schema": { - "$ref": "#/definitions/ErrorCode" - } - } - }, - "x-ms-examples": { - "Get a hook by its id": { - "$ref": "./examples/getHook.json" - } - } - }, - "patch": { - "tags": [ - "Hook" - ], - "summary": "Update a hook", - "operationId": "updateHook", - "consumes": [ - "application/merge-patch+json" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "path", - "name": "hookId", - "description": "Hook unique ID", - "required": true, - "type": "string", - "format": "uuid" - }, - { - "in": "body", - "name": "body", - "description": "Update hook request", - "required": true, - "schema": { - "$ref": "#/definitions/HookInfoPatch" - } - } - ], - "responses": { - "204": { - "description": "Success" - }, - "default": { - "description": "Client error or server error (4xx or 5xx)", - "schema": { - "$ref": "#/definitions/ErrorCode" - } - } - }, - "x-ms-examples": { - "Update a hook": { - "$ref": "./examples/updateHook.json" - } - } - }, - "delete": { - "tags": [ - "Hook" - ], - "summary": "Delete a hook", - "operationId": "deleteHook", - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "path", - "name": "hookId", - "description": "Hook unique ID", - "required": true, - "type": "string", - "format": "uuid" - } - ], - "responses": { - "204": { - "description": "The resource is deleted successfully or does not exist." - }, - "default": { - "description": "Client error or server error (4xx or 5xx)", - "schema": { - "$ref": "#/definitions/ErrorCode" - } - } - }, - "x-ms-examples": { - "Delete a hook": { - "$ref": "./examples/deleteHook.json" - } - } - } - }, - "/dataFeeds/{dataFeedId}/ingestionStatus/query": { - "post": { - "tags": [ - "IngestionStatus" - ], - "summary": "Get data ingestion status by data feed", - "operationId": "getDataFeedIngestionStatus", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "path", - "name": "dataFeedId", - "description": "The data feed unique id", - "required": true, - "type": "string", - "format": "uuid" - }, - { - "in": "query", - "name": "$skip", - "description": "for paging, skipped number", - "type": "integer", - "format": "int32" - }, - { - "in": "query", - "name": "$maxpagesize", - "description": "the maximum number of items in one page", - "type": "integer", - "format": "int32" - }, - { - "in": "body", - "name": "body", - "description": "The query time range", - "required": true, - "schema": { - "$ref": "#/definitions/IngestionStatusQueryOptions" - } - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/IngestionStatusList" - } - }, - "default": { - "description": "Client error or server error (4xx or 5xx)", - "schema": { - "$ref": "#/definitions/ErrorCode" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "@nextLink" - }, - "x-ms-examples": { - "Get data ingestion status by data feed": { - "$ref": "./examples/getDataFeedIngestionStatus.json" - } - } - } - }, - "/dataFeeds/{dataFeedId}/ingestionProgress/reset": { - "post": { - "tags": [ - "IngestionStatus" - ], - "summary": "Reset data ingestion status by data feed to backfill data", - "operationId": "resetDataFeedIngestionStatus", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "path", - "name": "dataFeedId", - "description": "The data feed unique id", - "required": true, - "type": "string", - "format": "uuid" - }, - { - "in": "body", - "name": "body", - "description": "The backfill time range", - "required": true, - "schema": { - "$ref": "#/definitions/IngestionProgressResetOptions" - } - } - ], - "responses": { - "204": { - "description": "Success" - }, - "default": { - "description": "Client error or server error (4xx or 5xx)", - "schema": { - "$ref": "#/definitions/ErrorCode" - } - } - }, - "x-ms-examples": { - "Reset data ingestion status by data feed to backfill data": { - "$ref": "./examples/resetDataFeedIngestionStatus.json" - } - } - } - }, - "/dataFeeds/{dataFeedId}/ingestionProgress": { - "get": { - "tags": [ - "IngestionStatus" - ], - "summary": "Get data last success ingestion job timestamp by data feed", - "operationId": "getIngestionProgress", - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "path", - "name": "dataFeedId", - "description": "The data feed unique id", - "required": true, - "type": "string", - "format": "uuid" - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/DataFeedIngestionProgress" - } - }, - "default": { - "description": "Client error or server error (4xx or 5xx)", - "schema": { - "$ref": "#/definitions/ErrorCode" - } - } - }, - "x-ms-examples": { - "Get data last success ingestion job timestamp by data feed": { - "$ref": "./examples/getIngestionProgress.json" - } - } - } - }, - "/metrics/{metricId}/data/query": { - "post": { - "tags": [ - "Metric" - ], - "summary": "Get time series data from metric", - "operationId": "getMetricData", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "path", - "name": "metricId", - "description": "metric unique id", - "required": true, - "type": "string", - "format": "uuid" - }, - { - "in": "body", - "name": "body", - "description": "query time series data condition", - "required": true, - "schema": { - "$ref": "#/definitions/MetricDataQueryOptions" - } - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/MetricDataList" - } - }, - "default": { - "description": "Client error or server error (4xx or 5xx)", - "schema": { - "$ref": "#/definitions/ErrorCode" - } - } - }, - "x-ms-examples": { - "Get time series data from metric": { - "$ref": "./examples/getMetricData.json" - } - } - } - }, - "/metrics/{metricId}/series/query": { - "post": { - "tags": [ - "Metric" - ], - "summary": "List series (dimension combinations) from metric", - "operationId": "getMetricSeries", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "path", - "name": "metricId", - "description": "metric unique id", - "required": true, - "type": "string", - "format": "uuid" - }, - { - "in": "query", - "name": "$skip", - "description": "for paging, skipped number", - "type": "integer", - "format": "int32" - }, - { - "in": "query", - "name": "$maxpagesize", - "description": "the maximum number of items in one page", - "type": "integer", - "format": "int32" - }, - { - "in": "body", - "name": "body", - "description": "filter to query series", - "required": true, - "schema": { - "$ref": "#/definitions/MetricSeriesQueryOptions" - } - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/MetricSeriesList" - } - }, - "default": { - "description": "Client error or server error (4xx or 5xx)", - "schema": { - "$ref": "#/definitions/ErrorCode" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "@nextLink" - }, - "x-ms-examples": { - "List series (dimension combinations) from metric": { - "$ref": "./examples/getMetricSeries.json" - } - } - } - }, - "/metrics/{metricId}/dimension/query": { - "post": { - "tags": [ - "Metric" - ], - "summary": "List dimension from certain metric", - "operationId": "getMetricDimension", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "path", - "name": "metricId", - "description": "metric unique id", - "required": true, - "type": "string", - "format": "uuid" - }, - { - "in": "query", - "name": "$skip", - "description": "for paging, skipped number", - "type": "integer", - "format": "int32" - }, - { - "in": "query", - "name": "$maxpagesize", - "description": "the maximum number of items in one page", - "type": "integer", - "format": "int32" - }, - { - "in": "body", - "name": "body", - "description": "query dimension option", - "required": true, - "schema": { - "$ref": "#/definitions/MetricDimensionQueryOptions" - } - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/MetricDimensionList" - } - }, - "default": { - "description": "Client error or server error (4xx or 5xx)", - "schema": { - "$ref": "#/definitions/ErrorCode" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "@nextLink" - }, - "x-ms-examples": { - "List dimension from certain metric": { - "$ref": "./examples/getMetricDimension.json" - } - } - } - }, - "/metrics/{metricId}/enrichment/anomalyDetection/configurations": { - "get": { - "tags": [ - "Metric" - ], - "summary": "Query all anomaly detection configurations for specific metric", - "operationId": "getAnomalyDetectionConfigurationsByMetric", - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "path", - "name": "metricId", - "description": "metric unique id", - "required": true, - "type": "string", - "format": "uuid" - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/AnomalyDetectionConfigurationList" - } - }, - "default": { - "description": "Client error or server error (4xx or 5xx)", - "schema": { - "$ref": "#/definitions/ErrorCode" - } - } - }, - "x-ms-examples": { - "Query all anomaly detection configurations for specific metric": { - "$ref": "./examples/getAnomalyDetectionConfigurationsByMetric.json" - } - } - } - }, - "/metrics/{metricId}/status/enrichment/anomalyDetection/query": { - "post": { - "tags": [ - "Metric" - ], - "summary": "Query anomaly detection status", - "operationId": "getEnrichmentStatusByMetric", - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "parameters": [ - { - "in": "path", - "name": "metricId", - "description": "metric unique id", - "required": true, - "type": "string", - "format": "uuid" - }, - { - "in": "query", - "name": "$skip", - "description": "for paging, skipped number", - "type": "integer", - "format": "int32" - }, - { - "in": "query", - "name": "$maxpagesize", - "description": "the maximum number of items in one page", - "type": "integer", - "format": "int32" - }, - { - "in": "body", - "name": "body", - "description": "query options", - "required": true, - "schema": { - "$ref": "#/definitions/EnrichmentStatusQueryOption" - } - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/EnrichmentStatusList" - } - }, - "default": { - "description": "Client error or server error (4xx or 5xx)", - "schema": { - "$ref": "#/definitions/ErrorCode" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "@nextLink" - }, - "x-ms-examples": { - "Query anomaly detection status": { - "$ref": "./examples/getEnrichmentStatusByMetric.json" - } - } - } - } - }, - "definitions": { - "UsageStats": { - "type": "object", - "properties": { - "timestamp": { - "format": "date-time", - "description": "The timestamp of the stats", - "type": "string", - "readOnly": true - }, - "activeSeriesCount": { - "format": "int32", - "description": "The active series count", - "type": "integer", - "readOnly": true - }, - "allSeriesCount": { - "format": "int32", - "description": "All series count under non deleted data feed", - "type": "integer", - "readOnly": true - }, - "metricsCount": { - "format": "int32", - "description": "The metrics count under non deleted data feed", - "type": "integer", - "readOnly": true - }, - "dataFeedCount": { - "format": "int32", - "description": "The count of non deleted data feed", - "type": "integer", - "readOnly": true - } - } - }, - "ErrorCode": { - "type": "object", - "properties": { - "message": { - "type": "string" - }, - "code": { - "type": "string" - } - } - }, - "DimensionGroupIdentity": { - "required": [ - "dimension" - ], - "type": "object", - "properties": { - "dimension": { - "description": "dimension specified for series group", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } - }, - "TopNGroupScope": { - "required": [ - "minTopCount", - "period", - "top" - ], - "type": "object", - "properties": { - "top": { - "format": "int32", - "description": "top N, value range : [1, +∞)", - "type": "integer" - }, - "period": { - "format": "int32", - "description": "point count used to look back, value range : [1, +∞)", - "type": "integer" - }, - "minTopCount": { - "format": "int32", - "description": "min count should be in top N, value range : [1, +∞)\r\n\r\nshould be less than or equal to period", - "type": "integer" - } - } - }, - "SeverityCondition": { - "required": [ - "maxAlertSeverity", - "minAlertSeverity" - ], - "type": "object", - "properties": { - "minAlertSeverity": { - "description": "min alert severity", - "enum": [ - "Low", - "Medium", - "High" - ], - "type": "string", - "x-ms-enum": { - "name": "Severity", - "modelAsString": true - } - }, - "maxAlertSeverity": { - "description": "max alert severity", - "enum": [ - "Low", - "Medium", - "High" - ], - "type": "string", - "x-ms-enum": { - "name": "Severity", - "modelAsString": true - } - } - } - }, - "AlertSnoozeCondition": { - "required": [ - "autoSnooze", - "onlyForSuccessive", - "snoozeScope" - ], - "type": "object", - "properties": { - "autoSnooze": { - "format": "int32", - "description": "snooze point count, value range : [0, +∞)", - "type": "integer" - }, - "snoozeScope": { - "description": "snooze scope", - "enum": [ - "Metric", - "Series" - ], - "type": "string", - "x-ms-enum": { - "name": "SnoozeScope", - "modelAsString": true - } - }, - "onlyForSuccessive": { - "description": "only snooze for successive anomalies", - "type": "boolean" - } - } - }, - "ValueCondition": { - "required": [ - "direction" - ], - "type": "object", - "properties": { - "lower": { - "format": "double", - "description": "lower bound\r\n\r\nshould be specified when direction is Both or Down", - "type": "number" - }, - "upper": { - "format": "double", - "description": "upper bound\r\n\r\nshould be specified when direction is Both or Up", - "type": "number" - }, - "direction": { - "description": "value filter direction", - "enum": [ - "Both", - "Down", - "Up" - ], - "type": "string", - "x-ms-enum": { - "name": "Direction", - "modelAsString": true - } - }, - "type": { - "description": "data used to implement value filter", - "default": "Value", - "enum": [ - "Value", - "Mean" - ], - "type": "string", - "x-ms-enum": { - "name": "ValueType", - "modelAsString": true - } - }, - "metricId": { - "format": "uuid", - "description": "the other metric unique id used for value filter", - "type": "string" - }, - "triggerForMissing": { - "description": "trigger alert when the corresponding point is missing in the other metric\r\n\r\nshould be specified only when using other metric to filter", - "type": "boolean" - } - } - }, - "MetricAlertingConfiguration": { - "required": [ - "anomalyDetectionConfigurationId", - "anomalyScopeType" - ], - "type": "object", - "properties": { - "anomalyDetectionConfigurationId": { - "format": "uuid", - "description": "Anomaly detection configuration unique id", - "type": "string" - }, - "anomalyScopeType": { - "description": "Anomaly scope", - "enum": [ - "All", - "Dimension", - "TopN" - ], - "type": "string", - "example": "All", - "x-ms-enum": { - "name": "AnomalyScope", - "modelAsString": true - } - }, - "negationOperation": { - "description": "Negation operation", - "default": false, - "type": "boolean" - }, - "dimensionAnomalyScope": { - "$ref": "#/definitions/DimensionGroupIdentity" - }, - "topNAnomalyScope": { - "$ref": "#/definitions/TopNGroupScope" - }, - "severityFilter": { - "$ref": "#/definitions/SeverityCondition" - }, - "snoozeFilter": { - "$ref": "#/definitions/AlertSnoozeCondition" - }, - "valueFilter": { - "$ref": "#/definitions/ValueCondition" - } - } - }, - "AnomalyAlertingConfiguration": { - "required": [ - "hookIds", - "metricAlertingConfigurations", - "name" - ], - "type": "object", - "properties": { - "anomalyAlertingConfigurationId": { - "format": "uuid", - "description": "anomaly alerting configuration unique id", - "type": "string", - "readOnly": true - }, - "name": { - "description": "anomaly alerting configuration name", - "type": "string" - }, - "description": { - "description": "anomaly alerting configuration description", - "default": "", - "type": "string" - }, - "crossMetricsOperator": { - "description": "cross metrics operator\r\n\r\nshould be specified when setting up multiple metric alerting configurations", - "enum": [ - "AND", - "OR", - "XOR" - ], - "type": "string", - "x-ms-enum": { - "name": "AnomalyAlertingConfigurationLogicType", - "modelAsString": true - } - }, - "splitAlertByDimensions": { - "description": "dimensions used to split alert", - "uniqueItems": true, - "type": "array", - "items": { - "type": "string" - } - }, - "hookIds": { - "description": "hook unique ids", - "uniqueItems": true, - "type": "array", - "items": { - "format": "uuid", - "type": "string" - } - }, - "metricAlertingConfigurations": { - "description": "Anomaly alerting configurations", - "uniqueItems": true, - "type": "array", - "items": { - "$ref": "#/definitions/MetricAlertingConfiguration" - } - } - }, - "example": { - "name": "alerting configuration name", - "crossMetricsOperator": "AND", - "hookIds": [ - "00000000-0000-0000-0000-000000000001" - ], - "metricAlertingConfigurations": [ - { - "anomalyDetectionConfigurationId": "33333333-3333-3333-3333-000000000001", - "anomalyScopeType": "All", - "negationOperation": false, - "severityFilter": { - "minAlertSeverity": "Medium", - "maxAlertSeverity": "High" - }, - "snoozeFilter": { - "autoSnooze": 0, - "snoozeScope": "Series", - "onlyForSuccessive": true - } - }, - { - "anomalyDetectionConfigurationId": "33333333-3333-3333-3333-000000000002", - "anomalyScopeType": "Dimension", - "negationOperation": false, - "dimensionAnomalyScope": { - "dimension": { - "city": "Beijing" - } - }, - "severityFilter": { - "minAlertSeverity": "Low", - "maxAlertSeverity": "High" - }, - "snoozeFilter": { - "autoSnooze": 0, - "snoozeScope": "Series", - "onlyForSuccessive": true - }, - "valueFilter": { - "lower": 0.0, - "upper": 1000.0, - "direction": "Both", - "type": "Value" - } - } - ] - } - }, - "AnomalyAlertingConfigurationPatch": { - "type": "object", - "properties": { - "name": { - "description": "Anomaly alerting configuration name", - "type": "string" - }, - "description": { - "description": "anomaly alerting configuration description", - "default": "", - "type": "string" - }, - "crossMetricsOperator": { - "description": "cross metrics operator", - "enum": [ - "AND", - "OR", - "XOR" - ], - "type": "string", - "x-ms-enum": { - "name": "AnomalyAlertingConfigurationLogicType", - "modelAsString": true - } - }, - "splitAlertByDimensions": { - "description": "dimensions used to split alert", - "uniqueItems": true, - "type": "array", - "items": { - "type": "string" - } - }, - "hookIds": { - "description": "hook unique ids", - "uniqueItems": true, - "type": "array", - "items": { - "format": "uuid", - "type": "string" - } - }, - "metricAlertingConfigurations": { - "description": "Anomaly alerting configurations", - "uniqueItems": true, - "type": "array", - "items": { - "$ref": "#/definitions/MetricAlertingConfiguration" - } - } - }, - "example": { - "name": "alerting configuration name", - "description": "this is an anomaly alerting configuration", - "crossMetricsOperator": "AND", - "hookIds": [ - "00000000-0000-0000-0000-000000000001" - ], - "metricAlertingConfigurations": [ - { - "anomalyDetectionConfigurationId": "33333333-3333-3333-3333-000000000001", - "anomalyScopeType": "All", - "negationOperation": false, - "severityFilter": { - "minAlertSeverity": "Medium", - "maxAlertSeverity": "High" - }, - "snoozeFilter": { - "autoSnooze": 0, - "snoozeScope": "Series", - "onlyForSuccessive": true - } - }, - { - "anomalyDetectionConfigurationId": "33333333-3333-3333-3333-000000000002", - "anomalyScopeType": "Dimension", - "negationOperation": false, - "dimensionAnomalyScope": { - "dimension": { - "city": "Beijing" - } - }, - "severityFilter": { - "minAlertSeverity": "Low", - "maxAlertSeverity": "High" - }, - "snoozeFilter": { - "autoSnooze": 0, - "snoozeScope": "Series", - "onlyForSuccessive": true - }, - "valueFilter": { - "lower": 0.0, - "upper": 1000.0, - "direction": "Both" - } - } - ] - } - }, - "AlertingResultQuery": { - "required": [ - "endTime", - "startTime", - "timeMode" - ], - "type": "object", - "properties": { - "startTime": { - "format": "date-time", - "description": "start time", - "type": "string" - }, - "endTime": { - "format": "date-time", - "description": "end time", - "type": "string" - }, - "timeMode": { - "description": "time mode", - "enum": [ - "AnomalyTime", - "CreatedTime", - "ModifiedTime" - ], - "type": "string", - "x-ms-enum": { - "name": "TimeMode", - "modelAsString": true - } - } - }, - "example": { - "startTime": "2020-01-01T00:00:00Z", - "endTime": "2020-02-01T00:00:00Z", - "timeMode": "AnomalyTime" - } - }, - "AlertResult": { - "type": "object", - "properties": { - "alertId": { - "description": "alert id", - "type": "string", - "readOnly": true - }, - "timestamp": { - "format": "date-time", - "description": "anomaly time", - "type": "string", - "readOnly": true - }, - "createdTime": { - "format": "date-time", - "description": "created time", - "type": "string", - "readOnly": true - }, - "modifiedTime": { - "format": "date-time", - "description": "modified time", - "type": "string", - "readOnly": true - } - } - }, - "AlertResultList": { - "required": [ - "value" - ], - "type": "object", - "properties": { - "@nextLink": { - "type": "string", - "readOnly": true - }, - "value": { - "type": "array", - "items": { - "$ref": "#/definitions/AlertResult" - } - } - } - }, - "AnomalyProperty": { - "required": [ - "anomalySeverity" - ], - "type": "object", - "properties": { - "anomalySeverity": { - "description": "anomaly severity", - "enum": [ - "Low", - "Medium", - "High" - ], - "type": "string", - "x-ms-enum": { - "name": "Severity", - "modelAsString": true - } - }, - "anomalyStatus": { - "description": "anomaly status\r\n\r\nonly return for alerting anomaly result", - "enum": [ - "Active", - "Resolved" - ], - "type": "string", - "readOnly": true, - "x-ms-enum": { - "name": "AnomalyStatus", - "modelAsString": true - } - }, - "value": { - "format": "double", - "description": "value of the anomaly", - "type": "number", - "readOnly": true - }, - "expectedValue": { - "format": "double", - "description": "expected value of the anomaly given by smart detector", - "type": "number", - "readOnly": true - } - } - }, - "AnomalyResult": { - "required": [ - "dimension", - "property", - "timestamp" - ], - "type": "object", - "properties": { - "metricId": { - "format": "uuid", - "description": "metric unique id\r\n\r\nonly return for alerting anomaly result", - "type": "string", - "readOnly": true - }, - "anomalyDetectionConfigurationId": { - "format": "uuid", - "description": "anomaly detection configuration unique id\r\n\r\nonly return for alerting anomaly result", - "type": "string", - "readOnly": true - }, - "timestamp": { - "format": "date-time", - "description": "anomaly time", - "type": "string" - }, - "createdTime": { - "format": "date-time", - "description": "created time\r\n\r\nonly return for alerting result", - "type": "string", - "readOnly": true - }, - "modifiedTime": { - "format": "date-time", - "description": "modified time\r\n\r\nonly return for alerting result", - "type": "string", - "readOnly": true - }, - "dimension": { - "description": "dimension specified for series", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "property": { - "$ref": "#/definitions/AnomalyProperty" - } - } - }, - "AnomalyResultList": { - "required": [ - "value" - ], - "type": "object", - "properties": { - "@nextLink": { - "type": "string", - "readOnly": true - }, - "value": { - "type": "array", - "items": { - "$ref": "#/definitions/AnomalyResult" - } - } - } - }, - "SeriesIdentity": { - "required": [ - "dimension" - ], - "type": "object", - "properties": { - "dimension": { - "description": "dimension specified for series", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } - }, - "IncidentProperty": { - "required": [ - "maxSeverity" - ], - "type": "object", - "properties": { - "maxSeverity": { - "description": "max severity of latest anomalies in the incident", - "enum": [ - "Low", - "Medium", - "High" - ], - "type": "string", - "x-ms-enum": { - "name": "Severity", - "modelAsString": true - } - }, - "incidentStatus": { - "description": "incident status\r\n\r\nonly return for alerting incident result", - "enum": [ - "Active", - "Resolved" - ], - "type": "string", - "readOnly": true, - "x-ms-enum": { - "name": "IncidentStatus", - "modelAsString": true - } - }, - "valueOfRootNode": { - "format": "double", - "description": "value of the root node", - "type": "number", - "readOnly": true - }, - "expectedValueOfRootNode": { - "format": "double", - "description": "expected value of the root node given by smart detector", - "type": "number", - "readOnly": true - } - } - }, - "IncidentResult": { - "required": [ - "incidentId", - "lastTime", - "property", - "rootNode", - "startTime" - ], - "type": "object", - "properties": { - "metricId": { - "format": "uuid", - "description": "metric unique id\r\n\r\nonly return for alerting incident result", - "type": "string", - "readOnly": true - }, - "anomalyDetectionConfigurationId": { - "format": "uuid", - "description": "anomaly detection configuration unique id\r\n\r\nonly return for alerting incident result", - "type": "string", - "readOnly": true - }, - "incidentId": { - "description": "incident id", - "type": "string" - }, - "startTime": { - "format": "date-time", - "description": "incident start time", - "type": "string" - }, - "lastTime": { - "format": "date-time", - "description": "incident last time", - "type": "string" - }, - "rootNode": { - "$ref": "#/definitions/SeriesIdentity" - }, - "property": { - "$ref": "#/definitions/IncidentProperty" - } - } - }, - "IncidentResultList": { - "required": [ - "value" - ], - "type": "object", - "properties": { - "@nextLink": { - "type": "string", - "readOnly": true - }, - "value": { - "type": "array", - "items": { - "$ref": "#/definitions/IncidentResult" - } - } - } - }, - "SuppressCondition": { - "required": [ - "minNumber", - "minRatio" - ], - "type": "object", - "properties": { - "minNumber": { - "format": "int32", - "description": "min point number, value range : [1, +∞)", - "type": "integer" - }, - "minRatio": { - "format": "double", - "description": "min point ratio, value range : (0, 100]", - "type": "number" - } - } - }, - "SmartDetectionCondition": { - "required": [ - "anomalyDetectorDirection", - "sensitivity", - "suppressCondition" - ], - "type": "object", - "properties": { - "sensitivity": { - "format": "double", - "description": "sensitivity, value range : (0, 100]", - "type": "number" - }, - "anomalyDetectorDirection": { - "description": "detection direction", - "enum": [ - "Both", - "Down", - "Up" - ], - "type": "string", - "x-ms-enum": { - "name": "AnomalyDetectorDirection", - "modelAsString": true - } - }, - "suppressCondition": { - "$ref": "#/definitions/SuppressCondition" - } - } - }, - "HardThresholdCondition": { - "required": [ - "anomalyDetectorDirection", - "suppressCondition" - ], - "type": "object", - "properties": { - "lowerBound": { - "format": "double", - "description": "lower bound\r\n\r\nshould be specified when anomalyDetectorDirection is Both or Down", - "type": "number" - }, - "upperBound": { - "format": "double", - "description": "upper bound\r\n\r\nshould be specified when anomalyDetectorDirection is Both or Up", - "type": "number" - }, - "anomalyDetectorDirection": { - "description": "detection direction", - "enum": [ - "Both", - "Down", - "Up" - ], - "type": "string", - "x-ms-enum": { - "name": "AnomalyDetectorDirection", - "modelAsString": true - } - }, - "suppressCondition": { - "$ref": "#/definitions/SuppressCondition" - } - } - }, - "ChangeThresholdCondition": { - "required": [ - "anomalyDetectorDirection", - "changePercentage", - "shiftPoint", - "suppressCondition", - "withinRange" - ], - "type": "object", - "properties": { - "changePercentage": { - "format": "double", - "description": "change percentage, value range : [0, +∞)", - "type": "number" - }, - "shiftPoint": { - "format": "int32", - "description": "shift point, value range : [1, +∞)", - "type": "integer" - }, - "withinRange": { - "description": "if the withinRange = true, detected data is abnormal when the value falls in the range, in this case anomalyDetectorDirection must be Both\r\nif the withinRange = false, detected data is abnormal when the value falls out of the range", - "type": "boolean" - }, - "anomalyDetectorDirection": { - "description": "detection direction", - "enum": [ - "Both", - "Down", - "Up" - ], - "type": "string", - "x-ms-enum": { - "name": "AnomalyDetectorDirection", - "modelAsString": true - } - }, - "suppressCondition": { - "$ref": "#/definitions/SuppressCondition" - } - } - }, - "WholeMetricConfiguration": { - "type": "object", - "properties": { - "conditionOperator": { - "description": "condition operator\r\n\r\nshould be specified when combining multiple detection conditions", - "enum": [ - "AND", - "OR" - ], - "type": "string", - "x-ms-enum": { - "name": "AnomalyDetectionConfigurationLogicType", - "modelAsString": true - } - }, - "smartDetectionCondition": { - "$ref": "#/definitions/SmartDetectionCondition" - }, - "hardThresholdCondition": { - "$ref": "#/definitions/HardThresholdCondition" - }, - "changeThresholdCondition": { - "$ref": "#/definitions/ChangeThresholdCondition" - } - } - }, - "DimensionGroupConfiguration": { - "required": [ - "group" - ], - "type": "object", - "properties": { - "group": { - "$ref": "#/definitions/DimensionGroupIdentity" - }, - "conditionOperator": { - "description": "condition operator\r\n\r\nshould be specified when combining multiple detection conditions", - "enum": [ - "AND", - "OR" - ], - "type": "string", - "x-ms-enum": { - "name": "AnomalyDetectionConfigurationLogicType", - "modelAsString": true - } - }, - "smartDetectionCondition": { - "$ref": "#/definitions/SmartDetectionCondition" - }, - "hardThresholdCondition": { - "$ref": "#/definitions/HardThresholdCondition" - }, - "changeThresholdCondition": { - "$ref": "#/definitions/ChangeThresholdCondition" - } - } - }, - "SeriesConfiguration": { - "required": [ - "series" - ], - "type": "object", - "properties": { - "series": { - "$ref": "#/definitions/SeriesIdentity" - }, - "conditionOperator": { - "description": "condition operator\r\n\r\nshould be specified when combining multiple detection conditions", - "enum": [ - "AND", - "OR" - ], - "type": "string", - "x-ms-enum": { - "name": "AnomalyDetectionConfigurationLogicType", - "modelAsString": true - } - }, - "smartDetectionCondition": { - "$ref": "#/definitions/SmartDetectionCondition" - }, - "hardThresholdCondition": { - "$ref": "#/definitions/HardThresholdCondition" - }, - "changeThresholdCondition": { - "$ref": "#/definitions/ChangeThresholdCondition" - } - } - }, - "AnomalyDetectionConfiguration": { - "required": [ - "metricId", - "name", - "wholeMetricConfiguration" - ], - "type": "object", - "properties": { - "anomalyDetectionConfigurationId": { - "format": "uuid", - "description": "anomaly detection configuration unique id", - "type": "string", - "readOnly": true - }, - "name": { - "description": "anomaly detection configuration name", - "type": "string" - }, - "description": { - "description": "anomaly detection configuration description", - "default": "", - "type": "string" - }, - "metricId": { - "format": "uuid", - "description": "metric unique id", - "type": "string" - }, - "wholeMetricConfiguration": { - "$ref": "#/definitions/WholeMetricConfiguration" - }, - "dimensionGroupOverrideConfigurations": { - "description": "detection configuration for series group", - "uniqueItems": true, - "type": "array", - "items": { - "$ref": "#/definitions/DimensionGroupConfiguration" - } - }, - "seriesOverrideConfigurations": { - "description": "detection configuration for specific series", - "uniqueItems": true, - "type": "array", - "items": { - "$ref": "#/definitions/SeriesConfiguration" - } - } - }, - "example": { - "name": "Anomaly detection configuration name", - "description": "Anomaly detection configuration description", - "metricId": "22222222-2222-2222-2222-000000000001", - "wholeMetricConfiguration": { - "conditionOperator": "AND", - "smartDetectionCondition": { - "sensitivity": 91.0, - "anomalyDetectorDirection": "Both", - "suppressCondition": { - "minNumber": 1, - "minRatio": 100.0 - } - }, - "hardThresholdCondition": { - "lowerBound": 1.0, - "upperBound": 100.0, - "anomalyDetectorDirection": "Both", - "suppressCondition": { - "minNumber": 1, - "minRatio": 100.0 - } - }, - "changeThresholdCondition": { - "changePercentage": 5.0, - "shiftPoint": 1, - "withinRange": false, - "anomalyDetectorDirection": "Both", - "suppressCondition": { - "minNumber": 1, - "minRatio": 100.0 - } - } - }, - "dimensionGroupOverrideConfigurations": [ - { - "group": { - "dimension": { - "city": "Beijing" - } - }, - "conditionOperator": "AND", - "smartDetectionCondition": { - "sensitivity": 91.0, - "anomalyDetectorDirection": "Both", - "suppressCondition": { - "minNumber": 1, - "minRatio": 100.0 - } - }, - "hardThresholdCondition": { - "lowerBound": 1.0, - "upperBound": 100.0, - "anomalyDetectorDirection": "Both", - "suppressCondition": { - "minNumber": 1, - "minRatio": 100.0 - } - }, - "changeThresholdCondition": { - "changePercentage": 5.0, - "shiftPoint": 1, - "withinRange": false, - "anomalyDetectorDirection": "Both", - "suppressCondition": { - "minNumber": 1, - "minRatio": 100.0 - } - } - } - ], - "seriesOverrideConfigurations": [ - { - "series": { - "dimension": { - "category": "Jewelry", - "city": "Beijing" - } - }, - "conditionOperator": "AND", - "smartDetectionCondition": { - "sensitivity": 91.0, - "anomalyDetectorDirection": "Both", - "suppressCondition": { - "minNumber": 1, - "minRatio": 100.0 - } - }, - "hardThresholdCondition": { - "lowerBound": 1.0, - "upperBound": 100.0, - "anomalyDetectorDirection": "Both", - "suppressCondition": { - "minNumber": 1, - "minRatio": 100.0 - } - }, - "changeThresholdCondition": { - "changePercentage": 5.0, - "shiftPoint": 1, - "withinRange": false, - "anomalyDetectorDirection": "Both", - "suppressCondition": { - "minNumber": 1, - "minRatio": 100.0 - } - } - } - ] - } - }, - "AnomalyDetectionConfigurationPatch": { - "type": "object", - "properties": { - "name": { - "description": "anomaly detection configuration name", - "type": "string" - }, - "description": { - "description": "anomaly detection configuration description", - "default": "", - "type": "string" - }, - "wholeMetricConfiguration": { - "$ref": "#/definitions/WholeMetricConfiguration" - }, - "dimensionGroupOverrideConfigurations": { - "description": "detection configuration for series group", - "uniqueItems": true, - "type": "array", - "items": { - "$ref": "#/definitions/DimensionGroupConfiguration" - } - }, - "seriesOverrideConfigurations": { - "description": "detection configuration for specific series", - "uniqueItems": true, - "type": "array", - "items": { - "$ref": "#/definitions/SeriesConfiguration" - } - } - }, - "example": { - "name": "Anomaly detection configuration name", - "description": "Anomaly detection configuration description", - "wholeMetricConfiguration": { - "conditionOperator": "AND", - "smartDetectionCondition": { - "sensitivity": 91.0, - "anomalyDetectorDirection": "Both", - "suppressCondition": { - "minNumber": 1, - "minRatio": 100.0 - } - }, - "hardThresholdCondition": { - "lowerBound": 1.0, - "upperBound": 100.0, - "anomalyDetectorDirection": "Both", - "suppressCondition": { - "minNumber": 1, - "minRatio": 100.0 - } - }, - "changeThresholdCondition": { - "changePercentage": 5.0, - "shiftPoint": 1, - "withinRange": false, - "anomalyDetectorDirection": "Both", - "suppressCondition": { - "minNumber": 1, - "minRatio": 100.0 - } - } - }, - "dimensionGroupOverrideConfigurations": [ - { - "group": { - "dimension": { - "city": "Beijing" - } - }, - "conditionOperator": "AND", - "smartDetectionCondition": { - "sensitivity": 91.0, - "anomalyDetectorDirection": "Both", - "suppressCondition": { - "minNumber": 1, - "minRatio": 100.0 - } - }, - "hardThresholdCondition": { - "lowerBound": 1.0, - "upperBound": 100.0, - "anomalyDetectorDirection": "Both", - "suppressCondition": { - "minNumber": 1, - "minRatio": 100.0 - } - }, - "changeThresholdCondition": { - "changePercentage": 5.0, - "shiftPoint": 1, - "withinRange": false, - "anomalyDetectorDirection": "Both", - "suppressCondition": { - "minNumber": 1, - "minRatio": 100.0 - } - } - } - ], - "seriesOverrideConfigurations": [ - { - "series": { - "dimension": { - "category": "Jewelry", - "city": "Beijing" - } - }, - "conditionOperator": "AND", - "smartDetectionCondition": { - "sensitivity": 91.0, - "anomalyDetectorDirection": "Both", - "suppressCondition": { - "minNumber": 1, - "minRatio": 100.0 - } - }, - "hardThresholdCondition": { - "lowerBound": 1.0, - "upperBound": 100.0, - "anomalyDetectorDirection": "Both", - "suppressCondition": { - "minNumber": 1, - "minRatio": 100.0 - } - }, - "changeThresholdCondition": { - "changePercentage": 5.0, - "shiftPoint": 1, - "withinRange": false, - "anomalyDetectorDirection": "Both", - "suppressCondition": { - "minNumber": 1, - "minRatio": 100.0 - } - } - } - ] - } - }, - "AnomalyAlertingConfigurationList": { - "required": [ - "value" - ], - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/definitions/AnomalyAlertingConfiguration" - } - } - } - }, - "DetectionSeriesQuery": { - "required": [ - "endTime", - "series", - "startTime" - ], - "type": "object", - "properties": { - "startTime": { - "format": "date-time", - "description": "start time", - "type": "string" - }, - "endTime": { - "format": "date-time", - "description": "end time", - "type": "string" - }, - "series": { - "description": "series", - "uniqueItems": true, - "type": "array", - "items": { - "$ref": "#/definitions/SeriesIdentity" - } - } - }, - "example": { - "startTime": "2020-01-01T00:00:00Z", - "endTime": "2020-02-01T00:00:00Z", - "series": [ - { - "dimension": { - "category": "Jewelry", - "city": "Beijing" - } - } - ] - } - }, - "SeriesResult": { - "required": [ - "expectedValueList", - "isAnomalyList", - "lowerBoundaryList", - "periodList", - "series", - "timestampList", - "upperBoundaryList", - "valueList" - ], - "type": "object", - "properties": { - "series": { - "$ref": "#/definitions/SeriesIdentity" - }, - "timestampList": { - "description": "timestamps of the series", - "type": "array", - "items": { - "format": "date-time", - "type": "string" - } - }, - "valueList": { - "description": "values of the series", - "type": "array", - "items": { - "format": "double", - "type": "number" - } - }, - "isAnomalyList": { - "description": "whether points of the series are anomalies", - "type": "array", - "items": { - "type": "boolean" - } - }, - "periodList": { - "description": "period calculated on each point of the series", - "type": "array", - "items": { - "format": "int32", - "type": "integer" - } - }, - "expectedValueList": { - "description": "expected values of the series given by smart detector", - "type": "array", - "items": { - "format": "double", - "type": "number" - } - }, - "lowerBoundaryList": { - "description": "lower boundary list of the series given by smart detector", - "type": "array", - "items": { - "format": "double", - "type": "number" - } - }, - "upperBoundaryList": { - "description": "upper boundary list of the series given by smart detector", - "type": "array", - "items": { - "format": "double", - "type": "number" - } - } - } - }, - "SeriesResultList": { - "required": [ - "value" - ], - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/definitions/SeriesResult" - } - } - } - }, - "SeverityFilterCondition": { - "required": [ - "max", - "min" - ], - "type": "object", - "properties": { - "min": { - "description": "min severity", - "enum": [ - "Low", - "Medium", - "High" - ], - "type": "string", - "x-ms-enum": { - "name": "Severity", - "modelAsString": true - } - }, - "max": { - "description": "max severity", - "enum": [ - "Low", - "Medium", - "High" - ], - "type": "string", - "x-ms-enum": { - "name": "Severity", - "modelAsString": true - } - } - } - }, - "DetectionAnomalyFilterCondition": { - "type": "object", - "properties": { - "dimensionFilter": { - "description": "dimension filter", - "uniqueItems": true, - "type": "array", - "items": { - "$ref": "#/definitions/DimensionGroupIdentity" - } - }, - "severityFilter": { - "$ref": "#/definitions/SeverityFilterCondition" - } - } - }, - "DetectionAnomalyResultQuery": { - "required": [ - "endTime", - "startTime" - ], - "type": "object", - "properties": { - "startTime": { - "format": "date-time", - "description": "start time", - "type": "string" - }, - "endTime": { - "format": "date-time", - "description": "end time", - "type": "string" - }, - "filter": { - "$ref": "#/definitions/DetectionAnomalyFilterCondition" - } - }, - "example": { - "startTime": "2020-01-01T00:00:00Z", - "endTime": "2020-02-01T00:00:00Z", - "filter": { - "dimensionFilter": [ - { - "dimension": { - "city": "Beijing" - } - } - ], - "severityFilter": { - "min": "Low", - "max": "High" - } - } - } - }, - "AnomalyDimensionQuery": { - "required": [ - "dimensionName", - "endTime", - "startTime" - ], - "type": "object", - "properties": { - "startTime": { - "format": "date-time", - "description": "start time", - "type": "string" - }, - "endTime": { - "format": "date-time", - "description": "end time", - "type": "string" - }, - "dimensionName": { - "description": "dimension to query", - "type": "string" - }, - "dimensionFilter": { - "$ref": "#/definitions/DimensionGroupIdentity" - } - }, - "example": { - "startTime": "2020-01-01T00:00:00Z", - "endTime": "2020-02-01T00:00:00Z", - "dimensionName": "category", - "dimensionFilter": { - "dimension": { - "city": "Beijing" - } - } - } - }, - "AnomalyDimensionList": { - "required": [ - "value" - ], - "type": "object", - "properties": { - "@nextLink": { - "type": "string", - "readOnly": true - }, - "value": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "DetectionIncidentFilterCondition": { - "type": "object", - "properties": { - "dimensionFilter": { - "description": "dimension filter", - "uniqueItems": true, - "type": "array", - "items": { - "$ref": "#/definitions/DimensionGroupIdentity" - } - } - } - }, - "DetectionIncidentResultQuery": { - "required": [ - "endTime", - "startTime" - ], - "type": "object", - "properties": { - "startTime": { - "format": "date-time", - "description": "start time", - "type": "string" - }, - "endTime": { - "format": "date-time", - "description": "end time", - "type": "string" - }, - "filter": { - "$ref": "#/definitions/DetectionIncidentFilterCondition" - } - }, - "example": { - "startTime": "2020-01-01T00:00:00Z", - "endTime": "2020-02-01T00:00:00Z", - "filter": { - "dimensionFilter": [ - { - "dimension": { - "city": "Beijing" - } - } - ] - } - } - }, - "RootCause": { - "required": [ - "description", - "path", - "rootCause", - "score" - ], - "type": "object", - "properties": { - "rootCause": { - "$ref": "#/definitions/DimensionGroupIdentity" - }, - "path": { - "description": "drilling down path from query anomaly to root cause", - "type": "array", - "items": { - "type": "string" - } - }, - "score": { - "format": "double", - "description": "score of the root cause", - "type": "number" - }, - "description": { - "description": "description of the root cause", - "type": "string" - } - } - }, - "RootCauseList": { - "required": [ - "value" - ], - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/definitions/RootCause" - } - } - } - }, - "AzureSQLConnectionStringParam": { - "required": [ - "connectionString" - ], - "type": "object", - "properties": { - "connectionString": { - "description": "The connection string to access the Azure SQL.", - "type": "string" - } - } - }, - "DataSourceCredential": { - "required": [ - "dataSourceCredentialName", - "dataSourceCredentialType" - ], - "type": "object", - "properties": { - "dataSourceCredentialType": { - "description": "Type of data source credential", - "enum": [ - "AzureSQLConnectionString", - "DataLakeGen2SharedKey", - "ServicePrincipal", - "ServicePrincipalInKV" - ], - "type": "string", - "x-ms-enum": { - "name": "DataSourceCredentialType", - "modelAsString": true - } - }, - "dataSourceCredentialId": { - "format": "uuid", - "description": "Unique id of data source credential", - "type": "string", - "readOnly": true - }, - "dataSourceCredentialName": { - "description": "Name of data source credential", - "type": "string" - }, - "dataSourceCredentialDescription": { - "description": "Description of data source credential", - "type": "string" - } - }, - "discriminator": "dataSourceCredentialType", - "example": { - "parameters": { - "clientId": "88888888-8888-8888-8888-888888888888", - "clientSecret": "fake-client-secret", - "tenantId": "12345678-1234-1234-1234-123456788888" - }, - "dataSourceCredentialName": "A data source credential", - "dataSourceCredentialDescription": "This is a data source credential", - "dataSourceCredentialType": "ServicePrincipal" - } - }, - "AzureSQLConnectionStringCredential": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/DataSourceCredential" - } - ], - "properties": { - "parameters": { - "$ref": "#/definitions/AzureSQLConnectionStringParam" - } - }, - "x-ms-discriminator-value": "AzureSQLConnectionString" - }, - "DataLakeGen2SharedKeyParam": { - "required": [ - "accountKey" - ], - "type": "object", - "properties": { - "accountKey": { - "description": "The account key to access the Azure Data Lake Storage Gen2.", - "type": "string" - } - } - }, - "DataLakeGen2SharedKeyCredential": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/DataSourceCredential" - } - ], - "properties": { - "parameters": { - "$ref": "#/definitions/DataLakeGen2SharedKeyParam" - } - }, - "x-ms-discriminator-value": "DataLakeGen2SharedKey" - }, - "ServicePrincipalParam": { - "required": [ - "clientId", - "clientSecret", - "tenantId" - ], - "type": "object", - "properties": { - "clientId": { - "description": "The client id of the service principal.", - "type": "string" - }, - "clientSecret": { - "description": "The client secret of the service principal.", - "type": "string" - }, - "tenantId": { - "description": "The tenant id of the service principal.", - "type": "string" - } - } - }, - "ServicePrincipalCredential": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/DataSourceCredential" - } - ], - "properties": { - "parameters": { - "$ref": "#/definitions/ServicePrincipalParam" - } - }, - "x-ms-discriminator-value": "ServicePrincipal" - }, - "ServicePrincipalInKVParam": { - "required": [ - "keyVaultClientId", - "keyVaultClientSecret", - "keyVaultEndpoint", - "servicePrincipalIdNameInKV", - "servicePrincipalSecretNameInKV", - "tenantId" - ], - "type": "object", - "properties": { - "keyVaultEndpoint": { - "description": "The Key Vault endpoint that storing the service principal.", - "type": "string" - }, - "keyVaultClientId": { - "description": "The Client Id to access the Key Vault.", - "type": "string" - }, - "keyVaultClientSecret": { - "description": "The Client Secret to access the Key Vault.", - "type": "string" - }, - "servicePrincipalIdNameInKV": { - "description": "The secret name of the service principal's client Id in the Key Vault.", - "type": "string" - }, - "servicePrincipalSecretNameInKV": { - "description": "The secret name of the service principal's client secret in the Key Vault.", - "type": "string" - }, - "tenantId": { - "description": "The tenant id of your service principal.", - "type": "string" - } - } - }, - "ServicePrincipalInKVCredential": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/DataSourceCredential" - } - ], - "properties": { - "parameters": { - "$ref": "#/definitions/ServicePrincipalInKVParam" - } - }, - "x-ms-discriminator-value": "ServicePrincipalInKV" - }, - "DataSourceCredentialList": { - "type": "object", - "properties": { - "@nextLink": { - "type": "string", - "readOnly": true - }, - "value": { - "uniqueItems": true, - "type": "array", - "items": { - "$ref": "#/definitions/DataSourceCredential" - }, - "readOnly": true - } - } - }, - "DataSourceCredentialPatch": { - "required": [ - "dataSourceCredentialType" - ], - "type": "object", - "properties": { - "dataSourceCredentialType": { - "description": "Type of data source credential", - "enum": [ - "AzureApplicationInsights", - "AzureBlob", - "AzureCosmosDB", - "AzureDataExplorer", - "AzureDataLakeStorageGen2", - "AzureEventHubs", - "AzureTable", - "Elasticsearch", - "HttpRequest", - "InfluxDB", - "MongoDB", - "MySql", - "PostgreSql", - "SqlServer" - ], - "type": "string", - "x-ms-enum": { - "name": "DataSourceType", - "modelAsString": true - } - }, - "dataSourceCredentialName": { - "description": "Name of data source credential", - "type": "string" - }, - "dataSourceCredentialDescription": { - "description": "Description of data source credential", - "type": "string" - } - }, - "discriminator": "dataSourceCredentialType", - "example": { - "dataSourceCredentialName": "A data source credential", - "dataSourceCredentialDescription": "This is a data source credential", - "dataSourceCredentialType": "AzureApplicationInsights" - } - }, - "AzureSQLConnectionStringCredentialPatch": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/DataSourceCredentialPatch" - } - ], - "properties": { - "parameters": { - "$ref": "#/definitions/AzureSQLConnectionStringParam" - } - }, - "x-ms-discriminator-value": "AzureSQLConnectionString" - }, - "DataLakeGen2SharedKeyCredentialPatch": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/DataSourceCredentialPatch" - } - ], - "properties": { - "parameters": { - "$ref": "#/definitions/DataLakeGen2SharedKeyParam" - } - }, - "x-ms-discriminator-value": "DataLakeGen2SharedKey" - }, - "ServicePrincipalCredentialPatch": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/DataSourceCredentialPatch" - } - ], - "properties": { - "parameters": { - "$ref": "#/definitions/ServicePrincipalParam" - } - }, - "x-ms-discriminator-value": "ServicePrincipal" - }, - "ServicePrincipalInKVCredentialPatch": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/DataSourceCredentialPatch" - } - ], - "properties": { - "parameters": { - "$ref": "#/definitions/ServicePrincipalInKVParam" - } - }, - "x-ms-discriminator-value": "ServicePrincipalInKV" - }, - "AzureApplicationInsightsParameter": { - "required": [ - "apiKey", - "applicationId", - "azureCloud", - "query" - ], - "type": "object", - "properties": { - "azureCloud": { - "description": "Azure cloud environment", - "type": "string" - }, - "applicationId": { - "description": "Azure Application Insights ID", - "type": "string" - }, - "apiKey": { - "description": "API Key", - "type": "string" - }, - "query": { - "description": "Query", - "type": "string" - } - } - }, - "Metric": { - "required": [ - "metricName" - ], - "type": "object", - "properties": { - "metricId": { - "format": "uuid", - "description": "metric id", - "type": "string", - "readOnly": true - }, - "metricName": { - "description": "metric name", - "type": "string" - }, - "metricDisplayName": { - "description": "metric display name", - "pattern": "[.a-zA-Z0-9_-]+", - "type": "string" - }, - "metricDescription": { - "description": "metric description", - "type": "string" - } - } - }, - "Dimension": { - "required": [ - "dimensionName" - ], - "type": "object", - "properties": { - "dimensionName": { - "description": "dimension name", - "type": "string" - }, - "dimensionDisplayName": { - "description": "dimension display name", - "pattern": "[.a-zA-Z0-9_-]+", - "type": "string" - } - } - }, - "DataFeedDetail": { - "required": [ - "dataFeedName", - "dataSourceType", - "dataStartFrom", - "granularityName", - "metrics" - ], - "type": "object", - "properties": { - "dataSourceType": { - "description": "data source type", - "enum": [ - "AzureApplicationInsights", - "AzureBlob", - "AzureCosmosDB", - "AzureDataExplorer", - "AzureDataLakeStorageGen2", - "AzureEventHubs", - "AzureTable", - "Elasticsearch", - "HttpRequest", - "InfluxDB", - "MongoDB", - "MySql", - "PostgreSql", - "SqlServer" - ], - "type": "string", - "x-ms-enum": { - "name": "DataSourceType", - "modelAsString": true - } - }, - "dataFeedId": { - "format": "uuid", - "description": "data feed unique id", - "type": "string", - "readOnly": true - }, - "dataFeedName": { - "description": "data feed name", - "type": "string", - "example": "dummy data feed name" - }, - "dataFeedDescription": { - "description": "data feed description", - "default": "", - "type": "string" - }, - "granularityName": { - "description": "granularity of the time series", - "enum": [ - "Yearly", - "Monthly", - "Weekly", - "Daily", - "Hourly", - "Minutely", - "Secondly", - "Custom" - ], - "type": "string", - "x-ms-enum": { - "name": "Granularity", - "modelAsString": true - } - }, - "granularityAmount": { - "format": "int32", - "description": "if granularity is custom,it is required.", - "type": "integer" - }, - "metrics": { - "description": "measure list", - "uniqueItems": true, - "type": "array", - "items": { - "$ref": "#/definitions/Metric" - } - }, - "dimension": { - "description": "dimension list", - "uniqueItems": true, - "type": "array", - "items": { - "$ref": "#/definitions/Dimension" - } - }, - "timestampColumn": { - "description": "user-defined timestamp column. if timestampColumn is null, start time of every time slice will be used as default value.", - "default": "", - "type": "string" - }, - "dataStartFrom": { - "format": "date-time", - "description": "ingestion start time", - "type": "string" - }, - "startOffsetInSeconds": { - "format": "int64", - "description": "the time that the beginning of data ingestion task will delay for every data slice according to this offset.", - "default": 0, - "type": "integer" - }, - "maxConcurrency": { - "format": "int32", - "description": "the max concurrency of data ingestion queries against user data source. 0 means no limitation.", - "default": -1, - "type": "integer" - }, - "minRetryIntervalInSeconds": { - "format": "int64", - "description": "the min retry interval for failed data ingestion tasks.", - "default": -1, - "type": "integer" - }, - "stopRetryAfterInSeconds": { - "format": "int64", - "description": "stop retry data ingestion after the data slice first schedule time in seconds.", - "default": -1, - "type": "integer" - }, - "needRollup": { - "description": "mark if the data feed need rollup", - "default": "NoRollup", - "enum": [ - "NoRollup", - "NeedRollup", - "AlreadyRollup" - ], - "type": "string", - "x-ms-enum": { - "name": "NeedRollupEnum", - "modelAsString": true - } - }, - "rollUpMethod": { - "description": "roll up method", - "default": "None", - "enum": [ - "None", - "Sum", - "Max", - "Min", - "Avg", - "Count" - ], - "type": "string", - "x-ms-enum": { - "name": "RollUpMethod", - "modelAsString": true - } - }, - "rollUpColumns": { - "description": "roll up columns", - "uniqueItems": true, - "type": "array", - "items": { - "type": "string" - } - }, - "allUpIdentification": { - "description": "the identification value for the row of calculated all-up value.", - "type": "string" - }, - "fillMissingPointType": { - "description": "the type of fill missing point for anomaly detection", - "default": "SmartFilling", - "enum": [ - "SmartFilling", - "PreviousValue", - "CustomValue", - "NoFilling" - ], - "type": "string", - "x-ms-enum": { - "name": "FillMissingPointType", - "modelAsString": true - } - }, - "fillMissingPointValue": { - "format": "double", - "description": "the value of fill missing point for anomaly detection", - "type": "number" - }, - "viewMode": { - "description": "data feed access mode, default is Private", - "default": "Private", - "enum": [ - "Private", - "Public" - ], - "type": "string", - "x-ms-enum": { - "name": "ViewMode", - "modelAsString": true - } - }, - "admins": { - "description": "data feed administrator", - "uniqueItems": true, - "type": "array", - "items": { - "type": "string" - } - }, - "viewers": { - "description": "data feed viewer", - "uniqueItems": true, - "type": "array", - "items": { - "type": "string" - } - }, - "isAdmin": { - "description": "the query user is one of data feed administrator or not", - "type": "boolean", - "readOnly": true - }, - "creator": { - "description": "data feed creator", - "type": "string", - "readOnly": true - }, - "status": { - "description": "data feed status", - "enum": [ - "Active", - "Paused" - ], - "type": "string", - "readOnly": true, - "x-ms-enum": { - "name": "EntityStatus", - "modelAsString": true - } - }, - "createdTime": { - "format": "date-time", - "description": "data feed created time", - "type": "string", - "readOnly": true - }, - "actionLinkTemplate": { - "description": "action link for alert", - "default": "", - "type": "string" - }, - "authenticationType": { - "description": "authentication type for corresponding data source", - "default": "Basic", - "enum": [ - "Basic", - "ManagedIdentity", - "AzureSQLConnectionString", - "DataLakeGen2SharedKey", - "ServicePrincipal", - "ServicePrincipalInKV" - ], - "type": "string", - "x-ms-enum": { - "name": "AuthenticationTypeEnum", - "modelAsString": true - } - }, - "credentialId": { - "description": "The credential entity id", - "type": "string" - } - }, - "discriminator": "dataSourceType", - "example": { - "dataSourceParameter": { - "connectionString": "Server=your_sql_server,1433;Initial Catalog=your_database;Persist Security Info=False;User ID=your_user;Password=your_password;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;", - "query": "select * from your_table where timestamp = @StartTime" - }, - "dataFeedName": "Sample - cost/revenue - city/category", - "dataFeedDescription": "This is a sample data feed.", - "granularityName": "Daily", - "metrics": [ - { - "metricName": "cost", - "metricDisplayName": "cost" - }, - { - "metricName": "revenue", - "metricDisplayName": "revenue" - } - ], - "dimension": [ - { - "dimensionName": "category", - "dimensionDisplayName": "category" - }, - { - "dimensionName": "city", - "dimensionDisplayName": "city" - } - ], - "timestampColumn": "timestamp", - "dataStartFrom": "2020-01-01T00:00:00Z", - "dataSourceType": "SqlServer", - "startOffsetInSeconds": 86400, - "maxConcurrency": 5, - "minRetryIntervalInSeconds": 3600, - "stopRetryAfterInSeconds": 604800, - "needRollup": "NeedRollup", - "rollUpMethod": "Sum", - "allUpIdentification": "__SUM__", - "fillMissingPointType": "SmartFilling", - "viewMode": "Private", - "authenticationType": "Basic" - } - }, - "AzureApplicationInsightsDataFeed": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/DataFeedDetail" - } - ], - "properties": { - "dataSourceParameter": { - "$ref": "#/definitions/AzureApplicationInsightsParameter" - } - }, - "x-ms-discriminator-value": "AzureApplicationInsights" - }, - "AzureBlobParameter": { - "required": [ - "blobTemplate", - "connectionString", - "container" - ], - "type": "object", - "properties": { - "connectionString": { - "description": "Azure Blob connection string", - "type": "string" - }, - "container": { - "description": "Container", - "type": "string" - }, - "blobTemplate": { - "description": "Blob Template", - "type": "string" - } - } - }, - "AzureBlobDataFeed": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/DataFeedDetail" - } - ], - "properties": { - "dataSourceParameter": { - "$ref": "#/definitions/AzureBlobParameter" - } - }, - "x-ms-discriminator-value": "AzureBlob" - }, - "AzureCosmosDBParameter": { - "required": [ - "collectionId", - "connectionString", - "database", - "sqlQuery" - ], - "type": "object", - "properties": { - "connectionString": { - "description": "Azure CosmosDB connection string", - "type": "string" - }, - "sqlQuery": { - "description": "Query script", - "type": "string" - }, - "database": { - "description": "Database name", - "type": "string" - }, - "collectionId": { - "description": "Collection id", - "type": "string" - } - } - }, - "AzureCosmosDBDataFeed": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/DataFeedDetail" - } - ], - "properties": { - "dataSourceParameter": { - "$ref": "#/definitions/AzureCosmosDBParameter" - } - }, - "x-ms-discriminator-value": "AzureCosmosDB" - }, - "SqlSourceParameter": { - "required": [ - "query" - ], - "type": "object", - "properties": { - "connectionString": { - "description": "Database connection string", - "type": "string" - }, - "query": { - "description": "Query script", - "type": "string" - } - } - }, - "AzureDataExplorerDataFeed": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/DataFeedDetail" - } - ], - "properties": { - "dataSourceParameter": { - "$ref": "#/definitions/SqlSourceParameter" - } - }, - "x-ms-discriminator-value": "AzureDataExplorer" - }, - "AzureDataLakeStorageGen2Parameter": { - "required": [ - "accountName", - "directoryTemplate", - "fileSystemName", - "fileTemplate" - ], - "type": "object", - "properties": { - "accountName": { - "description": "Account name", - "type": "string" - }, - "accountKey": { - "description": "Account key", - "type": "string" - }, - "fileSystemName": { - "description": "File system name (Container)", - "type": "string" - }, - "directoryTemplate": { - "description": "Directory template", - "type": "string" - }, - "fileTemplate": { - "description": "File template", - "type": "string" - } - } - }, - "AzureDataLakeStorageGen2DataFeed": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/DataFeedDetail" - } - ], - "properties": { - "dataSourceParameter": { - "$ref": "#/definitions/AzureDataLakeStorageGen2Parameter" - } - }, - "x-ms-discriminator-value": "AzureDataLakeStorageGen2" - }, - "AzureEventHubsParameter": { - "required": [ - "connectionString", - "consumerGroup" - ], - "type": "object", - "properties": { - "connectionString": { - "description": "Azure Event Hubs connection string", - "type": "string" - }, - "consumerGroup": { - "description": "Azure Event Hubs consumer group", - "type": "string" - } - } - }, - "AzureEventHubsDataFeed": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/DataFeedDetail" - } - ], - "properties": { - "dataSourceParameter": { - "$ref": "#/definitions/AzureEventHubsParameter" - } - }, - "x-ms-discriminator-value": "AzureEventHubs" - }, - "AzureTableParameter": { - "required": [ - "connectionString", - "query", - "table" - ], - "type": "object", - "properties": { - "connectionString": { - "description": "Azure Table connection string", - "type": "string" - }, - "table": { - "description": "Table name", - "type": "string" - }, - "query": { - "description": "Query script", - "type": "string" - } - } - }, - "AzureTableDataFeed": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/DataFeedDetail" - } - ], - "properties": { - "dataSourceParameter": { - "$ref": "#/definitions/AzureTableParameter" - } - }, - "x-ms-discriminator-value": "AzureTable" - }, - "ElasticsearchParameter": { - "required": [ - "authHeader", - "host", - "port", - "query" - ], - "type": "object", - "properties": { - "host": { - "description": "Host", - "type": "string" - }, - "port": { - "description": "Port", - "type": "string" - }, - "authHeader": { - "description": "Authorization header", - "type": "string" - }, - "query": { - "description": "Query", - "type": "string" - } - } - }, - "ElasticsearchDataFeed": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/DataFeedDetail" - } - ], - "properties": { - "dataSourceParameter": { - "$ref": "#/definitions/ElasticsearchParameter" - } - }, - "x-ms-discriminator-value": "Elasticsearch" - }, - "HttpRequestParameter": { - "required": [ - "httpHeader", - "httpMethod", - "payload", - "url" - ], - "type": "object", - "properties": { - "url": { - "description": "HTTP URL", - "type": "string" - }, - "httpHeader": { - "description": "HTTP header", - "type": "string" - }, - "httpMethod": { - "description": "HTTP method", - "type": "string" - }, - "payload": { - "description": "HTTP request body", - "type": "string" - } - } - }, - "HttpRequestDataFeed": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/DataFeedDetail" - } - ], - "properties": { - "dataSourceParameter": { - "$ref": "#/definitions/HttpRequestParameter" - } - }, - "x-ms-discriminator-value": "HttpRequest" - }, - "InfluxDBParameter": { - "required": [ - "connectionString", - "database", - "password", - "query", - "userName" - ], - "type": "object", - "properties": { - "connectionString": { - "description": "InfluxDB connection string", - "type": "string" - }, - "database": { - "description": "Database name", - "type": "string" - }, - "userName": { - "description": "Database access user", - "type": "string" - }, - "password": { - "description": "Database access password", - "type": "string" - }, - "query": { - "description": "Query script", - "type": "string" - } - } - }, - "InfluxDBDataFeed": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/DataFeedDetail" - } - ], - "properties": { - "dataSourceParameter": { - "$ref": "#/definitions/InfluxDBParameter" - } - }, - "x-ms-discriminator-value": "InfluxDB" - }, - "MySqlDataFeed": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/DataFeedDetail" - } - ], - "properties": { - "dataSourceParameter": { - "$ref": "#/definitions/SqlSourceParameter" - } - }, - "x-ms-discriminator-value": "MySql" - }, - "PostgreSqlDataFeed": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/DataFeedDetail" - } - ], - "properties": { - "dataSourceParameter": { - "$ref": "#/definitions/SqlSourceParameter" - } - }, - "x-ms-discriminator-value": "PostgreSql" - }, - "SQLServerDataFeed": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/DataFeedDetail" - } - ], - "properties": { - "dataSourceParameter": { - "$ref": "#/definitions/SqlSourceParameter" - } - }, - "x-ms-discriminator-value": "SqlServer" - }, - "MongoDBParameter": { - "required": [ - "command", - "connectionString", - "database" - ], - "type": "object", - "properties": { - "connectionString": { - "description": "MongoDB connection string", - "type": "string" - }, - "database": { - "description": "Database name", - "type": "string" - }, - "command": { - "description": "Query script", - "type": "string" - } - } - }, - "MongoDBDataFeed": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/DataFeedDetail" - } - ], - "properties": { - "dataSourceParameter": { - "$ref": "#/definitions/MongoDBParameter" - } - }, - "x-ms-discriminator-value": "MongoDB" - }, - "DataFeedList": { - "type": "object", - "properties": { - "@nextLink": { - "type": "string", - "readOnly": true - }, - "value": { - "type": "array", - "items": { - "$ref": "#/definitions/DataFeedDetail" - }, - "readOnly": true - } - } - }, - "DataFeedDetailPatch": { - "required": [ - "dataSourceType" - ], - "type": "object", - "properties": { - "dataSourceType": { - "description": "data source type", - "enum": [ - "AzureApplicationInsights", - "AzureBlob", - "AzureCosmosDB", - "AzureDataExplorer", - "AzureDataLakeStorageGen2", - "AzureEventHubs", - "AzureTable", - "Elasticsearch", - "HttpRequest", - "InfluxDB", - "MongoDB", - "MySql", - "PostgreSql", - "SqlServer" - ], - "type": "string", - "x-ms-enum": { - "name": "DataSourceType", - "modelAsString": true - } - }, - "dataFeedName": { - "description": "data feed name", - "type": "string" - }, - "dataFeedDescription": { - "description": "data feed description", - "type": "string" - }, - "timestampColumn": { - "description": "user-defined timestamp column. if timestampColumn is null, start time of every time slice will be used as default value.", - "type": "string" - }, - "dataStartFrom": { - "format": "date-time", - "description": "ingestion start time", - "type": "string" - }, - "startOffsetInSeconds": { - "format": "int64", - "description": "the time that the beginning of data ingestion task will delay for every data slice according to this offset.", - "type": "integer" - }, - "maxConcurrency": { - "format": "int32", - "description": "the max concurrency of data ingestion queries against user data source. 0 means no limitation.", - "type": "integer" - }, - "minRetryIntervalInSeconds": { - "format": "int64", - "description": "the min retry interval for failed data ingestion tasks.", - "type": "integer" - }, - "stopRetryAfterInSeconds": { - "format": "int64", - "description": "stop retry data ingestion after the data slice first schedule time in seconds.", - "type": "integer" - }, - "needRollup": { - "description": "mark if the data feed need rollup", - "enum": [ - "NoRollup", - "NeedRollup", - "AlreadyRollup" - ], - "type": "string", - "x-ms-enum": { - "name": "NeedRollupEnum", - "modelAsString": true - } - }, - "rollUpMethod": { - "description": "roll up method", - "enum": [ - "None", - "Sum", - "Max", - "Min", - "Avg", - "Count" - ], - "type": "string", - "x-ms-enum": { - "name": "RollUpMethod", - "modelAsString": true - } - }, - "rollUpColumns": { - "description": "roll up columns", - "uniqueItems": true, - "type": "array", - "items": { - "type": "string" - } - }, - "allUpIdentification": { - "description": "the identification value for the row of calculated all-up value.", - "type": "string" - }, - "fillMissingPointType": { - "description": "the type of fill missing point for anomaly detection", - "enum": [ - "SmartFilling", - "PreviousValue", - "CustomValue", - "NoFilling" - ], - "type": "string", - "x-ms-enum": { - "name": "FillMissingPointType", - "modelAsString": true - } - }, - "fillMissingPointValue": { - "format": "double", - "description": "the value of fill missing point for anomaly detection", - "type": "number" - }, - "viewMode": { - "description": "data feed access mode, default is Private", - "enum": [ - "Private", - "Public" - ], - "type": "string", - "x-ms-enum": { - "name": "ViewMode", - "modelAsString": true - } - }, - "admins": { - "description": "data feed administrator", - "uniqueItems": true, - "type": "array", - "items": { - "type": "string" - } - }, - "viewers": { - "description": "data feed viewer", - "uniqueItems": true, - "type": "array", - "items": { - "type": "string" - } - }, - "status": { - "description": "data feed status", - "enum": [ - "Active", - "Paused" - ], - "type": "string", - "x-ms-enum": { - "name": "EntityStatus", - "modelAsString": true - } - }, - "actionLinkTemplate": { - "description": "action link for alert", - "type": "string" - }, - "authenticationType": { - "description": "authentication type for corresponding data source", - "enum": [ - "Basic", - "ManagedIdentity", - "AzureSQLConnectionString", - "DataLakeGen2SharedKey", - "ServicePrincipal", - "ServicePrincipalInKV" - ], - "type": "string", - "x-ms-enum": { - "name": "AuthenticationTypeEnum", - "modelAsString": true - } - }, - "credentialId": { - "description": "The credential entity id", - "type": "string" - } - }, - "discriminator": "dataSourceType" - }, - "AzureApplicationInsightsDataFeedPatch": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/DataFeedDetailPatch" - } - ], - "properties": { - "dataSourceParameter": { - "$ref": "#/definitions/AzureApplicationInsightsParameter" - } - }, - "x-ms-discriminator-value": "AzureApplicationInsights" - }, - "AzureBlobDataFeedPatch": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/DataFeedDetailPatch" - } - ], - "properties": { - "dataSourceParameter": { - "$ref": "#/definitions/AzureBlobParameter" - } - }, - "x-ms-discriminator-value": "AzureBlob" - }, - "AzureCosmosDBDataFeedPatch": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/DataFeedDetailPatch" - } - ], - "properties": { - "dataSourceParameter": { - "$ref": "#/definitions/AzureCosmosDBParameter" - } - }, - "x-ms-discriminator-value": "AzureCosmosDB" - }, - "AzureDataExplorerDataFeedPatch": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/DataFeedDetailPatch" - } - ], - "properties": { - "dataSourceParameter": { - "$ref": "#/definitions/SqlSourceParameter" - } - }, - "x-ms-discriminator-value": "AzureDataExplorer" - }, - "AzureDataLakeStorageGen2DataFeedPatch": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/DataFeedDetailPatch" - } - ], - "properties": { - "dataSourceParameter": { - "$ref": "#/definitions/AzureDataLakeStorageGen2Parameter" - } - }, - "x-ms-discriminator-value": "AzureDataLakeStorageGen2" - }, - "AzureEventHubsDataFeedPatch": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/DataFeedDetailPatch" - } - ], - "properties": { - "dataSourceParameter": { - "$ref": "#/definitions/AzureEventHubsParameter" - } - }, - "x-ms-discriminator-value": "AzureEventHubs" - }, - "AzureTableDataFeedPatch": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/DataFeedDetailPatch" - } - ], - "properties": { - "dataSourceParameter": { - "$ref": "#/definitions/AzureTableParameter" - } - }, - "x-ms-discriminator-value": "AzureTable" - }, - "ElasticsearchDataFeedPatch": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/DataFeedDetailPatch" - } - ], - "properties": { - "dataSourceParameter": { - "$ref": "#/definitions/ElasticsearchParameter" - } - }, - "x-ms-discriminator-value": "Elasticsearch" - }, - "HttpRequestDataFeedPatch": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/DataFeedDetailPatch" - } - ], - "properties": { - "dataSourceParameter": { - "$ref": "#/definitions/HttpRequestParameter" - } - }, - "x-ms-discriminator-value": "HttpRequest" - }, - "InfluxDBDataFeedPatch": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/DataFeedDetailPatch" - } - ], - "properties": { - "dataSourceParameter": { - "$ref": "#/definitions/InfluxDBParameter" - } - }, - "x-ms-discriminator-value": "InfluxDB" - }, - "MySqlDataFeedPatch": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/DataFeedDetailPatch" - } - ], - "properties": { - "dataSourceParameter": { - "$ref": "#/definitions/SqlSourceParameter" - } - }, - "x-ms-discriminator-value": "MySql" - }, - "PostgreSqlDataFeedPatch": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/DataFeedDetailPatch" - } - ], - "properties": { - "dataSourceParameter": { - "$ref": "#/definitions/SqlSourceParameter" - } - }, - "x-ms-discriminator-value": "PostgreSql" - }, - "SQLServerDataFeedPatch": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/DataFeedDetailPatch" - } - ], - "properties": { - "dataSourceParameter": { - "$ref": "#/definitions/SqlSourceParameter" - } - }, - "example": { - "dataFeedName": "Sample - cost/revenue - city/category (modified)", - "viewers": [ - "viewer@company.example" - ] - }, - "x-ms-discriminator-value": "SqlServer" - }, - "MongoDBDataFeedPatch": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/DataFeedDetailPatch" - } - ], - "properties": { - "dataSourceParameter": { - "$ref": "#/definitions/MongoDBParameter" - } - }, - "x-ms-discriminator-value": "MongoDB" - }, - "AnomalyFeedbackValue": { - "required": [ - "anomalyValue" - ], - "type": "object", - "properties": { - "anomalyValue": { - "enum": [ - "AutoDetect", - "Anomaly", - "NotAnomaly" - ], - "type": "string", - "x-ms-enum": { - "name": "AnomalyValue", - "modelAsString": true - } - } - } - }, - "FeedbackDimensionFilter": { - "required": [ - "dimension" - ], - "type": "object", - "properties": { - "dimension": { - "description": "metric dimension filter", - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } - }, - "MetricFeedback": { - "required": [ - "dimensionFilter", - "feedbackType", - "metricId" - ], - "type": "object", - "properties": { - "feedbackType": { - "description": "feedback type", - "enum": [ - "Anomaly", - "ChangePoint", - "Period", - "Comment" - ], - "type": "string", - "x-ms-enum": { - "name": "FeedbackType", - "modelAsString": true - } - }, - "feedbackId": { - "format": "uuid", - "description": "feedback unique id", - "type": "string", - "readOnly": true - }, - "createdTime": { - "format": "date-time", - "description": "feedback created time", - "type": "string", - "readOnly": true - }, - "userPrincipal": { - "description": "user who gives this feedback", - "type": "string", - "readOnly": true - }, - "metricId": { - "format": "uuid", - "description": "metric unique id", - "type": "string" - }, - "dimensionFilter": { - "$ref": "#/definitions/FeedbackDimensionFilter" - } - }, - "discriminator": "feedbackType" - }, - "AnomalyFeedback": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/MetricFeedback" - } - ], - "properties": { - "startTime": { - "format": "date-time", - "description": "the start timestamp of feedback time range", - "type": "string" - }, - "endTime": { - "format": "date-time", - "description": "the end timestamp of feedback time range, when equals to startTime means only one timestamp", - "type": "string" - }, - "value": { - "$ref": "#/definitions/AnomalyFeedbackValue" - }, - "anomalyDetectionConfigurationId": { - "format": "uuid", - "description": "the corresponding anomaly detection configuration of this feedback", - "type": "string" - }, - "anomalyDetectionConfigurationSnapshot": { - "$ref": "#/definitions/AnomalyDetectionConfiguration" - } - }, - "example": { - "startTime": "2020-01-01T00:00:00Z", - "endTime": "2020-01-01T00:00:00Z", - "value": { - "anomalyValue": "NotAnomaly" - }, - "anomalyDetectionConfigurationId": "33333333-3333-3333-3333-000000000001", - "metricId": "22222222-2222-2222-2222-000000000001", - "dimensionFilter": { - "dimension": { - "city": "Beijing" - } - }, - "feedbackType": "Anomaly" - }, - "x-ms-discriminator-value": "Anomaly" - }, - "ChangePointFeedbackValue": { - "required": [ - "changePointValue" - ], - "type": "object", - "properties": { - "changePointValue": { - "enum": [ - "AutoDetect", - "ChangePoint", - "NotChangePoint" - ], - "type": "string", - "x-ms-enum": { - "name": "ChangePointValue", - "modelAsString": true - } - } - } - }, - "ChangePointFeedback": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/MetricFeedback" - } - ], - "properties": { - "startTime": { - "format": "date-time", - "description": "the start timestamp of feedback time range", - "type": "string" - }, - "endTime": { - "format": "date-time", - "description": "the end timestamp of feedback time range, when equals to startTime means only one timestamp", - "type": "string" - }, - "value": { - "$ref": "#/definitions/ChangePointFeedbackValue" - } - }, - "x-ms-discriminator-value": "ChangePoint" - }, - "CommentFeedbackValue": { - "required": [ - "commentValue" - ], - "type": "object", - "properties": { - "commentValue": { - "description": "the comment string", - "type": "string" - } - } - }, - "CommentFeedback": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/MetricFeedback" - } - ], - "properties": { - "startTime": { - "format": "date-time", - "description": "the start timestamp of feedback time range", - "type": "string" - }, - "endTime": { - "format": "date-time", - "description": "the end timestamp of feedback time range, when equals to startTime means only one timestamp", - "type": "string" - }, - "value": { - "$ref": "#/definitions/CommentFeedbackValue" - } - }, - "x-ms-discriminator-value": "Comment" - }, - "PeriodFeedbackValue": { - "required": [ - "periodType", - "periodValue" - ], - "type": "object", - "properties": { - "periodType": { - "description": "the type of setting period", - "enum": [ - "AutoDetect", - "AssignValue" - ], - "type": "string", - "x-ms-enum": { - "name": "PeriodType", - "modelAsString": true - } - }, - "periodValue": { - "format": "int32", - "description": "the number of intervals a period contains, when no period set to 0", - "default": 0, - "type": "integer" - } - } - }, - "PeriodFeedback": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/MetricFeedback" - } - ], - "properties": { - "value": { - "$ref": "#/definitions/PeriodFeedbackValue" - } - }, - "x-ms-discriminator-value": "Period" - }, - "MetricFeedbackFilter": { - "required": [ - "metricId" - ], - "type": "object", - "properties": { - "metricId": { - "format": "uuid", - "description": "filter feedbacks by metric id", - "type": "string" - }, - "dimensionFilter": { - "$ref": "#/definitions/FeedbackDimensionFilter" - }, - "feedbackType": { - "description": "filter feedbacks by type", - "enum": [ - "Anomaly", - "ChangePoint", - "Period", - "Comment" - ], - "type": "string", - "x-ms-enum": { - "name": "FeedbackType", - "modelAsString": true - } - }, - "startTime": { - "format": "date-time", - "description": "start time filter under chosen time mode", - "type": "string" - }, - "endTime": { - "format": "date-time", - "description": "end time filter under chosen time mode", - "type": "string" - }, - "timeMode": { - "description": "time mode to filter feedback", - "enum": [ - "MetricTimestamp", - "FeedbackCreatedTime" - ], - "type": "string", - "x-ms-enum": { - "name": "FeedbackQueryTimeMode", - "modelAsString": true - } - } - }, - "example": { - "metricId": "22222222-2222-2222-2222-000000000001", - "feedbackType": "Anomaly", - "startTime": "2020-01-01T00:00:00Z", - "endTime": "2020-01-01T00:00:00Z", - "timeMode": "MetricTimestamp" - } - }, - "MetricFeedbackList": { - "type": "object", - "properties": { - "@nextLink": { - "type": "string", - "readOnly": true - }, - "value": { - "type": "array", - "items": { - "$ref": "#/definitions/MetricFeedback" - }, - "readOnly": true - } - } - }, - "EmailHookParameter": { - "required": [ - "toList" - ], - "type": "object", - "properties": { - "toList": { - "description": "Email TO: list.", - "uniqueItems": true, - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "HookInfo": { - "required": [ - "hookName", - "hookType" - ], - "type": "object", - "properties": { - "hookType": { - "description": "hook type", - "enum": [ - "Webhook", - "Email" - ], - "type": "string", - "x-ms-enum": { - "name": "HookType", - "modelAsString": true - } - }, - "hookId": { - "format": "uuid", - "description": "Hook unique id", - "type": "string", - "readOnly": true - }, - "hookName": { - "description": "hook unique name", - "type": "string" - }, - "description": { - "description": "hook description", - "default": "", - "type": "string" - }, - "externalLink": { - "description": "hook external link", - "default": "", - "type": "string" - }, - "admins": { - "description": "hook administrators", - "uniqueItems": true, - "type": "array", - "items": { - "type": "string" - }, - "readOnly": true - } - }, - "discriminator": "hookType" - }, - "EmailHookInfo": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/HookInfo" - } - ], - "properties": { - "hookParameter": { - "$ref": "#/definitions/EmailHookParameter" - } - }, - "x-ms-discriminator-value": "Email" - }, - "WebhookHookParameter": { - "required": [ - "endpoint" - ], - "type": "object", - "properties": { - "endpoint": { - "description": "API address, will be called when alert is triggered, only support POST method via SSL", - "type": "string" - }, - "username": { - "description": "basic authentication", - "type": "string" - }, - "password": { - "description": "basic authentication", - "type": "string" - }, - "headers": { - "description": "custom headers in api call", - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "certificateKey": { - "description": "client certificate", - "type": "string" - }, - "certificatePassword": { - "description": "client certificate password", - "type": "string" - } - } - }, - "WebhookHookInfo": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/HookInfo" - } - ], - "properties": { - "hookParameter": { - "$ref": "#/definitions/WebhookHookParameter" - } - }, - "example": { - "hookParameter": { - "endpoint": "https://localhost/demo/post" - }, - "hookName": "A webhook", - "hookType": "Webhook", - "description": "This is a webhook.", - "externalLink": "" - }, - "x-ms-discriminator-value": "Webhook" - }, - "HookList": { - "type": "object", - "properties": { - "@nextLink": { - "type": "string", - "readOnly": true - }, - "value": { - "uniqueItems": true, - "type": "array", - "items": { - "$ref": "#/definitions/HookInfo" - }, - "readOnly": true - } - } - }, - "HookInfoPatch": { - "required": [ - "hookType" - ], - "type": "object", - "properties": { - "hookType": { - "description": "hook type", - "enum": [ - "Webhook", - "Email" - ], - "type": "string", - "x-ms-enum": { - "name": "HookType", - "modelAsString": true - } - }, - "hookName": { - "description": "hook unique name", - "type": "string" - }, - "description": { - "description": "hook description", - "type": "string" - }, - "externalLink": { - "description": "hook external link", - "type": "string" - }, - "admins": { - "description": "hook administrators", - "uniqueItems": true, - "type": "array", - "items": { - "type": "string" - }, - "readOnly": true - } - }, - "discriminator": "hookType" - }, - "EmailHookInfoPatch": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/HookInfoPatch" - } - ], - "properties": { - "hookParameter": { - "$ref": "#/definitions/EmailHookParameter" - } - }, - "x-ms-discriminator-value": "Email" - }, - "WebhookHookInfoPatch": { - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/HookInfoPatch" - } - ], - "properties": { - "hookParameter": { - "$ref": "#/definitions/WebhookHookParameter" - } - }, - "example": { - "hookName": "A webhook (modified)", - "description": "This is a webhook. (modified)" - }, - "x-ms-discriminator-value": "Webhook" - }, - "IngestionStatusQueryOptions": { - "required": [ - "endTime", - "startTime" - ], - "type": "object", - "properties": { - "startTime": { - "format": "date-time", - "description": "the start point of time range to query data ingestion status.", - "type": "string" - }, - "endTime": { - "format": "date-time", - "description": "the end point of time range to query data ingestion status.", - "type": "string" - } - }, - "example": { - "startTime": "2020-01-01T00:00:00Z", - "endTime": "2020-02-01T00:00:00Z" - } - }, - "IngestionStatus": { - "type": "object", - "properties": { - "timestamp": { - "format": "date-time", - "description": "data slice timestamp.", - "type": "string", - "readOnly": true - }, - "status": { - "description": "latest ingestion task status for this data slice.", - "enum": [ - "NotStarted", - "Scheduled", - "Running", - "Succeeded", - "Failed", - "NoData", - "Error", - "Paused" - ], - "type": "string", - "readOnly": true, - "x-ms-enum": { - "name": "IngestionStatusType", - "modelAsString": true - } - }, - "message": { - "description": "the trimmed message of last ingestion job.", - "type": "string", - "readOnly": true - } - } - }, - "IngestionStatusList": { - "type": "object", - "properties": { - "@nextLink": { - "type": "string", - "readOnly": true - }, - "value": { - "type": "array", - "items": { - "$ref": "#/definitions/IngestionStatus" - }, - "readOnly": true - } - } - }, - "IngestionProgressResetOptions": { - "required": [ - "endTime", - "startTime" - ], - "type": "object", - "properties": { - "startTime": { - "format": "date-time", - "description": "the start point of time range to reset data ingestion status.", - "type": "string" - }, - "endTime": { - "format": "date-time", - "description": "the end point of time range to reset data ingestion status.", - "type": "string" - } - }, - "example": { - "startTime": "2020-01-01T00:00:00Z", - "endTime": "2020-02-01T00:00:00Z" - } - }, - "DataFeedIngestionProgress": { - "type": "object", - "properties": { - "latestSuccessTimestamp": { - "format": "date-time", - "description": "the timestamp of latest success ingestion job.\r\nnull indicates not available", - "type": "string", - "readOnly": true - }, - "latestActiveTimestamp": { - "format": "date-time", - "description": "the timestamp of latest ingestion job with status update.\r\nnull indicates not available", - "type": "string", - "readOnly": true - } - } - }, - "MetricDataQueryOptions": { - "required": [ - "endTime", - "series", - "startTime" - ], - "type": "object", - "properties": { - "startTime": { - "format": "date-time", - "description": "start time of query a time series data, and format should be yyyy-MM-ddThh:mm:ssZ", - "type": "string" - }, - "endTime": { - "format": "date-time", - "description": "start time of query a time series data, and format should be yyyy-MM-ddThh:mm:ssZ", - "type": "string" - }, - "series": { - "description": "query specific series", - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "type": "string" - } - } - } - }, - "example": { - "startTime": "2020-01-01T00:00:00Z", - "endTime": "2020-02-01T00:00:00Z", - "series": [ - { - "category": "__SUM__", - "city": "Beijing" - } - ] - } - }, - "MetricSeriesItem": { - "type": "object", - "properties": { - "metricId": { - "format": "uuid", - "description": "metric unique id", - "type": "string", - "readOnly": true - }, - "dimension": { - "description": "dimension name and value pair", - "type": "object", - "additionalProperties": { - "type": "string" - }, - "readOnly": true - } - } - }, - "MetricDataItem": { - "type": "object", - "properties": { - "id": { - "$ref": "#/definitions/MetricSeriesItem" - }, - "timestampList": { - "description": "timestamps of the data related to this time series", - "type": "array", - "items": { - "format": "date-time", - "type": "string" - }, - "readOnly": true - }, - "valueList": { - "description": "values of the data related to this time series", - "type": "array", - "items": { - "format": "double", - "type": "number" - }, - "readOnly": true - } - } - }, - "MetricDataList": { - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/definitions/MetricDataItem" - }, - "readOnly": true - } - } - }, - "MetricSeriesQueryOptions": { - "required": [ - "activeSince" - ], - "type": "object", - "properties": { - "activeSince": { - "format": "date-time", - "description": "query series ingested after this time, the format should be yyyy-MM-ddTHH:mm:ssZ", - "type": "string" - }, - "dimensionFilter": { - "description": "filter specific dimension name and values", - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "example": { - "activeSince": "2020-01-01T00:00:00Z", - "dimensionFilter": { - "city": [ - "Beijing" - ] - } - } - }, - "MetricSeriesList": { - "type": "object", - "properties": { - "@nextLink": { - "type": "string", - "readOnly": true - }, - "value": { - "type": "array", - "items": { - "$ref": "#/definitions/MetricSeriesItem" - }, - "readOnly": true - } - } - }, - "MetricDimensionQueryOptions": { - "required": [ - "dimensionName" - ], - "type": "object", - "properties": { - "dimensionName": { - "description": "dimension name", - "type": "string" - }, - "dimensionValueFilter": { - "description": "dimension value to be filtered", - "type": "string" - } - }, - "example": { - "dimensionName": "city" - } - }, - "MetricDimensionList": { - "type": "object", - "properties": { - "@nextLink": { - "type": "string", - "readOnly": true - }, - "value": { - "uniqueItems": true, - "type": "array", - "items": { - "type": "string" - }, - "readOnly": true - } - } - }, - "AnomalyDetectionConfigurationList": { - "required": [ - "value" - ], - "type": "object", - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/definitions/AnomalyDetectionConfiguration" - } - } - } - }, - "EnrichmentStatusQueryOption": { - "required": [ - "endTime", - "startTime" - ], - "type": "object", - "properties": { - "startTime": { - "format": "date-time", - "description": "the start point of time range to query anomaly detection status.", - "type": "string" - }, - "endTime": { - "format": "date-time", - "description": "the end point of time range to query anomaly detection status.", - "type": "string" - } - }, - "example": { - "startTime": "2020-01-01T00:00:00Z", - "endTime": "2020-02-01T00:00:00Z" - } - }, - "EnrichmentStatus": { - "type": "object", - "properties": { - "timestamp": { - "format": "date-time", - "description": "data slice timestamp.", - "type": "string", - "readOnly": true - }, - "status": { - "description": "latest enrichment status for this data slice.", - "type": "string", - "readOnly": true - }, - "message": { - "description": "the trimmed message describes details of the enrichment status.", - "type": "string", - "readOnly": true - } - } - }, - "EnrichmentStatusList": { - "type": "object", - "properties": { - "@nextLink": { - "type": "string", - "readOnly": true - }, - "value": { - "type": "array", - "items": { - "$ref": "#/definitions/EnrichmentStatus" - }, - "readOnly": true - } - } - } - }, - "securityDefinitions": { - "ma_api_key": { - "type": "apiKey", - "name": "x-api-key", - "in": "header" - }, - "apim_key": { - "type": "apiKey", - "name": "Ocp-Apim-Subscription-Key", - "in": "header" - } - }, - "security": [ - { - "apim_key": [], - "ma_api_key": [] - } - ], - "parameters": { - "Endpoint": { - "name": "endpoint", - "description": "Supported Cognitive Services endpoints (protocol and hostname, for example: https://.cognitiveservices.azure.com).", - "x-ms-parameter-location": "client", - "required": true, - "type": "string", - "in": "path", - "x-ms-skip-url-encoding": true - } - }, - "x-ms-parameterized-host": { - "hostTemplate": "{endpoint}/metricsadvisor/v1.0", - "useSchemePrefix": false, - "parameters": [ - { - "$ref": "#/parameters/Endpoint" - } - ] - } -}