/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.sagemaker.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateNotebookInstanceLifecycleConfigRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The name of the lifecycle configuration. *
*/ private String notebookInstanceLifecycleConfigName; /** ** A shell script that runs only once, when you create a notebook instance. The shell script must be a * base64-encoded string. *
*/ private java.util.List* A shell script that runs every time you start a notebook instance, including when you create the notebook * instance. The shell script must be a base64-encoded string. *
*/ private java.util.List* The name of the lifecycle configuration. *
* * @param notebookInstanceLifecycleConfigName * The name of the lifecycle configuration. */ public void setNotebookInstanceLifecycleConfigName(String notebookInstanceLifecycleConfigName) { this.notebookInstanceLifecycleConfigName = notebookInstanceLifecycleConfigName; } /** ** The name of the lifecycle configuration. *
* * @return The name of the lifecycle configuration. */ public String getNotebookInstanceLifecycleConfigName() { return this.notebookInstanceLifecycleConfigName; } /** ** The name of the lifecycle configuration. *
* * @param notebookInstanceLifecycleConfigName * The name of the lifecycle configuration. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateNotebookInstanceLifecycleConfigRequest withNotebookInstanceLifecycleConfigName(String notebookInstanceLifecycleConfigName) { setNotebookInstanceLifecycleConfigName(notebookInstanceLifecycleConfigName); return this; } /** ** A shell script that runs only once, when you create a notebook instance. The shell script must be a * base64-encoded string. *
* * @return A shell script that runs only once, when you create a notebook instance. The shell script must be a * base64-encoded string. */ public java.util.List* A shell script that runs only once, when you create a notebook instance. The shell script must be a * base64-encoded string. *
* * @param onCreate * A shell script that runs only once, when you create a notebook instance. The shell script must be a * base64-encoded string. */ public void setOnCreate(java.util.Collection* A shell script that runs only once, when you create a notebook instance. The shell script must be a * base64-encoded string. *
** NOTE: 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. *
* * @param onCreate * A 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. */ public CreateNotebookInstanceLifecycleConfigRequest withOnCreate(NotebookInstanceLifecycleHook... onCreate) { if (this.onCreate == null) { setOnCreate(new java.util.ArrayList* A shell script that runs only once, when you create a notebook instance. The shell script must be a * base64-encoded string. *
* * @param onCreate * A 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. */ public CreateNotebookInstanceLifecycleConfigRequest withOnCreate(java.util.Collection* A shell script that runs every time you start a notebook instance, including when you create the notebook * instance. The shell script must be a base64-encoded string. *
* * @return A shell script that runs every time you start a notebook instance, including when you create the notebook * instance. The shell script must be a base64-encoded string. */ public java.util.List* A shell script that runs every time you start a notebook instance, including when you create the notebook * instance. The shell script must be a base64-encoded string. *
* * @param onStart * A shell script that runs every time you start a notebook instance, including when you create the notebook * instance. The shell script must be a base64-encoded string. */ public void setOnStart(java.util.Collection* A shell script that runs every time you start a notebook instance, including when you create the notebook * instance. The shell script must be a base64-encoded string. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setOnStart(java.util.Collection)} or {@link #withOnStart(java.util.Collection)} if you want to override * the existing values. *
* * @param onStart * A shell script that runs every time you start a notebook instance, including when you create the 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. */ public CreateNotebookInstanceLifecycleConfigRequest withOnStart(NotebookInstanceLifecycleHook... onStart) { if (this.onStart == null) { setOnStart(new java.util.ArrayList* A shell script that runs every time you start a notebook instance, including when you create the notebook * instance. The shell script must be a base64-encoded string. *
* * @param onStart * A shell script that runs every time you start a notebook instance, including when you create the 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. */ public CreateNotebookInstanceLifecycleConfigRequest withOnStart(java.util.Collection