/* * 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.athena.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 StartSessionRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The session description. *
*/ private String description; /** ** The workgroup to which the session belongs. *
*/ private String workGroup; /** ** Contains engine data processing unit (DPU) configuration settings and parameter mappings. *
*/ private EngineConfiguration engineConfiguration; /** *
* The notebook version. This value is supplied automatically for notebook sessions in the Athena console and is not
* required for programmatic session access. The only valid notebook version is
* Athena notebook version 1
. If you specify a value for NotebookVersion
, you must also
* specify a value for NotebookId
. See EngineConfiguration$AdditionalConfigs.
*
* The idle timeout in minutes for the session. *
*/ private Integer sessionIdleTimeoutInMinutes; /** *
* A unique case-sensitive string used to ensure the request to create the session is idempotent (executes only
* once). If another StartSessionRequest
is received, the same response is returned and another session
* is not created. If a parameter has changed, an error is returned.
*
* This token is listed as not required because Amazon Web Services SDKs (for example the Amazon Web Services SDK * for Java) auto-generate the token for users. If you are not using the Amazon Web Services SDK or the Amazon Web * Services CLI, you must provide this token or the action will fail. *
** The session description. *
* * @param description * The session description. */ public void setDescription(String description) { this.description = description; } /** ** The session description. *
* * @return The session description. */ public String getDescription() { return this.description; } /** ** The session description. *
* * @param description * The session description. * @return Returns a reference to this object so that method calls can be chained together. */ public StartSessionRequest withDescription(String description) { setDescription(description); return this; } /** ** The workgroup to which the session belongs. *
* * @param workGroup * The workgroup to which the session belongs. */ public void setWorkGroup(String workGroup) { this.workGroup = workGroup; } /** ** The workgroup to which the session belongs. *
* * @return The workgroup to which the session belongs. */ public String getWorkGroup() { return this.workGroup; } /** ** The workgroup to which the session belongs. *
* * @param workGroup * The workgroup to which the session belongs. * @return Returns a reference to this object so that method calls can be chained together. */ public StartSessionRequest withWorkGroup(String workGroup) { setWorkGroup(workGroup); return this; } /** ** Contains engine data processing unit (DPU) configuration settings and parameter mappings. *
* * @param engineConfiguration * Contains engine data processing unit (DPU) configuration settings and parameter mappings. */ public void setEngineConfiguration(EngineConfiguration engineConfiguration) { this.engineConfiguration = engineConfiguration; } /** ** Contains engine data processing unit (DPU) configuration settings and parameter mappings. *
* * @return Contains engine data processing unit (DPU) configuration settings and parameter mappings. */ public EngineConfiguration getEngineConfiguration() { return this.engineConfiguration; } /** ** Contains engine data processing unit (DPU) configuration settings and parameter mappings. *
* * @param engineConfiguration * Contains engine data processing unit (DPU) configuration settings and parameter mappings. * @return Returns a reference to this object so that method calls can be chained together. */ public StartSessionRequest withEngineConfiguration(EngineConfiguration engineConfiguration) { setEngineConfiguration(engineConfiguration); return this; } /** *
* The notebook version. This value is supplied automatically for notebook sessions in the Athena console and is not
* required for programmatic session access. The only valid notebook version is
* Athena notebook version 1
. If you specify a value for NotebookVersion
, you must also
* specify a value for NotebookId
. See EngineConfiguration$AdditionalConfigs.
*
Athena notebook version 1
. If you specify a value for NotebookVersion
, you must
* also specify a value for NotebookId
. See EngineConfiguration$AdditionalConfigs.
*/
public void setNotebookVersion(String notebookVersion) {
this.notebookVersion = notebookVersion;
}
/**
*
* The notebook version. This value is supplied automatically for notebook sessions in the Athena console and is not
* required for programmatic session access. The only valid notebook version is
* Athena notebook version 1
. If you specify a value for NotebookVersion
, you must also
* specify a value for NotebookId
. See EngineConfiguration$AdditionalConfigs.
*
Athena notebook version 1
. If you specify a value for NotebookVersion
, you must
* also specify a value for NotebookId
. See EngineConfiguration$AdditionalConfigs.
*/
public String getNotebookVersion() {
return this.notebookVersion;
}
/**
*
* The notebook version. This value is supplied automatically for notebook sessions in the Athena console and is not
* required for programmatic session access. The only valid notebook version is
* Athena notebook version 1
. If you specify a value for NotebookVersion
, you must also
* specify a value for NotebookId
. See EngineConfiguration$AdditionalConfigs.
*
Athena notebook version 1
. If you specify a value for NotebookVersion
, you must
* also specify a value for NotebookId
. See EngineConfiguration$AdditionalConfigs.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public StartSessionRequest withNotebookVersion(String notebookVersion) {
setNotebookVersion(notebookVersion);
return this;
}
/**
* * The idle timeout in minutes for the session. *
* * @param sessionIdleTimeoutInMinutes * The idle timeout in minutes for the session. */ public void setSessionIdleTimeoutInMinutes(Integer sessionIdleTimeoutInMinutes) { this.sessionIdleTimeoutInMinutes = sessionIdleTimeoutInMinutes; } /** ** The idle timeout in minutes for the session. *
* * @return The idle timeout in minutes for the session. */ public Integer getSessionIdleTimeoutInMinutes() { return this.sessionIdleTimeoutInMinutes; } /** ** The idle timeout in minutes for the session. *
* * @param sessionIdleTimeoutInMinutes * The idle timeout in minutes for the session. * @return Returns a reference to this object so that method calls can be chained together. */ public StartSessionRequest withSessionIdleTimeoutInMinutes(Integer sessionIdleTimeoutInMinutes) { setSessionIdleTimeoutInMinutes(sessionIdleTimeoutInMinutes); return this; } /** *
* A unique case-sensitive string used to ensure the request to create the session is idempotent (executes only
* once). If another StartSessionRequest
is received, the same response is returned and another session
* is not created. If a parameter has changed, an error is returned.
*
* This token is listed as not required because Amazon Web Services SDKs (for example the Amazon Web Services SDK * for Java) auto-generate the token for users. If you are not using the Amazon Web Services SDK or the Amazon Web * Services CLI, you must provide this token or the action will fail. *
*StartSessionRequest
is received, the same response is returned and
* another session is not created. If a parameter has changed, an error is returned. * This token is listed as not required because Amazon Web Services SDKs (for example the Amazon Web Services * SDK for Java) auto-generate the token for users. If you are not using the Amazon Web Services SDK or the * Amazon Web Services CLI, you must provide this token or the action will fail. *
*/ public void setClientRequestToken(String clientRequestToken) { this.clientRequestToken = clientRequestToken; } /** *
* A unique case-sensitive string used to ensure the request to create the session is idempotent (executes only
* once). If another StartSessionRequest
is received, the same response is returned and another session
* is not created. If a parameter has changed, an error is returned.
*
* This token is listed as not required because Amazon Web Services SDKs (for example the Amazon Web Services SDK * for Java) auto-generate the token for users. If you are not using the Amazon Web Services SDK or the Amazon Web * Services CLI, you must provide this token or the action will fail. *
*StartSessionRequest
is received, the same response is returned and
* another session is not created. If a parameter has changed, an error is returned. * This token is listed as not required because Amazon Web Services SDKs (for example the Amazon Web * Services SDK for Java) auto-generate the token for users. If you are not using the Amazon Web Services * SDK or the Amazon Web Services CLI, you must provide this token or the action will fail. *
*/ public String getClientRequestToken() { return this.clientRequestToken; } /** *
* A unique case-sensitive string used to ensure the request to create the session is idempotent (executes only
* once). If another StartSessionRequest
is received, the same response is returned and another session
* is not created. If a parameter has changed, an error is returned.
*
* This token is listed as not required because Amazon Web Services SDKs (for example the Amazon Web Services SDK * for Java) auto-generate the token for users. If you are not using the Amazon Web Services SDK or the Amazon Web * Services CLI, you must provide this token or the action will fail. *
*StartSessionRequest
is received, the same response is returned and
* another session is not created. If a parameter has changed, an error is returned. * This token is listed as not required because Amazon Web Services SDKs (for example the Amazon Web Services * SDK for Java) auto-generate the token for users. If you are not using the Amazon Web Services SDK or the * Amazon Web Services CLI, you must provide this token or the action will fail. *
* @return Returns a reference to this object so that method calls can be chained together. */ public StartSessionRequest withClientRequestToken(String clientRequestToken) { setClientRequestToken(clientRequestToken); 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 (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getWorkGroup() != null) sb.append("WorkGroup: ").append(getWorkGroup()).append(","); if (getEngineConfiguration() != null) sb.append("EngineConfiguration: ").append(getEngineConfiguration()).append(","); if (getNotebookVersion() != null) sb.append("NotebookVersion: ").append(getNotebookVersion()).append(","); if (getSessionIdleTimeoutInMinutes() != null) sb.append("SessionIdleTimeoutInMinutes: ").append(getSessionIdleTimeoutInMinutes()).append(","); if (getClientRequestToken() != null) sb.append("ClientRequestToken: ").append(getClientRequestToken()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof StartSessionRequest == false) return false; StartSessionRequest other = (StartSessionRequest) obj; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getWorkGroup() == null ^ this.getWorkGroup() == null) return false; if (other.getWorkGroup() != null && other.getWorkGroup().equals(this.getWorkGroup()) == false) return false; if (other.getEngineConfiguration() == null ^ this.getEngineConfiguration() == null) return false; if (other.getEngineConfiguration() != null && other.getEngineConfiguration().equals(this.getEngineConfiguration()) == false) return false; if (other.getNotebookVersion() == null ^ this.getNotebookVersion() == null) return false; if (other.getNotebookVersion() != null && other.getNotebookVersion().equals(this.getNotebookVersion()) == false) return false; if (other.getSessionIdleTimeoutInMinutes() == null ^ this.getSessionIdleTimeoutInMinutes() == null) return false; if (other.getSessionIdleTimeoutInMinutes() != null && other.getSessionIdleTimeoutInMinutes().equals(this.getSessionIdleTimeoutInMinutes()) == false) return false; if (other.getClientRequestToken() == null ^ this.getClientRequestToken() == null) return false; if (other.getClientRequestToken() != null && other.getClientRequestToken().equals(this.getClientRequestToken()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getWorkGroup() == null) ? 0 : getWorkGroup().hashCode()); hashCode = prime * hashCode + ((getEngineConfiguration() == null) ? 0 : getEngineConfiguration().hashCode()); hashCode = prime * hashCode + ((getNotebookVersion() == null) ? 0 : getNotebookVersion().hashCode()); hashCode = prime * hashCode + ((getSessionIdleTimeoutInMinutes() == null) ? 0 : getSessionIdleTimeoutInMinutes().hashCode()); hashCode = prime * hashCode + ((getClientRequestToken() == null) ? 0 : getClientRequestToken().hashCode()); return hashCode; } @Override public StartSessionRequest clone() { return (StartSessionRequest) super.clone(); } }