/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::Utils::Json; using namespace Aws::Utils; namespace Aws { namespace LexModelsV2 { namespace Model { BuiltInIntentSortBy::BuiltInIntentSortBy() : m_attribute(BuiltInIntentSortAttribute::NOT_SET), m_attributeHasBeenSet(false), m_order(SortOrder::NOT_SET), m_orderHasBeenSet(false) { } BuiltInIntentSortBy::BuiltInIntentSortBy(JsonView jsonValue) : m_attribute(BuiltInIntentSortAttribute::NOT_SET), m_attributeHasBeenSet(false), m_order(SortOrder::NOT_SET), m_orderHasBeenSet(false) { *this = jsonValue; } BuiltInIntentSortBy& BuiltInIntentSortBy::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("attribute")) { m_attribute = BuiltInIntentSortAttributeMapper::GetBuiltInIntentSortAttributeForName(jsonValue.GetString("attribute")); m_attributeHasBeenSet = true; } if(jsonValue.ValueExists("order")) { m_order = SortOrderMapper::GetSortOrderForName(jsonValue.GetString("order")); m_orderHasBeenSet = true; } return *this; } JsonValue BuiltInIntentSortBy::Jsonize() const { JsonValue payload; if(m_attributeHasBeenSet) { payload.WithString("attribute", BuiltInIntentSortAttributeMapper::GetNameForBuiltInIntentSortAttribute(m_attribute)); } if(m_orderHasBeenSet) { payload.WithString("order", SortOrderMapper::GetNameForSortOrder(m_order)); } return payload; } } // namespace Model } // namespace LexModelsV2 } // namespace Aws