diff --git a/samples/ShadowV2/src/main/java/shadow/ShadowV2.java b/samples/ShadowV2/src/main/java/shadow/ShadowV2.java index 861c00cf..3cfe9731 100644 --- a/samples/ShadowV2/src/main/java/shadow/ShadowV2.java +++ b/samples/ShadowV2/src/main/java/shadow/ShadowV2.java @@ -160,7 +160,7 @@ public void onStopped(Mqtt5Client client, OnStoppedReturn onStoppedReturn) { }) .build(); - context.shadowUpdatedStream = context.client.createShadowUpdatedEventStream(shadowUpdatedRequest, shadowUpdatedOptions); + context.shadowUpdatedStream = context.client.createShadowUpdatedStream(shadowUpdatedRequest, shadowUpdatedOptions); context.shadowUpdatedStream.open(); // ShadowDeltaUpdated streaming operation @@ -173,7 +173,7 @@ public void onStopped(Mqtt5Client client, OnStoppedReturn onStoppedReturn) { }) .build(); - context.shadowDeltaUpdatedStream = context.client.createShadowDeltaUpdatedEventStream(shadowDeltaUpdatedRequest, shadowDeltaUpdatedOptions); + context.shadowDeltaUpdatedStream = context.client.createShadowDeltaUpdatedStream(shadowDeltaUpdatedRequest, shadowDeltaUpdatedOptions); context.shadowDeltaUpdatedStream.open(); return context; diff --git a/sdk/src/main/java/software/amazon/awssdk/iot/iotidentity/IotIdentityV2Client.java b/sdk/src/main/java/software/amazon/awssdk/iot/iotidentity/IotIdentityV2Client.java index b3fd22c6..8f83a80d 100644 --- a/sdk/src/main/java/software/amazon/awssdk/iot/iotidentity/IotIdentityV2Client.java +++ b/sdk/src/main/java/software/amazon/awssdk/iot/iotidentity/IotIdentityV2Client.java @@ -20,7 +20,7 @@ import software.amazon.awssdk.crt.mqtt.MqttClientConnection; import software.amazon.awssdk.crt.mqtt5.Mqtt5Client; import software.amazon.awssdk.iot.*; -import software.amazon.awssdk.iot.iotshadow.model.*; +import software.amazon.awssdk.iot.iotidentity.model.*; /** * An AWS IoT service that assists with provisioning a device and installing unique client certificates on it @@ -107,9 +107,9 @@ public CompletableFuture createCertificateFrom builder.withPayload(payloadJson.getBytes(StandardCharsets.UTF_8)); // Subscriptions - String subscription0 = $aws/certificates/create-from-csr/json/accepted; + String subscription0 = "$aws/certificates/create-from-csr/json/accepted"; builder.withSubscription(subscription0); - String subscription1 = $aws/certificates/create-from-csr/json/rejected; + String subscription1 = "$aws/certificates/create-from-csr/json/rejected"; builder.withSubscription(subscription1); // Response paths @@ -124,7 +124,7 @@ public CompletableFuture createCertificateFrom builder.withResponsePath(pathBuilder2.build()); // Submit - submitOperation(responseFuture, builder.build(), responseTopic1, CreateCertificateFromCsrResponse.class, responseTopic2, V2ErrorResponse.class, IotShadowV2Client::createV2ErrorResponseException); + submitOperation(responseFuture, builder.build(), responseTopic1, CreateCertificateFromCsrResponse.class, responseTopic2, V2ErrorResponse.class, IotIdentityV2Client::createV2ErrorResponseException); } catch (Exception e) { responseFuture.completeExceptionally(createV2ErrorResponseException(e.getMessage(), null)); } @@ -158,9 +158,9 @@ public CompletableFuture createKeysAndCertific builder.withPayload(payloadJson.getBytes(StandardCharsets.UTF_8)); // Subscriptions - String subscription0 = $aws/certificates/create/json/accepted; + String subscription0 = "$aws/certificates/create/json/accepted"; builder.withSubscription(subscription0); - String subscription1 = $aws/certificates/create/json/rejected; + String subscription1 = "$aws/certificates/create/json/rejected"; builder.withSubscription(subscription1); // Response paths @@ -175,7 +175,7 @@ public CompletableFuture createKeysAndCertific builder.withResponsePath(pathBuilder2.build()); // Submit - submitOperation(responseFuture, builder.build(), responseTopic1, CreateKeysAndCertificateResponse.class, responseTopic2, V2ErrorResponse.class, IotShadowV2Client::createV2ErrorResponseException); + submitOperation(responseFuture, builder.build(), responseTopic1, CreateKeysAndCertificateResponse.class, responseTopic2, V2ErrorResponse.class, IotIdentityV2Client::createV2ErrorResponseException); } catch (Exception e) { responseFuture.completeExceptionally(createV2ErrorResponseException(e.getMessage(), null)); } @@ -214,10 +214,10 @@ public CompletableFuture registerThing(RegisterThingReque builder.withPayload(payloadJson.getBytes(StandardCharsets.UTF_8)); // Subscriptions - String subscription0 = $aws/provisioning-templates/{templateName}/provision/json/accepted; + String subscription0 = "$aws/provisioning-templates/{templateName}/provision/json/accepted"; subscription0 = subscription0.replace("{templateName}", request.templateName); builder.withSubscription(subscription0); - String subscription1 = $aws/provisioning-templates/{templateName}/provision/json/rejected; + String subscription1 = "$aws/provisioning-templates/{templateName}/provision/json/rejected"; subscription1 = subscription1.replace("{templateName}", request.templateName); builder.withSubscription(subscription1); @@ -233,7 +233,7 @@ public CompletableFuture registerThing(RegisterThingReque builder.withResponsePath(pathBuilder2.build()); // Submit - submitOperation(responseFuture, builder.build(), responseTopic1, RegisterThingResponse.class, responseTopic2, V2ErrorResponse.class, IotShadowV2Client::createV2ErrorResponseException); + submitOperation(responseFuture, builder.build(), responseTopic1, RegisterThingResponse.class, responseTopic2, V2ErrorResponse.class, IotIdentityV2Client::createV2ErrorResponseException); } catch (Exception e) { responseFuture.completeExceptionally(createV2ErrorResponseException(e.getMessage(), null)); } diff --git a/sdk/src/main/java/software/amazon/awssdk/iot/iotjobs/IotJobsV2Client.java b/sdk/src/main/java/software/amazon/awssdk/iot/iotjobs/IotJobsV2Client.java index d3a500d5..b8b5ba23 100644 --- a/sdk/src/main/java/software/amazon/awssdk/iot/iotjobs/IotJobsV2Client.java +++ b/sdk/src/main/java/software/amazon/awssdk/iot/iotjobs/IotJobsV2Client.java @@ -20,7 +20,7 @@ import software.amazon.awssdk.crt.mqtt.MqttClientConnection; import software.amazon.awssdk.crt.mqtt5.Mqtt5Client; import software.amazon.awssdk.iot.*; -import software.amazon.awssdk.iot.iotshadow.model.*; +import software.amazon.awssdk.iot.iotjobs.model.*; /** * The AWS IoT jobs service can be used to define a set of remote operations that are sent to and executed on one or more devices connected to AWS IoT. @@ -123,7 +123,7 @@ public CompletableFuture describeJobExecution(Desc builder.withPayload(payloadJson.getBytes(StandardCharsets.UTF_8)); // Subscriptions - String subscription0 = $aws/things/{thingName}/jobs/{jobId}/get/+; + String subscription0 = "$aws/things/{thingName}/jobs/{jobId}/get/+"; subscription0 = subscription0.replace("{thingName}", request.thingName); subscription0 = subscription0.replace("{jobId}", request.jobId); builder.withSubscription(subscription0); @@ -142,7 +142,7 @@ public CompletableFuture describeJobExecution(Desc builder.withResponsePath(pathBuilder2.build()); // Submit - submitOperation(responseFuture, builder.build(), responseTopic1, DescribeJobExecutionResponse.class, responseTopic2, V2ErrorResponse.class, IotShadowV2Client::createV2ErrorResponseException); + submitOperation(responseFuture, builder.build(), responseTopic1, DescribeJobExecutionResponse.class, responseTopic2, V2ErrorResponse.class, IotJobsV2Client::createV2ErrorResponseException); } catch (Exception e) { responseFuture.completeExceptionally(createV2ErrorResponseException(e.getMessage(), null)); } @@ -185,7 +185,7 @@ public CompletableFuture getPendingJobExecution builder.withPayload(payloadJson.getBytes(StandardCharsets.UTF_8)); // Subscriptions - String subscription0 = $aws/things/{thingName}/jobs/get/+; + String subscription0 = "$aws/things/{thingName}/jobs/get/+"; subscription0 = subscription0.replace("{thingName}", request.thingName); builder.withSubscription(subscription0); @@ -203,7 +203,7 @@ public CompletableFuture getPendingJobExecution builder.withResponsePath(pathBuilder2.build()); // Submit - submitOperation(responseFuture, builder.build(), responseTopic1, GetPendingJobExecutionsResponse.class, responseTopic2, V2ErrorResponse.class, IotShadowV2Client::createV2ErrorResponseException); + submitOperation(responseFuture, builder.build(), responseTopic1, GetPendingJobExecutionsResponse.class, responseTopic2, V2ErrorResponse.class, IotJobsV2Client::createV2ErrorResponseException); } catch (Exception e) { responseFuture.completeExceptionally(createV2ErrorResponseException(e.getMessage(), null)); } @@ -246,7 +246,7 @@ public CompletableFuture startNextPendingJobExecu builder.withPayload(payloadJson.getBytes(StandardCharsets.UTF_8)); // Subscriptions - String subscription0 = $aws/things/{thingName}/jobs/start-next/+; + String subscription0 = "$aws/things/{thingName}/jobs/start-next/+"; subscription0 = subscription0.replace("{thingName}", request.thingName); builder.withSubscription(subscription0); @@ -264,7 +264,7 @@ public CompletableFuture startNextPendingJobExecu builder.withResponsePath(pathBuilder2.build()); // Submit - submitOperation(responseFuture, builder.build(), responseTopic1, StartNextJobExecutionResponse.class, responseTopic2, V2ErrorResponse.class, IotShadowV2Client::createV2ErrorResponseException); + submitOperation(responseFuture, builder.build(), responseTopic1, StartNextJobExecutionResponse.class, responseTopic2, V2ErrorResponse.class, IotJobsV2Client::createV2ErrorResponseException); } catch (Exception e) { responseFuture.completeExceptionally(createV2ErrorResponseException(e.getMessage(), null)); } @@ -312,7 +312,7 @@ public CompletableFuture updateJobExecution(UpdateJo builder.withPayload(payloadJson.getBytes(StandardCharsets.UTF_8)); // Subscriptions - String subscription0 = $aws/things/{thingName}/jobs/{jobId}/update/+; + String subscription0 = "$aws/things/{thingName}/jobs/{jobId}/update/+"; subscription0 = subscription0.replace("{thingName}", request.thingName); subscription0 = subscription0.replace("{jobId}", request.jobId); builder.withSubscription(subscription0); @@ -331,7 +331,7 @@ public CompletableFuture updateJobExecution(UpdateJo builder.withResponsePath(pathBuilder2.build()); // Submit - submitOperation(responseFuture, builder.build(), responseTopic1, UpdateJobExecutionResponse.class, responseTopic2, V2ErrorResponse.class, IotShadowV2Client::createV2ErrorResponseException); + submitOperation(responseFuture, builder.build(), responseTopic1, UpdateJobExecutionResponse.class, responseTopic2, V2ErrorResponse.class, IotJobsV2Client::createV2ErrorResponseException); } catch (Exception e) { responseFuture.completeExceptionally(createV2ErrorResponseException(e.getMessage(), null)); } diff --git a/sdk/src/main/java/software/amazon/awssdk/iot/iotshadow/IotShadowV2Client.java b/sdk/src/main/java/software/amazon/awssdk/iot/iotshadow/IotShadowV2Client.java index bb652da5..d16a6bba 100644 --- a/sdk/src/main/java/software/amazon/awssdk/iot/iotshadow/IotShadowV2Client.java +++ b/sdk/src/main/java/software/amazon/awssdk/iot/iotshadow/IotShadowV2Client.java @@ -123,7 +123,7 @@ public CompletableFuture deleteNamedShadow(DeleteNamedShad builder.withPayload(payloadJson.getBytes(StandardCharsets.UTF_8)); // Subscriptions - String subscription0 = $aws/things/{thingName}/shadow/name/{shadowName}/delete/+; + String subscription0 = "$aws/things/{thingName}/shadow/name/{shadowName}/delete/+"; subscription0 = subscription0.replace("{thingName}", request.thingName); subscription0 = subscription0.replace("{shadowName}", request.shadowName); builder.withSubscription(subscription0); @@ -185,7 +185,7 @@ public CompletableFuture deleteShadow(DeleteShadowRequest builder.withPayload(payloadJson.getBytes(StandardCharsets.UTF_8)); // Subscriptions - String subscription0 = $aws/things/{thingName}/shadow/delete/+; + String subscription0 = "$aws/things/{thingName}/shadow/delete/+"; subscription0 = subscription0.replace("{thingName}", request.thingName); builder.withSubscription(subscription0); @@ -251,7 +251,7 @@ public CompletableFuture getNamedShadow(GetNamedShadowRequest builder.withPayload(payloadJson.getBytes(StandardCharsets.UTF_8)); // Subscriptions - String subscription0 = $aws/things/{thingName}/shadow/name/{shadowName}/get/+; + String subscription0 = "$aws/things/{thingName}/shadow/name/{shadowName}/get/+"; subscription0 = subscription0.replace("{thingName}", request.thingName); subscription0 = subscription0.replace("{shadowName}", request.shadowName); builder.withSubscription(subscription0); @@ -313,7 +313,7 @@ public CompletableFuture getShadow(GetShadowRequest request) builder.withPayload(payloadJson.getBytes(StandardCharsets.UTF_8)); // Subscriptions - String subscription0 = $aws/things/{thingName}/shadow/get/+; + String subscription0 = "$aws/things/{thingName}/shadow/get/+"; subscription0 = subscription0.replace("{thingName}", request.thingName); builder.withSubscription(subscription0); @@ -379,11 +379,11 @@ public CompletableFuture updateNamedShadow(UpdateNamedShad builder.withPayload(payloadJson.getBytes(StandardCharsets.UTF_8)); // Subscriptions - String subscription0 = $aws/things/{thingName}/shadow/name/{shadowName}/update/accepted; + String subscription0 = "$aws/things/{thingName}/shadow/name/{shadowName}/update/accepted"; subscription0 = subscription0.replace("{thingName}", request.thingName); subscription0 = subscription0.replace("{shadowName}", request.shadowName); builder.withSubscription(subscription0); - String subscription1 = $aws/things/{thingName}/shadow/name/{shadowName}/update/rejected; + String subscription1 = "$aws/things/{thingName}/shadow/name/{shadowName}/update/rejected"; subscription1 = subscription1.replace("{thingName}", request.thingName); subscription1 = subscription1.replace("{shadowName}", request.shadowName); builder.withSubscription(subscription1); @@ -445,10 +445,10 @@ public CompletableFuture updateShadow(UpdateShadowRequest builder.withPayload(payloadJson.getBytes(StandardCharsets.UTF_8)); // Subscriptions - String subscription0 = $aws/things/{thingName}/shadow/update/accepted; + String subscription0 = "$aws/things/{thingName}/shadow/update/accepted"; subscription0 = subscription0.replace("{thingName}", request.thingName); builder.withSubscription(subscription0); - String subscription1 = $aws/things/{thingName}/shadow/update/rejected; + String subscription1 = "$aws/things/{thingName}/shadow/update/rejected"; subscription1 = subscription1.replace("{thingName}", request.thingName); builder.withSubscription(subscription1);