Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import com.azure.core.util.Configuration;
import com.azure.core.util.CoreUtils;
import com.azure.core.util.builder.ClientBuilderUtil;
import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.serializer.JacksonAdapter;
import java.util.ArrayList;
import java.util.List;
Expand Down Expand Up @@ -72,6 +73,9 @@ public AnomalyDetectorClientBuilder() {
@Generated
@Override
public AnomalyDetectorClientBuilder pipeline(HttpPipeline pipeline) {
if (this.pipeline != null && pipeline == null) {
LOGGER.info("HttpPipeline is being set to 'null' when it was previously configured.");
}
this.pipeline = pipeline;
return this;
}
Expand Down Expand Up @@ -287,4 +291,6 @@ public AnomalyDetectorAsyncClient buildAsyncClient() {
public AnomalyDetectorClient buildClient() {
return new AnomalyDetectorClient(new AnomalyDetectorAsyncClient(buildInnerClient()));
}

private static final ClientLogger LOGGER = new ClientLogger(AnomalyDetectorClientBuilder.class);
}

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@

/**
* Package containing the implementations for AnomalyDetector. The Anomaly Detector API detects anomalies automatically
* in time series data. It supports two kinds of mode, one is for stateless using, another is for stateful using. In
* stateless mode, there are three functionalities. Entire Detect is for detecting the whole series with model trained
* by the time series, Last Detect is detecting last point with model trained by points before. ChangePoint Detect is
* for detecting trend changes in time series. In stateful mode, user can store time series, the stored time series will
* be used for detection anomalies. Under this mode, user can still use the above three functionalities by only giving a
* time range without preparing time series in client side. Besides the above three functionalities, stateful model also
* provide group based detection and labeling service. By leveraging labeling service user can provide labels for each
* detection result, these labels will be used for retuning or regenerating detection models. Inconsistency detection is
* a kind of group based detection, this detection will find inconsistency ones in a set of time series. By using
* anomaly detector service, business customers can discover incidents and establish a logic flow for root cause
* analysis.
* in time series data. It supports both a stateless detection mode and a stateful detection mode. In stateless mode,
* there are three functionalities. Entire Detect is for detecting the whole series, with the model trained by the time
* series. Last Detect is for detecting the last point, with the model trained by points before. ChangePoint Detect is
* for detecting trend changes in the time series. In stateful mode, the user can store time series. The stored time
* series will be used for detection anomalies. In this mode, the user can still use the preceding three functionalities
* by only giving a time range without preparing time series on the client side. Besides the preceding three
* functionalities, the stateful model provides group-based detection and labeling services. By using the labeling
* service, the user can provide labels for each detection result. These labels will be used for retuning or
* regenerating detection models. Inconsistency detection is a kind of group-based detection that finds inconsistencies
* in a set of time series. By using the anomaly detector service, business customers can discover incidents and
* establish a logic flow for root cause analysis.
*/
package com.azure.ai.anomalydetector.implementation;
Original file line number Diff line number Diff line change
Expand Up @@ -4,48 +4,47 @@

package com.azure.ai.anomalydetector.models;

import com.azure.core.annotation.Generated;
import com.azure.core.util.ExpandableStringEnum;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.Collection;

/** Defines values for AlignMode. */
public enum AlignMode {
/** Enum value Inner. */
INNER("Inner"),
public final class AlignMode extends ExpandableStringEnum<AlignMode> {
/** Static value Inner for AlignMode. */
@Generated public static final AlignMode INNER = fromString("Inner");

/** Enum value Outer. */
OUTER("Outer");
/** Static value Outer for AlignMode. */
@Generated public static final AlignMode OUTER = fromString("Outer");

/** The actual serialized value for a AlignMode instance. */
private final String value;

AlignMode(String value) {
this.value = value;
}
/**
* Creates a new instance of AlignMode value.
*
* @deprecated Use the {@link #fromString(String)} factory method.
*/
@Generated
@Deprecated
public AlignMode() {}

/**
* Parses a serialized value to a AlignMode instance.
* Creates or finds a AlignMode from its string representation.
*
* @param value the serialized value to parse.
* @return the parsed AlignMode object, or null if unable to parse.
* @param name a name to look for.
* @return the corresponding AlignMode.
*/
@Generated
@JsonCreator
public static AlignMode fromString(String value) {
if (value == null) {
return null;
}
AlignMode[] items = AlignMode.values();
for (AlignMode item : items) {
if (item.toString().equalsIgnoreCase(value)) {
return item;
}
}
return null;
public static AlignMode fromString(String name) {
return fromString(name, AlignMode.class);
}

/** {@inheritDoc} */
@JsonValue
@Override
public String toString() {
return this.value;
/**
* Gets known AlignMode values.
*
* @return known AlignMode values.
*/
@Generated
public static Collection<AlignMode> values() {
return values(AlignMode.class);
}
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// 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.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** An optional field, indicating the manner to align multiple variables. */
/** Manner of aligning multiple variables. */
@Fluent
public final class AlignPolicy {

/*
* An optional field, indicating how to align different variables to the same
* time-range. Either Inner or Outer.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// 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.models;

import com.azure.core.annotation.Immutable;
Expand All @@ -12,6 +11,7 @@
/** Response of getting a model. */
@Immutable
public final class AnomalyDetectionModel {

/*
* Model identifier.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// 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.models;

import com.azure.core.annotation.Immutable;
import com.fasterxml.jackson.annotation.JsonProperty;

/** Interpretation of the anomalous timestamp. */
/** Interpretation of the anomalous time stamp. */
@Immutable
public final class AnomalyInterpretation {

/*
* Variable.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// 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.models;

import com.azure.core.annotation.Immutable;
Expand All @@ -13,6 +12,7 @@
/** Anomaly status and information. */
@Immutable
public final class AnomalyState {

/*
* The timestamp for this anomaly.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
// 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.models;

import com.azure.core.annotation.Immutable;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Detailed information of the anomalous timestamp. */
/** Detailed information of the anomalous time stamp. */
@Immutable
public final class AnomalyValue {

/*
* True if an anomaly is detected at the current timestamp.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// 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.models;

import com.azure.core.annotation.Immutable;
Expand All @@ -11,6 +10,7 @@
/** Correlation changes among the anomalous variables. */
@Immutable
public final class CorrelationChanges {

/*
* The correlated variables that have correlation changes under an anomaly.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// 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.models;

import com.azure.core.util.ExpandableStringEnum;
import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;

/** Data schema of input data source: OneTable or MultiTable. The default DataSchema is OneTable. */
/** Data schema of the input data source. The default is OneTable. */
public final class DataSchema extends ExpandableStringEnum<DataSchema> {

/**
* OneTable means that your input data are all in one CSV file, which contains one 'timestamp' column and several
* variable columns. The default DataSchema is OneTable.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
// 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.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.annotation.Immutable;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Diagnostics information to help inspect the states of model or variable. */
@Fluent
/** Diagnostics information to help inspect the states of a model or variable. */
@Immutable
public final class DiagnosticsInfo {

/*
* Model status.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
// 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.models;

import com.azure.core.annotation.Immutable;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

/** ErrorResponse contains code and message that shows the error information. */
/** Error information that the API returned. */
@Immutable
public final class ErrorResponse {

/*
* The error code.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
// 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.models;

import com.azure.core.util.ExpandableStringEnum;
import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;

/**
* An optional field, indicating how missing values will be filled. One of Previous, Subsequent, Linear, Zero, Fixed.
*/
/** Field that indicates how missing values will be filled. */
public final class FillNAMethod extends ExpandableStringEnum<FillNAMethod> {

/** Static value Previous for FillNAMethod. */
public static final FillNAMethod PREVIOUS = fromString("Previous");

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// 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.models;

import com.azure.core.util.ExpandableStringEnum;
Expand All @@ -10,6 +9,7 @@

/** Defines values for ImputeMode. */
public final class ImputeMode extends ExpandableStringEnum<ImputeMode> {

/** Static value auto for ImputeMode. */
public static final ImputeMode AUTO = fromString("auto");

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// 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.models;

import com.azure.core.annotation.Fluent;
Expand All @@ -10,9 +9,10 @@
import java.time.OffsetDateTime;
import java.util.List;

/** Training result of a model including its status, errors and diagnostics information. */
/** Training result of a model, including its status, errors, and diagnostics information. */
@Fluent
public final class ModelInfo {

/*
* Source link to the input data to indicate an accessible Azure storage Uri,
* either pointed to an Azure blob storage folder, or pointed to a CSV file in
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
// 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.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.annotation.Immutable;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;

/** Model status. */
@Fluent
@Immutable
public final class ModelState {

/*
* This indicates the number of passes of the entire training dataset the
* algorithm has completed.
Expand Down
Loading