Supported GetOfficePreviewURL.
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
2020-02-05 Version 1.36.249
|
||||
- Supported GetOfficePreviewURL.
|
||||
- Supported RefreshOfficePreviewToken.
|
||||
|
||||
2020-02-04 Version 1.36.248
|
||||
- Update default endpoints.
|
||||
|
||||
|
||||
@@ -153,6 +153,8 @@ set(imm_public_header_model
|
||||
include/alibabacloud/imm/model/ListVideosResult.h
|
||||
include/alibabacloud/imm/model/PutProjectRequest.h
|
||||
include/alibabacloud/imm/model/PutProjectResult.h
|
||||
include/alibabacloud/imm/model/RefreshOfficePreviewTokenRequest.h
|
||||
include/alibabacloud/imm/model/RefreshOfficePreviewTokenResult.h
|
||||
include/alibabacloud/imm/model/SearchDocIndexRequest.h
|
||||
include/alibabacloud/imm/model/SearchDocIndexResult.h
|
||||
include/alibabacloud/imm/model/UpdateDocIndexMetaRequest.h
|
||||
@@ -300,6 +302,8 @@ set(imm_src
|
||||
src/model/ListVideosResult.cc
|
||||
src/model/PutProjectRequest.cc
|
||||
src/model/PutProjectResult.cc
|
||||
src/model/RefreshOfficePreviewTokenRequest.cc
|
||||
src/model/RefreshOfficePreviewTokenResult.cc
|
||||
src/model/SearchDocIndexRequest.cc
|
||||
src/model/SearchDocIndexResult.cc
|
||||
src/model/UpdateDocIndexMetaRequest.cc
|
||||
|
||||
@@ -154,6 +154,8 @@
|
||||
#include "model/ListVideosResult.h"
|
||||
#include "model/PutProjectRequest.h"
|
||||
#include "model/PutProjectResult.h"
|
||||
#include "model/RefreshOfficePreviewTokenRequest.h"
|
||||
#include "model/RefreshOfficePreviewTokenResult.h"
|
||||
#include "model/SearchDocIndexRequest.h"
|
||||
#include "model/SearchDocIndexResult.h"
|
||||
#include "model/UpdateDocIndexMetaRequest.h"
|
||||
@@ -373,6 +375,9 @@ namespace AlibabaCloud
|
||||
typedef Outcome<Error, Model::PutProjectResult> PutProjectOutcome;
|
||||
typedef std::future<PutProjectOutcome> PutProjectOutcomeCallable;
|
||||
typedef std::function<void(const ImmClient*, const Model::PutProjectRequest&, const PutProjectOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> PutProjectAsyncHandler;
|
||||
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::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;
|
||||
@@ -594,6 +599,9 @@ namespace AlibabaCloud
|
||||
PutProjectOutcome putProject(const Model::PutProjectRequest &request)const;
|
||||
void putProjectAsync(const Model::PutProjectRequest& request, const PutProjectAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
|
||||
PutProjectOutcomeCallable putProjectCallable(const Model::PutProjectRequest& request) const;
|
||||
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;
|
||||
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;
|
||||
|
||||
@@ -37,8 +37,6 @@ namespace AlibabaCloud
|
||||
|
||||
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;
|
||||
@@ -50,7 +48,6 @@ namespace AlibabaCloud
|
||||
|
||||
private:
|
||||
std::string srcType_;
|
||||
int expires_;
|
||||
std::string project_;
|
||||
std::string accessKeyId_;
|
||||
bool useHTTPS_;
|
||||
|
||||
@@ -38,11 +38,19 @@ namespace AlibabaCloud
|
||||
explicit GetOfficePreviewURLResult(const std::string &payload);
|
||||
~GetOfficePreviewURLResult();
|
||||
std::string getPreviewURL()const;
|
||||
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 previewURL_;
|
||||
std::string refreshToken_;
|
||||
std::string accessToken_;
|
||||
std::string refreshTokenExpiredTime_;
|
||||
std::string accessTokenExpiredTime_;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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_REFRESHOFFICEPREVIEWTOKENREQUEST_H_
|
||||
#define ALIBABACLOUD_IMM_MODEL_REFRESHOFFICEPREVIEWTOKENREQUEST_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 RefreshOfficePreviewTokenRequest : public RpcServiceRequest
|
||||
{
|
||||
|
||||
public:
|
||||
RefreshOfficePreviewTokenRequest();
|
||||
~RefreshOfficePreviewTokenRequest();
|
||||
|
||||
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_REFRESHOFFICEPREVIEWTOKENREQUEST_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_REFRESHOFFICEPREVIEWTOKENRESULT_H_
|
||||
#define ALIBABACLOUD_IMM_MODEL_REFRESHOFFICEPREVIEWTOKENRESULT_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 RefreshOfficePreviewTokenResult : public ServiceResult
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
RefreshOfficePreviewTokenResult();
|
||||
explicit RefreshOfficePreviewTokenResult(const std::string &payload);
|
||||
~RefreshOfficePreviewTokenResult();
|
||||
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_REFRESHOFFICEPREVIEWTOKENRESULT_H_
|
||||
@@ -2427,6 +2427,42 @@ ImmClient::PutProjectOutcomeCallable ImmClient::putProjectCallable(const PutProj
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ImmClient::RefreshOfficePreviewTokenOutcome ImmClient::refreshOfficePreviewToken(const RefreshOfficePreviewTokenRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return RefreshOfficePreviewTokenOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return RefreshOfficePreviewTokenOutcome(RefreshOfficePreviewTokenResult(outcome.result()));
|
||||
else
|
||||
return RefreshOfficePreviewTokenOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void ImmClient::refreshOfficePreviewTokenAsync(const RefreshOfficePreviewTokenRequest& request, const RefreshOfficePreviewTokenAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, refreshOfficePreviewToken(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
ImmClient::RefreshOfficePreviewTokenOutcomeCallable ImmClient::refreshOfficePreviewTokenCallable(const RefreshOfficePreviewTokenRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<RefreshOfficePreviewTokenOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->refreshOfficePreviewToken(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
ImmClient::SearchDocIndexOutcome ImmClient::searchDocIndex(const SearchDocIndexRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpointProvider_->getEndpoint();
|
||||
|
||||
@@ -38,17 +38,6 @@ void GetOfficePreviewURLRequest::setSrcType(const std::string& 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_;
|
||||
|
||||
@@ -41,6 +41,14 @@ void GetOfficePreviewURLResult::parse(const std::string &payload)
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["PreviewURL"].isNull())
|
||||
previewURL_ = value["PreviewURL"].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();
|
||||
|
||||
}
|
||||
|
||||
@@ -49,3 +57,23 @@ std::string GetOfficePreviewURLResult::getPreviewURL()const
|
||||
return previewURL_;
|
||||
}
|
||||
|
||||
std::string GetOfficePreviewURLResult::getRefreshToken()const
|
||||
{
|
||||
return refreshToken_;
|
||||
}
|
||||
|
||||
std::string GetOfficePreviewURLResult::getAccessToken()const
|
||||
{
|
||||
return accessToken_;
|
||||
}
|
||||
|
||||
std::string GetOfficePreviewURLResult::getRefreshTokenExpiredTime()const
|
||||
{
|
||||
return refreshTokenExpiredTime_;
|
||||
}
|
||||
|
||||
std::string GetOfficePreviewURLResult::getAccessTokenExpiredTime()const
|
||||
{
|
||||
return accessTokenExpiredTime_;
|
||||
}
|
||||
|
||||
|
||||
73
imm/src/model/RefreshOfficePreviewTokenRequest.cc
Normal file
73
imm/src/model/RefreshOfficePreviewTokenRequest.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/RefreshOfficePreviewTokenRequest.h>
|
||||
|
||||
using AlibabaCloud::Imm::Model::RefreshOfficePreviewTokenRequest;
|
||||
|
||||
RefreshOfficePreviewTokenRequest::RefreshOfficePreviewTokenRequest() :
|
||||
RpcServiceRequest("imm", "2017-09-06", "RefreshOfficePreviewToken")
|
||||
{
|
||||
setMethod(HttpRequest::Method::Post);
|
||||
}
|
||||
|
||||
RefreshOfficePreviewTokenRequest::~RefreshOfficePreviewTokenRequest()
|
||||
{}
|
||||
|
||||
std::string RefreshOfficePreviewTokenRequest::getProject()const
|
||||
{
|
||||
return project_;
|
||||
}
|
||||
|
||||
void RefreshOfficePreviewTokenRequest::setProject(const std::string& project)
|
||||
{
|
||||
project_ = project;
|
||||
setCoreParameter("Project", project);
|
||||
}
|
||||
|
||||
std::string RefreshOfficePreviewTokenRequest::getAccessToken()const
|
||||
{
|
||||
return accessToken_;
|
||||
}
|
||||
|
||||
void RefreshOfficePreviewTokenRequest::setAccessToken(const std::string& accessToken)
|
||||
{
|
||||
accessToken_ = accessToken;
|
||||
setCoreParameter("AccessToken", accessToken);
|
||||
}
|
||||
|
||||
std::string RefreshOfficePreviewTokenRequest::getAccessKeyId()const
|
||||
{
|
||||
return accessKeyId_;
|
||||
}
|
||||
|
||||
void RefreshOfficePreviewTokenRequest::setAccessKeyId(const std::string& accessKeyId)
|
||||
{
|
||||
accessKeyId_ = accessKeyId;
|
||||
setCoreParameter("AccessKeyId", accessKeyId);
|
||||
}
|
||||
|
||||
std::string RefreshOfficePreviewTokenRequest::getRefreshToken()const
|
||||
{
|
||||
return refreshToken_;
|
||||
}
|
||||
|
||||
void RefreshOfficePreviewTokenRequest::setRefreshToken(const std::string& refreshToken)
|
||||
{
|
||||
refreshToken_ = refreshToken;
|
||||
setCoreParameter("RefreshToken", refreshToken);
|
||||
}
|
||||
|
||||
72
imm/src/model/RefreshOfficePreviewTokenResult.cc
Normal file
72
imm/src/model/RefreshOfficePreviewTokenResult.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/RefreshOfficePreviewTokenResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Imm;
|
||||
using namespace AlibabaCloud::Imm::Model;
|
||||
|
||||
RefreshOfficePreviewTokenResult::RefreshOfficePreviewTokenResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
RefreshOfficePreviewTokenResult::RefreshOfficePreviewTokenResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
RefreshOfficePreviewTokenResult::~RefreshOfficePreviewTokenResult()
|
||||
{}
|
||||
|
||||
void RefreshOfficePreviewTokenResult::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 RefreshOfficePreviewTokenResult::getRefreshToken()const
|
||||
{
|
||||
return refreshToken_;
|
||||
}
|
||||
|
||||
std::string RefreshOfficePreviewTokenResult::getAccessToken()const
|
||||
{
|
||||
return accessToken_;
|
||||
}
|
||||
|
||||
std::string RefreshOfficePreviewTokenResult::getRefreshTokenExpiredTime()const
|
||||
{
|
||||
return refreshTokenExpiredTime_;
|
||||
}
|
||||
|
||||
std::string RefreshOfficePreviewTokenResult::getAccessTokenExpiredTime()const
|
||||
{
|
||||
return accessTokenExpiredTime_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user