-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Initial commit for anomaly detector * Fix module name * Update jacoco coverage check * Ignore swagger README verification
- Loading branch information
Showing
28 changed files
with
2,346 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Release History | ||
|
||
## 1.0.0-beta.1 (Unreleased) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Azure Anomaly Detector client library for Java | ||
TODO | ||
|
||
## Getting started | ||
|
||
### Prerequisites | ||
|
||
- Java Development Kit (JDK) with version 8 or above | ||
- [Azure Subscription][azure_subscription] | ||
|
||
### Include the Package | ||
|
||
[//]: # ({x-version-update-start;com.azure:azure-ai-anomalydetector;current}) | ||
```xml | ||
<dependency> | ||
<groupId>com.azure</groupId> | ||
<artifactId>azure-ai-anomalydetector</artifactId> | ||
<version>1.0.0-beta.1</version> | ||
</dependency> | ||
``` | ||
[//]: # ({x-version-update-end}) | ||
|
||
## Key concepts | ||
|
||
## Examples | ||
|
||
## Troubleshooting | ||
|
||
## Next steps | ||
|
||
## Contributing | ||
|
||
This project welcomes contributions and suggestions. Most contributions require you to agree to a [Contributor License Agreement (CLA)][cla] declaring that you have the right to, and actually do, grant us the rights to use your contribution. | ||
|
||
When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. | ||
|
||
This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact [[email protected]][coc_contact] with any additional questions or comments. | ||
|
||
<!-- LINKS --> | ||
[samples]: src/samples/java/com/azure/ai/anomalydetector | ||
[samples_readme]: src/samples/README.md | ||
[source_code]: src | ||
|
||
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fanomalydetector%2Fazure-ai-anomalydetector%2FREADME.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>com.azure</groupId> | ||
<artifactId>azure-client-sdk-parent</artifactId> | ||
<version>1.7.0</version> <!-- {x-version-update;com.azure:azure-client-sdk-parent;current} --> | ||
<relativePath>../../parents/azure-client-sdk-parent</relativePath> | ||
</parent> | ||
|
||
<groupId>com.azure</groupId> | ||
<artifactId>azure-ai-anomalydetector</artifactId> | ||
<version>1.0.0-beta.1</version> <!-- {x-version-update;com.azure:azure-ai-anomalydetector;current} --> | ||
|
||
<name>Microsoft Azure client library for Anomaly Detector</name> | ||
<description>This package contains Microsoft Azure Anomaly Detector client library.</description> | ||
|
||
<distributionManagement> | ||
<site> | ||
<id>azure-java-build-docs</id> | ||
<url>${site.url}/site/${project.artifactId}</url> | ||
</site> | ||
</distributionManagement> | ||
|
||
<scm> | ||
<url>scm:git:https://github.com/Azure/azure-sdk-for-java</url> | ||
<connection>scm:git:[email protected]:Azure/azure-sdk-for-java.git</connection> | ||
<tag>HEAD</tag> | ||
</scm> | ||
|
||
<properties> | ||
<!-- Anomaly detector temporarily skipping code coverage until tests are added --> | ||
<jacoco.skip.coverage.check>true</jacoco.skip.coverage.check> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>com.azure</groupId> | ||
<artifactId>azure-core</artifactId> | ||
<version>1.7.0</version> <!-- {x-version-update;com.azure:azure-core;dependency} --> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.azure</groupId> | ||
<artifactId>azure-core-http-netty</artifactId> | ||
<version>1.5.4</version> <!-- {x-version-update;com.azure:azure-core-http-netty;dependency} --> | ||
</dependency> | ||
|
||
<!-- Test dependencies --> | ||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter-api</artifactId> | ||
<version>5.6.2</version> <!-- {x-version-update;org.junit.jupiter:junit-jupiter-api;external_dependency} --> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter-engine</artifactId> | ||
<version>5.6.2</version> <!-- {x-version-update;org.junit.jupiter:junit-jupiter-engine;external_dependency} --> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter-params</artifactId> | ||
<version>5.6.2</version> <!-- {x-version-update;org.junit.jupiter:junit-jupiter-params;external_dependency} --> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
</project> |
123 changes: 123 additions & 0 deletions
123
...nomalydetector/src/main/java/com/azure/ai/anomalydetector/AnomalyDetectorAsyncClient.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
// Code generated by Microsoft (R) AutoRest Code Generator. | ||
|
||
package com.azure.ai.anomalydetector; | ||
|
||
import com.azure.ai.anomalydetector.implementation.AnomalyDetectorClientImpl; | ||
import com.azure.ai.anomalydetector.models.ApiErrorException; | ||
import com.azure.ai.anomalydetector.models.ChangePointDetectRequest; | ||
import com.azure.ai.anomalydetector.models.ChangePointDetectResponse; | ||
import com.azure.ai.anomalydetector.models.EntireDetectResponse; | ||
import com.azure.ai.anomalydetector.models.LastDetectResponse; | ||
import com.azure.ai.anomalydetector.models.Request; | ||
import com.azure.core.annotation.ReturnType; | ||
import com.azure.core.annotation.ServiceClient; | ||
import com.azure.core.annotation.ServiceMethod; | ||
import com.azure.core.http.rest.Response; | ||
import reactor.core.publisher.Mono; | ||
|
||
/** Initializes a new instance of the asynchronous AnomalyDetectorClient type. */ | ||
@ServiceClient(builder = AnomalyDetectorClientBuilder.class, isAsync = true) | ||
public final class AnomalyDetectorAsyncClient { | ||
private AnomalyDetectorClientImpl serviceClient; | ||
|
||
/** Initializes an instance of AnomalyDetectorClient client. */ | ||
AnomalyDetectorAsyncClient(AnomalyDetectorClientImpl serviceClient) { | ||
this.serviceClient = serviceClient; | ||
} | ||
|
||
/** | ||
* This operation generates a model using an entire series, each point is detected with the same model. With this | ||
* method, points before and after a certain point are used to determine whether it is an anomaly. The entire | ||
* detection can give user an overall status of the time series. | ||
* | ||
* @param body Time series points and period if needed. Advanced model parameters can also be set in the request. | ||
* @throws IllegalArgumentException thrown if parameters fail the validation. | ||
* @throws ApiErrorException 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 Mono<Response<EntireDetectResponse>> entireDetectWithResponse(Request body) { | ||
return this.serviceClient.entireDetectWithResponseAsync(body); | ||
} | ||
|
||
/** | ||
* This operation generates a model using an entire series, each point is detected with the same model. With this | ||
* method, points before and after a certain point are used to determine whether it is an anomaly. The entire | ||
* detection can give user an overall status of the time series. | ||
* | ||
* @param body Time series points and period if needed. Advanced model parameters can also be set in the request. | ||
* @throws IllegalArgumentException thrown if parameters fail the validation. | ||
* @throws ApiErrorException 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 Mono<EntireDetectResponse> entireDetect(Request body) { | ||
return this.serviceClient.entireDetectAsync(body); | ||
} | ||
|
||
/** | ||
* This operation generates a model using points before the latest one. With this method, only historical points are | ||
* used to determine whether the target point is an anomaly. The latest point detecting operation matches the | ||
* scenario of real-time monitoring of business metrics. | ||
* | ||
* @param body Time series points and period if needed. Advanced model parameters can also be set in the request. | ||
* @throws IllegalArgumentException thrown if parameters fail the validation. | ||
* @throws ApiErrorException 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 Mono<Response<LastDetectResponse>> lastDetectWithResponse(Request body) { | ||
return this.serviceClient.lastDetectWithResponseAsync(body); | ||
} | ||
|
||
/** | ||
* This operation generates a model using points before the latest one. With this method, only historical points are | ||
* used to determine whether the target point is an anomaly. The latest point detecting operation matches the | ||
* scenario of real-time monitoring of business metrics. | ||
* | ||
* @param body Time series points and period if needed. Advanced model parameters can also be set in the request. | ||
* @throws IllegalArgumentException thrown if parameters fail the validation. | ||
* @throws ApiErrorException 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 Mono<LastDetectResponse> lastDetect(Request body) { | ||
return this.serviceClient.lastDetectAsync(body); | ||
} | ||
|
||
/** | ||
* Evaluate change point score of every series point. | ||
* | ||
* @param body Time series points and granularity is needed. Advanced model parameters can also be set in the | ||
* request if needed. | ||
* @throws IllegalArgumentException thrown if parameters fail the validation. | ||
* @throws ApiErrorException 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 Mono<Response<ChangePointDetectResponse>> changePointDetectWithResponse(ChangePointDetectRequest body) { | ||
return this.serviceClient.changePointDetectWithResponseAsync(body); | ||
} | ||
|
||
/** | ||
* Evaluate change point score of every series point. | ||
* | ||
* @param body Time series points and granularity is needed. Advanced model parameters can also be set in the | ||
* request if needed. | ||
* @throws IllegalArgumentException thrown if parameters fail the validation. | ||
* @throws ApiErrorException 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 Mono<ChangePointDetectResponse> changePointDetect(ChangePointDetectRequest body) { | ||
return this.serviceClient.changePointDetectAsync(body); | ||
} | ||
} |
127 changes: 127 additions & 0 deletions
127
...-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/AnomalyDetectorClient.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
// Code generated by Microsoft (R) AutoRest Code Generator. | ||
|
||
package com.azure.ai.anomalydetector; | ||
|
||
import com.azure.ai.anomalydetector.implementation.AnomalyDetectorClientImpl; | ||
import com.azure.ai.anomalydetector.models.ApiErrorException; | ||
import com.azure.ai.anomalydetector.models.ChangePointDetectRequest; | ||
import com.azure.ai.anomalydetector.models.ChangePointDetectResponse; | ||
import com.azure.ai.anomalydetector.models.EntireDetectResponse; | ||
import com.azure.ai.anomalydetector.models.LastDetectResponse; | ||
import com.azure.ai.anomalydetector.models.Request; | ||
import com.azure.core.annotation.ReturnType; | ||
import com.azure.core.annotation.ServiceClient; | ||
import com.azure.core.annotation.ServiceMethod; | ||
import com.azure.core.http.rest.Response; | ||
import com.azure.core.util.Context; | ||
|
||
/** Initializes a new instance of the synchronous AnomalyDetectorClient type. */ | ||
@ServiceClient(builder = AnomalyDetectorClientBuilder.class) | ||
public final class AnomalyDetectorClient { | ||
private AnomalyDetectorClientImpl serviceClient; | ||
|
||
/** Initializes an instance of AnomalyDetectorClient client. */ | ||
AnomalyDetectorClient(AnomalyDetectorClientImpl serviceClient) { | ||
this.serviceClient = serviceClient; | ||
} | ||
|
||
/** | ||
* This operation generates a model using an entire series, each point is detected with the same model. With this | ||
* method, points before and after a certain point are used to determine whether it is an anomaly. The entire | ||
* detection can give user an overall status of the time series. | ||
* | ||
* @param body Time series points and period if needed. Advanced model parameters can also be set in the request. | ||
* @throws IllegalArgumentException thrown if parameters fail the validation. | ||
* @throws ApiErrorException 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 EntireDetectResponse entireDetect(Request body) { | ||
return this.serviceClient.entireDetect(body); | ||
} | ||
|
||
/** | ||
* This operation generates a model using an entire series, each point is detected with the same model. With this | ||
* method, points before and after a certain point are used to determine whether it is an anomaly. The entire | ||
* detection can give user an overall status of the time series. | ||
* | ||
* @param body Time series points and period if needed. Advanced model parameters can also be set in the request. | ||
* @param context The context to associate with this operation. | ||
* @throws IllegalArgumentException thrown if parameters fail the validation. | ||
* @throws ApiErrorException 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<EntireDetectResponse> entireDetectWithResponse(Request body, Context context) { | ||
return this.serviceClient.entireDetectWithResponse(body, context); | ||
} | ||
|
||
/** | ||
* This operation generates a model using points before the latest one. With this method, only historical points are | ||
* used to determine whether the target point is an anomaly. The latest point detecting operation matches the | ||
* scenario of real-time monitoring of business metrics. | ||
* | ||
* @param body Time series points and period if needed. Advanced model parameters can also be set in the request. | ||
* @throws IllegalArgumentException thrown if parameters fail the validation. | ||
* @throws ApiErrorException 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 LastDetectResponse lastDetect(Request body) { | ||
return this.serviceClient.lastDetect(body); | ||
} | ||
|
||
/** | ||
* This operation generates a model using points before the latest one. With this method, only historical points are | ||
* used to determine whether the target point is an anomaly. The latest point detecting operation matches the | ||
* scenario of real-time monitoring of business metrics. | ||
* | ||
* @param body Time series points and period if needed. Advanced model parameters can also be set in the request. | ||
* @param context The context to associate with this operation. | ||
* @throws IllegalArgumentException thrown if parameters fail the validation. | ||
* @throws ApiErrorException 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<LastDetectResponse> lastDetectWithResponse(Request body, Context context) { | ||
return this.serviceClient.lastDetectWithResponse(body, context); | ||
} | ||
|
||
/** | ||
* Evaluate change point score of every series point. | ||
* | ||
* @param body Time series points and granularity is needed. Advanced model parameters can also be set in the | ||
* request if needed. | ||
* @throws IllegalArgumentException thrown if parameters fail the validation. | ||
* @throws ApiErrorException 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 ChangePointDetectResponse changePointDetect(ChangePointDetectRequest body) { | ||
return this.serviceClient.changePointDetect(body); | ||
} | ||
|
||
/** | ||
* Evaluate change point score of every series point. | ||
* | ||
* @param body Time series points and granularity is needed. Advanced model parameters can also be set in the | ||
* request if needed. | ||
* @param context The context to associate with this operation. | ||
* @throws IllegalArgumentException thrown if parameters fail the validation. | ||
* @throws ApiErrorException 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<ChangePointDetectResponse> changePointDetectWithResponse( | ||
ChangePointDetectRequest body, Context context) { | ||
return this.serviceClient.changePointDetectWithResponse(body, context); | ||
} | ||
} |
Oops, something went wrong.