/** * 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 ManagedBlockchain { namespace Model { MemberConfiguration::MemberConfiguration() : m_nameHasBeenSet(false), m_descriptionHasBeenSet(false), m_frameworkConfigurationHasBeenSet(false), m_logPublishingConfigurationHasBeenSet(false), m_tagsHasBeenSet(false), m_kmsKeyArnHasBeenSet(false) { } MemberConfiguration::MemberConfiguration(JsonView jsonValue) : m_nameHasBeenSet(false), m_descriptionHasBeenSet(false), m_frameworkConfigurationHasBeenSet(false), m_logPublishingConfigurationHasBeenSet(false), m_tagsHasBeenSet(false), m_kmsKeyArnHasBeenSet(false) { *this = jsonValue; } MemberConfiguration& MemberConfiguration::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("Name")) { m_name = jsonValue.GetString("Name"); m_nameHasBeenSet = true; } if(jsonValue.ValueExists("Description")) { m_description = jsonValue.GetString("Description"); m_descriptionHasBeenSet = true; } if(jsonValue.ValueExists("FrameworkConfiguration")) { m_frameworkConfiguration = jsonValue.GetObject("FrameworkConfiguration"); m_frameworkConfigurationHasBeenSet = true; } if(jsonValue.ValueExists("LogPublishingConfiguration")) { m_logPublishingConfiguration = jsonValue.GetObject("LogPublishingConfiguration"); m_logPublishingConfigurationHasBeenSet = 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; } if(jsonValue.ValueExists("KmsKeyArn")) { m_kmsKeyArn = jsonValue.GetString("KmsKeyArn"); m_kmsKeyArnHasBeenSet = true; } return *this; } JsonValue MemberConfiguration::Jsonize() const { JsonValue payload; if(m_nameHasBeenSet) { payload.WithString("Name", m_name); } if(m_descriptionHasBeenSet) { payload.WithString("Description", m_description); } if(m_frameworkConfigurationHasBeenSet) { payload.WithObject("FrameworkConfiguration", m_frameworkConfiguration.Jsonize()); } if(m_logPublishingConfigurationHasBeenSet) { payload.WithObject("LogPublishingConfiguration", m_logPublishingConfiguration.Jsonize()); } if(m_tagsHasBeenSet) { JsonValue tagsJsonMap; for(auto& tagsItem : m_tags) { tagsJsonMap.WithString(tagsItem.first, tagsItem.second); } payload.WithObject("Tags", std::move(tagsJsonMap)); } if(m_kmsKeyArnHasBeenSet) { payload.WithString("KmsKeyArn", m_kmsKeyArn); } return payload; } } // namespace Model } // namespace ManagedBlockchain } // namespace Aws