/** * <p> * The error code for an individual record result. <code>ErrorCodes</code> can be either * <code>ProvisionedThroughputExceededException</code> or <code>InternalFailure</code>. * </p> * * @param errorCode * The error code for an individual record result. <code>ErrorCodes</code> can be either * <code>ProvisionedThroughputExceededException</code> or <code>InternalFailure</code>. * @return Returns a reference to this object so that method calls can be chained together. */ public PutRecordsResultEntry withErrorCode(String errorCode) { setErrorCode(errorCode); return this; }
putRecordsResultEntry.setErrorCode(context.getUnmarshaller(String.class).unmarshall(context));
entry.setSequenceNumber("record_id_" + i); } else { entry.setErrorCode("ServiceUnavailable");
/** * <p> * The error code for an individual record result. <code>ErrorCodes</code> can be either * <code>ProvisionedThroughputExceededException</code> or <code>InternalFailure</code>. * </p> * * @param errorCode * The error code for an individual record result. <code>ErrorCodes</code> can be either * <code>ProvisionedThroughputExceededException</code> or <code>InternalFailure</code>. * @return Returns a reference to this object so that method calls can be chained together. */ public PutRecordsResultEntry withErrorCode(String errorCode) { setErrorCode(errorCode); return this; }
public PutRecordsResultEntry unmarshall(JsonUnmarshallerContext context) throws Exception { AwsJsonReader reader = context.getReader(); if (!reader.isContainer()) { reader.skipValue(); return null; } PutRecordsResultEntry putRecordsResultEntry = new PutRecordsResultEntry(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("SequenceNumber")) { putRecordsResultEntry.setSequenceNumber(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("ShardId")) { putRecordsResultEntry.setShardId(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("ErrorCode")) { putRecordsResultEntry.setErrorCode(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("ErrorMessage")) { putRecordsResultEntry.setErrorMessage(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return putRecordsResultEntry; }
putRecordsResultEntry.setErrorCode(context.getUnmarshaller(String.class).unmarshall(context));