/* * 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.glue.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* A workflow is a collection of multiple dependent Glue jobs and crawlers that are run to complete a complex ETL task. * A workflow manages the execution and monitoring of all its jobs and crawlers. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Workflow implements Serializable, Cloneable, StructuredPojo { /** ** The name of the workflow. *
*/ private String name; /** ** A description of the workflow. *
*/ private String description; /** ** A collection of properties to be used as part of each execution of the workflow. The run properties are made * available to each job in the workflow. A job can modify the properties for the next jobs in the flow. *
*/ private java.util.Map* The date and time when the workflow was created. *
*/ private java.util.Date createdOn; /** ** The date and time when the workflow was last modified. *
*/ private java.util.Date lastModifiedOn; /** ** The information about the last execution of the workflow. *
*/ private WorkflowRun lastRun; /** ** The graph representing all the Glue components that belong to the workflow as nodes and directed connections * between them as edges. *
*/ private WorkflowGraph graph; /** ** You can use this parameter to prevent unwanted multiple updates to data, to control costs, or in some cases, to * prevent exceeding the maximum number of concurrent runs of any of the component jobs. If you leave this parameter * blank, there is no limit to the number of concurrent workflow runs. *
*/ private Integer maxConcurrentRuns; /** ** This structure indicates the details of the blueprint that this particular workflow is created from. *
*/ private BlueprintDetails blueprintDetails; /** ** The name of the workflow. *
* * @param name * The name of the workflow. */ public void setName(String name) { this.name = name; } /** ** The name of the workflow. *
* * @return The name of the workflow. */ public String getName() { return this.name; } /** ** The name of the workflow. *
* * @param name * The name of the workflow. * @return Returns a reference to this object so that method calls can be chained together. */ public Workflow withName(String name) { setName(name); return this; } /** ** A description of the workflow. *
* * @param description * A description of the workflow. */ public void setDescription(String description) { this.description = description; } /** ** A description of the workflow. *
* * @return A description of the workflow. */ public String getDescription() { return this.description; } /** ** A description of the workflow. *
* * @param description * A description of the workflow. * @return Returns a reference to this object so that method calls can be chained together. */ public Workflow withDescription(String description) { setDescription(description); return this; } /** ** A collection of properties to be used as part of each execution of the workflow. The run properties are made * available to each job in the workflow. A job can modify the properties for the next jobs in the flow. *
* * @return A collection of properties to be used as part of each execution of the workflow. The run properties are * made available to each job in the workflow. A job can modify the properties for the next jobs in the * flow. */ public java.util.Map* A collection of properties to be used as part of each execution of the workflow. The run properties are made * available to each job in the workflow. A job can modify the properties for the next jobs in the flow. *
* * @param defaultRunProperties * A collection of properties to be used as part of each execution of the workflow. The run properties are * made available to each job in the workflow. A job can modify the properties for the next jobs in the flow. */ public void setDefaultRunProperties(java.util.Map* A collection of properties to be used as part of each execution of the workflow. The run properties are made * available to each job in the workflow. A job can modify the properties for the next jobs in the flow. *
* * @param defaultRunProperties * A collection of properties to be used as part of each execution of the workflow. The run properties are * made available to each job in the workflow. A job can modify the properties for the next jobs in the flow. * @return Returns a reference to this object so that method calls can be chained together. */ public Workflow withDefaultRunProperties(java.util.Map* The date and time when the workflow was created. *
* * @param createdOn * The date and time when the workflow was created. */ public void setCreatedOn(java.util.Date createdOn) { this.createdOn = createdOn; } /** ** The date and time when the workflow was created. *
* * @return The date and time when the workflow was created. */ public java.util.Date getCreatedOn() { return this.createdOn; } /** ** The date and time when the workflow was created. *
* * @param createdOn * The date and time when the workflow was created. * @return Returns a reference to this object so that method calls can be chained together. */ public Workflow withCreatedOn(java.util.Date createdOn) { setCreatedOn(createdOn); return this; } /** ** The date and time when the workflow was last modified. *
* * @param lastModifiedOn * The date and time when the workflow was last modified. */ public void setLastModifiedOn(java.util.Date lastModifiedOn) { this.lastModifiedOn = lastModifiedOn; } /** ** The date and time when the workflow was last modified. *
* * @return The date and time when the workflow was last modified. */ public java.util.Date getLastModifiedOn() { return this.lastModifiedOn; } /** ** The date and time when the workflow was last modified. *
* * @param lastModifiedOn * The date and time when the workflow was last modified. * @return Returns a reference to this object so that method calls can be chained together. */ public Workflow withLastModifiedOn(java.util.Date lastModifiedOn) { setLastModifiedOn(lastModifiedOn); return this; } /** ** The information about the last execution of the workflow. *
* * @param lastRun * The information about the last execution of the workflow. */ public void setLastRun(WorkflowRun lastRun) { this.lastRun = lastRun; } /** ** The information about the last execution of the workflow. *
* * @return The information about the last execution of the workflow. */ public WorkflowRun getLastRun() { return this.lastRun; } /** ** The information about the last execution of the workflow. *
* * @param lastRun * The information about the last execution of the workflow. * @return Returns a reference to this object so that method calls can be chained together. */ public Workflow withLastRun(WorkflowRun lastRun) { setLastRun(lastRun); return this; } /** ** The graph representing all the Glue components that belong to the workflow as nodes and directed connections * between them as edges. *
* * @param graph * The graph representing all the Glue components that belong to the workflow as nodes and directed * connections between them as edges. */ public void setGraph(WorkflowGraph graph) { this.graph = graph; } /** ** The graph representing all the Glue components that belong to the workflow as nodes and directed connections * between them as edges. *
* * @return The graph representing all the Glue components that belong to the workflow as nodes and directed * connections between them as edges. */ public WorkflowGraph getGraph() { return this.graph; } /** ** The graph representing all the Glue components that belong to the workflow as nodes and directed connections * between them as edges. *
* * @param graph * The graph representing all the Glue components that belong to the workflow as nodes and directed * connections between them as edges. * @return Returns a reference to this object so that method calls can be chained together. */ public Workflow withGraph(WorkflowGraph graph) { setGraph(graph); return this; } /** ** You can use this parameter to prevent unwanted multiple updates to data, to control costs, or in some cases, to * prevent exceeding the maximum number of concurrent runs of any of the component jobs. If you leave this parameter * blank, there is no limit to the number of concurrent workflow runs. *
* * @param maxConcurrentRuns * You can use this parameter to prevent unwanted multiple updates to data, to control costs, or in some * cases, to prevent exceeding the maximum number of concurrent runs of any of the component jobs. If you * leave this parameter blank, there is no limit to the number of concurrent workflow runs. */ public void setMaxConcurrentRuns(Integer maxConcurrentRuns) { this.maxConcurrentRuns = maxConcurrentRuns; } /** ** You can use this parameter to prevent unwanted multiple updates to data, to control costs, or in some cases, to * prevent exceeding the maximum number of concurrent runs of any of the component jobs. If you leave this parameter * blank, there is no limit to the number of concurrent workflow runs. *
* * @return You can use this parameter to prevent unwanted multiple updates to data, to control costs, or in some * cases, to prevent exceeding the maximum number of concurrent runs of any of the component jobs. If you * leave this parameter blank, there is no limit to the number of concurrent workflow runs. */ public Integer getMaxConcurrentRuns() { return this.maxConcurrentRuns; } /** ** You can use this parameter to prevent unwanted multiple updates to data, to control costs, or in some cases, to * prevent exceeding the maximum number of concurrent runs of any of the component jobs. If you leave this parameter * blank, there is no limit to the number of concurrent workflow runs. *
* * @param maxConcurrentRuns * You can use this parameter to prevent unwanted multiple updates to data, to control costs, or in some * cases, to prevent exceeding the maximum number of concurrent runs of any of the component jobs. If you * leave this parameter blank, there is no limit to the number of concurrent workflow runs. * @return Returns a reference to this object so that method calls can be chained together. */ public Workflow withMaxConcurrentRuns(Integer maxConcurrentRuns) { setMaxConcurrentRuns(maxConcurrentRuns); return this; } /** ** This structure indicates the details of the blueprint that this particular workflow is created from. *
* * @param blueprintDetails * This structure indicates the details of the blueprint that this particular workflow is created from. */ public void setBlueprintDetails(BlueprintDetails blueprintDetails) { this.blueprintDetails = blueprintDetails; } /** ** This structure indicates the details of the blueprint that this particular workflow is created from. *
* * @return This structure indicates the details of the blueprint that this particular workflow is created from. */ public BlueprintDetails getBlueprintDetails() { return this.blueprintDetails; } /** ** This structure indicates the details of the blueprint that this particular workflow is created from. *
* * @param blueprintDetails * This structure indicates the details of the blueprint that this particular workflow is created from. * @return Returns a reference to this object so that method calls can be chained together. */ public Workflow withBlueprintDetails(BlueprintDetails blueprintDetails) { setBlueprintDetails(blueprintDetails); 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 (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getDefaultRunProperties() != null) sb.append("DefaultRunProperties: ").append(getDefaultRunProperties()).append(","); if (getCreatedOn() != null) sb.append("CreatedOn: ").append(getCreatedOn()).append(","); if (getLastModifiedOn() != null) sb.append("LastModifiedOn: ").append(getLastModifiedOn()).append(","); if (getLastRun() != null) sb.append("LastRun: ").append(getLastRun()).append(","); if (getGraph() != null) sb.append("Graph: ").append(getGraph()).append(","); if (getMaxConcurrentRuns() != null) sb.append("MaxConcurrentRuns: ").append(getMaxConcurrentRuns()).append(","); if (getBlueprintDetails() != null) sb.append("BlueprintDetails: ").append(getBlueprintDetails()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Workflow == false) return false; Workflow other = (Workflow) obj; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getDefaultRunProperties() == null ^ this.getDefaultRunProperties() == null) return false; if (other.getDefaultRunProperties() != null && other.getDefaultRunProperties().equals(this.getDefaultRunProperties()) == false) return false; if (other.getCreatedOn() == null ^ this.getCreatedOn() == null) return false; if (other.getCreatedOn() != null && other.getCreatedOn().equals(this.getCreatedOn()) == false) return false; if (other.getLastModifiedOn() == null ^ this.getLastModifiedOn() == null) return false; if (other.getLastModifiedOn() != null && other.getLastModifiedOn().equals(this.getLastModifiedOn()) == false) return false; if (other.getLastRun() == null ^ this.getLastRun() == null) return false; if (other.getLastRun() != null && other.getLastRun().equals(this.getLastRun()) == false) return false; if (other.getGraph() == null ^ this.getGraph() == null) return false; if (other.getGraph() != null && other.getGraph().equals(this.getGraph()) == false) return false; if (other.getMaxConcurrentRuns() == null ^ this.getMaxConcurrentRuns() == null) return false; if (other.getMaxConcurrentRuns() != null && other.getMaxConcurrentRuns().equals(this.getMaxConcurrentRuns()) == false) return false; if (other.getBlueprintDetails() == null ^ this.getBlueprintDetails() == null) return false; if (other.getBlueprintDetails() != null && other.getBlueprintDetails().equals(this.getBlueprintDetails()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getDefaultRunProperties() == null) ? 0 : getDefaultRunProperties().hashCode()); hashCode = prime * hashCode + ((getCreatedOn() == null) ? 0 : getCreatedOn().hashCode()); hashCode = prime * hashCode + ((getLastModifiedOn() == null) ? 0 : getLastModifiedOn().hashCode()); hashCode = prime * hashCode + ((getLastRun() == null) ? 0 : getLastRun().hashCode()); hashCode = prime * hashCode + ((getGraph() == null) ? 0 : getGraph().hashCode()); hashCode = prime * hashCode + ((getMaxConcurrentRuns() == null) ? 0 : getMaxConcurrentRuns().hashCode()); hashCode = prime * hashCode + ((getBlueprintDetails() == null) ? 0 : getBlueprintDetails().hashCode()); return hashCode; } @Override public Workflow clone() { try { return (Workflow) 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.glue.model.transform.WorkflowMarshaller.getInstance().marshall(this, protocolMarshaller); } }