forked from Azure/azure-sdk-for-java
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add implementation for relationship APIs (Azure#14527)
* feat(adt): Add implementation for relationship APIs
- Loading branch information
1 parent
7fb9af3
commit 28503b2
Showing
7 changed files
with
909 additions
and
444 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
429 changes: 370 additions & 59 deletions
429
...-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java
Large diffs are not rendered by default.
Oops, something went wrong.
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
41 changes: 41 additions & 0 deletions
41
...ins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/RequestOptions.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,41 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
package com.azure.digitaltwins.core; | ||
|
||
import com.azure.core.annotation.Fluent; | ||
|
||
/** | ||
* General request options that are applicable, but optional, for many APIs. | ||
*/ | ||
@Fluent | ||
public class RequestOptions { | ||
|
||
private String ifMatch; | ||
|
||
/** | ||
* Gets a string representing a weak ETag for the entity that this request performs an operation against, as per RFC7232. | ||
* @return A string representing a weak ETag for the entity that this request performs an operation against, as per RFC7232. | ||
*/ | ||
public String getIfMatch() { | ||
return ifMatch; | ||
} | ||
|
||
/** | ||
* Sets a string representing a weak ETag for the entity that this request performs an operation against, as per RFC7232. | ||
* | ||
* <p> The request's operation is performed only if this ETag matches the value maintained by the server, | ||
* indicating that the entity has not been modified since it was last retrieved. | ||
* To force the operation to execute only if the entity exists, set the ETag to the wildcard character '*'. | ||
* To force the operation to execute unconditionally, leave this value null. | ||
* If this value is not set, it defaults to null, and the ifMatch header will not be sent with the request. | ||
* This means that update and delete will be unconditional and the operation will execute regardless of the existence of the resource. </p> | ||
* | ||
* @param ifMatch A string representing a weak ETag for the entity that this request performs an operation against, as per RFC7232. | ||
* @return The RequestOptions object itself. | ||
*/ | ||
public RequestOptions setIfMatch(String ifMatch) { | ||
this.ifMatch = ifMatch; | ||
return this; | ||
} | ||
} |
Oops, something went wrong.