SDK.
This commit is contained in:
@@ -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.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_CLOUDAUTH_CONSOLE_CLOUDAUTH_CONSOLECLIENT_H_
|
||||
#define ALIBABACLOUD_CLOUDAUTH_CONSOLE_CLOUDAUTH_CONSOLECLIENT_H_
|
||||
|
||||
#include <future>
|
||||
#include <alibabacloud/core/AsyncCallerContext.h>
|
||||
#include <alibabacloud/core/EndpointProvider.h>
|
||||
#include <alibabacloud/core/RpcServiceClient.h>
|
||||
#include "Cloudauth_consoleExport.h"
|
||||
#include "model/RetrieveFaceRequest.h"
|
||||
#include "model/RetrieveFaceResult.h"
|
||||
#include "model/UploadIdentifyRecordRequest.h"
|
||||
#include "model/UploadIdentifyRecordResult.h"
|
||||
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Cloudauth_console
|
||||
{
|
||||
class ALIBABACLOUD_CLOUDAUTH_CONSOLE_EXPORT Cloudauth_consoleClient : public RpcServiceClient
|
||||
{
|
||||
public:
|
||||
typedef Outcome<Error, Model::RetrieveFaceResult> RetrieveFaceOutcome;
|
||||
typedef std::future<RetrieveFaceOutcome> RetrieveFaceOutcomeCallable;
|
||||
typedef std::function<void(const Cloudauth_consoleClient*, const Model::RetrieveFaceRequest&, const RetrieveFaceOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RetrieveFaceAsyncHandler;
|
||||
typedef Outcome<Error, Model::UploadIdentifyRecordResult> UploadIdentifyRecordOutcome;
|
||||
typedef std::future<UploadIdentifyRecordOutcome> UploadIdentifyRecordOutcomeCallable;
|
||||
typedef std::function<void(const Cloudauth_consoleClient*, const Model::UploadIdentifyRecordRequest&, const UploadIdentifyRecordOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> UploadIdentifyRecordAsyncHandler;
|
||||
|
||||
Cloudauth_consoleClient(const Credentials &credentials, const ClientConfiguration &configuration);
|
||||
Cloudauth_consoleClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
|
||||
Cloudauth_consoleClient(const std::string &accessKeyId, const std::string &accessKeySecret, const ClientConfiguration &configuration);
|
||||
~Cloudauth_consoleClient();
|
||||
RetrieveFaceOutcome retrieveFace(const Model::RetrieveFaceRequest &request)const;
|
||||
void retrieveFaceAsync(const Model::RetrieveFaceRequest& request, const RetrieveFaceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
RetrieveFaceOutcomeCallable retrieveFaceCallable(const Model::RetrieveFaceRequest& request) const;
|
||||
UploadIdentifyRecordOutcome uploadIdentifyRecord(const Model::UploadIdentifyRecordRequest &request)const;
|
||||
void uploadIdentifyRecordAsync(const Model::UploadIdentifyRecordRequest& request, const UploadIdentifyRecordAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
UploadIdentifyRecordOutcomeCallable uploadIdentifyRecordCallable(const Model::UploadIdentifyRecordRequest& request) const;
|
||||
|
||||
private:
|
||||
std::shared_ptr<EndpointProvider> endpointProvider_;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // !ALIBABACLOUD_CLOUDAUTH_CONSOLE_CLOUDAUTH_CONSOLECLIENT_H_
|
||||
@@ -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_CLOUDAUTH_CONSOLE_CLOUDAUTH_CONSOLEEXPORT_H_
|
||||
#define ALIBABACLOUD_CLOUDAUTH_CONSOLE_CLOUDAUTH_CONSOLEEXPORT_H_
|
||||
|
||||
#include <alibabacloud/core/Global.h>
|
||||
|
||||
#if defined(ALIBABACLOUD_SHARED)
|
||||
# if defined(ALIBABACLOUD_CLOUDAUTH_CONSOLE_LIBRARY)
|
||||
# define ALIBABACLOUD_CLOUDAUTH_CONSOLE_EXPORT ALIBABACLOUD_DECL_EXPORT
|
||||
# else
|
||||
# define ALIBABACLOUD_CLOUDAUTH_CONSOLE_EXPORT ALIBABACLOUD_DECL_IMPORT
|
||||
# endif
|
||||
#else
|
||||
# define ALIBABACLOUD_CLOUDAUTH_CONSOLE_EXPORT
|
||||
#endif
|
||||
|
||||
#endif // !ALIBABACLOUD_CLOUDAUTH_CONSOLE_CLOUDAUTH_CONSOLEEXPORT_H_
|
||||
@@ -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_CLOUDAUTH_CONSOLE_MODEL_RETRIEVEFACEREQUEST_H_
|
||||
#define ALIBABACLOUD_CLOUDAUTH_CONSOLE_MODEL_RETRIEVEFACEREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/cloudauth-console/Cloudauth_consoleExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Cloudauth_console
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_CLOUDAUTH_CONSOLE_EXPORT RetrieveFaceRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
RetrieveFaceRequest();
|
||||
~RetrieveFaceRequest();
|
||||
|
||||
std::string getFace64String()const;
|
||||
void setFace64String(const std::string& face64String);
|
||||
std::string getFaceUrl()const;
|
||||
void setFaceUrl(const std::string& faceUrl);
|
||||
std::string getProjectId()const;
|
||||
void setProjectId(const std::string& projectId);
|
||||
|
||||
private:
|
||||
std::string face64String_;
|
||||
std::string faceUrl_;
|
||||
std::string projectId_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_CLOUDAUTH_CONSOLE_MODEL_RETRIEVEFACEREQUEST_H_
|
||||
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ALIBABACLOUD_CLOUDAUTH_CONSOLE_MODEL_RETRIEVEFACERESULT_H_
|
||||
#define ALIBABACLOUD_CLOUDAUTH_CONSOLE_MODEL_RETRIEVEFACERESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/cloudauth-console/Cloudauth_consoleExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Cloudauth_console
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_CLOUDAUTH_CONSOLE_EXPORT RetrieveFaceResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
struct DataItem
|
||||
{
|
||||
std::string userName;
|
||||
long userId;
|
||||
std::string rate;
|
||||
};
|
||||
|
||||
|
||||
RetrieveFaceResult();
|
||||
explicit RetrieveFaceResult(const std::string &payload);
|
||||
~RetrieveFaceResult();
|
||||
std::vector<DataItem> getData()const;
|
||||
bool getSuccess()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::vector<DataItem> data_;
|
||||
bool success_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_CLOUDAUTH_CONSOLE_MODEL_RETRIEVEFACERESULT_H_
|
||||
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
* 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_CLOUDAUTH_CONSOLE_MODEL_UPLOADIDENTIFYRECORDREQUEST_H_
|
||||
#define ALIBABACLOUD_CLOUDAUTH_CONSOLE_MODEL_UPLOADIDENTIFYRECORDREQUEST_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <alibabacloud/core/RpcServiceRequest.h>
|
||||
#include <alibabacloud/cloudauth-console/Cloudauth_consoleExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Cloudauth_console
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_CLOUDAUTH_CONSOLE_EXPORT UploadIdentifyRecordRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
UploadIdentifyRecordRequest();
|
||||
~UploadIdentifyRecordRequest();
|
||||
|
||||
std::string getExt()const;
|
||||
void setExt(const std::string& ext);
|
||||
std::string getIdentifyingImageUrl()const;
|
||||
void setIdentifyingImageUrl(const std::string& identifyingImageUrl);
|
||||
std::string getIdentifyingImageBase64()const;
|
||||
void setIdentifyingImageBase64(const std::string& identifyingImageBase64);
|
||||
std::string getDeviceSecret()const;
|
||||
void setDeviceSecret(const std::string& deviceSecret);
|
||||
std::string getProductKey()const;
|
||||
void setProductKey(const std::string& productKey);
|
||||
std::string getUserId()const;
|
||||
void setUserId(const std::string& userId);
|
||||
std::string getIotId()const;
|
||||
void setIotId(const std::string& iotId);
|
||||
std::string getDeviceName()const;
|
||||
void setDeviceName(const std::string& deviceName);
|
||||
long getIdentifyingTime()const;
|
||||
void setIdentifyingTime(long identifyingTime);
|
||||
std::string getProjectId()const;
|
||||
void setProjectId(const std::string& projectId);
|
||||
std::string getUserName()const;
|
||||
void setUserName(const std::string& userName);
|
||||
|
||||
private:
|
||||
std::string ext_;
|
||||
std::string identifyingImageUrl_;
|
||||
std::string identifyingImageBase64_;
|
||||
std::string deviceSecret_;
|
||||
std::string productKey_;
|
||||
std::string userId_;
|
||||
std::string iotId_;
|
||||
std::string deviceName_;
|
||||
long identifyingTime_;
|
||||
std::string projectId_;
|
||||
std::string userName_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_CLOUDAUTH_CONSOLE_MODEL_UPLOADIDENTIFYRECORDREQUEST_H_
|
||||
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* 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_CLOUDAUTH_CONSOLE_MODEL_UPLOADIDENTIFYRECORDRESULT_H_
|
||||
#define ALIBABACLOUD_CLOUDAUTH_CONSOLE_MODEL_UPLOADIDENTIFYRECORDRESULT_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <alibabacloud/core/ServiceResult.h>
|
||||
#include <alibabacloud/cloudauth-console/Cloudauth_consoleExport.h>
|
||||
|
||||
namespace AlibabaCloud
|
||||
{
|
||||
namespace Cloudauth_console
|
||||
{
|
||||
namespace Model
|
||||
{
|
||||
class ALIBABACLOUD_CLOUDAUTH_CONSOLE_EXPORT UploadIdentifyRecordResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
UploadIdentifyRecordResult();
|
||||
explicit UploadIdentifyRecordResult(const std::string &payload);
|
||||
~UploadIdentifyRecordResult();
|
||||
int getHttpStatusCode()const;
|
||||
bool getSuccess()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
int httpStatusCode_;
|
||||
bool success_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_CLOUDAUTH_CONSOLE_MODEL_UPLOADIDENTIFYRECORDRESULT_H_
|
||||
Reference in New Issue
Block a user