/** * 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 AppRegistry { namespace Model { ResourceGroup::ResourceGroup() : m_state(ResourceGroupState::NOT_SET), m_stateHasBeenSet(false), m_arnHasBeenSet(false), m_errorMessageHasBeenSet(false) { } ResourceGroup::ResourceGroup(JsonView jsonValue) : m_state(ResourceGroupState::NOT_SET), m_stateHasBeenSet(false), m_arnHasBeenSet(false), m_errorMessageHasBeenSet(false) { *this = jsonValue; } ResourceGroup& ResourceGroup::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("state")) { m_state = ResourceGroupStateMapper::GetResourceGroupStateForName(jsonValue.GetString("state")); m_stateHasBeenSet = true; } if(jsonValue.ValueExists("arn")) { m_arn = jsonValue.GetString("arn"); m_arnHasBeenSet = true; } if(jsonValue.ValueExists("errorMessage")) { m_errorMessage = jsonValue.GetString("errorMessage"); m_errorMessageHasBeenSet = true; } return *this; } JsonValue ResourceGroup::Jsonize() const { JsonValue payload; if(m_stateHasBeenSet) { payload.WithString("state", ResourceGroupStateMapper::GetNameForResourceGroupState(m_state)); } if(m_arnHasBeenSet) { payload.WithString("arn", m_arn); } if(m_errorMessageHasBeenSet) { payload.WithString("errorMessage", m_errorMessage); } return payload; } } // namespace Model } // namespace AppRegistry } // namespace Aws