/** * 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 { Principal::Principal() : m_serviceHasBeenSet(false), m_arnHasBeenSet(false) { } Principal::Principal(JsonView jsonValue) : m_serviceHasBeenSet(false), m_arnHasBeenSet(false) { *this = jsonValue; } Principal& Principal::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("service")) { m_service = jsonValue.GetString("service"); m_serviceHasBeenSet = true; } if(jsonValue.ValueExists("arn")) { m_arn = jsonValue.GetString("arn"); m_arnHasBeenSet = true; } return *this; } JsonValue Principal::Jsonize() const { JsonValue payload; if(m_serviceHasBeenSet) { payload.WithString("service", m_service); } if(m_arnHasBeenSet) { payload.WithString("arn", m_arn); } return payload; } } // namespace Model } // namespace LexModelsV2 } // namespace Aws