Update goodstech.
This commit is contained in:
70
goodstech/include/alibabacloud/goodstech/GoodstechClient.h
Normal file
70
goodstech/include/alibabacloud/goodstech/GoodstechClient.h
Normal file
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
* 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_GOODSTECH_GOODSTECHCLIENT_H_
|
||||
#define ALIBABACLOUD_GOODSTECH_GOODSTECHCLIENT_H_
|
||||
|
||||
#include <future>
|
||||
#include <alibabacloud/core/AsyncCallerContext.h>
|
||||
#include <alibabacloud/core/EndpointProvider.h>
|
||||
#include <alibabacloud/core/RpcServiceClient.h>
|
||||
#include "GoodstechExport.h"
|
||||
#include "model/ClassifyCommodityRequest.h"
|
||||
#include "model/ClassifyCommodityResult.h"
|
||||
#include "model/RecognizeFurnitureAttributeRequest.h"
|
||||
#include "model/RecognizeFurnitureAttributeResult.h"
|
||||
#include "model/RecognizeFurnitureSpuRequest.h"
|
||||
#include "model/RecognizeFurnitureSpuResult.h"
|
||||
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Goodstech
|
||||
{
|
||||
class ALIBABACLOUD_GOODSTECH_EXPORT GoodstechClient : public RpcServiceClient
|
||||
{
|
||||
public:
|
||||
typedef Outcome<Error, Model::ClassifyCommodityResult> ClassifyCommodityOutcome;
|
||||
typedef std::future<ClassifyCommodityOutcome> ClassifyCommodityOutcomeCallable;
|
||||
typedef std::function<void(const GoodstechClient*, const Model::ClassifyCommodityRequest&, const ClassifyCommodityOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> ClassifyCommodityAsyncHandler;
|
||||
typedef Outcome<Error, Model::RecognizeFurnitureAttributeResult> RecognizeFurnitureAttributeOutcome;
|
||||
typedef std::future<RecognizeFurnitureAttributeOutcome> RecognizeFurnitureAttributeOutcomeCallable;
|
||||
typedef std::function<void(const GoodstechClient*, const Model::RecognizeFurnitureAttributeRequest&, const RecognizeFurnitureAttributeOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RecognizeFurnitureAttributeAsyncHandler;
|
||||
typedef Outcome<Error, Model::RecognizeFurnitureSpuResult> RecognizeFurnitureSpuOutcome;
|
||||
typedef std::future<RecognizeFurnitureSpuOutcome> RecognizeFurnitureSpuOutcomeCallable;
|
||||
typedef std::function<void(const GoodstechClient*, const Model::RecognizeFurnitureSpuRequest&, const RecognizeFurnitureSpuOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RecognizeFurnitureSpuAsyncHandler;
|
||||
|
||||
GoodstechClient(const Credentials &credentials, const ClientConfiguration &configuration);
|
||||
GoodstechClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
|
||||
GoodstechClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
|
||||
~GoodstechClient();
|
||||
ClassifyCommodityOutcome classifyCommodity(const Model::ClassifyCommodityRequest &request)const;
|
||||
void classifyCommodityAsync(const Model::ClassifyCommodityRequest& request, const ClassifyCommodityAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
ClassifyCommodityOutcomeCallable classifyCommodityCallable(const Model::ClassifyCommodityRequest& request) const;
|
||||
RecognizeFurnitureAttributeOutcome recognizeFurnitureAttribute(const Model::RecognizeFurnitureAttributeRequest &request)const;
|
||||
void recognizeFurnitureAttributeAsync(const Model::RecognizeFurnitureAttributeRequest& request, const RecognizeFurnitureAttributeAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
RecognizeFurnitureAttributeOutcomeCallable recognizeFurnitureAttributeCallable(const Model::RecognizeFurnitureAttributeRequest& request) const;
|
||||
RecognizeFurnitureSpuOutcome recognizeFurnitureSpu(const Model::RecognizeFurnitureSpuRequest &request)const;
|
||||
void recognizeFurnitureSpuAsync(const Model::RecognizeFurnitureSpuRequest& request, const RecognizeFurnitureSpuAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
RecognizeFurnitureSpuOutcomeCallable recognizeFurnitureSpuCallable(const Model::RecognizeFurnitureSpuRequest& request) const;
|
||||
|
||||
private:
|
||||
std::shared_ptr<EndpointProvider> endpointProvider_;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // !ALIBABACLOUD_GOODSTECH_GOODSTECHCLIENT_H_
|
||||
32
goodstech/include/alibabacloud/goodstech/GoodstechExport.h
Normal file
32
goodstech/include/alibabacloud/goodstech/GoodstechExport.h
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* 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_GOODSTECH_GOODSTECHEXPORT_H_
|
||||
#define ALIBABACLOUD_GOODSTECH_GOODSTECHEXPORT_H_
|
||||
|
||||
#include <alibabacloud/core/Global.h>
|
||||
|
||||
#if defined(ALIBABACLOUD_SHARED)
|
||||
# if defined(ALIBABACLOUD_GOODSTECH_LIBRARY)
|
||||
# define ALIBABACLOUD_GOODSTECH_EXPORT ALIBABACLOUD_DECL_EXPORT
|
||||
# else
|
||||
# define ALIBABACLOUD_GOODSTECH_EXPORT ALIBABACLOUD_DECL_IMPORT
|
||||
# endif
|
||||
#else
|
||||
# define ALIBABACLOUD_GOODSTECH_EXPORT
|
||||
#endif
|
||||
|
||||
#endif // !ALIBABACLOUD_GOODSTECH_GOODSTECHEXPORT_H_
|
||||
@@ -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_GOODSTECH_MODEL_CLASSIFYCOMMODITYREQUEST_H_
|
||||
#define ALIBABACLOUD_GOODSTECH_MODEL_CLASSIFYCOMMODITYREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/goodstech/GoodstechExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Goodstech
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_GOODSTECH_EXPORT ClassifyCommodityRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
ClassifyCommodityRequest();
|
||||
~ClassifyCommodityRequest();
|
||||
|
||||
std::string getImageURL()const;
|
||||
void setImageURL(const std::string& imageURL);
|
||||
|
||||
private:
|
||||
std::string imageURL_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_GOODSTECH_MODEL_CLASSIFYCOMMODITYREQUEST_H_
|
||||
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* 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_GOODSTECH_MODEL_CLASSIFYCOMMODITYRESULT_H_
|
||||
#define ALIBABACLOUD_GOODSTECH_MODEL_CLASSIFYCOMMODITYRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/goodstech/GoodstechExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Goodstech
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_GOODSTECH_EXPORT ClassifyCommodityResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
struct Category
|
||||
{
|
||||
std::string categoryId;
|
||||
float score;
|
||||
std::string categoryName;
|
||||
};
|
||||
std::vector<Category> categories;
|
||||
};
|
||||
|
||||
|
||||
ClassifyCommodityResult();
|
||||
explicit ClassifyCommodityResult(const std::string &payload);
|
||||
~ClassifyCommodityResult();
|
||||
Data getData()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
Data data_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_GOODSTECH_MODEL_CLASSIFYCOMMODITYRESULT_H_
|
||||
@@ -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_GOODSTECH_MODEL_RECOGNIZEFURNITUREATTRIBUTEREQUEST_H_
|
||||
#define ALIBABACLOUD_GOODSTECH_MODEL_RECOGNIZEFURNITUREATTRIBUTEREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/goodstech/GoodstechExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Goodstech
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_GOODSTECH_EXPORT RecognizeFurnitureAttributeRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
RecognizeFurnitureAttributeRequest();
|
||||
~RecognizeFurnitureAttributeRequest();
|
||||
|
||||
std::string getImageURL()const;
|
||||
void setImageURL(const std::string& imageURL);
|
||||
|
||||
private:
|
||||
std::string imageURL_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_GOODSTECH_MODEL_RECOGNIZEFURNITUREATTRIBUTEREQUEST_H_
|
||||
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* 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_GOODSTECH_MODEL_RECOGNIZEFURNITUREATTRIBUTERESULT_H_
|
||||
#define ALIBABACLOUD_GOODSTECH_MODEL_RECOGNIZEFURNITUREATTRIBUTERESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/goodstech/GoodstechExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Goodstech
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_GOODSTECH_EXPORT RecognizeFurnitureAttributeResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
std::string predStyle;
|
||||
float predProbability;
|
||||
std::string predStyleId;
|
||||
};
|
||||
|
||||
|
||||
RecognizeFurnitureAttributeResult();
|
||||
explicit RecognizeFurnitureAttributeResult(const std::string &payload);
|
||||
~RecognizeFurnitureAttributeResult();
|
||||
Data getData()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
Data data_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_GOODSTECH_MODEL_RECOGNIZEFURNITUREATTRIBUTERESULT_H_
|
||||
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* 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_GOODSTECH_MODEL_RECOGNIZEFURNITURESPUREQUEST_H_
|
||||
#define ALIBABACLOUD_GOODSTECH_MODEL_RECOGNIZEFURNITURESPUREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/goodstech/GoodstechExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Goodstech
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_GOODSTECH_EXPORT RecognizeFurnitureSpuRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
RecognizeFurnitureSpuRequest();
|
||||
~RecognizeFurnitureSpuRequest();
|
||||
|
||||
float getXLength()const;
|
||||
void setXLength(float xLength);
|
||||
float getZLength()const;
|
||||
void setZLength(float zLength);
|
||||
std::string getImageURL()const;
|
||||
void setImageURL(const std::string& imageURL);
|
||||
float getYLength()const;
|
||||
void setYLength(float yLength);
|
||||
|
||||
private:
|
||||
float xLength_;
|
||||
float zLength_;
|
||||
std::string imageURL_;
|
||||
float yLength_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_GOODSTECH_MODEL_RECOGNIZEFURNITURESPUREQUEST_H_
|
||||
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* 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_GOODSTECH_MODEL_RECOGNIZEFURNITURESPURESULT_H_
|
||||
#define ALIBABACLOUD_GOODSTECH_MODEL_RECOGNIZEFURNITURESPURESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/goodstech/GoodstechExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Goodstech
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_GOODSTECH_EXPORT RecognizeFurnitureSpuResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct Data
|
||||
{
|
||||
float predProbability;
|
||||
std::string predCate;
|
||||
std::string predCateId;
|
||||
};
|
||||
|
||||
|
||||
RecognizeFurnitureSpuResult();
|
||||
explicit RecognizeFurnitureSpuResult(const std::string &payload);
|
||||
~RecognizeFurnitureSpuResult();
|
||||
Data getData()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
Data data_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_GOODSTECH_MODEL_RECOGNIZEFURNITURESPURESULT_H_
|
||||
Reference in New Issue
Block a user