Skip to content

Commit 7fd654e

Browse files
Add generated headers to Greengrass generated code (#319)
Add generated headers to Greengrass generated code
1 parent 1a2e1b5 commit 7fd654e

File tree

193 files changed

+1325
-30
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

193 files changed

+1325
-30
lines changed

sdk/greengrass/event-stream-rpc-client/src/main/java/software/amazon/awssdk/eventstreamrpc/EventStreamRPCClient.java

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,27 +24,27 @@ public class EventStreamRPCClient {
2424
private final EventStreamRPCConnection connection;
2525

2626
/**
27-
* Creates a new EventStreamRPCClient
28-
* @param connection The connection for the EventStreamRPCClient to use
29-
*/
27+
* Creates a new EventStreamRPCClient
28+
* @param connection The connection for the EventStreamRPCClient to use
29+
*/
3030
public EventStreamRPCClient(EventStreamRPCConnection connection) {
3131
if (connection == null) {
3232
throw new IllegalArgumentException("Cannot create eventstream RPC client with null connection");
3333
}
3434
this.connection = connection;
3535
}
3636

37-
/**
38-
* Work horse of all operations, streaming or otherwise.
39-
* @param <ReqType> The request type
40-
* @param <RespType> The response type
41-
* @param <StrReqType> The streaming request type
42-
* @param <StrRespType> The streaming response type
43-
* @param operationModelContext The operation context
44-
* @param request The request
45-
* @param streamResponseHandler The streaming handler
46-
* @return The operation result
47-
*/
37+
/**
38+
* Work horse of all operations, streaming or otherwise.
39+
* @param <ReqType> The request type
40+
* @param <RespType> The response type
41+
* @param <StrReqType> The streaming request type
42+
* @param <StrRespType> The streaming response type
43+
* @param operationModelContext The operation context
44+
* @param request The request
45+
* @param streamResponseHandler The streaming handler
46+
* @return The operation result
47+
*/
4848
public <ReqType extends EventStreamJsonMessage,
4949
RespType extends EventStreamJsonMessage,
5050
StrReqType extends EventStreamJsonMessage,
@@ -145,7 +145,7 @@ protected void onContinuationMessage(List<Header> headers, byte[] payload, Messa
145145
}
146146
}
147147
}
148-
148+
149149
@Override
150150
protected void onContinuationClosed() {
151151
super.onContinuationClosed();
@@ -169,10 +169,10 @@ protected void onContinuationClosed() {
169169
return response;
170170
}
171171

172-
172+
173173

174174
/**
175-
* Sends an empty close message on the open stream.
175+
* Sends an empty close message on the open stream.
176176
* @param continuation continuation to send the close message on
177177
* @return CompletableFuture indicating flush of the close message.
178178
*/

sdk/greengrass/event-stream-rpc-client/src/main/java/software/amazon/awssdk/eventstreamrpc/EventStreamRPCConnection.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ enum Phase {
3434
CONNECTED,
3535
CLOSING
3636
};
37-
37+
3838
Phase connectionPhase;
3939
ClientConnection connection;
4040
Throwable closeReason;
4141
boolean onConnectCalled;
42-
42+
4343
protected ConnectionState(Phase phase, ClientConnection connection) {
4444
this.connectionPhase = phase;
4545
this.connection = connection;
@@ -75,7 +75,7 @@ protected String getVersionString() {
7575

7676
/**
7777
* Connects to the event stream RPC server asynchronously
78-
*
78+
*
7979
* @return A future that completes when connected
8080
*/
8181
public CompletableFuture<Void> connect(final LifecycleHandler lifecycleHandler) {
@@ -156,7 +156,7 @@ protected void onProtocolMessage(List<Header> headers, byte[] payload, MessageTy
156156
LOGGER.warning("AccessDenied to event stream RPC server");
157157
connectionState.connectionPhase = ConnectionState.Phase.CLOSING;
158158
connectionState.connection.closeConnection(0);
159-
159+
160160
final AccessDeniedException ade = new AccessDeniedException("Connection access denied to event stream RPC server");
161161
if (!initialConnectFuture.isDone()) {
162162
initialConnectFuture.completeExceptionally(ade);
@@ -179,7 +179,7 @@ protected void onProtocolMessage(List<Header> headers, byte[] payload, MessageTy
179179
disconnect();
180180
} else if (MessageType.ProtocolError.equals(messageType) || MessageType.ServerError.equals(messageType)) {
181181
LOGGER.severe("Received " + messageType.name() + ": " + CRT.awsErrorName(CRT.awsLastError()));
182-
connectionState.closeReason = EventStreamError.create(headers, payload, messageType);
182+
connectionState.closeReason = EventStreamError.create(headers, payload, messageType);
183183
doOnError(lifecycleHandler, connectionState.closeReason);
184184
disconnect();
185185
} else {
@@ -222,7 +222,7 @@ protected void onConnectionClosed(int errorCode) {
222222
/**
223223
* Creates a new stream with the given continuation handler.
224224
* Trhows an exception if not connected
225-
*
225+
*
226226
* @param continuationHandler The continuation handler to use
227227
* @return A new ClientConnectionContinuation containing the new stream.
228228
*/
@@ -375,7 +375,7 @@ public interface LifecycleHandler {
375375
* Do nothing on ping by default. Inform handler of ping data
376376
*
377377
* TODO: Could use boolean return here as a hint on whether a pong reply should be sent?
378-
*
378+
*
379379
* @param headers The ping headers
380380
* @param payload The ping payload
381381
*/

sdk/greengrass/event-stream-rpc-client/src/main/java/software/amazon/awssdk/eventstreamrpc/GreengrassConnectMessageSupplier.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* The connect message supplier for Greengrass
1414
*/
1515
public class GreengrassConnectMessageSupplier {
16-
16+
1717
/**
1818
* Returns a new connect message supplier using the given token
1919
* @param authToken The auth token to use

sdk/greengrass/event-stream-rpc-model/src/main/java/software/amazon/awssdk/eventstreamrpc/EventStreamRPCServiceModel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ final public Optional<Class<? extends EventStreamJsonMessage>> getApplicationMod
281281
*
282282
* This may not be a useful interface as generated code will typically pull a known operation model context
283283
* Public visibility is useful for testing
284-
*
284+
*
285285
* @param operationName The name of the operation
286286
* @return The operation context associated with the given operation name
287287
*/

sdk/greengrass/event-stream-rpc-model/src/main/java/software/amazon/awssdk/eventstreamrpc/MessageAmendInfo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public MessageAmendInfo(List<Header> headers, byte[] payload) {
3636
* Returns the headers stored in the object. For sent messages,
3737
* the headers stored in the object may be used to append to existing headers,
3838
* where it won't overwrite an existing one that may be outgoing.
39-
*
39+
*
4040
* @return The headers stored
4141
*/
4242
public List<Header> getHeaders() {

sdk/greengrass/event-stream-rpc-model/src/main/java/software/amazon/awssdk/eventstreamrpc/OperationModelContext.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Smithy code generation should produce one of these per model, but we aren't going to take steps to prevent
1212
* hand construction.
1313
*
14-
* @param <RequestType> The initial-request
14+
* @param <RequestType> The initial-request
1515
* @param <ResponseType> The initial-response
1616
* @param <StreamingRequestType> The streaming initial-request
1717
* @param <StreamingResponseType> The streaming initial-response

sdk/greengrass/event-stream-rpc-model/src/main/java/software/amazon/awssdk/eventstreamrpc/Version.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public String toString() {
6262
/**
6363
* Returns a new Version class from the given version string.
6464
* Will throw an exception if it cannot convert.
65-
*
65+
*
6666
* @param versionString The version string to convert
6767
* @return The Version class created from the string
6868
*/

sdk/greengrass/event-stream-rpc-model/src/main/java/software/amazon/awssdk/eventstreamrpc/model/AccessDeniedException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public AccessDeniedException(String serviceName, String message) {
2727
* or the principal/authN that was rejected
2828
*
2929
* Do not overexpose reason or logic for AccessDenied. Prefer internal logging
30-
*
30+
*
3131
* @param serviceName The name of the service that caused the exception
3232
*/
3333
public AccessDeniedException(String serviceName) {

sdk/greengrass/greengrass-client/src/event-stream-rpc-java/client/software/amazon/awssdk/aws/greengrass/AuthorizeClientDeviceActionResponseHandler.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
/**
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
* SPDX-License-Identifier: Apache-2.0.
4+
*
5+
* This file is generated.
6+
*/
7+
18
package software.amazon.awssdk.aws.greengrass;
29

310
import java.lang.Override;

sdk/greengrass/greengrass-client/src/event-stream-rpc-java/client/software/amazon/awssdk/aws/greengrass/CreateDebugPasswordResponseHandler.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
/**
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
* SPDX-License-Identifier: Apache-2.0.
4+
*
5+
* This file is generated.
6+
*/
7+
18
package software.amazon.awssdk.aws.greengrass;
29

310
import java.lang.Override;

0 commit comments

Comments
 (0)