Skip to content

Commit

Permalink
json patch name change
Browse files Browse the repository at this point in the history
  • Loading branch information
timtay-microsoft committed Oct 7, 2020
1 parent d6935be commit 07a2983
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -244,14 +244,14 @@ <T> Mono<DigitalTwinsResponse<T>> getDigitalTwinWithResponse(String digitalTwinI
* {@codesnippet com.azure.digitaltwins.core.asyncClient.updateDigitalTwin#String-List}
*
* @param digitalTwinId The Id of the digital twin.
* @param digitalTwinUpdateOperations The JSON patch to apply to the specified digital twin.
* @param jsonPatch The JSON patch to apply to the specified digital twin.
* This argument can be created using {@link UpdateOperationUtility}.
* @return An empty Mono
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Void> updateDigitalTwin(String digitalTwinId, List<Object> digitalTwinUpdateOperations)
public Mono<Void> updateDigitalTwin(String digitalTwinId, List<Object> jsonPatch)
{
return updateDigitalTwinWithResponse(digitalTwinId, digitalTwinUpdateOperations, null)
return updateDigitalTwinWithResponse(digitalTwinId, jsonPatch, null)
.flatMap(voidResponse -> Mono.empty());
}

Expand All @@ -265,21 +265,21 @@ public Mono<Void> updateDigitalTwin(String digitalTwinId, List<Object> digitalTw
* {@codesnippet com.azure.digitaltwins.core.asyncClient.updateDigitalTwinWithResponse#String-List-Options}
*
* @param digitalTwinId The Id of the digital twin.
* @param digitalTwinUpdateOperations The JSON patch to apply to the specified digital twin.
* @param jsonPatch The JSON patch to apply to the specified digital twin.
* This argument can be created using {@link UpdateOperationUtility}.
* @param options The optional parameters for this request. If null, the default option values will be used.
* @return A {@link DigitalTwinsResponse}
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<DigitalTwinsResponse<Void>> updateDigitalTwinWithResponse(String digitalTwinId, List<Object> digitalTwinUpdateOperations, DigitalTwinsUpdateOptions options)
public Mono<DigitalTwinsResponse<Void>> updateDigitalTwinWithResponse(String digitalTwinId, List<Object> jsonPatch, DigitalTwinsUpdateOptions options)
{
return withContext(context -> updateDigitalTwinWithResponse(digitalTwinId, digitalTwinUpdateOperations, options, context));
return withContext(context -> updateDigitalTwinWithResponse(digitalTwinId, jsonPatch, options, context));
}

Mono<DigitalTwinsResponse<Void>> updateDigitalTwinWithResponse(String digitalTwinId, List<Object> digitalTwinUpdateOperations, DigitalTwinsUpdateOptions options, Context context) {
Mono<DigitalTwinsResponse<Void>> updateDigitalTwinWithResponse(String digitalTwinId, List<Object> jsonPatch, DigitalTwinsUpdateOptions options, Context context) {
return protocolLayer
.getDigitalTwins()
.updateWithResponseAsync(digitalTwinId, digitalTwinUpdateOperations, options, context)
.updateWithResponseAsync(digitalTwinId, jsonPatch, options, context)
.map(response -> {
DigitalTwinsResponseHeaders twinHeaders = mapper.convertValue(response.getDeserializedHeaders(), DigitalTwinsResponseHeaders.class);
return new DigitalTwinsResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), response.getValue(), twinHeaders);
Expand Down Expand Up @@ -475,13 +475,13 @@ <T> Mono<DigitalTwinsResponse<T>> getRelationshipWithResponse(String digitalTwin
*
* @param digitalTwinId The Id of the source digital twin.
* @param relationshipId The Id of the relationship to be updated.
* @param relationshipUpdateOperations The JSON patch to apply to the specified digital twin's relationship.
* @param jsonPatch The JSON patch to apply to the specified digital twin's relationship.
* This argument can be created using {@link UpdateOperationUtility}.
* @return An empty Mono.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Void> updateRelationship(String digitalTwinId, String relationshipId, List<Object> relationshipUpdateOperations) {
return updateRelationshipWithResponse(digitalTwinId, relationshipId, relationshipUpdateOperations, null)
public Mono<Void> updateRelationship(String digitalTwinId, String relationshipId, List<Object> jsonPatch) {
return updateRelationshipWithResponse(digitalTwinId, relationshipId, jsonPatch, null)
.flatMap(voidResponse -> Mono.empty());
}

Expand All @@ -494,20 +494,20 @@ public Mono<Void> updateRelationship(String digitalTwinId, String relationshipId
*
* @param digitalTwinId The Id of the source digital twin.
* @param relationshipId The Id of the relationship to be updated.
* @param relationshipUpdateOperations The JSON patch to apply to the specified digital twin's relationship.
* @param jsonPatch The JSON patch to apply to the specified digital twin's relationship.
* This argument can be created using {@link UpdateOperationUtility}.
* @param options The optional parameters for this request. If null, the default option values will be used.
* @return A {@link DigitalTwinsResponse} containing no parsed payload object.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<DigitalTwinsResponse<Void>> updateRelationshipWithResponse(String digitalTwinId, String relationshipId, List<Object> relationshipUpdateOperations, DigitalTwinsUpdateRelationshipOptions options) {
return withContext(context -> updateRelationshipWithResponse(digitalTwinId, relationshipId, relationshipUpdateOperations, options, context));
public Mono<DigitalTwinsResponse<Void>> updateRelationshipWithResponse(String digitalTwinId, String relationshipId, List<Object> jsonPatch, DigitalTwinsUpdateRelationshipOptions options) {
return withContext(context -> updateRelationshipWithResponse(digitalTwinId, relationshipId, jsonPatch, options, context));
}

Mono<DigitalTwinsResponse<Void>> updateRelationshipWithResponse(String digitalTwinId, String relationshipId, List<Object> relationshipUpdateOperations, DigitalTwinsUpdateRelationshipOptions options, Context context) {
Mono<DigitalTwinsResponse<Void>> updateRelationshipWithResponse(String digitalTwinId, String relationshipId, List<Object> jsonPatch, DigitalTwinsUpdateRelationshipOptions options, Context context) {
return protocolLayer
.getDigitalTwins()
.updateRelationshipWithResponseAsync(digitalTwinId, relationshipId, relationshipUpdateOperations, options, context)
.updateRelationshipWithResponseAsync(digitalTwinId, relationshipId, jsonPatch, options, context)
.map(response -> {
DigitalTwinsResponseHeaders twinHeaders = mapper.convertValue(response.getDeserializedHeaders(), DigitalTwinsResponseHeaders.class);
return new DigitalTwinsResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), response.getValue(), twinHeaders);
Expand Down Expand Up @@ -1058,13 +1058,13 @@ <T> Mono<DigitalTwinsResponse<T>> getComponentWithResponse(String digitalTwinId,
*
* @param digitalTwinId The Id of the digital twin that has the component to patch.
* @param componentPath The path of the component on the digital twin.
* @param componentUpdateOperations The JSON patch to apply to the specified digital twin's relationship.
* @param jsonPatch The JSON patch to apply to the specified digital twin's relationship.
* This argument can be created using {@link UpdateOperationUtility}.
* @return An empty Mono.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Void> updateComponent(String digitalTwinId, String componentPath, List<Object> componentUpdateOperations) {
return updateComponentWithResponse(digitalTwinId, componentPath, componentUpdateOperations, null)
public Mono<Void> updateComponent(String digitalTwinId, String componentPath, List<Object> jsonPatch) {
return updateComponentWithResponse(digitalTwinId, componentPath, jsonPatch, null)
.flatMap(voidResponse -> Mono.empty());
}

Expand All @@ -1077,18 +1077,18 @@ public Mono<Void> updateComponent(String digitalTwinId, String componentPath, Li
*
* @param digitalTwinId The Id of the digital twin that has the component to patch.
* @param componentPath The path of the component on the digital twin.
* @param componentUpdateOperations The JSON patch to apply to the specified digital twin's relationship.
* @param jsonPatch The JSON patch to apply to the specified digital twin's relationship.
* This argument can be created using {@link UpdateOperationUtility}.
* @param options The optional parameters for this request. If null, the default option values will be used.
* @return A {@link DigitalTwinsResponse} containing an empty Mono.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<DigitalTwinsResponse<Void>> updateComponentWithResponse(String digitalTwinId, String componentPath, List<Object> componentUpdateOperations, DigitalTwinsUpdateComponentOptions options) {
return withContext(context -> updateComponentWithResponse(digitalTwinId, componentPath, componentUpdateOperations, options, context));
public Mono<DigitalTwinsResponse<Void>> updateComponentWithResponse(String digitalTwinId, String componentPath, List<Object> jsonPatch, DigitalTwinsUpdateComponentOptions options) {
return withContext(context -> updateComponentWithResponse(digitalTwinId, componentPath, jsonPatch, options, context));
}

Mono<DigitalTwinsResponse<Void>> updateComponentWithResponse(String digitalTwinId, String componentPath, List<Object> componentUpdateOperations, DigitalTwinsUpdateComponentOptions options, Context context) {
return protocolLayer.getDigitalTwins().updateComponentWithResponseAsync(digitalTwinId, componentPath, componentUpdateOperations, options, context)
Mono<DigitalTwinsResponse<Void>> updateComponentWithResponse(String digitalTwinId, String componentPath, List<Object> jsonPatch, DigitalTwinsUpdateComponentOptions options, Context context) {
return protocolLayer.getDigitalTwins().updateComponentWithResponseAsync(digitalTwinId, componentPath, jsonPatch, options, context)
.flatMap(response -> {
DigitalTwinsResponseHeaders twinHeaders = mapper.convertValue(response.getDeserializedHeaders(), DigitalTwinsResponseHeaders.class);
return Mono.just(new DigitalTwinsResponse<>(response.getRequest(), response.getStatusCode(), response.getHeaders(), null, twinHeaders));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,13 @@ public <T> DigitalTwinsResponse<T> getDigitalTwinWithResponse(String digitalTwin
* {@codesnippet com.azure.digitaltwins.core.syncClient.updateDigitalTwin#String-List}
*
* @param digitalTwinId The Id of the digital twin.
* @param digitalTwinUpdateOperations The JSON patch to apply to the specified digital twin.
* @param jsonPatch The JSON patch to apply to the specified digital twin.
* This argument can be created using {@link UpdateOperationUtility}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public void updateDigitalTwin(String digitalTwinId, List<Object> digitalTwinUpdateOperations)
public void updateDigitalTwin(String digitalTwinId, List<Object> jsonPatch)
{
updateDigitalTwinWithResponse(digitalTwinId, digitalTwinUpdateOperations, null, Context.NONE);
updateDigitalTwinWithResponse(digitalTwinId, jsonPatch, null, Context.NONE);
}

/**
Expand All @@ -185,16 +185,16 @@ public void updateDigitalTwin(String digitalTwinId, List<Object> digitalTwinUpda
* {@codesnippet com.azure.digitaltwins.core.syncClient.updateDigitalTwinWithResponse#String-List-Options-Context}
*
* @param digitalTwinId The Id of the digital twin.
* @param digitalTwinUpdateOperations The JSON patch to apply to the specified digital twin.
* @param jsonPatch The JSON patch to apply to the specified digital twin.
* This argument can be created using {@link UpdateOperationUtility}.
* @param options The optional parameters for this request. If null, the default option values will be used.
* @param context Additional context that is passed through the Http pipeline during the service call.
* @return A {@link DigitalTwinsResponse}
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public DigitalTwinsResponse<Void> updateDigitalTwinWithResponse(String digitalTwinId, List<Object> digitalTwinUpdateOperations, DigitalTwinsUpdateOptions options, Context context)
public DigitalTwinsResponse<Void> updateDigitalTwinWithResponse(String digitalTwinId, List<Object> jsonPatch, DigitalTwinsUpdateOptions options, Context context)
{
return digitalTwinsAsyncClient.updateDigitalTwinWithResponse(digitalTwinId, digitalTwinUpdateOperations, options, context).block();
return digitalTwinsAsyncClient.updateDigitalTwinWithResponse(digitalTwinId, jsonPatch, options, context).block();
}

/**
Expand Down Expand Up @@ -345,12 +345,12 @@ public <T> DigitalTwinsResponse<T> getRelationshipWithResponse(String digitalTwi
*
* @param digitalTwinId The Id of the source digital twin.
* @param relationshipId The Id of the relationship to be updated.
* @param relationshipUpdateOperations The JSON patch to apply to the specified digital twin's relationship.
* @param jsonPatch The JSON patch to apply to the specified digital twin's relationship.
* This argument can be created using {@link UpdateOperationUtility}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public void updateRelationship(String digitalTwinId, String relationshipId, List<Object> relationshipUpdateOperations) {
updateRelationshipWithResponse(digitalTwinId, relationshipId, relationshipUpdateOperations, null, Context.NONE);
public void updateRelationship(String digitalTwinId, String relationshipId, List<Object> jsonPatch) {
updateRelationshipWithResponse(digitalTwinId, relationshipId, jsonPatch, null, Context.NONE);
}

/**
Expand All @@ -362,15 +362,15 @@ public void updateRelationship(String digitalTwinId, String relationshipId, List
*
* @param digitalTwinId The Id of the source digital twin.
* @param relationshipId The Id of the relationship to be updated.
* @param relationshipUpdateOperations The JSON patch to apply to the specified digital twin's relationship.
* @param jsonPatch The JSON patch to apply to the specified digital twin's relationship.
* This argument can be created using {@link UpdateOperationUtility}.
* @param options The optional parameters for this request. If null, the default option values will be used.
* @param context Additional context that is passed through the Http pipeline during the service call.
* @return A {@link DigitalTwinsResponse} containing no parsed payload object.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public DigitalTwinsResponse<Void> updateRelationshipWithResponse(String digitalTwinId, String relationshipId, List<Object> relationshipUpdateOperations, DigitalTwinsUpdateRelationshipOptions options, Context context) {
return digitalTwinsAsyncClient.updateRelationshipWithResponse(digitalTwinId, relationshipId, relationshipUpdateOperations, options, context).block();
public DigitalTwinsResponse<Void> updateRelationshipWithResponse(String digitalTwinId, String relationshipId, List<Object> jsonPatch, DigitalTwinsUpdateRelationshipOptions options, Context context) {
return digitalTwinsAsyncClient.updateRelationshipWithResponse(digitalTwinId, relationshipId, jsonPatch, options, context).block();
}

/**
Expand Down Expand Up @@ -705,12 +705,12 @@ public <T> DigitalTwinsResponse<T> getComponentWithResponse(String digitalTwinId
*
* @param digitalTwinId The Id of the digital twin that has the component to patch.
* @param componentPath The path of the component on the digital twin.
* @param componentUpdateOperations The JSON patch to apply to the specified digital twin's relationship.
* @param jsonPatch The JSON patch to apply to the specified digital twin's relationship.
* This argument can be created using {@link UpdateOperationUtility}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public void updateComponent(String digitalTwinId, String componentPath, List<Object> componentUpdateOperations) {
updateComponentWithResponse(digitalTwinId, componentPath, componentUpdateOperations, null, Context.NONE);
public void updateComponent(String digitalTwinId, String componentPath, List<Object> jsonPatch) {
updateComponentWithResponse(digitalTwinId, componentPath, jsonPatch, null, Context.NONE);
}

/**
Expand All @@ -722,15 +722,15 @@ public void updateComponent(String digitalTwinId, String componentPath, List<Obj
*
* @param digitalTwinId The Id of the digital twin that has the component to patch.
* @param componentPath The path of the component on the digital twin.
* @param componentUpdateOperations The JSON patch to apply to the specified digital twin's relationship.
* @param jsonPatch The JSON patch to apply to the specified digital twin's relationship.
* This argument can be created using {@link UpdateOperationUtility}.
* @param options The optional parameters for this request. If null, the default option values will be used.
* @param context Additional context that is passed through the Http pipeline during the service call.
* @return A {@link DigitalTwinsResponse} containing no parsed payload object.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public DigitalTwinsResponse<Void> updateComponentWithResponse(String digitalTwinId, String componentPath, List<Object> componentUpdateOperations, DigitalTwinsUpdateComponentOptions options, Context context) {
return digitalTwinsAsyncClient.updateComponentWithResponse(digitalTwinId, componentPath, componentUpdateOperations, options, context).block();
public DigitalTwinsResponse<Void> updateComponentWithResponse(String digitalTwinId, String componentPath, List<Object> jsonPatch, DigitalTwinsUpdateComponentOptions options, Context context) {
return digitalTwinsAsyncClient.updateComponentWithResponse(digitalTwinId, componentPath, jsonPatch, options, context).block();
}

//endregion Component APIs
Expand Down

0 comments on commit 07a2983

Please sign in to comment.