Compare commits

..

3 Commits

Author SHA1 Message Date
sdk-team
58b8b52591 Add GetImageInfos api. 2022-07-28 06:42:44 +00:00
sdk-team
29faefa1ab Support ListProxies API to return protocolType, protocolPort and remove mysqlPort. 2022-07-27 08:32:23 +00:00
sdk-team
b03b322c96 Update. 2022-07-27 02:04:47 +00:00
13 changed files with 375 additions and 10 deletions

View File

@@ -1,3 +1,13 @@
2022-07-28 Version: 1.36.1209
- Add GetImageInfos api.
2022-07-27 Version: 1.36.1208
- Support ListProxies API to return protocolType, protocolPort and remove mysqlPort.
- Support GetProxy API to return protocolType, protocolPort and remove mysqlPort.
2022-07-27 Version: 1.36.1207
- Update.
2022-07-26 Version: 1.36.1206
- Change ListCheckInstanceResult Public.

View File

@@ -1 +1 @@
1.36.1206
1.36.1209

View File

@@ -44,8 +44,9 @@ namespace AlibabaCloud
long getCreatorId()const;
bool getSuccess()const;
bool getPublicEnable()const;
int getMysqlPort()const;
std::string getProtocolType()const;
std::string getErrorCode()const;
int getProtocolPort()const;
std::string getErrorMessage()const;
bool getPrivateEnable()const;
std::string getCreatorName()const;
@@ -61,8 +62,9 @@ namespace AlibabaCloud
long creatorId_;
bool success_;
bool publicEnable_;
int mysqlPort_;
std::string protocolType_;
std::string errorCode_;
int protocolPort_;
std::string errorMessage_;
bool privateEnable_;
std::string creatorName_;

View File

@@ -39,7 +39,8 @@ namespace AlibabaCloud
long instanceId;
long proxyId;
long creatorId;
int mysqlPort;
std::string protocolType;
int protocolPort;
bool privateEnable;
std::string creatorName;
bool publicEnable;

View File

@@ -61,10 +61,12 @@ void GetProxyResult::parse(const std::string &payload)
publicEnable_ = value["PublicEnable"].asString() == "true";
if(!value["PublicHost"].isNull())
publicHost_ = value["PublicHost"].asString();
if(!value["MysqlPort"].isNull())
mysqlPort_ = std::stoi(value["MysqlPort"].asString());
if(!value["HttpsPort"].isNull())
httpsPort_ = std::stoi(value["HttpsPort"].asString());
if(!value["ProtocolType"].isNull())
protocolType_ = value["ProtocolType"].asString();
if(!value["ProtocolPort"].isNull())
protocolPort_ = std::stoi(value["ProtocolPort"].asString());
}
@@ -103,9 +105,9 @@ bool GetProxyResult::getPublicEnable()const
return publicEnable_;
}
int GetProxyResult::getMysqlPort()const
std::string GetProxyResult::getProtocolType()const
{
return mysqlPort_;
return protocolType_;
}
std::string GetProxyResult::getErrorCode()const
@@ -113,6 +115,11 @@ std::string GetProxyResult::getErrorCode()const
return errorCode_;
}
int GetProxyResult::getProtocolPort()const
{
return protocolPort_;
}
std::string GetProxyResult::getErrorMessage()const
{
return errorMessage_;

View File

@@ -59,10 +59,12 @@ void ListProxiesResult::parse(const std::string &payload)
proxyListObject.publicEnable = valueProxyListProxyListItem["PublicEnable"].asString() == "true";
if(!valueProxyListProxyListItem["PublicHost"].isNull())
proxyListObject.publicHost = valueProxyListProxyListItem["PublicHost"].asString();
if(!valueProxyListProxyListItem["MysqlPort"].isNull())
proxyListObject.mysqlPort = std::stoi(valueProxyListProxyListItem["MysqlPort"].asString());
if(!valueProxyListProxyListItem["HttpsPort"].isNull())
proxyListObject.httpsPort = std::stoi(valueProxyListProxyListItem["HttpsPort"].asString());
if(!valueProxyListProxyListItem["ProtocolType"].isNull())
proxyListObject.protocolType = valueProxyListProxyListItem["ProtocolType"].asString();
if(!valueProxyListProxyListItem["ProtocolPort"].isNull())
proxyListObject.protocolPort = std::stoi(valueProxyListProxyListItem["ProtocolPort"].asString());
proxyList_.push_back(proxyListObject);
}
if(!value["Success"].isNull())

View File

@@ -159,6 +159,8 @@ set(vod_public_header_model
include/alibabacloud/vod/model/GetEditingProjectMaterialsResult.h
include/alibabacloud/vod/model/GetImageInfoRequest.h
include/alibabacloud/vod/model/GetImageInfoResult.h
include/alibabacloud/vod/model/GetImageInfosRequest.h
include/alibabacloud/vod/model/GetImageInfosResult.h
include/alibabacloud/vod/model/GetMediaAuditAudioResultDetailRequest.h
include/alibabacloud/vod/model/GetMediaAuditAudioResultDetailResult.h
include/alibabacloud/vod/model/GetMediaAuditResultRequest.h
@@ -450,6 +452,8 @@ set(vod_src
src/model/GetEditingProjectMaterialsResult.cc
src/model/GetImageInfoRequest.cc
src/model/GetImageInfoResult.cc
src/model/GetImageInfosRequest.cc
src/model/GetImageInfosResult.cc
src/model/GetMediaAuditAudioResultDetailRequest.cc
src/model/GetMediaAuditAudioResultDetailResult.cc
src/model/GetMediaAuditResultRequest.cc

View File

@@ -160,6 +160,8 @@
#include "model/GetEditingProjectMaterialsResult.h"
#include "model/GetImageInfoRequest.h"
#include "model/GetImageInfoResult.h"
#include "model/GetImageInfosRequest.h"
#include "model/GetImageInfosResult.h"
#include "model/GetMediaAuditAudioResultDetailRequest.h"
#include "model/GetMediaAuditAudioResultDetailResult.h"
#include "model/GetMediaAuditResultRequest.h"
@@ -526,6 +528,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::GetImageInfoResult> GetImageInfoOutcome;
typedef std::future<GetImageInfoOutcome> GetImageInfoOutcomeCallable;
typedef std::function<void(const VodClient*, const Model::GetImageInfoRequest&, const GetImageInfoOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetImageInfoAsyncHandler;
typedef Outcome<Error, Model::GetImageInfosResult> GetImageInfosOutcome;
typedef std::future<GetImageInfosOutcome> GetImageInfosOutcomeCallable;
typedef std::function<void(const VodClient*, const Model::GetImageInfosRequest&, const GetImageInfosOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetImageInfosAsyncHandler;
typedef Outcome<Error, Model::GetMediaAuditAudioResultDetailResult> GetMediaAuditAudioResultDetailOutcome;
typedef std::future<GetMediaAuditAudioResultDetailOutcome> GetMediaAuditAudioResultDetailOutcomeCallable;
typedef std::function<void(const VodClient*, const Model::GetMediaAuditAudioResultDetailRequest&, const GetMediaAuditAudioResultDetailOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetMediaAuditAudioResultDetailAsyncHandler;
@@ -963,6 +968,9 @@ namespace AlibabaCloud
GetImageInfoOutcome getImageInfo(const Model::GetImageInfoRequest &request)const;
void getImageInfoAsync(const Model::GetImageInfoRequest& request, const GetImageInfoAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetImageInfoOutcomeCallable getImageInfoCallable(const Model::GetImageInfoRequest& request) const;
GetImageInfosOutcome getImageInfos(const Model::GetImageInfosRequest &request)const;
void getImageInfosAsync(const Model::GetImageInfosRequest& request, const GetImageInfosAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetImageInfosOutcomeCallable getImageInfosCallable(const Model::GetImageInfosRequest& request) const;
GetMediaAuditAudioResultDetailOutcome getMediaAuditAudioResultDetail(const Model::GetMediaAuditAudioResultDetailRequest &request)const;
void getMediaAuditAudioResultDetailAsync(const Model::GetMediaAuditAudioResultDetailRequest& request, const GetMediaAuditAudioResultDetailAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetMediaAuditAudioResultDetailOutcomeCallable getMediaAuditAudioResultDetailCallable(const Model::GetMediaAuditAudioResultDetailRequest& request) const;

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_VOD_MODEL_GETIMAGEINFOSREQUEST_H_
#define ALIBABACLOUD_VOD_MODEL_GETIMAGEINFOSREQUEST_H_
#include <alibabacloud/vod/VodExport.h>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <string>
#include <vector>
#include <map>
namespace AlibabaCloud {
namespace Vod {
namespace Model {
class ALIBABACLOUD_VOD_EXPORT GetImageInfosRequest : public RpcServiceRequest {
public:
GetImageInfosRequest();
~GetImageInfosRequest();
std::string getAccessKeyId() const;
void setAccessKeyId(const std::string &accessKeyId);
std::string getOutputType() const;
void setOutputType(const std::string &outputType);
long getAuthTimeout() const;
void setAuthTimeout(long authTimeout);
std::string getImageIds() const;
void setImageIds(const std::string &imageIds);
private:
std::string accessKeyId_;
std::string outputType_;
long authTimeout_;
std::string imageIds_;
};
} // namespace Model
} // namespace Vod
} // namespace AlibabaCloud
#endif // !ALIBABACLOUD_VOD_MODEL_GETIMAGEINFOSREQUEST_H_

View 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.
*/
#ifndef ALIBABACLOUD_VOD_MODEL_GETIMAGEINFOSRESULT_H_
#define ALIBABACLOUD_VOD_MODEL_GETIMAGEINFOSRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/vod/VodExport.h>
namespace AlibabaCloud
{
namespace Vod
{
namespace Model
{
class ALIBABACLOUD_VOD_EXPORT GetImageInfosResult : public ServiceResult
{
public:
struct Image
{
struct Mezzanine
{
std::string fileURL;
std::string originalFileName;
int height;
int width;
std::string fileSize;
};
std::string status;
std::string description;
Mezzanine mezzanine;
std::string title;
long cateId;
std::string cateName;
std::string uRL;
std::string imageType;
std::string auditStatus;
std::string appId;
std::string creationTime;
std::string imageId;
std::string regionId;
std::string storageLocation;
std::string tags;
};
GetImageInfosResult();
explicit GetImageInfosResult(const std::string &payload);
~GetImageInfosResult();
std::vector<std::string> getNonExistImageIds()const;
std::vector<Image> getImageInfo()const;
protected:
void parse(const std::string &payload);
private:
std::vector<std::string> nonExistImageIds_;
std::vector<Image> imageInfo_;
};
}
}
}
#endif // !ALIBABACLOUD_VOD_MODEL_GETIMAGEINFOSRESULT_H_

View File

@@ -2535,6 +2535,42 @@ VodClient::GetImageInfoOutcomeCallable VodClient::getImageInfoCallable(const Get
return task->get_future();
}
VodClient::GetImageInfosOutcome VodClient::getImageInfos(const GetImageInfosRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetImageInfosOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetImageInfosOutcome(GetImageInfosResult(outcome.result()));
else
return GetImageInfosOutcome(outcome.error());
}
void VodClient::getImageInfosAsync(const GetImageInfosRequest& request, const GetImageInfosAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getImageInfos(request), context);
};
asyncExecute(new Runnable(fn));
}
VodClient::GetImageInfosOutcomeCallable VodClient::getImageInfosCallable(const GetImageInfosRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetImageInfosOutcome()>>(
[this, request]()
{
return this->getImageInfos(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}
VodClient::GetMediaAuditAudioResultDetailOutcome VodClient::getMediaAuditAudioResultDetail(const GetMediaAuditAudioResultDetailRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();

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.
*/
#include <alibabacloud/vod/model/GetImageInfosRequest.h>
using AlibabaCloud::Vod::Model::GetImageInfosRequest;
GetImageInfosRequest::GetImageInfosRequest()
: RpcServiceRequest("vod", "2017-03-21", "GetImageInfos") {
setMethod(HttpRequest::Method::Post);
}
GetImageInfosRequest::~GetImageInfosRequest() {}
std::string GetImageInfosRequest::getAccessKeyId() const {
return accessKeyId_;
}
void GetImageInfosRequest::setAccessKeyId(const std::string &accessKeyId) {
accessKeyId_ = accessKeyId;
setParameter(std::string("AccessKeyId"), accessKeyId);
}
std::string GetImageInfosRequest::getOutputType() const {
return outputType_;
}
void GetImageInfosRequest::setOutputType(const std::string &outputType) {
outputType_ = outputType;
setParameter(std::string("OutputType"), outputType);
}
long GetImageInfosRequest::getAuthTimeout() const {
return authTimeout_;
}
void GetImageInfosRequest::setAuthTimeout(long authTimeout) {
authTimeout_ = authTimeout;
setParameter(std::string("AuthTimeout"), std::to_string(authTimeout));
}
std::string GetImageInfosRequest::getImageIds() const {
return imageIds_;
}
void GetImageInfosRequest::setImageIds(const std::string &imageIds) {
imageIds_ = imageIds;
setParameter(std::string("ImageIds"), imageIds);
}

View File

@@ -0,0 +1,102 @@
/*
* 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/vod/model/GetImageInfosResult.h>
#include <json/json.h>
using namespace AlibabaCloud::Vod;
using namespace AlibabaCloud::Vod::Model;
GetImageInfosResult::GetImageInfosResult() :
ServiceResult()
{}
GetImageInfosResult::GetImageInfosResult(const std::string &payload) :
ServiceResult()
{
parse(payload);
}
GetImageInfosResult::~GetImageInfosResult()
{}
void GetImageInfosResult::parse(const std::string &payload)
{
Json::Reader reader;
Json::Value value;
reader.parse(payload, value);
setRequestId(value["RequestId"].asString());
auto allImageInfoNode = value["ImageInfo"]["Image"];
for (auto valueImageInfoImage : allImageInfoNode)
{
Image imageInfoObject;
if(!valueImageInfoImage["CreationTime"].isNull())
imageInfoObject.creationTime = valueImageInfoImage["CreationTime"].asString();
if(!valueImageInfoImage["StorageLocation"].isNull())
imageInfoObject.storageLocation = valueImageInfoImage["StorageLocation"].asString();
if(!valueImageInfoImage["Status"].isNull())
imageInfoObject.status = valueImageInfoImage["Status"].asString();
if(!valueImageInfoImage["CateId"].isNull())
imageInfoObject.cateId = std::stol(valueImageInfoImage["CateId"].asString());
if(!valueImageInfoImage["Tags"].isNull())
imageInfoObject.tags = valueImageInfoImage["Tags"].asString();
if(!valueImageInfoImage["RegionId"].isNull())
imageInfoObject.regionId = valueImageInfoImage["RegionId"].asString();
if(!valueImageInfoImage["ImageType"].isNull())
imageInfoObject.imageType = valueImageInfoImage["ImageType"].asString();
if(!valueImageInfoImage["CateName"].isNull())
imageInfoObject.cateName = valueImageInfoImage["CateName"].asString();
if(!valueImageInfoImage["Description"].isNull())
imageInfoObject.description = valueImageInfoImage["Description"].asString();
if(!valueImageInfoImage["AppId"].isNull())
imageInfoObject.appId = valueImageInfoImage["AppId"].asString();
if(!valueImageInfoImage["URL"].isNull())
imageInfoObject.uRL = valueImageInfoImage["URL"].asString();
if(!valueImageInfoImage["Title"].isNull())
imageInfoObject.title = valueImageInfoImage["Title"].asString();
if(!valueImageInfoImage["ImageId"].isNull())
imageInfoObject.imageId = valueImageInfoImage["ImageId"].asString();
if(!valueImageInfoImage["AuditStatus"].isNull())
imageInfoObject.auditStatus = valueImageInfoImage["AuditStatus"].asString();
auto mezzanineNode = value["Mezzanine"];
if(!mezzanineNode["FileURL"].isNull())
imageInfoObject.mezzanine.fileURL = mezzanineNode["FileURL"].asString();
if(!mezzanineNode["OriginalFileName"].isNull())
imageInfoObject.mezzanine.originalFileName = mezzanineNode["OriginalFileName"].asString();
if(!mezzanineNode["Width"].isNull())
imageInfoObject.mezzanine.width = std::stoi(mezzanineNode["Width"].asString());
if(!mezzanineNode["Height"].isNull())
imageInfoObject.mezzanine.height = std::stoi(mezzanineNode["Height"].asString());
if(!mezzanineNode["FileSize"].isNull())
imageInfoObject.mezzanine.fileSize = mezzanineNode["FileSize"].asString();
imageInfo_.push_back(imageInfoObject);
}
auto allNonExistImageIds = value["NonExistImageIds"]["ImageId"];
for (const auto &item : allNonExistImageIds)
nonExistImageIds_.push_back(item.asString());
}
std::vector<std::string> GetImageInfosResult::getNonExistImageIds()const
{
return nonExistImageIds_;
}
std::vector<GetImageInfosResult::Image> GetImageInfosResult::getImageInfo()const
{
return imageInfo_;
}