/** * 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 ConnectWisdomService { namespace Model { SessionData::SessionData() : m_descriptionHasBeenSet(false), m_integrationConfigurationHasBeenSet(false), m_nameHasBeenSet(false), m_sessionArnHasBeenSet(false), m_sessionIdHasBeenSet(false), m_tagsHasBeenSet(false) { } SessionData::SessionData(JsonView jsonValue) : m_descriptionHasBeenSet(false), m_integrationConfigurationHasBeenSet(false), m_nameHasBeenSet(false), m_sessionArnHasBeenSet(false), m_sessionIdHasBeenSet(false), m_tagsHasBeenSet(false) { *this = jsonValue; } SessionData& SessionData::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("description")) { m_description = jsonValue.GetString("description"); m_descriptionHasBeenSet = true; } if(jsonValue.ValueExists("integrationConfiguration")) { m_integrationConfiguration = jsonValue.GetObject("integrationConfiguration"); m_integrationConfigurationHasBeenSet = true; } if(jsonValue.ValueExists("name")) { m_name = jsonValue.GetString("name"); m_nameHasBeenSet = true; } if(jsonValue.ValueExists("sessionArn")) { m_sessionArn = jsonValue.GetString("sessionArn"); m_sessionArnHasBeenSet = true; } if(jsonValue.ValueExists("sessionId")) { m_sessionId = jsonValue.GetString("sessionId"); m_sessionIdHasBeenSet = true; } if(jsonValue.ValueExists("tags")) { Aws::Map tagsJsonMap = jsonValue.GetObject("tags").GetAllObjects(); for(auto& tagsItem : tagsJsonMap) { m_tags[tagsItem.first] = tagsItem.second.AsString(); } m_tagsHasBeenSet = true; } return *this; } JsonValue SessionData::Jsonize() const { JsonValue payload; if(m_descriptionHasBeenSet) { payload.WithString("description", m_description); } if(m_integrationConfigurationHasBeenSet) { payload.WithObject("integrationConfiguration", m_integrationConfiguration.Jsonize()); } if(m_nameHasBeenSet) { payload.WithString("name", m_name); } if(m_sessionArnHasBeenSet) { payload.WithString("sessionArn", m_sessionArn); } if(m_sessionIdHasBeenSet) { payload.WithString("sessionId", m_sessionId); } if(m_tagsHasBeenSet) { JsonValue tagsJsonMap; for(auto& tagsItem : m_tags) { tagsJsonMap.WithString(tagsItem.first, tagsItem.second); } payload.WithObject("tags", std::move(tagsJsonMap)); } return payload; } } // namespace Model } // namespace ConnectWisdomService } // namespace Aws