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

Specifies a transform that groups rows by chosen fields and computes the * aggregated value by specified function.

See Also:

AWS API * Reference

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

The name of the transform node.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The name of the transform node.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The name of the transform node.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The name of the transform node.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The name of the transform node.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The name of the transform node.

*/ inline Aggregate& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The name of the transform node.

*/ inline Aggregate& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The name of the transform node.

*/ inline Aggregate& WithName(const char* value) { SetName(value); return *this;} /** *

Specifies the fields and rows to use as inputs for the aggregate * transform.

*/ inline const Aws::Vector& GetInputs() const{ return m_inputs; } /** *

Specifies the fields and rows to use as inputs for the aggregate * transform.

*/ inline bool InputsHasBeenSet() const { return m_inputsHasBeenSet; } /** *

Specifies the fields and rows to use as inputs for the aggregate * transform.

*/ inline void SetInputs(const Aws::Vector& value) { m_inputsHasBeenSet = true; m_inputs = value; } /** *

Specifies the fields and rows to use as inputs for the aggregate * transform.

*/ inline void SetInputs(Aws::Vector&& value) { m_inputsHasBeenSet = true; m_inputs = std::move(value); } /** *

Specifies the fields and rows to use as inputs for the aggregate * transform.

*/ inline Aggregate& WithInputs(const Aws::Vector& value) { SetInputs(value); return *this;} /** *

Specifies the fields and rows to use as inputs for the aggregate * transform.

*/ inline Aggregate& WithInputs(Aws::Vector&& value) { SetInputs(std::move(value)); return *this;} /** *

Specifies the fields and rows to use as inputs for the aggregate * transform.

*/ inline Aggregate& AddInputs(const Aws::String& value) { m_inputsHasBeenSet = true; m_inputs.push_back(value); return *this; } /** *

Specifies the fields and rows to use as inputs for the aggregate * transform.

*/ inline Aggregate& AddInputs(Aws::String&& value) { m_inputsHasBeenSet = true; m_inputs.push_back(std::move(value)); return *this; } /** *

Specifies the fields and rows to use as inputs for the aggregate * transform.

*/ inline Aggregate& AddInputs(const char* value) { m_inputsHasBeenSet = true; m_inputs.push_back(value); return *this; } /** *

Specifies the fields to group by.

*/ inline const Aws::Vector>& GetGroups() const{ return m_groups; } /** *

Specifies the fields to group by.

*/ inline bool GroupsHasBeenSet() const { return m_groupsHasBeenSet; } /** *

Specifies the fields to group by.

*/ inline void SetGroups(const Aws::Vector>& value) { m_groupsHasBeenSet = true; m_groups = value; } /** *

Specifies the fields to group by.

*/ inline void SetGroups(Aws::Vector>&& value) { m_groupsHasBeenSet = true; m_groups = std::move(value); } /** *

Specifies the fields to group by.

*/ inline Aggregate& WithGroups(const Aws::Vector>& value) { SetGroups(value); return *this;} /** *

Specifies the fields to group by.

*/ inline Aggregate& WithGroups(Aws::Vector>&& value) { SetGroups(std::move(value)); return *this;} /** *

Specifies the fields to group by.

*/ inline Aggregate& AddGroups(const Aws::Vector& value) { m_groupsHasBeenSet = true; m_groups.push_back(value); return *this; } /** *

Specifies the fields to group by.

*/ inline Aggregate& AddGroups(Aws::Vector&& value) { m_groupsHasBeenSet = true; m_groups.push_back(std::move(value)); return *this; } /** *

Specifies the aggregate functions to be performed on specified fields.

*/ inline const Aws::Vector& GetAggs() const{ return m_aggs; } /** *

Specifies the aggregate functions to be performed on specified fields.

*/ inline bool AggsHasBeenSet() const { return m_aggsHasBeenSet; } /** *

Specifies the aggregate functions to be performed on specified fields.

*/ inline void SetAggs(const Aws::Vector& value) { m_aggsHasBeenSet = true; m_aggs = value; } /** *

Specifies the aggregate functions to be performed on specified fields.

*/ inline void SetAggs(Aws::Vector&& value) { m_aggsHasBeenSet = true; m_aggs = std::move(value); } /** *

Specifies the aggregate functions to be performed on specified fields.

*/ inline Aggregate& WithAggs(const Aws::Vector& value) { SetAggs(value); return *this;} /** *

Specifies the aggregate functions to be performed on specified fields.

*/ inline Aggregate& WithAggs(Aws::Vector&& value) { SetAggs(std::move(value)); return *this;} /** *

Specifies the aggregate functions to be performed on specified fields.

*/ inline Aggregate& AddAggs(const AggregateOperation& value) { m_aggsHasBeenSet = true; m_aggs.push_back(value); return *this; } /** *

Specifies the aggregate functions to be performed on specified fields.

*/ inline Aggregate& AddAggs(AggregateOperation&& value) { m_aggsHasBeenSet = true; m_aggs.push_back(std::move(value)); return *this; } private: Aws::String m_name; bool m_nameHasBeenSet = false; Aws::Vector m_inputs; bool m_inputsHasBeenSet = false; Aws::Vector> m_groups; bool m_groupsHasBeenSet = false; Aws::Vector m_aggs; bool m_aggsHasBeenSet = false; }; } // namespace Model } // namespace Glue } // namespace Aws