-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for Long-Running-Operation-options extension handling (#442)
* Support for Long-Running-Operation-options extension handling * ensure MSICredentials::getToken honor provided tokenAudience
- Loading branch information
Showing
5 changed files
with
141 additions
and
22 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
29 changes: 29 additions & 0 deletions
29
azure-client-runtime/src/main/java/com/microsoft/azure/LongRunningFinalState.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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/** | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for | ||
* license information. | ||
*/ | ||
|
||
package com.microsoft.azure; | ||
|
||
/** | ||
* Describes how to retrieve the final state of a long running operation. | ||
*/ | ||
public enum LongRunningFinalState { | ||
/** | ||
* Indicate that no specific action required to retrieve the final state. | ||
*/ | ||
DEFAULT, | ||
/** | ||
* Indicate that use azure async operation uri to retrieve the final state. | ||
*/ | ||
AZURE_ASYNC_OPERATION, | ||
/** | ||
* Indicate that use location uri to retrieve the final state. | ||
*/ | ||
LOCATION, | ||
/** | ||
* Indicate that use original uri to retrieve the final state. | ||
*/ | ||
ORIGINAL_URI | ||
} |
40 changes: 40 additions & 0 deletions
40
azure-client-runtime/src/main/java/com/microsoft/azure/LongRunningOperationOptions.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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/** | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.txt in the project root for | ||
* license information. | ||
*/ | ||
|
||
package com.microsoft.azure; | ||
|
||
/** | ||
* Type representing LRO meta-data present in the x-ms-long-running-operation-options autorest extension. | ||
*/ | ||
public final class LongRunningOperationOptions { | ||
/** | ||
* Default instance of this type. | ||
*/ | ||
public static final LongRunningOperationOptions DEFAULT = new LongRunningOperationOptions().withFinalStateVia(LongRunningFinalState.DEFAULT); | ||
|
||
/** | ||
* Describes how to retrieve the final state of the LRO. | ||
*/ | ||
private LongRunningFinalState finalStateVia; | ||
|
||
/** | ||
* @return indicates how to retrieve the final state of LRO. | ||
*/ | ||
public LongRunningFinalState finalStateVia() { | ||
return this.finalStateVia; | ||
} | ||
|
||
/** | ||
* Sets LongRunningFinalState value. | ||
* | ||
* @param finalStateVia indicates how to retrieve the final state of LRO. | ||
* @return LongRunningOperationOptions | ||
*/ | ||
public LongRunningOperationOptions withFinalStateVia(LongRunningFinalState finalStateVia) { | ||
this.finalStateVia = finalStateVia; | ||
return this; | ||
} | ||
} |
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