/** * 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 Glue { namespace Model { /** *

Specifies the mapping of data property keys.

See Also:

AWS API * Reference

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

After the apply mapping, what the name of the column should be. Can be the * same as FromPath.

*/ inline const Aws::String& GetToKey() const{ return m_toKey; } /** *

After the apply mapping, what the name of the column should be. Can be the * same as FromPath.

*/ inline bool ToKeyHasBeenSet() const { return m_toKeyHasBeenSet; } /** *

After the apply mapping, what the name of the column should be. Can be the * same as FromPath.

*/ inline void SetToKey(const Aws::String& value) { m_toKeyHasBeenSet = true; m_toKey = value; } /** *

After the apply mapping, what the name of the column should be. Can be the * same as FromPath.

*/ inline void SetToKey(Aws::String&& value) { m_toKeyHasBeenSet = true; m_toKey = std::move(value); } /** *

After the apply mapping, what the name of the column should be. Can be the * same as FromPath.

*/ inline void SetToKey(const char* value) { m_toKeyHasBeenSet = true; m_toKey.assign(value); } /** *

After the apply mapping, what the name of the column should be. Can be the * same as FromPath.

*/ inline Mapping& WithToKey(const Aws::String& value) { SetToKey(value); return *this;} /** *

After the apply mapping, what the name of the column should be. Can be the * same as FromPath.

*/ inline Mapping& WithToKey(Aws::String&& value) { SetToKey(std::move(value)); return *this;} /** *

After the apply mapping, what the name of the column should be. Can be the * same as FromPath.

*/ inline Mapping& WithToKey(const char* value) { SetToKey(value); return *this;} /** *

The table or column to be modified.

*/ inline const Aws::Vector& GetFromPath() const{ return m_fromPath; } /** *

The table or column to be modified.

*/ inline bool FromPathHasBeenSet() const { return m_fromPathHasBeenSet; } /** *

The table or column to be modified.

*/ inline void SetFromPath(const Aws::Vector& value) { m_fromPathHasBeenSet = true; m_fromPath = value; } /** *

The table or column to be modified.

*/ inline void SetFromPath(Aws::Vector&& value) { m_fromPathHasBeenSet = true; m_fromPath = std::move(value); } /** *

The table or column to be modified.

*/ inline Mapping& WithFromPath(const Aws::Vector& value) { SetFromPath(value); return *this;} /** *

The table or column to be modified.

*/ inline Mapping& WithFromPath(Aws::Vector&& value) { SetFromPath(std::move(value)); return *this;} /** *

The table or column to be modified.

*/ inline Mapping& AddFromPath(const Aws::String& value) { m_fromPathHasBeenSet = true; m_fromPath.push_back(value); return *this; } /** *

The table or column to be modified.

*/ inline Mapping& AddFromPath(Aws::String&& value) { m_fromPathHasBeenSet = true; m_fromPath.push_back(std::move(value)); return *this; } /** *

The table or column to be modified.

*/ inline Mapping& AddFromPath(const char* value) { m_fromPathHasBeenSet = true; m_fromPath.push_back(value); return *this; } /** *

The type of the data to be modified.

*/ inline const Aws::String& GetFromType() const{ return m_fromType; } /** *

The type of the data to be modified.

*/ inline bool FromTypeHasBeenSet() const { return m_fromTypeHasBeenSet; } /** *

The type of the data to be modified.

*/ inline void SetFromType(const Aws::String& value) { m_fromTypeHasBeenSet = true; m_fromType = value; } /** *

The type of the data to be modified.

*/ inline void SetFromType(Aws::String&& value) { m_fromTypeHasBeenSet = true; m_fromType = std::move(value); } /** *

The type of the data to be modified.

*/ inline void SetFromType(const char* value) { m_fromTypeHasBeenSet = true; m_fromType.assign(value); } /** *

The type of the data to be modified.

*/ inline Mapping& WithFromType(const Aws::String& value) { SetFromType(value); return *this;} /** *

The type of the data to be modified.

*/ inline Mapping& WithFromType(Aws::String&& value) { SetFromType(std::move(value)); return *this;} /** *

The type of the data to be modified.

*/ inline Mapping& WithFromType(const char* value) { SetFromType(value); return *this;} /** *

The data type that the data is to be modified to.

*/ inline const Aws::String& GetToType() const{ return m_toType; } /** *

The data type that the data is to be modified to.

*/ inline bool ToTypeHasBeenSet() const { return m_toTypeHasBeenSet; } /** *

The data type that the data is to be modified to.

*/ inline void SetToType(const Aws::String& value) { m_toTypeHasBeenSet = true; m_toType = value; } /** *

The data type that the data is to be modified to.

*/ inline void SetToType(Aws::String&& value) { m_toTypeHasBeenSet = true; m_toType = std::move(value); } /** *

The data type that the data is to be modified to.

*/ inline void SetToType(const char* value) { m_toTypeHasBeenSet = true; m_toType.assign(value); } /** *

The data type that the data is to be modified to.

*/ inline Mapping& WithToType(const Aws::String& value) { SetToType(value); return *this;} /** *

The data type that the data is to be modified to.

*/ inline Mapping& WithToType(Aws::String&& value) { SetToType(std::move(value)); return *this;} /** *

The data type that the data is to be modified to.

*/ inline Mapping& WithToType(const char* value) { SetToType(value); return *this;} /** *

If true, then the column is removed.

*/ inline bool GetDropped() const{ return m_dropped; } /** *

If true, then the column is removed.

*/ inline bool DroppedHasBeenSet() const { return m_droppedHasBeenSet; } /** *

If true, then the column is removed.

*/ inline void SetDropped(bool value) { m_droppedHasBeenSet = true; m_dropped = value; } /** *

If true, then the column is removed.

*/ inline Mapping& WithDropped(bool value) { SetDropped(value); return *this;} /** *

Only applicable to nested data structures. If you want to change the parent * structure, but also one of its children, you can fill out this data strucutre. * It is also Mapping, but its FromPath will be the * parent's FromPath plus the FromPath from this * structure.

For the children part, suppose you have the structure:

* { "FromPath": "OuterStructure", "ToKey": "OuterStructure", "ToType": * "Struct", "Dropped": false, "Chidlren": [{ "FromPath": "inner", "ToKey": * "inner", "ToType": "Double", "Dropped": false, }] }

You can * specify a Mapping that looks like:

{ "FromPath": * "OuterStructure", "ToKey": "OuterStructure", "ToType": "Struct", "Dropped": * false, "Chidlren": [{ "FromPath": "inner", "ToKey": "inner", "ToType": "Double", * "Dropped": false, }] }

*/ inline const Aws::Vector& GetChildren() const{ return m_children; } /** *

Only applicable to nested data structures. If you want to change the parent * structure, but also one of its children, you can fill out this data strucutre. * It is also Mapping, but its FromPath will be the * parent's FromPath plus the FromPath from this * structure.

For the children part, suppose you have the structure:

* { "FromPath": "OuterStructure", "ToKey": "OuterStructure", "ToType": * "Struct", "Dropped": false, "Chidlren": [{ "FromPath": "inner", "ToKey": * "inner", "ToType": "Double", "Dropped": false, }] }

You can * specify a Mapping that looks like:

{ "FromPath": * "OuterStructure", "ToKey": "OuterStructure", "ToType": "Struct", "Dropped": * false, "Chidlren": [{ "FromPath": "inner", "ToKey": "inner", "ToType": "Double", * "Dropped": false, }] }

*/ inline bool ChildrenHasBeenSet() const { return m_childrenHasBeenSet; } /** *

Only applicable to nested data structures. If you want to change the parent * structure, but also one of its children, you can fill out this data strucutre. * It is also Mapping, but its FromPath will be the * parent's FromPath plus the FromPath from this * structure.

For the children part, suppose you have the structure:

* { "FromPath": "OuterStructure", "ToKey": "OuterStructure", "ToType": * "Struct", "Dropped": false, "Chidlren": [{ "FromPath": "inner", "ToKey": * "inner", "ToType": "Double", "Dropped": false, }] }

You can * specify a Mapping that looks like:

{ "FromPath": * "OuterStructure", "ToKey": "OuterStructure", "ToType": "Struct", "Dropped": * false, "Chidlren": [{ "FromPath": "inner", "ToKey": "inner", "ToType": "Double", * "Dropped": false, }] }

*/ inline void SetChildren(const Aws::Vector& value) { m_childrenHasBeenSet = true; m_children = value; } /** *

Only applicable to nested data structures. If you want to change the parent * structure, but also one of its children, you can fill out this data strucutre. * It is also Mapping, but its FromPath will be the * parent's FromPath plus the FromPath from this * structure.

For the children part, suppose you have the structure:

* { "FromPath": "OuterStructure", "ToKey": "OuterStructure", "ToType": * "Struct", "Dropped": false, "Chidlren": [{ "FromPath": "inner", "ToKey": * "inner", "ToType": "Double", "Dropped": false, }] }

You can * specify a Mapping that looks like:

{ "FromPath": * "OuterStructure", "ToKey": "OuterStructure", "ToType": "Struct", "Dropped": * false, "Chidlren": [{ "FromPath": "inner", "ToKey": "inner", "ToType": "Double", * "Dropped": false, }] }

*/ inline void SetChildren(Aws::Vector&& value) { m_childrenHasBeenSet = true; m_children = std::move(value); } /** *

Only applicable to nested data structures. If you want to change the parent * structure, but also one of its children, you can fill out this data strucutre. * It is also Mapping, but its FromPath will be the * parent's FromPath plus the FromPath from this * structure.

For the children part, suppose you have the structure:

* { "FromPath": "OuterStructure", "ToKey": "OuterStructure", "ToType": * "Struct", "Dropped": false, "Chidlren": [{ "FromPath": "inner", "ToKey": * "inner", "ToType": "Double", "Dropped": false, }] }

You can * specify a Mapping that looks like:

{ "FromPath": * "OuterStructure", "ToKey": "OuterStructure", "ToType": "Struct", "Dropped": * false, "Chidlren": [{ "FromPath": "inner", "ToKey": "inner", "ToType": "Double", * "Dropped": false, }] }

*/ inline Mapping& WithChildren(const Aws::Vector& value) { SetChildren(value); return *this;} /** *

Only applicable to nested data structures. If you want to change the parent * structure, but also one of its children, you can fill out this data strucutre. * It is also Mapping, but its FromPath will be the * parent's FromPath plus the FromPath from this * structure.

For the children part, suppose you have the structure:

* { "FromPath": "OuterStructure", "ToKey": "OuterStructure", "ToType": * "Struct", "Dropped": false, "Chidlren": [{ "FromPath": "inner", "ToKey": * "inner", "ToType": "Double", "Dropped": false, }] }

You can * specify a Mapping that looks like:

{ "FromPath": * "OuterStructure", "ToKey": "OuterStructure", "ToType": "Struct", "Dropped": * false, "Chidlren": [{ "FromPath": "inner", "ToKey": "inner", "ToType": "Double", * "Dropped": false, }] }

*/ inline Mapping& WithChildren(Aws::Vector&& value) { SetChildren(std::move(value)); return *this;} /** *

Only applicable to nested data structures. If you want to change the parent * structure, but also one of its children, you can fill out this data strucutre. * It is also Mapping, but its FromPath will be the * parent's FromPath plus the FromPath from this * structure.

For the children part, suppose you have the structure:

* { "FromPath": "OuterStructure", "ToKey": "OuterStructure", "ToType": * "Struct", "Dropped": false, "Chidlren": [{ "FromPath": "inner", "ToKey": * "inner", "ToType": "Double", "Dropped": false, }] }

You can * specify a Mapping that looks like:

{ "FromPath": * "OuterStructure", "ToKey": "OuterStructure", "ToType": "Struct", "Dropped": * false, "Chidlren": [{ "FromPath": "inner", "ToKey": "inner", "ToType": "Double", * "Dropped": false, }] }

*/ inline Mapping& AddChildren(const Mapping& value) { m_childrenHasBeenSet = true; m_children.push_back(value); return *this; } /** *

Only applicable to nested data structures. If you want to change the parent * structure, but also one of its children, you can fill out this data strucutre. * It is also Mapping, but its FromPath will be the * parent's FromPath plus the FromPath from this * structure.

For the children part, suppose you have the structure:

* { "FromPath": "OuterStructure", "ToKey": "OuterStructure", "ToType": * "Struct", "Dropped": false, "Chidlren": [{ "FromPath": "inner", "ToKey": * "inner", "ToType": "Double", "Dropped": false, }] }

You can * specify a Mapping that looks like:

{ "FromPath": * "OuterStructure", "ToKey": "OuterStructure", "ToType": "Struct", "Dropped": * false, "Chidlren": [{ "FromPath": "inner", "ToKey": "inner", "ToType": "Double", * "Dropped": false, }] }

*/ inline Mapping& AddChildren(Mapping&& value) { m_childrenHasBeenSet = true; m_children.push_back(std::move(value)); return *this; } private: Aws::String m_toKey; bool m_toKeyHasBeenSet = false; Aws::Vector m_fromPath; bool m_fromPathHasBeenSet = false; Aws::String m_fromType; bool m_fromTypeHasBeenSet = false; Aws::String m_toType; bool m_toTypeHasBeenSet = false; bool m_dropped; bool m_droppedHasBeenSet = false; Aws::Vector m_children; bool m_childrenHasBeenSet = false; }; } // namespace Model } // namespace Glue } // namespace Aws