Skip to content

Commit

Permalink
CodeGen from PR 18037 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Add multidimensional Root Cause Analysis APIs in Anomaly Detector Service (Azure#18037)

* add multidimentional RCA API

* update to 4 tab

* update swagger

* update swagger with kind

* update

* update wording

* add derived decoration

* update schema definition

* add more polymorphism

* update create dataset

* add kin for train, inference, data

* update

* update

* update

* update according to review

* update query filter

* remove nextLinkName

* add error code

* update

* update verion so v1.2-preview

* update spelling

* update list partition meta

* update

* update version

* update partition

* update

* update

* merge with 1.1-preview.1 version

* update

* sync with 1.1-preview.1

* update train response

* update inference

* update version

* update description of timestamp

* update

* update readme

* update

* update version

* update

* add x-ms-error-code

* update filter description

* add 201 response and add kind list

* update

* update

* update comment

* update

* update

* update

* upate

* format

* add emtpy line at end of file

* add dataset Id in required for dataset

* update

* update
  • Loading branch information
SDKAuto committed Apr 7, 2022
1 parent ebe60c2 commit b9f778f
Show file tree
Hide file tree
Showing 24 changed files with 1,951 additions and 0 deletions.
3 changes: 3 additions & 0 deletions eng/versioning/version_client.txt
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ com.azure:azure-template-perf;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-media-videoanalyzer-edge;1.0.0-beta.5;1.0.0-beta.6
com.azure:azure-verticals-agrifood-farming;1.0.0-beta.2;1.0.0-beta.3
com.azure:perf-test-core;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-cognitiveservices-anomalydetector;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-cognitiveservices-multivariateanomalydetector;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-cognitiveservices-rootcauseanalysis;1.0.0-beta.1;1.0.0-beta.1
com.microsoft.azure:spring-cloud-azure-appconfiguration-config-web;1.3.0;1.4.0-beta.1
com.microsoft.azure:spring-cloud-azure-appconfiguration-config;1.3.0;1.4.0-beta.1
com.microsoft.azure:spring-cloud-azure-feature-management-web;1.3.0;1.4.0-beta.1
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Release History

## 1.0.0-beta.1 (Unreleased)

- Azure AnomalyDetectorClient client library for Java. This package contains Microsoft Azure AnomalyDetectorClient client library.

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Azure AnomalyDetectorClient client library for Java

Azure AnomalyDetectorClient client library for Java.

This package contains Microsoft Azure AnomalyDetectorClient client library.

## Documentation

Various documentation is available to help you get started

- [API reference documentation][docs]
- [Product documentation][product_documentation]

## Getting started

### Prerequisites

- [Java Development Kit (JDK)][jdk] with version 8 or above
- [Azure Subscription][azure_subscription]

### Adding the package to your product

[//]: # ({x-version-update-start;com.azure:azure-cognitiveservices-anomalydetector;current})
```xml
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-cognitiveservices-anomalydetector</artifactId>
<version>1.0.0-beta.1</version>
</dependency>
```
[//]: # ({x-version-update-end})

### Authentication

[Azure Identity][azure_identity] package provides the default implementation for authenticating the client.

## Key concepts

## Examples

```java com.azure.cognitiveservices.anomalydetector.readme
```

## Troubleshooting

## Next steps

## Contributing

For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md).

1. Fork it
1. Create your feature branch (`git checkout -b my-new-feature`)
1. Commit your changes (`git commit -am 'Add some feature'`)
1. Push to the branch (`git push origin my-new-feature`)
1. Create new Pull Request

<!-- LINKS -->
[product_documentation]: https://azure.microsoft.com/services/
[docs]: https://azure.github.io/azure-sdk-for-java/
[jdk]: https://docs.microsoft.com/java/azure/jdk/
[azure_subscription]: https://azure.microsoft.com/free/
[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<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-cognitiveservices-anomalydetector</artifactId>
<version>1.0.0-beta.1</version> <!-- {x-version-update;com.azure:azure-cognitiveservices-anomalydetector;current} -->
<packaging>jar</packaging>

<name>Microsoft Azure SDK for AnomalyDetectorClient Management</name>
<description>This package contains Microsoft Azure AnomalyDetectorClient client library.</description>
<url>https://github.com/Azure/azure-sdk-for-java</url>

<licenses>
<license>
<name>The MIT License (MIT)</name>
<url>http://opensource.org/licenses/MIT</url>
<distribution>repo</distribution>
</license>
</licenses>

<scm>
<url>https://github.com/Azure/azure-sdk-for-java</url>
<connection>scm:git:git@github.com:Azure/azure-sdk-for-java.git</connection>
<developerConnection>scm:git:git@github.com:Azure/azure-sdk-for-java.git</developerConnection>
<tag>HEAD</tag>
</scm>
<developers>
<developer>
<id>microsoft</id>
<name>Microsoft</name>
</developer>
</developers>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jacoco.skip>true</jacoco.skip>
</properties>
<dependencies>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core</artifactId>
<version>1.27.0</version> <!-- {x-version-update;com.azure:azure-core;dependency} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core-http-netty</artifactId>
<version>1.11.9</version> <!-- {x-version-update;com.azure:azure-core-http-netty;dependency} -->
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.8.2</version> <!-- {x-version-update;org.junit.jupiter:junit-jupiter-engine;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core-test</artifactId>
<version>1.7.10</version> <!-- {x-version-update;com.azure:azure-core-test;dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-identity</artifactId>
<version>1.5.0</version> <!-- {x-version-update;com.azure:azure-identity;dependency} -->
<scope>test</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,211 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.cognitiveservices.anomalydetector;

import com.azure.cognitiveservices.anomalydetector.implementation.AnomalyDetectorClientImpl;
import com.azure.core.annotation.Generated;
import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceClient;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.exception.ClientAuthenticationException;
import com.azure.core.exception.HttpResponseException;
import com.azure.core.exception.ResourceModifiedException;
import com.azure.core.exception.ResourceNotFoundException;
import com.azure.core.http.rest.RequestOptions;
import com.azure.core.http.rest.Response;
import com.azure.core.util.BinaryData;
import reactor.core.publisher.Mono;

/** Initializes a new instance of the asynchronous AnomalyDetectorClient type. */
@ServiceClient(builder = AnomalyDetectorClientBuilder.class, isAsync = true)
public final class AnomalyDetectorAsyncClient {
@Generated private final AnomalyDetectorClientImpl serviceClient;

/**
* Initializes an instance of AnomalyDetectorAsyncClient class.
*
* @param serviceClient the service client implementation.
*/
@Generated
AnomalyDetectorAsyncClient(AnomalyDetectorClientImpl serviceClient) {
this.serviceClient = serviceClient;
}

/**
* This operation generates a model with 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.
*
* <p><strong>Request Body Schema</strong>
*
* <pre>{@code
* {
* series: [
* {
* timestamp: String
* value: float
* }
* ]
* granularity: String(yearly/monthly/weekly/daily/hourly/minutely/secondly/microsecond/none)
* customInterval: Integer
* period: Integer
* maxAnomalyRatio: Float
* sensitivity: Integer
* imputeMode: String(auto/previous/linear/fixed/zero/notFill)
* imputeFixedValue: Float
* }
* }</pre>
*
* <p><strong>Response Body Schema</strong>
*
* <pre>{@code
* {
* period: int
* expectedValues: [
* float
* ]
* upperMargins: [
* float
* ]
* lowerMargins: [
* float
* ]
* isAnomaly: [
* boolean
* ]
* isNegativeAnomaly: [
* boolean
* ]
* isPositiveAnomaly: [
* boolean
* ]
* severity: [
* float
* ]
* }
* }</pre>
*
* @param body Time series points and period if needed. Advanced model parameters can also be set in the request.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
* @return the response of entire anomaly detection along with {@link Response} on successful completion of {@link
* Mono}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<BinaryData>> detectEntireSeriesWithResponse(BinaryData body, RequestOptions requestOptions) {
return this.serviceClient.detectEntireSeriesWithResponseAsync(body, requestOptions);
}

/**
* 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.
*
* <p><strong>Request Body Schema</strong>
*
* <pre>{@code
* {
* series: [
* {
* timestamp: String
* value: float
* }
* ]
* granularity: String(yearly/monthly/weekly/daily/hourly/minutely/secondly/microsecond/none)
* customInterval: Integer
* period: Integer
* maxAnomalyRatio: Float
* sensitivity: Integer
* imputeMode: String(auto/previous/linear/fixed/zero/notFill)
* imputeFixedValue: Float
* }
* }</pre>
*
* <p><strong>Response Body Schema</strong>
*
* <pre>{@code
* {
* period: int
* suggestedWindow: int
* expectedValue: float
* upperMargin: float
* lowerMargin: float
* isAnomaly: boolean
* isNegativeAnomaly: boolean
* isPositiveAnomaly: boolean
* severity: Float
* }
* }</pre>
*
* @param body Time series points and period if needed. Advanced model parameters can also be set in the request.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
* @return the response of last anomaly detection along with {@link Response} on successful completion of {@link
* Mono}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<BinaryData>> detectLastPointWithResponse(BinaryData body, RequestOptions requestOptions) {
return this.serviceClient.detectLastPointWithResponseAsync(body, requestOptions);
}

/**
* Evaluate change point score of every series point.
*
* <p><strong>Request Body Schema</strong>
*
* <pre>{@code
* {
* series: [
* {
* timestamp: String
* value: float
* }
* ]
* granularity: String(yearly/monthly/weekly/daily/hourly/minutely/secondly/microsecond/none)
* customInterval: Integer
* period: Integer
* stableTrendWindow: Integer
* threshold: Float
* }
* }</pre>
*
* <p><strong>Response Body Schema</strong>
*
* <pre>{@code
* {
* period: Integer
* isChangePoint: [
* boolean
* ]
* confidenceScores: [
* float
* ]
* }
* }</pre>
*
* @param body Time series points and granularity is needed. Advanced model parameters can also be set in the
* request if needed.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
* @return the response of change point detection along with {@link Response} on successful completion of {@link
* Mono}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<BinaryData>> detectChangePointWithResponse(BinaryData body, RequestOptions requestOptions) {
return this.serviceClient.detectChangePointWithResponseAsync(body, requestOptions);
}
}
Loading

0 comments on commit b9f778f

Please sign in to comment.