Supported image for process.

This commit is contained in:
sdk-team
2019-12-31 13:56:15 +08:00
parent 1e36d3c54a
commit 76dd650cd7
13 changed files with 629 additions and 1 deletions

View File

@@ -1,3 +1,6 @@
2019-12-31 Version 1.36.226
- Supported image for process.
2019-12-31 Version 1.36.225
- Generated 2019-09-28 for `reid`.

View File

@@ -1 +1 @@
1.36.225
1.36.226

View File

@@ -35,6 +35,8 @@ set(imm_public_header_model
include/alibabacloud/imm/model/CreateGrabFrameTaskResult.h
include/alibabacloud/imm/model/CreateGroupFacesJobRequest.h
include/alibabacloud/imm/model/CreateGroupFacesJobResult.h
include/alibabacloud/imm/model/CreateImageProcessTaskRequest.h
include/alibabacloud/imm/model/CreateImageProcessTaskResult.h
include/alibabacloud/imm/model/CreateMediaComplexTaskRequest.h
include/alibabacloud/imm/model/CreateMediaComplexTaskResult.h
include/alibabacloud/imm/model/CreateMergeFaceGroupsJobRequest.h
@@ -109,6 +111,8 @@ set(imm_public_header_model
include/alibabacloud/imm/model/GetMediaMetaResult.h
include/alibabacloud/imm/model/GetOfficeConversionTaskRequest.h
include/alibabacloud/imm/model/GetOfficeConversionTaskResult.h
include/alibabacloud/imm/model/GetOfficePreviewURLRequest.h
include/alibabacloud/imm/model/GetOfficePreviewURLResult.h
include/alibabacloud/imm/model/GetProjectRequest.h
include/alibabacloud/imm/model/GetProjectResult.h
include/alibabacloud/imm/model/GetSetRequest.h
@@ -178,6 +182,8 @@ set(imm_src
src/model/CreateGrabFrameTaskResult.cc
src/model/CreateGroupFacesJobRequest.cc
src/model/CreateGroupFacesJobResult.cc
src/model/CreateImageProcessTaskRequest.cc
src/model/CreateImageProcessTaskResult.cc
src/model/CreateMediaComplexTaskRequest.cc
src/model/CreateMediaComplexTaskResult.cc
src/model/CreateMergeFaceGroupsJobRequest.cc
@@ -252,6 +258,8 @@ set(imm_src
src/model/GetMediaMetaResult.cc
src/model/GetOfficeConversionTaskRequest.cc
src/model/GetOfficeConversionTaskResult.cc
src/model/GetOfficePreviewURLRequest.cc
src/model/GetOfficePreviewURLResult.cc
src/model/GetProjectRequest.cc
src/model/GetProjectResult.cc
src/model/GetSetRequest.cc

View File

@@ -36,6 +36,8 @@
#include "model/CreateGrabFrameTaskResult.h"
#include "model/CreateGroupFacesJobRequest.h"
#include "model/CreateGroupFacesJobResult.h"
#include "model/CreateImageProcessTaskRequest.h"
#include "model/CreateImageProcessTaskResult.h"
#include "model/CreateMediaComplexTaskRequest.h"
#include "model/CreateMediaComplexTaskResult.h"
#include "model/CreateMergeFaceGroupsJobRequest.h"
@@ -110,6 +112,8 @@
#include "model/GetMediaMetaResult.h"
#include "model/GetOfficeConversionTaskRequest.h"
#include "model/GetOfficeConversionTaskResult.h"
#include "model/GetOfficePreviewURLRequest.h"
#include "model/GetOfficePreviewURLResult.h"
#include "model/GetProjectRequest.h"
#include "model/GetProjectResult.h"
#include "model/GetSetRequest.h"
@@ -192,6 +196,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::CreateGroupFacesJobResult> CreateGroupFacesJobOutcome;
typedef std::future<CreateGroupFacesJobOutcome> CreateGroupFacesJobOutcomeCallable;
typedef std::function<void(const ImmClient*, const Model::CreateGroupFacesJobRequest&, const CreateGroupFacesJobOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateGroupFacesJobAsyncHandler;
typedef Outcome<Error, Model::CreateImageProcessTaskResult> CreateImageProcessTaskOutcome;
typedef std::future<CreateImageProcessTaskOutcome> CreateImageProcessTaskOutcomeCallable;
typedef std::function<void(const ImmClient*, const Model::CreateImageProcessTaskRequest&, const CreateImageProcessTaskOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateImageProcessTaskAsyncHandler;
typedef Outcome<Error, Model::CreateMediaComplexTaskResult> CreateMediaComplexTaskOutcome;
typedef std::future<CreateMediaComplexTaskOutcome> CreateMediaComplexTaskOutcomeCallable;
typedef std::function<void(const ImmClient*, const Model::CreateMediaComplexTaskRequest&, const CreateMediaComplexTaskOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> CreateMediaComplexTaskAsyncHandler;
@@ -303,6 +310,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::GetOfficeConversionTaskResult> GetOfficeConversionTaskOutcome;
typedef std::future<GetOfficeConversionTaskOutcome> GetOfficeConversionTaskOutcomeCallable;
typedef std::function<void(const ImmClient*, const Model::GetOfficeConversionTaskRequest&, const GetOfficeConversionTaskOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetOfficeConversionTaskAsyncHandler;
typedef Outcome<Error, Model::GetOfficePreviewURLResult> GetOfficePreviewURLOutcome;
typedef std::future<GetOfficePreviewURLOutcome> GetOfficePreviewURLOutcomeCallable;
typedef std::function<void(const ImmClient*, const Model::GetOfficePreviewURLRequest&, const GetOfficePreviewURLOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetOfficePreviewURLAsyncHandler;
typedef Outcome<Error, Model::GetProjectResult> GetProjectOutcome;
typedef std::future<GetProjectOutcome> GetProjectOutcomeCallable;
typedef std::function<void(const ImmClient*, const Model::GetProjectRequest&, const GetProjectOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetProjectAsyncHandler;
@@ -407,6 +417,9 @@ namespace AlibabaCloud
CreateGroupFacesJobOutcome createGroupFacesJob(const Model::CreateGroupFacesJobRequest &request)const;
void createGroupFacesJobAsync(const Model::CreateGroupFacesJobRequest& request, const CreateGroupFacesJobAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
CreateGroupFacesJobOutcomeCallable createGroupFacesJobCallable(const Model::CreateGroupFacesJobRequest& request) const;
CreateImageProcessTaskOutcome createImageProcessTask(const Model::CreateImageProcessTaskRequest &request)const;
void createImageProcessTaskAsync(const Model::CreateImageProcessTaskRequest& request, const CreateImageProcessTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
CreateImageProcessTaskOutcomeCallable createImageProcessTaskCallable(const Model::CreateImageProcessTaskRequest& request) const;
CreateMediaComplexTaskOutcome createMediaComplexTask(const Model::CreateMediaComplexTaskRequest &request)const;
void createMediaComplexTaskAsync(const Model::CreateMediaComplexTaskRequest& request, const CreateMediaComplexTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
CreateMediaComplexTaskOutcomeCallable createMediaComplexTaskCallable(const Model::CreateMediaComplexTaskRequest& request) const;
@@ -518,6 +531,9 @@ namespace AlibabaCloud
GetOfficeConversionTaskOutcome getOfficeConversionTask(const Model::GetOfficeConversionTaskRequest &request)const;
void getOfficeConversionTaskAsync(const Model::GetOfficeConversionTaskRequest& request, const GetOfficeConversionTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetOfficeConversionTaskOutcomeCallable getOfficeConversionTaskCallable(const Model::GetOfficeConversionTaskRequest& request) const;
GetOfficePreviewURLOutcome getOfficePreviewURL(const Model::GetOfficePreviewURLRequest &request)const;
void getOfficePreviewURLAsync(const Model::GetOfficePreviewURLRequest& request, const GetOfficePreviewURLAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetOfficePreviewURLOutcomeCallable getOfficePreviewURLCallable(const Model::GetOfficePreviewURLRequest& request) const;
GetProjectOutcome getProject(const Model::GetProjectRequest &request)const;
void getProjectAsync(const Model::GetProjectRequest& request, const GetProjectAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetProjectOutcomeCallable getProjectCallable(const Model::GetProjectRequest& request) const;

View File

@@ -0,0 +1,63 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_IMM_MODEL_CREATEIMAGEPROCESSTASKREQUEST_H_
#define ALIBABACLOUD_IMM_MODEL_CREATEIMAGEPROCESSTASKREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/imm/ImmExport.h>
namespace AlibabaCloud
{
namespace Imm
{
namespace Model
{
class ALIBABACLOUD_IMM_EXPORT CreateImageProcessTaskRequest : public RpcServiceRequest
{
public:
CreateImageProcessTaskRequest();
~CreateImageProcessTaskRequest();
std::string getProject()const;
void setProject(const std::string& project);
std::string getAccessKeyId()const;
void setAccessKeyId(const std::string& accessKeyId);
std::string getNotifyEndpoint()const;
void setNotifyEndpoint(const std::string& notifyEndpoint);
std::string getNotifyTopicName()const;
void setNotifyTopicName(const std::string& notifyTopicName);
std::string getTargetList()const;
void setTargetList(const std::string& targetList);
std::string getImageUri()const;
void setImageUri(const std::string& imageUri);
private:
std::string project_;
std::string accessKeyId_;
std::string notifyEndpoint_;
std::string notifyTopicName_;
std::string targetList_;
std::string imageUri_;
};
}
}
}
#endif // !ALIBABACLOUD_IMM_MODEL_CREATEIMAGEPROCESSTASKREQUEST_H_

View File

@@ -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_IMM_MODEL_CREATEIMAGEPROCESSTASKRESULT_H_
#define ALIBABACLOUD_IMM_MODEL_CREATEIMAGEPROCESSTASKRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/imm/ImmExport.h>
namespace AlibabaCloud
{
namespace Imm
{
namespace Model
{
class ALIBABACLOUD_IMM_EXPORT CreateImageProcessTaskResult : public ServiceResult
{
public:
CreateImageProcessTaskResult();
explicit CreateImageProcessTaskResult(const std::string &payload);
~CreateImageProcessTaskResult();
std::string getTaskId()const;
std::string getTaskType()const;
protected:
void parse(const std::string &payload);
private:
std::string taskId_;
std::string taskType_;
};
}
}
}
#endif // !ALIBABACLOUD_IMM_MODEL_CREATEIMAGEPROCESSTASKRESULT_H_

View File

@@ -0,0 +1,63 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef ALIBABACLOUD_IMM_MODEL_GETOFFICEPREVIEWURLREQUEST_H_
#define ALIBABACLOUD_IMM_MODEL_GETOFFICEPREVIEWURLREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/imm/ImmExport.h>
namespace AlibabaCloud
{
namespace Imm
{
namespace Model
{
class ALIBABACLOUD_IMM_EXPORT GetOfficePreviewURLRequest : public RpcServiceRequest
{
public:
GetOfficePreviewURLRequest();
~GetOfficePreviewURLRequest();
std::string getSrcType()const;
void setSrcType(const std::string& srcType);
int getExpires()const;
void setExpires(int expires);
std::string getProject()const;
void setProject(const std::string& project);
std::string getAccessKeyId()const;
void setAccessKeyId(const std::string& accessKeyId);
bool getUseHTTPS()const;
void setUseHTTPS(bool useHTTPS);
std::string getSrcUri()const;
void setSrcUri(const std::string& srcUri);
private:
std::string srcType_;
int expires_;
std::string project_;
std::string accessKeyId_;
bool useHTTPS_;
std::string srcUri_;
};
}
}
}
#endif // !ALIBABACLOUD_IMM_MODEL_GETOFFICEPREVIEWURLREQUEST_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_IMM_MODEL_GETOFFICEPREVIEWURLRESULT_H_
#define ALIBABACLOUD_IMM_MODEL_GETOFFICEPREVIEWURLRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/imm/ImmExport.h>
namespace AlibabaCloud
{
namespace Imm
{
namespace Model
{
class ALIBABACLOUD_IMM_EXPORT GetOfficePreviewURLResult : public ServiceResult
{
public:
GetOfficePreviewURLResult();
explicit GetOfficePreviewURLResult(const std::string &payload);
~GetOfficePreviewURLResult();
std::string getPreviewURL()const;
protected:
void parse(const std::string &payload);
private:
std::string previewURL_;
};
}
}
}
#endif // !ALIBABACLOUD_IMM_MODEL_GETOFFICEPREVIEWURLRESULT_H_

View File

@@ -303,6 +303,42 @@ ImmClient::CreateGroupFacesJobOutcomeCallable ImmClient::createGroupFacesJobCall
return task->get_future();
}
ImmClient::CreateImageProcessTaskOutcome ImmClient::createImageProcessTask(const CreateImageProcessTaskRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return CreateImageProcessTaskOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return CreateImageProcessTaskOutcome(CreateImageProcessTaskResult(outcome.result()));
else
return CreateImageProcessTaskOutcome(outcome.error());
}
void ImmClient::createImageProcessTaskAsync(const CreateImageProcessTaskRequest& request, const CreateImageProcessTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, createImageProcessTask(request), context);
};
asyncExecute(new Runnable(fn));
}
ImmClient::CreateImageProcessTaskOutcomeCallable ImmClient::createImageProcessTaskCallable(const CreateImageProcessTaskRequest &request) const
{
auto task = std::make_shared<std::packaged_task<CreateImageProcessTaskOutcome()>>(
[this, request]()
{
return this->createImageProcessTask(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ImmClient::CreateMediaComplexTaskOutcome ImmClient::createMediaComplexTask(const CreateMediaComplexTaskRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
@@ -1635,6 +1671,42 @@ ImmClient::GetOfficeConversionTaskOutcomeCallable ImmClient::getOfficeConversion
return task->get_future();
}
ImmClient::GetOfficePreviewURLOutcome ImmClient::getOfficePreviewURL(const GetOfficePreviewURLRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetOfficePreviewURLOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetOfficePreviewURLOutcome(GetOfficePreviewURLResult(outcome.result()));
else
return GetOfficePreviewURLOutcome(outcome.error());
}
void ImmClient::getOfficePreviewURLAsync(const GetOfficePreviewURLRequest& request, const GetOfficePreviewURLAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getOfficePreviewURL(request), context);
};
asyncExecute(new Runnable(fn));
}
ImmClient::GetOfficePreviewURLOutcomeCallable ImmClient::getOfficePreviewURLCallable(const GetOfficePreviewURLRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetOfficePreviewURLOutcome()>>(
[this, request]()
{
return this->getOfficePreviewURL(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
ImmClient::GetProjectOutcome ImmClient::getProject(const GetProjectRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

View File

@@ -0,0 +1,95 @@
/*
* 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/imm/model/CreateImageProcessTaskRequest.h>
using AlibabaCloud::Imm::Model::CreateImageProcessTaskRequest;
CreateImageProcessTaskRequest::CreateImageProcessTaskRequest() :
RpcServiceRequest("imm", "2017-09-06", "CreateImageProcessTask")
{
setMethod(HttpRequest::Method::Post);
}
CreateImageProcessTaskRequest::~CreateImageProcessTaskRequest()
{}
std::string CreateImageProcessTaskRequest::getProject()const
{
return project_;
}
void CreateImageProcessTaskRequest::setProject(const std::string& project)
{
project_ = project;
setCoreParameter("Project", project);
}
std::string CreateImageProcessTaskRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void CreateImageProcessTaskRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setCoreParameter("AccessKeyId", accessKeyId);
}
std::string CreateImageProcessTaskRequest::getNotifyEndpoint()const
{
return notifyEndpoint_;
}
void CreateImageProcessTaskRequest::setNotifyEndpoint(const std::string& notifyEndpoint)
{
notifyEndpoint_ = notifyEndpoint;
setCoreParameter("NotifyEndpoint", notifyEndpoint);
}
std::string CreateImageProcessTaskRequest::getNotifyTopicName()const
{
return notifyTopicName_;
}
void CreateImageProcessTaskRequest::setNotifyTopicName(const std::string& notifyTopicName)
{
notifyTopicName_ = notifyTopicName;
setCoreParameter("NotifyTopicName", notifyTopicName);
}
std::string CreateImageProcessTaskRequest::getTargetList()const
{
return targetList_;
}
void CreateImageProcessTaskRequest::setTargetList(const std::string& targetList)
{
targetList_ = targetList;
setCoreParameter("TargetList", targetList);
}
std::string CreateImageProcessTaskRequest::getImageUri()const
{
return imageUri_;
}
void CreateImageProcessTaskRequest::setImageUri(const std::string& imageUri)
{
imageUri_ = imageUri;
setCoreParameter("ImageUri", imageUri);
}

View File

@@ -0,0 +1,58 @@
/*
* 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/imm/model/CreateImageProcessTaskResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Imm;
using namespace AlibabaCloud::Imm::Model;
CreateImageProcessTaskResult::CreateImageProcessTaskResult() :
ServiceResult()
{}
CreateImageProcessTaskResult::CreateImageProcessTaskResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
CreateImageProcessTaskResult::~CreateImageProcessTaskResult()
{}
void CreateImageProcessTaskResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["TaskId"].isNull())
taskId_ = value["TaskId"].asString();
if(!value["TaskType"].isNull())
taskType_ = value["TaskType"].asString();
}
std::string CreateImageProcessTaskResult::getTaskId()const
{
return taskId_;
}
std::string CreateImageProcessTaskResult::getTaskType()const
{
return taskType_;
}

View File

@@ -0,0 +1,95 @@
/*
* 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/imm/model/GetOfficePreviewURLRequest.h>
using AlibabaCloud::Imm::Model::GetOfficePreviewURLRequest;
GetOfficePreviewURLRequest::GetOfficePreviewURLRequest() :
RpcServiceRequest("imm", "2017-09-06", "GetOfficePreviewURL")
{
setMethod(HttpRequest::Method::Post);
}
GetOfficePreviewURLRequest::~GetOfficePreviewURLRequest()
{}
std::string GetOfficePreviewURLRequest::getSrcType()const
{
return srcType_;
}
void GetOfficePreviewURLRequest::setSrcType(const std::string& srcType)
{
srcType_ = srcType;
setCoreParameter("SrcType", srcType);
}
int GetOfficePreviewURLRequest::getExpires()const
{
return expires_;
}
void GetOfficePreviewURLRequest::setExpires(int expires)
{
expires_ = expires;
setCoreParameter("Expires", std::to_string(expires));
}
std::string GetOfficePreviewURLRequest::getProject()const
{
return project_;
}
void GetOfficePreviewURLRequest::setProject(const std::string& project)
{
project_ = project;
setCoreParameter("Project", project);
}
std::string GetOfficePreviewURLRequest::getAccessKeyId()const
{
return accessKeyId_;
}
void GetOfficePreviewURLRequest::setAccessKeyId(const std::string& accessKeyId)
{
accessKeyId_ = accessKeyId;
setCoreParameter("AccessKeyId", accessKeyId);
}
bool GetOfficePreviewURLRequest::getUseHTTPS()const
{
return useHTTPS_;
}
void GetOfficePreviewURLRequest::setUseHTTPS(bool useHTTPS)
{
useHTTPS_ = useHTTPS;
setCoreParameter("UseHTTPS", useHTTPS ? "true" : "false");
}
std::string GetOfficePreviewURLRequest::getSrcUri()const
{
return srcUri_;
}
void GetOfficePreviewURLRequest::setSrcUri(const std::string& srcUri)
{
srcUri_ = srcUri;
setCoreParameter("SrcUri", srcUri);
}

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/imm/model/GetOfficePreviewURLResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Imm;
using namespace AlibabaCloud::Imm::Model;
GetOfficePreviewURLResult::GetOfficePreviewURLResult() :
ServiceResult()
{}
GetOfficePreviewURLResult::GetOfficePreviewURLResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetOfficePreviewURLResult::~GetOfficePreviewURLResult()
{}
void GetOfficePreviewURLResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
if(!value["PreviewURL"].isNull())
previewURL_ = value["PreviewURL"].asString();
}
std::string GetOfficePreviewURLResult::getPreviewURL()const
{
return previewURL_;
}