public UpdateNotebookInstanceLifecycleConfigRequest withOnCreate(NotebookInstanceLifecycleHook... onCreate) {
        if (this.onCreate == null) {
            setOnCreate(new java.util.ArrayList<NotebookInstanceLifecycleHook>(onCreate.length));
        }
        for (NotebookInstanceLifecycleHook ele : onCreate) {
            this.onCreate.add(ele);
        }
        return this;
    }
<p>
The shell script that runs only once, when you create a notebook instance. The shell script must be a
base64-encoded string.
</p>
<p>
<b>NOTE:</b> This method appends the values to the existing list (if any). Use
{@link #setOnCreate(java.util.Collection)} or {@link #withOnCreate(java.util.Collection)} if you want to override
the existing values.
</p>

@param onCreate
       The shell script that runs only once, when you create a notebook instance. The shell script must be a
       base64-encoded string.
@return Returns a reference to this object so that method calls can be chained together.
aws-java-sdk-sagemaker/src/main/java/com/amazonaws/services/sagemaker/model/UpdateNotebookInstanceLifecycleConfigRequest.java