/** * 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 Proton { namespace Model { ServiceSyncConfig::ServiceSyncConfig() : m_branchHasBeenSet(false), m_filePathHasBeenSet(false), m_repositoryNameHasBeenSet(false), m_repositoryProvider(RepositoryProvider::NOT_SET), m_repositoryProviderHasBeenSet(false), m_serviceNameHasBeenSet(false) { } ServiceSyncConfig::ServiceSyncConfig(JsonView jsonValue) : m_branchHasBeenSet(false), m_filePathHasBeenSet(false), m_repositoryNameHasBeenSet(false), m_repositoryProvider(RepositoryProvider::NOT_SET), m_repositoryProviderHasBeenSet(false), m_serviceNameHasBeenSet(false) { *this = jsonValue; } ServiceSyncConfig& ServiceSyncConfig::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("branch")) { m_branch = jsonValue.GetString("branch"); m_branchHasBeenSet = true; } if(jsonValue.ValueExists("filePath")) { m_filePath = jsonValue.GetString("filePath"); m_filePathHasBeenSet = true; } if(jsonValue.ValueExists("repositoryName")) { m_repositoryName = jsonValue.GetString("repositoryName"); m_repositoryNameHasBeenSet = true; } if(jsonValue.ValueExists("repositoryProvider")) { m_repositoryProvider = RepositoryProviderMapper::GetRepositoryProviderForName(jsonValue.GetString("repositoryProvider")); m_repositoryProviderHasBeenSet = true; } if(jsonValue.ValueExists("serviceName")) { m_serviceName = jsonValue.GetString("serviceName"); m_serviceNameHasBeenSet = true; } return *this; } JsonValue ServiceSyncConfig::Jsonize() const { JsonValue payload; if(m_branchHasBeenSet) { payload.WithString("branch", m_branch); } if(m_filePathHasBeenSet) { payload.WithString("filePath", m_filePath); } if(m_repositoryNameHasBeenSet) { payload.WithString("repositoryName", m_repositoryName); } if(m_repositoryProviderHasBeenSet) { payload.WithString("repositoryProvider", RepositoryProviderMapper::GetNameForRepositoryProvider(m_repositoryProvider)); } if(m_serviceNameHasBeenSet) { payload.WithString("serviceName", m_serviceName); } return payload; } } // namespace Model } // namespace Proton } // namespace Aws