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/ServiceAccountCredentials.h> 7 #include <aws/core/utils/json/JsonSerializer.h> 8 9 #include <utility> 10 11 using namespace Aws::Utils::Json; 12 using namespace Aws::Utils; 13 14 namespace Aws 15 { 16 namespace AppStream 17 { 18 namespace Model 19 { 20 ServiceAccountCredentials()21ServiceAccountCredentials::ServiceAccountCredentials() : 22 m_accountNameHasBeenSet(false), 23 m_accountPasswordHasBeenSet(false) 24 { 25 } 26 ServiceAccountCredentials(JsonView jsonValue)27ServiceAccountCredentials::ServiceAccountCredentials(JsonView jsonValue) : 28 m_accountNameHasBeenSet(false), 29 m_accountPasswordHasBeenSet(false) 30 { 31 *this = jsonValue; 32 } 33 operator =(JsonView jsonValue)34ServiceAccountCredentials& ServiceAccountCredentials::operator =(JsonView jsonValue) 35 { 36 if(jsonValue.ValueExists("AccountName")) 37 { 38 m_accountName = jsonValue.GetString("AccountName"); 39 40 m_accountNameHasBeenSet = true; 41 } 42 43 if(jsonValue.ValueExists("AccountPassword")) 44 { 45 m_accountPassword = jsonValue.GetString("AccountPassword"); 46 47 m_accountPasswordHasBeenSet = true; 48 } 49 50 return *this; 51 } 52 Jsonize() const53JsonValue ServiceAccountCredentials::Jsonize() const 54 { 55 JsonValue payload; 56 57 if(m_accountNameHasBeenSet) 58 { 59 payload.WithString("AccountName", m_accountName); 60 61 } 62 63 if(m_accountPasswordHasBeenSet) 64 { 65 payload.WithString("AccountPassword", m_accountPassword); 66 67 } 68 69 return payload; 70 } 71 72 } // namespace Model 73 } // namespace AppStream 74 } // namespace Aws 75