/** * 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 Connect { namespace Model { EncryptionConfig::EncryptionConfig() : m_encryptionType(EncryptionType::NOT_SET), m_encryptionTypeHasBeenSet(false), m_keyIdHasBeenSet(false) { } EncryptionConfig::EncryptionConfig(JsonView jsonValue) : m_encryptionType(EncryptionType::NOT_SET), m_encryptionTypeHasBeenSet(false), m_keyIdHasBeenSet(false) { *this = jsonValue; } EncryptionConfig& EncryptionConfig::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("EncryptionType")) { m_encryptionType = EncryptionTypeMapper::GetEncryptionTypeForName(jsonValue.GetString("EncryptionType")); m_encryptionTypeHasBeenSet = true; } if(jsonValue.ValueExists("KeyId")) { m_keyId = jsonValue.GetString("KeyId"); m_keyIdHasBeenSet = true; } return *this; } JsonValue EncryptionConfig::Jsonize() const { JsonValue payload; if(m_encryptionTypeHasBeenSet) { payload.WithString("EncryptionType", EncryptionTypeMapper::GetNameForEncryptionType(m_encryptionType)); } if(m_keyIdHasBeenSet) { payload.WithString("KeyId", m_keyId); } return payload; } } // namespace Model } // namespace Connect } // namespace Aws