Supported for weboffice edit.
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
2020-12-25 Version: patch
|
||||
- Supported for weboffice edit.
|
||||
|
||||
2020-12-24 Version: patch
|
||||
- Modify ConfigureBackupPlan.
|
||||
|
||||
|
||||
@@ -125,6 +125,8 @@ set(imm_public_header_model
|
||||
include/alibabacloud/imm/model/GetVideoResult.h
|
||||
include/alibabacloud/imm/model/GetVideoTaskRequest.h
|
||||
include/alibabacloud/imm/model/GetVideoTaskResult.h
|
||||
include/alibabacloud/imm/model/GetWebofficeURLRequest.h
|
||||
include/alibabacloud/imm/model/GetWebofficeURLResult.h
|
||||
include/alibabacloud/imm/model/IndexImageRequest.h
|
||||
include/alibabacloud/imm/model/IndexImageResult.h
|
||||
include/alibabacloud/imm/model/IndexVideoRequest.h
|
||||
@@ -161,6 +163,8 @@ set(imm_public_header_model
|
||||
include/alibabacloud/imm/model/RefreshOfficeEditTokenResult.h
|
||||
include/alibabacloud/imm/model/RefreshOfficePreviewTokenRequest.h
|
||||
include/alibabacloud/imm/model/RefreshOfficePreviewTokenResult.h
|
||||
include/alibabacloud/imm/model/RefreshWebofficeTokenRequest.h
|
||||
include/alibabacloud/imm/model/RefreshWebofficeTokenResult.h
|
||||
include/alibabacloud/imm/model/SearchDocIndexRequest.h
|
||||
include/alibabacloud/imm/model/SearchDocIndexResult.h
|
||||
include/alibabacloud/imm/model/StopStreamAnalyseTaskRequest.h
|
||||
@@ -284,6 +288,8 @@ set(imm_src
|
||||
src/model/GetVideoResult.cc
|
||||
src/model/GetVideoTaskRequest.cc
|
||||
src/model/GetVideoTaskResult.cc
|
||||
src/model/GetWebofficeURLRequest.cc
|
||||
src/model/GetWebofficeURLResult.cc
|
||||
src/model/IndexImageRequest.cc
|
||||
src/model/IndexImageResult.cc
|
||||
src/model/IndexVideoRequest.cc
|
||||
@@ -320,6 +326,8 @@ set(imm_src
|
||||
src/model/RefreshOfficeEditTokenResult.cc
|
||||
src/model/RefreshOfficePreviewTokenRequest.cc
|
||||
src/model/RefreshOfficePreviewTokenResult.cc
|
||||
src/model/RefreshWebofficeTokenRequest.cc
|
||||
src/model/RefreshWebofficeTokenResult.cc
|
||||
src/model/SearchDocIndexRequest.cc
|
||||
src/model/SearchDocIndexResult.cc
|
||||
src/model/StopStreamAnalyseTaskRequest.cc
|
||||
|
||||
@@ -126,6 +126,8 @@
|
||||
#include "model/GetVideoResult.h"
|
||||
#include "model/GetVideoTaskRequest.h"
|
||||
#include "model/GetVideoTaskResult.h"
|
||||
#include "model/GetWebofficeURLRequest.h"
|
||||
#include "model/GetWebofficeURLResult.h"
|
||||
#include "model/IndexImageRequest.h"
|
||||
#include "model/IndexImageResult.h"
|
||||
#include "model/IndexVideoRequest.h"
|
||||
@@ -162,6 +164,8 @@
|
||||
#include "model/RefreshOfficeEditTokenResult.h"
|
||||
#include "model/RefreshOfficePreviewTokenRequest.h"
|
||||
#include "model/RefreshOfficePreviewTokenResult.h"
|
||||
#include "model/RefreshWebofficeTokenRequest.h"
|
||||
#include "model/RefreshWebofficeTokenResult.h"
|
||||
#include "model/SearchDocIndexRequest.h"
|
||||
#include "model/SearchDocIndexResult.h"
|
||||
#include "model/StopStreamAnalyseTaskRequest.h"
|
||||
@@ -343,6 +347,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::GetVideoTaskResult> GetVideoTaskOutcome;
|
||||
typedef std::future<GetVideoTaskOutcome> GetVideoTaskOutcomeCallable;
|
||||
typedef std::function<void(const ImmClient*, const Model::GetVideoTaskRequest&, const GetVideoTaskOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetVideoTaskAsyncHandler;
|
||||
typedef Outcome<Error, Model::GetWebofficeURLResult> GetWebofficeURLOutcome;
|
||||
typedef std::future<GetWebofficeURLOutcome> GetWebofficeURLOutcomeCallable;
|
||||
typedef std::function<void(const ImmClient*, const Model::GetWebofficeURLRequest&, const GetWebofficeURLOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetWebofficeURLAsyncHandler;
|
||||
typedef Outcome<Error, Model::IndexImageResult> IndexImageOutcome;
|
||||
typedef std::future<IndexImageOutcome> IndexImageOutcomeCallable;
|
||||
typedef std::function<void(const ImmClient*, const Model::IndexImageRequest&, const IndexImageOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> IndexImageAsyncHandler;
|
||||
@@ -397,6 +404,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::RefreshOfficePreviewTokenResult> RefreshOfficePreviewTokenOutcome;
|
||||
typedef std::future<RefreshOfficePreviewTokenOutcome> RefreshOfficePreviewTokenOutcomeCallable;
|
||||
typedef std::function<void(const ImmClient*, const Model::RefreshOfficePreviewTokenRequest&, const RefreshOfficePreviewTokenOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RefreshOfficePreviewTokenAsyncHandler;
|
||||
typedef Outcome<Error, Model::RefreshWebofficeTokenResult> RefreshWebofficeTokenOutcome;
|
||||
typedef std::future<RefreshWebofficeTokenOutcome> RefreshWebofficeTokenOutcomeCallable;
|
||||
typedef std::function<void(const ImmClient*, const Model::RefreshWebofficeTokenRequest&, const RefreshWebofficeTokenOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> RefreshWebofficeTokenAsyncHandler;
|
||||
typedef Outcome<Error, Model::SearchDocIndexResult> SearchDocIndexOutcome;
|
||||
typedef std::future<SearchDocIndexOutcome> SearchDocIndexOutcomeCallable;
|
||||
typedef std::function<void(const ImmClient*, const Model::SearchDocIndexRequest&, const SearchDocIndexOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> SearchDocIndexAsyncHandler;
|
||||
@@ -582,6 +592,9 @@ namespace AlibabaCloud
|
||||
GetVideoTaskOutcome getVideoTask(const Model::GetVideoTaskRequest &request)const;
|
||||
void getVideoTaskAsync(const Model::GetVideoTaskRequest& request, const GetVideoTaskAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetVideoTaskOutcomeCallable getVideoTaskCallable(const Model::GetVideoTaskRequest& request) const;
|
||||
GetWebofficeURLOutcome getWebofficeURL(const Model::GetWebofficeURLRequest &request)const;
|
||||
void getWebofficeURLAsync(const Model::GetWebofficeURLRequest& request, const GetWebofficeURLAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
GetWebofficeURLOutcomeCallable getWebofficeURLCallable(const Model::GetWebofficeURLRequest& request) const;
|
||||
IndexImageOutcome indexImage(const Model::IndexImageRequest &request)const;
|
||||
void indexImageAsync(const Model::IndexImageRequest& request, const IndexImageAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
IndexImageOutcomeCallable indexImageCallable(const Model::IndexImageRequest& request) const;
|
||||
@@ -636,6 +649,9 @@ namespace AlibabaCloud
|
||||
RefreshOfficePreviewTokenOutcome refreshOfficePreviewToken(const Model::RefreshOfficePreviewTokenRequest &request)const;
|
||||
void refreshOfficePreviewTokenAsync(const Model::RefreshOfficePreviewTokenRequest& request, const RefreshOfficePreviewTokenAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
RefreshOfficePreviewTokenOutcomeCallable refreshOfficePreviewTokenCallable(const Model::RefreshOfficePreviewTokenRequest& request) const;
|
||||
RefreshWebofficeTokenOutcome refreshWebofficeToken(const Model::RefreshWebofficeTokenRequest &request)const;
|
||||
void refreshWebofficeTokenAsync(const Model::RefreshWebofficeTokenRequest& request, const RefreshWebofficeTokenAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
RefreshWebofficeTokenOutcomeCallable refreshWebofficeTokenCallable(const Model::RefreshWebofficeTokenRequest& request) const;
|
||||
SearchDocIndexOutcome searchDocIndex(const Model::SearchDocIndexRequest &request)const;
|
||||
void searchDocIndexAsync(const Model::SearchDocIndexRequest& request, const SearchDocIndexAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
SearchDocIndexOutcomeCallable searchDocIndexCallable(const Model::SearchDocIndexRequest& request) const;
|
||||
|
||||
72
imm/include/alibabacloud/imm/model/GetWebofficeURLRequest.h
Normal file
72
imm/include/alibabacloud/imm/model/GetWebofficeURLRequest.h
Normal file
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* 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_GETWEBOFFICEURLREQUEST_H_
|
||||
#define ALIBABACLOUD_IMM_MODEL_GETWEBOFFICEURLREQUEST_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 GetWebofficeURLRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
GetWebofficeURLRequest();
|
||||
~GetWebofficeURLRequest();
|
||||
|
||||
std::string getSrcType()const;
|
||||
void setSrcType(const std::string& srcType);
|
||||
std::string getProject()const;
|
||||
void setProject(const std::string& project);
|
||||
std::string getAccessKeyId()const;
|
||||
void setAccessKeyId(const std::string& accessKeyId);
|
||||
std::string getFile()const;
|
||||
void setFile(const std::string& file);
|
||||
std::string getNotifyEndpoint()const;
|
||||
void setNotifyEndpoint(const std::string& notifyEndpoint);
|
||||
std::string getFileID()const;
|
||||
void setFileID(const std::string& fileID);
|
||||
std::string getNotifyTopicName()const;
|
||||
void setNotifyTopicName(const std::string& notifyTopicName);
|
||||
std::string getPermission()const;
|
||||
void setPermission(const std::string& permission);
|
||||
std::string getUser()const;
|
||||
void setUser(const std::string& user);
|
||||
|
||||
private:
|
||||
std::string srcType_;
|
||||
std::string project_;
|
||||
std::string accessKeyId_;
|
||||
std::string file_;
|
||||
std::string notifyEndpoint_;
|
||||
std::string fileID_;
|
||||
std::string notifyTopicName_;
|
||||
std::string permission_;
|
||||
std::string user_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_IMM_MODEL_GETWEBOFFICEURLREQUEST_H_
|
||||
59
imm/include/alibabacloud/imm/model/GetWebofficeURLResult.h
Normal file
59
imm/include/alibabacloud/imm/model/GetWebofficeURLResult.h
Normal 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_IMM_MODEL_GETWEBOFFICEURLRESULT_H_
|
||||
#define ALIBABACLOUD_IMM_MODEL_GETWEBOFFICEURLRESULT_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 GetWebofficeURLResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
GetWebofficeURLResult();
|
||||
explicit GetWebofficeURLResult(const std::string &payload);
|
||||
~GetWebofficeURLResult();
|
||||
std::string getRefreshToken()const;
|
||||
std::string getAccessToken()const;
|
||||
std::string getRefreshTokenExpiredTime()const;
|
||||
std::string getWebofficeURL()const;
|
||||
std::string getAccessTokenExpiredTime()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string refreshToken_;
|
||||
std::string accessToken_;
|
||||
std::string refreshTokenExpiredTime_;
|
||||
std::string webofficeURL_;
|
||||
std::string accessTokenExpiredTime_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_IMM_MODEL_GETWEBOFFICEURLRESULT_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_IMM_MODEL_REFRESHWEBOFFICETOKENREQUEST_H_
|
||||
#define ALIBABACLOUD_IMM_MODEL_REFRESHWEBOFFICETOKENREQUEST_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 RefreshWebofficeTokenRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
RefreshWebofficeTokenRequest();
|
||||
~RefreshWebofficeTokenRequest();
|
||||
|
||||
std::string getProject()const;
|
||||
void setProject(const std::string& project);
|
||||
std::string getAccessToken()const;
|
||||
void setAccessToken(const std::string& accessToken);
|
||||
std::string getAccessKeyId()const;
|
||||
void setAccessKeyId(const std::string& accessKeyId);
|
||||
std::string getRefreshToken()const;
|
||||
void setRefreshToken(const std::string& refreshToken);
|
||||
|
||||
private:
|
||||
std::string project_;
|
||||
std::string accessToken_;
|
||||
std::string accessKeyId_;
|
||||
std::string refreshToken_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_IMM_MODEL_REFRESHWEBOFFICETOKENREQUEST_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_IMM_MODEL_REFRESHWEBOFFICETOKENRESULT_H_
|
||||
#define ALIBABACLOUD_IMM_MODEL_REFRESHWEBOFFICETOKENRESULT_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 RefreshWebofficeTokenResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
RefreshWebofficeTokenResult();
|
||||
explicit RefreshWebofficeTokenResult(const std::string &payload);
|
||||
~RefreshWebofficeTokenResult();
|
||||
std::string getRefreshToken()const;
|
||||
std::string getAccessToken()const;
|
||||
std::string getRefreshTokenExpiredTime()const;
|
||||
std::string getAccessTokenExpiredTime()const;
|
||||
|
||||
protected:
|
||||
void parse(const std::string &payload);
|
||||
private:
|
||||
std::string refreshToken_;
|
||||
std::string accessToken_;
|
||||
std::string refreshTokenExpiredTime_;
|
||||
std::string accessTokenExpiredTime_;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // !ALIBABACLOUD_IMM_MODEL_REFRESHWEBOFFICETOKENRESULT_H_
|
||||
@@ -31,21 +31,21 @@ ImmClient::ImmClient(const Credentials &credentials, const ClientConfiguration &
|
||||
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "imm");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
|
||||
}
|
||||
|
||||
ImmClient::ImmClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
|
||||
RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "imm");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
|
||||
}
|
||||
|
||||
ImmClient::ImmClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
|
||||
RpcServiceClient(SERVICE_NAME, std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "imm");
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), SERVICE_NAME, "");
|
||||
}
|
||||
|
||||
ImmClient::~ImmClient()
|
||||
@@ -1923,6 +1923,42 @@ ImmClient::GetVideoTaskOutcomeCallable ImmClient::getVideoTaskCallable(const Get
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ImmClient::GetWebofficeURLOutcome ImmClient::getWebofficeURL(const GetWebofficeURLRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetWebofficeURLOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetWebofficeURLOutcome(GetWebofficeURLResult(outcome.result()));
|
||||
else
|
||||
return GetWebofficeURLOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void ImmClient::getWebofficeURLAsync(const GetWebofficeURLRequest& request, const GetWebofficeURLAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getWebofficeURL(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
ImmClient::GetWebofficeURLOutcomeCallable ImmClient::getWebofficeURLCallable(const GetWebofficeURLRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetWebofficeURLOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getWebofficeURL(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ImmClient::IndexImageOutcome ImmClient::indexImage(const IndexImageRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
@@ -2571,6 +2607,42 @@ ImmClient::RefreshOfficePreviewTokenOutcomeCallable ImmClient::refreshOfficePrev
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ImmClient::RefreshWebofficeTokenOutcome ImmClient::refreshWebofficeToken(const RefreshWebofficeTokenRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return RefreshWebofficeTokenOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return RefreshWebofficeTokenOutcome(RefreshWebofficeTokenResult(outcome.result()));
|
||||
else
|
||||
return RefreshWebofficeTokenOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void ImmClient::refreshWebofficeTokenAsync(const RefreshWebofficeTokenRequest& request, const RefreshWebofficeTokenAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, refreshWebofficeToken(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
ImmClient::RefreshWebofficeTokenOutcomeCallable ImmClient::refreshWebofficeTokenCallable(const RefreshWebofficeTokenRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<RefreshWebofficeTokenOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->refreshWebofficeToken(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ImmClient::SearchDocIndexOutcome ImmClient::searchDocIndex(const SearchDocIndexRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
128
imm/src/model/GetWebofficeURLRequest.cc
Normal file
128
imm/src/model/GetWebofficeURLRequest.cc
Normal file
@@ -0,0 +1,128 @@
|
||||
/*
|
||||
* 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/GetWebofficeURLRequest.h>
|
||||
|
||||
using AlibabaCloud::Imm::Model::GetWebofficeURLRequest;
|
||||
|
||||
GetWebofficeURLRequest::GetWebofficeURLRequest() :
|
||||
RpcServiceRequest("imm", "2017-09-06", "GetWebofficeURL")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
GetWebofficeURLRequest::~GetWebofficeURLRequest()
|
||||
{}
|
||||
|
||||
std::string GetWebofficeURLRequest::getSrcType()const
|
||||
{
|
||||
return srcType_;
|
||||
}
|
||||
|
||||
void GetWebofficeURLRequest::setSrcType(const std::string& srcType)
|
||||
{
|
||||
srcType_ = srcType;
|
||||
setParameter("SrcType", srcType);
|
||||
}
|
||||
|
||||
std::string GetWebofficeURLRequest::getProject()const
|
||||
{
|
||||
return project_;
|
||||
}
|
||||
|
||||
void GetWebofficeURLRequest::setProject(const std::string& project)
|
||||
{
|
||||
project_ = project;
|
||||
setParameter("Project", project);
|
||||
}
|
||||
|
||||
std::string GetWebofficeURLRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void GetWebofficeURLRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
std::string GetWebofficeURLRequest::getFile()const
|
||||
{
|
||||
return file_;
|
||||
}
|
||||
|
||||
void GetWebofficeURLRequest::setFile(const std::string& file)
|
||||
{
|
||||
file_ = file;
|
||||
setParameter("File", file);
|
||||
}
|
||||
|
||||
std::string GetWebofficeURLRequest::getNotifyEndpoint()const
|
||||
{
|
||||
return notifyEndpoint_;
|
||||
}
|
||||
|
||||
void GetWebofficeURLRequest::setNotifyEndpoint(const std::string& notifyEndpoint)
|
||||
{
|
||||
notifyEndpoint_ = notifyEndpoint;
|
||||
setParameter("NotifyEndpoint", notifyEndpoint);
|
||||
}
|
||||
|
||||
std::string GetWebofficeURLRequest::getFileID()const
|
||||
{
|
||||
return fileID_;
|
||||
}
|
||||
|
||||
void GetWebofficeURLRequest::setFileID(const std::string& fileID)
|
||||
{
|
||||
fileID_ = fileID;
|
||||
setParameter("FileID", fileID);
|
||||
}
|
||||
|
||||
std::string GetWebofficeURLRequest::getNotifyTopicName()const
|
||||
{
|
||||
return notifyTopicName_;
|
||||
}
|
||||
|
||||
void GetWebofficeURLRequest::setNotifyTopicName(const std::string& notifyTopicName)
|
||||
{
|
||||
notifyTopicName_ = notifyTopicName;
|
||||
setParameter("NotifyTopicName", notifyTopicName);
|
||||
}
|
||||
|
||||
std::string GetWebofficeURLRequest::getPermission()const
|
||||
{
|
||||
return permission_;
|
||||
}
|
||||
|
||||
void GetWebofficeURLRequest::setPermission(const std::string& permission)
|
||||
{
|
||||
permission_ = permission;
|
||||
setParameter("Permission", permission);
|
||||
}
|
||||
|
||||
std::string GetWebofficeURLRequest::getUser()const
|
||||
{
|
||||
return user_;
|
||||
}
|
||||
|
||||
void GetWebofficeURLRequest::setUser(const std::string& user)
|
||||
{
|
||||
user_ = user;
|
||||
setParameter("User", user);
|
||||
}
|
||||
|
||||
79
imm/src/model/GetWebofficeURLResult.cc
Normal file
79
imm/src/model/GetWebofficeURLResult.cc
Normal file
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
* 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/GetWebofficeURLResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Imm;
|
||||
using namespace AlibabaCloud::Imm::Model;
|
||||
|
||||
GetWebofficeURLResult::GetWebofficeURLResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetWebofficeURLResult::GetWebofficeURLResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetWebofficeURLResult::~GetWebofficeURLResult()
|
||||
{}
|
||||
|
||||
void GetWebofficeURLResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["WebofficeURL"].isNull())
|
||||
webofficeURL_ = value["WebofficeURL"].asString();
|
||||
if(!value["AccessToken"].isNull())
|
||||
accessToken_ = value["AccessToken"].asString();
|
||||
if(!value["RefreshToken"].isNull())
|
||||
refreshToken_ = value["RefreshToken"].asString();
|
||||
if(!value["AccessTokenExpiredTime"].isNull())
|
||||
accessTokenExpiredTime_ = value["AccessTokenExpiredTime"].asString();
|
||||
if(!value["RefreshTokenExpiredTime"].isNull())
|
||||
refreshTokenExpiredTime_ = value["RefreshTokenExpiredTime"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GetWebofficeURLResult::getRefreshToken()const
|
||||
{
|
||||
return refreshToken_;
|
||||
}
|
||||
|
||||
std::string GetWebofficeURLResult::getAccessToken()const
|
||||
{
|
||||
return accessToken_;
|
||||
}
|
||||
|
||||
std::string GetWebofficeURLResult::getRefreshTokenExpiredTime()const
|
||||
{
|
||||
return refreshTokenExpiredTime_;
|
||||
}
|
||||
|
||||
std::string GetWebofficeURLResult::getWebofficeURL()const
|
||||
{
|
||||
return webofficeURL_;
|
||||
}
|
||||
|
||||
std::string GetWebofficeURLResult::getAccessTokenExpiredTime()const
|
||||
{
|
||||
return accessTokenExpiredTime_;
|
||||
}
|
||||
|
||||
73
imm/src/model/RefreshWebofficeTokenRequest.cc
Normal file
73
imm/src/model/RefreshWebofficeTokenRequest.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/imm/model/RefreshWebofficeTokenRequest.h>
|
||||
|
||||
using AlibabaCloud::Imm::Model::RefreshWebofficeTokenRequest;
|
||||
|
||||
RefreshWebofficeTokenRequest::RefreshWebofficeTokenRequest() :
|
||||
RpcServiceRequest("imm", "2017-09-06", "RefreshWebofficeToken")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
RefreshWebofficeTokenRequest::~RefreshWebofficeTokenRequest()
|
||||
{}
|
||||
|
||||
std::string RefreshWebofficeTokenRequest::getProject()const
|
||||
{
|
||||
return project_;
|
||||
}
|
||||
|
||||
void RefreshWebofficeTokenRequest::setProject(const std::string& project)
|
||||
{
|
||||
project_ = project;
|
||||
setParameter("Project", project);
|
||||
}
|
||||
|
||||
std::string RefreshWebofficeTokenRequest::getAccessToken()const
|
||||
{
|
||||
return accessToken_;
|
||||
}
|
||||
|
||||
void RefreshWebofficeTokenRequest::setAccessToken(const std::string& accessToken)
|
||||
{
|
||||
accessToken_ = accessToken;
|
||||
setParameter("AccessToken", accessToken);
|
||||
}
|
||||
|
||||
std::string RefreshWebofficeTokenRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void RefreshWebofficeTokenRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
std::string RefreshWebofficeTokenRequest::getRefreshToken()const
|
||||
{
|
||||
return refreshToken_;
|
||||
}
|
||||
|
||||
void RefreshWebofficeTokenRequest::setRefreshToken(const std::string& refreshToken)
|
||||
{
|
||||
refreshToken_ = refreshToken;
|
||||
setParameter("RefreshToken", refreshToken);
|
||||
}
|
||||
|
||||
72
imm/src/model/RefreshWebofficeTokenResult.cc
Normal file
72
imm/src/model/RefreshWebofficeTokenResult.cc
Normal file
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* 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/RefreshWebofficeTokenResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Imm;
|
||||
using namespace AlibabaCloud::Imm::Model;
|
||||
|
||||
RefreshWebofficeTokenResult::RefreshWebofficeTokenResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
RefreshWebofficeTokenResult::RefreshWebofficeTokenResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
RefreshWebofficeTokenResult::~RefreshWebofficeTokenResult()
|
||||
{}
|
||||
|
||||
void RefreshWebofficeTokenResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["AccessToken"].isNull())
|
||||
accessToken_ = value["AccessToken"].asString();
|
||||
if(!value["AccessTokenExpiredTime"].isNull())
|
||||
accessTokenExpiredTime_ = value["AccessTokenExpiredTime"].asString();
|
||||
if(!value["RefreshToken"].isNull())
|
||||
refreshToken_ = value["RefreshToken"].asString();
|
||||
if(!value["RefreshTokenExpiredTime"].isNull())
|
||||
refreshTokenExpiredTime_ = value["RefreshTokenExpiredTime"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string RefreshWebofficeTokenResult::getRefreshToken()const
|
||||
{
|
||||
return refreshToken_;
|
||||
}
|
||||
|
||||
std::string RefreshWebofficeTokenResult::getAccessToken()const
|
||||
{
|
||||
return accessToken_;
|
||||
}
|
||||
|
||||
std::string RefreshWebofficeTokenResult::getRefreshTokenExpiredTime()const
|
||||
{
|
||||
return refreshTokenExpiredTime_;
|
||||
}
|
||||
|
||||
std::string RefreshWebofficeTokenResult::getAccessTokenExpiredTime()const
|
||||
{
|
||||
return accessTokenExpiredTime_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user