Skip to content

Commit

Permalink
Compile fixes
Browse files Browse the repository at this point in the history
Bret Ambrose committed Jan 29, 2025
1 parent efe223d commit 70b9176
Showing 4 changed files with 29 additions and 29 deletions.
4 changes: 2 additions & 2 deletions samples/ShadowV2/src/main/java/shadow/ShadowV2.java
Original file line number Diff line number Diff line change
@@ -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;
Original file line number Diff line number Diff line change
@@ -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<CreateCertificateFromCsrResponse> 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<CreateCertificateFromCsrResponse> 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<CreateKeysAndCertificateResponse> 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<CreateKeysAndCertificateResponse> 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<RegisterThingResponse> 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<RegisterThingResponse> 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));
}
Original file line number Diff line number Diff line change
@@ -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<DescribeJobExecutionResponse> 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<DescribeJobExecutionResponse> 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<GetPendingJobExecutionsResponse> 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<GetPendingJobExecutionsResponse> 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<StartNextJobExecutionResponse> 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<StartNextJobExecutionResponse> 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<UpdateJobExecutionResponse> 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<UpdateJobExecutionResponse> 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));
}
Original file line number Diff line number Diff line change
@@ -123,7 +123,7 @@ public CompletableFuture<DeleteShadowResponse> 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<DeleteShadowResponse> 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<GetShadowResponse> 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<GetShadowResponse> 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<UpdateShadowResponse> 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<UpdateShadowResponse> 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);

0 comments on commit 70b9176

Please sign in to comment.