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

#pragma once
#include <aws/clouddirectory/CloudDirectoryRequest.h>
#include <aws/clouddirectory/CloudDirectory_EXPORTS.h>
#include <aws/clouddirectory/model/ObjectReference.h>
#include <aws/core/utils/memory/stl/AWSString.h>

#include <utility>

namespace Aws {
namespace CloudDirectory {
namespace Model {

/**
 */
class AttachToIndexRequest : public CloudDirectoryRequest {
 public:
  AWS_CLOUDDIRECTORY_API AttachToIndexRequest() = default;

  // Service request name is the Operation name which will send this request out,
  // each operation should has unique request name, so that we can get operation's name from this request.
  // Note: this is not true for response, multiple operations may have the same response name,
  // so we can not get operation's name from response.
  inline virtual const char* GetServiceRequestName() const override { return "AttachToIndex"; }

  AWS_CLOUDDIRECTORY_API Aws::String SerializePayload() const override;

  AWS_CLOUDDIRECTORY_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;

  ///@{
  /**
   * <p>The Amazon Resource Name (ARN) of the directory where the object and index
   * exist.</p>
   */
  inline const Aws::String& GetDirectoryArn() const { return m_directoryArn; }
  inline bool DirectoryArnHasBeenSet() const { return m_directoryArnHasBeenSet; }
  template <typename DirectoryArnT = Aws::String>
  void SetDirectoryArn(DirectoryArnT&& value) {
    m_directoryArnHasBeenSet = true;
    m_directoryArn = std::forward<DirectoryArnT>(value);
  }
  template <typename DirectoryArnT = Aws::String>
  AttachToIndexRequest& WithDirectoryArn(DirectoryArnT&& value) {
    SetDirectoryArn(std::forward<DirectoryArnT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>A reference to the index that you are attaching the object to.</p>
   */
  inline const ObjectReference& GetIndexReference() const { return m_indexReference; }
  inline bool IndexReferenceHasBeenSet() const { return m_indexReferenceHasBeenSet; }
  template <typename IndexReferenceT = ObjectReference>
  void SetIndexReference(IndexReferenceT&& value) {
    m_indexReferenceHasBeenSet = true;
    m_indexReference = std::forward<IndexReferenceT>(value);
  }
  template <typename IndexReferenceT = ObjectReference>
  AttachToIndexRequest& WithIndexReference(IndexReferenceT&& value) {
    SetIndexReference(std::forward<IndexReferenceT>(value));
    return *this;
  }
  ///@}

  ///@{
  /**
   * <p>A reference to the object that you are attaching to the index.</p>
   */
  inline const ObjectReference& GetTargetReference() const { return m_targetReference; }
  inline bool TargetReferenceHasBeenSet() const { return m_targetReferenceHasBeenSet; }
  template <typename TargetReferenceT = ObjectReference>
  void SetTargetReference(TargetReferenceT&& value) {
    m_targetReferenceHasBeenSet = true;
    m_targetReference = std::forward<TargetReferenceT>(value);
  }
  template <typename TargetReferenceT = ObjectReference>
  AttachToIndexRequest& WithTargetReference(TargetReferenceT&& value) {
    SetTargetReference(std::forward<TargetReferenceT>(value));
    return *this;
  }
  ///@}
 private:
  Aws::String m_directoryArn;

  ObjectReference m_indexReference;

  ObjectReference m_targetReference;
  bool m_directoryArnHasBeenSet = false;
  bool m_indexReferenceHasBeenSet = false;
  bool m_targetReferenceHasBeenSet = false;
};

}  // namespace Model
}  // namespace CloudDirectory
}  // namespace Aws
