Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions sdk/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,19 @@
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>iot</artifactId>
<version>2.30.9</version>
<version>2.31.44</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>iotjobsdataplane</artifactId>
<version>2.31.44</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>software.amazon.awssdk</groupId>
<artifactId>sts</artifactId>
<version>2.30.9</version>
<version>2.31.44</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*
* This file is generated.
*/

package software.amazon.awssdk.iot.iotcommands.model;


/**
* Sent whenever a command execution is added for a thing or a client.
*
*/
public class CommandExecutionEvent {

/**
* Opaque data containing instructions sent from the IoT commands service.
*
*/
public byte[] payload;


/**
* Unique ID for the specific execution of a command. A command can have multiple executions, each with a unique ID.
*
*/
public String executionId;


/**
* Data format of the payload. It is supposed to be a MIME type (IANA media type), but can be an arbitrary string.
*
*/
public String contentType;


/**
* Number of seconds before the IoT commands service decides that this command execution is timed out.
*
*/
public Integer timeout;


}
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*
* This file is generated.
*/

package software.amazon.awssdk.iot.iotcommands.model;

/**
* The status of the command execution.
*
*/
public enum CommandExecutionStatus {

/**
* Enum value is an unknown value
*/
UNKNOWN_ENUM_VALUE("UNKNOWN_ENUM_VALUE"),

/**
* The device is currently processing the received command.
*/
IN_PROGRESS("IN_PROGRESS"),

/**
* The device successfully completed the command.
*/
SUCCEEDED("SUCCEEDED"),

/**
* The device failed to complete the command.
*/
FAILED("FAILED"),

/**
* The device received an invalid or incomplete request.
*/
REJECTED("REJECTED"),

/**
* When the command execution timed out, this status can be used to provide additional information in the statusReason field in the UpdateCommandExecutionRequest request.
*/
TIMED_OUT("TIMED_OUT");

private String value;

private CommandExecutionStatus(String value) {
this.value = value;
}

@Override
public String toString() {
return value;
}

/**
* Returns The enum associated with the given string or UNKNOWN_ENUM_VALUE
* if no enum is found.
* @param val The string to use
* @return The enum associated with the string or UNKNOWN_ENUM_VALUE
*/
static CommandExecutionStatus fromString(String val) {
for (CommandExecutionStatus e : CommandExecutionStatus.class.getEnumConstants()) {
if (e.toString().compareTo(val) == 0) {
return e;
}
}
return UNKNOWN_ENUM_VALUE;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*
* This file is generated.
*/

package software.amazon.awssdk.iot.iotcommands.model;

import software.amazon.awssdk.iot.iotcommands.model.DeviceType;

/**
* Data needed to subscribe to CommandExecution events.
*
*/
public class CommandExecutionsSubscriptionRequest {

/**
* The type of a target device. Determine if the device should subscribe for commands addressed to an IoT Thing or MQTT client.
*
*/
public DeviceType deviceType;


/**
* Depending on device type value, this field is either an IoT Thing name or a client ID.
*
*/
public String deviceId;


}
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*
* This file is generated.
*/

package software.amazon.awssdk.iot.iotcommands.model;

/**
* Possible device types for command executions.
*
*/
public enum DeviceType {

/**
* Enum value is an unknown value
*/
UNKNOWN_ENUM_VALUE("UNKNOWN_ENUM_VALUE"),

/**
* A target for the commands is an IoT Thing.
*/
THING("things"),

/**
* A target for the commands is an MQTT client ID.
*/
CLIENT("clients");

private String value;

private DeviceType(String value) {
this.value = value;
}

@Override
public String toString() {
return value;
}

/**
* Returns The enum associated with the given string or UNKNOWN_ENUM_VALUE
* if no enum is found.
* @param val The string to use
* @return The enum associated with the string or UNKNOWN_ENUM_VALUE
*/
static DeviceType fromString(String val) {
for (DeviceType e : DeviceType.class.getEnumConstants()) {
if (e.toString().compareTo(val) == 0) {
return e;
}
}
return UNKNOWN_ENUM_VALUE;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*
* This file is generated.
*/

package software.amazon.awssdk.iot.iotcommands.model;

/**
* A value indicating the kind of error encountered while processing an AWS IoT Commands request
*
*/
public enum RejectedErrorCode {

/**
* Enum value is an unknown value
*/
UNKNOWN_ENUM_VALUE("UNKNOWN_ENUM_VALUE"),

/**
* The request was sent to a topic in the AWS IoT Commands namespace that does not map to any API.
*/
INVALID_TOPIC("InvalidTopic"),

/**
* The contents of the request could not be interpreted as valid UTF-8-encoded JSON.
*/
INVALID_JSON("InvalidJson"),

/**
* The contents of the request were invalid. The message contains details about the error.
*/
INVALID_REQUEST("InvalidRequest"),

/**
* An update attempted to change the command execution to a state that is invalid because of the command execution's current state. In this case, the body of the error message also contains the executionState field.
*/
INVALID_STATE_TRANSITION("InvalidStateTransition"),

/**
* The CommandExecution specified by the request topic does not exist.
*/
RESOURCE_NOT_FOUND("ResourceNotFound"),

/**
* The expected version specified in the request does not match the version of the command execution in the AWS IoT Commands service. In this case, the body of the error message also contains the executionState field.
*/
VERSION_MISMATCH("VersionMismatch"),

/**
* There was an internal error during the processing of the request.
*/
INTERNAL_ERROR("InternalError"),

/**
* The request was throttled.
*/
REQUEST_THROTTLED("RequestThrottled"),

/**
* Occurs when a command to describe a command is performed on a command that is in a terminal state.
*/
TERMINAL_STATE_REACHED("TerminalStateReached");

private String value;

private RejectedErrorCode(String value) {
this.value = value;
}

@Override
public String toString() {
return value;
}

/**
* Returns The enum associated with the given string or UNKNOWN_ENUM_VALUE
* if no enum is found.
* @param val The string to use
* @return The enum associated with the string or UNKNOWN_ENUM_VALUE
*/
static RejectedErrorCode fromString(String val) {
for (RejectedErrorCode e : RejectedErrorCode.class.getEnumConstants()) {
if (e.toString().compareTo(val) == 0) {
return e;
}
}
return UNKNOWN_ENUM_VALUE;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*
* This file is generated.
*/

package software.amazon.awssdk.iot.iotcommands.model;


/**
* Additional information on provided update.
*
*/
public class StatusReason {

/**
* Reason code in the [A-Z0-9_-]+ format and not exceeding 64 characters in length.
*
*/
public String reasonCode;


/**
* Detailed description of the reason.
*
*/
public String reasonDescription;


}
Loading