Support corp group api.

This commit is contained in:
sdk-team
2020-08-12 18:08:25 +08:00
parent faf9b3fb11
commit 2f6b7ad555
23 changed files with 891 additions and 1 deletions

View File

@@ -1,3 +1,6 @@
2020-08-12 Version: 1.36.572
- Support corp group api.
2020-08-12 Version: 1.36.571
- Add pipeline status api.

View File

@@ -1 +1 @@
1.36.571
1.36.572

View File

@@ -29,10 +29,14 @@ set(vcs_public_header_model
include/alibabacloud/vcs/model/AddMonitorResult.h
include/alibabacloud/vcs/model/CreateCorpRequest.h
include/alibabacloud/vcs/model/CreateCorpResult.h
include/alibabacloud/vcs/model/CreateCorpGroupRequest.h
include/alibabacloud/vcs/model/CreateCorpGroupResult.h
include/alibabacloud/vcs/model/CreateVideoComposeTaskRequest.h
include/alibabacloud/vcs/model/CreateVideoComposeTaskResult.h
include/alibabacloud/vcs/model/CreateVideoSummaryTaskRequest.h
include/alibabacloud/vcs/model/CreateVideoSummaryTaskResult.h
include/alibabacloud/vcs/model/DeleteCorpGroupRequest.h
include/alibabacloud/vcs/model/DeleteCorpGroupResult.h
include/alibabacloud/vcs/model/DeleteDataSourceRequest.h
include/alibabacloud/vcs/model/DeleteDataSourceResult.h
include/alibabacloud/vcs/model/DeleteDeviceRequest.h
@@ -65,6 +69,8 @@ set(vcs_public_header_model
include/alibabacloud/vcs/model/InvokeMotorModelResult.h
include/alibabacloud/vcs/model/ListBodyAlgorithmResultsRequest.h
include/alibabacloud/vcs/model/ListBodyAlgorithmResultsResult.h
include/alibabacloud/vcs/model/ListCorpGroupsRequest.h
include/alibabacloud/vcs/model/ListCorpGroupsResult.h
include/alibabacloud/vcs/model/ListCorpsRequest.h
include/alibabacloud/vcs/model/ListCorpsResult.h
include/alibabacloud/vcs/model/ListDevicesRequest.h
@@ -116,10 +122,14 @@ set(vcs_src
src/model/AddMonitorResult.cc
src/model/CreateCorpRequest.cc
src/model/CreateCorpResult.cc
src/model/CreateCorpGroupRequest.cc
src/model/CreateCorpGroupResult.cc
src/model/CreateVideoComposeTaskRequest.cc
src/model/CreateVideoComposeTaskResult.cc
src/model/CreateVideoSummaryTaskRequest.cc
src/model/CreateVideoSummaryTaskResult.cc
src/model/DeleteCorpGroupRequest.cc
src/model/DeleteCorpGroupResult.cc
src/model/DeleteDataSourceRequest.cc
src/model/DeleteDataSourceResult.cc
src/model/DeleteDeviceRequest.cc
@@ -152,6 +162,8 @@ set(vcs_src
src/model/InvokeMotorModelResult.cc
src/model/ListBodyAlgorithmResultsRequest.cc
src/model/ListBodyAlgorithmResultsResult.cc
src/model/ListCorpGroupsRequest.cc
src/model/ListCorpGroupsResult.cc
src/model/ListCorpsRequest.cc
src/model/ListCorpsResult.cc
src/model/ListDevicesRequest.cc

View File

@@ -30,10 +30,14 @@
#include "model/AddMonitorResult.h"
#include "model/CreateCorpRequest.h"
#include "model/CreateCorpResult.h"
#include "model/CreateCorpGroupRequest.h"
#include "model/CreateCorpGroupResult.h"
#include "model/CreateVideoComposeTaskRequest.h"
#include "model/CreateVideoComposeTaskResult.h"
#include "model/CreateVideoSummaryTaskRequest.h"
#include "model/CreateVideoSummaryTaskResult.h"
#include "model/DeleteCorpGroupRequest.h"
#include "model/DeleteCorpGroupResult.h"
#include "model/DeleteDataSourceRequest.h"
#include "model/DeleteDataSourceResult.h"
#include "model/DeleteDeviceRequest.h"
@@ -66,6 +70,8 @@
#include "model/InvokeMotorModelResult.h"
#include "model/ListBodyAlgorithmResultsRequest.h"
#include "model/ListBodyAlgorithmResultsResult.h"
#include "model/ListCorpGroupsRequest.h"
#include "model/ListCorpGroupsResult.h"
#include "model/ListCorpsRequest.h"
#include "model/ListCorpsResult.h"
#include "model/ListDevicesRequest.h"
@@ -127,12 +133,18 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::CreateCorpResult> CreateCorpOutcome;
typedef std::future<CreateCorpOutcome> CreateCorpOutcomeCallable;
typedef std::function<void(const VcsClient*, const Model::CreateCorpRequest&, const CreateCorpOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateCorpAsyncHandler;
typedef Outcome<Error, Model::CreateCorpGroupResult> CreateCorpGroupOutcome;
typedef std::future<CreateCorpGroupOutcome> CreateCorpGroupOutcomeCallable;
typedef std::function<void(const VcsClient*, const Model::CreateCorpGroupRequest&, const CreateCorpGroupOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateCorpGroupAsyncHandler;
typedef Outcome<Error, Model::CreateVideoComposeTaskResult> CreateVideoComposeTaskOutcome;
typedef std::future<CreateVideoComposeTaskOutcome> CreateVideoComposeTaskOutcomeCallable;
typedef std::function<void(const VcsClient*, const Model::CreateVideoComposeTaskRequest&, const CreateVideoComposeTaskOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateVideoComposeTaskAsyncHandler;
typedef Outcome<Error, Model::CreateVideoSummaryTaskResult> CreateVideoSummaryTaskOutcome;
typedef std::future<CreateVideoSummaryTaskOutcome> CreateVideoSummaryTaskOutcomeCallable;
typedef std::function<void(const VcsClient*, const Model::CreateVideoSummaryTaskRequest&, const CreateVideoSummaryTaskOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateVideoSummaryTaskAsyncHandler;
typedef Outcome<Error, Model::DeleteCorpGroupResult> DeleteCorpGroupOutcome;
typedef std::future<DeleteCorpGroupOutcome> DeleteCorpGroupOutcomeCallable;
typedef std::function<void(const VcsClient*, const Model::DeleteCorpGroupRequest&, const DeleteCorpGroupOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DeleteCorpGroupAsyncHandler;
typedef Outcome<Error, Model::DeleteDataSourceResult> DeleteDataSourceOutcome;
typedef std::future<DeleteDataSourceOutcome> DeleteDataSourceOutcomeCallable;
typedef std::function<void(const VcsClient*, const Model::DeleteDataSourceRequest&, const DeleteDataSourceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DeleteDataSourceAsyncHandler;
@@ -181,6 +193,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::ListBodyAlgorithmResultsResult> ListBodyAlgorithmResultsOutcome;
typedef std::future<ListBodyAlgorithmResultsOutcome> ListBodyAlgorithmResultsOutcomeCallable;
typedef std::function<void(const VcsClient*, const Model::ListBodyAlgorithmResultsRequest&, const ListBodyAlgorithmResultsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListBodyAlgorithmResultsAsyncHandler;
typedef Outcome<Error, Model::ListCorpGroupsResult> ListCorpGroupsOutcome;
typedef std::future<ListCorpGroupsOutcome> ListCorpGroupsOutcomeCallable;
typedef std::function<void(const VcsClient*, const Model::ListCorpGroupsRequest&, const ListCorpGroupsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListCorpGroupsAsyncHandler;
typedef Outcome<Error, Model::ListCorpsResult> ListCorpsOutcome;
typedef std::future<ListCorpsOutcome> ListCorpsOutcomeCallable;
typedef std::function<void(const VcsClient*, const Model::ListCorpsRequest&, const ListCorpsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ListCorpsAsyncHandler;
@@ -258,12 +273,18 @@ namespace AlibabaCloud
CreateCorpOutcome createCorp(const Model::CreateCorpRequest &request)const;
void createCorpAsync(const Model::CreateCorpRequest& request, const CreateCorpAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
CreateCorpOutcomeCallable createCorpCallable(const Model::CreateCorpRequest& request) const;
CreateCorpGroupOutcome createCorpGroup(const Model::CreateCorpGroupRequest &request)const;
void createCorpGroupAsync(const Model::CreateCorpGroupRequest& request, const CreateCorpGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
CreateCorpGroupOutcomeCallable createCorpGroupCallable(const Model::CreateCorpGroupRequest& request) const;
CreateVideoComposeTaskOutcome createVideoComposeTask(const Model::CreateVideoComposeTaskRequest &request)const;
void createVideoComposeTaskAsync(const Model::CreateVideoComposeTaskRequest& request, const CreateVideoComposeTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
CreateVideoComposeTaskOutcomeCallable createVideoComposeTaskCallable(const Model::CreateVideoComposeTaskRequest& request) const;
CreateVideoSummaryTaskOutcome createVideoSummaryTask(const Model::CreateVideoSummaryTaskRequest &request)const;
void createVideoSummaryTaskAsync(const Model::CreateVideoSummaryTaskRequest& request, const CreateVideoSummaryTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
CreateVideoSummaryTaskOutcomeCallable createVideoSummaryTaskCallable(const Model::CreateVideoSummaryTaskRequest& request) const;
DeleteCorpGroupOutcome deleteCorpGroup(const Model::DeleteCorpGroupRequest &request)const;
void deleteCorpGroupAsync(const Model::DeleteCorpGroupRequest& request, const DeleteCorpGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DeleteCorpGroupOutcomeCallable deleteCorpGroupCallable(const Model::DeleteCorpGroupRequest& request) const;
DeleteDataSourceOutcome deleteDataSource(const Model::DeleteDataSourceRequest &request)const;
void deleteDataSourceAsync(const Model::DeleteDataSourceRequest& request, const DeleteDataSourceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DeleteDataSourceOutcomeCallable deleteDataSourceCallable(const Model::DeleteDataSourceRequest& request) const;
@@ -312,6 +333,9 @@ namespace AlibabaCloud
ListBodyAlgorithmResultsOutcome listBodyAlgorithmResults(const Model::ListBodyAlgorithmResultsRequest &request)const;
void listBodyAlgorithmResultsAsync(const Model::ListBodyAlgorithmResultsRequest& request, const ListBodyAlgorithmResultsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListBodyAlgorithmResultsOutcomeCallable listBodyAlgorithmResultsCallable(const Model::ListBodyAlgorithmResultsRequest& request) const;
ListCorpGroupsOutcome listCorpGroups(const Model::ListCorpGroupsRequest &request)const;
void listCorpGroupsAsync(const Model::ListCorpGroupsRequest& request, const ListCorpGroupsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListCorpGroupsOutcomeCallable listCorpGroupsCallable(const Model::ListCorpGroupsRequest& request) const;
ListCorpsOutcome listCorps(const Model::ListCorpsRequest &request)const;
void listCorpsAsync(const Model::ListCorpsRequest& request, const ListCorpsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ListCorpsOutcomeCallable listCorpsCallable(const Model::ListCorpsRequest& request) const;

View File

@@ -0,0 +1,54 @@
/*
* 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_VCS_MODEL_CREATECORPGROUPREQUEST_H_
#define ALIBABACLOUD_VCS_MODEL_CREATECORPGROUPREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/vcs/VcsExport.h>
namespace AlibabaCloud
{
namespace Vcs
{
namespace Model
{
class ALIBABACLOUD_VCS_EXPORT CreateCorpGroupRequest : public RpcServiceRequest
{
public:
CreateCorpGroupRequest();
~CreateCorpGroupRequest();
std::string getCorpId()const;
void setCorpId(const std::string& corpId);
std::string getClientToken()const;
void setClientToken(const std::string& clientToken);
std::string getGroupId()const;
void setGroupId(const std::string& groupId);
private:
std::string corpId_;
std::string clientToken_;
std::string groupId_;
};
}
}
}
#endif // !ALIBABACLOUD_VCS_MODEL_CREATECORPGROUPREQUEST_H_

View File

@@ -0,0 +1,55 @@
/*
* 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_VCS_MODEL_CREATECORPGROUPRESULT_H_
#define ALIBABACLOUD_VCS_MODEL_CREATECORPGROUPRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/vcs/VcsExport.h>
namespace AlibabaCloud
{
namespace Vcs
{
namespace Model
{
class ALIBABACLOUD_VCS_EXPORT CreateCorpGroupResult : public ServiceResult
{
public:
CreateCorpGroupResult();
explicit CreateCorpGroupResult(const std::string &payload);
~CreateCorpGroupResult();
std::string getMessage()const;
std::string getCode()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
std::string code_;
bool success_;
};
}
}
}
#endif // !ALIBABACLOUD_VCS_MODEL_CREATECORPGROUPRESULT_H_

View File

@@ -37,6 +37,8 @@ namespace AlibabaCloud
std::string getAlgorithmType()const;
void setAlgorithmType(const std::string& algorithmType);
std::string getIsvSubId()const;
void setIsvSubId(const std::string& isvSubId);
std::string getParentCorpId()const;
void setParentCorpId(const std::string& parentCorpId);
std::string getDescription()const;
@@ -48,6 +50,7 @@ namespace AlibabaCloud
private:
std::string algorithmType_;
std::string isvSubId_;
std::string parentCorpId_;
std::string description_;
std::string appName_;

View 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.
*/
#ifndef ALIBABACLOUD_VCS_MODEL_DELETECORPGROUPREQUEST_H_
#define ALIBABACLOUD_VCS_MODEL_DELETECORPGROUPREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/vcs/VcsExport.h>
namespace AlibabaCloud
{
namespace Vcs
{
namespace Model
{
class ALIBABACLOUD_VCS_EXPORT DeleteCorpGroupRequest : public RpcServiceRequest
{
public:
DeleteCorpGroupRequest();
~DeleteCorpGroupRequest();
std::string getCorpId()const;
void setCorpId(const std::string& corpId);
std::string getGroupId()const;
void setGroupId(const std::string& groupId);
private:
std::string corpId_;
std::string groupId_;
};
}
}
}
#endif // !ALIBABACLOUD_VCS_MODEL_DELETECORPGROUPREQUEST_H_

View File

@@ -0,0 +1,55 @@
/*
* 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_VCS_MODEL_DELETECORPGROUPRESULT_H_
#define ALIBABACLOUD_VCS_MODEL_DELETECORPGROUPRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/vcs/VcsExport.h>
namespace AlibabaCloud
{
namespace Vcs
{
namespace Model
{
class ALIBABACLOUD_VCS_EXPORT DeleteCorpGroupResult : public ServiceResult
{
public:
DeleteCorpGroupResult();
explicit DeleteCorpGroupResult(const std::string &payload);
~DeleteCorpGroupResult();
std::string getMessage()const;
std::string getCode()const;
bool getSuccess()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
std::string code_;
bool success_;
};
}
}
}
#endif // !ALIBABACLOUD_VCS_MODEL_DELETECORPGROUPRESULT_H_

View File

@@ -0,0 +1,54 @@
/*
* 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_VCS_MODEL_LISTCORPGROUPSREQUEST_H_
#define ALIBABACLOUD_VCS_MODEL_LISTCORPGROUPSREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/vcs/VcsExport.h>
namespace AlibabaCloud
{
namespace Vcs
{
namespace Model
{
class ALIBABACLOUD_VCS_EXPORT ListCorpGroupsRequest : public RpcServiceRequest
{
public:
ListCorpGroupsRequest();
~ListCorpGroupsRequest();
std::string getCorpId()const;
void setCorpId(const std::string& corpId);
long getPageNumber()const;
void setPageNumber(long pageNumber);
long getPageSize()const;
void setPageSize(long pageSize);
private:
std::string corpId_;
long pageNumber_;
long pageSize_;
};
}
}
}
#endif // !ALIBABACLOUD_VCS_MODEL_LISTCORPGROUPSREQUEST_H_

View File

@@ -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_VCS_MODEL_LISTCORPGROUPSRESULT_H_
#define ALIBABACLOUD_VCS_MODEL_LISTCORPGROUPSRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/vcs/VcsExport.h>
namespace AlibabaCloud
{
namespace Vcs
{
namespace Model
{
class ALIBABACLOUD_VCS_EXPORT ListCorpGroupsResult : public ServiceResult
{
public:
struct Data
{
long totalCount;
long pageSize;
long totalPage;
long pageNumber;
std::vector<std::string> records;
};
ListCorpGroupsResult();
explicit ListCorpGroupsResult(const std::string &payload);
~ListCorpGroupsResult();
std::string getMessage()const;
Data getData()const;
std::string getCode()const;
protected:
void parse(const std::string &payload);
private:
std::string message_;
Data data_;
std::string code_;
};
}
}
}
#endif // !ALIBABACLOUD_VCS_MODEL_LISTCORPGROUPSRESULT_H_

View File

@@ -39,6 +39,7 @@ namespace AlibabaCloud
std::string corpId;
std::string description;
std::string parentCorpId;
std::string isvSubId;
std::string createDate;
std::string corpName;
std::string appName;

View File

@@ -35,6 +35,8 @@ namespace AlibabaCloud
UpdateCorpRequest();
~UpdateCorpRequest();
std::string getIsvSubId()const;
void setIsvSubId(const std::string& isvSubId);
std::string getCorpId()const;
void setCorpId(const std::string& corpId);
std::string getParentCorpId()const;
@@ -47,6 +49,7 @@ namespace AlibabaCloud
void setCorpName(const std::string& corpName);
private:
std::string isvSubId_;
std::string corpId_;
std::string parentCorpId_;
std::string description_;

View File

@@ -195,6 +195,42 @@ VcsClient::CreateCorpOutcomeCallable VcsClient::createCorpCallable(const CreateC
return task->get_future();
}
VcsClient::CreateCorpGroupOutcome VcsClient::createCorpGroup(const CreateCorpGroupRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return CreateCorpGroupOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return CreateCorpGroupOutcome(CreateCorpGroupResult(outcome.result()));
else
return CreateCorpGroupOutcome(outcome.error());
}
void VcsClient::createCorpGroupAsync(const CreateCorpGroupRequest& request, const CreateCorpGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, createCorpGroup(request), context);
};
asyncExecute(new Runnable(fn));
}
VcsClient::CreateCorpGroupOutcomeCallable VcsClient::createCorpGroupCallable(const CreateCorpGroupRequest &request) const
{
auto task = std::make_shared<std::packaged_task<CreateCorpGroupOutcome()>>(
[this, request]()
{
return this->createCorpGroup(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
VcsClient::CreateVideoComposeTaskOutcome VcsClient::createVideoComposeTask(const CreateVideoComposeTaskRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -267,6 +303,42 @@ VcsClient::CreateVideoSummaryTaskOutcomeCallable VcsClient::createVideoSummaryTa
return task->get_future();
}
VcsClient::DeleteCorpGroupOutcome VcsClient::deleteCorpGroup(const DeleteCorpGroupRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DeleteCorpGroupOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DeleteCorpGroupOutcome(DeleteCorpGroupResult(outcome.result()));
else
return DeleteCorpGroupOutcome(outcome.error());
}
void VcsClient::deleteCorpGroupAsync(const DeleteCorpGroupRequest& request, const DeleteCorpGroupAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, deleteCorpGroup(request), context);
};
asyncExecute(new Runnable(fn));
}
VcsClient::DeleteCorpGroupOutcomeCallable VcsClient::deleteCorpGroupCallable(const DeleteCorpGroupRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DeleteCorpGroupOutcome()>>(
[this, request]()
{
return this->deleteCorpGroup(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
VcsClient::DeleteDataSourceOutcome VcsClient::deleteDataSource(const DeleteDataSourceRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -843,6 +915,42 @@ VcsClient::ListBodyAlgorithmResultsOutcomeCallable VcsClient::listBodyAlgorithmR
return task->get_future();
}
VcsClient::ListCorpGroupsOutcome VcsClient::listCorpGroups(const ListCorpGroupsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return ListCorpGroupsOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return ListCorpGroupsOutcome(ListCorpGroupsResult(outcome.result()));
else
return ListCorpGroupsOutcome(outcome.error());
}
void VcsClient::listCorpGroupsAsync(const ListCorpGroupsRequest& request, const ListCorpGroupsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, listCorpGroups(request), context);
};
asyncExecute(new Runnable(fn));
}
VcsClient::ListCorpGroupsOutcomeCallable VcsClient::listCorpGroupsCallable(const ListCorpGroupsRequest &request) const
{
auto task = std::make_shared<std::packaged_task<ListCorpGroupsOutcome()>>(
[this, request]()
{
return this->listCorpGroups(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
VcsClient::ListCorpsOutcome VcsClient::listCorps(const ListCorpsRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -0,0 +1,62 @@
/*
* 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/vcs/model/CreateCorpGroupRequest.h>
using AlibabaCloud::Vcs::Model::CreateCorpGroupRequest;
CreateCorpGroupRequest::CreateCorpGroupRequest() :
RpcServiceRequest("vcs", "2020-05-15", "CreateCorpGroup")
{
setMethod(HttpRequest::Method::Post);
}
CreateCorpGroupRequest::~CreateCorpGroupRequest()
{}
std::string CreateCorpGroupRequest::getCorpId()const
{
return corpId_;
}
void CreateCorpGroupRequest::setCorpId(const std::string& corpId)
{
corpId_ = corpId;
setBodyParameter("CorpId", corpId);
}
std::string CreateCorpGroupRequest::getClientToken()const
{
return clientToken_;
}
void CreateCorpGroupRequest::setClientToken(const std::string& clientToken)
{
clientToken_ = clientToken;
setBodyParameter("ClientToken", clientToken);
}
std::string CreateCorpGroupRequest::getGroupId()const
{
return groupId_;
}
void CreateCorpGroupRequest::setGroupId(const std::string& groupId)
{
groupId_ = groupId;
setBodyParameter("GroupId", groupId);
}

View File

@@ -0,0 +1,65 @@
/*
* 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/vcs/model/CreateCorpGroupResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Vcs;
using namespace AlibabaCloud::Vcs::Model;
CreateCorpGroupResult::CreateCorpGroupResult() :
ServiceResult()
{}
CreateCorpGroupResult::CreateCorpGroupResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateCorpGroupResult::~CreateCorpGroupResult()
{}
void CreateCorpGroupResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string CreateCorpGroupResult::getMessage()const
{
return message_;
}
std::string CreateCorpGroupResult::getCode()const
{
return code_;
}
bool CreateCorpGroupResult::getSuccess()const
{
return success_;
}

View File

@@ -38,6 +38,17 @@ void CreateCorpRequest::setAlgorithmType(const std::string& algorithmType)
setBodyParameter("AlgorithmType", algorithmType);
}
std::string CreateCorpRequest::getIsvSubId()const
{
return isvSubId_;
}
void CreateCorpRequest::setIsvSubId(const std::string& isvSubId)
{
isvSubId_ = isvSubId;
setBodyParameter("IsvSubId", isvSubId);
}
std::string CreateCorpRequest::getParentCorpId()const
{
return parentCorpId_;

View 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/vcs/model/DeleteCorpGroupRequest.h>
using AlibabaCloud::Vcs::Model::DeleteCorpGroupRequest;
DeleteCorpGroupRequest::DeleteCorpGroupRequest() :
RpcServiceRequest("vcs", "2020-05-15", "DeleteCorpGroup")
{
setMethod(HttpRequest::Method::Post);
}
DeleteCorpGroupRequest::~DeleteCorpGroupRequest()
{}
std::string DeleteCorpGroupRequest::getCorpId()const
{
return corpId_;
}
void DeleteCorpGroupRequest::setCorpId(const std::string& corpId)
{
corpId_ = corpId;
setBodyParameter("CorpId", corpId);
}
std::string DeleteCorpGroupRequest::getGroupId()const
{
return groupId_;
}
void DeleteCorpGroupRequest::setGroupId(const std::string& groupId)
{
groupId_ = groupId;
setBodyParameter("GroupId", groupId);
}

View File

@@ -0,0 +1,65 @@
/*
* 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/vcs/model/DeleteCorpGroupResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Vcs;
using namespace AlibabaCloud::Vcs::Model;
DeleteCorpGroupResult::DeleteCorpGroupResult() :
ServiceResult()
{}
DeleteCorpGroupResult::DeleteCorpGroupResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DeleteCorpGroupResult::~DeleteCorpGroupResult()
{}
void DeleteCorpGroupResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Success"].isNull())
success_ = value["Success"].asString() == "true";
}
std::string DeleteCorpGroupResult::getMessage()const
{
return message_;
}
std::string DeleteCorpGroupResult::getCode()const
{
return code_;
}
bool DeleteCorpGroupResult::getSuccess()const
{
return success_;
}

View File

@@ -0,0 +1,62 @@
/*
* 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/vcs/model/ListCorpGroupsRequest.h>
using AlibabaCloud::Vcs::Model::ListCorpGroupsRequest;
ListCorpGroupsRequest::ListCorpGroupsRequest() :
RpcServiceRequest("vcs", "2020-05-15", "ListCorpGroups")
{
setMethod(HttpRequest::Method::Post);
}
ListCorpGroupsRequest::~ListCorpGroupsRequest()
{}
std::string ListCorpGroupsRequest::getCorpId()const
{
return corpId_;
}
void ListCorpGroupsRequest::setCorpId(const std::string& corpId)
{
corpId_ = corpId;
setBodyParameter("CorpId", corpId);
}
long ListCorpGroupsRequest::getPageNumber()const
{
return pageNumber_;
}
void ListCorpGroupsRequest::setPageNumber(long pageNumber)
{
pageNumber_ = pageNumber;
setBodyParameter("PageNumber", std::to_string(pageNumber));
}
long ListCorpGroupsRequest::getPageSize()const
{
return pageSize_;
}
void ListCorpGroupsRequest::setPageSize(long pageSize)
{
pageSize_ = pageSize;
setBodyParameter("PageSize", std::to_string(pageSize));
}

View File

@@ -0,0 +1,75 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include <alibabacloud/vcs/model/ListCorpGroupsResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Vcs;
using namespace AlibabaCloud::Vcs::Model;
ListCorpGroupsResult::ListCorpGroupsResult() :
ServiceResult()
{}
ListCorpGroupsResult::ListCorpGroupsResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
ListCorpGroupsResult::~ListCorpGroupsResult()
{}
void ListCorpGroupsResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["PageNumber"].isNull())
data_.pageNumber = std::stol(dataNode["PageNumber"].asString());
if(!dataNode["PageSize"].isNull())
data_.pageSize = std::stol(dataNode["PageSize"].asString());
if(!dataNode["TotalCount"].isNull())
data_.totalCount = std::stol(dataNode["TotalCount"].asString());
if(!dataNode["TotalPage"].isNull())
data_.totalPage = std::stol(dataNode["TotalPage"].asString());
auto allRecords = dataNode["Records"]["Record"];
for (auto value : allRecords)
data_.records.push_back(value.asString());
if(!value["Code"].isNull())
code_ = value["Code"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
}
std::string ListCorpGroupsResult::getMessage()const
{
return message_;
}
ListCorpGroupsResult::Data ListCorpGroupsResult::getData()const
{
return data_;
}
std::string ListCorpGroupsResult::getCode()const
{
return code_;
}

View File

@@ -66,6 +66,8 @@ void ListCorpsResult::parse(const std::string &payload)
recordObject.appName = dataNodeRecordsRecord["AppName"].asString();
if(!dataNodeRecordsRecord["DeviceCount"].isNull())
recordObject.deviceCount = std::stoi(dataNodeRecordsRecord["DeviceCount"].asString());
if(!dataNodeRecordsRecord["IsvSubId"].isNull())
recordObject.isvSubId = dataNodeRecordsRecord["IsvSubId"].asString();
data_.records.push_back(recordObject);
}
if(!value["Code"].isNull())

View File

@@ -27,6 +27,17 @@ UpdateCorpRequest::UpdateCorpRequest() :
UpdateCorpRequest::~UpdateCorpRequest()
{}
std::string UpdateCorpRequest::getIsvSubId()const
{
return isvSubId_;
}
void UpdateCorpRequest::setIsvSubId(const std::string& isvSubId)
{
isvSubId_ = isvSubId;
setBodyParameter("IsvSubId", isvSubId);
}
std::string UpdateCorpRequest::getCorpId()const
{
return corpId_;