First build.

This commit is contained in:
sdk-team
2020-07-24 10:45:33 +08:00
parent 6088526cd8
commit 70047f9bc7
78 changed files with 6524 additions and 1 deletions

701
codeup/src/CodeupClient.cc Normal file
View File

@@ -0,0 +1,701 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/codeup/CodeupClient.h>
#include <alibabacloud/core/SimpleCredentialsProvider.h>
using namespace AlibabaCloud;
using namespace AlibabaCloud::Location;
using namespace AlibabaCloud::Codeup;
using namespace AlibabaCloud::Codeup::Model;
namespace
{
const std::string SERVICE_NAME = "codeup";
}
CodeupClient::CodeupClient(const Credentials &credentials, const ClientConfiguration &configuration) :
RoaServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
CodeupClient::CodeupClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
RoaServiceClient(SERVICE_NAME, credentialsProvider, configuration)
{
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
CodeupClient::CodeupClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
RoaServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
{
auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
}
CodeupClient::~CodeupClient()
{}
CodeupClient::AddGroupMemberOutcome CodeupClient::addGroupMember(const AddGroupMemberRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return AddGroupMemberOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return AddGroupMemberOutcome(AddGroupMemberResult(outcome.result()));
else
return AddGroupMemberOutcome(outcome.error());
}
void CodeupClient::addGroupMemberAsync(const AddGroupMemberRequest& request, const AddGroupMemberAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, addGroupMember(request), context);
};
asyncExecute(new Runnable(fn));
}
CodeupClient::AddGroupMemberOutcomeCallable CodeupClient::addGroupMemberCallable(const AddGroupMemberRequest &request) const
{
auto task = std::make_shared<std::packaged_task<AddGroupMemberOutcome()>>(
[this, request]()
{
return this->addGroupMember(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CodeupClient::AddRepositoryMemberOutcome CodeupClient::addRepositoryMember(const AddRepositoryMemberRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return AddRepositoryMemberOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return AddRepositoryMemberOutcome(AddRepositoryMemberResult(outcome.result()));
else
return AddRepositoryMemberOutcome(outcome.error());
}
void CodeupClient::addRepositoryMemberAsync(const AddRepositoryMemberRequest& request, const AddRepositoryMemberAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, addRepositoryMember(request), context);
};
asyncExecute(new Runnable(fn));
}
CodeupClient::AddRepositoryMemberOutcomeCallable CodeupClient::addRepositoryMemberCallable(const AddRepositoryMemberRequest &request) const
{
auto task = std::make_shared<std::packaged_task<AddRepositoryMemberOutcome()>>(
[this, request]()
{
return this->addRepositoryMember(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CodeupClient::CreateFileOutcome CodeupClient::createFile(const CreateFileRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return CreateFileOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return CreateFileOutcome(CreateFileResult(outcome.result()));
else
return CreateFileOutcome(outcome.error());
}
void CodeupClient::createFileAsync(const CreateFileRequest& request, const CreateFileAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, createFile(request), context);
};
asyncExecute(new Runnable(fn));
}
CodeupClient::CreateFileOutcomeCallable CodeupClient::createFileCallable(const CreateFileRequest &request) const
{
auto task = std::make_shared<std::packaged_task<CreateFileOutcome()>>(
[this, request]()
{
return this->createFile(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CodeupClient::CreateRepositoryOutcome CodeupClient::createRepository(const CreateRepositoryRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return CreateRepositoryOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return CreateRepositoryOutcome(CreateRepositoryResult(outcome.result()));
else
return CreateRepositoryOutcome(outcome.error());
}
void CodeupClient::createRepositoryAsync(const CreateRepositoryRequest& request, const CreateRepositoryAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, createRepository(request), context);
};
asyncExecute(new Runnable(fn));
}
CodeupClient::CreateRepositoryOutcomeCallable CodeupClient::createRepositoryCallable(const CreateRepositoryRequest &request) const
{
auto task = std::make_shared<std::packaged_task<CreateRepositoryOutcome()>>(
[this, request]()
{
return this->createRepository(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CodeupClient::CreateRepositoryGroupOutcome CodeupClient::createRepositoryGroup(const CreateRepositoryGroupRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return CreateRepositoryGroupOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return CreateRepositoryGroupOutcome(CreateRepositoryGroupResult(outcome.result()));
else
return CreateRepositoryGroupOutcome(outcome.error());
}
void CodeupClient::createRepositoryGroupAsync(const CreateRepositoryGroupRequest& request, const CreateRepositoryGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, createRepositoryGroup(request), context);
};
asyncExecute(new Runnable(fn));
}
CodeupClient::CreateRepositoryGroupOutcomeCallable CodeupClient::createRepositoryGroupCallable(const CreateRepositoryGroupRequest &request) const
{
auto task = std::make_shared<std::packaged_task<CreateRepositoryGroupOutcome()>>(
[this, request]()
{
return this->createRepositoryGroup(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CodeupClient::DeleteFileOutcome CodeupClient::deleteFile(const DeleteFileRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DeleteFileOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DeleteFileOutcome(DeleteFileResult(outcome.result()));
else
return DeleteFileOutcome(outcome.error());
}
void CodeupClient::deleteFileAsync(const DeleteFileRequest& request, const DeleteFileAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, deleteFile(request), context);
};
asyncExecute(new Runnable(fn));
}
CodeupClient::DeleteFileOutcomeCallable CodeupClient::deleteFileCallable(const DeleteFileRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DeleteFileOutcome()>>(
[this, request]()
{
return this->deleteFile(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CodeupClient::DeleteGroupMemberOutcome CodeupClient::deleteGroupMember(const DeleteGroupMemberRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DeleteGroupMemberOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DeleteGroupMemberOutcome(DeleteGroupMemberResult(outcome.result()));
else
return DeleteGroupMemberOutcome(outcome.error());
}
void CodeupClient::deleteGroupMemberAsync(const DeleteGroupMemberRequest& request, const DeleteGroupMemberAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, deleteGroupMember(request), context);
};
asyncExecute(new Runnable(fn));
}
CodeupClient::DeleteGroupMemberOutcomeCallable CodeupClient::deleteGroupMemberCallable(const DeleteGroupMemberRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DeleteGroupMemberOutcome()>>(
[this, request]()
{
return this->deleteGroupMember(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CodeupClient::DeleteRepositoryOutcome CodeupClient::deleteRepository(const DeleteRepositoryRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DeleteRepositoryOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DeleteRepositoryOutcome(DeleteRepositoryResult(outcome.result()));
else
return DeleteRepositoryOutcome(outcome.error());
}
void CodeupClient::deleteRepositoryAsync(const DeleteRepositoryRequest& request, const DeleteRepositoryAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, deleteRepository(request), context);
};
asyncExecute(new Runnable(fn));
}
CodeupClient::DeleteRepositoryOutcomeCallable CodeupClient::deleteRepositoryCallable(const DeleteRepositoryRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DeleteRepositoryOutcome()>>(
[this, request]()
{
return this->deleteRepository(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CodeupClient::DeleteRepositoryGroupOutcome CodeupClient::deleteRepositoryGroup(const DeleteRepositoryGroupRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DeleteRepositoryGroupOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DeleteRepositoryGroupOutcome(DeleteRepositoryGroupResult(outcome.result()));
else
return DeleteRepositoryGroupOutcome(outcome.error());
}
void CodeupClient::deleteRepositoryGroupAsync(const DeleteRepositoryGroupRequest& request, const DeleteRepositoryGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, deleteRepositoryGroup(request), context);
};
asyncExecute(new Runnable(fn));
}
CodeupClient::DeleteRepositoryGroupOutcomeCallable CodeupClient::deleteRepositoryGroupCallable(const DeleteRepositoryGroupRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DeleteRepositoryGroupOutcome()>>(
[this, request]()
{
return this->deleteRepositoryGroup(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CodeupClient::DeleteRepositoryMemberOutcome CodeupClient::deleteRepositoryMember(const DeleteRepositoryMemberRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DeleteRepositoryMemberOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DeleteRepositoryMemberOutcome(DeleteRepositoryMemberResult(outcome.result()));
else
return DeleteRepositoryMemberOutcome(outcome.error());
}
void CodeupClient::deleteRepositoryMemberAsync(const DeleteRepositoryMemberRequest& request, const DeleteRepositoryMemberAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, deleteRepositoryMember(request), context);
};
asyncExecute(new Runnable(fn));
}
CodeupClient::DeleteRepositoryMemberOutcomeCallable CodeupClient::deleteRepositoryMemberCallable(const DeleteRepositoryMemberRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DeleteRepositoryMemberOutcome()>>(
[this, request]()
{
return this->deleteRepositoryMember(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CodeupClient::GetCodeupOrganizationOutcome CodeupClient::getCodeupOrganization(const GetCodeupOrganizationRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetCodeupOrganizationOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetCodeupOrganizationOutcome(GetCodeupOrganizationResult(outcome.result()));
else
return GetCodeupOrganizationOutcome(outcome.error());
}
void CodeupClient::getCodeupOrganizationAsync(const GetCodeupOrganizationRequest& request, const GetCodeupOrganizationAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getCodeupOrganization(request), context);
};
asyncExecute(new Runnable(fn));
}
CodeupClient::GetCodeupOrganizationOutcomeCallable CodeupClient::getCodeupOrganizationCallable(const GetCodeupOrganizationRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetCodeupOrganizationOutcome()>>(
[this, request]()
{
return this->getCodeupOrganization(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CodeupClient::GetFileBlobsOutcome CodeupClient::getFileBlobs(const GetFileBlobsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetFileBlobsOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetFileBlobsOutcome(GetFileBlobsResult(outcome.result()));
else
return GetFileBlobsOutcome(outcome.error());
}
void CodeupClient::getFileBlobsAsync(const GetFileBlobsRequest& request, const GetFileBlobsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getFileBlobs(request), context);
};
asyncExecute(new Runnable(fn));
}
CodeupClient::GetFileBlobsOutcomeCallable CodeupClient::getFileBlobsCallable(const GetFileBlobsRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetFileBlobsOutcome()>>(
[this, request]()
{
return this->getFileBlobs(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CodeupClient::ListGroupMemberOutcome CodeupClient::listGroupMember(const ListGroupMemberRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListGroupMemberOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListGroupMemberOutcome(ListGroupMemberResult(outcome.result()));
else
return ListGroupMemberOutcome(outcome.error());
}
void CodeupClient::listGroupMemberAsync(const ListGroupMemberRequest& request, const ListGroupMemberAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listGroupMember(request), context);
};
asyncExecute(new Runnable(fn));
}
CodeupClient::ListGroupMemberOutcomeCallable CodeupClient::listGroupMemberCallable(const ListGroupMemberRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListGroupMemberOutcome()>>(
[this, request]()
{
return this->listGroupMember(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CodeupClient::ListRepositoryMemberOutcome CodeupClient::listRepositoryMember(const ListRepositoryMemberRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListRepositoryMemberOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListRepositoryMemberOutcome(ListRepositoryMemberResult(outcome.result()));
else
return ListRepositoryMemberOutcome(outcome.error());
}
void CodeupClient::listRepositoryMemberAsync(const ListRepositoryMemberRequest& request, const ListRepositoryMemberAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listRepositoryMember(request), context);
};
asyncExecute(new Runnable(fn));
}
CodeupClient::ListRepositoryMemberOutcomeCallable CodeupClient::listRepositoryMemberCallable(const ListRepositoryMemberRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListRepositoryMemberOutcome()>>(
[this, request]()
{
return this->listRepositoryMember(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CodeupClient::ListRepositoryTreeOutcome CodeupClient::listRepositoryTree(const ListRepositoryTreeRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListRepositoryTreeOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListRepositoryTreeOutcome(ListRepositoryTreeResult(outcome.result()));
else
return ListRepositoryTreeOutcome(outcome.error());
}
void CodeupClient::listRepositoryTreeAsync(const ListRepositoryTreeRequest& request, const ListRepositoryTreeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listRepositoryTree(request), context);
};
asyncExecute(new Runnable(fn));
}
CodeupClient::ListRepositoryTreeOutcomeCallable CodeupClient::listRepositoryTreeCallable(const ListRepositoryTreeRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListRepositoryTreeOutcome()>>(
[this, request]()
{
return this->listRepositoryTree(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CodeupClient::UpdateFileOutcome CodeupClient::updateFile(const UpdateFileRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return UpdateFileOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return UpdateFileOutcome(UpdateFileResult(outcome.result()));
else
return UpdateFileOutcome(outcome.error());
}
void CodeupClient::updateFileAsync(const UpdateFileRequest& request, const UpdateFileAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, updateFile(request), context);
};
asyncExecute(new Runnable(fn));
}
CodeupClient::UpdateFileOutcomeCallable CodeupClient::updateFileCallable(const UpdateFileRequest &request) const
{
auto task = std::make_shared<std::packaged_task<UpdateFileOutcome()>>(
[this, request]()
{
return this->updateFile(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CodeupClient::UpdateGroupMemberOutcome CodeupClient::updateGroupMember(const UpdateGroupMemberRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return UpdateGroupMemberOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return UpdateGroupMemberOutcome(UpdateGroupMemberResult(outcome.result()));
else
return UpdateGroupMemberOutcome(outcome.error());
}
void CodeupClient::updateGroupMemberAsync(const UpdateGroupMemberRequest& request, const UpdateGroupMemberAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, updateGroupMember(request), context);
};
asyncExecute(new Runnable(fn));
}
CodeupClient::UpdateGroupMemberOutcomeCallable CodeupClient::updateGroupMemberCallable(const UpdateGroupMemberRequest &request) const
{
auto task = std::make_shared<std::packaged_task<UpdateGroupMemberOutcome()>>(
[this, request]()
{
return this->updateGroupMember(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
CodeupClient::UpdateRepositoryMemberOutcome CodeupClient::updateRepositoryMember(const UpdateRepositoryMemberRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return UpdateRepositoryMemberOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return UpdateRepositoryMemberOutcome(UpdateRepositoryMemberResult(outcome.result()));
else
return UpdateRepositoryMemberOutcome(outcome.error());
}
void CodeupClient::updateRepositoryMemberAsync(const UpdateRepositoryMemberRequest& request, const UpdateRepositoryMemberAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, updateRepositoryMember(request), context);
};
asyncExecute(new Runnable(fn));
}
CodeupClient::UpdateRepositoryMemberOutcomeCallable CodeupClient::updateRepositoryMemberCallable(const UpdateRepositoryMemberRequest &request) const
{
auto task = std::make_shared<std::packaged_task<UpdateRepositoryMemberOutcome()>>(
[this, request]()
{
return this->updateRepositoryMember(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}

View File

@@ -0,0 +1,85 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/codeup/model/AddGroupMemberRequest.h>
using AlibabaCloud::Codeup::Model::AddGroupMemberRequest;
AddGroupMemberRequest::AddGroupMemberRequest() :
RoaServiceRequest("codeup", "2020-04-14")
{
setResourcePath("/api/v4/groups/[GroupId]/members");
setMethod(HttpRequest::Method::Post);
}
AddGroupMemberRequest::~AddGroupMemberRequest()
{}
std::string AddGroupMemberRequest::getOrganizationId()const
{
return organizationId_;
}
void AddGroupMemberRequest::setOrganizationId(const std::string& organizationId)
{
organizationId_ = organizationId;
setParameter("OrganizationId", organizationId);
}
std::string AddGroupMemberRequest::getSubUserId()const
{
return subUserId_;
}
void AddGroupMemberRequest::setSubUserId(const std::string& subUserId)
{
subUserId_ = subUserId;
setParameter("SubUserId", subUserId);
}
std::string AddGroupMemberRequest::getClientToken()const
{
return clientToken_;
}
void AddGroupMemberRequest::setClientToken(const std::string& clientToken)
{
clientToken_ = clientToken;
setParameter("ClientToken", clientToken);
}
long AddGroupMemberRequest::getGroupId()const
{
return groupId_;
}
void AddGroupMemberRequest::setGroupId(long groupId)
{
groupId_ = groupId;
setParameter("GroupId", std::to_string(groupId));
}
std::string AddGroupMemberRequest::getAccessToken()const
{
return accessToken_;
}
void AddGroupMemberRequest::setAccessToken(const std::string& accessToken)
{
accessToken_ = accessToken;
setParameter("AccessToken", accessToken);
}

View File

@@ -0,0 +1,88 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/codeup/model/AddGroupMemberResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Codeup;
using namespace AlibabaCloud::Codeup::Model;
AddGroupMemberResult::AddGroupMemberResult() :
ServiceResult()
{}
AddGroupMemberResult::AddGroupMemberResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
AddGroupMemberResult::~AddGroupMemberResult()
{}
void AddGroupMemberResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allResultNode = value["Result"]["ResultItem"];
for (auto valueResultResultItem : allResultNode)
{
ResultItem resultObject;
if(!valueResultResultItem["AccessLevel"].isNull())
resultObject.accessLevel = std::stoi(valueResultResultItem["AccessLevel"].asString());
if(!valueResultResultItem["ExternUserId"].isNull())
resultObject.externUserId = valueResultResultItem["ExternUserId"].asString();
if(!valueResultResultItem["Id"].isNull())
resultObject.id = std::stol(valueResultResultItem["Id"].asString());
if(!valueResultResultItem["State"].isNull())
resultObject.state = valueResultResultItem["State"].asString();
if(!valueResultResultItem["AvatarUrl"].isNull())
resultObject.avatarUrl = valueResultResultItem["AvatarUrl"].asString();
if(!valueResultResultItem["Email"].isNull())
resultObject.email = valueResultResultItem["Email"].asString();
result_.push_back(resultObject);
}
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
std::string AddGroupMemberResult::getErrorCode()const
{
return errorCode_;
}
std::string AddGroupMemberResult::getErrorMessage()const
{
return errorMessage_;
}
bool AddGroupMemberResult::getSuccess()const
{
return success_;
}
std::vector<AddGroupMemberResult::ResultItem> AddGroupMemberResult::getResult()const
{
return result_;
}

View File

@@ -0,0 +1,85 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/codeup/model/AddRepositoryMemberRequest.h>
using AlibabaCloud::Codeup::Model::AddRepositoryMemberRequest;
AddRepositoryMemberRequest::AddRepositoryMemberRequest() :
RoaServiceRequest("codeup", "2020-04-14")
{
setResourcePath("/api/v4/projects/[ProjectId]/members");
setMethod(HttpRequest::Method::Post);
}
AddRepositoryMemberRequest::~AddRepositoryMemberRequest()
{}
std::string AddRepositoryMemberRequest::getOrganizationId()const
{
return organizationId_;
}
void AddRepositoryMemberRequest::setOrganizationId(const std::string& organizationId)
{
organizationId_ = organizationId;
setParameter("OrganizationId", organizationId);
}
std::string AddRepositoryMemberRequest::getSubUserId()const
{
return subUserId_;
}
void AddRepositoryMemberRequest::setSubUserId(const std::string& subUserId)
{
subUserId_ = subUserId;
setParameter("SubUserId", subUserId);
}
std::string AddRepositoryMemberRequest::getClientToken()const
{
return clientToken_;
}
void AddRepositoryMemberRequest::setClientToken(const std::string& clientToken)
{
clientToken_ = clientToken;
setParameter("ClientToken", clientToken);
}
std::string AddRepositoryMemberRequest::getAccessToken()const
{
return accessToken_;
}
void AddRepositoryMemberRequest::setAccessToken(const std::string& accessToken)
{
accessToken_ = accessToken;
setParameter("AccessToken", accessToken);
}
long AddRepositoryMemberRequest::getProjectId()const
{
return projectId_;
}
void AddRepositoryMemberRequest::setProjectId(long projectId)
{
projectId_ = projectId;
setParameter("ProjectId", std::to_string(projectId));
}

View File

@@ -0,0 +1,88 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/codeup/model/AddRepositoryMemberResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Codeup;
using namespace AlibabaCloud::Codeup::Model;
AddRepositoryMemberResult::AddRepositoryMemberResult() :
ServiceResult()
{}
AddRepositoryMemberResult::AddRepositoryMemberResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
AddRepositoryMemberResult::~AddRepositoryMemberResult()
{}
void AddRepositoryMemberResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allResultNode = value["Result"]["ResultItem"];
for (auto valueResultResultItem : allResultNode)
{
ResultItem resultObject;
if(!valueResultResultItem["AccessLevel"].isNull())
resultObject.accessLevel = std::stoi(valueResultResultItem["AccessLevel"].asString());
if(!valueResultResultItem["ExternUserId"].isNull())
resultObject.externUserId = valueResultResultItem["ExternUserId"].asString();
if(!valueResultResultItem["Id"].isNull())
resultObject.id = std::stol(valueResultResultItem["Id"].asString());
if(!valueResultResultItem["State"].isNull())
resultObject.state = valueResultResultItem["State"].asString();
if(!valueResultResultItem["AvatarUrl"].isNull())
resultObject.avatarUrl = valueResultResultItem["AvatarUrl"].asString();
if(!valueResultResultItem["Email"].isNull())
resultObject.email = valueResultResultItem["Email"].asString();
result_.push_back(resultObject);
}
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
std::string AddRepositoryMemberResult::getErrorCode()const
{
return errorCode_;
}
std::string AddRepositoryMemberResult::getErrorMessage()const
{
return errorMessage_;
}
bool AddRepositoryMemberResult::getSuccess()const
{
return success_;
}
std::vector<AddRepositoryMemberResult::ResultItem> AddRepositoryMemberResult::getResult()const
{
return result_;
}

View File

@@ -0,0 +1,85 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/codeup/model/CreateFileRequest.h>
using AlibabaCloud::Codeup::Model::CreateFileRequest;
CreateFileRequest::CreateFileRequest() :
RoaServiceRequest("codeup", "2020-04-14")
{
setResourcePath("/api/v3/projects/[ProjectId]/repository/files");
setMethod(HttpRequest::Method::Post);
}
CreateFileRequest::~CreateFileRequest()
{}
std::string CreateFileRequest::getOrganizationId()const
{
return organizationId_;
}
void CreateFileRequest::setOrganizationId(const std::string& organizationId)
{
organizationId_ = organizationId;
setParameter("OrganizationId", organizationId);
}
std::string CreateFileRequest::getSubUserId()const
{
return subUserId_;
}
void CreateFileRequest::setSubUserId(const std::string& subUserId)
{
subUserId_ = subUserId;
setParameter("SubUserId", subUserId);
}
std::string CreateFileRequest::getClientToken()const
{
return clientToken_;
}
void CreateFileRequest::setClientToken(const std::string& clientToken)
{
clientToken_ = clientToken;
setParameter("ClientToken", clientToken);
}
std::string CreateFileRequest::getAccessToken()const
{
return accessToken_;
}
void CreateFileRequest::setAccessToken(const std::string& accessToken)
{
accessToken_ = accessToken;
setParameter("AccessToken", accessToken);
}
long CreateFileRequest::getProjectId()const
{
return projectId_;
}
void CreateFileRequest::setProjectId(long projectId)
{
projectId_ = projectId;
setParameter("ProjectId", std::to_string(projectId));
}

View File

@@ -0,0 +1,75 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/codeup/model/CreateFileResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Codeup;
using namespace AlibabaCloud::Codeup::Model;
CreateFileResult::CreateFileResult() :
ServiceResult()
{}
CreateFileResult::CreateFileResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateFileResult::~CreateFileResult()
{}
void CreateFileResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto resultNode = value["Result"];
if(!resultNode["BranchName"].isNull())
result_.branchName = resultNode["BranchName"].asString();
if(!resultNode["FilePath"].isNull())
result_.filePath = resultNode["FilePath"].asString();
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
std::string CreateFileResult::getErrorCode()const
{
return errorCode_;
}
std::string CreateFileResult::getErrorMessage()const
{
return errorMessage_;
}
bool CreateFileResult::getSuccess()const
{
return success_;
}
CreateFileResult::Result CreateFileResult::getResult()const
{
return result_;
}

View File

@@ -0,0 +1,74 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/codeup/model/CreateRepositoryGroupRequest.h>
using AlibabaCloud::Codeup::Model::CreateRepositoryGroupRequest;
CreateRepositoryGroupRequest::CreateRepositoryGroupRequest() :
RoaServiceRequest("codeup", "2020-04-14")
{
setResourcePath("/api/v3/groups");
setMethod(HttpRequest::Method::Post);
}
CreateRepositoryGroupRequest::~CreateRepositoryGroupRequest()
{}
std::string CreateRepositoryGroupRequest::getOrganizationId()const
{
return organizationId_;
}
void CreateRepositoryGroupRequest::setOrganizationId(const std::string& organizationId)
{
organizationId_ = organizationId;
setParameter("OrganizationId", organizationId);
}
std::string CreateRepositoryGroupRequest::getSubUserId()const
{
return subUserId_;
}
void CreateRepositoryGroupRequest::setSubUserId(const std::string& subUserId)
{
subUserId_ = subUserId;
setParameter("SubUserId", subUserId);
}
std::string CreateRepositoryGroupRequest::getClientToken()const
{
return clientToken_;
}
void CreateRepositoryGroupRequest::setClientToken(const std::string& clientToken)
{
clientToken_ = clientToken;
setParameter("ClientToken", clientToken);
}
std::string CreateRepositoryGroupRequest::getAccessToken()const
{
return accessToken_;
}
void CreateRepositoryGroupRequest::setAccessToken(const std::string& accessToken)
{
accessToken_ = accessToken;
setParameter("AccessToken", accessToken);
}

View File

@@ -0,0 +1,95 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/codeup/model/CreateRepositoryGroupResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Codeup;
using namespace AlibabaCloud::Codeup::Model;
CreateRepositoryGroupResult::CreateRepositoryGroupResult() :
ServiceResult()
{}
CreateRepositoryGroupResult::CreateRepositoryGroupResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateRepositoryGroupResult::~CreateRepositoryGroupResult()
{}
void CreateRepositoryGroupResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto resultNode = value["Result"];
if(!resultNode["Id"].isNull())
result_.id = std::stol(resultNode["Id"].asString());
if(!resultNode["Description"].isNull())
result_.description = resultNode["Description"].asString();
if(!resultNode["VisibilityLevel"].isNull())
result_.visibilityLevel = resultNode["VisibilityLevel"].asString();
if(!resultNode["WebUrl"].isNull())
result_.webUrl = resultNode["WebUrl"].asString();
if(!resultNode["Name"].isNull())
result_.name = resultNode["Name"].asString();
if(!resultNode["NameWithNamespace"].isNull())
result_.nameWithNamespace = resultNode["NameWithNamespace"].asString();
if(!resultNode["Path"].isNull())
result_.path = resultNode["Path"].asString();
if(!resultNode["PathWithNamespace"].isNull())
result_.pathWithNamespace = resultNode["PathWithNamespace"].asString();
if(!resultNode["ParentId"].isNull())
result_.parentId = std::stol(resultNode["ParentId"].asString());
if(!resultNode["OwnerId"].isNull())
result_.ownerId = std::stol(resultNode["OwnerId"].asString());
if(!resultNode["AvatarUrl"].isNull())
result_.avatarUrl = resultNode["AvatarUrl"].asString();
if(!resultNode["Type"].isNull())
result_.type = resultNode["Type"].asString();
if(!value["ErrorCode"].isNull())
errorCode_ = std::stoi(value["ErrorCode"].asString());
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
int CreateRepositoryGroupResult::getErrorCode()const
{
return errorCode_;
}
std::string CreateRepositoryGroupResult::getErrorMessage()const
{
return errorMessage_;
}
bool CreateRepositoryGroupResult::getSuccess()const
{
return success_;
}
CreateRepositoryGroupResult::Result CreateRepositoryGroupResult::getResult()const
{
return result_;
}

View File

@@ -0,0 +1,96 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/codeup/model/CreateRepositoryRequest.h>
using AlibabaCloud::Codeup::Model::CreateRepositoryRequest;
CreateRepositoryRequest::CreateRepositoryRequest() :
RoaServiceRequest("codeup", "2020-04-14")
{
setResourcePath("/api/v3/projects");
setMethod(HttpRequest::Method::Post);
}
CreateRepositoryRequest::~CreateRepositoryRequest()
{}
std::string CreateRepositoryRequest::getOrganizationId()const
{
return organizationId_;
}
void CreateRepositoryRequest::setOrganizationId(const std::string& organizationId)
{
organizationId_ = organizationId;
setParameter("OrganizationId", organizationId);
}
std::string CreateRepositoryRequest::getSubUserId()const
{
return subUserId_;
}
void CreateRepositoryRequest::setSubUserId(const std::string& subUserId)
{
subUserId_ = subUserId;
setParameter("SubUserId", subUserId);
}
std::string CreateRepositoryRequest::getClientToken()const
{
return clientToken_;
}
void CreateRepositoryRequest::setClientToken(const std::string& clientToken)
{
clientToken_ = clientToken;
setParameter("ClientToken", clientToken);
}
std::string CreateRepositoryRequest::getAccessToken()const
{
return accessToken_;
}
void CreateRepositoryRequest::setAccessToken(const std::string& accessToken)
{
accessToken_ = accessToken;
setParameter("AccessToken", accessToken);
}
bool CreateRepositoryRequest::getSync()const
{
return sync_;
}
void CreateRepositoryRequest::setSync(bool sync)
{
sync_ = sync;
setParameter("Sync", sync ? "true" : "false");
}
bool CreateRepositoryRequest::getCreateParentPath()const
{
return createParentPath_;
}
void CreateRepositoryRequest::setCreateParentPath(bool createParentPath)
{
createParentPath_ = createParentPath;
setParameter("CreateParentPath", createParentPath ? "true" : "false");
}

View File

@@ -0,0 +1,143 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/codeup/model/CreateRepositoryResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Codeup;
using namespace AlibabaCloud::Codeup::Model;
CreateRepositoryResult::CreateRepositoryResult() :
ServiceResult()
{}
CreateRepositoryResult::CreateRepositoryResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateRepositoryResult::~CreateRepositoryResult()
{}
void CreateRepositoryResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto resultNode = value["Result"];
if(!resultNode["Id"].isNull())
result_.id = std::stol(resultNode["Id"].asString());
if(!resultNode["SshUrlToRepo"].isNull())
result_.sshUrlToRepo = resultNode["SshUrlToRepo"].asString();
if(!resultNode["Description"].isNull())
result_.description = resultNode["Description"].asString();
if(!resultNode["DefaultBranch"].isNull())
result_.defaultBranch = resultNode["DefaultBranch"].asString();
if(!resultNode["Public"].isNull())
result_._public = resultNode["Public"].asString() == "true";
if(!resultNode["VisibilityLevel"].isNull())
result_.visibilityLevel = resultNode["VisibilityLevel"].asString();
if(!resultNode["HttpUrlToRepo"].isNull())
result_.httpUrlToRepo = resultNode["HttpUrlToRepo"].asString();
if(!resultNode["WebUrl"].isNull())
result_.webUrl = resultNode["WebUrl"].asString();
if(!resultNode["Name"].isNull())
result_.name = resultNode["Name"].asString();
if(!resultNode["NameWithNamespace"].isNull())
result_.nameWithNamespace = resultNode["NameWithNamespace"].asString();
if(!resultNode["Path"].isNull())
result_.path = resultNode["Path"].asString();
if(!resultNode["PathWithNamespace"].isNull())
result_.pathWithNamespace = resultNode["PathWithNamespace"].asString();
if(!resultNode["IssuesEnableStatus"].isNull())
result_.issuesEnableStatus = resultNode["IssuesEnableStatus"].asString() == "true";
if(!resultNode["MergeRequestEnableStatus"].isNull())
result_.mergeRequestEnableStatus = resultNode["MergeRequestEnableStatus"].asString() == "true";
if(!resultNode["BuildsEnableStatus"].isNull())
result_.buildsEnableStatus = resultNode["BuildsEnableStatus"].asString() == "true";
if(!resultNode["WikiEnableStatus"].isNull())
result_.wikiEnableStatus = resultNode["WikiEnableStatus"].asString() == "true";
if(!resultNode["SnippetsEnableStatus"].isNull())
result_.snippetsEnableStatus = resultNode["SnippetsEnableStatus"].asString() == "true";
if(!resultNode["CreatedAt"].isNull())
result_.createdAt = resultNode["CreatedAt"].asString();
if(!resultNode["LastActivityAt"].isNull())
result_.lastActivityAt = resultNode["LastActivityAt"].asString();
if(!resultNode["CreatorId"].isNull())
result_.creatorId = std::stol(resultNode["CreatorId"].asString());
if(!resultNode["Archive"].isNull())
result_.archive = resultNode["Archive"].asString() == "true";
if(!resultNode["AvatarUrl"].isNull())
result_.avatarUrl = resultNode["AvatarUrl"].asString();
if(!resultNode["DemoProjectStatus"].isNull())
result_.demoProjectStatus = resultNode["DemoProjectStatus"].asString() == "true";
auto _namespaceNode = resultNode["Namespace"];
if(!_namespaceNode["Id"].isNull())
result_._namespace.id = std::stol(_namespaceNode["Id"].asString());
if(!_namespaceNode["Name"].isNull())
result_._namespace.name = _namespaceNode["Name"].asString();
if(!_namespaceNode["Path"].isNull())
result_._namespace.path = _namespaceNode["Path"].asString();
if(!_namespaceNode["OwnerId"].isNull())
result_._namespace.ownerId = std::stol(_namespaceNode["OwnerId"].asString());
if(!_namespaceNode["CreatedAt"].isNull())
result_._namespace.createdAt = _namespaceNode["CreatedAt"].asString();
if(!_namespaceNode["UpdatedAt"].isNull())
result_._namespace.updatedAt = _namespaceNode["UpdatedAt"].asString();
if(!_namespaceNode["Description"].isNull())
result_._namespace.description = _namespaceNode["Description"].asString();
if(!_namespaceNode["State"].isNull())
result_._namespace.state = _namespaceNode["State"].asString();
if(!_namespaceNode["Avatar"].isNull())
result_._namespace.avatar = _namespaceNode["Avatar"].asString();
if(!_namespaceNode["Public"].isNull())
result_._namespace._public = _namespaceNode["Public"].asString() == "true";
if(!_namespaceNode["VisibilityLevel"].isNull())
result_._namespace.visibilityLevel = _namespaceNode["VisibilityLevel"].asString();
auto allTagList = resultNode["TagList"]["TagList"];
for (auto value : allTagList)
result_.tagList.push_back(value.asString());
if(!value["ErrorCode"].isNull())
errorCode_ = std::stoi(value["ErrorCode"].asString());
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
int CreateRepositoryResult::getErrorCode()const
{
return errorCode_;
}
std::string CreateRepositoryResult::getErrorMessage()const
{
return errorMessage_;
}
bool CreateRepositoryResult::getSuccess()const
{
return success_;
}
CreateRepositoryResult::Result CreateRepositoryResult::getResult()const
{
return result_;
}

View File

@@ -0,0 +1,107 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/codeup/model/DeleteFileRequest.h>
using AlibabaCloud::Codeup::Model::DeleteFileRequest;
DeleteFileRequest::DeleteFileRequest() :
RoaServiceRequest("codeup", "2020-04-14")
{
setResourcePath("/api/v3/projects/[ProjectId]/repository/files");
setMethod(HttpRequest::Method::Delete);
}
DeleteFileRequest::~DeleteFileRequest()
{}
std::string DeleteFileRequest::getOrganizationId()const
{
return organizationId_;
}
void DeleteFileRequest::setOrganizationId(const std::string& organizationId)
{
organizationId_ = organizationId;
setParameter("OrganizationId", organizationId);
}
std::string DeleteFileRequest::getSubUserId()const
{
return subUserId_;
}
void DeleteFileRequest::setSubUserId(const std::string& subUserId)
{
subUserId_ = subUserId;
setParameter("SubUserId", subUserId);
}
std::string DeleteFileRequest::getFilePath()const
{
return filePath_;
}
void DeleteFileRequest::setFilePath(const std::string& filePath)
{
filePath_ = filePath;
setParameter("FilePath", filePath);
}
std::string DeleteFileRequest::getAccessToken()const
{
return accessToken_;
}
void DeleteFileRequest::setAccessToken(const std::string& accessToken)
{
accessToken_ = accessToken;
setParameter("AccessToken", accessToken);
}
std::string DeleteFileRequest::getCommitMessage()const
{
return commitMessage_;
}
void DeleteFileRequest::setCommitMessage(const std::string& commitMessage)
{
commitMessage_ = commitMessage;
setParameter("CommitMessage", commitMessage);
}
long DeleteFileRequest::getProjectId()const
{
return projectId_;
}
void DeleteFileRequest::setProjectId(long projectId)
{
projectId_ = projectId;
setParameter("ProjectId", std::to_string(projectId));
}
std::string DeleteFileRequest::getBranchName()const
{
return branchName_;
}
void DeleteFileRequest::setBranchName(const std::string& branchName)
{
branchName_ = branchName;
setParameter("BranchName", branchName);
}

View File

@@ -0,0 +1,75 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/codeup/model/DeleteFileResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Codeup;
using namespace AlibabaCloud::Codeup::Model;
DeleteFileResult::DeleteFileResult() :
ServiceResult()
{}
DeleteFileResult::DeleteFileResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DeleteFileResult::~DeleteFileResult()
{}
void DeleteFileResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto resultNode = value["Result"];
if(!resultNode["BranchName"].isNull())
result_.branchName = resultNode["BranchName"].asString();
if(!resultNode["FilePath"].isNull())
result_.filePath = resultNode["FilePath"].asString();
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
std::string DeleteFileResult::getErrorCode()const
{
return errorCode_;
}
std::string DeleteFileResult::getErrorMessage()const
{
return errorMessage_;
}
bool DeleteFileResult::getSuccess()const
{
return success_;
}
DeleteFileResult::Result DeleteFileResult::getResult()const
{
return result_;
}

View File

@@ -0,0 +1,85 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/codeup/model/DeleteGroupMemberRequest.h>
using AlibabaCloud::Codeup::Model::DeleteGroupMemberRequest;
DeleteGroupMemberRequest::DeleteGroupMemberRequest() :
RoaServiceRequest("codeup", "2020-04-14")
{
setResourcePath("/api/v3/groups/[GroupId]/members/[UserId]");
setMethod(HttpRequest::Method::Delete);
}
DeleteGroupMemberRequest::~DeleteGroupMemberRequest()
{}
std::string DeleteGroupMemberRequest::getOrganizationId()const
{
return organizationId_;
}
void DeleteGroupMemberRequest::setOrganizationId(const std::string& organizationId)
{
organizationId_ = organizationId;
setParameter("OrganizationId", organizationId);
}
std::string DeleteGroupMemberRequest::getSubUserId()const
{
return subUserId_;
}
void DeleteGroupMemberRequest::setSubUserId(const std::string& subUserId)
{
subUserId_ = subUserId;
setParameter("SubUserId", subUserId);
}
long DeleteGroupMemberRequest::getGroupId()const
{
return groupId_;
}
void DeleteGroupMemberRequest::setGroupId(long groupId)
{
groupId_ = groupId;
setParameter("GroupId", std::to_string(groupId));
}
std::string DeleteGroupMemberRequest::getAccessToken()const
{
return accessToken_;
}
void DeleteGroupMemberRequest::setAccessToken(const std::string& accessToken)
{
accessToken_ = accessToken;
setParameter("AccessToken", accessToken);
}
long DeleteGroupMemberRequest::getUserId()const
{
return userId_;
}
void DeleteGroupMemberRequest::setUserId(long userId)
{
userId_ = userId;
setParameter("UserId", std::to_string(userId));
}

View File

@@ -0,0 +1,83 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/codeup/model/DeleteGroupMemberResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Codeup;
using namespace AlibabaCloud::Codeup::Model;
DeleteGroupMemberResult::DeleteGroupMemberResult() :
ServiceResult()
{}
DeleteGroupMemberResult::DeleteGroupMemberResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DeleteGroupMemberResult::~DeleteGroupMemberResult()
{}
void DeleteGroupMemberResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto resultNode = value["Result"];
if(!resultNode["AccessLevel"].isNull())
result_.accessLevel = std::stoi(resultNode["AccessLevel"].asString());
if(!resultNode["Id"].isNull())
result_.id = std::stol(resultNode["Id"].asString());
if(!resultNode["ExternUserId"].isNull())
result_.externUserId = resultNode["ExternUserId"].asString();
if(!resultNode["State"].isNull())
result_.state = resultNode["State"].asString();
if(!resultNode["AvatarUrl"].isNull())
result_.avatarUrl = resultNode["AvatarUrl"].asString();
if(!resultNode["Email"].isNull())
result_.email = resultNode["Email"].asString();
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
std::string DeleteGroupMemberResult::getErrorCode()const
{
return errorCode_;
}
std::string DeleteGroupMemberResult::getErrorMessage()const
{
return errorMessage_;
}
bool DeleteGroupMemberResult::getSuccess()const
{
return success_;
}
DeleteGroupMemberResult::Result DeleteGroupMemberResult::getResult()const
{
return result_;
}

View File

@@ -0,0 +1,74 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/codeup/model/DeleteRepositoryGroupRequest.h>
using AlibabaCloud::Codeup::Model::DeleteRepositoryGroupRequest;
DeleteRepositoryGroupRequest::DeleteRepositoryGroupRequest() :
RoaServiceRequest("codeup", "2020-04-14")
{
setResourcePath("/api/v3/groups/[GroupId]");
setMethod(HttpRequest::Method::Delete);
}
DeleteRepositoryGroupRequest::~DeleteRepositoryGroupRequest()
{}
std::string DeleteRepositoryGroupRequest::getOrganizationId()const
{
return organizationId_;
}
void DeleteRepositoryGroupRequest::setOrganizationId(const std::string& organizationId)
{
organizationId_ = organizationId;
setParameter("OrganizationId", organizationId);
}
std::string DeleteRepositoryGroupRequest::getSubUserId()const
{
return subUserId_;
}
void DeleteRepositoryGroupRequest::setSubUserId(const std::string& subUserId)
{
subUserId_ = subUserId;
setParameter("SubUserId", subUserId);
}
long DeleteRepositoryGroupRequest::getGroupId()const
{
return groupId_;
}
void DeleteRepositoryGroupRequest::setGroupId(long groupId)
{
groupId_ = groupId;
setParameter("GroupId", std::to_string(groupId));
}
std::string DeleteRepositoryGroupRequest::getAccessToken()const
{
return accessToken_;
}
void DeleteRepositoryGroupRequest::setAccessToken(const std::string& accessToken)
{
accessToken_ = accessToken;
setParameter("AccessToken", accessToken);
}

View File

@@ -0,0 +1,73 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/codeup/model/DeleteRepositoryGroupResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Codeup;
using namespace AlibabaCloud::Codeup::Model;
DeleteRepositoryGroupResult::DeleteRepositoryGroupResult() :
ServiceResult()
{}
DeleteRepositoryGroupResult::DeleteRepositoryGroupResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DeleteRepositoryGroupResult::~DeleteRepositoryGroupResult()
{}
void DeleteRepositoryGroupResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto resultNode = value["Result"];
if(!resultNode["Result"].isNull())
result_.result = resultNode["Result"].asString() == "true";
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
std::string DeleteRepositoryGroupResult::getErrorCode()const
{
return errorCode_;
}
std::string DeleteRepositoryGroupResult::getErrorMessage()const
{
return errorMessage_;
}
bool DeleteRepositoryGroupResult::getSuccess()const
{
return success_;
}
DeleteRepositoryGroupResult::Result DeleteRepositoryGroupResult::getResult()const
{
return result_;
}

View File

@@ -0,0 +1,85 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/codeup/model/DeleteRepositoryMemberRequest.h>
using AlibabaCloud::Codeup::Model::DeleteRepositoryMemberRequest;
DeleteRepositoryMemberRequest::DeleteRepositoryMemberRequest() :
RoaServiceRequest("codeup", "2020-04-14")
{
setResourcePath("/api/v3/projects/[ProjectId]/members/[UserId]");
setMethod(HttpRequest::Method::Delete);
}
DeleteRepositoryMemberRequest::~DeleteRepositoryMemberRequest()
{}
std::string DeleteRepositoryMemberRequest::getOrganizationId()const
{
return organizationId_;
}
void DeleteRepositoryMemberRequest::setOrganizationId(const std::string& organizationId)
{
organizationId_ = organizationId;
setParameter("OrganizationId", organizationId);
}
std::string DeleteRepositoryMemberRequest::getSubUserId()const
{
return subUserId_;
}
void DeleteRepositoryMemberRequest::setSubUserId(const std::string& subUserId)
{
subUserId_ = subUserId;
setParameter("SubUserId", subUserId);
}
std::string DeleteRepositoryMemberRequest::getAccessToken()const
{
return accessToken_;
}
void DeleteRepositoryMemberRequest::setAccessToken(const std::string& accessToken)
{
accessToken_ = accessToken;
setParameter("AccessToken", accessToken);
}
long DeleteRepositoryMemberRequest::getProjectId()const
{
return projectId_;
}
void DeleteRepositoryMemberRequest::setProjectId(long projectId)
{
projectId_ = projectId;
setParameter("ProjectId", std::to_string(projectId));
}
long DeleteRepositoryMemberRequest::getUserId()const
{
return userId_;
}
void DeleteRepositoryMemberRequest::setUserId(long userId)
{
userId_ = userId;
setParameter("UserId", std::to_string(userId));
}

View File

@@ -0,0 +1,89 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/codeup/model/DeleteRepositoryMemberResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Codeup;
using namespace AlibabaCloud::Codeup::Model;
DeleteRepositoryMemberResult::DeleteRepositoryMemberResult() :
ServiceResult()
{}
DeleteRepositoryMemberResult::DeleteRepositoryMemberResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DeleteRepositoryMemberResult::~DeleteRepositoryMemberResult()
{}
void DeleteRepositoryMemberResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto resultNode = value["Result"];
if(!resultNode["AccessLevel"].isNull())
result_.accessLevel = std::stoi(resultNode["AccessLevel"].asString());
if(!resultNode["Id"].isNull())
result_.id = std::stol(resultNode["Id"].asString());
if(!resultNode["CreatedAt"].isNull())
result_.createdAt = resultNode["CreatedAt"].asString();
if(!resultNode["UpdatedAt"].isNull())
result_.updatedAt = resultNode["UpdatedAt"].asString();
if(!resultNode["SourceId"].isNull())
result_.sourceId = std::stol(resultNode["SourceId"].asString());
if(!resultNode["SourceType"].isNull())
result_.sourceType = resultNode["SourceType"].asString();
if(!resultNode["UserId"].isNull())
result_.userId = std::stol(resultNode["UserId"].asString());
if(!resultNode["NotificationLevel"].isNull())
result_.notificationLevel = std::stoi(resultNode["NotificationLevel"].asString());
if(!resultNode["Message"].isNull())
result_.message = resultNode["Message"].asString();
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
std::string DeleteRepositoryMemberResult::getErrorCode()const
{
return errorCode_;
}
std::string DeleteRepositoryMemberResult::getErrorMessage()const
{
return errorMessage_;
}
bool DeleteRepositoryMemberResult::getSuccess()const
{
return success_;
}
DeleteRepositoryMemberResult::Result DeleteRepositoryMemberResult::getResult()const
{
return result_;
}

View File

@@ -0,0 +1,74 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/codeup/model/DeleteRepositoryRequest.h>
using AlibabaCloud::Codeup::Model::DeleteRepositoryRequest;
DeleteRepositoryRequest::DeleteRepositoryRequest() :
RoaServiceRequest("codeup", "2020-04-14")
{
setResourcePath("/api/v3/projects/[ProjectId]/remove");
setMethod(HttpRequest::Method::Delete);
}
DeleteRepositoryRequest::~DeleteRepositoryRequest()
{}
std::string DeleteRepositoryRequest::getOrganizationId()const
{
return organizationId_;
}
void DeleteRepositoryRequest::setOrganizationId(const std::string& organizationId)
{
organizationId_ = organizationId;
setParameter("OrganizationId", organizationId);
}
std::string DeleteRepositoryRequest::getSubUserId()const
{
return subUserId_;
}
void DeleteRepositoryRequest::setSubUserId(const std::string& subUserId)
{
subUserId_ = subUserId;
setParameter("SubUserId", subUserId);
}
std::string DeleteRepositoryRequest::getAccessToken()const
{
return accessToken_;
}
void DeleteRepositoryRequest::setAccessToken(const std::string& accessToken)
{
accessToken_ = accessToken;
setParameter("AccessToken", accessToken);
}
long DeleteRepositoryRequest::getProjectId()const
{
return projectId_;
}
void DeleteRepositoryRequest::setProjectId(long projectId)
{
projectId_ = projectId;
setParameter("ProjectId", std::to_string(projectId));
}

View File

@@ -0,0 +1,73 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/codeup/model/DeleteRepositoryResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Codeup;
using namespace AlibabaCloud::Codeup::Model;
DeleteRepositoryResult::DeleteRepositoryResult() :
ServiceResult()
{}
DeleteRepositoryResult::DeleteRepositoryResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DeleteRepositoryResult::~DeleteRepositoryResult()
{}
void DeleteRepositoryResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto resultNode = value["Result"];
if(!resultNode["Result"].isNull())
result_.result = resultNode["Result"].asString() == "true";
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
std::string DeleteRepositoryResult::getErrorCode()const
{
return errorCode_;
}
std::string DeleteRepositoryResult::getErrorMessage()const
{
return errorMessage_;
}
bool DeleteRepositoryResult::getSuccess()const
{
return success_;
}
DeleteRepositoryResult::Result DeleteRepositoryResult::getResult()const
{
return result_;
}

View File

@@ -0,0 +1,74 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/codeup/model/GetCodeupOrganizationRequest.h>
using AlibabaCloud::Codeup::Model::GetCodeupOrganizationRequest;
GetCodeupOrganizationRequest::GetCodeupOrganizationRequest() :
RoaServiceRequest("codeup", "2020-04-14")
{
setResourcePath("/api/v4/organization/[OrganizationIdentity]");
setMethod(HttpRequest::Method::Get);
}
GetCodeupOrganizationRequest::~GetCodeupOrganizationRequest()
{}
std::string GetCodeupOrganizationRequest::getOrganizationId()const
{
return organizationId_;
}
void GetCodeupOrganizationRequest::setOrganizationId(const std::string& organizationId)
{
organizationId_ = organizationId;
setParameter("OrganizationId", organizationId);
}
std::string GetCodeupOrganizationRequest::getSubUserId()const
{
return subUserId_;
}
void GetCodeupOrganizationRequest::setSubUserId(const std::string& subUserId)
{
subUserId_ = subUserId;
setParameter("SubUserId", subUserId);
}
std::string GetCodeupOrganizationRequest::getOrganizationIdentity()const
{
return organizationIdentity_;
}
void GetCodeupOrganizationRequest::setOrganizationIdentity(const std::string& organizationIdentity)
{
organizationIdentity_ = organizationIdentity;
setParameter("OrganizationIdentity", organizationIdentity);
}
std::string GetCodeupOrganizationRequest::getAccessToken()const
{
return accessToken_;
}
void GetCodeupOrganizationRequest::setAccessToken(const std::string& accessToken)
{
accessToken_ = accessToken;
setParameter("AccessToken", accessToken);
}

View File

@@ -0,0 +1,85 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/codeup/model/GetCodeupOrganizationResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Codeup;
using namespace AlibabaCloud::Codeup::Model;
GetCodeupOrganizationResult::GetCodeupOrganizationResult() :
ServiceResult()
{}
GetCodeupOrganizationResult::GetCodeupOrganizationResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetCodeupOrganizationResult::~GetCodeupOrganizationResult()
{}
void GetCodeupOrganizationResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto resultNode = value["Result"];
if(!resultNode["Id"].isNull())
result_.id = std::stol(resultNode["Id"].asString());
if(!resultNode["OrganizationId"].isNull())
result_.organizationId = resultNode["OrganizationId"].asString();
if(!resultNode["Path"].isNull())
result_.path = resultNode["Path"].asString();
if(!resultNode["CreatedAt"].isNull())
result_.createdAt = resultNode["CreatedAt"].asString();
if(!resultNode["UpdatedAt"].isNull())
result_.updatedAt = resultNode["UpdatedAt"].asString();
if(!resultNode["NamespaceId"].isNull())
result_.namespaceId = std::stol(resultNode["NamespaceId"].asString());
if(!resultNode["UserRole"].isNull())
result_.userRole = resultNode["UserRole"].asString();
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
std::string GetCodeupOrganizationResult::getErrorCode()const
{
return errorCode_;
}
std::string GetCodeupOrganizationResult::getErrorMessage()const
{
return errorMessage_;
}
bool GetCodeupOrganizationResult::getSuccess()const
{
return success_;
}
GetCodeupOrganizationResult::Result GetCodeupOrganizationResult::getResult()const
{
return result_;
}

View File

@@ -0,0 +1,118 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/codeup/model/GetFileBlobsRequest.h>
using AlibabaCloud::Codeup::Model::GetFileBlobsRequest;
GetFileBlobsRequest::GetFileBlobsRequest() :
RoaServiceRequest("codeup", "2020-04-14")
{
setResourcePath("/api/v4/projects/[ProjectId]/repository/blobs");
setMethod(HttpRequest::Method::Get);
}
GetFileBlobsRequest::~GetFileBlobsRequest()
{}
std::string GetFileBlobsRequest::getAccessToken()const
{
return accessToken_;
}
void GetFileBlobsRequest::setAccessToken(const std::string& accessToken)
{
accessToken_ = accessToken;
setParameter("AccessToken", accessToken);
}
std::string GetFileBlobsRequest::getOrganizationId()const
{
return organizationId_;
}
void GetFileBlobsRequest::setOrganizationId(const std::string& organizationId)
{
organizationId_ = organizationId;
setParameter("OrganizationId", organizationId);
}
std::string GetFileBlobsRequest::getRef()const
{
return ref_;
}
void GetFileBlobsRequest::setRef(const std::string& ref)
{
ref_ = ref;
setParameter("Ref", ref);
}
std::string GetFileBlobsRequest::getSubUserId()const
{
return subUserId_;
}
void GetFileBlobsRequest::setSubUserId(const std::string& subUserId)
{
subUserId_ = subUserId;
setParameter("SubUserId", subUserId);
}
std::string GetFileBlobsRequest::getFilePath()const
{
return filePath_;
}
void GetFileBlobsRequest::setFilePath(const std::string& filePath)
{
filePath_ = filePath;
setParameter("FilePath", filePath);
}
long GetFileBlobsRequest::getFrom()const
{
return from_;
}
void GetFileBlobsRequest::setFrom(long from)
{
from_ = from;
setParameter("From", std::to_string(from));
}
long GetFileBlobsRequest::getTo()const
{
return to_;
}
void GetFileBlobsRequest::setTo(long to)
{
to_ = to;
setParameter("To", std::to_string(to));
}
long GetFileBlobsRequest::getProjectId()const
{
return projectId_;
}
void GetFileBlobsRequest::setProjectId(long projectId)
{
projectId_ = projectId;
setParameter("ProjectId", std::to_string(projectId));
}

View File

@@ -0,0 +1,75 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/codeup/model/GetFileBlobsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Codeup;
using namespace AlibabaCloud::Codeup::Model;
GetFileBlobsResult::GetFileBlobsResult() :
ServiceResult()
{}
GetFileBlobsResult::GetFileBlobsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetFileBlobsResult::~GetFileBlobsResult()
{}
void GetFileBlobsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto resultNode = value["Result"];
if(!resultNode["Content"].isNull())
result_.content = resultNode["Content"].asString();
if(!resultNode["TotalLines"].isNull())
result_.totalLines = std::stoi(resultNode["TotalLines"].asString());
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
std::string GetFileBlobsResult::getErrorCode()const
{
return errorCode_;
}
std::string GetFileBlobsResult::getErrorMessage()const
{
return errorMessage_;
}
bool GetFileBlobsResult::getSuccess()const
{
return success_;
}
GetFileBlobsResult::Result GetFileBlobsResult::getResult()const
{
return result_;
}

View File

@@ -0,0 +1,96 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/codeup/model/ListGroupMemberRequest.h>
using AlibabaCloud::Codeup::Model::ListGroupMemberRequest;
ListGroupMemberRequest::ListGroupMemberRequest() :
RoaServiceRequest("codeup", "2020-04-14")
{
setResourcePath("/api/v3/groups/[GroupId]/members");
setMethod(HttpRequest::Method::Get);
}
ListGroupMemberRequest::~ListGroupMemberRequest()
{}
std::string ListGroupMemberRequest::getOrganizationId()const
{
return organizationId_;
}
void ListGroupMemberRequest::setOrganizationId(const std::string& organizationId)
{
organizationId_ = organizationId;
setParameter("OrganizationId", organizationId);
}
std::string ListGroupMemberRequest::getSubUserId()const
{
return subUserId_;
}
void ListGroupMemberRequest::setSubUserId(const std::string& subUserId)
{
subUserId_ = subUserId;
setParameter("SubUserId", subUserId);
}
long ListGroupMemberRequest::getGroupId()const
{
return groupId_;
}
void ListGroupMemberRequest::setGroupId(long groupId)
{
groupId_ = groupId;
setParameter("GroupId", std::to_string(groupId));
}
long ListGroupMemberRequest::getPageSize()const
{
return pageSize_;
}
void ListGroupMemberRequest::setPageSize(long pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
std::string ListGroupMemberRequest::getAccessToken()const
{
return accessToken_;
}
void ListGroupMemberRequest::setAccessToken(const std::string& accessToken)
{
accessToken_ = accessToken;
setParameter("AccessToken", accessToken);
}
long ListGroupMemberRequest::getPage()const
{
return page_;
}
void ListGroupMemberRequest::setPage(long page)
{
page_ = page;
setParameter("Page", std::to_string(page));
}

View File

@@ -0,0 +1,88 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/codeup/model/ListGroupMemberResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Codeup;
using namespace AlibabaCloud::Codeup::Model;
ListGroupMemberResult::ListGroupMemberResult() :
ServiceResult()
{}
ListGroupMemberResult::ListGroupMemberResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListGroupMemberResult::~ListGroupMemberResult()
{}
void ListGroupMemberResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allResultNode = value["Result"]["ResultItem"];
for (auto valueResultResultItem : allResultNode)
{
ResultItem resultObject;
if(!valueResultResultItem["AccessLevel"].isNull())
resultObject.accessLevel = std::stoi(valueResultResultItem["AccessLevel"].asString());
if(!valueResultResultItem["ExternUserId"].isNull())
resultObject.externUserId = valueResultResultItem["ExternUserId"].asString();
if(!valueResultResultItem["Id"].isNull())
resultObject.id = std::stol(valueResultResultItem["Id"].asString());
if(!valueResultResultItem["State"].isNull())
resultObject.state = valueResultResultItem["State"].asString();
if(!valueResultResultItem["AvatarUrl"].isNull())
resultObject.avatarUrl = valueResultResultItem["AvatarUrl"].asString();
if(!valueResultResultItem["Email"].isNull())
resultObject.email = valueResultResultItem["Email"].asString();
result_.push_back(resultObject);
}
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
std::string ListGroupMemberResult::getErrorCode()const
{
return errorCode_;
}
std::string ListGroupMemberResult::getErrorMessage()const
{
return errorMessage_;
}
bool ListGroupMemberResult::getSuccess()const
{
return success_;
}
std::vector<ListGroupMemberResult::ResultItem> ListGroupMemberResult::getResult()const
{
return result_;
}

View File

@@ -0,0 +1,107 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/codeup/model/ListRepositoryMemberRequest.h>
using AlibabaCloud::Codeup::Model::ListRepositoryMemberRequest;
ListRepositoryMemberRequest::ListRepositoryMemberRequest() :
RoaServiceRequest("codeup", "2020-04-14")
{
setResourcePath("/api/v3/projects/[ProjectId]/members");
setMethod(HttpRequest::Method::Get);
}
ListRepositoryMemberRequest::~ListRepositoryMemberRequest()
{}
std::string ListRepositoryMemberRequest::getOrganizationId()const
{
return organizationId_;
}
void ListRepositoryMemberRequest::setOrganizationId(const std::string& organizationId)
{
organizationId_ = organizationId;
setParameter("OrganizationId", organizationId);
}
std::string ListRepositoryMemberRequest::getSubUserId()const
{
return subUserId_;
}
void ListRepositoryMemberRequest::setSubUserId(const std::string& subUserId)
{
subUserId_ = subUserId;
setParameter("SubUserId", subUserId);
}
std::string ListRepositoryMemberRequest::getQuery()const
{
return query_;
}
void ListRepositoryMemberRequest::setQuery(const std::string& query)
{
query_ = query;
setParameter("Query", query);
}
long ListRepositoryMemberRequest::getPageSize()const
{
return pageSize_;
}
void ListRepositoryMemberRequest::setPageSize(long pageSize)
{
pageSize_ = pageSize;
setParameter("PageSize", std::to_string(pageSize));
}
std::string ListRepositoryMemberRequest::getAccessToken()const
{
return accessToken_;
}
void ListRepositoryMemberRequest::setAccessToken(const std::string& accessToken)
{
accessToken_ = accessToken;
setParameter("AccessToken", accessToken);
}
long ListRepositoryMemberRequest::getPage()const
{
return page_;
}
void ListRepositoryMemberRequest::setPage(long page)
{
page_ = page;
setParameter("Page", std::to_string(page));
}
long ListRepositoryMemberRequest::getProjectId()const
{
return projectId_;
}
void ListRepositoryMemberRequest::setProjectId(long projectId)
{
projectId_ = projectId;
setParameter("ProjectId", std::to_string(projectId));
}

View File

@@ -0,0 +1,88 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/codeup/model/ListRepositoryMemberResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Codeup;
using namespace AlibabaCloud::Codeup::Model;
ListRepositoryMemberResult::ListRepositoryMemberResult() :
ServiceResult()
{}
ListRepositoryMemberResult::ListRepositoryMemberResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListRepositoryMemberResult::~ListRepositoryMemberResult()
{}
void ListRepositoryMemberResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allResultNode = value["Result"]["ResultItem"];
for (auto valueResultResultItem : allResultNode)
{
ResultItem resultObject;
if(!valueResultResultItem["AccessLevel"].isNull())
resultObject.accessLevel = std::stoi(valueResultResultItem["AccessLevel"].asString());
if(!valueResultResultItem["ExternUserId"].isNull())
resultObject.externUserId = valueResultResultItem["ExternUserId"].asString();
if(!valueResultResultItem["Id"].isNull())
resultObject.id = std::stol(valueResultResultItem["Id"].asString());
if(!valueResultResultItem["State"].isNull())
resultObject.state = valueResultResultItem["State"].asString();
if(!valueResultResultItem["AvatarUrl"].isNull())
resultObject.avatarUrl = valueResultResultItem["AvatarUrl"].asString();
if(!valueResultResultItem["Email"].isNull())
resultObject.email = valueResultResultItem["Email"].asString();
result_.push_back(resultObject);
}
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
std::string ListRepositoryMemberResult::getErrorCode()const
{
return errorCode_;
}
std::string ListRepositoryMemberResult::getErrorMessage()const
{
return errorMessage_;
}
bool ListRepositoryMemberResult::getSuccess()const
{
return success_;
}
std::vector<ListRepositoryMemberResult::ResultItem> ListRepositoryMemberResult::getResult()const
{
return result_;
}

View File

@@ -0,0 +1,107 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/codeup/model/ListRepositoryTreeRequest.h>
using AlibabaCloud::Codeup::Model::ListRepositoryTreeRequest;
ListRepositoryTreeRequest::ListRepositoryTreeRequest() :
RoaServiceRequest("codeup", "2020-04-14")
{
setResourcePath("/api/v4/projects/[ProjectId]/repository/tree");
setMethod(HttpRequest::Method::Get);
}
ListRepositoryTreeRequest::~ListRepositoryTreeRequest()
{}
std::string ListRepositoryTreeRequest::getOrganizationId()const
{
return organizationId_;
}
void ListRepositoryTreeRequest::setOrganizationId(const std::string& organizationId)
{
organizationId_ = organizationId;
setParameter("OrganizationId", organizationId);
}
std::string ListRepositoryTreeRequest::getPath()const
{
return path_;
}
void ListRepositoryTreeRequest::setPath(const std::string& path)
{
path_ = path;
setParameter("Path", path);
}
std::string ListRepositoryTreeRequest::getSubUserId()const
{
return subUserId_;
}
void ListRepositoryTreeRequest::setSubUserId(const std::string& subUserId)
{
subUserId_ = subUserId;
setParameter("SubUserId", subUserId);
}
std::string ListRepositoryTreeRequest::getAccessToken()const
{
return accessToken_;
}
void ListRepositoryTreeRequest::setAccessToken(const std::string& accessToken)
{
accessToken_ = accessToken;
setParameter("AccessToken", accessToken);
}
std::string ListRepositoryTreeRequest::getType()const
{
return type_;
}
void ListRepositoryTreeRequest::setType(const std::string& type)
{
type_ = type;
setParameter("Type", type);
}
long ListRepositoryTreeRequest::getProjectId()const
{
return projectId_;
}
void ListRepositoryTreeRequest::setProjectId(long projectId)
{
projectId_ = projectId;
setParameter("ProjectId", std::to_string(projectId));
}
std::string ListRepositoryTreeRequest::getRefName()const
{
return refName_;
}
void ListRepositoryTreeRequest::setRefName(const std::string& refName)
{
refName_ = refName;
setParameter("RefName", refName);
}

View File

@@ -0,0 +1,86 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/codeup/model/ListRepositoryTreeResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Codeup;
using namespace AlibabaCloud::Codeup::Model;
ListRepositoryTreeResult::ListRepositoryTreeResult() :
ServiceResult()
{}
ListRepositoryTreeResult::ListRepositoryTreeResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListRepositoryTreeResult::~ListRepositoryTreeResult()
{}
void ListRepositoryTreeResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allResultNode = value["Result"]["ResultItem"];
for (auto valueResultResultItem : allResultNode)
{
ResultItem resultObject;
if(!valueResultResultItem["Path"].isNull())
resultObject.path = valueResultResultItem["Path"].asString();
if(!valueResultResultItem["Id"].isNull())
resultObject.id = valueResultResultItem["Id"].asString();
if(!valueResultResultItem["Name"].isNull())
resultObject.name = valueResultResultItem["Name"].asString();
if(!valueResultResultItem["Mode"].isNull())
resultObject.mode = valueResultResultItem["Mode"].asString();
if(!valueResultResultItem["Type"].isNull())
resultObject.type = valueResultResultItem["Type"].asString();
result_.push_back(resultObject);
}
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
std::string ListRepositoryTreeResult::getErrorCode()const
{
return errorCode_;
}
std::string ListRepositoryTreeResult::getErrorMessage()const
{
return errorMessage_;
}
bool ListRepositoryTreeResult::getSuccess()const
{
return success_;
}
std::vector<ListRepositoryTreeResult::ResultItem> ListRepositoryTreeResult::getResult()const
{
return result_;
}

View File

@@ -0,0 +1,74 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/codeup/model/UpdateFileRequest.h>
using AlibabaCloud::Codeup::Model::UpdateFileRequest;
UpdateFileRequest::UpdateFileRequest() :
RoaServiceRequest("codeup", "2020-04-14")
{
setResourcePath("/api/v4/projects/[ProjectId]/repository/files");
setMethod(HttpRequest::Method::Put);
}
UpdateFileRequest::~UpdateFileRequest()
{}
std::string UpdateFileRequest::getOrganizationId()const
{
return organizationId_;
}
void UpdateFileRequest::setOrganizationId(const std::string& organizationId)
{
organizationId_ = organizationId;
setParameter("OrganizationId", organizationId);
}
std::string UpdateFileRequest::getSubUserId()const
{
return subUserId_;
}
void UpdateFileRequest::setSubUserId(const std::string& subUserId)
{
subUserId_ = subUserId;
setParameter("SubUserId", subUserId);
}
std::string UpdateFileRequest::getAccessToken()const
{
return accessToken_;
}
void UpdateFileRequest::setAccessToken(const std::string& accessToken)
{
accessToken_ = accessToken;
setParameter("AccessToken", accessToken);
}
long UpdateFileRequest::getProjectId()const
{
return projectId_;
}
void UpdateFileRequest::setProjectId(long projectId)
{
projectId_ = projectId;
setParameter("ProjectId", std::to_string(projectId));
}

View File

@@ -0,0 +1,75 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/codeup/model/UpdateFileResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Codeup;
using namespace AlibabaCloud::Codeup::Model;
UpdateFileResult::UpdateFileResult() :
ServiceResult()
{}
UpdateFileResult::UpdateFileResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
UpdateFileResult::~UpdateFileResult()
{}
void UpdateFileResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto resultNode = value["Result"];
if(!resultNode["BranchName"].isNull())
result_.branchName = resultNode["BranchName"].asString();
if(!resultNode["FilePath"].isNull())
result_.filePath = resultNode["FilePath"].asString();
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
std::string UpdateFileResult::getErrorCode()const
{
return errorCode_;
}
std::string UpdateFileResult::getErrorMessage()const
{
return errorMessage_;
}
bool UpdateFileResult::getSuccess()const
{
return success_;
}
UpdateFileResult::Result UpdateFileResult::getResult()const
{
return result_;
}

View File

@@ -0,0 +1,85 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/codeup/model/UpdateGroupMemberRequest.h>
using AlibabaCloud::Codeup::Model::UpdateGroupMemberRequest;
UpdateGroupMemberRequest::UpdateGroupMemberRequest() :
RoaServiceRequest("codeup", "2020-04-14")
{
setResourcePath("/api/v3/groups/[GroupId]/members/[UserId]");
setMethod(HttpRequest::Method::Put);
}
UpdateGroupMemberRequest::~UpdateGroupMemberRequest()
{}
std::string UpdateGroupMemberRequest::getOrganizationId()const
{
return organizationId_;
}
void UpdateGroupMemberRequest::setOrganizationId(const std::string& organizationId)
{
organizationId_ = organizationId;
setParameter("OrganizationId", organizationId);
}
std::string UpdateGroupMemberRequest::getSubUserId()const
{
return subUserId_;
}
void UpdateGroupMemberRequest::setSubUserId(const std::string& subUserId)
{
subUserId_ = subUserId;
setParameter("SubUserId", subUserId);
}
long UpdateGroupMemberRequest::getGroupId()const
{
return groupId_;
}
void UpdateGroupMemberRequest::setGroupId(long groupId)
{
groupId_ = groupId;
setParameter("GroupId", std::to_string(groupId));
}
std::string UpdateGroupMemberRequest::getAccessToken()const
{
return accessToken_;
}
void UpdateGroupMemberRequest::setAccessToken(const std::string& accessToken)
{
accessToken_ = accessToken;
setParameter("AccessToken", accessToken);
}
long UpdateGroupMemberRequest::getUserId()const
{
return userId_;
}
void UpdateGroupMemberRequest::setUserId(long userId)
{
userId_ = userId;
setParameter("UserId", std::to_string(userId));
}

View File

@@ -0,0 +1,83 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/codeup/model/UpdateGroupMemberResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Codeup;
using namespace AlibabaCloud::Codeup::Model;
UpdateGroupMemberResult::UpdateGroupMemberResult() :
ServiceResult()
{}
UpdateGroupMemberResult::UpdateGroupMemberResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
UpdateGroupMemberResult::~UpdateGroupMemberResult()
{}
void UpdateGroupMemberResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto resultNode = value["Result"];
if(!resultNode["AccessLevel"].isNull())
result_.accessLevel = std::stoi(resultNode["AccessLevel"].asString());
if(!resultNode["ExternUserId"].isNull())
result_.externUserId = resultNode["ExternUserId"].asString();
if(!resultNode["Id"].isNull())
result_.id = std::stol(resultNode["Id"].asString());
if(!resultNode["State"].isNull())
result_.state = resultNode["State"].asString();
if(!resultNode["AvatarUrl"].isNull())
result_.avatarUrl = resultNode["AvatarUrl"].asString();
if(!resultNode["Email"].isNull())
result_.email = resultNode["Email"].asString();
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
std::string UpdateGroupMemberResult::getErrorCode()const
{
return errorCode_;
}
std::string UpdateGroupMemberResult::getErrorMessage()const
{
return errorMessage_;
}
bool UpdateGroupMemberResult::getSuccess()const
{
return success_;
}
UpdateGroupMemberResult::Result UpdateGroupMemberResult::getResult()const
{
return result_;
}

View File

@@ -0,0 +1,85 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/codeup/model/UpdateRepositoryMemberRequest.h>
using AlibabaCloud::Codeup::Model::UpdateRepositoryMemberRequest;
UpdateRepositoryMemberRequest::UpdateRepositoryMemberRequest() :
RoaServiceRequest("codeup", "2020-04-14")
{
setResourcePath("/api/v3/projects/[ProjectId]/members/[UserId]");
setMethod(HttpRequest::Method::Put);
}
UpdateRepositoryMemberRequest::~UpdateRepositoryMemberRequest()
{}
std::string UpdateRepositoryMemberRequest::getOrganizationId()const
{
return organizationId_;
}
void UpdateRepositoryMemberRequest::setOrganizationId(const std::string& organizationId)
{
organizationId_ = organizationId;
setParameter("OrganizationId", organizationId);
}
std::string UpdateRepositoryMemberRequest::getSubUserId()const
{
return subUserId_;
}
void UpdateRepositoryMemberRequest::setSubUserId(const std::string& subUserId)
{
subUserId_ = subUserId;
setParameter("SubUserId", subUserId);
}
std::string UpdateRepositoryMemberRequest::getAccessToken()const
{
return accessToken_;
}
void UpdateRepositoryMemberRequest::setAccessToken(const std::string& accessToken)
{
accessToken_ = accessToken;
setParameter("AccessToken", accessToken);
}
long UpdateRepositoryMemberRequest::getProjectId()const
{
return projectId_;
}
void UpdateRepositoryMemberRequest::setProjectId(long projectId)
{
projectId_ = projectId;
setParameter("ProjectId", std::to_string(projectId));
}
long UpdateRepositoryMemberRequest::getUserId()const
{
return userId_;
}
void UpdateRepositoryMemberRequest::setUserId(long userId)
{
userId_ = userId;
setParameter("UserId", std::to_string(userId));
}

View File

@@ -0,0 +1,83 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/codeup/model/UpdateRepositoryMemberResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Codeup;
using namespace AlibabaCloud::Codeup::Model;
UpdateRepositoryMemberResult::UpdateRepositoryMemberResult() :
ServiceResult()
{}
UpdateRepositoryMemberResult::UpdateRepositoryMemberResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
UpdateRepositoryMemberResult::~UpdateRepositoryMemberResult()
{}
void UpdateRepositoryMemberResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto resultNode = value["Result"];
if(!resultNode["AccessLevel"].isNull())
result_.accessLevel = std::stoi(resultNode["AccessLevel"].asString());
if(!resultNode["ExternUserId"].isNull())
result_.externUserId = resultNode["ExternUserId"].asString();
if(!resultNode["Id"].isNull())
result_.id = std::stol(resultNode["Id"].asString());
if(!resultNode["State"].isNull())
result_.state = resultNode["State"].asString();
if(!resultNode["AvatarUrl"].isNull())
result_.avatarUrl = resultNode["AvatarUrl"].asString();
if(!resultNode["Email"].isNull())
result_.email = resultNode["Email"].asString();
if(!value["ErrorCode"].isNull())
errorCode_ = value["ErrorCode"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
if(!value["ErrorMessage"].isNull())
errorMessage_ = value["ErrorMessage"].asString();
}
std::string UpdateRepositoryMemberResult::getErrorCode()const
{
return errorCode_;
}
std::string UpdateRepositoryMemberResult::getErrorMessage()const
{
return errorMessage_;
}
bool UpdateRepositoryMemberResult::getSuccess()const
{
return success_;
}
UpdateRepositoryMemberResult::Result UpdateRepositoryMemberResult::getResult()const
{
return result_;
}