Fix GetBranchInfo and DeleteBranch API 404 error.
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
2020-11-13 Version: patch
|
||||
- Fix GetBranchInfo and DeleteBranch API 404 error.
|
||||
- Add ListRepositoryBranches and GetGroupDetail API.
|
||||
|
||||
2020-11-13 Version: patch
|
||||
- Release ErasePerson.
|
||||
|
||||
|
||||
@@ -57,6 +57,8 @@ set(codeup_public_header_model
|
||||
include/alibabacloud/codeup/model/GetCodeupOrganizationResult.h
|
||||
include/alibabacloud/codeup/model/GetFileBlobsRequest.h
|
||||
include/alibabacloud/codeup/model/GetFileBlobsResult.h
|
||||
include/alibabacloud/codeup/model/GetGroupDetailRequest.h
|
||||
include/alibabacloud/codeup/model/GetGroupDetailResult.h
|
||||
include/alibabacloud/codeup/model/GetProjectMemberRequest.h
|
||||
include/alibabacloud/codeup/model/GetProjectMemberResult.h
|
||||
include/alibabacloud/codeup/model/GetRepositoryInfoRequest.h
|
||||
@@ -67,6 +69,8 @@ set(codeup_public_header_model
|
||||
include/alibabacloud/codeup/model/ListGroupRepositoriesResult.h
|
||||
include/alibabacloud/codeup/model/ListGroupsRequest.h
|
||||
include/alibabacloud/codeup/model/ListGroupsResult.h
|
||||
include/alibabacloud/codeup/model/ListRepositoryBranchesRequest.h
|
||||
include/alibabacloud/codeup/model/ListRepositoryBranchesResult.h
|
||||
include/alibabacloud/codeup/model/ListRepositoryMemberRequest.h
|
||||
include/alibabacloud/codeup/model/ListRepositoryMemberResult.h
|
||||
include/alibabacloud/codeup/model/ListRepositoryTreeRequest.h
|
||||
@@ -118,6 +122,8 @@ set(codeup_src
|
||||
src/model/GetCodeupOrganizationResult.cc
|
||||
src/model/GetFileBlobsRequest.cc
|
||||
src/model/GetFileBlobsResult.cc
|
||||
src/model/GetGroupDetailRequest.cc
|
||||
src/model/GetGroupDetailResult.cc
|
||||
src/model/GetProjectMemberRequest.cc
|
||||
src/model/GetProjectMemberResult.cc
|
||||
src/model/GetRepositoryInfoRequest.cc
|
||||
@@ -128,6 +134,8 @@ set(codeup_src
|
||||
src/model/ListGroupRepositoriesResult.cc
|
||||
src/model/ListGroupsRequest.cc
|
||||
src/model/ListGroupsResult.cc
|
||||
src/model/ListRepositoryBranchesRequest.cc
|
||||
src/model/ListRepositoryBranchesResult.cc
|
||||
src/model/ListRepositoryMemberRequest.cc
|
||||
src/model/ListRepositoryMemberResult.cc
|
||||
src/model/ListRepositoryTreeRequest.cc
|
||||
|
||||
@@ -58,6 +58,8 @@
|
||||
#include "model/GetCodeupOrganizationResult.h"
|
||||
#include "model/GetFileBlobsRequest.h"
|
||||
#include "model/GetFileBlobsResult.h"
|
||||
#include "model/GetGroupDetailRequest.h"
|
||||
#include "model/GetGroupDetailResult.h"
|
||||
#include "model/GetProjectMemberRequest.h"
|
||||
#include "model/GetProjectMemberResult.h"
|
||||
#include "model/GetRepositoryInfoRequest.h"
|
||||
@@ -68,6 +70,8 @@
|
||||
#include "model/ListGroupRepositoriesResult.h"
|
||||
#include "model/ListGroupsRequest.h"
|
||||
#include "model/ListGroupsResult.h"
|
||||
#include "model/ListRepositoryBranchesRequest.h"
|
||||
#include "model/ListRepositoryBranchesResult.h"
|
||||
#include "model/ListRepositoryMemberRequest.h"
|
||||
#include "model/ListRepositoryMemberResult.h"
|
||||
#include "model/ListRepositoryTreeRequest.h"
|
||||
@@ -143,6 +147,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::GetFileBlobsResult> GetFileBlobsOutcome;
|
||||
typedef std::future<GetFileBlobsOutcome> GetFileBlobsOutcomeCallable;
|
||||
typedef std::function<void(const CodeupClient*, const Model::GetFileBlobsRequest&, const GetFileBlobsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetFileBlobsAsyncHandler;
|
||||
typedef Outcome<Error, Model::GetGroupDetailResult> GetGroupDetailOutcome;
|
||||
typedef std::future<GetGroupDetailOutcome> GetGroupDetailOutcomeCallable;
|
||||
typedef std::function<void(const CodeupClient*, const Model::GetGroupDetailRequest&, const GetGroupDetailOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetGroupDetailAsyncHandler;
|
||||
typedef Outcome<Error, Model::GetProjectMemberResult> GetProjectMemberOutcome;
|
||||
typedef std::future<GetProjectMemberOutcome> GetProjectMemberOutcomeCallable;
|
||||
typedef std::function<void(const CodeupClient*, const Model::GetProjectMemberRequest&, const GetProjectMemberOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetProjectMemberAsyncHandler;
|
||||
@@ -158,6 +165,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::ListGroupsResult> ListGroupsOutcome;
|
||||
typedef std::future<ListGroupsOutcome> ListGroupsOutcomeCallable;
|
||||
typedef std::function<void(const CodeupClient*, const Model::ListGroupsRequest&, const ListGroupsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListGroupsAsyncHandler;
|
||||
typedef Outcome<Error, Model::ListRepositoryBranchesResult> ListRepositoryBranchesOutcome;
|
||||
typedef std::future<ListRepositoryBranchesOutcome> ListRepositoryBranchesOutcomeCallable;
|
||||
typedef std::function<void(const CodeupClient*, const Model::ListRepositoryBranchesRequest&, const ListRepositoryBranchesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListRepositoryBranchesAsyncHandler;
|
||||
typedef Outcome<Error, Model::ListRepositoryMemberResult> ListRepositoryMemberOutcome;
|
||||
typedef std::future<ListRepositoryMemberOutcome> ListRepositoryMemberOutcomeCallable;
|
||||
typedef std::function<void(const CodeupClient*, const Model::ListRepositoryMemberRequest&, const ListRepositoryMemberOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListRepositoryMemberAsyncHandler;
|
||||
@@ -235,6 +245,9 @@ namespace AlibabaCloud
|
||||
GetFileBlobsOutcome getFileBlobs(const Model::GetFileBlobsRequest &request)const;
|
||||
void getFileBlobsAsync(const Model::GetFileBlobsRequest& request, const GetFileBlobsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetFileBlobsOutcomeCallable getFileBlobsCallable(const Model::GetFileBlobsRequest& request) const;
|
||||
GetGroupDetailOutcome getGroupDetail(const Model::GetGroupDetailRequest &request)const;
|
||||
void getGroupDetailAsync(const Model::GetGroupDetailRequest& request, const GetGroupDetailAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetGroupDetailOutcomeCallable getGroupDetailCallable(const Model::GetGroupDetailRequest& request) const;
|
||||
GetProjectMemberOutcome getProjectMember(const Model::GetProjectMemberRequest &request)const;
|
||||
void getProjectMemberAsync(const Model::GetProjectMemberRequest& request, const GetProjectMemberAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetProjectMemberOutcomeCallable getProjectMemberCallable(const Model::GetProjectMemberRequest& request) const;
|
||||
@@ -250,6 +263,9 @@ namespace AlibabaCloud
|
||||
ListGroupsOutcome listGroups(const Model::ListGroupsRequest &request)const;
|
||||
void listGroupsAsync(const Model::ListGroupsRequest& request, const ListGroupsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ListGroupsOutcomeCallable listGroupsCallable(const Model::ListGroupsRequest& request) const;
|
||||
ListRepositoryBranchesOutcome listRepositoryBranches(const Model::ListRepositoryBranchesRequest &request)const;
|
||||
void listRepositoryBranchesAsync(const Model::ListRepositoryBranchesRequest& request, const ListRepositoryBranchesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ListRepositoryBranchesOutcomeCallable listRepositoryBranchesCallable(const Model::ListRepositoryBranchesRequest& request) const;
|
||||
ListRepositoryMemberOutcome listRepositoryMember(const Model::ListRepositoryMemberRequest &request)const;
|
||||
void listRepositoryMemberAsync(const Model::ListRepositoryMemberRequest& request, const ListRepositoryMemberAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ListRepositoryMemberOutcomeCallable listRepositoryMemberCallable(const Model::ListRepositoryMemberRequest& request) const;
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_CODEUP_MODEL_GETGROUPDETAILREQUEST_H_
|
||||
#define ALIBABACLOUD_CODEUP_MODEL_GETGROUPDETAILREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RoaServiceRequest.h>
|
||||
#include <alibabacloud/codeup/CodeupExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Codeup
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_CODEUP_EXPORT GetGroupDetailRequest : public RoaServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
GetGroupDetailRequest();
|
||||
~GetGroupDetailRequest();
|
||||
|
||||
std::string getOrganizationId()const;
|
||||
void setOrganizationId(const std::string& organizationId);
|
||||
std::string getSubUserId()const;
|
||||
void setSubUserId(const std::string& subUserId);
|
||||
long getGroupId()const;
|
||||
void setGroupId(long groupId);
|
||||
std::string getAccessToken()const;
|
||||
void setAccessToken(const std::string& accessToken);
|
||||
|
||||
private:
|
||||
std::string organizationId_;
|
||||
std::string subUserId_;
|
||||
long groupId_;
|
||||
std::string accessToken_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_CODEUP_MODEL_GETGROUPDETAILREQUEST_H_
|
||||
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_CODEUP_MODEL_GETGROUPDETAILRESULT_H_
|
||||
#define ALIBABACLOUD_CODEUP_MODEL_GETGROUPDETAILRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/codeup/CodeupExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Codeup
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_CODEUP_EXPORT GetGroupDetailResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Result
|
||||
{
|
||||
std::string path;
|
||||
std::string pathWithNamespace;
|
||||
long parentId;
|
||||
std::string type;
|
||||
std::string description;
|
||||
std::string avatarUrl;
|
||||
long ownerId;
|
||||
std::string webUrl;
|
||||
std::string nameWithNamespace;
|
||||
std::string visibilityLevel;
|
||||
long id;
|
||||
std::string name;
|
||||
};
|
||||
|
||||
|
||||
GetGroupDetailResult();
|
||||
explicit GetGroupDetailResult(const std::string &payload);
|
||||
~GetGroupDetailResult();
|
||||
std::string getErrorCode()const;
|
||||
std::string getErrorMessage()const;
|
||||
bool getSuccess()const;
|
||||
Result getResult()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string errorCode_;
|
||||
std::string errorMessage_;
|
||||
bool success_;
|
||||
Result result_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_CODEUP_MODEL_GETGROUPDETAILRESULT_H_
|
||||
@@ -46,6 +46,7 @@ namespace AlibabaCloud
|
||||
ListGroupMemberResult();
|
||||
explicit ListGroupMemberResult(const std::string &payload);
|
||||
~ListGroupMemberResult();
|
||||
long getTotal()const;
|
||||
std::string getErrorCode()const;
|
||||
std::string getErrorMessage()const;
|
||||
bool getSuccess()const;
|
||||
@@ -54,6 +55,7 @@ namespace AlibabaCloud
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
long total_;
|
||||
std::string errorCode_;
|
||||
std::string errorMessage_;
|
||||
bool success_;
|
||||
|
||||
@@ -56,6 +56,7 @@ namespace AlibabaCloud
|
||||
ListGroupRepositoriesResult();
|
||||
explicit ListGroupRepositoriesResult(const std::string &payload);
|
||||
~ListGroupRepositoriesResult();
|
||||
long getTotal()const;
|
||||
std::string getErrorCode()const;
|
||||
std::string getErrorMessage()const;
|
||||
bool getSuccess()const;
|
||||
@@ -64,6 +65,7 @@ namespace AlibabaCloud
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
long total_;
|
||||
std::string errorCode_;
|
||||
std::string errorMessage_;
|
||||
bool success_;
|
||||
|
||||
@@ -54,6 +54,7 @@ namespace AlibabaCloud
|
||||
ListGroupsResult();
|
||||
explicit ListGroupsResult(const std::string &payload);
|
||||
~ListGroupsResult();
|
||||
long getTotal()const;
|
||||
std::string getErrorCode()const;
|
||||
std::string getErrorMessage()const;
|
||||
bool getSuccess()const;
|
||||
@@ -62,6 +63,7 @@ namespace AlibabaCloud
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
long total_;
|
||||
std::string errorCode_;
|
||||
std::string errorMessage_;
|
||||
bool success_;
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_CODEUP_MODEL_LISTREPOSITORYBRANCHESREQUEST_H_
|
||||
#define ALIBABACLOUD_CODEUP_MODEL_LISTREPOSITORYBRANCHESREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RoaServiceRequest.h>
|
||||
#include <alibabacloud/codeup/CodeupExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Codeup
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_CODEUP_EXPORT ListRepositoryBranchesRequest : public RoaServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
ListRepositoryBranchesRequest();
|
||||
~ListRepositoryBranchesRequest();
|
||||
|
||||
std::string getOrganizationId()const;
|
||||
void setOrganizationId(const std::string& organizationId);
|
||||
std::string getSearch()const;
|
||||
void setSearch(const std::string& search);
|
||||
std::string getSubUserId()const;
|
||||
void setSubUserId(const std::string& subUserId);
|
||||
long getPageSize()const;
|
||||
void setPageSize(long pageSize);
|
||||
std::string getAccessToken()const;
|
||||
void setAccessToken(const std::string& accessToken);
|
||||
long getPage()const;
|
||||
void setPage(long page);
|
||||
long getProjectId()const;
|
||||
void setProjectId(long projectId);
|
||||
|
||||
private:
|
||||
std::string organizationId_;
|
||||
std::string search_;
|
||||
std::string subUserId_;
|
||||
long pageSize_;
|
||||
std::string accessToken_;
|
||||
long page_;
|
||||
long projectId_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_CODEUP_MODEL_LISTREPOSITORYBRANCHESREQUEST_H_
|
||||
@@ -0,0 +1,80 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_CODEUP_MODEL_LISTREPOSITORYBRANCHESRESULT_H_
|
||||
#define ALIBABACLOUD_CODEUP_MODEL_LISTREPOSITORYBRANCHESRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/codeup/CodeupExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Codeup
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_CODEUP_EXPORT ListRepositoryBranchesResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct ResultItem
|
||||
{
|
||||
struct CommitInfo
|
||||
{
|
||||
std::string authorName;
|
||||
std::string message;
|
||||
std::string authorDate;
|
||||
std::string committedDate;
|
||||
std::string committerEmail;
|
||||
std::vector<std::string> parentIds;
|
||||
std::string createdAt;
|
||||
std::string shortId;
|
||||
std::string title;
|
||||
std::string id;
|
||||
std::string authorEmail;
|
||||
std::string committerName;
|
||||
};
|
||||
bool protectedBranch;
|
||||
CommitInfo commitInfo;
|
||||
std::string branchName;
|
||||
};
|
||||
|
||||
|
||||
ListRepositoryBranchesResult();
|
||||
explicit ListRepositoryBranchesResult(const std::string &payload);
|
||||
~ListRepositoryBranchesResult();
|
||||
long getTotal()const;
|
||||
std::string getErrorCode()const;
|
||||
std::string getErrorMessage()const;
|
||||
bool getSuccess()const;
|
||||
std::vector<ResultItem> getResult()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
long total_;
|
||||
std::string errorCode_;
|
||||
std::string errorMessage_;
|
||||
bool success_;
|
||||
std::vector<ResultItem> result_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_CODEUP_MODEL_LISTREPOSITORYBRANCHESRESULT_H_
|
||||
@@ -46,6 +46,7 @@ namespace AlibabaCloud
|
||||
ListRepositoryMemberResult();
|
||||
explicit ListRepositoryMemberResult(const std::string &payload);
|
||||
~ListRepositoryMemberResult();
|
||||
long getTotal()const;
|
||||
std::string getErrorCode()const;
|
||||
std::string getErrorMessage()const;
|
||||
bool getSuccess()const;
|
||||
@@ -54,6 +55,7 @@ namespace AlibabaCloud
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
long total_;
|
||||
std::string errorCode_;
|
||||
std::string errorMessage_;
|
||||
bool success_;
|
||||
|
||||
@@ -699,6 +699,42 @@ CodeupClient::GetFileBlobsOutcomeCallable CodeupClient::getFileBlobsCallable(con
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CodeupClient::GetGroupDetailOutcome CodeupClient::getGroupDetail(const GetGroupDetailRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetGroupDetailOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetGroupDetailOutcome(GetGroupDetailResult(outcome.result()));
|
||||
else
|
||||
return GetGroupDetailOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void CodeupClient::getGroupDetailAsync(const GetGroupDetailRequest& request, const GetGroupDetailAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getGroupDetail(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
CodeupClient::GetGroupDetailOutcomeCallable CodeupClient::getGroupDetailCallable(const GetGroupDetailRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetGroupDetailOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getGroupDetail(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CodeupClient::GetProjectMemberOutcome CodeupClient::getProjectMember(const GetProjectMemberRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -879,6 +915,42 @@ CodeupClient::ListGroupsOutcomeCallable CodeupClient::listGroupsCallable(const L
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CodeupClient::ListRepositoryBranchesOutcome CodeupClient::listRepositoryBranches(const ListRepositoryBranchesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListRepositoryBranchesOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListRepositoryBranchesOutcome(ListRepositoryBranchesResult(outcome.result()));
|
||||
else
|
||||
return ListRepositoryBranchesOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void CodeupClient::listRepositoryBranchesAsync(const ListRepositoryBranchesRequest& request, const ListRepositoryBranchesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listRepositoryBranches(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
CodeupClient::ListRepositoryBranchesOutcomeCallable CodeupClient::listRepositoryBranchesCallable(const ListRepositoryBranchesRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListRepositoryBranchesOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listRepositoryBranches(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
CodeupClient::ListRepositoryMemberOutcome CodeupClient::listRepositoryMember(const ListRepositoryMemberRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
@@ -112,18 +112,18 @@ void CreateMergeRequestResult::parse(const std::string &payload)
|
||||
satisfiedCheckResultsItemObject.checkName = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["CheckName"].asString();
|
||||
if(!approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["CheckType"].isNull())
|
||||
satisfiedCheckResultsItemObject.checkType = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["CheckType"].asString();
|
||||
auto allExtraUsersNode = allSatisfiedCheckResultsNode["ExtraUsers"]["ExtraUsersItem"];
|
||||
for (auto allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem : allExtraUsersNode)
|
||||
auto allExtraUsersNode = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["ExtraUsers"]["ExtraUsersItem"];
|
||||
for (auto approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem : allExtraUsersNode)
|
||||
{
|
||||
Result::ApproveCheckResult::SatisfiedCheckResultsItem::ExtraUsersItem extraUsersObject;
|
||||
if(!allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem["Id"].isNull())
|
||||
extraUsersObject.id = std::stol(allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem["Id"].asString());
|
||||
if(!allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem["ExternUserId"].isNull())
|
||||
extraUsersObject.externUserId = allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem["ExternUserId"].asString();
|
||||
if(!allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem["AvatarUrl"].isNull())
|
||||
extraUsersObject.avatarUrl = allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem["AvatarUrl"].asString();
|
||||
if(!allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem["Name"].isNull())
|
||||
extraUsersObject.name = allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem["Name"].asString();
|
||||
if(!approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["Id"].isNull())
|
||||
extraUsersObject.id = std::stol(approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["Id"].asString());
|
||||
if(!approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["ExternUserId"].isNull())
|
||||
extraUsersObject.externUserId = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["ExternUserId"].asString();
|
||||
if(!approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["AvatarUrl"].isNull())
|
||||
extraUsersObject.avatarUrl = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["AvatarUrl"].asString();
|
||||
if(!approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["Name"].isNull())
|
||||
extraUsersObject.name = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["Name"].asString();
|
||||
satisfiedCheckResultsItemObject.extraUsers.push_back(extraUsersObject);
|
||||
}
|
||||
auto allSatisfiedItems = value["SatisfiedItems"]["SatisfiedItems"];
|
||||
@@ -144,18 +144,18 @@ void CreateMergeRequestResult::parse(const std::string &payload)
|
||||
unsatisfiedCheckResultsItemObject.checkName = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["CheckName"].asString();
|
||||
if(!approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["CheckType"].isNull())
|
||||
unsatisfiedCheckResultsItemObject.checkType = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["CheckType"].asString();
|
||||
auto allExtraUsers3Node = allUnsatisfiedCheckResultsNode["ExtraUsers"]["ExtraUsersItem"];
|
||||
for (auto allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem : allExtraUsers3Node)
|
||||
auto allExtraUsers3Node = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["ExtraUsers"]["ExtraUsersItem"];
|
||||
for (auto approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem : allExtraUsers3Node)
|
||||
{
|
||||
Result::ApproveCheckResult::UnsatisfiedCheckResultsItem::ExtraUsersItem4 extraUsers3Object;
|
||||
if(!allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem["Id"].isNull())
|
||||
extraUsers3Object.id = std::stol(allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem["Id"].asString());
|
||||
if(!allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem["ExternUserId"].isNull())
|
||||
extraUsers3Object.externUserId = allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem["ExternUserId"].asString();
|
||||
if(!allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem["AvatarUrl"].isNull())
|
||||
extraUsers3Object.avatarUrl = allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem["AvatarUrl"].asString();
|
||||
if(!allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem["Name"].isNull())
|
||||
extraUsers3Object.name = allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem["Name"].asString();
|
||||
if(!approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["Id"].isNull())
|
||||
extraUsers3Object.id = std::stol(approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["Id"].asString());
|
||||
if(!approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["ExternUserId"].isNull())
|
||||
extraUsers3Object.externUserId = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["ExternUserId"].asString();
|
||||
if(!approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["AvatarUrl"].isNull())
|
||||
extraUsers3Object.avatarUrl = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["AvatarUrl"].asString();
|
||||
if(!approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["Name"].isNull())
|
||||
extraUsers3Object.name = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["Name"].asString();
|
||||
unsatisfiedCheckResultsItemObject.extraUsers3.push_back(extraUsers3Object);
|
||||
}
|
||||
auto allSatisfiedItems1 = value["SatisfiedItems"]["SatisfiedItems"];
|
||||
|
||||
@@ -21,7 +21,7 @@ using AlibabaCloud::Codeup::Model::DeleteBranchRequest;
|
||||
DeleteBranchRequest::DeleteBranchRequest() :
|
||||
RoaServiceRequest("codeup", "2020-04-14")
|
||||
{
|
||||
setResourcePath("/api/v3/projects/[ProjectId]/repository/branches/[BranchName]");
|
||||
setResourcePath("/api/v3/projects/[ProjectId]/repository/branches/delete");
|
||||
setMethod(HttpRequest::Method::Delete);
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ using AlibabaCloud::Codeup::Model::GetBranchInfoRequest;
|
||||
GetBranchInfoRequest::GetBranchInfoRequest() :
|
||||
RoaServiceRequest("codeup", "2020-04-14")
|
||||
{
|
||||
setResourcePath("/api/v3/projects/[ProjectId]/repository/branches/[BranchName]");
|
||||
setResourcePath("/api/v3/projects/[ProjectId]/repository/branches/detail");
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
|
||||
74
codeup/src/model/GetGroupDetailRequest.cc
Normal file
74
codeup/src/model/GetGroupDetailRequest.cc
Normal 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/GetGroupDetailRequest.h>
|
||||
|
||||
using AlibabaCloud::Codeup::Model::GetGroupDetailRequest;
|
||||
|
||||
GetGroupDetailRequest::GetGroupDetailRequest() :
|
||||
RoaServiceRequest("codeup", "2020-04-14")
|
||||
{
|
||||
setResourcePath("/api/v3/groups/detail");
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
GetGroupDetailRequest::~GetGroupDetailRequest()
|
||||
{}
|
||||
|
||||
std::string GetGroupDetailRequest::getOrganizationId()const
|
||||
{
|
||||
return organizationId_;
|
||||
}
|
||||
|
||||
void GetGroupDetailRequest::setOrganizationId(const std::string& organizationId)
|
||||
{
|
||||
organizationId_ = organizationId;
|
||||
setParameter("OrganizationId", organizationId);
|
||||
}
|
||||
|
||||
std::string GetGroupDetailRequest::getSubUserId()const
|
||||
{
|
||||
return subUserId_;
|
||||
}
|
||||
|
||||
void GetGroupDetailRequest::setSubUserId(const std::string& subUserId)
|
||||
{
|
||||
subUserId_ = subUserId;
|
||||
setParameter("SubUserId", subUserId);
|
||||
}
|
||||
|
||||
long GetGroupDetailRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
}
|
||||
|
||||
void GetGroupDetailRequest::setGroupId(long groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", std::to_string(groupId));
|
||||
}
|
||||
|
||||
std::string GetGroupDetailRequest::getAccessToken()const
|
||||
{
|
||||
return accessToken_;
|
||||
}
|
||||
|
||||
void GetGroupDetailRequest::setAccessToken(const std::string& accessToken)
|
||||
{
|
||||
accessToken_ = accessToken;
|
||||
setParameter("AccessToken", accessToken);
|
||||
}
|
||||
|
||||
95
codeup/src/model/GetGroupDetailResult.cc
Normal file
95
codeup/src/model/GetGroupDetailResult.cc
Normal 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/GetGroupDetailResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Codeup;
|
||||
using namespace AlibabaCloud::Codeup::Model;
|
||||
|
||||
GetGroupDetailResult::GetGroupDetailResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetGroupDetailResult::GetGroupDetailResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetGroupDetailResult::~GetGroupDetailResult()
|
||||
{}
|
||||
|
||||
void GetGroupDetailResult::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["Name"].isNull())
|
||||
result_.name = resultNode["Name"].asString();
|
||||
if(!resultNode["Path"].isNull())
|
||||
result_.path = resultNode["Path"].asString();
|
||||
if(!resultNode["Description"].isNull())
|
||||
result_.description = resultNode["Description"].asString();
|
||||
if(!resultNode["AvatarUrl"].isNull())
|
||||
result_.avatarUrl = resultNode["AvatarUrl"].asString();
|
||||
if(!resultNode["WebUrl"].isNull())
|
||||
result_.webUrl = resultNode["WebUrl"].asString();
|
||||
if(!resultNode["PathWithNamespace"].isNull())
|
||||
result_.pathWithNamespace = resultNode["PathWithNamespace"].asString();
|
||||
if(!resultNode["NameWithNamespace"].isNull())
|
||||
result_.nameWithNamespace = resultNode["NameWithNamespace"].asString();
|
||||
if(!resultNode["Type"].isNull())
|
||||
result_.type = resultNode["Type"].asString();
|
||||
if(!resultNode["VisibilityLevel"].isNull())
|
||||
result_.visibilityLevel = resultNode["VisibilityLevel"].asString();
|
||||
if(!resultNode["ParentId"].isNull())
|
||||
result_.parentId = std::stol(resultNode["ParentId"].asString());
|
||||
if(!resultNode["OwnerId"].isNull())
|
||||
result_.ownerId = std::stol(resultNode["OwnerId"].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 GetGroupDetailResult::getErrorCode()const
|
||||
{
|
||||
return errorCode_;
|
||||
}
|
||||
|
||||
std::string GetGroupDetailResult::getErrorMessage()const
|
||||
{
|
||||
return errorMessage_;
|
||||
}
|
||||
|
||||
bool GetGroupDetailResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
GetGroupDetailResult::Result GetGroupDetailResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
@@ -63,9 +63,16 @@ void ListGroupMemberResult::parse(const std::string &payload)
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["ErrorMessage"].isNull())
|
||||
errorMessage_ = value["ErrorMessage"].asString();
|
||||
if(!value["Total"].isNull())
|
||||
total_ = std::stol(value["Total"].asString());
|
||||
|
||||
}
|
||||
|
||||
long ListGroupMemberResult::getTotal()const
|
||||
{
|
||||
return total_;
|
||||
}
|
||||
|
||||
std::string ListGroupMemberResult::getErrorCode()const
|
||||
{
|
||||
return errorCode_;
|
||||
|
||||
@@ -83,9 +83,16 @@ void ListGroupRepositoriesResult::parse(const std::string &payload)
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["ErrorMessage"].isNull())
|
||||
errorMessage_ = value["ErrorMessage"].asString();
|
||||
if(!value["Total"].isNull())
|
||||
total_ = std::stol(value["Total"].asString());
|
||||
|
||||
}
|
||||
|
||||
long ListGroupRepositoriesResult::getTotal()const
|
||||
{
|
||||
return total_;
|
||||
}
|
||||
|
||||
std::string ListGroupRepositoriesResult::getErrorCode()const
|
||||
{
|
||||
return errorCode_;
|
||||
|
||||
@@ -79,9 +79,16 @@ void ListGroupsResult::parse(const std::string &payload)
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["ErrorMessage"].isNull())
|
||||
errorMessage_ = value["ErrorMessage"].asString();
|
||||
if(!value["Total"].isNull())
|
||||
total_ = std::stol(value["Total"].asString());
|
||||
|
||||
}
|
||||
|
||||
long ListGroupsResult::getTotal()const
|
||||
{
|
||||
return total_;
|
||||
}
|
||||
|
||||
std::string ListGroupsResult::getErrorCode()const
|
||||
{
|
||||
return errorCode_;
|
||||
|
||||
107
codeup/src/model/ListRepositoryBranchesRequest.cc
Normal file
107
codeup/src/model/ListRepositoryBranchesRequest.cc
Normal 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/ListRepositoryBranchesRequest.h>
|
||||
|
||||
using AlibabaCloud::Codeup::Model::ListRepositoryBranchesRequest;
|
||||
|
||||
ListRepositoryBranchesRequest::ListRepositoryBranchesRequest() :
|
||||
RoaServiceRequest("codeup", "2020-04-14")
|
||||
{
|
||||
setResourcePath("/api/v3/projects/[ProjectId]/repository/branches");
|
||||
setMethod(HttpRequest::Method::Get);
|
||||
}
|
||||
|
||||
ListRepositoryBranchesRequest::~ListRepositoryBranchesRequest()
|
||||
{}
|
||||
|
||||
std::string ListRepositoryBranchesRequest::getOrganizationId()const
|
||||
{
|
||||
return organizationId_;
|
||||
}
|
||||
|
||||
void ListRepositoryBranchesRequest::setOrganizationId(const std::string& organizationId)
|
||||
{
|
||||
organizationId_ = organizationId;
|
||||
setParameter("OrganizationId", organizationId);
|
||||
}
|
||||
|
||||
std::string ListRepositoryBranchesRequest::getSearch()const
|
||||
{
|
||||
return search_;
|
||||
}
|
||||
|
||||
void ListRepositoryBranchesRequest::setSearch(const std::string& search)
|
||||
{
|
||||
search_ = search;
|
||||
setParameter("Search", search);
|
||||
}
|
||||
|
||||
std::string ListRepositoryBranchesRequest::getSubUserId()const
|
||||
{
|
||||
return subUserId_;
|
||||
}
|
||||
|
||||
void ListRepositoryBranchesRequest::setSubUserId(const std::string& subUserId)
|
||||
{
|
||||
subUserId_ = subUserId;
|
||||
setParameter("SubUserId", subUserId);
|
||||
}
|
||||
|
||||
long ListRepositoryBranchesRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void ListRepositoryBranchesRequest::setPageSize(long pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string ListRepositoryBranchesRequest::getAccessToken()const
|
||||
{
|
||||
return accessToken_;
|
||||
}
|
||||
|
||||
void ListRepositoryBranchesRequest::setAccessToken(const std::string& accessToken)
|
||||
{
|
||||
accessToken_ = accessToken;
|
||||
setParameter("AccessToken", accessToken);
|
||||
}
|
||||
|
||||
long ListRepositoryBranchesRequest::getPage()const
|
||||
{
|
||||
return page_;
|
||||
}
|
||||
|
||||
void ListRepositoryBranchesRequest::setPage(long page)
|
||||
{
|
||||
page_ = page;
|
||||
setParameter("Page", std::to_string(page));
|
||||
}
|
||||
|
||||
long ListRepositoryBranchesRequest::getProjectId()const
|
||||
{
|
||||
return projectId_;
|
||||
}
|
||||
|
||||
void ListRepositoryBranchesRequest::setProjectId(long projectId)
|
||||
{
|
||||
projectId_ = projectId;
|
||||
setParameter("ProjectId", std::to_string(projectId));
|
||||
}
|
||||
|
||||
113
codeup/src/model/ListRepositoryBranchesResult.cc
Normal file
113
codeup/src/model/ListRepositoryBranchesResult.cc
Normal file
@@ -0,0 +1,113 @@
|
||||
/*
|
||||
* 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/ListRepositoryBranchesResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Codeup;
|
||||
using namespace AlibabaCloud::Codeup::Model;
|
||||
|
||||
ListRepositoryBranchesResult::ListRepositoryBranchesResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListRepositoryBranchesResult::ListRepositoryBranchesResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListRepositoryBranchesResult::~ListRepositoryBranchesResult()
|
||||
{}
|
||||
|
||||
void ListRepositoryBranchesResult::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["BranchName"].isNull())
|
||||
resultObject.branchName = valueResultResultItem["BranchName"].asString();
|
||||
if(!valueResultResultItem["ProtectedBranch"].isNull())
|
||||
resultObject.protectedBranch = valueResultResultItem["ProtectedBranch"].asString() == "true";
|
||||
auto commitInfoNode = value["CommitInfo"];
|
||||
if(!commitInfoNode["Id"].isNull())
|
||||
resultObject.commitInfo.id = commitInfoNode["Id"].asString();
|
||||
if(!commitInfoNode["ShortId"].isNull())
|
||||
resultObject.commitInfo.shortId = commitInfoNode["ShortId"].asString();
|
||||
if(!commitInfoNode["Title"].isNull())
|
||||
resultObject.commitInfo.title = commitInfoNode["Title"].asString();
|
||||
if(!commitInfoNode["AuthorName"].isNull())
|
||||
resultObject.commitInfo.authorName = commitInfoNode["AuthorName"].asString();
|
||||
if(!commitInfoNode["AuthorEmail"].isNull())
|
||||
resultObject.commitInfo.authorEmail = commitInfoNode["AuthorEmail"].asString();
|
||||
if(!commitInfoNode["CreatedAt"].isNull())
|
||||
resultObject.commitInfo.createdAt = commitInfoNode["CreatedAt"].asString();
|
||||
if(!commitInfoNode["Message"].isNull())
|
||||
resultObject.commitInfo.message = commitInfoNode["Message"].asString();
|
||||
if(!commitInfoNode["AuthorDate"].isNull())
|
||||
resultObject.commitInfo.authorDate = commitInfoNode["AuthorDate"].asString();
|
||||
if(!commitInfoNode["CommittedDate"].isNull())
|
||||
resultObject.commitInfo.committedDate = commitInfoNode["CommittedDate"].asString();
|
||||
if(!commitInfoNode["CommitterEmail"].isNull())
|
||||
resultObject.commitInfo.committerEmail = commitInfoNode["CommitterEmail"].asString();
|
||||
if(!commitInfoNode["CommitterName"].isNull())
|
||||
resultObject.commitInfo.committerName = commitInfoNode["CommitterName"].asString();
|
||||
auto allParentIds = commitInfoNode["ParentIds"]["ParentIds"];
|
||||
for (auto value : allParentIds)
|
||||
resultObject.commitInfo.parentIds.push_back(value.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();
|
||||
if(!value["Total"].isNull())
|
||||
total_ = std::stol(value["Total"].asString());
|
||||
|
||||
}
|
||||
|
||||
long ListRepositoryBranchesResult::getTotal()const
|
||||
{
|
||||
return total_;
|
||||
}
|
||||
|
||||
std::string ListRepositoryBranchesResult::getErrorCode()const
|
||||
{
|
||||
return errorCode_;
|
||||
}
|
||||
|
||||
std::string ListRepositoryBranchesResult::getErrorMessage()const
|
||||
{
|
||||
return errorMessage_;
|
||||
}
|
||||
|
||||
bool ListRepositoryBranchesResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
std::vector<ListRepositoryBranchesResult::ResultItem> ListRepositoryBranchesResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
@@ -63,9 +63,16 @@ void ListRepositoryMemberResult::parse(const std::string &payload)
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["ErrorMessage"].isNull())
|
||||
errorMessage_ = value["ErrorMessage"].asString();
|
||||
if(!value["Total"].isNull())
|
||||
total_ = std::stol(value["Total"].asString());
|
||||
|
||||
}
|
||||
|
||||
long ListRepositoryMemberResult::getTotal()const
|
||||
{
|
||||
return total_;
|
||||
}
|
||||
|
||||
std::string ListRepositoryMemberResult::getErrorCode()const
|
||||
{
|
||||
return errorCode_;
|
||||
|
||||
@@ -112,18 +112,18 @@ void MergeMergeRequestResult::parse(const std::string &payload)
|
||||
satisfiedCheckResultsItemObject.checkName = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["CheckName"].asString();
|
||||
if(!approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["CheckType"].isNull())
|
||||
satisfiedCheckResultsItemObject.checkType = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["CheckType"].asString();
|
||||
auto allExtraUsersNode = allSatisfiedCheckResultsNode["ExtraUsers"]["ExtraUsersItem"];
|
||||
for (auto allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem : allExtraUsersNode)
|
||||
auto allExtraUsersNode = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItem["ExtraUsers"]["ExtraUsersItem"];
|
||||
for (auto approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem : allExtraUsersNode)
|
||||
{
|
||||
Result::ApproveCheckResult::SatisfiedCheckResultsItem::ExtraUsersItem extraUsersObject;
|
||||
if(!allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem["Id"].isNull())
|
||||
extraUsersObject.id = std::stol(allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem["Id"].asString());
|
||||
if(!allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem["ExternUserId"].isNull())
|
||||
extraUsersObject.externUserId = allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem["ExternUserId"].asString();
|
||||
if(!allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem["AvatarUrl"].isNull())
|
||||
extraUsersObject.avatarUrl = allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem["AvatarUrl"].asString();
|
||||
if(!allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem["Name"].isNull())
|
||||
extraUsersObject.name = allSatisfiedCheckResultsNodeExtraUsersExtraUsersItem["Name"].asString();
|
||||
if(!approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["Id"].isNull())
|
||||
extraUsersObject.id = std::stol(approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["Id"].asString());
|
||||
if(!approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["ExternUserId"].isNull())
|
||||
extraUsersObject.externUserId = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["ExternUserId"].asString();
|
||||
if(!approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["AvatarUrl"].isNull())
|
||||
extraUsersObject.avatarUrl = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["AvatarUrl"].asString();
|
||||
if(!approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["Name"].isNull())
|
||||
extraUsersObject.name = approveCheckResultNodeSatisfiedCheckResultsSatisfiedCheckResultsItemExtraUsersExtraUsersItem["Name"].asString();
|
||||
satisfiedCheckResultsItemObject.extraUsers.push_back(extraUsersObject);
|
||||
}
|
||||
auto allSatisfiedItems = value["SatisfiedItems"]["SatisfiedItems"];
|
||||
@@ -144,18 +144,18 @@ void MergeMergeRequestResult::parse(const std::string &payload)
|
||||
unsatisfiedCheckResultsItemObject.checkName = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["CheckName"].asString();
|
||||
if(!approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["CheckType"].isNull())
|
||||
unsatisfiedCheckResultsItemObject.checkType = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["CheckType"].asString();
|
||||
auto allExtraUsers3Node = allUnsatisfiedCheckResultsNode["ExtraUsers"]["ExtraUsersItem"];
|
||||
for (auto allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem : allExtraUsers3Node)
|
||||
auto allExtraUsers3Node = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItem["ExtraUsers"]["ExtraUsersItem"];
|
||||
for (auto approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem : allExtraUsers3Node)
|
||||
{
|
||||
Result::ApproveCheckResult::UnsatisfiedCheckResultsItem::ExtraUsersItem4 extraUsers3Object;
|
||||
if(!allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem["Id"].isNull())
|
||||
extraUsers3Object.id = std::stol(allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem["Id"].asString());
|
||||
if(!allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem["ExternUserId"].isNull())
|
||||
extraUsers3Object.externUserId = allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem["ExternUserId"].asString();
|
||||
if(!allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem["AvatarUrl"].isNull())
|
||||
extraUsers3Object.avatarUrl = allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem["AvatarUrl"].asString();
|
||||
if(!allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem["Name"].isNull())
|
||||
extraUsers3Object.name = allUnsatisfiedCheckResultsNodeExtraUsersExtraUsersItem["Name"].asString();
|
||||
if(!approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["Id"].isNull())
|
||||
extraUsers3Object.id = std::stol(approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["Id"].asString());
|
||||
if(!approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["ExternUserId"].isNull())
|
||||
extraUsers3Object.externUserId = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["ExternUserId"].asString();
|
||||
if(!approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["AvatarUrl"].isNull())
|
||||
extraUsers3Object.avatarUrl = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["AvatarUrl"].asString();
|
||||
if(!approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["Name"].isNull())
|
||||
extraUsers3Object.name = approveCheckResultNodeUnsatisfiedCheckResultsUnsatisfiedCheckResultsItemExtraUsersExtraUsersItem["Name"].asString();
|
||||
unsatisfiedCheckResultsItemObject.extraUsers3.push_back(extraUsers3Object);
|
||||
}
|
||||
auto allSatisfiedItems1 = value["SatisfiedItems"]["SatisfiedItems"];
|
||||
|
||||
Reference in New Issue
Block a user