This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
pxz-hos-client-cpp-module/support/aws-sdk-cpp-master/aws-cpp-sdk-codebuild/source/model/SourceCredentialsInfo.cpp

92 lines
1.8 KiB
C++
Raw Normal View History

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codebuild/model/SourceCredentialsInfo.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
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