feat(hos_client_create, hos_client_destory): 多次调用destory不会导致重复释放

This commit is contained in:
彭宣正
2020-12-14 17:24:58 +08:00
parent 505d529c32
commit 10b370e486
55976 changed files with 8544395 additions and 2 deletions

View File

@@ -0,0 +1,112 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/AccessDeniedErrorCode.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace Inspector
{
namespace Model
{
namespace AccessDeniedErrorCodeMapper
{
static const int ACCESS_DENIED_TO_ASSESSMENT_TARGET_HASH = HashingUtils::HashString("ACCESS_DENIED_TO_ASSESSMENT_TARGET");
static const int ACCESS_DENIED_TO_ASSESSMENT_TEMPLATE_HASH = HashingUtils::HashString("ACCESS_DENIED_TO_ASSESSMENT_TEMPLATE");
static const int ACCESS_DENIED_TO_ASSESSMENT_RUN_HASH = HashingUtils::HashString("ACCESS_DENIED_TO_ASSESSMENT_RUN");
static const int ACCESS_DENIED_TO_FINDING_HASH = HashingUtils::HashString("ACCESS_DENIED_TO_FINDING");
static const int ACCESS_DENIED_TO_RESOURCE_GROUP_HASH = HashingUtils::HashString("ACCESS_DENIED_TO_RESOURCE_GROUP");
static const int ACCESS_DENIED_TO_RULES_PACKAGE_HASH = HashingUtils::HashString("ACCESS_DENIED_TO_RULES_PACKAGE");
static const int ACCESS_DENIED_TO_SNS_TOPIC_HASH = HashingUtils::HashString("ACCESS_DENIED_TO_SNS_TOPIC");
static const int ACCESS_DENIED_TO_IAM_ROLE_HASH = HashingUtils::HashString("ACCESS_DENIED_TO_IAM_ROLE");
AccessDeniedErrorCode GetAccessDeniedErrorCodeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == ACCESS_DENIED_TO_ASSESSMENT_TARGET_HASH)
{
return AccessDeniedErrorCode::ACCESS_DENIED_TO_ASSESSMENT_TARGET;
}
else if (hashCode == ACCESS_DENIED_TO_ASSESSMENT_TEMPLATE_HASH)
{
return AccessDeniedErrorCode::ACCESS_DENIED_TO_ASSESSMENT_TEMPLATE;
}
else if (hashCode == ACCESS_DENIED_TO_ASSESSMENT_RUN_HASH)
{
return AccessDeniedErrorCode::ACCESS_DENIED_TO_ASSESSMENT_RUN;
}
else if (hashCode == ACCESS_DENIED_TO_FINDING_HASH)
{
return AccessDeniedErrorCode::ACCESS_DENIED_TO_FINDING;
}
else if (hashCode == ACCESS_DENIED_TO_RESOURCE_GROUP_HASH)
{
return AccessDeniedErrorCode::ACCESS_DENIED_TO_RESOURCE_GROUP;
}
else if (hashCode == ACCESS_DENIED_TO_RULES_PACKAGE_HASH)
{
return AccessDeniedErrorCode::ACCESS_DENIED_TO_RULES_PACKAGE;
}
else if (hashCode == ACCESS_DENIED_TO_SNS_TOPIC_HASH)
{
return AccessDeniedErrorCode::ACCESS_DENIED_TO_SNS_TOPIC;
}
else if (hashCode == ACCESS_DENIED_TO_IAM_ROLE_HASH)
{
return AccessDeniedErrorCode::ACCESS_DENIED_TO_IAM_ROLE;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<AccessDeniedErrorCode>(hashCode);
}
return AccessDeniedErrorCode::NOT_SET;
}
Aws::String GetNameForAccessDeniedErrorCode(AccessDeniedErrorCode enumValue)
{
switch(enumValue)
{
case AccessDeniedErrorCode::ACCESS_DENIED_TO_ASSESSMENT_TARGET:
return "ACCESS_DENIED_TO_ASSESSMENT_TARGET";
case AccessDeniedErrorCode::ACCESS_DENIED_TO_ASSESSMENT_TEMPLATE:
return "ACCESS_DENIED_TO_ASSESSMENT_TEMPLATE";
case AccessDeniedErrorCode::ACCESS_DENIED_TO_ASSESSMENT_RUN:
return "ACCESS_DENIED_TO_ASSESSMENT_RUN";
case AccessDeniedErrorCode::ACCESS_DENIED_TO_FINDING:
return "ACCESS_DENIED_TO_FINDING";
case AccessDeniedErrorCode::ACCESS_DENIED_TO_RESOURCE_GROUP:
return "ACCESS_DENIED_TO_RESOURCE_GROUP";
case AccessDeniedErrorCode::ACCESS_DENIED_TO_RULES_PACKAGE:
return "ACCESS_DENIED_TO_RULES_PACKAGE";
case AccessDeniedErrorCode::ACCESS_DENIED_TO_SNS_TOPIC:
return "ACCESS_DENIED_TO_SNS_TOPIC";
case AccessDeniedErrorCode::ACCESS_DENIED_TO_IAM_ROLE:
return "ACCESS_DENIED_TO_IAM_ROLE";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace AccessDeniedErrorCodeMapper
} // namespace Model
} // namespace Inspector
} // namespace Aws

View File

@@ -0,0 +1,92 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/AccessDeniedException.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Inspector
{
namespace Model
{
AccessDeniedException::AccessDeniedException() :
m_messageHasBeenSet(false),
m_errorCode(AccessDeniedErrorCode::NOT_SET),
m_errorCodeHasBeenSet(false),
m_canRetry(false),
m_canRetryHasBeenSet(false)
{
}
AccessDeniedException::AccessDeniedException(JsonView jsonValue) :
m_messageHasBeenSet(false),
m_errorCode(AccessDeniedErrorCode::NOT_SET),
m_errorCodeHasBeenSet(false),
m_canRetry(false),
m_canRetryHasBeenSet(false)
{
*this = jsonValue;
}
AccessDeniedException& AccessDeniedException::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("message"))
{
m_message = jsonValue.GetString("message");
m_messageHasBeenSet = true;
}
if(jsonValue.ValueExists("errorCode"))
{
m_errorCode = AccessDeniedErrorCodeMapper::GetAccessDeniedErrorCodeForName(jsonValue.GetString("errorCode"));
m_errorCodeHasBeenSet = true;
}
if(jsonValue.ValueExists("canRetry"))
{
m_canRetry = jsonValue.GetBool("canRetry");
m_canRetryHasBeenSet = true;
}
return *this;
}
JsonValue AccessDeniedException::Jsonize() const
{
JsonValue payload;
if(m_messageHasBeenSet)
{
payload.WithString("message", m_message);
}
if(m_errorCodeHasBeenSet)
{
payload.WithString("errorCode", AccessDeniedErrorCodeMapper::GetNameForAccessDeniedErrorCode(m_errorCode));
}
if(m_canRetryHasBeenSet)
{
payload.WithBool("canRetry", m_canRetry);
}
return payload;
}
} // namespace Model
} // namespace Inspector
} // namespace Aws

View File

@@ -0,0 +1,60 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/AddAttributesToFindingsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
AddAttributesToFindingsRequest::AddAttributesToFindingsRequest() :
m_findingArnsHasBeenSet(false),
m_attributesHasBeenSet(false)
{
}
Aws::String AddAttributesToFindingsRequest::SerializePayload() const
{
JsonValue payload;
if(m_findingArnsHasBeenSet)
{
Array<JsonValue> findingArnsJsonList(m_findingArns.size());
for(unsigned findingArnsIndex = 0; findingArnsIndex < findingArnsJsonList.GetLength(); ++findingArnsIndex)
{
findingArnsJsonList[findingArnsIndex].AsString(m_findingArns[findingArnsIndex]);
}
payload.WithArray("findingArns", std::move(findingArnsJsonList));
}
if(m_attributesHasBeenSet)
{
Array<JsonValue> attributesJsonList(m_attributes.size());
for(unsigned attributesIndex = 0; attributesIndex < attributesJsonList.GetLength(); ++attributesIndex)
{
attributesJsonList[attributesIndex].AsObject(m_attributes[attributesIndex].Jsonize());
}
payload.WithArray("attributes", std::move(attributesJsonList));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection AddAttributesToFindingsRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "InspectorService.AddAttributesToFindings"));
return headers;
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/AddAttributesToFindingsResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
AddAttributesToFindingsResult::AddAttributesToFindingsResult()
{
}
AddAttributesToFindingsResult::AddAttributesToFindingsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
AddAttributesToFindingsResult& AddAttributesToFindingsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("failedItems"))
{
Aws::Map<Aws::String, JsonView> failedItemsJsonMap = jsonValue.GetObject("failedItems").GetAllObjects();
for(auto& failedItemsItem : failedItemsJsonMap)
{
m_failedItems[failedItemsItem.first] = failedItemsItem.second.AsObject();
}
}
return *this;
}

View File

@@ -0,0 +1,74 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/AgentAlreadyRunningAssessment.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Inspector
{
namespace Model
{
AgentAlreadyRunningAssessment::AgentAlreadyRunningAssessment() :
m_agentIdHasBeenSet(false),
m_assessmentRunArnHasBeenSet(false)
{
}
AgentAlreadyRunningAssessment::AgentAlreadyRunningAssessment(JsonView jsonValue) :
m_agentIdHasBeenSet(false),
m_assessmentRunArnHasBeenSet(false)
{
*this = jsonValue;
}
AgentAlreadyRunningAssessment& AgentAlreadyRunningAssessment::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("agentId"))
{
m_agentId = jsonValue.GetString("agentId");
m_agentIdHasBeenSet = true;
}
if(jsonValue.ValueExists("assessmentRunArn"))
{
m_assessmentRunArn = jsonValue.GetString("assessmentRunArn");
m_assessmentRunArnHasBeenSet = true;
}
return *this;
}
JsonValue AgentAlreadyRunningAssessment::Jsonize() const
{
JsonValue payload;
if(m_agentIdHasBeenSet)
{
payload.WithString("agentId", m_agentId);
}
if(m_assessmentRunArnHasBeenSet)
{
payload.WithString("assessmentRunArn", m_assessmentRunArn);
}
return payload;
}
} // namespace Model
} // namespace Inspector
} // namespace Aws

View File

@@ -0,0 +1,90 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/AgentFilter.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Inspector
{
namespace Model
{
AgentFilter::AgentFilter() :
m_agentHealthsHasBeenSet(false),
m_agentHealthCodesHasBeenSet(false)
{
}
AgentFilter::AgentFilter(JsonView jsonValue) :
m_agentHealthsHasBeenSet(false),
m_agentHealthCodesHasBeenSet(false)
{
*this = jsonValue;
}
AgentFilter& AgentFilter::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("agentHealths"))
{
Array<JsonView> agentHealthsJsonList = jsonValue.GetArray("agentHealths");
for(unsigned agentHealthsIndex = 0; agentHealthsIndex < agentHealthsJsonList.GetLength(); ++agentHealthsIndex)
{
m_agentHealths.push_back(AgentHealthMapper::GetAgentHealthForName(agentHealthsJsonList[agentHealthsIndex].AsString()));
}
m_agentHealthsHasBeenSet = true;
}
if(jsonValue.ValueExists("agentHealthCodes"))
{
Array<JsonView> agentHealthCodesJsonList = jsonValue.GetArray("agentHealthCodes");
for(unsigned agentHealthCodesIndex = 0; agentHealthCodesIndex < agentHealthCodesJsonList.GetLength(); ++agentHealthCodesIndex)
{
m_agentHealthCodes.push_back(AgentHealthCodeMapper::GetAgentHealthCodeForName(agentHealthCodesJsonList[agentHealthCodesIndex].AsString()));
}
m_agentHealthCodesHasBeenSet = true;
}
return *this;
}
JsonValue AgentFilter::Jsonize() const
{
JsonValue payload;
if(m_agentHealthsHasBeenSet)
{
Array<JsonValue> agentHealthsJsonList(m_agentHealths.size());
for(unsigned agentHealthsIndex = 0; agentHealthsIndex < agentHealthsJsonList.GetLength(); ++agentHealthsIndex)
{
agentHealthsJsonList[agentHealthsIndex].AsString(AgentHealthMapper::GetNameForAgentHealth(m_agentHealths[agentHealthsIndex]));
}
payload.WithArray("agentHealths", std::move(agentHealthsJsonList));
}
if(m_agentHealthCodesHasBeenSet)
{
Array<JsonValue> agentHealthCodesJsonList(m_agentHealthCodes.size());
for(unsigned agentHealthCodesIndex = 0; agentHealthCodesIndex < agentHealthCodesJsonList.GetLength(); ++agentHealthCodesIndex)
{
agentHealthCodesJsonList[agentHealthCodesIndex].AsString(AgentHealthCodeMapper::GetNameForAgentHealthCode(m_agentHealthCodes[agentHealthCodesIndex]));
}
payload.WithArray("agentHealthCodes", std::move(agentHealthCodesJsonList));
}
return payload;
}
} // namespace Model
} // namespace Inspector
} // namespace Aws

View File

@@ -0,0 +1,77 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/AgentHealth.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace Inspector
{
namespace Model
{
namespace AgentHealthMapper
{
static const int HEALTHY_HASH = HashingUtils::HashString("HEALTHY");
static const int UNHEALTHY_HASH = HashingUtils::HashString("UNHEALTHY");
static const int UNKNOWN_HASH = HashingUtils::HashString("UNKNOWN");
AgentHealth GetAgentHealthForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == HEALTHY_HASH)
{
return AgentHealth::HEALTHY;
}
else if (hashCode == UNHEALTHY_HASH)
{
return AgentHealth::UNHEALTHY;
}
else if (hashCode == UNKNOWN_HASH)
{
return AgentHealth::UNKNOWN;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<AgentHealth>(hashCode);
}
return AgentHealth::NOT_SET;
}
Aws::String GetNameForAgentHealth(AgentHealth enumValue)
{
switch(enumValue)
{
case AgentHealth::HEALTHY:
return "HEALTHY";
case AgentHealth::UNHEALTHY:
return "UNHEALTHY";
case AgentHealth::UNKNOWN:
return "UNKNOWN";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace AgentHealthMapper
} // namespace Model
} // namespace Inspector
} // namespace Aws

View File

@@ -0,0 +1,98 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/AgentHealthCode.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace Inspector
{
namespace Model
{
namespace AgentHealthCodeMapper
{
static const int IDLE_HASH = HashingUtils::HashString("IDLE");
static const int RUNNING_HASH = HashingUtils::HashString("RUNNING");
static const int SHUTDOWN_HASH = HashingUtils::HashString("SHUTDOWN");
static const int UNHEALTHY_HASH = HashingUtils::HashString("UNHEALTHY");
static const int THROTTLED_HASH = HashingUtils::HashString("THROTTLED");
static const int UNKNOWN_HASH = HashingUtils::HashString("UNKNOWN");
AgentHealthCode GetAgentHealthCodeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == IDLE_HASH)
{
return AgentHealthCode::IDLE;
}
else if (hashCode == RUNNING_HASH)
{
return AgentHealthCode::RUNNING;
}
else if (hashCode == SHUTDOWN_HASH)
{
return AgentHealthCode::SHUTDOWN;
}
else if (hashCode == UNHEALTHY_HASH)
{
return AgentHealthCode::UNHEALTHY;
}
else if (hashCode == THROTTLED_HASH)
{
return AgentHealthCode::THROTTLED;
}
else if (hashCode == UNKNOWN_HASH)
{
return AgentHealthCode::UNKNOWN;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<AgentHealthCode>(hashCode);
}
return AgentHealthCode::NOT_SET;
}
Aws::String GetNameForAgentHealthCode(AgentHealthCode enumValue)
{
switch(enumValue)
{
case AgentHealthCode::IDLE:
return "IDLE";
case AgentHealthCode::RUNNING:
return "RUNNING";
case AgentHealthCode::SHUTDOWN:
return "SHUTDOWN";
case AgentHealthCode::UNHEALTHY:
return "UNHEALTHY";
case AgentHealthCode::THROTTLED:
return "THROTTLED";
case AgentHealthCode::UNKNOWN:
return "UNKNOWN";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace AgentHealthCodeMapper
} // namespace Model
} // namespace Inspector
} // namespace Aws

View File

@@ -0,0 +1,165 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/AgentPreview.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Inspector
{
namespace Model
{
AgentPreview::AgentPreview() :
m_hostnameHasBeenSet(false),
m_agentIdHasBeenSet(false),
m_autoScalingGroupHasBeenSet(false),
m_agentHealth(AgentHealth::NOT_SET),
m_agentHealthHasBeenSet(false),
m_agentVersionHasBeenSet(false),
m_operatingSystemHasBeenSet(false),
m_kernelVersionHasBeenSet(false),
m_ipv4AddressHasBeenSet(false)
{
}
AgentPreview::AgentPreview(JsonView jsonValue) :
m_hostnameHasBeenSet(false),
m_agentIdHasBeenSet(false),
m_autoScalingGroupHasBeenSet(false),
m_agentHealth(AgentHealth::NOT_SET),
m_agentHealthHasBeenSet(false),
m_agentVersionHasBeenSet(false),
m_operatingSystemHasBeenSet(false),
m_kernelVersionHasBeenSet(false),
m_ipv4AddressHasBeenSet(false)
{
*this = jsonValue;
}
AgentPreview& AgentPreview::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("hostname"))
{
m_hostname = jsonValue.GetString("hostname");
m_hostnameHasBeenSet = true;
}
if(jsonValue.ValueExists("agentId"))
{
m_agentId = jsonValue.GetString("agentId");
m_agentIdHasBeenSet = true;
}
if(jsonValue.ValueExists("autoScalingGroup"))
{
m_autoScalingGroup = jsonValue.GetString("autoScalingGroup");
m_autoScalingGroupHasBeenSet = true;
}
if(jsonValue.ValueExists("agentHealth"))
{
m_agentHealth = AgentHealthMapper::GetAgentHealthForName(jsonValue.GetString("agentHealth"));
m_agentHealthHasBeenSet = true;
}
if(jsonValue.ValueExists("agentVersion"))
{
m_agentVersion = jsonValue.GetString("agentVersion");
m_agentVersionHasBeenSet = true;
}
if(jsonValue.ValueExists("operatingSystem"))
{
m_operatingSystem = jsonValue.GetString("operatingSystem");
m_operatingSystemHasBeenSet = true;
}
if(jsonValue.ValueExists("kernelVersion"))
{
m_kernelVersion = jsonValue.GetString("kernelVersion");
m_kernelVersionHasBeenSet = true;
}
if(jsonValue.ValueExists("ipv4Address"))
{
m_ipv4Address = jsonValue.GetString("ipv4Address");
m_ipv4AddressHasBeenSet = true;
}
return *this;
}
JsonValue AgentPreview::Jsonize() const
{
JsonValue payload;
if(m_hostnameHasBeenSet)
{
payload.WithString("hostname", m_hostname);
}
if(m_agentIdHasBeenSet)
{
payload.WithString("agentId", m_agentId);
}
if(m_autoScalingGroupHasBeenSet)
{
payload.WithString("autoScalingGroup", m_autoScalingGroup);
}
if(m_agentHealthHasBeenSet)
{
payload.WithString("agentHealth", AgentHealthMapper::GetNameForAgentHealth(m_agentHealth));
}
if(m_agentVersionHasBeenSet)
{
payload.WithString("agentVersion", m_agentVersion);
}
if(m_operatingSystemHasBeenSet)
{
payload.WithString("operatingSystem", m_operatingSystem);
}
if(m_kernelVersionHasBeenSet)
{
payload.WithString("kernelVersion", m_kernelVersion);
}
if(m_ipv4AddressHasBeenSet)
{
payload.WithString("ipv4Address", m_ipv4Address);
}
return payload;
}
} // namespace Model
} // namespace Inspector
} // namespace Aws

View File

@@ -0,0 +1,116 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/AgentsAlreadyRunningAssessmentException.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Inspector
{
namespace Model
{
AgentsAlreadyRunningAssessmentException::AgentsAlreadyRunningAssessmentException() :
m_messageHasBeenSet(false),
m_agentsHasBeenSet(false),
m_agentsTruncated(false),
m_agentsTruncatedHasBeenSet(false),
m_canRetry(false),
m_canRetryHasBeenSet(false)
{
}
AgentsAlreadyRunningAssessmentException::AgentsAlreadyRunningAssessmentException(JsonView jsonValue) :
m_messageHasBeenSet(false),
m_agentsHasBeenSet(false),
m_agentsTruncated(false),
m_agentsTruncatedHasBeenSet(false),
m_canRetry(false),
m_canRetryHasBeenSet(false)
{
*this = jsonValue;
}
AgentsAlreadyRunningAssessmentException& AgentsAlreadyRunningAssessmentException::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("message"))
{
m_message = jsonValue.GetString("message");
m_messageHasBeenSet = true;
}
if(jsonValue.ValueExists("agents"))
{
Array<JsonView> agentsJsonList = jsonValue.GetArray("agents");
for(unsigned agentsIndex = 0; agentsIndex < agentsJsonList.GetLength(); ++agentsIndex)
{
m_agents.push_back(agentsJsonList[agentsIndex].AsObject());
}
m_agentsHasBeenSet = true;
}
if(jsonValue.ValueExists("agentsTruncated"))
{
m_agentsTruncated = jsonValue.GetBool("agentsTruncated");
m_agentsTruncatedHasBeenSet = true;
}
if(jsonValue.ValueExists("canRetry"))
{
m_canRetry = jsonValue.GetBool("canRetry");
m_canRetryHasBeenSet = true;
}
return *this;
}
JsonValue AgentsAlreadyRunningAssessmentException::Jsonize() const
{
JsonValue payload;
if(m_messageHasBeenSet)
{
payload.WithString("message", m_message);
}
if(m_agentsHasBeenSet)
{
Array<JsonValue> agentsJsonList(m_agents.size());
for(unsigned agentsIndex = 0; agentsIndex < agentsJsonList.GetLength(); ++agentsIndex)
{
agentsJsonList[agentsIndex].AsObject(m_agents[agentsIndex].Jsonize());
}
payload.WithArray("agents", std::move(agentsJsonList));
}
if(m_agentsTruncatedHasBeenSet)
{
payload.WithBool("agentsTruncated", m_agentsTruncated);
}
if(m_canRetryHasBeenSet)
{
payload.WithBool("canRetry", m_canRetry);
}
return payload;
}
} // namespace Model
} // namespace Inspector
} // namespace Aws

View File

@@ -0,0 +1,310 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/AssessmentRun.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Inspector
{
namespace Model
{
AssessmentRun::AssessmentRun() :
m_arnHasBeenSet(false),
m_nameHasBeenSet(false),
m_assessmentTemplateArnHasBeenSet(false),
m_state(AssessmentRunState::NOT_SET),
m_stateHasBeenSet(false),
m_durationInSeconds(0),
m_durationInSecondsHasBeenSet(false),
m_rulesPackageArnsHasBeenSet(false),
m_userAttributesForFindingsHasBeenSet(false),
m_createdAtHasBeenSet(false),
m_startedAtHasBeenSet(false),
m_completedAtHasBeenSet(false),
m_stateChangedAtHasBeenSet(false),
m_dataCollected(false),
m_dataCollectedHasBeenSet(false),
m_stateChangesHasBeenSet(false),
m_notificationsHasBeenSet(false),
m_findingCountsHasBeenSet(false)
{
}
AssessmentRun::AssessmentRun(JsonView jsonValue) :
m_arnHasBeenSet(false),
m_nameHasBeenSet(false),
m_assessmentTemplateArnHasBeenSet(false),
m_state(AssessmentRunState::NOT_SET),
m_stateHasBeenSet(false),
m_durationInSeconds(0),
m_durationInSecondsHasBeenSet(false),
m_rulesPackageArnsHasBeenSet(false),
m_userAttributesForFindingsHasBeenSet(false),
m_createdAtHasBeenSet(false),
m_startedAtHasBeenSet(false),
m_completedAtHasBeenSet(false),
m_stateChangedAtHasBeenSet(false),
m_dataCollected(false),
m_dataCollectedHasBeenSet(false),
m_stateChangesHasBeenSet(false),
m_notificationsHasBeenSet(false),
m_findingCountsHasBeenSet(false)
{
*this = jsonValue;
}
AssessmentRun& AssessmentRun::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("arn"))
{
m_arn = jsonValue.GetString("arn");
m_arnHasBeenSet = true;
}
if(jsonValue.ValueExists("name"))
{
m_name = jsonValue.GetString("name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("assessmentTemplateArn"))
{
m_assessmentTemplateArn = jsonValue.GetString("assessmentTemplateArn");
m_assessmentTemplateArnHasBeenSet = true;
}
if(jsonValue.ValueExists("state"))
{
m_state = AssessmentRunStateMapper::GetAssessmentRunStateForName(jsonValue.GetString("state"));
m_stateHasBeenSet = true;
}
if(jsonValue.ValueExists("durationInSeconds"))
{
m_durationInSeconds = jsonValue.GetInteger("durationInSeconds");
m_durationInSecondsHasBeenSet = true;
}
if(jsonValue.ValueExists("rulesPackageArns"))
{
Array<JsonView> rulesPackageArnsJsonList = jsonValue.GetArray("rulesPackageArns");
for(unsigned rulesPackageArnsIndex = 0; rulesPackageArnsIndex < rulesPackageArnsJsonList.GetLength(); ++rulesPackageArnsIndex)
{
m_rulesPackageArns.push_back(rulesPackageArnsJsonList[rulesPackageArnsIndex].AsString());
}
m_rulesPackageArnsHasBeenSet = true;
}
if(jsonValue.ValueExists("userAttributesForFindings"))
{
Array<JsonView> userAttributesForFindingsJsonList = jsonValue.GetArray("userAttributesForFindings");
for(unsigned userAttributesForFindingsIndex = 0; userAttributesForFindingsIndex < userAttributesForFindingsJsonList.GetLength(); ++userAttributesForFindingsIndex)
{
m_userAttributesForFindings.push_back(userAttributesForFindingsJsonList[userAttributesForFindingsIndex].AsObject());
}
m_userAttributesForFindingsHasBeenSet = true;
}
if(jsonValue.ValueExists("createdAt"))
{
m_createdAt = jsonValue.GetDouble("createdAt");
m_createdAtHasBeenSet = true;
}
if(jsonValue.ValueExists("startedAt"))
{
m_startedAt = jsonValue.GetDouble("startedAt");
m_startedAtHasBeenSet = true;
}
if(jsonValue.ValueExists("completedAt"))
{
m_completedAt = jsonValue.GetDouble("completedAt");
m_completedAtHasBeenSet = true;
}
if(jsonValue.ValueExists("stateChangedAt"))
{
m_stateChangedAt = jsonValue.GetDouble("stateChangedAt");
m_stateChangedAtHasBeenSet = true;
}
if(jsonValue.ValueExists("dataCollected"))
{
m_dataCollected = jsonValue.GetBool("dataCollected");
m_dataCollectedHasBeenSet = true;
}
if(jsonValue.ValueExists("stateChanges"))
{
Array<JsonView> stateChangesJsonList = jsonValue.GetArray("stateChanges");
for(unsigned stateChangesIndex = 0; stateChangesIndex < stateChangesJsonList.GetLength(); ++stateChangesIndex)
{
m_stateChanges.push_back(stateChangesJsonList[stateChangesIndex].AsObject());
}
m_stateChangesHasBeenSet = true;
}
if(jsonValue.ValueExists("notifications"))
{
Array<JsonView> notificationsJsonList = jsonValue.GetArray("notifications");
for(unsigned notificationsIndex = 0; notificationsIndex < notificationsJsonList.GetLength(); ++notificationsIndex)
{
m_notifications.push_back(notificationsJsonList[notificationsIndex].AsObject());
}
m_notificationsHasBeenSet = true;
}
if(jsonValue.ValueExists("findingCounts"))
{
Aws::Map<Aws::String, JsonView> findingCountsJsonMap = jsonValue.GetObject("findingCounts").GetAllObjects();
for(auto& findingCountsItem : findingCountsJsonMap)
{
m_findingCounts[SeverityMapper::GetSeverityForName(findingCountsItem.first)] = findingCountsItem.second.AsInteger();
}
m_findingCountsHasBeenSet = true;
}
return *this;
}
JsonValue AssessmentRun::Jsonize() const
{
JsonValue payload;
if(m_arnHasBeenSet)
{
payload.WithString("arn", m_arn);
}
if(m_nameHasBeenSet)
{
payload.WithString("name", m_name);
}
if(m_assessmentTemplateArnHasBeenSet)
{
payload.WithString("assessmentTemplateArn", m_assessmentTemplateArn);
}
if(m_stateHasBeenSet)
{
payload.WithString("state", AssessmentRunStateMapper::GetNameForAssessmentRunState(m_state));
}
if(m_durationInSecondsHasBeenSet)
{
payload.WithInteger("durationInSeconds", m_durationInSeconds);
}
if(m_rulesPackageArnsHasBeenSet)
{
Array<JsonValue> rulesPackageArnsJsonList(m_rulesPackageArns.size());
for(unsigned rulesPackageArnsIndex = 0; rulesPackageArnsIndex < rulesPackageArnsJsonList.GetLength(); ++rulesPackageArnsIndex)
{
rulesPackageArnsJsonList[rulesPackageArnsIndex].AsString(m_rulesPackageArns[rulesPackageArnsIndex]);
}
payload.WithArray("rulesPackageArns", std::move(rulesPackageArnsJsonList));
}
if(m_userAttributesForFindingsHasBeenSet)
{
Array<JsonValue> userAttributesForFindingsJsonList(m_userAttributesForFindings.size());
for(unsigned userAttributesForFindingsIndex = 0; userAttributesForFindingsIndex < userAttributesForFindingsJsonList.GetLength(); ++userAttributesForFindingsIndex)
{
userAttributesForFindingsJsonList[userAttributesForFindingsIndex].AsObject(m_userAttributesForFindings[userAttributesForFindingsIndex].Jsonize());
}
payload.WithArray("userAttributesForFindings", std::move(userAttributesForFindingsJsonList));
}
if(m_createdAtHasBeenSet)
{
payload.WithDouble("createdAt", m_createdAt.SecondsWithMSPrecision());
}
if(m_startedAtHasBeenSet)
{
payload.WithDouble("startedAt", m_startedAt.SecondsWithMSPrecision());
}
if(m_completedAtHasBeenSet)
{
payload.WithDouble("completedAt", m_completedAt.SecondsWithMSPrecision());
}
if(m_stateChangedAtHasBeenSet)
{
payload.WithDouble("stateChangedAt", m_stateChangedAt.SecondsWithMSPrecision());
}
if(m_dataCollectedHasBeenSet)
{
payload.WithBool("dataCollected", m_dataCollected);
}
if(m_stateChangesHasBeenSet)
{
Array<JsonValue> stateChangesJsonList(m_stateChanges.size());
for(unsigned stateChangesIndex = 0; stateChangesIndex < stateChangesJsonList.GetLength(); ++stateChangesIndex)
{
stateChangesJsonList[stateChangesIndex].AsObject(m_stateChanges[stateChangesIndex].Jsonize());
}
payload.WithArray("stateChanges", std::move(stateChangesJsonList));
}
if(m_notificationsHasBeenSet)
{
Array<JsonValue> notificationsJsonList(m_notifications.size());
for(unsigned notificationsIndex = 0; notificationsIndex < notificationsJsonList.GetLength(); ++notificationsIndex)
{
notificationsJsonList[notificationsIndex].AsObject(m_notifications[notificationsIndex].Jsonize());
}
payload.WithArray("notifications", std::move(notificationsJsonList));
}
if(m_findingCountsHasBeenSet)
{
JsonValue findingCountsJsonMap;
for(auto& findingCountsItem : m_findingCounts)
{
findingCountsJsonMap.WithInteger(SeverityMapper::GetNameForSeverity(findingCountsItem.first), findingCountsItem.second);
}
payload.WithObject("findingCounts", std::move(findingCountsJsonMap));
}
return payload;
}
} // namespace Model
} // namespace Inspector
} // namespace Aws

View File

@@ -0,0 +1,159 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/AssessmentRunAgent.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Inspector
{
namespace Model
{
AssessmentRunAgent::AssessmentRunAgent() :
m_agentIdHasBeenSet(false),
m_assessmentRunArnHasBeenSet(false),
m_agentHealth(AgentHealth::NOT_SET),
m_agentHealthHasBeenSet(false),
m_agentHealthCode(AgentHealthCode::NOT_SET),
m_agentHealthCodeHasBeenSet(false),
m_agentHealthDetailsHasBeenSet(false),
m_autoScalingGroupHasBeenSet(false),
m_telemetryMetadataHasBeenSet(false)
{
}
AssessmentRunAgent::AssessmentRunAgent(JsonView jsonValue) :
m_agentIdHasBeenSet(false),
m_assessmentRunArnHasBeenSet(false),
m_agentHealth(AgentHealth::NOT_SET),
m_agentHealthHasBeenSet(false),
m_agentHealthCode(AgentHealthCode::NOT_SET),
m_agentHealthCodeHasBeenSet(false),
m_agentHealthDetailsHasBeenSet(false),
m_autoScalingGroupHasBeenSet(false),
m_telemetryMetadataHasBeenSet(false)
{
*this = jsonValue;
}
AssessmentRunAgent& AssessmentRunAgent::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("agentId"))
{
m_agentId = jsonValue.GetString("agentId");
m_agentIdHasBeenSet = true;
}
if(jsonValue.ValueExists("assessmentRunArn"))
{
m_assessmentRunArn = jsonValue.GetString("assessmentRunArn");
m_assessmentRunArnHasBeenSet = true;
}
if(jsonValue.ValueExists("agentHealth"))
{
m_agentHealth = AgentHealthMapper::GetAgentHealthForName(jsonValue.GetString("agentHealth"));
m_agentHealthHasBeenSet = true;
}
if(jsonValue.ValueExists("agentHealthCode"))
{
m_agentHealthCode = AgentHealthCodeMapper::GetAgentHealthCodeForName(jsonValue.GetString("agentHealthCode"));
m_agentHealthCodeHasBeenSet = true;
}
if(jsonValue.ValueExists("agentHealthDetails"))
{
m_agentHealthDetails = jsonValue.GetString("agentHealthDetails");
m_agentHealthDetailsHasBeenSet = true;
}
if(jsonValue.ValueExists("autoScalingGroup"))
{
m_autoScalingGroup = jsonValue.GetString("autoScalingGroup");
m_autoScalingGroupHasBeenSet = true;
}
if(jsonValue.ValueExists("telemetryMetadata"))
{
Array<JsonView> telemetryMetadataJsonList = jsonValue.GetArray("telemetryMetadata");
for(unsigned telemetryMetadataIndex = 0; telemetryMetadataIndex < telemetryMetadataJsonList.GetLength(); ++telemetryMetadataIndex)
{
m_telemetryMetadata.push_back(telemetryMetadataJsonList[telemetryMetadataIndex].AsObject());
}
m_telemetryMetadataHasBeenSet = true;
}
return *this;
}
JsonValue AssessmentRunAgent::Jsonize() const
{
JsonValue payload;
if(m_agentIdHasBeenSet)
{
payload.WithString("agentId", m_agentId);
}
if(m_assessmentRunArnHasBeenSet)
{
payload.WithString("assessmentRunArn", m_assessmentRunArn);
}
if(m_agentHealthHasBeenSet)
{
payload.WithString("agentHealth", AgentHealthMapper::GetNameForAgentHealth(m_agentHealth));
}
if(m_agentHealthCodeHasBeenSet)
{
payload.WithString("agentHealthCode", AgentHealthCodeMapper::GetNameForAgentHealthCode(m_agentHealthCode));
}
if(m_agentHealthDetailsHasBeenSet)
{
payload.WithString("agentHealthDetails", m_agentHealthDetails);
}
if(m_autoScalingGroupHasBeenSet)
{
payload.WithString("autoScalingGroup", m_autoScalingGroup);
}
if(m_telemetryMetadataHasBeenSet)
{
Array<JsonValue> telemetryMetadataJsonList(m_telemetryMetadata.size());
for(unsigned telemetryMetadataIndex = 0; telemetryMetadataIndex < telemetryMetadataJsonList.GetLength(); ++telemetryMetadataIndex)
{
telemetryMetadataJsonList[telemetryMetadataIndex].AsObject(m_telemetryMetadata[telemetryMetadataIndex].Jsonize());
}
payload.WithArray("telemetryMetadata", std::move(telemetryMetadataJsonList));
}
return payload;
}
} // namespace Model
} // namespace Inspector
} // namespace Aws

View File

@@ -0,0 +1,165 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/AssessmentRunFilter.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Inspector
{
namespace Model
{
AssessmentRunFilter::AssessmentRunFilter() :
m_namePatternHasBeenSet(false),
m_statesHasBeenSet(false),
m_durationRangeHasBeenSet(false),
m_rulesPackageArnsHasBeenSet(false),
m_startTimeRangeHasBeenSet(false),
m_completionTimeRangeHasBeenSet(false),
m_stateChangeTimeRangeHasBeenSet(false)
{
}
AssessmentRunFilter::AssessmentRunFilter(JsonView jsonValue) :
m_namePatternHasBeenSet(false),
m_statesHasBeenSet(false),
m_durationRangeHasBeenSet(false),
m_rulesPackageArnsHasBeenSet(false),
m_startTimeRangeHasBeenSet(false),
m_completionTimeRangeHasBeenSet(false),
m_stateChangeTimeRangeHasBeenSet(false)
{
*this = jsonValue;
}
AssessmentRunFilter& AssessmentRunFilter::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("namePattern"))
{
m_namePattern = jsonValue.GetString("namePattern");
m_namePatternHasBeenSet = true;
}
if(jsonValue.ValueExists("states"))
{
Array<JsonView> statesJsonList = jsonValue.GetArray("states");
for(unsigned statesIndex = 0; statesIndex < statesJsonList.GetLength(); ++statesIndex)
{
m_states.push_back(AssessmentRunStateMapper::GetAssessmentRunStateForName(statesJsonList[statesIndex].AsString()));
}
m_statesHasBeenSet = true;
}
if(jsonValue.ValueExists("durationRange"))
{
m_durationRange = jsonValue.GetObject("durationRange");
m_durationRangeHasBeenSet = true;
}
if(jsonValue.ValueExists("rulesPackageArns"))
{
Array<JsonView> rulesPackageArnsJsonList = jsonValue.GetArray("rulesPackageArns");
for(unsigned rulesPackageArnsIndex = 0; rulesPackageArnsIndex < rulesPackageArnsJsonList.GetLength(); ++rulesPackageArnsIndex)
{
m_rulesPackageArns.push_back(rulesPackageArnsJsonList[rulesPackageArnsIndex].AsString());
}
m_rulesPackageArnsHasBeenSet = true;
}
if(jsonValue.ValueExists("startTimeRange"))
{
m_startTimeRange = jsonValue.GetObject("startTimeRange");
m_startTimeRangeHasBeenSet = true;
}
if(jsonValue.ValueExists("completionTimeRange"))
{
m_completionTimeRange = jsonValue.GetObject("completionTimeRange");
m_completionTimeRangeHasBeenSet = true;
}
if(jsonValue.ValueExists("stateChangeTimeRange"))
{
m_stateChangeTimeRange = jsonValue.GetObject("stateChangeTimeRange");
m_stateChangeTimeRangeHasBeenSet = true;
}
return *this;
}
JsonValue AssessmentRunFilter::Jsonize() const
{
JsonValue payload;
if(m_namePatternHasBeenSet)
{
payload.WithString("namePattern", m_namePattern);
}
if(m_statesHasBeenSet)
{
Array<JsonValue> statesJsonList(m_states.size());
for(unsigned statesIndex = 0; statesIndex < statesJsonList.GetLength(); ++statesIndex)
{
statesJsonList[statesIndex].AsString(AssessmentRunStateMapper::GetNameForAssessmentRunState(m_states[statesIndex]));
}
payload.WithArray("states", std::move(statesJsonList));
}
if(m_durationRangeHasBeenSet)
{
payload.WithObject("durationRange", m_durationRange.Jsonize());
}
if(m_rulesPackageArnsHasBeenSet)
{
Array<JsonValue> rulesPackageArnsJsonList(m_rulesPackageArns.size());
for(unsigned rulesPackageArnsIndex = 0; rulesPackageArnsIndex < rulesPackageArnsJsonList.GetLength(); ++rulesPackageArnsIndex)
{
rulesPackageArnsJsonList[rulesPackageArnsIndex].AsString(m_rulesPackageArns[rulesPackageArnsIndex]);
}
payload.WithArray("rulesPackageArns", std::move(rulesPackageArnsJsonList));
}
if(m_startTimeRangeHasBeenSet)
{
payload.WithObject("startTimeRange", m_startTimeRange.Jsonize());
}
if(m_completionTimeRangeHasBeenSet)
{
payload.WithObject("completionTimeRange", m_completionTimeRange.Jsonize());
}
if(m_stateChangeTimeRangeHasBeenSet)
{
payload.WithObject("stateChangeTimeRange", m_stateChangeTimeRange.Jsonize());
}
return payload;
}
} // namespace Model
} // namespace Inspector
} // namespace Aws

View File

@@ -0,0 +1,116 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/AssessmentRunInProgressException.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Inspector
{
namespace Model
{
AssessmentRunInProgressException::AssessmentRunInProgressException() :
m_messageHasBeenSet(false),
m_assessmentRunArnsHasBeenSet(false),
m_assessmentRunArnsTruncated(false),
m_assessmentRunArnsTruncatedHasBeenSet(false),
m_canRetry(false),
m_canRetryHasBeenSet(false)
{
}
AssessmentRunInProgressException::AssessmentRunInProgressException(JsonView jsonValue) :
m_messageHasBeenSet(false),
m_assessmentRunArnsHasBeenSet(false),
m_assessmentRunArnsTruncated(false),
m_assessmentRunArnsTruncatedHasBeenSet(false),
m_canRetry(false),
m_canRetryHasBeenSet(false)
{
*this = jsonValue;
}
AssessmentRunInProgressException& AssessmentRunInProgressException::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("message"))
{
m_message = jsonValue.GetString("message");
m_messageHasBeenSet = true;
}
if(jsonValue.ValueExists("assessmentRunArns"))
{
Array<JsonView> assessmentRunArnsJsonList = jsonValue.GetArray("assessmentRunArns");
for(unsigned assessmentRunArnsIndex = 0; assessmentRunArnsIndex < assessmentRunArnsJsonList.GetLength(); ++assessmentRunArnsIndex)
{
m_assessmentRunArns.push_back(assessmentRunArnsJsonList[assessmentRunArnsIndex].AsString());
}
m_assessmentRunArnsHasBeenSet = true;
}
if(jsonValue.ValueExists("assessmentRunArnsTruncated"))
{
m_assessmentRunArnsTruncated = jsonValue.GetBool("assessmentRunArnsTruncated");
m_assessmentRunArnsTruncatedHasBeenSet = true;
}
if(jsonValue.ValueExists("canRetry"))
{
m_canRetry = jsonValue.GetBool("canRetry");
m_canRetryHasBeenSet = true;
}
return *this;
}
JsonValue AssessmentRunInProgressException::Jsonize() const
{
JsonValue payload;
if(m_messageHasBeenSet)
{
payload.WithString("message", m_message);
}
if(m_assessmentRunArnsHasBeenSet)
{
Array<JsonValue> assessmentRunArnsJsonList(m_assessmentRunArns.size());
for(unsigned assessmentRunArnsIndex = 0; assessmentRunArnsIndex < assessmentRunArnsJsonList.GetLength(); ++assessmentRunArnsIndex)
{
assessmentRunArnsJsonList[assessmentRunArnsIndex].AsString(m_assessmentRunArns[assessmentRunArnsIndex]);
}
payload.WithArray("assessmentRunArns", std::move(assessmentRunArnsJsonList));
}
if(m_assessmentRunArnsTruncatedHasBeenSet)
{
payload.WithBool("assessmentRunArnsTruncated", m_assessmentRunArnsTruncated);
}
if(m_canRetryHasBeenSet)
{
payload.WithBool("canRetry", m_canRetry);
}
return payload;
}
} // namespace Model
} // namespace Inspector
} // namespace Aws

View File

@@ -0,0 +1,137 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/AssessmentRunNotification.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Inspector
{
namespace Model
{
AssessmentRunNotification::AssessmentRunNotification() :
m_dateHasBeenSet(false),
m_event(InspectorEvent::NOT_SET),
m_eventHasBeenSet(false),
m_messageHasBeenSet(false),
m_error(false),
m_errorHasBeenSet(false),
m_snsTopicArnHasBeenSet(false),
m_snsPublishStatusCode(AssessmentRunNotificationSnsStatusCode::NOT_SET),
m_snsPublishStatusCodeHasBeenSet(false)
{
}
AssessmentRunNotification::AssessmentRunNotification(JsonView jsonValue) :
m_dateHasBeenSet(false),
m_event(InspectorEvent::NOT_SET),
m_eventHasBeenSet(false),
m_messageHasBeenSet(false),
m_error(false),
m_errorHasBeenSet(false),
m_snsTopicArnHasBeenSet(false),
m_snsPublishStatusCode(AssessmentRunNotificationSnsStatusCode::NOT_SET),
m_snsPublishStatusCodeHasBeenSet(false)
{
*this = jsonValue;
}
AssessmentRunNotification& AssessmentRunNotification::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("date"))
{
m_date = jsonValue.GetDouble("date");
m_dateHasBeenSet = true;
}
if(jsonValue.ValueExists("event"))
{
m_event = InspectorEventMapper::GetInspectorEventForName(jsonValue.GetString("event"));
m_eventHasBeenSet = true;
}
if(jsonValue.ValueExists("message"))
{
m_message = jsonValue.GetString("message");
m_messageHasBeenSet = true;
}
if(jsonValue.ValueExists("error"))
{
m_error = jsonValue.GetBool("error");
m_errorHasBeenSet = true;
}
if(jsonValue.ValueExists("snsTopicArn"))
{
m_snsTopicArn = jsonValue.GetString("snsTopicArn");
m_snsTopicArnHasBeenSet = true;
}
if(jsonValue.ValueExists("snsPublishStatusCode"))
{
m_snsPublishStatusCode = AssessmentRunNotificationSnsStatusCodeMapper::GetAssessmentRunNotificationSnsStatusCodeForName(jsonValue.GetString("snsPublishStatusCode"));
m_snsPublishStatusCodeHasBeenSet = true;
}
return *this;
}
JsonValue AssessmentRunNotification::Jsonize() const
{
JsonValue payload;
if(m_dateHasBeenSet)
{
payload.WithDouble("date", m_date.SecondsWithMSPrecision());
}
if(m_eventHasBeenSet)
{
payload.WithString("event", InspectorEventMapper::GetNameForInspectorEvent(m_event));
}
if(m_messageHasBeenSet)
{
payload.WithString("message", m_message);
}
if(m_errorHasBeenSet)
{
payload.WithBool("error", m_error);
}
if(m_snsTopicArnHasBeenSet)
{
payload.WithString("snsTopicArn", m_snsTopicArn);
}
if(m_snsPublishStatusCodeHasBeenSet)
{
payload.WithString("snsPublishStatusCode", AssessmentRunNotificationSnsStatusCodeMapper::GetNameForAssessmentRunNotificationSnsStatusCode(m_snsPublishStatusCode));
}
return payload;
}
} // namespace Model
} // namespace Inspector
} // namespace Aws

View File

@@ -0,0 +1,84 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/AssessmentRunNotificationSnsStatusCode.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace Inspector
{
namespace Model
{
namespace AssessmentRunNotificationSnsStatusCodeMapper
{
static const int SUCCESS_HASH = HashingUtils::HashString("SUCCESS");
static const int TOPIC_DOES_NOT_EXIST_HASH = HashingUtils::HashString("TOPIC_DOES_NOT_EXIST");
static const int ACCESS_DENIED_HASH = HashingUtils::HashString("ACCESS_DENIED");
static const int INTERNAL_ERROR_HASH = HashingUtils::HashString("INTERNAL_ERROR");
AssessmentRunNotificationSnsStatusCode GetAssessmentRunNotificationSnsStatusCodeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == SUCCESS_HASH)
{
return AssessmentRunNotificationSnsStatusCode::SUCCESS;
}
else if (hashCode == TOPIC_DOES_NOT_EXIST_HASH)
{
return AssessmentRunNotificationSnsStatusCode::TOPIC_DOES_NOT_EXIST;
}
else if (hashCode == ACCESS_DENIED_HASH)
{
return AssessmentRunNotificationSnsStatusCode::ACCESS_DENIED;
}
else if (hashCode == INTERNAL_ERROR_HASH)
{
return AssessmentRunNotificationSnsStatusCode::INTERNAL_ERROR;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<AssessmentRunNotificationSnsStatusCode>(hashCode);
}
return AssessmentRunNotificationSnsStatusCode::NOT_SET;
}
Aws::String GetNameForAssessmentRunNotificationSnsStatusCode(AssessmentRunNotificationSnsStatusCode enumValue)
{
switch(enumValue)
{
case AssessmentRunNotificationSnsStatusCode::SUCCESS:
return "SUCCESS";
case AssessmentRunNotificationSnsStatusCode::TOPIC_DOES_NOT_EXIST:
return "TOPIC_DOES_NOT_EXIST";
case AssessmentRunNotificationSnsStatusCode::ACCESS_DENIED:
return "ACCESS_DENIED";
case AssessmentRunNotificationSnsStatusCode::INTERNAL_ERROR:
return "INTERNAL_ERROR";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace AssessmentRunNotificationSnsStatusCodeMapper
} // namespace Model
} // namespace Inspector
} // namespace Aws

View File

@@ -0,0 +1,147 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/AssessmentRunState.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace Inspector
{
namespace Model
{
namespace AssessmentRunStateMapper
{
static const int CREATED_HASH = HashingUtils::HashString("CREATED");
static const int START_DATA_COLLECTION_PENDING_HASH = HashingUtils::HashString("START_DATA_COLLECTION_PENDING");
static const int START_DATA_COLLECTION_IN_PROGRESS_HASH = HashingUtils::HashString("START_DATA_COLLECTION_IN_PROGRESS");
static const int COLLECTING_DATA_HASH = HashingUtils::HashString("COLLECTING_DATA");
static const int STOP_DATA_COLLECTION_PENDING_HASH = HashingUtils::HashString("STOP_DATA_COLLECTION_PENDING");
static const int DATA_COLLECTED_HASH = HashingUtils::HashString("DATA_COLLECTED");
static const int START_EVALUATING_RULES_PENDING_HASH = HashingUtils::HashString("START_EVALUATING_RULES_PENDING");
static const int EVALUATING_RULES_HASH = HashingUtils::HashString("EVALUATING_RULES");
static const int FAILED_HASH = HashingUtils::HashString("FAILED");
static const int ERROR__HASH = HashingUtils::HashString("ERROR");
static const int COMPLETED_HASH = HashingUtils::HashString("COMPLETED");
static const int COMPLETED_WITH_ERRORS_HASH = HashingUtils::HashString("COMPLETED_WITH_ERRORS");
static const int CANCELED_HASH = HashingUtils::HashString("CANCELED");
AssessmentRunState GetAssessmentRunStateForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == CREATED_HASH)
{
return AssessmentRunState::CREATED;
}
else if (hashCode == START_DATA_COLLECTION_PENDING_HASH)
{
return AssessmentRunState::START_DATA_COLLECTION_PENDING;
}
else if (hashCode == START_DATA_COLLECTION_IN_PROGRESS_HASH)
{
return AssessmentRunState::START_DATA_COLLECTION_IN_PROGRESS;
}
else if (hashCode == COLLECTING_DATA_HASH)
{
return AssessmentRunState::COLLECTING_DATA;
}
else if (hashCode == STOP_DATA_COLLECTION_PENDING_HASH)
{
return AssessmentRunState::STOP_DATA_COLLECTION_PENDING;
}
else if (hashCode == DATA_COLLECTED_HASH)
{
return AssessmentRunState::DATA_COLLECTED;
}
else if (hashCode == START_EVALUATING_RULES_PENDING_HASH)
{
return AssessmentRunState::START_EVALUATING_RULES_PENDING;
}
else if (hashCode == EVALUATING_RULES_HASH)
{
return AssessmentRunState::EVALUATING_RULES;
}
else if (hashCode == FAILED_HASH)
{
return AssessmentRunState::FAILED;
}
else if (hashCode == ERROR__HASH)
{
return AssessmentRunState::ERROR_;
}
else if (hashCode == COMPLETED_HASH)
{
return AssessmentRunState::COMPLETED;
}
else if (hashCode == COMPLETED_WITH_ERRORS_HASH)
{
return AssessmentRunState::COMPLETED_WITH_ERRORS;
}
else if (hashCode == CANCELED_HASH)
{
return AssessmentRunState::CANCELED;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<AssessmentRunState>(hashCode);
}
return AssessmentRunState::NOT_SET;
}
Aws::String GetNameForAssessmentRunState(AssessmentRunState enumValue)
{
switch(enumValue)
{
case AssessmentRunState::CREATED:
return "CREATED";
case AssessmentRunState::START_DATA_COLLECTION_PENDING:
return "START_DATA_COLLECTION_PENDING";
case AssessmentRunState::START_DATA_COLLECTION_IN_PROGRESS:
return "START_DATA_COLLECTION_IN_PROGRESS";
case AssessmentRunState::COLLECTING_DATA:
return "COLLECTING_DATA";
case AssessmentRunState::STOP_DATA_COLLECTION_PENDING:
return "STOP_DATA_COLLECTION_PENDING";
case AssessmentRunState::DATA_COLLECTED:
return "DATA_COLLECTED";
case AssessmentRunState::START_EVALUATING_RULES_PENDING:
return "START_EVALUATING_RULES_PENDING";
case AssessmentRunState::EVALUATING_RULES:
return "EVALUATING_RULES";
case AssessmentRunState::FAILED:
return "FAILED";
case AssessmentRunState::ERROR_:
return "ERROR";
case AssessmentRunState::COMPLETED:
return "COMPLETED";
case AssessmentRunState::COMPLETED_WITH_ERRORS:
return "COMPLETED_WITH_ERRORS";
case AssessmentRunState::CANCELED:
return "CANCELED";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace AssessmentRunStateMapper
} // namespace Model
} // namespace Inspector
} // namespace Aws

View File

@@ -0,0 +1,74 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/AssessmentRunStateChange.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Inspector
{
namespace Model
{
AssessmentRunStateChange::AssessmentRunStateChange() :
m_stateChangedAtHasBeenSet(false),
m_state(AssessmentRunState::NOT_SET),
m_stateHasBeenSet(false)
{
}
AssessmentRunStateChange::AssessmentRunStateChange(JsonView jsonValue) :
m_stateChangedAtHasBeenSet(false),
m_state(AssessmentRunState::NOT_SET),
m_stateHasBeenSet(false)
{
*this = jsonValue;
}
AssessmentRunStateChange& AssessmentRunStateChange::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("stateChangedAt"))
{
m_stateChangedAt = jsonValue.GetDouble("stateChangedAt");
m_stateChangedAtHasBeenSet = true;
}
if(jsonValue.ValueExists("state"))
{
m_state = AssessmentRunStateMapper::GetAssessmentRunStateForName(jsonValue.GetString("state"));
m_stateHasBeenSet = true;
}
return *this;
}
JsonValue AssessmentRunStateChange::Jsonize() const
{
JsonValue payload;
if(m_stateChangedAtHasBeenSet)
{
payload.WithDouble("stateChangedAt", m_stateChangedAt.SecondsWithMSPrecision());
}
if(m_stateHasBeenSet)
{
payload.WithString("state", AssessmentRunStateMapper::GetNameForAssessmentRunState(m_state));
}
return payload;
}
} // namespace Model
} // namespace Inspector
} // namespace Aws

View File

@@ -0,0 +1,117 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/AssessmentTarget.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Inspector
{
namespace Model
{
AssessmentTarget::AssessmentTarget() :
m_arnHasBeenSet(false),
m_nameHasBeenSet(false),
m_resourceGroupArnHasBeenSet(false),
m_createdAtHasBeenSet(false),
m_updatedAtHasBeenSet(false)
{
}
AssessmentTarget::AssessmentTarget(JsonView jsonValue) :
m_arnHasBeenSet(false),
m_nameHasBeenSet(false),
m_resourceGroupArnHasBeenSet(false),
m_createdAtHasBeenSet(false),
m_updatedAtHasBeenSet(false)
{
*this = jsonValue;
}
AssessmentTarget& AssessmentTarget::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("arn"))
{
m_arn = jsonValue.GetString("arn");
m_arnHasBeenSet = true;
}
if(jsonValue.ValueExists("name"))
{
m_name = jsonValue.GetString("name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("resourceGroupArn"))
{
m_resourceGroupArn = jsonValue.GetString("resourceGroupArn");
m_resourceGroupArnHasBeenSet = true;
}
if(jsonValue.ValueExists("createdAt"))
{
m_createdAt = jsonValue.GetDouble("createdAt");
m_createdAtHasBeenSet = true;
}
if(jsonValue.ValueExists("updatedAt"))
{
m_updatedAt = jsonValue.GetDouble("updatedAt");
m_updatedAtHasBeenSet = true;
}
return *this;
}
JsonValue AssessmentTarget::Jsonize() const
{
JsonValue payload;
if(m_arnHasBeenSet)
{
payload.WithString("arn", m_arn);
}
if(m_nameHasBeenSet)
{
payload.WithString("name", m_name);
}
if(m_resourceGroupArnHasBeenSet)
{
payload.WithString("resourceGroupArn", m_resourceGroupArn);
}
if(m_createdAtHasBeenSet)
{
payload.WithDouble("createdAt", m_createdAt.SecondsWithMSPrecision());
}
if(m_updatedAtHasBeenSet)
{
payload.WithDouble("updatedAt", m_updatedAt.SecondsWithMSPrecision());
}
return payload;
}
} // namespace Model
} // namespace Inspector
} // namespace Aws

View File

@@ -0,0 +1,59 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/AssessmentTargetFilter.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Inspector
{
namespace Model
{
AssessmentTargetFilter::AssessmentTargetFilter() :
m_assessmentTargetNamePatternHasBeenSet(false)
{
}
AssessmentTargetFilter::AssessmentTargetFilter(JsonView jsonValue) :
m_assessmentTargetNamePatternHasBeenSet(false)
{
*this = jsonValue;
}
AssessmentTargetFilter& AssessmentTargetFilter::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("assessmentTargetNamePattern"))
{
m_assessmentTargetNamePattern = jsonValue.GetString("assessmentTargetNamePattern");
m_assessmentTargetNamePatternHasBeenSet = true;
}
return *this;
}
JsonValue AssessmentTargetFilter::Jsonize() const
{
JsonValue payload;
if(m_assessmentTargetNamePatternHasBeenSet)
{
payload.WithString("assessmentTargetNamePattern", m_assessmentTargetNamePattern);
}
return payload;
}
} // namespace Model
} // namespace Inspector
} // namespace Aws

View File

@@ -0,0 +1,198 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/AssessmentTemplate.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Inspector
{
namespace Model
{
AssessmentTemplate::AssessmentTemplate() :
m_arnHasBeenSet(false),
m_nameHasBeenSet(false),
m_assessmentTargetArnHasBeenSet(false),
m_durationInSeconds(0),
m_durationInSecondsHasBeenSet(false),
m_rulesPackageArnsHasBeenSet(false),
m_userAttributesForFindingsHasBeenSet(false),
m_lastAssessmentRunArnHasBeenSet(false),
m_assessmentRunCount(0),
m_assessmentRunCountHasBeenSet(false),
m_createdAtHasBeenSet(false)
{
}
AssessmentTemplate::AssessmentTemplate(JsonView jsonValue) :
m_arnHasBeenSet(false),
m_nameHasBeenSet(false),
m_assessmentTargetArnHasBeenSet(false),
m_durationInSeconds(0),
m_durationInSecondsHasBeenSet(false),
m_rulesPackageArnsHasBeenSet(false),
m_userAttributesForFindingsHasBeenSet(false),
m_lastAssessmentRunArnHasBeenSet(false),
m_assessmentRunCount(0),
m_assessmentRunCountHasBeenSet(false),
m_createdAtHasBeenSet(false)
{
*this = jsonValue;
}
AssessmentTemplate& AssessmentTemplate::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("arn"))
{
m_arn = jsonValue.GetString("arn");
m_arnHasBeenSet = true;
}
if(jsonValue.ValueExists("name"))
{
m_name = jsonValue.GetString("name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("assessmentTargetArn"))
{
m_assessmentTargetArn = jsonValue.GetString("assessmentTargetArn");
m_assessmentTargetArnHasBeenSet = true;
}
if(jsonValue.ValueExists("durationInSeconds"))
{
m_durationInSeconds = jsonValue.GetInteger("durationInSeconds");
m_durationInSecondsHasBeenSet = true;
}
if(jsonValue.ValueExists("rulesPackageArns"))
{
Array<JsonView> rulesPackageArnsJsonList = jsonValue.GetArray("rulesPackageArns");
for(unsigned rulesPackageArnsIndex = 0; rulesPackageArnsIndex < rulesPackageArnsJsonList.GetLength(); ++rulesPackageArnsIndex)
{
m_rulesPackageArns.push_back(rulesPackageArnsJsonList[rulesPackageArnsIndex].AsString());
}
m_rulesPackageArnsHasBeenSet = true;
}
if(jsonValue.ValueExists("userAttributesForFindings"))
{
Array<JsonView> userAttributesForFindingsJsonList = jsonValue.GetArray("userAttributesForFindings");
for(unsigned userAttributesForFindingsIndex = 0; userAttributesForFindingsIndex < userAttributesForFindingsJsonList.GetLength(); ++userAttributesForFindingsIndex)
{
m_userAttributesForFindings.push_back(userAttributesForFindingsJsonList[userAttributesForFindingsIndex].AsObject());
}
m_userAttributesForFindingsHasBeenSet = true;
}
if(jsonValue.ValueExists("lastAssessmentRunArn"))
{
m_lastAssessmentRunArn = jsonValue.GetString("lastAssessmentRunArn");
m_lastAssessmentRunArnHasBeenSet = true;
}
if(jsonValue.ValueExists("assessmentRunCount"))
{
m_assessmentRunCount = jsonValue.GetInteger("assessmentRunCount");
m_assessmentRunCountHasBeenSet = true;
}
if(jsonValue.ValueExists("createdAt"))
{
m_createdAt = jsonValue.GetDouble("createdAt");
m_createdAtHasBeenSet = true;
}
return *this;
}
JsonValue AssessmentTemplate::Jsonize() const
{
JsonValue payload;
if(m_arnHasBeenSet)
{
payload.WithString("arn", m_arn);
}
if(m_nameHasBeenSet)
{
payload.WithString("name", m_name);
}
if(m_assessmentTargetArnHasBeenSet)
{
payload.WithString("assessmentTargetArn", m_assessmentTargetArn);
}
if(m_durationInSecondsHasBeenSet)
{
payload.WithInteger("durationInSeconds", m_durationInSeconds);
}
if(m_rulesPackageArnsHasBeenSet)
{
Array<JsonValue> rulesPackageArnsJsonList(m_rulesPackageArns.size());
for(unsigned rulesPackageArnsIndex = 0; rulesPackageArnsIndex < rulesPackageArnsJsonList.GetLength(); ++rulesPackageArnsIndex)
{
rulesPackageArnsJsonList[rulesPackageArnsIndex].AsString(m_rulesPackageArns[rulesPackageArnsIndex]);
}
payload.WithArray("rulesPackageArns", std::move(rulesPackageArnsJsonList));
}
if(m_userAttributesForFindingsHasBeenSet)
{
Array<JsonValue> userAttributesForFindingsJsonList(m_userAttributesForFindings.size());
for(unsigned userAttributesForFindingsIndex = 0; userAttributesForFindingsIndex < userAttributesForFindingsJsonList.GetLength(); ++userAttributesForFindingsIndex)
{
userAttributesForFindingsJsonList[userAttributesForFindingsIndex].AsObject(m_userAttributesForFindings[userAttributesForFindingsIndex].Jsonize());
}
payload.WithArray("userAttributesForFindings", std::move(userAttributesForFindingsJsonList));
}
if(m_lastAssessmentRunArnHasBeenSet)
{
payload.WithString("lastAssessmentRunArn", m_lastAssessmentRunArn);
}
if(m_assessmentRunCountHasBeenSet)
{
payload.WithInteger("assessmentRunCount", m_assessmentRunCount);
}
if(m_createdAtHasBeenSet)
{
payload.WithDouble("createdAt", m_createdAt.SecondsWithMSPrecision());
}
return payload;
}
} // namespace Model
} // namespace Inspector
} // namespace Aws

View File

@@ -0,0 +1,97 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/AssessmentTemplateFilter.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Inspector
{
namespace Model
{
AssessmentTemplateFilter::AssessmentTemplateFilter() :
m_namePatternHasBeenSet(false),
m_durationRangeHasBeenSet(false),
m_rulesPackageArnsHasBeenSet(false)
{
}
AssessmentTemplateFilter::AssessmentTemplateFilter(JsonView jsonValue) :
m_namePatternHasBeenSet(false),
m_durationRangeHasBeenSet(false),
m_rulesPackageArnsHasBeenSet(false)
{
*this = jsonValue;
}
AssessmentTemplateFilter& AssessmentTemplateFilter::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("namePattern"))
{
m_namePattern = jsonValue.GetString("namePattern");
m_namePatternHasBeenSet = true;
}
if(jsonValue.ValueExists("durationRange"))
{
m_durationRange = jsonValue.GetObject("durationRange");
m_durationRangeHasBeenSet = true;
}
if(jsonValue.ValueExists("rulesPackageArns"))
{
Array<JsonView> rulesPackageArnsJsonList = jsonValue.GetArray("rulesPackageArns");
for(unsigned rulesPackageArnsIndex = 0; rulesPackageArnsIndex < rulesPackageArnsJsonList.GetLength(); ++rulesPackageArnsIndex)
{
m_rulesPackageArns.push_back(rulesPackageArnsJsonList[rulesPackageArnsIndex].AsString());
}
m_rulesPackageArnsHasBeenSet = true;
}
return *this;
}
JsonValue AssessmentTemplateFilter::Jsonize() const
{
JsonValue payload;
if(m_namePatternHasBeenSet)
{
payload.WithString("namePattern", m_namePattern);
}
if(m_durationRangeHasBeenSet)
{
payload.WithObject("durationRange", m_durationRange.Jsonize());
}
if(m_rulesPackageArnsHasBeenSet)
{
Array<JsonValue> rulesPackageArnsJsonList(m_rulesPackageArns.size());
for(unsigned rulesPackageArnsIndex = 0; rulesPackageArnsIndex < rulesPackageArnsJsonList.GetLength(); ++rulesPackageArnsIndex)
{
rulesPackageArnsJsonList[rulesPackageArnsIndex].AsString(m_rulesPackageArns[rulesPackageArnsIndex]);
}
payload.WithArray("rulesPackageArns", std::move(rulesPackageArnsJsonList));
}
return payload;
}
} // namespace Model
} // namespace Inspector
} // namespace Aws

View File

@@ -0,0 +1,190 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/AssetAttributes.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Inspector
{
namespace Model
{
AssetAttributes::AssetAttributes() :
m_schemaVersion(0),
m_schemaVersionHasBeenSet(false),
m_agentIdHasBeenSet(false),
m_autoScalingGroupHasBeenSet(false),
m_amiIdHasBeenSet(false),
m_hostnameHasBeenSet(false),
m_ipv4AddressesHasBeenSet(false),
m_tagsHasBeenSet(false),
m_networkInterfacesHasBeenSet(false)
{
}
AssetAttributes::AssetAttributes(JsonView jsonValue) :
m_schemaVersion(0),
m_schemaVersionHasBeenSet(false),
m_agentIdHasBeenSet(false),
m_autoScalingGroupHasBeenSet(false),
m_amiIdHasBeenSet(false),
m_hostnameHasBeenSet(false),
m_ipv4AddressesHasBeenSet(false),
m_tagsHasBeenSet(false),
m_networkInterfacesHasBeenSet(false)
{
*this = jsonValue;
}
AssetAttributes& AssetAttributes::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("schemaVersion"))
{
m_schemaVersion = jsonValue.GetInteger("schemaVersion");
m_schemaVersionHasBeenSet = true;
}
if(jsonValue.ValueExists("agentId"))
{
m_agentId = jsonValue.GetString("agentId");
m_agentIdHasBeenSet = true;
}
if(jsonValue.ValueExists("autoScalingGroup"))
{
m_autoScalingGroup = jsonValue.GetString("autoScalingGroup");
m_autoScalingGroupHasBeenSet = true;
}
if(jsonValue.ValueExists("amiId"))
{
m_amiId = jsonValue.GetString("amiId");
m_amiIdHasBeenSet = true;
}
if(jsonValue.ValueExists("hostname"))
{
m_hostname = jsonValue.GetString("hostname");
m_hostnameHasBeenSet = true;
}
if(jsonValue.ValueExists("ipv4Addresses"))
{
Array<JsonView> ipv4AddressesJsonList = jsonValue.GetArray("ipv4Addresses");
for(unsigned ipv4AddressesIndex = 0; ipv4AddressesIndex < ipv4AddressesJsonList.GetLength(); ++ipv4AddressesIndex)
{
m_ipv4Addresses.push_back(ipv4AddressesJsonList[ipv4AddressesIndex].AsString());
}
m_ipv4AddressesHasBeenSet = true;
}
if(jsonValue.ValueExists("tags"))
{
Array<JsonView> tagsJsonList = jsonValue.GetArray("tags");
for(unsigned tagsIndex = 0; tagsIndex < tagsJsonList.GetLength(); ++tagsIndex)
{
m_tags.push_back(tagsJsonList[tagsIndex].AsObject());
}
m_tagsHasBeenSet = true;
}
if(jsonValue.ValueExists("networkInterfaces"))
{
Array<JsonView> networkInterfacesJsonList = jsonValue.GetArray("networkInterfaces");
for(unsigned networkInterfacesIndex = 0; networkInterfacesIndex < networkInterfacesJsonList.GetLength(); ++networkInterfacesIndex)
{
m_networkInterfaces.push_back(networkInterfacesJsonList[networkInterfacesIndex].AsObject());
}
m_networkInterfacesHasBeenSet = true;
}
return *this;
}
JsonValue AssetAttributes::Jsonize() const
{
JsonValue payload;
if(m_schemaVersionHasBeenSet)
{
payload.WithInteger("schemaVersion", m_schemaVersion);
}
if(m_agentIdHasBeenSet)
{
payload.WithString("agentId", m_agentId);
}
if(m_autoScalingGroupHasBeenSet)
{
payload.WithString("autoScalingGroup", m_autoScalingGroup);
}
if(m_amiIdHasBeenSet)
{
payload.WithString("amiId", m_amiId);
}
if(m_hostnameHasBeenSet)
{
payload.WithString("hostname", m_hostname);
}
if(m_ipv4AddressesHasBeenSet)
{
Array<JsonValue> ipv4AddressesJsonList(m_ipv4Addresses.size());
for(unsigned ipv4AddressesIndex = 0; ipv4AddressesIndex < ipv4AddressesJsonList.GetLength(); ++ipv4AddressesIndex)
{
ipv4AddressesJsonList[ipv4AddressesIndex].AsString(m_ipv4Addresses[ipv4AddressesIndex]);
}
payload.WithArray("ipv4Addresses", std::move(ipv4AddressesJsonList));
}
if(m_tagsHasBeenSet)
{
Array<JsonValue> tagsJsonList(m_tags.size());
for(unsigned tagsIndex = 0; tagsIndex < tagsJsonList.GetLength(); ++tagsIndex)
{
tagsJsonList[tagsIndex].AsObject(m_tags[tagsIndex].Jsonize());
}
payload.WithArray("tags", std::move(tagsJsonList));
}
if(m_networkInterfacesHasBeenSet)
{
Array<JsonValue> networkInterfacesJsonList(m_networkInterfaces.size());
for(unsigned networkInterfacesIndex = 0; networkInterfacesIndex < networkInterfacesJsonList.GetLength(); ++networkInterfacesIndex)
{
networkInterfacesJsonList[networkInterfacesIndex].AsObject(m_networkInterfaces[networkInterfacesIndex].Jsonize());
}
payload.WithArray("networkInterfaces", std::move(networkInterfacesJsonList));
}
return payload;
}
} // namespace Model
} // namespace Inspector
} // namespace Aws

View File

@@ -0,0 +1,63 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/AssetType.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace Inspector
{
namespace Model
{
namespace AssetTypeMapper
{
static const int ec2_instance_HASH = HashingUtils::HashString("ec2-instance");
AssetType GetAssetTypeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == ec2_instance_HASH)
{
return AssetType::ec2_instance;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<AssetType>(hashCode);
}
return AssetType::NOT_SET;
}
Aws::String GetNameForAssetType(AssetType enumValue)
{
switch(enumValue)
{
case AssetType::ec2_instance:
return "ec2-instance";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace AssetTypeMapper
} // namespace Model
} // namespace Inspector
} // namespace Aws

View File

@@ -0,0 +1,74 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/Attribute.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Inspector
{
namespace Model
{
Attribute::Attribute() :
m_keyHasBeenSet(false),
m_valueHasBeenSet(false)
{
}
Attribute::Attribute(JsonView jsonValue) :
m_keyHasBeenSet(false),
m_valueHasBeenSet(false)
{
*this = jsonValue;
}
Attribute& Attribute::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("key"))
{
m_key = jsonValue.GetString("key");
m_keyHasBeenSet = true;
}
if(jsonValue.ValueExists("value"))
{
m_value = jsonValue.GetString("value");
m_valueHasBeenSet = true;
}
return *this;
}
JsonValue Attribute::Jsonize() const
{
JsonValue payload;
if(m_keyHasBeenSet)
{
payload.WithString("key", m_key);
}
if(m_valueHasBeenSet)
{
payload.WithString("value", m_value);
}
return payload;
}
} // namespace Model
} // namespace Inspector
} // namespace Aws

View File

@@ -0,0 +1,50 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/CreateAssessmentTargetRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateAssessmentTargetRequest::CreateAssessmentTargetRequest() :
m_assessmentTargetNameHasBeenSet(false),
m_resourceGroupArnHasBeenSet(false)
{
}
Aws::String CreateAssessmentTargetRequest::SerializePayload() const
{
JsonValue payload;
if(m_assessmentTargetNameHasBeenSet)
{
payload.WithString("assessmentTargetName", m_assessmentTargetName);
}
if(m_resourceGroupArnHasBeenSet)
{
payload.WithString("resourceGroupArn", m_resourceGroupArn);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CreateAssessmentTargetRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "InspectorService.CreateAssessmentTarget"));
return headers;
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/CreateAssessmentTargetResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateAssessmentTargetResult::CreateAssessmentTargetResult()
{
}
CreateAssessmentTargetResult::CreateAssessmentTargetResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreateAssessmentTargetResult& CreateAssessmentTargetResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("assessmentTargetArn"))
{
m_assessmentTargetArn = jsonValue.GetString("assessmentTargetArn");
}
return *this;
}

View File

@@ -0,0 +1,82 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/CreateAssessmentTemplateRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateAssessmentTemplateRequest::CreateAssessmentTemplateRequest() :
m_assessmentTargetArnHasBeenSet(false),
m_assessmentTemplateNameHasBeenSet(false),
m_durationInSeconds(0),
m_durationInSecondsHasBeenSet(false),
m_rulesPackageArnsHasBeenSet(false),
m_userAttributesForFindingsHasBeenSet(false)
{
}
Aws::String CreateAssessmentTemplateRequest::SerializePayload() const
{
JsonValue payload;
if(m_assessmentTargetArnHasBeenSet)
{
payload.WithString("assessmentTargetArn", m_assessmentTargetArn);
}
if(m_assessmentTemplateNameHasBeenSet)
{
payload.WithString("assessmentTemplateName", m_assessmentTemplateName);
}
if(m_durationInSecondsHasBeenSet)
{
payload.WithInteger("durationInSeconds", m_durationInSeconds);
}
if(m_rulesPackageArnsHasBeenSet)
{
Array<JsonValue> rulesPackageArnsJsonList(m_rulesPackageArns.size());
for(unsigned rulesPackageArnsIndex = 0; rulesPackageArnsIndex < rulesPackageArnsJsonList.GetLength(); ++rulesPackageArnsIndex)
{
rulesPackageArnsJsonList[rulesPackageArnsIndex].AsString(m_rulesPackageArns[rulesPackageArnsIndex]);
}
payload.WithArray("rulesPackageArns", std::move(rulesPackageArnsJsonList));
}
if(m_userAttributesForFindingsHasBeenSet)
{
Array<JsonValue> userAttributesForFindingsJsonList(m_userAttributesForFindings.size());
for(unsigned userAttributesForFindingsIndex = 0; userAttributesForFindingsIndex < userAttributesForFindingsJsonList.GetLength(); ++userAttributesForFindingsIndex)
{
userAttributesForFindingsJsonList[userAttributesForFindingsIndex].AsObject(m_userAttributesForFindings[userAttributesForFindingsIndex].Jsonize());
}
payload.WithArray("userAttributesForFindings", std::move(userAttributesForFindingsJsonList));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CreateAssessmentTemplateRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "InspectorService.CreateAssessmentTemplate"));
return headers;
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/CreateAssessmentTemplateResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateAssessmentTemplateResult::CreateAssessmentTemplateResult()
{
}
CreateAssessmentTemplateResult::CreateAssessmentTemplateResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreateAssessmentTemplateResult& CreateAssessmentTemplateResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("assessmentTemplateArn"))
{
m_assessmentTemplateArn = jsonValue.GetString("assessmentTemplateArn");
}
return *this;
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/CreateExclusionsPreviewRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateExclusionsPreviewRequest::CreateExclusionsPreviewRequest() :
m_assessmentTemplateArnHasBeenSet(false)
{
}
Aws::String CreateExclusionsPreviewRequest::SerializePayload() const
{
JsonValue payload;
if(m_assessmentTemplateArnHasBeenSet)
{
payload.WithString("assessmentTemplateArn", m_assessmentTemplateArn);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CreateExclusionsPreviewRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "InspectorService.CreateExclusionsPreview"));
return headers;
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/CreateExclusionsPreviewResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateExclusionsPreviewResult::CreateExclusionsPreviewResult()
{
}
CreateExclusionsPreviewResult::CreateExclusionsPreviewResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreateExclusionsPreviewResult& CreateExclusionsPreviewResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("previewToken"))
{
m_previewToken = jsonValue.GetString("previewToken");
}
return *this;
}

View File

@@ -0,0 +1,48 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/CreateResourceGroupRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateResourceGroupRequest::CreateResourceGroupRequest() :
m_resourceGroupTagsHasBeenSet(false)
{
}
Aws::String CreateResourceGroupRequest::SerializePayload() const
{
JsonValue payload;
if(m_resourceGroupTagsHasBeenSet)
{
Array<JsonValue> resourceGroupTagsJsonList(m_resourceGroupTags.size());
for(unsigned resourceGroupTagsIndex = 0; resourceGroupTagsIndex < resourceGroupTagsJsonList.GetLength(); ++resourceGroupTagsIndex)
{
resourceGroupTagsJsonList[resourceGroupTagsIndex].AsObject(m_resourceGroupTags[resourceGroupTagsIndex].Jsonize());
}
payload.WithArray("resourceGroupTags", std::move(resourceGroupTagsJsonList));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CreateResourceGroupRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "InspectorService.CreateResourceGroup"));
return headers;
}

View File

@@ -0,0 +1,40 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/CreateResourceGroupResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateResourceGroupResult::CreateResourceGroupResult()
{
}
CreateResourceGroupResult::CreateResourceGroupResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreateResourceGroupResult& CreateResourceGroupResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("resourceGroupArn"))
{
m_resourceGroupArn = jsonValue.GetString("resourceGroupArn");
}
return *this;
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/DeleteAssessmentRunRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeleteAssessmentRunRequest::DeleteAssessmentRunRequest() :
m_assessmentRunArnHasBeenSet(false)
{
}
Aws::String DeleteAssessmentRunRequest::SerializePayload() const
{
JsonValue payload;
if(m_assessmentRunArnHasBeenSet)
{
payload.WithString("assessmentRunArn", m_assessmentRunArn);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DeleteAssessmentRunRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "InspectorService.DeleteAssessmentRun"));
return headers;
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/DeleteAssessmentTargetRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeleteAssessmentTargetRequest::DeleteAssessmentTargetRequest() :
m_assessmentTargetArnHasBeenSet(false)
{
}
Aws::String DeleteAssessmentTargetRequest::SerializePayload() const
{
JsonValue payload;
if(m_assessmentTargetArnHasBeenSet)
{
payload.WithString("assessmentTargetArn", m_assessmentTargetArn);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DeleteAssessmentTargetRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "InspectorService.DeleteAssessmentTarget"));
return headers;
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/DeleteAssessmentTemplateRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeleteAssessmentTemplateRequest::DeleteAssessmentTemplateRequest() :
m_assessmentTemplateArnHasBeenSet(false)
{
}
Aws::String DeleteAssessmentTemplateRequest::SerializePayload() const
{
JsonValue payload;
if(m_assessmentTemplateArnHasBeenSet)
{
payload.WithString("assessmentTemplateArn", m_assessmentTemplateArn);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DeleteAssessmentTemplateRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "InspectorService.DeleteAssessmentTemplate"));
return headers;
}

View File

@@ -0,0 +1,48 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/DescribeAssessmentRunsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DescribeAssessmentRunsRequest::DescribeAssessmentRunsRequest() :
m_assessmentRunArnsHasBeenSet(false)
{
}
Aws::String DescribeAssessmentRunsRequest::SerializePayload() const
{
JsonValue payload;
if(m_assessmentRunArnsHasBeenSet)
{
Array<JsonValue> assessmentRunArnsJsonList(m_assessmentRunArns.size());
for(unsigned assessmentRunArnsIndex = 0; assessmentRunArnsIndex < assessmentRunArnsJsonList.GetLength(); ++assessmentRunArnsIndex)
{
assessmentRunArnsJsonList[assessmentRunArnsIndex].AsString(m_assessmentRunArns[assessmentRunArnsIndex]);
}
payload.WithArray("assessmentRunArns", std::move(assessmentRunArnsJsonList));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DescribeAssessmentRunsRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "InspectorService.DescribeAssessmentRuns"));
return headers;
}

View File

@@ -0,0 +1,52 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/DescribeAssessmentRunsResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DescribeAssessmentRunsResult::DescribeAssessmentRunsResult()
{
}
DescribeAssessmentRunsResult::DescribeAssessmentRunsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DescribeAssessmentRunsResult& DescribeAssessmentRunsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("assessmentRuns"))
{
Array<JsonView> assessmentRunsJsonList = jsonValue.GetArray("assessmentRuns");
for(unsigned assessmentRunsIndex = 0; assessmentRunsIndex < assessmentRunsJsonList.GetLength(); ++assessmentRunsIndex)
{
m_assessmentRuns.push_back(assessmentRunsJsonList[assessmentRunsIndex].AsObject());
}
}
if(jsonValue.ValueExists("failedItems"))
{
Aws::Map<Aws::String, JsonView> failedItemsJsonMap = jsonValue.GetObject("failedItems").GetAllObjects();
for(auto& failedItemsItem : failedItemsJsonMap)
{
m_failedItems[failedItemsItem.first] = failedItemsItem.second.AsObject();
}
}
return *this;
}

View File

@@ -0,0 +1,48 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/DescribeAssessmentTargetsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DescribeAssessmentTargetsRequest::DescribeAssessmentTargetsRequest() :
m_assessmentTargetArnsHasBeenSet(false)
{
}
Aws::String DescribeAssessmentTargetsRequest::SerializePayload() const
{
JsonValue payload;
if(m_assessmentTargetArnsHasBeenSet)
{
Array<JsonValue> assessmentTargetArnsJsonList(m_assessmentTargetArns.size());
for(unsigned assessmentTargetArnsIndex = 0; assessmentTargetArnsIndex < assessmentTargetArnsJsonList.GetLength(); ++assessmentTargetArnsIndex)
{
assessmentTargetArnsJsonList[assessmentTargetArnsIndex].AsString(m_assessmentTargetArns[assessmentTargetArnsIndex]);
}
payload.WithArray("assessmentTargetArns", std::move(assessmentTargetArnsJsonList));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DescribeAssessmentTargetsRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "InspectorService.DescribeAssessmentTargets"));
return headers;
}

View File

@@ -0,0 +1,52 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/DescribeAssessmentTargetsResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DescribeAssessmentTargetsResult::DescribeAssessmentTargetsResult()
{
}
DescribeAssessmentTargetsResult::DescribeAssessmentTargetsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DescribeAssessmentTargetsResult& DescribeAssessmentTargetsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("assessmentTargets"))
{
Array<JsonView> assessmentTargetsJsonList = jsonValue.GetArray("assessmentTargets");
for(unsigned assessmentTargetsIndex = 0; assessmentTargetsIndex < assessmentTargetsJsonList.GetLength(); ++assessmentTargetsIndex)
{
m_assessmentTargets.push_back(assessmentTargetsJsonList[assessmentTargetsIndex].AsObject());
}
}
if(jsonValue.ValueExists("failedItems"))
{
Aws::Map<Aws::String, JsonView> failedItemsJsonMap = jsonValue.GetObject("failedItems").GetAllObjects();
for(auto& failedItemsItem : failedItemsJsonMap)
{
m_failedItems[failedItemsItem.first] = failedItemsItem.second.AsObject();
}
}
return *this;
}

View File

@@ -0,0 +1,48 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/DescribeAssessmentTemplatesRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DescribeAssessmentTemplatesRequest::DescribeAssessmentTemplatesRequest() :
m_assessmentTemplateArnsHasBeenSet(false)
{
}
Aws::String DescribeAssessmentTemplatesRequest::SerializePayload() const
{
JsonValue payload;
if(m_assessmentTemplateArnsHasBeenSet)
{
Array<JsonValue> assessmentTemplateArnsJsonList(m_assessmentTemplateArns.size());
for(unsigned assessmentTemplateArnsIndex = 0; assessmentTemplateArnsIndex < assessmentTemplateArnsJsonList.GetLength(); ++assessmentTemplateArnsIndex)
{
assessmentTemplateArnsJsonList[assessmentTemplateArnsIndex].AsString(m_assessmentTemplateArns[assessmentTemplateArnsIndex]);
}
payload.WithArray("assessmentTemplateArns", std::move(assessmentTemplateArnsJsonList));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DescribeAssessmentTemplatesRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "InspectorService.DescribeAssessmentTemplates"));
return headers;
}

View File

@@ -0,0 +1,52 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/DescribeAssessmentTemplatesResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DescribeAssessmentTemplatesResult::DescribeAssessmentTemplatesResult()
{
}
DescribeAssessmentTemplatesResult::DescribeAssessmentTemplatesResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DescribeAssessmentTemplatesResult& DescribeAssessmentTemplatesResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("assessmentTemplates"))
{
Array<JsonView> assessmentTemplatesJsonList = jsonValue.GetArray("assessmentTemplates");
for(unsigned assessmentTemplatesIndex = 0; assessmentTemplatesIndex < assessmentTemplatesJsonList.GetLength(); ++assessmentTemplatesIndex)
{
m_assessmentTemplates.push_back(assessmentTemplatesJsonList[assessmentTemplatesIndex].AsObject());
}
}
if(jsonValue.ValueExists("failedItems"))
{
Aws::Map<Aws::String, JsonView> failedItemsJsonMap = jsonValue.GetObject("failedItems").GetAllObjects();
for(auto& failedItemsItem : failedItemsJsonMap)
{
m_failedItems[failedItemsItem.first] = failedItemsItem.second.AsObject();
}
}
return *this;
}

View File

@@ -0,0 +1,54 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/DescribeCrossAccountAccessRoleResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DescribeCrossAccountAccessRoleResult::DescribeCrossAccountAccessRoleResult() :
m_valid(false)
{
}
DescribeCrossAccountAccessRoleResult::DescribeCrossAccountAccessRoleResult(const Aws::AmazonWebServiceResult<JsonValue>& result) :
m_valid(false)
{
*this = result;
}
DescribeCrossAccountAccessRoleResult& DescribeCrossAccountAccessRoleResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("roleArn"))
{
m_roleArn = jsonValue.GetString("roleArn");
}
if(jsonValue.ValueExists("valid"))
{
m_valid = jsonValue.GetBool("valid");
}
if(jsonValue.ValueExists("registeredAt"))
{
m_registeredAt = jsonValue.GetDouble("registeredAt");
}
return *this;
}

View File

@@ -0,0 +1,55 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/DescribeExclusionsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DescribeExclusionsRequest::DescribeExclusionsRequest() :
m_exclusionArnsHasBeenSet(false),
m_locale(Locale::NOT_SET),
m_localeHasBeenSet(false)
{
}
Aws::String DescribeExclusionsRequest::SerializePayload() const
{
JsonValue payload;
if(m_exclusionArnsHasBeenSet)
{
Array<JsonValue> exclusionArnsJsonList(m_exclusionArns.size());
for(unsigned exclusionArnsIndex = 0; exclusionArnsIndex < exclusionArnsJsonList.GetLength(); ++exclusionArnsIndex)
{
exclusionArnsJsonList[exclusionArnsIndex].AsString(m_exclusionArns[exclusionArnsIndex]);
}
payload.WithArray("exclusionArns", std::move(exclusionArnsJsonList));
}
if(m_localeHasBeenSet)
{
payload.WithString("locale", LocaleMapper::GetNameForLocale(m_locale));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DescribeExclusionsRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "InspectorService.DescribeExclusions"));
return headers;
}

View File

@@ -0,0 +1,52 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/DescribeExclusionsResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DescribeExclusionsResult::DescribeExclusionsResult()
{
}
DescribeExclusionsResult::DescribeExclusionsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DescribeExclusionsResult& DescribeExclusionsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("exclusions"))
{
Aws::Map<Aws::String, JsonView> exclusionsJsonMap = jsonValue.GetObject("exclusions").GetAllObjects();
for(auto& exclusionsItem : exclusionsJsonMap)
{
m_exclusions[exclusionsItem.first] = exclusionsItem.second.AsObject();
}
}
if(jsonValue.ValueExists("failedItems"))
{
Aws::Map<Aws::String, JsonView> failedItemsJsonMap = jsonValue.GetObject("failedItems").GetAllObjects();
for(auto& failedItemsItem : failedItemsJsonMap)
{
m_failedItems[failedItemsItem.first] = failedItemsItem.second.AsObject();
}
}
return *this;
}

View File

@@ -0,0 +1,55 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/DescribeFindingsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DescribeFindingsRequest::DescribeFindingsRequest() :
m_findingArnsHasBeenSet(false),
m_locale(Locale::NOT_SET),
m_localeHasBeenSet(false)
{
}
Aws::String DescribeFindingsRequest::SerializePayload() const
{
JsonValue payload;
if(m_findingArnsHasBeenSet)
{
Array<JsonValue> findingArnsJsonList(m_findingArns.size());
for(unsigned findingArnsIndex = 0; findingArnsIndex < findingArnsJsonList.GetLength(); ++findingArnsIndex)
{
findingArnsJsonList[findingArnsIndex].AsString(m_findingArns[findingArnsIndex]);
}
payload.WithArray("findingArns", std::move(findingArnsJsonList));
}
if(m_localeHasBeenSet)
{
payload.WithString("locale", LocaleMapper::GetNameForLocale(m_locale));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DescribeFindingsRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "InspectorService.DescribeFindings"));
return headers;
}

View File

@@ -0,0 +1,52 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/DescribeFindingsResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DescribeFindingsResult::DescribeFindingsResult()
{
}
DescribeFindingsResult::DescribeFindingsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DescribeFindingsResult& DescribeFindingsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("findings"))
{
Array<JsonView> findingsJsonList = jsonValue.GetArray("findings");
for(unsigned findingsIndex = 0; findingsIndex < findingsJsonList.GetLength(); ++findingsIndex)
{
m_findings.push_back(findingsJsonList[findingsIndex].AsObject());
}
}
if(jsonValue.ValueExists("failedItems"))
{
Aws::Map<Aws::String, JsonView> failedItemsJsonMap = jsonValue.GetObject("failedItems").GetAllObjects();
for(auto& failedItemsItem : failedItemsJsonMap)
{
m_failedItems[failedItemsItem.first] = failedItemsItem.second.AsObject();
}
}
return *this;
}

View File

@@ -0,0 +1,48 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/DescribeResourceGroupsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DescribeResourceGroupsRequest::DescribeResourceGroupsRequest() :
m_resourceGroupArnsHasBeenSet(false)
{
}
Aws::String DescribeResourceGroupsRequest::SerializePayload() const
{
JsonValue payload;
if(m_resourceGroupArnsHasBeenSet)
{
Array<JsonValue> resourceGroupArnsJsonList(m_resourceGroupArns.size());
for(unsigned resourceGroupArnsIndex = 0; resourceGroupArnsIndex < resourceGroupArnsJsonList.GetLength(); ++resourceGroupArnsIndex)
{
resourceGroupArnsJsonList[resourceGroupArnsIndex].AsString(m_resourceGroupArns[resourceGroupArnsIndex]);
}
payload.WithArray("resourceGroupArns", std::move(resourceGroupArnsJsonList));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DescribeResourceGroupsRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "InspectorService.DescribeResourceGroups"));
return headers;
}

View File

@@ -0,0 +1,52 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/DescribeResourceGroupsResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DescribeResourceGroupsResult::DescribeResourceGroupsResult()
{
}
DescribeResourceGroupsResult::DescribeResourceGroupsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DescribeResourceGroupsResult& DescribeResourceGroupsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("resourceGroups"))
{
Array<JsonView> resourceGroupsJsonList = jsonValue.GetArray("resourceGroups");
for(unsigned resourceGroupsIndex = 0; resourceGroupsIndex < resourceGroupsJsonList.GetLength(); ++resourceGroupsIndex)
{
m_resourceGroups.push_back(resourceGroupsJsonList[resourceGroupsIndex].AsObject());
}
}
if(jsonValue.ValueExists("failedItems"))
{
Aws::Map<Aws::String, JsonView> failedItemsJsonMap = jsonValue.GetObject("failedItems").GetAllObjects();
for(auto& failedItemsItem : failedItemsJsonMap)
{
m_failedItems[failedItemsItem.first] = failedItemsItem.second.AsObject();
}
}
return *this;
}

View File

@@ -0,0 +1,55 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/DescribeRulesPackagesRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DescribeRulesPackagesRequest::DescribeRulesPackagesRequest() :
m_rulesPackageArnsHasBeenSet(false),
m_locale(Locale::NOT_SET),
m_localeHasBeenSet(false)
{
}
Aws::String DescribeRulesPackagesRequest::SerializePayload() const
{
JsonValue payload;
if(m_rulesPackageArnsHasBeenSet)
{
Array<JsonValue> rulesPackageArnsJsonList(m_rulesPackageArns.size());
for(unsigned rulesPackageArnsIndex = 0; rulesPackageArnsIndex < rulesPackageArnsJsonList.GetLength(); ++rulesPackageArnsIndex)
{
rulesPackageArnsJsonList[rulesPackageArnsIndex].AsString(m_rulesPackageArns[rulesPackageArnsIndex]);
}
payload.WithArray("rulesPackageArns", std::move(rulesPackageArnsJsonList));
}
if(m_localeHasBeenSet)
{
payload.WithString("locale", LocaleMapper::GetNameForLocale(m_locale));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DescribeRulesPackagesRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "InspectorService.DescribeRulesPackages"));
return headers;
}

View File

@@ -0,0 +1,52 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/DescribeRulesPackagesResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DescribeRulesPackagesResult::DescribeRulesPackagesResult()
{
}
DescribeRulesPackagesResult::DescribeRulesPackagesResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DescribeRulesPackagesResult& DescribeRulesPackagesResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("rulesPackages"))
{
Array<JsonView> rulesPackagesJsonList = jsonValue.GetArray("rulesPackages");
for(unsigned rulesPackagesIndex = 0; rulesPackagesIndex < rulesPackagesJsonList.GetLength(); ++rulesPackagesIndex)
{
m_rulesPackages.push_back(rulesPackagesJsonList[rulesPackagesIndex].AsObject());
}
}
if(jsonValue.ValueExists("failedItems"))
{
Aws::Map<Aws::String, JsonView> failedItemsJsonMap = jsonValue.GetObject("failedItems").GetAllObjects();
for(auto& failedItemsItem : failedItemsJsonMap)
{
m_failedItems[failedItemsItem.first] = failedItemsItem.second.AsObject();
}
}
return *this;
}

View File

@@ -0,0 +1,78 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/DurationRange.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Inspector
{
namespace Model
{
DurationRange::DurationRange() :
m_minSeconds(0),
m_minSecondsHasBeenSet(false),
m_maxSeconds(0),
m_maxSecondsHasBeenSet(false)
{
}
DurationRange::DurationRange(JsonView jsonValue) :
m_minSeconds(0),
m_minSecondsHasBeenSet(false),
m_maxSeconds(0),
m_maxSecondsHasBeenSet(false)
{
*this = jsonValue;
}
DurationRange& DurationRange::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("minSeconds"))
{
m_minSeconds = jsonValue.GetInteger("minSeconds");
m_minSecondsHasBeenSet = true;
}
if(jsonValue.ValueExists("maxSeconds"))
{
m_maxSeconds = jsonValue.GetInteger("maxSeconds");
m_maxSecondsHasBeenSet = true;
}
return *this;
}
JsonValue DurationRange::Jsonize() const
{
JsonValue payload;
if(m_minSecondsHasBeenSet)
{
payload.WithInteger("minSeconds", m_minSeconds);
}
if(m_maxSecondsHasBeenSet)
{
payload.WithInteger("maxSeconds", m_maxSeconds);
}
return payload;
}
} // namespace Model
} // namespace Inspector
} // namespace Aws

View File

@@ -0,0 +1,74 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/EventSubscription.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Inspector
{
namespace Model
{
EventSubscription::EventSubscription() :
m_event(InspectorEvent::NOT_SET),
m_eventHasBeenSet(false),
m_subscribedAtHasBeenSet(false)
{
}
EventSubscription::EventSubscription(JsonView jsonValue) :
m_event(InspectorEvent::NOT_SET),
m_eventHasBeenSet(false),
m_subscribedAtHasBeenSet(false)
{
*this = jsonValue;
}
EventSubscription& EventSubscription::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("event"))
{
m_event = InspectorEventMapper::GetInspectorEventForName(jsonValue.GetString("event"));
m_eventHasBeenSet = true;
}
if(jsonValue.ValueExists("subscribedAt"))
{
m_subscribedAt = jsonValue.GetDouble("subscribedAt");
m_subscribedAtHasBeenSet = true;
}
return *this;
}
JsonValue EventSubscription::Jsonize() const
{
JsonValue payload;
if(m_eventHasBeenSet)
{
payload.WithString("event", InspectorEventMapper::GetNameForInspectorEvent(m_event));
}
if(m_subscribedAtHasBeenSet)
{
payload.WithDouble("subscribedAt", m_subscribedAt.SecondsWithMSPrecision());
}
return payload;
}
} // namespace Model
} // namespace Inspector
} // namespace Aws

View File

@@ -0,0 +1,150 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/Exclusion.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Inspector
{
namespace Model
{
Exclusion::Exclusion() :
m_arnHasBeenSet(false),
m_titleHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_recommendationHasBeenSet(false),
m_scopesHasBeenSet(false),
m_attributesHasBeenSet(false)
{
}
Exclusion::Exclusion(JsonView jsonValue) :
m_arnHasBeenSet(false),
m_titleHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_recommendationHasBeenSet(false),
m_scopesHasBeenSet(false),
m_attributesHasBeenSet(false)
{
*this = jsonValue;
}
Exclusion& Exclusion::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("arn"))
{
m_arn = jsonValue.GetString("arn");
m_arnHasBeenSet = true;
}
if(jsonValue.ValueExists("title"))
{
m_title = jsonValue.GetString("title");
m_titleHasBeenSet = true;
}
if(jsonValue.ValueExists("description"))
{
m_description = jsonValue.GetString("description");
m_descriptionHasBeenSet = true;
}
if(jsonValue.ValueExists("recommendation"))
{
m_recommendation = jsonValue.GetString("recommendation");
m_recommendationHasBeenSet = true;
}
if(jsonValue.ValueExists("scopes"))
{
Array<JsonView> scopesJsonList = jsonValue.GetArray("scopes");
for(unsigned scopesIndex = 0; scopesIndex < scopesJsonList.GetLength(); ++scopesIndex)
{
m_scopes.push_back(scopesJsonList[scopesIndex].AsObject());
}
m_scopesHasBeenSet = true;
}
if(jsonValue.ValueExists("attributes"))
{
Array<JsonView> attributesJsonList = jsonValue.GetArray("attributes");
for(unsigned attributesIndex = 0; attributesIndex < attributesJsonList.GetLength(); ++attributesIndex)
{
m_attributes.push_back(attributesJsonList[attributesIndex].AsObject());
}
m_attributesHasBeenSet = true;
}
return *this;
}
JsonValue Exclusion::Jsonize() const
{
JsonValue payload;
if(m_arnHasBeenSet)
{
payload.WithString("arn", m_arn);
}
if(m_titleHasBeenSet)
{
payload.WithString("title", m_title);
}
if(m_descriptionHasBeenSet)
{
payload.WithString("description", m_description);
}
if(m_recommendationHasBeenSet)
{
payload.WithString("recommendation", m_recommendation);
}
if(m_scopesHasBeenSet)
{
Array<JsonValue> scopesJsonList(m_scopes.size());
for(unsigned scopesIndex = 0; scopesIndex < scopesJsonList.GetLength(); ++scopesIndex)
{
scopesJsonList[scopesIndex].AsObject(m_scopes[scopesIndex].Jsonize());
}
payload.WithArray("scopes", std::move(scopesJsonList));
}
if(m_attributesHasBeenSet)
{
Array<JsonValue> attributesJsonList(m_attributes.size());
for(unsigned attributesIndex = 0; attributesIndex < attributesJsonList.GetLength(); ++attributesIndex)
{
attributesJsonList[attributesIndex].AsObject(m_attributes[attributesIndex].Jsonize());
}
payload.WithArray("attributes", std::move(attributesJsonList));
}
return payload;
}
} // namespace Model
} // namespace Inspector
} // namespace Aws

View File

@@ -0,0 +1,135 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/ExclusionPreview.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Inspector
{
namespace Model
{
ExclusionPreview::ExclusionPreview() :
m_titleHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_recommendationHasBeenSet(false),
m_scopesHasBeenSet(false),
m_attributesHasBeenSet(false)
{
}
ExclusionPreview::ExclusionPreview(JsonView jsonValue) :
m_titleHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_recommendationHasBeenSet(false),
m_scopesHasBeenSet(false),
m_attributesHasBeenSet(false)
{
*this = jsonValue;
}
ExclusionPreview& ExclusionPreview::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("title"))
{
m_title = jsonValue.GetString("title");
m_titleHasBeenSet = true;
}
if(jsonValue.ValueExists("description"))
{
m_description = jsonValue.GetString("description");
m_descriptionHasBeenSet = true;
}
if(jsonValue.ValueExists("recommendation"))
{
m_recommendation = jsonValue.GetString("recommendation");
m_recommendationHasBeenSet = true;
}
if(jsonValue.ValueExists("scopes"))
{
Array<JsonView> scopesJsonList = jsonValue.GetArray("scopes");
for(unsigned scopesIndex = 0; scopesIndex < scopesJsonList.GetLength(); ++scopesIndex)
{
m_scopes.push_back(scopesJsonList[scopesIndex].AsObject());
}
m_scopesHasBeenSet = true;
}
if(jsonValue.ValueExists("attributes"))
{
Array<JsonView> attributesJsonList = jsonValue.GetArray("attributes");
for(unsigned attributesIndex = 0; attributesIndex < attributesJsonList.GetLength(); ++attributesIndex)
{
m_attributes.push_back(attributesJsonList[attributesIndex].AsObject());
}
m_attributesHasBeenSet = true;
}
return *this;
}
JsonValue ExclusionPreview::Jsonize() const
{
JsonValue payload;
if(m_titleHasBeenSet)
{
payload.WithString("title", m_title);
}
if(m_descriptionHasBeenSet)
{
payload.WithString("description", m_description);
}
if(m_recommendationHasBeenSet)
{
payload.WithString("recommendation", m_recommendation);
}
if(m_scopesHasBeenSet)
{
Array<JsonValue> scopesJsonList(m_scopes.size());
for(unsigned scopesIndex = 0; scopesIndex < scopesJsonList.GetLength(); ++scopesIndex)
{
scopesJsonList[scopesIndex].AsObject(m_scopes[scopesIndex].Jsonize());
}
payload.WithArray("scopes", std::move(scopesJsonList));
}
if(m_attributesHasBeenSet)
{
Array<JsonValue> attributesJsonList(m_attributes.size());
for(unsigned attributesIndex = 0; attributesIndex < attributesJsonList.GetLength(); ++attributesIndex)
{
attributesJsonList[attributesIndex].AsObject(m_attributes[attributesIndex].Jsonize());
}
payload.WithArray("attributes", std::move(attributesJsonList));
}
return payload;
}
} // namespace Model
} // namespace Inspector
} // namespace Aws

View File

@@ -0,0 +1,77 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/FailedItemDetails.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Inspector
{
namespace Model
{
FailedItemDetails::FailedItemDetails() :
m_failureCode(FailedItemErrorCode::NOT_SET),
m_failureCodeHasBeenSet(false),
m_retryable(false),
m_retryableHasBeenSet(false)
{
}
FailedItemDetails::FailedItemDetails(JsonView jsonValue) :
m_failureCode(FailedItemErrorCode::NOT_SET),
m_failureCodeHasBeenSet(false),
m_retryable(false),
m_retryableHasBeenSet(false)
{
*this = jsonValue;
}
FailedItemDetails& FailedItemDetails::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("failureCode"))
{
m_failureCode = FailedItemErrorCodeMapper::GetFailedItemErrorCodeForName(jsonValue.GetString("failureCode"));
m_failureCodeHasBeenSet = true;
}
if(jsonValue.ValueExists("retryable"))
{
m_retryable = jsonValue.GetBool("retryable");
m_retryableHasBeenSet = true;
}
return *this;
}
JsonValue FailedItemDetails::Jsonize() const
{
JsonValue payload;
if(m_failureCodeHasBeenSet)
{
payload.WithString("failureCode", FailedItemErrorCodeMapper::GetNameForFailedItemErrorCode(m_failureCode));
}
if(m_retryableHasBeenSet)
{
payload.WithBool("retryable", m_retryable);
}
return payload;
}
} // namespace Model
} // namespace Inspector
} // namespace Aws

View File

@@ -0,0 +1,98 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/FailedItemErrorCode.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace Inspector
{
namespace Model
{
namespace FailedItemErrorCodeMapper
{
static const int INVALID_ARN_HASH = HashingUtils::HashString("INVALID_ARN");
static const int DUPLICATE_ARN_HASH = HashingUtils::HashString("DUPLICATE_ARN");
static const int ITEM_DOES_NOT_EXIST_HASH = HashingUtils::HashString("ITEM_DOES_NOT_EXIST");
static const int ACCESS_DENIED_HASH = HashingUtils::HashString("ACCESS_DENIED");
static const int LIMIT_EXCEEDED_HASH = HashingUtils::HashString("LIMIT_EXCEEDED");
static const int INTERNAL_ERROR_HASH = HashingUtils::HashString("INTERNAL_ERROR");
FailedItemErrorCode GetFailedItemErrorCodeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == INVALID_ARN_HASH)
{
return FailedItemErrorCode::INVALID_ARN;
}
else if (hashCode == DUPLICATE_ARN_HASH)
{
return FailedItemErrorCode::DUPLICATE_ARN;
}
else if (hashCode == ITEM_DOES_NOT_EXIST_HASH)
{
return FailedItemErrorCode::ITEM_DOES_NOT_EXIST;
}
else if (hashCode == ACCESS_DENIED_HASH)
{
return FailedItemErrorCode::ACCESS_DENIED;
}
else if (hashCode == LIMIT_EXCEEDED_HASH)
{
return FailedItemErrorCode::LIMIT_EXCEEDED;
}
else if (hashCode == INTERNAL_ERROR_HASH)
{
return FailedItemErrorCode::INTERNAL_ERROR;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<FailedItemErrorCode>(hashCode);
}
return FailedItemErrorCode::NOT_SET;
}
Aws::String GetNameForFailedItemErrorCode(FailedItemErrorCode enumValue)
{
switch(enumValue)
{
case FailedItemErrorCode::INVALID_ARN:
return "INVALID_ARN";
case FailedItemErrorCode::DUPLICATE_ARN:
return "DUPLICATE_ARN";
case FailedItemErrorCode::ITEM_DOES_NOT_EXIST:
return "ITEM_DOES_NOT_EXIST";
case FailedItemErrorCode::ACCESS_DENIED:
return "ACCESS_DENIED";
case FailedItemErrorCode::LIMIT_EXCEEDED:
return "LIMIT_EXCEEDED";
case FailedItemErrorCode::INTERNAL_ERROR:
return "INTERNAL_ERROR";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace FailedItemErrorCodeMapper
} // namespace Model
} // namespace Inspector
} // namespace Aws

View File

@@ -0,0 +1,338 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/Finding.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Inspector
{
namespace Model
{
Finding::Finding() :
m_arnHasBeenSet(false),
m_schemaVersion(0),
m_schemaVersionHasBeenSet(false),
m_serviceHasBeenSet(false),
m_serviceAttributesHasBeenSet(false),
m_assetType(AssetType::NOT_SET),
m_assetTypeHasBeenSet(false),
m_assetAttributesHasBeenSet(false),
m_idHasBeenSet(false),
m_titleHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_recommendationHasBeenSet(false),
m_severity(Severity::NOT_SET),
m_severityHasBeenSet(false),
m_numericSeverity(0.0),
m_numericSeverityHasBeenSet(false),
m_confidence(0),
m_confidenceHasBeenSet(false),
m_indicatorOfCompromise(false),
m_indicatorOfCompromiseHasBeenSet(false),
m_attributesHasBeenSet(false),
m_userAttributesHasBeenSet(false),
m_createdAtHasBeenSet(false),
m_updatedAtHasBeenSet(false)
{
}
Finding::Finding(JsonView jsonValue) :
m_arnHasBeenSet(false),
m_schemaVersion(0),
m_schemaVersionHasBeenSet(false),
m_serviceHasBeenSet(false),
m_serviceAttributesHasBeenSet(false),
m_assetType(AssetType::NOT_SET),
m_assetTypeHasBeenSet(false),
m_assetAttributesHasBeenSet(false),
m_idHasBeenSet(false),
m_titleHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_recommendationHasBeenSet(false),
m_severity(Severity::NOT_SET),
m_severityHasBeenSet(false),
m_numericSeverity(0.0),
m_numericSeverityHasBeenSet(false),
m_confidence(0),
m_confidenceHasBeenSet(false),
m_indicatorOfCompromise(false),
m_indicatorOfCompromiseHasBeenSet(false),
m_attributesHasBeenSet(false),
m_userAttributesHasBeenSet(false),
m_createdAtHasBeenSet(false),
m_updatedAtHasBeenSet(false)
{
*this = jsonValue;
}
Finding& Finding::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("arn"))
{
m_arn = jsonValue.GetString("arn");
m_arnHasBeenSet = true;
}
if(jsonValue.ValueExists("schemaVersion"))
{
m_schemaVersion = jsonValue.GetInteger("schemaVersion");
m_schemaVersionHasBeenSet = true;
}
if(jsonValue.ValueExists("service"))
{
m_service = jsonValue.GetString("service");
m_serviceHasBeenSet = true;
}
if(jsonValue.ValueExists("serviceAttributes"))
{
m_serviceAttributes = jsonValue.GetObject("serviceAttributes");
m_serviceAttributesHasBeenSet = true;
}
if(jsonValue.ValueExists("assetType"))
{
m_assetType = AssetTypeMapper::GetAssetTypeForName(jsonValue.GetString("assetType"));
m_assetTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("assetAttributes"))
{
m_assetAttributes = jsonValue.GetObject("assetAttributes");
m_assetAttributesHasBeenSet = true;
}
if(jsonValue.ValueExists("id"))
{
m_id = jsonValue.GetString("id");
m_idHasBeenSet = true;
}
if(jsonValue.ValueExists("title"))
{
m_title = jsonValue.GetString("title");
m_titleHasBeenSet = true;
}
if(jsonValue.ValueExists("description"))
{
m_description = jsonValue.GetString("description");
m_descriptionHasBeenSet = true;
}
if(jsonValue.ValueExists("recommendation"))
{
m_recommendation = jsonValue.GetString("recommendation");
m_recommendationHasBeenSet = true;
}
if(jsonValue.ValueExists("severity"))
{
m_severity = SeverityMapper::GetSeverityForName(jsonValue.GetString("severity"));
m_severityHasBeenSet = true;
}
if(jsonValue.ValueExists("numericSeverity"))
{
m_numericSeverity = jsonValue.GetDouble("numericSeverity");
m_numericSeverityHasBeenSet = true;
}
if(jsonValue.ValueExists("confidence"))
{
m_confidence = jsonValue.GetInteger("confidence");
m_confidenceHasBeenSet = true;
}
if(jsonValue.ValueExists("indicatorOfCompromise"))
{
m_indicatorOfCompromise = jsonValue.GetBool("indicatorOfCompromise");
m_indicatorOfCompromiseHasBeenSet = true;
}
if(jsonValue.ValueExists("attributes"))
{
Array<JsonView> attributesJsonList = jsonValue.GetArray("attributes");
for(unsigned attributesIndex = 0; attributesIndex < attributesJsonList.GetLength(); ++attributesIndex)
{
m_attributes.push_back(attributesJsonList[attributesIndex].AsObject());
}
m_attributesHasBeenSet = true;
}
if(jsonValue.ValueExists("userAttributes"))
{
Array<JsonView> userAttributesJsonList = jsonValue.GetArray("userAttributes");
for(unsigned userAttributesIndex = 0; userAttributesIndex < userAttributesJsonList.GetLength(); ++userAttributesIndex)
{
m_userAttributes.push_back(userAttributesJsonList[userAttributesIndex].AsObject());
}
m_userAttributesHasBeenSet = true;
}
if(jsonValue.ValueExists("createdAt"))
{
m_createdAt = jsonValue.GetDouble("createdAt");
m_createdAtHasBeenSet = true;
}
if(jsonValue.ValueExists("updatedAt"))
{
m_updatedAt = jsonValue.GetDouble("updatedAt");
m_updatedAtHasBeenSet = true;
}
return *this;
}
JsonValue Finding::Jsonize() const
{
JsonValue payload;
if(m_arnHasBeenSet)
{
payload.WithString("arn", m_arn);
}
if(m_schemaVersionHasBeenSet)
{
payload.WithInteger("schemaVersion", m_schemaVersion);
}
if(m_serviceHasBeenSet)
{
payload.WithString("service", m_service);
}
if(m_serviceAttributesHasBeenSet)
{
payload.WithObject("serviceAttributes", m_serviceAttributes.Jsonize());
}
if(m_assetTypeHasBeenSet)
{
payload.WithString("assetType", AssetTypeMapper::GetNameForAssetType(m_assetType));
}
if(m_assetAttributesHasBeenSet)
{
payload.WithObject("assetAttributes", m_assetAttributes.Jsonize());
}
if(m_idHasBeenSet)
{
payload.WithString("id", m_id);
}
if(m_titleHasBeenSet)
{
payload.WithString("title", m_title);
}
if(m_descriptionHasBeenSet)
{
payload.WithString("description", m_description);
}
if(m_recommendationHasBeenSet)
{
payload.WithString("recommendation", m_recommendation);
}
if(m_severityHasBeenSet)
{
payload.WithString("severity", SeverityMapper::GetNameForSeverity(m_severity));
}
if(m_numericSeverityHasBeenSet)
{
payload.WithDouble("numericSeverity", m_numericSeverity);
}
if(m_confidenceHasBeenSet)
{
payload.WithInteger("confidence", m_confidence);
}
if(m_indicatorOfCompromiseHasBeenSet)
{
payload.WithBool("indicatorOfCompromise", m_indicatorOfCompromise);
}
if(m_attributesHasBeenSet)
{
Array<JsonValue> attributesJsonList(m_attributes.size());
for(unsigned attributesIndex = 0; attributesIndex < attributesJsonList.GetLength(); ++attributesIndex)
{
attributesJsonList[attributesIndex].AsObject(m_attributes[attributesIndex].Jsonize());
}
payload.WithArray("attributes", std::move(attributesJsonList));
}
if(m_userAttributesHasBeenSet)
{
Array<JsonValue> userAttributesJsonList(m_userAttributes.size());
for(unsigned userAttributesIndex = 0; userAttributesIndex < userAttributesJsonList.GetLength(); ++userAttributesIndex)
{
userAttributesJsonList[userAttributesIndex].AsObject(m_userAttributes[userAttributesIndex].Jsonize());
}
payload.WithArray("userAttributes", std::move(userAttributesJsonList));
}
if(m_createdAtHasBeenSet)
{
payload.WithDouble("createdAt", m_createdAt.SecondsWithMSPrecision());
}
if(m_updatedAtHasBeenSet)
{
payload.WithDouble("updatedAt", m_updatedAt.SecondsWithMSPrecision());
}
return payload;
}
} // namespace Model
} // namespace Inspector
} // namespace Aws

View File

@@ -0,0 +1,220 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/FindingFilter.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Inspector
{
namespace Model
{
FindingFilter::FindingFilter() :
m_agentIdsHasBeenSet(false),
m_autoScalingGroupsHasBeenSet(false),
m_ruleNamesHasBeenSet(false),
m_severitiesHasBeenSet(false),
m_rulesPackageArnsHasBeenSet(false),
m_attributesHasBeenSet(false),
m_userAttributesHasBeenSet(false),
m_creationTimeRangeHasBeenSet(false)
{
}
FindingFilter::FindingFilter(JsonView jsonValue) :
m_agentIdsHasBeenSet(false),
m_autoScalingGroupsHasBeenSet(false),
m_ruleNamesHasBeenSet(false),
m_severitiesHasBeenSet(false),
m_rulesPackageArnsHasBeenSet(false),
m_attributesHasBeenSet(false),
m_userAttributesHasBeenSet(false),
m_creationTimeRangeHasBeenSet(false)
{
*this = jsonValue;
}
FindingFilter& FindingFilter::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("agentIds"))
{
Array<JsonView> agentIdsJsonList = jsonValue.GetArray("agentIds");
for(unsigned agentIdsIndex = 0; agentIdsIndex < agentIdsJsonList.GetLength(); ++agentIdsIndex)
{
m_agentIds.push_back(agentIdsJsonList[agentIdsIndex].AsString());
}
m_agentIdsHasBeenSet = true;
}
if(jsonValue.ValueExists("autoScalingGroups"))
{
Array<JsonView> autoScalingGroupsJsonList = jsonValue.GetArray("autoScalingGroups");
for(unsigned autoScalingGroupsIndex = 0; autoScalingGroupsIndex < autoScalingGroupsJsonList.GetLength(); ++autoScalingGroupsIndex)
{
m_autoScalingGroups.push_back(autoScalingGroupsJsonList[autoScalingGroupsIndex].AsString());
}
m_autoScalingGroupsHasBeenSet = true;
}
if(jsonValue.ValueExists("ruleNames"))
{
Array<JsonView> ruleNamesJsonList = jsonValue.GetArray("ruleNames");
for(unsigned ruleNamesIndex = 0; ruleNamesIndex < ruleNamesJsonList.GetLength(); ++ruleNamesIndex)
{
m_ruleNames.push_back(ruleNamesJsonList[ruleNamesIndex].AsString());
}
m_ruleNamesHasBeenSet = true;
}
if(jsonValue.ValueExists("severities"))
{
Array<JsonView> severitiesJsonList = jsonValue.GetArray("severities");
for(unsigned severitiesIndex = 0; severitiesIndex < severitiesJsonList.GetLength(); ++severitiesIndex)
{
m_severities.push_back(SeverityMapper::GetSeverityForName(severitiesJsonList[severitiesIndex].AsString()));
}
m_severitiesHasBeenSet = true;
}
if(jsonValue.ValueExists("rulesPackageArns"))
{
Array<JsonView> rulesPackageArnsJsonList = jsonValue.GetArray("rulesPackageArns");
for(unsigned rulesPackageArnsIndex = 0; rulesPackageArnsIndex < rulesPackageArnsJsonList.GetLength(); ++rulesPackageArnsIndex)
{
m_rulesPackageArns.push_back(rulesPackageArnsJsonList[rulesPackageArnsIndex].AsString());
}
m_rulesPackageArnsHasBeenSet = true;
}
if(jsonValue.ValueExists("attributes"))
{
Array<JsonView> attributesJsonList = jsonValue.GetArray("attributes");
for(unsigned attributesIndex = 0; attributesIndex < attributesJsonList.GetLength(); ++attributesIndex)
{
m_attributes.push_back(attributesJsonList[attributesIndex].AsObject());
}
m_attributesHasBeenSet = true;
}
if(jsonValue.ValueExists("userAttributes"))
{
Array<JsonView> userAttributesJsonList = jsonValue.GetArray("userAttributes");
for(unsigned userAttributesIndex = 0; userAttributesIndex < userAttributesJsonList.GetLength(); ++userAttributesIndex)
{
m_userAttributes.push_back(userAttributesJsonList[userAttributesIndex].AsObject());
}
m_userAttributesHasBeenSet = true;
}
if(jsonValue.ValueExists("creationTimeRange"))
{
m_creationTimeRange = jsonValue.GetObject("creationTimeRange");
m_creationTimeRangeHasBeenSet = true;
}
return *this;
}
JsonValue FindingFilter::Jsonize() const
{
JsonValue payload;
if(m_agentIdsHasBeenSet)
{
Array<JsonValue> agentIdsJsonList(m_agentIds.size());
for(unsigned agentIdsIndex = 0; agentIdsIndex < agentIdsJsonList.GetLength(); ++agentIdsIndex)
{
agentIdsJsonList[agentIdsIndex].AsString(m_agentIds[agentIdsIndex]);
}
payload.WithArray("agentIds", std::move(agentIdsJsonList));
}
if(m_autoScalingGroupsHasBeenSet)
{
Array<JsonValue> autoScalingGroupsJsonList(m_autoScalingGroups.size());
for(unsigned autoScalingGroupsIndex = 0; autoScalingGroupsIndex < autoScalingGroupsJsonList.GetLength(); ++autoScalingGroupsIndex)
{
autoScalingGroupsJsonList[autoScalingGroupsIndex].AsString(m_autoScalingGroups[autoScalingGroupsIndex]);
}
payload.WithArray("autoScalingGroups", std::move(autoScalingGroupsJsonList));
}
if(m_ruleNamesHasBeenSet)
{
Array<JsonValue> ruleNamesJsonList(m_ruleNames.size());
for(unsigned ruleNamesIndex = 0; ruleNamesIndex < ruleNamesJsonList.GetLength(); ++ruleNamesIndex)
{
ruleNamesJsonList[ruleNamesIndex].AsString(m_ruleNames[ruleNamesIndex]);
}
payload.WithArray("ruleNames", std::move(ruleNamesJsonList));
}
if(m_severitiesHasBeenSet)
{
Array<JsonValue> severitiesJsonList(m_severities.size());
for(unsigned severitiesIndex = 0; severitiesIndex < severitiesJsonList.GetLength(); ++severitiesIndex)
{
severitiesJsonList[severitiesIndex].AsString(SeverityMapper::GetNameForSeverity(m_severities[severitiesIndex]));
}
payload.WithArray("severities", std::move(severitiesJsonList));
}
if(m_rulesPackageArnsHasBeenSet)
{
Array<JsonValue> rulesPackageArnsJsonList(m_rulesPackageArns.size());
for(unsigned rulesPackageArnsIndex = 0; rulesPackageArnsIndex < rulesPackageArnsJsonList.GetLength(); ++rulesPackageArnsIndex)
{
rulesPackageArnsJsonList[rulesPackageArnsIndex].AsString(m_rulesPackageArns[rulesPackageArnsIndex]);
}
payload.WithArray("rulesPackageArns", std::move(rulesPackageArnsJsonList));
}
if(m_attributesHasBeenSet)
{
Array<JsonValue> attributesJsonList(m_attributes.size());
for(unsigned attributesIndex = 0; attributesIndex < attributesJsonList.GetLength(); ++attributesIndex)
{
attributesJsonList[attributesIndex].AsObject(m_attributes[attributesIndex].Jsonize());
}
payload.WithArray("attributes", std::move(attributesJsonList));
}
if(m_userAttributesHasBeenSet)
{
Array<JsonValue> userAttributesJsonList(m_userAttributes.size());
for(unsigned userAttributesIndex = 0; userAttributesIndex < userAttributesJsonList.GetLength(); ++userAttributesIndex)
{
userAttributesJsonList[userAttributesIndex].AsObject(m_userAttributes[userAttributesIndex].Jsonize());
}
payload.WithArray("userAttributes", std::move(userAttributesJsonList));
}
if(m_creationTimeRangeHasBeenSet)
{
payload.WithObject("creationTimeRange", m_creationTimeRange.Jsonize());
}
return payload;
}
} // namespace Model
} // namespace Inspector
} // namespace Aws

View File

@@ -0,0 +1,57 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/GetAssessmentReportRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
GetAssessmentReportRequest::GetAssessmentReportRequest() :
m_assessmentRunArnHasBeenSet(false),
m_reportFileFormat(ReportFileFormat::NOT_SET),
m_reportFileFormatHasBeenSet(false),
m_reportType(ReportType::NOT_SET),
m_reportTypeHasBeenSet(false)
{
}
Aws::String GetAssessmentReportRequest::SerializePayload() const
{
JsonValue payload;
if(m_assessmentRunArnHasBeenSet)
{
payload.WithString("assessmentRunArn", m_assessmentRunArn);
}
if(m_reportFileFormatHasBeenSet)
{
payload.WithString("reportFileFormat", ReportFileFormatMapper::GetNameForReportFileFormat(m_reportFileFormat));
}
if(m_reportTypeHasBeenSet)
{
payload.WithString("reportType", ReportTypeMapper::GetNameForReportType(m_reportType));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection GetAssessmentReportRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "InspectorService.GetAssessmentReport"));
return headers;
}

View File

@@ -0,0 +1,48 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/GetAssessmentReportResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
GetAssessmentReportResult::GetAssessmentReportResult() :
m_status(ReportStatus::NOT_SET)
{
}
GetAssessmentReportResult::GetAssessmentReportResult(const Aws::AmazonWebServiceResult<JsonValue>& result) :
m_status(ReportStatus::NOT_SET)
{
*this = result;
}
GetAssessmentReportResult& GetAssessmentReportResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("status"))
{
m_status = ReportStatusMapper::GetReportStatusForName(jsonValue.GetString("status"));
}
if(jsonValue.ValueExists("url"))
{
m_url = jsonValue.GetString("url");
}
return *this;
}

View File

@@ -0,0 +1,72 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/GetExclusionsPreviewRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
GetExclusionsPreviewRequest::GetExclusionsPreviewRequest() :
m_assessmentTemplateArnHasBeenSet(false),
m_previewTokenHasBeenSet(false),
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false),
m_locale(Locale::NOT_SET),
m_localeHasBeenSet(false)
{
}
Aws::String GetExclusionsPreviewRequest::SerializePayload() const
{
JsonValue payload;
if(m_assessmentTemplateArnHasBeenSet)
{
payload.WithString("assessmentTemplateArn", m_assessmentTemplateArn);
}
if(m_previewTokenHasBeenSet)
{
payload.WithString("previewToken", m_previewToken);
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("nextToken", m_nextToken);
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("maxResults", m_maxResults);
}
if(m_localeHasBeenSet)
{
payload.WithString("locale", LocaleMapper::GetNameForLocale(m_locale));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection GetExclusionsPreviewRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "InspectorService.GetExclusionsPreview"));
return headers;
}

View File

@@ -0,0 +1,57 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/GetExclusionsPreviewResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
GetExclusionsPreviewResult::GetExclusionsPreviewResult() :
m_previewStatus(PreviewStatus::NOT_SET)
{
}
GetExclusionsPreviewResult::GetExclusionsPreviewResult(const Aws::AmazonWebServiceResult<JsonValue>& result) :
m_previewStatus(PreviewStatus::NOT_SET)
{
*this = result;
}
GetExclusionsPreviewResult& GetExclusionsPreviewResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("previewStatus"))
{
m_previewStatus = PreviewStatusMapper::GetPreviewStatusForName(jsonValue.GetString("previewStatus"));
}
if(jsonValue.ValueExists("exclusionPreviews"))
{
Array<JsonView> exclusionPreviewsJsonList = jsonValue.GetArray("exclusionPreviews");
for(unsigned exclusionPreviewsIndex = 0; exclusionPreviewsIndex < exclusionPreviewsJsonList.GetLength(); ++exclusionPreviewsIndex)
{
m_exclusionPreviews.push_back(exclusionPreviewsJsonList[exclusionPreviewsIndex].AsObject());
}
}
if(jsonValue.ValueExists("nextToken"))
{
m_nextToken = jsonValue.GetString("nextToken");
}
return *this;
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/GetTelemetryMetadataRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
GetTelemetryMetadataRequest::GetTelemetryMetadataRequest() :
m_assessmentRunArnHasBeenSet(false)
{
}
Aws::String GetTelemetryMetadataRequest::SerializePayload() const
{
JsonValue payload;
if(m_assessmentRunArnHasBeenSet)
{
payload.WithString("assessmentRunArn", m_assessmentRunArn);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection GetTelemetryMetadataRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "InspectorService.GetTelemetryMetadata"));
return headers;
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/GetTelemetryMetadataResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
GetTelemetryMetadataResult::GetTelemetryMetadataResult()
{
}
GetTelemetryMetadataResult::GetTelemetryMetadataResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
GetTelemetryMetadataResult& GetTelemetryMetadataResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("telemetryMetadata"))
{
Array<JsonView> telemetryMetadataJsonList = jsonValue.GetArray("telemetryMetadata");
for(unsigned telemetryMetadataIndex = 0; telemetryMetadataIndex < telemetryMetadataJsonList.GetLength(); ++telemetryMetadataIndex)
{
m_telemetryMetadata.push_back(telemetryMetadataJsonList[telemetryMetadataIndex].AsObject());
}
}
return *this;
}

View File

@@ -0,0 +1,91 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/InspectorEvent.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace Inspector
{
namespace Model
{
namespace InspectorEventMapper
{
static const int ASSESSMENT_RUN_STARTED_HASH = HashingUtils::HashString("ASSESSMENT_RUN_STARTED");
static const int ASSESSMENT_RUN_COMPLETED_HASH = HashingUtils::HashString("ASSESSMENT_RUN_COMPLETED");
static const int ASSESSMENT_RUN_STATE_CHANGED_HASH = HashingUtils::HashString("ASSESSMENT_RUN_STATE_CHANGED");
static const int FINDING_REPORTED_HASH = HashingUtils::HashString("FINDING_REPORTED");
static const int OTHER_HASH = HashingUtils::HashString("OTHER");
InspectorEvent GetInspectorEventForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == ASSESSMENT_RUN_STARTED_HASH)
{
return InspectorEvent::ASSESSMENT_RUN_STARTED;
}
else if (hashCode == ASSESSMENT_RUN_COMPLETED_HASH)
{
return InspectorEvent::ASSESSMENT_RUN_COMPLETED;
}
else if (hashCode == ASSESSMENT_RUN_STATE_CHANGED_HASH)
{
return InspectorEvent::ASSESSMENT_RUN_STATE_CHANGED;
}
else if (hashCode == FINDING_REPORTED_HASH)
{
return InspectorEvent::FINDING_REPORTED;
}
else if (hashCode == OTHER_HASH)
{
return InspectorEvent::OTHER;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<InspectorEvent>(hashCode);
}
return InspectorEvent::NOT_SET;
}
Aws::String GetNameForInspectorEvent(InspectorEvent enumValue)
{
switch(enumValue)
{
case InspectorEvent::ASSESSMENT_RUN_STARTED:
return "ASSESSMENT_RUN_STARTED";
case InspectorEvent::ASSESSMENT_RUN_COMPLETED:
return "ASSESSMENT_RUN_COMPLETED";
case InspectorEvent::ASSESSMENT_RUN_STATE_CHANGED:
return "ASSESSMENT_RUN_STATE_CHANGED";
case InspectorEvent::FINDING_REPORTED:
return "FINDING_REPORTED";
case InspectorEvent::OTHER:
return "OTHER";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace InspectorEventMapper
} // namespace Model
} // namespace Inspector
} // namespace Aws

View File

@@ -0,0 +1,91 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/InspectorServiceAttributes.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Inspector
{
namespace Model
{
InspectorServiceAttributes::InspectorServiceAttributes() :
m_schemaVersion(0),
m_schemaVersionHasBeenSet(false),
m_assessmentRunArnHasBeenSet(false),
m_rulesPackageArnHasBeenSet(false)
{
}
InspectorServiceAttributes::InspectorServiceAttributes(JsonView jsonValue) :
m_schemaVersion(0),
m_schemaVersionHasBeenSet(false),
m_assessmentRunArnHasBeenSet(false),
m_rulesPackageArnHasBeenSet(false)
{
*this = jsonValue;
}
InspectorServiceAttributes& InspectorServiceAttributes::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("schemaVersion"))
{
m_schemaVersion = jsonValue.GetInteger("schemaVersion");
m_schemaVersionHasBeenSet = true;
}
if(jsonValue.ValueExists("assessmentRunArn"))
{
m_assessmentRunArn = jsonValue.GetString("assessmentRunArn");
m_assessmentRunArnHasBeenSet = true;
}
if(jsonValue.ValueExists("rulesPackageArn"))
{
m_rulesPackageArn = jsonValue.GetString("rulesPackageArn");
m_rulesPackageArnHasBeenSet = true;
}
return *this;
}
JsonValue InspectorServiceAttributes::Jsonize() const
{
JsonValue payload;
if(m_schemaVersionHasBeenSet)
{
payload.WithInteger("schemaVersion", m_schemaVersion);
}
if(m_assessmentRunArnHasBeenSet)
{
payload.WithString("assessmentRunArn", m_assessmentRunArn);
}
if(m_rulesPackageArnHasBeenSet)
{
payload.WithString("rulesPackageArn", m_rulesPackageArn);
}
return payload;
}
} // namespace Model
} // namespace Inspector
} // namespace Aws

View File

@@ -0,0 +1,76 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/InternalException.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Inspector
{
namespace Model
{
InternalException::InternalException() :
m_messageHasBeenSet(false),
m_canRetry(false),
m_canRetryHasBeenSet(false)
{
}
InternalException::InternalException(JsonView jsonValue) :
m_messageHasBeenSet(false),
m_canRetry(false),
m_canRetryHasBeenSet(false)
{
*this = jsonValue;
}
InternalException& InternalException::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("message"))
{
m_message = jsonValue.GetString("message");
m_messageHasBeenSet = true;
}
if(jsonValue.ValueExists("canRetry"))
{
m_canRetry = jsonValue.GetBool("canRetry");
m_canRetryHasBeenSet = true;
}
return *this;
}
JsonValue InternalException::Jsonize() const
{
JsonValue payload;
if(m_messageHasBeenSet)
{
payload.WithString("message", m_message);
}
if(m_canRetryHasBeenSet)
{
payload.WithBool("canRetry", m_canRetry);
}
return payload;
}
} // namespace Model
} // namespace Inspector
} // namespace Aws

View File

@@ -0,0 +1,70 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/InvalidCrossAccountRoleErrorCode.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace Inspector
{
namespace Model
{
namespace InvalidCrossAccountRoleErrorCodeMapper
{
static const int ROLE_DOES_NOT_EXIST_OR_INVALID_TRUST_RELATIONSHIP_HASH = HashingUtils::HashString("ROLE_DOES_NOT_EXIST_OR_INVALID_TRUST_RELATIONSHIP");
static const int ROLE_DOES_NOT_HAVE_CORRECT_POLICY_HASH = HashingUtils::HashString("ROLE_DOES_NOT_HAVE_CORRECT_POLICY");
InvalidCrossAccountRoleErrorCode GetInvalidCrossAccountRoleErrorCodeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == ROLE_DOES_NOT_EXIST_OR_INVALID_TRUST_RELATIONSHIP_HASH)
{
return InvalidCrossAccountRoleErrorCode::ROLE_DOES_NOT_EXIST_OR_INVALID_TRUST_RELATIONSHIP;
}
else if (hashCode == ROLE_DOES_NOT_HAVE_CORRECT_POLICY_HASH)
{
return InvalidCrossAccountRoleErrorCode::ROLE_DOES_NOT_HAVE_CORRECT_POLICY;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<InvalidCrossAccountRoleErrorCode>(hashCode);
}
return InvalidCrossAccountRoleErrorCode::NOT_SET;
}
Aws::String GetNameForInvalidCrossAccountRoleErrorCode(InvalidCrossAccountRoleErrorCode enumValue)
{
switch(enumValue)
{
case InvalidCrossAccountRoleErrorCode::ROLE_DOES_NOT_EXIST_OR_INVALID_TRUST_RELATIONSHIP:
return "ROLE_DOES_NOT_EXIST_OR_INVALID_TRUST_RELATIONSHIP";
case InvalidCrossAccountRoleErrorCode::ROLE_DOES_NOT_HAVE_CORRECT_POLICY:
return "ROLE_DOES_NOT_HAVE_CORRECT_POLICY";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace InvalidCrossAccountRoleErrorCodeMapper
} // namespace Model
} // namespace Inspector
} // namespace Aws

View File

@@ -0,0 +1,92 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/InvalidCrossAccountRoleException.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Inspector
{
namespace Model
{
InvalidCrossAccountRoleException::InvalidCrossAccountRoleException() :
m_messageHasBeenSet(false),
m_errorCode(InvalidCrossAccountRoleErrorCode::NOT_SET),
m_errorCodeHasBeenSet(false),
m_canRetry(false),
m_canRetryHasBeenSet(false)
{
}
InvalidCrossAccountRoleException::InvalidCrossAccountRoleException(JsonView jsonValue) :
m_messageHasBeenSet(false),
m_errorCode(InvalidCrossAccountRoleErrorCode::NOT_SET),
m_errorCodeHasBeenSet(false),
m_canRetry(false),
m_canRetryHasBeenSet(false)
{
*this = jsonValue;
}
InvalidCrossAccountRoleException& InvalidCrossAccountRoleException::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("message"))
{
m_message = jsonValue.GetString("message");
m_messageHasBeenSet = true;
}
if(jsonValue.ValueExists("errorCode"))
{
m_errorCode = InvalidCrossAccountRoleErrorCodeMapper::GetInvalidCrossAccountRoleErrorCodeForName(jsonValue.GetString("errorCode"));
m_errorCodeHasBeenSet = true;
}
if(jsonValue.ValueExists("canRetry"))
{
m_canRetry = jsonValue.GetBool("canRetry");
m_canRetryHasBeenSet = true;
}
return *this;
}
JsonValue InvalidCrossAccountRoleException::Jsonize() const
{
JsonValue payload;
if(m_messageHasBeenSet)
{
payload.WithString("message", m_message);
}
if(m_errorCodeHasBeenSet)
{
payload.WithString("errorCode", InvalidCrossAccountRoleErrorCodeMapper::GetNameForInvalidCrossAccountRoleErrorCode(m_errorCode));
}
if(m_canRetryHasBeenSet)
{
payload.WithBool("canRetry", m_canRetry);
}
return payload;
}
} // namespace Model
} // namespace Inspector
} // namespace Aws

View File

@@ -0,0 +1,434 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/InvalidInputErrorCode.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace Inspector
{
namespace Model
{
namespace InvalidInputErrorCodeMapper
{
static const int INVALID_ASSESSMENT_TARGET_ARN_HASH = HashingUtils::HashString("INVALID_ASSESSMENT_TARGET_ARN");
static const int INVALID_ASSESSMENT_TEMPLATE_ARN_HASH = HashingUtils::HashString("INVALID_ASSESSMENT_TEMPLATE_ARN");
static const int INVALID_ASSESSMENT_RUN_ARN_HASH = HashingUtils::HashString("INVALID_ASSESSMENT_RUN_ARN");
static const int INVALID_FINDING_ARN_HASH = HashingUtils::HashString("INVALID_FINDING_ARN");
static const int INVALID_RESOURCE_GROUP_ARN_HASH = HashingUtils::HashString("INVALID_RESOURCE_GROUP_ARN");
static const int INVALID_RULES_PACKAGE_ARN_HASH = HashingUtils::HashString("INVALID_RULES_PACKAGE_ARN");
static const int INVALID_RESOURCE_ARN_HASH = HashingUtils::HashString("INVALID_RESOURCE_ARN");
static const int INVALID_SNS_TOPIC_ARN_HASH = HashingUtils::HashString("INVALID_SNS_TOPIC_ARN");
static const int INVALID_IAM_ROLE_ARN_HASH = HashingUtils::HashString("INVALID_IAM_ROLE_ARN");
static const int INVALID_ASSESSMENT_TARGET_NAME_HASH = HashingUtils::HashString("INVALID_ASSESSMENT_TARGET_NAME");
static const int INVALID_ASSESSMENT_TARGET_NAME_PATTERN_HASH = HashingUtils::HashString("INVALID_ASSESSMENT_TARGET_NAME_PATTERN");
static const int INVALID_ASSESSMENT_TEMPLATE_NAME_HASH = HashingUtils::HashString("INVALID_ASSESSMENT_TEMPLATE_NAME");
static const int INVALID_ASSESSMENT_TEMPLATE_NAME_PATTERN_HASH = HashingUtils::HashString("INVALID_ASSESSMENT_TEMPLATE_NAME_PATTERN");
static const int INVALID_ASSESSMENT_TEMPLATE_DURATION_HASH = HashingUtils::HashString("INVALID_ASSESSMENT_TEMPLATE_DURATION");
static const int INVALID_ASSESSMENT_TEMPLATE_DURATION_RANGE_HASH = HashingUtils::HashString("INVALID_ASSESSMENT_TEMPLATE_DURATION_RANGE");
static const int INVALID_ASSESSMENT_RUN_DURATION_RANGE_HASH = HashingUtils::HashString("INVALID_ASSESSMENT_RUN_DURATION_RANGE");
static const int INVALID_ASSESSMENT_RUN_START_TIME_RANGE_HASH = HashingUtils::HashString("INVALID_ASSESSMENT_RUN_START_TIME_RANGE");
static const int INVALID_ASSESSMENT_RUN_COMPLETION_TIME_RANGE_HASH = HashingUtils::HashString("INVALID_ASSESSMENT_RUN_COMPLETION_TIME_RANGE");
static const int INVALID_ASSESSMENT_RUN_STATE_CHANGE_TIME_RANGE_HASH = HashingUtils::HashString("INVALID_ASSESSMENT_RUN_STATE_CHANGE_TIME_RANGE");
static const int INVALID_ASSESSMENT_RUN_STATE_HASH = HashingUtils::HashString("INVALID_ASSESSMENT_RUN_STATE");
static const int INVALID_TAG_HASH = HashingUtils::HashString("INVALID_TAG");
static const int INVALID_TAG_KEY_HASH = HashingUtils::HashString("INVALID_TAG_KEY");
static const int INVALID_TAG_VALUE_HASH = HashingUtils::HashString("INVALID_TAG_VALUE");
static const int INVALID_RESOURCE_GROUP_TAG_KEY_HASH = HashingUtils::HashString("INVALID_RESOURCE_GROUP_TAG_KEY");
static const int INVALID_RESOURCE_GROUP_TAG_VALUE_HASH = HashingUtils::HashString("INVALID_RESOURCE_GROUP_TAG_VALUE");
static const int INVALID_ATTRIBUTE_HASH = HashingUtils::HashString("INVALID_ATTRIBUTE");
static const int INVALID_USER_ATTRIBUTE_HASH = HashingUtils::HashString("INVALID_USER_ATTRIBUTE");
static const int INVALID_USER_ATTRIBUTE_KEY_HASH = HashingUtils::HashString("INVALID_USER_ATTRIBUTE_KEY");
static const int INVALID_USER_ATTRIBUTE_VALUE_HASH = HashingUtils::HashString("INVALID_USER_ATTRIBUTE_VALUE");
static const int INVALID_PAGINATION_TOKEN_HASH = HashingUtils::HashString("INVALID_PAGINATION_TOKEN");
static const int INVALID_MAX_RESULTS_HASH = HashingUtils::HashString("INVALID_MAX_RESULTS");
static const int INVALID_AGENT_ID_HASH = HashingUtils::HashString("INVALID_AGENT_ID");
static const int INVALID_AUTO_SCALING_GROUP_HASH = HashingUtils::HashString("INVALID_AUTO_SCALING_GROUP");
static const int INVALID_RULE_NAME_HASH = HashingUtils::HashString("INVALID_RULE_NAME");
static const int INVALID_SEVERITY_HASH = HashingUtils::HashString("INVALID_SEVERITY");
static const int INVALID_LOCALE_HASH = HashingUtils::HashString("INVALID_LOCALE");
static const int INVALID_EVENT_HASH = HashingUtils::HashString("INVALID_EVENT");
static const int ASSESSMENT_TARGET_NAME_ALREADY_TAKEN_HASH = HashingUtils::HashString("ASSESSMENT_TARGET_NAME_ALREADY_TAKEN");
static const int ASSESSMENT_TEMPLATE_NAME_ALREADY_TAKEN_HASH = HashingUtils::HashString("ASSESSMENT_TEMPLATE_NAME_ALREADY_TAKEN");
static const int INVALID_NUMBER_OF_ASSESSMENT_TARGET_ARNS_HASH = HashingUtils::HashString("INVALID_NUMBER_OF_ASSESSMENT_TARGET_ARNS");
static const int INVALID_NUMBER_OF_ASSESSMENT_TEMPLATE_ARNS_HASH = HashingUtils::HashString("INVALID_NUMBER_OF_ASSESSMENT_TEMPLATE_ARNS");
static const int INVALID_NUMBER_OF_ASSESSMENT_RUN_ARNS_HASH = HashingUtils::HashString("INVALID_NUMBER_OF_ASSESSMENT_RUN_ARNS");
static const int INVALID_NUMBER_OF_FINDING_ARNS_HASH = HashingUtils::HashString("INVALID_NUMBER_OF_FINDING_ARNS");
static const int INVALID_NUMBER_OF_RESOURCE_GROUP_ARNS_HASH = HashingUtils::HashString("INVALID_NUMBER_OF_RESOURCE_GROUP_ARNS");
static const int INVALID_NUMBER_OF_RULES_PACKAGE_ARNS_HASH = HashingUtils::HashString("INVALID_NUMBER_OF_RULES_PACKAGE_ARNS");
static const int INVALID_NUMBER_OF_ASSESSMENT_RUN_STATES_HASH = HashingUtils::HashString("INVALID_NUMBER_OF_ASSESSMENT_RUN_STATES");
static const int INVALID_NUMBER_OF_TAGS_HASH = HashingUtils::HashString("INVALID_NUMBER_OF_TAGS");
static const int INVALID_NUMBER_OF_RESOURCE_GROUP_TAGS_HASH = HashingUtils::HashString("INVALID_NUMBER_OF_RESOURCE_GROUP_TAGS");
static const int INVALID_NUMBER_OF_ATTRIBUTES_HASH = HashingUtils::HashString("INVALID_NUMBER_OF_ATTRIBUTES");
static const int INVALID_NUMBER_OF_USER_ATTRIBUTES_HASH = HashingUtils::HashString("INVALID_NUMBER_OF_USER_ATTRIBUTES");
static const int INVALID_NUMBER_OF_AGENT_IDS_HASH = HashingUtils::HashString("INVALID_NUMBER_OF_AGENT_IDS");
static const int INVALID_NUMBER_OF_AUTO_SCALING_GROUPS_HASH = HashingUtils::HashString("INVALID_NUMBER_OF_AUTO_SCALING_GROUPS");
static const int INVALID_NUMBER_OF_RULE_NAMES_HASH = HashingUtils::HashString("INVALID_NUMBER_OF_RULE_NAMES");
static const int INVALID_NUMBER_OF_SEVERITIES_HASH = HashingUtils::HashString("INVALID_NUMBER_OF_SEVERITIES");
InvalidInputErrorCode GetInvalidInputErrorCodeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == INVALID_ASSESSMENT_TARGET_ARN_HASH)
{
return InvalidInputErrorCode::INVALID_ASSESSMENT_TARGET_ARN;
}
else if (hashCode == INVALID_ASSESSMENT_TEMPLATE_ARN_HASH)
{
return InvalidInputErrorCode::INVALID_ASSESSMENT_TEMPLATE_ARN;
}
else if (hashCode == INVALID_ASSESSMENT_RUN_ARN_HASH)
{
return InvalidInputErrorCode::INVALID_ASSESSMENT_RUN_ARN;
}
else if (hashCode == INVALID_FINDING_ARN_HASH)
{
return InvalidInputErrorCode::INVALID_FINDING_ARN;
}
else if (hashCode == INVALID_RESOURCE_GROUP_ARN_HASH)
{
return InvalidInputErrorCode::INVALID_RESOURCE_GROUP_ARN;
}
else if (hashCode == INVALID_RULES_PACKAGE_ARN_HASH)
{
return InvalidInputErrorCode::INVALID_RULES_PACKAGE_ARN;
}
else if (hashCode == INVALID_RESOURCE_ARN_HASH)
{
return InvalidInputErrorCode::INVALID_RESOURCE_ARN;
}
else if (hashCode == INVALID_SNS_TOPIC_ARN_HASH)
{
return InvalidInputErrorCode::INVALID_SNS_TOPIC_ARN;
}
else if (hashCode == INVALID_IAM_ROLE_ARN_HASH)
{
return InvalidInputErrorCode::INVALID_IAM_ROLE_ARN;
}
else if (hashCode == INVALID_ASSESSMENT_TARGET_NAME_HASH)
{
return InvalidInputErrorCode::INVALID_ASSESSMENT_TARGET_NAME;
}
else if (hashCode == INVALID_ASSESSMENT_TARGET_NAME_PATTERN_HASH)
{
return InvalidInputErrorCode::INVALID_ASSESSMENT_TARGET_NAME_PATTERN;
}
else if (hashCode == INVALID_ASSESSMENT_TEMPLATE_NAME_HASH)
{
return InvalidInputErrorCode::INVALID_ASSESSMENT_TEMPLATE_NAME;
}
else if (hashCode == INVALID_ASSESSMENT_TEMPLATE_NAME_PATTERN_HASH)
{
return InvalidInputErrorCode::INVALID_ASSESSMENT_TEMPLATE_NAME_PATTERN;
}
else if (hashCode == INVALID_ASSESSMENT_TEMPLATE_DURATION_HASH)
{
return InvalidInputErrorCode::INVALID_ASSESSMENT_TEMPLATE_DURATION;
}
else if (hashCode == INVALID_ASSESSMENT_TEMPLATE_DURATION_RANGE_HASH)
{
return InvalidInputErrorCode::INVALID_ASSESSMENT_TEMPLATE_DURATION_RANGE;
}
else if (hashCode == INVALID_ASSESSMENT_RUN_DURATION_RANGE_HASH)
{
return InvalidInputErrorCode::INVALID_ASSESSMENT_RUN_DURATION_RANGE;
}
else if (hashCode == INVALID_ASSESSMENT_RUN_START_TIME_RANGE_HASH)
{
return InvalidInputErrorCode::INVALID_ASSESSMENT_RUN_START_TIME_RANGE;
}
else if (hashCode == INVALID_ASSESSMENT_RUN_COMPLETION_TIME_RANGE_HASH)
{
return InvalidInputErrorCode::INVALID_ASSESSMENT_RUN_COMPLETION_TIME_RANGE;
}
else if (hashCode == INVALID_ASSESSMENT_RUN_STATE_CHANGE_TIME_RANGE_HASH)
{
return InvalidInputErrorCode::INVALID_ASSESSMENT_RUN_STATE_CHANGE_TIME_RANGE;
}
else if (hashCode == INVALID_ASSESSMENT_RUN_STATE_HASH)
{
return InvalidInputErrorCode::INVALID_ASSESSMENT_RUN_STATE;
}
else if (hashCode == INVALID_TAG_HASH)
{
return InvalidInputErrorCode::INVALID_TAG;
}
else if (hashCode == INVALID_TAG_KEY_HASH)
{
return InvalidInputErrorCode::INVALID_TAG_KEY;
}
else if (hashCode == INVALID_TAG_VALUE_HASH)
{
return InvalidInputErrorCode::INVALID_TAG_VALUE;
}
else if (hashCode == INVALID_RESOURCE_GROUP_TAG_KEY_HASH)
{
return InvalidInputErrorCode::INVALID_RESOURCE_GROUP_TAG_KEY;
}
else if (hashCode == INVALID_RESOURCE_GROUP_TAG_VALUE_HASH)
{
return InvalidInputErrorCode::INVALID_RESOURCE_GROUP_TAG_VALUE;
}
else if (hashCode == INVALID_ATTRIBUTE_HASH)
{
return InvalidInputErrorCode::INVALID_ATTRIBUTE;
}
else if (hashCode == INVALID_USER_ATTRIBUTE_HASH)
{
return InvalidInputErrorCode::INVALID_USER_ATTRIBUTE;
}
else if (hashCode == INVALID_USER_ATTRIBUTE_KEY_HASH)
{
return InvalidInputErrorCode::INVALID_USER_ATTRIBUTE_KEY;
}
else if (hashCode == INVALID_USER_ATTRIBUTE_VALUE_HASH)
{
return InvalidInputErrorCode::INVALID_USER_ATTRIBUTE_VALUE;
}
else if (hashCode == INVALID_PAGINATION_TOKEN_HASH)
{
return InvalidInputErrorCode::INVALID_PAGINATION_TOKEN;
}
else if (hashCode == INVALID_MAX_RESULTS_HASH)
{
return InvalidInputErrorCode::INVALID_MAX_RESULTS;
}
else if (hashCode == INVALID_AGENT_ID_HASH)
{
return InvalidInputErrorCode::INVALID_AGENT_ID;
}
else if (hashCode == INVALID_AUTO_SCALING_GROUP_HASH)
{
return InvalidInputErrorCode::INVALID_AUTO_SCALING_GROUP;
}
else if (hashCode == INVALID_RULE_NAME_HASH)
{
return InvalidInputErrorCode::INVALID_RULE_NAME;
}
else if (hashCode == INVALID_SEVERITY_HASH)
{
return InvalidInputErrorCode::INVALID_SEVERITY;
}
else if (hashCode == INVALID_LOCALE_HASH)
{
return InvalidInputErrorCode::INVALID_LOCALE;
}
else if (hashCode == INVALID_EVENT_HASH)
{
return InvalidInputErrorCode::INVALID_EVENT;
}
else if (hashCode == ASSESSMENT_TARGET_NAME_ALREADY_TAKEN_HASH)
{
return InvalidInputErrorCode::ASSESSMENT_TARGET_NAME_ALREADY_TAKEN;
}
else if (hashCode == ASSESSMENT_TEMPLATE_NAME_ALREADY_TAKEN_HASH)
{
return InvalidInputErrorCode::ASSESSMENT_TEMPLATE_NAME_ALREADY_TAKEN;
}
else if (hashCode == INVALID_NUMBER_OF_ASSESSMENT_TARGET_ARNS_HASH)
{
return InvalidInputErrorCode::INVALID_NUMBER_OF_ASSESSMENT_TARGET_ARNS;
}
else if (hashCode == INVALID_NUMBER_OF_ASSESSMENT_TEMPLATE_ARNS_HASH)
{
return InvalidInputErrorCode::INVALID_NUMBER_OF_ASSESSMENT_TEMPLATE_ARNS;
}
else if (hashCode == INVALID_NUMBER_OF_ASSESSMENT_RUN_ARNS_HASH)
{
return InvalidInputErrorCode::INVALID_NUMBER_OF_ASSESSMENT_RUN_ARNS;
}
else if (hashCode == INVALID_NUMBER_OF_FINDING_ARNS_HASH)
{
return InvalidInputErrorCode::INVALID_NUMBER_OF_FINDING_ARNS;
}
else if (hashCode == INVALID_NUMBER_OF_RESOURCE_GROUP_ARNS_HASH)
{
return InvalidInputErrorCode::INVALID_NUMBER_OF_RESOURCE_GROUP_ARNS;
}
else if (hashCode == INVALID_NUMBER_OF_RULES_PACKAGE_ARNS_HASH)
{
return InvalidInputErrorCode::INVALID_NUMBER_OF_RULES_PACKAGE_ARNS;
}
else if (hashCode == INVALID_NUMBER_OF_ASSESSMENT_RUN_STATES_HASH)
{
return InvalidInputErrorCode::INVALID_NUMBER_OF_ASSESSMENT_RUN_STATES;
}
else if (hashCode == INVALID_NUMBER_OF_TAGS_HASH)
{
return InvalidInputErrorCode::INVALID_NUMBER_OF_TAGS;
}
else if (hashCode == INVALID_NUMBER_OF_RESOURCE_GROUP_TAGS_HASH)
{
return InvalidInputErrorCode::INVALID_NUMBER_OF_RESOURCE_GROUP_TAGS;
}
else if (hashCode == INVALID_NUMBER_OF_ATTRIBUTES_HASH)
{
return InvalidInputErrorCode::INVALID_NUMBER_OF_ATTRIBUTES;
}
else if (hashCode == INVALID_NUMBER_OF_USER_ATTRIBUTES_HASH)
{
return InvalidInputErrorCode::INVALID_NUMBER_OF_USER_ATTRIBUTES;
}
else if (hashCode == INVALID_NUMBER_OF_AGENT_IDS_HASH)
{
return InvalidInputErrorCode::INVALID_NUMBER_OF_AGENT_IDS;
}
else if (hashCode == INVALID_NUMBER_OF_AUTO_SCALING_GROUPS_HASH)
{
return InvalidInputErrorCode::INVALID_NUMBER_OF_AUTO_SCALING_GROUPS;
}
else if (hashCode == INVALID_NUMBER_OF_RULE_NAMES_HASH)
{
return InvalidInputErrorCode::INVALID_NUMBER_OF_RULE_NAMES;
}
else if (hashCode == INVALID_NUMBER_OF_SEVERITIES_HASH)
{
return InvalidInputErrorCode::INVALID_NUMBER_OF_SEVERITIES;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<InvalidInputErrorCode>(hashCode);
}
return InvalidInputErrorCode::NOT_SET;
}
Aws::String GetNameForInvalidInputErrorCode(InvalidInputErrorCode enumValue)
{
switch(enumValue)
{
case InvalidInputErrorCode::INVALID_ASSESSMENT_TARGET_ARN:
return "INVALID_ASSESSMENT_TARGET_ARN";
case InvalidInputErrorCode::INVALID_ASSESSMENT_TEMPLATE_ARN:
return "INVALID_ASSESSMENT_TEMPLATE_ARN";
case InvalidInputErrorCode::INVALID_ASSESSMENT_RUN_ARN:
return "INVALID_ASSESSMENT_RUN_ARN";
case InvalidInputErrorCode::INVALID_FINDING_ARN:
return "INVALID_FINDING_ARN";
case InvalidInputErrorCode::INVALID_RESOURCE_GROUP_ARN:
return "INVALID_RESOURCE_GROUP_ARN";
case InvalidInputErrorCode::INVALID_RULES_PACKAGE_ARN:
return "INVALID_RULES_PACKAGE_ARN";
case InvalidInputErrorCode::INVALID_RESOURCE_ARN:
return "INVALID_RESOURCE_ARN";
case InvalidInputErrorCode::INVALID_SNS_TOPIC_ARN:
return "INVALID_SNS_TOPIC_ARN";
case InvalidInputErrorCode::INVALID_IAM_ROLE_ARN:
return "INVALID_IAM_ROLE_ARN";
case InvalidInputErrorCode::INVALID_ASSESSMENT_TARGET_NAME:
return "INVALID_ASSESSMENT_TARGET_NAME";
case InvalidInputErrorCode::INVALID_ASSESSMENT_TARGET_NAME_PATTERN:
return "INVALID_ASSESSMENT_TARGET_NAME_PATTERN";
case InvalidInputErrorCode::INVALID_ASSESSMENT_TEMPLATE_NAME:
return "INVALID_ASSESSMENT_TEMPLATE_NAME";
case InvalidInputErrorCode::INVALID_ASSESSMENT_TEMPLATE_NAME_PATTERN:
return "INVALID_ASSESSMENT_TEMPLATE_NAME_PATTERN";
case InvalidInputErrorCode::INVALID_ASSESSMENT_TEMPLATE_DURATION:
return "INVALID_ASSESSMENT_TEMPLATE_DURATION";
case InvalidInputErrorCode::INVALID_ASSESSMENT_TEMPLATE_DURATION_RANGE:
return "INVALID_ASSESSMENT_TEMPLATE_DURATION_RANGE";
case InvalidInputErrorCode::INVALID_ASSESSMENT_RUN_DURATION_RANGE:
return "INVALID_ASSESSMENT_RUN_DURATION_RANGE";
case InvalidInputErrorCode::INVALID_ASSESSMENT_RUN_START_TIME_RANGE:
return "INVALID_ASSESSMENT_RUN_START_TIME_RANGE";
case InvalidInputErrorCode::INVALID_ASSESSMENT_RUN_COMPLETION_TIME_RANGE:
return "INVALID_ASSESSMENT_RUN_COMPLETION_TIME_RANGE";
case InvalidInputErrorCode::INVALID_ASSESSMENT_RUN_STATE_CHANGE_TIME_RANGE:
return "INVALID_ASSESSMENT_RUN_STATE_CHANGE_TIME_RANGE";
case InvalidInputErrorCode::INVALID_ASSESSMENT_RUN_STATE:
return "INVALID_ASSESSMENT_RUN_STATE";
case InvalidInputErrorCode::INVALID_TAG:
return "INVALID_TAG";
case InvalidInputErrorCode::INVALID_TAG_KEY:
return "INVALID_TAG_KEY";
case InvalidInputErrorCode::INVALID_TAG_VALUE:
return "INVALID_TAG_VALUE";
case InvalidInputErrorCode::INVALID_RESOURCE_GROUP_TAG_KEY:
return "INVALID_RESOURCE_GROUP_TAG_KEY";
case InvalidInputErrorCode::INVALID_RESOURCE_GROUP_TAG_VALUE:
return "INVALID_RESOURCE_GROUP_TAG_VALUE";
case InvalidInputErrorCode::INVALID_ATTRIBUTE:
return "INVALID_ATTRIBUTE";
case InvalidInputErrorCode::INVALID_USER_ATTRIBUTE:
return "INVALID_USER_ATTRIBUTE";
case InvalidInputErrorCode::INVALID_USER_ATTRIBUTE_KEY:
return "INVALID_USER_ATTRIBUTE_KEY";
case InvalidInputErrorCode::INVALID_USER_ATTRIBUTE_VALUE:
return "INVALID_USER_ATTRIBUTE_VALUE";
case InvalidInputErrorCode::INVALID_PAGINATION_TOKEN:
return "INVALID_PAGINATION_TOKEN";
case InvalidInputErrorCode::INVALID_MAX_RESULTS:
return "INVALID_MAX_RESULTS";
case InvalidInputErrorCode::INVALID_AGENT_ID:
return "INVALID_AGENT_ID";
case InvalidInputErrorCode::INVALID_AUTO_SCALING_GROUP:
return "INVALID_AUTO_SCALING_GROUP";
case InvalidInputErrorCode::INVALID_RULE_NAME:
return "INVALID_RULE_NAME";
case InvalidInputErrorCode::INVALID_SEVERITY:
return "INVALID_SEVERITY";
case InvalidInputErrorCode::INVALID_LOCALE:
return "INVALID_LOCALE";
case InvalidInputErrorCode::INVALID_EVENT:
return "INVALID_EVENT";
case InvalidInputErrorCode::ASSESSMENT_TARGET_NAME_ALREADY_TAKEN:
return "ASSESSMENT_TARGET_NAME_ALREADY_TAKEN";
case InvalidInputErrorCode::ASSESSMENT_TEMPLATE_NAME_ALREADY_TAKEN:
return "ASSESSMENT_TEMPLATE_NAME_ALREADY_TAKEN";
case InvalidInputErrorCode::INVALID_NUMBER_OF_ASSESSMENT_TARGET_ARNS:
return "INVALID_NUMBER_OF_ASSESSMENT_TARGET_ARNS";
case InvalidInputErrorCode::INVALID_NUMBER_OF_ASSESSMENT_TEMPLATE_ARNS:
return "INVALID_NUMBER_OF_ASSESSMENT_TEMPLATE_ARNS";
case InvalidInputErrorCode::INVALID_NUMBER_OF_ASSESSMENT_RUN_ARNS:
return "INVALID_NUMBER_OF_ASSESSMENT_RUN_ARNS";
case InvalidInputErrorCode::INVALID_NUMBER_OF_FINDING_ARNS:
return "INVALID_NUMBER_OF_FINDING_ARNS";
case InvalidInputErrorCode::INVALID_NUMBER_OF_RESOURCE_GROUP_ARNS:
return "INVALID_NUMBER_OF_RESOURCE_GROUP_ARNS";
case InvalidInputErrorCode::INVALID_NUMBER_OF_RULES_PACKAGE_ARNS:
return "INVALID_NUMBER_OF_RULES_PACKAGE_ARNS";
case InvalidInputErrorCode::INVALID_NUMBER_OF_ASSESSMENT_RUN_STATES:
return "INVALID_NUMBER_OF_ASSESSMENT_RUN_STATES";
case InvalidInputErrorCode::INVALID_NUMBER_OF_TAGS:
return "INVALID_NUMBER_OF_TAGS";
case InvalidInputErrorCode::INVALID_NUMBER_OF_RESOURCE_GROUP_TAGS:
return "INVALID_NUMBER_OF_RESOURCE_GROUP_TAGS";
case InvalidInputErrorCode::INVALID_NUMBER_OF_ATTRIBUTES:
return "INVALID_NUMBER_OF_ATTRIBUTES";
case InvalidInputErrorCode::INVALID_NUMBER_OF_USER_ATTRIBUTES:
return "INVALID_NUMBER_OF_USER_ATTRIBUTES";
case InvalidInputErrorCode::INVALID_NUMBER_OF_AGENT_IDS:
return "INVALID_NUMBER_OF_AGENT_IDS";
case InvalidInputErrorCode::INVALID_NUMBER_OF_AUTO_SCALING_GROUPS:
return "INVALID_NUMBER_OF_AUTO_SCALING_GROUPS";
case InvalidInputErrorCode::INVALID_NUMBER_OF_RULE_NAMES:
return "INVALID_NUMBER_OF_RULE_NAMES";
case InvalidInputErrorCode::INVALID_NUMBER_OF_SEVERITIES:
return "INVALID_NUMBER_OF_SEVERITIES";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace InvalidInputErrorCodeMapper
} // namespace Model
} // namespace Inspector
} // namespace Aws

View File

@@ -0,0 +1,92 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/InvalidInputException.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Inspector
{
namespace Model
{
InvalidInputException::InvalidInputException() :
m_messageHasBeenSet(false),
m_errorCode(InvalidInputErrorCode::NOT_SET),
m_errorCodeHasBeenSet(false),
m_canRetry(false),
m_canRetryHasBeenSet(false)
{
}
InvalidInputException::InvalidInputException(JsonView jsonValue) :
m_messageHasBeenSet(false),
m_errorCode(InvalidInputErrorCode::NOT_SET),
m_errorCodeHasBeenSet(false),
m_canRetry(false),
m_canRetryHasBeenSet(false)
{
*this = jsonValue;
}
InvalidInputException& InvalidInputException::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("message"))
{
m_message = jsonValue.GetString("message");
m_messageHasBeenSet = true;
}
if(jsonValue.ValueExists("errorCode"))
{
m_errorCode = InvalidInputErrorCodeMapper::GetInvalidInputErrorCodeForName(jsonValue.GetString("errorCode"));
m_errorCodeHasBeenSet = true;
}
if(jsonValue.ValueExists("canRetry"))
{
m_canRetry = jsonValue.GetBool("canRetry");
m_canRetryHasBeenSet = true;
}
return *this;
}
JsonValue InvalidInputException::Jsonize() const
{
JsonValue payload;
if(m_messageHasBeenSet)
{
payload.WithString("message", m_message);
}
if(m_errorCodeHasBeenSet)
{
payload.WithString("errorCode", InvalidInputErrorCodeMapper::GetNameForInvalidInputErrorCode(m_errorCode));
}
if(m_canRetryHasBeenSet)
{
payload.WithBool("canRetry", m_canRetry);
}
return payload;
}
} // namespace Model
} // namespace Inspector
} // namespace Aws

View File

@@ -0,0 +1,91 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/LimitExceededErrorCode.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace Inspector
{
namespace Model
{
namespace LimitExceededErrorCodeMapper
{
static const int ASSESSMENT_TARGET_LIMIT_EXCEEDED_HASH = HashingUtils::HashString("ASSESSMENT_TARGET_LIMIT_EXCEEDED");
static const int ASSESSMENT_TEMPLATE_LIMIT_EXCEEDED_HASH = HashingUtils::HashString("ASSESSMENT_TEMPLATE_LIMIT_EXCEEDED");
static const int ASSESSMENT_RUN_LIMIT_EXCEEDED_HASH = HashingUtils::HashString("ASSESSMENT_RUN_LIMIT_EXCEEDED");
static const int RESOURCE_GROUP_LIMIT_EXCEEDED_HASH = HashingUtils::HashString("RESOURCE_GROUP_LIMIT_EXCEEDED");
static const int EVENT_SUBSCRIPTION_LIMIT_EXCEEDED_HASH = HashingUtils::HashString("EVENT_SUBSCRIPTION_LIMIT_EXCEEDED");
LimitExceededErrorCode GetLimitExceededErrorCodeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == ASSESSMENT_TARGET_LIMIT_EXCEEDED_HASH)
{
return LimitExceededErrorCode::ASSESSMENT_TARGET_LIMIT_EXCEEDED;
}
else if (hashCode == ASSESSMENT_TEMPLATE_LIMIT_EXCEEDED_HASH)
{
return LimitExceededErrorCode::ASSESSMENT_TEMPLATE_LIMIT_EXCEEDED;
}
else if (hashCode == ASSESSMENT_RUN_LIMIT_EXCEEDED_HASH)
{
return LimitExceededErrorCode::ASSESSMENT_RUN_LIMIT_EXCEEDED;
}
else if (hashCode == RESOURCE_GROUP_LIMIT_EXCEEDED_HASH)
{
return LimitExceededErrorCode::RESOURCE_GROUP_LIMIT_EXCEEDED;
}
else if (hashCode == EVENT_SUBSCRIPTION_LIMIT_EXCEEDED_HASH)
{
return LimitExceededErrorCode::EVENT_SUBSCRIPTION_LIMIT_EXCEEDED;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<LimitExceededErrorCode>(hashCode);
}
return LimitExceededErrorCode::NOT_SET;
}
Aws::String GetNameForLimitExceededErrorCode(LimitExceededErrorCode enumValue)
{
switch(enumValue)
{
case LimitExceededErrorCode::ASSESSMENT_TARGET_LIMIT_EXCEEDED:
return "ASSESSMENT_TARGET_LIMIT_EXCEEDED";
case LimitExceededErrorCode::ASSESSMENT_TEMPLATE_LIMIT_EXCEEDED:
return "ASSESSMENT_TEMPLATE_LIMIT_EXCEEDED";
case LimitExceededErrorCode::ASSESSMENT_RUN_LIMIT_EXCEEDED:
return "ASSESSMENT_RUN_LIMIT_EXCEEDED";
case LimitExceededErrorCode::RESOURCE_GROUP_LIMIT_EXCEEDED:
return "RESOURCE_GROUP_LIMIT_EXCEEDED";
case LimitExceededErrorCode::EVENT_SUBSCRIPTION_LIMIT_EXCEEDED:
return "EVENT_SUBSCRIPTION_LIMIT_EXCEEDED";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace LimitExceededErrorCodeMapper
} // namespace Model
} // namespace Inspector
} // namespace Aws

View File

@@ -0,0 +1,92 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/LimitExceededException.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Inspector
{
namespace Model
{
LimitExceededException::LimitExceededException() :
m_messageHasBeenSet(false),
m_errorCode(LimitExceededErrorCode::NOT_SET),
m_errorCodeHasBeenSet(false),
m_canRetry(false),
m_canRetryHasBeenSet(false)
{
}
LimitExceededException::LimitExceededException(JsonView jsonValue) :
m_messageHasBeenSet(false),
m_errorCode(LimitExceededErrorCode::NOT_SET),
m_errorCodeHasBeenSet(false),
m_canRetry(false),
m_canRetryHasBeenSet(false)
{
*this = jsonValue;
}
LimitExceededException& LimitExceededException::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("message"))
{
m_message = jsonValue.GetString("message");
m_messageHasBeenSet = true;
}
if(jsonValue.ValueExists("errorCode"))
{
m_errorCode = LimitExceededErrorCodeMapper::GetLimitExceededErrorCodeForName(jsonValue.GetString("errorCode"));
m_errorCodeHasBeenSet = true;
}
if(jsonValue.ValueExists("canRetry"))
{
m_canRetry = jsonValue.GetBool("canRetry");
m_canRetryHasBeenSet = true;
}
return *this;
}
JsonValue LimitExceededException::Jsonize() const
{
JsonValue payload;
if(m_messageHasBeenSet)
{
payload.WithString("message", m_message);
}
if(m_errorCodeHasBeenSet)
{
payload.WithString("errorCode", LimitExceededErrorCodeMapper::GetNameForLimitExceededErrorCode(m_errorCode));
}
if(m_canRetryHasBeenSet)
{
payload.WithBool("canRetry", m_canRetry);
}
return payload;
}
} // namespace Model
} // namespace Inspector
} // namespace Aws

View File

@@ -0,0 +1,65 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/ListAssessmentRunAgentsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
ListAssessmentRunAgentsRequest::ListAssessmentRunAgentsRequest() :
m_assessmentRunArnHasBeenSet(false),
m_filterHasBeenSet(false),
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false)
{
}
Aws::String ListAssessmentRunAgentsRequest::SerializePayload() const
{
JsonValue payload;
if(m_assessmentRunArnHasBeenSet)
{
payload.WithString("assessmentRunArn", m_assessmentRunArn);
}
if(m_filterHasBeenSet)
{
payload.WithObject("filter", m_filter.Jsonize());
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("nextToken", m_nextToken);
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("maxResults", m_maxResults);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection ListAssessmentRunAgentsRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "InspectorService.ListAssessmentRunAgents"));
return headers;
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/ListAssessmentRunAgentsResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
ListAssessmentRunAgentsResult::ListAssessmentRunAgentsResult()
{
}
ListAssessmentRunAgentsResult::ListAssessmentRunAgentsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListAssessmentRunAgentsResult& ListAssessmentRunAgentsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("assessmentRunAgents"))
{
Array<JsonView> assessmentRunAgentsJsonList = jsonValue.GetArray("assessmentRunAgents");
for(unsigned assessmentRunAgentsIndex = 0; assessmentRunAgentsIndex < assessmentRunAgentsJsonList.GetLength(); ++assessmentRunAgentsIndex)
{
m_assessmentRunAgents.push_back(assessmentRunAgentsJsonList[assessmentRunAgentsIndex].AsObject());
}
}
if(jsonValue.ValueExists("nextToken"))
{
m_nextToken = jsonValue.GetString("nextToken");
}
return *this;
}

View File

@@ -0,0 +1,70 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/ListAssessmentRunsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
ListAssessmentRunsRequest::ListAssessmentRunsRequest() :
m_assessmentTemplateArnsHasBeenSet(false),
m_filterHasBeenSet(false),
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false)
{
}
Aws::String ListAssessmentRunsRequest::SerializePayload() const
{
JsonValue payload;
if(m_assessmentTemplateArnsHasBeenSet)
{
Array<JsonValue> assessmentTemplateArnsJsonList(m_assessmentTemplateArns.size());
for(unsigned assessmentTemplateArnsIndex = 0; assessmentTemplateArnsIndex < assessmentTemplateArnsJsonList.GetLength(); ++assessmentTemplateArnsIndex)
{
assessmentTemplateArnsJsonList[assessmentTemplateArnsIndex].AsString(m_assessmentTemplateArns[assessmentTemplateArnsIndex]);
}
payload.WithArray("assessmentTemplateArns", std::move(assessmentTemplateArnsJsonList));
}
if(m_filterHasBeenSet)
{
payload.WithObject("filter", m_filter.Jsonize());
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("nextToken", m_nextToken);
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("maxResults", m_maxResults);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection ListAssessmentRunsRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "InspectorService.ListAssessmentRuns"));
return headers;
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/ListAssessmentRunsResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
ListAssessmentRunsResult::ListAssessmentRunsResult()
{
}
ListAssessmentRunsResult::ListAssessmentRunsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListAssessmentRunsResult& ListAssessmentRunsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("assessmentRunArns"))
{
Array<JsonView> assessmentRunArnsJsonList = jsonValue.GetArray("assessmentRunArns");
for(unsigned assessmentRunArnsIndex = 0; assessmentRunArnsIndex < assessmentRunArnsJsonList.GetLength(); ++assessmentRunArnsIndex)
{
m_assessmentRunArns.push_back(assessmentRunArnsJsonList[assessmentRunArnsIndex].AsString());
}
}
if(jsonValue.ValueExists("nextToken"))
{
m_nextToken = jsonValue.GetString("nextToken");
}
return *this;
}

View File

@@ -0,0 +1,58 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/ListAssessmentTargetsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
ListAssessmentTargetsRequest::ListAssessmentTargetsRequest() :
m_filterHasBeenSet(false),
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false)
{
}
Aws::String ListAssessmentTargetsRequest::SerializePayload() const
{
JsonValue payload;
if(m_filterHasBeenSet)
{
payload.WithObject("filter", m_filter.Jsonize());
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("nextToken", m_nextToken);
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("maxResults", m_maxResults);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection ListAssessmentTargetsRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "InspectorService.ListAssessmentTargets"));
return headers;
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/ListAssessmentTargetsResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
ListAssessmentTargetsResult::ListAssessmentTargetsResult()
{
}
ListAssessmentTargetsResult::ListAssessmentTargetsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListAssessmentTargetsResult& ListAssessmentTargetsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("assessmentTargetArns"))
{
Array<JsonView> assessmentTargetArnsJsonList = jsonValue.GetArray("assessmentTargetArns");
for(unsigned assessmentTargetArnsIndex = 0; assessmentTargetArnsIndex < assessmentTargetArnsJsonList.GetLength(); ++assessmentTargetArnsIndex)
{
m_assessmentTargetArns.push_back(assessmentTargetArnsJsonList[assessmentTargetArnsIndex].AsString());
}
}
if(jsonValue.ValueExists("nextToken"))
{
m_nextToken = jsonValue.GetString("nextToken");
}
return *this;
}

View File

@@ -0,0 +1,70 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/ListAssessmentTemplatesRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
ListAssessmentTemplatesRequest::ListAssessmentTemplatesRequest() :
m_assessmentTargetArnsHasBeenSet(false),
m_filterHasBeenSet(false),
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false)
{
}
Aws::String ListAssessmentTemplatesRequest::SerializePayload() const
{
JsonValue payload;
if(m_assessmentTargetArnsHasBeenSet)
{
Array<JsonValue> assessmentTargetArnsJsonList(m_assessmentTargetArns.size());
for(unsigned assessmentTargetArnsIndex = 0; assessmentTargetArnsIndex < assessmentTargetArnsJsonList.GetLength(); ++assessmentTargetArnsIndex)
{
assessmentTargetArnsJsonList[assessmentTargetArnsIndex].AsString(m_assessmentTargetArns[assessmentTargetArnsIndex]);
}
payload.WithArray("assessmentTargetArns", std::move(assessmentTargetArnsJsonList));
}
if(m_filterHasBeenSet)
{
payload.WithObject("filter", m_filter.Jsonize());
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("nextToken", m_nextToken);
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("maxResults", m_maxResults);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection ListAssessmentTemplatesRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "InspectorService.ListAssessmentTemplates"));
return headers;
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/ListAssessmentTemplatesResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
ListAssessmentTemplatesResult::ListAssessmentTemplatesResult()
{
}
ListAssessmentTemplatesResult::ListAssessmentTemplatesResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListAssessmentTemplatesResult& ListAssessmentTemplatesResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("assessmentTemplateArns"))
{
Array<JsonView> assessmentTemplateArnsJsonList = jsonValue.GetArray("assessmentTemplateArns");
for(unsigned assessmentTemplateArnsIndex = 0; assessmentTemplateArnsIndex < assessmentTemplateArnsJsonList.GetLength(); ++assessmentTemplateArnsIndex)
{
m_assessmentTemplateArns.push_back(assessmentTemplateArnsJsonList[assessmentTemplateArnsIndex].AsString());
}
}
if(jsonValue.ValueExists("nextToken"))
{
m_nextToken = jsonValue.GetString("nextToken");
}
return *this;
}

View File

@@ -0,0 +1,58 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/ListEventSubscriptionsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
ListEventSubscriptionsRequest::ListEventSubscriptionsRequest() :
m_resourceArnHasBeenSet(false),
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false)
{
}
Aws::String ListEventSubscriptionsRequest::SerializePayload() const
{
JsonValue payload;
if(m_resourceArnHasBeenSet)
{
payload.WithString("resourceArn", m_resourceArn);
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("nextToken", m_nextToken);
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("maxResults", m_maxResults);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection ListEventSubscriptionsRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "InspectorService.ListEventSubscriptions"));
return headers;
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/ListEventSubscriptionsResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
ListEventSubscriptionsResult::ListEventSubscriptionsResult()
{
}
ListEventSubscriptionsResult::ListEventSubscriptionsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListEventSubscriptionsResult& ListEventSubscriptionsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("subscriptions"))
{
Array<JsonView> subscriptionsJsonList = jsonValue.GetArray("subscriptions");
for(unsigned subscriptionsIndex = 0; subscriptionsIndex < subscriptionsJsonList.GetLength(); ++subscriptionsIndex)
{
m_subscriptions.push_back(subscriptionsJsonList[subscriptionsIndex].AsObject());
}
}
if(jsonValue.ValueExists("nextToken"))
{
m_nextToken = jsonValue.GetString("nextToken");
}
return *this;
}

View File

@@ -0,0 +1,58 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/ListExclusionsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
ListExclusionsRequest::ListExclusionsRequest() :
m_assessmentRunArnHasBeenSet(false),
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false)
{
}
Aws::String ListExclusionsRequest::SerializePayload() const
{
JsonValue payload;
if(m_assessmentRunArnHasBeenSet)
{
payload.WithString("assessmentRunArn", m_assessmentRunArn);
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("nextToken", m_nextToken);
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("maxResults", m_maxResults);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection ListExclusionsRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "InspectorService.ListExclusions"));
return headers;
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/ListExclusionsResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
ListExclusionsResult::ListExclusionsResult()
{
}
ListExclusionsResult::ListExclusionsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListExclusionsResult& ListExclusionsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("exclusionArns"))
{
Array<JsonView> exclusionArnsJsonList = jsonValue.GetArray("exclusionArns");
for(unsigned exclusionArnsIndex = 0; exclusionArnsIndex < exclusionArnsJsonList.GetLength(); ++exclusionArnsIndex)
{
m_exclusionArns.push_back(exclusionArnsJsonList[exclusionArnsIndex].AsString());
}
}
if(jsonValue.ValueExists("nextToken"))
{
m_nextToken = jsonValue.GetString("nextToken");
}
return *this;
}

View File

@@ -0,0 +1,70 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/ListFindingsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
ListFindingsRequest::ListFindingsRequest() :
m_assessmentRunArnsHasBeenSet(false),
m_filterHasBeenSet(false),
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false)
{
}
Aws::String ListFindingsRequest::SerializePayload() const
{
JsonValue payload;
if(m_assessmentRunArnsHasBeenSet)
{
Array<JsonValue> assessmentRunArnsJsonList(m_assessmentRunArns.size());
for(unsigned assessmentRunArnsIndex = 0; assessmentRunArnsIndex < assessmentRunArnsJsonList.GetLength(); ++assessmentRunArnsIndex)
{
assessmentRunArnsJsonList[assessmentRunArnsIndex].AsString(m_assessmentRunArns[assessmentRunArnsIndex]);
}
payload.WithArray("assessmentRunArns", std::move(assessmentRunArnsJsonList));
}
if(m_filterHasBeenSet)
{
payload.WithObject("filter", m_filter.Jsonize());
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("nextToken", m_nextToken);
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("maxResults", m_maxResults);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection ListFindingsRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "InspectorService.ListFindings"));
return headers;
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/ListFindingsResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
ListFindingsResult::ListFindingsResult()
{
}
ListFindingsResult::ListFindingsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListFindingsResult& ListFindingsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("findingArns"))
{
Array<JsonView> findingArnsJsonList = jsonValue.GetArray("findingArns");
for(unsigned findingArnsIndex = 0; findingArnsIndex < findingArnsJsonList.GetLength(); ++findingArnsIndex)
{
m_findingArns.push_back(findingArnsJsonList[findingArnsIndex].AsString());
}
}
if(jsonValue.ValueExists("nextToken"))
{
m_nextToken = jsonValue.GetString("nextToken");
}
return *this;
}

View File

@@ -0,0 +1,51 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/ListRulesPackagesRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
ListRulesPackagesRequest::ListRulesPackagesRequest() :
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false)
{
}
Aws::String ListRulesPackagesRequest::SerializePayload() const
{
JsonValue payload;
if(m_nextTokenHasBeenSet)
{
payload.WithString("nextToken", m_nextToken);
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("maxResults", m_maxResults);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection ListRulesPackagesRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "InspectorService.ListRulesPackages"));
return headers;
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/ListRulesPackagesResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
ListRulesPackagesResult::ListRulesPackagesResult()
{
}
ListRulesPackagesResult::ListRulesPackagesResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListRulesPackagesResult& ListRulesPackagesResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("rulesPackageArns"))
{
Array<JsonView> rulesPackageArnsJsonList = jsonValue.GetArray("rulesPackageArns");
for(unsigned rulesPackageArnsIndex = 0; rulesPackageArnsIndex < rulesPackageArnsJsonList.GetLength(); ++rulesPackageArnsIndex)
{
m_rulesPackageArns.push_back(rulesPackageArnsJsonList[rulesPackageArnsIndex].AsString());
}
}
if(jsonValue.ValueExists("nextToken"))
{
m_nextToken = jsonValue.GetString("nextToken");
}
return *this;
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/ListTagsForResourceRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
ListTagsForResourceRequest::ListTagsForResourceRequest() :
m_resourceArnHasBeenSet(false)
{
}
Aws::String ListTagsForResourceRequest::SerializePayload() const
{
JsonValue payload;
if(m_resourceArnHasBeenSet)
{
payload.WithString("resourceArn", m_resourceArn);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection ListTagsForResourceRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "InspectorService.ListTagsForResource"));
return headers;
}

View File

@@ -0,0 +1,43 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/ListTagsForResourceResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
ListTagsForResourceResult::ListTagsForResourceResult()
{
}
ListTagsForResourceResult::ListTagsForResourceResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
ListTagsForResourceResult& ListTagsForResourceResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("tags"))
{
Array<JsonView> tagsJsonList = jsonValue.GetArray("tags");
for(unsigned tagsIndex = 0; tagsIndex < tagsJsonList.GetLength(); ++tagsIndex)
{
m_tags.push_back(tagsJsonList[tagsIndex].AsObject());
}
}
return *this;
}

View File

@@ -0,0 +1,63 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/Locale.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace Inspector
{
namespace Model
{
namespace LocaleMapper
{
static const int EN_US_HASH = HashingUtils::HashString("EN_US");
Locale GetLocaleForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == EN_US_HASH)
{
return Locale::EN_US;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<Locale>(hashCode);
}
return Locale::NOT_SET;
}
Aws::String GetNameForLocale(Locale enumValue)
{
switch(enumValue)
{
case Locale::EN_US:
return "EN_US";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace LocaleMapper
} // namespace Model
} // namespace Inspector
} // namespace Aws

View File

@@ -0,0 +1,218 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/NetworkInterface.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Inspector
{
namespace Model
{
NetworkInterface::NetworkInterface() :
m_networkInterfaceIdHasBeenSet(false),
m_subnetIdHasBeenSet(false),
m_vpcIdHasBeenSet(false),
m_privateDnsNameHasBeenSet(false),
m_privateIpAddressHasBeenSet(false),
m_privateIpAddressesHasBeenSet(false),
m_publicDnsNameHasBeenSet(false),
m_publicIpHasBeenSet(false),
m_ipv6AddressesHasBeenSet(false),
m_securityGroupsHasBeenSet(false)
{
}
NetworkInterface::NetworkInterface(JsonView jsonValue) :
m_networkInterfaceIdHasBeenSet(false),
m_subnetIdHasBeenSet(false),
m_vpcIdHasBeenSet(false),
m_privateDnsNameHasBeenSet(false),
m_privateIpAddressHasBeenSet(false),
m_privateIpAddressesHasBeenSet(false),
m_publicDnsNameHasBeenSet(false),
m_publicIpHasBeenSet(false),
m_ipv6AddressesHasBeenSet(false),
m_securityGroupsHasBeenSet(false)
{
*this = jsonValue;
}
NetworkInterface& NetworkInterface::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("networkInterfaceId"))
{
m_networkInterfaceId = jsonValue.GetString("networkInterfaceId");
m_networkInterfaceIdHasBeenSet = true;
}
if(jsonValue.ValueExists("subnetId"))
{
m_subnetId = jsonValue.GetString("subnetId");
m_subnetIdHasBeenSet = true;
}
if(jsonValue.ValueExists("vpcId"))
{
m_vpcId = jsonValue.GetString("vpcId");
m_vpcIdHasBeenSet = true;
}
if(jsonValue.ValueExists("privateDnsName"))
{
m_privateDnsName = jsonValue.GetString("privateDnsName");
m_privateDnsNameHasBeenSet = true;
}
if(jsonValue.ValueExists("privateIpAddress"))
{
m_privateIpAddress = jsonValue.GetString("privateIpAddress");
m_privateIpAddressHasBeenSet = true;
}
if(jsonValue.ValueExists("privateIpAddresses"))
{
Array<JsonView> privateIpAddressesJsonList = jsonValue.GetArray("privateIpAddresses");
for(unsigned privateIpAddressesIndex = 0; privateIpAddressesIndex < privateIpAddressesJsonList.GetLength(); ++privateIpAddressesIndex)
{
m_privateIpAddresses.push_back(privateIpAddressesJsonList[privateIpAddressesIndex].AsObject());
}
m_privateIpAddressesHasBeenSet = true;
}
if(jsonValue.ValueExists("publicDnsName"))
{
m_publicDnsName = jsonValue.GetString("publicDnsName");
m_publicDnsNameHasBeenSet = true;
}
if(jsonValue.ValueExists("publicIp"))
{
m_publicIp = jsonValue.GetString("publicIp");
m_publicIpHasBeenSet = true;
}
if(jsonValue.ValueExists("ipv6Addresses"))
{
Array<JsonView> ipv6AddressesJsonList = jsonValue.GetArray("ipv6Addresses");
for(unsigned ipv6AddressesIndex = 0; ipv6AddressesIndex < ipv6AddressesJsonList.GetLength(); ++ipv6AddressesIndex)
{
m_ipv6Addresses.push_back(ipv6AddressesJsonList[ipv6AddressesIndex].AsString());
}
m_ipv6AddressesHasBeenSet = true;
}
if(jsonValue.ValueExists("securityGroups"))
{
Array<JsonView> securityGroupsJsonList = jsonValue.GetArray("securityGroups");
for(unsigned securityGroupsIndex = 0; securityGroupsIndex < securityGroupsJsonList.GetLength(); ++securityGroupsIndex)
{
m_securityGroups.push_back(securityGroupsJsonList[securityGroupsIndex].AsObject());
}
m_securityGroupsHasBeenSet = true;
}
return *this;
}
JsonValue NetworkInterface::Jsonize() const
{
JsonValue payload;
if(m_networkInterfaceIdHasBeenSet)
{
payload.WithString("networkInterfaceId", m_networkInterfaceId);
}
if(m_subnetIdHasBeenSet)
{
payload.WithString("subnetId", m_subnetId);
}
if(m_vpcIdHasBeenSet)
{
payload.WithString("vpcId", m_vpcId);
}
if(m_privateDnsNameHasBeenSet)
{
payload.WithString("privateDnsName", m_privateDnsName);
}
if(m_privateIpAddressHasBeenSet)
{
payload.WithString("privateIpAddress", m_privateIpAddress);
}
if(m_privateIpAddressesHasBeenSet)
{
Array<JsonValue> privateIpAddressesJsonList(m_privateIpAddresses.size());
for(unsigned privateIpAddressesIndex = 0; privateIpAddressesIndex < privateIpAddressesJsonList.GetLength(); ++privateIpAddressesIndex)
{
privateIpAddressesJsonList[privateIpAddressesIndex].AsObject(m_privateIpAddresses[privateIpAddressesIndex].Jsonize());
}
payload.WithArray("privateIpAddresses", std::move(privateIpAddressesJsonList));
}
if(m_publicDnsNameHasBeenSet)
{
payload.WithString("publicDnsName", m_publicDnsName);
}
if(m_publicIpHasBeenSet)
{
payload.WithString("publicIp", m_publicIp);
}
if(m_ipv6AddressesHasBeenSet)
{
Array<JsonValue> ipv6AddressesJsonList(m_ipv6Addresses.size());
for(unsigned ipv6AddressesIndex = 0; ipv6AddressesIndex < ipv6AddressesJsonList.GetLength(); ++ipv6AddressesIndex)
{
ipv6AddressesJsonList[ipv6AddressesIndex].AsString(m_ipv6Addresses[ipv6AddressesIndex]);
}
payload.WithArray("ipv6Addresses", std::move(ipv6AddressesJsonList));
}
if(m_securityGroupsHasBeenSet)
{
Array<JsonValue> securityGroupsJsonList(m_securityGroups.size());
for(unsigned securityGroupsIndex = 0; securityGroupsIndex < securityGroupsJsonList.GetLength(); ++securityGroupsIndex)
{
securityGroupsJsonList[securityGroupsIndex].AsObject(m_securityGroups[securityGroupsIndex].Jsonize());
}
payload.WithArray("securityGroups", std::move(securityGroupsJsonList));
}
return payload;
}
} // namespace Model
} // namespace Inspector
} // namespace Aws

View File

@@ -0,0 +1,112 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/NoSuchEntityErrorCode.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace Inspector
{
namespace Model
{
namespace NoSuchEntityErrorCodeMapper
{
static const int ASSESSMENT_TARGET_DOES_NOT_EXIST_HASH = HashingUtils::HashString("ASSESSMENT_TARGET_DOES_NOT_EXIST");
static const int ASSESSMENT_TEMPLATE_DOES_NOT_EXIST_HASH = HashingUtils::HashString("ASSESSMENT_TEMPLATE_DOES_NOT_EXIST");
static const int ASSESSMENT_RUN_DOES_NOT_EXIST_HASH = HashingUtils::HashString("ASSESSMENT_RUN_DOES_NOT_EXIST");
static const int FINDING_DOES_NOT_EXIST_HASH = HashingUtils::HashString("FINDING_DOES_NOT_EXIST");
static const int RESOURCE_GROUP_DOES_NOT_EXIST_HASH = HashingUtils::HashString("RESOURCE_GROUP_DOES_NOT_EXIST");
static const int RULES_PACKAGE_DOES_NOT_EXIST_HASH = HashingUtils::HashString("RULES_PACKAGE_DOES_NOT_EXIST");
static const int SNS_TOPIC_DOES_NOT_EXIST_HASH = HashingUtils::HashString("SNS_TOPIC_DOES_NOT_EXIST");
static const int IAM_ROLE_DOES_NOT_EXIST_HASH = HashingUtils::HashString("IAM_ROLE_DOES_NOT_EXIST");
NoSuchEntityErrorCode GetNoSuchEntityErrorCodeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == ASSESSMENT_TARGET_DOES_NOT_EXIST_HASH)
{
return NoSuchEntityErrorCode::ASSESSMENT_TARGET_DOES_NOT_EXIST;
}
else if (hashCode == ASSESSMENT_TEMPLATE_DOES_NOT_EXIST_HASH)
{
return NoSuchEntityErrorCode::ASSESSMENT_TEMPLATE_DOES_NOT_EXIST;
}
else if (hashCode == ASSESSMENT_RUN_DOES_NOT_EXIST_HASH)
{
return NoSuchEntityErrorCode::ASSESSMENT_RUN_DOES_NOT_EXIST;
}
else if (hashCode == FINDING_DOES_NOT_EXIST_HASH)
{
return NoSuchEntityErrorCode::FINDING_DOES_NOT_EXIST;
}
else if (hashCode == RESOURCE_GROUP_DOES_NOT_EXIST_HASH)
{
return NoSuchEntityErrorCode::RESOURCE_GROUP_DOES_NOT_EXIST;
}
else if (hashCode == RULES_PACKAGE_DOES_NOT_EXIST_HASH)
{
return NoSuchEntityErrorCode::RULES_PACKAGE_DOES_NOT_EXIST;
}
else if (hashCode == SNS_TOPIC_DOES_NOT_EXIST_HASH)
{
return NoSuchEntityErrorCode::SNS_TOPIC_DOES_NOT_EXIST;
}
else if (hashCode == IAM_ROLE_DOES_NOT_EXIST_HASH)
{
return NoSuchEntityErrorCode::IAM_ROLE_DOES_NOT_EXIST;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<NoSuchEntityErrorCode>(hashCode);
}
return NoSuchEntityErrorCode::NOT_SET;
}
Aws::String GetNameForNoSuchEntityErrorCode(NoSuchEntityErrorCode enumValue)
{
switch(enumValue)
{
case NoSuchEntityErrorCode::ASSESSMENT_TARGET_DOES_NOT_EXIST:
return "ASSESSMENT_TARGET_DOES_NOT_EXIST";
case NoSuchEntityErrorCode::ASSESSMENT_TEMPLATE_DOES_NOT_EXIST:
return "ASSESSMENT_TEMPLATE_DOES_NOT_EXIST";
case NoSuchEntityErrorCode::ASSESSMENT_RUN_DOES_NOT_EXIST:
return "ASSESSMENT_RUN_DOES_NOT_EXIST";
case NoSuchEntityErrorCode::FINDING_DOES_NOT_EXIST:
return "FINDING_DOES_NOT_EXIST";
case NoSuchEntityErrorCode::RESOURCE_GROUP_DOES_NOT_EXIST:
return "RESOURCE_GROUP_DOES_NOT_EXIST";
case NoSuchEntityErrorCode::RULES_PACKAGE_DOES_NOT_EXIST:
return "RULES_PACKAGE_DOES_NOT_EXIST";
case NoSuchEntityErrorCode::SNS_TOPIC_DOES_NOT_EXIST:
return "SNS_TOPIC_DOES_NOT_EXIST";
case NoSuchEntityErrorCode::IAM_ROLE_DOES_NOT_EXIST:
return "IAM_ROLE_DOES_NOT_EXIST";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace NoSuchEntityErrorCodeMapper
} // namespace Model
} // namespace Inspector
} // namespace Aws

View File

@@ -0,0 +1,92 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/NoSuchEntityException.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Inspector
{
namespace Model
{
NoSuchEntityException::NoSuchEntityException() :
m_messageHasBeenSet(false),
m_errorCode(NoSuchEntityErrorCode::NOT_SET),
m_errorCodeHasBeenSet(false),
m_canRetry(false),
m_canRetryHasBeenSet(false)
{
}
NoSuchEntityException::NoSuchEntityException(JsonView jsonValue) :
m_messageHasBeenSet(false),
m_errorCode(NoSuchEntityErrorCode::NOT_SET),
m_errorCodeHasBeenSet(false),
m_canRetry(false),
m_canRetryHasBeenSet(false)
{
*this = jsonValue;
}
NoSuchEntityException& NoSuchEntityException::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("message"))
{
m_message = jsonValue.GetString("message");
m_messageHasBeenSet = true;
}
if(jsonValue.ValueExists("errorCode"))
{
m_errorCode = NoSuchEntityErrorCodeMapper::GetNoSuchEntityErrorCodeForName(jsonValue.GetString("errorCode"));
m_errorCodeHasBeenSet = true;
}
if(jsonValue.ValueExists("canRetry"))
{
m_canRetry = jsonValue.GetBool("canRetry");
m_canRetryHasBeenSet = true;
}
return *this;
}
JsonValue NoSuchEntityException::Jsonize() const
{
JsonValue payload;
if(m_messageHasBeenSet)
{
payload.WithString("message", m_message);
}
if(m_errorCodeHasBeenSet)
{
payload.WithString("errorCode", NoSuchEntityErrorCodeMapper::GetNameForNoSuchEntityErrorCode(m_errorCode));
}
if(m_canRetryHasBeenSet)
{
payload.WithBool("canRetry", m_canRetry);
}
return payload;
}
} // namespace Model
} // namespace Inspector
} // namespace Aws

View File

@@ -0,0 +1,58 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/PreviewAgentsRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
PreviewAgentsRequest::PreviewAgentsRequest() :
m_previewAgentsArnHasBeenSet(false),
m_nextTokenHasBeenSet(false),
m_maxResults(0),
m_maxResultsHasBeenSet(false)
{
}
Aws::String PreviewAgentsRequest::SerializePayload() const
{
JsonValue payload;
if(m_previewAgentsArnHasBeenSet)
{
payload.WithString("previewAgentsArn", m_previewAgentsArn);
}
if(m_nextTokenHasBeenSet)
{
payload.WithString("nextToken", m_nextToken);
}
if(m_maxResultsHasBeenSet)
{
payload.WithInteger("maxResults", m_maxResults);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection PreviewAgentsRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "InspectorService.PreviewAgents"));
return headers;
}

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/PreviewAgentsResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <utility>
using namespace Aws::Inspector::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
PreviewAgentsResult::PreviewAgentsResult()
{
}
PreviewAgentsResult::PreviewAgentsResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
PreviewAgentsResult& PreviewAgentsResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("agentPreviews"))
{
Array<JsonView> agentPreviewsJsonList = jsonValue.GetArray("agentPreviews");
for(unsigned agentPreviewsIndex = 0; agentPreviewsIndex < agentPreviewsJsonList.GetLength(); ++agentPreviewsIndex)
{
m_agentPreviews.push_back(agentPreviewsJsonList[agentPreviewsIndex].AsObject());
}
}
if(jsonValue.ValueExists("nextToken"))
{
m_nextToken = jsonValue.GetString("nextToken");
}
return *this;
}

View File

@@ -0,0 +1,70 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/PreviewStatus.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace Inspector
{
namespace Model
{
namespace PreviewStatusMapper
{
static const int WORK_IN_PROGRESS_HASH = HashingUtils::HashString("WORK_IN_PROGRESS");
static const int COMPLETED_HASH = HashingUtils::HashString("COMPLETED");
PreviewStatus GetPreviewStatusForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == WORK_IN_PROGRESS_HASH)
{
return PreviewStatus::WORK_IN_PROGRESS;
}
else if (hashCode == COMPLETED_HASH)
{
return PreviewStatus::COMPLETED;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<PreviewStatus>(hashCode);
}
return PreviewStatus::NOT_SET;
}
Aws::String GetNameForPreviewStatus(PreviewStatus enumValue)
{
switch(enumValue)
{
case PreviewStatus::WORK_IN_PROGRESS:
return "WORK_IN_PROGRESS";
case PreviewStatus::COMPLETED:
return "COMPLETED";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace PreviewStatusMapper
} // namespace Model
} // namespace Inspector
} // namespace Aws

View File

@@ -0,0 +1,74 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/inspector/model/PrivateIp.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace Inspector
{
namespace Model
{
PrivateIp::PrivateIp() :
m_privateDnsNameHasBeenSet(false),
m_privateIpAddressHasBeenSet(false)
{
}
PrivateIp::PrivateIp(JsonView jsonValue) :
m_privateDnsNameHasBeenSet(false),
m_privateIpAddressHasBeenSet(false)
{
*this = jsonValue;
}
PrivateIp& PrivateIp::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("privateDnsName"))
{
m_privateDnsName = jsonValue.GetString("privateDnsName");
m_privateDnsNameHasBeenSet = true;
}
if(jsonValue.ValueExists("privateIpAddress"))
{
m_privateIpAddress = jsonValue.GetString("privateIpAddress");
m_privateIpAddressHasBeenSet = true;
}
return *this;
}
JsonValue PrivateIp::Jsonize() const
{
JsonValue payload;
if(m_privateDnsNameHasBeenSet)
{
payload.WithString("privateDnsName", m_privateDnsName);
}
if(m_privateIpAddressHasBeenSet)
{
payload.WithString("privateIpAddress", m_privateIpAddress);
}
return payload;
}
} // namespace Model
} // namespace Inspector
} // namespace Aws

Some files were not shown because too many files have changed in this diff Show More