public CreateCanaryRequest withCode(CanaryCodeInput code) {
        setCode(code);
        return this;
    }
<p>
A structure that includes the entry point from which the canary should start running your script. If the script
is stored in an S3 bucket, the bucket name, key, and version are also included.
</p>

@param code
       A structure that includes the entry point from which the canary should start running your script. If the
       script is stored in an S3 bucket, the bucket name, key, and version are also included.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-synthetics/src/main/java/com/amazonaws/services/synthetics/model/CreateCanaryRequest.java