GetRetainedMessageResult getPayload documentation says that it returns a byte buffer that is base64 encoded, but it is in fact not
GetRetainedMessageResult.getPayload's Javadoc says that it is a base64 encoded byte buffer but there is a ByteBufferJsonUnmarshaller which in it's implementation decodes the incoming base64 byte buffer and returns the decoded byte buffer.
https://github.com/aws-amplify/aws-sdk-android/blob/225234b3f75a26ce50613ee2f7b46e0508000f28/aws-android-sdk-iot/src/main/java/com/amazonaws/services/iotdata/model/GetRetainedMessageResult.java#L103C1-L114C6
Wasn't sure if the link above would render correctly so here is the code I am talking about
/**
* <p>
* The Base64-encoded message payload of the retained message body.
* </p>
*
* @return <p>
* The Base64-encoded message payload of the retained message body.
* </p>
*/
public java.nio.ByteBuffer getPayload() {
return payload;
}
I think either modifying the documentation to reflect that this isn't a Base64 encoded buffer would work or perhaps creating and using a Base64EncodedByteBufferJsonUnmarshaller if we want the documentation to be the same as it is currently.
The documentation is just codegenerated and matches what is provided in this link: https://docs.aws.amazon.com/iot/latest/apireference/API_iotdata_GetRetainedMessage.html#API_iotdata_GetRetainedMessage_ResponseSyntax
Will take a further look to see if we can do anything about this.