Add ListDevopsProjects.
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
2021-06-15 Version: 1.36.786
|
||||
- Add ListDevopsProjects.
|
||||
|
||||
2021-06-15 Version: 1.36.785
|
||||
- Supported EncryptNewTables for ModifyDBClusterTDE.
|
||||
- Supported SSLAutoRotate for ModifyDBClusterSSL.
|
||||
|
||||
@@ -121,6 +121,8 @@ set(devops-rdc_public_header_model
|
||||
include/alibabacloud/devops-rdc/model/ListDevopsProjectTaskListResult.h
|
||||
include/alibabacloud/devops-rdc/model/ListDevopsProjectTasksRequest.h
|
||||
include/alibabacloud/devops-rdc/model/ListDevopsProjectTasksResult.h
|
||||
include/alibabacloud/devops-rdc/model/ListDevopsProjectsRequest.h
|
||||
include/alibabacloud/devops-rdc/model/ListDevopsProjectsResult.h
|
||||
include/alibabacloud/devops-rdc/model/ListDevopsScenarioFieldConfigRequest.h
|
||||
include/alibabacloud/devops-rdc/model/ListDevopsScenarioFieldConfigResult.h
|
||||
include/alibabacloud/devops-rdc/model/ListPipelinesRequest.h
|
||||
@@ -250,6 +252,8 @@ set(devops-rdc_src
|
||||
src/model/ListDevopsProjectTaskListResult.cc
|
||||
src/model/ListDevopsProjectTasksRequest.cc
|
||||
src/model/ListDevopsProjectTasksResult.cc
|
||||
src/model/ListDevopsProjectsRequest.cc
|
||||
src/model/ListDevopsProjectsResult.cc
|
||||
src/model/ListDevopsScenarioFieldConfigRequest.cc
|
||||
src/model/ListDevopsScenarioFieldConfigResult.cc
|
||||
src/model/ListPipelinesRequest.cc
|
||||
|
||||
@@ -122,6 +122,8 @@
|
||||
#include "model/ListDevopsProjectTaskListResult.h"
|
||||
#include "model/ListDevopsProjectTasksRequest.h"
|
||||
#include "model/ListDevopsProjectTasksResult.h"
|
||||
#include "model/ListDevopsProjectsRequest.h"
|
||||
#include "model/ListDevopsProjectsResult.h"
|
||||
#include "model/ListDevopsScenarioFieldConfigRequest.h"
|
||||
#include "model/ListDevopsScenarioFieldConfigResult.h"
|
||||
#include "model/ListPipelinesRequest.h"
|
||||
@@ -307,6 +309,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::ListDevopsProjectTasksResult> ListDevopsProjectTasksOutcome;
|
||||
typedef std::future<ListDevopsProjectTasksOutcome> ListDevopsProjectTasksOutcomeCallable;
|
||||
typedef std::function<void(const Devops_rdcClient*, const Model::ListDevopsProjectTasksRequest&, const ListDevopsProjectTasksOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListDevopsProjectTasksAsyncHandler;
|
||||
typedef Outcome<Error, Model::ListDevopsProjectsResult> ListDevopsProjectsOutcome;
|
||||
typedef std::future<ListDevopsProjectsOutcome> ListDevopsProjectsOutcomeCallable;
|
||||
typedef std::function<void(const Devops_rdcClient*, const Model::ListDevopsProjectsRequest&, const ListDevopsProjectsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListDevopsProjectsAsyncHandler;
|
||||
typedef Outcome<Error, Model::ListDevopsScenarioFieldConfigResult> ListDevopsScenarioFieldConfigOutcome;
|
||||
typedef std::future<ListDevopsScenarioFieldConfigOutcome> ListDevopsScenarioFieldConfigOutcomeCallable;
|
||||
typedef std::function<void(const Devops_rdcClient*, const Model::ListDevopsScenarioFieldConfigRequest&, const ListDevopsScenarioFieldConfigOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListDevopsScenarioFieldConfigAsyncHandler;
|
||||
@@ -501,6 +506,9 @@ namespace AlibabaCloud
|
||||
ListDevopsProjectTasksOutcome listDevopsProjectTasks(const Model::ListDevopsProjectTasksRequest &request)const;
|
||||
void listDevopsProjectTasksAsync(const Model::ListDevopsProjectTasksRequest& request, const ListDevopsProjectTasksAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ListDevopsProjectTasksOutcomeCallable listDevopsProjectTasksCallable(const Model::ListDevopsProjectTasksRequest& request) const;
|
||||
ListDevopsProjectsOutcome listDevopsProjects(const Model::ListDevopsProjectsRequest &request)const;
|
||||
void listDevopsProjectsAsync(const Model::ListDevopsProjectsRequest& request, const ListDevopsProjectsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ListDevopsProjectsOutcomeCallable listDevopsProjectsCallable(const Model::ListDevopsProjectsRequest& request) const;
|
||||
ListDevopsScenarioFieldConfigOutcome listDevopsScenarioFieldConfig(const Model::ListDevopsScenarioFieldConfigRequest &request)const;
|
||||
void listDevopsScenarioFieldConfigAsync(const Model::ListDevopsScenarioFieldConfigRequest& request, const ListDevopsScenarioFieldConfigAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ListDevopsScenarioFieldConfigOutcomeCallable listDevopsScenarioFieldConfigCallable(const Model::ListDevopsScenarioFieldConfigRequest& request) const;
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* 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_DEVOPS_RDC_MODEL_LISTDEVOPSPROJECTSREQUEST_H_
|
||||
#define ALIBABACLOUD_DEVOPS_RDC_MODEL_LISTDEVOPSPROJECTSREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/devops-rdc/Devops_rdcExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Devops_rdc
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_DEVOPS_RDC_EXPORT ListDevopsProjectsRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
ListDevopsProjectsRequest();
|
||||
~ListDevopsProjectsRequest();
|
||||
|
||||
std::string getSelectBy()const;
|
||||
void setSelectBy(const std::string& selectBy);
|
||||
int getPageSize()const;
|
||||
void setPageSize(int pageSize);
|
||||
std::string getOrderBy()const;
|
||||
void setOrderBy(const std::string& orderBy);
|
||||
std::string getOrgId()const;
|
||||
void setOrgId(const std::string& orgId);
|
||||
std::string getPageToken()const;
|
||||
void setPageToken(const std::string& pageToken);
|
||||
|
||||
private:
|
||||
std::string selectBy_;
|
||||
int pageSize_;
|
||||
std::string orderBy_;
|
||||
std::string orgId_;
|
||||
std::string pageToken_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_DEVOPS_RDC_MODEL_LISTDEVOPSPROJECTSREQUEST_H_
|
||||
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* 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_DEVOPS_RDC_MODEL_LISTDEVOPSPROJECTSRESULT_H_
|
||||
#define ALIBABACLOUD_DEVOPS_RDC_MODEL_LISTDEVOPSPROJECTSRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/devops-rdc/Devops_rdcExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Devops_rdc
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_DEVOPS_RDC_EXPORT ListDevopsProjectsResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Object
|
||||
{
|
||||
struct Project
|
||||
{
|
||||
bool isTemplate;
|
||||
std::string description;
|
||||
std::string updated;
|
||||
std::string creatorId;
|
||||
int membersCount;
|
||||
std::string organizationId;
|
||||
int tasksCount;
|
||||
int roleId;
|
||||
std::string name;
|
||||
std::string logo;
|
||||
std::string created;
|
||||
bool isArchived;
|
||||
bool isStar;
|
||||
bool isPublic;
|
||||
std::string visibility;
|
||||
std::string id;
|
||||
};
|
||||
std::string nextPageToken;
|
||||
std::vector<Project> result;
|
||||
};
|
||||
|
||||
|
||||
ListDevopsProjectsResult();
|
||||
explicit ListDevopsProjectsResult(const std::string &payload);
|
||||
~ListDevopsProjectsResult();
|
||||
std::string getErrorMsg()const;
|
||||
Object getObject()const;
|
||||
std::string getErrorCode()const;
|
||||
bool getSuccessful()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string errorMsg_;
|
||||
Object object_;
|
||||
std::string errorCode_;
|
||||
bool successful_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_DEVOPS_RDC_MODEL_LISTDEVOPSPROJECTSRESULT_H_
|
||||
@@ -1851,6 +1851,42 @@ Devops_rdcClient::ListDevopsProjectTasksOutcomeCallable Devops_rdcClient::listDe
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Devops_rdcClient::ListDevopsProjectsOutcome Devops_rdcClient::listDevopsProjects(const ListDevopsProjectsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListDevopsProjectsOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListDevopsProjectsOutcome(ListDevopsProjectsResult(outcome.result()));
|
||||
else
|
||||
return ListDevopsProjectsOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void Devops_rdcClient::listDevopsProjectsAsync(const ListDevopsProjectsRequest& request, const ListDevopsProjectsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listDevopsProjects(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
Devops_rdcClient::ListDevopsProjectsOutcomeCallable Devops_rdcClient::listDevopsProjectsCallable(const ListDevopsProjectsRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListDevopsProjectsOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listDevopsProjects(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Devops_rdcClient::ListDevopsScenarioFieldConfigOutcome Devops_rdcClient::listDevopsScenarioFieldConfig(const ListDevopsScenarioFieldConfigRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
84
devops-rdc/src/model/ListDevopsProjectsRequest.cc
Normal file
84
devops-rdc/src/model/ListDevopsProjectsRequest.cc
Normal file
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* 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/devops-rdc/model/ListDevopsProjectsRequest.h>
|
||||
|
||||
using AlibabaCloud::Devops_rdc::Model::ListDevopsProjectsRequest;
|
||||
|
||||
ListDevopsProjectsRequest::ListDevopsProjectsRequest() :
|
||||
RpcServiceRequest("devops-rdc", "2020-03-03", "ListDevopsProjects")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ListDevopsProjectsRequest::~ListDevopsProjectsRequest()
|
||||
{}
|
||||
|
||||
std::string ListDevopsProjectsRequest::getSelectBy()const
|
||||
{
|
||||
return selectBy_;
|
||||
}
|
||||
|
||||
void ListDevopsProjectsRequest::setSelectBy(const std::string& selectBy)
|
||||
{
|
||||
selectBy_ = selectBy;
|
||||
setBodyParameter("SelectBy", selectBy);
|
||||
}
|
||||
|
||||
int ListDevopsProjectsRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void ListDevopsProjectsRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setBodyParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string ListDevopsProjectsRequest::getOrderBy()const
|
||||
{
|
||||
return orderBy_;
|
||||
}
|
||||
|
||||
void ListDevopsProjectsRequest::setOrderBy(const std::string& orderBy)
|
||||
{
|
||||
orderBy_ = orderBy;
|
||||
setBodyParameter("OrderBy", orderBy);
|
||||
}
|
||||
|
||||
std::string ListDevopsProjectsRequest::getOrgId()const
|
||||
{
|
||||
return orgId_;
|
||||
}
|
||||
|
||||
void ListDevopsProjectsRequest::setOrgId(const std::string& orgId)
|
||||
{
|
||||
orgId_ = orgId;
|
||||
setBodyParameter("OrgId", orgId);
|
||||
}
|
||||
|
||||
std::string ListDevopsProjectsRequest::getPageToken()const
|
||||
{
|
||||
return pageToken_;
|
||||
}
|
||||
|
||||
void ListDevopsProjectsRequest::setPageToken(const std::string& pageToken)
|
||||
{
|
||||
pageToken_ = pageToken;
|
||||
setBodyParameter("PageToken", pageToken);
|
||||
}
|
||||
|
||||
111
devops-rdc/src/model/ListDevopsProjectsResult.cc
Normal file
111
devops-rdc/src/model/ListDevopsProjectsResult.cc
Normal file
@@ -0,0 +1,111 @@
|
||||
/*
|
||||
* 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/devops-rdc/model/ListDevopsProjectsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Devops_rdc;
|
||||
using namespace AlibabaCloud::Devops_rdc::Model;
|
||||
|
||||
ListDevopsProjectsResult::ListDevopsProjectsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListDevopsProjectsResult::ListDevopsProjectsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListDevopsProjectsResult::~ListDevopsProjectsResult()
|
||||
{}
|
||||
|
||||
void ListDevopsProjectsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto objectNode = value["Object"];
|
||||
if(!objectNode["NextPageToken"].isNull())
|
||||
object_.nextPageToken = objectNode["NextPageToken"].asString();
|
||||
auto allResultNode = objectNode["Result"]["Project"];
|
||||
for (auto objectNodeResultProject : allResultNode)
|
||||
{
|
||||
Object::Project projectObject;
|
||||
if(!objectNodeResultProject["RoleId"].isNull())
|
||||
projectObject.roleId = std::stoi(objectNodeResultProject["RoleId"].asString());
|
||||
if(!objectNodeResultProject["OrganizationId"].isNull())
|
||||
projectObject.organizationId = objectNodeResultProject["OrganizationId"].asString();
|
||||
if(!objectNodeResultProject["Id"].isNull())
|
||||
projectObject.id = objectNodeResultProject["Id"].asString();
|
||||
if(!objectNodeResultProject["CreatorId"].isNull())
|
||||
projectObject.creatorId = objectNodeResultProject["CreatorId"].asString();
|
||||
if(!objectNodeResultProject["Visibility"].isNull())
|
||||
projectObject.visibility = objectNodeResultProject["Visibility"].asString();
|
||||
if(!objectNodeResultProject["Updated"].isNull())
|
||||
projectObject.updated = objectNodeResultProject["Updated"].asString();
|
||||
if(!objectNodeResultProject["TasksCount"].isNull())
|
||||
projectObject.tasksCount = std::stoi(objectNodeResultProject["TasksCount"].asString());
|
||||
if(!objectNodeResultProject["Name"].isNull())
|
||||
projectObject.name = objectNodeResultProject["Name"].asString();
|
||||
if(!objectNodeResultProject["MembersCount"].isNull())
|
||||
projectObject.membersCount = std::stoi(objectNodeResultProject["MembersCount"].asString());
|
||||
if(!objectNodeResultProject["Logo"].isNull())
|
||||
projectObject.logo = objectNodeResultProject["Logo"].asString();
|
||||
if(!objectNodeResultProject["IsTemplate"].isNull())
|
||||
projectObject.isTemplate = objectNodeResultProject["IsTemplate"].asString() == "true";
|
||||
if(!objectNodeResultProject["IsStar"].isNull())
|
||||
projectObject.isStar = objectNodeResultProject["IsStar"].asString() == "true";
|
||||
if(!objectNodeResultProject["IsPublic"].isNull())
|
||||
projectObject.isPublic = objectNodeResultProject["IsPublic"].asString() == "true";
|
||||
if(!objectNodeResultProject["IsArchived"].isNull())
|
||||
projectObject.isArchived = objectNodeResultProject["IsArchived"].asString() == "true";
|
||||
if(!objectNodeResultProject["Description"].isNull())
|
||||
projectObject.description = objectNodeResultProject["Description"].asString();
|
||||
if(!objectNodeResultProject["Created"].isNull())
|
||||
projectObject.created = objectNodeResultProject["Created"].asString();
|
||||
object_.result.push_back(projectObject);
|
||||
}
|
||||
if(!value["Successful"].isNull())
|
||||
successful_ = value["Successful"].asString() == "true";
|
||||
if(!value["ErrorCode"].isNull())
|
||||
errorCode_ = value["ErrorCode"].asString();
|
||||
if(!value["ErrorMsg"].isNull())
|
||||
errorMsg_ = value["ErrorMsg"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string ListDevopsProjectsResult::getErrorMsg()const
|
||||
{
|
||||
return errorMsg_;
|
||||
}
|
||||
|
||||
ListDevopsProjectsResult::Object ListDevopsProjectsResult::getObject()const
|
||||
{
|
||||
return object_;
|
||||
}
|
||||
|
||||
std::string ListDevopsProjectsResult::getErrorCode()const
|
||||
{
|
||||
return errorCode_;
|
||||
}
|
||||
|
||||
bool ListDevopsProjectsResult::getSuccessful()const
|
||||
{
|
||||
return successful_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user