com.amazonaws.services.deadline.model.AssignedSessionActionDefinition Maven / Gradle / Ivy
Show all versions of aws-java-sdk-deadline Show documentation
/*
* Copyright 2019-2024 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.deadline.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* The definition of the assigned session action.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class AssignedSessionActionDefinition implements Serializable, Cloneable, StructuredPojo {
/**
*
* The environment a session starts on.
*
*/
private AssignedEnvironmentEnterSessionActionDefinition envEnter;
/**
*
* The environment a session exits from.
*
*/
private AssignedEnvironmentExitSessionActionDefinition envExit;
/**
*
* The job attachment to sync with an assigned session action.
*
*/
private AssignedSyncInputJobAttachmentsSessionActionDefinition syncInputJobAttachments;
/**
*
* The task run.
*
*/
private AssignedTaskRunSessionActionDefinition taskRun;
/**
*
* The environment a session starts on.
*
*
* @param envEnter
* The environment a session starts on.
*/
public void setEnvEnter(AssignedEnvironmentEnterSessionActionDefinition envEnter) {
this.envEnter = envEnter;
}
/**
*
* The environment a session starts on.
*
*
* @return The environment a session starts on.
*/
public AssignedEnvironmentEnterSessionActionDefinition getEnvEnter() {
return this.envEnter;
}
/**
*
* The environment a session starts on.
*
*
* @param envEnter
* The environment a session starts on.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AssignedSessionActionDefinition withEnvEnter(AssignedEnvironmentEnterSessionActionDefinition envEnter) {
setEnvEnter(envEnter);
return this;
}
/**
*
* The environment a session exits from.
*
*
* @param envExit
* The environment a session exits from.
*/
public void setEnvExit(AssignedEnvironmentExitSessionActionDefinition envExit) {
this.envExit = envExit;
}
/**
*
* The environment a session exits from.
*
*
* @return The environment a session exits from.
*/
public AssignedEnvironmentExitSessionActionDefinition getEnvExit() {
return this.envExit;
}
/**
*
* The environment a session exits from.
*
*
* @param envExit
* The environment a session exits from.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AssignedSessionActionDefinition withEnvExit(AssignedEnvironmentExitSessionActionDefinition envExit) {
setEnvExit(envExit);
return this;
}
/**
*
* The job attachment to sync with an assigned session action.
*
*
* @param syncInputJobAttachments
* The job attachment to sync with an assigned session action.
*/
public void setSyncInputJobAttachments(AssignedSyncInputJobAttachmentsSessionActionDefinition syncInputJobAttachments) {
this.syncInputJobAttachments = syncInputJobAttachments;
}
/**
*
* The job attachment to sync with an assigned session action.
*
*
* @return The job attachment to sync with an assigned session action.
*/
public AssignedSyncInputJobAttachmentsSessionActionDefinition getSyncInputJobAttachments() {
return this.syncInputJobAttachments;
}
/**
*
* The job attachment to sync with an assigned session action.
*
*
* @param syncInputJobAttachments
* The job attachment to sync with an assigned session action.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AssignedSessionActionDefinition withSyncInputJobAttachments(AssignedSyncInputJobAttachmentsSessionActionDefinition syncInputJobAttachments) {
setSyncInputJobAttachments(syncInputJobAttachments);
return this;
}
/**
*
* The task run.
*
*
* @param taskRun
* The task run.
*/
public void setTaskRun(AssignedTaskRunSessionActionDefinition taskRun) {
this.taskRun = taskRun;
}
/**
*
* The task run.
*
*
* @return The task run.
*/
public AssignedTaskRunSessionActionDefinition getTaskRun() {
return this.taskRun;
}
/**
*
* The task run.
*
*
* @param taskRun
* The task run.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AssignedSessionActionDefinition withTaskRun(AssignedTaskRunSessionActionDefinition taskRun) {
setTaskRun(taskRun);
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 (getEnvEnter() != null)
sb.append("EnvEnter: ").append(getEnvEnter()).append(",");
if (getEnvExit() != null)
sb.append("EnvExit: ").append(getEnvExit()).append(",");
if (getSyncInputJobAttachments() != null)
sb.append("SyncInputJobAttachments: ").append(getSyncInputJobAttachments()).append(",");
if (getTaskRun() != null)
sb.append("TaskRun: ").append(getTaskRun());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof AssignedSessionActionDefinition == false)
return false;
AssignedSessionActionDefinition other = (AssignedSessionActionDefinition) obj;
if (other.getEnvEnter() == null ^ this.getEnvEnter() == null)
return false;
if (other.getEnvEnter() != null && other.getEnvEnter().equals(this.getEnvEnter()) == false)
return false;
if (other.getEnvExit() == null ^ this.getEnvExit() == null)
return false;
if (other.getEnvExit() != null && other.getEnvExit().equals(this.getEnvExit()) == false)
return false;
if (other.getSyncInputJobAttachments() == null ^ this.getSyncInputJobAttachments() == null)
return false;
if (other.getSyncInputJobAttachments() != null && other.getSyncInputJobAttachments().equals(this.getSyncInputJobAttachments()) == false)
return false;
if (other.getTaskRun() == null ^ this.getTaskRun() == null)
return false;
if (other.getTaskRun() != null && other.getTaskRun().equals(this.getTaskRun()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getEnvEnter() == null) ? 0 : getEnvEnter().hashCode());
hashCode = prime * hashCode + ((getEnvExit() == null) ? 0 : getEnvExit().hashCode());
hashCode = prime * hashCode + ((getSyncInputJobAttachments() == null) ? 0 : getSyncInputJobAttachments().hashCode());
hashCode = prime * hashCode + ((getTaskRun() == null) ? 0 : getTaskRun().hashCode());
return hashCode;
}
@Override
public AssignedSessionActionDefinition clone() {
try {
return (AssignedSessionActionDefinition) 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.deadline.model.transform.AssignedSessionActionDefinitionMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}