/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include namespace Aws { namespace kendra { namespace Model { /** */ class AWS_KENDRA_API CreateDataSourceRequest : public KendraRequest { public: CreateDataSourceRequest(); // 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 "CreateDataSource"; } Aws::String SerializePayload() const override; Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

A unique name for the data source. A data source name can't be changed * without deleting and recreating the data source.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

A unique name for the data source. A data source name can't be changed * without deleting and recreating the data source.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

A unique name for the data source. A data source name can't be changed * without deleting and recreating the data source.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

A unique name for the data source. A data source name can't be changed * without deleting and recreating the data source.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

A unique name for the data source. A data source name can't be changed * without deleting and recreating the data source.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

A unique name for the data source. A data source name can't be changed * without deleting and recreating the data source.

*/ inline CreateDataSourceRequest& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

A unique name for the data source. A data source name can't be changed * without deleting and recreating the data source.

*/ inline CreateDataSourceRequest& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

A unique name for the data source. A data source name can't be changed * without deleting and recreating the data source.

*/ inline CreateDataSourceRequest& WithName(const char* value) { SetName(value); return *this;} /** *

The identifier of the index that should be associated with this data * source.

*/ inline const Aws::String& GetIndexId() const{ return m_indexId; } /** *

The identifier of the index that should be associated with this data * source.

*/ inline bool IndexIdHasBeenSet() const { return m_indexIdHasBeenSet; } /** *

The identifier of the index that should be associated with this data * source.

*/ inline void SetIndexId(const Aws::String& value) { m_indexIdHasBeenSet = true; m_indexId = value; } /** *

The identifier of the index that should be associated with this data * source.

*/ inline void SetIndexId(Aws::String&& value) { m_indexIdHasBeenSet = true; m_indexId = std::move(value); } /** *

The identifier of the index that should be associated with this data * source.

*/ inline void SetIndexId(const char* value) { m_indexIdHasBeenSet = true; m_indexId.assign(value); } /** *

The identifier of the index that should be associated with this data * source.

*/ inline CreateDataSourceRequest& WithIndexId(const Aws::String& value) { SetIndexId(value); return *this;} /** *

The identifier of the index that should be associated with this data * source.

*/ inline CreateDataSourceRequest& WithIndexId(Aws::String&& value) { SetIndexId(std::move(value)); return *this;} /** *

The identifier of the index that should be associated with this data * source.

*/ inline CreateDataSourceRequest& WithIndexId(const char* value) { SetIndexId(value); return *this;} /** *

The type of repository that contains the data source.

*/ inline const DataSourceType& GetType() const{ return m_type; } /** *

The type of repository that contains the data source.

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

The type of repository that contains the data source.

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

The type of repository that contains the data source.

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

The type of repository that contains the data source.

*/ inline CreateDataSourceRequest& WithType(const DataSourceType& value) { SetType(value); return *this;} /** *

The type of repository that contains the data source.

*/ inline CreateDataSourceRequest& WithType(DataSourceType&& value) { SetType(std::move(value)); return *this;} /** *

The connector configuration information that is required to access the * repository.

*/ inline const DataSourceConfiguration& GetConfiguration() const{ return m_configuration; } /** *

The connector configuration information that is required to access the * repository.

*/ inline bool ConfigurationHasBeenSet() const { return m_configurationHasBeenSet; } /** *

The connector configuration information that is required to access the * repository.

*/ inline void SetConfiguration(const DataSourceConfiguration& value) { m_configurationHasBeenSet = true; m_configuration = value; } /** *

The connector configuration information that is required to access the * repository.

*/ inline void SetConfiguration(DataSourceConfiguration&& value) { m_configurationHasBeenSet = true; m_configuration = std::move(value); } /** *

The connector configuration information that is required to access the * repository.

*/ inline CreateDataSourceRequest& WithConfiguration(const DataSourceConfiguration& value) { SetConfiguration(value); return *this;} /** *

The connector configuration information that is required to access the * repository.

*/ inline CreateDataSourceRequest& WithConfiguration(DataSourceConfiguration&& value) { SetConfiguration(std::move(value)); return *this;} /** *

A description for the data source.

*/ inline const Aws::String& GetDescription() const{ return m_description; } /** *

A description for the data source.

*/ inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; } /** *

A description for the data source.

*/ inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; } /** *

A description for the data source.

*/ inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); } /** *

A description for the data source.

*/ inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); } /** *

A description for the data source.

*/ inline CreateDataSourceRequest& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} /** *

A description for the data source.

*/ inline CreateDataSourceRequest& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;} /** *

A description for the data source.

*/ inline CreateDataSourceRequest& WithDescription(const char* value) { SetDescription(value); return *this;} /** *

Sets the frequency that Amazon Kendra will check the documents in your * repository and update the index. If you don't set a schedule Amazon Kendra will * not periodically update the index. You can call the * StartDataSourceSyncJob operation to update the index.

*/ inline const Aws::String& GetSchedule() const{ return m_schedule; } /** *

Sets the frequency that Amazon Kendra will check the documents in your * repository and update the index. If you don't set a schedule Amazon Kendra will * not periodically update the index. You can call the * StartDataSourceSyncJob operation to update the index.

*/ inline bool ScheduleHasBeenSet() const { return m_scheduleHasBeenSet; } /** *

Sets the frequency that Amazon Kendra will check the documents in your * repository and update the index. If you don't set a schedule Amazon Kendra will * not periodically update the index. You can call the * StartDataSourceSyncJob operation to update the index.

*/ inline void SetSchedule(const Aws::String& value) { m_scheduleHasBeenSet = true; m_schedule = value; } /** *

Sets the frequency that Amazon Kendra will check the documents in your * repository and update the index. If you don't set a schedule Amazon Kendra will * not periodically update the index. You can call the * StartDataSourceSyncJob operation to update the index.

*/ inline void SetSchedule(Aws::String&& value) { m_scheduleHasBeenSet = true; m_schedule = std::move(value); } /** *

Sets the frequency that Amazon Kendra will check the documents in your * repository and update the index. If you don't set a schedule Amazon Kendra will * not periodically update the index. You can call the * StartDataSourceSyncJob operation to update the index.

*/ inline void SetSchedule(const char* value) { m_scheduleHasBeenSet = true; m_schedule.assign(value); } /** *

Sets the frequency that Amazon Kendra will check the documents in your * repository and update the index. If you don't set a schedule Amazon Kendra will * not periodically update the index. You can call the * StartDataSourceSyncJob operation to update the index.

*/ inline CreateDataSourceRequest& WithSchedule(const Aws::String& value) { SetSchedule(value); return *this;} /** *

Sets the frequency that Amazon Kendra will check the documents in your * repository and update the index. If you don't set a schedule Amazon Kendra will * not periodically update the index. You can call the * StartDataSourceSyncJob operation to update the index.

*/ inline CreateDataSourceRequest& WithSchedule(Aws::String&& value) { SetSchedule(std::move(value)); return *this;} /** *

Sets the frequency that Amazon Kendra will check the documents in your * repository and update the index. If you don't set a schedule Amazon Kendra will * not periodically update the index. You can call the * StartDataSourceSyncJob operation to update the index.

*/ inline CreateDataSourceRequest& WithSchedule(const char* value) { SetSchedule(value); return *this;} /** *

The Amazon Resource Name (ARN) of a role with permission to access the data * source. For more information, see IAM Roles for * Amazon Kendra.

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

The Amazon Resource Name (ARN) of a role with permission to access the data * source. For more information, see IAM Roles for * Amazon Kendra.

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

The Amazon Resource Name (ARN) of a role with permission to access the data * source. For more information, see IAM Roles for * Amazon Kendra.

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

The Amazon Resource Name (ARN) of a role with permission to access the data * source. For more information, see IAM Roles for * Amazon Kendra.

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

The Amazon Resource Name (ARN) of a role with permission to access the data * source. For more information, see IAM Roles for * Amazon Kendra.

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

The Amazon Resource Name (ARN) of a role with permission to access the data * source. For more information, see IAM Roles for * Amazon Kendra.

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

The Amazon Resource Name (ARN) of a role with permission to access the data * source. For more information, see IAM Roles for * Amazon Kendra.

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

The Amazon Resource Name (ARN) of a role with permission to access the data * source. For more information, see IAM Roles for * Amazon Kendra.

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

A list of key-value pairs that identify the data source. You can use the tags * to identify and organize your resources and to control access to resources.

*/ inline const Aws::Vector& GetTags() const{ return m_tags; } /** *

A list of key-value pairs that identify the data source. You can use the tags * to identify and organize your resources and to control access to resources.

*/ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *

A list of key-value pairs that identify the data source. You can use the tags * to identify and organize your resources and to control access to resources.

*/ inline void SetTags(const Aws::Vector& value) { m_tagsHasBeenSet = true; m_tags = value; } /** *

A list of key-value pairs that identify the data source. You can use the tags * to identify and organize your resources and to control access to resources.

*/ inline void SetTags(Aws::Vector&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** *

A list of key-value pairs that identify the data source. You can use the tags * to identify and organize your resources and to control access to resources.

*/ inline CreateDataSourceRequest& WithTags(const Aws::Vector& value) { SetTags(value); return *this;} /** *

A list of key-value pairs that identify the data source. You can use the tags * to identify and organize your resources and to control access to resources.

*/ inline CreateDataSourceRequest& WithTags(Aws::Vector&& value) { SetTags(std::move(value)); return *this;} /** *

A list of key-value pairs that identify the data source. You can use the tags * to identify and organize your resources and to control access to resources.

*/ inline CreateDataSourceRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } /** *

A list of key-value pairs that identify the data source. You can use the tags * to identify and organize your resources and to control access to resources.

*/ inline CreateDataSourceRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } private: Aws::String m_name; bool m_nameHasBeenSet; Aws::String m_indexId; bool m_indexIdHasBeenSet; DataSourceType m_type; bool m_typeHasBeenSet; DataSourceConfiguration m_configuration; bool m_configurationHasBeenSet; Aws::String m_description; bool m_descriptionHasBeenSet; Aws::String m_schedule; bool m_scheduleHasBeenSet; Aws::String m_roleArn; bool m_roleArnHasBeenSet; Aws::Vector m_tags; bool m_tagsHasBeenSet; }; } // namespace Model } // namespace kendra } // namespace Aws