public StructuredMessageListDefinition withCapacity(Integer capacity) {
        setCapacity(capacity);
        return this;
    }
<p>
The capacity of the structured message list definition when the list type is <code>FIXED_CAPACITY</code> or
<code>DYNAMIC_BOUNDED_CAPACITY</code>.
</p>

@param capacity
       The capacity of the structured message list definition when the list type is <code>FIXED_CAPACITY</code>
       or <code>DYNAMIC_BOUNDED_CAPACITY</code>.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-iotfleetwise/src/main/java/com/amazonaws/services/iotfleetwise/model/StructuredMessageListDefinition.java