public CreateFunctionRequest withLayers(String... layers) {
        if (this.layers == null) {
            setLayers(new com.amazonaws.internal.SdkInternalList<String>(layers.length));
        }
        for (String ele : layers) {
            this.layers.add(ele);
        }
        return this;
    }
public CreateFunctionRequest withLayers ( String ... layers ) { if ( this . layers == null ) { setLayers ( new com . amazonaws . internal . SdkInternalList < String > ( layers . length ) ) ; } for ( String ele : layers ) { this . layers . add ( ele ) ; } return this ; }
<p>
A list of <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html">function layers</a> to
add to the function's execution environment. Specify each layer by its ARN, including the version.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setLayers(java.util.Collection)} or {@link #withLayers(java.util.Collection)} if you want to override the
existing values.
</p>

@param layers
A list of <a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html">function
layers</a> to add to the function's execution environment. Specify each layer by its ARN, including the
version.
@return Returns a reference to this object so that method calls can be chained together.