code: public void rejectIllegalArguments() {
          if (bucketName == null) {
              throw new IllegalArgumentException(
                      "The bucket name parameter must be specified when generating a pre-signed URL");
          }
          if (this.method == null) {
              throw new IllegalArgumentException(
                      "The HTTP method request parameter must be specified when generating a pre-signed URL");
          }
          if (this.sseCustomerKey != null) {
              if (this.sseAlgorithm != null) {
                  throw new IllegalArgumentException("Either SSE or SSE-C can be specified but not both");
              }
              if (this.kmsCmkId != null) {
                  throw new IllegalArgumentException("KMS CMK is not applicable for SSE-C");
              }
          } else if (this.kmsCmkId != null) {
              if (!SSEAlgorithm.KMS.getAlgorithm().equals(sseAlgorithm)) {
                  throw new IllegalArgumentException(
                          "For KMS server side encryption, the SSE algorithm must be set to "
                                  + SSEAlgorithm.KMS);
              }
          }
          /*
           * S3 does not require HTTP header
           * “x-amz-server-side-encryption-aws-kms-key-id” to be always present (a
           * default key ID will be used if this header is not present).
           *
           * It is also possible to set the header to “alias/aws/s3” to refer
           * to the default KMS CMK ID.
           */
      }
docs: Rejects any illegal input (as attributes of this request) by the user.
  
  @throws IllegalArgumentException if there is illegal input from the user.