public SetResourceAccessForBucketRequest withAccess(ResourceBucketAccess access) {
        this.access = access.toString();
        return this;
    }
<p>
The access setting.
</p>
<p>
The following access settings are available:
</p>
<ul>
<li>
<p>
<code>allow</code> - Allows access to the bucket and its objects.
</p>
</li>
<li>
<p>
<code>deny</code> - Denies access to the bucket and its objects. Use this setting to remove access for a resource
previously set to <code>allow</code>.
</p>
</li>
</ul>

@param access
       The access setting.</p>
       <p>
       The following access settings are available:
       </p>
       <ul>
       <li>
       <p>
       <code>allow</code> - Allows access to the bucket and its objects.
       </p>
       </li>
       <li>
       <p>
       <code>deny</code> - Denies access to the bucket and its objects. Use this setting to remove access for a
       resource previously set to <code>allow</code>.
       </p>
       </li>
@return Returns a reference to this object so that method calls can be chained together.
@see ResourceBucketAccess
aws-java-sdk-lightsail/src/main/java/com/amazonaws/services/lightsail/model/SetResourceAccessForBucketRequest.java