feat(hos_client_create, hos_client_destory): 多次调用destory不会导致重复释放

This commit is contained in:
彭宣正
2020-12-14 17:24:58 +08:00
parent 505d529c32
commit 10b370e486
55976 changed files with 8544395 additions and 2 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,64 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/CodeArtifactEndpoint.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <aws/core/utils/HashingUtils.h>
using namespace Aws;
using namespace Aws::CodeArtifact;
namespace Aws
{
namespace CodeArtifact
{
namespace CodeArtifactEndpoint
{
static const int CN_NORTH_1_HASH = Aws::Utils::HashingUtils::HashString("cn-north-1");
static const int CN_NORTHWEST_1_HASH = Aws::Utils::HashingUtils::HashString("cn-northwest-1");
static const int US_ISO_EAST_1_HASH = Aws::Utils::HashingUtils::HashString("us-iso-east-1");
static const int US_ISOB_EAST_1_HASH = Aws::Utils::HashingUtils::HashString("us-isob-east-1");
Aws::String ForRegion(const Aws::String& regionName, bool useDualStack)
{
// Fallback to us-east-1 if global endpoint does not exists.
Aws::String region = regionName == Aws::Region::AWS_GLOBAL ? Aws::Region::US_EAST_1 : regionName;
auto hash = Aws::Utils::HashingUtils::HashString(region.c_str());
Aws::StringStream ss;
ss << "codeartifact" << ".";
if(useDualStack)
{
ss << "dualstack.";
}
ss << region;
if (hash == CN_NORTH_1_HASH || hash == CN_NORTHWEST_1_HASH)
{
ss << ".amazonaws.com.cn";
}
else if (hash == US_ISO_EAST_1_HASH)
{
ss << ".c2s.ic.gov";
}
else if (hash == US_ISOB_EAST_1_HASH)
{
ss << ".sc2s.sgov.gov";
}
else
{
ss << ".amazonaws.com";
}
return ss.str();
}
} // namespace CodeArtifactEndpoint
} // namespace CodeArtifact
} // namespace Aws

View File

@@ -0,0 +1,22 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/core/client/AWSError.h>
#include <aws/codeartifact/CodeArtifactErrorMarshaller.h>
#include <aws/codeartifact/CodeArtifactErrors.h>
using namespace Aws::Client;
using namespace Aws::CodeArtifact;
AWSError<CoreErrors> CodeArtifactErrorMarshaller::FindErrorByName(const char* errorName) const
{
AWSError<CoreErrors> error = CodeArtifactErrorMapper::GetErrorForName(errorName);
if(error.GetErrorType() != CoreErrors::UNKNOWN)
{
return error;
}
return AWSErrorMarshaller::FindErrorByName(errorName);
}

View File

@@ -0,0 +1,83 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/core/client/AWSError.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/codeartifact/CodeArtifactErrors.h>
#include <aws/codeartifact/model/ConflictException.h>
#include <aws/codeartifact/model/ServiceQuotaExceededException.h>
#include <aws/codeartifact/model/ThrottlingException.h>
#include <aws/codeartifact/model/ResourceNotFoundException.h>
#include <aws/codeartifact/model/ValidationException.h>
using namespace Aws::Client;
using namespace Aws::Utils;
using namespace Aws::CodeArtifact;
using namespace Aws::CodeArtifact::Model;
namespace Aws
{
namespace CodeArtifact
{
template<> AWS_CODEARTIFACT_API ConflictException CodeArtifactError::GetModeledError()
{
assert(this->GetErrorType() == CodeArtifactErrors::CONFLICT);
return ConflictException(this->GetJsonPayload().View());
}
template<> AWS_CODEARTIFACT_API ServiceQuotaExceededException CodeArtifactError::GetModeledError()
{
assert(this->GetErrorType() == CodeArtifactErrors::SERVICE_QUOTA_EXCEEDED);
return ServiceQuotaExceededException(this->GetJsonPayload().View());
}
template<> AWS_CODEARTIFACT_API ThrottlingException CodeArtifactError::GetModeledError()
{
assert(this->GetErrorType() == CodeArtifactErrors::THROTTLING);
return ThrottlingException(this->GetJsonPayload().View());
}
template<> AWS_CODEARTIFACT_API ResourceNotFoundException CodeArtifactError::GetModeledError()
{
assert(this->GetErrorType() == CodeArtifactErrors::RESOURCE_NOT_FOUND);
return ResourceNotFoundException(this->GetJsonPayload().View());
}
template<> AWS_CODEARTIFACT_API ValidationException CodeArtifactError::GetModeledError()
{
assert(this->GetErrorType() == CodeArtifactErrors::VALIDATION);
return ValidationException(this->GetJsonPayload().View());
}
namespace CodeArtifactErrorMapper
{
static const int CONFLICT_HASH = HashingUtils::HashString("ConflictException");
static const int SERVICE_QUOTA_EXCEEDED_HASH = HashingUtils::HashString("ServiceQuotaExceededException");
static const int INTERNAL_SERVER_HASH = HashingUtils::HashString("InternalServerException");
AWSError<CoreErrors> GetErrorForName(const char* errorName)
{
int hashCode = HashingUtils::HashString(errorName);
if (hashCode == CONFLICT_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CodeArtifactErrors::CONFLICT), false);
}
else if (hashCode == SERVICE_QUOTA_EXCEEDED_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CodeArtifactErrors::SERVICE_QUOTA_EXCEEDED), false);
}
else if (hashCode == INTERNAL_SERVER_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CodeArtifactErrors::INTERNAL_SERVER), false);
}
return AWSError<CoreErrors>(CoreErrors::UNKNOWN, false);
}
} // namespace CodeArtifactErrorMapper
} // namespace CodeArtifact
} // namespace Aws

View File

@@ -0,0 +1,99 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/AssetSummary.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CodeArtifact
{
namespace Model
{
AssetSummary::AssetSummary() :
m_nameHasBeenSet(false),
m_size(0),
m_sizeHasBeenSet(false),
m_hashesHasBeenSet(false)
{
}
AssetSummary::AssetSummary(JsonView jsonValue) :
m_nameHasBeenSet(false),
m_size(0),
m_sizeHasBeenSet(false),
m_hashesHasBeenSet(false)
{
*this = jsonValue;
}
AssetSummary& AssetSummary::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("name"))
{
m_name = jsonValue.GetString("name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("size"))
{
m_size = jsonValue.GetInt64("size");
m_sizeHasBeenSet = true;
}
if(jsonValue.ValueExists("hashes"))
{
Aws::Map<Aws::String, JsonView> hashesJsonMap = jsonValue.GetObject("hashes").GetAllObjects();
for(auto& hashesItem : hashesJsonMap)
{
m_hashes[HashAlgorithmMapper::GetHashAlgorithmForName(hashesItem.first)] = hashesItem.second.AsString();
}
m_hashesHasBeenSet = true;
}
return *this;
}
JsonValue AssetSummary::Jsonize() const
{
JsonValue payload;
if(m_nameHasBeenSet)
{
payload.WithString("name", m_name);
}
if(m_sizeHasBeenSet)
{
payload.WithInt64("size", m_size);
}
if(m_hashesHasBeenSet)
{
JsonValue hashesJsonMap;
for(auto& hashesItem : m_hashes)
{
hashesJsonMap.WithString(HashAlgorithmMapper::GetNameForHashAlgorithm(hashesItem.first), hashesItem.second);
}
payload.WithObject("hashes", std::move(hashesJsonMap));
}
return payload;
}
} // namespace Model
} // namespace CodeArtifact
} // namespace Aws

View File

@@ -0,0 +1,65 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/AssociateExternalConnectionRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
AssociateExternalConnectionRequest::AssociateExternalConnectionRequest() :
m_domainHasBeenSet(false),
m_domainOwnerHasBeenSet(false),
m_repositoryHasBeenSet(false),
m_externalConnectionHasBeenSet(false)
{
}
Aws::String AssociateExternalConnectionRequest::SerializePayload() const
{
return {};
}
void AssociateExternalConnectionRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_domainHasBeenSet)
{
ss << m_domain;
uri.AddQueryStringParameter("domain", ss.str());
ss.str("");
}
if(m_domainOwnerHasBeenSet)
{
ss << m_domainOwner;
uri.AddQueryStringParameter("domain-owner", ss.str());
ss.str("");
}
if(m_repositoryHasBeenSet)
{
ss << m_repository;
uri.AddQueryStringParameter("repository", ss.str());
ss.str("");
}
if(m_externalConnectionHasBeenSet)
{
ss << m_externalConnection;
uri.AddQueryStringParameter("external-connection", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/AssociateExternalConnectionResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
AssociateExternalConnectionResult::AssociateExternalConnectionResult()
{
}
AssociateExternalConnectionResult::AssociateExternalConnectionResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
AssociateExternalConnectionResult& AssociateExternalConnectionResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("repository"))
{
m_repository = jsonValue.GetObject("repository");
}
return *this;
}

View File

@@ -0,0 +1,90 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/ConflictException.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CodeArtifact
{
namespace Model
{
ConflictException::ConflictException() :
m_messageHasBeenSet(false),
m_resourceIdHasBeenSet(false),
m_resourceType(ResourceType::NOT_SET),
m_resourceTypeHasBeenSet(false)
{
}
ConflictException::ConflictException(JsonView jsonValue) :
m_messageHasBeenSet(false),
m_resourceIdHasBeenSet(false),
m_resourceType(ResourceType::NOT_SET),
m_resourceTypeHasBeenSet(false)
{
*this = jsonValue;
}
ConflictException& ConflictException::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("message"))
{
m_message = jsonValue.GetString("message");
m_messageHasBeenSet = true;
}
if(jsonValue.ValueExists("resourceId"))
{
m_resourceId = jsonValue.GetString("resourceId");
m_resourceIdHasBeenSet = true;
}
if(jsonValue.ValueExists("resourceType"))
{
m_resourceType = ResourceTypeMapper::GetResourceTypeForName(jsonValue.GetString("resourceType"));
m_resourceTypeHasBeenSet = true;
}
return *this;
}
JsonValue ConflictException::Jsonize() const
{
JsonValue payload;
if(m_messageHasBeenSet)
{
payload.WithString("message", m_message);
}
if(m_resourceIdHasBeenSet)
{
payload.WithString("resourceId", m_resourceId);
}
if(m_resourceTypeHasBeenSet)
{
payload.WithString("resourceType", ResourceTypeMapper::GetNameForResourceType(m_resourceType));
}
return payload;
}
} // namespace Model
} // namespace CodeArtifact
} // namespace Aws

View File

@@ -0,0 +1,132 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/CopyPackageVersionsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
CopyPackageVersionsRequest::CopyPackageVersionsRequest() :
m_domainHasBeenSet(false),
m_domainOwnerHasBeenSet(false),
m_sourceRepositoryHasBeenSet(false),
m_destinationRepositoryHasBeenSet(false),
m_format(PackageFormat::NOT_SET),
m_formatHasBeenSet(false),
m_namespaceHasBeenSet(false),
m_packageHasBeenSet(false),
m_versionsHasBeenSet(false),
m_versionRevisionsHasBeenSet(false),
m_allowOverwrite(false),
m_allowOverwriteHasBeenSet(false),
m_includeFromUpstream(false),
m_includeFromUpstreamHasBeenSet(false)
{
}
Aws::String CopyPackageVersionsRequest::SerializePayload() const
{
JsonValue payload;
if(m_versionsHasBeenSet)
{
Array<JsonValue> versionsJsonList(m_versions.size());
for(unsigned versionsIndex = 0; versionsIndex < versionsJsonList.GetLength(); ++versionsIndex)
{
versionsJsonList[versionsIndex].AsString(m_versions[versionsIndex]);
}
payload.WithArray("versions", std::move(versionsJsonList));
}
if(m_versionRevisionsHasBeenSet)
{
JsonValue versionRevisionsJsonMap;
for(auto& versionRevisionsItem : m_versionRevisions)
{
versionRevisionsJsonMap.WithString(versionRevisionsItem.first, versionRevisionsItem.second);
}
payload.WithObject("versionRevisions", std::move(versionRevisionsJsonMap));
}
if(m_allowOverwriteHasBeenSet)
{
payload.WithBool("allowOverwrite", m_allowOverwrite);
}
if(m_includeFromUpstreamHasBeenSet)
{
payload.WithBool("includeFromUpstream", m_includeFromUpstream);
}
return payload.View().WriteReadable();
}
void CopyPackageVersionsRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_domainHasBeenSet)
{
ss << m_domain;
uri.AddQueryStringParameter("domain", ss.str());
ss.str("");
}
if(m_domainOwnerHasBeenSet)
{
ss << m_domainOwner;
uri.AddQueryStringParameter("domain-owner", ss.str());
ss.str("");
}
if(m_sourceRepositoryHasBeenSet)
{
ss << m_sourceRepository;
uri.AddQueryStringParameter("source-repository", ss.str());
ss.str("");
}
if(m_destinationRepositoryHasBeenSet)
{
ss << m_destinationRepository;
uri.AddQueryStringParameter("destination-repository", ss.str());
ss.str("");
}
if(m_formatHasBeenSet)
{
ss << PackageFormatMapper::GetNameForPackageFormat(m_format);
uri.AddQueryStringParameter("format", ss.str());
ss.str("");
}
if(m_namespaceHasBeenSet)
{
ss << m_namespace;
uri.AddQueryStringParameter("namespace", ss.str());
ss.str("");
}
if(m_packageHasBeenSet)
{
ss << m_package;
uri.AddQueryStringParameter("package", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,52 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/CopyPackageVersionsResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CopyPackageVersionsResult::CopyPackageVersionsResult()
{
}
CopyPackageVersionsResult::CopyPackageVersionsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CopyPackageVersionsResult& CopyPackageVersionsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("successfulVersions"))
{
Aws::Map<Aws::String, JsonView> successfulVersionsJsonMap = jsonValue.GetObject("successfulVersions").GetAllObjects();
for(auto& successfulVersionsItem : successfulVersionsJsonMap)
{
m_successfulVersions[successfulVersionsItem.first] = successfulVersionsItem.second.AsObject();
}
}
if(jsonValue.ValueExists("failedVersions"))
{
Aws::Map<Aws::String, JsonView> failedVersionsJsonMap = jsonValue.GetObject("failedVersions").GetAllObjects();
for(auto& failedVersionsItem : failedVersionsJsonMap)
{
m_failedVersions[failedVersionsItem.first] = failedVersionsItem.second.AsObject();
}
}
return *this;
}

View File

@@ -0,0 +1,50 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/CreateDomainRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
CreateDomainRequest::CreateDomainRequest() :
m_domainHasBeenSet(false),
m_encryptionKeyHasBeenSet(false)
{
}
Aws::String CreateDomainRequest::SerializePayload() const
{
JsonValue payload;
if(m_encryptionKeyHasBeenSet)
{
payload.WithString("encryptionKey", m_encryptionKey);
}
return payload.View().WriteReadable();
}
void CreateDomainRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_domainHasBeenSet)
{
ss << m_domain;
uri.AddQueryStringParameter("domain", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/CreateDomainResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateDomainResult::CreateDomainResult()
{
}
CreateDomainResult::CreateDomainResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreateDomainResult& CreateDomainResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("domain"))
{
m_domain = jsonValue.GetObject("domain");
}
return *this;
}

View File

@@ -0,0 +1,78 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/CreateRepositoryRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
CreateRepositoryRequest::CreateRepositoryRequest() :
m_domainHasBeenSet(false),
m_domainOwnerHasBeenSet(false),
m_repositoryHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_upstreamsHasBeenSet(false)
{
}
Aws::String CreateRepositoryRequest::SerializePayload() const
{
JsonValue payload;
if(m_descriptionHasBeenSet)
{
payload.WithString("description", m_description);
}
if(m_upstreamsHasBeenSet)
{
Array<JsonValue> upstreamsJsonList(m_upstreams.size());
for(unsigned upstreamsIndex = 0; upstreamsIndex < upstreamsJsonList.GetLength(); ++upstreamsIndex)
{
upstreamsJsonList[upstreamsIndex].AsObject(m_upstreams[upstreamsIndex].Jsonize());
}
payload.WithArray("upstreams", std::move(upstreamsJsonList));
}
return payload.View().WriteReadable();
}
void CreateRepositoryRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_domainHasBeenSet)
{
ss << m_domain;
uri.AddQueryStringParameter("domain", ss.str());
ss.str("");
}
if(m_domainOwnerHasBeenSet)
{
ss << m_domainOwner;
uri.AddQueryStringParameter("domain-owner", ss.str());
ss.str("");
}
if(m_repositoryHasBeenSet)
{
ss << m_repository;
uri.AddQueryStringParameter("repository", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/CreateRepositoryResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateRepositoryResult::CreateRepositoryResult()
{
}
CreateRepositoryResult::CreateRepositoryResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreateRepositoryResult& CreateRepositoryResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("repository"))
{
m_repository = jsonValue.GetObject("repository");
}
return *this;
}

View File

@@ -0,0 +1,57 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/DeleteDomainPermissionsPolicyRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
DeleteDomainPermissionsPolicyRequest::DeleteDomainPermissionsPolicyRequest() :
m_domainHasBeenSet(false),
m_domainOwnerHasBeenSet(false),
m_policyRevisionHasBeenSet(false)
{
}
Aws::String DeleteDomainPermissionsPolicyRequest::SerializePayload() const
{
return {};
}
void DeleteDomainPermissionsPolicyRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_domainHasBeenSet)
{
ss << m_domain;
uri.AddQueryStringParameter("domain", ss.str());
ss.str("");
}
if(m_domainOwnerHasBeenSet)
{
ss << m_domainOwner;
uri.AddQueryStringParameter("domain-owner", ss.str());
ss.str("");
}
if(m_policyRevisionHasBeenSet)
{
ss << m_policyRevision;
uri.AddQueryStringParameter("policy-revision", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/DeleteDomainPermissionsPolicyResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DeleteDomainPermissionsPolicyResult::DeleteDomainPermissionsPolicyResult()
{
}
DeleteDomainPermissionsPolicyResult::DeleteDomainPermissionsPolicyResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DeleteDomainPermissionsPolicyResult& DeleteDomainPermissionsPolicyResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("policy"))
{
m_policy = jsonValue.GetObject("policy");
}
return *this;
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/DeleteDomainRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
DeleteDomainRequest::DeleteDomainRequest() :
m_domainHasBeenSet(false),
m_domainOwnerHasBeenSet(false)
{
}
Aws::String DeleteDomainRequest::SerializePayload() const
{
return {};
}
void DeleteDomainRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_domainHasBeenSet)
{
ss << m_domain;
uri.AddQueryStringParameter("domain", ss.str());
ss.str("");
}
if(m_domainOwnerHasBeenSet)
{
ss << m_domainOwner;
uri.AddQueryStringParameter("domain-owner", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/DeleteDomainResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DeleteDomainResult::DeleteDomainResult()
{
}
DeleteDomainResult::DeleteDomainResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DeleteDomainResult& DeleteDomainResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("domain"))
{
m_domain = jsonValue.GetObject("domain");
}
return *this;
}

View File

@@ -0,0 +1,103 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/DeletePackageVersionsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
DeletePackageVersionsRequest::DeletePackageVersionsRequest() :
m_domainHasBeenSet(false),
m_domainOwnerHasBeenSet(false),
m_repositoryHasBeenSet(false),
m_format(PackageFormat::NOT_SET),
m_formatHasBeenSet(false),
m_namespaceHasBeenSet(false),
m_packageHasBeenSet(false),
m_versionsHasBeenSet(false),
m_expectedStatus(PackageVersionStatus::NOT_SET),
m_expectedStatusHasBeenSet(false)
{
}
Aws::String DeletePackageVersionsRequest::SerializePayload() const
{
JsonValue payload;
if(m_versionsHasBeenSet)
{
Array<JsonValue> versionsJsonList(m_versions.size());
for(unsigned versionsIndex = 0; versionsIndex < versionsJsonList.GetLength(); ++versionsIndex)
{
versionsJsonList[versionsIndex].AsString(m_versions[versionsIndex]);
}
payload.WithArray("versions", std::move(versionsJsonList));
}
if(m_expectedStatusHasBeenSet)
{
payload.WithString("expectedStatus", PackageVersionStatusMapper::GetNameForPackageVersionStatus(m_expectedStatus));
}
return payload.View().WriteReadable();
}
void DeletePackageVersionsRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_domainHasBeenSet)
{
ss << m_domain;
uri.AddQueryStringParameter("domain", ss.str());
ss.str("");
}
if(m_domainOwnerHasBeenSet)
{
ss << m_domainOwner;
uri.AddQueryStringParameter("domain-owner", ss.str());
ss.str("");
}
if(m_repositoryHasBeenSet)
{
ss << m_repository;
uri.AddQueryStringParameter("repository", ss.str());
ss.str("");
}
if(m_formatHasBeenSet)
{
ss << PackageFormatMapper::GetNameForPackageFormat(m_format);
uri.AddQueryStringParameter("format", ss.str());
ss.str("");
}
if(m_namespaceHasBeenSet)
{
ss << m_namespace;
uri.AddQueryStringParameter("namespace", ss.str());
ss.str("");
}
if(m_packageHasBeenSet)
{
ss << m_package;
uri.AddQueryStringParameter("package", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,52 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/DeletePackageVersionsResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DeletePackageVersionsResult::DeletePackageVersionsResult()
{
}
DeletePackageVersionsResult::DeletePackageVersionsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DeletePackageVersionsResult& DeletePackageVersionsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("successfulVersions"))
{
Aws::Map<Aws::String, JsonView> successfulVersionsJsonMap = jsonValue.GetObject("successfulVersions").GetAllObjects();
for(auto& successfulVersionsItem : successfulVersionsJsonMap)
{
m_successfulVersions[successfulVersionsItem.first] = successfulVersionsItem.second.AsObject();
}
}
if(jsonValue.ValueExists("failedVersions"))
{
Aws::Map<Aws::String, JsonView> failedVersionsJsonMap = jsonValue.GetObject("failedVersions").GetAllObjects();
for(auto& failedVersionsItem : failedVersionsJsonMap)
{
m_failedVersions[failedVersionsItem.first] = failedVersionsItem.second.AsObject();
}
}
return *this;
}

View File

@@ -0,0 +1,65 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/DeleteRepositoryPermissionsPolicyRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
DeleteRepositoryPermissionsPolicyRequest::DeleteRepositoryPermissionsPolicyRequest() :
m_domainHasBeenSet(false),
m_domainOwnerHasBeenSet(false),
m_repositoryHasBeenSet(false),
m_policyRevisionHasBeenSet(false)
{
}
Aws::String DeleteRepositoryPermissionsPolicyRequest::SerializePayload() const
{
return {};
}
void DeleteRepositoryPermissionsPolicyRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_domainHasBeenSet)
{
ss << m_domain;
uri.AddQueryStringParameter("domain", ss.str());
ss.str("");
}
if(m_domainOwnerHasBeenSet)
{
ss << m_domainOwner;
uri.AddQueryStringParameter("domain-owner", ss.str());
ss.str("");
}
if(m_repositoryHasBeenSet)
{
ss << m_repository;
uri.AddQueryStringParameter("repository", ss.str());
ss.str("");
}
if(m_policyRevisionHasBeenSet)
{
ss << m_policyRevision;
uri.AddQueryStringParameter("policy-revision", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/DeleteRepositoryPermissionsPolicyResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DeleteRepositoryPermissionsPolicyResult::DeleteRepositoryPermissionsPolicyResult()
{
}
DeleteRepositoryPermissionsPolicyResult::DeleteRepositoryPermissionsPolicyResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DeleteRepositoryPermissionsPolicyResult& DeleteRepositoryPermissionsPolicyResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("policy"))
{
m_policy = jsonValue.GetObject("policy");
}
return *this;
}

View File

@@ -0,0 +1,57 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/DeleteRepositoryRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
DeleteRepositoryRequest::DeleteRepositoryRequest() :
m_domainHasBeenSet(false),
m_domainOwnerHasBeenSet(false),
m_repositoryHasBeenSet(false)
{
}
Aws::String DeleteRepositoryRequest::SerializePayload() const
{
return {};
}
void DeleteRepositoryRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_domainHasBeenSet)
{
ss << m_domain;
uri.AddQueryStringParameter("domain", ss.str());
ss.str("");
}
if(m_domainOwnerHasBeenSet)
{
ss << m_domainOwner;
uri.AddQueryStringParameter("domain-owner", ss.str());
ss.str("");
}
if(m_repositoryHasBeenSet)
{
ss << m_repository;
uri.AddQueryStringParameter("repository", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/DeleteRepositoryResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DeleteRepositoryResult::DeleteRepositoryResult()
{
}
DeleteRepositoryResult::DeleteRepositoryResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DeleteRepositoryResult& DeleteRepositoryResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("repository"))
{
m_repository = jsonValue.GetObject("repository");
}
return *this;
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/DescribeDomainRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
DescribeDomainRequest::DescribeDomainRequest() :
m_domainHasBeenSet(false),
m_domainOwnerHasBeenSet(false)
{
}
Aws::String DescribeDomainRequest::SerializePayload() const
{
return {};
}
void DescribeDomainRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_domainHasBeenSet)
{
ss << m_domain;
uri.AddQueryStringParameter("domain", ss.str());
ss.str("");
}
if(m_domainOwnerHasBeenSet)
{
ss << m_domainOwner;
uri.AddQueryStringParameter("domain-owner", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/DescribeDomainResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DescribeDomainResult::DescribeDomainResult()
{
}
DescribeDomainResult::DescribeDomainResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DescribeDomainResult& DescribeDomainResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("domain"))
{
m_domain = jsonValue.GetObject("domain");
}
return *this;
}

View File

@@ -0,0 +1,90 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/DescribePackageVersionRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
DescribePackageVersionRequest::DescribePackageVersionRequest() :
m_domainHasBeenSet(false),
m_domainOwnerHasBeenSet(false),
m_repositoryHasBeenSet(false),
m_format(PackageFormat::NOT_SET),
m_formatHasBeenSet(false),
m_namespaceHasBeenSet(false),
m_packageHasBeenSet(false),
m_packageVersionHasBeenSet(false)
{
}
Aws::String DescribePackageVersionRequest::SerializePayload() const
{
return {};
}
void DescribePackageVersionRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_domainHasBeenSet)
{
ss << m_domain;
uri.AddQueryStringParameter("domain", ss.str());
ss.str("");
}
if(m_domainOwnerHasBeenSet)
{
ss << m_domainOwner;
uri.AddQueryStringParameter("domain-owner", ss.str());
ss.str("");
}
if(m_repositoryHasBeenSet)
{
ss << m_repository;
uri.AddQueryStringParameter("repository", ss.str());
ss.str("");
}
if(m_formatHasBeenSet)
{
ss << PackageFormatMapper::GetNameForPackageFormat(m_format);
uri.AddQueryStringParameter("format", ss.str());
ss.str("");
}
if(m_namespaceHasBeenSet)
{
ss << m_namespace;
uri.AddQueryStringParameter("namespace", ss.str());
ss.str("");
}
if(m_packageHasBeenSet)
{
ss << m_package;
uri.AddQueryStringParameter("package", ss.str());
ss.str("");
}
if(m_packageVersionHasBeenSet)
{
ss << m_packageVersion;
uri.AddQueryStringParameter("version", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/DescribePackageVersionResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DescribePackageVersionResult::DescribePackageVersionResult()
{
}
DescribePackageVersionResult::DescribePackageVersionResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DescribePackageVersionResult& DescribePackageVersionResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("packageVersion"))
{
m_packageVersion = jsonValue.GetObject("packageVersion");
}
return *this;
}

View File

@@ -0,0 +1,57 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/DescribeRepositoryRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
DescribeRepositoryRequest::DescribeRepositoryRequest() :
m_domainHasBeenSet(false),
m_domainOwnerHasBeenSet(false),
m_repositoryHasBeenSet(false)
{
}
Aws::String DescribeRepositoryRequest::SerializePayload() const
{
return {};
}
void DescribeRepositoryRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_domainHasBeenSet)
{
ss << m_domain;
uri.AddQueryStringParameter("domain", ss.str());
ss.str("");
}
if(m_domainOwnerHasBeenSet)
{
ss << m_domainOwner;
uri.AddQueryStringParameter("domain-owner", ss.str());
ss.str("");
}
if(m_repositoryHasBeenSet)
{
ss << m_repository;
uri.AddQueryStringParameter("repository", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/DescribeRepositoryResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DescribeRepositoryResult::DescribeRepositoryResult()
{
}
DescribeRepositoryResult::DescribeRepositoryResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DescribeRepositoryResult& DescribeRepositoryResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("repository"))
{
m_repository = jsonValue.GetObject("repository");
}
return *this;
}

View File

@@ -0,0 +1,65 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/DisassociateExternalConnectionRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
DisassociateExternalConnectionRequest::DisassociateExternalConnectionRequest() :
m_domainHasBeenSet(false),
m_domainOwnerHasBeenSet(false),
m_repositoryHasBeenSet(false),
m_externalConnectionHasBeenSet(false)
{
}
Aws::String DisassociateExternalConnectionRequest::SerializePayload() const
{
return {};
}
void DisassociateExternalConnectionRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_domainHasBeenSet)
{
ss << m_domain;
uri.AddQueryStringParameter("domain", ss.str());
ss.str("");
}
if(m_domainOwnerHasBeenSet)
{
ss << m_domainOwner;
uri.AddQueryStringParameter("domain-owner", ss.str());
ss.str("");
}
if(m_repositoryHasBeenSet)
{
ss << m_repository;
uri.AddQueryStringParameter("repository", ss.str());
ss.str("");
}
if(m_externalConnectionHasBeenSet)
{
ss << m_externalConnection;
uri.AddQueryStringParameter("external-connection", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/DisassociateExternalConnectionResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DisassociateExternalConnectionResult::DisassociateExternalConnectionResult()
{
}
DisassociateExternalConnectionResult::DisassociateExternalConnectionResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DisassociateExternalConnectionResult& DisassociateExternalConnectionResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("repository"))
{
m_repository = jsonValue.GetObject("repository");
}
return *this;
}

View File

@@ -0,0 +1,115 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/DisposePackageVersionsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
DisposePackageVersionsRequest::DisposePackageVersionsRequest() :
m_domainHasBeenSet(false),
m_domainOwnerHasBeenSet(false),
m_repositoryHasBeenSet(false),
m_format(PackageFormat::NOT_SET),
m_formatHasBeenSet(false),
m_namespaceHasBeenSet(false),
m_packageHasBeenSet(false),
m_versionsHasBeenSet(false),
m_versionRevisionsHasBeenSet(false),
m_expectedStatus(PackageVersionStatus::NOT_SET),
m_expectedStatusHasBeenSet(false)
{
}
Aws::String DisposePackageVersionsRequest::SerializePayload() const
{
JsonValue payload;
if(m_versionsHasBeenSet)
{
Array<JsonValue> versionsJsonList(m_versions.size());
for(unsigned versionsIndex = 0; versionsIndex < versionsJsonList.GetLength(); ++versionsIndex)
{
versionsJsonList[versionsIndex].AsString(m_versions[versionsIndex]);
}
payload.WithArray("versions", std::move(versionsJsonList));
}
if(m_versionRevisionsHasBeenSet)
{
JsonValue versionRevisionsJsonMap;
for(auto& versionRevisionsItem : m_versionRevisions)
{
versionRevisionsJsonMap.WithString(versionRevisionsItem.first, versionRevisionsItem.second);
}
payload.WithObject("versionRevisions", std::move(versionRevisionsJsonMap));
}
if(m_expectedStatusHasBeenSet)
{
payload.WithString("expectedStatus", PackageVersionStatusMapper::GetNameForPackageVersionStatus(m_expectedStatus));
}
return payload.View().WriteReadable();
}
void DisposePackageVersionsRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_domainHasBeenSet)
{
ss << m_domain;
uri.AddQueryStringParameter("domain", ss.str());
ss.str("");
}
if(m_domainOwnerHasBeenSet)
{
ss << m_domainOwner;
uri.AddQueryStringParameter("domain-owner", ss.str());
ss.str("");
}
if(m_repositoryHasBeenSet)
{
ss << m_repository;
uri.AddQueryStringParameter("repository", ss.str());
ss.str("");
}
if(m_formatHasBeenSet)
{
ss << PackageFormatMapper::GetNameForPackageFormat(m_format);
uri.AddQueryStringParameter("format", ss.str());
ss.str("");
}
if(m_namespaceHasBeenSet)
{
ss << m_namespace;
uri.AddQueryStringParameter("namespace", ss.str());
ss.str("");
}
if(m_packageHasBeenSet)
{
ss << m_package;
uri.AddQueryStringParameter("package", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,52 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/DisposePackageVersionsResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DisposePackageVersionsResult::DisposePackageVersionsResult()
{
}
DisposePackageVersionsResult::DisposePackageVersionsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DisposePackageVersionsResult& DisposePackageVersionsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("successfulVersions"))
{
Aws::Map<Aws::String, JsonView> successfulVersionsJsonMap = jsonValue.GetObject("successfulVersions").GetAllObjects();
for(auto& successfulVersionsItem : successfulVersionsJsonMap)
{
m_successfulVersions[successfulVersionsItem.first] = successfulVersionsItem.second.AsObject();
}
}
if(jsonValue.ValueExists("failedVersions"))
{
Aws::Map<Aws::String, JsonView> failedVersionsJsonMap = jsonValue.GetObject("failedVersions").GetAllObjects();
for(auto& failedVersionsItem : failedVersionsJsonMap)
{
m_failedVersions[failedVersionsItem.first] = failedVersionsItem.second.AsObject();
}
}
return *this;
}

View File

@@ -0,0 +1,168 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/DomainDescription.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CodeArtifact
{
namespace Model
{
DomainDescription::DomainDescription() :
m_nameHasBeenSet(false),
m_ownerHasBeenSet(false),
m_arnHasBeenSet(false),
m_status(DomainStatus::NOT_SET),
m_statusHasBeenSet(false),
m_createdTimeHasBeenSet(false),
m_encryptionKeyHasBeenSet(false),
m_repositoryCount(0),
m_repositoryCountHasBeenSet(false),
m_assetSizeBytes(0),
m_assetSizeBytesHasBeenSet(false)
{
}
DomainDescription::DomainDescription(JsonView jsonValue) :
m_nameHasBeenSet(false),
m_ownerHasBeenSet(false),
m_arnHasBeenSet(false),
m_status(DomainStatus::NOT_SET),
m_statusHasBeenSet(false),
m_createdTimeHasBeenSet(false),
m_encryptionKeyHasBeenSet(false),
m_repositoryCount(0),
m_repositoryCountHasBeenSet(false),
m_assetSizeBytes(0),
m_assetSizeBytesHasBeenSet(false)
{
*this = jsonValue;
}
DomainDescription& DomainDescription::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("name"))
{
m_name = jsonValue.GetString("name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("owner"))
{
m_owner = jsonValue.GetString("owner");
m_ownerHasBeenSet = true;
}
if(jsonValue.ValueExists("arn"))
{
m_arn = jsonValue.GetString("arn");
m_arnHasBeenSet = true;
}
if(jsonValue.ValueExists("status"))
{
m_status = DomainStatusMapper::GetDomainStatusForName(jsonValue.GetString("status"));
m_statusHasBeenSet = true;
}
if(jsonValue.ValueExists("createdTime"))
{
m_createdTime = jsonValue.GetDouble("createdTime");
m_createdTimeHasBeenSet = true;
}
if(jsonValue.ValueExists("encryptionKey"))
{
m_encryptionKey = jsonValue.GetString("encryptionKey");
m_encryptionKeyHasBeenSet = true;
}
if(jsonValue.ValueExists("repositoryCount"))
{
m_repositoryCount = jsonValue.GetInteger("repositoryCount");
m_repositoryCountHasBeenSet = true;
}
if(jsonValue.ValueExists("assetSizeBytes"))
{
m_assetSizeBytes = jsonValue.GetInt64("assetSizeBytes");
m_assetSizeBytesHasBeenSet = true;
}
return *this;
}
JsonValue DomainDescription::Jsonize() const
{
JsonValue payload;
if(m_nameHasBeenSet)
{
payload.WithString("name", m_name);
}
if(m_ownerHasBeenSet)
{
payload.WithString("owner", m_owner);
}
if(m_arnHasBeenSet)
{
payload.WithString("arn", m_arn);
}
if(m_statusHasBeenSet)
{
payload.WithString("status", DomainStatusMapper::GetNameForDomainStatus(m_status));
}
if(m_createdTimeHasBeenSet)
{
payload.WithDouble("createdTime", m_createdTime.SecondsWithMSPrecision());
}
if(m_encryptionKeyHasBeenSet)
{
payload.WithString("encryptionKey", m_encryptionKey);
}
if(m_repositoryCountHasBeenSet)
{
payload.WithInteger("repositoryCount", m_repositoryCount);
}
if(m_assetSizeBytesHasBeenSet)
{
payload.WithInt64("assetSizeBytes", m_assetSizeBytes);
}
return payload;
}
} // namespace Model
} // namespace CodeArtifact
} // namespace Aws

View File

@@ -0,0 +1,70 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/DomainStatus.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace CodeArtifact
{
namespace Model
{
namespace DomainStatusMapper
{
static const int Active_HASH = HashingUtils::HashString("Active");
static const int Deleted_HASH = HashingUtils::HashString("Deleted");
DomainStatus GetDomainStatusForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == Active_HASH)
{
return DomainStatus::Active;
}
else if (hashCode == Deleted_HASH)
{
return DomainStatus::Deleted;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<DomainStatus>(hashCode);
}
return DomainStatus::NOT_SET;
}
Aws::String GetNameForDomainStatus(DomainStatus enumValue)
{
switch(enumValue)
{
case DomainStatus::Active:
return "Active";
case DomainStatus::Deleted:
return "Deleted";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace DomainStatusMapper
} // namespace Model
} // namespace CodeArtifact
} // namespace Aws

View File

@@ -0,0 +1,134 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/DomainSummary.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CodeArtifact
{
namespace Model
{
DomainSummary::DomainSummary() :
m_nameHasBeenSet(false),
m_ownerHasBeenSet(false),
m_arnHasBeenSet(false),
m_status(DomainStatus::NOT_SET),
m_statusHasBeenSet(false),
m_createdTimeHasBeenSet(false),
m_encryptionKeyHasBeenSet(false)
{
}
DomainSummary::DomainSummary(JsonView jsonValue) :
m_nameHasBeenSet(false),
m_ownerHasBeenSet(false),
m_arnHasBeenSet(false),
m_status(DomainStatus::NOT_SET),
m_statusHasBeenSet(false),
m_createdTimeHasBeenSet(false),
m_encryptionKeyHasBeenSet(false)
{
*this = jsonValue;
}
DomainSummary& DomainSummary::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("name"))
{
m_name = jsonValue.GetString("name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("owner"))
{
m_owner = jsonValue.GetString("owner");
m_ownerHasBeenSet = true;
}
if(jsonValue.ValueExists("arn"))
{
m_arn = jsonValue.GetString("arn");
m_arnHasBeenSet = true;
}
if(jsonValue.ValueExists("status"))
{
m_status = DomainStatusMapper::GetDomainStatusForName(jsonValue.GetString("status"));
m_statusHasBeenSet = true;
}
if(jsonValue.ValueExists("createdTime"))
{
m_createdTime = jsonValue.GetDouble("createdTime");
m_createdTimeHasBeenSet = true;
}
if(jsonValue.ValueExists("encryptionKey"))
{
m_encryptionKey = jsonValue.GetString("encryptionKey");
m_encryptionKeyHasBeenSet = true;
}
return *this;
}
JsonValue DomainSummary::Jsonize() const
{
JsonValue payload;
if(m_nameHasBeenSet)
{
payload.WithString("name", m_name);
}
if(m_ownerHasBeenSet)
{
payload.WithString("owner", m_owner);
}
if(m_arnHasBeenSet)
{
payload.WithString("arn", m_arn);
}
if(m_statusHasBeenSet)
{
payload.WithString("status", DomainStatusMapper::GetNameForDomainStatus(m_status));
}
if(m_createdTimeHasBeenSet)
{
payload.WithDouble("createdTime", m_createdTime.SecondsWithMSPrecision());
}
if(m_encryptionKeyHasBeenSet)
{
payload.WithString("encryptionKey", m_encryptionKey);
}
return payload;
}
} // namespace Model
} // namespace CodeArtifact
} // namespace Aws

View File

@@ -0,0 +1,63 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/ExternalConnectionStatus.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace CodeArtifact
{
namespace Model
{
namespace ExternalConnectionStatusMapper
{
static const int Available_HASH = HashingUtils::HashString("Available");
ExternalConnectionStatus GetExternalConnectionStatusForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == Available_HASH)
{
return ExternalConnectionStatus::Available;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<ExternalConnectionStatus>(hashCode);
}
return ExternalConnectionStatus::NOT_SET;
}
Aws::String GetNameForExternalConnectionStatus(ExternalConnectionStatus enumValue)
{
switch(enumValue)
{
case ExternalConnectionStatus::Available:
return "Available";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace ExternalConnectionStatusMapper
} // namespace Model
} // namespace CodeArtifact
} // namespace Aws

View File

@@ -0,0 +1,58 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/GetAuthorizationTokenRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
GetAuthorizationTokenRequest::GetAuthorizationTokenRequest() :
m_domainHasBeenSet(false),
m_domainOwnerHasBeenSet(false),
m_durationSeconds(0),
m_durationSecondsHasBeenSet(false)
{
}
Aws::String GetAuthorizationTokenRequest::SerializePayload() const
{
return {};
}
void GetAuthorizationTokenRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_domainHasBeenSet)
{
ss << m_domain;
uri.AddQueryStringParameter("domain", ss.str());
ss.str("");
}
if(m_domainOwnerHasBeenSet)
{
ss << m_domainOwner;
uri.AddQueryStringParameter("domain-owner", ss.str());
ss.str("");
}
if(m_durationSecondsHasBeenSet)
{
ss << m_durationSeconds;
uri.AddQueryStringParameter("duration", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,46 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/GetAuthorizationTokenResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
GetAuthorizationTokenResult::GetAuthorizationTokenResult()
{
}
GetAuthorizationTokenResult::GetAuthorizationTokenResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
GetAuthorizationTokenResult& GetAuthorizationTokenResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("authorizationToken"))
{
m_authorizationToken = jsonValue.GetString("authorizationToken");
}
if(jsonValue.ValueExists("expiration"))
{
m_expiration = jsonValue.GetDouble("expiration");
}
return *this;
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/GetDomainPermissionsPolicyRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
GetDomainPermissionsPolicyRequest::GetDomainPermissionsPolicyRequest() :
m_domainHasBeenSet(false),
m_domainOwnerHasBeenSet(false)
{
}
Aws::String GetDomainPermissionsPolicyRequest::SerializePayload() const
{
return {};
}
void GetDomainPermissionsPolicyRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_domainHasBeenSet)
{
ss << m_domain;
uri.AddQueryStringParameter("domain", ss.str());
ss.str("");
}
if(m_domainOwnerHasBeenSet)
{
ss << m_domainOwner;
uri.AddQueryStringParameter("domain-owner", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/GetDomainPermissionsPolicyResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
GetDomainPermissionsPolicyResult::GetDomainPermissionsPolicyResult()
{
}
GetDomainPermissionsPolicyResult::GetDomainPermissionsPolicyResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
GetDomainPermissionsPolicyResult& GetDomainPermissionsPolicyResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("policy"))
{
m_policy = jsonValue.GetObject("policy");
}
return *this;
}

View File

@@ -0,0 +1,106 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/GetPackageVersionAssetRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
GetPackageVersionAssetRequest::GetPackageVersionAssetRequest() :
m_domainHasBeenSet(false),
m_domainOwnerHasBeenSet(false),
m_repositoryHasBeenSet(false),
m_format(PackageFormat::NOT_SET),
m_formatHasBeenSet(false),
m_namespaceHasBeenSet(false),
m_packageHasBeenSet(false),
m_packageVersionHasBeenSet(false),
m_assetHasBeenSet(false),
m_packageVersionRevisionHasBeenSet(false)
{
}
Aws::String GetPackageVersionAssetRequest::SerializePayload() const
{
return {};
}
void GetPackageVersionAssetRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_domainHasBeenSet)
{
ss << m_domain;
uri.AddQueryStringParameter("domain", ss.str());
ss.str("");
}
if(m_domainOwnerHasBeenSet)
{
ss << m_domainOwner;
uri.AddQueryStringParameter("domain-owner", ss.str());
ss.str("");
}
if(m_repositoryHasBeenSet)
{
ss << m_repository;
uri.AddQueryStringParameter("repository", ss.str());
ss.str("");
}
if(m_formatHasBeenSet)
{
ss << PackageFormatMapper::GetNameForPackageFormat(m_format);
uri.AddQueryStringParameter("format", ss.str());
ss.str("");
}
if(m_namespaceHasBeenSet)
{
ss << m_namespace;
uri.AddQueryStringParameter("namespace", ss.str());
ss.str("");
}
if(m_packageHasBeenSet)
{
ss << m_package;
uri.AddQueryStringParameter("package", ss.str());
ss.str("");
}
if(m_packageVersionHasBeenSet)
{
ss << m_packageVersion;
uri.AddQueryStringParameter("version", ss.str());
ss.str("");
}
if(m_assetHasBeenSet)
{
ss << m_asset;
uri.AddQueryStringParameter("asset", ss.str());
ss.str("");
}
if(m_packageVersionRevisionHasBeenSet)
{
ss << m_packageVersionRevision;
uri.AddQueryStringParameter("revision", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,75 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/GetPackageVersionAssetResult.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Stream;
using namespace Aws::Utils;
using namespace Aws;
GetPackageVersionAssetResult::GetPackageVersionAssetResult()
{
}
GetPackageVersionAssetResult::GetPackageVersionAssetResult(GetPackageVersionAssetResult&& toMove) :
m_asset(std::move(toMove.m_asset)),
m_assetName(std::move(toMove.m_assetName)),
m_packageVersion(std::move(toMove.m_packageVersion)),
m_packageVersionRevision(std::move(toMove.m_packageVersionRevision))
{
}
GetPackageVersionAssetResult& GetPackageVersionAssetResult::operator=(GetPackageVersionAssetResult&& toMove)
{
if(this == &toMove)
{
return *this;
}
m_asset = std::move(toMove.m_asset);
m_assetName = std::move(toMove.m_assetName);
m_packageVersion = std::move(toMove.m_packageVersion);
m_packageVersionRevision = std::move(toMove.m_packageVersionRevision);
return *this;
}
GetPackageVersionAssetResult::GetPackageVersionAssetResult(Aws::AmazonWebServiceResult<ResponseStream>&& result)
{
*this = std::move(result);
}
GetPackageVersionAssetResult& GetPackageVersionAssetResult::operator =(Aws::AmazonWebServiceResult<ResponseStream>&& result)
{
m_asset = result.TakeOwnershipOfPayload();
const auto& headers = result.GetHeaderValueCollection();
const auto& assetNameIter = headers.find("x-assetname");
if(assetNameIter != headers.end())
{
m_assetName = assetNameIter->second;
}
const auto& packageVersionIter = headers.find("x-packageversion");
if(packageVersionIter != headers.end())
{
m_packageVersion = packageVersionIter->second;
}
const auto& packageVersionRevisionIter = headers.find("x-packageversionrevision");
if(packageVersionRevisionIter != headers.end())
{
m_packageVersionRevision = packageVersionRevisionIter->second;
}
return *this;
}

View File

@@ -0,0 +1,90 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/GetPackageVersionReadmeRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
GetPackageVersionReadmeRequest::GetPackageVersionReadmeRequest() :
m_domainHasBeenSet(false),
m_domainOwnerHasBeenSet(false),
m_repositoryHasBeenSet(false),
m_format(PackageFormat::NOT_SET),
m_formatHasBeenSet(false),
m_namespaceHasBeenSet(false),
m_packageHasBeenSet(false),
m_packageVersionHasBeenSet(false)
{
}
Aws::String GetPackageVersionReadmeRequest::SerializePayload() const
{
return {};
}
void GetPackageVersionReadmeRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_domainHasBeenSet)
{
ss << m_domain;
uri.AddQueryStringParameter("domain", ss.str());
ss.str("");
}
if(m_domainOwnerHasBeenSet)
{
ss << m_domainOwner;
uri.AddQueryStringParameter("domain-owner", ss.str());
ss.str("");
}
if(m_repositoryHasBeenSet)
{
ss << m_repository;
uri.AddQueryStringParameter("repository", ss.str());
ss.str("");
}
if(m_formatHasBeenSet)
{
ss << PackageFormatMapper::GetNameForPackageFormat(m_format);
uri.AddQueryStringParameter("format", ss.str());
ss.str("");
}
if(m_namespaceHasBeenSet)
{
ss << m_namespace;
uri.AddQueryStringParameter("namespace", ss.str());
ss.str("");
}
if(m_packageHasBeenSet)
{
ss << m_package;
uri.AddQueryStringParameter("package", ss.str());
ss.str("");
}
if(m_packageVersionHasBeenSet)
{
ss << m_packageVersion;
uri.AddQueryStringParameter("version", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,72 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/GetPackageVersionReadmeResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
GetPackageVersionReadmeResult::GetPackageVersionReadmeResult() :
m_format(PackageFormat::NOT_SET)
{
}
GetPackageVersionReadmeResult::GetPackageVersionReadmeResult(const Aws::AmazonWebServiceResult<JsonValue>& result) :
m_format(PackageFormat::NOT_SET)
{
*this = result;
}
GetPackageVersionReadmeResult& GetPackageVersionReadmeResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("format"))
{
m_format = PackageFormatMapper::GetPackageFormatForName(jsonValue.GetString("format"));
}
if(jsonValue.ValueExists("namespace"))
{
m_namespace = jsonValue.GetString("namespace");
}
if(jsonValue.ValueExists("package"))
{
m_package = jsonValue.GetString("package");
}
if(jsonValue.ValueExists("version"))
{
m_version = jsonValue.GetString("version");
}
if(jsonValue.ValueExists("versionRevision"))
{
m_versionRevision = jsonValue.GetString("versionRevision");
}
if(jsonValue.ValueExists("readme"))
{
m_readme = jsonValue.GetString("readme");
}
return *this;
}

View File

@@ -0,0 +1,66 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/GetRepositoryEndpointRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
GetRepositoryEndpointRequest::GetRepositoryEndpointRequest() :
m_domainHasBeenSet(false),
m_domainOwnerHasBeenSet(false),
m_repositoryHasBeenSet(false),
m_format(PackageFormat::NOT_SET),
m_formatHasBeenSet(false)
{
}
Aws::String GetRepositoryEndpointRequest::SerializePayload() const
{
return {};
}
void GetRepositoryEndpointRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_domainHasBeenSet)
{
ss << m_domain;
uri.AddQueryStringParameter("domain", ss.str());
ss.str("");
}
if(m_domainOwnerHasBeenSet)
{
ss << m_domainOwner;
uri.AddQueryStringParameter("domain-owner", ss.str());
ss.str("");
}
if(m_repositoryHasBeenSet)
{
ss << m_repository;
uri.AddQueryStringParameter("repository", ss.str());
ss.str("");
}
if(m_formatHasBeenSet)
{
ss << PackageFormatMapper::GetNameForPackageFormat(m_format);
uri.AddQueryStringParameter("format", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/GetRepositoryEndpointResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
GetRepositoryEndpointResult::GetRepositoryEndpointResult()
{
}
GetRepositoryEndpointResult::GetRepositoryEndpointResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
GetRepositoryEndpointResult& GetRepositoryEndpointResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("repositoryEndpoint"))
{
m_repositoryEndpoint = jsonValue.GetString("repositoryEndpoint");
}
return *this;
}

View File

@@ -0,0 +1,57 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/GetRepositoryPermissionsPolicyRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
GetRepositoryPermissionsPolicyRequest::GetRepositoryPermissionsPolicyRequest() :
m_domainHasBeenSet(false),
m_domainOwnerHasBeenSet(false),
m_repositoryHasBeenSet(false)
{
}
Aws::String GetRepositoryPermissionsPolicyRequest::SerializePayload() const
{
return {};
}
void GetRepositoryPermissionsPolicyRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_domainHasBeenSet)
{
ss << m_domain;
uri.AddQueryStringParameter("domain", ss.str());
ss.str("");
}
if(m_domainOwnerHasBeenSet)
{
ss << m_domainOwner;
uri.AddQueryStringParameter("domain-owner", ss.str());
ss.str("");
}
if(m_repositoryHasBeenSet)
{
ss << m_repository;
uri.AddQueryStringParameter("repository", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/GetRepositoryPermissionsPolicyResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
GetRepositoryPermissionsPolicyResult::GetRepositoryPermissionsPolicyResult()
{
}
GetRepositoryPermissionsPolicyResult::GetRepositoryPermissionsPolicyResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
GetRepositoryPermissionsPolicyResult& GetRepositoryPermissionsPolicyResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("policy"))
{
m_policy = jsonValue.GetObject("policy");
}
return *this;
}

View File

@@ -0,0 +1,84 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/HashAlgorithm.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace CodeArtifact
{
namespace Model
{
namespace HashAlgorithmMapper
{
static const int MD5_HASH = HashingUtils::HashString("MD5");
static const int SHA_1_HASH = HashingUtils::HashString("SHA-1");
static const int SHA_256_HASH = HashingUtils::HashString("SHA-256");
static const int SHA_512_HASH = HashingUtils::HashString("SHA-512");
HashAlgorithm GetHashAlgorithmForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == MD5_HASH)
{
return HashAlgorithm::MD5;
}
else if (hashCode == SHA_1_HASH)
{
return HashAlgorithm::SHA_1;
}
else if (hashCode == SHA_256_HASH)
{
return HashAlgorithm::SHA_256;
}
else if (hashCode == SHA_512_HASH)
{
return HashAlgorithm::SHA_512;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<HashAlgorithm>(hashCode);
}
return HashAlgorithm::NOT_SET;
}
Aws::String GetNameForHashAlgorithm(HashAlgorithm enumValue)
{
switch(enumValue)
{
case HashAlgorithm::MD5:
return "MD5";
case HashAlgorithm::SHA_1:
return "SHA-1";
case HashAlgorithm::SHA_256:
return "SHA-256";
case HashAlgorithm::SHA_512:
return "SHA-512";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace HashAlgorithmMapper
} // namespace Model
} // namespace CodeArtifact
} // namespace Aws

View File

@@ -0,0 +1,74 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/LicenseInfo.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CodeArtifact
{
namespace Model
{
LicenseInfo::LicenseInfo() :
m_nameHasBeenSet(false),
m_urlHasBeenSet(false)
{
}
LicenseInfo::LicenseInfo(JsonView jsonValue) :
m_nameHasBeenSet(false),
m_urlHasBeenSet(false)
{
*this = jsonValue;
}
LicenseInfo& LicenseInfo::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("name"))
{
m_name = jsonValue.GetString("name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("url"))
{
m_url = jsonValue.GetString("url");
m_urlHasBeenSet = true;
}
return *this;
}
JsonValue LicenseInfo::Jsonize() const
{
JsonValue payload;
if(m_nameHasBeenSet)
{
payload.WithString("name", m_name);
}
if(m_urlHasBeenSet)
{
payload.WithString("url", m_url);
}
return payload;
}
} // namespace Model
} // namespace CodeArtifact
} // namespace Aws

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/ListDomainsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
ListDomainsRequest::ListDomainsRequest() :
m_maxResults(0),
m_maxResultsHasBeenSet(false),
m_nextTokenHasBeenSet(false)
{
}
Aws::String ListDomainsRequest::SerializePayload() const
{
JsonValue payload;
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("maxResults", m_maxResults);
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("nextToken", m_nextToken);
}
return payload.View().WriteReadable();
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/ListDomainsResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
ListDomainsResult::ListDomainsResult()
{
}
ListDomainsResult::ListDomainsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListDomainsResult& ListDomainsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("domains"))
{
Array<JsonView> domainsJsonList = jsonValue.GetArray("domains");
for(unsigned domainsIndex = 0; domainsIndex < domainsJsonList.GetLength(); ++domainsIndex)
{
m_domains.push_back(domainsJsonList[domainsIndex].AsObject());
}
}
if(jsonValue.ValueExists("nextToken"))
{
m_nextToken = jsonValue.GetString("nextToken");
}
return *this;
}

View File

@@ -0,0 +1,107 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/ListPackageVersionAssetsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
ListPackageVersionAssetsRequest::ListPackageVersionAssetsRequest() :
m_domainHasBeenSet(false),
m_domainOwnerHasBeenSet(false),
m_repositoryHasBeenSet(false),
m_format(PackageFormat::NOT_SET),
m_formatHasBeenSet(false),
m_namespaceHasBeenSet(false),
m_packageHasBeenSet(false),
m_packageVersionHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false),
m_nextTokenHasBeenSet(false)
{
}
Aws::String ListPackageVersionAssetsRequest::SerializePayload() const
{
return {};
}
void ListPackageVersionAssetsRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_domainHasBeenSet)
{
ss << m_domain;
uri.AddQueryStringParameter("domain", ss.str());
ss.str("");
}
if(m_domainOwnerHasBeenSet)
{
ss << m_domainOwner;
uri.AddQueryStringParameter("domain-owner", ss.str());
ss.str("");
}
if(m_repositoryHasBeenSet)
{
ss << m_repository;
uri.AddQueryStringParameter("repository", ss.str());
ss.str("");
}
if(m_formatHasBeenSet)
{
ss << PackageFormatMapper::GetNameForPackageFormat(m_format);
uri.AddQueryStringParameter("format", ss.str());
ss.str("");
}
if(m_namespaceHasBeenSet)
{
ss << m_namespace;
uri.AddQueryStringParameter("namespace", ss.str());
ss.str("");
}
if(m_packageHasBeenSet)
{
ss << m_package;
uri.AddQueryStringParameter("package", ss.str());
ss.str("");
}
if(m_packageVersionHasBeenSet)
{
ss << m_packageVersion;
uri.AddQueryStringParameter("version", ss.str());
ss.str("");
}
if(m_maxResultsHasBeenSet)
{
ss << m_maxResults;
uri.AddQueryStringParameter("max-results", ss.str());
ss.str("");
}
if(m_nextTokenHasBeenSet)
{
ss << m_nextToken;
uri.AddQueryStringParameter("next-token", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,81 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/ListPackageVersionAssetsResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
ListPackageVersionAssetsResult::ListPackageVersionAssetsResult() :
m_format(PackageFormat::NOT_SET)
{
}
ListPackageVersionAssetsResult::ListPackageVersionAssetsResult(const Aws::AmazonWebServiceResult<JsonValue>& result) :
m_format(PackageFormat::NOT_SET)
{
*this = result;
}
ListPackageVersionAssetsResult& ListPackageVersionAssetsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("format"))
{
m_format = PackageFormatMapper::GetPackageFormatForName(jsonValue.GetString("format"));
}
if(jsonValue.ValueExists("namespace"))
{
m_namespace = jsonValue.GetString("namespace");
}
if(jsonValue.ValueExists("package"))
{
m_package = jsonValue.GetString("package");
}
if(jsonValue.ValueExists("version"))
{
m_version = jsonValue.GetString("version");
}
if(jsonValue.ValueExists("versionRevision"))
{
m_versionRevision = jsonValue.GetString("versionRevision");
}
if(jsonValue.ValueExists("nextToken"))
{
m_nextToken = jsonValue.GetString("nextToken");
}
if(jsonValue.ValueExists("assets"))
{
Array<JsonView> assetsJsonList = jsonValue.GetArray("assets");
for(unsigned assetsIndex = 0; assetsIndex < assetsJsonList.GetLength(); ++assetsIndex)
{
m_assets.push_back(assetsJsonList[assetsIndex].AsObject());
}
}
return *this;
}

View File

@@ -0,0 +1,98 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/ListPackageVersionDependenciesRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
ListPackageVersionDependenciesRequest::ListPackageVersionDependenciesRequest() :
m_domainHasBeenSet(false),
m_domainOwnerHasBeenSet(false),
m_repositoryHasBeenSet(false),
m_format(PackageFormat::NOT_SET),
m_formatHasBeenSet(false),
m_namespaceHasBeenSet(false),
m_packageHasBeenSet(false),
m_packageVersionHasBeenSet(false),
m_nextTokenHasBeenSet(false)
{
}
Aws::String ListPackageVersionDependenciesRequest::SerializePayload() const
{
return {};
}
void ListPackageVersionDependenciesRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_domainHasBeenSet)
{
ss << m_domain;
uri.AddQueryStringParameter("domain", ss.str());
ss.str("");
}
if(m_domainOwnerHasBeenSet)
{
ss << m_domainOwner;
uri.AddQueryStringParameter("domain-owner", ss.str());
ss.str("");
}
if(m_repositoryHasBeenSet)
{
ss << m_repository;
uri.AddQueryStringParameter("repository", ss.str());
ss.str("");
}
if(m_formatHasBeenSet)
{
ss << PackageFormatMapper::GetNameForPackageFormat(m_format);
uri.AddQueryStringParameter("format", ss.str());
ss.str("");
}
if(m_namespaceHasBeenSet)
{
ss << m_namespace;
uri.AddQueryStringParameter("namespace", ss.str());
ss.str("");
}
if(m_packageHasBeenSet)
{
ss << m_package;
uri.AddQueryStringParameter("package", ss.str());
ss.str("");
}
if(m_packageVersionHasBeenSet)
{
ss << m_packageVersion;
uri.AddQueryStringParameter("version", ss.str());
ss.str("");
}
if(m_nextTokenHasBeenSet)
{
ss << m_nextToken;
uri.AddQueryStringParameter("next-token", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,81 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/ListPackageVersionDependenciesResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
ListPackageVersionDependenciesResult::ListPackageVersionDependenciesResult() :
m_format(PackageFormat::NOT_SET)
{
}
ListPackageVersionDependenciesResult::ListPackageVersionDependenciesResult(const Aws::AmazonWebServiceResult<JsonValue>& result) :
m_format(PackageFormat::NOT_SET)
{
*this = result;
}
ListPackageVersionDependenciesResult& ListPackageVersionDependenciesResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("format"))
{
m_format = PackageFormatMapper::GetPackageFormatForName(jsonValue.GetString("format"));
}
if(jsonValue.ValueExists("namespace"))
{
m_namespace = jsonValue.GetString("namespace");
}
if(jsonValue.ValueExists("package"))
{
m_package = jsonValue.GetString("package");
}
if(jsonValue.ValueExists("version"))
{
m_version = jsonValue.GetString("version");
}
if(jsonValue.ValueExists("versionRevision"))
{
m_versionRevision = jsonValue.GetString("versionRevision");
}
if(jsonValue.ValueExists("nextToken"))
{
m_nextToken = jsonValue.GetString("nextToken");
}
if(jsonValue.ValueExists("dependencies"))
{
Array<JsonView> dependenciesJsonList = jsonValue.GetArray("dependencies");
for(unsigned dependenciesIndex = 0; dependenciesIndex < dependenciesJsonList.GetLength(); ++dependenciesIndex)
{
m_dependencies.push_back(dependenciesJsonList[dependenciesIndex].AsObject());
}
}
return *this;
}

View File

@@ -0,0 +1,117 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/ListPackageVersionsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
ListPackageVersionsRequest::ListPackageVersionsRequest() :
m_domainHasBeenSet(false),
m_domainOwnerHasBeenSet(false),
m_repositoryHasBeenSet(false),
m_format(PackageFormat::NOT_SET),
m_formatHasBeenSet(false),
m_namespaceHasBeenSet(false),
m_packageHasBeenSet(false),
m_status(PackageVersionStatus::NOT_SET),
m_statusHasBeenSet(false),
m_sortBy(PackageVersionSortType::NOT_SET),
m_sortByHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false),
m_nextTokenHasBeenSet(false)
{
}
Aws::String ListPackageVersionsRequest::SerializePayload() const
{
return {};
}
void ListPackageVersionsRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_domainHasBeenSet)
{
ss << m_domain;
uri.AddQueryStringParameter("domain", ss.str());
ss.str("");
}
if(m_domainOwnerHasBeenSet)
{
ss << m_domainOwner;
uri.AddQueryStringParameter("domain-owner", ss.str());
ss.str("");
}
if(m_repositoryHasBeenSet)
{
ss << m_repository;
uri.AddQueryStringParameter("repository", ss.str());
ss.str("");
}
if(m_formatHasBeenSet)
{
ss << PackageFormatMapper::GetNameForPackageFormat(m_format);
uri.AddQueryStringParameter("format", ss.str());
ss.str("");
}
if(m_namespaceHasBeenSet)
{
ss << m_namespace;
uri.AddQueryStringParameter("namespace", ss.str());
ss.str("");
}
if(m_packageHasBeenSet)
{
ss << m_package;
uri.AddQueryStringParameter("package", ss.str());
ss.str("");
}
if(m_statusHasBeenSet)
{
ss << PackageVersionStatusMapper::GetNameForPackageVersionStatus(m_status);
uri.AddQueryStringParameter("status", ss.str());
ss.str("");
}
if(m_sortByHasBeenSet)
{
ss << PackageVersionSortTypeMapper::GetNameForPackageVersionSortType(m_sortBy);
uri.AddQueryStringParameter("sortBy", ss.str());
ss.str("");
}
if(m_maxResultsHasBeenSet)
{
ss << m_maxResults;
uri.AddQueryStringParameter("max-results", ss.str());
ss.str("");
}
if(m_nextTokenHasBeenSet)
{
ss << m_nextToken;
uri.AddQueryStringParameter("next-token", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,75 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/ListPackageVersionsResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
ListPackageVersionsResult::ListPackageVersionsResult() :
m_format(PackageFormat::NOT_SET)
{
}
ListPackageVersionsResult::ListPackageVersionsResult(const Aws::AmazonWebServiceResult<JsonValue>& result) :
m_format(PackageFormat::NOT_SET)
{
*this = result;
}
ListPackageVersionsResult& ListPackageVersionsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("defaultDisplayVersion"))
{
m_defaultDisplayVersion = jsonValue.GetString("defaultDisplayVersion");
}
if(jsonValue.ValueExists("format"))
{
m_format = PackageFormatMapper::GetPackageFormatForName(jsonValue.GetString("format"));
}
if(jsonValue.ValueExists("namespace"))
{
m_namespace = jsonValue.GetString("namespace");
}
if(jsonValue.ValueExists("package"))
{
m_package = jsonValue.GetString("package");
}
if(jsonValue.ValueExists("versions"))
{
Array<JsonView> versionsJsonList = jsonValue.GetArray("versions");
for(unsigned versionsIndex = 0; versionsIndex < versionsJsonList.GetLength(); ++versionsIndex)
{
m_versions.push_back(versionsJsonList[versionsIndex].AsObject());
}
}
if(jsonValue.ValueExists("nextToken"))
{
m_nextToken = jsonValue.GetString("nextToken");
}
return *this;
}

View File

@@ -0,0 +1,99 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/ListPackagesRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
ListPackagesRequest::ListPackagesRequest() :
m_domainHasBeenSet(false),
m_domainOwnerHasBeenSet(false),
m_repositoryHasBeenSet(false),
m_format(PackageFormat::NOT_SET),
m_formatHasBeenSet(false),
m_namespaceHasBeenSet(false),
m_packagePrefixHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false),
m_nextTokenHasBeenSet(false)
{
}
Aws::String ListPackagesRequest::SerializePayload() const
{
return {};
}
void ListPackagesRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_domainHasBeenSet)
{
ss << m_domain;
uri.AddQueryStringParameter("domain", ss.str());
ss.str("");
}
if(m_domainOwnerHasBeenSet)
{
ss << m_domainOwner;
uri.AddQueryStringParameter("domain-owner", ss.str());
ss.str("");
}
if(m_repositoryHasBeenSet)
{
ss << m_repository;
uri.AddQueryStringParameter("repository", ss.str());
ss.str("");
}
if(m_formatHasBeenSet)
{
ss << PackageFormatMapper::GetNameForPackageFormat(m_format);
uri.AddQueryStringParameter("format", ss.str());
ss.str("");
}
if(m_namespaceHasBeenSet)
{
ss << m_namespace;
uri.AddQueryStringParameter("namespace", ss.str());
ss.str("");
}
if(m_packagePrefixHasBeenSet)
{
ss << m_packagePrefix;
uri.AddQueryStringParameter("package-prefix", ss.str());
ss.str("");
}
if(m_maxResultsHasBeenSet)
{
ss << m_maxResults;
uri.AddQueryStringParameter("max-results", ss.str());
ss.str("");
}
if(m_nextTokenHasBeenSet)
{
ss << m_nextToken;
uri.AddQueryStringParameter("next-token", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/ListPackagesResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
ListPackagesResult::ListPackagesResult()
{
}
ListPackagesResult::ListPackagesResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListPackagesResult& ListPackagesResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("packages"))
{
Array<JsonView> packagesJsonList = jsonValue.GetArray("packages");
for(unsigned packagesIndex = 0; packagesIndex < packagesJsonList.GetLength(); ++packagesIndex)
{
m_packages.push_back(packagesJsonList[packagesIndex].AsObject());
}
}
if(jsonValue.ValueExists("nextToken"))
{
m_nextToken = jsonValue.GetString("nextToken");
}
return *this;
}

View File

@@ -0,0 +1,82 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/ListRepositoriesInDomainRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
ListRepositoriesInDomainRequest::ListRepositoriesInDomainRequest() :
m_domainHasBeenSet(false),
m_domainOwnerHasBeenSet(false),
m_administratorAccountHasBeenSet(false),
m_repositoryPrefixHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false),
m_nextTokenHasBeenSet(false)
{
}
Aws::String ListRepositoriesInDomainRequest::SerializePayload() const
{
return {};
}
void ListRepositoriesInDomainRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_domainHasBeenSet)
{
ss << m_domain;
uri.AddQueryStringParameter("domain", ss.str());
ss.str("");
}
if(m_domainOwnerHasBeenSet)
{
ss << m_domainOwner;
uri.AddQueryStringParameter("domain-owner", ss.str());
ss.str("");
}
if(m_administratorAccountHasBeenSet)
{
ss << m_administratorAccount;
uri.AddQueryStringParameter("administrator-account", ss.str());
ss.str("");
}
if(m_repositoryPrefixHasBeenSet)
{
ss << m_repositoryPrefix;
uri.AddQueryStringParameter("repository-prefix", ss.str());
ss.str("");
}
if(m_maxResultsHasBeenSet)
{
ss << m_maxResults;
uri.AddQueryStringParameter("max-results", ss.str());
ss.str("");
}
if(m_nextTokenHasBeenSet)
{
ss << m_nextToken;
uri.AddQueryStringParameter("next-token", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/ListRepositoriesInDomainResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
ListRepositoriesInDomainResult::ListRepositoriesInDomainResult()
{
}
ListRepositoriesInDomainResult::ListRepositoriesInDomainResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListRepositoriesInDomainResult& ListRepositoriesInDomainResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("repositories"))
{
Array<JsonView> repositoriesJsonList = jsonValue.GetArray("repositories");
for(unsigned repositoriesIndex = 0; repositoriesIndex < repositoriesJsonList.GetLength(); ++repositoriesIndex)
{
m_repositories.push_back(repositoriesJsonList[repositoriesIndex].AsObject());
}
}
if(jsonValue.ValueExists("nextToken"))
{
m_nextToken = jsonValue.GetString("nextToken");
}
return *this;
}

View File

@@ -0,0 +1,58 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/ListRepositoriesRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
ListRepositoriesRequest::ListRepositoriesRequest() :
m_repositoryPrefixHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false),
m_nextTokenHasBeenSet(false)
{
}
Aws::String ListRepositoriesRequest::SerializePayload() const
{
return {};
}
void ListRepositoriesRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_repositoryPrefixHasBeenSet)
{
ss << m_repositoryPrefix;
uri.AddQueryStringParameter("repository-prefix", ss.str());
ss.str("");
}
if(m_maxResultsHasBeenSet)
{
ss << m_maxResults;
uri.AddQueryStringParameter("max-results", ss.str());
ss.str("");
}
if(m_nextTokenHasBeenSet)
{
ss << m_nextToken;
uri.AddQueryStringParameter("next-token", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/ListRepositoriesResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
ListRepositoriesResult::ListRepositoriesResult()
{
}
ListRepositoriesResult::ListRepositoriesResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListRepositoriesResult& ListRepositoriesResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("repositories"))
{
Array<JsonView> repositoriesJsonList = jsonValue.GetArray("repositories");
for(unsigned repositoriesIndex = 0; repositoriesIndex < repositoriesJsonList.GetLength(); ++repositoriesIndex)
{
m_repositories.push_back(repositoriesJsonList[repositoriesIndex].AsObject());
}
}
if(jsonValue.ValueExists("nextToken"))
{
m_nextToken = jsonValue.GetString("nextToken");
}
return *this;
}

View File

@@ -0,0 +1,104 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/PackageDependency.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CodeArtifact
{
namespace Model
{
PackageDependency::PackageDependency() :
m_namespaceHasBeenSet(false),
m_packageHasBeenSet(false),
m_dependencyTypeHasBeenSet(false),
m_versionRequirementHasBeenSet(false)
{
}
PackageDependency::PackageDependency(JsonView jsonValue) :
m_namespaceHasBeenSet(false),
m_packageHasBeenSet(false),
m_dependencyTypeHasBeenSet(false),
m_versionRequirementHasBeenSet(false)
{
*this = jsonValue;
}
PackageDependency& PackageDependency::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("namespace"))
{
m_namespace = jsonValue.GetString("namespace");
m_namespaceHasBeenSet = true;
}
if(jsonValue.ValueExists("package"))
{
m_package = jsonValue.GetString("package");
m_packageHasBeenSet = true;
}
if(jsonValue.ValueExists("dependencyType"))
{
m_dependencyType = jsonValue.GetString("dependencyType");
m_dependencyTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("versionRequirement"))
{
m_versionRequirement = jsonValue.GetString("versionRequirement");
m_versionRequirementHasBeenSet = true;
}
return *this;
}
JsonValue PackageDependency::Jsonize() const
{
JsonValue payload;
if(m_namespaceHasBeenSet)
{
payload.WithString("namespace", m_namespace);
}
if(m_packageHasBeenSet)
{
payload.WithString("package", m_package);
}
if(m_dependencyTypeHasBeenSet)
{
payload.WithString("dependencyType", m_dependencyType);
}
if(m_versionRequirementHasBeenSet)
{
payload.WithString("versionRequirement", m_versionRequirement);
}
return payload;
}
} // namespace Model
} // namespace CodeArtifact
} // namespace Aws

View File

@@ -0,0 +1,77 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/PackageFormat.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace CodeArtifact
{
namespace Model
{
namespace PackageFormatMapper
{
static const int npm_HASH = HashingUtils::HashString("npm");
static const int pypi_HASH = HashingUtils::HashString("pypi");
static const int maven_HASH = HashingUtils::HashString("maven");
PackageFormat GetPackageFormatForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == npm_HASH)
{
return PackageFormat::npm;
}
else if (hashCode == pypi_HASH)
{
return PackageFormat::pypi;
}
else if (hashCode == maven_HASH)
{
return PackageFormat::maven;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<PackageFormat>(hashCode);
}
return PackageFormat::NOT_SET;
}
Aws::String GetNameForPackageFormat(PackageFormat enumValue)
{
switch(enumValue)
{
case PackageFormat::npm:
return "npm";
case PackageFormat::pypi:
return "pypi";
case PackageFormat::maven:
return "maven";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace PackageFormatMapper
} // namespace Model
} // namespace CodeArtifact
} // namespace Aws

View File

@@ -0,0 +1,90 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/PackageSummary.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CodeArtifact
{
namespace Model
{
PackageSummary::PackageSummary() :
m_format(PackageFormat::NOT_SET),
m_formatHasBeenSet(false),
m_namespaceHasBeenSet(false),
m_packageHasBeenSet(false)
{
}
PackageSummary::PackageSummary(JsonView jsonValue) :
m_format(PackageFormat::NOT_SET),
m_formatHasBeenSet(false),
m_namespaceHasBeenSet(false),
m_packageHasBeenSet(false)
{
*this = jsonValue;
}
PackageSummary& PackageSummary::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("format"))
{
m_format = PackageFormatMapper::GetPackageFormatForName(jsonValue.GetString("format"));
m_formatHasBeenSet = true;
}
if(jsonValue.ValueExists("namespace"))
{
m_namespace = jsonValue.GetString("namespace");
m_namespaceHasBeenSet = true;
}
if(jsonValue.ValueExists("package"))
{
m_package = jsonValue.GetString("package");
m_packageHasBeenSet = true;
}
return *this;
}
JsonValue PackageSummary::Jsonize() const
{
JsonValue payload;
if(m_formatHasBeenSet)
{
payload.WithString("format", PackageFormatMapper::GetNameForPackageFormat(m_format));
}
if(m_namespaceHasBeenSet)
{
payload.WithString("namespace", m_namespace);
}
if(m_packageHasBeenSet)
{
payload.WithString("package", m_package);
}
return payload;
}
} // namespace Model
} // namespace CodeArtifact
} // namespace Aws

View File

@@ -0,0 +1,233 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/PackageVersionDescription.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CodeArtifact
{
namespace Model
{
PackageVersionDescription::PackageVersionDescription() :
m_format(PackageFormat::NOT_SET),
m_formatHasBeenSet(false),
m_namespaceHasBeenSet(false),
m_packageNameHasBeenSet(false),
m_displayNameHasBeenSet(false),
m_versionHasBeenSet(false),
m_summaryHasBeenSet(false),
m_homePageHasBeenSet(false),
m_sourceCodeRepositoryHasBeenSet(false),
m_publishedTimeHasBeenSet(false),
m_licensesHasBeenSet(false),
m_revisionHasBeenSet(false),
m_status(PackageVersionStatus::NOT_SET),
m_statusHasBeenSet(false)
{
}
PackageVersionDescription::PackageVersionDescription(JsonView jsonValue) :
m_format(PackageFormat::NOT_SET),
m_formatHasBeenSet(false),
m_namespaceHasBeenSet(false),
m_packageNameHasBeenSet(false),
m_displayNameHasBeenSet(false),
m_versionHasBeenSet(false),
m_summaryHasBeenSet(false),
m_homePageHasBeenSet(false),
m_sourceCodeRepositoryHasBeenSet(false),
m_publishedTimeHasBeenSet(false),
m_licensesHasBeenSet(false),
m_revisionHasBeenSet(false),
m_status(PackageVersionStatus::NOT_SET),
m_statusHasBeenSet(false)
{
*this = jsonValue;
}
PackageVersionDescription& PackageVersionDescription::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("format"))
{
m_format = PackageFormatMapper::GetPackageFormatForName(jsonValue.GetString("format"));
m_formatHasBeenSet = true;
}
if(jsonValue.ValueExists("namespace"))
{
m_namespace = jsonValue.GetString("namespace");
m_namespaceHasBeenSet = true;
}
if(jsonValue.ValueExists("packageName"))
{
m_packageName = jsonValue.GetString("packageName");
m_packageNameHasBeenSet = true;
}
if(jsonValue.ValueExists("displayName"))
{
m_displayName = jsonValue.GetString("displayName");
m_displayNameHasBeenSet = true;
}
if(jsonValue.ValueExists("version"))
{
m_version = jsonValue.GetString("version");
m_versionHasBeenSet = true;
}
if(jsonValue.ValueExists("summary"))
{
m_summary = jsonValue.GetString("summary");
m_summaryHasBeenSet = true;
}
if(jsonValue.ValueExists("homePage"))
{
m_homePage = jsonValue.GetString("homePage");
m_homePageHasBeenSet = true;
}
if(jsonValue.ValueExists("sourceCodeRepository"))
{
m_sourceCodeRepository = jsonValue.GetString("sourceCodeRepository");
m_sourceCodeRepositoryHasBeenSet = true;
}
if(jsonValue.ValueExists("publishedTime"))
{
m_publishedTime = jsonValue.GetDouble("publishedTime");
m_publishedTimeHasBeenSet = true;
}
if(jsonValue.ValueExists("licenses"))
{
Array<JsonView> licensesJsonList = jsonValue.GetArray("licenses");
for(unsigned licensesIndex = 0; licensesIndex < licensesJsonList.GetLength(); ++licensesIndex)
{
m_licenses.push_back(licensesJsonList[licensesIndex].AsObject());
}
m_licensesHasBeenSet = true;
}
if(jsonValue.ValueExists("revision"))
{
m_revision = jsonValue.GetString("revision");
m_revisionHasBeenSet = true;
}
if(jsonValue.ValueExists("status"))
{
m_status = PackageVersionStatusMapper::GetPackageVersionStatusForName(jsonValue.GetString("status"));
m_statusHasBeenSet = true;
}
return *this;
}
JsonValue PackageVersionDescription::Jsonize() const
{
JsonValue payload;
if(m_formatHasBeenSet)
{
payload.WithString("format", PackageFormatMapper::GetNameForPackageFormat(m_format));
}
if(m_namespaceHasBeenSet)
{
payload.WithString("namespace", m_namespace);
}
if(m_packageNameHasBeenSet)
{
payload.WithString("packageName", m_packageName);
}
if(m_displayNameHasBeenSet)
{
payload.WithString("displayName", m_displayName);
}
if(m_versionHasBeenSet)
{
payload.WithString("version", m_version);
}
if(m_summaryHasBeenSet)
{
payload.WithString("summary", m_summary);
}
if(m_homePageHasBeenSet)
{
payload.WithString("homePage", m_homePage);
}
if(m_sourceCodeRepositoryHasBeenSet)
{
payload.WithString("sourceCodeRepository", m_sourceCodeRepository);
}
if(m_publishedTimeHasBeenSet)
{
payload.WithDouble("publishedTime", m_publishedTime.SecondsWithMSPrecision());
}
if(m_licensesHasBeenSet)
{
Array<JsonValue> licensesJsonList(m_licenses.size());
for(unsigned licensesIndex = 0; licensesIndex < licensesJsonList.GetLength(); ++licensesIndex)
{
licensesJsonList[licensesIndex].AsObject(m_licenses[licensesIndex].Jsonize());
}
payload.WithArray("licenses", std::move(licensesJsonList));
}
if(m_revisionHasBeenSet)
{
payload.WithString("revision", m_revision);
}
if(m_statusHasBeenSet)
{
payload.WithString("status", PackageVersionStatusMapper::GetNameForPackageVersionStatus(m_status));
}
return payload;
}
} // namespace Model
} // namespace CodeArtifact
} // namespace Aws

View File

@@ -0,0 +1,75 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/PackageVersionError.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CodeArtifact
{
namespace Model
{
PackageVersionError::PackageVersionError() :
m_errorCode(PackageVersionErrorCode::NOT_SET),
m_errorCodeHasBeenSet(false),
m_errorMessageHasBeenSet(false)
{
}
PackageVersionError::PackageVersionError(JsonView jsonValue) :
m_errorCode(PackageVersionErrorCode::NOT_SET),
m_errorCodeHasBeenSet(false),
m_errorMessageHasBeenSet(false)
{
*this = jsonValue;
}
PackageVersionError& PackageVersionError::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("errorCode"))
{
m_errorCode = PackageVersionErrorCodeMapper::GetPackageVersionErrorCodeForName(jsonValue.GetString("errorCode"));
m_errorCodeHasBeenSet = true;
}
if(jsonValue.ValueExists("errorMessage"))
{
m_errorMessage = jsonValue.GetString("errorMessage");
m_errorMessageHasBeenSet = true;
}
return *this;
}
JsonValue PackageVersionError::Jsonize() const
{
JsonValue payload;
if(m_errorCodeHasBeenSet)
{
payload.WithString("errorCode", PackageVersionErrorCodeMapper::GetNameForPackageVersionErrorCode(m_errorCode));
}
if(m_errorMessageHasBeenSet)
{
payload.WithString("errorMessage", m_errorMessage);
}
return payload;
}
} // namespace Model
} // namespace CodeArtifact
} // namespace Aws

View File

@@ -0,0 +1,98 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/PackageVersionErrorCode.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace CodeArtifact
{
namespace Model
{
namespace PackageVersionErrorCodeMapper
{
static const int ALREADY_EXISTS_HASH = HashingUtils::HashString("ALREADY_EXISTS");
static const int MISMATCHED_REVISION_HASH = HashingUtils::HashString("MISMATCHED_REVISION");
static const int MISMATCHED_STATUS_HASH = HashingUtils::HashString("MISMATCHED_STATUS");
static const int NOT_ALLOWED_HASH = HashingUtils::HashString("NOT_ALLOWED");
static const int NOT_FOUND_HASH = HashingUtils::HashString("NOT_FOUND");
static const int SKIPPED_HASH = HashingUtils::HashString("SKIPPED");
PackageVersionErrorCode GetPackageVersionErrorCodeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == ALREADY_EXISTS_HASH)
{
return PackageVersionErrorCode::ALREADY_EXISTS;
}
else if (hashCode == MISMATCHED_REVISION_HASH)
{
return PackageVersionErrorCode::MISMATCHED_REVISION;
}
else if (hashCode == MISMATCHED_STATUS_HASH)
{
return PackageVersionErrorCode::MISMATCHED_STATUS;
}
else if (hashCode == NOT_ALLOWED_HASH)
{
return PackageVersionErrorCode::NOT_ALLOWED;
}
else if (hashCode == NOT_FOUND_HASH)
{
return PackageVersionErrorCode::NOT_FOUND;
}
else if (hashCode == SKIPPED_HASH)
{
return PackageVersionErrorCode::SKIPPED;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<PackageVersionErrorCode>(hashCode);
}
return PackageVersionErrorCode::NOT_SET;
}
Aws::String GetNameForPackageVersionErrorCode(PackageVersionErrorCode enumValue)
{
switch(enumValue)
{
case PackageVersionErrorCode::ALREADY_EXISTS:
return "ALREADY_EXISTS";
case PackageVersionErrorCode::MISMATCHED_REVISION:
return "MISMATCHED_REVISION";
case PackageVersionErrorCode::MISMATCHED_STATUS:
return "MISMATCHED_STATUS";
case PackageVersionErrorCode::NOT_ALLOWED:
return "NOT_ALLOWED";
case PackageVersionErrorCode::NOT_FOUND:
return "NOT_FOUND";
case PackageVersionErrorCode::SKIPPED:
return "SKIPPED";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace PackageVersionErrorCodeMapper
} // namespace Model
} // namespace CodeArtifact
} // namespace Aws

View File

@@ -0,0 +1,63 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/PackageVersionSortType.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace CodeArtifact
{
namespace Model
{
namespace PackageVersionSortTypeMapper
{
static const int PUBLISHED_TIME_HASH = HashingUtils::HashString("PUBLISHED_TIME");
PackageVersionSortType GetPackageVersionSortTypeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == PUBLISHED_TIME_HASH)
{
return PackageVersionSortType::PUBLISHED_TIME;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<PackageVersionSortType>(hashCode);
}
return PackageVersionSortType::NOT_SET;
}
Aws::String GetNameForPackageVersionSortType(PackageVersionSortType enumValue)
{
switch(enumValue)
{
case PackageVersionSortType::PUBLISHED_TIME:
return "PUBLISHED_TIME";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace PackageVersionSortTypeMapper
} // namespace Model
} // namespace CodeArtifact
} // namespace Aws

View File

@@ -0,0 +1,98 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/PackageVersionStatus.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace CodeArtifact
{
namespace Model
{
namespace PackageVersionStatusMapper
{
static const int Published_HASH = HashingUtils::HashString("Published");
static const int Unfinished_HASH = HashingUtils::HashString("Unfinished");
static const int Unlisted_HASH = HashingUtils::HashString("Unlisted");
static const int Archived_HASH = HashingUtils::HashString("Archived");
static const int Disposed_HASH = HashingUtils::HashString("Disposed");
static const int Deleted_HASH = HashingUtils::HashString("Deleted");
PackageVersionStatus GetPackageVersionStatusForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == Published_HASH)
{
return PackageVersionStatus::Published;
}
else if (hashCode == Unfinished_HASH)
{
return PackageVersionStatus::Unfinished;
}
else if (hashCode == Unlisted_HASH)
{
return PackageVersionStatus::Unlisted;
}
else if (hashCode == Archived_HASH)
{
return PackageVersionStatus::Archived;
}
else if (hashCode == Disposed_HASH)
{
return PackageVersionStatus::Disposed;
}
else if (hashCode == Deleted_HASH)
{
return PackageVersionStatus::Deleted;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<PackageVersionStatus>(hashCode);
}
return PackageVersionStatus::NOT_SET;
}
Aws::String GetNameForPackageVersionStatus(PackageVersionStatus enumValue)
{
switch(enumValue)
{
case PackageVersionStatus::Published:
return "Published";
case PackageVersionStatus::Unfinished:
return "Unfinished";
case PackageVersionStatus::Unlisted:
return "Unlisted";
case PackageVersionStatus::Archived:
return "Archived";
case PackageVersionStatus::Disposed:
return "Disposed";
case PackageVersionStatus::Deleted:
return "Deleted";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace PackageVersionStatusMapper
} // namespace Model
} // namespace CodeArtifact
} // namespace Aws

View File

@@ -0,0 +1,90 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/PackageVersionSummary.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CodeArtifact
{
namespace Model
{
PackageVersionSummary::PackageVersionSummary() :
m_versionHasBeenSet(false),
m_revisionHasBeenSet(false),
m_status(PackageVersionStatus::NOT_SET),
m_statusHasBeenSet(false)
{
}
PackageVersionSummary::PackageVersionSummary(JsonView jsonValue) :
m_versionHasBeenSet(false),
m_revisionHasBeenSet(false),
m_status(PackageVersionStatus::NOT_SET),
m_statusHasBeenSet(false)
{
*this = jsonValue;
}
PackageVersionSummary& PackageVersionSummary::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("version"))
{
m_version = jsonValue.GetString("version");
m_versionHasBeenSet = true;
}
if(jsonValue.ValueExists("revision"))
{
m_revision = jsonValue.GetString("revision");
m_revisionHasBeenSet = true;
}
if(jsonValue.ValueExists("status"))
{
m_status = PackageVersionStatusMapper::GetPackageVersionStatusForName(jsonValue.GetString("status"));
m_statusHasBeenSet = true;
}
return *this;
}
JsonValue PackageVersionSummary::Jsonize() const
{
JsonValue payload;
if(m_versionHasBeenSet)
{
payload.WithString("version", m_version);
}
if(m_revisionHasBeenSet)
{
payload.WithString("revision", m_revision);
}
if(m_statusHasBeenSet)
{
payload.WithString("status", PackageVersionStatusMapper::GetNameForPackageVersionStatus(m_status));
}
return payload;
}
} // namespace Model
} // namespace CodeArtifact
} // namespace Aws

View File

@@ -0,0 +1,56 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/PutDomainPermissionsPolicyRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
PutDomainPermissionsPolicyRequest::PutDomainPermissionsPolicyRequest() :
m_domainHasBeenSet(false),
m_domainOwnerHasBeenSet(false),
m_policyRevisionHasBeenSet(false),
m_policyDocumentHasBeenSet(false)
{
}
Aws::String PutDomainPermissionsPolicyRequest::SerializePayload() const
{
JsonValue payload;
if(m_domainHasBeenSet)
{
payload.WithString("domain", m_domain);
}
if(m_domainOwnerHasBeenSet)
{
payload.WithString("domainOwner", m_domainOwner);
}
if(m_policyRevisionHasBeenSet)
{
payload.WithString("policyRevision", m_policyRevision);
}
if(m_policyDocumentHasBeenSet)
{
payload.WithString("policyDocument", m_policyDocument);
}
return payload.View().WriteReadable();
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/PutDomainPermissionsPolicyResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
PutDomainPermissionsPolicyResult::PutDomainPermissionsPolicyResult()
{
}
PutDomainPermissionsPolicyResult::PutDomainPermissionsPolicyResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
PutDomainPermissionsPolicyResult& PutDomainPermissionsPolicyResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("policy"))
{
m_policy = jsonValue.GetObject("policy");
}
return *this;
}

View File

@@ -0,0 +1,73 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/PutRepositoryPermissionsPolicyRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
PutRepositoryPermissionsPolicyRequest::PutRepositoryPermissionsPolicyRequest() :
m_domainHasBeenSet(false),
m_domainOwnerHasBeenSet(false),
m_repositoryHasBeenSet(false),
m_policyRevisionHasBeenSet(false),
m_policyDocumentHasBeenSet(false)
{
}
Aws::String PutRepositoryPermissionsPolicyRequest::SerializePayload() const
{
JsonValue payload;
if(m_policyRevisionHasBeenSet)
{
payload.WithString("policyRevision", m_policyRevision);
}
if(m_policyDocumentHasBeenSet)
{
payload.WithString("policyDocument", m_policyDocument);
}
return payload.View().WriteReadable();
}
void PutRepositoryPermissionsPolicyRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_domainHasBeenSet)
{
ss << m_domain;
uri.AddQueryStringParameter("domain", ss.str());
ss.str("");
}
if(m_domainOwnerHasBeenSet)
{
ss << m_domainOwner;
uri.AddQueryStringParameter("domain-owner", ss.str());
ss.str("");
}
if(m_repositoryHasBeenSet)
{
ss << m_repository;
uri.AddQueryStringParameter("repository", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/PutRepositoryPermissionsPolicyResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
PutRepositoryPermissionsPolicyResult::PutRepositoryPermissionsPolicyResult()
{
}
PutRepositoryPermissionsPolicyResult::PutRepositoryPermissionsPolicyResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
PutRepositoryPermissionsPolicyResult& PutRepositoryPermissionsPolicyResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("policy"))
{
m_policy = jsonValue.GetObject("policy");
}
return *this;
}

View File

@@ -0,0 +1,180 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/RepositoryDescription.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CodeArtifact
{
namespace Model
{
RepositoryDescription::RepositoryDescription() :
m_nameHasBeenSet(false),
m_administratorAccountHasBeenSet(false),
m_domainNameHasBeenSet(false),
m_domainOwnerHasBeenSet(false),
m_arnHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_upstreamsHasBeenSet(false),
m_externalConnectionsHasBeenSet(false)
{
}
RepositoryDescription::RepositoryDescription(JsonView jsonValue) :
m_nameHasBeenSet(false),
m_administratorAccountHasBeenSet(false),
m_domainNameHasBeenSet(false),
m_domainOwnerHasBeenSet(false),
m_arnHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_upstreamsHasBeenSet(false),
m_externalConnectionsHasBeenSet(false)
{
*this = jsonValue;
}
RepositoryDescription& RepositoryDescription::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("name"))
{
m_name = jsonValue.GetString("name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("administratorAccount"))
{
m_administratorAccount = jsonValue.GetString("administratorAccount");
m_administratorAccountHasBeenSet = true;
}
if(jsonValue.ValueExists("domainName"))
{
m_domainName = jsonValue.GetString("domainName");
m_domainNameHasBeenSet = true;
}
if(jsonValue.ValueExists("domainOwner"))
{
m_domainOwner = jsonValue.GetString("domainOwner");
m_domainOwnerHasBeenSet = true;
}
if(jsonValue.ValueExists("arn"))
{
m_arn = jsonValue.GetString("arn");
m_arnHasBeenSet = true;
}
if(jsonValue.ValueExists("description"))
{
m_description = jsonValue.GetString("description");
m_descriptionHasBeenSet = true;
}
if(jsonValue.ValueExists("upstreams"))
{
Array<JsonView> upstreamsJsonList = jsonValue.GetArray("upstreams");
for(unsigned upstreamsIndex = 0; upstreamsIndex < upstreamsJsonList.GetLength(); ++upstreamsIndex)
{
m_upstreams.push_back(upstreamsJsonList[upstreamsIndex].AsObject());
}
m_upstreamsHasBeenSet = true;
}
if(jsonValue.ValueExists("externalConnections"))
{
Array<JsonView> externalConnectionsJsonList = jsonValue.GetArray("externalConnections");
for(unsigned externalConnectionsIndex = 0; externalConnectionsIndex < externalConnectionsJsonList.GetLength(); ++externalConnectionsIndex)
{
m_externalConnections.push_back(externalConnectionsJsonList[externalConnectionsIndex].AsObject());
}
m_externalConnectionsHasBeenSet = true;
}
return *this;
}
JsonValue RepositoryDescription::Jsonize() const
{
JsonValue payload;
if(m_nameHasBeenSet)
{
payload.WithString("name", m_name);
}
if(m_administratorAccountHasBeenSet)
{
payload.WithString("administratorAccount", m_administratorAccount);
}
if(m_domainNameHasBeenSet)
{
payload.WithString("domainName", m_domainName);
}
if(m_domainOwnerHasBeenSet)
{
payload.WithString("domainOwner", m_domainOwner);
}
if(m_arnHasBeenSet)
{
payload.WithString("arn", m_arn);
}
if(m_descriptionHasBeenSet)
{
payload.WithString("description", m_description);
}
if(m_upstreamsHasBeenSet)
{
Array<JsonValue> upstreamsJsonList(m_upstreams.size());
for(unsigned upstreamsIndex = 0; upstreamsIndex < upstreamsJsonList.GetLength(); ++upstreamsIndex)
{
upstreamsJsonList[upstreamsIndex].AsObject(m_upstreams[upstreamsIndex].Jsonize());
}
payload.WithArray("upstreams", std::move(upstreamsJsonList));
}
if(m_externalConnectionsHasBeenSet)
{
Array<JsonValue> externalConnectionsJsonList(m_externalConnections.size());
for(unsigned externalConnectionsIndex = 0; externalConnectionsIndex < externalConnectionsJsonList.GetLength(); ++externalConnectionsIndex)
{
externalConnectionsJsonList[externalConnectionsIndex].AsObject(m_externalConnections[externalConnectionsIndex].Jsonize());
}
payload.WithArray("externalConnections", std::move(externalConnectionsJsonList));
}
return payload;
}
} // namespace Model
} // namespace CodeArtifact
} // namespace Aws

View File

@@ -0,0 +1,91 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/RepositoryExternalConnectionInfo.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CodeArtifact
{
namespace Model
{
RepositoryExternalConnectionInfo::RepositoryExternalConnectionInfo() :
m_externalConnectionNameHasBeenSet(false),
m_packageFormat(PackageFormat::NOT_SET),
m_packageFormatHasBeenSet(false),
m_status(ExternalConnectionStatus::NOT_SET),
m_statusHasBeenSet(false)
{
}
RepositoryExternalConnectionInfo::RepositoryExternalConnectionInfo(JsonView jsonValue) :
m_externalConnectionNameHasBeenSet(false),
m_packageFormat(PackageFormat::NOT_SET),
m_packageFormatHasBeenSet(false),
m_status(ExternalConnectionStatus::NOT_SET),
m_statusHasBeenSet(false)
{
*this = jsonValue;
}
RepositoryExternalConnectionInfo& RepositoryExternalConnectionInfo::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("externalConnectionName"))
{
m_externalConnectionName = jsonValue.GetString("externalConnectionName");
m_externalConnectionNameHasBeenSet = true;
}
if(jsonValue.ValueExists("packageFormat"))
{
m_packageFormat = PackageFormatMapper::GetPackageFormatForName(jsonValue.GetString("packageFormat"));
m_packageFormatHasBeenSet = true;
}
if(jsonValue.ValueExists("status"))
{
m_status = ExternalConnectionStatusMapper::GetExternalConnectionStatusForName(jsonValue.GetString("status"));
m_statusHasBeenSet = true;
}
return *this;
}
JsonValue RepositoryExternalConnectionInfo::Jsonize() const
{
JsonValue payload;
if(m_externalConnectionNameHasBeenSet)
{
payload.WithString("externalConnectionName", m_externalConnectionName);
}
if(m_packageFormatHasBeenSet)
{
payload.WithString("packageFormat", PackageFormatMapper::GetNameForPackageFormat(m_packageFormat));
}
if(m_statusHasBeenSet)
{
payload.WithString("status", ExternalConnectionStatusMapper::GetNameForExternalConnectionStatus(m_status));
}
return payload;
}
} // namespace Model
} // namespace CodeArtifact
} // namespace Aws

View File

@@ -0,0 +1,134 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/RepositorySummary.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CodeArtifact
{
namespace Model
{
RepositorySummary::RepositorySummary() :
m_nameHasBeenSet(false),
m_administratorAccountHasBeenSet(false),
m_domainNameHasBeenSet(false),
m_domainOwnerHasBeenSet(false),
m_arnHasBeenSet(false),
m_descriptionHasBeenSet(false)
{
}
RepositorySummary::RepositorySummary(JsonView jsonValue) :
m_nameHasBeenSet(false),
m_administratorAccountHasBeenSet(false),
m_domainNameHasBeenSet(false),
m_domainOwnerHasBeenSet(false),
m_arnHasBeenSet(false),
m_descriptionHasBeenSet(false)
{
*this = jsonValue;
}
RepositorySummary& RepositorySummary::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("name"))
{
m_name = jsonValue.GetString("name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("administratorAccount"))
{
m_administratorAccount = jsonValue.GetString("administratorAccount");
m_administratorAccountHasBeenSet = true;
}
if(jsonValue.ValueExists("domainName"))
{
m_domainName = jsonValue.GetString("domainName");
m_domainNameHasBeenSet = true;
}
if(jsonValue.ValueExists("domainOwner"))
{
m_domainOwner = jsonValue.GetString("domainOwner");
m_domainOwnerHasBeenSet = true;
}
if(jsonValue.ValueExists("arn"))
{
m_arn = jsonValue.GetString("arn");
m_arnHasBeenSet = true;
}
if(jsonValue.ValueExists("description"))
{
m_description = jsonValue.GetString("description");
m_descriptionHasBeenSet = true;
}
return *this;
}
JsonValue RepositorySummary::Jsonize() const
{
JsonValue payload;
if(m_nameHasBeenSet)
{
payload.WithString("name", m_name);
}
if(m_administratorAccountHasBeenSet)
{
payload.WithString("administratorAccount", m_administratorAccount);
}
if(m_domainNameHasBeenSet)
{
payload.WithString("domainName", m_domainName);
}
if(m_domainOwnerHasBeenSet)
{
payload.WithString("domainOwner", m_domainOwner);
}
if(m_arnHasBeenSet)
{
payload.WithString("arn", m_arn);
}
if(m_descriptionHasBeenSet)
{
payload.WithString("description", m_description);
}
return payload;
}
} // namespace Model
} // namespace CodeArtifact
} // namespace Aws

View File

@@ -0,0 +1,90 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/ResourceNotFoundException.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CodeArtifact
{
namespace Model
{
ResourceNotFoundException::ResourceNotFoundException() :
m_messageHasBeenSet(false),
m_resourceIdHasBeenSet(false),
m_resourceType(ResourceType::NOT_SET),
m_resourceTypeHasBeenSet(false)
{
}
ResourceNotFoundException::ResourceNotFoundException(JsonView jsonValue) :
m_messageHasBeenSet(false),
m_resourceIdHasBeenSet(false),
m_resourceType(ResourceType::NOT_SET),
m_resourceTypeHasBeenSet(false)
{
*this = jsonValue;
}
ResourceNotFoundException& ResourceNotFoundException::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("message"))
{
m_message = jsonValue.GetString("message");
m_messageHasBeenSet = true;
}
if(jsonValue.ValueExists("resourceId"))
{
m_resourceId = jsonValue.GetString("resourceId");
m_resourceIdHasBeenSet = true;
}
if(jsonValue.ValueExists("resourceType"))
{
m_resourceType = ResourceTypeMapper::GetResourceTypeForName(jsonValue.GetString("resourceType"));
m_resourceTypeHasBeenSet = true;
}
return *this;
}
JsonValue ResourceNotFoundException::Jsonize() const
{
JsonValue payload;
if(m_messageHasBeenSet)
{
payload.WithString("message", m_message);
}
if(m_resourceIdHasBeenSet)
{
payload.WithString("resourceId", m_resourceId);
}
if(m_resourceTypeHasBeenSet)
{
payload.WithString("resourceType", ResourceTypeMapper::GetNameForResourceType(m_resourceType));
}
return payload;
}
} // namespace Model
} // namespace CodeArtifact
} // namespace Aws

View File

@@ -0,0 +1,89 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/ResourcePolicy.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CodeArtifact
{
namespace Model
{
ResourcePolicy::ResourcePolicy() :
m_resourceArnHasBeenSet(false),
m_revisionHasBeenSet(false),
m_documentHasBeenSet(false)
{
}
ResourcePolicy::ResourcePolicy(JsonView jsonValue) :
m_resourceArnHasBeenSet(false),
m_revisionHasBeenSet(false),
m_documentHasBeenSet(false)
{
*this = jsonValue;
}
ResourcePolicy& ResourcePolicy::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("resourceArn"))
{
m_resourceArn = jsonValue.GetString("resourceArn");
m_resourceArnHasBeenSet = true;
}
if(jsonValue.ValueExists("revision"))
{
m_revision = jsonValue.GetString("revision");
m_revisionHasBeenSet = true;
}
if(jsonValue.ValueExists("document"))
{
m_document = jsonValue.GetString("document");
m_documentHasBeenSet = true;
}
return *this;
}
JsonValue ResourcePolicy::Jsonize() const
{
JsonValue payload;
if(m_resourceArnHasBeenSet)
{
payload.WithString("resourceArn", m_resourceArn);
}
if(m_revisionHasBeenSet)
{
payload.WithString("revision", m_revision);
}
if(m_documentHasBeenSet)
{
payload.WithString("document", m_document);
}
return payload;
}
} // namespace Model
} // namespace CodeArtifact
} // namespace Aws

View File

@@ -0,0 +1,91 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/ResourceType.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace CodeArtifact
{
namespace Model
{
namespace ResourceTypeMapper
{
static const int domain_HASH = HashingUtils::HashString("domain");
static const int repository_HASH = HashingUtils::HashString("repository");
static const int package_HASH = HashingUtils::HashString("package");
static const int package_version_HASH = HashingUtils::HashString("package-version");
static const int asset_HASH = HashingUtils::HashString("asset");
ResourceType GetResourceTypeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == domain_HASH)
{
return ResourceType::domain;
}
else if (hashCode == repository_HASH)
{
return ResourceType::repository;
}
else if (hashCode == package_HASH)
{
return ResourceType::package;
}
else if (hashCode == package_version_HASH)
{
return ResourceType::package_version;
}
else if (hashCode == asset_HASH)
{
return ResourceType::asset;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<ResourceType>(hashCode);
}
return ResourceType::NOT_SET;
}
Aws::String GetNameForResourceType(ResourceType enumValue)
{
switch(enumValue)
{
case ResourceType::domain:
return "domain";
case ResourceType::repository:
return "repository";
case ResourceType::package:
return "package";
case ResourceType::package_version:
return "package-version";
case ResourceType::asset:
return "asset";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace ResourceTypeMapper
} // namespace Model
} // namespace CodeArtifact
} // namespace Aws

View File

@@ -0,0 +1,90 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/ServiceQuotaExceededException.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CodeArtifact
{
namespace Model
{
ServiceQuotaExceededException::ServiceQuotaExceededException() :
m_messageHasBeenSet(false),
m_resourceIdHasBeenSet(false),
m_resourceType(ResourceType::NOT_SET),
m_resourceTypeHasBeenSet(false)
{
}
ServiceQuotaExceededException::ServiceQuotaExceededException(JsonView jsonValue) :
m_messageHasBeenSet(false),
m_resourceIdHasBeenSet(false),
m_resourceType(ResourceType::NOT_SET),
m_resourceTypeHasBeenSet(false)
{
*this = jsonValue;
}
ServiceQuotaExceededException& ServiceQuotaExceededException::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("message"))
{
m_message = jsonValue.GetString("message");
m_messageHasBeenSet = true;
}
if(jsonValue.ValueExists("resourceId"))
{
m_resourceId = jsonValue.GetString("resourceId");
m_resourceIdHasBeenSet = true;
}
if(jsonValue.ValueExists("resourceType"))
{
m_resourceType = ResourceTypeMapper::GetResourceTypeForName(jsonValue.GetString("resourceType"));
m_resourceTypeHasBeenSet = true;
}
return *this;
}
JsonValue ServiceQuotaExceededException::Jsonize() const
{
JsonValue payload;
if(m_messageHasBeenSet)
{
payload.WithString("message", m_message);
}
if(m_resourceIdHasBeenSet)
{
payload.WithString("resourceId", m_resourceId);
}
if(m_resourceTypeHasBeenSet)
{
payload.WithString("resourceType", ResourceTypeMapper::GetNameForResourceType(m_resourceType));
}
return payload;
}
} // namespace Model
} // namespace CodeArtifact
} // namespace Aws

View File

@@ -0,0 +1,75 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/SuccessfulPackageVersionInfo.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CodeArtifact
{
namespace Model
{
SuccessfulPackageVersionInfo::SuccessfulPackageVersionInfo() :
m_revisionHasBeenSet(false),
m_status(PackageVersionStatus::NOT_SET),
m_statusHasBeenSet(false)
{
}
SuccessfulPackageVersionInfo::SuccessfulPackageVersionInfo(JsonView jsonValue) :
m_revisionHasBeenSet(false),
m_status(PackageVersionStatus::NOT_SET),
m_statusHasBeenSet(false)
{
*this = jsonValue;
}
SuccessfulPackageVersionInfo& SuccessfulPackageVersionInfo::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("revision"))
{
m_revision = jsonValue.GetString("revision");
m_revisionHasBeenSet = true;
}
if(jsonValue.ValueExists("status"))
{
m_status = PackageVersionStatusMapper::GetPackageVersionStatusForName(jsonValue.GetString("status"));
m_statusHasBeenSet = true;
}
return *this;
}
JsonValue SuccessfulPackageVersionInfo::Jsonize() const
{
JsonValue payload;
if(m_revisionHasBeenSet)
{
payload.WithString("revision", m_revision);
}
if(m_statusHasBeenSet)
{
payload.WithString("status", PackageVersionStatusMapper::GetNameForPackageVersionStatus(m_status));
}
return payload;
}
} // namespace Model
} // namespace CodeArtifact
} // namespace Aws

View File

@@ -0,0 +1,64 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/ThrottlingException.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CodeArtifact
{
namespace Model
{
ThrottlingException::ThrottlingException() :
m_messageHasBeenSet(false),
m_retryAfterSeconds(0),
m_retryAfterSecondsHasBeenSet(false)
{
}
ThrottlingException::ThrottlingException(JsonView jsonValue) :
m_messageHasBeenSet(false),
m_retryAfterSeconds(0),
m_retryAfterSecondsHasBeenSet(false)
{
*this = jsonValue;
}
ThrottlingException& ThrottlingException::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("message"))
{
m_message = jsonValue.GetString("message");
m_messageHasBeenSet = true;
}
return *this;
}
JsonValue ThrottlingException::Jsonize() const
{
JsonValue payload;
if(m_messageHasBeenSet)
{
payload.WithString("message", m_message);
}
return payload;
}
} // namespace Model
} // namespace CodeArtifact
} // namespace Aws

View File

@@ -0,0 +1,122 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/UpdatePackageVersionsStatusRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
UpdatePackageVersionsStatusRequest::UpdatePackageVersionsStatusRequest() :
m_domainHasBeenSet(false),
m_domainOwnerHasBeenSet(false),
m_repositoryHasBeenSet(false),
m_format(PackageFormat::NOT_SET),
m_formatHasBeenSet(false),
m_namespaceHasBeenSet(false),
m_packageHasBeenSet(false),
m_versionsHasBeenSet(false),
m_versionRevisionsHasBeenSet(false),
m_expectedStatus(PackageVersionStatus::NOT_SET),
m_expectedStatusHasBeenSet(false),
m_targetStatus(PackageVersionStatus::NOT_SET),
m_targetStatusHasBeenSet(false)
{
}
Aws::String UpdatePackageVersionsStatusRequest::SerializePayload() const
{
JsonValue payload;
if(m_versionsHasBeenSet)
{
Array<JsonValue> versionsJsonList(m_versions.size());
for(unsigned versionsIndex = 0; versionsIndex < versionsJsonList.GetLength(); ++versionsIndex)
{
versionsJsonList[versionsIndex].AsString(m_versions[versionsIndex]);
}
payload.WithArray("versions", std::move(versionsJsonList));
}
if(m_versionRevisionsHasBeenSet)
{
JsonValue versionRevisionsJsonMap;
for(auto& versionRevisionsItem : m_versionRevisions)
{
versionRevisionsJsonMap.WithString(versionRevisionsItem.first, versionRevisionsItem.second);
}
payload.WithObject("versionRevisions", std::move(versionRevisionsJsonMap));
}
if(m_expectedStatusHasBeenSet)
{
payload.WithString("expectedStatus", PackageVersionStatusMapper::GetNameForPackageVersionStatus(m_expectedStatus));
}
if(m_targetStatusHasBeenSet)
{
payload.WithString("targetStatus", PackageVersionStatusMapper::GetNameForPackageVersionStatus(m_targetStatus));
}
return payload.View().WriteReadable();
}
void UpdatePackageVersionsStatusRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_domainHasBeenSet)
{
ss << m_domain;
uri.AddQueryStringParameter("domain", ss.str());
ss.str("");
}
if(m_domainOwnerHasBeenSet)
{
ss << m_domainOwner;
uri.AddQueryStringParameter("domain-owner", ss.str());
ss.str("");
}
if(m_repositoryHasBeenSet)
{
ss << m_repository;
uri.AddQueryStringParameter("repository", ss.str());
ss.str("");
}
if(m_formatHasBeenSet)
{
ss << PackageFormatMapper::GetNameForPackageFormat(m_format);
uri.AddQueryStringParameter("format", ss.str());
ss.str("");
}
if(m_namespaceHasBeenSet)
{
ss << m_namespace;
uri.AddQueryStringParameter("namespace", ss.str());
ss.str("");
}
if(m_packageHasBeenSet)
{
ss << m_package;
uri.AddQueryStringParameter("package", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,52 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/UpdatePackageVersionsStatusResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
UpdatePackageVersionsStatusResult::UpdatePackageVersionsStatusResult()
{
}
UpdatePackageVersionsStatusResult::UpdatePackageVersionsStatusResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
UpdatePackageVersionsStatusResult& UpdatePackageVersionsStatusResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("successfulVersions"))
{
Aws::Map<Aws::String, JsonView> successfulVersionsJsonMap = jsonValue.GetObject("successfulVersions").GetAllObjects();
for(auto& successfulVersionsItem : successfulVersionsJsonMap)
{
m_successfulVersions[successfulVersionsItem.first] = successfulVersionsItem.second.AsObject();
}
}
if(jsonValue.ValueExists("failedVersions"))
{
Aws::Map<Aws::String, JsonView> failedVersionsJsonMap = jsonValue.GetObject("failedVersions").GetAllObjects();
for(auto& failedVersionsItem : failedVersionsJsonMap)
{
m_failedVersions[failedVersionsItem.first] = failedVersionsItem.second.AsObject();
}
}
return *this;
}

View File

@@ -0,0 +1,78 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/UpdateRepositoryRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/http/URI.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws::Http;
UpdateRepositoryRequest::UpdateRepositoryRequest() :
m_domainHasBeenSet(false),
m_domainOwnerHasBeenSet(false),
m_repositoryHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_upstreamsHasBeenSet(false)
{
}
Aws::String UpdateRepositoryRequest::SerializePayload() const
{
JsonValue payload;
if(m_descriptionHasBeenSet)
{
payload.WithString("description", m_description);
}
if(m_upstreamsHasBeenSet)
{
Array<JsonValue> upstreamsJsonList(m_upstreams.size());
for(unsigned upstreamsIndex = 0; upstreamsIndex < upstreamsJsonList.GetLength(); ++upstreamsIndex)
{
upstreamsJsonList[upstreamsIndex].AsObject(m_upstreams[upstreamsIndex].Jsonize());
}
payload.WithArray("upstreams", std::move(upstreamsJsonList));
}
return payload.View().WriteReadable();
}
void UpdateRepositoryRequest::AddQueryStringParameters(URI& uri) const
{
Aws::StringStream ss;
if(m_domainHasBeenSet)
{
ss << m_domain;
uri.AddQueryStringParameter("domain", ss.str());
ss.str("");
}
if(m_domainOwnerHasBeenSet)
{
ss << m_domainOwner;
uri.AddQueryStringParameter("domain-owner", ss.str());
ss.str("");
}
if(m_repositoryHasBeenSet)
{
ss << m_repository;
uri.AddQueryStringParameter("repository", ss.str());
ss.str("");
}
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/UpdateRepositoryResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::CodeArtifact::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
UpdateRepositoryResult::UpdateRepositoryResult()
{
}
UpdateRepositoryResult::UpdateRepositoryResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
UpdateRepositoryResult& UpdateRepositoryResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("repository"))
{
m_repository = jsonValue.GetObject("repository");
}
return *this;
}

View File

@@ -0,0 +1,59 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/UpstreamRepository.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CodeArtifact
{
namespace Model
{
UpstreamRepository::UpstreamRepository() :
m_repositoryNameHasBeenSet(false)
{
}
UpstreamRepository::UpstreamRepository(JsonView jsonValue) :
m_repositoryNameHasBeenSet(false)
{
*this = jsonValue;
}
UpstreamRepository& UpstreamRepository::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("repositoryName"))
{
m_repositoryName = jsonValue.GetString("repositoryName");
m_repositoryNameHasBeenSet = true;
}
return *this;
}
JsonValue UpstreamRepository::Jsonize() const
{
JsonValue payload;
if(m_repositoryNameHasBeenSet)
{
payload.WithString("repositoryName", m_repositoryName);
}
return payload;
}
} // namespace Model
} // namespace CodeArtifact
} // namespace Aws

View File

@@ -0,0 +1,59 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/UpstreamRepositoryInfo.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CodeArtifact
{
namespace Model
{
UpstreamRepositoryInfo::UpstreamRepositoryInfo() :
m_repositoryNameHasBeenSet(false)
{
}
UpstreamRepositoryInfo::UpstreamRepositoryInfo(JsonView jsonValue) :
m_repositoryNameHasBeenSet(false)
{
*this = jsonValue;
}
UpstreamRepositoryInfo& UpstreamRepositoryInfo::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("repositoryName"))
{
m_repositoryName = jsonValue.GetString("repositoryName");
m_repositoryNameHasBeenSet = true;
}
return *this;
}
JsonValue UpstreamRepositoryInfo::Jsonize() const
{
JsonValue payload;
if(m_repositoryNameHasBeenSet)
{
payload.WithString("repositoryName", m_repositoryName);
}
return payload;
}
} // namespace Model
} // namespace CodeArtifact
} // namespace Aws

View File

@@ -0,0 +1,75 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/ValidationException.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CodeArtifact
{
namespace Model
{
ValidationException::ValidationException() :
m_messageHasBeenSet(false),
m_reason(ValidationExceptionReason::NOT_SET),
m_reasonHasBeenSet(false)
{
}
ValidationException::ValidationException(JsonView jsonValue) :
m_messageHasBeenSet(false),
m_reason(ValidationExceptionReason::NOT_SET),
m_reasonHasBeenSet(false)
{
*this = jsonValue;
}
ValidationException& ValidationException::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("message"))
{
m_message = jsonValue.GetString("message");
m_messageHasBeenSet = true;
}
if(jsonValue.ValueExists("reason"))
{
m_reason = ValidationExceptionReasonMapper::GetValidationExceptionReasonForName(jsonValue.GetString("reason"));
m_reasonHasBeenSet = true;
}
return *this;
}
JsonValue ValidationException::Jsonize() const
{
JsonValue payload;
if(m_messageHasBeenSet)
{
payload.WithString("message", m_message);
}
if(m_reasonHasBeenSet)
{
payload.WithString("reason", ValidationExceptionReasonMapper::GetNameForValidationExceptionReason(m_reason));
}
return payload;
}
} // namespace Model
} // namespace CodeArtifact
} // namespace Aws

View File

@@ -0,0 +1,91 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codeartifact/model/ValidationExceptionReason.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace CodeArtifact
{
namespace Model
{
namespace ValidationExceptionReasonMapper
{
static const int CANNOT_PARSE_HASH = HashingUtils::HashString("CANNOT_PARSE");
static const int ENCRYPTION_KEY_ERROR_HASH = HashingUtils::HashString("ENCRYPTION_KEY_ERROR");
static const int FIELD_VALIDATION_FAILED_HASH = HashingUtils::HashString("FIELD_VALIDATION_FAILED");
static const int UNKNOWN_OPERATION_HASH = HashingUtils::HashString("UNKNOWN_OPERATION");
static const int OTHER_HASH = HashingUtils::HashString("OTHER");
ValidationExceptionReason GetValidationExceptionReasonForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == CANNOT_PARSE_HASH)
{
return ValidationExceptionReason::CANNOT_PARSE;
}
else if (hashCode == ENCRYPTION_KEY_ERROR_HASH)
{
return ValidationExceptionReason::ENCRYPTION_KEY_ERROR;
}
else if (hashCode == FIELD_VALIDATION_FAILED_HASH)
{
return ValidationExceptionReason::FIELD_VALIDATION_FAILED;
}
else if (hashCode == UNKNOWN_OPERATION_HASH)
{
return ValidationExceptionReason::UNKNOWN_OPERATION;
}
else if (hashCode == OTHER_HASH)
{
return ValidationExceptionReason::OTHER;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<ValidationExceptionReason>(hashCode);
}
return ValidationExceptionReason::NOT_SET;
}
Aws::String GetNameForValidationExceptionReason(ValidationExceptionReason enumValue)
{
switch(enumValue)
{
case ValidationExceptionReason::CANNOT_PARSE:
return "CANNOT_PARSE";
case ValidationExceptionReason::ENCRYPTION_KEY_ERROR:
return "ENCRYPTION_KEY_ERROR";
case ValidationExceptionReason::FIELD_VALIDATION_FAILED:
return "FIELD_VALIDATION_FAILED";
case ValidationExceptionReason::UNKNOWN_OPERATION:
return "UNKNOWN_OPERATION";
case ValidationExceptionReason::OTHER:
return "OTHER";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace ValidationExceptionReasonMapper
} // namespace Model
} // namespace CodeArtifact
} // namespace Aws