/** * 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 Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace AppSync { namespace Model { /** *

Describes a resolver.

See Also:

AWS * API Reference

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

The resolver type name.

*/ inline const Aws::String& GetTypeName() const{ return m_typeName; } /** *

The resolver type name.

*/ inline bool TypeNameHasBeenSet() const { return m_typeNameHasBeenSet; } /** *

The resolver type name.

*/ inline void SetTypeName(const Aws::String& value) { m_typeNameHasBeenSet = true; m_typeName = value; } /** *

The resolver type name.

*/ inline void SetTypeName(Aws::String&& value) { m_typeNameHasBeenSet = true; m_typeName = std::move(value); } /** *

The resolver type name.

*/ inline void SetTypeName(const char* value) { m_typeNameHasBeenSet = true; m_typeName.assign(value); } /** *

The resolver type name.

*/ inline Resolver& WithTypeName(const Aws::String& value) { SetTypeName(value); return *this;} /** *

The resolver type name.

*/ inline Resolver& WithTypeName(Aws::String&& value) { SetTypeName(std::move(value)); return *this;} /** *

The resolver type name.

*/ inline Resolver& WithTypeName(const char* value) { SetTypeName(value); return *this;} /** *

The resolver field name.

*/ inline const Aws::String& GetFieldName() const{ return m_fieldName; } /** *

The resolver field name.

*/ inline bool FieldNameHasBeenSet() const { return m_fieldNameHasBeenSet; } /** *

The resolver field name.

*/ inline void SetFieldName(const Aws::String& value) { m_fieldNameHasBeenSet = true; m_fieldName = value; } /** *

The resolver field name.

*/ inline void SetFieldName(Aws::String&& value) { m_fieldNameHasBeenSet = true; m_fieldName = std::move(value); } /** *

The resolver field name.

*/ inline void SetFieldName(const char* value) { m_fieldNameHasBeenSet = true; m_fieldName.assign(value); } /** *

The resolver field name.

*/ inline Resolver& WithFieldName(const Aws::String& value) { SetFieldName(value); return *this;} /** *

The resolver field name.

*/ inline Resolver& WithFieldName(Aws::String&& value) { SetFieldName(std::move(value)); return *this;} /** *

The resolver field name.

*/ inline Resolver& WithFieldName(const char* value) { SetFieldName(value); return *this;} /** *

The resolver data source name.

*/ inline const Aws::String& GetDataSourceName() const{ return m_dataSourceName; } /** *

The resolver data source name.

*/ inline bool DataSourceNameHasBeenSet() const { return m_dataSourceNameHasBeenSet; } /** *

The resolver data source name.

*/ inline void SetDataSourceName(const Aws::String& value) { m_dataSourceNameHasBeenSet = true; m_dataSourceName = value; } /** *

The resolver data source name.

*/ inline void SetDataSourceName(Aws::String&& value) { m_dataSourceNameHasBeenSet = true; m_dataSourceName = std::move(value); } /** *

The resolver data source name.

*/ inline void SetDataSourceName(const char* value) { m_dataSourceNameHasBeenSet = true; m_dataSourceName.assign(value); } /** *

The resolver data source name.

*/ inline Resolver& WithDataSourceName(const Aws::String& value) { SetDataSourceName(value); return *this;} /** *

The resolver data source name.

*/ inline Resolver& WithDataSourceName(Aws::String&& value) { SetDataSourceName(std::move(value)); return *this;} /** *

The resolver data source name.

*/ inline Resolver& WithDataSourceName(const char* value) { SetDataSourceName(value); return *this;} /** *

The resolver Amazon Resource Name (ARN).

*/ inline const Aws::String& GetResolverArn() const{ return m_resolverArn; } /** *

The resolver Amazon Resource Name (ARN).

*/ inline bool ResolverArnHasBeenSet() const { return m_resolverArnHasBeenSet; } /** *

The resolver Amazon Resource Name (ARN).

*/ inline void SetResolverArn(const Aws::String& value) { m_resolverArnHasBeenSet = true; m_resolverArn = value; } /** *

The resolver Amazon Resource Name (ARN).

*/ inline void SetResolverArn(Aws::String&& value) { m_resolverArnHasBeenSet = true; m_resolverArn = std::move(value); } /** *

The resolver Amazon Resource Name (ARN).

*/ inline void SetResolverArn(const char* value) { m_resolverArnHasBeenSet = true; m_resolverArn.assign(value); } /** *

The resolver Amazon Resource Name (ARN).

*/ inline Resolver& WithResolverArn(const Aws::String& value) { SetResolverArn(value); return *this;} /** *

The resolver Amazon Resource Name (ARN).

*/ inline Resolver& WithResolverArn(Aws::String&& value) { SetResolverArn(std::move(value)); return *this;} /** *

The resolver Amazon Resource Name (ARN).

*/ inline Resolver& WithResolverArn(const char* value) { SetResolverArn(value); return *this;} /** *

The request mapping template.

*/ inline const Aws::String& GetRequestMappingTemplate() const{ return m_requestMappingTemplate; } /** *

The request mapping template.

*/ inline bool RequestMappingTemplateHasBeenSet() const { return m_requestMappingTemplateHasBeenSet; } /** *

The request mapping template.

*/ inline void SetRequestMappingTemplate(const Aws::String& value) { m_requestMappingTemplateHasBeenSet = true; m_requestMappingTemplate = value; } /** *

The request mapping template.

*/ inline void SetRequestMappingTemplate(Aws::String&& value) { m_requestMappingTemplateHasBeenSet = true; m_requestMappingTemplate = std::move(value); } /** *

The request mapping template.

*/ inline void SetRequestMappingTemplate(const char* value) { m_requestMappingTemplateHasBeenSet = true; m_requestMappingTemplate.assign(value); } /** *

The request mapping template.

*/ inline Resolver& WithRequestMappingTemplate(const Aws::String& value) { SetRequestMappingTemplate(value); return *this;} /** *

The request mapping template.

*/ inline Resolver& WithRequestMappingTemplate(Aws::String&& value) { SetRequestMappingTemplate(std::move(value)); return *this;} /** *

The request mapping template.

*/ inline Resolver& WithRequestMappingTemplate(const char* value) { SetRequestMappingTemplate(value); return *this;} /** *

The response mapping template.

*/ inline const Aws::String& GetResponseMappingTemplate() const{ return m_responseMappingTemplate; } /** *

The response mapping template.

*/ inline bool ResponseMappingTemplateHasBeenSet() const { return m_responseMappingTemplateHasBeenSet; } /** *

The response mapping template.

*/ inline void SetResponseMappingTemplate(const Aws::String& value) { m_responseMappingTemplateHasBeenSet = true; m_responseMappingTemplate = value; } /** *

The response mapping template.

*/ inline void SetResponseMappingTemplate(Aws::String&& value) { m_responseMappingTemplateHasBeenSet = true; m_responseMappingTemplate = std::move(value); } /** *

The response mapping template.

*/ inline void SetResponseMappingTemplate(const char* value) { m_responseMappingTemplateHasBeenSet = true; m_responseMappingTemplate.assign(value); } /** *

The response mapping template.

*/ inline Resolver& WithResponseMappingTemplate(const Aws::String& value) { SetResponseMappingTemplate(value); return *this;} /** *

The response mapping template.

*/ inline Resolver& WithResponseMappingTemplate(Aws::String&& value) { SetResponseMappingTemplate(std::move(value)); return *this;} /** *

The response mapping template.

*/ inline Resolver& WithResponseMappingTemplate(const char* value) { SetResponseMappingTemplate(value); return *this;} /** *

The resolver type.

  • UNIT: A UNIT resolver type. A * UNIT resolver is the default resolver type. You can use a UNIT resolver to run a * GraphQL query against a single data source.

  • PIPELINE: * A PIPELINE resolver type. You can use a PIPELINE resolver to invoke a series of * Function objects in a serial manner. You can use a pipeline * resolver to run a GraphQL query against multiple data sources.

*/ inline const ResolverKind& GetKind() const{ return m_kind; } /** *

The resolver type.

  • UNIT: A UNIT resolver type. A * UNIT resolver is the default resolver type. You can use a UNIT resolver to run a * GraphQL query against a single data source.

  • PIPELINE: * A PIPELINE resolver type. You can use a PIPELINE resolver to invoke a series of * Function objects in a serial manner. You can use a pipeline * resolver to run a GraphQL query against multiple data sources.

*/ inline bool KindHasBeenSet() const { return m_kindHasBeenSet; } /** *

The resolver type.

  • UNIT: A UNIT resolver type. A * UNIT resolver is the default resolver type. You can use a UNIT resolver to run a * GraphQL query against a single data source.

  • PIPELINE: * A PIPELINE resolver type. You can use a PIPELINE resolver to invoke a series of * Function objects in a serial manner. You can use a pipeline * resolver to run a GraphQL query against multiple data sources.

*/ inline void SetKind(const ResolverKind& value) { m_kindHasBeenSet = true; m_kind = value; } /** *

The resolver type.

  • UNIT: A UNIT resolver type. A * UNIT resolver is the default resolver type. You can use a UNIT resolver to run a * GraphQL query against a single data source.

  • PIPELINE: * A PIPELINE resolver type. You can use a PIPELINE resolver to invoke a series of * Function objects in a serial manner. You can use a pipeline * resolver to run a GraphQL query against multiple data sources.

*/ inline void SetKind(ResolverKind&& value) { m_kindHasBeenSet = true; m_kind = std::move(value); } /** *

The resolver type.

  • UNIT: A UNIT resolver type. A * UNIT resolver is the default resolver type. You can use a UNIT resolver to run a * GraphQL query against a single data source.

  • PIPELINE: * A PIPELINE resolver type. You can use a PIPELINE resolver to invoke a series of * Function objects in a serial manner. You can use a pipeline * resolver to run a GraphQL query against multiple data sources.

*/ inline Resolver& WithKind(const ResolverKind& value) { SetKind(value); return *this;} /** *

The resolver type.

  • UNIT: A UNIT resolver type. A * UNIT resolver is the default resolver type. You can use a UNIT resolver to run a * GraphQL query against a single data source.

  • PIPELINE: * A PIPELINE resolver type. You can use a PIPELINE resolver to invoke a series of * Function objects in a serial manner. You can use a pipeline * resolver to run a GraphQL query against multiple data sources.

*/ inline Resolver& WithKind(ResolverKind&& value) { SetKind(std::move(value)); return *this;} /** *

The PipelineConfig.

*/ inline const PipelineConfig& GetPipelineConfig() const{ return m_pipelineConfig; } /** *

The PipelineConfig.

*/ inline bool PipelineConfigHasBeenSet() const { return m_pipelineConfigHasBeenSet; } /** *

The PipelineConfig.

*/ inline void SetPipelineConfig(const PipelineConfig& value) { m_pipelineConfigHasBeenSet = true; m_pipelineConfig = value; } /** *

The PipelineConfig.

*/ inline void SetPipelineConfig(PipelineConfig&& value) { m_pipelineConfigHasBeenSet = true; m_pipelineConfig = std::move(value); } /** *

The PipelineConfig.

*/ inline Resolver& WithPipelineConfig(const PipelineConfig& value) { SetPipelineConfig(value); return *this;} /** *

The PipelineConfig.

*/ inline Resolver& WithPipelineConfig(PipelineConfig&& value) { SetPipelineConfig(std::move(value)); return *this;} /** *

The SyncConfig for a resolver attached to a versioned data * source.

*/ inline const SyncConfig& GetSyncConfig() const{ return m_syncConfig; } /** *

The SyncConfig for a resolver attached to a versioned data * source.

*/ inline bool SyncConfigHasBeenSet() const { return m_syncConfigHasBeenSet; } /** *

The SyncConfig for a resolver attached to a versioned data * source.

*/ inline void SetSyncConfig(const SyncConfig& value) { m_syncConfigHasBeenSet = true; m_syncConfig = value; } /** *

The SyncConfig for a resolver attached to a versioned data * source.

*/ inline void SetSyncConfig(SyncConfig&& value) { m_syncConfigHasBeenSet = true; m_syncConfig = std::move(value); } /** *

The SyncConfig for a resolver attached to a versioned data * source.

*/ inline Resolver& WithSyncConfig(const SyncConfig& value) { SetSyncConfig(value); return *this;} /** *

The SyncConfig for a resolver attached to a versioned data * source.

*/ inline Resolver& WithSyncConfig(SyncConfig&& value) { SetSyncConfig(std::move(value)); return *this;} /** *

The caching configuration for the resolver.

*/ inline const CachingConfig& GetCachingConfig() const{ return m_cachingConfig; } /** *

The caching configuration for the resolver.

*/ inline bool CachingConfigHasBeenSet() const { return m_cachingConfigHasBeenSet; } /** *

The caching configuration for the resolver.

*/ inline void SetCachingConfig(const CachingConfig& value) { m_cachingConfigHasBeenSet = true; m_cachingConfig = value; } /** *

The caching configuration for the resolver.

*/ inline void SetCachingConfig(CachingConfig&& value) { m_cachingConfigHasBeenSet = true; m_cachingConfig = std::move(value); } /** *

The caching configuration for the resolver.

*/ inline Resolver& WithCachingConfig(const CachingConfig& value) { SetCachingConfig(value); return *this;} /** *

The caching configuration for the resolver.

*/ inline Resolver& WithCachingConfig(CachingConfig&& value) { SetCachingConfig(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 Resolver& 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 Resolver& WithRuntime(const AppSyncRuntime& value) { SetRuntime(value); return *this;} inline Resolver& WithRuntime(AppSyncRuntime&& value) { SetRuntime(std::move(value)); return *this;} /** *

The resolver 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 resolver 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 resolver 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 resolver 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 resolver 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 resolver code that contains the request and response * functions. When code is used, the runtime is required. The * runtime value must be APPSYNC_JS.

*/ inline Resolver& WithCode(const Aws::String& value) { SetCode(value); return *this;} /** *

The resolver code that contains the request and response * functions. When code is used, the runtime is required. The * runtime value must be APPSYNC_JS.

*/ inline Resolver& WithCode(Aws::String&& value) { SetCode(std::move(value)); return *this;} /** *

The resolver code that contains the request and response * functions. When code is used, the runtime is required. The * runtime value must be APPSYNC_JS.

*/ inline Resolver& WithCode(const char* value) { SetCode(value); return *this;} private: Aws::String m_typeName; bool m_typeNameHasBeenSet = false; Aws::String m_fieldName; bool m_fieldNameHasBeenSet = false; Aws::String m_dataSourceName; bool m_dataSourceNameHasBeenSet = false; Aws::String m_resolverArn; bool m_resolverArnHasBeenSet = false; Aws::String m_requestMappingTemplate; bool m_requestMappingTemplateHasBeenSet = false; Aws::String m_responseMappingTemplate; bool m_responseMappingTemplateHasBeenSet = false; ResolverKind m_kind; bool m_kindHasBeenSet = false; PipelineConfig m_pipelineConfig; bool m_pipelineConfigHasBeenSet = false; SyncConfig m_syncConfig; bool m_syncConfigHasBeenSet = false; CachingConfig m_cachingConfig; bool m_cachingConfigHasBeenSet = 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