forked from Azure/azure-sdk-for-java
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CodeGen from PR 29121 in Azure/azure-rest-api-specs
Merge aa114de39d90edae5a808c301a04397af95bc5d9 into 88f9ba778e8611066336aa8713e3205788153913
- Loading branch information
SDKAuto
committed
May 16, 2024
1 parent
3a888ba
commit 2b3874a
Showing
6 changed files
with
64 additions
and
68 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
78 changes: 37 additions & 41 deletions
78
...evcenter/src/main/java/com/azure/developer/devcenter/models/DevCenterOperationStatus.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 |
---|---|---|
@@ -1,75 +1,71 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
// Code generated by Microsoft (R) TypeSpec Code Generator. | ||
package com.azure.developer.devcenter.models; | ||
|
||
import com.azure.core.annotation.Generated; | ||
import com.azure.core.util.ExpandableStringEnum; | ||
import java.util.Collection; | ||
package com.azure.developer.devcenter.models; | ||
|
||
/** | ||
* Enum describing allowed operation states. | ||
*/ | ||
public final class DevCenterOperationStatus extends ExpandableStringEnum<DevCenterOperationStatus> { | ||
public enum DevCenterOperationStatus { | ||
/** | ||
* The operation has not started. | ||
*/ | ||
NOT_STARTED("NotStarted"), | ||
|
||
/** | ||
* The operation is in progress. | ||
*/ | ||
@Generated | ||
public static final DevCenterOperationStatus RUNNING = fromString("Running"); | ||
RUNNING("Running"), | ||
|
||
/** | ||
* The operation has been canceled by the user. | ||
* The operation has completed successfully. | ||
*/ | ||
@Generated | ||
public static final DevCenterOperationStatus CANCELED = fromString("Canceled"); | ||
SUCCEEDED("Succeeded"), | ||
|
||
/** | ||
* The operation has failed. | ||
*/ | ||
@Generated | ||
public static final DevCenterOperationStatus FAILED = fromString("Failed"); | ||
FAILED("Failed"), | ||
|
||
/** | ||
* Creates a new instance of DevCenterOperationStatus value. | ||
* | ||
* @deprecated Use the {@link #fromString(String)} factory method. | ||
* The operation has been canceled by the user. | ||
*/ | ||
@Generated | ||
@Deprecated | ||
public DevCenterOperationStatus() { | ||
} | ||
CANCELED("Canceled"); | ||
|
||
/** | ||
* Creates or finds a DevCenterOperationStatus from its string representation. | ||
* | ||
* @param name a name to look for. | ||
* @return the corresponding DevCenterOperationStatus. | ||
* The actual serialized value for a DevCenterOperationStatus instance. | ||
*/ | ||
@Generated | ||
public static DevCenterOperationStatus fromString(String name) { | ||
return fromString(name, DevCenterOperationStatus.class); | ||
} | ||
private final String value; | ||
|
||
/** | ||
* Gets known DevCenterOperationStatus values. | ||
* | ||
* @return known DevCenterOperationStatus values. | ||
*/ | ||
@Generated | ||
public static Collection<DevCenterOperationStatus> values() { | ||
return values(DevCenterOperationStatus.class); | ||
DevCenterOperationStatus(String value) { | ||
this.value = value; | ||
} | ||
|
||
/** | ||
* The operation has not started. | ||
* Parses a serialized value to a DevCenterOperationStatus instance. | ||
* | ||
* @param value the serialized value to parse. | ||
* @return the parsed DevCenterOperationStatus object, or null if unable to parse. | ||
*/ | ||
@Generated | ||
public static final DevCenterOperationStatus NOT_STARTED = fromString("NotStarted"); | ||
public static DevCenterOperationStatus fromString(String value) { | ||
if (value == null) { | ||
return null; | ||
} | ||
DevCenterOperationStatus[] items = DevCenterOperationStatus.values(); | ||
for (DevCenterOperationStatus item : items) { | ||
if (item.toString().equalsIgnoreCase(value)) { | ||
return item; | ||
} | ||
} | ||
return null; | ||
} | ||
|
||
/** | ||
* The operation has completed successfully. | ||
* {@inheritDoc} | ||
*/ | ||
@Generated | ||
public static final DevCenterOperationStatus SUCCEEDED = fromString("Succeeded"); | ||
@Override | ||
public String toString() { | ||
return this.value; | ||
} | ||
} |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
directory: specification/devcenter/DevCenter | ||
commit: 5e976eab0086a3b9e66393597efb2437e75ce808 | ||
commit: ea05402820c853cfb2b63933d36dc4ba61944302 | ||
repo: Azure/azure-rest-api-specs | ||
cleanup: true | ||
additionalDirectories: |