/** * 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 CodeBuild { namespace Model { SourceCredentialsInfo::SourceCredentialsInfo() : m_arnHasBeenSet(false), m_serverType(ServerType::NOT_SET), m_serverTypeHasBeenSet(false), m_authType(AuthType::NOT_SET), m_authTypeHasBeenSet(false) { } SourceCredentialsInfo::SourceCredentialsInfo(JsonView jsonValue) : m_arnHasBeenSet(false), m_serverType(ServerType::NOT_SET), m_serverTypeHasBeenSet(false), m_authType(AuthType::NOT_SET), m_authTypeHasBeenSet(false) { *this = jsonValue; } SourceCredentialsInfo& SourceCredentialsInfo::operator =(JsonView jsonValue) { if(jsonValue.ValueExists("arn")) { m_arn = jsonValue.GetString("arn"); m_arnHasBeenSet = true; } if(jsonValue.ValueExists("serverType")) { m_serverType = ServerTypeMapper::GetServerTypeForName(jsonValue.GetString("serverType")); m_serverTypeHasBeenSet = true; } if(jsonValue.ValueExists("authType")) { m_authType = AuthTypeMapper::GetAuthTypeForName(jsonValue.GetString("authType")); m_authTypeHasBeenSet = true; } return *this; } JsonValue SourceCredentialsInfo::Jsonize() const { JsonValue payload; if(m_arnHasBeenSet) { payload.WithString("arn", m_arn); } if(m_serverTypeHasBeenSet) { payload.WithString("serverType", ServerTypeMapper::GetNameForServerType(m_serverType)); } if(m_authTypeHasBeenSet) { payload.WithString("authType", AuthTypeMapper::GetNameForAuthType(m_authType)); } return payload; } } // namespace Model } // namespace CodeBuild } // namespace Aws