public AnalyzedResource withSharedVia(String... sharedVia) {
        if (this.sharedVia == null) {
            setSharedVia(new java.util.ArrayList<String>(sharedVia.length));
        }
        for (String ele : sharedVia) {
            this.sharedVia.add(ele);
        }
        return this;
    }
<p>
Indicates how the access that generated the finding is granted. This is populated for Amazon S3 bucket findings.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setSharedVia(java.util.Collection)} or {@link #withSharedVia(java.util.Collection)} if you want to
override the existing values.
</p>

@param sharedVia
       Indicates how the access that generated the finding is granted. This is populated for Amazon S3 bucket
       findings.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-accessanalyzer/src/main/java/com/amazonaws/services/accessanalyzer/model/AnalyzedResource.java