
com.amazonaws.services.sagemaker.model.NotebookInstanceSummary Maven / Gradle / Ivy
/*
* Copyright 2015-2020 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.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Provides summary information for an Amazon SageMaker notebook instance.
*
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class NotebookInstanceSummary implements Serializable, Cloneable, StructuredPojo {
/**
*
* The name of the notebook instance that you want a summary for.
*
*/
private String notebookInstanceName;
/**
*
* The Amazon Resource Name (ARN) of the notebook instance.
*
*/
private String notebookInstanceArn;
/**
*
* The status of the notebook instance.
*
*/
private String notebookInstanceStatus;
/**
*
* The URL that you use to connect to the Jupyter instance running in your notebook instance.
*
*/
private String url;
/**
*
* The type of ML compute instance that the notebook instance is running on.
*
*/
private String instanceType;
/**
*
* A timestamp that shows when the notebook instance was created.
*
*/
private java.util.Date creationTime;
/**
*
* A timestamp that shows when the notebook instance was last modified.
*
*/
private java.util.Date lastModifiedTime;
/**
*
* The name of a notebook instance lifecycle configuration associated with this notebook instance.
*
*
* For information about notebook instance lifestyle configurations, see Step 2.1: (Optional)
* Customize a Notebook Instance.
*
*/
private String notebookInstanceLifecycleConfigName;
/**
*
* The Git repository associated with the notebook instance as its default code repository. This can be either the
* name of a Git repository stored as a resource in your account, or the URL of a Git repository in AWS CodeCommit or in any other
* Git repository. When you open a notebook instance, it opens in the directory that contains this repository. For
* more information, see Associating Git
* Repositories with Amazon SageMaker Notebook Instances.
*
*/
private String defaultCodeRepository;
/**
*
* An array of up to three Git repositories associated with the notebook instance. These can be either the names of
* Git repositories stored as resources in your account, or the URL of Git repositories in AWS CodeCommit or in any other
* Git repository. These repositories are cloned at the same level as the default repository of your notebook
* instance. For more information, see Associating Git Repositories with Amazon
* SageMaker Notebook Instances.
*
*/
private java.util.List additionalCodeRepositories;
/**
*
* The name of the notebook instance that you want a summary for.
*
*
* @param notebookInstanceName
* The name of the notebook instance that you want a summary for.
*/
public void setNotebookInstanceName(String notebookInstanceName) {
this.notebookInstanceName = notebookInstanceName;
}
/**
*
* The name of the notebook instance that you want a summary for.
*
*
* @return The name of the notebook instance that you want a summary for.
*/
public String getNotebookInstanceName() {
return this.notebookInstanceName;
}
/**
*
* The name of the notebook instance that you want a summary for.
*
*
* @param notebookInstanceName
* The name of the notebook instance that you want a summary for.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public NotebookInstanceSummary withNotebookInstanceName(String notebookInstanceName) {
setNotebookInstanceName(notebookInstanceName);
return this;
}
/**
*
* The Amazon Resource Name (ARN) of the notebook instance.
*
*
* @param notebookInstanceArn
* The Amazon Resource Name (ARN) of the notebook instance.
*/
public void setNotebookInstanceArn(String notebookInstanceArn) {
this.notebookInstanceArn = notebookInstanceArn;
}
/**
*
* The Amazon Resource Name (ARN) of the notebook instance.
*
*
* @return The Amazon Resource Name (ARN) of the notebook instance.
*/
public String getNotebookInstanceArn() {
return this.notebookInstanceArn;
}
/**
*
* The Amazon Resource Name (ARN) of the notebook instance.
*
*
* @param notebookInstanceArn
* The Amazon Resource Name (ARN) of the notebook instance.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public NotebookInstanceSummary withNotebookInstanceArn(String notebookInstanceArn) {
setNotebookInstanceArn(notebookInstanceArn);
return this;
}
/**
*
* The status of the notebook instance.
*
*
* @param notebookInstanceStatus
* The status of the notebook instance.
* @see NotebookInstanceStatus
*/
public void setNotebookInstanceStatus(String notebookInstanceStatus) {
this.notebookInstanceStatus = notebookInstanceStatus;
}
/**
*
* The status of the notebook instance.
*
*
* @return The status of the notebook instance.
* @see NotebookInstanceStatus
*/
public String getNotebookInstanceStatus() {
return this.notebookInstanceStatus;
}
/**
*
* The status of the notebook instance.
*
*
* @param notebookInstanceStatus
* The status of the notebook instance.
* @return Returns a reference to this object so that method calls can be chained together.
* @see NotebookInstanceStatus
*/
public NotebookInstanceSummary withNotebookInstanceStatus(String notebookInstanceStatus) {
setNotebookInstanceStatus(notebookInstanceStatus);
return this;
}
/**
*
* The status of the notebook instance.
*
*
* @param notebookInstanceStatus
* The status of the notebook instance.
* @return Returns a reference to this object so that method calls can be chained together.
* @see NotebookInstanceStatus
*/
public NotebookInstanceSummary withNotebookInstanceStatus(NotebookInstanceStatus notebookInstanceStatus) {
this.notebookInstanceStatus = notebookInstanceStatus.toString();
return this;
}
/**
*
* The URL that you use to connect to the Jupyter instance running in your notebook instance.
*
*
* @param url
* The URL that you use to connect to the Jupyter instance running in your notebook instance.
*/
public void setUrl(String url) {
this.url = url;
}
/**
*
* The URL that you use to connect to the Jupyter instance running in your notebook instance.
*
*
* @return The URL that you use to connect to the Jupyter instance running in your notebook instance.
*/
public String getUrl() {
return this.url;
}
/**
*
* The URL that you use to connect to the Jupyter instance running in your notebook instance.
*
*
* @param url
* The URL that you use to connect to the Jupyter instance running in your notebook instance.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public NotebookInstanceSummary withUrl(String url) {
setUrl(url);
return this;
}
/**
*
* The type of ML compute instance that the notebook instance is running on.
*
*
* @param instanceType
* The type of ML compute instance that the notebook instance is running on.
* @see InstanceType
*/
public void setInstanceType(String instanceType) {
this.instanceType = instanceType;
}
/**
*
* The type of ML compute instance that the notebook instance is running on.
*
*
* @return The type of ML compute instance that the notebook instance is running on.
* @see InstanceType
*/
public String getInstanceType() {
return this.instanceType;
}
/**
*
* The type of ML compute instance that the notebook instance is running on.
*
*
* @param instanceType
* The type of ML compute instance that the notebook instance is running on.
* @return Returns a reference to this object so that method calls can be chained together.
* @see InstanceType
*/
public NotebookInstanceSummary withInstanceType(String instanceType) {
setInstanceType(instanceType);
return this;
}
/**
*
* The type of ML compute instance that the notebook instance is running on.
*
*
* @param instanceType
* The type of ML compute instance that the notebook instance is running on.
* @return Returns a reference to this object so that method calls can be chained together.
* @see InstanceType
*/
public NotebookInstanceSummary withInstanceType(InstanceType instanceType) {
this.instanceType = instanceType.toString();
return this;
}
/**
*
* A timestamp that shows when the notebook instance was created.
*
*
* @param creationTime
* A timestamp that shows when the notebook instance was created.
*/
public void setCreationTime(java.util.Date creationTime) {
this.creationTime = creationTime;
}
/**
*
* A timestamp that shows when the notebook instance was created.
*
*
* @return A timestamp that shows when the notebook instance was created.
*/
public java.util.Date getCreationTime() {
return this.creationTime;
}
/**
*
* A timestamp that shows when the notebook instance was created.
*
*
* @param creationTime
* A timestamp that shows when the notebook instance was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public NotebookInstanceSummary withCreationTime(java.util.Date creationTime) {
setCreationTime(creationTime);
return this;
}
/**
*
* A timestamp that shows when the notebook instance was last modified.
*
*
* @param lastModifiedTime
* A timestamp that shows when the notebook instance was last modified.
*/
public void setLastModifiedTime(java.util.Date lastModifiedTime) {
this.lastModifiedTime = lastModifiedTime;
}
/**
*
* A timestamp that shows when the notebook instance was last modified.
*
*
* @return A timestamp that shows when the notebook instance was last modified.
*/
public java.util.Date getLastModifiedTime() {
return this.lastModifiedTime;
}
/**
*
* A timestamp that shows when the notebook instance was last modified.
*
*
* @param lastModifiedTime
* A timestamp that shows when the notebook instance was last modified.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public NotebookInstanceSummary withLastModifiedTime(java.util.Date lastModifiedTime) {
setLastModifiedTime(lastModifiedTime);
return this;
}
/**
*
* The name of a notebook instance lifecycle configuration associated with this notebook instance.
*
*
* For information about notebook instance lifestyle configurations, see Step 2.1: (Optional)
* Customize a Notebook Instance.
*
*
* @param notebookInstanceLifecycleConfigName
* The name of a notebook instance lifecycle configuration associated with this notebook instance.
*
* For information about notebook instance lifestyle configurations, see Step 2.1: (Optional)
* Customize a Notebook Instance.
*/
public void setNotebookInstanceLifecycleConfigName(String notebookInstanceLifecycleConfigName) {
this.notebookInstanceLifecycleConfigName = notebookInstanceLifecycleConfigName;
}
/**
*
* The name of a notebook instance lifecycle configuration associated with this notebook instance.
*
*
* For information about notebook instance lifestyle configurations, see Step 2.1: (Optional)
* Customize a Notebook Instance.
*
*
* @return The name of a notebook instance lifecycle configuration associated with this notebook instance.
*
* For information about notebook instance lifestyle configurations, see Step 2.1:
* (Optional) Customize a Notebook Instance.
*/
public String getNotebookInstanceLifecycleConfigName() {
return this.notebookInstanceLifecycleConfigName;
}
/**
*
* The name of a notebook instance lifecycle configuration associated with this notebook instance.
*
*
* For information about notebook instance lifestyle configurations, see Step 2.1: (Optional)
* Customize a Notebook Instance.
*
*
* @param notebookInstanceLifecycleConfigName
* The name of a notebook instance lifecycle configuration associated with this notebook instance.
*
* For information about notebook instance lifestyle configurations, see Step 2.1: (Optional)
* Customize a Notebook Instance.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public NotebookInstanceSummary withNotebookInstanceLifecycleConfigName(String notebookInstanceLifecycleConfigName) {
setNotebookInstanceLifecycleConfigName(notebookInstanceLifecycleConfigName);
return this;
}
/**
*
* The Git repository associated with the notebook instance as its default code repository. This can be either the
* name of a Git repository stored as a resource in your account, or the URL of a Git repository in AWS CodeCommit or in any other
* Git repository. When you open a notebook instance, it opens in the directory that contains this repository. For
* more information, see Associating Git
* Repositories with Amazon SageMaker Notebook Instances.
*
*
* @param defaultCodeRepository
* The Git repository associated with the notebook instance as its default code repository. This can be
* either the name of a Git repository stored as a resource in your account, or the URL of a Git repository
* in AWS CodeCommit or in
* any other Git repository. When you open a notebook instance, it opens in the directory that contains this
* repository. For more information, see Associating Git Repositories with
* Amazon SageMaker Notebook Instances.
*/
public void setDefaultCodeRepository(String defaultCodeRepository) {
this.defaultCodeRepository = defaultCodeRepository;
}
/**
*
* The Git repository associated with the notebook instance as its default code repository. This can be either the
* name of a Git repository stored as a resource in your account, or the URL of a Git repository in AWS CodeCommit or in any other
* Git repository. When you open a notebook instance, it opens in the directory that contains this repository. For
* more information, see Associating Git
* Repositories with Amazon SageMaker Notebook Instances.
*
*
* @return The Git repository associated with the notebook instance as its default code repository. This can be
* either the name of a Git repository stored as a resource in your account, or the URL of a Git repository
* in AWS CodeCommit or
* in any other Git repository. When you open a notebook instance, it opens in the directory that contains
* this repository. For more information, see Associating Git Repositories
* with Amazon SageMaker Notebook Instances.
*/
public String getDefaultCodeRepository() {
return this.defaultCodeRepository;
}
/**
*
* The Git repository associated with the notebook instance as its default code repository. This can be either the
* name of a Git repository stored as a resource in your account, or the URL of a Git repository in AWS CodeCommit or in any other
* Git repository. When you open a notebook instance, it opens in the directory that contains this repository. For
* more information, see Associating Git
* Repositories with Amazon SageMaker Notebook Instances.
*
*
* @param defaultCodeRepository
* The Git repository associated with the notebook instance as its default code repository. This can be
* either the name of a Git repository stored as a resource in your account, or the URL of a Git repository
* in AWS CodeCommit or in
* any other Git repository. When you open a notebook instance, it opens in the directory that contains this
* repository. For more information, see Associating Git Repositories with
* Amazon SageMaker Notebook Instances.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public NotebookInstanceSummary withDefaultCodeRepository(String defaultCodeRepository) {
setDefaultCodeRepository(defaultCodeRepository);
return this;
}
/**
*
* An array of up to three Git repositories associated with the notebook instance. These can be either the names of
* Git repositories stored as resources in your account, or the URL of Git repositories in AWS CodeCommit or in any other
* Git repository. These repositories are cloned at the same level as the default repository of your notebook
* instance. For more information, see Associating Git Repositories with Amazon
* SageMaker Notebook Instances.
*
*
* @return An array of up to three Git repositories associated with the notebook instance. These can be either the
* names of Git repositories stored as resources in your account, or the URL of Git repositories in AWS CodeCommit or in any
* other Git repository. These repositories are cloned at the same level as the default repository of your
* notebook instance. For more information, see Associating Git Repositories
* with Amazon SageMaker Notebook Instances.
*/
public java.util.List getAdditionalCodeRepositories() {
return additionalCodeRepositories;
}
/**
*
* An array of up to three Git repositories associated with the notebook instance. These can be either the names of
* Git repositories stored as resources in your account, or the URL of Git repositories in AWS CodeCommit or in any other
* Git repository. These repositories are cloned at the same level as the default repository of your notebook
* instance. For more information, see Associating Git Repositories with Amazon
* SageMaker Notebook Instances.
*
*
* @param additionalCodeRepositories
* An array of up to three Git repositories associated with the notebook instance. These can be either the
* names of Git repositories stored as resources in your account, or the URL of Git repositories in AWS CodeCommit or in any
* other Git repository. These repositories are cloned at the same level as the default repository of your
* notebook instance. For more information, see Associating Git Repositories with
* Amazon SageMaker Notebook Instances.
*/
public void setAdditionalCodeRepositories(java.util.Collection additionalCodeRepositories) {
if (additionalCodeRepositories == null) {
this.additionalCodeRepositories = null;
return;
}
this.additionalCodeRepositories = new java.util.ArrayList(additionalCodeRepositories);
}
/**
*
* An array of up to three Git repositories associated with the notebook instance. These can be either the names of
* Git repositories stored as resources in your account, or the URL of Git repositories in AWS CodeCommit or in any other
* Git repository. These repositories are cloned at the same level as the default repository of your notebook
* instance. For more information, see Associating Git Repositories with Amazon
* SageMaker Notebook Instances.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setAdditionalCodeRepositories(java.util.Collection)} or
* {@link #withAdditionalCodeRepositories(java.util.Collection)} if you want to override the existing values.
*
*
* @param additionalCodeRepositories
* An array of up to three Git repositories associated with the notebook instance. These can be either the
* names of Git repositories stored as resources in your account, or the URL of Git repositories in AWS CodeCommit or in any
* other Git repository. These repositories are cloned at the same level as the default repository of your
* notebook instance. For more information, see Associating Git Repositories with
* Amazon SageMaker Notebook Instances.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public NotebookInstanceSummary withAdditionalCodeRepositories(String... additionalCodeRepositories) {
if (this.additionalCodeRepositories == null) {
setAdditionalCodeRepositories(new java.util.ArrayList(additionalCodeRepositories.length));
}
for (String ele : additionalCodeRepositories) {
this.additionalCodeRepositories.add(ele);
}
return this;
}
/**
*
* An array of up to three Git repositories associated with the notebook instance. These can be either the names of
* Git repositories stored as resources in your account, or the URL of Git repositories in AWS CodeCommit or in any other
* Git repository. These repositories are cloned at the same level as the default repository of your notebook
* instance. For more information, see Associating Git Repositories with Amazon
* SageMaker Notebook Instances.
*
*
* @param additionalCodeRepositories
* An array of up to three Git repositories associated with the notebook instance. These can be either the
* names of Git repositories stored as resources in your account, or the URL of Git repositories in AWS CodeCommit or in any
* other Git repository. These repositories are cloned at the same level as the default repository of your
* notebook instance. For more information, see Associating Git Repositories with
* Amazon SageMaker Notebook Instances.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public NotebookInstanceSummary withAdditionalCodeRepositories(java.util.Collection additionalCodeRepositories) {
setAdditionalCodeRepositories(additionalCodeRepositories);
return this;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getNotebookInstanceName() != null)
sb.append("NotebookInstanceName: ").append(getNotebookInstanceName()).append(",");
if (getNotebookInstanceArn() != null)
sb.append("NotebookInstanceArn: ").append(getNotebookInstanceArn()).append(",");
if (getNotebookInstanceStatus() != null)
sb.append("NotebookInstanceStatus: ").append(getNotebookInstanceStatus()).append(",");
if (getUrl() != null)
sb.append("Url: ").append(getUrl()).append(",");
if (getInstanceType() != null)
sb.append("InstanceType: ").append(getInstanceType()).append(",");
if (getCreationTime() != null)
sb.append("CreationTime: ").append(getCreationTime()).append(",");
if (getLastModifiedTime() != null)
sb.append("LastModifiedTime: ").append(getLastModifiedTime()).append(",");
if (getNotebookInstanceLifecycleConfigName() != null)
sb.append("NotebookInstanceLifecycleConfigName: ").append(getNotebookInstanceLifecycleConfigName()).append(",");
if (getDefaultCodeRepository() != null)
sb.append("DefaultCodeRepository: ").append(getDefaultCodeRepository()).append(",");
if (getAdditionalCodeRepositories() != null)
sb.append("AdditionalCodeRepositories: ").append(getAdditionalCodeRepositories());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof NotebookInstanceSummary == false)
return false;
NotebookInstanceSummary other = (NotebookInstanceSummary) obj;
if (other.getNotebookInstanceName() == null ^ this.getNotebookInstanceName() == null)
return false;
if (other.getNotebookInstanceName() != null && other.getNotebookInstanceName().equals(this.getNotebookInstanceName()) == false)
return false;
if (other.getNotebookInstanceArn() == null ^ this.getNotebookInstanceArn() == null)
return false;
if (other.getNotebookInstanceArn() != null && other.getNotebookInstanceArn().equals(this.getNotebookInstanceArn()) == false)
return false;
if (other.getNotebookInstanceStatus() == null ^ this.getNotebookInstanceStatus() == null)
return false;
if (other.getNotebookInstanceStatus() != null && other.getNotebookInstanceStatus().equals(this.getNotebookInstanceStatus()) == false)
return false;
if (other.getUrl() == null ^ this.getUrl() == null)
return false;
if (other.getUrl() != null && other.getUrl().equals(this.getUrl()) == false)
return false;
if (other.getInstanceType() == null ^ this.getInstanceType() == null)
return false;
if (other.getInstanceType() != null && other.getInstanceType().equals(this.getInstanceType()) == false)
return false;
if (other.getCreationTime() == null ^ this.getCreationTime() == null)
return false;
if (other.getCreationTime() != null && other.getCreationTime().equals(this.getCreationTime()) == false)
return false;
if (other.getLastModifiedTime() == null ^ this.getLastModifiedTime() == null)
return false;
if (other.getLastModifiedTime() != null && other.getLastModifiedTime().equals(this.getLastModifiedTime()) == false)
return false;
if (other.getNotebookInstanceLifecycleConfigName() == null ^ this.getNotebookInstanceLifecycleConfigName() == null)
return false;
if (other.getNotebookInstanceLifecycleConfigName() != null
&& other.getNotebookInstanceLifecycleConfigName().equals(this.getNotebookInstanceLifecycleConfigName()) == false)
return false;
if (other.getDefaultCodeRepository() == null ^ this.getDefaultCodeRepository() == null)
return false;
if (other.getDefaultCodeRepository() != null && other.getDefaultCodeRepository().equals(this.getDefaultCodeRepository()) == false)
return false;
if (other.getAdditionalCodeRepositories() == null ^ this.getAdditionalCodeRepositories() == null)
return false;
if (other.getAdditionalCodeRepositories() != null && other.getAdditionalCodeRepositories().equals(this.getAdditionalCodeRepositories()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getNotebookInstanceName() == null) ? 0 : getNotebookInstanceName().hashCode());
hashCode = prime * hashCode + ((getNotebookInstanceArn() == null) ? 0 : getNotebookInstanceArn().hashCode());
hashCode = prime * hashCode + ((getNotebookInstanceStatus() == null) ? 0 : getNotebookInstanceStatus().hashCode());
hashCode = prime * hashCode + ((getUrl() == null) ? 0 : getUrl().hashCode());
hashCode = prime * hashCode + ((getInstanceType() == null) ? 0 : getInstanceType().hashCode());
hashCode = prime * hashCode + ((getCreationTime() == null) ? 0 : getCreationTime().hashCode());
hashCode = prime * hashCode + ((getLastModifiedTime() == null) ? 0 : getLastModifiedTime().hashCode());
hashCode = prime * hashCode + ((getNotebookInstanceLifecycleConfigName() == null) ? 0 : getNotebookInstanceLifecycleConfigName().hashCode());
hashCode = prime * hashCode + ((getDefaultCodeRepository() == null) ? 0 : getDefaultCodeRepository().hashCode());
hashCode = prime * hashCode + ((getAdditionalCodeRepositories() == null) ? 0 : getAdditionalCodeRepositories().hashCode());
return hashCode;
}
@Override
public NotebookInstanceSummary clone() {
try {
return (NotebookInstanceSummary) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.sagemaker.model.transform.NotebookInstanceSummaryMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}