Compare commits

..

4 Commits

Author SHA1 Message Date
sdk-team
5590f7808b Release UnderstandVideoContent. 2021-02-01 03:00:50 +00:00
sdk-team
df825120f3 Release SegmentGreenScreenVideo. 2021-02-01 02:41:37 +00:00
sdk-team
e0575e4c67 Release DetectVehicleIllegalParking DetectVehicleICongestion. 2021-02-01 02:22:23 +00:00
sdk-team
4b58532ad0 ConvertInstance. 2021-01-31 06:31:46 +00:00
44 changed files with 2077 additions and 34 deletions

View File

@@ -1,3 +1,15 @@
2021-02-01 Version: patch
- Release UnderstandVideoContent.
2021-02-01 Version: patch
- Release SegmentGreenScreenVideo.
2021-02-01 Version: patch
- Release DetectVehicleIllegalParking DetectVehicleICongestion.
2021-01-31 Version: patch
- ConvertInstance.
2021-01-30 Version: patch
- Update rate limit.

View File

@@ -119,6 +119,8 @@ set(hbase_public_header_model
include/alibabacloud/hbase/model/DescribeRestoreTablesResult.h
include/alibabacloud/hbase/model/DescribeSecurityGroupsRequest.h
include/alibabacloud/hbase/model/DescribeSecurityGroupsResult.h
include/alibabacloud/hbase/model/DescribeServerlessClusterRequest.h
include/alibabacloud/hbase/model/DescribeServerlessClusterResult.h
include/alibabacloud/hbase/model/DescribeSubDomainRequest.h
include/alibabacloud/hbase/model/DescribeSubDomainResult.h
include/alibabacloud/hbase/model/EnableHBaseueBackupRequest.h
@@ -304,6 +306,8 @@ set(hbase_src
src/model/DescribeRestoreTablesResult.cc
src/model/DescribeSecurityGroupsRequest.cc
src/model/DescribeSecurityGroupsResult.cc
src/model/DescribeServerlessClusterRequest.cc
src/model/DescribeServerlessClusterResult.cc
src/model/DescribeSubDomainRequest.cc
src/model/DescribeSubDomainResult.cc
src/model/EnableHBaseueBackupRequest.cc

View File

@@ -120,6 +120,8 @@
#include "model/DescribeRestoreTablesResult.h"
#include "model/DescribeSecurityGroupsRequest.h"
#include "model/DescribeSecurityGroupsResult.h"
#include "model/DescribeServerlessClusterRequest.h"
#include "model/DescribeServerlessClusterResult.h"
#include "model/DescribeSubDomainRequest.h"
#include "model/DescribeSubDomainResult.h"
#include "model/EnableHBaseueBackupRequest.h"
@@ -360,6 +362,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::DescribeSecurityGroupsResult> DescribeSecurityGroupsOutcome;
typedef std::future<DescribeSecurityGroupsOutcome> DescribeSecurityGroupsOutcomeCallable;
typedef std::function<void(const HBaseClient*, const Model::DescribeSecurityGroupsRequest&, const DescribeSecurityGroupsOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeSecurityGroupsAsyncHandler;
typedef Outcome<Error, Model::DescribeServerlessClusterResult> DescribeServerlessClusterOutcome;
typedef std::future<DescribeServerlessClusterOutcome> DescribeServerlessClusterOutcomeCallable;
typedef std::function<void(const HBaseClient*, const Model::DescribeServerlessClusterRequest&, const DescribeServerlessClusterOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeServerlessClusterAsyncHandler;
typedef Outcome<Error, Model::DescribeSubDomainResult> DescribeSubDomainOutcome;
typedef std::future<DescribeSubDomainOutcome> DescribeSubDomainOutcomeCallable;
typedef std::function<void(const HBaseClient*, const Model::DescribeSubDomainRequest&, const DescribeSubDomainOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DescribeSubDomainAsyncHandler;
@@ -638,6 +643,9 @@ namespace AlibabaCloud
DescribeSecurityGroupsOutcome describeSecurityGroups(const Model::DescribeSecurityGroupsRequest &request)const;
void describeSecurityGroupsAsync(const Model::DescribeSecurityGroupsRequest& request, const DescribeSecurityGroupsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DescribeSecurityGroupsOutcomeCallable describeSecurityGroupsCallable(const Model::DescribeSecurityGroupsRequest& request) const;
DescribeServerlessClusterOutcome describeServerlessCluster(const Model::DescribeServerlessClusterRequest &request)const;
void describeServerlessClusterAsync(const Model::DescribeServerlessClusterRequest& request, const DescribeServerlessClusterAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DescribeServerlessClusterOutcomeCallable describeServerlessClusterCallable(const Model::DescribeServerlessClusterRequest& request) const;
DescribeSubDomainOutcome describeSubDomain(const Model::DescribeSubDomainRequest &request)const;
void describeSubDomainAsync(const Model::DescribeSubDomainRequest& request, const DescribeSubDomainAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DescribeSubDomainOutcomeCallable describeSubDomainCallable(const Model::DescribeSubDomainRequest& request) const;

View File

@@ -35,17 +35,20 @@ namespace AlibabaCloud
ConvertInstanceRequest();
~ConvertInstanceRequest();
std::string getClusterId()const;
void setClusterId(const std::string& clusterId);
int getDuration()const;
void setDuration(int duration);
std::string getClusterId()const;
void setClusterId(const std::string& clusterId);
std::string getPricingCycle()const;
void setPricingCycle(const std::string& pricingCycle);
std::string getPayType()const;
void setPayType(const std::string& payType);
private:
std::string clusterId_;
int duration_;
std::string clusterId_;
std::string pricingCycle_;
std::string payType_;
};
}

View File

@@ -53,6 +53,8 @@ namespace AlibabaCloud
void setAutoRenewPeriod(int autoRenewPeriod);
int getPeriod()const;
void setPeriod(int period);
std::string getDiskType()const;
void setDiskType(const std::string& diskType);
std::string getVSwitchId()const;
void setVSwitchId(const std::string& vSwitchId);
std::string getPeriodUnit()const;
@@ -80,6 +82,7 @@ namespace AlibabaCloud
std::string engine_;
int autoRenewPeriod_;
int period_;
std::string diskType_;
std::string vSwitchId_;
std::string periodUnit_;
int serverlessCapability_;

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_HBASE_MODEL_DESCRIBESERVERLESSCLUSTERREQUEST_H_
#define ALIBABACLOUD_HBASE_MODEL_DESCRIBESERVERLESSCLUSTERREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/hbase/HBaseExport.h>
namespace AlibabaCloud
{
namespace HBase
{
namespace Model
{
class ALIBABACLOUD_HBASE_EXPORT DescribeServerlessClusterRequest : public RpcServiceRequest
{
public:
DescribeServerlessClusterRequest();
~DescribeServerlessClusterRequest();
std::string getClusterId()const;
void setClusterId(const std::string& clusterId);
std::string getZoneId()const;
void setZoneId(const std::string& zoneId);
private:
std::string clusterId_;
std::string zoneId_;
};
}
}
}
#endif // !ALIBABACLOUD_HBASE_MODEL_DESCRIBESERVERLESSCLUSTERREQUEST_H_

View File

@@ -0,0 +1,99 @@
/*
* 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_HBASE_MODEL_DESCRIBESERVERLESSCLUSTERRESULT_H_
#define ALIBABACLOUD_HBASE_MODEL_DESCRIBESERVERLESSCLUSTERRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/hbase/HBaseExport.h>
namespace AlibabaCloud
{
namespace HBase
{
namespace Model
{
class ALIBABACLOUD_HBASE_EXPORT DescribeServerlessClusterResult : public ServiceResult
{
public:
DescribeServerlessClusterResult();
explicit DescribeServerlessClusterResult(const std::string &payload);
~DescribeServerlessClusterResult();
std::string getUpdateStatus()const;
std::string getResourceGroupId()const;
std::string getOuterEndpoint()const;
std::string getAutoRenew()const;
std::string getReserverMinQpsNum()const;
std::string getIsDeletionProtection()const;
std::string getDiskSize()const;
std::string getReserverMaxQpsNum()const;
std::string getCuSize()const;
std::string getStatus()const;
std::string getInnerEndpoint()const;
std::string getMainVersion()const;
std::string getZoneId()const;
std::string getInstanceId()const;
std::string getHasUser()const;
std::string getVSwitchId()const;
std::string getCreateTime()const;
std::string getHaType()const;
std::string getClusterType()const;
std::string getLockMode()const;
std::string getPayType()const;
std::string getInstanceName()const;
std::string getVpcId()const;
std::string getRegionId()const;
std::string getExpireTime()const;
protected:
void parse(const std::string &payload);
private:
std::string updateStatus_;
std::string resourceGroupId_;
std::string outerEndpoint_;
std::string autoRenew_;
std::string reserverMinQpsNum_;
std::string isDeletionProtection_;
std::string diskSize_;
std::string reserverMaxQpsNum_;
std::string cuSize_;
std::string status_;
std::string innerEndpoint_;
std::string mainVersion_;
std::string zoneId_;
std::string instanceId_;
std::string hasUser_;
std::string vSwitchId_;
std::string createTime_;
std::string haType_;
std::string clusterType_;
std::string lockMode_;
std::string payType_;
std::string instanceName_;
std::string vpcId_;
std::string regionId_;
std::string expireTime_;
};
}
}
}
#endif // !ALIBABACLOUD_HBASE_MODEL_DESCRIBESERVERLESSCLUSTERRESULT_H_

View File

@@ -1815,6 +1815,42 @@ HBaseClient::DescribeSecurityGroupsOutcomeCallable HBaseClient::describeSecurity
return task->get_future();
}
HBaseClient::DescribeServerlessClusterOutcome HBaseClient::describeServerlessCluster(const DescribeServerlessClusterRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DescribeServerlessClusterOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DescribeServerlessClusterOutcome(DescribeServerlessClusterResult(outcome.result()));
else
return DescribeServerlessClusterOutcome(outcome.error());
}
void HBaseClient::describeServerlessClusterAsync(const DescribeServerlessClusterRequest& request, const DescribeServerlessClusterAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, describeServerlessCluster(request), context);
};
asyncExecute(new Runnable(fn));
}
HBaseClient::DescribeServerlessClusterOutcomeCallable HBaseClient::describeServerlessClusterCallable(const DescribeServerlessClusterRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DescribeServerlessClusterOutcome()>>(
[this, request]()
{
return this->describeServerlessCluster(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
HBaseClient::DescribeSubDomainOutcome HBaseClient::describeSubDomain(const DescribeSubDomainRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -27,17 +27,6 @@ ConvertInstanceRequest::ConvertInstanceRequest() :
ConvertInstanceRequest::~ConvertInstanceRequest()
{}
std::string ConvertInstanceRequest::getClusterId()const
{
return clusterId_;
}
void ConvertInstanceRequest::setClusterId(const std::string& clusterId)
{
clusterId_ = clusterId;
setParameter("ClusterId", clusterId);
}
int ConvertInstanceRequest::getDuration()const
{
return duration_;
@@ -49,6 +38,17 @@ void ConvertInstanceRequest::setDuration(int duration)
setParameter("Duration", std::to_string(duration));
}
std::string ConvertInstanceRequest::getClusterId()const
{
return clusterId_;
}
void ConvertInstanceRequest::setClusterId(const std::string& clusterId)
{
clusterId_ = clusterId;
setParameter("ClusterId", clusterId);
}
std::string ConvertInstanceRequest::getPricingCycle()const
{
return pricingCycle_;
@@ -60,3 +60,14 @@ void ConvertInstanceRequest::setPricingCycle(const std::string& pricingCycle)
setParameter("PricingCycle", pricingCycle);
}
std::string ConvertInstanceRequest::getPayType()const
{
return payType_;
}
void ConvertInstanceRequest::setPayType(const std::string& payType)
{
payType_ = payType;
setParameter("PayType", payType);
}

View File

@@ -126,6 +126,17 @@ void CreateServerlessClusterRequest::setPeriod(int period)
setParameter("Period", std::to_string(period));
}
std::string CreateServerlessClusterRequest::getDiskType()const
{
return diskType_;
}
void CreateServerlessClusterRequest::setDiskType(const std::string& diskType)
{
diskType_ = diskType;
setParameter("DiskType", diskType);
}
std::string CreateServerlessClusterRequest::getVSwitchId()const
{
return vSwitchId_;

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/hbase/model/DescribeServerlessClusterRequest.h>
using AlibabaCloud::HBase::Model::DescribeServerlessClusterRequest;
DescribeServerlessClusterRequest::DescribeServerlessClusterRequest() :
RpcServiceRequest("hbase", "2019-01-01", "DescribeServerlessCluster")
{
setMethod(HttpRequest::Method::Post);
}
DescribeServerlessClusterRequest::~DescribeServerlessClusterRequest()
{}
std::string DescribeServerlessClusterRequest::getClusterId()const
{
return clusterId_;
}
void DescribeServerlessClusterRequest::setClusterId(const std::string& clusterId)
{
clusterId_ = clusterId;
setParameter("ClusterId", clusterId);
}
std::string DescribeServerlessClusterRequest::getZoneId()const
{
return zoneId_;
}
void DescribeServerlessClusterRequest::setZoneId(const std::string& zoneId)
{
zoneId_ = zoneId;
setParameter("ZoneId", zoneId);
}

View File

@@ -0,0 +1,219 @@
/*
* 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/hbase/model/DescribeServerlessClusterResult.h>
#include <json/json.h>
using namespace AlibabaCloud::HBase;
using namespace AlibabaCloud::HBase::Model;
DescribeServerlessClusterResult::DescribeServerlessClusterResult() :
ServiceResult()
{}
DescribeServerlessClusterResult::DescribeServerlessClusterResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DescribeServerlessClusterResult::~DescribeServerlessClusterResult()
{}
void DescribeServerlessClusterResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["VpcId"].isNull())
vpcId_ = value["VpcId"].asString();
if(!value["VSwitchId"].isNull())
vSwitchId_ = value["VSwitchId"].asString();
if(!value["InstanceId"].isNull())
instanceId_ = value["InstanceId"].asString();
if(!value["InstanceName"].isNull())
instanceName_ = value["InstanceName"].asString();
if(!value["MainVersion"].isNull())
mainVersion_ = value["MainVersion"].asString();
if(!value["Status"].isNull())
status_ = value["Status"].asString();
if(!value["ClusterType"].isNull())
clusterType_ = value["ClusterType"].asString();
if(!value["HasUser"].isNull())
hasUser_ = value["HasUser"].asString();
if(!value["LockMode"].isNull())
lockMode_ = value["LockMode"].asString();
if(!value["HaType"].isNull())
haType_ = value["HaType"].asString();
if(!value["PayType"].isNull())
payType_ = value["PayType"].asString();
if(!value["InnerEndpoint"].isNull())
innerEndpoint_ = value["InnerEndpoint"].asString();
if(!value["OuterEndpoint"].isNull())
outerEndpoint_ = value["OuterEndpoint"].asString();
if(!value["ReserverMinQpsNum"].isNull())
reserverMinQpsNum_ = value["ReserverMinQpsNum"].asString();
if(!value["ReserverMaxQpsNum"].isNull())
reserverMaxQpsNum_ = value["ReserverMaxQpsNum"].asString();
if(!value["AutoRenew"].isNull())
autoRenew_ = value["AutoRenew"].asString();
if(!value["CreateTime"].isNull())
createTime_ = value["CreateTime"].asString();
if(!value["ExpireTime"].isNull())
expireTime_ = value["ExpireTime"].asString();
if(!value["RegionId"].isNull())
regionId_ = value["RegionId"].asString();
if(!value["ZoneId"].isNull())
zoneId_ = value["ZoneId"].asString();
if(!value["UpdateStatus"].isNull())
updateStatus_ = value["UpdateStatus"].asString();
if(!value["IsDeletionProtection"].isNull())
isDeletionProtection_ = value["IsDeletionProtection"].asString();
if(!value["DiskSize"].isNull())
diskSize_ = value["DiskSize"].asString();
if(!value["CuSize"].isNull())
cuSize_ = value["CuSize"].asString();
if(!value["ResourceGroupId"].isNull())
resourceGroupId_ = value["ResourceGroupId"].asString();
}
std::string DescribeServerlessClusterResult::getUpdateStatus()const
{
return updateStatus_;
}
std::string DescribeServerlessClusterResult::getResourceGroupId()const
{
return resourceGroupId_;
}
std::string DescribeServerlessClusterResult::getOuterEndpoint()const
{
return outerEndpoint_;
}
std::string DescribeServerlessClusterResult::getAutoRenew()const
{
return autoRenew_;
}
std::string DescribeServerlessClusterResult::getReserverMinQpsNum()const
{
return reserverMinQpsNum_;
}
std::string DescribeServerlessClusterResult::getIsDeletionProtection()const
{
return isDeletionProtection_;
}
std::string DescribeServerlessClusterResult::getDiskSize()const
{
return diskSize_;
}
std::string DescribeServerlessClusterResult::getReserverMaxQpsNum()const
{
return reserverMaxQpsNum_;
}
std::string DescribeServerlessClusterResult::getCuSize()const
{
return cuSize_;
}
std::string DescribeServerlessClusterResult::getStatus()const
{
return status_;
}
std::string DescribeServerlessClusterResult::getInnerEndpoint()const
{
return innerEndpoint_;
}
std::string DescribeServerlessClusterResult::getMainVersion()const
{
return mainVersion_;
}
std::string DescribeServerlessClusterResult::getZoneId()const
{
return zoneId_;
}
std::string DescribeServerlessClusterResult::getInstanceId()const
{
return instanceId_;
}
std::string DescribeServerlessClusterResult::getHasUser()const
{
return hasUser_;
}
std::string DescribeServerlessClusterResult::getVSwitchId()const
{
return vSwitchId_;
}
std::string DescribeServerlessClusterResult::getCreateTime()const
{
return createTime_;
}
std::string DescribeServerlessClusterResult::getHaType()const
{
return haType_;
}
std::string DescribeServerlessClusterResult::getClusterType()const
{
return clusterType_;
}
std::string DescribeServerlessClusterResult::getLockMode()const
{
return lockMode_;
}
std::string DescribeServerlessClusterResult::getPayType()const
{
return payType_;
}
std::string DescribeServerlessClusterResult::getInstanceName()const
{
return instanceName_;
}
std::string DescribeServerlessClusterResult::getVpcId()const
{
return vpcId_;
}
std::string DescribeServerlessClusterResult::getRegionId()const
{
return regionId_;
}
std::string DescribeServerlessClusterResult::getExpireTime()const
{
return expireTime_;
}

View File

@@ -23,6 +23,8 @@ set(objectdet_public_header
set(objectdet_public_header_model
include/alibabacloud/objectdet/model/ClassifyVehicleInsuranceRequest.h
include/alibabacloud/objectdet/model/ClassifyVehicleInsuranceResult.h
include/alibabacloud/objectdet/model/DetectIPCObjectRequest.h
include/alibabacloud/objectdet/model/DetectIPCObjectResult.h
include/alibabacloud/objectdet/model/DetectMainBodyRequest.h
include/alibabacloud/objectdet/model/DetectMainBodyResult.h
include/alibabacloud/objectdet/model/DetectObjectRequest.h
@@ -31,6 +33,10 @@ set(objectdet_public_header_model
include/alibabacloud/objectdet/model/DetectTransparentImageResult.h
include/alibabacloud/objectdet/model/DetectVehicleRequest.h
include/alibabacloud/objectdet/model/DetectVehicleResult.h
include/alibabacloud/objectdet/model/DetectVehicleICongestionRequest.h
include/alibabacloud/objectdet/model/DetectVehicleICongestionResult.h
include/alibabacloud/objectdet/model/DetectVehicleIllegalParkingRequest.h
include/alibabacloud/objectdet/model/DetectVehicleIllegalParkingResult.h
include/alibabacloud/objectdet/model/DetectWhiteBaseImageRequest.h
include/alibabacloud/objectdet/model/DetectWhiteBaseImageResult.h
include/alibabacloud/objectdet/model/GenerateVehicleRepairPlanRequest.h
@@ -48,6 +54,8 @@ set(objectdet_src
src/ObjectdetClient.cc
src/model/ClassifyVehicleInsuranceRequest.cc
src/model/ClassifyVehicleInsuranceResult.cc
src/model/DetectIPCObjectRequest.cc
src/model/DetectIPCObjectResult.cc
src/model/DetectMainBodyRequest.cc
src/model/DetectMainBodyResult.cc
src/model/DetectObjectRequest.cc
@@ -56,6 +64,10 @@ set(objectdet_src
src/model/DetectTransparentImageResult.cc
src/model/DetectVehicleRequest.cc
src/model/DetectVehicleResult.cc
src/model/DetectVehicleICongestionRequest.cc
src/model/DetectVehicleICongestionResult.cc
src/model/DetectVehicleIllegalParkingRequest.cc
src/model/DetectVehicleIllegalParkingResult.cc
src/model/DetectWhiteBaseImageRequest.cc
src/model/DetectWhiteBaseImageResult.cc
src/model/GenerateVehicleRepairPlanRequest.cc

View File

@@ -24,6 +24,8 @@
#include "ObjectdetExport.h"
#include "model/ClassifyVehicleInsuranceRequest.h"
#include "model/ClassifyVehicleInsuranceResult.h"
#include "model/DetectIPCObjectRequest.h"
#include "model/DetectIPCObjectResult.h"
#include "model/DetectMainBodyRequest.h"
#include "model/DetectMainBodyResult.h"
#include "model/DetectObjectRequest.h"
@@ -32,6 +34,10 @@
#include "model/DetectTransparentImageResult.h"
#include "model/DetectVehicleRequest.h"
#include "model/DetectVehicleResult.h"
#include "model/DetectVehicleICongestionRequest.h"
#include "model/DetectVehicleICongestionResult.h"
#include "model/DetectVehicleIllegalParkingRequest.h"
#include "model/DetectVehicleIllegalParkingResult.h"
#include "model/DetectWhiteBaseImageRequest.h"
#include "model/DetectWhiteBaseImageResult.h"
#include "model/GenerateVehicleRepairPlanRequest.h"
@@ -56,6 +62,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::ClassifyVehicleInsuranceResult> ClassifyVehicleInsuranceOutcome;
typedef std::future<ClassifyVehicleInsuranceOutcome> ClassifyVehicleInsuranceOutcomeCallable;
typedef std::function<void(const ObjectdetClient*, const Model::ClassifyVehicleInsuranceRequest&, const ClassifyVehicleInsuranceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ClassifyVehicleInsuranceAsyncHandler;
typedef Outcome<Error, Model::DetectIPCObjectResult> DetectIPCObjectOutcome;
typedef std::future<DetectIPCObjectOutcome> DetectIPCObjectOutcomeCallable;
typedef std::function<void(const ObjectdetClient*, const Model::DetectIPCObjectRequest&, const DetectIPCObjectOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DetectIPCObjectAsyncHandler;
typedef Outcome<Error, Model::DetectMainBodyResult> DetectMainBodyOutcome;
typedef std::future<DetectMainBodyOutcome> DetectMainBodyOutcomeCallable;
typedef std::function<void(const ObjectdetClient*, const Model::DetectMainBodyRequest&, const DetectMainBodyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DetectMainBodyAsyncHandler;
@@ -68,6 +77,12 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::DetectVehicleResult> DetectVehicleOutcome;
typedef std::future<DetectVehicleOutcome> DetectVehicleOutcomeCallable;
typedef std::function<void(const ObjectdetClient*, const Model::DetectVehicleRequest&, const DetectVehicleOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DetectVehicleAsyncHandler;
typedef Outcome<Error, Model::DetectVehicleICongestionResult> DetectVehicleICongestionOutcome;
typedef std::future<DetectVehicleICongestionOutcome> DetectVehicleICongestionOutcomeCallable;
typedef std::function<void(const ObjectdetClient*, const Model::DetectVehicleICongestionRequest&, const DetectVehicleICongestionOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DetectVehicleICongestionAsyncHandler;
typedef Outcome<Error, Model::DetectVehicleIllegalParkingResult> DetectVehicleIllegalParkingOutcome;
typedef std::future<DetectVehicleIllegalParkingOutcome> DetectVehicleIllegalParkingOutcomeCallable;
typedef std::function<void(const ObjectdetClient*, const Model::DetectVehicleIllegalParkingRequest&, const DetectVehicleIllegalParkingOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DetectVehicleIllegalParkingAsyncHandler;
typedef Outcome<Error, Model::DetectWhiteBaseImageResult> DetectWhiteBaseImageOutcome;
typedef std::future<DetectWhiteBaseImageOutcome> DetectWhiteBaseImageOutcomeCallable;
typedef std::function<void(const ObjectdetClient*, const Model::DetectWhiteBaseImageRequest&, const DetectWhiteBaseImageOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DetectWhiteBaseImageAsyncHandler;
@@ -94,6 +109,9 @@ namespace AlibabaCloud
ClassifyVehicleInsuranceOutcome classifyVehicleInsurance(const Model::ClassifyVehicleInsuranceRequest &request)const;
void classifyVehicleInsuranceAsync(const Model::ClassifyVehicleInsuranceRequest& request, const ClassifyVehicleInsuranceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
ClassifyVehicleInsuranceOutcomeCallable classifyVehicleInsuranceCallable(const Model::ClassifyVehicleInsuranceRequest& request) const;
DetectIPCObjectOutcome detectIPCObject(const Model::DetectIPCObjectRequest &request)const;
void detectIPCObjectAsync(const Model::DetectIPCObjectRequest& request, const DetectIPCObjectAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DetectIPCObjectOutcomeCallable detectIPCObjectCallable(const Model::DetectIPCObjectRequest& request) const;
DetectMainBodyOutcome detectMainBody(const Model::DetectMainBodyRequest &request)const;
void detectMainBodyAsync(const Model::DetectMainBodyRequest& request, const DetectMainBodyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DetectMainBodyOutcomeCallable detectMainBodyCallable(const Model::DetectMainBodyRequest& request) const;
@@ -106,6 +124,12 @@ namespace AlibabaCloud
DetectVehicleOutcome detectVehicle(const Model::DetectVehicleRequest &request)const;
void detectVehicleAsync(const Model::DetectVehicleRequest& request, const DetectVehicleAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DetectVehicleOutcomeCallable detectVehicleCallable(const Model::DetectVehicleRequest& request) const;
DetectVehicleICongestionOutcome detectVehicleICongestion(const Model::DetectVehicleICongestionRequest &request)const;
void detectVehicleICongestionAsync(const Model::DetectVehicleICongestionRequest& request, const DetectVehicleICongestionAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DetectVehicleICongestionOutcomeCallable detectVehicleICongestionCallable(const Model::DetectVehicleICongestionRequest& request) const;
DetectVehicleIllegalParkingOutcome detectVehicleIllegalParking(const Model::DetectVehicleIllegalParkingRequest &request)const;
void detectVehicleIllegalParkingAsync(const Model::DetectVehicleIllegalParkingRequest& request, const DetectVehicleIllegalParkingAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DetectVehicleIllegalParkingOutcomeCallable detectVehicleIllegalParkingCallable(const Model::DetectVehicleIllegalParkingRequest& request) const;
DetectWhiteBaseImageOutcome detectWhiteBaseImage(const Model::DetectWhiteBaseImageRequest &request)const;
void detectWhiteBaseImageAsync(const Model::DetectWhiteBaseImageRequest& request, const DetectWhiteBaseImageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DetectWhiteBaseImageOutcomeCallable detectWhiteBaseImageCallable(const Model::DetectWhiteBaseImageRequest& request) const;

View File

@@ -0,0 +1,48 @@
/*
* 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_OBJECTDET_MODEL_DETECTIPCOBJECTREQUEST_H_
#define ALIBABACLOUD_OBJECTDET_MODEL_DETECTIPCOBJECTREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/objectdet/ObjectdetExport.h>
namespace AlibabaCloud
{
namespace Objectdet
{
namespace Model
{
class ALIBABACLOUD_OBJECTDET_EXPORT DetectIPCObjectRequest : public RpcServiceRequest
{
public:
DetectIPCObjectRequest();
~DetectIPCObjectRequest();
std::string getImageURL()const;
void setImageURL(const std::string& imageURL);
private:
std::string imageURL_;
};
}
}
}
#endif // !ALIBABACLOUD_OBJECTDET_MODEL_DETECTIPCOBJECTREQUEST_H_

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.
*/
#ifndef ALIBABACLOUD_OBJECTDET_MODEL_DETECTIPCOBJECTRESULT_H_
#define ALIBABACLOUD_OBJECTDET_MODEL_DETECTIPCOBJECTRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/objectdet/ObjectdetExport.h>
namespace AlibabaCloud
{
namespace Objectdet
{
namespace Model
{
class ALIBABACLOUD_OBJECTDET_EXPORT DetectIPCObjectResult : public ServiceResult
{
public:
struct Data
{
struct Element
{
float score;
std::string type;
std::vector<std::string> box;
};
std::vector<Element> elements;
};
DetectIPCObjectResult();
explicit DetectIPCObjectResult(const std::string &payload);
~DetectIPCObjectResult();
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_OBJECTDET_MODEL_DETECTIPCOBJECTRESULT_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_OBJECTDET_MODEL_DETECTVEHICLEICONGESTIONREQUEST_H_
#define ALIBABACLOUD_OBJECTDET_MODEL_DETECTVEHICLEICONGESTIONREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/objectdet/ObjectdetExport.h>
namespace AlibabaCloud
{
namespace Objectdet
{
namespace Model
{
class ALIBABACLOUD_OBJECTDET_EXPORT DetectVehicleICongestionRequest : public RpcServiceRequest
{
public:
DetectVehicleICongestionRequest();
~DetectVehicleICongestionRequest();
Array getRoadRegions()const;
void setRoadRegions(const Array& roadRegions);
Array getPreRegionIntersectFeatures()const;
void setPreRegionIntersectFeatures(const Array& preRegionIntersectFeatures);
std::string getImageURL()const;
void setImageURL(const std::string& imageURL);
private:
Array roadRegions_;
Array preRegionIntersectFeatures_;
std::string imageURL_;
};
}
}
}
#endif // !ALIBABACLOUD_OBJECTDET_MODEL_DETECTVEHICLEICONGESTIONREQUEST_H_

View File

@@ -0,0 +1,87 @@
/*
* 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_OBJECTDET_MODEL_DETECTVEHICLEICONGESTIONRESULT_H_
#define ALIBABACLOUD_OBJECTDET_MODEL_DETECTVEHICLEICONGESTIONRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/objectdet/ObjectdetExport.h>
namespace AlibabaCloud
{
namespace Objectdet
{
namespace Model
{
class ALIBABACLOUD_OBJECTDET_EXPORT DetectVehicleICongestionResult : public ServiceResult
{
public:
struct Data
{
struct RegionIntersectFeaturesItem
{
std::vector<std::string> features;
};
struct RegionIntersectsItem
{
std::vector<std::string> ids;
};
struct RegionIntersectMatchedItem
{
std::vector<std::string> ids1;
};
struct Element
{
struct BoxesItem
{
long left;
long top;
long right;
long bottom;
};
std::string typeName;
float score;
std::vector<Element::BoxesItem> boxes;
};
std::vector<RegionIntersectFeaturesItem> regionIntersectFeatures;
std::vector<RegionIntersectsItem> regionIntersects;
std::vector<RegionIntersectMatchedItem> regionIntersectMatched;
std::vector<Element> elements;
};
DetectVehicleICongestionResult();
explicit DetectVehicleICongestionResult(const std::string &payload);
~DetectVehicleICongestionResult();
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_OBJECTDET_MODEL_DETECTVEHICLEICONGESTIONRESULT_H_

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_OBJECTDET_MODEL_DETECTVEHICLEILLEGALPARKINGREQUEST_H_
#define ALIBABACLOUD_OBJECTDET_MODEL_DETECTVEHICLEILLEGALPARKINGREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/objectdet/ObjectdetExport.h>
namespace AlibabaCloud
{
namespace Objectdet
{
namespace Model
{
class ALIBABACLOUD_OBJECTDET_EXPORT DetectVehicleIllegalParkingRequest : public RpcServiceRequest
{
public:
DetectVehicleIllegalParkingRequest();
~DetectVehicleIllegalParkingRequest();
Array getRoadRegions()const;
void setRoadRegions(const Array& roadRegions);
std::string getImageURL()const;
void setImageURL(const std::string& imageURL);
private:
Array roadRegions_;
std::string imageURL_;
};
}
}
}
#endif // !ALIBABACLOUD_OBJECTDET_MODEL_DETECTVEHICLEILLEGALPARKINGREQUEST_H_

View File

@@ -0,0 +1,77 @@
/*
* 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_OBJECTDET_MODEL_DETECTVEHICLEILLEGALPARKINGRESULT_H_
#define ALIBABACLOUD_OBJECTDET_MODEL_DETECTVEHICLEILLEGALPARKINGRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/objectdet/ObjectdetExport.h>
namespace AlibabaCloud
{
namespace Objectdet
{
namespace Model
{
class ALIBABACLOUD_OBJECTDET_EXPORT DetectVehicleIllegalParkingResult : public ServiceResult
{
public:
struct Data
{
struct RegionIntersect
{
std::vector<std::string> ids;
};
struct Element
{
struct BoxesItem
{
long left;
long top;
long right;
long bottom;
};
std::string typeName;
float score;
std::vector<Element::BoxesItem> boxes;
};
std::vector<RegionIntersect> regionIntersects;
std::vector<Element> elements;
};
DetectVehicleIllegalParkingResult();
explicit DetectVehicleIllegalParkingResult(const std::string &payload);
~DetectVehicleIllegalParkingResult();
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_OBJECTDET_MODEL_DETECTVEHICLEILLEGALPARKINGRESULT_H_

View File

@@ -87,6 +87,42 @@ ObjectdetClient::ClassifyVehicleInsuranceOutcomeCallable ObjectdetClient::classi
return task->get_future();
}
ObjectdetClient::DetectIPCObjectOutcome ObjectdetClient::detectIPCObject(const DetectIPCObjectRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DetectIPCObjectOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DetectIPCObjectOutcome(DetectIPCObjectResult(outcome.result()));
else
return DetectIPCObjectOutcome(outcome.error());
}
void ObjectdetClient::detectIPCObjectAsync(const DetectIPCObjectRequest& request, const DetectIPCObjectAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, detectIPCObject(request), context);
};
asyncExecute(new Runnable(fn));
}
ObjectdetClient::DetectIPCObjectOutcomeCallable ObjectdetClient::detectIPCObjectCallable(const DetectIPCObjectRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DetectIPCObjectOutcome()>>(
[this, request]()
{
return this->detectIPCObject(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ObjectdetClient::DetectMainBodyOutcome ObjectdetClient::detectMainBody(const DetectMainBodyRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -231,6 +267,78 @@ ObjectdetClient::DetectVehicleOutcomeCallable ObjectdetClient::detectVehicleCall
return task->get_future();
}
ObjectdetClient::DetectVehicleICongestionOutcome ObjectdetClient::detectVehicleICongestion(const DetectVehicleICongestionRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DetectVehicleICongestionOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DetectVehicleICongestionOutcome(DetectVehicleICongestionResult(outcome.result()));
else
return DetectVehicleICongestionOutcome(outcome.error());
}
void ObjectdetClient::detectVehicleICongestionAsync(const DetectVehicleICongestionRequest& request, const DetectVehicleICongestionAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, detectVehicleICongestion(request), context);
};
asyncExecute(new Runnable(fn));
}
ObjectdetClient::DetectVehicleICongestionOutcomeCallable ObjectdetClient::detectVehicleICongestionCallable(const DetectVehicleICongestionRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DetectVehicleICongestionOutcome()>>(
[this, request]()
{
return this->detectVehicleICongestion(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ObjectdetClient::DetectVehicleIllegalParkingOutcome ObjectdetClient::detectVehicleIllegalParking(const DetectVehicleIllegalParkingRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return DetectVehicleIllegalParkingOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return DetectVehicleIllegalParkingOutcome(DetectVehicleIllegalParkingResult(outcome.result()));
else
return DetectVehicleIllegalParkingOutcome(outcome.error());
}
void ObjectdetClient::detectVehicleIllegalParkingAsync(const DetectVehicleIllegalParkingRequest& request, const DetectVehicleIllegalParkingAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, detectVehicleIllegalParking(request), context);
};
asyncExecute(new Runnable(fn));
}
ObjectdetClient::DetectVehicleIllegalParkingOutcomeCallable ObjectdetClient::detectVehicleIllegalParkingCallable(const DetectVehicleIllegalParkingRequest &request) const
{
auto task = std::make_shared<std::packaged_task<DetectVehicleIllegalParkingOutcome()>>(
[this, request]()
{
return this->detectVehicleIllegalParking(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ObjectdetClient::DetectWhiteBaseImageOutcome ObjectdetClient::detectWhiteBaseImage(const DetectWhiteBaseImageRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -0,0 +1,40 @@
/*
* 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/objectdet/model/DetectIPCObjectRequest.h>
using AlibabaCloud::Objectdet::Model::DetectIPCObjectRequest;
DetectIPCObjectRequest::DetectIPCObjectRequest() :
RpcServiceRequest("objectdet", "2019-12-30", "DetectIPCObject")
{
setMethod(HttpRequest::Method::Post);
}
DetectIPCObjectRequest::~DetectIPCObjectRequest()
{}
std::string DetectIPCObjectRequest::getImageURL()const
{
return imageURL_;
}
void DetectIPCObjectRequest::setImageURL(const std::string& imageURL)
{
imageURL_ = imageURL;
setBodyParameter("ImageURL", imageURL);
}

View File

@@ -0,0 +1,77 @@
/*
* 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/objectdet/model/DetectIPCObjectResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Objectdet;
using namespace AlibabaCloud::Objectdet::Model;
DetectIPCObjectResult::DetectIPCObjectResult() :
ServiceResult()
{}
DetectIPCObjectResult::DetectIPCObjectResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DetectIPCObjectResult::~DetectIPCObjectResult()
{}
void DetectIPCObjectResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
auto allElementsNode = dataNode["Elements"]["Element"];
for (auto dataNodeElementsElement : allElementsNode)
{
Data::Element elementObject;
if(!dataNodeElementsElement["Score"].isNull())
elementObject.score = std::stof(dataNodeElementsElement["Score"].asString());
if(!dataNodeElementsElement["Type"].isNull())
elementObject.type = dataNodeElementsElement["Type"].asString();
auto allBox = value["Box"]["Box"];
for (auto value : allBox)
elementObject.box.push_back(value.asString());
data_.elements.push_back(elementObject);
}
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
}
std::string DetectIPCObjectResult::getMessage()const
{
return message_;
}
DetectIPCObjectResult::Data DetectIPCObjectResult::getData()const
{
return data_;
}
std::string DetectIPCObjectResult::getCode()const
{
return code_;
}

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/objectdet/model/DetectVehicleICongestionRequest.h>
using AlibabaCloud::Objectdet::Model::DetectVehicleICongestionRequest;
DetectVehicleICongestionRequest::DetectVehicleICongestionRequest() :
RpcServiceRequest("objectdet", "2019-12-30", "DetectVehicleICongestion")
{
setMethod(HttpRequest::Method::Post);
}
DetectVehicleICongestionRequest::~DetectVehicleICongestionRequest()
{}
Array DetectVehicleICongestionRequest::getRoadRegions()const
{
return roadRegions_;
}
void DetectVehicleICongestionRequest::setRoadRegions(const Array& roadRegions)
{
roadRegions_ = roadRegions;
setBodyParameter("RoadRegions", std::to_string(roadRegions));
}
Array DetectVehicleICongestionRequest::getPreRegionIntersectFeatures()const
{
return preRegionIntersectFeatures_;
}
void DetectVehicleICongestionRequest::setPreRegionIntersectFeatures(const Array& preRegionIntersectFeatures)
{
preRegionIntersectFeatures_ = preRegionIntersectFeatures;
setBodyParameter("PreRegionIntersectFeatures", std::to_string(preRegionIntersectFeatures));
}
std::string DetectVehicleICongestionRequest::getImageURL()const
{
return imageURL_;
}
void DetectVehicleICongestionRequest::setImageURL(const std::string& imageURL)
{
imageURL_ = imageURL;
setBodyParameter("ImageURL", imageURL);
}

View File

@@ -0,0 +1,115 @@
/*
* 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/objectdet/model/DetectVehicleICongestionResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Objectdet;
using namespace AlibabaCloud::Objectdet::Model;
DetectVehicleICongestionResult::DetectVehicleICongestionResult() :
ServiceResult()
{}
DetectVehicleICongestionResult::DetectVehicleICongestionResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DetectVehicleICongestionResult::~DetectVehicleICongestionResult()
{}
void DetectVehicleICongestionResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
auto allRegionIntersectFeaturesNode = dataNode["RegionIntersectFeatures"]["RegionIntersectFeaturesItem"];
for (auto dataNodeRegionIntersectFeaturesRegionIntersectFeaturesItem : allRegionIntersectFeaturesNode)
{
Data::RegionIntersectFeaturesItem regionIntersectFeaturesItemObject;
auto allFeatures = value["Features"]["Features"];
for (auto value : allFeatures)
regionIntersectFeaturesItemObject.features.push_back(value.asString());
data_.regionIntersectFeatures.push_back(regionIntersectFeaturesItemObject);
}
auto allRegionIntersectsNode = dataNode["RegionIntersects"]["RegionIntersectsItem"];
for (auto dataNodeRegionIntersectsRegionIntersectsItem : allRegionIntersectsNode)
{
Data::RegionIntersectsItem regionIntersectsItemObject;
auto allIds = value["Ids"]["Ids"];
for (auto value : allIds)
regionIntersectsItemObject.ids.push_back(value.asString());
data_.regionIntersects.push_back(regionIntersectsItemObject);
}
auto allRegionIntersectMatchedNode = dataNode["RegionIntersectMatched"]["RegionIntersectMatchedItem"];
for (auto dataNodeRegionIntersectMatchedRegionIntersectMatchedItem : allRegionIntersectMatchedNode)
{
Data::RegionIntersectMatchedItem regionIntersectMatchedItemObject;
auto allIds1 = value["Ids"]["Ids"];
for (auto value : allIds1)
regionIntersectMatchedItemObject.ids1.push_back(value.asString());
data_.regionIntersectMatched.push_back(regionIntersectMatchedItemObject);
}
auto allElementsNode = dataNode["Elements"]["Element"];
for (auto dataNodeElementsElement : allElementsNode)
{
Data::Element elementObject;
if(!dataNodeElementsElement["TypeName"].isNull())
elementObject.typeName = dataNodeElementsElement["TypeName"].asString();
if(!dataNodeElementsElement["Score"].isNull())
elementObject.score = std::stof(dataNodeElementsElement["Score"].asString());
auto allBoxesNode = dataNodeElementsElement["Boxes"]["BoxesItem"];
for (auto dataNodeElementsElementBoxesBoxesItem : allBoxesNode)
{
Data::Element::BoxesItem boxesObject;
if(!dataNodeElementsElementBoxesBoxesItem["Left"].isNull())
boxesObject.left = std::stol(dataNodeElementsElementBoxesBoxesItem["Left"].asString());
if(!dataNodeElementsElementBoxesBoxesItem["Top"].isNull())
boxesObject.top = std::stol(dataNodeElementsElementBoxesBoxesItem["Top"].asString());
if(!dataNodeElementsElementBoxesBoxesItem["Right"].isNull())
boxesObject.right = std::stol(dataNodeElementsElementBoxesBoxesItem["Right"].asString());
if(!dataNodeElementsElementBoxesBoxesItem["Bottom"].isNull())
boxesObject.bottom = std::stol(dataNodeElementsElementBoxesBoxesItem["Bottom"].asString());
elementObject.boxes.push_back(boxesObject);
}
data_.elements.push_back(elementObject);
}
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
}
std::string DetectVehicleICongestionResult::getMessage()const
{
return message_;
}
DetectVehicleICongestionResult::Data DetectVehicleICongestionResult::getData()const
{
return data_;
}
std::string DetectVehicleICongestionResult::getCode()const
{
return code_;
}

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/objectdet/model/DetectVehicleIllegalParkingRequest.h>
using AlibabaCloud::Objectdet::Model::DetectVehicleIllegalParkingRequest;
DetectVehicleIllegalParkingRequest::DetectVehicleIllegalParkingRequest() :
RpcServiceRequest("objectdet", "2019-12-30", "DetectVehicleIllegalParking")
{
setMethod(HttpRequest::Method::Post);
}
DetectVehicleIllegalParkingRequest::~DetectVehicleIllegalParkingRequest()
{}
Array DetectVehicleIllegalParkingRequest::getRoadRegions()const
{
return roadRegions_;
}
void DetectVehicleIllegalParkingRequest::setRoadRegions(const Array& roadRegions)
{
roadRegions_ = roadRegions;
setBodyParameter("RoadRegions", std::to_string(roadRegions));
}
std::string DetectVehicleIllegalParkingRequest::getImageURL()const
{
return imageURL_;
}
void DetectVehicleIllegalParkingRequest::setImageURL(const std::string& imageURL)
{
imageURL_ = imageURL;
setBodyParameter("ImageURL", imageURL);
}

View File

@@ -0,0 +1,97 @@
/*
* 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/objectdet/model/DetectVehicleIllegalParkingResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Objectdet;
using namespace AlibabaCloud::Objectdet::Model;
DetectVehicleIllegalParkingResult::DetectVehicleIllegalParkingResult() :
ServiceResult()
{}
DetectVehicleIllegalParkingResult::DetectVehicleIllegalParkingResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
DetectVehicleIllegalParkingResult::~DetectVehicleIllegalParkingResult()
{}
void DetectVehicleIllegalParkingResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
auto allRegionIntersectsNode = dataNode["RegionIntersects"]["RegionIntersect"];
for (auto dataNodeRegionIntersectsRegionIntersect : allRegionIntersectsNode)
{
Data::RegionIntersect regionIntersectObject;
auto allIds = value["Ids"]["Ids"];
for (auto value : allIds)
regionIntersectObject.ids.push_back(value.asString());
data_.regionIntersects.push_back(regionIntersectObject);
}
auto allElementsNode = dataNode["Elements"]["Element"];
for (auto dataNodeElementsElement : allElementsNode)
{
Data::Element elementObject;
if(!dataNodeElementsElement["TypeName"].isNull())
elementObject.typeName = dataNodeElementsElement["TypeName"].asString();
if(!dataNodeElementsElement["Score"].isNull())
elementObject.score = std::stof(dataNodeElementsElement["Score"].asString());
auto allBoxesNode = dataNodeElementsElement["Boxes"]["BoxesItem"];
for (auto dataNodeElementsElementBoxesBoxesItem : allBoxesNode)
{
Data::Element::BoxesItem boxesObject;
if(!dataNodeElementsElementBoxesBoxesItem["Left"].isNull())
boxesObject.left = std::stol(dataNodeElementsElementBoxesBoxesItem["Left"].asString());
if(!dataNodeElementsElementBoxesBoxesItem["Top"].isNull())
boxesObject.top = std::stol(dataNodeElementsElementBoxesBoxesItem["Top"].asString());
if(!dataNodeElementsElementBoxesBoxesItem["Right"].isNull())
boxesObject.right = std::stol(dataNodeElementsElementBoxesBoxesItem["Right"].asString());
if(!dataNodeElementsElementBoxesBoxesItem["Bottom"].isNull())
boxesObject.bottom = std::stol(dataNodeElementsElementBoxesBoxesItem["Bottom"].asString());
elementObject.boxes.push_back(boxesObject);
}
data_.elements.push_back(elementObject);
}
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
}
std::string DetectVehicleIllegalParkingResult::getMessage()const
{
return message_;
}
DetectVehicleIllegalParkingResult::Data DetectVehicleIllegalParkingResult::getData()const
{
return data_;
}
std::string DetectVehicleIllegalParkingResult::getCode()const
{
return code_;
}

View File

@@ -26,7 +26,9 @@ set(videorecog_public_header_model
include/alibabacloud/videorecog/model/GenerateVideoCoverRequest.h
include/alibabacloud/videorecog/model/GenerateVideoCoverResult.h
include/alibabacloud/videorecog/model/GetAsyncJobResultRequest.h
include/alibabacloud/videorecog/model/GetAsyncJobResultResult.h )
include/alibabacloud/videorecog/model/GetAsyncJobResultResult.h
include/alibabacloud/videorecog/model/UnderstandVideoContentRequest.h
include/alibabacloud/videorecog/model/UnderstandVideoContentResult.h )
set(videorecog_src
src/VideorecogClient.cc
@@ -35,7 +37,9 @@ set(videorecog_src
src/model/GenerateVideoCoverRequest.cc
src/model/GenerateVideoCoverResult.cc
src/model/GetAsyncJobResultRequest.cc
src/model/GetAsyncJobResultResult.cc )
src/model/GetAsyncJobResultResult.cc
src/model/UnderstandVideoContentRequest.cc
src/model/UnderstandVideoContentResult.cc )
add_library(videorecog ${LIB_TYPE}
${videorecog_public_header}

View File

@@ -28,6 +28,8 @@
#include "model/GenerateVideoCoverResult.h"
#include "model/GetAsyncJobResultRequest.h"
#include "model/GetAsyncJobResultResult.h"
#include "model/UnderstandVideoContentRequest.h"
#include "model/UnderstandVideoContentResult.h"
namespace AlibabaCloud
@@ -46,6 +48,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::GetAsyncJobResultResult> GetAsyncJobResultOutcome;
typedef std::future<GetAsyncJobResultOutcome> GetAsyncJobResultOutcomeCallable;
typedef std::function<void(const VideorecogClient*, const Model::GetAsyncJobResultRequest&, const GetAsyncJobResultOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetAsyncJobResultAsyncHandler;
typedef Outcome<Error, Model::UnderstandVideoContentResult> UnderstandVideoContentOutcome;
typedef std::future<UnderstandVideoContentOutcome> UnderstandVideoContentOutcomeCallable;
typedef std::function<void(const VideorecogClient*, const Model::UnderstandVideoContentRequest&, const UnderstandVideoContentOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UnderstandVideoContentAsyncHandler;
VideorecogClient(const Credentials &credentials, const ClientConfiguration &configuration);
VideorecogClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
@@ -60,6 +65,9 @@ namespace AlibabaCloud
GetAsyncJobResultOutcome getAsyncJobResult(const Model::GetAsyncJobResultRequest &request)const;
void getAsyncJobResultAsync(const Model::GetAsyncJobResultRequest& request, const GetAsyncJobResultAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetAsyncJobResultOutcomeCallable getAsyncJobResultCallable(const Model::GetAsyncJobResultRequest& request) const;
UnderstandVideoContentOutcome understandVideoContent(const Model::UnderstandVideoContentRequest &request)const;
void understandVideoContentAsync(const Model::UnderstandVideoContentRequest& request, const UnderstandVideoContentAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
UnderstandVideoContentOutcomeCallable understandVideoContentCallable(const Model::UnderstandVideoContentRequest& request) const;
private:
std::shared_ptr<EndpointProvider> endpointProvider_;

View File

@@ -35,14 +35,14 @@ namespace AlibabaCloud
GetAsyncJobResultRequest();
~GetAsyncJobResultRequest();
bool getAsync()const;
void setAsync(bool async);
std::string getJobId()const;
void setJobId(const std::string& jobId);
bool getAsync()const;
void setAsync(bool async);
private:
bool async_;
std::string jobId_;
bool async_;
};
}

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_VIDEORECOG_MODEL_UNDERSTANDVIDEOCONTENTREQUEST_H_
#define ALIBABACLOUD_VIDEORECOG_MODEL_UNDERSTANDVIDEOCONTENTREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/videorecog/VideorecogExport.h>
namespace AlibabaCloud
{
namespace Videorecog
{
namespace Model
{
class ALIBABACLOUD_VIDEORECOG_EXPORT UnderstandVideoContentRequest : public RpcServiceRequest
{
public:
UnderstandVideoContentRequest();
~UnderstandVideoContentRequest();
bool getAsync()const;
void setAsync(bool async);
std::string getVideoURL()const;
void setVideoURL(const std::string& videoURL);
private:
bool async_;
std::string videoURL_;
};
}
}
}
#endif // !ALIBABACLOUD_VIDEORECOG_MODEL_UNDERSTANDVIDEOCONTENTREQUEST_H_

View File

@@ -0,0 +1,67 @@
/*
* 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_VIDEORECOG_MODEL_UNDERSTANDVIDEOCONTENTRESULT_H_
#define ALIBABACLOUD_VIDEORECOG_MODEL_UNDERSTANDVIDEOCONTENTRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/videorecog/VideorecogExport.h>
namespace AlibabaCloud
{
namespace Videorecog
{
namespace Model
{
class ALIBABACLOUD_VIDEORECOG_EXPORT UnderstandVideoContentResult : public ServiceResult
{
public:
struct Data
{
struct VideoInfo
{
float fps;
long duration;
long height;
long width;
};
std::string tagInfo;
VideoInfo videoInfo;
};
UnderstandVideoContentResult();
explicit UnderstandVideoContentResult(const std::string &payload);
~UnderstandVideoContentResult();
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_VIDEORECOG_MODEL_UNDERSTANDVIDEOCONTENTRESULT_H_

View File

@@ -159,3 +159,39 @@ VideorecogClient::GetAsyncJobResultOutcomeCallable VideorecogClient::getAsyncJob
return task->get_future();
}
VideorecogClient::UnderstandVideoContentOutcome VideorecogClient::understandVideoContent(const UnderstandVideoContentRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return UnderstandVideoContentOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return UnderstandVideoContentOutcome(UnderstandVideoContentResult(outcome.result()));
else
return UnderstandVideoContentOutcome(outcome.error());
}
void VideorecogClient::understandVideoContentAsync(const UnderstandVideoContentRequest& request, const UnderstandVideoContentAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, understandVideoContent(request), context);
};
asyncExecute(new Runnable(fn));
}
VideorecogClient::UnderstandVideoContentOutcomeCallable VideorecogClient::understandVideoContentCallable(const UnderstandVideoContentRequest &request) const
{
auto task = std::make_shared<std::packaged_task<UnderstandVideoContentOutcome()>>(
[this, request]()
{
return this->understandVideoContent(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}

View File

@@ -27,17 +27,6 @@ GetAsyncJobResultRequest::GetAsyncJobResultRequest() :
GetAsyncJobResultRequest::~GetAsyncJobResultRequest()
{}
bool GetAsyncJobResultRequest::getAsync()const
{
return async_;
}
void GetAsyncJobResultRequest::setAsync(bool async)
{
async_ = async;
setBodyParameter("Async", async ? "true" : "false");
}
std::string GetAsyncJobResultRequest::getJobId()const
{
return jobId_;
@@ -49,3 +38,14 @@ void GetAsyncJobResultRequest::setJobId(const std::string& jobId)
setBodyParameter("JobId", jobId);
}
bool GetAsyncJobResultRequest::getAsync()const
{
return async_;
}
void GetAsyncJobResultRequest::setAsync(bool async)
{
async_ = async;
setBodyParameter("Async", async ? "true" : "false");
}

View File

@@ -40,16 +40,16 @@ void GetAsyncJobResultResult::parse(const std::string &payload)
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto dataNode = value["Data"];
if(!dataNode["JobId"].isNull())
data_.jobId = dataNode["JobId"].asString();
if(!dataNode["Status"].isNull())
data_.status = dataNode["Status"].asString();
if(!dataNode["Result"].isNull())
data_.result = dataNode["Result"].asString();
if(!dataNode["ErrorCode"].isNull())
data_.errorCode = dataNode["ErrorCode"].asString();
if(!dataNode["ErrorMessage"].isNull())
data_.errorMessage = dataNode["ErrorMessage"].asString();
if(!dataNode["JobId"].isNull())
data_.jobId = dataNode["JobId"].asString();
if(!dataNode["Result"].isNull())
data_.result = dataNode["Result"].asString();
}

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/videorecog/model/UnderstandVideoContentRequest.h>
using AlibabaCloud::Videorecog::Model::UnderstandVideoContentRequest;
UnderstandVideoContentRequest::UnderstandVideoContentRequest() :
RpcServiceRequest("videorecog", "2020-03-20", "UnderstandVideoContent")
{
setMethod(HttpRequest::Method::Post);
}
UnderstandVideoContentRequest::~UnderstandVideoContentRequest()
{}
bool UnderstandVideoContentRequest::getAsync()const
{
return async_;
}
void UnderstandVideoContentRequest::setAsync(bool async)
{
async_ = async;
setBodyParameter("Async", async ? "true" : "false");
}
std::string UnderstandVideoContentRequest::getVideoURL()const
{
return videoURL_;
}
void UnderstandVideoContentRequest::setVideoURL(const std::string& videoURL)
{
videoURL_ = videoURL;
setBodyParameter("VideoURL", videoURL);
}

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/videorecog/model/UnderstandVideoContentResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Videorecog;
using namespace AlibabaCloud::Videorecog::Model;
UnderstandVideoContentResult::UnderstandVideoContentResult() :
ServiceResult()
{}
UnderstandVideoContentResult::UnderstandVideoContentResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
UnderstandVideoContentResult::~UnderstandVideoContentResult()
{}
void UnderstandVideoContentResult::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["TagInfo"].isNull())
data_.tagInfo = dataNode["TagInfo"].asString();
auto videoInfoNode = dataNode["VideoInfo"];
if(!videoInfoNode["Fps"].isNull())
data_.videoInfo.fps = std::stof(videoInfoNode["Fps"].asString());
if(!videoInfoNode["Duration"].isNull())
data_.videoInfo.duration = std::stol(videoInfoNode["Duration"].asString());
if(!videoInfoNode["Height"].isNull())
data_.videoInfo.height = std::stol(videoInfoNode["Height"].asString());
if(!videoInfoNode["Width"].isNull())
data_.videoInfo.width = std::stol(videoInfoNode["Width"].asString());
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
}
std::string UnderstandVideoContentResult::getMessage()const
{
return message_;
}
UnderstandVideoContentResult::Data UnderstandVideoContentResult::getData()const
{
return data_;
}
std::string UnderstandVideoContentResult::getCode()const
{
return code_;
}

View File

@@ -23,6 +23,8 @@ set(videoseg_public_header
set(videoseg_public_header_model
include/alibabacloud/videoseg/model/GetAsyncJobResultRequest.h
include/alibabacloud/videoseg/model/GetAsyncJobResultResult.h
include/alibabacloud/videoseg/model/SegmentGreenScreenVideoRequest.h
include/alibabacloud/videoseg/model/SegmentGreenScreenVideoResult.h
include/alibabacloud/videoseg/model/SegmentHalfBodyRequest.h
include/alibabacloud/videoseg/model/SegmentHalfBodyResult.h
include/alibabacloud/videoseg/model/SegmentVideoBodyRequest.h
@@ -32,6 +34,8 @@ set(videoseg_src
src/VideosegClient.cc
src/model/GetAsyncJobResultRequest.cc
src/model/GetAsyncJobResultResult.cc
src/model/SegmentGreenScreenVideoRequest.cc
src/model/SegmentGreenScreenVideoResult.cc
src/model/SegmentHalfBodyRequest.cc
src/model/SegmentHalfBodyResult.cc
src/model/SegmentVideoBodyRequest.cc

View File

@@ -24,6 +24,8 @@
#include "VideosegExport.h"
#include "model/GetAsyncJobResultRequest.h"
#include "model/GetAsyncJobResultResult.h"
#include "model/SegmentGreenScreenVideoRequest.h"
#include "model/SegmentGreenScreenVideoResult.h"
#include "model/SegmentHalfBodyRequest.h"
#include "model/SegmentHalfBodyResult.h"
#include "model/SegmentVideoBodyRequest.h"
@@ -40,6 +42,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::GetAsyncJobResultResult> GetAsyncJobResultOutcome;
typedef std::future<GetAsyncJobResultOutcome> GetAsyncJobResultOutcomeCallable;
typedef std::function<void(const VideosegClient*, const Model::GetAsyncJobResultRequest&, const GetAsyncJobResultOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetAsyncJobResultAsyncHandler;
typedef Outcome<Error, Model::SegmentGreenScreenVideoResult> SegmentGreenScreenVideoOutcome;
typedef std::future<SegmentGreenScreenVideoOutcome> SegmentGreenScreenVideoOutcomeCallable;
typedef std::function<void(const VideosegClient*, const Model::SegmentGreenScreenVideoRequest&, const SegmentGreenScreenVideoOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SegmentGreenScreenVideoAsyncHandler;
typedef Outcome<Error, Model::SegmentHalfBodyResult> SegmentHalfBodyOutcome;
typedef std::future<SegmentHalfBodyOutcome> SegmentHalfBodyOutcomeCallable;
typedef std::function<void(const VideosegClient*, const Model::SegmentHalfBodyRequest&, const SegmentHalfBodyOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SegmentHalfBodyAsyncHandler;
@@ -54,6 +59,9 @@ namespace AlibabaCloud
GetAsyncJobResultOutcome getAsyncJobResult(const Model::GetAsyncJobResultRequest &request)const;
void getAsyncJobResultAsync(const Model::GetAsyncJobResultRequest& request, const GetAsyncJobResultAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetAsyncJobResultOutcomeCallable getAsyncJobResultCallable(const Model::GetAsyncJobResultRequest& request) const;
SegmentGreenScreenVideoOutcome segmentGreenScreenVideo(const Model::SegmentGreenScreenVideoRequest &request)const;
void segmentGreenScreenVideoAsync(const Model::SegmentGreenScreenVideoRequest& request, const SegmentGreenScreenVideoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
SegmentGreenScreenVideoOutcomeCallable segmentGreenScreenVideoCallable(const Model::SegmentGreenScreenVideoRequest& request) const;
SegmentHalfBodyOutcome segmentHalfBody(const Model::SegmentHalfBodyRequest &request)const;
void segmentHalfBodyAsync(const Model::SegmentHalfBodyRequest& request, const SegmentHalfBodyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
SegmentHalfBodyOutcomeCallable segmentHalfBodyCallable(const Model::SegmentHalfBodyRequest& request) const;

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_VIDEOSEG_MODEL_SEGMENTGREENSCREENVIDEOREQUEST_H_
#define ALIBABACLOUD_VIDEOSEG_MODEL_SEGMENTGREENSCREENVIDEOREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/videoseg/VideosegExport.h>
namespace AlibabaCloud
{
namespace Videoseg
{
namespace Model
{
class ALIBABACLOUD_VIDEOSEG_EXPORT SegmentGreenScreenVideoRequest : public RpcServiceRequest
{
public:
SegmentGreenScreenVideoRequest();
~SegmentGreenScreenVideoRequest();
bool getAsync()const;
void setAsync(bool async);
std::string getVideoURL()const;
void setVideoURL(const std::string& videoURL);
private:
bool async_;
std::string videoURL_;
};
}
}
}
#endif // !ALIBABACLOUD_VIDEOSEG_MODEL_SEGMENTGREENSCREENVIDEOREQUEST_H_

View File

@@ -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_VIDEOSEG_MODEL_SEGMENTGREENSCREENVIDEORESULT_H_
#define ALIBABACLOUD_VIDEOSEG_MODEL_SEGMENTGREENSCREENVIDEORESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/videoseg/VideosegExport.h>
namespace AlibabaCloud
{
namespace Videoseg
{
namespace Model
{
class ALIBABACLOUD_VIDEOSEG_EXPORT SegmentGreenScreenVideoResult : public ServiceResult
{
public:
struct Data
{
std::string videoURL;
};
SegmentGreenScreenVideoResult();
explicit SegmentGreenScreenVideoResult(const std::string &payload);
~SegmentGreenScreenVideoResult();
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_VIDEOSEG_MODEL_SEGMENTGREENSCREENVIDEORESULT_H_

View File

@@ -87,6 +87,42 @@ VideosegClient::GetAsyncJobResultOutcomeCallable VideosegClient::getAsyncJobResu
return task->get_future();
}
VideosegClient::SegmentGreenScreenVideoOutcome VideosegClient::segmentGreenScreenVideo(const SegmentGreenScreenVideoRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return SegmentGreenScreenVideoOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return SegmentGreenScreenVideoOutcome(SegmentGreenScreenVideoResult(outcome.result()));
else
return SegmentGreenScreenVideoOutcome(outcome.error());
}
void VideosegClient::segmentGreenScreenVideoAsync(const SegmentGreenScreenVideoRequest& request, const SegmentGreenScreenVideoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, segmentGreenScreenVideo(request), context);
};
asyncExecute(new Runnable(fn));
}
VideosegClient::SegmentGreenScreenVideoOutcomeCallable VideosegClient::segmentGreenScreenVideoCallable(const SegmentGreenScreenVideoRequest &request) const
{
auto task = std::make_shared<std::packaged_task<SegmentGreenScreenVideoOutcome()>>(
[this, request]()
{
return this->segmentGreenScreenVideo(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
VideosegClient::SegmentHalfBodyOutcome VideosegClient::segmentHalfBody(const SegmentHalfBodyRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

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/videoseg/model/SegmentGreenScreenVideoRequest.h>
using AlibabaCloud::Videoseg::Model::SegmentGreenScreenVideoRequest;
SegmentGreenScreenVideoRequest::SegmentGreenScreenVideoRequest() :
RpcServiceRequest("videoseg", "2020-03-20", "SegmentGreenScreenVideo")
{
setMethod(HttpRequest::Method::Post);
}
SegmentGreenScreenVideoRequest::~SegmentGreenScreenVideoRequest()
{}
bool SegmentGreenScreenVideoRequest::getAsync()const
{
return async_;
}
void SegmentGreenScreenVideoRequest::setAsync(bool async)
{
async_ = async;
setBodyParameter("Async", async ? "true" : "false");
}
std::string SegmentGreenScreenVideoRequest::getVideoURL()const
{
return videoURL_;
}
void SegmentGreenScreenVideoRequest::setVideoURL(const std::string& videoURL)
{
videoURL_ = videoURL;
setBodyParameter("VideoURL", videoURL);
}

View File

@@ -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.
*/
#include <alibabacloud/videoseg/model/SegmentGreenScreenVideoResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Videoseg;
using namespace AlibabaCloud::Videoseg::Model;
SegmentGreenScreenVideoResult::SegmentGreenScreenVideoResult() :
ServiceResult()
{}
SegmentGreenScreenVideoResult::SegmentGreenScreenVideoResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
SegmentGreenScreenVideoResult::~SegmentGreenScreenVideoResult()
{}
void SegmentGreenScreenVideoResult::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["VideoURL"].isNull())
data_.videoURL = dataNode["VideoURL"].asString();
if(!value["Message"].isNull())
message_ = value["Message"].asString();
if(!value["Code"].isNull())
code_ = value["Code"].asString();
}
std::string SegmentGreenScreenVideoResult::getMessage()const
{
return message_;
}
SegmentGreenScreenVideoResult::Data SegmentGreenScreenVideoResult::getData()const
{
return data_;
}
std::string SegmentGreenScreenVideoResult::getCode()const
{
return code_;
}