由君石发起的AEGIS SDK自动发布, BUILD_ID=397, 版本号:1.0.12
Signed-off-by: haowei.yao <haowei.yao@alibaba-inc.com>
This commit is contained in:
925
aegis/src/AegisClient.cc
Normal file
925
aegis/src/AegisClient.cc
Normal file
@@ -0,0 +1,925 @@
|
||||
/*
|
||||
* 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/aegis/AegisClient.h>
|
||||
#include <alibabacloud/core/SimpleCredentialsProvider.h>
|
||||
|
||||
using namespace AlibabaCloud;
|
||||
using namespace AlibabaCloud::Location;
|
||||
using namespace AlibabaCloud::Aegis;
|
||||
using namespace AlibabaCloud::Aegis::Model;
|
||||
|
||||
AegisClient::AegisClient(const Credentials &credentials, const ClientConfiguration &configuration) :
|
||||
RpcServiceClient(std::make_shared<SimpleCredentialsProvider>(credentials), configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(credentials, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), "vipaegis");
|
||||
}
|
||||
|
||||
AegisClient::AegisClient(const std::shared_ptr<CredentialsProvider>& credentialsProvider, const ClientConfiguration & configuration) :
|
||||
RpcServiceClient(credentialsProvider, configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(credentialsProvider, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), "vipaegis");
|
||||
}
|
||||
|
||||
AegisClient::AegisClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) :
|
||||
RpcServiceClient(std::make_shared<SimpleCredentialsProvider>(accessKeyId, accessKeySecret), configuration)
|
||||
{
|
||||
auto locationClient = std::make_shared<LocationClient>(accessKeyId, accessKeySecret, configuration);
|
||||
endpointProvider_ = std::make_shared<EndpointProvider>(locationClient, configuration.regionId(), "vipaegis");
|
||||
}
|
||||
|
||||
AegisClient::~AegisClient()
|
||||
{}
|
||||
|
||||
CoreClient::EndpointOutcome AegisClient::endpoint()const
|
||||
{
|
||||
if(!configuration().endpoint().empty())
|
||||
return CoreClient::EndpointOutcome(configuration().endpoint());
|
||||
|
||||
auto endpoint = endpointProvider_->getEndpoint();
|
||||
|
||||
if (endpoint.empty())
|
||||
return CoreClient::EndpointOutcome(Error("InvalidEndpoint",""));
|
||||
else
|
||||
return CoreClient::EndpointOutcome(endpoint);
|
||||
}
|
||||
|
||||
AegisClient::GetEntityListOutcome AegisClient::getEntityList(const GetEntityListRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetEntityListOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetEntityListOutcome(GetEntityListResult(outcome.result()));
|
||||
else
|
||||
return GetEntityListOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AegisClient::getEntityListAsync(const GetEntityListRequest& request, const GetEntityListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getEntityList(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AegisClient::GetEntityListOutcomeCallable AegisClient::getEntityListCallable(const GetEntityListRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetEntityListOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getEntityList(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AegisClient::GetStatisticsByUuidOutcome AegisClient::getStatisticsByUuid(const GetStatisticsByUuidRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetStatisticsByUuidOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetStatisticsByUuidOutcome(GetStatisticsByUuidResult(outcome.result()));
|
||||
else
|
||||
return GetStatisticsByUuidOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AegisClient::getStatisticsByUuidAsync(const GetStatisticsByUuidRequest& request, const GetStatisticsByUuidAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getStatisticsByUuid(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AegisClient::GetStatisticsByUuidOutcomeCallable AegisClient::getStatisticsByUuidCallable(const GetStatisticsByUuidRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetStatisticsByUuidOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getStatisticsByUuid(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AegisClient::GetStatisticsOutcome AegisClient::getStatistics(const GetStatisticsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetStatisticsOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetStatisticsOutcome(GetStatisticsResult(outcome.result()));
|
||||
else
|
||||
return GetStatisticsOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AegisClient::getStatisticsAsync(const GetStatisticsRequest& request, const GetStatisticsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getStatistics(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AegisClient::GetStatisticsOutcomeCallable AegisClient::getStatisticsCallable(const GetStatisticsRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetStatisticsOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getStatistics(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AegisClient::DescribeVulDetailsOutcome AegisClient::describeVulDetails(const DescribeVulDetailsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeVulDetailsOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeVulDetailsOutcome(DescribeVulDetailsResult(outcome.result()));
|
||||
else
|
||||
return DescribeVulDetailsOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AegisClient::describeVulDetailsAsync(const DescribeVulDetailsRequest& request, const DescribeVulDetailsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeVulDetails(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AegisClient::DescribeVulDetailsOutcomeCallable AegisClient::describeVulDetailsCallable(const DescribeVulDetailsRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeVulDetailsOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeVulDetails(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AegisClient::DeleteStrategyOutcome AegisClient::deleteStrategy(const DeleteStrategyRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DeleteStrategyOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DeleteStrategyOutcome(DeleteStrategyResult(outcome.result()));
|
||||
else
|
||||
return DeleteStrategyOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AegisClient::deleteStrategyAsync(const DeleteStrategyRequest& request, const DeleteStrategyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, deleteStrategy(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AegisClient::DeleteStrategyOutcomeCallable AegisClient::deleteStrategyCallable(const DeleteStrategyRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DeleteStrategyOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->deleteStrategy(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AegisClient::GetCrackStatisticsOutcome AegisClient::getCrackStatistics(const GetCrackStatisticsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetCrackStatisticsOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetCrackStatisticsOutcome(GetCrackStatisticsResult(outcome.result()));
|
||||
else
|
||||
return GetCrackStatisticsOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AegisClient::getCrackStatisticsAsync(const GetCrackStatisticsRequest& request, const GetCrackStatisticsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getCrackStatistics(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AegisClient::GetCrackStatisticsOutcomeCallable AegisClient::getCrackStatisticsCallable(const GetCrackStatisticsRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetCrackStatisticsOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getCrackStatistics(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AegisClient::DescribeWarningOutcome AegisClient::describeWarning(const DescribeWarningRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeWarningOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeWarningOutcome(DescribeWarningResult(outcome.result()));
|
||||
else
|
||||
return DescribeWarningOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AegisClient::describeWarningAsync(const DescribeWarningRequest& request, const DescribeWarningAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeWarning(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AegisClient::DescribeWarningOutcomeCallable AegisClient::describeWarningCallable(const DescribeWarningRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeWarningOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeWarning(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AegisClient::ReleaseInstanceOutcome AegisClient::releaseInstance(const ReleaseInstanceRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ReleaseInstanceOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ReleaseInstanceOutcome(ReleaseInstanceResult(outcome.result()));
|
||||
else
|
||||
return ReleaseInstanceOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AegisClient::releaseInstanceAsync(const ReleaseInstanceRequest& request, const ReleaseInstanceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, releaseInstance(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AegisClient::ReleaseInstanceOutcomeCallable AegisClient::releaseInstanceCallable(const ReleaseInstanceRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ReleaseInstanceOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->releaseInstance(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AegisClient::DescribeSuspiciousEventsOutcome AegisClient::describeSuspiciousEvents(const DescribeSuspiciousEventsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeSuspiciousEventsOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeSuspiciousEventsOutcome(DescribeSuspiciousEventsResult(outcome.result()));
|
||||
else
|
||||
return DescribeSuspiciousEventsOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AegisClient::describeSuspiciousEventsAsync(const DescribeSuspiciousEventsRequest& request, const DescribeSuspiciousEventsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeSuspiciousEvents(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AegisClient::DescribeSuspiciousEventsOutcomeCallable AegisClient::describeSuspiciousEventsCallable(const DescribeSuspiciousEventsRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeSuspiciousEventsOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeSuspiciousEvents(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AegisClient::CreateInstanceOutcome AegisClient::createInstance(const CreateInstanceRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return CreateInstanceOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return CreateInstanceOutcome(CreateInstanceResult(outcome.result()));
|
||||
else
|
||||
return CreateInstanceOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AegisClient::createInstanceAsync(const CreateInstanceRequest& request, const CreateInstanceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, createInstance(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AegisClient::CreateInstanceOutcomeCallable AegisClient::createInstanceCallable(const CreateInstanceRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<CreateInstanceOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->createInstance(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AegisClient::DescribeVulListOutcome AegisClient::describeVulList(const DescribeVulListRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeVulListOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeVulListOutcome(DescribeVulListResult(outcome.result()));
|
||||
else
|
||||
return DescribeVulListOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AegisClient::describeVulListAsync(const DescribeVulListRequest& request, const DescribeVulListAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeVulList(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AegisClient::DescribeVulListOutcomeCallable AegisClient::describeVulListCallable(const DescribeVulListRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeVulListOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeVulList(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AegisClient::UpgradeInstanceOutcome AegisClient::upgradeInstance(const UpgradeInstanceRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return UpgradeInstanceOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return UpgradeInstanceOutcome(UpgradeInstanceResult(outcome.result()));
|
||||
else
|
||||
return UpgradeInstanceOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AegisClient::upgradeInstanceAsync(const UpgradeInstanceRequest& request, const UpgradeInstanceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, upgradeInstance(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AegisClient::UpgradeInstanceOutcomeCallable AegisClient::upgradeInstanceCallable(const UpgradeInstanceRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<UpgradeInstanceOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->upgradeInstance(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AegisClient::RenewInstanceOutcome AegisClient::renewInstance(const RenewInstanceRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return RenewInstanceOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return RenewInstanceOutcome(RenewInstanceResult(outcome.result()));
|
||||
else
|
||||
return RenewInstanceOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AegisClient::renewInstanceAsync(const RenewInstanceRequest& request, const RenewInstanceAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, renewInstance(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AegisClient::RenewInstanceOutcomeCallable AegisClient::renewInstanceCallable(const RenewInstanceRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<RenewInstanceOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->renewInstance(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AegisClient::DescribeStrategyTargetOutcome AegisClient::describeStrategyTarget(const DescribeStrategyTargetRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeStrategyTargetOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeStrategyTargetOutcome(DescribeStrategyTargetResult(outcome.result()));
|
||||
else
|
||||
return DescribeStrategyTargetOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AegisClient::describeStrategyTargetAsync(const DescribeStrategyTargetRequest& request, const DescribeStrategyTargetAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeStrategyTarget(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AegisClient::DescribeStrategyTargetOutcomeCallable AegisClient::describeStrategyTargetCallable(const DescribeStrategyTargetRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeStrategyTargetOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeStrategyTarget(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AegisClient::QueryLoginEventOutcome AegisClient::queryLoginEvent(const QueryLoginEventRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return QueryLoginEventOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return QueryLoginEventOutcome(QueryLoginEventResult(outcome.result()));
|
||||
else
|
||||
return QueryLoginEventOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AegisClient::queryLoginEventAsync(const QueryLoginEventRequest& request, const QueryLoginEventAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, queryLoginEvent(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AegisClient::QueryLoginEventOutcomeCallable AegisClient::queryLoginEventCallable(const QueryLoginEventRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<QueryLoginEventOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->queryLoginEvent(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AegisClient::GetAccountStatisticsOutcome AegisClient::getAccountStatistics(const GetAccountStatisticsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return GetAccountStatisticsOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return GetAccountStatisticsOutcome(GetAccountStatisticsResult(outcome.result()));
|
||||
else
|
||||
return GetAccountStatisticsOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AegisClient::getAccountStatisticsAsync(const GetAccountStatisticsRequest& request, const GetAccountStatisticsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, getAccountStatistics(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AegisClient::GetAccountStatisticsOutcomeCallable AegisClient::getAccountStatisticsCallable(const GetAccountStatisticsRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<GetAccountStatisticsOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->getAccountStatistics(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AegisClient::ModifyStrategyOutcome AegisClient::modifyStrategy(const ModifyStrategyRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ModifyStrategyOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ModifyStrategyOutcome(ModifyStrategyResult(outcome.result()));
|
||||
else
|
||||
return ModifyStrategyOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AegisClient::modifyStrategyAsync(const ModifyStrategyRequest& request, const ModifyStrategyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, modifyStrategy(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AegisClient::ModifyStrategyOutcomeCallable AegisClient::modifyStrategyCallable(const ModifyStrategyRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ModifyStrategyOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->modifyStrategy(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AegisClient::ModifyStrategyTargetOutcome AegisClient::modifyStrategyTarget(const ModifyStrategyTargetRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ModifyStrategyTargetOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ModifyStrategyTargetOutcome(ModifyStrategyTargetResult(outcome.result()));
|
||||
else
|
||||
return ModifyStrategyTargetOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AegisClient::modifyStrategyTargetAsync(const ModifyStrategyTargetRequest& request, const ModifyStrategyTargetAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, modifyStrategyTarget(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AegisClient::ModifyStrategyTargetOutcomeCallable AegisClient::modifyStrategyTargetCallable(const ModifyStrategyTargetRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ModifyStrategyTargetOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->modifyStrategyTarget(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AegisClient::ModifyBatchIgnoreVulOutcome AegisClient::modifyBatchIgnoreVul(const ModifyBatchIgnoreVulRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return ModifyBatchIgnoreVulOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return ModifyBatchIgnoreVulOutcome(ModifyBatchIgnoreVulResult(outcome.result()));
|
||||
else
|
||||
return ModifyBatchIgnoreVulOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AegisClient::modifyBatchIgnoreVulAsync(const ModifyBatchIgnoreVulRequest& request, const ModifyBatchIgnoreVulAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, modifyBatchIgnoreVul(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AegisClient::ModifyBatchIgnoreVulOutcomeCallable AegisClient::modifyBatchIgnoreVulCallable(const ModifyBatchIgnoreVulRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<ModifyBatchIgnoreVulOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->modifyBatchIgnoreVul(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AegisClient::DescribeWebshellOutcome AegisClient::describeWebshell(const DescribeWebshellRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeWebshellOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeWebshellOutcome(DescribeWebshellResult(outcome.result()));
|
||||
else
|
||||
return DescribeWebshellOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AegisClient::describeWebshellAsync(const DescribeWebshellRequest& request, const DescribeWebshellAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeWebshell(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AegisClient::DescribeWebshellOutcomeCallable AegisClient::describeWebshellCallable(const DescribeWebshellRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeWebshellOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeWebshell(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AegisClient::DescribeStratetyDetailOutcome AegisClient::describeStratetyDetail(const DescribeStratetyDetailRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeStratetyDetailOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeStratetyDetailOutcome(DescribeStratetyDetailResult(outcome.result()));
|
||||
else
|
||||
return DescribeStratetyDetailOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AegisClient::describeStratetyDetailAsync(const DescribeStratetyDetailRequest& request, const DescribeStratetyDetailAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeStratetyDetail(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AegisClient::DescribeStratetyDetailOutcomeCallable AegisClient::describeStratetyDetailCallable(const DescribeStratetyDetailRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeStratetyDetailOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeStratetyDetail(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AegisClient::DescribeStratetyOutcome AegisClient::describeStratety(const DescribeStratetyRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeStratetyOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeStratetyOutcome(DescribeStratetyResult(outcome.result()));
|
||||
else
|
||||
return DescribeStratetyOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AegisClient::describeStratetyAsync(const DescribeStratetyRequest& request, const DescribeStratetyAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeStratety(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AegisClient::DescribeStratetyOutcomeCallable AegisClient::describeStratetyCallable(const DescribeStratetyRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeStratetyOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeStratety(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AegisClient::DescribeLoginLogsOutcome AegisClient::describeLoginLogs(const DescribeLoginLogsRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return DescribeLoginLogsOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return DescribeLoginLogsOutcome(DescribeLoginLogsResult(outcome.result()));
|
||||
else
|
||||
return DescribeLoginLogsOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AegisClient::describeLoginLogsAsync(const DescribeLoginLogsRequest& request, const DescribeLoginLogsAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, describeLoginLogs(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AegisClient::DescribeLoginLogsOutcomeCallable AegisClient::describeLoginLogsCallable(const DescribeLoginLogsRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<DescribeLoginLogsOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->describeLoginLogs(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
AegisClient::QueryCrackEventOutcome AegisClient::queryCrackEvent(const QueryCrackEventRequest &request) const
|
||||
{
|
||||
auto endpointOutcome = endpoint();
|
||||
if (!endpointOutcome.isSuccess())
|
||||
return QueryCrackEventOutcome(endpointOutcome.error());
|
||||
|
||||
auto outcome = makeRequest(endpointOutcome.result(), request);
|
||||
|
||||
if (outcome.isSuccess())
|
||||
return QueryCrackEventOutcome(QueryCrackEventResult(outcome.result()));
|
||||
else
|
||||
return QueryCrackEventOutcome(outcome.error());
|
||||
}
|
||||
|
||||
void AegisClient::queryCrackEventAsync(const QueryCrackEventRequest& request, const QueryCrackEventAsyncHandler& handler, const std::shared_ptr<const AsyncCallerContext>& context) const
|
||||
{
|
||||
auto fn = [this, request, handler, context]()
|
||||
{
|
||||
handler(this, request, queryCrackEvent(request), context);
|
||||
};
|
||||
|
||||
asyncExecute(new Runnable(fn));
|
||||
}
|
||||
|
||||
AegisClient::QueryCrackEventOutcomeCallable AegisClient::queryCrackEventCallable(const QueryCrackEventRequest &request) const
|
||||
{
|
||||
auto task = std::make_shared<std::packaged_task<QueryCrackEventOutcome()>>(
|
||||
[this, request]()
|
||||
{
|
||||
return this->queryCrackEvent(request);
|
||||
});
|
||||
|
||||
asyncExecute(new Runnable([task]() { (*task)(); }));
|
||||
return task->get_future();
|
||||
}
|
||||
|
||||
115
aegis/src/model/CreateInstanceRequest.cc
Normal file
115
aegis/src/model/CreateInstanceRequest.cc
Normal file
@@ -0,0 +1,115 @@
|
||||
/*
|
||||
* 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/aegis/model/CreateInstanceRequest.h>
|
||||
|
||||
using AlibabaCloud::Aegis::Model::CreateInstanceRequest;
|
||||
|
||||
CreateInstanceRequest::CreateInstanceRequest() :
|
||||
RpcServiceRequest("aegis", "2016-11-11", "CreateInstance")
|
||||
{}
|
||||
|
||||
CreateInstanceRequest::~CreateInstanceRequest()
|
||||
{}
|
||||
|
||||
int CreateInstanceRequest::getDuration()const
|
||||
{
|
||||
return duration_;
|
||||
}
|
||||
|
||||
void CreateInstanceRequest::setDuration(int duration)
|
||||
{
|
||||
duration_ = duration;
|
||||
setParameter("Duration", std::to_string(duration));
|
||||
}
|
||||
|
||||
bool CreateInstanceRequest::getIsAutoRenew()const
|
||||
{
|
||||
return isAutoRenew_;
|
||||
}
|
||||
|
||||
void CreateInstanceRequest::setIsAutoRenew(bool isAutoRenew)
|
||||
{
|
||||
isAutoRenew_ = isAutoRenew;
|
||||
setParameter("IsAutoRenew", std::to_string(isAutoRenew));
|
||||
}
|
||||
|
||||
std::string CreateInstanceRequest::getClientToken()const
|
||||
{
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void CreateInstanceRequest::setClientToken(const std::string& clientToken)
|
||||
{
|
||||
clientToken_ = clientToken;
|
||||
setParameter("ClientToken", clientToken);
|
||||
}
|
||||
|
||||
int CreateInstanceRequest::getVmNumber()const
|
||||
{
|
||||
return vmNumber_;
|
||||
}
|
||||
|
||||
void CreateInstanceRequest::setVmNumber(int vmNumber)
|
||||
{
|
||||
vmNumber_ = vmNumber;
|
||||
setParameter("VmNumber", std::to_string(vmNumber));
|
||||
}
|
||||
|
||||
long CreateInstanceRequest::getOwnerId()const
|
||||
{
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void CreateInstanceRequest::setOwnerId(long ownerId)
|
||||
{
|
||||
ownerId_ = ownerId;
|
||||
setParameter("OwnerId", std::to_string(ownerId));
|
||||
}
|
||||
|
||||
int CreateInstanceRequest::getVersionCode()const
|
||||
{
|
||||
return versionCode_;
|
||||
}
|
||||
|
||||
void CreateInstanceRequest::setVersionCode(int versionCode)
|
||||
{
|
||||
versionCode_ = versionCode;
|
||||
setParameter("VersionCode", std::to_string(versionCode));
|
||||
}
|
||||
|
||||
std::string CreateInstanceRequest::getPricingCycle()const
|
||||
{
|
||||
return pricingCycle_;
|
||||
}
|
||||
|
||||
void CreateInstanceRequest::setPricingCycle(const std::string& pricingCycle)
|
||||
{
|
||||
pricingCycle_ = pricingCycle;
|
||||
setParameter("PricingCycle", pricingCycle);
|
||||
}
|
||||
|
||||
int CreateInstanceRequest::getAutoRenewDuration()const
|
||||
{
|
||||
return autoRenewDuration_;
|
||||
}
|
||||
|
||||
void CreateInstanceRequest::setAutoRenewDuration(int autoRenewDuration)
|
||||
{
|
||||
autoRenewDuration_ = autoRenewDuration;
|
||||
setParameter("AutoRenewDuration", std::to_string(autoRenewDuration));
|
||||
}
|
||||
|
||||
59
aegis/src/model/CreateInstanceResult.cc
Normal file
59
aegis/src/model/CreateInstanceResult.cc
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.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/aegis/model/CreateInstanceResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Aegis;
|
||||
using namespace AlibabaCloud::Aegis::Model;
|
||||
|
||||
CreateInstanceResult::CreateInstanceResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
CreateInstanceResult::CreateInstanceResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
CreateInstanceResult::~CreateInstanceResult()
|
||||
{}
|
||||
|
||||
void CreateInstanceResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["OrderId"].isNull())
|
||||
orderId_ = value["OrderId"].asString();
|
||||
if(!value["InstanceId"].isNull())
|
||||
instanceId_ = value["InstanceId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string CreateInstanceResult::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
std::string CreateInstanceResult::getOrderId()const
|
||||
{
|
||||
return orderId_;
|
||||
}
|
||||
|
||||
60
aegis/src/model/DeleteStrategyRequest.cc
Normal file
60
aegis/src/model/DeleteStrategyRequest.cc
Normal file
@@ -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 <alibabacloud/aegis/model/DeleteStrategyRequest.h>
|
||||
|
||||
using AlibabaCloud::Aegis::Model::DeleteStrategyRequest;
|
||||
|
||||
DeleteStrategyRequest::DeleteStrategyRequest() :
|
||||
RpcServiceRequest("aegis", "2016-11-11", "DeleteStrategy")
|
||||
{}
|
||||
|
||||
DeleteStrategyRequest::~DeleteStrategyRequest()
|
||||
{}
|
||||
|
||||
long DeleteStrategyRequest::getResourceOwnerId()const
|
||||
{
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void DeleteStrategyRequest::setResourceOwnerId(long resourceOwnerId)
|
||||
{
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string DeleteStrategyRequest::getSourceIp()const
|
||||
{
|
||||
return sourceIp_;
|
||||
}
|
||||
|
||||
void DeleteStrategyRequest::setSourceIp(const std::string& sourceIp)
|
||||
{
|
||||
sourceIp_ = sourceIp;
|
||||
setParameter("SourceIp", sourceIp);
|
||||
}
|
||||
|
||||
std::string DeleteStrategyRequest::getId()const
|
||||
{
|
||||
return id_;
|
||||
}
|
||||
|
||||
void DeleteStrategyRequest::setId(const std::string& id)
|
||||
{
|
||||
id_ = id;
|
||||
setParameter("Id", id);
|
||||
}
|
||||
|
||||
45
aegis/src/model/DeleteStrategyResult.cc
Normal file
45
aegis/src/model/DeleteStrategyResult.cc
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* 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/aegis/model/DeleteStrategyResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Aegis;
|
||||
using namespace AlibabaCloud::Aegis::Model;
|
||||
|
||||
DeleteStrategyResult::DeleteStrategyResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DeleteStrategyResult::DeleteStrategyResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DeleteStrategyResult::~DeleteStrategyResult()
|
||||
{}
|
||||
|
||||
void DeleteStrategyResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
71
aegis/src/model/DescribeLoginLogsRequest.cc
Normal file
71
aegis/src/model/DescribeLoginLogsRequest.cc
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* 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/aegis/model/DescribeLoginLogsRequest.h>
|
||||
|
||||
using AlibabaCloud::Aegis::Model::DescribeLoginLogsRequest;
|
||||
|
||||
DescribeLoginLogsRequest::DescribeLoginLogsRequest() :
|
||||
RpcServiceRequest("aegis", "2016-11-11", "DescribeLoginLogs")
|
||||
{}
|
||||
|
||||
DescribeLoginLogsRequest::~DescribeLoginLogsRequest()
|
||||
{}
|
||||
|
||||
long DescribeLoginLogsRequest::getResourceOwnerId()const
|
||||
{
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void DescribeLoginLogsRequest::setResourceOwnerId(long resourceOwnerId)
|
||||
{
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string DescribeLoginLogsRequest::getSourceIp()const
|
||||
{
|
||||
return sourceIp_;
|
||||
}
|
||||
|
||||
void DescribeLoginLogsRequest::setSourceIp(const std::string& sourceIp)
|
||||
{
|
||||
sourceIp_ = sourceIp;
|
||||
setParameter("SourceIp", sourceIp);
|
||||
}
|
||||
|
||||
int DescribeLoginLogsRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void DescribeLoginLogsRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
int DescribeLoginLogsRequest::getCurrentPage()const
|
||||
{
|
||||
return currentPage_;
|
||||
}
|
||||
|
||||
void DescribeLoginLogsRequest::setCurrentPage(int currentPage)
|
||||
{
|
||||
currentPage_ = currentPage;
|
||||
setParameter("CurrentPage", std::to_string(currentPage));
|
||||
}
|
||||
|
||||
81
aegis/src/model/DescribeLoginLogsResult.cc
Normal file
81
aegis/src/model/DescribeLoginLogsResult.cc
Normal file
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* 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/aegis/model/DescribeLoginLogsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Aegis;
|
||||
using namespace AlibabaCloud::Aegis::Model;
|
||||
|
||||
DescribeLoginLogsResult::DescribeLoginLogsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeLoginLogsResult::DescribeLoginLogsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeLoginLogsResult::~DescribeLoginLogsResult()
|
||||
{}
|
||||
|
||||
void DescribeLoginLogsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allLoginLogs = value["LoginLogs"]["StringItem"];
|
||||
for (const auto &item : allLoginLogs)
|
||||
loginLogs_.push_back(item.asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = std::stoi(value["PageSize"].asString());
|
||||
if(!value["CurrentPage"].isNull())
|
||||
currentPage_ = std::stoi(value["CurrentPage"].asString());
|
||||
if(!value["TotalCount"].isNull())
|
||||
totalCount_ = std::stoi(value["TotalCount"].asString());
|
||||
if(!value["HttpStatusCode"].isNull())
|
||||
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
|
||||
|
||||
}
|
||||
|
||||
int DescribeLoginLogsResult::getTotalCount()const
|
||||
{
|
||||
return totalCount_;
|
||||
}
|
||||
|
||||
int DescribeLoginLogsResult::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
int DescribeLoginLogsResult::getCurrentPage()const
|
||||
{
|
||||
return currentPage_;
|
||||
}
|
||||
|
||||
int DescribeLoginLogsResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
std::vector<std::string> DescribeLoginLogsResult::getLoginLogs()const
|
||||
{
|
||||
return loginLogs_;
|
||||
}
|
||||
|
||||
82
aegis/src/model/DescribeStrategyTargetRequest.cc
Normal file
82
aegis/src/model/DescribeStrategyTargetRequest.cc
Normal file
@@ -0,0 +1,82 @@
|
||||
/*
|
||||
* 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/aegis/model/DescribeStrategyTargetRequest.h>
|
||||
|
||||
using AlibabaCloud::Aegis::Model::DescribeStrategyTargetRequest;
|
||||
|
||||
DescribeStrategyTargetRequest::DescribeStrategyTargetRequest() :
|
||||
RpcServiceRequest("aegis", "2016-11-11", "DescribeStrategyTarget")
|
||||
{}
|
||||
|
||||
DescribeStrategyTargetRequest::~DescribeStrategyTargetRequest()
|
||||
{}
|
||||
|
||||
long DescribeStrategyTargetRequest::getResourceOwnerId()const
|
||||
{
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void DescribeStrategyTargetRequest::setResourceOwnerId(long resourceOwnerId)
|
||||
{
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string DescribeStrategyTargetRequest::getSourceIp()const
|
||||
{
|
||||
return sourceIp_;
|
||||
}
|
||||
|
||||
void DescribeStrategyTargetRequest::setSourceIp(const std::string& sourceIp)
|
||||
{
|
||||
sourceIp_ = sourceIp;
|
||||
setParameter("SourceIp", sourceIp);
|
||||
}
|
||||
|
||||
std::string DescribeStrategyTargetRequest::getType()const
|
||||
{
|
||||
return type_;
|
||||
}
|
||||
|
||||
void DescribeStrategyTargetRequest::setType(const std::string& type)
|
||||
{
|
||||
type_ = type;
|
||||
setParameter("Type", type);
|
||||
}
|
||||
|
||||
std::string DescribeStrategyTargetRequest::getConfig()const
|
||||
{
|
||||
return config_;
|
||||
}
|
||||
|
||||
void DescribeStrategyTargetRequest::setConfig(const std::string& config)
|
||||
{
|
||||
config_ = config;
|
||||
setParameter("Config", config);
|
||||
}
|
||||
|
||||
std::string DescribeStrategyTargetRequest::getTarget()const
|
||||
{
|
||||
return target_;
|
||||
}
|
||||
|
||||
void DescribeStrategyTargetRequest::setTarget(const std::string& target)
|
||||
{
|
||||
target_ = target;
|
||||
setParameter("Target", target);
|
||||
}
|
||||
|
||||
69
aegis/src/model/DescribeStrategyTargetResult.cc
Normal file
69
aegis/src/model/DescribeStrategyTargetResult.cc
Normal file
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* 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/aegis/model/DescribeStrategyTargetResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Aegis;
|
||||
using namespace AlibabaCloud::Aegis::Model;
|
||||
|
||||
DescribeStrategyTargetResult::DescribeStrategyTargetResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeStrategyTargetResult::DescribeStrategyTargetResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeStrategyTargetResult::~DescribeStrategyTargetResult()
|
||||
{}
|
||||
|
||||
void DescribeStrategyTargetResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allStrategyTargets = value["StrategyTargets"]["StringItem"];
|
||||
for (auto value : allStrategyTargets)
|
||||
{
|
||||
StringItem strategyTargetsObject;
|
||||
if(!value["Flag"].isNull())
|
||||
strategyTargetsObject.flag = value["Flag"].asString();
|
||||
if(!value["Target"].isNull())
|
||||
strategyTargetsObject.target = value["Target"].asString();
|
||||
if(!value["TargetType"].isNull())
|
||||
strategyTargetsObject.targetType = value["TargetType"].asString();
|
||||
strategyTargets_.push_back(strategyTargetsObject);
|
||||
}
|
||||
if(!value["Count"].isNull())
|
||||
count_ = std::stoi(value["Count"].asString());
|
||||
|
||||
}
|
||||
|
||||
std::vector<DescribeStrategyTargetResult::StringItem> DescribeStrategyTargetResult::getStrategyTargets()const
|
||||
{
|
||||
return strategyTargets_;
|
||||
}
|
||||
|
||||
int DescribeStrategyTargetResult::getCount()const
|
||||
{
|
||||
return count_;
|
||||
}
|
||||
|
||||
60
aegis/src/model/DescribeStratetyDetailRequest.cc
Normal file
60
aegis/src/model/DescribeStratetyDetailRequest.cc
Normal file
@@ -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 <alibabacloud/aegis/model/DescribeStratetyDetailRequest.h>
|
||||
|
||||
using AlibabaCloud::Aegis::Model::DescribeStratetyDetailRequest;
|
||||
|
||||
DescribeStratetyDetailRequest::DescribeStratetyDetailRequest() :
|
||||
RpcServiceRequest("aegis", "2016-11-11", "DescribeStratetyDetail")
|
||||
{}
|
||||
|
||||
DescribeStratetyDetailRequest::~DescribeStratetyDetailRequest()
|
||||
{}
|
||||
|
||||
long DescribeStratetyDetailRequest::getResourceOwnerId()const
|
||||
{
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void DescribeStratetyDetailRequest::setResourceOwnerId(long resourceOwnerId)
|
||||
{
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string DescribeStratetyDetailRequest::getSourceIp()const
|
||||
{
|
||||
return sourceIp_;
|
||||
}
|
||||
|
||||
void DescribeStratetyDetailRequest::setSourceIp(const std::string& sourceIp)
|
||||
{
|
||||
sourceIp_ = sourceIp;
|
||||
setParameter("SourceIp", sourceIp);
|
||||
}
|
||||
|
||||
std::string DescribeStratetyDetailRequest::getId()const
|
||||
{
|
||||
return id_;
|
||||
}
|
||||
|
||||
void DescribeStratetyDetailRequest::setId(const std::string& id)
|
||||
{
|
||||
id_ = id;
|
||||
setParameter("Id", id);
|
||||
}
|
||||
|
||||
90
aegis/src/model/DescribeStratetyDetailResult.cc
Normal file
90
aegis/src/model/DescribeStratetyDetailResult.cc
Normal file
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
* 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/aegis/model/DescribeStratetyDetailResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Aegis;
|
||||
using namespace AlibabaCloud::Aegis::Model;
|
||||
|
||||
DescribeStratetyDetailResult::DescribeStratetyDetailResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeStratetyDetailResult::DescribeStratetyDetailResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeStratetyDetailResult::~DescribeStratetyDetailResult()
|
||||
{}
|
||||
|
||||
void DescribeStratetyDetailResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allStrategy = value["Strategy"];
|
||||
for (auto value : allStrategy)
|
||||
{
|
||||
Strategy strategyObject;
|
||||
if(!value["CycleDays"].isNull())
|
||||
strategyObject.cycleDays = std::stoi(value["CycleDays"].asString());
|
||||
if(!value["Name"].isNull())
|
||||
strategyObject.name = value["Name"].asString();
|
||||
if(!value["Id"].isNull())
|
||||
strategyObject.id = std::stoi(value["Id"].asString());
|
||||
if(!value["CycleStartTime"].isNull())
|
||||
strategyObject.cycleStartTime = std::stoi(value["CycleStartTime"].asString());
|
||||
if(!value["Type"].isNull())
|
||||
strategyObject.type = std::stoi(value["Type"].asString());
|
||||
auto allRiskTypeWhiteListQueryResultList = value["RiskTypeWhiteListQueryResultList"]["RiskTypeWhiteListQueryResult"];
|
||||
for (auto value : allRiskTypeWhiteListQueryResultList)
|
||||
{
|
||||
Strategy::RiskTypeWhiteListQueryResult riskTypeWhiteListQueryResultObject;
|
||||
if(!value["TypeName"].isNull())
|
||||
riskTypeWhiteListQueryResultObject.typeName = value["TypeName"].asString();
|
||||
if(!value["Alias"].isNull())
|
||||
riskTypeWhiteListQueryResultObject.alias = value["Alias"].asString();
|
||||
if(!value["On"].isNull())
|
||||
riskTypeWhiteListQueryResultObject.on = value["On"].asString() == "true";
|
||||
auto allSubTypes = value["SubTypes"]["SubTyp"];
|
||||
for (auto value : allSubTypes)
|
||||
{
|
||||
Strategy::RiskTypeWhiteListQueryResult::SubTyp subTypesObject;
|
||||
if(!value["TypeName"].isNull())
|
||||
subTypesObject.typeName = value["TypeName"].asString();
|
||||
if(!value["Alias"].isNull())
|
||||
subTypesObject.alias = value["Alias"].asString();
|
||||
if(!value["On"].isNull())
|
||||
subTypesObject.on = value["On"].asString() == "true";
|
||||
riskTypeWhiteListQueryResultObject.subTypes.push_back(subTypesObject);
|
||||
}
|
||||
strategyObject.riskTypeWhiteListQueryResultList.push_back(riskTypeWhiteListQueryResultObject);
|
||||
}
|
||||
strategy_.push_back(strategyObject);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
std::vector<DescribeStratetyDetailResult::Strategy> DescribeStratetyDetailResult::getStrategy()const
|
||||
{
|
||||
return strategy_;
|
||||
}
|
||||
|
||||
49
aegis/src/model/DescribeStratetyRequest.cc
Normal file
49
aegis/src/model/DescribeStratetyRequest.cc
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* 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/aegis/model/DescribeStratetyRequest.h>
|
||||
|
||||
using AlibabaCloud::Aegis::Model::DescribeStratetyRequest;
|
||||
|
||||
DescribeStratetyRequest::DescribeStratetyRequest() :
|
||||
RpcServiceRequest("aegis", "2016-11-11", "DescribeStratety")
|
||||
{}
|
||||
|
||||
DescribeStratetyRequest::~DescribeStratetyRequest()
|
||||
{}
|
||||
|
||||
long DescribeStratetyRequest::getResourceOwnerId()const
|
||||
{
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void DescribeStratetyRequest::setResourceOwnerId(long resourceOwnerId)
|
||||
{
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string DescribeStratetyRequest::getSourceIp()const
|
||||
{
|
||||
return sourceIp_;
|
||||
}
|
||||
|
||||
void DescribeStratetyRequest::setSourceIp(const std::string& sourceIp)
|
||||
{
|
||||
sourceIp_ = sourceIp;
|
||||
setParameter("SourceIp", sourceIp);
|
||||
}
|
||||
|
||||
89
aegis/src/model/DescribeStratetyResult.cc
Normal file
89
aegis/src/model/DescribeStratetyResult.cc
Normal file
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
* 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/aegis/model/DescribeStratetyResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Aegis;
|
||||
using namespace AlibabaCloud::Aegis::Model;
|
||||
|
||||
DescribeStratetyResult::DescribeStratetyResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeStratetyResult::DescribeStratetyResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeStratetyResult::~DescribeStratetyResult()
|
||||
{}
|
||||
|
||||
void DescribeStratetyResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allStrategies = value["Strategies"]["Data"];
|
||||
for (auto value : allStrategies)
|
||||
{
|
||||
Data strategiesObject;
|
||||
if(!value["CycleDays"].isNull())
|
||||
strategiesObject.cycleDays = std::stoi(value["CycleDays"].asString());
|
||||
if(!value["Id"].isNull())
|
||||
strategiesObject.id = std::stoi(value["Id"].asString());
|
||||
if(!value["CycleStartTime"].isNull())
|
||||
strategiesObject.cycleStartTime = std::stoi(value["CycleStartTime"].asString());
|
||||
if(!value["Type"].isNull())
|
||||
strategiesObject.type = std::stoi(value["Type"].asString());
|
||||
if(!value["Name"].isNull())
|
||||
strategiesObject.name = value["Name"].asString();
|
||||
if(!value["RiskCount"].isNull())
|
||||
strategiesObject.riskCount = std::stoi(value["RiskCount"].asString());
|
||||
if(!value["EcsCount"].isNull())
|
||||
strategiesObject.ecsCount = std::stoi(value["EcsCount"].asString());
|
||||
auto allConfigTargets = value["ConfigTargets"]["ConfigTarget"];
|
||||
for (auto value : allConfigTargets)
|
||||
{
|
||||
Data::ConfigTarget configTargetsObject;
|
||||
if(!value["Flag"].isNull())
|
||||
configTargetsObject.flag = value["Flag"].asString();
|
||||
if(!value["TargetType"].isNull())
|
||||
configTargetsObject.targetType = value["TargetType"].asString();
|
||||
if(!value["Target"].isNull())
|
||||
configTargetsObject.target = value["Target"].asString();
|
||||
strategiesObject.configTargets.push_back(configTargetsObject);
|
||||
}
|
||||
strategies_.push_back(strategiesObject);
|
||||
}
|
||||
if(!value["Count"].isNull())
|
||||
count_ = std::stoi(value["Count"].asString());
|
||||
|
||||
}
|
||||
|
||||
std::vector<DescribeStratetyResult::Data> DescribeStratetyResult::getStrategies()const
|
||||
{
|
||||
return strategies_;
|
||||
}
|
||||
|
||||
int DescribeStratetyResult::getCount()const
|
||||
{
|
||||
return count_;
|
||||
}
|
||||
|
||||
49
aegis/src/model/DescribeSuspiciousEventsRequest.cc
Normal file
49
aegis/src/model/DescribeSuspiciousEventsRequest.cc
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* 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/aegis/model/DescribeSuspiciousEventsRequest.h>
|
||||
|
||||
using AlibabaCloud::Aegis::Model::DescribeSuspiciousEventsRequest;
|
||||
|
||||
DescribeSuspiciousEventsRequest::DescribeSuspiciousEventsRequest() :
|
||||
RpcServiceRequest("aegis", "2016-11-11", "DescribeSuspiciousEvents")
|
||||
{}
|
||||
|
||||
DescribeSuspiciousEventsRequest::~DescribeSuspiciousEventsRequest()
|
||||
{}
|
||||
|
||||
long DescribeSuspiciousEventsRequest::getResourceOwnerId()const
|
||||
{
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void DescribeSuspiciousEventsRequest::setResourceOwnerId(long resourceOwnerId)
|
||||
{
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string DescribeSuspiciousEventsRequest::getSourceIp()const
|
||||
{
|
||||
return sourceIp_;
|
||||
}
|
||||
|
||||
void DescribeSuspiciousEventsRequest::setSourceIp(const std::string& sourceIp)
|
||||
{
|
||||
sourceIp_ = sourceIp;
|
||||
setParameter("SourceIp", sourceIp);
|
||||
}
|
||||
|
||||
81
aegis/src/model/DescribeSuspiciousEventsResult.cc
Normal file
81
aegis/src/model/DescribeSuspiciousEventsResult.cc
Normal file
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* 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/aegis/model/DescribeSuspiciousEventsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Aegis;
|
||||
using namespace AlibabaCloud::Aegis::Model;
|
||||
|
||||
DescribeSuspiciousEventsResult::DescribeSuspiciousEventsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeSuspiciousEventsResult::DescribeSuspiciousEventsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeSuspiciousEventsResult::~DescribeSuspiciousEventsResult()
|
||||
{}
|
||||
|
||||
void DescribeSuspiciousEventsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allSuspiciousEvents = value["SuspiciousEvents"]["StringItem"];
|
||||
for (const auto &item : allSuspiciousEvents)
|
||||
suspiciousEvents_.push_back(item.asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = std::stoi(value["PageSize"].asString());
|
||||
if(!value["TotalCount"].isNull())
|
||||
totalCount_ = std::stoi(value["TotalCount"].asString());
|
||||
if(!value["CurrentPage"].isNull())
|
||||
currentPage_ = std::stoi(value["CurrentPage"].asString());
|
||||
if(!value["HttpStatusCode"].isNull())
|
||||
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
|
||||
|
||||
}
|
||||
|
||||
int DescribeSuspiciousEventsResult::getTotalCount()const
|
||||
{
|
||||
return totalCount_;
|
||||
}
|
||||
|
||||
int DescribeSuspiciousEventsResult::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
std::vector<std::string> DescribeSuspiciousEventsResult::getSuspiciousEvents()const
|
||||
{
|
||||
return suspiciousEvents_;
|
||||
}
|
||||
|
||||
int DescribeSuspiciousEventsResult::getCurrentPage()const
|
||||
{
|
||||
return currentPage_;
|
||||
}
|
||||
|
||||
int DescribeSuspiciousEventsResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
258
aegis/src/model/DescribeVulDetailsRequest.cc
Normal file
258
aegis/src/model/DescribeVulDetailsRequest.cc
Normal file
@@ -0,0 +1,258 @@
|
||||
/*
|
||||
* 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/aegis/model/DescribeVulDetailsRequest.h>
|
||||
|
||||
using AlibabaCloud::Aegis::Model::DescribeVulDetailsRequest;
|
||||
|
||||
DescribeVulDetailsRequest::DescribeVulDetailsRequest() :
|
||||
RpcServiceRequest("aegis", "2016-11-11", "DescribeVulDetails")
|
||||
{}
|
||||
|
||||
DescribeVulDetailsRequest::~DescribeVulDetailsRequest()
|
||||
{}
|
||||
|
||||
long DescribeVulDetailsRequest::getResourceOwnerId()const
|
||||
{
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void DescribeVulDetailsRequest::setResourceOwnerId(long resourceOwnerId)
|
||||
{
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string DescribeVulDetailsRequest::getProduct()const
|
||||
{
|
||||
return product_;
|
||||
}
|
||||
|
||||
void DescribeVulDetailsRequest::setProduct(const std::string& product)
|
||||
{
|
||||
product_ = product;
|
||||
setParameter("Product", product);
|
||||
}
|
||||
|
||||
std::string DescribeVulDetailsRequest::getStatusList()const
|
||||
{
|
||||
return statusList_;
|
||||
}
|
||||
|
||||
void DescribeVulDetailsRequest::setStatusList(const std::string& statusList)
|
||||
{
|
||||
statusList_ = statusList;
|
||||
setParameter("StatusList", statusList);
|
||||
}
|
||||
|
||||
std::string DescribeVulDetailsRequest::getLevel()const
|
||||
{
|
||||
return level_;
|
||||
}
|
||||
|
||||
void DescribeVulDetailsRequest::setLevel(const std::string& level)
|
||||
{
|
||||
level_ = level;
|
||||
setParameter("Level", level);
|
||||
}
|
||||
|
||||
std::string DescribeVulDetailsRequest::getResource()const
|
||||
{
|
||||
return resource_;
|
||||
}
|
||||
|
||||
void DescribeVulDetailsRequest::setResource(const std::string& resource)
|
||||
{
|
||||
resource_ = resource;
|
||||
setParameter("Resource", resource);
|
||||
}
|
||||
|
||||
std::string DescribeVulDetailsRequest::getOrderBy()const
|
||||
{
|
||||
return orderBy_;
|
||||
}
|
||||
|
||||
void DescribeVulDetailsRequest::setOrderBy(const std::string& orderBy)
|
||||
{
|
||||
orderBy_ = orderBy;
|
||||
setParameter("OrderBy", orderBy);
|
||||
}
|
||||
|
||||
std::string DescribeVulDetailsRequest::getDealed()const
|
||||
{
|
||||
return dealed_;
|
||||
}
|
||||
|
||||
void DescribeVulDetailsRequest::setDealed(const std::string& dealed)
|
||||
{
|
||||
dealed_ = dealed;
|
||||
setParameter("Dealed", dealed);
|
||||
}
|
||||
|
||||
int DescribeVulDetailsRequest::getCurrentPage()const
|
||||
{
|
||||
return currentPage_;
|
||||
}
|
||||
|
||||
void DescribeVulDetailsRequest::setCurrentPage(int currentPage)
|
||||
{
|
||||
currentPage_ = currentPage;
|
||||
setParameter("CurrentPage", std::to_string(currentPage));
|
||||
}
|
||||
|
||||
std::string DescribeVulDetailsRequest::getType()const
|
||||
{
|
||||
return type_;
|
||||
}
|
||||
|
||||
void DescribeVulDetailsRequest::setType(const std::string& type)
|
||||
{
|
||||
type_ = type;
|
||||
setParameter("Type", type);
|
||||
}
|
||||
|
||||
long DescribeVulDetailsRequest::getLastTsEnd()const
|
||||
{
|
||||
return lastTsEnd_;
|
||||
}
|
||||
|
||||
void DescribeVulDetailsRequest::setLastTsEnd(long lastTsEnd)
|
||||
{
|
||||
lastTsEnd_ = lastTsEnd;
|
||||
setParameter("LastTsEnd", std::to_string(lastTsEnd));
|
||||
}
|
||||
|
||||
std::string DescribeVulDetailsRequest::getBatchName()const
|
||||
{
|
||||
return batchName_;
|
||||
}
|
||||
|
||||
void DescribeVulDetailsRequest::setBatchName(const std::string& batchName)
|
||||
{
|
||||
batchName_ = batchName;
|
||||
setParameter("BatchName", batchName);
|
||||
}
|
||||
|
||||
long DescribeVulDetailsRequest::getPatchId()const
|
||||
{
|
||||
return patchId_;
|
||||
}
|
||||
|
||||
void DescribeVulDetailsRequest::setPatchId(long patchId)
|
||||
{
|
||||
patchId_ = patchId;
|
||||
setParameter("PatchId", std::to_string(patchId));
|
||||
}
|
||||
|
||||
std::string DescribeVulDetailsRequest::getAliasName()const
|
||||
{
|
||||
return aliasName_;
|
||||
}
|
||||
|
||||
void DescribeVulDetailsRequest::setAliasName(const std::string& aliasName)
|
||||
{
|
||||
aliasName_ = aliasName;
|
||||
setParameter("AliasName", aliasName);
|
||||
}
|
||||
|
||||
std::string DescribeVulDetailsRequest::getSourceIp()const
|
||||
{
|
||||
return sourceIp_;
|
||||
}
|
||||
|
||||
void DescribeVulDetailsRequest::setSourceIp(const std::string& sourceIp)
|
||||
{
|
||||
sourceIp_ = sourceIp;
|
||||
setParameter("SourceIp", sourceIp);
|
||||
}
|
||||
|
||||
std::string DescribeVulDetailsRequest::getName()const
|
||||
{
|
||||
return name_;
|
||||
}
|
||||
|
||||
void DescribeVulDetailsRequest::setName(const std::string& name)
|
||||
{
|
||||
name_ = name;
|
||||
setParameter("Name", name);
|
||||
}
|
||||
|
||||
int DescribeVulDetailsRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void DescribeVulDetailsRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string DescribeVulDetailsRequest::getLang()const
|
||||
{
|
||||
return lang_;
|
||||
}
|
||||
|
||||
void DescribeVulDetailsRequest::setLang(const std::string& lang)
|
||||
{
|
||||
lang_ = lang;
|
||||
setParameter("Lang", lang);
|
||||
}
|
||||
|
||||
long DescribeVulDetailsRequest::getLastTsStart()const
|
||||
{
|
||||
return lastTsStart_;
|
||||
}
|
||||
|
||||
void DescribeVulDetailsRequest::setLastTsStart(long lastTsStart)
|
||||
{
|
||||
lastTsStart_ = lastTsStart;
|
||||
setParameter("LastTsStart", std::to_string(lastTsStart));
|
||||
}
|
||||
|
||||
std::string DescribeVulDetailsRequest::getNecessity()const
|
||||
{
|
||||
return necessity_;
|
||||
}
|
||||
|
||||
void DescribeVulDetailsRequest::setNecessity(const std::string& necessity)
|
||||
{
|
||||
necessity_ = necessity;
|
||||
setParameter("Necessity", necessity);
|
||||
}
|
||||
|
||||
std::string DescribeVulDetailsRequest::getUuids()const
|
||||
{
|
||||
return uuids_;
|
||||
}
|
||||
|
||||
void DescribeVulDetailsRequest::setUuids(const std::string& uuids)
|
||||
{
|
||||
uuids_ = uuids;
|
||||
setParameter("Uuids", uuids);
|
||||
}
|
||||
|
||||
std::string DescribeVulDetailsRequest::getDirection()const
|
||||
{
|
||||
return direction_;
|
||||
}
|
||||
|
||||
void DescribeVulDetailsRequest::setDirection(const std::string& direction)
|
||||
{
|
||||
direction_ = direction;
|
||||
setParameter("Direction", direction);
|
||||
}
|
||||
|
||||
158
aegis/src/model/DescribeVulDetailsResult.cc
Normal file
158
aegis/src/model/DescribeVulDetailsResult.cc
Normal file
@@ -0,0 +1,158 @@
|
||||
/*
|
||||
* 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/aegis/model/DescribeVulDetailsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Aegis;
|
||||
using namespace AlibabaCloud::Aegis::Model;
|
||||
|
||||
DescribeVulDetailsResult::DescribeVulDetailsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeVulDetailsResult::DescribeVulDetailsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeVulDetailsResult::~DescribeVulDetailsResult()
|
||||
{}
|
||||
|
||||
void DescribeVulDetailsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allCveLists = value["CveLists"]["cve"];
|
||||
for (const auto &item : allCveLists)
|
||||
cveLists_.push_back(item.asString());
|
||||
if(!value["Name"].isNull())
|
||||
name_ = value["Name"].asString();
|
||||
if(!value["AliasName"].isNull())
|
||||
aliasName_ = value["AliasName"].asString();
|
||||
if(!value["Level"].isNull())
|
||||
level_ = value["Level"].asString();
|
||||
if(!value["VulPublishTs"].isNull())
|
||||
vulPublishTs_ = std::stol(value["VulPublishTs"].asString());
|
||||
if(!value["Type"].isNull())
|
||||
type_ = value["Type"].asString();
|
||||
if(!value["Product"].isNull())
|
||||
product_ = value["Product"].asString();
|
||||
if(!value["HasPatch"].isNull())
|
||||
hasPatch_ = value["HasPatch"].asString() == "true";
|
||||
if(!value["PatchPublishTs"].isNull())
|
||||
patchPublishTs_ = std::stol(value["PatchPublishTs"].asString());
|
||||
if(!value["PatchSource"].isNull())
|
||||
patchSource_ = value["PatchSource"].asString();
|
||||
if(!value["Cvss"].isNull())
|
||||
cvss_ = value["Cvss"].asString();
|
||||
if(!value["CveIds"].isNull())
|
||||
cveIds_ = value["CveIds"].asString();
|
||||
if(!value["Advice"].isNull())
|
||||
advice_ = value["Advice"].asString();
|
||||
if(!value["Description"].isNull())
|
||||
description_ = value["Description"].asString();
|
||||
if(!value["PendingCount"].isNull())
|
||||
pendingCount_ = std::stoi(value["PendingCount"].asString());
|
||||
if(!value["HandledCount"].isNull())
|
||||
handledCount_ = std::stoi(value["HandledCount"].asString());
|
||||
|
||||
}
|
||||
|
||||
int DescribeVulDetailsResult::getPendingCount()const
|
||||
{
|
||||
return pendingCount_;
|
||||
}
|
||||
|
||||
std::string DescribeVulDetailsResult::getDescription()const
|
||||
{
|
||||
return description_;
|
||||
}
|
||||
|
||||
std::vector<std::string> DescribeVulDetailsResult::getCveLists()const
|
||||
{
|
||||
return cveLists_;
|
||||
}
|
||||
|
||||
std::string DescribeVulDetailsResult::getCveIds()const
|
||||
{
|
||||
return cveIds_;
|
||||
}
|
||||
|
||||
long DescribeVulDetailsResult::getVulPublishTs()const
|
||||
{
|
||||
return vulPublishTs_;
|
||||
}
|
||||
|
||||
std::string DescribeVulDetailsResult::getProduct()const
|
||||
{
|
||||
return product_;
|
||||
}
|
||||
|
||||
bool DescribeVulDetailsResult::getHasPatch()const
|
||||
{
|
||||
return hasPatch_;
|
||||
}
|
||||
|
||||
std::string DescribeVulDetailsResult::getName()const
|
||||
{
|
||||
return name_;
|
||||
}
|
||||
|
||||
std::string DescribeVulDetailsResult::getType()const
|
||||
{
|
||||
return type_;
|
||||
}
|
||||
|
||||
std::string DescribeVulDetailsResult::getCvss()const
|
||||
{
|
||||
return cvss_;
|
||||
}
|
||||
|
||||
long DescribeVulDetailsResult::getPatchPublishTs()const
|
||||
{
|
||||
return patchPublishTs_;
|
||||
}
|
||||
|
||||
int DescribeVulDetailsResult::getHandledCount()const
|
||||
{
|
||||
return handledCount_;
|
||||
}
|
||||
|
||||
std::string DescribeVulDetailsResult::getAliasName()const
|
||||
{
|
||||
return aliasName_;
|
||||
}
|
||||
|
||||
std::string DescribeVulDetailsResult::getLevel()const
|
||||
{
|
||||
return level_;
|
||||
}
|
||||
|
||||
std::string DescribeVulDetailsResult::getAdvice()const
|
||||
{
|
||||
return advice_;
|
||||
}
|
||||
|
||||
std::string DescribeVulDetailsResult::getPatchSource()const
|
||||
{
|
||||
return patchSource_;
|
||||
}
|
||||
|
||||
258
aegis/src/model/DescribeVulListRequest.cc
Normal file
258
aegis/src/model/DescribeVulListRequest.cc
Normal file
@@ -0,0 +1,258 @@
|
||||
/*
|
||||
* 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/aegis/model/DescribeVulListRequest.h>
|
||||
|
||||
using AlibabaCloud::Aegis::Model::DescribeVulListRequest;
|
||||
|
||||
DescribeVulListRequest::DescribeVulListRequest() :
|
||||
RpcServiceRequest("aegis", "2016-11-11", "DescribeVulList")
|
||||
{}
|
||||
|
||||
DescribeVulListRequest::~DescribeVulListRequest()
|
||||
{}
|
||||
|
||||
long DescribeVulListRequest::getResourceOwnerId()const
|
||||
{
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void DescribeVulListRequest::setResourceOwnerId(long resourceOwnerId)
|
||||
{
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string DescribeVulListRequest::getProduct()const
|
||||
{
|
||||
return product_;
|
||||
}
|
||||
|
||||
void DescribeVulListRequest::setProduct(const std::string& product)
|
||||
{
|
||||
product_ = product;
|
||||
setParameter("Product", product);
|
||||
}
|
||||
|
||||
std::string DescribeVulListRequest::getStatusList()const
|
||||
{
|
||||
return statusList_;
|
||||
}
|
||||
|
||||
void DescribeVulListRequest::setStatusList(const std::string& statusList)
|
||||
{
|
||||
statusList_ = statusList;
|
||||
setParameter("StatusList", statusList);
|
||||
}
|
||||
|
||||
std::string DescribeVulListRequest::getLevel()const
|
||||
{
|
||||
return level_;
|
||||
}
|
||||
|
||||
void DescribeVulListRequest::setLevel(const std::string& level)
|
||||
{
|
||||
level_ = level;
|
||||
setParameter("Level", level);
|
||||
}
|
||||
|
||||
std::string DescribeVulListRequest::getResource()const
|
||||
{
|
||||
return resource_;
|
||||
}
|
||||
|
||||
void DescribeVulListRequest::setResource(const std::string& resource)
|
||||
{
|
||||
resource_ = resource;
|
||||
setParameter("Resource", resource);
|
||||
}
|
||||
|
||||
std::string DescribeVulListRequest::getOrderBy()const
|
||||
{
|
||||
return orderBy_;
|
||||
}
|
||||
|
||||
void DescribeVulListRequest::setOrderBy(const std::string& orderBy)
|
||||
{
|
||||
orderBy_ = orderBy;
|
||||
setParameter("OrderBy", orderBy);
|
||||
}
|
||||
|
||||
std::string DescribeVulListRequest::getDealed()const
|
||||
{
|
||||
return dealed_;
|
||||
}
|
||||
|
||||
void DescribeVulListRequest::setDealed(const std::string& dealed)
|
||||
{
|
||||
dealed_ = dealed;
|
||||
setParameter("Dealed", dealed);
|
||||
}
|
||||
|
||||
int DescribeVulListRequest::getCurrentPage()const
|
||||
{
|
||||
return currentPage_;
|
||||
}
|
||||
|
||||
void DescribeVulListRequest::setCurrentPage(int currentPage)
|
||||
{
|
||||
currentPage_ = currentPage;
|
||||
setParameter("CurrentPage", std::to_string(currentPage));
|
||||
}
|
||||
|
||||
std::string DescribeVulListRequest::getType()const
|
||||
{
|
||||
return type_;
|
||||
}
|
||||
|
||||
void DescribeVulListRequest::setType(const std::string& type)
|
||||
{
|
||||
type_ = type;
|
||||
setParameter("Type", type);
|
||||
}
|
||||
|
||||
long DescribeVulListRequest::getLastTsEnd()const
|
||||
{
|
||||
return lastTsEnd_;
|
||||
}
|
||||
|
||||
void DescribeVulListRequest::setLastTsEnd(long lastTsEnd)
|
||||
{
|
||||
lastTsEnd_ = lastTsEnd;
|
||||
setParameter("LastTsEnd", std::to_string(lastTsEnd));
|
||||
}
|
||||
|
||||
std::string DescribeVulListRequest::getBatchName()const
|
||||
{
|
||||
return batchName_;
|
||||
}
|
||||
|
||||
void DescribeVulListRequest::setBatchName(const std::string& batchName)
|
||||
{
|
||||
batchName_ = batchName;
|
||||
setParameter("BatchName", batchName);
|
||||
}
|
||||
|
||||
long DescribeVulListRequest::getPatchId()const
|
||||
{
|
||||
return patchId_;
|
||||
}
|
||||
|
||||
void DescribeVulListRequest::setPatchId(long patchId)
|
||||
{
|
||||
patchId_ = patchId;
|
||||
setParameter("PatchId", std::to_string(patchId));
|
||||
}
|
||||
|
||||
std::string DescribeVulListRequest::getAliasName()const
|
||||
{
|
||||
return aliasName_;
|
||||
}
|
||||
|
||||
void DescribeVulListRequest::setAliasName(const std::string& aliasName)
|
||||
{
|
||||
aliasName_ = aliasName;
|
||||
setParameter("AliasName", aliasName);
|
||||
}
|
||||
|
||||
std::string DescribeVulListRequest::getSourceIp()const
|
||||
{
|
||||
return sourceIp_;
|
||||
}
|
||||
|
||||
void DescribeVulListRequest::setSourceIp(const std::string& sourceIp)
|
||||
{
|
||||
sourceIp_ = sourceIp;
|
||||
setParameter("SourceIp", sourceIp);
|
||||
}
|
||||
|
||||
std::string DescribeVulListRequest::getName()const
|
||||
{
|
||||
return name_;
|
||||
}
|
||||
|
||||
void DescribeVulListRequest::setName(const std::string& name)
|
||||
{
|
||||
name_ = name;
|
||||
setParameter("Name", name);
|
||||
}
|
||||
|
||||
int DescribeVulListRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void DescribeVulListRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string DescribeVulListRequest::getLang()const
|
||||
{
|
||||
return lang_;
|
||||
}
|
||||
|
||||
void DescribeVulListRequest::setLang(const std::string& lang)
|
||||
{
|
||||
lang_ = lang;
|
||||
setParameter("Lang", lang);
|
||||
}
|
||||
|
||||
long DescribeVulListRequest::getLastTsStart()const
|
||||
{
|
||||
return lastTsStart_;
|
||||
}
|
||||
|
||||
void DescribeVulListRequest::setLastTsStart(long lastTsStart)
|
||||
{
|
||||
lastTsStart_ = lastTsStart;
|
||||
setParameter("LastTsStart", std::to_string(lastTsStart));
|
||||
}
|
||||
|
||||
std::string DescribeVulListRequest::getNecessity()const
|
||||
{
|
||||
return necessity_;
|
||||
}
|
||||
|
||||
void DescribeVulListRequest::setNecessity(const std::string& necessity)
|
||||
{
|
||||
necessity_ = necessity;
|
||||
setParameter("Necessity", necessity);
|
||||
}
|
||||
|
||||
std::string DescribeVulListRequest::getUuids()const
|
||||
{
|
||||
return uuids_;
|
||||
}
|
||||
|
||||
void DescribeVulListRequest::setUuids(const std::string& uuids)
|
||||
{
|
||||
uuids_ = uuids;
|
||||
setParameter("Uuids", uuids);
|
||||
}
|
||||
|
||||
std::string DescribeVulListRequest::getDirection()const
|
||||
{
|
||||
return direction_;
|
||||
}
|
||||
|
||||
void DescribeVulListRequest::setDirection(const std::string& direction)
|
||||
{
|
||||
direction_ = direction;
|
||||
setParameter("Direction", direction);
|
||||
}
|
||||
|
||||
81
aegis/src/model/DescribeVulListResult.cc
Normal file
81
aegis/src/model/DescribeVulListResult.cc
Normal file
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* 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/aegis/model/DescribeVulListResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Aegis;
|
||||
using namespace AlibabaCloud::Aegis::Model;
|
||||
|
||||
DescribeVulListResult::DescribeVulListResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeVulListResult::DescribeVulListResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeVulListResult::~DescribeVulListResult()
|
||||
{}
|
||||
|
||||
void DescribeVulListResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allVulRecords = value["VulRecords"]["vulRecord"];
|
||||
for (const auto &item : allVulRecords)
|
||||
vulRecords_.push_back(item.asString());
|
||||
if(!value["Count"].isNull())
|
||||
count_ = std::stoi(value["Count"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = std::stoi(value["PageSize"].asString());
|
||||
if(!value["CurrentPage"].isNull())
|
||||
currentPage_ = std::stoi(value["CurrentPage"].asString());
|
||||
if(!value["TotalCount"].isNull())
|
||||
totalCount_ = std::stoi(value["TotalCount"].asString());
|
||||
|
||||
}
|
||||
|
||||
int DescribeVulListResult::getTotalCount()const
|
||||
{
|
||||
return totalCount_;
|
||||
}
|
||||
|
||||
std::vector<std::string> DescribeVulListResult::getVulRecords()const
|
||||
{
|
||||
return vulRecords_;
|
||||
}
|
||||
|
||||
int DescribeVulListResult::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
int DescribeVulListResult::getCurrentPage()const
|
||||
{
|
||||
return currentPage_;
|
||||
}
|
||||
|
||||
int DescribeVulListResult::getCount()const
|
||||
{
|
||||
return count_;
|
||||
}
|
||||
|
||||
148
aegis/src/model/DescribeWarningRequest.cc
Normal file
148
aegis/src/model/DescribeWarningRequest.cc
Normal file
@@ -0,0 +1,148 @@
|
||||
/*
|
||||
* 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/aegis/model/DescribeWarningRequest.h>
|
||||
|
||||
using AlibabaCloud::Aegis::Model::DescribeWarningRequest;
|
||||
|
||||
DescribeWarningRequest::DescribeWarningRequest() :
|
||||
RpcServiceRequest("aegis", "2016-11-11", "DescribeWarning")
|
||||
{}
|
||||
|
||||
DescribeWarningRequest::~DescribeWarningRequest()
|
||||
{}
|
||||
|
||||
std::string DescribeWarningRequest::getTypeNames()const
|
||||
{
|
||||
return typeNames_;
|
||||
}
|
||||
|
||||
void DescribeWarningRequest::setTypeNames(const std::string& typeNames)
|
||||
{
|
||||
typeNames_ = typeNames;
|
||||
setParameter("TypeNames", typeNames);
|
||||
}
|
||||
|
||||
long DescribeWarningRequest::getResourceOwnerId()const
|
||||
{
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void DescribeWarningRequest::setResourceOwnerId(long resourceOwnerId)
|
||||
{
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string DescribeWarningRequest::getRiskName()const
|
||||
{
|
||||
return riskName_;
|
||||
}
|
||||
|
||||
void DescribeWarningRequest::setRiskName(const std::string& riskName)
|
||||
{
|
||||
riskName_ = riskName;
|
||||
setParameter("RiskName", riskName);
|
||||
}
|
||||
|
||||
std::string DescribeWarningRequest::getStatusList()const
|
||||
{
|
||||
return statusList_;
|
||||
}
|
||||
|
||||
void DescribeWarningRequest::setStatusList(const std::string& statusList)
|
||||
{
|
||||
statusList_ = statusList;
|
||||
setParameter("StatusList", statusList);
|
||||
}
|
||||
|
||||
std::string DescribeWarningRequest::getSourceIp()const
|
||||
{
|
||||
return sourceIp_;
|
||||
}
|
||||
|
||||
void DescribeWarningRequest::setSourceIp(const std::string& sourceIp)
|
||||
{
|
||||
sourceIp_ = sourceIp;
|
||||
setParameter("SourceIp", sourceIp);
|
||||
}
|
||||
|
||||
std::string DescribeWarningRequest::getRiskLevels()const
|
||||
{
|
||||
return riskLevels_;
|
||||
}
|
||||
|
||||
void DescribeWarningRequest::setRiskLevels(const std::string& riskLevels)
|
||||
{
|
||||
riskLevels_ = riskLevels;
|
||||
setParameter("RiskLevels", riskLevels);
|
||||
}
|
||||
|
||||
int DescribeWarningRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void DescribeWarningRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
int DescribeWarningRequest::getCurrentPage()const
|
||||
{
|
||||
return currentPage_;
|
||||
}
|
||||
|
||||
void DescribeWarningRequest::setCurrentPage(int currentPage)
|
||||
{
|
||||
currentPage_ = currentPage;
|
||||
setParameter("CurrentPage", std::to_string(currentPage));
|
||||
}
|
||||
|
||||
std::string DescribeWarningRequest::getDealed()const
|
||||
{
|
||||
return dealed_;
|
||||
}
|
||||
|
||||
void DescribeWarningRequest::setDealed(const std::string& dealed)
|
||||
{
|
||||
dealed_ = dealed;
|
||||
setParameter("Dealed", dealed);
|
||||
}
|
||||
|
||||
std::string DescribeWarningRequest::getSubTypeNames()const
|
||||
{
|
||||
return subTypeNames_;
|
||||
}
|
||||
|
||||
void DescribeWarningRequest::setSubTypeNames(const std::string& subTypeNames)
|
||||
{
|
||||
subTypeNames_ = subTypeNames;
|
||||
setParameter("SubTypeNames", subTypeNames);
|
||||
}
|
||||
|
||||
std::string DescribeWarningRequest::getUuids()const
|
||||
{
|
||||
return uuids_;
|
||||
}
|
||||
|
||||
void DescribeWarningRequest::setUuids(const std::string& uuids)
|
||||
{
|
||||
uuids_ = uuids;
|
||||
setParameter("Uuids", uuids);
|
||||
}
|
||||
|
||||
81
aegis/src/model/DescribeWarningResult.cc
Normal file
81
aegis/src/model/DescribeWarningResult.cc
Normal file
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* 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/aegis/model/DescribeWarningResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Aegis;
|
||||
using namespace AlibabaCloud::Aegis::Model;
|
||||
|
||||
DescribeWarningResult::DescribeWarningResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeWarningResult::DescribeWarningResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeWarningResult::~DescribeWarningResult()
|
||||
{}
|
||||
|
||||
void DescribeWarningResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allWarnings = value["Warnings"]["warning"];
|
||||
for (const auto &item : allWarnings)
|
||||
warnings_.push_back(item.asString());
|
||||
if(!value["Count"].isNull())
|
||||
count_ = std::stoi(value["Count"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = std::stoi(value["PageSize"].asString());
|
||||
if(!value["TotalCount"].isNull())
|
||||
totalCount_ = std::stoi(value["TotalCount"].asString());
|
||||
if(!value["CurrentPage"].isNull())
|
||||
currentPage_ = std::stoi(value["CurrentPage"].asString());
|
||||
|
||||
}
|
||||
|
||||
int DescribeWarningResult::getTotalCount()const
|
||||
{
|
||||
return totalCount_;
|
||||
}
|
||||
|
||||
int DescribeWarningResult::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
int DescribeWarningResult::getCurrentPage()const
|
||||
{
|
||||
return currentPage_;
|
||||
}
|
||||
|
||||
int DescribeWarningResult::getCount()const
|
||||
{
|
||||
return count_;
|
||||
}
|
||||
|
||||
std::vector<std::string> DescribeWarningResult::getWarnings()const
|
||||
{
|
||||
return warnings_;
|
||||
}
|
||||
|
||||
71
aegis/src/model/DescribeWebshellRequest.cc
Normal file
71
aegis/src/model/DescribeWebshellRequest.cc
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* 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/aegis/model/DescribeWebshellRequest.h>
|
||||
|
||||
using AlibabaCloud::Aegis::Model::DescribeWebshellRequest;
|
||||
|
||||
DescribeWebshellRequest::DescribeWebshellRequest() :
|
||||
RpcServiceRequest("aegis", "2016-11-11", "DescribeWebshell")
|
||||
{}
|
||||
|
||||
DescribeWebshellRequest::~DescribeWebshellRequest()
|
||||
{}
|
||||
|
||||
long DescribeWebshellRequest::getResourceOwnerId()const
|
||||
{
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void DescribeWebshellRequest::setResourceOwnerId(long resourceOwnerId)
|
||||
{
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string DescribeWebshellRequest::getSourceIp()const
|
||||
{
|
||||
return sourceIp_;
|
||||
}
|
||||
|
||||
void DescribeWebshellRequest::setSourceIp(const std::string& sourceIp)
|
||||
{
|
||||
sourceIp_ = sourceIp;
|
||||
setParameter("SourceIp", sourceIp);
|
||||
}
|
||||
|
||||
int DescribeWebshellRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
}
|
||||
|
||||
void DescribeWebshellRequest::setGroupId(int groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", std::to_string(groupId));
|
||||
}
|
||||
|
||||
std::string DescribeWebshellRequest::getRemark()const
|
||||
{
|
||||
return remark_;
|
||||
}
|
||||
|
||||
void DescribeWebshellRequest::setRemark(const std::string& remark)
|
||||
{
|
||||
remark_ = remark;
|
||||
setParameter("Remark", remark);
|
||||
}
|
||||
|
||||
66
aegis/src/model/DescribeWebshellResult.cc
Normal file
66
aegis/src/model/DescribeWebshellResult.cc
Normal file
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* 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/aegis/model/DescribeWebshellResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Aegis;
|
||||
using namespace AlibabaCloud::Aegis::Model;
|
||||
|
||||
DescribeWebshellResult::DescribeWebshellResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
DescribeWebshellResult::DescribeWebshellResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
DescribeWebshellResult::~DescribeWebshellResult()
|
||||
{}
|
||||
|
||||
void DescribeWebshellResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["TotalCount"].isNull())
|
||||
totalCount_ = std::stoi(value["TotalCount"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
pageSize_ = std::stoi(value["PageSize"].asString());
|
||||
if(!value["CurrentPage"].isNull())
|
||||
currentPage_ = std::stoi(value["CurrentPage"].asString());
|
||||
|
||||
}
|
||||
|
||||
int DescribeWebshellResult::getTotalCount()const
|
||||
{
|
||||
return totalCount_;
|
||||
}
|
||||
|
||||
int DescribeWebshellResult::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
int DescribeWebshellResult::getCurrentPage()const
|
||||
{
|
||||
return currentPage_;
|
||||
}
|
||||
|
||||
49
aegis/src/model/GetAccountStatisticsRequest.cc
Normal file
49
aegis/src/model/GetAccountStatisticsRequest.cc
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* 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/aegis/model/GetAccountStatisticsRequest.h>
|
||||
|
||||
using AlibabaCloud::Aegis::Model::GetAccountStatisticsRequest;
|
||||
|
||||
GetAccountStatisticsRequest::GetAccountStatisticsRequest() :
|
||||
RpcServiceRequest("aegis", "2016-11-11", "GetAccountStatistics")
|
||||
{}
|
||||
|
||||
GetAccountStatisticsRequest::~GetAccountStatisticsRequest()
|
||||
{}
|
||||
|
||||
std::string GetAccountStatisticsRequest::getEndTime()const
|
||||
{
|
||||
return endTime_;
|
||||
}
|
||||
|
||||
void GetAccountStatisticsRequest::setEndTime(const std::string& endTime)
|
||||
{
|
||||
endTime_ = endTime;
|
||||
setParameter("EndTime", endTime);
|
||||
}
|
||||
|
||||
std::string GetAccountStatisticsRequest::getStartTime()const
|
||||
{
|
||||
return startTime_;
|
||||
}
|
||||
|
||||
void GetAccountStatisticsRequest::setStartTime(const std::string& startTime)
|
||||
{
|
||||
startTime_ = startTime;
|
||||
setParameter("StartTime", startTime);
|
||||
}
|
||||
|
||||
88
aegis/src/model/GetAccountStatisticsResult.cc
Normal file
88
aegis/src/model/GetAccountStatisticsResult.cc
Normal file
@@ -0,0 +1,88 @@
|
||||
/*
|
||||
* 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/aegis/model/GetAccountStatisticsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Aegis;
|
||||
using namespace AlibabaCloud::Aegis::Model;
|
||||
|
||||
GetAccountStatisticsResult::GetAccountStatisticsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetAccountStatisticsResult::GetAccountStatisticsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetAccountStatisticsResult::~GetAccountStatisticsResult()
|
||||
{}
|
||||
|
||||
void GetAccountStatisticsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allData = value["Data"];
|
||||
for (auto value : allData)
|
||||
{
|
||||
Data dataObject;
|
||||
if(!value["RemoteLogin"].isNull())
|
||||
dataObject.remoteLogin = std::stoi(value["RemoteLogin"].asString());
|
||||
if(!value["CrackSuccess"].isNull())
|
||||
dataObject.crackSuccess = std::stoi(value["CrackSuccess"].asString());
|
||||
data_.push_back(dataObject);
|
||||
}
|
||||
if(!value["requestId"].isNull())
|
||||
requestId_ = value["requestId"].asString();
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GetAccountStatisticsResult::getRequestId()const
|
||||
{
|
||||
return requestId_;
|
||||
}
|
||||
|
||||
std::string GetAccountStatisticsResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::vector<GetAccountStatisticsResult::Data> GetAccountStatisticsResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string GetAccountStatisticsResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool GetAccountStatisticsResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
49
aegis/src/model/GetCrackStatisticsRequest.cc
Normal file
49
aegis/src/model/GetCrackStatisticsRequest.cc
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* 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/aegis/model/GetCrackStatisticsRequest.h>
|
||||
|
||||
using AlibabaCloud::Aegis::Model::GetCrackStatisticsRequest;
|
||||
|
||||
GetCrackStatisticsRequest::GetCrackStatisticsRequest() :
|
||||
RpcServiceRequest("aegis", "2016-11-11", "GetCrackStatistics")
|
||||
{}
|
||||
|
||||
GetCrackStatisticsRequest::~GetCrackStatisticsRequest()
|
||||
{}
|
||||
|
||||
std::string GetCrackStatisticsRequest::getEndTime()const
|
||||
{
|
||||
return endTime_;
|
||||
}
|
||||
|
||||
void GetCrackStatisticsRequest::setEndTime(const std::string& endTime)
|
||||
{
|
||||
endTime_ = endTime;
|
||||
setParameter("EndTime", endTime);
|
||||
}
|
||||
|
||||
std::string GetCrackStatisticsRequest::getStartTime()const
|
||||
{
|
||||
return startTime_;
|
||||
}
|
||||
|
||||
void GetCrackStatisticsRequest::setStartTime(const std::string& startTime)
|
||||
{
|
||||
startTime_ = startTime;
|
||||
setParameter("StartTime", startTime);
|
||||
}
|
||||
|
||||
86
aegis/src/model/GetCrackStatisticsResult.cc
Normal file
86
aegis/src/model/GetCrackStatisticsResult.cc
Normal file
@@ -0,0 +1,86 @@
|
||||
/*
|
||||
* 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/aegis/model/GetCrackStatisticsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Aegis;
|
||||
using namespace AlibabaCloud::Aegis::Model;
|
||||
|
||||
GetCrackStatisticsResult::GetCrackStatisticsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetCrackStatisticsResult::GetCrackStatisticsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetCrackStatisticsResult::~GetCrackStatisticsResult()
|
||||
{}
|
||||
|
||||
void GetCrackStatisticsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allData = value["Data"];
|
||||
for (auto value : allData)
|
||||
{
|
||||
Data dataObject;
|
||||
if(!value["Intercepted"].isNull())
|
||||
dataObject.intercepted = std::stoi(value["Intercepted"].asString());
|
||||
data_.push_back(dataObject);
|
||||
}
|
||||
if(!value["requestId"].isNull())
|
||||
requestId_ = value["requestId"].asString();
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GetCrackStatisticsResult::getRequestId()const
|
||||
{
|
||||
return requestId_;
|
||||
}
|
||||
|
||||
std::string GetCrackStatisticsResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::vector<GetCrackStatisticsResult::Data> GetCrackStatisticsResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string GetCrackStatisticsResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool GetCrackStatisticsResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
93
aegis/src/model/GetEntityListRequest.cc
Normal file
93
aegis/src/model/GetEntityListRequest.cc
Normal file
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* 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/aegis/model/GetEntityListRequest.h>
|
||||
|
||||
using AlibabaCloud::Aegis::Model::GetEntityListRequest;
|
||||
|
||||
GetEntityListRequest::GetEntityListRequest() :
|
||||
RpcServiceRequest("aegis", "2016-11-11", "GetEntityList")
|
||||
{}
|
||||
|
||||
GetEntityListRequest::~GetEntityListRequest()
|
||||
{}
|
||||
|
||||
long GetEntityListRequest::getGroupId()const
|
||||
{
|
||||
return groupId_;
|
||||
}
|
||||
|
||||
void GetEntityListRequest::setGroupId(long groupId)
|
||||
{
|
||||
groupId_ = groupId;
|
||||
setParameter("GroupId", std::to_string(groupId));
|
||||
}
|
||||
|
||||
int GetEntityListRequest::getPageSize()const
|
||||
{
|
||||
return pageSize_;
|
||||
}
|
||||
|
||||
void GetEntityListRequest::setPageSize(int pageSize)
|
||||
{
|
||||
pageSize_ = pageSize;
|
||||
setParameter("PageSize", std::to_string(pageSize));
|
||||
}
|
||||
|
||||
std::string GetEntityListRequest::getRemark()const
|
||||
{
|
||||
return remark_;
|
||||
}
|
||||
|
||||
void GetEntityListRequest::setRemark(const std::string& remark)
|
||||
{
|
||||
remark_ = remark;
|
||||
setParameter("Remark", remark);
|
||||
}
|
||||
|
||||
std::string GetEntityListRequest::getEventType()const
|
||||
{
|
||||
return eventType_;
|
||||
}
|
||||
|
||||
void GetEntityListRequest::setEventType(const std::string& eventType)
|
||||
{
|
||||
eventType_ = eventType;
|
||||
setParameter("EventType", eventType);
|
||||
}
|
||||
|
||||
int GetEntityListRequest::getCurrentPage()const
|
||||
{
|
||||
return currentPage_;
|
||||
}
|
||||
|
||||
void GetEntityListRequest::setCurrentPage(int currentPage)
|
||||
{
|
||||
currentPage_ = currentPage;
|
||||
setParameter("CurrentPage", std::to_string(currentPage));
|
||||
}
|
||||
|
||||
std::string GetEntityListRequest::getRegionNo()const
|
||||
{
|
||||
return regionNo_;
|
||||
}
|
||||
|
||||
void GetEntityListRequest::setRegionNo(const std::string& regionNo)
|
||||
{
|
||||
regionNo_ = regionNo;
|
||||
setParameter("RegionNo", regionNo);
|
||||
}
|
||||
|
||||
126
aegis/src/model/GetEntityListResult.cc
Normal file
126
aegis/src/model/GetEntityListResult.cc
Normal file
@@ -0,0 +1,126 @@
|
||||
/*
|
||||
* 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/aegis/model/GetEntityListResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Aegis;
|
||||
using namespace AlibabaCloud::Aegis::Model;
|
||||
|
||||
GetEntityListResult::GetEntityListResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetEntityListResult::GetEntityListResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetEntityListResult::~GetEntityListResult()
|
||||
{}
|
||||
|
||||
void GetEntityListResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allData = value["Data"];
|
||||
for (auto value : allData)
|
||||
{
|
||||
Data dataObject;
|
||||
auto allList = value["List"]["Entity"];
|
||||
for (auto value : allList)
|
||||
{
|
||||
Data::Entity entityObject;
|
||||
if(!value["Uuid"].isNull())
|
||||
entityObject.uuid = value["Uuid"].asString();
|
||||
if(!value["GroupId"].isNull())
|
||||
entityObject.groupId = std::stol(value["GroupId"].asString());
|
||||
if(!value["Ip"].isNull())
|
||||
entityObject.ip = value["Ip"].asString();
|
||||
if(!value["InstanceName"].isNull())
|
||||
entityObject.instanceName = value["InstanceName"].asString();
|
||||
if(!value["InstanceId"].isNull())
|
||||
entityObject.instanceId = value["InstanceId"].asString();
|
||||
if(!value["Region"].isNull())
|
||||
entityObject.region = value["Region"].asString();
|
||||
if(!value["Os"].isNull())
|
||||
entityObject.os = value["Os"].asString();
|
||||
if(!value["Flag"].isNull())
|
||||
entityObject.flag = value["Flag"].asString();
|
||||
if(!value["BuyVersion"].isNull())
|
||||
entityObject.buyVersion = value["BuyVersion"].asString();
|
||||
if(!value["AegisOnline"].isNull())
|
||||
entityObject.aegisOnline = value["AegisOnline"].asString() == "true";
|
||||
if(!value["aegisVersion"].isNull())
|
||||
entityObject.aegisVersion = value["aegisVersion"].asString();
|
||||
dataObject.list.push_back(entityObject);
|
||||
}
|
||||
auto allPageInfo = value["PageInfo"];
|
||||
for (auto value : allPageInfo)
|
||||
{
|
||||
Data::PageInfo pageInfoObject;
|
||||
if(!value["CurrentPage"].isNull())
|
||||
pageInfoObject.currentPage = std::stoi(value["CurrentPage"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
pageInfoObject.pageSize = std::stoi(value["PageSize"].asString());
|
||||
if(!value["TotalCount"].isNull())
|
||||
pageInfoObject.totalCount = std::stoi(value["TotalCount"].asString());
|
||||
if(!value["Count"].isNull())
|
||||
pageInfoObject.count = std::stoi(value["Count"].asString());
|
||||
dataObject.pageInfo.push_back(pageInfoObject);
|
||||
}
|
||||
data_.push_back(dataObject);
|
||||
}
|
||||
if(!value["requestId"].isNull())
|
||||
requestId_ = value["requestId"].asString();
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GetEntityListResult::getRequestId()const
|
||||
{
|
||||
return requestId_;
|
||||
}
|
||||
|
||||
std::string GetEntityListResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::vector<GetEntityListResult::Data> GetEntityListResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string GetEntityListResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool GetEntityListResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
38
aegis/src/model/GetStatisticsByUuidRequest.cc
Normal file
38
aegis/src/model/GetStatisticsByUuidRequest.cc
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* 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/aegis/model/GetStatisticsByUuidRequest.h>
|
||||
|
||||
using AlibabaCloud::Aegis::Model::GetStatisticsByUuidRequest;
|
||||
|
||||
GetStatisticsByUuidRequest::GetStatisticsByUuidRequest() :
|
||||
RpcServiceRequest("aegis", "2016-11-11", "GetStatisticsByUuid")
|
||||
{}
|
||||
|
||||
GetStatisticsByUuidRequest::~GetStatisticsByUuidRequest()
|
||||
{}
|
||||
|
||||
std::string GetStatisticsByUuidRequest::getUuid()const
|
||||
{
|
||||
return uuid_;
|
||||
}
|
||||
|
||||
void GetStatisticsByUuidRequest::setUuid(const std::string& uuid)
|
||||
{
|
||||
uuid_ = uuid;
|
||||
setParameter("Uuid", uuid);
|
||||
}
|
||||
|
||||
96
aegis/src/model/GetStatisticsByUuidResult.cc
Normal file
96
aegis/src/model/GetStatisticsByUuidResult.cc
Normal file
@@ -0,0 +1,96 @@
|
||||
/*
|
||||
* 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/aegis/model/GetStatisticsByUuidResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Aegis;
|
||||
using namespace AlibabaCloud::Aegis::Model;
|
||||
|
||||
GetStatisticsByUuidResult::GetStatisticsByUuidResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetStatisticsByUuidResult::GetStatisticsByUuidResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetStatisticsByUuidResult::~GetStatisticsByUuidResult()
|
||||
{}
|
||||
|
||||
void GetStatisticsByUuidResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allData = value["Data"]["Entity"];
|
||||
for (auto value : allData)
|
||||
{
|
||||
Entity dataObject;
|
||||
if(!value["Uuid"].isNull())
|
||||
dataObject.uuid = value["Uuid"].asString();
|
||||
if(!value["Account"].isNull())
|
||||
dataObject.account = std::stoi(value["Account"].asString());
|
||||
if(!value["Health"].isNull())
|
||||
dataObject.health = std::stoi(value["Health"].asString());
|
||||
if(!value["Patch"].isNull())
|
||||
dataObject.patch = std::stoi(value["Patch"].asString());
|
||||
if(!value["Trojan"].isNull())
|
||||
dataObject.trojan = std::stoi(value["Trojan"].asString());
|
||||
if(!value["Online"].isNull())
|
||||
dataObject.online = value["Online"].asString() == "true";
|
||||
data_.push_back(dataObject);
|
||||
}
|
||||
if(!value["requestId"].isNull())
|
||||
requestId_ = value["requestId"].asString();
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GetStatisticsByUuidResult::getRequestId()const
|
||||
{
|
||||
return requestId_;
|
||||
}
|
||||
|
||||
std::string GetStatisticsByUuidResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::vector<GetStatisticsByUuidResult::Entity> GetStatisticsByUuidResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string GetStatisticsByUuidResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool GetStatisticsByUuidResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
49
aegis/src/model/GetStatisticsRequest.cc
Normal file
49
aegis/src/model/GetStatisticsRequest.cc
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* 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/aegis/model/GetStatisticsRequest.h>
|
||||
|
||||
using AlibabaCloud::Aegis::Model::GetStatisticsRequest;
|
||||
|
||||
GetStatisticsRequest::GetStatisticsRequest() :
|
||||
RpcServiceRequest("aegis", "2016-11-11", "GetStatistics")
|
||||
{}
|
||||
|
||||
GetStatisticsRequest::~GetStatisticsRequest()
|
||||
{}
|
||||
|
||||
std::string GetStatisticsRequest::getEndTime()const
|
||||
{
|
||||
return endTime_;
|
||||
}
|
||||
|
||||
void GetStatisticsRequest::setEndTime(const std::string& endTime)
|
||||
{
|
||||
endTime_ = endTime;
|
||||
setParameter("EndTime", endTime);
|
||||
}
|
||||
|
||||
std::string GetStatisticsRequest::getStartTime()const
|
||||
{
|
||||
return startTime_;
|
||||
}
|
||||
|
||||
void GetStatisticsRequest::setStartTime(const std::string& startTime)
|
||||
{
|
||||
startTime_ = startTime;
|
||||
setParameter("StartTime", startTime);
|
||||
}
|
||||
|
||||
92
aegis/src/model/GetStatisticsResult.cc
Normal file
92
aegis/src/model/GetStatisticsResult.cc
Normal file
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
* 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/aegis/model/GetStatisticsResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Aegis;
|
||||
using namespace AlibabaCloud::Aegis::Model;
|
||||
|
||||
GetStatisticsResult::GetStatisticsResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
GetStatisticsResult::GetStatisticsResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
GetStatisticsResult::~GetStatisticsResult()
|
||||
{}
|
||||
|
||||
void GetStatisticsResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allData = value["Data"];
|
||||
for (auto value : allData)
|
||||
{
|
||||
Data dataObject;
|
||||
if(!value["Account"].isNull())
|
||||
dataObject.account = std::stoi(value["Account"].asString());
|
||||
if(!value["Health"].isNull())
|
||||
dataObject.health = std::stoi(value["Health"].asString());
|
||||
if(!value["Patch"].isNull())
|
||||
dataObject.patch = std::stoi(value["Patch"].asString());
|
||||
if(!value["Trojan"].isNull())
|
||||
dataObject.trojan = std::stoi(value["Trojan"].asString());
|
||||
data_.push_back(dataObject);
|
||||
}
|
||||
if(!value["requestId"].isNull())
|
||||
requestId_ = value["requestId"].asString();
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string GetStatisticsResult::getRequestId()const
|
||||
{
|
||||
return requestId_;
|
||||
}
|
||||
|
||||
std::string GetStatisticsResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::vector<GetStatisticsResult::Data> GetStatisticsResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string GetStatisticsResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool GetStatisticsResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
71
aegis/src/model/ModifyBatchIgnoreVulRequest.cc
Normal file
71
aegis/src/model/ModifyBatchIgnoreVulRequest.cc
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* 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/aegis/model/ModifyBatchIgnoreVulRequest.h>
|
||||
|
||||
using AlibabaCloud::Aegis::Model::ModifyBatchIgnoreVulRequest;
|
||||
|
||||
ModifyBatchIgnoreVulRequest::ModifyBatchIgnoreVulRequest() :
|
||||
RpcServiceRequest("aegis", "2016-11-11", "ModifyBatchIgnoreVul")
|
||||
{}
|
||||
|
||||
ModifyBatchIgnoreVulRequest::~ModifyBatchIgnoreVulRequest()
|
||||
{}
|
||||
|
||||
std::string ModifyBatchIgnoreVulRequest::getReason()const
|
||||
{
|
||||
return reason_;
|
||||
}
|
||||
|
||||
void ModifyBatchIgnoreVulRequest::setReason(const std::string& reason)
|
||||
{
|
||||
reason_ = reason;
|
||||
setParameter("Reason", reason);
|
||||
}
|
||||
|
||||
long ModifyBatchIgnoreVulRequest::getResourceOwnerId()const
|
||||
{
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void ModifyBatchIgnoreVulRequest::setResourceOwnerId(long resourceOwnerId)
|
||||
{
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string ModifyBatchIgnoreVulRequest::getSourceIp()const
|
||||
{
|
||||
return sourceIp_;
|
||||
}
|
||||
|
||||
void ModifyBatchIgnoreVulRequest::setSourceIp(const std::string& sourceIp)
|
||||
{
|
||||
sourceIp_ = sourceIp;
|
||||
setParameter("SourceIp", sourceIp);
|
||||
}
|
||||
|
||||
std::string ModifyBatchIgnoreVulRequest::getInfo()const
|
||||
{
|
||||
return info_;
|
||||
}
|
||||
|
||||
void ModifyBatchIgnoreVulRequest::setInfo(const std::string& info)
|
||||
{
|
||||
info_ = info;
|
||||
setParameter("Info", info);
|
||||
}
|
||||
|
||||
59
aegis/src/model/ModifyBatchIgnoreVulResult.cc
Normal file
59
aegis/src/model/ModifyBatchIgnoreVulResult.cc
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.
|
||||
*/
|
||||
|
||||
#include <alibabacloud/aegis/model/ModifyBatchIgnoreVulResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Aegis;
|
||||
using namespace AlibabaCloud::Aegis::Model;
|
||||
|
||||
ModifyBatchIgnoreVulResult::ModifyBatchIgnoreVulResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ModifyBatchIgnoreVulResult::ModifyBatchIgnoreVulResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ModifyBatchIgnoreVulResult::~ModifyBatchIgnoreVulResult()
|
||||
{}
|
||||
|
||||
void ModifyBatchIgnoreVulResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["HttpStatusCode"].isNull())
|
||||
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
|
||||
|
||||
}
|
||||
|
||||
int ModifyBatchIgnoreVulResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
bool ModifyBatchIgnoreVulResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
104
aegis/src/model/ModifyStrategyRequest.cc
Normal file
104
aegis/src/model/ModifyStrategyRequest.cc
Normal file
@@ -0,0 +1,104 @@
|
||||
/*
|
||||
* 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/aegis/model/ModifyStrategyRequest.h>
|
||||
|
||||
using AlibabaCloud::Aegis::Model::ModifyStrategyRequest;
|
||||
|
||||
ModifyStrategyRequest::ModifyStrategyRequest() :
|
||||
RpcServiceRequest("aegis", "2016-11-11", "ModifyStrategy")
|
||||
{}
|
||||
|
||||
ModifyStrategyRequest::~ModifyStrategyRequest()
|
||||
{}
|
||||
|
||||
long ModifyStrategyRequest::getResourceOwnerId()const
|
||||
{
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void ModifyStrategyRequest::setResourceOwnerId(long resourceOwnerId)
|
||||
{
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string ModifyStrategyRequest::getRiskSubTypeName()const
|
||||
{
|
||||
return riskSubTypeName_;
|
||||
}
|
||||
|
||||
void ModifyStrategyRequest::setRiskSubTypeName(const std::string& riskSubTypeName)
|
||||
{
|
||||
riskSubTypeName_ = riskSubTypeName;
|
||||
setParameter("RiskSubTypeName", riskSubTypeName);
|
||||
}
|
||||
|
||||
std::string ModifyStrategyRequest::getSourceIp()const
|
||||
{
|
||||
return sourceIp_;
|
||||
}
|
||||
|
||||
void ModifyStrategyRequest::setSourceIp(const std::string& sourceIp)
|
||||
{
|
||||
sourceIp_ = sourceIp;
|
||||
setParameter("SourceIp", sourceIp);
|
||||
}
|
||||
|
||||
std::string ModifyStrategyRequest::getCycleStartTime()const
|
||||
{
|
||||
return cycleStartTime_;
|
||||
}
|
||||
|
||||
void ModifyStrategyRequest::setCycleStartTime(const std::string& cycleStartTime)
|
||||
{
|
||||
cycleStartTime_ = cycleStartTime;
|
||||
setParameter("CycleStartTime", cycleStartTime);
|
||||
}
|
||||
|
||||
std::string ModifyStrategyRequest::getName()const
|
||||
{
|
||||
return name_;
|
||||
}
|
||||
|
||||
void ModifyStrategyRequest::setName(const std::string& name)
|
||||
{
|
||||
name_ = name;
|
||||
setParameter("Name", name);
|
||||
}
|
||||
|
||||
std::string ModifyStrategyRequest::getCycleDays()const
|
||||
{
|
||||
return cycleDays_;
|
||||
}
|
||||
|
||||
void ModifyStrategyRequest::setCycleDays(const std::string& cycleDays)
|
||||
{
|
||||
cycleDays_ = cycleDays;
|
||||
setParameter("CycleDays", cycleDays);
|
||||
}
|
||||
|
||||
std::string ModifyStrategyRequest::getId()const
|
||||
{
|
||||
return id_;
|
||||
}
|
||||
|
||||
void ModifyStrategyRequest::setId(const std::string& id)
|
||||
{
|
||||
id_ = id;
|
||||
setParameter("Id", id);
|
||||
}
|
||||
|
||||
79
aegis/src/model/ModifyStrategyResult.cc
Normal file
79
aegis/src/model/ModifyStrategyResult.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/aegis/model/ModifyStrategyResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Aegis;
|
||||
using namespace AlibabaCloud::Aegis::Model;
|
||||
|
||||
ModifyStrategyResult::ModifyStrategyResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ModifyStrategyResult::ModifyStrategyResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ModifyStrategyResult::~ModifyStrategyResult()
|
||||
{}
|
||||
|
||||
void ModifyStrategyResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allResult = value["Result"];
|
||||
for (auto value : allResult)
|
||||
{
|
||||
Result resultObject;
|
||||
if(!value["StrategyId"].isNull())
|
||||
resultObject.strategyId = std::stoi(value["StrategyId"].asString());
|
||||
result_.push_back(resultObject);
|
||||
}
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["TotalCount"].isNull())
|
||||
totalCount_ = std::stoi(value["TotalCount"].asString());
|
||||
if(!value["HttpStatusCode"].isNull())
|
||||
httpStatusCode_ = std::stoi(value["HttpStatusCode"].asString());
|
||||
|
||||
}
|
||||
|
||||
int ModifyStrategyResult::getTotalCount()const
|
||||
{
|
||||
return totalCount_;
|
||||
}
|
||||
|
||||
int ModifyStrategyResult::getHttpStatusCode()const
|
||||
{
|
||||
return httpStatusCode_;
|
||||
}
|
||||
|
||||
bool ModifyStrategyResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
std::vector<ModifyStrategyResult::Result> ModifyStrategyResult::getResult()const
|
||||
{
|
||||
return result_;
|
||||
}
|
||||
|
||||
82
aegis/src/model/ModifyStrategyTargetRequest.cc
Normal file
82
aegis/src/model/ModifyStrategyTargetRequest.cc
Normal file
@@ -0,0 +1,82 @@
|
||||
/*
|
||||
* 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/aegis/model/ModifyStrategyTargetRequest.h>
|
||||
|
||||
using AlibabaCloud::Aegis::Model::ModifyStrategyTargetRequest;
|
||||
|
||||
ModifyStrategyTargetRequest::ModifyStrategyTargetRequest() :
|
||||
RpcServiceRequest("aegis", "2016-11-11", "ModifyStrategyTarget")
|
||||
{}
|
||||
|
||||
ModifyStrategyTargetRequest::~ModifyStrategyTargetRequest()
|
||||
{}
|
||||
|
||||
long ModifyStrategyTargetRequest::getResourceOwnerId()const
|
||||
{
|
||||
return resourceOwnerId_;
|
||||
}
|
||||
|
||||
void ModifyStrategyTargetRequest::setResourceOwnerId(long resourceOwnerId)
|
||||
{
|
||||
resourceOwnerId_ = resourceOwnerId;
|
||||
setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
|
||||
}
|
||||
|
||||
std::string ModifyStrategyTargetRequest::getSourceIp()const
|
||||
{
|
||||
return sourceIp_;
|
||||
}
|
||||
|
||||
void ModifyStrategyTargetRequest::setSourceIp(const std::string& sourceIp)
|
||||
{
|
||||
sourceIp_ = sourceIp;
|
||||
setParameter("SourceIp", sourceIp);
|
||||
}
|
||||
|
||||
std::string ModifyStrategyTargetRequest::getType()const
|
||||
{
|
||||
return type_;
|
||||
}
|
||||
|
||||
void ModifyStrategyTargetRequest::setType(const std::string& type)
|
||||
{
|
||||
type_ = type;
|
||||
setParameter("Type", type);
|
||||
}
|
||||
|
||||
std::string ModifyStrategyTargetRequest::getConfig()const
|
||||
{
|
||||
return config_;
|
||||
}
|
||||
|
||||
void ModifyStrategyTargetRequest::setConfig(const std::string& config)
|
||||
{
|
||||
config_ = config;
|
||||
setParameter("Config", config);
|
||||
}
|
||||
|
||||
std::string ModifyStrategyTargetRequest::getTarget()const
|
||||
{
|
||||
return target_;
|
||||
}
|
||||
|
||||
void ModifyStrategyTargetRequest::setTarget(const std::string& target)
|
||||
{
|
||||
target_ = target;
|
||||
setParameter("Target", target);
|
||||
}
|
||||
|
||||
45
aegis/src/model/ModifyStrategyTargetResult.cc
Normal file
45
aegis/src/model/ModifyStrategyTargetResult.cc
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* 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/aegis/model/ModifyStrategyTargetResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Aegis;
|
||||
using namespace AlibabaCloud::Aegis::Model;
|
||||
|
||||
ModifyStrategyTargetResult::ModifyStrategyTargetResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ModifyStrategyTargetResult::ModifyStrategyTargetResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ModifyStrategyTargetResult::~ModifyStrategyTargetResult()
|
||||
{}
|
||||
|
||||
void ModifyStrategyTargetResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
82
aegis/src/model/QueryCrackEventRequest.cc
Normal file
82
aegis/src/model/QueryCrackEventRequest.cc
Normal file
@@ -0,0 +1,82 @@
|
||||
/*
|
||||
* 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/aegis/model/QueryCrackEventRequest.h>
|
||||
|
||||
using AlibabaCloud::Aegis::Model::QueryCrackEventRequest;
|
||||
|
||||
QueryCrackEventRequest::QueryCrackEventRequest() :
|
||||
RpcServiceRequest("aegis", "2016-11-11", "QueryCrackEvent")
|
||||
{}
|
||||
|
||||
QueryCrackEventRequest::~QueryCrackEventRequest()
|
||||
{}
|
||||
|
||||
std::string QueryCrackEventRequest::getEndTime()const
|
||||
{
|
||||
return endTime_;
|
||||
}
|
||||
|
||||
void QueryCrackEventRequest::setEndTime(const std::string& endTime)
|
||||
{
|
||||
endTime_ = endTime;
|
||||
setParameter("EndTime", endTime);
|
||||
}
|
||||
|
||||
int QueryCrackEventRequest::getCurrentPage()const
|
||||
{
|
||||
return currentPage_;
|
||||
}
|
||||
|
||||
void QueryCrackEventRequest::setCurrentPage(int currentPage)
|
||||
{
|
||||
currentPage_ = currentPage;
|
||||
setParameter("CurrentPage", std::to_string(currentPage));
|
||||
}
|
||||
|
||||
std::string QueryCrackEventRequest::getStartTime()const
|
||||
{
|
||||
return startTime_;
|
||||
}
|
||||
|
||||
void QueryCrackEventRequest::setStartTime(const std::string& startTime)
|
||||
{
|
||||
startTime_ = startTime;
|
||||
setParameter("StartTime", startTime);
|
||||
}
|
||||
|
||||
std::string QueryCrackEventRequest::getUuid()const
|
||||
{
|
||||
return uuid_;
|
||||
}
|
||||
|
||||
void QueryCrackEventRequest::setUuid(const std::string& uuid)
|
||||
{
|
||||
uuid_ = uuid;
|
||||
setParameter("Uuid", uuid);
|
||||
}
|
||||
|
||||
int QueryCrackEventRequest::getStatus()const
|
||||
{
|
||||
return status_;
|
||||
}
|
||||
|
||||
void QueryCrackEventRequest::setStatus(int status)
|
||||
{
|
||||
status_ = status;
|
||||
setParameter("Status", std::to_string(status));
|
||||
}
|
||||
|
||||
138
aegis/src/model/QueryCrackEventResult.cc
Normal file
138
aegis/src/model/QueryCrackEventResult.cc
Normal file
@@ -0,0 +1,138 @@
|
||||
/*
|
||||
* 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/aegis/model/QueryCrackEventResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Aegis;
|
||||
using namespace AlibabaCloud::Aegis::Model;
|
||||
|
||||
QueryCrackEventResult::QueryCrackEventResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
QueryCrackEventResult::QueryCrackEventResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
QueryCrackEventResult::~QueryCrackEventResult()
|
||||
{}
|
||||
|
||||
void QueryCrackEventResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allData = value["Data"];
|
||||
for (auto value : allData)
|
||||
{
|
||||
Data dataObject;
|
||||
auto allList = value["List"]["Entity"];
|
||||
for (auto value : allList)
|
||||
{
|
||||
Data::Entity entityObject;
|
||||
if(!value["Uuid"].isNull())
|
||||
entityObject.uuid = value["Uuid"].asString();
|
||||
if(!value["AttackTime"].isNull())
|
||||
entityObject.attackTime = value["AttackTime"].asString();
|
||||
if(!value["AttackType"].isNull())
|
||||
entityObject.attackType = std::stoi(value["AttackType"].asString());
|
||||
if(!value["AttackTypeName"].isNull())
|
||||
entityObject.attackTypeName = value["AttackTypeName"].asString();
|
||||
if(!value["BuyVersion"].isNull())
|
||||
entityObject.buyVersion = value["BuyVersion"].asString();
|
||||
if(!value["CrackSourceIp"].isNull())
|
||||
entityObject.crackSourceIp = value["CrackSourceIp"].asString();
|
||||
if(!value["CrackTimes"].isNull())
|
||||
entityObject.crackTimes = std::stoi(value["CrackTimes"].asString());
|
||||
if(!value["GroupId"].isNull())
|
||||
entityObject.groupId = std::stoi(value["GroupId"].asString());
|
||||
if(!value["InstanceName"].isNull())
|
||||
entityObject.instanceName = value["InstanceName"].asString();
|
||||
if(!value["InstanceId"].isNull())
|
||||
entityObject.instanceId = value["InstanceId"].asString();
|
||||
if(!value["Ip"].isNull())
|
||||
entityObject.ip = value["Ip"].asString();
|
||||
if(!value["Region"].isNull())
|
||||
entityObject.region = value["Region"].asString();
|
||||
if(!value["Status"].isNull())
|
||||
entityObject.status = std::stoi(value["Status"].asString());
|
||||
if(!value["StatusName"].isNull())
|
||||
entityObject.statusName = value["StatusName"].asString();
|
||||
if(!value["Location"].isNull())
|
||||
entityObject.location = value["Location"].asString();
|
||||
if(!value["InWhite"].isNull())
|
||||
entityObject.inWhite = std::stoi(value["InWhite"].asString());
|
||||
if(!value["UserName"].isNull())
|
||||
entityObject.userName = value["UserName"].asString();
|
||||
dataObject.list.push_back(entityObject);
|
||||
}
|
||||
auto allPageInfo = value["PageInfo"];
|
||||
for (auto value : allPageInfo)
|
||||
{
|
||||
Data::PageInfo pageInfoObject;
|
||||
if(!value["CurrentPage"].isNull())
|
||||
pageInfoObject.currentPage = std::stoi(value["CurrentPage"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
pageInfoObject.pageSize = std::stoi(value["PageSize"].asString());
|
||||
if(!value["TotalCount"].isNull())
|
||||
pageInfoObject.totalCount = std::stoi(value["TotalCount"].asString());
|
||||
if(!value["Count"].isNull())
|
||||
pageInfoObject.count = std::stoi(value["Count"].asString());
|
||||
dataObject.pageInfo.push_back(pageInfoObject);
|
||||
}
|
||||
data_.push_back(dataObject);
|
||||
}
|
||||
if(!value["requestId"].isNull())
|
||||
requestId_ = value["requestId"].asString();
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string QueryCrackEventResult::getRequestId()const
|
||||
{
|
||||
return requestId_;
|
||||
}
|
||||
|
||||
std::string QueryCrackEventResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::vector<QueryCrackEventResult::Data> QueryCrackEventResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string QueryCrackEventResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool QueryCrackEventResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
82
aegis/src/model/QueryLoginEventRequest.cc
Normal file
82
aegis/src/model/QueryLoginEventRequest.cc
Normal file
@@ -0,0 +1,82 @@
|
||||
/*
|
||||
* 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/aegis/model/QueryLoginEventRequest.h>
|
||||
|
||||
using AlibabaCloud::Aegis::Model::QueryLoginEventRequest;
|
||||
|
||||
QueryLoginEventRequest::QueryLoginEventRequest() :
|
||||
RpcServiceRequest("aegis", "2016-11-11", "QueryLoginEvent")
|
||||
{}
|
||||
|
||||
QueryLoginEventRequest::~QueryLoginEventRequest()
|
||||
{}
|
||||
|
||||
std::string QueryLoginEventRequest::getEndTime()const
|
||||
{
|
||||
return endTime_;
|
||||
}
|
||||
|
||||
void QueryLoginEventRequest::setEndTime(const std::string& endTime)
|
||||
{
|
||||
endTime_ = endTime;
|
||||
setParameter("EndTime", endTime);
|
||||
}
|
||||
|
||||
int QueryLoginEventRequest::getCurrentPage()const
|
||||
{
|
||||
return currentPage_;
|
||||
}
|
||||
|
||||
void QueryLoginEventRequest::setCurrentPage(int currentPage)
|
||||
{
|
||||
currentPage_ = currentPage;
|
||||
setParameter("CurrentPage", std::to_string(currentPage));
|
||||
}
|
||||
|
||||
std::string QueryLoginEventRequest::getStartTime()const
|
||||
{
|
||||
return startTime_;
|
||||
}
|
||||
|
||||
void QueryLoginEventRequest::setStartTime(const std::string& startTime)
|
||||
{
|
||||
startTime_ = startTime;
|
||||
setParameter("StartTime", startTime);
|
||||
}
|
||||
|
||||
std::string QueryLoginEventRequest::getUuid()const
|
||||
{
|
||||
return uuid_;
|
||||
}
|
||||
|
||||
void QueryLoginEventRequest::setUuid(const std::string& uuid)
|
||||
{
|
||||
uuid_ = uuid;
|
||||
setParameter("Uuid", uuid);
|
||||
}
|
||||
|
||||
int QueryLoginEventRequest::getStatus()const
|
||||
{
|
||||
return status_;
|
||||
}
|
||||
|
||||
void QueryLoginEventRequest::setStatus(int status)
|
||||
{
|
||||
status_ = status;
|
||||
setParameter("Status", std::to_string(status));
|
||||
}
|
||||
|
||||
134
aegis/src/model/QueryLoginEventResult.cc
Normal file
134
aegis/src/model/QueryLoginEventResult.cc
Normal file
@@ -0,0 +1,134 @@
|
||||
/*
|
||||
* 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/aegis/model/QueryLoginEventResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Aegis;
|
||||
using namespace AlibabaCloud::Aegis::Model;
|
||||
|
||||
QueryLoginEventResult::QueryLoginEventResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
QueryLoginEventResult::QueryLoginEventResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
QueryLoginEventResult::~QueryLoginEventResult()
|
||||
{}
|
||||
|
||||
void QueryLoginEventResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
auto allData = value["Data"];
|
||||
for (auto value : allData)
|
||||
{
|
||||
Data dataObject;
|
||||
auto allList = value["List"]["Entity"];
|
||||
for (auto value : allList)
|
||||
{
|
||||
Data::Entity entityObject;
|
||||
if(!value["Uuid"].isNull())
|
||||
entityObject.uuid = value["Uuid"].asString();
|
||||
if(!value["LoginTime"].isNull())
|
||||
entityObject.loginTime = value["LoginTime"].asString();
|
||||
if(!value["LoginType"].isNull())
|
||||
entityObject.loginType = std::stoi(value["LoginType"].asString());
|
||||
if(!value["LoginTypeName"].isNull())
|
||||
entityObject.loginTypeName = value["LoginTypeName"].asString();
|
||||
if(!value["BuyVersion"].isNull())
|
||||
entityObject.buyVersion = value["BuyVersion"].asString();
|
||||
if(!value["LoginSourceIp"].isNull())
|
||||
entityObject.loginSourceIp = value["LoginSourceIp"].asString();
|
||||
if(!value["GroupId"].isNull())
|
||||
entityObject.groupId = std::stoi(value["GroupId"].asString());
|
||||
if(!value["InstanceName"].isNull())
|
||||
entityObject.instanceName = value["InstanceName"].asString();
|
||||
if(!value["InstanceId"].isNull())
|
||||
entityObject.instanceId = value["InstanceId"].asString();
|
||||
if(!value["Ip"].isNull())
|
||||
entityObject.ip = value["Ip"].asString();
|
||||
if(!value["Region"].isNull())
|
||||
entityObject.region = value["Region"].asString();
|
||||
if(!value["Status"].isNull())
|
||||
entityObject.status = std::stoi(value["Status"].asString());
|
||||
if(!value["StatusName"].isNull())
|
||||
entityObject.statusName = value["StatusName"].asString();
|
||||
if(!value["Location"].isNull())
|
||||
entityObject.location = value["Location"].asString();
|
||||
if(!value["UserName"].isNull())
|
||||
entityObject.userName = value["UserName"].asString();
|
||||
dataObject.list.push_back(entityObject);
|
||||
}
|
||||
auto allPageInfo = value["PageInfo"];
|
||||
for (auto value : allPageInfo)
|
||||
{
|
||||
Data::PageInfo pageInfoObject;
|
||||
if(!value["CurrentPage"].isNull())
|
||||
pageInfoObject.currentPage = std::stoi(value["CurrentPage"].asString());
|
||||
if(!value["PageSize"].isNull())
|
||||
pageInfoObject.pageSize = std::stoi(value["PageSize"].asString());
|
||||
if(!value["TotalCount"].isNull())
|
||||
pageInfoObject.totalCount = std::stoi(value["TotalCount"].asString());
|
||||
if(!value["Count"].isNull())
|
||||
pageInfoObject.count = std::stoi(value["Count"].asString());
|
||||
dataObject.pageInfo.push_back(pageInfoObject);
|
||||
}
|
||||
data_.push_back(dataObject);
|
||||
}
|
||||
if(!value["requestId"].isNull())
|
||||
requestId_ = value["requestId"].asString();
|
||||
if(!value["Code"].isNull())
|
||||
code_ = value["Code"].asString();
|
||||
if(!value["Success"].isNull())
|
||||
success_ = value["Success"].asString() == "true";
|
||||
if(!value["Message"].isNull())
|
||||
message_ = value["Message"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string QueryLoginEventResult::getRequestId()const
|
||||
{
|
||||
return requestId_;
|
||||
}
|
||||
|
||||
std::string QueryLoginEventResult::getMessage()const
|
||||
{
|
||||
return message_;
|
||||
}
|
||||
|
||||
std::vector<QueryLoginEventResult::Data> QueryLoginEventResult::getData()const
|
||||
{
|
||||
return data_;
|
||||
}
|
||||
|
||||
std::string QueryLoginEventResult::getCode()const
|
||||
{
|
||||
return code_;
|
||||
}
|
||||
|
||||
bool QueryLoginEventResult::getSuccess()const
|
||||
{
|
||||
return success_;
|
||||
}
|
||||
|
||||
49
aegis/src/model/ReleaseInstanceRequest.cc
Normal file
49
aegis/src/model/ReleaseInstanceRequest.cc
Normal file
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* 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/aegis/model/ReleaseInstanceRequest.h>
|
||||
|
||||
using AlibabaCloud::Aegis::Model::ReleaseInstanceRequest;
|
||||
|
||||
ReleaseInstanceRequest::ReleaseInstanceRequest() :
|
||||
RpcServiceRequest("aegis", "2016-11-11", "ReleaseInstance")
|
||||
{}
|
||||
|
||||
ReleaseInstanceRequest::~ReleaseInstanceRequest()
|
||||
{}
|
||||
|
||||
std::string ReleaseInstanceRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void ReleaseInstanceRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
long ReleaseInstanceRequest::getOwnerId()const
|
||||
{
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void ReleaseInstanceRequest::setOwnerId(long ownerId)
|
||||
{
|
||||
ownerId_ = ownerId;
|
||||
setParameter("OwnerId", std::to_string(ownerId));
|
||||
}
|
||||
|
||||
45
aegis/src/model/ReleaseInstanceResult.cc
Normal file
45
aegis/src/model/ReleaseInstanceResult.cc
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* 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/aegis/model/ReleaseInstanceResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Aegis;
|
||||
using namespace AlibabaCloud::Aegis::Model;
|
||||
|
||||
ReleaseInstanceResult::ReleaseInstanceResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
ReleaseInstanceResult::ReleaseInstanceResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
ReleaseInstanceResult::~ReleaseInstanceResult()
|
||||
{}
|
||||
|
||||
void ReleaseInstanceResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
|
||||
}
|
||||
|
||||
93
aegis/src/model/RenewInstanceRequest.cc
Normal file
93
aegis/src/model/RenewInstanceRequest.cc
Normal file
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* 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/aegis/model/RenewInstanceRequest.h>
|
||||
|
||||
using AlibabaCloud::Aegis::Model::RenewInstanceRequest;
|
||||
|
||||
RenewInstanceRequest::RenewInstanceRequest() :
|
||||
RpcServiceRequest("aegis", "2016-11-11", "RenewInstance")
|
||||
{}
|
||||
|
||||
RenewInstanceRequest::~RenewInstanceRequest()
|
||||
{}
|
||||
|
||||
int RenewInstanceRequest::getDuration()const
|
||||
{
|
||||
return duration_;
|
||||
}
|
||||
|
||||
void RenewInstanceRequest::setDuration(int duration)
|
||||
{
|
||||
duration_ = duration;
|
||||
setParameter("Duration", std::to_string(duration));
|
||||
}
|
||||
|
||||
std::string RenewInstanceRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void RenewInstanceRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string RenewInstanceRequest::getClientToken()const
|
||||
{
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void RenewInstanceRequest::setClientToken(const std::string& clientToken)
|
||||
{
|
||||
clientToken_ = clientToken;
|
||||
setParameter("ClientToken", clientToken);
|
||||
}
|
||||
|
||||
std::string RenewInstanceRequest::getVmNumber()const
|
||||
{
|
||||
return vmNumber_;
|
||||
}
|
||||
|
||||
void RenewInstanceRequest::setVmNumber(const std::string& vmNumber)
|
||||
{
|
||||
vmNumber_ = vmNumber;
|
||||
setParameter("VmNumber", vmNumber);
|
||||
}
|
||||
|
||||
long RenewInstanceRequest::getOwnerId()const
|
||||
{
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void RenewInstanceRequest::setOwnerId(long ownerId)
|
||||
{
|
||||
ownerId_ = ownerId;
|
||||
setParameter("OwnerId", std::to_string(ownerId));
|
||||
}
|
||||
|
||||
std::string RenewInstanceRequest::getPricingCycle()const
|
||||
{
|
||||
return pricingCycle_;
|
||||
}
|
||||
|
||||
void RenewInstanceRequest::setPricingCycle(const std::string& pricingCycle)
|
||||
{
|
||||
pricingCycle_ = pricingCycle;
|
||||
setParameter("PricingCycle", pricingCycle);
|
||||
}
|
||||
|
||||
52
aegis/src/model/RenewInstanceResult.cc
Normal file
52
aegis/src/model/RenewInstanceResult.cc
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* 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/aegis/model/RenewInstanceResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Aegis;
|
||||
using namespace AlibabaCloud::Aegis::Model;
|
||||
|
||||
RenewInstanceResult::RenewInstanceResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
RenewInstanceResult::RenewInstanceResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
RenewInstanceResult::~RenewInstanceResult()
|
||||
{}
|
||||
|
||||
void RenewInstanceResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["OrderId"].isNull())
|
||||
orderId_ = value["OrderId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string RenewInstanceResult::getOrderId()const
|
||||
{
|
||||
return orderId_;
|
||||
}
|
||||
|
||||
82
aegis/src/model/UpgradeInstanceRequest.cc
Normal file
82
aegis/src/model/UpgradeInstanceRequest.cc
Normal file
@@ -0,0 +1,82 @@
|
||||
/*
|
||||
* 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/aegis/model/UpgradeInstanceRequest.h>
|
||||
|
||||
using AlibabaCloud::Aegis::Model::UpgradeInstanceRequest;
|
||||
|
||||
UpgradeInstanceRequest::UpgradeInstanceRequest() :
|
||||
RpcServiceRequest("aegis", "2016-11-11", "UpgradeInstance")
|
||||
{}
|
||||
|
||||
UpgradeInstanceRequest::~UpgradeInstanceRequest()
|
||||
{}
|
||||
|
||||
std::string UpgradeInstanceRequest::getInstanceId()const
|
||||
{
|
||||
return instanceId_;
|
||||
}
|
||||
|
||||
void UpgradeInstanceRequest::setInstanceId(const std::string& instanceId)
|
||||
{
|
||||
instanceId_ = instanceId;
|
||||
setParameter("InstanceId", instanceId);
|
||||
}
|
||||
|
||||
std::string UpgradeInstanceRequest::getClientToken()const
|
||||
{
|
||||
return clientToken_;
|
||||
}
|
||||
|
||||
void UpgradeInstanceRequest::setClientToken(const std::string& clientToken)
|
||||
{
|
||||
clientToken_ = clientToken;
|
||||
setParameter("ClientToken", clientToken);
|
||||
}
|
||||
|
||||
int UpgradeInstanceRequest::getVmNumber()const
|
||||
{
|
||||
return vmNumber_;
|
||||
}
|
||||
|
||||
void UpgradeInstanceRequest::setVmNumber(int vmNumber)
|
||||
{
|
||||
vmNumber_ = vmNumber;
|
||||
setParameter("VmNumber", std::to_string(vmNumber));
|
||||
}
|
||||
|
||||
long UpgradeInstanceRequest::getOwnerId()const
|
||||
{
|
||||
return ownerId_;
|
||||
}
|
||||
|
||||
void UpgradeInstanceRequest::setOwnerId(long ownerId)
|
||||
{
|
||||
ownerId_ = ownerId;
|
||||
setParameter("OwnerId", std::to_string(ownerId));
|
||||
}
|
||||
|
||||
int UpgradeInstanceRequest::getVersionCode()const
|
||||
{
|
||||
return versionCode_;
|
||||
}
|
||||
|
||||
void UpgradeInstanceRequest::setVersionCode(int versionCode)
|
||||
{
|
||||
versionCode_ = versionCode;
|
||||
setParameter("VersionCode", std::to_string(versionCode));
|
||||
}
|
||||
|
||||
52
aegis/src/model/UpgradeInstanceResult.cc
Normal file
52
aegis/src/model/UpgradeInstanceResult.cc
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* 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/aegis/model/UpgradeInstanceResult.h>
|
||||
#include <json/json.h>
|
||||
|
||||
using namespace AlibabaCloud::Aegis;
|
||||
using namespace AlibabaCloud::Aegis::Model;
|
||||
|
||||
UpgradeInstanceResult::UpgradeInstanceResult() :
|
||||
ServiceResult()
|
||||
{}
|
||||
|
||||
UpgradeInstanceResult::UpgradeInstanceResult(const std::string &payload) :
|
||||
ServiceResult()
|
||||
{
|
||||
parse(payload);
|
||||
}
|
||||
|
||||
UpgradeInstanceResult::~UpgradeInstanceResult()
|
||||
{}
|
||||
|
||||
void UpgradeInstanceResult::parse(const std::string &payload)
|
||||
{
|
||||
Json::Reader reader;
|
||||
Json::Value value;
|
||||
reader.parse(payload, value);
|
||||
|
||||
setRequestId(value["RequestId"].asString());
|
||||
if(!value["OrderId"].isNull())
|
||||
orderId_ = value["OrderId"].asString();
|
||||
|
||||
}
|
||||
|
||||
std::string UpgradeInstanceResult::getOrderId()const
|
||||
{
|
||||
return orderId_;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user