Skip to content

Commit 8e9ec10

Browse files
author
SDKAuto
committed
CodeGen from PR 3627 in openapi-env-test/azure-rest-api-specs
Merge 55518ad9b4ef89697acaf143d5234cc8431b9a72 into beefd08bee3413e2be63bb72fa5f5883edc40422
1 parent 29215fc commit 8e9ec10

File tree

11 files changed

+171
-163
lines changed

11 files changed

+171
-163
lines changed

sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/AnomalyDetectorAsyncClient.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ public Mono<Response<BinaryData>> detectUnivariateChangePointWithResponse(
301301
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
302302
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
303303
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
304-
* @return detection results for the given resultId along with {@link Response} on successful completion of {@link
304+
* @return detections results for the given resultId along with {@link Response} on successful completion of {@link
305305
* Mono}.
306306
*/
307307
@Generated
@@ -701,7 +701,7 @@ public Mono<Response<BinaryData>> getMultivariateModelWithResponse(String modelI
701701
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
702702
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
703703
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
704-
* @return detection results for the given resultId along with {@link Response} on successful completion of {@link
704+
* @return detections results for the given resultId along with {@link Response} on successful completion of {@link
705705
* Mono}.
706706
*/
707707
@Generated
@@ -885,7 +885,7 @@ public Mono<UnivariateChangePointDetectionResult> detectUnivariateChangePoint(
885885
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
886886
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
887887
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
888-
* @return detection results for the given resultId on successful completion of {@link Mono}.
888+
* @return detections results for the given resultId on successful completion of {@link Mono}.
889889
*/
890890
@Generated
891891
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -940,8 +940,9 @@ public Mono<AnomalyDetectionModel> trainMultivariateModel(ModelInfo modelInfo) {
940940
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
941941
* @return response of listing models as paginated response with {@link PagedFlux}.
942942
*/
943+
@Generated
943944
@ServiceMethod(returns = ReturnType.COLLECTION)
944-
PagedFlux<AnomalyDetectionModel> listMultivariateModels(Integer skip, Integer top) {
945+
public PagedFlux<AnomalyDetectionModel> listMultivariateModels(Integer skip, Integer top) {
945946
// Generated convenience method for listMultivariateModels
946947
RequestOptions requestOptions = new RequestOptions();
947948
if (skip != null) {
@@ -1081,7 +1082,7 @@ public Mono<AnomalyDetectionModel> getMultivariateModel(String modelId) {
10811082
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
10821083
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
10831084
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
1084-
* @return detection results for the given resultId on successful completion of {@link Mono}.
1085+
* @return detections results for the given resultId on successful completion of {@link Mono}.
10851086
*/
10861087
@Generated
10871088
@ServiceMethod(returns = ReturnType.SINGLE)

sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/AnomalyDetectorClient.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ public Response<BinaryData> detectUnivariateChangePointWithResponse(
291291
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
292292
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
293293
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
294-
* @return detection results for the given resultId along with {@link Response}.
294+
* @return detections results for the given resultId along with {@link Response}.
295295
*/
296296
@Generated
297297
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -690,7 +690,7 @@ public Response<BinaryData> getMultivariateModelWithResponse(String modelId, Req
690690
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
691691
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
692692
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
693-
* @return detection results for the given resultId along with {@link Response}.
693+
* @return detections results for the given resultId along with {@link Response}.
694694
*/
695695
@Generated
696696
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -873,7 +873,7 @@ public UnivariateChangePointDetectionResult detectUnivariateChangePoint(
873873
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
874874
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
875875
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
876-
* @return detection results for the given resultId.
876+
* @return detections results for the given resultId.
877877
*/
878878
@Generated
879879
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -928,8 +928,9 @@ public AnomalyDetectionModel trainMultivariateModel(ModelInfo modelInfo) {
928928
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
929929
* @return response of listing models as paginated response with {@link PagedIterable}.
930930
*/
931+
@Generated
931932
@ServiceMethod(returns = ReturnType.COLLECTION)
932-
PagedIterable<AnomalyDetectionModel> listMultivariateModels(Integer skip, Integer top) {
933+
public PagedIterable<AnomalyDetectionModel> listMultivariateModels(Integer skip, Integer top) {
933934
// Generated convenience method for listMultivariateModels
934935
return new PagedIterable<>(client.listMultivariateModels(skip, top));
935936
}
@@ -1016,7 +1017,7 @@ public AnomalyDetectionModel getMultivariateModel(String modelId) {
10161017
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
10171018
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
10181019
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
1019-
* @return detection results for the given resultId.
1020+
* @return detections results for the given resultId.
10201021
*/
10211022
@Generated
10221023
@ServiceMethod(returns = ReturnType.SINGLE)

sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/implementation/AnomalyDetectorClientImpl.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,7 @@ public Response<BinaryData> detectUnivariateChangePointWithResponse(
834834
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
835835
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
836836
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
837-
* @return detection results for the given resultId along with {@link Response} on successful completion of {@link
837+
* @return detections results for the given resultId along with {@link Response} on successful completion of {@link
838838
* Mono}.
839839
*/
840840
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -920,7 +920,7 @@ public Mono<Response<BinaryData>> getMultivariateBatchDetectionResultWithRespons
920920
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
921921
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
922922
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
923-
* @return detection results for the given resultId along with {@link Response}.
923+
* @return detections results for the given resultId along with {@link Response}.
924924
*/
925925
@ServiceMethod(returns = ReturnType.SINGLE)
926926
public Response<BinaryData> getMultivariateBatchDetectionResultWithResponse(
@@ -1753,7 +1753,7 @@ public Response<BinaryData> getMultivariateModelWithResponse(String modelId, Req
17531753
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
17541754
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
17551755
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
1756-
* @return detection results for the given resultId along with {@link Response} on successful completion of {@link
1756+
* @return detections results for the given resultId along with {@link Response} on successful completion of {@link
17571757
* Mono}.
17581758
*/
17591759
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -1855,7 +1855,7 @@ public Mono<Response<BinaryData>> detectMultivariateBatchAnomalyWithResponseAsyn
18551855
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
18561856
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
18571857
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
1858-
* @return detection results for the given resultId along with {@link Response}.
1858+
* @return detections results for the given resultId along with {@link Response}.
18591859
*/
18601860
@ServiceMethod(returns = ReturnType.SINGLE)
18611861
public Response<BinaryData> detectMultivariateBatchAnomalyWithResponse(

sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/AlignMode.java

Lines changed: 26 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -4,48 +4,43 @@
44

55
package com.azure.ai.anomalydetector.models;
66

7+
import com.azure.core.util.ExpandableStringEnum;
78
import com.fasterxml.jackson.annotation.JsonCreator;
8-
import com.fasterxml.jackson.annotation.JsonValue;
9+
import java.util.Collection;
910

1011
/** Defines values for AlignMode. */
11-
public enum AlignMode {
12-
/** Enum value Inner. */
13-
INNER("Inner"),
12+
public final class AlignMode extends ExpandableStringEnum<AlignMode> {
13+
/** Static value Inner for AlignMode. */
14+
public static final AlignMode INNER = fromString("Inner");
1415

15-
/** Enum value Outer. */
16-
OUTER("Outer");
16+
/** Static value Outer for AlignMode. */
17+
public static final AlignMode OUTER = fromString("Outer");
1718

18-
/** The actual serialized value for a AlignMode instance. */
19-
private final String value;
20-
21-
AlignMode(String value) {
22-
this.value = value;
23-
}
19+
/**
20+
* Creates a new instance of AlignMode value.
21+
*
22+
* @deprecated Use the {@link #fromString(String)} factory method.
23+
*/
24+
@Deprecated
25+
public AlignMode() {}
2426

2527
/**
26-
* Parses a serialized value to a AlignMode instance.
28+
* Creates or finds a AlignMode from its string representation.
2729
*
28-
* @param value the serialized value to parse.
29-
* @return the parsed AlignMode object, or null if unable to parse.
30+
* @param name a name to look for.
31+
* @return the corresponding AlignMode.
3032
*/
3133
@JsonCreator
32-
public static AlignMode fromString(String value) {
33-
if (value == null) {
34-
return null;
35-
}
36-
AlignMode[] items = AlignMode.values();
37-
for (AlignMode item : items) {
38-
if (item.toString().equalsIgnoreCase(value)) {
39-
return item;
40-
}
41-
}
42-
return null;
34+
public static AlignMode fromString(String name) {
35+
return fromString(name, AlignMode.class);
4336
}
4437

45-
/** {@inheritDoc} */
46-
@JsonValue
47-
@Override
48-
public String toString() {
49-
return this.value;
38+
/**
39+
* Gets known AlignMode values.
40+
*
41+
* @return known AlignMode values.
42+
*/
43+
public static Collection<AlignMode> values() {
44+
return values(AlignMode.class);
5045
}
5146
}

sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/DataSchema.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,22 @@
88
import com.fasterxml.jackson.annotation.JsonCreator;
99
import java.util.Collection;
1010

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

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

19+
/**
20+
* Creates a new instance of DataSchema value.
21+
*
22+
* @deprecated Use the {@link #fromString(String)} factory method.
23+
*/
24+
@Deprecated
25+
public DataSchema() {}
26+
1927
/**
2028
* Creates or finds a DataSchema from its string representation.
2129
*

sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/FillNAMethod.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
import com.fasterxml.jackson.annotation.JsonCreator;
99
import java.util.Collection;
1010

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

30+
/**
31+
* Creates a new instance of FillNAMethod value.
32+
*
33+
* @deprecated Use the {@link #fromString(String)} factory method.
34+
*/
35+
@Deprecated
36+
public FillNAMethod() {}
37+
2838
/**
2939
* Creates or finds a FillNAMethod from its string representation.
3040
*

sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/ImputeMode.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@ public final class ImputeMode extends ExpandableStringEnum<ImputeMode> {
2828
/** Static value notFill for ImputeMode. */
2929
public static final ImputeMode NOT_FILL = fromString("notFill");
3030

31+
/**
32+
* Creates a new instance of ImputeMode value.
33+
*
34+
* @deprecated Use the {@link #fromString(String)} factory method.
35+
*/
36+
@Deprecated
37+
public ImputeMode() {}
38+
3139
/**
3240
* Creates or finds a ImputeMode from its string representation.
3341
*

sdk/anomalydetector/azure-ai-anomalydetector/src/main/java/com/azure/ai/anomalydetector/models/ModelStatus.java

Lines changed: 30 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4,54 +4,49 @@
44

55
package com.azure.ai.anomalydetector.models;
66

7+
import com.azure.core.util.ExpandableStringEnum;
78
import com.fasterxml.jackson.annotation.JsonCreator;
8-
import com.fasterxml.jackson.annotation.JsonValue;
9+
import java.util.Collection;
910

1011
/** Defines values for ModelStatus. */
11-
public enum ModelStatus {
12-
/** Enum value CREATED. */
13-
CREATED("CREATED"),
12+
public final class ModelStatus extends ExpandableStringEnum<ModelStatus> {
13+
/** Static value CREATED for ModelStatus. */
14+
public static final ModelStatus CREATED = fromString("CREATED");
1415

15-
/** Enum value RUNNING. */
16-
RUNNING("RUNNING"),
16+
/** Static value RUNNING for ModelStatus. */
17+
public static final ModelStatus RUNNING = fromString("RUNNING");
1718

18-
/** Enum value READY. */
19-
READY("READY"),
19+
/** Static value READY for ModelStatus. */
20+
public static final ModelStatus READY = fromString("READY");
2021

21-
/** Enum value FAILED. */
22-
FAILED("FAILED");
22+
/** Static value FAILED for ModelStatus. */
23+
public static final ModelStatus FAILED = fromString("FAILED");
2324

24-
/** The actual serialized value for a ModelStatus instance. */
25-
private final String value;
26-
27-
ModelStatus(String value) {
28-
this.value = value;
29-
}
25+
/**
26+
* Creates a new instance of ModelStatus value.
27+
*
28+
* @deprecated Use the {@link #fromString(String)} factory method.
29+
*/
30+
@Deprecated
31+
public ModelStatus() {}
3032

3133
/**
32-
* Parses a serialized value to a ModelStatus instance.
34+
* Creates or finds a ModelStatus from its string representation.
3335
*
34-
* @param value the serialized value to parse.
35-
* @return the parsed ModelStatus object, or null if unable to parse.
36+
* @param name a name to look for.
37+
* @return the corresponding ModelStatus.
3638
*/
3739
@JsonCreator
38-
public static ModelStatus fromString(String value) {
39-
if (value == null) {
40-
return null;
41-
}
42-
ModelStatus[] items = ModelStatus.values();
43-
for (ModelStatus item : items) {
44-
if (item.toString().equalsIgnoreCase(value)) {
45-
return item;
46-
}
47-
}
48-
return null;
40+
public static ModelStatus fromString(String name) {
41+
return fromString(name, ModelStatus.class);
4942
}
5043

51-
/** {@inheritDoc} */
52-
@JsonValue
53-
@Override
54-
public String toString() {
55-
return this.value;
44+
/**
45+
* Gets known ModelStatus values.
46+
*
47+
* @return known ModelStatus values.
48+
*/
49+
public static Collection<ModelStatus> values() {
50+
return values(ModelStatus.class);
5651
}
5752
}

0 commit comments

Comments
 (0)