/** * <p> * How long (in seconds) pre-signed URLs are valid. Valid values are 60 - 3600, the default value is 3600 seconds. * Pre-signed URLs are generated when Jobs receives an MQTT request for the job document. * </p> * * @param expiresInSec * How long (in seconds) pre-signed URLs are valid. Valid values are 60 - 3600, the default value is 3600 * seconds. Pre-signed URLs are generated when Jobs receives an MQTT request for the job document. * @return Returns a reference to this object so that method calls can be chained together. */ public PresignedUrlConfig withExpiresInSec(Long expiresInSec) { setExpiresInSec(expiresInSec); return this; }
presignedUrlConfig.setExpiresInSec(context.getUnmarshaller(Long.class).unmarshall(context));
public PresignedUrlConfig unmarshall(JsonUnmarshallerContext context) throws Exception { AwsJsonReader reader = context.getReader(); if (!reader.isContainer()) { reader.skipValue(); return null; } PresignedUrlConfig presignedUrlConfig = new PresignedUrlConfig(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("roleArn")) { presignedUrlConfig.setRoleArn(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("expiresInSec")) { presignedUrlConfig.setExpiresInSec(LongJsonUnmarshaller.getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return presignedUrlConfig; }
/** * <p> * How long (in seconds) pre-signed URLs are valid. Valid values are 60 - 3600, the default value is 3600 seconds. * Pre-signed URLs are generated when Jobs receives an MQTT request for the job document. * </p> * * @param expiresInSec * How long (in seconds) pre-signed URLs are valid. Valid values are 60 - 3600, the default value is 3600 * seconds. Pre-signed URLs are generated when Jobs receives an MQTT request for the job document. * @return Returns a reference to this object so that method calls can be chained together. */ public PresignedUrlConfig withExpiresInSec(Long expiresInSec) { setExpiresInSec(expiresInSec); return this; }
public PresignedUrlConfig unmarshall(JsonUnmarshallerContext context) throws Exception { AwsJsonReader reader = context.getReader(); if (!reader.isContainer()) { reader.skipValue(); return null; } PresignedUrlConfig presignedUrlConfig = new PresignedUrlConfig(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("roleArn")) { presignedUrlConfig.setRoleArn(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("expiresInSec")) { presignedUrlConfig.setExpiresInSec(LongJsonUnmarshaller.getInstance() .unmarshall(context)); } else { reader.skipValue(); } } reader.endObject(); return presignedUrlConfig; }
presignedUrlConfig.setExpiresInSec(context.getUnmarshaller(Long.class).unmarshall(context));