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/codecommit/CodeCommitEndpoint.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <aws/core/utils/HashingUtils.h>
using namespace Aws;
using namespace Aws::CodeCommit;
namespace Aws
{
namespace CodeCommit
{
namespace CodeCommitEndpoint
{
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 << "codecommit" << ".";
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 CodeCommitEndpoint
} // namespace CodeCommit
} // 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/codecommit/CodeCommitErrorMarshaller.h>
#include <aws/codecommit/CodeCommitErrors.h>
using namespace Aws::Client;
using namespace Aws::CodeCommit;
AWSError<CoreErrors> CodeCommitErrorMarshaller::FindErrorByName(const char* errorName) const
{
AWSError<CoreErrors> error = CodeCommitErrorMapper::GetErrorForName(errorName);
if(error.GetErrorType() != CoreErrors::UNKNOWN)
{
return error;
}
return AWSErrorMarshaller::FindErrorByName(errorName);
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,75 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/Approval.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CodeCommit
{
namespace Model
{
Approval::Approval() :
m_userArnHasBeenSet(false),
m_approvalState(ApprovalState::NOT_SET),
m_approvalStateHasBeenSet(false)
{
}
Approval::Approval(JsonView jsonValue) :
m_userArnHasBeenSet(false),
m_approvalState(ApprovalState::NOT_SET),
m_approvalStateHasBeenSet(false)
{
*this = jsonValue;
}
Approval& Approval::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("userArn"))
{
m_userArn = jsonValue.GetString("userArn");
m_userArnHasBeenSet = true;
}
if(jsonValue.ValueExists("approvalState"))
{
m_approvalState = ApprovalStateMapper::GetApprovalStateForName(jsonValue.GetString("approvalState"));
m_approvalStateHasBeenSet = true;
}
return *this;
}
JsonValue Approval::Jsonize() const
{
JsonValue payload;
if(m_userArnHasBeenSet)
{
payload.WithString("userArn", m_userArn);
}
if(m_approvalStateHasBeenSet)
{
payload.WithString("approvalState", ApprovalStateMapper::GetNameForApprovalState(m_approvalState));
}
return payload;
}
} // namespace Model
} // namespace CodeCommit
} // namespace Aws

View File

@@ -0,0 +1,162 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/ApprovalRule.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CodeCommit
{
namespace Model
{
ApprovalRule::ApprovalRule() :
m_approvalRuleIdHasBeenSet(false),
m_approvalRuleNameHasBeenSet(false),
m_approvalRuleContentHasBeenSet(false),
m_ruleContentSha256HasBeenSet(false),
m_lastModifiedDateHasBeenSet(false),
m_creationDateHasBeenSet(false),
m_lastModifiedUserHasBeenSet(false),
m_originApprovalRuleTemplateHasBeenSet(false)
{
}
ApprovalRule::ApprovalRule(JsonView jsonValue) :
m_approvalRuleIdHasBeenSet(false),
m_approvalRuleNameHasBeenSet(false),
m_approvalRuleContentHasBeenSet(false),
m_ruleContentSha256HasBeenSet(false),
m_lastModifiedDateHasBeenSet(false),
m_creationDateHasBeenSet(false),
m_lastModifiedUserHasBeenSet(false),
m_originApprovalRuleTemplateHasBeenSet(false)
{
*this = jsonValue;
}
ApprovalRule& ApprovalRule::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("approvalRuleId"))
{
m_approvalRuleId = jsonValue.GetString("approvalRuleId");
m_approvalRuleIdHasBeenSet = true;
}
if(jsonValue.ValueExists("approvalRuleName"))
{
m_approvalRuleName = jsonValue.GetString("approvalRuleName");
m_approvalRuleNameHasBeenSet = true;
}
if(jsonValue.ValueExists("approvalRuleContent"))
{
m_approvalRuleContent = jsonValue.GetString("approvalRuleContent");
m_approvalRuleContentHasBeenSet = true;
}
if(jsonValue.ValueExists("ruleContentSha256"))
{
m_ruleContentSha256 = jsonValue.GetString("ruleContentSha256");
m_ruleContentSha256HasBeenSet = true;
}
if(jsonValue.ValueExists("lastModifiedDate"))
{
m_lastModifiedDate = jsonValue.GetDouble("lastModifiedDate");
m_lastModifiedDateHasBeenSet = true;
}
if(jsonValue.ValueExists("creationDate"))
{
m_creationDate = jsonValue.GetDouble("creationDate");
m_creationDateHasBeenSet = true;
}
if(jsonValue.ValueExists("lastModifiedUser"))
{
m_lastModifiedUser = jsonValue.GetString("lastModifiedUser");
m_lastModifiedUserHasBeenSet = true;
}
if(jsonValue.ValueExists("originApprovalRuleTemplate"))
{
m_originApprovalRuleTemplate = jsonValue.GetObject("originApprovalRuleTemplate");
m_originApprovalRuleTemplateHasBeenSet = true;
}
return *this;
}
JsonValue ApprovalRule::Jsonize() const
{
JsonValue payload;
if(m_approvalRuleIdHasBeenSet)
{
payload.WithString("approvalRuleId", m_approvalRuleId);
}
if(m_approvalRuleNameHasBeenSet)
{
payload.WithString("approvalRuleName", m_approvalRuleName);
}
if(m_approvalRuleContentHasBeenSet)
{
payload.WithString("approvalRuleContent", m_approvalRuleContent);
}
if(m_ruleContentSha256HasBeenSet)
{
payload.WithString("ruleContentSha256", m_ruleContentSha256);
}
if(m_lastModifiedDateHasBeenSet)
{
payload.WithDouble("lastModifiedDate", m_lastModifiedDate.SecondsWithMSPrecision());
}
if(m_creationDateHasBeenSet)
{
payload.WithDouble("creationDate", m_creationDate.SecondsWithMSPrecision());
}
if(m_lastModifiedUserHasBeenSet)
{
payload.WithString("lastModifiedUser", m_lastModifiedUser);
}
if(m_originApprovalRuleTemplateHasBeenSet)
{
payload.WithObject("originApprovalRuleTemplate", m_originApprovalRuleTemplate.Jsonize());
}
return payload;
}
} // namespace Model
} // namespace CodeCommit
} // 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/codecommit/model/ApprovalRuleEventMetadata.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CodeCommit
{
namespace Model
{
ApprovalRuleEventMetadata::ApprovalRuleEventMetadata() :
m_approvalRuleNameHasBeenSet(false),
m_approvalRuleIdHasBeenSet(false),
m_approvalRuleContentHasBeenSet(false)
{
}
ApprovalRuleEventMetadata::ApprovalRuleEventMetadata(JsonView jsonValue) :
m_approvalRuleNameHasBeenSet(false),
m_approvalRuleIdHasBeenSet(false),
m_approvalRuleContentHasBeenSet(false)
{
*this = jsonValue;
}
ApprovalRuleEventMetadata& ApprovalRuleEventMetadata::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("approvalRuleName"))
{
m_approvalRuleName = jsonValue.GetString("approvalRuleName");
m_approvalRuleNameHasBeenSet = true;
}
if(jsonValue.ValueExists("approvalRuleId"))
{
m_approvalRuleId = jsonValue.GetString("approvalRuleId");
m_approvalRuleIdHasBeenSet = true;
}
if(jsonValue.ValueExists("approvalRuleContent"))
{
m_approvalRuleContent = jsonValue.GetString("approvalRuleContent");
m_approvalRuleContentHasBeenSet = true;
}
return *this;
}
JsonValue ApprovalRuleEventMetadata::Jsonize() const
{
JsonValue payload;
if(m_approvalRuleNameHasBeenSet)
{
payload.WithString("approvalRuleName", m_approvalRuleName);
}
if(m_approvalRuleIdHasBeenSet)
{
payload.WithString("approvalRuleId", m_approvalRuleId);
}
if(m_approvalRuleContentHasBeenSet)
{
payload.WithString("approvalRuleContent", m_approvalRuleContent);
}
return payload;
}
} // namespace Model
} // namespace CodeCommit
} // 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/codecommit/model/ApprovalRuleOverriddenEventMetadata.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CodeCommit
{
namespace Model
{
ApprovalRuleOverriddenEventMetadata::ApprovalRuleOverriddenEventMetadata() :
m_revisionIdHasBeenSet(false),
m_overrideStatus(OverrideStatus::NOT_SET),
m_overrideStatusHasBeenSet(false)
{
}
ApprovalRuleOverriddenEventMetadata::ApprovalRuleOverriddenEventMetadata(JsonView jsonValue) :
m_revisionIdHasBeenSet(false),
m_overrideStatus(OverrideStatus::NOT_SET),
m_overrideStatusHasBeenSet(false)
{
*this = jsonValue;
}
ApprovalRuleOverriddenEventMetadata& ApprovalRuleOverriddenEventMetadata::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("revisionId"))
{
m_revisionId = jsonValue.GetString("revisionId");
m_revisionIdHasBeenSet = true;
}
if(jsonValue.ValueExists("overrideStatus"))
{
m_overrideStatus = OverrideStatusMapper::GetOverrideStatusForName(jsonValue.GetString("overrideStatus"));
m_overrideStatusHasBeenSet = true;
}
return *this;
}
JsonValue ApprovalRuleOverriddenEventMetadata::Jsonize() const
{
JsonValue payload;
if(m_revisionIdHasBeenSet)
{
payload.WithString("revisionId", m_revisionId);
}
if(m_overrideStatusHasBeenSet)
{
payload.WithString("overrideStatus", OverrideStatusMapper::GetNameForOverrideStatus(m_overrideStatus));
}
return payload;
}
} // namespace Model
} // namespace CodeCommit
} // namespace Aws

View File

@@ -0,0 +1,162 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/ApprovalRuleTemplate.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CodeCommit
{
namespace Model
{
ApprovalRuleTemplate::ApprovalRuleTemplate() :
m_approvalRuleTemplateIdHasBeenSet(false),
m_approvalRuleTemplateNameHasBeenSet(false),
m_approvalRuleTemplateDescriptionHasBeenSet(false),
m_approvalRuleTemplateContentHasBeenSet(false),
m_ruleContentSha256HasBeenSet(false),
m_lastModifiedDateHasBeenSet(false),
m_creationDateHasBeenSet(false),
m_lastModifiedUserHasBeenSet(false)
{
}
ApprovalRuleTemplate::ApprovalRuleTemplate(JsonView jsonValue) :
m_approvalRuleTemplateIdHasBeenSet(false),
m_approvalRuleTemplateNameHasBeenSet(false),
m_approvalRuleTemplateDescriptionHasBeenSet(false),
m_approvalRuleTemplateContentHasBeenSet(false),
m_ruleContentSha256HasBeenSet(false),
m_lastModifiedDateHasBeenSet(false),
m_creationDateHasBeenSet(false),
m_lastModifiedUserHasBeenSet(false)
{
*this = jsonValue;
}
ApprovalRuleTemplate& ApprovalRuleTemplate::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("approvalRuleTemplateId"))
{
m_approvalRuleTemplateId = jsonValue.GetString("approvalRuleTemplateId");
m_approvalRuleTemplateIdHasBeenSet = true;
}
if(jsonValue.ValueExists("approvalRuleTemplateName"))
{
m_approvalRuleTemplateName = jsonValue.GetString("approvalRuleTemplateName");
m_approvalRuleTemplateNameHasBeenSet = true;
}
if(jsonValue.ValueExists("approvalRuleTemplateDescription"))
{
m_approvalRuleTemplateDescription = jsonValue.GetString("approvalRuleTemplateDescription");
m_approvalRuleTemplateDescriptionHasBeenSet = true;
}
if(jsonValue.ValueExists("approvalRuleTemplateContent"))
{
m_approvalRuleTemplateContent = jsonValue.GetString("approvalRuleTemplateContent");
m_approvalRuleTemplateContentHasBeenSet = true;
}
if(jsonValue.ValueExists("ruleContentSha256"))
{
m_ruleContentSha256 = jsonValue.GetString("ruleContentSha256");
m_ruleContentSha256HasBeenSet = true;
}
if(jsonValue.ValueExists("lastModifiedDate"))
{
m_lastModifiedDate = jsonValue.GetDouble("lastModifiedDate");
m_lastModifiedDateHasBeenSet = true;
}
if(jsonValue.ValueExists("creationDate"))
{
m_creationDate = jsonValue.GetDouble("creationDate");
m_creationDateHasBeenSet = true;
}
if(jsonValue.ValueExists("lastModifiedUser"))
{
m_lastModifiedUser = jsonValue.GetString("lastModifiedUser");
m_lastModifiedUserHasBeenSet = true;
}
return *this;
}
JsonValue ApprovalRuleTemplate::Jsonize() const
{
JsonValue payload;
if(m_approvalRuleTemplateIdHasBeenSet)
{
payload.WithString("approvalRuleTemplateId", m_approvalRuleTemplateId);
}
if(m_approvalRuleTemplateNameHasBeenSet)
{
payload.WithString("approvalRuleTemplateName", m_approvalRuleTemplateName);
}
if(m_approvalRuleTemplateDescriptionHasBeenSet)
{
payload.WithString("approvalRuleTemplateDescription", m_approvalRuleTemplateDescription);
}
if(m_approvalRuleTemplateContentHasBeenSet)
{
payload.WithString("approvalRuleTemplateContent", m_approvalRuleTemplateContent);
}
if(m_ruleContentSha256HasBeenSet)
{
payload.WithString("ruleContentSha256", m_ruleContentSha256);
}
if(m_lastModifiedDateHasBeenSet)
{
payload.WithDouble("lastModifiedDate", m_lastModifiedDate.SecondsWithMSPrecision());
}
if(m_creationDateHasBeenSet)
{
payload.WithDouble("creationDate", m_creationDate.SecondsWithMSPrecision());
}
if(m_lastModifiedUserHasBeenSet)
{
payload.WithString("lastModifiedUser", m_lastModifiedUser);
}
return payload;
}
} // namespace Model
} // namespace CodeCommit
} // 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/codecommit/model/ApprovalState.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 CodeCommit
{
namespace Model
{
namespace ApprovalStateMapper
{
static const int APPROVE_HASH = HashingUtils::HashString("APPROVE");
static const int REVOKE_HASH = HashingUtils::HashString("REVOKE");
ApprovalState GetApprovalStateForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == APPROVE_HASH)
{
return ApprovalState::APPROVE;
}
else if (hashCode == REVOKE_HASH)
{
return ApprovalState::REVOKE;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<ApprovalState>(hashCode);
}
return ApprovalState::NOT_SET;
}
Aws::String GetNameForApprovalState(ApprovalState enumValue)
{
switch(enumValue)
{
case ApprovalState::APPROVE:
return "APPROVE";
case ApprovalState::REVOKE:
return "REVOKE";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace ApprovalStateMapper
} // namespace Model
} // namespace CodeCommit
} // 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/codecommit/model/ApprovalStateChangedEventMetadata.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CodeCommit
{
namespace Model
{
ApprovalStateChangedEventMetadata::ApprovalStateChangedEventMetadata() :
m_revisionIdHasBeenSet(false),
m_approvalStatus(ApprovalState::NOT_SET),
m_approvalStatusHasBeenSet(false)
{
}
ApprovalStateChangedEventMetadata::ApprovalStateChangedEventMetadata(JsonView jsonValue) :
m_revisionIdHasBeenSet(false),
m_approvalStatus(ApprovalState::NOT_SET),
m_approvalStatusHasBeenSet(false)
{
*this = jsonValue;
}
ApprovalStateChangedEventMetadata& ApprovalStateChangedEventMetadata::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("revisionId"))
{
m_revisionId = jsonValue.GetString("revisionId");
m_revisionIdHasBeenSet = true;
}
if(jsonValue.ValueExists("approvalStatus"))
{
m_approvalStatus = ApprovalStateMapper::GetApprovalStateForName(jsonValue.GetString("approvalStatus"));
m_approvalStatusHasBeenSet = true;
}
return *this;
}
JsonValue ApprovalStateChangedEventMetadata::Jsonize() const
{
JsonValue payload;
if(m_revisionIdHasBeenSet)
{
payload.WithString("revisionId", m_revisionId);
}
if(m_approvalStatusHasBeenSet)
{
payload.WithString("approvalStatus", ApprovalStateMapper::GetNameForApprovalState(m_approvalStatus));
}
return payload;
}
} // namespace Model
} // namespace CodeCommit
} // namespace Aws

View File

@@ -0,0 +1,50 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/AssociateApprovalRuleTemplateWithRepositoryRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
AssociateApprovalRuleTemplateWithRepositoryRequest::AssociateApprovalRuleTemplateWithRepositoryRequest() :
m_approvalRuleTemplateNameHasBeenSet(false),
m_repositoryNameHasBeenSet(false)
{
}
Aws::String AssociateApprovalRuleTemplateWithRepositoryRequest::SerializePayload() const
{
JsonValue payload;
if(m_approvalRuleTemplateNameHasBeenSet)
{
payload.WithString("approvalRuleTemplateName", m_approvalRuleTemplateName);
}
if(m_repositoryNameHasBeenSet)
{
payload.WithString("repositoryName", m_repositoryName);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection AssociateApprovalRuleTemplateWithRepositoryRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "CodeCommit_20150413.AssociateApprovalRuleTemplateWithRepository"));
return headers;
}

View File

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

View File

@@ -0,0 +1,55 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/BatchAssociateApprovalRuleTemplateWithRepositoriesRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
BatchAssociateApprovalRuleTemplateWithRepositoriesRequest::BatchAssociateApprovalRuleTemplateWithRepositoriesRequest() :
m_approvalRuleTemplateNameHasBeenSet(false),
m_repositoryNamesHasBeenSet(false)
{
}
Aws::String BatchAssociateApprovalRuleTemplateWithRepositoriesRequest::SerializePayload() const
{
JsonValue payload;
if(m_approvalRuleTemplateNameHasBeenSet)
{
payload.WithString("approvalRuleTemplateName", m_approvalRuleTemplateName);
}
if(m_repositoryNamesHasBeenSet)
{
Array<JsonValue> repositoryNamesJsonList(m_repositoryNames.size());
for(unsigned repositoryNamesIndex = 0; repositoryNamesIndex < repositoryNamesJsonList.GetLength(); ++repositoryNamesIndex)
{
repositoryNamesJsonList[repositoryNamesIndex].AsString(m_repositoryNames[repositoryNamesIndex]);
}
payload.WithArray("repositoryNames", std::move(repositoryNamesJsonList));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection BatchAssociateApprovalRuleTemplateWithRepositoriesRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "CodeCommit_20150413.BatchAssociateApprovalRuleTemplateWithRepositories"));
return headers;
}

View File

@@ -0,0 +1,52 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/BatchAssociateApprovalRuleTemplateWithRepositoriesResult.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::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
BatchAssociateApprovalRuleTemplateWithRepositoriesResult::BatchAssociateApprovalRuleTemplateWithRepositoriesResult()
{
}
BatchAssociateApprovalRuleTemplateWithRepositoriesResult::BatchAssociateApprovalRuleTemplateWithRepositoriesResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
BatchAssociateApprovalRuleTemplateWithRepositoriesResult& BatchAssociateApprovalRuleTemplateWithRepositoriesResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("associatedRepositoryNames"))
{
Array<JsonView> associatedRepositoryNamesJsonList = jsonValue.GetArray("associatedRepositoryNames");
for(unsigned associatedRepositoryNamesIndex = 0; associatedRepositoryNamesIndex < associatedRepositoryNamesJsonList.GetLength(); ++associatedRepositoryNamesIndex)
{
m_associatedRepositoryNames.push_back(associatedRepositoryNamesJsonList[associatedRepositoryNamesIndex].AsString());
}
}
if(jsonValue.ValueExists("errors"))
{
Array<JsonView> errorsJsonList = jsonValue.GetArray("errors");
for(unsigned errorsIndex = 0; errorsIndex < errorsJsonList.GetLength(); ++errorsIndex)
{
m_errors.push_back(errorsJsonList[errorsIndex].AsObject());
}
}
return *this;
}

View File

@@ -0,0 +1,89 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/BatchDescribeMergeConflictsError.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CodeCommit
{
namespace Model
{
BatchDescribeMergeConflictsError::BatchDescribeMergeConflictsError() :
m_filePathHasBeenSet(false),
m_exceptionNameHasBeenSet(false),
m_messageHasBeenSet(false)
{
}
BatchDescribeMergeConflictsError::BatchDescribeMergeConflictsError(JsonView jsonValue) :
m_filePathHasBeenSet(false),
m_exceptionNameHasBeenSet(false),
m_messageHasBeenSet(false)
{
*this = jsonValue;
}
BatchDescribeMergeConflictsError& BatchDescribeMergeConflictsError::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("filePath"))
{
m_filePath = jsonValue.GetString("filePath");
m_filePathHasBeenSet = true;
}
if(jsonValue.ValueExists("exceptionName"))
{
m_exceptionName = jsonValue.GetString("exceptionName");
m_exceptionNameHasBeenSet = true;
}
if(jsonValue.ValueExists("message"))
{
m_message = jsonValue.GetString("message");
m_messageHasBeenSet = true;
}
return *this;
}
JsonValue BatchDescribeMergeConflictsError::Jsonize() const
{
JsonValue payload;
if(m_filePathHasBeenSet)
{
payload.WithString("filePath", m_filePath);
}
if(m_exceptionNameHasBeenSet)
{
payload.WithString("exceptionName", m_exceptionName);
}
if(m_messageHasBeenSet)
{
payload.WithString("message", m_message);
}
return payload;
}
} // namespace Model
} // namespace CodeCommit
} // namespace Aws

View File

@@ -0,0 +1,113 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/BatchDescribeMergeConflictsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
BatchDescribeMergeConflictsRequest::BatchDescribeMergeConflictsRequest() :
m_repositoryNameHasBeenSet(false),
m_destinationCommitSpecifierHasBeenSet(false),
m_sourceCommitSpecifierHasBeenSet(false),
m_mergeOption(MergeOptionTypeEnum::NOT_SET),
m_mergeOptionHasBeenSet(false),
m_maxMergeHunks(0),
m_maxMergeHunksHasBeenSet(false),
m_maxConflictFiles(0),
m_maxConflictFilesHasBeenSet(false),
m_filePathsHasBeenSet(false),
m_conflictDetailLevel(ConflictDetailLevelTypeEnum::NOT_SET),
m_conflictDetailLevelHasBeenSet(false),
m_conflictResolutionStrategy(ConflictResolutionStrategyTypeEnum::NOT_SET),
m_conflictResolutionStrategyHasBeenSet(false),
m_nextTokenHasBeenSet(false)
{
}
Aws::String BatchDescribeMergeConflictsRequest::SerializePayload() const
{
JsonValue payload;
if(m_repositoryNameHasBeenSet)
{
payload.WithString("repositoryName", m_repositoryName);
}
if(m_destinationCommitSpecifierHasBeenSet)
{
payload.WithString("destinationCommitSpecifier", m_destinationCommitSpecifier);
}
if(m_sourceCommitSpecifierHasBeenSet)
{
payload.WithString("sourceCommitSpecifier", m_sourceCommitSpecifier);
}
if(m_mergeOptionHasBeenSet)
{
payload.WithString("mergeOption", MergeOptionTypeEnumMapper::GetNameForMergeOptionTypeEnum(m_mergeOption));
}
if(m_maxMergeHunksHasBeenSet)
{
payload.WithInteger("maxMergeHunks", m_maxMergeHunks);
}
if(m_maxConflictFilesHasBeenSet)
{
payload.WithInteger("maxConflictFiles", m_maxConflictFiles);
}
if(m_filePathsHasBeenSet)
{
Array<JsonValue> filePathsJsonList(m_filePaths.size());
for(unsigned filePathsIndex = 0; filePathsIndex < filePathsJsonList.GetLength(); ++filePathsIndex)
{
filePathsJsonList[filePathsIndex].AsString(m_filePaths[filePathsIndex]);
}
payload.WithArray("filePaths", std::move(filePathsJsonList));
}
if(m_conflictDetailLevelHasBeenSet)
{
payload.WithString("conflictDetailLevel", ConflictDetailLevelTypeEnumMapper::GetNameForConflictDetailLevelTypeEnum(m_conflictDetailLevel));
}
if(m_conflictResolutionStrategyHasBeenSet)
{
payload.WithString("conflictResolutionStrategy", ConflictResolutionStrategyTypeEnumMapper::GetNameForConflictResolutionStrategyTypeEnum(m_conflictResolutionStrategy));
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("nextToken", m_nextToken);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection BatchDescribeMergeConflictsRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "CodeCommit_20150413.BatchDescribeMergeConflicts"));
return headers;
}

View File

@@ -0,0 +1,76 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/BatchDescribeMergeConflictsResult.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::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
BatchDescribeMergeConflictsResult::BatchDescribeMergeConflictsResult()
{
}
BatchDescribeMergeConflictsResult::BatchDescribeMergeConflictsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
BatchDescribeMergeConflictsResult& BatchDescribeMergeConflictsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("conflicts"))
{
Array<JsonView> conflictsJsonList = jsonValue.GetArray("conflicts");
for(unsigned conflictsIndex = 0; conflictsIndex < conflictsJsonList.GetLength(); ++conflictsIndex)
{
m_conflicts.push_back(conflictsJsonList[conflictsIndex].AsObject());
}
}
if(jsonValue.ValueExists("nextToken"))
{
m_nextToken = jsonValue.GetString("nextToken");
}
if(jsonValue.ValueExists("errors"))
{
Array<JsonView> errorsJsonList = jsonValue.GetArray("errors");
for(unsigned errorsIndex = 0; errorsIndex < errorsJsonList.GetLength(); ++errorsIndex)
{
m_errors.push_back(errorsJsonList[errorsIndex].AsObject());
}
}
if(jsonValue.ValueExists("destinationCommitId"))
{
m_destinationCommitId = jsonValue.GetString("destinationCommitId");
}
if(jsonValue.ValueExists("sourceCommitId"))
{
m_sourceCommitId = jsonValue.GetString("sourceCommitId");
}
if(jsonValue.ValueExists("baseCommitId"))
{
m_baseCommitId = jsonValue.GetString("baseCommitId");
}
return *this;
}

View File

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

View File

@@ -0,0 +1,55 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/BatchDisassociateApprovalRuleTemplateFromRepositoriesRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
BatchDisassociateApprovalRuleTemplateFromRepositoriesRequest::BatchDisassociateApprovalRuleTemplateFromRepositoriesRequest() :
m_approvalRuleTemplateNameHasBeenSet(false),
m_repositoryNamesHasBeenSet(false)
{
}
Aws::String BatchDisassociateApprovalRuleTemplateFromRepositoriesRequest::SerializePayload() const
{
JsonValue payload;
if(m_approvalRuleTemplateNameHasBeenSet)
{
payload.WithString("approvalRuleTemplateName", m_approvalRuleTemplateName);
}
if(m_repositoryNamesHasBeenSet)
{
Array<JsonValue> repositoryNamesJsonList(m_repositoryNames.size());
for(unsigned repositoryNamesIndex = 0; repositoryNamesIndex < repositoryNamesJsonList.GetLength(); ++repositoryNamesIndex)
{
repositoryNamesJsonList[repositoryNamesIndex].AsString(m_repositoryNames[repositoryNamesIndex]);
}
payload.WithArray("repositoryNames", std::move(repositoryNamesJsonList));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection BatchDisassociateApprovalRuleTemplateFromRepositoriesRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "CodeCommit_20150413.BatchDisassociateApprovalRuleTemplateFromRepositories"));
return headers;
}

View File

@@ -0,0 +1,52 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/BatchDisassociateApprovalRuleTemplateFromRepositoriesResult.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::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
BatchDisassociateApprovalRuleTemplateFromRepositoriesResult::BatchDisassociateApprovalRuleTemplateFromRepositoriesResult()
{
}
BatchDisassociateApprovalRuleTemplateFromRepositoriesResult::BatchDisassociateApprovalRuleTemplateFromRepositoriesResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
BatchDisassociateApprovalRuleTemplateFromRepositoriesResult& BatchDisassociateApprovalRuleTemplateFromRepositoriesResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("disassociatedRepositoryNames"))
{
Array<JsonView> disassociatedRepositoryNamesJsonList = jsonValue.GetArray("disassociatedRepositoryNames");
for(unsigned disassociatedRepositoryNamesIndex = 0; disassociatedRepositoryNamesIndex < disassociatedRepositoryNamesJsonList.GetLength(); ++disassociatedRepositoryNamesIndex)
{
m_disassociatedRepositoryNames.push_back(disassociatedRepositoryNamesJsonList[disassociatedRepositoryNamesIndex].AsString());
}
}
if(jsonValue.ValueExists("errors"))
{
Array<JsonView> errorsJsonList = jsonValue.GetArray("errors");
for(unsigned errorsIndex = 0; errorsIndex < errorsJsonList.GetLength(); ++errorsIndex)
{
m_errors.push_back(errorsJsonList[errorsIndex].AsObject());
}
}
return *this;
}

View File

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

View File

@@ -0,0 +1,55 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/BatchGetCommitsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
BatchGetCommitsRequest::BatchGetCommitsRequest() :
m_commitIdsHasBeenSet(false),
m_repositoryNameHasBeenSet(false)
{
}
Aws::String BatchGetCommitsRequest::SerializePayload() const
{
JsonValue payload;
if(m_commitIdsHasBeenSet)
{
Array<JsonValue> commitIdsJsonList(m_commitIds.size());
for(unsigned commitIdsIndex = 0; commitIdsIndex < commitIdsJsonList.GetLength(); ++commitIdsIndex)
{
commitIdsJsonList[commitIdsIndex].AsString(m_commitIds[commitIdsIndex]);
}
payload.WithArray("commitIds", std::move(commitIdsJsonList));
}
if(m_repositoryNameHasBeenSet)
{
payload.WithString("repositoryName", m_repositoryName);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection BatchGetCommitsRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "CodeCommit_20150413.BatchGetCommits"));
return headers;
}

View File

@@ -0,0 +1,52 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/BatchGetCommitsResult.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::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
BatchGetCommitsResult::BatchGetCommitsResult()
{
}
BatchGetCommitsResult::BatchGetCommitsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
BatchGetCommitsResult& BatchGetCommitsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("commits"))
{
Array<JsonView> commitsJsonList = jsonValue.GetArray("commits");
for(unsigned commitsIndex = 0; commitsIndex < commitsJsonList.GetLength(); ++commitsIndex)
{
m_commits.push_back(commitsJsonList[commitsIndex].AsObject());
}
}
if(jsonValue.ValueExists("errors"))
{
Array<JsonView> errorsJsonList = jsonValue.GetArray("errors");
for(unsigned errorsIndex = 0; errorsIndex < errorsJsonList.GetLength(); ++errorsIndex)
{
m_errors.push_back(errorsJsonList[errorsIndex].AsObject());
}
}
return *this;
}

View File

@@ -0,0 +1,48 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/BatchGetRepositoriesRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
BatchGetRepositoriesRequest::BatchGetRepositoriesRequest() :
m_repositoryNamesHasBeenSet(false)
{
}
Aws::String BatchGetRepositoriesRequest::SerializePayload() const
{
JsonValue payload;
if(m_repositoryNamesHasBeenSet)
{
Array<JsonValue> repositoryNamesJsonList(m_repositoryNames.size());
for(unsigned repositoryNamesIndex = 0; repositoryNamesIndex < repositoryNamesJsonList.GetLength(); ++repositoryNamesIndex)
{
repositoryNamesJsonList[repositoryNamesIndex].AsString(m_repositoryNames[repositoryNamesIndex]);
}
payload.WithArray("repositoryNames", std::move(repositoryNamesJsonList));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection BatchGetRepositoriesRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "CodeCommit_20150413.BatchGetRepositories"));
return headers;
}

View File

@@ -0,0 +1,52 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/BatchGetRepositoriesResult.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::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
BatchGetRepositoriesResult::BatchGetRepositoriesResult()
{
}
BatchGetRepositoriesResult::BatchGetRepositoriesResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
BatchGetRepositoriesResult& BatchGetRepositoriesResult::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("repositoriesNotFound"))
{
Array<JsonView> repositoriesNotFoundJsonList = jsonValue.GetArray("repositoriesNotFound");
for(unsigned repositoriesNotFoundIndex = 0; repositoriesNotFoundIndex < repositoriesNotFoundJsonList.GetLength(); ++repositoriesNotFoundIndex)
{
m_repositoriesNotFound.push_back(repositoriesNotFoundJsonList[repositoriesNotFoundIndex].AsString());
}
}
return *this;
}

View File

@@ -0,0 +1,89 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/BlobMetadata.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CodeCommit
{
namespace Model
{
BlobMetadata::BlobMetadata() :
m_blobIdHasBeenSet(false),
m_pathHasBeenSet(false),
m_modeHasBeenSet(false)
{
}
BlobMetadata::BlobMetadata(JsonView jsonValue) :
m_blobIdHasBeenSet(false),
m_pathHasBeenSet(false),
m_modeHasBeenSet(false)
{
*this = jsonValue;
}
BlobMetadata& BlobMetadata::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("blobId"))
{
m_blobId = jsonValue.GetString("blobId");
m_blobIdHasBeenSet = true;
}
if(jsonValue.ValueExists("path"))
{
m_path = jsonValue.GetString("path");
m_pathHasBeenSet = true;
}
if(jsonValue.ValueExists("mode"))
{
m_mode = jsonValue.GetString("mode");
m_modeHasBeenSet = true;
}
return *this;
}
JsonValue BlobMetadata::Jsonize() const
{
JsonValue payload;
if(m_blobIdHasBeenSet)
{
payload.WithString("blobId", m_blobId);
}
if(m_pathHasBeenSet)
{
payload.WithString("path", m_path);
}
if(m_modeHasBeenSet)
{
payload.WithString("mode", m_mode);
}
return payload;
}
} // namespace Model
} // namespace CodeCommit
} // 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/codecommit/model/BranchInfo.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CodeCommit
{
namespace Model
{
BranchInfo::BranchInfo() :
m_branchNameHasBeenSet(false),
m_commitIdHasBeenSet(false)
{
}
BranchInfo::BranchInfo(JsonView jsonValue) :
m_branchNameHasBeenSet(false),
m_commitIdHasBeenSet(false)
{
*this = jsonValue;
}
BranchInfo& BranchInfo::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("branchName"))
{
m_branchName = jsonValue.GetString("branchName");
m_branchNameHasBeenSet = true;
}
if(jsonValue.ValueExists("commitId"))
{
m_commitId = jsonValue.GetString("commitId");
m_commitIdHasBeenSet = true;
}
return *this;
}
JsonValue BranchInfo::Jsonize() const
{
JsonValue payload;
if(m_branchNameHasBeenSet)
{
payload.WithString("branchName", m_branchName);
}
if(m_commitIdHasBeenSet)
{
payload.WithString("commitId", m_commitId);
}
return payload;
}
} // namespace Model
} // namespace CodeCommit
} // 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/codecommit/model/ChangeTypeEnum.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 CodeCommit
{
namespace Model
{
namespace ChangeTypeEnumMapper
{
static const int A_HASH = HashingUtils::HashString("A");
static const int M_HASH = HashingUtils::HashString("M");
static const int D_HASH = HashingUtils::HashString("D");
ChangeTypeEnum GetChangeTypeEnumForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == A_HASH)
{
return ChangeTypeEnum::A;
}
else if (hashCode == M_HASH)
{
return ChangeTypeEnum::M;
}
else if (hashCode == D_HASH)
{
return ChangeTypeEnum::D;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<ChangeTypeEnum>(hashCode);
}
return ChangeTypeEnum::NOT_SET;
}
Aws::String GetNameForChangeTypeEnum(ChangeTypeEnum enumValue)
{
switch(enumValue)
{
case ChangeTypeEnum::A:
return "A";
case ChangeTypeEnum::M:
return "M";
case ChangeTypeEnum::D:
return "D";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace ChangeTypeEnumMapper
} // namespace Model
} // namespace CodeCommit
} // namespace Aws

View File

@@ -0,0 +1,210 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/Comment.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CodeCommit
{
namespace Model
{
Comment::Comment() :
m_commentIdHasBeenSet(false),
m_contentHasBeenSet(false),
m_inReplyToHasBeenSet(false),
m_creationDateHasBeenSet(false),
m_lastModifiedDateHasBeenSet(false),
m_authorArnHasBeenSet(false),
m_deleted(false),
m_deletedHasBeenSet(false),
m_clientRequestTokenHasBeenSet(false),
m_callerReactionsHasBeenSet(false),
m_reactionCountsHasBeenSet(false)
{
}
Comment::Comment(JsonView jsonValue) :
m_commentIdHasBeenSet(false),
m_contentHasBeenSet(false),
m_inReplyToHasBeenSet(false),
m_creationDateHasBeenSet(false),
m_lastModifiedDateHasBeenSet(false),
m_authorArnHasBeenSet(false),
m_deleted(false),
m_deletedHasBeenSet(false),
m_clientRequestTokenHasBeenSet(false),
m_callerReactionsHasBeenSet(false),
m_reactionCountsHasBeenSet(false)
{
*this = jsonValue;
}
Comment& Comment::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("commentId"))
{
m_commentId = jsonValue.GetString("commentId");
m_commentIdHasBeenSet = true;
}
if(jsonValue.ValueExists("content"))
{
m_content = jsonValue.GetString("content");
m_contentHasBeenSet = true;
}
if(jsonValue.ValueExists("inReplyTo"))
{
m_inReplyTo = jsonValue.GetString("inReplyTo");
m_inReplyToHasBeenSet = true;
}
if(jsonValue.ValueExists("creationDate"))
{
m_creationDate = jsonValue.GetDouble("creationDate");
m_creationDateHasBeenSet = true;
}
if(jsonValue.ValueExists("lastModifiedDate"))
{
m_lastModifiedDate = jsonValue.GetDouble("lastModifiedDate");
m_lastModifiedDateHasBeenSet = true;
}
if(jsonValue.ValueExists("authorArn"))
{
m_authorArn = jsonValue.GetString("authorArn");
m_authorArnHasBeenSet = true;
}
if(jsonValue.ValueExists("deleted"))
{
m_deleted = jsonValue.GetBool("deleted");
m_deletedHasBeenSet = true;
}
if(jsonValue.ValueExists("clientRequestToken"))
{
m_clientRequestToken = jsonValue.GetString("clientRequestToken");
m_clientRequestTokenHasBeenSet = true;
}
if(jsonValue.ValueExists("callerReactions"))
{
Array<JsonView> callerReactionsJsonList = jsonValue.GetArray("callerReactions");
for(unsigned callerReactionsIndex = 0; callerReactionsIndex < callerReactionsJsonList.GetLength(); ++callerReactionsIndex)
{
m_callerReactions.push_back(callerReactionsJsonList[callerReactionsIndex].AsString());
}
m_callerReactionsHasBeenSet = true;
}
if(jsonValue.ValueExists("reactionCounts"))
{
Aws::Map<Aws::String, JsonView> reactionCountsJsonMap = jsonValue.GetObject("reactionCounts").GetAllObjects();
for(auto& reactionCountsItem : reactionCountsJsonMap)
{
m_reactionCounts[reactionCountsItem.first] = reactionCountsItem.second.AsInteger();
}
m_reactionCountsHasBeenSet = true;
}
return *this;
}
JsonValue Comment::Jsonize() const
{
JsonValue payload;
if(m_commentIdHasBeenSet)
{
payload.WithString("commentId", m_commentId);
}
if(m_contentHasBeenSet)
{
payload.WithString("content", m_content);
}
if(m_inReplyToHasBeenSet)
{
payload.WithString("inReplyTo", m_inReplyTo);
}
if(m_creationDateHasBeenSet)
{
payload.WithDouble("creationDate", m_creationDate.SecondsWithMSPrecision());
}
if(m_lastModifiedDateHasBeenSet)
{
payload.WithDouble("lastModifiedDate", m_lastModifiedDate.SecondsWithMSPrecision());
}
if(m_authorArnHasBeenSet)
{
payload.WithString("authorArn", m_authorArn);
}
if(m_deletedHasBeenSet)
{
payload.WithBool("deleted", m_deleted);
}
if(m_clientRequestTokenHasBeenSet)
{
payload.WithString("clientRequestToken", m_clientRequestToken);
}
if(m_callerReactionsHasBeenSet)
{
Array<JsonValue> callerReactionsJsonList(m_callerReactions.size());
for(unsigned callerReactionsIndex = 0; callerReactionsIndex < callerReactionsJsonList.GetLength(); ++callerReactionsIndex)
{
callerReactionsJsonList[callerReactionsIndex].AsString(m_callerReactions[callerReactionsIndex]);
}
payload.WithArray("callerReactions", std::move(callerReactionsJsonList));
}
if(m_reactionCountsHasBeenSet)
{
JsonValue reactionCountsJsonMap;
for(auto& reactionCountsItem : m_reactionCounts)
{
reactionCountsJsonMap.WithInteger(reactionCountsItem.first, reactionCountsItem.second);
}
payload.WithObject("reactionCounts", std::move(reactionCountsJsonMap));
}
return payload;
}
} // namespace Model
} // namespace CodeCommit
} // namespace Aws

View File

@@ -0,0 +1,157 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/CommentsForComparedCommit.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CodeCommit
{
namespace Model
{
CommentsForComparedCommit::CommentsForComparedCommit() :
m_repositoryNameHasBeenSet(false),
m_beforeCommitIdHasBeenSet(false),
m_afterCommitIdHasBeenSet(false),
m_beforeBlobIdHasBeenSet(false),
m_afterBlobIdHasBeenSet(false),
m_locationHasBeenSet(false),
m_commentsHasBeenSet(false)
{
}
CommentsForComparedCommit::CommentsForComparedCommit(JsonView jsonValue) :
m_repositoryNameHasBeenSet(false),
m_beforeCommitIdHasBeenSet(false),
m_afterCommitIdHasBeenSet(false),
m_beforeBlobIdHasBeenSet(false),
m_afterBlobIdHasBeenSet(false),
m_locationHasBeenSet(false),
m_commentsHasBeenSet(false)
{
*this = jsonValue;
}
CommentsForComparedCommit& CommentsForComparedCommit::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("repositoryName"))
{
m_repositoryName = jsonValue.GetString("repositoryName");
m_repositoryNameHasBeenSet = true;
}
if(jsonValue.ValueExists("beforeCommitId"))
{
m_beforeCommitId = jsonValue.GetString("beforeCommitId");
m_beforeCommitIdHasBeenSet = true;
}
if(jsonValue.ValueExists("afterCommitId"))
{
m_afterCommitId = jsonValue.GetString("afterCommitId");
m_afterCommitIdHasBeenSet = true;
}
if(jsonValue.ValueExists("beforeBlobId"))
{
m_beforeBlobId = jsonValue.GetString("beforeBlobId");
m_beforeBlobIdHasBeenSet = true;
}
if(jsonValue.ValueExists("afterBlobId"))
{
m_afterBlobId = jsonValue.GetString("afterBlobId");
m_afterBlobIdHasBeenSet = true;
}
if(jsonValue.ValueExists("location"))
{
m_location = jsonValue.GetObject("location");
m_locationHasBeenSet = true;
}
if(jsonValue.ValueExists("comments"))
{
Array<JsonView> commentsJsonList = jsonValue.GetArray("comments");
for(unsigned commentsIndex = 0; commentsIndex < commentsJsonList.GetLength(); ++commentsIndex)
{
m_comments.push_back(commentsJsonList[commentsIndex].AsObject());
}
m_commentsHasBeenSet = true;
}
return *this;
}
JsonValue CommentsForComparedCommit::Jsonize() const
{
JsonValue payload;
if(m_repositoryNameHasBeenSet)
{
payload.WithString("repositoryName", m_repositoryName);
}
if(m_beforeCommitIdHasBeenSet)
{
payload.WithString("beforeCommitId", m_beforeCommitId);
}
if(m_afterCommitIdHasBeenSet)
{
payload.WithString("afterCommitId", m_afterCommitId);
}
if(m_beforeBlobIdHasBeenSet)
{
payload.WithString("beforeBlobId", m_beforeBlobId);
}
if(m_afterBlobIdHasBeenSet)
{
payload.WithString("afterBlobId", m_afterBlobId);
}
if(m_locationHasBeenSet)
{
payload.WithObject("location", m_location.Jsonize());
}
if(m_commentsHasBeenSet)
{
Array<JsonValue> commentsJsonList(m_comments.size());
for(unsigned commentsIndex = 0; commentsIndex < commentsJsonList.GetLength(); ++commentsIndex)
{
commentsJsonList[commentsIndex].AsObject(m_comments[commentsIndex].Jsonize());
}
payload.WithArray("comments", std::move(commentsJsonList));
}
return payload;
}
} // namespace Model
} // namespace CodeCommit
} // namespace Aws

View File

@@ -0,0 +1,172 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/CommentsForPullRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CodeCommit
{
namespace Model
{
CommentsForPullRequest::CommentsForPullRequest() :
m_pullRequestIdHasBeenSet(false),
m_repositoryNameHasBeenSet(false),
m_beforeCommitIdHasBeenSet(false),
m_afterCommitIdHasBeenSet(false),
m_beforeBlobIdHasBeenSet(false),
m_afterBlobIdHasBeenSet(false),
m_locationHasBeenSet(false),
m_commentsHasBeenSet(false)
{
}
CommentsForPullRequest::CommentsForPullRequest(JsonView jsonValue) :
m_pullRequestIdHasBeenSet(false),
m_repositoryNameHasBeenSet(false),
m_beforeCommitIdHasBeenSet(false),
m_afterCommitIdHasBeenSet(false),
m_beforeBlobIdHasBeenSet(false),
m_afterBlobIdHasBeenSet(false),
m_locationHasBeenSet(false),
m_commentsHasBeenSet(false)
{
*this = jsonValue;
}
CommentsForPullRequest& CommentsForPullRequest::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("pullRequestId"))
{
m_pullRequestId = jsonValue.GetString("pullRequestId");
m_pullRequestIdHasBeenSet = true;
}
if(jsonValue.ValueExists("repositoryName"))
{
m_repositoryName = jsonValue.GetString("repositoryName");
m_repositoryNameHasBeenSet = true;
}
if(jsonValue.ValueExists("beforeCommitId"))
{
m_beforeCommitId = jsonValue.GetString("beforeCommitId");
m_beforeCommitIdHasBeenSet = true;
}
if(jsonValue.ValueExists("afterCommitId"))
{
m_afterCommitId = jsonValue.GetString("afterCommitId");
m_afterCommitIdHasBeenSet = true;
}
if(jsonValue.ValueExists("beforeBlobId"))
{
m_beforeBlobId = jsonValue.GetString("beforeBlobId");
m_beforeBlobIdHasBeenSet = true;
}
if(jsonValue.ValueExists("afterBlobId"))
{
m_afterBlobId = jsonValue.GetString("afterBlobId");
m_afterBlobIdHasBeenSet = true;
}
if(jsonValue.ValueExists("location"))
{
m_location = jsonValue.GetObject("location");
m_locationHasBeenSet = true;
}
if(jsonValue.ValueExists("comments"))
{
Array<JsonView> commentsJsonList = jsonValue.GetArray("comments");
for(unsigned commentsIndex = 0; commentsIndex < commentsJsonList.GetLength(); ++commentsIndex)
{
m_comments.push_back(commentsJsonList[commentsIndex].AsObject());
}
m_commentsHasBeenSet = true;
}
return *this;
}
JsonValue CommentsForPullRequest::Jsonize() const
{
JsonValue payload;
if(m_pullRequestIdHasBeenSet)
{
payload.WithString("pullRequestId", m_pullRequestId);
}
if(m_repositoryNameHasBeenSet)
{
payload.WithString("repositoryName", m_repositoryName);
}
if(m_beforeCommitIdHasBeenSet)
{
payload.WithString("beforeCommitId", m_beforeCommitId);
}
if(m_afterCommitIdHasBeenSet)
{
payload.WithString("afterCommitId", m_afterCommitId);
}
if(m_beforeBlobIdHasBeenSet)
{
payload.WithString("beforeBlobId", m_beforeBlobId);
}
if(m_afterBlobIdHasBeenSet)
{
payload.WithString("afterBlobId", m_afterBlobId);
}
if(m_locationHasBeenSet)
{
payload.WithObject("location", m_location.Jsonize());
}
if(m_commentsHasBeenSet)
{
Array<JsonValue> commentsJsonList(m_comments.size());
for(unsigned commentsIndex = 0; commentsIndex < commentsJsonList.GetLength(); ++commentsIndex)
{
commentsJsonList[commentsIndex].AsObject(m_comments[commentsIndex].Jsonize());
}
payload.WithArray("comments", std::move(commentsJsonList));
}
return payload;
}
} // namespace Model
} // namespace CodeCommit
} // namespace Aws

View File

@@ -0,0 +1,157 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/Commit.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CodeCommit
{
namespace Model
{
Commit::Commit() :
m_commitIdHasBeenSet(false),
m_treeIdHasBeenSet(false),
m_parentsHasBeenSet(false),
m_messageHasBeenSet(false),
m_authorHasBeenSet(false),
m_committerHasBeenSet(false),
m_additionalDataHasBeenSet(false)
{
}
Commit::Commit(JsonView jsonValue) :
m_commitIdHasBeenSet(false),
m_treeIdHasBeenSet(false),
m_parentsHasBeenSet(false),
m_messageHasBeenSet(false),
m_authorHasBeenSet(false),
m_committerHasBeenSet(false),
m_additionalDataHasBeenSet(false)
{
*this = jsonValue;
}
Commit& Commit::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("commitId"))
{
m_commitId = jsonValue.GetString("commitId");
m_commitIdHasBeenSet = true;
}
if(jsonValue.ValueExists("treeId"))
{
m_treeId = jsonValue.GetString("treeId");
m_treeIdHasBeenSet = true;
}
if(jsonValue.ValueExists("parents"))
{
Array<JsonView> parentsJsonList = jsonValue.GetArray("parents");
for(unsigned parentsIndex = 0; parentsIndex < parentsJsonList.GetLength(); ++parentsIndex)
{
m_parents.push_back(parentsJsonList[parentsIndex].AsString());
}
m_parentsHasBeenSet = true;
}
if(jsonValue.ValueExists("message"))
{
m_message = jsonValue.GetString("message");
m_messageHasBeenSet = true;
}
if(jsonValue.ValueExists("author"))
{
m_author = jsonValue.GetObject("author");
m_authorHasBeenSet = true;
}
if(jsonValue.ValueExists("committer"))
{
m_committer = jsonValue.GetObject("committer");
m_committerHasBeenSet = true;
}
if(jsonValue.ValueExists("additionalData"))
{
m_additionalData = jsonValue.GetString("additionalData");
m_additionalDataHasBeenSet = true;
}
return *this;
}
JsonValue Commit::Jsonize() const
{
JsonValue payload;
if(m_commitIdHasBeenSet)
{
payload.WithString("commitId", m_commitId);
}
if(m_treeIdHasBeenSet)
{
payload.WithString("treeId", m_treeId);
}
if(m_parentsHasBeenSet)
{
Array<JsonValue> parentsJsonList(m_parents.size());
for(unsigned parentsIndex = 0; parentsIndex < parentsJsonList.GetLength(); ++parentsIndex)
{
parentsJsonList[parentsIndex].AsString(m_parents[parentsIndex]);
}
payload.WithArray("parents", std::move(parentsJsonList));
}
if(m_messageHasBeenSet)
{
payload.WithString("message", m_message);
}
if(m_authorHasBeenSet)
{
payload.WithObject("author", m_author.Jsonize());
}
if(m_committerHasBeenSet)
{
payload.WithObject("committer", m_committer.Jsonize());
}
if(m_additionalDataHasBeenSet)
{
payload.WithString("additionalData", m_additionalData);
}
return payload;
}
} // namespace Model
} // namespace CodeCommit
} // namespace Aws

View File

@@ -0,0 +1,82 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/Conflict.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CodeCommit
{
namespace Model
{
Conflict::Conflict() :
m_conflictMetadataHasBeenSet(false),
m_mergeHunksHasBeenSet(false)
{
}
Conflict::Conflict(JsonView jsonValue) :
m_conflictMetadataHasBeenSet(false),
m_mergeHunksHasBeenSet(false)
{
*this = jsonValue;
}
Conflict& Conflict::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("conflictMetadata"))
{
m_conflictMetadata = jsonValue.GetObject("conflictMetadata");
m_conflictMetadataHasBeenSet = true;
}
if(jsonValue.ValueExists("mergeHunks"))
{
Array<JsonView> mergeHunksJsonList = jsonValue.GetArray("mergeHunks");
for(unsigned mergeHunksIndex = 0; mergeHunksIndex < mergeHunksJsonList.GetLength(); ++mergeHunksIndex)
{
m_mergeHunks.push_back(mergeHunksJsonList[mergeHunksIndex].AsObject());
}
m_mergeHunksHasBeenSet = true;
}
return *this;
}
JsonValue Conflict::Jsonize() const
{
JsonValue payload;
if(m_conflictMetadataHasBeenSet)
{
payload.WithObject("conflictMetadata", m_conflictMetadata.Jsonize());
}
if(m_mergeHunksHasBeenSet)
{
Array<JsonValue> mergeHunksJsonList(m_mergeHunks.size());
for(unsigned mergeHunksIndex = 0; mergeHunksIndex < mergeHunksJsonList.GetLength(); ++mergeHunksIndex)
{
mergeHunksJsonList[mergeHunksIndex].AsObject(m_mergeHunks[mergeHunksIndex].Jsonize());
}
payload.WithArray("mergeHunks", std::move(mergeHunksJsonList));
}
return payload;
}
} // namespace Model
} // namespace CodeCommit
} // 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/codecommit/model/ConflictDetailLevelTypeEnum.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 CodeCommit
{
namespace Model
{
namespace ConflictDetailLevelTypeEnumMapper
{
static const int FILE_LEVEL_HASH = HashingUtils::HashString("FILE_LEVEL");
static const int LINE_LEVEL_HASH = HashingUtils::HashString("LINE_LEVEL");
ConflictDetailLevelTypeEnum GetConflictDetailLevelTypeEnumForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == FILE_LEVEL_HASH)
{
return ConflictDetailLevelTypeEnum::FILE_LEVEL;
}
else if (hashCode == LINE_LEVEL_HASH)
{
return ConflictDetailLevelTypeEnum::LINE_LEVEL;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<ConflictDetailLevelTypeEnum>(hashCode);
}
return ConflictDetailLevelTypeEnum::NOT_SET;
}
Aws::String GetNameForConflictDetailLevelTypeEnum(ConflictDetailLevelTypeEnum enumValue)
{
switch(enumValue)
{
case ConflictDetailLevelTypeEnum::FILE_LEVEL:
return "FILE_LEVEL";
case ConflictDetailLevelTypeEnum::LINE_LEVEL:
return "LINE_LEVEL";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace ConflictDetailLevelTypeEnumMapper
} // namespace Model
} // namespace CodeCommit
} // namespace Aws

View File

@@ -0,0 +1,202 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/ConflictMetadata.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CodeCommit
{
namespace Model
{
ConflictMetadata::ConflictMetadata() :
m_filePathHasBeenSet(false),
m_fileSizesHasBeenSet(false),
m_fileModesHasBeenSet(false),
m_objectTypesHasBeenSet(false),
m_numberOfConflicts(0),
m_numberOfConflictsHasBeenSet(false),
m_isBinaryFileHasBeenSet(false),
m_contentConflict(false),
m_contentConflictHasBeenSet(false),
m_fileModeConflict(false),
m_fileModeConflictHasBeenSet(false),
m_objectTypeConflict(false),
m_objectTypeConflictHasBeenSet(false),
m_mergeOperationsHasBeenSet(false)
{
}
ConflictMetadata::ConflictMetadata(JsonView jsonValue) :
m_filePathHasBeenSet(false),
m_fileSizesHasBeenSet(false),
m_fileModesHasBeenSet(false),
m_objectTypesHasBeenSet(false),
m_numberOfConflicts(0),
m_numberOfConflictsHasBeenSet(false),
m_isBinaryFileHasBeenSet(false),
m_contentConflict(false),
m_contentConflictHasBeenSet(false),
m_fileModeConflict(false),
m_fileModeConflictHasBeenSet(false),
m_objectTypeConflict(false),
m_objectTypeConflictHasBeenSet(false),
m_mergeOperationsHasBeenSet(false)
{
*this = jsonValue;
}
ConflictMetadata& ConflictMetadata::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("filePath"))
{
m_filePath = jsonValue.GetString("filePath");
m_filePathHasBeenSet = true;
}
if(jsonValue.ValueExists("fileSizes"))
{
m_fileSizes = jsonValue.GetObject("fileSizes");
m_fileSizesHasBeenSet = true;
}
if(jsonValue.ValueExists("fileModes"))
{
m_fileModes = jsonValue.GetObject("fileModes");
m_fileModesHasBeenSet = true;
}
if(jsonValue.ValueExists("objectTypes"))
{
m_objectTypes = jsonValue.GetObject("objectTypes");
m_objectTypesHasBeenSet = true;
}
if(jsonValue.ValueExists("numberOfConflicts"))
{
m_numberOfConflicts = jsonValue.GetInteger("numberOfConflicts");
m_numberOfConflictsHasBeenSet = true;
}
if(jsonValue.ValueExists("isBinaryFile"))
{
m_isBinaryFile = jsonValue.GetObject("isBinaryFile");
m_isBinaryFileHasBeenSet = true;
}
if(jsonValue.ValueExists("contentConflict"))
{
m_contentConflict = jsonValue.GetBool("contentConflict");
m_contentConflictHasBeenSet = true;
}
if(jsonValue.ValueExists("fileModeConflict"))
{
m_fileModeConflict = jsonValue.GetBool("fileModeConflict");
m_fileModeConflictHasBeenSet = true;
}
if(jsonValue.ValueExists("objectTypeConflict"))
{
m_objectTypeConflict = jsonValue.GetBool("objectTypeConflict");
m_objectTypeConflictHasBeenSet = true;
}
if(jsonValue.ValueExists("mergeOperations"))
{
m_mergeOperations = jsonValue.GetObject("mergeOperations");
m_mergeOperationsHasBeenSet = true;
}
return *this;
}
JsonValue ConflictMetadata::Jsonize() const
{
JsonValue payload;
if(m_filePathHasBeenSet)
{
payload.WithString("filePath", m_filePath);
}
if(m_fileSizesHasBeenSet)
{
payload.WithObject("fileSizes", m_fileSizes.Jsonize());
}
if(m_fileModesHasBeenSet)
{
payload.WithObject("fileModes", m_fileModes.Jsonize());
}
if(m_objectTypesHasBeenSet)
{
payload.WithObject("objectTypes", m_objectTypes.Jsonize());
}
if(m_numberOfConflictsHasBeenSet)
{
payload.WithInteger("numberOfConflicts", m_numberOfConflicts);
}
if(m_isBinaryFileHasBeenSet)
{
payload.WithObject("isBinaryFile", m_isBinaryFile.Jsonize());
}
if(m_contentConflictHasBeenSet)
{
payload.WithBool("contentConflict", m_contentConflict);
}
if(m_fileModeConflictHasBeenSet)
{
payload.WithBool("fileModeConflict", m_fileModeConflict);
}
if(m_objectTypeConflictHasBeenSet)
{
payload.WithBool("objectTypeConflict", m_objectTypeConflict);
}
if(m_mergeOperationsHasBeenSet)
{
payload.WithObject("mergeOperations", m_mergeOperations.Jsonize());
}
return payload;
}
} // namespace Model
} // namespace CodeCommit
} // namespace Aws

View File

@@ -0,0 +1,113 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/ConflictResolution.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CodeCommit
{
namespace Model
{
ConflictResolution::ConflictResolution() :
m_replaceContentsHasBeenSet(false),
m_deleteFilesHasBeenSet(false),
m_setFileModesHasBeenSet(false)
{
}
ConflictResolution::ConflictResolution(JsonView jsonValue) :
m_replaceContentsHasBeenSet(false),
m_deleteFilesHasBeenSet(false),
m_setFileModesHasBeenSet(false)
{
*this = jsonValue;
}
ConflictResolution& ConflictResolution::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("replaceContents"))
{
Array<JsonView> replaceContentsJsonList = jsonValue.GetArray("replaceContents");
for(unsigned replaceContentsIndex = 0; replaceContentsIndex < replaceContentsJsonList.GetLength(); ++replaceContentsIndex)
{
m_replaceContents.push_back(replaceContentsJsonList[replaceContentsIndex].AsObject());
}
m_replaceContentsHasBeenSet = true;
}
if(jsonValue.ValueExists("deleteFiles"))
{
Array<JsonView> deleteFilesJsonList = jsonValue.GetArray("deleteFiles");
for(unsigned deleteFilesIndex = 0; deleteFilesIndex < deleteFilesJsonList.GetLength(); ++deleteFilesIndex)
{
m_deleteFiles.push_back(deleteFilesJsonList[deleteFilesIndex].AsObject());
}
m_deleteFilesHasBeenSet = true;
}
if(jsonValue.ValueExists("setFileModes"))
{
Array<JsonView> setFileModesJsonList = jsonValue.GetArray("setFileModes");
for(unsigned setFileModesIndex = 0; setFileModesIndex < setFileModesJsonList.GetLength(); ++setFileModesIndex)
{
m_setFileModes.push_back(setFileModesJsonList[setFileModesIndex].AsObject());
}
m_setFileModesHasBeenSet = true;
}
return *this;
}
JsonValue ConflictResolution::Jsonize() const
{
JsonValue payload;
if(m_replaceContentsHasBeenSet)
{
Array<JsonValue> replaceContentsJsonList(m_replaceContents.size());
for(unsigned replaceContentsIndex = 0; replaceContentsIndex < replaceContentsJsonList.GetLength(); ++replaceContentsIndex)
{
replaceContentsJsonList[replaceContentsIndex].AsObject(m_replaceContents[replaceContentsIndex].Jsonize());
}
payload.WithArray("replaceContents", std::move(replaceContentsJsonList));
}
if(m_deleteFilesHasBeenSet)
{
Array<JsonValue> deleteFilesJsonList(m_deleteFiles.size());
for(unsigned deleteFilesIndex = 0; deleteFilesIndex < deleteFilesJsonList.GetLength(); ++deleteFilesIndex)
{
deleteFilesJsonList[deleteFilesIndex].AsObject(m_deleteFiles[deleteFilesIndex].Jsonize());
}
payload.WithArray("deleteFiles", std::move(deleteFilesJsonList));
}
if(m_setFileModesHasBeenSet)
{
Array<JsonValue> setFileModesJsonList(m_setFileModes.size());
for(unsigned setFileModesIndex = 0; setFileModesIndex < setFileModesJsonList.GetLength(); ++setFileModesIndex)
{
setFileModesJsonList[setFileModesIndex].AsObject(m_setFileModes[setFileModesIndex].Jsonize());
}
payload.WithArray("setFileModes", std::move(setFileModesJsonList));
}
return payload;
}
} // namespace Model
} // namespace CodeCommit
} // namespace Aws

View File

@@ -0,0 +1,84 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/ConflictResolutionStrategyTypeEnum.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 CodeCommit
{
namespace Model
{
namespace ConflictResolutionStrategyTypeEnumMapper
{
static const int NONE_HASH = HashingUtils::HashString("NONE");
static const int ACCEPT_SOURCE_HASH = HashingUtils::HashString("ACCEPT_SOURCE");
static const int ACCEPT_DESTINATION_HASH = HashingUtils::HashString("ACCEPT_DESTINATION");
static const int AUTOMERGE_HASH = HashingUtils::HashString("AUTOMERGE");
ConflictResolutionStrategyTypeEnum GetConflictResolutionStrategyTypeEnumForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == NONE_HASH)
{
return ConflictResolutionStrategyTypeEnum::NONE;
}
else if (hashCode == ACCEPT_SOURCE_HASH)
{
return ConflictResolutionStrategyTypeEnum::ACCEPT_SOURCE;
}
else if (hashCode == ACCEPT_DESTINATION_HASH)
{
return ConflictResolutionStrategyTypeEnum::ACCEPT_DESTINATION;
}
else if (hashCode == AUTOMERGE_HASH)
{
return ConflictResolutionStrategyTypeEnum::AUTOMERGE;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<ConflictResolutionStrategyTypeEnum>(hashCode);
}
return ConflictResolutionStrategyTypeEnum::NOT_SET;
}
Aws::String GetNameForConflictResolutionStrategyTypeEnum(ConflictResolutionStrategyTypeEnum enumValue)
{
switch(enumValue)
{
case ConflictResolutionStrategyTypeEnum::NONE:
return "NONE";
case ConflictResolutionStrategyTypeEnum::ACCEPT_SOURCE:
return "ACCEPT_SOURCE";
case ConflictResolutionStrategyTypeEnum::ACCEPT_DESTINATION:
return "ACCEPT_DESTINATION";
case ConflictResolutionStrategyTypeEnum::AUTOMERGE:
return "AUTOMERGE";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace ConflictResolutionStrategyTypeEnumMapper
} // namespace Model
} // namespace CodeCommit
} // namespace Aws

View File

@@ -0,0 +1,57 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/CreateApprovalRuleTemplateRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateApprovalRuleTemplateRequest::CreateApprovalRuleTemplateRequest() :
m_approvalRuleTemplateNameHasBeenSet(false),
m_approvalRuleTemplateContentHasBeenSet(false),
m_approvalRuleTemplateDescriptionHasBeenSet(false)
{
}
Aws::String CreateApprovalRuleTemplateRequest::SerializePayload() const
{
JsonValue payload;
if(m_approvalRuleTemplateNameHasBeenSet)
{
payload.WithString("approvalRuleTemplateName", m_approvalRuleTemplateName);
}
if(m_approvalRuleTemplateContentHasBeenSet)
{
payload.WithString("approvalRuleTemplateContent", m_approvalRuleTemplateContent);
}
if(m_approvalRuleTemplateDescriptionHasBeenSet)
{
payload.WithString("approvalRuleTemplateDescription", m_approvalRuleTemplateDescription);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CreateApprovalRuleTemplateRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "CodeCommit_20150413.CreateApprovalRuleTemplate"));
return headers;
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/CreateApprovalRuleTemplateResult.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::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateApprovalRuleTemplateResult::CreateApprovalRuleTemplateResult()
{
}
CreateApprovalRuleTemplateResult::CreateApprovalRuleTemplateResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreateApprovalRuleTemplateResult& CreateApprovalRuleTemplateResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("approvalRuleTemplate"))
{
m_approvalRuleTemplate = jsonValue.GetObject("approvalRuleTemplate");
}
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/codecommit/model/CreateBranchRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateBranchRequest::CreateBranchRequest() :
m_repositoryNameHasBeenSet(false),
m_branchNameHasBeenSet(false),
m_commitIdHasBeenSet(false)
{
}
Aws::String CreateBranchRequest::SerializePayload() const
{
JsonValue payload;
if(m_repositoryNameHasBeenSet)
{
payload.WithString("repositoryName", m_repositoryName);
}
if(m_branchNameHasBeenSet)
{
payload.WithString("branchName", m_branchName);
}
if(m_commitIdHasBeenSet)
{
payload.WithString("commitId", m_commitId);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CreateBranchRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "CodeCommit_20150413.CreateBranch"));
return headers;
}

View File

@@ -0,0 +1,122 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/CreateCommitRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateCommitRequest::CreateCommitRequest() :
m_repositoryNameHasBeenSet(false),
m_branchNameHasBeenSet(false),
m_parentCommitIdHasBeenSet(false),
m_authorNameHasBeenSet(false),
m_emailHasBeenSet(false),
m_commitMessageHasBeenSet(false),
m_keepEmptyFolders(false),
m_keepEmptyFoldersHasBeenSet(false),
m_putFilesHasBeenSet(false),
m_deleteFilesHasBeenSet(false),
m_setFileModesHasBeenSet(false)
{
}
Aws::String CreateCommitRequest::SerializePayload() const
{
JsonValue payload;
if(m_repositoryNameHasBeenSet)
{
payload.WithString("repositoryName", m_repositoryName);
}
if(m_branchNameHasBeenSet)
{
payload.WithString("branchName", m_branchName);
}
if(m_parentCommitIdHasBeenSet)
{
payload.WithString("parentCommitId", m_parentCommitId);
}
if(m_authorNameHasBeenSet)
{
payload.WithString("authorName", m_authorName);
}
if(m_emailHasBeenSet)
{
payload.WithString("email", m_email);
}
if(m_commitMessageHasBeenSet)
{
payload.WithString("commitMessage", m_commitMessage);
}
if(m_keepEmptyFoldersHasBeenSet)
{
payload.WithBool("keepEmptyFolders", m_keepEmptyFolders);
}
if(m_putFilesHasBeenSet)
{
Array<JsonValue> putFilesJsonList(m_putFiles.size());
for(unsigned putFilesIndex = 0; putFilesIndex < putFilesJsonList.GetLength(); ++putFilesIndex)
{
putFilesJsonList[putFilesIndex].AsObject(m_putFiles[putFilesIndex].Jsonize());
}
payload.WithArray("putFiles", std::move(putFilesJsonList));
}
if(m_deleteFilesHasBeenSet)
{
Array<JsonValue> deleteFilesJsonList(m_deleteFiles.size());
for(unsigned deleteFilesIndex = 0; deleteFilesIndex < deleteFilesJsonList.GetLength(); ++deleteFilesIndex)
{
deleteFilesJsonList[deleteFilesIndex].AsObject(m_deleteFiles[deleteFilesIndex].Jsonize());
}
payload.WithArray("deleteFiles", std::move(deleteFilesJsonList));
}
if(m_setFileModesHasBeenSet)
{
Array<JsonValue> setFileModesJsonList(m_setFileModes.size());
for(unsigned setFileModesIndex = 0; setFileModesIndex < setFileModesJsonList.GetLength(); ++setFileModesIndex)
{
setFileModesJsonList[setFileModesIndex].AsObject(m_setFileModes[setFileModesIndex].Jsonize());
}
payload.WithArray("setFileModes", std::move(setFileModesJsonList));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CreateCommitRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "CodeCommit_20150413.CreateCommit"));
return headers;
}

View File

@@ -0,0 +1,73 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/CreateCommitResult.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::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateCommitResult::CreateCommitResult()
{
}
CreateCommitResult::CreateCommitResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreateCommitResult& CreateCommitResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("commitId"))
{
m_commitId = jsonValue.GetString("commitId");
}
if(jsonValue.ValueExists("treeId"))
{
m_treeId = jsonValue.GetString("treeId");
}
if(jsonValue.ValueExists("filesAdded"))
{
Array<JsonView> filesAddedJsonList = jsonValue.GetArray("filesAdded");
for(unsigned filesAddedIndex = 0; filesAddedIndex < filesAddedJsonList.GetLength(); ++filesAddedIndex)
{
m_filesAdded.push_back(filesAddedJsonList[filesAddedIndex].AsObject());
}
}
if(jsonValue.ValueExists("filesUpdated"))
{
Array<JsonView> filesUpdatedJsonList = jsonValue.GetArray("filesUpdated");
for(unsigned filesUpdatedIndex = 0; filesUpdatedIndex < filesUpdatedJsonList.GetLength(); ++filesUpdatedIndex)
{
m_filesUpdated.push_back(filesUpdatedJsonList[filesUpdatedIndex].AsObject());
}
}
if(jsonValue.ValueExists("filesDeleted"))
{
Array<JsonView> filesDeletedJsonList = jsonValue.GetArray("filesDeleted");
for(unsigned filesDeletedIndex = 0; filesDeletedIndex < filesDeletedJsonList.GetLength(); ++filesDeletedIndex)
{
m_filesDeleted.push_back(filesDeletedJsonList[filesDeletedIndex].AsObject());
}
}
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/codecommit/model/CreatePullRequestApprovalRuleRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreatePullRequestApprovalRuleRequest::CreatePullRequestApprovalRuleRequest() :
m_pullRequestIdHasBeenSet(false),
m_approvalRuleNameHasBeenSet(false),
m_approvalRuleContentHasBeenSet(false)
{
}
Aws::String CreatePullRequestApprovalRuleRequest::SerializePayload() const
{
JsonValue payload;
if(m_pullRequestIdHasBeenSet)
{
payload.WithString("pullRequestId", m_pullRequestId);
}
if(m_approvalRuleNameHasBeenSet)
{
payload.WithString("approvalRuleName", m_approvalRuleName);
}
if(m_approvalRuleContentHasBeenSet)
{
payload.WithString("approvalRuleContent", m_approvalRuleContent);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CreatePullRequestApprovalRuleRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "CodeCommit_20150413.CreatePullRequestApprovalRule"));
return headers;
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/CreatePullRequestApprovalRuleResult.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::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreatePullRequestApprovalRuleResult::CreatePullRequestApprovalRuleResult()
{
}
CreatePullRequestApprovalRuleResult::CreatePullRequestApprovalRuleResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreatePullRequestApprovalRuleResult& CreatePullRequestApprovalRuleResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("approvalRule"))
{
m_approvalRule = jsonValue.GetObject("approvalRule");
}
return *this;
}

View File

@@ -0,0 +1,70 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/CreatePullRequestRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreatePullRequestRequest::CreatePullRequestRequest() :
m_titleHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_targetsHasBeenSet(false),
m_clientRequestToken(Aws::Utils::UUID::RandomUUID()),
m_clientRequestTokenHasBeenSet(true)
{
}
Aws::String CreatePullRequestRequest::SerializePayload() const
{
JsonValue payload;
if(m_titleHasBeenSet)
{
payload.WithString("title", m_title);
}
if(m_descriptionHasBeenSet)
{
payload.WithString("description", m_description);
}
if(m_targetsHasBeenSet)
{
Array<JsonValue> targetsJsonList(m_targets.size());
for(unsigned targetsIndex = 0; targetsIndex < targetsJsonList.GetLength(); ++targetsIndex)
{
targetsJsonList[targetsIndex].AsObject(m_targets[targetsIndex].Jsonize());
}
payload.WithArray("targets", std::move(targetsJsonList));
}
if(m_clientRequestTokenHasBeenSet)
{
payload.WithString("clientRequestToken", m_clientRequestToken);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CreatePullRequestRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "CodeCommit_20150413.CreatePullRequest"));
return headers;
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/CreatePullRequestResult.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::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreatePullRequestResult::CreatePullRequestResult()
{
}
CreatePullRequestResult::CreatePullRequestResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreatePullRequestResult& CreatePullRequestResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("pullRequest"))
{
m_pullRequest = jsonValue.GetObject("pullRequest");
}
return *this;
}

View File

@@ -0,0 +1,62 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/CreateRepositoryRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateRepositoryRequest::CreateRepositoryRequest() :
m_repositoryNameHasBeenSet(false),
m_repositoryDescriptionHasBeenSet(false),
m_tagsHasBeenSet(false)
{
}
Aws::String CreateRepositoryRequest::SerializePayload() const
{
JsonValue payload;
if(m_repositoryNameHasBeenSet)
{
payload.WithString("repositoryName", m_repositoryName);
}
if(m_repositoryDescriptionHasBeenSet)
{
payload.WithString("repositoryDescription", m_repositoryDescription);
}
if(m_tagsHasBeenSet)
{
JsonValue tagsJsonMap;
for(auto& tagsItem : m_tags)
{
tagsJsonMap.WithString(tagsItem.first, tagsItem.second);
}
payload.WithObject("tags", std::move(tagsJsonMap));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CreateRepositoryRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "CodeCommit_20150413.CreateRepository"));
return headers;
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/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::CodeCommit::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("repositoryMetadata"))
{
m_repositoryMetadata = jsonValue.GetObject("repositoryMetadata");
}
return *this;
}

View File

@@ -0,0 +1,114 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/CreateUnreferencedMergeCommitRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateUnreferencedMergeCommitRequest::CreateUnreferencedMergeCommitRequest() :
m_repositoryNameHasBeenSet(false),
m_sourceCommitSpecifierHasBeenSet(false),
m_destinationCommitSpecifierHasBeenSet(false),
m_mergeOption(MergeOptionTypeEnum::NOT_SET),
m_mergeOptionHasBeenSet(false),
m_conflictDetailLevel(ConflictDetailLevelTypeEnum::NOT_SET),
m_conflictDetailLevelHasBeenSet(false),
m_conflictResolutionStrategy(ConflictResolutionStrategyTypeEnum::NOT_SET),
m_conflictResolutionStrategyHasBeenSet(false),
m_authorNameHasBeenSet(false),
m_emailHasBeenSet(false),
m_commitMessageHasBeenSet(false),
m_keepEmptyFolders(false),
m_keepEmptyFoldersHasBeenSet(false),
m_conflictResolutionHasBeenSet(false)
{
}
Aws::String CreateUnreferencedMergeCommitRequest::SerializePayload() const
{
JsonValue payload;
if(m_repositoryNameHasBeenSet)
{
payload.WithString("repositoryName", m_repositoryName);
}
if(m_sourceCommitSpecifierHasBeenSet)
{
payload.WithString("sourceCommitSpecifier", m_sourceCommitSpecifier);
}
if(m_destinationCommitSpecifierHasBeenSet)
{
payload.WithString("destinationCommitSpecifier", m_destinationCommitSpecifier);
}
if(m_mergeOptionHasBeenSet)
{
payload.WithString("mergeOption", MergeOptionTypeEnumMapper::GetNameForMergeOptionTypeEnum(m_mergeOption));
}
if(m_conflictDetailLevelHasBeenSet)
{
payload.WithString("conflictDetailLevel", ConflictDetailLevelTypeEnumMapper::GetNameForConflictDetailLevelTypeEnum(m_conflictDetailLevel));
}
if(m_conflictResolutionStrategyHasBeenSet)
{
payload.WithString("conflictResolutionStrategy", ConflictResolutionStrategyTypeEnumMapper::GetNameForConflictResolutionStrategyTypeEnum(m_conflictResolutionStrategy));
}
if(m_authorNameHasBeenSet)
{
payload.WithString("authorName", m_authorName);
}
if(m_emailHasBeenSet)
{
payload.WithString("email", m_email);
}
if(m_commitMessageHasBeenSet)
{
payload.WithString("commitMessage", m_commitMessage);
}
if(m_keepEmptyFoldersHasBeenSet)
{
payload.WithBool("keepEmptyFolders", m_keepEmptyFolders);
}
if(m_conflictResolutionHasBeenSet)
{
payload.WithObject("conflictResolution", m_conflictResolution.Jsonize());
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CreateUnreferencedMergeCommitRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "CodeCommit_20150413.CreateUnreferencedMergeCommit"));
return headers;
}

View File

@@ -0,0 +1,46 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/CreateUnreferencedMergeCommitResult.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::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateUnreferencedMergeCommitResult::CreateUnreferencedMergeCommitResult()
{
}
CreateUnreferencedMergeCommitResult::CreateUnreferencedMergeCommitResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreateUnreferencedMergeCommitResult& CreateUnreferencedMergeCommitResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("commitId"))
{
m_commitId = jsonValue.GetString("commitId");
}
if(jsonValue.ValueExists("treeId"))
{
m_treeId = jsonValue.GetString("treeId");
}
return *this;
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/DeleteApprovalRuleTemplateRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeleteApprovalRuleTemplateRequest::DeleteApprovalRuleTemplateRequest() :
m_approvalRuleTemplateNameHasBeenSet(false)
{
}
Aws::String DeleteApprovalRuleTemplateRequest::SerializePayload() const
{
JsonValue payload;
if(m_approvalRuleTemplateNameHasBeenSet)
{
payload.WithString("approvalRuleTemplateName", m_approvalRuleTemplateName);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DeleteApprovalRuleTemplateRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "CodeCommit_20150413.DeleteApprovalRuleTemplate"));
return headers;
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/DeleteApprovalRuleTemplateResult.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::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DeleteApprovalRuleTemplateResult::DeleteApprovalRuleTemplateResult()
{
}
DeleteApprovalRuleTemplateResult::DeleteApprovalRuleTemplateResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DeleteApprovalRuleTemplateResult& DeleteApprovalRuleTemplateResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("approvalRuleTemplateId"))
{
m_approvalRuleTemplateId = jsonValue.GetString("approvalRuleTemplateId");
}
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/codecommit/model/DeleteBranchRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeleteBranchRequest::DeleteBranchRequest() :
m_repositoryNameHasBeenSet(false),
m_branchNameHasBeenSet(false)
{
}
Aws::String DeleteBranchRequest::SerializePayload() const
{
JsonValue payload;
if(m_repositoryNameHasBeenSet)
{
payload.WithString("repositoryName", m_repositoryName);
}
if(m_branchNameHasBeenSet)
{
payload.WithString("branchName", m_branchName);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DeleteBranchRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "CodeCommit_20150413.DeleteBranch"));
return headers;
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/DeleteBranchResult.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::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DeleteBranchResult::DeleteBranchResult()
{
}
DeleteBranchResult::DeleteBranchResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DeleteBranchResult& DeleteBranchResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("deletedBranch"))
{
m_deletedBranch = jsonValue.GetObject("deletedBranch");
}
return *this;
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/DeleteCommentContentRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeleteCommentContentRequest::DeleteCommentContentRequest() :
m_commentIdHasBeenSet(false)
{
}
Aws::String DeleteCommentContentRequest::SerializePayload() const
{
JsonValue payload;
if(m_commentIdHasBeenSet)
{
payload.WithString("commentId", m_commentId);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DeleteCommentContentRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "CodeCommit_20150413.DeleteCommentContent"));
return headers;
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/DeleteCommentContentResult.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::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DeleteCommentContentResult::DeleteCommentContentResult()
{
}
DeleteCommentContentResult::DeleteCommentContentResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DeleteCommentContentResult& DeleteCommentContentResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("comment"))
{
m_comment = jsonValue.GetObject("comment");
}
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/codecommit/model/DeleteFileEntry.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CodeCommit
{
namespace Model
{
DeleteFileEntry::DeleteFileEntry() :
m_filePathHasBeenSet(false)
{
}
DeleteFileEntry::DeleteFileEntry(JsonView jsonValue) :
m_filePathHasBeenSet(false)
{
*this = jsonValue;
}
DeleteFileEntry& DeleteFileEntry::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("filePath"))
{
m_filePath = jsonValue.GetString("filePath");
m_filePathHasBeenSet = true;
}
return *this;
}
JsonValue DeleteFileEntry::Jsonize() const
{
JsonValue payload;
if(m_filePathHasBeenSet)
{
payload.WithString("filePath", m_filePath);
}
return payload;
}
} // namespace Model
} // namespace CodeCommit
} // namespace Aws

View File

@@ -0,0 +1,93 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/DeleteFileRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeleteFileRequest::DeleteFileRequest() :
m_repositoryNameHasBeenSet(false),
m_branchNameHasBeenSet(false),
m_filePathHasBeenSet(false),
m_parentCommitIdHasBeenSet(false),
m_keepEmptyFolders(false),
m_keepEmptyFoldersHasBeenSet(false),
m_commitMessageHasBeenSet(false),
m_nameHasBeenSet(false),
m_emailHasBeenSet(false)
{
}
Aws::String DeleteFileRequest::SerializePayload() const
{
JsonValue payload;
if(m_repositoryNameHasBeenSet)
{
payload.WithString("repositoryName", m_repositoryName);
}
if(m_branchNameHasBeenSet)
{
payload.WithString("branchName", m_branchName);
}
if(m_filePathHasBeenSet)
{
payload.WithString("filePath", m_filePath);
}
if(m_parentCommitIdHasBeenSet)
{
payload.WithString("parentCommitId", m_parentCommitId);
}
if(m_keepEmptyFoldersHasBeenSet)
{
payload.WithBool("keepEmptyFolders", m_keepEmptyFolders);
}
if(m_commitMessageHasBeenSet)
{
payload.WithString("commitMessage", m_commitMessage);
}
if(m_nameHasBeenSet)
{
payload.WithString("name", m_name);
}
if(m_emailHasBeenSet)
{
payload.WithString("email", m_email);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DeleteFileRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "CodeCommit_20150413.DeleteFile"));
return headers;
}

View File

@@ -0,0 +1,58 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/DeleteFileResult.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::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DeleteFileResult::DeleteFileResult()
{
}
DeleteFileResult::DeleteFileResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DeleteFileResult& DeleteFileResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("commitId"))
{
m_commitId = jsonValue.GetString("commitId");
}
if(jsonValue.ValueExists("blobId"))
{
m_blobId = jsonValue.GetString("blobId");
}
if(jsonValue.ValueExists("treeId"))
{
m_treeId = jsonValue.GetString("treeId");
}
if(jsonValue.ValueExists("filePath"))
{
m_filePath = jsonValue.GetString("filePath");
}
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/codecommit/model/DeletePullRequestApprovalRuleRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeletePullRequestApprovalRuleRequest::DeletePullRequestApprovalRuleRequest() :
m_pullRequestIdHasBeenSet(false),
m_approvalRuleNameHasBeenSet(false)
{
}
Aws::String DeletePullRequestApprovalRuleRequest::SerializePayload() const
{
JsonValue payload;
if(m_pullRequestIdHasBeenSet)
{
payload.WithString("pullRequestId", m_pullRequestId);
}
if(m_approvalRuleNameHasBeenSet)
{
payload.WithString("approvalRuleName", m_approvalRuleName);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DeletePullRequestApprovalRuleRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "CodeCommit_20150413.DeletePullRequestApprovalRule"));
return headers;
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/DeletePullRequestApprovalRuleResult.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::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DeletePullRequestApprovalRuleResult::DeletePullRequestApprovalRuleResult()
{
}
DeletePullRequestApprovalRuleResult::DeletePullRequestApprovalRuleResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DeletePullRequestApprovalRuleResult& DeletePullRequestApprovalRuleResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("approvalRuleId"))
{
m_approvalRuleId = jsonValue.GetString("approvalRuleId");
}
return *this;
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/DeleteRepositoryRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeleteRepositoryRequest::DeleteRepositoryRequest() :
m_repositoryNameHasBeenSet(false)
{
}
Aws::String DeleteRepositoryRequest::SerializePayload() const
{
JsonValue payload;
if(m_repositoryNameHasBeenSet)
{
payload.WithString("repositoryName", m_repositoryName);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DeleteRepositoryRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "CodeCommit_20150413.DeleteRepository"));
return headers;
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/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::CodeCommit::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("repositoryId"))
{
m_repositoryId = jsonValue.GetString("repositoryId");
}
return *this;
}

View File

@@ -0,0 +1,100 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/DescribeMergeConflictsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DescribeMergeConflictsRequest::DescribeMergeConflictsRequest() :
m_repositoryNameHasBeenSet(false),
m_destinationCommitSpecifierHasBeenSet(false),
m_sourceCommitSpecifierHasBeenSet(false),
m_mergeOption(MergeOptionTypeEnum::NOT_SET),
m_mergeOptionHasBeenSet(false),
m_maxMergeHunks(0),
m_maxMergeHunksHasBeenSet(false),
m_filePathHasBeenSet(false),
m_conflictDetailLevel(ConflictDetailLevelTypeEnum::NOT_SET),
m_conflictDetailLevelHasBeenSet(false),
m_conflictResolutionStrategy(ConflictResolutionStrategyTypeEnum::NOT_SET),
m_conflictResolutionStrategyHasBeenSet(false),
m_nextTokenHasBeenSet(false)
{
}
Aws::String DescribeMergeConflictsRequest::SerializePayload() const
{
JsonValue payload;
if(m_repositoryNameHasBeenSet)
{
payload.WithString("repositoryName", m_repositoryName);
}
if(m_destinationCommitSpecifierHasBeenSet)
{
payload.WithString("destinationCommitSpecifier", m_destinationCommitSpecifier);
}
if(m_sourceCommitSpecifierHasBeenSet)
{
payload.WithString("sourceCommitSpecifier", m_sourceCommitSpecifier);
}
if(m_mergeOptionHasBeenSet)
{
payload.WithString("mergeOption", MergeOptionTypeEnumMapper::GetNameForMergeOptionTypeEnum(m_mergeOption));
}
if(m_maxMergeHunksHasBeenSet)
{
payload.WithInteger("maxMergeHunks", m_maxMergeHunks);
}
if(m_filePathHasBeenSet)
{
payload.WithString("filePath", m_filePath);
}
if(m_conflictDetailLevelHasBeenSet)
{
payload.WithString("conflictDetailLevel", ConflictDetailLevelTypeEnumMapper::GetNameForConflictDetailLevelTypeEnum(m_conflictDetailLevel));
}
if(m_conflictResolutionStrategyHasBeenSet)
{
payload.WithString("conflictResolutionStrategy", ConflictResolutionStrategyTypeEnumMapper::GetNameForConflictResolutionStrategyTypeEnum(m_conflictResolutionStrategy));
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("nextToken", m_nextToken);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DescribeMergeConflictsRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "CodeCommit_20150413.DescribeMergeConflicts"));
return headers;
}

View File

@@ -0,0 +1,73 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/DescribeMergeConflictsResult.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::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DescribeMergeConflictsResult::DescribeMergeConflictsResult()
{
}
DescribeMergeConflictsResult::DescribeMergeConflictsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DescribeMergeConflictsResult& DescribeMergeConflictsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("conflictMetadata"))
{
m_conflictMetadata = jsonValue.GetObject("conflictMetadata");
}
if(jsonValue.ValueExists("mergeHunks"))
{
Array<JsonView> mergeHunksJsonList = jsonValue.GetArray("mergeHunks");
for(unsigned mergeHunksIndex = 0; mergeHunksIndex < mergeHunksJsonList.GetLength(); ++mergeHunksIndex)
{
m_mergeHunks.push_back(mergeHunksJsonList[mergeHunksIndex].AsObject());
}
}
if(jsonValue.ValueExists("nextToken"))
{
m_nextToken = jsonValue.GetString("nextToken");
}
if(jsonValue.ValueExists("destinationCommitId"))
{
m_destinationCommitId = jsonValue.GetString("destinationCommitId");
}
if(jsonValue.ValueExists("sourceCommitId"))
{
m_sourceCommitId = jsonValue.GetString("sourceCommitId");
}
if(jsonValue.ValueExists("baseCommitId"))
{
m_baseCommitId = jsonValue.GetString("baseCommitId");
}
return *this;
}

View File

@@ -0,0 +1,72 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/DescribePullRequestEventsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DescribePullRequestEventsRequest::DescribePullRequestEventsRequest() :
m_pullRequestIdHasBeenSet(false),
m_pullRequestEventType(PullRequestEventType::NOT_SET),
m_pullRequestEventTypeHasBeenSet(false),
m_actorArnHasBeenSet(false),
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false)
{
}
Aws::String DescribePullRequestEventsRequest::SerializePayload() const
{
JsonValue payload;
if(m_pullRequestIdHasBeenSet)
{
payload.WithString("pullRequestId", m_pullRequestId);
}
if(m_pullRequestEventTypeHasBeenSet)
{
payload.WithString("pullRequestEventType", PullRequestEventTypeMapper::GetNameForPullRequestEventType(m_pullRequestEventType));
}
if(m_actorArnHasBeenSet)
{
payload.WithString("actorArn", m_actorArn);
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("nextToken", m_nextToken);
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("maxResults", m_maxResults);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DescribePullRequestEventsRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "CodeCommit_20150413.DescribePullRequestEvents"));
return headers;
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/DescribePullRequestEventsResult.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::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DescribePullRequestEventsResult::DescribePullRequestEventsResult()
{
}
DescribePullRequestEventsResult::DescribePullRequestEventsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DescribePullRequestEventsResult& DescribePullRequestEventsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("pullRequestEvents"))
{
Array<JsonView> pullRequestEventsJsonList = jsonValue.GetArray("pullRequestEvents");
for(unsigned pullRequestEventsIndex = 0; pullRequestEventsIndex < pullRequestEventsJsonList.GetLength(); ++pullRequestEventsIndex)
{
m_pullRequestEvents.push_back(pullRequestEventsJsonList[pullRequestEventsIndex].AsObject());
}
}
if(jsonValue.ValueExists("nextToken"))
{
m_nextToken = jsonValue.GetString("nextToken");
}
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/codecommit/model/Difference.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CodeCommit
{
namespace Model
{
Difference::Difference() :
m_beforeBlobHasBeenSet(false),
m_afterBlobHasBeenSet(false),
m_changeType(ChangeTypeEnum::NOT_SET),
m_changeTypeHasBeenSet(false)
{
}
Difference::Difference(JsonView jsonValue) :
m_beforeBlobHasBeenSet(false),
m_afterBlobHasBeenSet(false),
m_changeType(ChangeTypeEnum::NOT_SET),
m_changeTypeHasBeenSet(false)
{
*this = jsonValue;
}
Difference& Difference::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("beforeBlob"))
{
m_beforeBlob = jsonValue.GetObject("beforeBlob");
m_beforeBlobHasBeenSet = true;
}
if(jsonValue.ValueExists("afterBlob"))
{
m_afterBlob = jsonValue.GetObject("afterBlob");
m_afterBlobHasBeenSet = true;
}
if(jsonValue.ValueExists("changeType"))
{
m_changeType = ChangeTypeEnumMapper::GetChangeTypeEnumForName(jsonValue.GetString("changeType"));
m_changeTypeHasBeenSet = true;
}
return *this;
}
JsonValue Difference::Jsonize() const
{
JsonValue payload;
if(m_beforeBlobHasBeenSet)
{
payload.WithObject("beforeBlob", m_beforeBlob.Jsonize());
}
if(m_afterBlobHasBeenSet)
{
payload.WithObject("afterBlob", m_afterBlob.Jsonize());
}
if(m_changeTypeHasBeenSet)
{
payload.WithString("changeType", ChangeTypeEnumMapper::GetNameForChangeTypeEnum(m_changeType));
}
return payload;
}
} // namespace Model
} // namespace CodeCommit
} // namespace Aws

View File

@@ -0,0 +1,50 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/DisassociateApprovalRuleTemplateFromRepositoryRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DisassociateApprovalRuleTemplateFromRepositoryRequest::DisassociateApprovalRuleTemplateFromRepositoryRequest() :
m_approvalRuleTemplateNameHasBeenSet(false),
m_repositoryNameHasBeenSet(false)
{
}
Aws::String DisassociateApprovalRuleTemplateFromRepositoryRequest::SerializePayload() const
{
JsonValue payload;
if(m_approvalRuleTemplateNameHasBeenSet)
{
payload.WithString("approvalRuleTemplateName", m_approvalRuleTemplateName);
}
if(m_repositoryNameHasBeenSet)
{
payload.WithString("repositoryName", m_repositoryName);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DisassociateApprovalRuleTemplateFromRepositoryRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "CodeCommit_20150413.DisassociateApprovalRuleTemplateFromRepository"));
return headers;
}

View File

@@ -0,0 +1,50 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/EvaluatePullRequestApprovalRulesRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
EvaluatePullRequestApprovalRulesRequest::EvaluatePullRequestApprovalRulesRequest() :
m_pullRequestIdHasBeenSet(false),
m_revisionIdHasBeenSet(false)
{
}
Aws::String EvaluatePullRequestApprovalRulesRequest::SerializePayload() const
{
JsonValue payload;
if(m_pullRequestIdHasBeenSet)
{
payload.WithString("pullRequestId", m_pullRequestId);
}
if(m_revisionIdHasBeenSet)
{
payload.WithString("revisionId", m_revisionId);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection EvaluatePullRequestApprovalRulesRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "CodeCommit_20150413.EvaluatePullRequestApprovalRules"));
return headers;
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/EvaluatePullRequestApprovalRulesResult.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::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
EvaluatePullRequestApprovalRulesResult::EvaluatePullRequestApprovalRulesResult()
{
}
EvaluatePullRequestApprovalRulesResult::EvaluatePullRequestApprovalRulesResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
EvaluatePullRequestApprovalRulesResult& EvaluatePullRequestApprovalRulesResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("evaluation"))
{
m_evaluation = jsonValue.GetObject("evaluation");
}
return *this;
}

View File

@@ -0,0 +1,124 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/Evaluation.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CodeCommit
{
namespace Model
{
Evaluation::Evaluation() :
m_approved(false),
m_approvedHasBeenSet(false),
m_overridden(false),
m_overriddenHasBeenSet(false),
m_approvalRulesSatisfiedHasBeenSet(false),
m_approvalRulesNotSatisfiedHasBeenSet(false)
{
}
Evaluation::Evaluation(JsonView jsonValue) :
m_approved(false),
m_approvedHasBeenSet(false),
m_overridden(false),
m_overriddenHasBeenSet(false),
m_approvalRulesSatisfiedHasBeenSet(false),
m_approvalRulesNotSatisfiedHasBeenSet(false)
{
*this = jsonValue;
}
Evaluation& Evaluation::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("approved"))
{
m_approved = jsonValue.GetBool("approved");
m_approvedHasBeenSet = true;
}
if(jsonValue.ValueExists("overridden"))
{
m_overridden = jsonValue.GetBool("overridden");
m_overriddenHasBeenSet = true;
}
if(jsonValue.ValueExists("approvalRulesSatisfied"))
{
Array<JsonView> approvalRulesSatisfiedJsonList = jsonValue.GetArray("approvalRulesSatisfied");
for(unsigned approvalRulesSatisfiedIndex = 0; approvalRulesSatisfiedIndex < approvalRulesSatisfiedJsonList.GetLength(); ++approvalRulesSatisfiedIndex)
{
m_approvalRulesSatisfied.push_back(approvalRulesSatisfiedJsonList[approvalRulesSatisfiedIndex].AsString());
}
m_approvalRulesSatisfiedHasBeenSet = true;
}
if(jsonValue.ValueExists("approvalRulesNotSatisfied"))
{
Array<JsonView> approvalRulesNotSatisfiedJsonList = jsonValue.GetArray("approvalRulesNotSatisfied");
for(unsigned approvalRulesNotSatisfiedIndex = 0; approvalRulesNotSatisfiedIndex < approvalRulesNotSatisfiedJsonList.GetLength(); ++approvalRulesNotSatisfiedIndex)
{
m_approvalRulesNotSatisfied.push_back(approvalRulesNotSatisfiedJsonList[approvalRulesNotSatisfiedIndex].AsString());
}
m_approvalRulesNotSatisfiedHasBeenSet = true;
}
return *this;
}
JsonValue Evaluation::Jsonize() const
{
JsonValue payload;
if(m_approvedHasBeenSet)
{
payload.WithBool("approved", m_approved);
}
if(m_overriddenHasBeenSet)
{
payload.WithBool("overridden", m_overridden);
}
if(m_approvalRulesSatisfiedHasBeenSet)
{
Array<JsonValue> approvalRulesSatisfiedJsonList(m_approvalRulesSatisfied.size());
for(unsigned approvalRulesSatisfiedIndex = 0; approvalRulesSatisfiedIndex < approvalRulesSatisfiedJsonList.GetLength(); ++approvalRulesSatisfiedIndex)
{
approvalRulesSatisfiedJsonList[approvalRulesSatisfiedIndex].AsString(m_approvalRulesSatisfied[approvalRulesSatisfiedIndex]);
}
payload.WithArray("approvalRulesSatisfied", std::move(approvalRulesSatisfiedJsonList));
}
if(m_approvalRulesNotSatisfiedHasBeenSet)
{
Array<JsonValue> approvalRulesNotSatisfiedJsonList(m_approvalRulesNotSatisfied.size());
for(unsigned approvalRulesNotSatisfiedIndex = 0; approvalRulesNotSatisfiedIndex < approvalRulesNotSatisfiedJsonList.GetLength(); ++approvalRulesNotSatisfiedIndex)
{
approvalRulesNotSatisfiedJsonList[approvalRulesNotSatisfiedIndex].AsString(m_approvalRulesNotSatisfied[approvalRulesNotSatisfiedIndex]);
}
payload.WithArray("approvalRulesNotSatisfied", std::move(approvalRulesNotSatisfiedJsonList));
}
return payload;
}
} // namespace Model
} // namespace CodeCommit
} // namespace Aws

View File

@@ -0,0 +1,105 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/File.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CodeCommit
{
namespace Model
{
File::File() :
m_blobIdHasBeenSet(false),
m_absolutePathHasBeenSet(false),
m_relativePathHasBeenSet(false),
m_fileMode(FileModeTypeEnum::NOT_SET),
m_fileModeHasBeenSet(false)
{
}
File::File(JsonView jsonValue) :
m_blobIdHasBeenSet(false),
m_absolutePathHasBeenSet(false),
m_relativePathHasBeenSet(false),
m_fileMode(FileModeTypeEnum::NOT_SET),
m_fileModeHasBeenSet(false)
{
*this = jsonValue;
}
File& File::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("blobId"))
{
m_blobId = jsonValue.GetString("blobId");
m_blobIdHasBeenSet = true;
}
if(jsonValue.ValueExists("absolutePath"))
{
m_absolutePath = jsonValue.GetString("absolutePath");
m_absolutePathHasBeenSet = true;
}
if(jsonValue.ValueExists("relativePath"))
{
m_relativePath = jsonValue.GetString("relativePath");
m_relativePathHasBeenSet = true;
}
if(jsonValue.ValueExists("fileMode"))
{
m_fileMode = FileModeTypeEnumMapper::GetFileModeTypeEnumForName(jsonValue.GetString("fileMode"));
m_fileModeHasBeenSet = true;
}
return *this;
}
JsonValue File::Jsonize() const
{
JsonValue payload;
if(m_blobIdHasBeenSet)
{
payload.WithString("blobId", m_blobId);
}
if(m_absolutePathHasBeenSet)
{
payload.WithString("absolutePath", m_absolutePath);
}
if(m_relativePathHasBeenSet)
{
payload.WithString("relativePath", m_relativePath);
}
if(m_fileModeHasBeenSet)
{
payload.WithString("fileMode", FileModeTypeEnumMapper::GetNameForFileModeTypeEnum(m_fileMode));
}
return payload;
}
} // namespace Model
} // namespace CodeCommit
} // 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/codecommit/model/FileMetadata.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CodeCommit
{
namespace Model
{
FileMetadata::FileMetadata() :
m_absolutePathHasBeenSet(false),
m_blobIdHasBeenSet(false),
m_fileMode(FileModeTypeEnum::NOT_SET),
m_fileModeHasBeenSet(false)
{
}
FileMetadata::FileMetadata(JsonView jsonValue) :
m_absolutePathHasBeenSet(false),
m_blobIdHasBeenSet(false),
m_fileMode(FileModeTypeEnum::NOT_SET),
m_fileModeHasBeenSet(false)
{
*this = jsonValue;
}
FileMetadata& FileMetadata::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("absolutePath"))
{
m_absolutePath = jsonValue.GetString("absolutePath");
m_absolutePathHasBeenSet = true;
}
if(jsonValue.ValueExists("blobId"))
{
m_blobId = jsonValue.GetString("blobId");
m_blobIdHasBeenSet = true;
}
if(jsonValue.ValueExists("fileMode"))
{
m_fileMode = FileModeTypeEnumMapper::GetFileModeTypeEnumForName(jsonValue.GetString("fileMode"));
m_fileModeHasBeenSet = true;
}
return *this;
}
JsonValue FileMetadata::Jsonize() const
{
JsonValue payload;
if(m_absolutePathHasBeenSet)
{
payload.WithString("absolutePath", m_absolutePath);
}
if(m_blobIdHasBeenSet)
{
payload.WithString("blobId", m_blobId);
}
if(m_fileModeHasBeenSet)
{
payload.WithString("fileMode", FileModeTypeEnumMapper::GetNameForFileModeTypeEnum(m_fileMode));
}
return payload;
}
} // namespace Model
} // namespace CodeCommit
} // 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/codecommit/model/FileModeTypeEnum.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 CodeCommit
{
namespace Model
{
namespace FileModeTypeEnumMapper
{
static const int EXECUTABLE_HASH = HashingUtils::HashString("EXECUTABLE");
static const int NORMAL_HASH = HashingUtils::HashString("NORMAL");
static const int SYMLINK_HASH = HashingUtils::HashString("SYMLINK");
FileModeTypeEnum GetFileModeTypeEnumForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == EXECUTABLE_HASH)
{
return FileModeTypeEnum::EXECUTABLE;
}
else if (hashCode == NORMAL_HASH)
{
return FileModeTypeEnum::NORMAL;
}
else if (hashCode == SYMLINK_HASH)
{
return FileModeTypeEnum::SYMLINK;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<FileModeTypeEnum>(hashCode);
}
return FileModeTypeEnum::NOT_SET;
}
Aws::String GetNameForFileModeTypeEnum(FileModeTypeEnum enumValue)
{
switch(enumValue)
{
case FileModeTypeEnum::EXECUTABLE:
return "EXECUTABLE";
case FileModeTypeEnum::NORMAL:
return "NORMAL";
case FileModeTypeEnum::SYMLINK:
return "SYMLINK";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace FileModeTypeEnumMapper
} // namespace Model
} // namespace CodeCommit
} // namespace Aws

View File

@@ -0,0 +1,92 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/FileModes.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CodeCommit
{
namespace Model
{
FileModes::FileModes() :
m_source(FileModeTypeEnum::NOT_SET),
m_sourceHasBeenSet(false),
m_destination(FileModeTypeEnum::NOT_SET),
m_destinationHasBeenSet(false),
m_base(FileModeTypeEnum::NOT_SET),
m_baseHasBeenSet(false)
{
}
FileModes::FileModes(JsonView jsonValue) :
m_source(FileModeTypeEnum::NOT_SET),
m_sourceHasBeenSet(false),
m_destination(FileModeTypeEnum::NOT_SET),
m_destinationHasBeenSet(false),
m_base(FileModeTypeEnum::NOT_SET),
m_baseHasBeenSet(false)
{
*this = jsonValue;
}
FileModes& FileModes::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("source"))
{
m_source = FileModeTypeEnumMapper::GetFileModeTypeEnumForName(jsonValue.GetString("source"));
m_sourceHasBeenSet = true;
}
if(jsonValue.ValueExists("destination"))
{
m_destination = FileModeTypeEnumMapper::GetFileModeTypeEnumForName(jsonValue.GetString("destination"));
m_destinationHasBeenSet = true;
}
if(jsonValue.ValueExists("base"))
{
m_base = FileModeTypeEnumMapper::GetFileModeTypeEnumForName(jsonValue.GetString("base"));
m_baseHasBeenSet = true;
}
return *this;
}
JsonValue FileModes::Jsonize() const
{
JsonValue payload;
if(m_sourceHasBeenSet)
{
payload.WithString("source", FileModeTypeEnumMapper::GetNameForFileModeTypeEnum(m_source));
}
if(m_destinationHasBeenSet)
{
payload.WithString("destination", FileModeTypeEnumMapper::GetNameForFileModeTypeEnum(m_destination));
}
if(m_baseHasBeenSet)
{
payload.WithString("base", FileModeTypeEnumMapper::GetNameForFileModeTypeEnum(m_base));
}
return payload;
}
} // namespace Model
} // namespace CodeCommit
} // namespace Aws

View File

@@ -0,0 +1,95 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/FileSizes.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CodeCommit
{
namespace Model
{
FileSizes::FileSizes() :
m_source(0),
m_sourceHasBeenSet(false),
m_destination(0),
m_destinationHasBeenSet(false),
m_base(0),
m_baseHasBeenSet(false)
{
}
FileSizes::FileSizes(JsonView jsonValue) :
m_source(0),
m_sourceHasBeenSet(false),
m_destination(0),
m_destinationHasBeenSet(false),
m_base(0),
m_baseHasBeenSet(false)
{
*this = jsonValue;
}
FileSizes& FileSizes::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("source"))
{
m_source = jsonValue.GetInt64("source");
m_sourceHasBeenSet = true;
}
if(jsonValue.ValueExists("destination"))
{
m_destination = jsonValue.GetInt64("destination");
m_destinationHasBeenSet = true;
}
if(jsonValue.ValueExists("base"))
{
m_base = jsonValue.GetInt64("base");
m_baseHasBeenSet = true;
}
return *this;
}
JsonValue FileSizes::Jsonize() const
{
JsonValue payload;
if(m_sourceHasBeenSet)
{
payload.WithInt64("source", m_source);
}
if(m_destinationHasBeenSet)
{
payload.WithInt64("destination", m_destination);
}
if(m_baseHasBeenSet)
{
payload.WithInt64("base", m_base);
}
return payload;
}
} // namespace Model
} // namespace CodeCommit
} // 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/codecommit/model/Folder.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace CodeCommit
{
namespace Model
{
Folder::Folder() :
m_treeIdHasBeenSet(false),
m_absolutePathHasBeenSet(false),
m_relativePathHasBeenSet(false)
{
}
Folder::Folder(JsonView jsonValue) :
m_treeIdHasBeenSet(false),
m_absolutePathHasBeenSet(false),
m_relativePathHasBeenSet(false)
{
*this = jsonValue;
}
Folder& Folder::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("treeId"))
{
m_treeId = jsonValue.GetString("treeId");
m_treeIdHasBeenSet = true;
}
if(jsonValue.ValueExists("absolutePath"))
{
m_absolutePath = jsonValue.GetString("absolutePath");
m_absolutePathHasBeenSet = true;
}
if(jsonValue.ValueExists("relativePath"))
{
m_relativePath = jsonValue.GetString("relativePath");
m_relativePathHasBeenSet = true;
}
return *this;
}
JsonValue Folder::Jsonize() const
{
JsonValue payload;
if(m_treeIdHasBeenSet)
{
payload.WithString("treeId", m_treeId);
}
if(m_absolutePathHasBeenSet)
{
payload.WithString("absolutePath", m_absolutePath);
}
if(m_relativePathHasBeenSet)
{
payload.WithString("relativePath", m_relativePath);
}
return payload;
}
} // namespace Model
} // namespace CodeCommit
} // 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/codecommit/model/GetApprovalRuleTemplateRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
GetApprovalRuleTemplateRequest::GetApprovalRuleTemplateRequest() :
m_approvalRuleTemplateNameHasBeenSet(false)
{
}
Aws::String GetApprovalRuleTemplateRequest::SerializePayload() const
{
JsonValue payload;
if(m_approvalRuleTemplateNameHasBeenSet)
{
payload.WithString("approvalRuleTemplateName", m_approvalRuleTemplateName);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection GetApprovalRuleTemplateRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "CodeCommit_20150413.GetApprovalRuleTemplate"));
return headers;
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/GetApprovalRuleTemplateResult.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::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
GetApprovalRuleTemplateResult::GetApprovalRuleTemplateResult()
{
}
GetApprovalRuleTemplateResult::GetApprovalRuleTemplateResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
GetApprovalRuleTemplateResult& GetApprovalRuleTemplateResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("approvalRuleTemplate"))
{
m_approvalRuleTemplate = jsonValue.GetObject("approvalRuleTemplate");
}
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/codecommit/model/GetBlobRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
GetBlobRequest::GetBlobRequest() :
m_repositoryNameHasBeenSet(false),
m_blobIdHasBeenSet(false)
{
}
Aws::String GetBlobRequest::SerializePayload() const
{
JsonValue payload;
if(m_repositoryNameHasBeenSet)
{
payload.WithString("repositoryName", m_repositoryName);
}
if(m_blobIdHasBeenSet)
{
payload.WithString("blobId", m_blobId);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection GetBlobRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "CodeCommit_20150413.GetBlob"));
return headers;
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/GetBlobResult.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 <aws/core/utils/HashingUtils.h>
#include <utility>
using namespace Aws::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
GetBlobResult::GetBlobResult()
{
}
GetBlobResult::GetBlobResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
GetBlobResult& GetBlobResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("content"))
{
m_content = HashingUtils::Base64Decode(jsonValue.GetString("content"));
}
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/codecommit/model/GetBranchRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
GetBranchRequest::GetBranchRequest() :
m_repositoryNameHasBeenSet(false),
m_branchNameHasBeenSet(false)
{
}
Aws::String GetBranchRequest::SerializePayload() const
{
JsonValue payload;
if(m_repositoryNameHasBeenSet)
{
payload.WithString("repositoryName", m_repositoryName);
}
if(m_branchNameHasBeenSet)
{
payload.WithString("branchName", m_branchName);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection GetBranchRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "CodeCommit_20150413.GetBranch"));
return headers;
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/GetBranchResult.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::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
GetBranchResult::GetBranchResult()
{
}
GetBranchResult::GetBranchResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
GetBranchResult& GetBranchResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("branch"))
{
m_branch = jsonValue.GetObject("branch");
}
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/codecommit/model/GetCommentReactionsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
GetCommentReactionsRequest::GetCommentReactionsRequest() :
m_commentIdHasBeenSet(false),
m_reactionUserArnHasBeenSet(false),
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false)
{
}
Aws::String GetCommentReactionsRequest::SerializePayload() const
{
JsonValue payload;
if(m_commentIdHasBeenSet)
{
payload.WithString("commentId", m_commentId);
}
if(m_reactionUserArnHasBeenSet)
{
payload.WithString("reactionUserArn", m_reactionUserArn);
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("nextToken", m_nextToken);
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("maxResults", m_maxResults);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection GetCommentReactionsRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "CodeCommit_20150413.GetCommentReactions"));
return headers;
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/GetCommentReactionsResult.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::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
GetCommentReactionsResult::GetCommentReactionsResult()
{
}
GetCommentReactionsResult::GetCommentReactionsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
GetCommentReactionsResult& GetCommentReactionsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("reactionsForComment"))
{
Array<JsonView> reactionsForCommentJsonList = jsonValue.GetArray("reactionsForComment");
for(unsigned reactionsForCommentIndex = 0; reactionsForCommentIndex < reactionsForCommentJsonList.GetLength(); ++reactionsForCommentIndex)
{
m_reactionsForComment.push_back(reactionsForCommentJsonList[reactionsForCommentIndex].AsObject());
}
}
if(jsonValue.ValueExists("nextToken"))
{
m_nextToken = jsonValue.GetString("nextToken");
}
return *this;
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/GetCommentRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
GetCommentRequest::GetCommentRequest() :
m_commentIdHasBeenSet(false)
{
}
Aws::String GetCommentRequest::SerializePayload() const
{
JsonValue payload;
if(m_commentIdHasBeenSet)
{
payload.WithString("commentId", m_commentId);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection GetCommentRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "CodeCommit_20150413.GetComment"));
return headers;
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/GetCommentResult.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::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
GetCommentResult::GetCommentResult()
{
}
GetCommentResult::GetCommentResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
GetCommentResult& GetCommentResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("comment"))
{
m_comment = jsonValue.GetObject("comment");
}
return *this;
}

View File

@@ -0,0 +1,72 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/GetCommentsForComparedCommitRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
GetCommentsForComparedCommitRequest::GetCommentsForComparedCommitRequest() :
m_repositoryNameHasBeenSet(false),
m_beforeCommitIdHasBeenSet(false),
m_afterCommitIdHasBeenSet(false),
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false)
{
}
Aws::String GetCommentsForComparedCommitRequest::SerializePayload() const
{
JsonValue payload;
if(m_repositoryNameHasBeenSet)
{
payload.WithString("repositoryName", m_repositoryName);
}
if(m_beforeCommitIdHasBeenSet)
{
payload.WithString("beforeCommitId", m_beforeCommitId);
}
if(m_afterCommitIdHasBeenSet)
{
payload.WithString("afterCommitId", m_afterCommitId);
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("nextToken", m_nextToken);
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("maxResults", m_maxResults);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection GetCommentsForComparedCommitRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "CodeCommit_20150413.GetCommentsForComparedCommit"));
return headers;
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/GetCommentsForComparedCommitResult.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::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
GetCommentsForComparedCommitResult::GetCommentsForComparedCommitResult()
{
}
GetCommentsForComparedCommitResult::GetCommentsForComparedCommitResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
GetCommentsForComparedCommitResult& GetCommentsForComparedCommitResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("commentsForComparedCommitData"))
{
Array<JsonView> commentsForComparedCommitDataJsonList = jsonValue.GetArray("commentsForComparedCommitData");
for(unsigned commentsForComparedCommitDataIndex = 0; commentsForComparedCommitDataIndex < commentsForComparedCommitDataJsonList.GetLength(); ++commentsForComparedCommitDataIndex)
{
m_commentsForComparedCommitData.push_back(commentsForComparedCommitDataJsonList[commentsForComparedCommitDataIndex].AsObject());
}
}
if(jsonValue.ValueExists("nextToken"))
{
m_nextToken = jsonValue.GetString("nextToken");
}
return *this;
}

View File

@@ -0,0 +1,79 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/GetCommentsForPullRequestRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
GetCommentsForPullRequestRequest::GetCommentsForPullRequestRequest() :
m_pullRequestIdHasBeenSet(false),
m_repositoryNameHasBeenSet(false),
m_beforeCommitIdHasBeenSet(false),
m_afterCommitIdHasBeenSet(false),
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false)
{
}
Aws::String GetCommentsForPullRequestRequest::SerializePayload() const
{
JsonValue payload;
if(m_pullRequestIdHasBeenSet)
{
payload.WithString("pullRequestId", m_pullRequestId);
}
if(m_repositoryNameHasBeenSet)
{
payload.WithString("repositoryName", m_repositoryName);
}
if(m_beforeCommitIdHasBeenSet)
{
payload.WithString("beforeCommitId", m_beforeCommitId);
}
if(m_afterCommitIdHasBeenSet)
{
payload.WithString("afterCommitId", m_afterCommitId);
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("nextToken", m_nextToken);
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("maxResults", m_maxResults);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection GetCommentsForPullRequestRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "CodeCommit_20150413.GetCommentsForPullRequest"));
return headers;
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/GetCommentsForPullRequestResult.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::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
GetCommentsForPullRequestResult::GetCommentsForPullRequestResult()
{
}
GetCommentsForPullRequestResult::GetCommentsForPullRequestResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
GetCommentsForPullRequestResult& GetCommentsForPullRequestResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("commentsForPullRequestData"))
{
Array<JsonView> commentsForPullRequestDataJsonList = jsonValue.GetArray("commentsForPullRequestData");
for(unsigned commentsForPullRequestDataIndex = 0; commentsForPullRequestDataIndex < commentsForPullRequestDataJsonList.GetLength(); ++commentsForPullRequestDataIndex)
{
m_commentsForPullRequestData.push_back(commentsForPullRequestDataJsonList[commentsForPullRequestDataIndex].AsObject());
}
}
if(jsonValue.ValueExists("nextToken"))
{
m_nextToken = jsonValue.GetString("nextToken");
}
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/codecommit/model/GetCommitRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
GetCommitRequest::GetCommitRequest() :
m_repositoryNameHasBeenSet(false),
m_commitIdHasBeenSet(false)
{
}
Aws::String GetCommitRequest::SerializePayload() const
{
JsonValue payload;
if(m_repositoryNameHasBeenSet)
{
payload.WithString("repositoryName", m_repositoryName);
}
if(m_commitIdHasBeenSet)
{
payload.WithString("commitId", m_commitId);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection GetCommitRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "CodeCommit_20150413.GetCommit"));
return headers;
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/GetCommitResult.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::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
GetCommitResult::GetCommitResult()
{
}
GetCommitResult::GetCommitResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
GetCommitResult& GetCommitResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("commit"))
{
m_commit = jsonValue.GetObject("commit");
}
return *this;
}

View File

@@ -0,0 +1,86 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/GetDifferencesRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
GetDifferencesRequest::GetDifferencesRequest() :
m_repositoryNameHasBeenSet(false),
m_beforeCommitSpecifierHasBeenSet(false),
m_afterCommitSpecifierHasBeenSet(false),
m_beforePathHasBeenSet(false),
m_afterPathHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false),
m_nextTokenHasBeenSet(false)
{
}
Aws::String GetDifferencesRequest::SerializePayload() const
{
JsonValue payload;
if(m_repositoryNameHasBeenSet)
{
payload.WithString("repositoryName", m_repositoryName);
}
if(m_beforeCommitSpecifierHasBeenSet)
{
payload.WithString("beforeCommitSpecifier", m_beforeCommitSpecifier);
}
if(m_afterCommitSpecifierHasBeenSet)
{
payload.WithString("afterCommitSpecifier", m_afterCommitSpecifier);
}
if(m_beforePathHasBeenSet)
{
payload.WithString("beforePath", m_beforePath);
}
if(m_afterPathHasBeenSet)
{
payload.WithString("afterPath", m_afterPath);
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("MaxResults", m_maxResults);
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("NextToken", m_nextToken);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection GetDifferencesRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "CodeCommit_20150413.GetDifferences"));
return headers;
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/GetDifferencesResult.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::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
GetDifferencesResult::GetDifferencesResult()
{
}
GetDifferencesResult::GetDifferencesResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
GetDifferencesResult& GetDifferencesResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("differences"))
{
Array<JsonView> differencesJsonList = jsonValue.GetArray("differences");
for(unsigned differencesIndex = 0; differencesIndex < differencesJsonList.GetLength(); ++differencesIndex)
{
m_differences.push_back(differencesJsonList[differencesIndex].AsObject());
}
}
if(jsonValue.ValueExists("NextToken"))
{
m_nextToken = jsonValue.GetString("NextToken");
}
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/codecommit/model/GetFileRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
GetFileRequest::GetFileRequest() :
m_repositoryNameHasBeenSet(false),
m_commitSpecifierHasBeenSet(false),
m_filePathHasBeenSet(false)
{
}
Aws::String GetFileRequest::SerializePayload() const
{
JsonValue payload;
if(m_repositoryNameHasBeenSet)
{
payload.WithString("repositoryName", m_repositoryName);
}
if(m_commitSpecifierHasBeenSet)
{
payload.WithString("commitSpecifier", m_commitSpecifier);
}
if(m_filePathHasBeenSet)
{
payload.WithString("filePath", m_filePath);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection GetFileRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "CodeCommit_20150413.GetFile"));
return headers;
}

View File

@@ -0,0 +1,74 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/codecommit/model/GetFileResult.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 <aws/core/utils/HashingUtils.h>
#include <utility>
using namespace Aws::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
GetFileResult::GetFileResult() :
m_fileMode(FileModeTypeEnum::NOT_SET),
m_fileSize(0)
{
}
GetFileResult::GetFileResult(const Aws::AmazonWebServiceResult<JsonValue>& result) :
m_fileMode(FileModeTypeEnum::NOT_SET),
m_fileSize(0)
{
*this = result;
}
GetFileResult& GetFileResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("commitId"))
{
m_commitId = jsonValue.GetString("commitId");
}
if(jsonValue.ValueExists("blobId"))
{
m_blobId = jsonValue.GetString("blobId");
}
if(jsonValue.ValueExists("filePath"))
{
m_filePath = jsonValue.GetString("filePath");
}
if(jsonValue.ValueExists("fileMode"))
{
m_fileMode = FileModeTypeEnumMapper::GetFileModeTypeEnumForName(jsonValue.GetString("fileMode"));
}
if(jsonValue.ValueExists("fileSize"))
{
m_fileSize = jsonValue.GetInt64("fileSize");
}
if(jsonValue.ValueExists("fileContent"))
{
m_fileContent = HashingUtils::Base64Decode(jsonValue.GetString("fileContent"));
}
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/codecommit/model/GetFolderRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::CodeCommit::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
GetFolderRequest::GetFolderRequest() :
m_repositoryNameHasBeenSet(false),
m_commitSpecifierHasBeenSet(false),
m_folderPathHasBeenSet(false)
{
}
Aws::String GetFolderRequest::SerializePayload() const
{
JsonValue payload;
if(m_repositoryNameHasBeenSet)
{
payload.WithString("repositoryName", m_repositoryName);
}
if(m_commitSpecifierHasBeenSet)
{
payload.WithString("commitSpecifier", m_commitSpecifier);
}
if(m_folderPathHasBeenSet)
{
payload.WithString("folderPath", m_folderPath);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection GetFolderRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "CodeCommit_20150413.GetFolder"));
return headers;
}

Some files were not shown because too many files have changed in this diff Show More