Update goodstech.
This commit is contained in:
40
goodstech/src/model/ClassifyCommodityRequest.cc
Normal file
40
goodstech/src/model/ClassifyCommodityRequest.cc
Normal 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/goodstech/model/ClassifyCommodityRequest.h>
|
||||
|
||||
using AlibabaCloud::Goodstech::Model::ClassifyCommodityRequest;
|
||||
|
||||
ClassifyCommodityRequest::ClassifyCommodityRequest() :
|
||||
RpcServiceRequest("goodstech", "2019-12-30", "ClassifyCommodity")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
ClassifyCommodityRequest::~ClassifyCommodityRequest()
|
||||
{}
|
||||
|
||||
std::string ClassifyCommodityRequest::getImageURL()const
|
||||
{
|
||||
return imageURL_;
|
||||
}
|
||||
|
||||
void ClassifyCommodityRequest::setImageURL(const std::string& imageURL)
|
||||
{
|
||||
imageURL_ = imageURL;
|
||||
setParameter("ImageURL", imageURL);
|
||||
}
|
||||
|
||||
62
goodstech/src/model/ClassifyCommodityResult.cc
Normal file
62
goodstech/src/model/ClassifyCommodityResult.cc
Normal 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/goodstech/model/ClassifyCommodityResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Goodstech;
|
||||
using namespace AlibabaCloud::Goodstech::Model;
|
||||
|
||||
ClassifyCommodityResult::ClassifyCommodityResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ClassifyCommodityResult::ClassifyCommodityResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ClassifyCommodityResult::~ClassifyCommodityResult()
|
||||
{}
|
||||
|
||||
void ClassifyCommodityResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto dataNode = value["Data"];
|
||||
auto allCategoriesNode = dataNode["Categories"]["Category"];
|
||||
for (auto dataNodeCategoriesCategory : allCategoriesNode)
|
||||
{
|
||||
Data::Category categoryObject;
|
||||
if(!dataNodeCategoriesCategory["Score"].isNull())
|
||||
categoryObject.score = std::stof(dataNodeCategoriesCategory["Score"].asString());
|
||||
if(!dataNodeCategoriesCategory["CategoryName"].isNull())
|
||||
categoryObject.categoryName = dataNodeCategoriesCategory["CategoryName"].asString();
|
||||
if(!dataNodeCategoriesCategory["CategoryId"].isNull())
|
||||
categoryObject.categoryId = dataNodeCategoriesCategory["CategoryId"].asString();
|
||||
data_.categories.push_back(categoryObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ClassifyCommodityResult::Data ClassifyCommodityResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
40
goodstech/src/model/RecognizeFurnitureAttributeRequest.cc
Normal file
40
goodstech/src/model/RecognizeFurnitureAttributeRequest.cc
Normal 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/goodstech/model/RecognizeFurnitureAttributeRequest.h>
|
||||
|
||||
using AlibabaCloud::Goodstech::Model::RecognizeFurnitureAttributeRequest;
|
||||
|
||||
RecognizeFurnitureAttributeRequest::RecognizeFurnitureAttributeRequest() :
|
||||
RpcServiceRequest("goodstech", "2019-12-30", "RecognizeFurnitureAttribute")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
RecognizeFurnitureAttributeRequest::~RecognizeFurnitureAttributeRequest()
|
||||
{}
|
||||
|
||||
std::string RecognizeFurnitureAttributeRequest::getImageURL()const
|
||||
{
|
||||
return imageURL_;
|
||||
}
|
||||
|
||||
void RecognizeFurnitureAttributeRequest::setImageURL(const std::string& imageURL)
|
||||
{
|
||||
imageURL_ = imageURL;
|
||||
setBodyParameter("ImageURL", imageURL);
|
||||
}
|
||||
|
||||
56
goodstech/src/model/RecognizeFurnitureAttributeResult.cc
Normal file
56
goodstech/src/model/RecognizeFurnitureAttributeResult.cc
Normal file
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* 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/goodstech/model/RecognizeFurnitureAttributeResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Goodstech;
|
||||
using namespace AlibabaCloud::Goodstech::Model;
|
||||
|
||||
RecognizeFurnitureAttributeResult::RecognizeFurnitureAttributeResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
RecognizeFurnitureAttributeResult::RecognizeFurnitureAttributeResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
RecognizeFurnitureAttributeResult::~RecognizeFurnitureAttributeResult()
|
||||
{}
|
||||
|
||||
void RecognizeFurnitureAttributeResult::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["PredStyleId"].isNull())
|
||||
data_.predStyleId = dataNode["PredStyleId"].asString();
|
||||
if(!dataNode["PredStyle"].isNull())
|
||||
data_.predStyle = dataNode["PredStyle"].asString();
|
||||
if(!dataNode["PredProbability"].isNull())
|
||||
data_.predProbability = std::stof(dataNode["PredProbability"].asString());
|
||||
|
||||
}
|
||||
|
||||
RecognizeFurnitureAttributeResult::Data RecognizeFurnitureAttributeResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
73
goodstech/src/model/RecognizeFurnitureSpuRequest.cc
Normal file
73
goodstech/src/model/RecognizeFurnitureSpuRequest.cc
Normal file
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* 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/goodstech/model/RecognizeFurnitureSpuRequest.h>
|
||||
|
||||
using AlibabaCloud::Goodstech::Model::RecognizeFurnitureSpuRequest;
|
||||
|
||||
RecognizeFurnitureSpuRequest::RecognizeFurnitureSpuRequest() :
|
||||
RpcServiceRequest("goodstech", "2019-12-30", "RecognizeFurnitureSpu")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
RecognizeFurnitureSpuRequest::~RecognizeFurnitureSpuRequest()
|
||||
{}
|
||||
|
||||
float RecognizeFurnitureSpuRequest::getXLength()const
|
||||
{
|
||||
return xLength_;
|
||||
}
|
||||
|
||||
void RecognizeFurnitureSpuRequest::setXLength(float xLength)
|
||||
{
|
||||
xLength_ = xLength;
|
||||
setBodyParameter("XLength", std::to_string(xLength));
|
||||
}
|
||||
|
||||
float RecognizeFurnitureSpuRequest::getZLength()const
|
||||
{
|
||||
return zLength_;
|
||||
}
|
||||
|
||||
void RecognizeFurnitureSpuRequest::setZLength(float zLength)
|
||||
{
|
||||
zLength_ = zLength;
|
||||
setBodyParameter("ZLength", std::to_string(zLength));
|
||||
}
|
||||
|
||||
std::string RecognizeFurnitureSpuRequest::getImageURL()const
|
||||
{
|
||||
return imageURL_;
|
||||
}
|
||||
|
||||
void RecognizeFurnitureSpuRequest::setImageURL(const std::string& imageURL)
|
||||
{
|
||||
imageURL_ = imageURL;
|
||||
setBodyParameter("ImageURL", imageURL);
|
||||
}
|
||||
|
||||
float RecognizeFurnitureSpuRequest::getYLength()const
|
||||
{
|
||||
return yLength_;
|
||||
}
|
||||
|
||||
void RecognizeFurnitureSpuRequest::setYLength(float yLength)
|
||||
{
|
||||
yLength_ = yLength;
|
||||
setBodyParameter("YLength", std::to_string(yLength));
|
||||
}
|
||||
|
||||
56
goodstech/src/model/RecognizeFurnitureSpuResult.cc
Normal file
56
goodstech/src/model/RecognizeFurnitureSpuResult.cc
Normal file
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* 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/goodstech/model/RecognizeFurnitureSpuResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Goodstech;
|
||||
using namespace AlibabaCloud::Goodstech::Model;
|
||||
|
||||
RecognizeFurnitureSpuResult::RecognizeFurnitureSpuResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
RecognizeFurnitureSpuResult::RecognizeFurnitureSpuResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
RecognizeFurnitureSpuResult::~RecognizeFurnitureSpuResult()
|
||||
{}
|
||||
|
||||
void RecognizeFurnitureSpuResult::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["PredCateId"].isNull())
|
||||
data_.predCateId = dataNode["PredCateId"].asString();
|
||||
if(!dataNode["PredCate"].isNull())
|
||||
data_.predCate = dataNode["PredCate"].asString();
|
||||
if(!dataNode["PredProbability"].isNull())
|
||||
data_.predProbability = std::stof(dataNode["PredProbability"].asString());
|
||||
|
||||
}
|
||||
|
||||
RecognizeFurnitureSpuResult::Data RecognizeFurnitureSpuResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user