Class CreateCommandRequest
- java.lang.Object
-
- software.amazon.awssdk.core.SdkRequest
-
- software.amazon.awssdk.awscore.AwsRequest
-
- software.amazon.awssdk.services.iot.model.IotRequest
-
- software.amazon.awssdk.services.iot.model.CreateCommandRequest
-
- All Implemented Interfaces:
SdkPojo,ToCopyableBuilder<CreateCommandRequest.Builder,CreateCommandRequest>
@Generated("software.amazon.awssdk:codegen") public final class CreateCommandRequest extends IotRequest implements ToCopyableBuilder<CreateCommandRequest.Builder,CreateCommandRequest>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceCreateCommandRequest.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CreateCommandRequest.Builderbuilder()StringcommandId()A unique identifier for the command.Stringdescription()A short text decription of the command.StringdisplayName()The user-friendly name in the console for the command.booleanequals(Object obj)booleanequalsBySdkFields(Object obj)<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)inthashCode()booleanhasMandatoryParameters()For responses, this returns true if the service returned a value for the MandatoryParameters property.booleanhasTags()For responses, this returns true if the service returned a value for the Tags property.List<CommandParameter>mandatoryParameters()A list of parameters that are required by theStartCommandExecutionAPI.CommandNamespacenamespace()The namespace of the command.StringnamespaceAsString()The namespace of the command.CommandPayloadpayload()The payload object for the command.StringroleArn()The IAM role that you must provide when using theAWS-IoT-FleetWisenamespace.Map<String,SdkField<?>>sdkFieldNameToField()List<SdkField<?>>sdkFields()static Class<? extends CreateCommandRequest.Builder>serializableBuilderClass()List<Tag>tags()Name-value pairs that are used as metadata to manage a command.CreateCommandRequest.BuildertoBuilder()StringtoString()Returns a string representation of this object.-
Methods inherited from class software.amazon.awssdk.awscore.AwsRequest
overrideConfiguration
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
commandId
public final String commandId()
A unique identifier for the command. We recommend using UUID. Alpha-numeric characters, hyphens, and underscores are valid for use here.
- Returns:
- A unique identifier for the command. We recommend using UUID. Alpha-numeric characters, hyphens, and underscores are valid for use here.
-
namespace
public final CommandNamespace namespace()
The namespace of the command. The MQTT reserved topics and validations will be used for command executions according to the namespace setting.
If the service returns an enum value that is not available in the current SDK version,
namespacewill returnCommandNamespace.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromnamespaceAsString().- Returns:
- The namespace of the command. The MQTT reserved topics and validations will be used for command executions according to the namespace setting.
- See Also:
CommandNamespace
-
namespaceAsString
public final String namespaceAsString()
The namespace of the command. The MQTT reserved topics and validations will be used for command executions according to the namespace setting.
If the service returns an enum value that is not available in the current SDK version,
namespacewill returnCommandNamespace.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromnamespaceAsString().- Returns:
- The namespace of the command. The MQTT reserved topics and validations will be used for command executions according to the namespace setting.
- See Also:
CommandNamespace
-
displayName
public final String displayName()
The user-friendly name in the console for the command. This name doesn't have to be unique. You can update the user-friendly name after you define it.
- Returns:
- The user-friendly name in the console for the command. This name doesn't have to be unique. You can update the user-friendly name after you define it.
-
description
public final String description()
A short text decription of the command.
- Returns:
- A short text decription of the command.
-
payload
public final CommandPayload payload()
The payload object for the command. You must specify this information when using the
AWS-IoTnamespace.You can upload a static payload file from your local storage that contains the instructions for the device to process. The payload file can use any format. To make sure that the device correctly interprets the payload, we recommend you to specify the payload content type.
- Returns:
- The payload object for the command. You must specify this information when using the
AWS-IoTnamespace.You can upload a static payload file from your local storage that contains the instructions for the device to process. The payload file can use any format. To make sure that the device correctly interprets the payload, we recommend you to specify the payload content type.
-
hasMandatoryParameters
public final boolean hasMandatoryParameters()
For responses, this returns true if the service returned a value for the MandatoryParameters property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
mandatoryParameters
public final List<CommandParameter> mandatoryParameters()
A list of parameters that are required by the
StartCommandExecutionAPI. These parameters need to be specified only when using theAWS-IoT-FleetWisenamespace. You can either specify them here or when running the command using theStartCommandExecutionAPI.Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasMandatoryParameters()method.- Returns:
- A list of parameters that are required by the
StartCommandExecutionAPI. These parameters need to be specified only when using theAWS-IoT-FleetWisenamespace. You can either specify them here or when running the command using theStartCommandExecutionAPI.
-
roleArn
public final String roleArn()
The IAM role that you must provide when using the
AWS-IoT-FleetWisenamespace. The role grants IoT Device Management the permission to access IoT FleetWise resources for generating the payload for the command. This field is not required when you use theAWS-IoTnamespace.- Returns:
- The IAM role that you must provide when using the
AWS-IoT-FleetWisenamespace. The role grants IoT Device Management the permission to access IoT FleetWise resources for generating the payload for the command. This field is not required when you use theAWS-IoTnamespace.
-
hasTags
public final boolean hasTags()
For responses, this returns true if the service returned a value for the Tags property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
tags
public final List<Tag> tags()
Name-value pairs that are used as metadata to manage a command.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasTags()method.- Returns:
- Name-value pairs that are used as metadata to manage a command.
-
toBuilder
public CreateCommandRequest.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<CreateCommandRequest.Builder,CreateCommandRequest>- Specified by:
toBuilderin classIotRequest
-
builder
public static CreateCommandRequest.Builder builder()
-
serializableBuilderClass
public static Class<? extends CreateCommandRequest.Builder> serializableBuilderClass()
-
hashCode
public final int hashCode()
- Overrides:
hashCodein classAwsRequest
-
equals
public final boolean equals(Object obj)
- Overrides:
equalsin classAwsRequest
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
public final String toString()
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
-
getValueForField
public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
- Overrides:
getValueForFieldin classSdkRequest
-
sdkFieldNameToField
public final Map<String,SdkField<?>> sdkFieldNameToField()
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo
-
-