Generated 2020-05-18 for dataworks-public.
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
2020-08-11 Version: 1.36.569
|
||||
- Generated 2020-05-18 for `dataworks-public`.
|
||||
|
||||
2020-08-11 Version: 1.36.568
|
||||
- Update DescribeRefreshTask.
|
||||
|
||||
|
||||
@@ -199,6 +199,8 @@ set(dataworks-public_public_header_model
|
||||
include/alibabacloud/dataworks-public/model/ListProjectMembersResult.h
|
||||
include/alibabacloud/dataworks-public/model/ListProjectRolesRequest.h
|
||||
include/alibabacloud/dataworks-public/model/ListProjectRolesResult.h
|
||||
include/alibabacloud/dataworks-public/model/ListProjectsRequest.h
|
||||
include/alibabacloud/dataworks-public/model/ListProjectsResult.h
|
||||
include/alibabacloud/dataworks-public/model/ListQualityRulesRequest.h
|
||||
include/alibabacloud/dataworks-public/model/ListQualityRulesResult.h
|
||||
include/alibabacloud/dataworks-public/model/ListRemindsRequest.h
|
||||
@@ -426,6 +428,8 @@ set(dataworks-public_src
|
||||
src/model/ListProjectMembersResult.cc
|
||||
src/model/ListProjectRolesRequest.cc
|
||||
src/model/ListProjectRolesResult.cc
|
||||
src/model/ListProjectsRequest.cc
|
||||
src/model/ListProjectsResult.cc
|
||||
src/model/ListQualityRulesRequest.cc
|
||||
src/model/ListQualityRulesResult.cc
|
||||
src/model/ListRemindsRequest.cc
|
||||
|
||||
@@ -200,6 +200,8 @@
|
||||
#include "model/ListProjectMembersResult.h"
|
||||
#include "model/ListProjectRolesRequest.h"
|
||||
#include "model/ListProjectRolesResult.h"
|
||||
#include "model/ListProjectsRequest.h"
|
||||
#include "model/ListProjectsResult.h"
|
||||
#include "model/ListQualityRulesRequest.h"
|
||||
#include "model/ListQualityRulesResult.h"
|
||||
#include "model/ListRemindsRequest.h"
|
||||
@@ -522,6 +524,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::ListProjectRolesResult> ListProjectRolesOutcome;
|
||||
typedef std::future<ListProjectRolesOutcome> ListProjectRolesOutcomeCallable;
|
||||
typedef std::function<void(const Dataworks_publicClient*, const Model::ListProjectRolesRequest&, const ListProjectRolesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListProjectRolesAsyncHandler;
|
||||
typedef Outcome<Error, Model::ListProjectsResult> ListProjectsOutcome;
|
||||
typedef std::future<ListProjectsOutcome> ListProjectsOutcomeCallable;
|
||||
typedef std::function<void(const Dataworks_publicClient*, const Model::ListProjectsRequest&, const ListProjectsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListProjectsAsyncHandler;
|
||||
typedef Outcome<Error, Model::ListQualityRulesResult> ListQualityRulesOutcome;
|
||||
typedef std::future<ListQualityRulesOutcome> ListQualityRulesOutcomeCallable;
|
||||
typedef std::function<void(const Dataworks_publicClient*, const Model::ListQualityRulesRequest&, const ListQualityRulesOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListQualityRulesAsyncHandler;
|
||||
@@ -863,6 +868,9 @@ namespace AlibabaCloud
|
||||
ListProjectRolesOutcome listProjectRoles(const Model::ListProjectRolesRequest &request)const;
|
||||
void listProjectRolesAsync(const Model::ListProjectRolesRequest& request, const ListProjectRolesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ListProjectRolesOutcomeCallable listProjectRolesCallable(const Model::ListProjectRolesRequest& request) const;
|
||||
ListProjectsOutcome listProjects(const Model::ListProjectsRequest &request)const;
|
||||
void listProjectsAsync(const Model::ListProjectsRequest& request, const ListProjectsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ListProjectsOutcomeCallable listProjectsCallable(const Model::ListProjectsRequest& request) const;
|
||||
ListQualityRulesOutcome listQualityRules(const Model::ListQualityRulesRequest &request)const;
|
||||
void listQualityRulesAsync(const Model::ListQualityRulesRequest& request, const ListQualityRulesAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ListQualityRulesOutcomeCallable listQualityRulesCallable(const Model::ListQualityRulesRequest& request) const;
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* 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_DATAWORKS_PUBLIC_MODEL_LISTPROJECTSREQUEST_H_
|
||||
#define ALIBABACLOUD_DATAWORKS_PUBLIC_MODEL_LISTPROJECTSREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/dataworks-public/Dataworks_publicExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Dataworks_public
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_DATAWORKS_PUBLIC_EXPORT ListProjectsRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
ListProjectsRequest();
|
||||
~ListProjectsRequest();
|
||||
|
||||
int getPageSize()const;
|
||||
void setPageSize(int pageSize);
|
||||
int getPageNumber()const;
|
||||
void setPageNumber(int pageNumber);
|
||||
|
||||
private:
|
||||
int pageSize_;
|
||||
int pageNumber_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_DATAWORKS_PUBLIC_MODEL_LISTPROJECTSREQUEST_H_
|
||||
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* 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_DATAWORKS_PUBLIC_MODEL_LISTPROJECTSRESULT_H_
|
||||
#define ALIBABACLOUD_DATAWORKS_PUBLIC_MODEL_LISTPROJECTSRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/dataworks-public/Dataworks_publicExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Dataworks_public
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_DATAWORKS_PUBLIC_EXPORT ListProjectsResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct PageResult
|
||||
{
|
||||
struct Project
|
||||
{
|
||||
std::string projectIdentifier;
|
||||
std::string projectOwnerBaseId;
|
||||
int projectStatus;
|
||||
std::string projectStatusCode;
|
||||
std::string projectName;
|
||||
long projectId;
|
||||
std::string projectDescription;
|
||||
};
|
||||
int totalCount;
|
||||
int pageSize;
|
||||
int pageNumber;
|
||||
std::vector<Project> projectList;
|
||||
};
|
||||
|
||||
|
||||
ListProjectsResult();
|
||||
explicit ListProjectsResult(const std::string &payload);
|
||||
~ListProjectsResult();
|
||||
PageResult getPageResult()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
PageResult pageResult_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_DATAWORKS_PUBLIC_MODEL_LISTPROJECTSRESULT_H_
|
||||
@@ -3255,6 +3255,42 @@ Dataworks_publicClient::ListProjectRolesOutcomeCallable Dataworks_publicClient::
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Dataworks_publicClient::ListProjectsOutcome Dataworks_publicClient::listProjects(const ListProjectsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ListProjectsOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ListProjectsOutcome(ListProjectsResult(outcome.result()));
|
||||
else
|
||||
return ListProjectsOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void Dataworks_publicClient::listProjectsAsync(const ListProjectsRequest& request, const ListProjectsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, listProjects(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
Dataworks_publicClient::ListProjectsOutcomeCallable Dataworks_publicClient::listProjectsCallable(const ListProjectsRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ListProjectsOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->listProjects(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Dataworks_publicClient::ListQualityRulesOutcome Dataworks_publicClient::listQualityRules(const ListQualityRulesRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
51
dataworks-public/src/model/ListProjectsRequest.cc
Normal file
51
dataworks-public/src/model/ListProjectsRequest.cc
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* 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/dataworks-public/model/ListProjectsRequest.h>
|
||||
|
||||
using AlibabaCloud::Dataworks_public::Model::ListProjectsRequest;
|
||||
|
||||
ListProjectsRequest::ListProjectsRequest() :
|
||||
RpcServiceRequest("dataworks-public", "2020-05-18", "ListProjects")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ListProjectsRequest::~ListProjectsRequest()
|
||||
{}
|
||||
|
||||
int ListProjectsRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void ListProjectsRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
int ListProjectsRequest::getPageNumber()const
|
||||
{
|
||||
return pageNumber_;
|
||||
}
|
||||
|
||||
void ListProjectsRequest::setPageNumber(int pageNumber)
|
||||
{
|
||||
pageNumber_ = pageNumber;
|
||||
setParameter("PageNumber", std::to_string(pageNumber));
|
||||
}
|
||||
|
||||
76
dataworks-public/src/model/ListProjectsResult.cc
Normal file
76
dataworks-public/src/model/ListProjectsResult.cc
Normal file
@@ -0,0 +1,76 @@
|
||||
/*
|
||||
* 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/dataworks-public/model/ListProjectsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Dataworks_public;
|
||||
using namespace AlibabaCloud::Dataworks_public::Model;
|
||||
|
||||
ListProjectsResult::ListProjectsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ListProjectsResult::ListProjectsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ListProjectsResult::~ListProjectsResult()
|
||||
{}
|
||||
|
||||
void ListProjectsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto pageResultNode = value["PageResult"];
|
||||
if(!pageResultNode["PageNumber"].isNull())
|
||||
pageResult_.pageNumber = std::stoi(pageResultNode["PageNumber"].asString());
|
||||
if(!pageResultNode["PageSize"].isNull())
|
||||
pageResult_.pageSize = std::stoi(pageResultNode["PageSize"].asString());
|
||||
if(!pageResultNode["TotalCount"].isNull())
|
||||
pageResult_.totalCount = std::stoi(pageResultNode["TotalCount"].asString());
|
||||
auto allProjectListNode = pageResultNode["ProjectList"]["Project"];
|
||||
for (auto pageResultNodeProjectListProject : allProjectListNode)
|
||||
{
|
||||
PageResult::Project projectObject;
|
||||
if(!pageResultNodeProjectListProject["ProjectName"].isNull())
|
||||
projectObject.projectName = pageResultNodeProjectListProject["ProjectName"].asString();
|
||||
if(!pageResultNodeProjectListProject["ProjectIdentifier"].isNull())
|
||||
projectObject.projectIdentifier = pageResultNodeProjectListProject["ProjectIdentifier"].asString();
|
||||
if(!pageResultNodeProjectListProject["ProjectDescription"].isNull())
|
||||
projectObject.projectDescription = pageResultNodeProjectListProject["ProjectDescription"].asString();
|
||||
if(!pageResultNodeProjectListProject["ProjectStatus"].isNull())
|
||||
projectObject.projectStatus = std::stoi(pageResultNodeProjectListProject["ProjectStatus"].asString());
|
||||
if(!pageResultNodeProjectListProject["ProjectId"].isNull())
|
||||
projectObject.projectId = std::stol(pageResultNodeProjectListProject["ProjectId"].asString());
|
||||
if(!pageResultNodeProjectListProject["ProjectOwnerBaseId"].isNull())
|
||||
projectObject.projectOwnerBaseId = pageResultNodeProjectListProject["ProjectOwnerBaseId"].asString();
|
||||
if(!pageResultNodeProjectListProject["ProjectStatusCode"].isNull())
|
||||
projectObject.projectStatusCode = pageResultNodeProjectListProject["ProjectStatusCode"].asString();
|
||||
pageResult_.projectList.push_back(projectObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ListProjectsResult::PageResult ListProjectsResult::getPageResult()const
|
||||
{
|
||||
return pageResult_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user