diff --git a/CHANGELOG b/CHANGELOG index 393a8c8b7..c7ed637f1 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +2021-02-28 Version: patch +- AMP Version Change. + 2021-02-26 Version: patch - Add TaskId for DescribeMigrationJobStatus, DescribeSubscriptionInstanceStatus, DescribeSynchronizationJobStatus. - Add API CreateDtsInstance, ConfigureDtsJob, StartDtsJob. diff --git a/ft/CMakeLists.txt b/ft/CMakeLists.txt index fa43ede6e..1ec80f43c 100644 --- a/ft/CMakeLists.txt +++ b/ft/CMakeLists.txt @@ -29,6 +29,8 @@ set(ft_public_header_model include/alibabacloud/ft/model/FtDynamicAddressDubboResult.h include/alibabacloud/ft/model/FtDynamicAddressHsfRequest.h include/alibabacloud/ft/model/FtDynamicAddressHsfResult.h + include/alibabacloud/ft/model/FtDynamicAddressHttpVpcRequest.h + include/alibabacloud/ft/model/FtDynamicAddressHttpVpcResult.h include/alibabacloud/ft/model/FtEagleEyeRequest.h include/alibabacloud/ft/model/FtEagleEyeResult.h include/alibabacloud/ft/model/FtFlowSpecialRequest.h @@ -39,6 +41,8 @@ set(ft_public_header_model include/alibabacloud/ft/model/FtIpFlowControlResult.h include/alibabacloud/ft/model/FtParamListRequest.h include/alibabacloud/ft/model/FtParamListResult.h + include/alibabacloud/ft/model/TestFlowStrategy01Request.h + include/alibabacloud/ft/model/TestFlowStrategy01Result.h include/alibabacloud/ft/model/TestHttpApiRequest.h include/alibabacloud/ft/model/TestHttpApiResult.h ) @@ -52,6 +56,8 @@ set(ft_src src/model/FtDynamicAddressDubboResult.cc src/model/FtDynamicAddressHsfRequest.cc src/model/FtDynamicAddressHsfResult.cc + src/model/FtDynamicAddressHttpVpcRequest.cc + src/model/FtDynamicAddressHttpVpcResult.cc src/model/FtEagleEyeRequest.cc src/model/FtEagleEyeResult.cc src/model/FtFlowSpecialRequest.cc @@ -62,6 +68,8 @@ set(ft_src src/model/FtIpFlowControlResult.cc src/model/FtParamListRequest.cc src/model/FtParamListResult.cc + src/model/TestFlowStrategy01Request.cc + src/model/TestFlowStrategy01Result.cc src/model/TestHttpApiRequest.cc src/model/TestHttpApiResult.cc ) diff --git a/ft/include/alibabacloud/ft/FtClient.h b/ft/include/alibabacloud/ft/FtClient.h index 47012761f..a4f8e634c 100644 --- a/ft/include/alibabacloud/ft/FtClient.h +++ b/ft/include/alibabacloud/ft/FtClient.h @@ -30,6 +30,8 @@ #include "model/FtDynamicAddressDubboResult.h" #include "model/FtDynamicAddressHsfRequest.h" #include "model/FtDynamicAddressHsfResult.h" +#include "model/FtDynamicAddressHttpVpcRequest.h" +#include "model/FtDynamicAddressHttpVpcResult.h" #include "model/FtEagleEyeRequest.h" #include "model/FtEagleEyeResult.h" #include "model/FtFlowSpecialRequest.h" @@ -40,6 +42,8 @@ #include "model/FtIpFlowControlResult.h" #include "model/FtParamListRequest.h" #include "model/FtParamListResult.h" +#include "model/TestFlowStrategy01Request.h" +#include "model/TestFlowStrategy01Result.h" #include "model/TestHttpApiRequest.h" #include "model/TestHttpApiResult.h" @@ -63,6 +67,9 @@ namespace AlibabaCloud typedef Outcome FtDynamicAddressHsfOutcome; typedef std::future FtDynamicAddressHsfOutcomeCallable; typedef std::function&)> FtDynamicAddressHsfAsyncHandler; + typedef Outcome FtDynamicAddressHttpVpcOutcome; + typedef std::future FtDynamicAddressHttpVpcOutcomeCallable; + typedef std::function&)> FtDynamicAddressHttpVpcAsyncHandler; typedef Outcome FtEagleEyeOutcome; typedef std::future FtEagleEyeOutcomeCallable; typedef std::function&)> FtEagleEyeAsyncHandler; @@ -78,6 +85,9 @@ namespace AlibabaCloud typedef Outcome FtParamListOutcome; typedef std::future FtParamListOutcomeCallable; typedef std::function&)> FtParamListAsyncHandler; + typedef Outcome TestFlowStrategy01Outcome; + typedef std::future TestFlowStrategy01OutcomeCallable; + typedef std::function&)> TestFlowStrategy01AsyncHandler; typedef Outcome TestHttpApiOutcome; typedef std::future TestHttpApiOutcomeCallable; typedef std::function&)> TestHttpApiAsyncHandler; @@ -98,6 +108,9 @@ namespace AlibabaCloud FtDynamicAddressHsfOutcome ftDynamicAddressHsf(const Model::FtDynamicAddressHsfRequest &request)const; void ftDynamicAddressHsfAsync(const Model::FtDynamicAddressHsfRequest& request, const FtDynamicAddressHsfAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; FtDynamicAddressHsfOutcomeCallable ftDynamicAddressHsfCallable(const Model::FtDynamicAddressHsfRequest& request) const; + FtDynamicAddressHttpVpcOutcome ftDynamicAddressHttpVpc(const Model::FtDynamicAddressHttpVpcRequest &request)const; + void ftDynamicAddressHttpVpcAsync(const Model::FtDynamicAddressHttpVpcRequest& request, const FtDynamicAddressHttpVpcAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + FtDynamicAddressHttpVpcOutcomeCallable ftDynamicAddressHttpVpcCallable(const Model::FtDynamicAddressHttpVpcRequest& request) const; FtEagleEyeOutcome ftEagleEye(const Model::FtEagleEyeRequest &request)const; void ftEagleEyeAsync(const Model::FtEagleEyeRequest& request, const FtEagleEyeAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; FtEagleEyeOutcomeCallable ftEagleEyeCallable(const Model::FtEagleEyeRequest& request) const; @@ -113,6 +126,9 @@ namespace AlibabaCloud FtParamListOutcome ftParamList(const Model::FtParamListRequest &request)const; void ftParamListAsync(const Model::FtParamListRequest& request, const FtParamListAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; FtParamListOutcomeCallable ftParamListCallable(const Model::FtParamListRequest& request) const; + TestFlowStrategy01Outcome testFlowStrategy01(const Model::TestFlowStrategy01Request &request)const; + void testFlowStrategy01Async(const Model::TestFlowStrategy01Request& request, const TestFlowStrategy01AsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + TestFlowStrategy01OutcomeCallable testFlowStrategy01Callable(const Model::TestFlowStrategy01Request& request) const; TestHttpApiOutcome testHttpApi(const Model::TestHttpApiRequest &request)const; void testHttpApiAsync(const Model::TestHttpApiRequest& request, const TestHttpApiAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; TestHttpApiOutcomeCallable testHttpApiCallable(const Model::TestHttpApiRequest& request) const; diff --git a/ft/include/alibabacloud/ft/model/FtDynamicAddressHttpVpcRequest.h b/ft/include/alibabacloud/ft/model/FtDynamicAddressHttpVpcRequest.h new file mode 100644 index 000000000..1e4267c15 --- /dev/null +++ b/ft/include/alibabacloud/ft/model/FtDynamicAddressHttpVpcRequest.h @@ -0,0 +1,60 @@ +/* + * 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_FT_MODEL_FTDYNAMICADDRESSHTTPVPCREQUEST_H_ +#define ALIBABACLOUD_FT_MODEL_FTDYNAMICADDRESSHTTPVPCREQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ft + { + namespace Model + { + class ALIBABACLOUD_FT_EXPORT FtDynamicAddressHttpVpcRequest : public RpcServiceRequest + { + + public: + FtDynamicAddressHttpVpcRequest(); + ~FtDynamicAddressHttpVpcRequest(); + + std::string getP1()const; + void setP1(const std::string& p1); + std::string getStringValue()const; + void setStringValue(const std::string& stringValue); + std::string getOtherParam()const; + void setOtherParam(const std::string& otherParam); + bool getBooleanParam()const; + void setBooleanParam(bool booleanParam); + std::string getDefaultValue()const; + void setDefaultValue(const std::string& defaultValue); + + private: + std::string p1_; + std::string stringValue_; + std::string otherParam_; + bool booleanParam_; + std::string defaultValue_; + + }; + } + } +} +#endif // !ALIBABACLOUD_FT_MODEL_FTDYNAMICADDRESSHTTPVPCREQUEST_H_ \ No newline at end of file diff --git a/ft/include/alibabacloud/ft/model/FtDynamicAddressHttpVpcResult.h b/ft/include/alibabacloud/ft/model/FtDynamicAddressHttpVpcResult.h new file mode 100644 index 000000000..6eb50c0d8 --- /dev/null +++ b/ft/include/alibabacloud/ft/model/FtDynamicAddressHttpVpcResult.h @@ -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_FT_MODEL_FTDYNAMICADDRESSHTTPVPCRESULT_H_ +#define ALIBABACLOUD_FT_MODEL_FTDYNAMICADDRESSHTTPVPCRESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ft + { + namespace Model + { + class ALIBABACLOUD_FT_EXPORT FtDynamicAddressHttpVpcResult : public ServiceResult + { + public: + + + FtDynamicAddressHttpVpcResult(); + explicit FtDynamicAddressHttpVpcResult(const std::string &payload); + ~FtDynamicAddressHttpVpcResult(); + std::string getServiceRpcSign()const; + std::string getParams()const; + + protected: + void parse(const std::string &payload); + private: + std::string serviceRpcSign_; + std::string params_; + + }; + } + } +} +#endif // !ALIBABACLOUD_FT_MODEL_FTDYNAMICADDRESSHTTPVPCRESULT_H_ \ No newline at end of file diff --git a/ft/include/alibabacloud/ft/model/TestFlowStrategy01Request.h b/ft/include/alibabacloud/ft/model/TestFlowStrategy01Request.h new file mode 100644 index 000000000..80676cd5a --- /dev/null +++ b/ft/include/alibabacloud/ft/model/TestFlowStrategy01Request.h @@ -0,0 +1,48 @@ +/* + * 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_FT_MODEL_TESTFLOWSTRATEGY01REQUEST_H_ +#define ALIBABACLOUD_FT_MODEL_TESTFLOWSTRATEGY01REQUEST_H_ + +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ft + { + namespace Model + { + class ALIBABACLOUD_FT_EXPORT TestFlowStrategy01Request : public RpcServiceRequest + { + + public: + TestFlowStrategy01Request(); + ~TestFlowStrategy01Request(); + + std::map getNames()const; + void setNames(const std::map& names); + + private: + std::map names_; + + }; + } + } +} +#endif // !ALIBABACLOUD_FT_MODEL_TESTFLOWSTRATEGY01REQUEST_H_ \ No newline at end of file diff --git a/ft/include/alibabacloud/ft/model/TestFlowStrategy01Result.h b/ft/include/alibabacloud/ft/model/TestFlowStrategy01Result.h new file mode 100644 index 000000000..868196dc0 --- /dev/null +++ b/ft/include/alibabacloud/ft/model/TestFlowStrategy01Result.h @@ -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_FT_MODEL_TESTFLOWSTRATEGY01RESULT_H_ +#define ALIBABACLOUD_FT_MODEL_TESTFLOWSTRATEGY01RESULT_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud +{ + namespace Ft + { + namespace Model + { + class ALIBABACLOUD_FT_EXPORT TestFlowStrategy01Result : public ServiceResult + { + public: + + + TestFlowStrategy01Result(); + explicit TestFlowStrategy01Result(const std::string &payload); + ~TestFlowStrategy01Result(); + std::vector getNames()const; + std::vector getList()const; + + protected: + void parse(const std::string &payload); + private: + std::vector names_; + std::vector list_; + + }; + } + } +} +#endif // !ALIBABACLOUD_FT_MODEL_TESTFLOWSTRATEGY01RESULT_H_ \ No newline at end of file diff --git a/ft/src/FtClient.cc b/ft/src/FtClient.cc index ac2b26414..08c39d132 100644 --- a/ft/src/FtClient.cc +++ b/ft/src/FtClient.cc @@ -195,6 +195,42 @@ FtClient::FtDynamicAddressHsfOutcomeCallable FtClient::ftDynamicAddressHsfCallab return task->get_future(); } +FtClient::FtDynamicAddressHttpVpcOutcome FtClient::ftDynamicAddressHttpVpc(const FtDynamicAddressHttpVpcRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return FtDynamicAddressHttpVpcOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return FtDynamicAddressHttpVpcOutcome(FtDynamicAddressHttpVpcResult(outcome.result())); + else + return FtDynamicAddressHttpVpcOutcome(outcome.error()); +} + +void FtClient::ftDynamicAddressHttpVpcAsync(const FtDynamicAddressHttpVpcRequest& request, const FtDynamicAddressHttpVpcAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, ftDynamicAddressHttpVpc(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +FtClient::FtDynamicAddressHttpVpcOutcomeCallable FtClient::ftDynamicAddressHttpVpcCallable(const FtDynamicAddressHttpVpcRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->ftDynamicAddressHttpVpc(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + FtClient::FtEagleEyeOutcome FtClient::ftEagleEye(const FtEagleEyeRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -375,6 +411,42 @@ FtClient::FtParamListOutcomeCallable FtClient::ftParamListCallable(const FtParam return task->get_future(); } +FtClient::TestFlowStrategy01Outcome FtClient::testFlowStrategy01(const TestFlowStrategy01Request &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return TestFlowStrategy01Outcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return TestFlowStrategy01Outcome(TestFlowStrategy01Result(outcome.result())); + else + return TestFlowStrategy01Outcome(outcome.error()); +} + +void FtClient::testFlowStrategy01Async(const TestFlowStrategy01Request& request, const TestFlowStrategy01AsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, testFlowStrategy01(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +FtClient::TestFlowStrategy01OutcomeCallable FtClient::testFlowStrategy01Callable(const TestFlowStrategy01Request &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->testFlowStrategy01(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + FtClient::TestHttpApiOutcome FtClient::testHttpApi(const TestHttpApiRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/ft/src/model/FtDynamicAddressHttpVpcRequest.cc b/ft/src/model/FtDynamicAddressHttpVpcRequest.cc new file mode 100644 index 000000000..e4b294bc7 --- /dev/null +++ b/ft/src/model/FtDynamicAddressHttpVpcRequest.cc @@ -0,0 +1,84 @@ +/* + * 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 + +using AlibabaCloud::Ft::Model::FtDynamicAddressHttpVpcRequest; + +FtDynamicAddressHttpVpcRequest::FtDynamicAddressHttpVpcRequest() : + RpcServiceRequest("ft", "2018-07-13", "FtDynamicAddressHttpVpc") +{ + setMethod(HttpRequest::Method::Post); +} + +FtDynamicAddressHttpVpcRequest::~FtDynamicAddressHttpVpcRequest() +{} + +std::string FtDynamicAddressHttpVpcRequest::getP1()const +{ + return p1_; +} + +void FtDynamicAddressHttpVpcRequest::setP1(const std::string& p1) +{ + p1_ = p1; + setParameter("P1", p1); +} + +std::string FtDynamicAddressHttpVpcRequest::getStringValue()const +{ + return stringValue_; +} + +void FtDynamicAddressHttpVpcRequest::setStringValue(const std::string& stringValue) +{ + stringValue_ = stringValue; + setParameter("StringValue", stringValue); +} + +std::string FtDynamicAddressHttpVpcRequest::getOtherParam()const +{ + return otherParam_; +} + +void FtDynamicAddressHttpVpcRequest::setOtherParam(const std::string& otherParam) +{ + otherParam_ = otherParam; + setParameter("OtherParam", otherParam); +} + +bool FtDynamicAddressHttpVpcRequest::getBooleanParam()const +{ + return booleanParam_; +} + +void FtDynamicAddressHttpVpcRequest::setBooleanParam(bool booleanParam) +{ + booleanParam_ = booleanParam; + setParameter("BooleanParam", booleanParam ? "true" : "false"); +} + +std::string FtDynamicAddressHttpVpcRequest::getDefaultValue()const +{ + return defaultValue_; +} + +void FtDynamicAddressHttpVpcRequest::setDefaultValue(const std::string& defaultValue) +{ + defaultValue_ = defaultValue; + setParameter("DefaultValue", defaultValue); +} + diff --git a/ft/src/model/FtDynamicAddressHttpVpcResult.cc b/ft/src/model/FtDynamicAddressHttpVpcResult.cc new file mode 100644 index 000000000..914bbeedf --- /dev/null +++ b/ft/src/model/FtDynamicAddressHttpVpcResult.cc @@ -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 +#include + +using namespace AlibabaCloud::Ft; +using namespace AlibabaCloud::Ft::Model; + +FtDynamicAddressHttpVpcResult::FtDynamicAddressHttpVpcResult() : + ServiceResult() +{} + +FtDynamicAddressHttpVpcResult::FtDynamicAddressHttpVpcResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +FtDynamicAddressHttpVpcResult::~FtDynamicAddressHttpVpcResult() +{} + +void FtDynamicAddressHttpVpcResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["Params"].isNull()) + params_ = value["Params"].asString(); + if(!value["ServiceRpcSign"].isNull()) + serviceRpcSign_ = value["ServiceRpcSign"].asString(); + +} + +std::string FtDynamicAddressHttpVpcResult::getServiceRpcSign()const +{ + return serviceRpcSign_; +} + +std::string FtDynamicAddressHttpVpcResult::getParams()const +{ + return params_; +} + diff --git a/ft/src/model/TestFlowStrategy01Request.cc b/ft/src/model/TestFlowStrategy01Request.cc new file mode 100644 index 000000000..3967904f0 --- /dev/null +++ b/ft/src/model/TestFlowStrategy01Request.cc @@ -0,0 +1,40 @@ +/* + * 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 + +using AlibabaCloud::Ft::Model::TestFlowStrategy01Request; + +TestFlowStrategy01Request::TestFlowStrategy01Request() : + RpcServiceRequest("ft", "2018-07-13", "TestFlowStrategy01") +{ + setMethod(HttpRequest::Method::Put); +} + +TestFlowStrategy01Request::~TestFlowStrategy01Request() +{} + +std::map TestFlowStrategy01Request::getNames()const +{ + return names_; +} + +void TestFlowStrategy01Request::setNames(const std::map& names) +{ + names_ = names; + setJsonParameters("Names", names); +} + diff --git a/ft/src/model/TestFlowStrategy01Result.cc b/ft/src/model/TestFlowStrategy01Result.cc new file mode 100644 index 000000000..2830ea7bb --- /dev/null +++ b/ft/src/model/TestFlowStrategy01Result.cc @@ -0,0 +1,60 @@ +/* + * 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 +#include + +using namespace AlibabaCloud::Ft; +using namespace AlibabaCloud::Ft::Model; + +TestFlowStrategy01Result::TestFlowStrategy01Result() : + ServiceResult() +{} + +TestFlowStrategy01Result::TestFlowStrategy01Result(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +TestFlowStrategy01Result::~TestFlowStrategy01Result() +{} + +void TestFlowStrategy01Result::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + auto allList = value["List"]["Id"]; + for (const auto &item : allList) + list_.push_back(item.asString()); + auto allNames = value["Names"]["Names"]; + for (const auto &item : allNames) + names_.push_back(item.asString()); + +} + +std::vector TestFlowStrategy01Result::getNames()const +{ + return names_; +} + +std::vector TestFlowStrategy01Result::getList()const +{ + return list_; +} +