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

Describes how to sort the data that you bind to a component.

See * Also:

AWS * API Reference

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

The field to perform the sort on.

*/ inline const Aws::String& GetField() const{ return m_field; } /** *

The field to perform the sort on.

*/ inline bool FieldHasBeenSet() const { return m_fieldHasBeenSet; } /** *

The field to perform the sort on.

*/ inline void SetField(const Aws::String& value) { m_fieldHasBeenSet = true; m_field = value; } /** *

The field to perform the sort on.

*/ inline void SetField(Aws::String&& value) { m_fieldHasBeenSet = true; m_field = std::move(value); } /** *

The field to perform the sort on.

*/ inline void SetField(const char* value) { m_fieldHasBeenSet = true; m_field.assign(value); } /** *

The field to perform the sort on.

*/ inline SortProperty& WithField(const Aws::String& value) { SetField(value); return *this;} /** *

The field to perform the sort on.

*/ inline SortProperty& WithField(Aws::String&& value) { SetField(std::move(value)); return *this;} /** *

The field to perform the sort on.

*/ inline SortProperty& WithField(const char* value) { SetField(value); return *this;} /** *

The direction of the sort, either ascending or descending.

*/ inline const SortDirection& GetDirection() const{ return m_direction; } /** *

The direction of the sort, either ascending or descending.

*/ inline bool DirectionHasBeenSet() const { return m_directionHasBeenSet; } /** *

The direction of the sort, either ascending or descending.

*/ inline void SetDirection(const SortDirection& value) { m_directionHasBeenSet = true; m_direction = value; } /** *

The direction of the sort, either ascending or descending.

*/ inline void SetDirection(SortDirection&& value) { m_directionHasBeenSet = true; m_direction = std::move(value); } /** *

The direction of the sort, either ascending or descending.

*/ inline SortProperty& WithDirection(const SortDirection& value) { SetDirection(value); return *this;} /** *

The direction of the sort, either ascending or descending.

*/ inline SortProperty& WithDirection(SortDirection&& value) { SetDirection(std::move(value)); return *this;} private: Aws::String m_field; bool m_fieldHasBeenSet = false; SortDirection m_direction; bool m_directionHasBeenSet = false; }; } // namespace Model } // namespace AmplifyUIBuilder } // namespace Aws