From 07a2983e33a8d3f4d40214eb063f2e7a3863d526 Mon Sep 17 00:00:00 2001 From: timtay-microsoft Date: Wed, 7 Oct 2020 14:20:53 -0700 Subject: [PATCH] json patch name change --- .../core/DigitalTwinsAsyncClient.java | 48 +++++++++---------- .../digitaltwins/core/DigitalTwinsClient.java | 36 +++++++------- 2 files changed, 42 insertions(+), 42 deletions(-) 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 @@ Mono> 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 updateDigitalTwin(String digitalTwinId, List digitalTwinUpdateOperations) + public Mono updateDigitalTwin(String digitalTwinId, List jsonPatch) { - return updateDigitalTwinWithResponse(digitalTwinId, digitalTwinUpdateOperations, null) + return updateDigitalTwinWithResponse(digitalTwinId, jsonPatch, null) .flatMap(voidResponse -> Mono.empty()); } @@ -265,21 +265,21 @@ public Mono updateDigitalTwin(String digitalTwinId, List 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> updateDigitalTwinWithResponse(String digitalTwinId, List digitalTwinUpdateOperations, DigitalTwinsUpdateOptions options) + public Mono> updateDigitalTwinWithResponse(String digitalTwinId, List jsonPatch, DigitalTwinsUpdateOptions options) { - return withContext(context -> updateDigitalTwinWithResponse(digitalTwinId, digitalTwinUpdateOperations, options, context)); + return withContext(context -> updateDigitalTwinWithResponse(digitalTwinId, jsonPatch, options, context)); } - Mono> updateDigitalTwinWithResponse(String digitalTwinId, List digitalTwinUpdateOperations, DigitalTwinsUpdateOptions options, Context context) { + Mono> updateDigitalTwinWithResponse(String digitalTwinId, List 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 @@ Mono> 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 updateRelationship(String digitalTwinId, String relationshipId, List relationshipUpdateOperations) { - return updateRelationshipWithResponse(digitalTwinId, relationshipId, relationshipUpdateOperations, null) + public Mono updateRelationship(String digitalTwinId, String relationshipId, List jsonPatch) { + return updateRelationshipWithResponse(digitalTwinId, relationshipId, jsonPatch, null) .flatMap(voidResponse -> Mono.empty()); } @@ -494,20 +494,20 @@ public Mono 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> updateRelationshipWithResponse(String digitalTwinId, String relationshipId, List relationshipUpdateOperations, DigitalTwinsUpdateRelationshipOptions options) { - return withContext(context -> updateRelationshipWithResponse(digitalTwinId, relationshipId, relationshipUpdateOperations, options, context)); + public Mono> updateRelationshipWithResponse(String digitalTwinId, String relationshipId, List jsonPatch, DigitalTwinsUpdateRelationshipOptions options) { + return withContext(context -> updateRelationshipWithResponse(digitalTwinId, relationshipId, jsonPatch, options, context)); } - Mono> updateRelationshipWithResponse(String digitalTwinId, String relationshipId, List relationshipUpdateOperations, DigitalTwinsUpdateRelationshipOptions options, Context context) { + Mono> updateRelationshipWithResponse(String digitalTwinId, String relationshipId, List 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 @@ Mono> 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 updateComponent(String digitalTwinId, String componentPath, List componentUpdateOperations) { - return updateComponentWithResponse(digitalTwinId, componentPath, componentUpdateOperations, null) + public Mono updateComponent(String digitalTwinId, String componentPath, List jsonPatch) { + return updateComponentWithResponse(digitalTwinId, componentPath, jsonPatch, null) .flatMap(voidResponse -> Mono.empty()); } @@ -1077,18 +1077,18 @@ public Mono 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> updateComponentWithResponse(String digitalTwinId, String componentPath, List componentUpdateOperations, DigitalTwinsUpdateComponentOptions options) { - return withContext(context -> updateComponentWithResponse(digitalTwinId, componentPath, componentUpdateOperations, options, context)); + public Mono> updateComponentWithResponse(String digitalTwinId, String componentPath, List jsonPatch, DigitalTwinsUpdateComponentOptions options) { + return withContext(context -> updateComponentWithResponse(digitalTwinId, componentPath, jsonPatch, options, context)); } - Mono> updateComponentWithResponse(String digitalTwinId, String componentPath, List componentUpdateOperations, DigitalTwinsUpdateComponentOptions options, Context context) { - return protocolLayer.getDigitalTwins().updateComponentWithResponseAsync(digitalTwinId, componentPath, componentUpdateOperations, options, context) + Mono> updateComponentWithResponse(String digitalTwinId, String componentPath, List 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 DigitalTwinsResponse 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 digitalTwinUpdateOperations) + public void updateDigitalTwin(String digitalTwinId, List jsonPatch) { - updateDigitalTwinWithResponse(digitalTwinId, digitalTwinUpdateOperations, null, Context.NONE); + updateDigitalTwinWithResponse(digitalTwinId, jsonPatch, null, Context.NONE); } /** @@ -185,16 +185,16 @@ public void updateDigitalTwin(String digitalTwinId, List 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 updateDigitalTwinWithResponse(String digitalTwinId, List digitalTwinUpdateOperations, DigitalTwinsUpdateOptions options, Context context) + public DigitalTwinsResponse updateDigitalTwinWithResponse(String digitalTwinId, List 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 DigitalTwinsResponse 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 relationshipUpdateOperations) { - updateRelationshipWithResponse(digitalTwinId, relationshipId, relationshipUpdateOperations, null, Context.NONE); + public void updateRelationship(String digitalTwinId, String relationshipId, List 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 updateRelationshipWithResponse(String digitalTwinId, String relationshipId, List relationshipUpdateOperations, DigitalTwinsUpdateRelationshipOptions options, Context context) { - return digitalTwinsAsyncClient.updateRelationshipWithResponse(digitalTwinId, relationshipId, relationshipUpdateOperations, options, context).block(); + public DigitalTwinsResponse updateRelationshipWithResponse(String digitalTwinId, String relationshipId, List jsonPatch, DigitalTwinsUpdateRelationshipOptions options, Context context) { + return digitalTwinsAsyncClient.updateRelationshipWithResponse(digitalTwinId, relationshipId, jsonPatch, options, context).block(); } /** @@ -705,12 +705,12 @@ public DigitalTwinsResponse 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 componentUpdateOperations) { - updateComponentWithResponse(digitalTwinId, componentPath, componentUpdateOperations, null, Context.NONE); + public void updateComponent(String digitalTwinId, String componentPath, List jsonPatch) { + updateComponentWithResponse(digitalTwinId, componentPath, jsonPatch, null, Context.NONE); } /** @@ -722,15 +722,15 @@ public void updateComponent(String digitalTwinId, String componentPath, List updateComponentWithResponse(String digitalTwinId, String componentPath, List componentUpdateOperations, DigitalTwinsUpdateComponentOptions options, Context context) { - return digitalTwinsAsyncClient.updateComponentWithResponse(digitalTwinId, componentPath, componentUpdateOperations, options, context).block(); + public DigitalTwinsResponse updateComponentWithResponse(String digitalTwinId, String componentPath, List jsonPatch, DigitalTwinsUpdateComponentOptions options, Context context) { + return digitalTwinsAsyncClient.updateComponentWithResponse(digitalTwinId, componentPath, jsonPatch, options, context).block(); } //endregion Component APIs