/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace IoT { namespace Model { /** *

Describes an action that writes data to an Amazon OpenSearch Service * domain.

The Elasticsearch action can only be used by * existing rule actions. To create a new rule action or to update an existing rule * action, use the OpenSearch rule action instead. For more * information, see OpenSearchAction.

*

See Also:

AWS * API Reference

*/ class ElasticsearchAction { public: AWS_IOT_API ElasticsearchAction(); AWS_IOT_API ElasticsearchAction(Aws::Utils::Json::JsonView jsonValue); AWS_IOT_API ElasticsearchAction& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_IOT_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The IAM role ARN that has access to OpenSearch.

*/ inline const Aws::String& GetRoleArn() const{ return m_roleArn; } /** *

The IAM role ARN that has access to OpenSearch.

*/ inline bool RoleArnHasBeenSet() const { return m_roleArnHasBeenSet; } /** *

The IAM role ARN that has access to OpenSearch.

*/ inline void SetRoleArn(const Aws::String& value) { m_roleArnHasBeenSet = true; m_roleArn = value; } /** *

The IAM role ARN that has access to OpenSearch.

*/ inline void SetRoleArn(Aws::String&& value) { m_roleArnHasBeenSet = true; m_roleArn = std::move(value); } /** *

The IAM role ARN that has access to OpenSearch.

*/ inline void SetRoleArn(const char* value) { m_roleArnHasBeenSet = true; m_roleArn.assign(value); } /** *

The IAM role ARN that has access to OpenSearch.

*/ inline ElasticsearchAction& WithRoleArn(const Aws::String& value) { SetRoleArn(value); return *this;} /** *

The IAM role ARN that has access to OpenSearch.

*/ inline ElasticsearchAction& WithRoleArn(Aws::String&& value) { SetRoleArn(std::move(value)); return *this;} /** *

The IAM role ARN that has access to OpenSearch.

*/ inline ElasticsearchAction& WithRoleArn(const char* value) { SetRoleArn(value); return *this;} /** *

The endpoint of your OpenSearch domain.

*/ inline const Aws::String& GetEndpoint() const{ return m_endpoint; } /** *

The endpoint of your OpenSearch domain.

*/ inline bool EndpointHasBeenSet() const { return m_endpointHasBeenSet; } /** *

The endpoint of your OpenSearch domain.

*/ inline void SetEndpoint(const Aws::String& value) { m_endpointHasBeenSet = true; m_endpoint = value; } /** *

The endpoint of your OpenSearch domain.

*/ inline void SetEndpoint(Aws::String&& value) { m_endpointHasBeenSet = true; m_endpoint = std::move(value); } /** *

The endpoint of your OpenSearch domain.

*/ inline void SetEndpoint(const char* value) { m_endpointHasBeenSet = true; m_endpoint.assign(value); } /** *

The endpoint of your OpenSearch domain.

*/ inline ElasticsearchAction& WithEndpoint(const Aws::String& value) { SetEndpoint(value); return *this;} /** *

The endpoint of your OpenSearch domain.

*/ inline ElasticsearchAction& WithEndpoint(Aws::String&& value) { SetEndpoint(std::move(value)); return *this;} /** *

The endpoint of your OpenSearch domain.

*/ inline ElasticsearchAction& WithEndpoint(const char* value) { SetEndpoint(value); return *this;} /** *

The index where you want to store your data.

*/ inline const Aws::String& GetIndex() const{ return m_index; } /** *

The index where you want to store your data.

*/ inline bool IndexHasBeenSet() const { return m_indexHasBeenSet; } /** *

The index where you want to store your data.

*/ inline void SetIndex(const Aws::String& value) { m_indexHasBeenSet = true; m_index = value; } /** *

The index where you want to store your data.

*/ inline void SetIndex(Aws::String&& value) { m_indexHasBeenSet = true; m_index = std::move(value); } /** *

The index where you want to store your data.

*/ inline void SetIndex(const char* value) { m_indexHasBeenSet = true; m_index.assign(value); } /** *

The index where you want to store your data.

*/ inline ElasticsearchAction& WithIndex(const Aws::String& value) { SetIndex(value); return *this;} /** *

The index where you want to store your data.

*/ inline ElasticsearchAction& WithIndex(Aws::String&& value) { SetIndex(std::move(value)); return *this;} /** *

The index where you want to store your data.

*/ inline ElasticsearchAction& WithIndex(const char* value) { SetIndex(value); return *this;} /** *

The type of document you are storing.

*/ inline const Aws::String& GetType() const{ return m_type; } /** *

The type of document you are storing.

*/ inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } /** *

The type of document you are storing.

*/ inline void SetType(const Aws::String& value) { m_typeHasBeenSet = true; m_type = value; } /** *

The type of document you are storing.

*/ inline void SetType(Aws::String&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } /** *

The type of document you are storing.

*/ inline void SetType(const char* value) { m_typeHasBeenSet = true; m_type.assign(value); } /** *

The type of document you are storing.

*/ inline ElasticsearchAction& WithType(const Aws::String& value) { SetType(value); return *this;} /** *

The type of document you are storing.

*/ inline ElasticsearchAction& WithType(Aws::String&& value) { SetType(std::move(value)); return *this;} /** *

The type of document you are storing.

*/ inline ElasticsearchAction& WithType(const char* value) { SetType(value); return *this;} /** *

The unique identifier for the document you are storing.

*/ inline const Aws::String& GetId() const{ return m_id; } /** *

The unique identifier for the document you are storing.

*/ inline bool IdHasBeenSet() const { return m_idHasBeenSet; } /** *

The unique identifier for the document you are storing.

*/ inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; } /** *

The unique identifier for the document you are storing.

*/ inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); } /** *

The unique identifier for the document you are storing.

*/ inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); } /** *

The unique identifier for the document you are storing.

*/ inline ElasticsearchAction& WithId(const Aws::String& value) { SetId(value); return *this;} /** *

The unique identifier for the document you are storing.

*/ inline ElasticsearchAction& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;} /** *

The unique identifier for the document you are storing.

*/ inline ElasticsearchAction& WithId(const char* value) { SetId(value); return *this;} private: Aws::String m_roleArn; bool m_roleArnHasBeenSet = false; Aws::String m_endpoint; bool m_endpointHasBeenSet = false; Aws::String m_index; bool m_indexHasBeenSet = false; Aws::String m_type; bool m_typeHasBeenSet = false; Aws::String m_id; bool m_idHasBeenSet = false; }; } // namespace Model } // namespace IoT } // namespace Aws