Generated 2020-05-18 for dataworks-public.
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
2021-02-05 Version: patch
|
||||
- Generated 2020-05-18 for `dataworks-public`.
|
||||
|
||||
2021-02-04 Version: patch
|
||||
- Update DetectVehicleIllegalParking DetectVehicleICongestion.
|
||||
|
||||
|
||||
@@ -31,6 +31,8 @@ set(dataworks-public_public_header_model
|
||||
include/alibabacloud/dataworks-public/model/CheckMetaPartitionResult.h
|
||||
include/alibabacloud/dataworks-public/model/CheckMetaTableRequest.h
|
||||
include/alibabacloud/dataworks-public/model/CheckMetaTableResult.h
|
||||
include/alibabacloud/dataworks-public/model/CreateBusinessRequest.h
|
||||
include/alibabacloud/dataworks-public/model/CreateBusinessResult.h
|
||||
include/alibabacloud/dataworks-public/model/CreateConnectionRequest.h
|
||||
include/alibabacloud/dataworks-public/model/CreateConnectionResult.h
|
||||
include/alibabacloud/dataworks-public/model/CreateDagComplementRequest.h
|
||||
@@ -336,6 +338,8 @@ set(dataworks-public_src
|
||||
src/model/CheckMetaPartitionResult.cc
|
||||
src/model/CheckMetaTableRequest.cc
|
||||
src/model/CheckMetaTableResult.cc
|
||||
src/model/CreateBusinessRequest.cc
|
||||
src/model/CreateBusinessResult.cc
|
||||
src/model/CreateConnectionRequest.cc
|
||||
src/model/CreateConnectionResult.cc
|
||||
src/model/CreateDagComplementRequest.cc
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
#include "model/CheckMetaPartitionResult.h"
|
||||
#include "model/CheckMetaTableRequest.h"
|
||||
#include "model/CheckMetaTableResult.h"
|
||||
#include "model/CreateBusinessRequest.h"
|
||||
#include "model/CreateBusinessResult.h"
|
||||
#include "model/CreateConnectionRequest.h"
|
||||
#include "model/CreateConnectionResult.h"
|
||||
#include "model/CreateDagComplementRequest.h"
|
||||
@@ -348,6 +350,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::CheckMetaTableResult> CheckMetaTableOutcome;
|
||||
typedef std::future<CheckMetaTableOutcome> CheckMetaTableOutcomeCallable;
|
||||
typedef std::function<void(const Dataworks_publicClient*, const Model::CheckMetaTableRequest&, const CheckMetaTableOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CheckMetaTableAsyncHandler;
|
||||
typedef Outcome<Error, Model::CreateBusinessResult> CreateBusinessOutcome;
|
||||
typedef std::future<CreateBusinessOutcome> CreateBusinessOutcomeCallable;
|
||||
typedef std::function<void(const Dataworks_publicClient*, const Model::CreateBusinessRequest&, const CreateBusinessOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateBusinessAsyncHandler;
|
||||
typedef Outcome<Error, Model::CreateConnectionResult> CreateConnectionOutcome;
|
||||
typedef std::future<CreateConnectionOutcome> CreateConnectionOutcomeCallable;
|
||||
typedef std::function<void(const Dataworks_publicClient*, const Model::CreateConnectionRequest&, const CreateConnectionOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateConnectionAsyncHandler;
|
||||
@@ -806,6 +811,9 @@ namespace AlibabaCloud
|
||||
CheckMetaTableOutcome checkMetaTable(const Model::CheckMetaTableRequest &request)const;
|
||||
void checkMetaTableAsync(const Model::CheckMetaTableRequest& request, const CheckMetaTableAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
CheckMetaTableOutcomeCallable checkMetaTableCallable(const Model::CheckMetaTableRequest& request) const;
|
||||
CreateBusinessOutcome createBusiness(const Model::CreateBusinessRequest &request)const;
|
||||
void createBusinessAsync(const Model::CreateBusinessRequest& request, const CreateBusinessAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
CreateBusinessOutcomeCallable createBusinessCallable(const Model::CreateBusinessRequest& request) const;
|
||||
CreateConnectionOutcome createConnection(const Model::CreateConnectionRequest &request)const;
|
||||
void createConnectionAsync(const Model::CreateConnectionRequest& request, const CreateConnectionAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
CreateConnectionOutcomeCallable createConnectionCallable(const Model::CreateConnectionRequest& request) const;
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* 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_CREATEBUSINESSREQUEST_H_
|
||||
#define ALIBABACLOUD_DATAWORKS_PUBLIC_MODEL_CREATEBUSINESSREQUEST_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 CreateBusinessRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
CreateBusinessRequest();
|
||||
~CreateBusinessRequest();
|
||||
|
||||
std::string getOwner()const;
|
||||
void setOwner(const std::string& owner);
|
||||
std::string getBusinessName()const;
|
||||
void setBusinessName(const std::string& businessName);
|
||||
std::string getDescription()const;
|
||||
void setDescription(const std::string& description);
|
||||
long getProjectId()const;
|
||||
void setProjectId(long projectId);
|
||||
std::string getUseType()const;
|
||||
void setUseType(const std::string& useType);
|
||||
std::string getProjectIdentifier()const;
|
||||
void setProjectIdentifier(const std::string& projectIdentifier);
|
||||
|
||||
private:
|
||||
std::string owner_;
|
||||
std::string businessName_;
|
||||
std::string description_;
|
||||
long projectId_;
|
||||
std::string useType_;
|
||||
std::string projectIdentifier_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_DATAWORKS_PUBLIC_MODEL_CREATEBUSINESSREQUEST_H_
|
||||
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* 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_CREATEBUSINESSRESULT_H_
|
||||
#define ALIBABACLOUD_DATAWORKS_PUBLIC_MODEL_CREATEBUSINESSRESULT_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 CreateBusinessResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
CreateBusinessResult();
|
||||
explicit CreateBusinessResult(const std::string &payload);
|
||||
~CreateBusinessResult();
|
||||
int getHttpStatusCode()const;
|
||||
std::string getErrorCode()const;
|
||||
std::string getErrorMessage()const;
|
||||
bool getSuccess()const;
|
||||
long getBusinessId()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
int httpStatusCode_;
|
||||
std::string errorCode_;
|
||||
std::string errorMessage_;
|
||||
bool success_;
|
||||
long businessId_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_DATAWORKS_PUBLIC_MODEL_CREATEBUSINESSRESULT_H_
|
||||
@@ -231,6 +231,42 @@ Dataworks_publicClient::CheckMetaTableOutcomeCallable Dataworks_publicClient::ch
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Dataworks_publicClient::CreateBusinessOutcome Dataworks_publicClient::createBusiness(const CreateBusinessRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return CreateBusinessOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return CreateBusinessOutcome(CreateBusinessResult(outcome.result()));
|
||||
else
|
||||
return CreateBusinessOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void Dataworks_publicClient::createBusinessAsync(const CreateBusinessRequest& request, const CreateBusinessAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, createBusiness(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
Dataworks_publicClient::CreateBusinessOutcomeCallable Dataworks_publicClient::createBusinessCallable(const CreateBusinessRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<CreateBusinessOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->createBusiness(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
Dataworks_publicClient::CreateConnectionOutcome Dataworks_publicClient::createConnection(const CreateConnectionRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
95
dataworks-public/src/model/CreateBusinessRequest.cc
Normal file
95
dataworks-public/src/model/CreateBusinessRequest.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/dataworks-public/model/CreateBusinessRequest.h>
|
||||
|
||||
using AlibabaCloud::Dataworks_public::Model::CreateBusinessRequest;
|
||||
|
||||
CreateBusinessRequest::CreateBusinessRequest() :
|
||||
RpcServiceRequest("dataworks-public", "2020-05-18", "CreateBusiness")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
CreateBusinessRequest::~CreateBusinessRequest()
|
||||
{}
|
||||
|
||||
std::string CreateBusinessRequest::getOwner()const
|
||||
{
|
||||
return owner_;
|
||||
}
|
||||
|
||||
void CreateBusinessRequest::setOwner(const std::string& owner)
|
||||
{
|
||||
owner_ = owner;
|
||||
setBodyParameter("Owner", owner);
|
||||
}
|
||||
|
||||
std::string CreateBusinessRequest::getBusinessName()const
|
||||
{
|
||||
return businessName_;
|
||||
}
|
||||
|
||||
void CreateBusinessRequest::setBusinessName(const std::string& businessName)
|
||||
{
|
||||
businessName_ = businessName;
|
||||
setBodyParameter("BusinessName", businessName);
|
||||
}
|
||||
|
||||
std::string CreateBusinessRequest::getDescription()const
|
||||
{
|
||||
return description_;
|
||||
}
|
||||
|
||||
void CreateBusinessRequest::setDescription(const std::string& description)
|
||||
{
|
||||
description_ = description;
|
||||
setBodyParameter("Description", description);
|
||||
}
|
||||
|
||||
long CreateBusinessRequest::getProjectId()const
|
||||
{
|
||||
return projectId_;
|
||||
}
|
||||
|
||||
void CreateBusinessRequest::setProjectId(long projectId)
|
||||
{
|
||||
projectId_ = projectId;
|
||||
setBodyParameter("ProjectId", std::to_string(projectId));
|
||||
}
|
||||
|
||||
std::string CreateBusinessRequest::getUseType()const
|
||||
{
|
||||
return useType_;
|
||||
}
|
||||
|
||||
void CreateBusinessRequest::setUseType(const std::string& useType)
|
||||
{
|
||||
useType_ = useType;
|
||||
setBodyParameter("UseType", useType);
|
||||
}
|
||||
|
||||
std::string CreateBusinessRequest::getProjectIdentifier()const
|
||||
{
|
||||
return projectIdentifier_;
|
||||
}
|
||||
|
||||
void CreateBusinessRequest::setProjectIdentifier(const std::string& projectIdentifier)
|
||||
{
|
||||
projectIdentifier_ = projectIdentifier;
|
||||
setBodyParameter("ProjectIdentifier", projectIdentifier);
|
||||
}
|
||||
|
||||
79
dataworks-public/src/model/CreateBusinessResult.cc
Normal file
79
dataworks-public/src/model/CreateBusinessResult.cc
Normal file
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
* 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/CreateBusinessResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Dataworks_public;
|
||||
using namespace AlibabaCloud::Dataworks_public::Model;
|
||||
|
||||
CreateBusinessResult::CreateBusinessResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CreateBusinessResult::CreateBusinessResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CreateBusinessResult::~CreateBusinessResult()
|
||||
{}
|
||||
|
||||
void CreateBusinessResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["ErrorCode"].isNull())
|
||||
errorCode_ = value["ErrorCode"].asString();
|
||||
if(!value["ErrorMessage"].isNull())
|
||||
errorMessage_ = value["ErrorMessage"].asString();
|
||||
if(!value["HttpStatusCode"].isNull())
|
||||
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
|
||||
if(!value["BusinessId"].isNull())
|
||||
businessId_ = std::stol(value["BusinessId"].asString());
|
||||
|
||||
}
|
||||
|
||||
int CreateBusinessResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
std::string CreateBusinessResult::getErrorCode()const
|
||||
{
|
||||
return errorCode_;
|
||||
}
|
||||
|
||||
std::string CreateBusinessResult::getErrorMessage()const
|
||||
{
|
||||
return errorMessage_;
|
||||
}
|
||||
|
||||
bool CreateBusinessResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
long CreateBusinessResult::getBusinessId()const
|
||||
{
|
||||
return businessId_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user