1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #include <aws/appstream/model/ListTagsForResourceResult.h>
7 #include <aws/core/utils/json/JsonSerializer.h>
8 #include <aws/core/AmazonWebServiceResult.h>
9 #include <aws/core/utils/StringUtils.h>
10 #include <aws/core/utils/UnreferencedParam.h>
11 
12 #include <utility>
13 
14 using namespace Aws::AppStream::Model;
15 using namespace Aws::Utils::Json;
16 using namespace Aws::Utils;
17 using namespace Aws;
18 
ListTagsForResourceResult()19 ListTagsForResourceResult::ListTagsForResourceResult()
20 {
21 }
22 
ListTagsForResourceResult(const Aws::AmazonWebServiceResult<JsonValue> & result)23 ListTagsForResourceResult::ListTagsForResourceResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
24 {
25   *this = result;
26 }
27 
operator =(const Aws::AmazonWebServiceResult<JsonValue> & result)28 ListTagsForResourceResult& ListTagsForResourceResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
29 {
30   JsonView jsonValue = result.GetPayload().View();
31   if(jsonValue.ValueExists("Tags"))
32   {
33     Aws::Map<Aws::String, JsonView> tagsJsonMap = jsonValue.GetObject("Tags").GetAllObjects();
34     for(auto& tagsItem : tagsJsonMap)
35     {
36       m_tags[tagsItem.first] = tagsItem.second.AsString();
37     }
38   }
39 
40 
41 
42   return *this;
43 }
44