diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java index 797e5f20b3422..263cb39627113 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsAsyncClient.java @@ -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()); } @@ -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); @@ -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()); } @@ -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); @@ -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()); } @@ -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)); diff --git a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClient.java b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClient.java index 1279130f3355b..4270f919f2e43 100644 --- a/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClient.java +++ b/sdk/digitaltwins/azure-digitaltwins-core/src/main/java/com/azure/digitaltwins/core/DigitalTwinsClient.java @@ -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); } /** @@ -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(); } /** @@ -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); } /** @@ -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(); } /** @@ -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); } /** @@ -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