Skip to content

[AutoPR azure-ai-anomalydetector] Support ad test 1 #3039

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ public Mono<Response<BinaryData>> detectUnivariateChangePointWithResponse(
* @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 detection results for the given resultId along with {@link Response} on successful completion of {@link
* @return detections results for the given resultId along with {@link Response} on successful completion of {@link
* Mono}.
*/
@Generated
Expand Down Expand Up @@ -701,7 +701,7 @@ public Mono<Response<BinaryData>> getMultivariateModelWithResponse(String modelI
* @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 detection results for the given resultId along with {@link Response} on successful completion of {@link
* @return detections results for the given resultId along with {@link Response} on successful completion of {@link
* Mono}.
*/
@Generated
Expand Down Expand Up @@ -885,7 +885,7 @@ public Mono<UnivariateChangePointDetectionResult> detectUnivariateChangePoint(
* @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.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return detection results for the given resultId on successful completion of {@link Mono}.
* @return detections results for the given resultId on successful completion of {@link Mono}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
Expand Down Expand Up @@ -940,8 +940,9 @@ public Mono<AnomalyDetectionModel> trainMultivariateModel(ModelInfo modelInfo) {
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return response of listing models as paginated response with {@link PagedFlux}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedFlux<AnomalyDetectionModel> listMultivariateModels(Integer skip, Integer top) {
public PagedFlux<AnomalyDetectionModel> listMultivariateModels(Integer skip, Integer top) {
// Generated convenience method for listMultivariateModels
RequestOptions requestOptions = new RequestOptions();
if (skip != null) {
Expand Down Expand Up @@ -1081,7 +1082,7 @@ public Mono<AnomalyDetectionModel> getMultivariateModel(String modelId) {
* @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.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return detection results for the given resultId on successful completion of {@link Mono}.
* @return detections results for the given resultId on successful completion of {@link Mono}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ public Response<BinaryData> detectUnivariateChangePointWithResponse(
* @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 detection results for the given resultId along with {@link Response}.
* @return detections results for the given resultId along with {@link Response}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
Expand Down Expand Up @@ -690,7 +690,7 @@ public Response<BinaryData> getMultivariateModelWithResponse(String modelId, Req
* @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 detection results for the given resultId along with {@link Response}.
* @return detections results for the given resultId along with {@link Response}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
Expand Down Expand Up @@ -873,7 +873,7 @@ public UnivariateChangePointDetectionResult detectUnivariateChangePoint(
* @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.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return detection results for the given resultId.
* @return detections results for the given resultId.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
Expand Down Expand Up @@ -928,8 +928,9 @@ public AnomalyDetectionModel trainMultivariateModel(ModelInfo modelInfo) {
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return response of listing models as paginated response with {@link PagedIterable}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable<AnomalyDetectionModel> listMultivariateModels(Integer skip, Integer top) {
public PagedIterable<AnomalyDetectionModel> listMultivariateModels(Integer skip, Integer top) {
// Generated convenience method for listMultivariateModels
return new PagedIterable<>(client.listMultivariateModels(skip, top));
}
Expand Down Expand Up @@ -1016,7 +1017,7 @@ public AnomalyDetectionModel getMultivariateModel(String modelId) {
* @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.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return detection results for the given resultId.
* @return detections results for the given resultId.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,7 @@ public Response<BinaryData> detectUnivariateChangePointWithResponse(
* @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 detection results for the given resultId along with {@link Response} on successful completion of {@link
* @return detections results for the given resultId along with {@link Response} on successful completion of {@link
* Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Expand Down Expand Up @@ -920,7 +920,7 @@ public Mono<Response<BinaryData>> getMultivariateBatchDetectionResultWithRespons
* @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 detection results for the given resultId along with {@link Response}.
* @return detections results for the given resultId along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<BinaryData> getMultivariateBatchDetectionResultWithResponse(
Expand Down Expand Up @@ -1753,7 +1753,7 @@ public Response<BinaryData> getMultivariateModelWithResponse(String modelId, Req
* @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 detection results for the given resultId along with {@link Response} on successful completion of {@link
* @return detections results for the given resultId along with {@link Response} on successful completion of {@link
* Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Expand Down Expand Up @@ -1855,7 +1855,7 @@ public Mono<Response<BinaryData>> detectMultivariateBatchAnomalyWithResponseAsyn
* @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 detection results for the given resultId along with {@link Response}.
* @return detections results for the given resultId along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<BinaryData> detectMultivariateBatchAnomalyWithResponse(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,48 +4,43 @@

package com.azure.ai.anomalydetector.models;

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. */
public static final AlignMode INNER = fromString("Inner");

/** Enum value Outer. */
OUTER("Outer");
/** Static value Outer for AlignMode. */
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.
*/
@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.
*/
@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.
*/
public static Collection<AlignMode> values() {
return values(AlignMode.class);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,22 @@
import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;

/** Defines values for DataSchema. */
/** Data schema of input data source: OneTable or MultiTable. The default DataSchema is OneTable. */
public final class DataSchema extends ExpandableStringEnum<DataSchema> {
/** Static value OneTable for DataSchema. */
public static final DataSchema ONE_TABLE = fromString("OneTable");

/** Static value MultiTable for DataSchema. */
public static final DataSchema MULTI_TABLE = fromString("MultiTable");

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

/**
* Creates or finds a DataSchema from its string representation.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Collection;

/** Defines values for FillNAMethod. */
/**
* An optional field, indicating how missing values will be filled. One of Previous, Subsequent, Linear, Zero, Fixed.
*/
public final class FillNAMethod extends ExpandableStringEnum<FillNAMethod> {
/** Static value Previous for FillNAMethod. */
public static final FillNAMethod PREVIOUS = fromString("Previous");
Expand All @@ -25,6 +27,14 @@ public final class FillNAMethod extends ExpandableStringEnum<FillNAMethod> {
/** Static value Fixed for FillNAMethod. */
public static final FillNAMethod FIXED = fromString("Fixed");

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

/**
* Creates or finds a FillNAMethod from its string representation.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ public final class ImputeMode extends ExpandableStringEnum<ImputeMode> {
/** Static value notFill for ImputeMode. */
public static final ImputeMode NOT_FILL = fromString("notFill");

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

/**
* Creates or finds a ImputeMode from its string representation.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,54 +4,49 @@

package com.azure.ai.anomalydetector.models;

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 ModelStatus. */
public enum ModelStatus {
/** Enum value CREATED. */
CREATED("CREATED"),
public final class ModelStatus extends ExpandableStringEnum<ModelStatus> {
/** Static value CREATED for ModelStatus. */
public static final ModelStatus CREATED = fromString("CREATED");

/** Enum value RUNNING. */
RUNNING("RUNNING"),
/** Static value RUNNING for ModelStatus. */
public static final ModelStatus RUNNING = fromString("RUNNING");

/** Enum value READY. */
READY("READY"),
/** Static value READY for ModelStatus. */
public static final ModelStatus READY = fromString("READY");

/** Enum value FAILED. */
FAILED("FAILED");
/** Static value FAILED for ModelStatus. */
public static final ModelStatus FAILED = fromString("FAILED");

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

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

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

/** {@inheritDoc} */
@JsonValue
@Override
public String toString() {
return this.value;
/**
* Gets known ModelStatus values.
*
* @return known ModelStatus values.
*/
public static Collection<ModelStatus> values() {
return values(ModelStatus.class);
}
}
Loading