/** * 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 AppSync { namespace Model { /** */ class EvaluateCodeRequest : public AppSyncRequest { public: AWS_APPSYNC_API EvaluateCodeRequest(); // 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 "EvaluateCode"; } AWS_APPSYNC_API Aws::String SerializePayload() const override; /** *

The runtime to be used when evaluating the code. Currently, only the * APPSYNC_JS runtime is supported.

*/ inline const AppSyncRuntime& GetRuntime() const{ return m_runtime; } /** *

The runtime to be used when evaluating the code. Currently, only the * APPSYNC_JS runtime is supported.

*/ inline bool RuntimeHasBeenSet() const { return m_runtimeHasBeenSet; } /** *

The runtime to be used when evaluating the code. Currently, only the * APPSYNC_JS runtime is supported.

*/ inline void SetRuntime(const AppSyncRuntime& value) { m_runtimeHasBeenSet = true; m_runtime = value; } /** *

The runtime to be used when evaluating the code. Currently, only the * APPSYNC_JS runtime is supported.

*/ inline void SetRuntime(AppSyncRuntime&& value) { m_runtimeHasBeenSet = true; m_runtime = std::move(value); } /** *

The runtime to be used when evaluating the code. Currently, only the * APPSYNC_JS runtime is supported.

*/ inline EvaluateCodeRequest& WithRuntime(const AppSyncRuntime& value) { SetRuntime(value); return *this;} /** *

The runtime to be used when evaluating the code. Currently, only the * APPSYNC_JS runtime is supported.

*/ inline EvaluateCodeRequest& WithRuntime(AppSyncRuntime&& value) { SetRuntime(std::move(value)); return *this;} /** *

The code definition to be evaluated. Note that code and * runtime are both required for this action. The runtime * value must be APPSYNC_JS.

*/ inline const Aws::String& GetCode() const{ return m_code; } /** *

The code definition to be evaluated. Note that code and * runtime are both required for this action. The runtime * value must be APPSYNC_JS.

*/ inline bool CodeHasBeenSet() const { return m_codeHasBeenSet; } /** *

The code definition to be evaluated. Note that code and * runtime are both required for this action. The runtime * value must be APPSYNC_JS.

*/ inline void SetCode(const Aws::String& value) { m_codeHasBeenSet = true; m_code = value; } /** *

The code definition to be evaluated. Note that code and * runtime are both required for this action. The runtime * value must be APPSYNC_JS.

*/ inline void SetCode(Aws::String&& value) { m_codeHasBeenSet = true; m_code = std::move(value); } /** *

The code definition to be evaluated. Note that code and * runtime are both required for this action. The runtime * value must be APPSYNC_JS.

*/ inline void SetCode(const char* value) { m_codeHasBeenSet = true; m_code.assign(value); } /** *

The code definition to be evaluated. Note that code and * runtime are both required for this action. The runtime * value must be APPSYNC_JS.

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

The code definition to be evaluated. Note that code and * runtime are both required for this action. The runtime * value must be APPSYNC_JS.

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

The code definition to be evaluated. Note that code and * runtime are both required for this action. The runtime * value must be APPSYNC_JS.

*/ inline EvaluateCodeRequest& WithCode(const char* value) { SetCode(value); return *this;} /** *

The map that holds all of the contextual information for your resolver * invocation. A context is required for this action.

*/ inline const Aws::String& GetContext() const{ return m_context; } /** *

The map that holds all of the contextual information for your resolver * invocation. A context is required for this action.

*/ inline bool ContextHasBeenSet() const { return m_contextHasBeenSet; } /** *

The map that holds all of the contextual information for your resolver * invocation. A context is required for this action.

*/ inline void SetContext(const Aws::String& value) { m_contextHasBeenSet = true; m_context = value; } /** *

The map that holds all of the contextual information for your resolver * invocation. A context is required for this action.

*/ inline void SetContext(Aws::String&& value) { m_contextHasBeenSet = true; m_context = std::move(value); } /** *

The map that holds all of the contextual information for your resolver * invocation. A context is required for this action.

*/ inline void SetContext(const char* value) { m_contextHasBeenSet = true; m_context.assign(value); } /** *

The map that holds all of the contextual information for your resolver * invocation. A context is required for this action.

*/ inline EvaluateCodeRequest& WithContext(const Aws::String& value) { SetContext(value); return *this;} /** *

The map that holds all of the contextual information for your resolver * invocation. A context is required for this action.

*/ inline EvaluateCodeRequest& WithContext(Aws::String&& value) { SetContext(std::move(value)); return *this;} /** *

The map that holds all of the contextual information for your resolver * invocation. A context is required for this action.

*/ inline EvaluateCodeRequest& WithContext(const char* value) { SetContext(value); return *this;} /** *

The function within the code to be evaluated. If provided, the valid values * are request and response.

*/ inline const Aws::String& GetFunction() const{ return m_function; } /** *

The function within the code to be evaluated. If provided, the valid values * are request and response.

*/ inline bool FunctionHasBeenSet() const { return m_functionHasBeenSet; } /** *

The function within the code to be evaluated. If provided, the valid values * are request and response.

*/ inline void SetFunction(const Aws::String& value) { m_functionHasBeenSet = true; m_function = value; } /** *

The function within the code to be evaluated. If provided, the valid values * are request and response.

*/ inline void SetFunction(Aws::String&& value) { m_functionHasBeenSet = true; m_function = std::move(value); } /** *

The function within the code to be evaluated. If provided, the valid values * are request and response.

*/ inline void SetFunction(const char* value) { m_functionHasBeenSet = true; m_function.assign(value); } /** *

The function within the code to be evaluated. If provided, the valid values * are request and response.

*/ inline EvaluateCodeRequest& WithFunction(const Aws::String& value) { SetFunction(value); return *this;} /** *

The function within the code to be evaluated. If provided, the valid values * are request and response.

*/ inline EvaluateCodeRequest& WithFunction(Aws::String&& value) { SetFunction(std::move(value)); return *this;} /** *

The function within the code to be evaluated. If provided, the valid values * are request and response.

*/ inline EvaluateCodeRequest& WithFunction(const char* value) { SetFunction(value); return *this;} private: AppSyncRuntime m_runtime; bool m_runtimeHasBeenSet = false; Aws::String m_code; bool m_codeHasBeenSet = false; Aws::String m_context; bool m_contextHasBeenSet = false; Aws::String m_function; bool m_functionHasBeenSet = false; }; } // namespace Model } // namespace AppSync } // namespace Aws