/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include
#include
#include
#include
#include
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace AppSync
{
namespace Model
{
/**
* A function is a reusable entity. You can use multiple functions to compose
* the resolver logic.
See Also:
AWS
* API Reference
*/
class FunctionConfiguration
{
public:
AWS_APPSYNC_API FunctionConfiguration();
AWS_APPSYNC_API FunctionConfiguration(Aws::Utils::Json::JsonView jsonValue);
AWS_APPSYNC_API FunctionConfiguration& operator=(Aws::Utils::Json::JsonView jsonValue);
AWS_APPSYNC_API Aws::Utils::Json::JsonValue Jsonize() const;
/**
* A unique ID representing the Function
object.
*/
inline const Aws::String& GetFunctionId() const{ return m_functionId; }
/**
* A unique ID representing the Function
object.
*/
inline bool FunctionIdHasBeenSet() const { return m_functionIdHasBeenSet; }
/**
* A unique ID representing the Function
object.
*/
inline void SetFunctionId(const Aws::String& value) { m_functionIdHasBeenSet = true; m_functionId = value; }
/**
* A unique ID representing the Function
object.
*/
inline void SetFunctionId(Aws::String&& value) { m_functionIdHasBeenSet = true; m_functionId = std::move(value); }
/**
* A unique ID representing the Function
object.
*/
inline void SetFunctionId(const char* value) { m_functionIdHasBeenSet = true; m_functionId.assign(value); }
/**
* A unique ID representing the Function
object.
*/
inline FunctionConfiguration& WithFunctionId(const Aws::String& value) { SetFunctionId(value); return *this;}
/**
* A unique ID representing the Function
object.
*/
inline FunctionConfiguration& WithFunctionId(Aws::String&& value) { SetFunctionId(std::move(value)); return *this;}
/**
* A unique ID representing the Function
object.
*/
inline FunctionConfiguration& WithFunctionId(const char* value) { SetFunctionId(value); return *this;}
/**
* The Amazon Resource Name (ARN) of the Function
object.
*/
inline const Aws::String& GetFunctionArn() const{ return m_functionArn; }
/**
* The Amazon Resource Name (ARN) of the Function
object.
*/
inline bool FunctionArnHasBeenSet() const { return m_functionArnHasBeenSet; }
/**
* The Amazon Resource Name (ARN) of the Function
object.
*/
inline void SetFunctionArn(const Aws::String& value) { m_functionArnHasBeenSet = true; m_functionArn = value; }
/**
* The Amazon Resource Name (ARN) of the Function
object.
*/
inline void SetFunctionArn(Aws::String&& value) { m_functionArnHasBeenSet = true; m_functionArn = std::move(value); }
/**
* The Amazon Resource Name (ARN) of the Function
object.
*/
inline void SetFunctionArn(const char* value) { m_functionArnHasBeenSet = true; m_functionArn.assign(value); }
/**
* The Amazon Resource Name (ARN) of the Function
object.
*/
inline FunctionConfiguration& WithFunctionArn(const Aws::String& value) { SetFunctionArn(value); return *this;}
/**
* The Amazon Resource Name (ARN) of the Function
object.
*/
inline FunctionConfiguration& WithFunctionArn(Aws::String&& value) { SetFunctionArn(std::move(value)); return *this;}
/**
* The Amazon Resource Name (ARN) of the Function
object.
*/
inline FunctionConfiguration& WithFunctionArn(const char* value) { SetFunctionArn(value); return *this;}
/**
* The name of the Function
object.
*/
inline const Aws::String& GetName() const{ return m_name; }
/**
* The name of the Function
object.
*/
inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
/**
* The name of the Function
object.
*/
inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
/**
* The name of the Function
object.
*/
inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
/**
* The name of the Function
object.
*/
inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
/**
* The name of the Function
object.
*/
inline FunctionConfiguration& WithName(const Aws::String& value) { SetName(value); return *this;}
/**
* The name of the Function
object.
*/
inline FunctionConfiguration& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
/**
* The name of the Function
object.
*/
inline FunctionConfiguration& WithName(const char* value) { SetName(value); return *this;}
/**
* The Function
description.
*/
inline const Aws::String& GetDescription() const{ return m_description; }
/**
* The Function
description.
*/
inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
/**
* The Function
description.
*/
inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; }
/**
* The Function
description.
*/
inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); }
/**
* The Function
description.
*/
inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); }
/**
* The Function
description.
*/
inline FunctionConfiguration& WithDescription(const Aws::String& value) { SetDescription(value); return *this;}
/**
* The Function
description.
*/
inline FunctionConfiguration& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;}
/**
* The Function
description.
*/
inline FunctionConfiguration& WithDescription(const char* value) { SetDescription(value); return *this;}
/**
* The name of the DataSource
.
*/
inline const Aws::String& GetDataSourceName() const{ return m_dataSourceName; }
/**
* The name of the DataSource
.
*/
inline bool DataSourceNameHasBeenSet() const { return m_dataSourceNameHasBeenSet; }
/**
* The name of the DataSource
.
*/
inline void SetDataSourceName(const Aws::String& value) { m_dataSourceNameHasBeenSet = true; m_dataSourceName = value; }
/**
* The name of the DataSource
.
*/
inline void SetDataSourceName(Aws::String&& value) { m_dataSourceNameHasBeenSet = true; m_dataSourceName = std::move(value); }
/**
* The name of the DataSource
.
*/
inline void SetDataSourceName(const char* value) { m_dataSourceNameHasBeenSet = true; m_dataSourceName.assign(value); }
/**
* The name of the DataSource
.
*/
inline FunctionConfiguration& WithDataSourceName(const Aws::String& value) { SetDataSourceName(value); return *this;}
/**
* The name of the DataSource
.
*/
inline FunctionConfiguration& WithDataSourceName(Aws::String&& value) { SetDataSourceName(std::move(value)); return *this;}
/**
* The name of the DataSource
.
*/
inline FunctionConfiguration& WithDataSourceName(const char* value) { SetDataSourceName(value); return *this;}
/**
* The Function
request mapping template. Functions support only
* the 2018-05-29 version of the request mapping template.
*/
inline const Aws::String& GetRequestMappingTemplate() const{ return m_requestMappingTemplate; }
/**
* The Function
request mapping template. Functions support only
* the 2018-05-29 version of the request mapping template.
*/
inline bool RequestMappingTemplateHasBeenSet() const { return m_requestMappingTemplateHasBeenSet; }
/**
* The Function
request mapping template. Functions support only
* the 2018-05-29 version of the request mapping template.
*/
inline void SetRequestMappingTemplate(const Aws::String& value) { m_requestMappingTemplateHasBeenSet = true; m_requestMappingTemplate = value; }
/**
* The Function
request mapping template. Functions support only
* the 2018-05-29 version of the request mapping template.
*/
inline void SetRequestMappingTemplate(Aws::String&& value) { m_requestMappingTemplateHasBeenSet = true; m_requestMappingTemplate = std::move(value); }
/**
* The Function
request mapping template. Functions support only
* the 2018-05-29 version of the request mapping template.
*/
inline void SetRequestMappingTemplate(const char* value) { m_requestMappingTemplateHasBeenSet = true; m_requestMappingTemplate.assign(value); }
/**
* The Function
request mapping template. Functions support only
* the 2018-05-29 version of the request mapping template.
*/
inline FunctionConfiguration& WithRequestMappingTemplate(const Aws::String& value) { SetRequestMappingTemplate(value); return *this;}
/**
* The Function
request mapping template. Functions support only
* the 2018-05-29 version of the request mapping template.
*/
inline FunctionConfiguration& WithRequestMappingTemplate(Aws::String&& value) { SetRequestMappingTemplate(std::move(value)); return *this;}
/**
* The Function
request mapping template. Functions support only
* the 2018-05-29 version of the request mapping template.
*/
inline FunctionConfiguration& WithRequestMappingTemplate(const char* value) { SetRequestMappingTemplate(value); return *this;}
/**
* The Function
response mapping template.
*/
inline const Aws::String& GetResponseMappingTemplate() const{ return m_responseMappingTemplate; }
/**
* The Function
response mapping template.
*/
inline bool ResponseMappingTemplateHasBeenSet() const { return m_responseMappingTemplateHasBeenSet; }
/**
* The Function
response mapping template.
*/
inline void SetResponseMappingTemplate(const Aws::String& value) { m_responseMappingTemplateHasBeenSet = true; m_responseMappingTemplate = value; }
/**
* The Function
response mapping template.
*/
inline void SetResponseMappingTemplate(Aws::String&& value) { m_responseMappingTemplateHasBeenSet = true; m_responseMappingTemplate = std::move(value); }
/**
* The Function
response mapping template.
*/
inline void SetResponseMappingTemplate(const char* value) { m_responseMappingTemplateHasBeenSet = true; m_responseMappingTemplate.assign(value); }
/**
* The Function
response mapping template.
*/
inline FunctionConfiguration& WithResponseMappingTemplate(const Aws::String& value) { SetResponseMappingTemplate(value); return *this;}
/**
* The Function
response mapping template.
*/
inline FunctionConfiguration& WithResponseMappingTemplate(Aws::String&& value) { SetResponseMappingTemplate(std::move(value)); return *this;}
/**
* The Function
response mapping template.
*/
inline FunctionConfiguration& WithResponseMappingTemplate(const char* value) { SetResponseMappingTemplate(value); return *this;}
/**
* The version of the request mapping template. Currently, only the 2018-05-29
* version of the template is supported.
*/
inline const Aws::String& GetFunctionVersion() const{ return m_functionVersion; }
/**
* The version of the request mapping template. Currently, only the 2018-05-29
* version of the template is supported.
*/
inline bool FunctionVersionHasBeenSet() const { return m_functionVersionHasBeenSet; }
/**
* The version of the request mapping template. Currently, only the 2018-05-29
* version of the template is supported.
*/
inline void SetFunctionVersion(const Aws::String& value) { m_functionVersionHasBeenSet = true; m_functionVersion = value; }
/**
* The version of the request mapping template. Currently, only the 2018-05-29
* version of the template is supported.
*/
inline void SetFunctionVersion(Aws::String&& value) { m_functionVersionHasBeenSet = true; m_functionVersion = std::move(value); }
/**
* The version of the request mapping template. Currently, only the 2018-05-29
* version of the template is supported.
*/
inline void SetFunctionVersion(const char* value) { m_functionVersionHasBeenSet = true; m_functionVersion.assign(value); }
/**
* The version of the request mapping template. Currently, only the 2018-05-29
* version of the template is supported.
*/
inline FunctionConfiguration& WithFunctionVersion(const Aws::String& value) { SetFunctionVersion(value); return *this;}
/**
* The version of the request mapping template. Currently, only the 2018-05-29
* version of the template is supported.
*/
inline FunctionConfiguration& WithFunctionVersion(Aws::String&& value) { SetFunctionVersion(std::move(value)); return *this;}
/**
* The version of the request mapping template. Currently, only the 2018-05-29
* version of the template is supported.
*/
inline FunctionConfiguration& WithFunctionVersion(const char* value) { SetFunctionVersion(value); return *this;}
inline const SyncConfig& GetSyncConfig() const{ return m_syncConfig; }
inline bool SyncConfigHasBeenSet() const { return m_syncConfigHasBeenSet; }
inline void SetSyncConfig(const SyncConfig& value) { m_syncConfigHasBeenSet = true; m_syncConfig = value; }
inline void SetSyncConfig(SyncConfig&& value) { m_syncConfigHasBeenSet = true; m_syncConfig = std::move(value); }
inline FunctionConfiguration& WithSyncConfig(const SyncConfig& value) { SetSyncConfig(value); return *this;}
inline FunctionConfiguration& WithSyncConfig(SyncConfig&& value) { SetSyncConfig(std::move(value)); return *this;}
/**
* The maximum batching size for a resolver.
*/
inline int GetMaxBatchSize() const{ return m_maxBatchSize; }
/**
* The maximum batching size for a resolver.
*/
inline bool MaxBatchSizeHasBeenSet() const { return m_maxBatchSizeHasBeenSet; }
/**
* The maximum batching size for a resolver.
*/
inline void SetMaxBatchSize(int value) { m_maxBatchSizeHasBeenSet = true; m_maxBatchSize = value; }
/**
* The maximum batching size for a resolver.
*/
inline FunctionConfiguration& WithMaxBatchSize(int value) { SetMaxBatchSize(value); return *this;}
inline const AppSyncRuntime& GetRuntime() const{ return m_runtime; }
inline bool RuntimeHasBeenSet() const { return m_runtimeHasBeenSet; }
inline void SetRuntime(const AppSyncRuntime& value) { m_runtimeHasBeenSet = true; m_runtime = value; }
inline void SetRuntime(AppSyncRuntime&& value) { m_runtimeHasBeenSet = true; m_runtime = std::move(value); }
inline FunctionConfiguration& WithRuntime(const AppSyncRuntime& value) { SetRuntime(value); return *this;}
inline FunctionConfiguration& WithRuntime(AppSyncRuntime&& value) { SetRuntime(std::move(value)); return *this;}
/**
* The function
code that contains the request and response
* functions. When code is used, the runtime
is required. The
* runtime
value must be APPSYNC_JS
.
*/
inline const Aws::String& GetCode() const{ return m_code; }
/**
* The function
code that contains the request and response
* functions. When code is used, the runtime
is required. The
* runtime
value must be APPSYNC_JS
.
*/
inline bool CodeHasBeenSet() const { return m_codeHasBeenSet; }
/**
* The function
code that contains the request and response
* functions. When code is used, the runtime
is required. The
* runtime
value must be APPSYNC_JS
.
*/
inline void SetCode(const Aws::String& value) { m_codeHasBeenSet = true; m_code = value; }
/**
* The function
code that contains the request and response
* functions. When code is used, the runtime
is required. The
* runtime
value must be APPSYNC_JS
.
*/
inline void SetCode(Aws::String&& value) { m_codeHasBeenSet = true; m_code = std::move(value); }
/**
* The function
code that contains the request and response
* functions. When code is used, the runtime
is required. The
* runtime
value must be APPSYNC_JS
.
*/
inline void SetCode(const char* value) { m_codeHasBeenSet = true; m_code.assign(value); }
/**
* The function
code that contains the request and response
* functions. When code is used, the runtime
is required. The
* runtime
value must be APPSYNC_JS
.
*/
inline FunctionConfiguration& WithCode(const Aws::String& value) { SetCode(value); return *this;}
/**
* The function
code that contains the request and response
* functions. When code is used, the runtime
is required. The
* runtime
value must be APPSYNC_JS
.
*/
inline FunctionConfiguration& WithCode(Aws::String&& value) { SetCode(std::move(value)); return *this;}
/**
* The function
code that contains the request and response
* functions. When code is used, the runtime
is required. The
* runtime
value must be APPSYNC_JS
.
*/
inline FunctionConfiguration& WithCode(const char* value) { SetCode(value); return *this;}
private:
Aws::String m_functionId;
bool m_functionIdHasBeenSet = false;
Aws::String m_functionArn;
bool m_functionArnHasBeenSet = false;
Aws::String m_name;
bool m_nameHasBeenSet = false;
Aws::String m_description;
bool m_descriptionHasBeenSet = false;
Aws::String m_dataSourceName;
bool m_dataSourceNameHasBeenSet = false;
Aws::String m_requestMappingTemplate;
bool m_requestMappingTemplateHasBeenSet = false;
Aws::String m_responseMappingTemplate;
bool m_responseMappingTemplateHasBeenSet = false;
Aws::String m_functionVersion;
bool m_functionVersionHasBeenSet = false;
SyncConfig m_syncConfig;
bool m_syncConfigHasBeenSet = false;
int m_maxBatchSize;
bool m_maxBatchSizeHasBeenSet = false;
AppSyncRuntime m_runtime;
bool m_runtimeHasBeenSet = false;
Aws::String m_code;
bool m_codeHasBeenSet = false;
};
} // namespace Model
} // namespace AppSync
} // namespace Aws