/**
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * SPDX-License-Identifier: Apache-2.0.
 */

#pragma once
#include <aws/awstransfer/Transfer_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>

#include <utility>

namespace Aws {
namespace Utils {
namespace Json {
class JsonValue;
class JsonView;
}  // namespace Json
}  // namespace Utils
namespace Transfer {
namespace Model {

/**
 * <p>Specifies the workflow ID for the workflow to assign and the execution role
 * that's used for executing the workflow.</p> <p>In addition to a workflow to
 * execute when a file is uploaded completely, <code>WorkflowDetails</code> can
 * also contain a workflow ID (and execution role) for a workflow to execute on
 * partial upload. A partial upload occurs when the server session disconnects
 * while the file is still being uploaded.</p><p><h3>See Also:</h3>   <a
 * href="http://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/WorkflowDetail">AWS
 * API Reference</a></p>
 */
class WorkflowDetail {
 public:
  AWS_TRANSFER_API WorkflowDetail() = default;
  AWS_TRANSFER_API WorkflowDetail(Aws::Utils::Json::JsonView jsonValue);
  AWS_TRANSFER_API WorkflowDetail& operator=(Aws::Utils::Json::JsonView jsonValue);
  AWS_TRANSFER_API Aws::Utils::Json::JsonValue Jsonize() const;

  ///@{
  /**
   * <p>A unique identifier for the workflow.</p>
   */
  inline const Aws::String& GetWorkflowId() const { return m_workflowId; }
  inline bool WorkflowIdHasBeenSet() const { return m_workflowIdHasBeenSet; }
  template <typename WorkflowIdT = Aws::String>
  void SetWorkflowId(WorkflowIdT&& value) {
    m_workflowIdHasBeenSet = true;
    m_workflowId = std::forward<WorkflowIdT>(value);
  }
  template <typename WorkflowIdT = Aws::String>
  WorkflowDetail& WithWorkflowId(WorkflowIdT&& value) {
    SetWorkflowId(std::forward<WorkflowIdT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>Includes the necessary permissions for S3, EFS, and Lambda operations that
   * Transfer can assume, so that all workflow steps can operate on the required
   * resources</p>
   */
  inline const Aws::String& GetExecutionRole() const { return m_executionRole; }
  inline bool ExecutionRoleHasBeenSet() const { return m_executionRoleHasBeenSet; }
  template <typename ExecutionRoleT = Aws::String>
  void SetExecutionRole(ExecutionRoleT&& value) {
    m_executionRoleHasBeenSet = true;
    m_executionRole = std::forward<ExecutionRoleT>(value);
  }
  template <typename ExecutionRoleT = Aws::String>
  WorkflowDetail& WithExecutionRole(ExecutionRoleT&& value) {
    SetExecutionRole(std::forward<ExecutionRoleT>(value));
    return *this;
  }
  ///@}
 private:
  Aws::String m_workflowId;

  Aws::String m_executionRole;
  bool m_workflowIdHasBeenSet = false;
  bool m_executionRoleHasBeenSet = false;
};

}  // namespace Model
}  // namespace Transfer
}  // namespace Aws
