After normalizing the API group name, regenerate the SDK.

This commit is contained in:
sdk-team
2021-02-03 08:45:46 +00:00
parent e71ef9a243
commit 6e5ba8761d
8 changed files with 257 additions and 2 deletions

View File

@@ -1,3 +1,6 @@
2021-02-03 Version: patch
- After normalizing the API group name, regenerate the SDK.
2021-02-03 Version: patch
- Add ModifyAuditLogConfig API.

View File

@@ -36,7 +36,9 @@ set(eais_public_header_model
include/alibabacloud/eais/model/DescribeRegionsRequest.h
include/alibabacloud/eais/model/DescribeRegionsResult.h
include/alibabacloud/eais/model/DetachEaiRequest.h
include/alibabacloud/eais/model/DetachEaiResult.h )
include/alibabacloud/eais/model/DetachEaiResult.h
include/alibabacloud/eais/model/GetPrivateIpRequest.h
include/alibabacloud/eais/model/GetPrivateIpResult.h )
set(eais_src
src/EaisClient.cc
@@ -55,7 +57,9 @@ set(eais_src
src/model/DescribeRegionsRequest.cc
src/model/DescribeRegionsResult.cc
src/model/DetachEaiRequest.cc
src/model/DetachEaiResult.cc )
src/model/DetachEaiResult.cc
src/model/GetPrivateIpRequest.cc
src/model/GetPrivateIpResult.cc )
add_library(eais ${LIB_TYPE}
${eais_public_header}

View File

@@ -38,6 +38,8 @@
#include "model/DescribeRegionsResult.h"
#include "model/DetachEaiRequest.h"
#include "model/DetachEaiResult.h"
#include "model/GetPrivateIpRequest.h"
#include "model/GetPrivateIpResult.h"
namespace AlibabaCloud
@@ -71,6 +73,9 @@ namespace AlibabaCloud
typedef Outcome<Error, Model::DetachEaiResult> DetachEaiOutcome;
typedef std::future<DetachEaiOutcome> DetachEaiOutcomeCallable;
typedef std::function<void(const EaisClient*, const Model::DetachEaiRequest&, const DetachEaiOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> DetachEaiAsyncHandler;
typedef Outcome<Error, Model::GetPrivateIpResult> GetPrivateIpOutcome;
typedef std::future<GetPrivateIpOutcome> GetPrivateIpOutcomeCallable;
typedef std::function<void(const EaisClient*, const Model::GetPrivateIpRequest&, const GetPrivateIpOutcome&, const std::shared_ptr<const AsyncCallerContext>&)> GetPrivateIpAsyncHandler;
EaisClient(const Credentials &credentials, const ClientConfiguration &configuration);
EaisClient(const std::shared_ptr<CredentialsProvider> &credentialsProvider, const ClientConfiguration &configuration);
@@ -100,6 +105,9 @@ namespace AlibabaCloud
DetachEaiOutcome detachEai(const Model::DetachEaiRequest &request)const;
void detachEaiAsync(const Model::DetachEaiRequest& request, const DetachEaiAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
DetachEaiOutcomeCallable detachEaiCallable(const Model::DetachEaiRequest& request) const;
GetPrivateIpOutcome getPrivateIp(const Model::GetPrivateIpRequest &request)const;
void getPrivateIpAsync(const Model::GetPrivateIpRequest& request, const GetPrivateIpAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context = nullptr) const;
GetPrivateIpOutcomeCallable getPrivateIpCallable(const Model::GetPrivateIpRequest& request) const;
private:
std::shared_ptr<EndpointProvider> endpointProvider_;

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_EAIS_MODEL_GETPRIVATEIPREQUEST_H_
#define ALIBABACLOUD_EAIS_MODEL_GETPRIVATEIPREQUEST_H_
#include <string>
#include <vector>
#include <alibabacloud/core/RpcServiceRequest.h>
#include <alibabacloud/eais/EaisExport.h>
namespace AlibabaCloud
{
namespace Eais
{
namespace Model
{
class ALIBABACLOUD_EAIS_EXPORT GetPrivateIpRequest : public RpcServiceRequest
{
public:
GetPrivateIpRequest();
~GetPrivateIpRequest();
std::string getClientInstanceId()const;
void setClientInstanceId(const std::string& clientInstanceId);
std::string getRegionId()const;
void setRegionId(const std::string& regionId);
private:
std::string clientInstanceId_;
std::string regionId_;
};
}
}
}
#endif // !ALIBABACLOUD_EAIS_MODEL_GETPRIVATEIPREQUEST_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_EAIS_MODEL_GETPRIVATEIPRESULT_H_
#define ALIBABACLOUD_EAIS_MODEL_GETPRIVATEIPRESULT_H_
#include <string>
#include <vector>
#include <utility>
#include <alibabacloud/core/ServiceResult.h>
#include <alibabacloud/eais/EaisExport.h>
namespace AlibabaCloud
{
namespace Eais
{
namespace Model
{
class ALIBABACLOUD_EAIS_EXPORT GetPrivateIpResult : public ServiceResult
{
public:
GetPrivateIpResult();
explicit GetPrivateIpResult(const std::string &payload);
~GetPrivateIpResult();
std::string getPrivateIp()const;
protected:
void parse(const std::string &payload);
private:
std::string privateIp_;
};
}
}
}
#endif // !ALIBABACLOUD_EAIS_MODEL_GETPRIVATEIPRESULT_H_

View File

@@ -339,3 +339,39 @@ EaisClient::DetachEaiOutcomeCallable EaisClient::detachEaiCallable(const DetachE
return task->get_future();
}
EaisClient::GetPrivateIpOutcome EaisClient::getPrivateIp(const GetPrivateIpRequest &request) const
{
auto endpointOutcome = endpointProvider_->getEndpoint();
if (!endpointOutcome.isSuccess())
return GetPrivateIpOutcome(endpointOutcome.error());
auto outcome = makeRequest(endpointOutcome.result(), request);
if (outcome.isSuccess())
return GetPrivateIpOutcome(GetPrivateIpResult(outcome.result()));
else
return GetPrivateIpOutcome(outcome.error());
}
void EaisClient::getPrivateIpAsync(const GetPrivateIpRequest& request, const GetPrivateIpAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
{
auto fn = [this, request, handler, context]()
{
handler(this, request, getPrivateIp(request), context);
};
asyncExecute(new Runnable(fn));
}
EaisClient::GetPrivateIpOutcomeCallable EaisClient::getPrivateIpCallable(const GetPrivateIpRequest &request) const
{
auto task = std::make_shared<std::packaged_task<GetPrivateIpOutcome()>>(
[this, request]()
{
return this->getPrivateIp(request);
});
asyncExecute(new Runnable([task]() { (*task)(); }));
return task->get_future();
}

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/eais/model/GetPrivateIpRequest.h>
using AlibabaCloud::Eais::Model::GetPrivateIpRequest;
GetPrivateIpRequest::GetPrivateIpRequest() :
RpcServiceRequest("eais", "2019-06-24", "GetPrivateIp")
{
setMethod(HttpRequest::Method::Post);
}
GetPrivateIpRequest::~GetPrivateIpRequest()
{}
std::string GetPrivateIpRequest::getClientInstanceId()const
{
return clientInstanceId_;
}
void GetPrivateIpRequest::setClientInstanceId(const std::string& clientInstanceId)
{
clientInstanceId_ = clientInstanceId;
setParameter("ClientInstanceId", clientInstanceId);
}
std::string GetPrivateIpRequest::getRegionId()const
{
return regionId_;
}
void GetPrivateIpRequest::setRegionId(const std::string& regionId)
{
regionId_ = regionId;
setParameter("RegionId", regionId);
}

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