/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace APIGateway { namespace Model { /** * A single patch operation to apply to the specified resource. Please refer to * http://tools.ietf.org/html/rfc6902#section-4 for an explanation of how each * operation is used.

See Also:

AWS * API Reference

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

An update operation to be performed with this PATCH request. The valid value * can be add, remove, replace or * copy. Not all valid operations are supported for a given resource. * Support of the operations depends on specific operational contexts. Attempts to * apply an unsupported operation on a resource will return an error message.

*/ inline const Op& GetOp() const{ return m_op; } /** *

An update operation to be performed with this PATCH request. The valid value * can be add, remove, replace or * copy. Not all valid operations are supported for a given resource. * Support of the operations depends on specific operational contexts. Attempts to * apply an unsupported operation on a resource will return an error message.

*/ inline bool OpHasBeenSet() const { return m_opHasBeenSet; } /** *

An update operation to be performed with this PATCH request. The valid value * can be add, remove, replace or * copy. Not all valid operations are supported for a given resource. * Support of the operations depends on specific operational contexts. Attempts to * apply an unsupported operation on a resource will return an error message.

*/ inline void SetOp(const Op& value) { m_opHasBeenSet = true; m_op = value; } /** *

An update operation to be performed with this PATCH request. The valid value * can be add, remove, replace or * copy. Not all valid operations are supported for a given resource. * Support of the operations depends on specific operational contexts. Attempts to * apply an unsupported operation on a resource will return an error message.

*/ inline void SetOp(Op&& value) { m_opHasBeenSet = true; m_op = std::move(value); } /** *

An update operation to be performed with this PATCH request. The valid value * can be add, remove, replace or * copy. Not all valid operations are supported for a given resource. * Support of the operations depends on specific operational contexts. Attempts to * apply an unsupported operation on a resource will return an error message.

*/ inline PatchOperation& WithOp(const Op& value) { SetOp(value); return *this;} /** *

An update operation to be performed with this PATCH request. The valid value * can be add, remove, replace or * copy. Not all valid operations are supported for a given resource. * Support of the operations depends on specific operational contexts. Attempts to * apply an unsupported operation on a resource will return an error message.

*/ inline PatchOperation& WithOp(Op&& value) { SetOp(std::move(value)); return *this;} /** *

The op operation's target, as identified by a JSON * Pointer value that references a location within the targeted resource. For * example, if the target resource has an updateable property of * {"name":"value"}, the path for this property is /name. * If the name property value is a JSON object (e.g., {"name": * {"child/name": "child-value"}}), the path for the child/name * property will be /name/child~1name. Any slash ("/") character * appearing in path names must be escaped with "~1", as shown in the example * above. Each op operation can have only one path * associated with it.

*/ inline const Aws::String& GetPath() const{ return m_path; } /** *

The op operation's target, as identified by a JSON * Pointer value that references a location within the targeted resource. For * example, if the target resource has an updateable property of * {"name":"value"}, the path for this property is /name. * If the name property value is a JSON object (e.g., {"name": * {"child/name": "child-value"}}), the path for the child/name * property will be /name/child~1name. Any slash ("/") character * appearing in path names must be escaped with "~1", as shown in the example * above. Each op operation can have only one path * associated with it.

*/ inline bool PathHasBeenSet() const { return m_pathHasBeenSet; } /** *

The op operation's target, as identified by a JSON * Pointer value that references a location within the targeted resource. For * example, if the target resource has an updateable property of * {"name":"value"}, the path for this property is /name. * If the name property value is a JSON object (e.g., {"name": * {"child/name": "child-value"}}), the path for the child/name * property will be /name/child~1name. Any slash ("/") character * appearing in path names must be escaped with "~1", as shown in the example * above. Each op operation can have only one path * associated with it.

*/ inline void SetPath(const Aws::String& value) { m_pathHasBeenSet = true; m_path = value; } /** *

The op operation's target, as identified by a JSON * Pointer value that references a location within the targeted resource. For * example, if the target resource has an updateable property of * {"name":"value"}, the path for this property is /name. * If the name property value is a JSON object (e.g., {"name": * {"child/name": "child-value"}}), the path for the child/name * property will be /name/child~1name. Any slash ("/") character * appearing in path names must be escaped with "~1", as shown in the example * above. Each op operation can have only one path * associated with it.

*/ inline void SetPath(Aws::String&& value) { m_pathHasBeenSet = true; m_path = std::move(value); } /** *

The op operation's target, as identified by a JSON * Pointer value that references a location within the targeted resource. For * example, if the target resource has an updateable property of * {"name":"value"}, the path for this property is /name. * If the name property value is a JSON object (e.g., {"name": * {"child/name": "child-value"}}), the path for the child/name * property will be /name/child~1name. Any slash ("/") character * appearing in path names must be escaped with "~1", as shown in the example * above. Each op operation can have only one path * associated with it.

*/ inline void SetPath(const char* value) { m_pathHasBeenSet = true; m_path.assign(value); } /** *

The op operation's target, as identified by a JSON * Pointer value that references a location within the targeted resource. For * example, if the target resource has an updateable property of * {"name":"value"}, the path for this property is /name. * If the name property value is a JSON object (e.g., {"name": * {"child/name": "child-value"}}), the path for the child/name * property will be /name/child~1name. Any slash ("/") character * appearing in path names must be escaped with "~1", as shown in the example * above. Each op operation can have only one path * associated with it.

*/ inline PatchOperation& WithPath(const Aws::String& value) { SetPath(value); return *this;} /** *

The op operation's target, as identified by a JSON * Pointer value that references a location within the targeted resource. For * example, if the target resource has an updateable property of * {"name":"value"}, the path for this property is /name. * If the name property value is a JSON object (e.g., {"name": * {"child/name": "child-value"}}), the path for the child/name * property will be /name/child~1name. Any slash ("/") character * appearing in path names must be escaped with "~1", as shown in the example * above. Each op operation can have only one path * associated with it.

*/ inline PatchOperation& WithPath(Aws::String&& value) { SetPath(std::move(value)); return *this;} /** *

The op operation's target, as identified by a JSON * Pointer value that references a location within the targeted resource. For * example, if the target resource has an updateable property of * {"name":"value"}, the path for this property is /name. * If the name property value is a JSON object (e.g., {"name": * {"child/name": "child-value"}}), the path for the child/name * property will be /name/child~1name. Any slash ("/") character * appearing in path names must be escaped with "~1", as shown in the example * above. Each op operation can have only one path * associated with it.

*/ inline PatchOperation& WithPath(const char* value) { SetPath(value); return *this;} /** *

The new target value of the update operation. It is applicable for the * add or replace operation. When using AWS CLI to update * a property of a JSON value, enclose the JSON object with a pair of single quotes * in a Linux shell, e.g., '{"a": ...}'. In a Windows shell, see Using * JSON for Parameters.

*/ inline const Aws::String& GetValue() const{ return m_value; } /** *

The new target value of the update operation. It is applicable for the * add or replace operation. When using AWS CLI to update * a property of a JSON value, enclose the JSON object with a pair of single quotes * in a Linux shell, e.g., '{"a": ...}'. In a Windows shell, see Using * JSON for Parameters.

*/ inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; } /** *

The new target value of the update operation. It is applicable for the * add or replace operation. When using AWS CLI to update * a property of a JSON value, enclose the JSON object with a pair of single quotes * in a Linux shell, e.g., '{"a": ...}'. In a Windows shell, see Using * JSON for Parameters.

*/ inline void SetValue(const Aws::String& value) { m_valueHasBeenSet = true; m_value = value; } /** *

The new target value of the update operation. It is applicable for the * add or replace operation. When using AWS CLI to update * a property of a JSON value, enclose the JSON object with a pair of single quotes * in a Linux shell, e.g., '{"a": ...}'. In a Windows shell, see Using * JSON for Parameters.

*/ inline void SetValue(Aws::String&& value) { m_valueHasBeenSet = true; m_value = std::move(value); } /** *

The new target value of the update operation. It is applicable for the * add or replace operation. When using AWS CLI to update * a property of a JSON value, enclose the JSON object with a pair of single quotes * in a Linux shell, e.g., '{"a": ...}'. In a Windows shell, see Using * JSON for Parameters.

*/ inline void SetValue(const char* value) { m_valueHasBeenSet = true; m_value.assign(value); } /** *

The new target value of the update operation. It is applicable for the * add or replace operation. When using AWS CLI to update * a property of a JSON value, enclose the JSON object with a pair of single quotes * in a Linux shell, e.g., '{"a": ...}'. In a Windows shell, see Using * JSON for Parameters.

*/ inline PatchOperation& WithValue(const Aws::String& value) { SetValue(value); return *this;} /** *

The new target value of the update operation. It is applicable for the * add or replace operation. When using AWS CLI to update * a property of a JSON value, enclose the JSON object with a pair of single quotes * in a Linux shell, e.g., '{"a": ...}'. In a Windows shell, see Using * JSON for Parameters.

*/ inline PatchOperation& WithValue(Aws::String&& value) { SetValue(std::move(value)); return *this;} /** *

The new target value of the update operation. It is applicable for the * add or replace operation. When using AWS CLI to update * a property of a JSON value, enclose the JSON object with a pair of single quotes * in a Linux shell, e.g., '{"a": ...}'. In a Windows shell, see Using * JSON for Parameters.

*/ inline PatchOperation& WithValue(const char* value) { SetValue(value); return *this;} /** *

The copy update operation's source as identified by a * JSON-Pointer value referencing the location within the targeted * resource to copy the value from. For example, to promote a canary deployment, * you copy the canary deployment ID to the affiliated deployment ID by calling a * PATCH request on a Stage resource with "op":"copy", * "from":"/canarySettings/deploymentId" and * "path":"/deploymentId".

*/ inline const Aws::String& GetFrom() const{ return m_from; } /** *

The copy update operation's source as identified by a * JSON-Pointer value referencing the location within the targeted * resource to copy the value from. For example, to promote a canary deployment, * you copy the canary deployment ID to the affiliated deployment ID by calling a * PATCH request on a Stage resource with "op":"copy", * "from":"/canarySettings/deploymentId" and * "path":"/deploymentId".

*/ inline bool FromHasBeenSet() const { return m_fromHasBeenSet; } /** *

The copy update operation's source as identified by a * JSON-Pointer value referencing the location within the targeted * resource to copy the value from. For example, to promote a canary deployment, * you copy the canary deployment ID to the affiliated deployment ID by calling a * PATCH request on a Stage resource with "op":"copy", * "from":"/canarySettings/deploymentId" and * "path":"/deploymentId".

*/ inline void SetFrom(const Aws::String& value) { m_fromHasBeenSet = true; m_from = value; } /** *

The copy update operation's source as identified by a * JSON-Pointer value referencing the location within the targeted * resource to copy the value from. For example, to promote a canary deployment, * you copy the canary deployment ID to the affiliated deployment ID by calling a * PATCH request on a Stage resource with "op":"copy", * "from":"/canarySettings/deploymentId" and * "path":"/deploymentId".

*/ inline void SetFrom(Aws::String&& value) { m_fromHasBeenSet = true; m_from = std::move(value); } /** *

The copy update operation's source as identified by a * JSON-Pointer value referencing the location within the targeted * resource to copy the value from. For example, to promote a canary deployment, * you copy the canary deployment ID to the affiliated deployment ID by calling a * PATCH request on a Stage resource with "op":"copy", * "from":"/canarySettings/deploymentId" and * "path":"/deploymentId".

*/ inline void SetFrom(const char* value) { m_fromHasBeenSet = true; m_from.assign(value); } /** *

The copy update operation's source as identified by a * JSON-Pointer value referencing the location within the targeted * resource to copy the value from. For example, to promote a canary deployment, * you copy the canary deployment ID to the affiliated deployment ID by calling a * PATCH request on a Stage resource with "op":"copy", * "from":"/canarySettings/deploymentId" and * "path":"/deploymentId".

*/ inline PatchOperation& WithFrom(const Aws::String& value) { SetFrom(value); return *this;} /** *

The copy update operation's source as identified by a * JSON-Pointer value referencing the location within the targeted * resource to copy the value from. For example, to promote a canary deployment, * you copy the canary deployment ID to the affiliated deployment ID by calling a * PATCH request on a Stage resource with "op":"copy", * "from":"/canarySettings/deploymentId" and * "path":"/deploymentId".

*/ inline PatchOperation& WithFrom(Aws::String&& value) { SetFrom(std::move(value)); return *this;} /** *

The copy update operation's source as identified by a * JSON-Pointer value referencing the location within the targeted * resource to copy the value from. For example, to promote a canary deployment, * you copy the canary deployment ID to the affiliated deployment ID by calling a * PATCH request on a Stage resource with "op":"copy", * "from":"/canarySettings/deploymentId" and * "path":"/deploymentId".

*/ inline PatchOperation& WithFrom(const char* value) { SetFrom(value); return *this;} private: Op m_op; bool m_opHasBeenSet; Aws::String m_path; bool m_pathHasBeenSet; Aws::String m_value; bool m_valueHasBeenSet; Aws::String m_from; bool m_fromHasBeenSet; }; } // namespace Model } // namespace APIGateway } // namespace Aws