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

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,64 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/SSMEndpoint.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <aws/core/utils/HashingUtils.h>
using namespace Aws;
using namespace Aws::SSM;
namespace Aws
{
namespace SSM
{
namespace SSMEndpoint
{
static const int CN_NORTH_1_HASH = Aws::Utils::HashingUtils::HashString("cn-north-1");
static const int CN_NORTHWEST_1_HASH = Aws::Utils::HashingUtils::HashString("cn-northwest-1");
static const int US_ISO_EAST_1_HASH = Aws::Utils::HashingUtils::HashString("us-iso-east-1");
static const int US_ISOB_EAST_1_HASH = Aws::Utils::HashingUtils::HashString("us-isob-east-1");
Aws::String ForRegion(const Aws::String& regionName, bool useDualStack)
{
// Fallback to us-east-1 if global endpoint does not exists.
Aws::String region = regionName == Aws::Region::AWS_GLOBAL ? Aws::Region::US_EAST_1 : regionName;
auto hash = Aws::Utils::HashingUtils::HashString(region.c_str());
Aws::StringStream ss;
ss << "ssm" << ".";
if(useDualStack)
{
ss << "dualstack.";
}
ss << region;
if (hash == CN_NORTH_1_HASH || hash == CN_NORTHWEST_1_HASH)
{
ss << ".amazonaws.com.cn";
}
else if (hash == US_ISO_EAST_1_HASH)
{
ss << ".c2s.ic.gov";
}
else if (hash == US_ISOB_EAST_1_HASH)
{
ss << ".sc2s.sgov.gov";
}
else
{
ss << ".amazonaws.com";
}
return ss.str();
}
} // namespace SSMEndpoint
} // namespace SSM
} // namespace Aws

View File

@@ -0,0 +1,22 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/core/client/AWSError.h>
#include <aws/ssm/SSMErrorMarshaller.h>
#include <aws/ssm/SSMErrors.h>
using namespace Aws::Client;
using namespace Aws::SSM;
AWSError<CoreErrors> SSMErrorMarshaller::FindErrorByName(const char* errorName) const
{
AWSError<CoreErrors> error = SSMErrorMapper::GetErrorForName(errorName);
if(error.GetErrorType() != CoreErrors::UNKNOWN)
{
return error;
}
return AWSErrorMarshaller::FindErrorByName(errorName);
}

View File

@@ -0,0 +1,656 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/core/client/AWSError.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/ssm/SSMErrors.h>
#include <aws/ssm/model/ResourceDataSyncNotFoundException.h>
#include <aws/ssm/model/OpsItemAlreadyExistsException.h>
#include <aws/ssm/model/ItemSizeLimitExceededException.h>
#include <aws/ssm/model/UnsupportedInventoryItemContextException.h>
#include <aws/ssm/model/ResourceDataSyncAlreadyExistsException.h>
#include <aws/ssm/model/OpsItemLimitExceededException.h>
#include <aws/ssm/model/ItemContentMismatchException.h>
#include <aws/ssm/model/InvalidItemContentException.h>
#include <aws/ssm/model/OpsItemInvalidParameterException.h>
using namespace Aws::Client;
using namespace Aws::Utils;
using namespace Aws::SSM;
using namespace Aws::SSM::Model;
namespace Aws
{
namespace SSM
{
template<> AWS_SSM_API ResourceDataSyncNotFoundException SSMError::GetModeledError()
{
assert(this->GetErrorType() == SSMErrors::RESOURCE_DATA_SYNC_NOT_FOUND);
return ResourceDataSyncNotFoundException(this->GetJsonPayload().View());
}
template<> AWS_SSM_API OpsItemAlreadyExistsException SSMError::GetModeledError()
{
assert(this->GetErrorType() == SSMErrors::OPS_ITEM_ALREADY_EXISTS);
return OpsItemAlreadyExistsException(this->GetJsonPayload().View());
}
template<> AWS_SSM_API ItemSizeLimitExceededException SSMError::GetModeledError()
{
assert(this->GetErrorType() == SSMErrors::ITEM_SIZE_LIMIT_EXCEEDED);
return ItemSizeLimitExceededException(this->GetJsonPayload().View());
}
template<> AWS_SSM_API UnsupportedInventoryItemContextException SSMError::GetModeledError()
{
assert(this->GetErrorType() == SSMErrors::UNSUPPORTED_INVENTORY_ITEM_CONTEXT);
return UnsupportedInventoryItemContextException(this->GetJsonPayload().View());
}
template<> AWS_SSM_API ResourceDataSyncAlreadyExistsException SSMError::GetModeledError()
{
assert(this->GetErrorType() == SSMErrors::RESOURCE_DATA_SYNC_ALREADY_EXISTS);
return ResourceDataSyncAlreadyExistsException(this->GetJsonPayload().View());
}
template<> AWS_SSM_API OpsItemLimitExceededException SSMError::GetModeledError()
{
assert(this->GetErrorType() == SSMErrors::OPS_ITEM_LIMIT_EXCEEDED);
return OpsItemLimitExceededException(this->GetJsonPayload().View());
}
template<> AWS_SSM_API ItemContentMismatchException SSMError::GetModeledError()
{
assert(this->GetErrorType() == SSMErrors::ITEM_CONTENT_MISMATCH);
return ItemContentMismatchException(this->GetJsonPayload().View());
}
template<> AWS_SSM_API InvalidItemContentException SSMError::GetModeledError()
{
assert(this->GetErrorType() == SSMErrors::INVALID_ITEM_CONTENT);
return InvalidItemContentException(this->GetJsonPayload().View());
}
template<> AWS_SSM_API OpsItemInvalidParameterException SSMError::GetModeledError()
{
assert(this->GetErrorType() == SSMErrors::OPS_ITEM_INVALID_PARAMETER);
return OpsItemInvalidParameterException(this->GetJsonPayload().View());
}
namespace SSMErrorMapper
{
static const int INVALID_OUTPUT_LOCATION_HASH = HashingUtils::HashString("InvalidOutputLocation");
static const int RESOURCE_DATA_SYNC_COUNT_EXCEEDED_HASH = HashingUtils::HashString("ResourceDataSyncCountExceededException");
static const int PARAMETER_VERSION_NOT_FOUND_HASH = HashingUtils::HashString("ParameterVersionNotFound");
static const int INVALID_POLICY_TYPE_HASH = HashingUtils::HashString("InvalidPolicyTypeException");
static const int INVALID_AGGREGATOR_HASH = HashingUtils::HashString("InvalidAggregatorException");
static const int INVALID_INVENTORY_REQUEST_HASH = HashingUtils::HashString("InvalidInventoryRequestException");
static const int DUPLICATE_DOCUMENT_VERSION_NAME_HASH = HashingUtils::HashString("DuplicateDocumentVersionName");
static const int INVALID_TYPE_NAME_HASH = HashingUtils::HashString("InvalidTypeNameException");
static const int UNSUPPORTED_INVENTORY_SCHEMA_VERSION_HASH = HashingUtils::HashString("UnsupportedInventorySchemaVersionException");
static const int ASSOCIATION_DOES_NOT_EXIST_HASH = HashingUtils::HashString("AssociationDoesNotExist");
static const int ASSOCIATION_LIMIT_EXCEEDED_HASH = HashingUtils::HashString("AssociationLimitExceeded");
static const int INVALID_OPTION_HASH = HashingUtils::HashString("InvalidOptionException");
static const int PARAMETER_LIMIT_EXCEEDED_HASH = HashingUtils::HashString("ParameterLimitExceeded");
static const int SUB_TYPE_COUNT_LIMIT_EXCEEDED_HASH = HashingUtils::HashString("SubTypeCountLimitExceededException");
static const int ASSOCIATION_VERSION_LIMIT_EXCEEDED_HASH = HashingUtils::HashString("AssociationVersionLimitExceeded");
static const int INVALID_PERMISSION_TYPE_HASH = HashingUtils::HashString("InvalidPermissionType");
static const int INCOMPATIBLE_POLICY_HASH = HashingUtils::HashString("IncompatiblePolicyException");
static const int INVALID_ASSOCIATION_VERSION_HASH = HashingUtils::HashString("InvalidAssociationVersion");
static const int PARAMETER_NOT_FOUND_HASH = HashingUtils::HashString("ParameterNotFound");
static const int INVALID_DOCUMENT_TYPE_HASH = HashingUtils::HashString("InvalidDocumentType");
static const int PARAMETER_ALREADY_EXISTS_HASH = HashingUtils::HashString("ParameterAlreadyExists");
static const int HIERARCHY_LEVEL_LIMIT_EXCEEDED_HASH = HashingUtils::HashString("HierarchyLevelLimitExceededException");
static const int DOCUMENT_VERSION_LIMIT_EXCEEDED_HASH = HashingUtils::HashString("DocumentVersionLimitExceeded");
static const int RESOURCE_DATA_SYNC_NOT_FOUND_HASH = HashingUtils::HashString("ResourceDataSyncNotFoundException");
static const int INVALID_FILTER_VALUE_HASH = HashingUtils::HashString("InvalidFilterValue");
static const int OPS_ITEM_ALREADY_EXISTS_HASH = HashingUtils::HashString("OpsItemAlreadyExistsException");
static const int INVALID_DELETE_INVENTORY_PARAMETERS_HASH = HashingUtils::HashString("InvalidDeleteInventoryParametersException");
static const int FEATURE_NOT_AVAILABLE_HASH = HashingUtils::HashString("FeatureNotAvailableException");
static const int INVALID_PLUGIN_NAME_HASH = HashingUtils::HashString("InvalidPluginName");
static const int INVALID_DOCUMENT_HASH = HashingUtils::HashString("InvalidDocument");
static const int INVALID_AUTOMATION_SIGNAL_HASH = HashingUtils::HashString("InvalidAutomationSignalException");
static const int AUTOMATION_EXECUTION_NOT_FOUND_HASH = HashingUtils::HashString("AutomationExecutionNotFoundException");
static const int INVALID_INVENTORY_ITEM_CONTEXT_HASH = HashingUtils::HashString("InvalidInventoryItemContextException");
static const int RESOURCE_IN_USE_HASH = HashingUtils::HashString("ResourceInUseException");
static const int ASSOCIATION_EXECUTION_DOES_NOT_EXIST_HASH = HashingUtils::HashString("AssociationExecutionDoesNotExist");
static const int INVALID_RESOURCE_ID_HASH = HashingUtils::HashString("InvalidResourceId");
static const int INVALID_INSTANCE_ID_HASH = HashingUtils::HashString("InvalidInstanceId");
static const int ASSOCIATED_INSTANCES_HASH = HashingUtils::HashString("AssociatedInstances");
static const int TARGET_IN_USE_HASH = HashingUtils::HashString("TargetInUseException");
static const int INVALID_KEY_ID_HASH = HashingUtils::HashString("InvalidKeyId");
static const int ALREADY_EXISTS_HASH = HashingUtils::HashString("AlreadyExistsException");
static const int ITEM_SIZE_LIMIT_EXCEEDED_HASH = HashingUtils::HashString("ItemSizeLimitExceededException");
static const int PARAMETER_VERSION_LABEL_LIMIT_EXCEEDED_HASH = HashingUtils::HashString("ParameterVersionLabelLimitExceeded");
static const int INVALID_RESOURCE_TYPE_HASH = HashingUtils::HashString("InvalidResourceType");
static const int DOCUMENT_LIMIT_EXCEEDED_HASH = HashingUtils::HashString("DocumentLimitExceeded");
static const int ASSOCIATION_ALREADY_EXISTS_HASH = HashingUtils::HashString("AssociationAlreadyExists");
static const int INVALID_NEXT_TOKEN_HASH = HashingUtils::HashString("InvalidNextToken");
static const int UNSUPPORTED_OPERATING_SYSTEM_HASH = HashingUtils::HashString("UnsupportedOperatingSystem");
static const int AUTOMATION_EXECUTION_LIMIT_EXCEEDED_HASH = HashingUtils::HashString("AutomationExecutionLimitExceededException");
static const int INVALID_DELETION_ID_HASH = HashingUtils::HashString("InvalidDeletionIdException");
static const int INVALID_TARGET_HASH = HashingUtils::HashString("InvalidTarget");
static const int INVALID_DOCUMENT_CONTENT_HASH = HashingUtils::HashString("InvalidDocumentContent");
static const int UNSUPPORTED_INVENTORY_ITEM_CONTEXT_HASH = HashingUtils::HashString("UnsupportedInventoryItemContextException");
static const int INVALID_POLICY_ATTRIBUTE_HASH = HashingUtils::HashString("InvalidPolicyAttributeException");
static const int AUTOMATION_DEFINITION_VERSION_NOT_FOUND_HASH = HashingUtils::HashString("AutomationDefinitionVersionNotFoundException");
static const int COMPLIANCE_TYPE_COUNT_LIMIT_EXCEEDED_HASH = HashingUtils::HashString("ComplianceTypeCountLimitExceededException");
static const int PARAMETER_MAX_VERSION_LIMIT_EXCEEDED_HASH = HashingUtils::HashString("ParameterMaxVersionLimitExceeded");
static const int AUTOMATION_STEP_NOT_FOUND_HASH = HashingUtils::HashString("AutomationStepNotFoundException");
static const int RESOURCE_DATA_SYNC_ALREADY_EXISTS_HASH = HashingUtils::HashString("ResourceDataSyncAlreadyExistsException");
static const int INVALID_RESULT_ATTRIBUTE_HASH = HashingUtils::HashString("InvalidResultAttributeException");
static const int UNSUPPORTED_FEATURE_REQUIRED_HASH = HashingUtils::HashString("UnsupportedFeatureRequiredException");
static const int STATUS_UNCHANGED_HASH = HashingUtils::HashString("StatusUnchanged");
static const int OPS_ITEM_LIMIT_EXCEEDED_HASH = HashingUtils::HashString("OpsItemLimitExceededException");
static const int DUPLICATE_INSTANCE_ID_HASH = HashingUtils::HashString("DuplicateInstanceId");
static const int DUPLICATE_DOCUMENT_CONTENT_HASH = HashingUtils::HashString("DuplicateDocumentContent");
static const int INVALID_OUTPUT_FOLDER_HASH = HashingUtils::HashString("InvalidOutputFolder");
static const int TOO_MANY_UPDATES_HASH = HashingUtils::HashString("TooManyUpdates");
static const int INVALID_DOCUMENT_SCHEMA_VERSION_HASH = HashingUtils::HashString("InvalidDocumentSchemaVersion");
static const int INVALID_AUTOMATION_STATUS_UPDATE_HASH = HashingUtils::HashString("InvalidAutomationStatusUpdateException");
static const int INVALID_AUTOMATION_EXECUTION_PARAMETERS_HASH = HashingUtils::HashString("InvalidAutomationExecutionParametersException");
static const int ITEM_CONTENT_MISMATCH_HASH = HashingUtils::HashString("ItemContentMismatchException");
static const int PARAMETER_PATTERN_MISMATCH_HASH = HashingUtils::HashString("ParameterPatternMismatchException");
static const int INVALID_INSTANCE_INFORMATION_FILTER_VALUE_HASH = HashingUtils::HashString("InvalidInstanceInformationFilterValue");
static const int INVALID_COMMAND_ID_HASH = HashingUtils::HashString("InvalidCommandId");
static const int INVOCATION_DOES_NOT_EXIST_HASH = HashingUtils::HashString("InvocationDoesNotExist");
static const int TOTAL_SIZE_LIMIT_EXCEEDED_HASH = HashingUtils::HashString("TotalSizeLimitExceededException");
static const int AUTOMATION_DEFINITION_NOT_FOUND_HASH = HashingUtils::HashString("AutomationDefinitionNotFoundException");
static const int CUSTOM_SCHEMA_COUNT_LIMIT_EXCEEDED_HASH = HashingUtils::HashString("CustomSchemaCountLimitExceededException");
static const int INVALID_ALLOWED_PATTERN_HASH = HashingUtils::HashString("InvalidAllowedPatternException");
static const int INVALID_ROLE_HASH = HashingUtils::HashString("InvalidRole");
static const int INVALID_PARAMETERS_HASH = HashingUtils::HashString("InvalidParameters");
static const int TOO_MANY_TAGS_HASH = HashingUtils::HashString("TooManyTagsError");
static const int RESOURCE_LIMIT_EXCEEDED_HASH = HashingUtils::HashString("ResourceLimitExceededException");
static const int INVALID_ACTIVATION_HASH = HashingUtils::HashString("InvalidActivation");
static const int RESOURCE_DATA_SYNC_INVALID_CONFIGURATION_HASH = HashingUtils::HashString("ResourceDataSyncInvalidConfigurationException");
static const int INVALID_ASSOCIATION_HASH = HashingUtils::HashString("InvalidAssociation");
static const int HIERARCHY_TYPE_MISMATCH_HASH = HashingUtils::HashString("HierarchyTypeMismatchException");
static const int DOES_NOT_EXIST_HASH = HashingUtils::HashString("DoesNotExistException");
static const int INVALID_DOCUMENT_OPERATION_HASH = HashingUtils::HashString("InvalidDocumentOperation");
static const int OPS_ITEM_NOT_FOUND_HASH = HashingUtils::HashString("OpsItemNotFoundException");
static const int INVALID_UPDATE_HASH = HashingUtils::HashString("InvalidUpdate");
static const int INVALID_FILTER_OPTION_HASH = HashingUtils::HashString("InvalidFilterOption");
static const int INVALID_ITEM_CONTENT_HASH = HashingUtils::HashString("InvalidItemContentException");
static const int TARGET_NOT_CONNECTED_HASH = HashingUtils::HashString("TargetNotConnected");
static const int DOCUMENT_ALREADY_EXISTS_HASH = HashingUtils::HashString("DocumentAlreadyExists");
static const int UNSUPPORTED_CALENDAR_HASH = HashingUtils::HashString("UnsupportedCalendarException");
static const int INVALID_DOCUMENT_VERSION_HASH = HashingUtils::HashString("InvalidDocumentVersion");
static const int INVALID_NOTIFICATION_CONFIG_HASH = HashingUtils::HashString("InvalidNotificationConfig");
static const int INVALID_SCHEDULE_HASH = HashingUtils::HashString("InvalidSchedule");
static const int INVALID_ACTIVATION_ID_HASH = HashingUtils::HashString("InvalidActivationId");
static const int RESOURCE_DATA_SYNC_CONFLICT_HASH = HashingUtils::HashString("ResourceDataSyncConflictException");
static const int INVALID_FILTER_HASH = HashingUtils::HashString("InvalidFilter");
static const int OPS_ITEM_INVALID_PARAMETER_HASH = HashingUtils::HashString("OpsItemInvalidParameterException");
static const int INVALID_INVENTORY_GROUP_HASH = HashingUtils::HashString("InvalidInventoryGroupException");
static const int POLICIES_LIMIT_EXCEEDED_HASH = HashingUtils::HashString("PoliciesLimitExceededException");
static const int UNSUPPORTED_PARAMETER_TYPE_HASH = HashingUtils::HashString("UnsupportedParameterType");
static const int MAX_DOCUMENT_SIZE_EXCEEDED_HASH = HashingUtils::HashString("MaxDocumentSizeExceeded");
static const int INVALID_FILTER_KEY_HASH = HashingUtils::HashString("InvalidFilterKey");
static const int IDEMPOTENT_PARAMETER_MISMATCH_HASH = HashingUtils::HashString("IdempotentParameterMismatch");
static const int UNSUPPORTED_PLATFORM_TYPE_HASH = HashingUtils::HashString("UnsupportedPlatformType");
static const int SERVICE_SETTING_NOT_FOUND_HASH = HashingUtils::HashString("ServiceSettingNotFound");
static const int DOCUMENT_PERMISSION_LIMIT_HASH = HashingUtils::HashString("DocumentPermissionLimit");
AWSError<CoreErrors> GetErrorForName(const char* errorName)
{
int hashCode = HashingUtils::HashString(errorName);
if (hashCode == INVALID_OUTPUT_LOCATION_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::INVALID_OUTPUT_LOCATION), false);
}
else if (hashCode == RESOURCE_DATA_SYNC_COUNT_EXCEEDED_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::RESOURCE_DATA_SYNC_COUNT_EXCEEDED), false);
}
else if (hashCode == PARAMETER_VERSION_NOT_FOUND_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::PARAMETER_VERSION_NOT_FOUND), false);
}
else if (hashCode == INVALID_POLICY_TYPE_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::INVALID_POLICY_TYPE), false);
}
else if (hashCode == INVALID_AGGREGATOR_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::INVALID_AGGREGATOR), false);
}
else if (hashCode == INVALID_INVENTORY_REQUEST_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::INVALID_INVENTORY_REQUEST), false);
}
else if (hashCode == DUPLICATE_DOCUMENT_VERSION_NAME_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::DUPLICATE_DOCUMENT_VERSION_NAME), false);
}
else if (hashCode == INVALID_TYPE_NAME_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::INVALID_TYPE_NAME), false);
}
else if (hashCode == UNSUPPORTED_INVENTORY_SCHEMA_VERSION_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::UNSUPPORTED_INVENTORY_SCHEMA_VERSION), false);
}
else if (hashCode == ASSOCIATION_DOES_NOT_EXIST_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::ASSOCIATION_DOES_NOT_EXIST), false);
}
else if (hashCode == ASSOCIATION_LIMIT_EXCEEDED_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::ASSOCIATION_LIMIT_EXCEEDED), false);
}
else if (hashCode == INVALID_OPTION_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::INVALID_OPTION), false);
}
else if (hashCode == PARAMETER_LIMIT_EXCEEDED_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::PARAMETER_LIMIT_EXCEEDED), false);
}
else if (hashCode == SUB_TYPE_COUNT_LIMIT_EXCEEDED_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::SUB_TYPE_COUNT_LIMIT_EXCEEDED), false);
}
else if (hashCode == ASSOCIATION_VERSION_LIMIT_EXCEEDED_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::ASSOCIATION_VERSION_LIMIT_EXCEEDED), false);
}
else if (hashCode == INVALID_PERMISSION_TYPE_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::INVALID_PERMISSION_TYPE), false);
}
else if (hashCode == INCOMPATIBLE_POLICY_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::INCOMPATIBLE_POLICY), false);
}
else if (hashCode == INVALID_ASSOCIATION_VERSION_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::INVALID_ASSOCIATION_VERSION), false);
}
else if (hashCode == PARAMETER_NOT_FOUND_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::PARAMETER_NOT_FOUND), false);
}
else if (hashCode == INVALID_DOCUMENT_TYPE_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::INVALID_DOCUMENT_TYPE), false);
}
else if (hashCode == PARAMETER_ALREADY_EXISTS_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::PARAMETER_ALREADY_EXISTS), false);
}
else if (hashCode == HIERARCHY_LEVEL_LIMIT_EXCEEDED_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::HIERARCHY_LEVEL_LIMIT_EXCEEDED), false);
}
else if (hashCode == DOCUMENT_VERSION_LIMIT_EXCEEDED_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::DOCUMENT_VERSION_LIMIT_EXCEEDED), false);
}
else if (hashCode == RESOURCE_DATA_SYNC_NOT_FOUND_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::RESOURCE_DATA_SYNC_NOT_FOUND), false);
}
else if (hashCode == INVALID_FILTER_VALUE_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::INVALID_FILTER_VALUE), false);
}
else if (hashCode == OPS_ITEM_ALREADY_EXISTS_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::OPS_ITEM_ALREADY_EXISTS), false);
}
else if (hashCode == INVALID_DELETE_INVENTORY_PARAMETERS_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::INVALID_DELETE_INVENTORY_PARAMETERS), false);
}
else if (hashCode == FEATURE_NOT_AVAILABLE_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::FEATURE_NOT_AVAILABLE), false);
}
else if (hashCode == INVALID_PLUGIN_NAME_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::INVALID_PLUGIN_NAME), false);
}
else if (hashCode == INVALID_DOCUMENT_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::INVALID_DOCUMENT), false);
}
else if (hashCode == INVALID_AUTOMATION_SIGNAL_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::INVALID_AUTOMATION_SIGNAL), false);
}
else if (hashCode == AUTOMATION_EXECUTION_NOT_FOUND_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::AUTOMATION_EXECUTION_NOT_FOUND), false);
}
else if (hashCode == INVALID_INVENTORY_ITEM_CONTEXT_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::INVALID_INVENTORY_ITEM_CONTEXT), false);
}
else if (hashCode == RESOURCE_IN_USE_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::RESOURCE_IN_USE), false);
}
else if (hashCode == ASSOCIATION_EXECUTION_DOES_NOT_EXIST_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::ASSOCIATION_EXECUTION_DOES_NOT_EXIST), false);
}
else if (hashCode == INVALID_RESOURCE_ID_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::INVALID_RESOURCE_ID), false);
}
else if (hashCode == INVALID_INSTANCE_ID_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::INVALID_INSTANCE_ID), false);
}
else if (hashCode == ASSOCIATED_INSTANCES_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::ASSOCIATED_INSTANCES), false);
}
else if (hashCode == TARGET_IN_USE_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::TARGET_IN_USE), false);
}
else if (hashCode == INVALID_KEY_ID_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::INVALID_KEY_ID), false);
}
else if (hashCode == ALREADY_EXISTS_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::ALREADY_EXISTS), false);
}
else if (hashCode == ITEM_SIZE_LIMIT_EXCEEDED_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::ITEM_SIZE_LIMIT_EXCEEDED), false);
}
else if (hashCode == PARAMETER_VERSION_LABEL_LIMIT_EXCEEDED_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::PARAMETER_VERSION_LABEL_LIMIT_EXCEEDED), false);
}
else if (hashCode == INVALID_RESOURCE_TYPE_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::INVALID_RESOURCE_TYPE), false);
}
else if (hashCode == DOCUMENT_LIMIT_EXCEEDED_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::DOCUMENT_LIMIT_EXCEEDED), false);
}
else if (hashCode == ASSOCIATION_ALREADY_EXISTS_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::ASSOCIATION_ALREADY_EXISTS), false);
}
else if (hashCode == INVALID_NEXT_TOKEN_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::INVALID_NEXT_TOKEN), false);
}
else if (hashCode == UNSUPPORTED_OPERATING_SYSTEM_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::UNSUPPORTED_OPERATING_SYSTEM), false);
}
else if (hashCode == AUTOMATION_EXECUTION_LIMIT_EXCEEDED_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::AUTOMATION_EXECUTION_LIMIT_EXCEEDED), false);
}
else if (hashCode == INVALID_DELETION_ID_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::INVALID_DELETION_ID), false);
}
else if (hashCode == INVALID_TARGET_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::INVALID_TARGET), false);
}
else if (hashCode == INVALID_DOCUMENT_CONTENT_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::INVALID_DOCUMENT_CONTENT), false);
}
else if (hashCode == UNSUPPORTED_INVENTORY_ITEM_CONTEXT_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::UNSUPPORTED_INVENTORY_ITEM_CONTEXT), false);
}
else if (hashCode == INVALID_POLICY_ATTRIBUTE_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::INVALID_POLICY_ATTRIBUTE), false);
}
else if (hashCode == AUTOMATION_DEFINITION_VERSION_NOT_FOUND_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::AUTOMATION_DEFINITION_VERSION_NOT_FOUND), false);
}
else if (hashCode == COMPLIANCE_TYPE_COUNT_LIMIT_EXCEEDED_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::COMPLIANCE_TYPE_COUNT_LIMIT_EXCEEDED), false);
}
else if (hashCode == PARAMETER_MAX_VERSION_LIMIT_EXCEEDED_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::PARAMETER_MAX_VERSION_LIMIT_EXCEEDED), false);
}
else if (hashCode == AUTOMATION_STEP_NOT_FOUND_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::AUTOMATION_STEP_NOT_FOUND), false);
}
else if (hashCode == RESOURCE_DATA_SYNC_ALREADY_EXISTS_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::RESOURCE_DATA_SYNC_ALREADY_EXISTS), false);
}
else if (hashCode == INVALID_RESULT_ATTRIBUTE_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::INVALID_RESULT_ATTRIBUTE), false);
}
else if (hashCode == UNSUPPORTED_FEATURE_REQUIRED_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::UNSUPPORTED_FEATURE_REQUIRED), false);
}
else if (hashCode == STATUS_UNCHANGED_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::STATUS_UNCHANGED), false);
}
else if (hashCode == OPS_ITEM_LIMIT_EXCEEDED_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::OPS_ITEM_LIMIT_EXCEEDED), false);
}
else if (hashCode == DUPLICATE_INSTANCE_ID_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::DUPLICATE_INSTANCE_ID), false);
}
else if (hashCode == DUPLICATE_DOCUMENT_CONTENT_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::DUPLICATE_DOCUMENT_CONTENT), false);
}
else if (hashCode == INVALID_OUTPUT_FOLDER_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::INVALID_OUTPUT_FOLDER), false);
}
else if (hashCode == TOO_MANY_UPDATES_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::TOO_MANY_UPDATES), false);
}
else if (hashCode == INVALID_DOCUMENT_SCHEMA_VERSION_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::INVALID_DOCUMENT_SCHEMA_VERSION), false);
}
else if (hashCode == INVALID_AUTOMATION_STATUS_UPDATE_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::INVALID_AUTOMATION_STATUS_UPDATE), false);
}
else if (hashCode == INVALID_AUTOMATION_EXECUTION_PARAMETERS_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::INVALID_AUTOMATION_EXECUTION_PARAMETERS), false);
}
else if (hashCode == ITEM_CONTENT_MISMATCH_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::ITEM_CONTENT_MISMATCH), false);
}
else if (hashCode == PARAMETER_PATTERN_MISMATCH_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::PARAMETER_PATTERN_MISMATCH), false);
}
else if (hashCode == INVALID_INSTANCE_INFORMATION_FILTER_VALUE_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::INVALID_INSTANCE_INFORMATION_FILTER_VALUE), false);
}
else if (hashCode == INVALID_COMMAND_ID_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::INVALID_COMMAND_ID), false);
}
else if (hashCode == INVOCATION_DOES_NOT_EXIST_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::INVOCATION_DOES_NOT_EXIST), false);
}
else if (hashCode == TOTAL_SIZE_LIMIT_EXCEEDED_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::TOTAL_SIZE_LIMIT_EXCEEDED), false);
}
else if (hashCode == AUTOMATION_DEFINITION_NOT_FOUND_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::AUTOMATION_DEFINITION_NOT_FOUND), false);
}
else if (hashCode == CUSTOM_SCHEMA_COUNT_LIMIT_EXCEEDED_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::CUSTOM_SCHEMA_COUNT_LIMIT_EXCEEDED), false);
}
else if (hashCode == INVALID_ALLOWED_PATTERN_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::INVALID_ALLOWED_PATTERN), false);
}
else if (hashCode == INVALID_ROLE_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::INVALID_ROLE), false);
}
else if (hashCode == INVALID_PARAMETERS_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::INVALID_PARAMETERS), false);
}
else if (hashCode == TOO_MANY_TAGS_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::TOO_MANY_TAGS), false);
}
else if (hashCode == RESOURCE_LIMIT_EXCEEDED_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::RESOURCE_LIMIT_EXCEEDED), false);
}
else if (hashCode == INVALID_ACTIVATION_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::INVALID_ACTIVATION), false);
}
else if (hashCode == RESOURCE_DATA_SYNC_INVALID_CONFIGURATION_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::RESOURCE_DATA_SYNC_INVALID_CONFIGURATION), false);
}
else if (hashCode == INVALID_ASSOCIATION_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::INVALID_ASSOCIATION), false);
}
else if (hashCode == HIERARCHY_TYPE_MISMATCH_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::HIERARCHY_TYPE_MISMATCH), false);
}
else if (hashCode == DOES_NOT_EXIST_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::DOES_NOT_EXIST), false);
}
else if (hashCode == INVALID_DOCUMENT_OPERATION_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::INVALID_DOCUMENT_OPERATION), false);
}
else if (hashCode == OPS_ITEM_NOT_FOUND_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::OPS_ITEM_NOT_FOUND), false);
}
else if (hashCode == INVALID_UPDATE_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::INVALID_UPDATE), false);
}
else if (hashCode == INVALID_FILTER_OPTION_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::INVALID_FILTER_OPTION), false);
}
else if (hashCode == INVALID_ITEM_CONTENT_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::INVALID_ITEM_CONTENT), false);
}
else if (hashCode == TARGET_NOT_CONNECTED_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::TARGET_NOT_CONNECTED), false);
}
else if (hashCode == DOCUMENT_ALREADY_EXISTS_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::DOCUMENT_ALREADY_EXISTS), false);
}
else if (hashCode == UNSUPPORTED_CALENDAR_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::UNSUPPORTED_CALENDAR), false);
}
else if (hashCode == INVALID_DOCUMENT_VERSION_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::INVALID_DOCUMENT_VERSION), false);
}
else if (hashCode == INVALID_NOTIFICATION_CONFIG_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::INVALID_NOTIFICATION_CONFIG), false);
}
else if (hashCode == INVALID_SCHEDULE_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::INVALID_SCHEDULE), false);
}
else if (hashCode == INVALID_ACTIVATION_ID_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::INVALID_ACTIVATION_ID), false);
}
else if (hashCode == RESOURCE_DATA_SYNC_CONFLICT_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::RESOURCE_DATA_SYNC_CONFLICT), false);
}
else if (hashCode == INVALID_FILTER_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::INVALID_FILTER), false);
}
else if (hashCode == OPS_ITEM_INVALID_PARAMETER_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::OPS_ITEM_INVALID_PARAMETER), false);
}
else if (hashCode == INVALID_INVENTORY_GROUP_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::INVALID_INVENTORY_GROUP), false);
}
else if (hashCode == POLICIES_LIMIT_EXCEEDED_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::POLICIES_LIMIT_EXCEEDED), false);
}
else if (hashCode == UNSUPPORTED_PARAMETER_TYPE_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::UNSUPPORTED_PARAMETER_TYPE), false);
}
else if (hashCode == MAX_DOCUMENT_SIZE_EXCEEDED_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::MAX_DOCUMENT_SIZE_EXCEEDED), false);
}
else if (hashCode == INVALID_FILTER_KEY_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::INVALID_FILTER_KEY), false);
}
else if (hashCode == IDEMPOTENT_PARAMETER_MISMATCH_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::IDEMPOTENT_PARAMETER_MISMATCH), false);
}
else if (hashCode == UNSUPPORTED_PLATFORM_TYPE_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::UNSUPPORTED_PLATFORM_TYPE), false);
}
else if (hashCode == SERVICE_SETTING_NOT_FOUND_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::SERVICE_SETTING_NOT_FOUND), false);
}
else if (hashCode == DOCUMENT_PERMISSION_LIMIT_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(SSMErrors::DOCUMENT_PERMISSION_LIMIT), false);
}
return AWSError<CoreErrors>(CoreErrors::UNKNOWN, false);
}
} // namespace SSMErrorMapper
} // namespace SSM
} // 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/ssm/model/AccountSharingInfo.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SSM
{
namespace Model
{
AccountSharingInfo::AccountSharingInfo() :
m_accountIdHasBeenSet(false),
m_sharedDocumentVersionHasBeenSet(false)
{
}
AccountSharingInfo::AccountSharingInfo(JsonView jsonValue) :
m_accountIdHasBeenSet(false),
m_sharedDocumentVersionHasBeenSet(false)
{
*this = jsonValue;
}
AccountSharingInfo& AccountSharingInfo::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("AccountId"))
{
m_accountId = jsonValue.GetString("AccountId");
m_accountIdHasBeenSet = true;
}
if(jsonValue.ValueExists("SharedDocumentVersion"))
{
m_sharedDocumentVersion = jsonValue.GetString("SharedDocumentVersion");
m_sharedDocumentVersionHasBeenSet = true;
}
return *this;
}
JsonValue AccountSharingInfo::Jsonize() const
{
JsonValue payload;
if(m_accountIdHasBeenSet)
{
payload.WithString("AccountId", m_accountId);
}
if(m_sharedDocumentVersionHasBeenSet)
{
payload.WithString("SharedDocumentVersion", m_sharedDocumentVersion);
}
return payload;
}
} // namespace Model
} // namespace SSM
} // namespace Aws

View File

@@ -0,0 +1,206 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/Activation.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SSM
{
namespace Model
{
Activation::Activation() :
m_activationIdHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_defaultInstanceNameHasBeenSet(false),
m_iamRoleHasBeenSet(false),
m_registrationLimit(0),
m_registrationLimitHasBeenSet(false),
m_registrationsCount(0),
m_registrationsCountHasBeenSet(false),
m_expirationDateHasBeenSet(false),
m_expired(false),
m_expiredHasBeenSet(false),
m_createdDateHasBeenSet(false),
m_tagsHasBeenSet(false)
{
}
Activation::Activation(JsonView jsonValue) :
m_activationIdHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_defaultInstanceNameHasBeenSet(false),
m_iamRoleHasBeenSet(false),
m_registrationLimit(0),
m_registrationLimitHasBeenSet(false),
m_registrationsCount(0),
m_registrationsCountHasBeenSet(false),
m_expirationDateHasBeenSet(false),
m_expired(false),
m_expiredHasBeenSet(false),
m_createdDateHasBeenSet(false),
m_tagsHasBeenSet(false)
{
*this = jsonValue;
}
Activation& Activation::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("ActivationId"))
{
m_activationId = jsonValue.GetString("ActivationId");
m_activationIdHasBeenSet = true;
}
if(jsonValue.ValueExists("Description"))
{
m_description = jsonValue.GetString("Description");
m_descriptionHasBeenSet = true;
}
if(jsonValue.ValueExists("DefaultInstanceName"))
{
m_defaultInstanceName = jsonValue.GetString("DefaultInstanceName");
m_defaultInstanceNameHasBeenSet = true;
}
if(jsonValue.ValueExists("IamRole"))
{
m_iamRole = jsonValue.GetString("IamRole");
m_iamRoleHasBeenSet = true;
}
if(jsonValue.ValueExists("RegistrationLimit"))
{
m_registrationLimit = jsonValue.GetInteger("RegistrationLimit");
m_registrationLimitHasBeenSet = true;
}
if(jsonValue.ValueExists("RegistrationsCount"))
{
m_registrationsCount = jsonValue.GetInteger("RegistrationsCount");
m_registrationsCountHasBeenSet = true;
}
if(jsonValue.ValueExists("ExpirationDate"))
{
m_expirationDate = jsonValue.GetDouble("ExpirationDate");
m_expirationDateHasBeenSet = true;
}
if(jsonValue.ValueExists("Expired"))
{
m_expired = jsonValue.GetBool("Expired");
m_expiredHasBeenSet = true;
}
if(jsonValue.ValueExists("CreatedDate"))
{
m_createdDate = jsonValue.GetDouble("CreatedDate");
m_createdDateHasBeenSet = 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;
}
return *this;
}
JsonValue Activation::Jsonize() const
{
JsonValue payload;
if(m_activationIdHasBeenSet)
{
payload.WithString("ActivationId", m_activationId);
}
if(m_descriptionHasBeenSet)
{
payload.WithString("Description", m_description);
}
if(m_defaultInstanceNameHasBeenSet)
{
payload.WithString("DefaultInstanceName", m_defaultInstanceName);
}
if(m_iamRoleHasBeenSet)
{
payload.WithString("IamRole", m_iamRole);
}
if(m_registrationLimitHasBeenSet)
{
payload.WithInteger("RegistrationLimit", m_registrationLimit);
}
if(m_registrationsCountHasBeenSet)
{
payload.WithInteger("RegistrationsCount", m_registrationsCount);
}
if(m_expirationDateHasBeenSet)
{
payload.WithDouble("ExpirationDate", m_expirationDate.SecondsWithMSPrecision());
}
if(m_expiredHasBeenSet)
{
payload.WithBool("Expired", m_expired);
}
if(m_createdDateHasBeenSet)
{
payload.WithDouble("CreatedDate", m_createdDate.SecondsWithMSPrecision());
}
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));
}
return payload;
}
} // namespace Model
} // namespace SSM
} // namespace Aws

View File

@@ -0,0 +1,62 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/AddTagsToResourceRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::SSM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
AddTagsToResourceRequest::AddTagsToResourceRequest() :
m_resourceType(ResourceTypeForTagging::NOT_SET),
m_resourceTypeHasBeenSet(false),
m_resourceIdHasBeenSet(false),
m_tagsHasBeenSet(false)
{
}
Aws::String AddTagsToResourceRequest::SerializePayload() const
{
JsonValue payload;
if(m_resourceTypeHasBeenSet)
{
payload.WithString("ResourceType", ResourceTypeForTaggingMapper::GetNameForResourceTypeForTagging(m_resourceType));
}
if(m_resourceIdHasBeenSet)
{
payload.WithString("ResourceId", m_resourceId);
}
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));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection AddTagsToResourceRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AmazonSSM.AddTagsToResource"));
return headers;
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/AddTagsToResourceResult.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::SSM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
AddTagsToResourceResult::AddTagsToResourceResult()
{
}
AddTagsToResourceResult::AddTagsToResourceResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
AddTagsToResourceResult& AddTagsToResourceResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
return *this;
}

View File

@@ -0,0 +1,201 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/Association.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SSM
{
namespace Model
{
Association::Association() :
m_nameHasBeenSet(false),
m_instanceIdHasBeenSet(false),
m_associationIdHasBeenSet(false),
m_associationVersionHasBeenSet(false),
m_documentVersionHasBeenSet(false),
m_targetsHasBeenSet(false),
m_lastExecutionDateHasBeenSet(false),
m_overviewHasBeenSet(false),
m_scheduleExpressionHasBeenSet(false),
m_associationNameHasBeenSet(false)
{
}
Association::Association(JsonView jsonValue) :
m_nameHasBeenSet(false),
m_instanceIdHasBeenSet(false),
m_associationIdHasBeenSet(false),
m_associationVersionHasBeenSet(false),
m_documentVersionHasBeenSet(false),
m_targetsHasBeenSet(false),
m_lastExecutionDateHasBeenSet(false),
m_overviewHasBeenSet(false),
m_scheduleExpressionHasBeenSet(false),
m_associationNameHasBeenSet(false)
{
*this = jsonValue;
}
Association& Association::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Name"))
{
m_name = jsonValue.GetString("Name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("InstanceId"))
{
m_instanceId = jsonValue.GetString("InstanceId");
m_instanceIdHasBeenSet = true;
}
if(jsonValue.ValueExists("AssociationId"))
{
m_associationId = jsonValue.GetString("AssociationId");
m_associationIdHasBeenSet = true;
}
if(jsonValue.ValueExists("AssociationVersion"))
{
m_associationVersion = jsonValue.GetString("AssociationVersion");
m_associationVersionHasBeenSet = true;
}
if(jsonValue.ValueExists("DocumentVersion"))
{
m_documentVersion = jsonValue.GetString("DocumentVersion");
m_documentVersionHasBeenSet = true;
}
if(jsonValue.ValueExists("Targets"))
{
Array<JsonView> targetsJsonList = jsonValue.GetArray("Targets");
for(unsigned targetsIndex = 0; targetsIndex < targetsJsonList.GetLength(); ++targetsIndex)
{
m_targets.push_back(targetsJsonList[targetsIndex].AsObject());
}
m_targetsHasBeenSet = true;
}
if(jsonValue.ValueExists("LastExecutionDate"))
{
m_lastExecutionDate = jsonValue.GetDouble("LastExecutionDate");
m_lastExecutionDateHasBeenSet = true;
}
if(jsonValue.ValueExists("Overview"))
{
m_overview = jsonValue.GetObject("Overview");
m_overviewHasBeenSet = true;
}
if(jsonValue.ValueExists("ScheduleExpression"))
{
m_scheduleExpression = jsonValue.GetString("ScheduleExpression");
m_scheduleExpressionHasBeenSet = true;
}
if(jsonValue.ValueExists("AssociationName"))
{
m_associationName = jsonValue.GetString("AssociationName");
m_associationNameHasBeenSet = true;
}
return *this;
}
JsonValue Association::Jsonize() const
{
JsonValue payload;
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
if(m_instanceIdHasBeenSet)
{
payload.WithString("InstanceId", m_instanceId);
}
if(m_associationIdHasBeenSet)
{
payload.WithString("AssociationId", m_associationId);
}
if(m_associationVersionHasBeenSet)
{
payload.WithString("AssociationVersion", m_associationVersion);
}
if(m_documentVersionHasBeenSet)
{
payload.WithString("DocumentVersion", m_documentVersion);
}
if(m_targetsHasBeenSet)
{
Array<JsonValue> targetsJsonList(m_targets.size());
for(unsigned targetsIndex = 0; targetsIndex < targetsJsonList.GetLength(); ++targetsIndex)
{
targetsJsonList[targetsIndex].AsObject(m_targets[targetsIndex].Jsonize());
}
payload.WithArray("Targets", std::move(targetsJsonList));
}
if(m_lastExecutionDateHasBeenSet)
{
payload.WithDouble("LastExecutionDate", m_lastExecutionDate.SecondsWithMSPrecision());
}
if(m_overviewHasBeenSet)
{
payload.WithObject("Overview", m_overview.Jsonize());
}
if(m_scheduleExpressionHasBeenSet)
{
payload.WithString("ScheduleExpression", m_scheduleExpression);
}
if(m_associationNameHasBeenSet)
{
payload.WithString("AssociationName", m_associationName);
}
return payload;
}
} // namespace Model
} // namespace SSM
} // 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/ssm/model/AssociationComplianceSeverity.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 SSM
{
namespace Model
{
namespace AssociationComplianceSeverityMapper
{
static const int CRITICAL_HASH = HashingUtils::HashString("CRITICAL");
static const int HIGH_HASH = HashingUtils::HashString("HIGH");
static const int MEDIUM_HASH = HashingUtils::HashString("MEDIUM");
static const int LOW_HASH = HashingUtils::HashString("LOW");
static const int UNSPECIFIED_HASH = HashingUtils::HashString("UNSPECIFIED");
AssociationComplianceSeverity GetAssociationComplianceSeverityForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == CRITICAL_HASH)
{
return AssociationComplianceSeverity::CRITICAL;
}
else if (hashCode == HIGH_HASH)
{
return AssociationComplianceSeverity::HIGH;
}
else if (hashCode == MEDIUM_HASH)
{
return AssociationComplianceSeverity::MEDIUM;
}
else if (hashCode == LOW_HASH)
{
return AssociationComplianceSeverity::LOW;
}
else if (hashCode == UNSPECIFIED_HASH)
{
return AssociationComplianceSeverity::UNSPECIFIED;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<AssociationComplianceSeverity>(hashCode);
}
return AssociationComplianceSeverity::NOT_SET;
}
Aws::String GetNameForAssociationComplianceSeverity(AssociationComplianceSeverity enumValue)
{
switch(enumValue)
{
case AssociationComplianceSeverity::CRITICAL:
return "CRITICAL";
case AssociationComplianceSeverity::HIGH:
return "HIGH";
case AssociationComplianceSeverity::MEDIUM:
return "MEDIUM";
case AssociationComplianceSeverity::LOW:
return "LOW";
case AssociationComplianceSeverity::UNSPECIFIED:
return "UNSPECIFIED";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace AssociationComplianceSeverityMapper
} // namespace Model
} // namespace SSM
} // namespace Aws

View File

@@ -0,0 +1,402 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/AssociationDescription.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SSM
{
namespace Model
{
AssociationDescription::AssociationDescription() :
m_nameHasBeenSet(false),
m_instanceIdHasBeenSet(false),
m_associationVersionHasBeenSet(false),
m_dateHasBeenSet(false),
m_lastUpdateAssociationDateHasBeenSet(false),
m_statusHasBeenSet(false),
m_overviewHasBeenSet(false),
m_documentVersionHasBeenSet(false),
m_automationTargetParameterNameHasBeenSet(false),
m_parametersHasBeenSet(false),
m_associationIdHasBeenSet(false),
m_targetsHasBeenSet(false),
m_scheduleExpressionHasBeenSet(false),
m_outputLocationHasBeenSet(false),
m_lastExecutionDateHasBeenSet(false),
m_lastSuccessfulExecutionDateHasBeenSet(false),
m_associationNameHasBeenSet(false),
m_maxErrorsHasBeenSet(false),
m_maxConcurrencyHasBeenSet(false),
m_complianceSeverity(AssociationComplianceSeverity::NOT_SET),
m_complianceSeverityHasBeenSet(false),
m_syncCompliance(AssociationSyncCompliance::NOT_SET),
m_syncComplianceHasBeenSet(false),
m_applyOnlyAtCronInterval(false),
m_applyOnlyAtCronIntervalHasBeenSet(false)
{
}
AssociationDescription::AssociationDescription(JsonView jsonValue) :
m_nameHasBeenSet(false),
m_instanceIdHasBeenSet(false),
m_associationVersionHasBeenSet(false),
m_dateHasBeenSet(false),
m_lastUpdateAssociationDateHasBeenSet(false),
m_statusHasBeenSet(false),
m_overviewHasBeenSet(false),
m_documentVersionHasBeenSet(false),
m_automationTargetParameterNameHasBeenSet(false),
m_parametersHasBeenSet(false),
m_associationIdHasBeenSet(false),
m_targetsHasBeenSet(false),
m_scheduleExpressionHasBeenSet(false),
m_outputLocationHasBeenSet(false),
m_lastExecutionDateHasBeenSet(false),
m_lastSuccessfulExecutionDateHasBeenSet(false),
m_associationNameHasBeenSet(false),
m_maxErrorsHasBeenSet(false),
m_maxConcurrencyHasBeenSet(false),
m_complianceSeverity(AssociationComplianceSeverity::NOT_SET),
m_complianceSeverityHasBeenSet(false),
m_syncCompliance(AssociationSyncCompliance::NOT_SET),
m_syncComplianceHasBeenSet(false),
m_applyOnlyAtCronInterval(false),
m_applyOnlyAtCronIntervalHasBeenSet(false)
{
*this = jsonValue;
}
AssociationDescription& AssociationDescription::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Name"))
{
m_name = jsonValue.GetString("Name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("InstanceId"))
{
m_instanceId = jsonValue.GetString("InstanceId");
m_instanceIdHasBeenSet = true;
}
if(jsonValue.ValueExists("AssociationVersion"))
{
m_associationVersion = jsonValue.GetString("AssociationVersion");
m_associationVersionHasBeenSet = true;
}
if(jsonValue.ValueExists("Date"))
{
m_date = jsonValue.GetDouble("Date");
m_dateHasBeenSet = true;
}
if(jsonValue.ValueExists("LastUpdateAssociationDate"))
{
m_lastUpdateAssociationDate = jsonValue.GetDouble("LastUpdateAssociationDate");
m_lastUpdateAssociationDateHasBeenSet = true;
}
if(jsonValue.ValueExists("Status"))
{
m_status = jsonValue.GetObject("Status");
m_statusHasBeenSet = true;
}
if(jsonValue.ValueExists("Overview"))
{
m_overview = jsonValue.GetObject("Overview");
m_overviewHasBeenSet = true;
}
if(jsonValue.ValueExists("DocumentVersion"))
{
m_documentVersion = jsonValue.GetString("DocumentVersion");
m_documentVersionHasBeenSet = true;
}
if(jsonValue.ValueExists("AutomationTargetParameterName"))
{
m_automationTargetParameterName = jsonValue.GetString("AutomationTargetParameterName");
m_automationTargetParameterNameHasBeenSet = true;
}
if(jsonValue.ValueExists("Parameters"))
{
Aws::Map<Aws::String, JsonView> parametersJsonMap = jsonValue.GetObject("Parameters").GetAllObjects();
for(auto& parametersItem : parametersJsonMap)
{
Array<JsonView> parameterValueListJsonList = parametersItem.second.AsArray();
Aws::Vector<Aws::String> parameterValueListList;
parameterValueListList.reserve((size_t)parameterValueListJsonList.GetLength());
for(unsigned parameterValueListIndex = 0; parameterValueListIndex < parameterValueListJsonList.GetLength(); ++parameterValueListIndex)
{
parameterValueListList.push_back(parameterValueListJsonList[parameterValueListIndex].AsString());
}
m_parameters[parametersItem.first] = std::move(parameterValueListList);
}
m_parametersHasBeenSet = true;
}
if(jsonValue.ValueExists("AssociationId"))
{
m_associationId = jsonValue.GetString("AssociationId");
m_associationIdHasBeenSet = true;
}
if(jsonValue.ValueExists("Targets"))
{
Array<JsonView> targetsJsonList = jsonValue.GetArray("Targets");
for(unsigned targetsIndex = 0; targetsIndex < targetsJsonList.GetLength(); ++targetsIndex)
{
m_targets.push_back(targetsJsonList[targetsIndex].AsObject());
}
m_targetsHasBeenSet = true;
}
if(jsonValue.ValueExists("ScheduleExpression"))
{
m_scheduleExpression = jsonValue.GetString("ScheduleExpression");
m_scheduleExpressionHasBeenSet = true;
}
if(jsonValue.ValueExists("OutputLocation"))
{
m_outputLocation = jsonValue.GetObject("OutputLocation");
m_outputLocationHasBeenSet = true;
}
if(jsonValue.ValueExists("LastExecutionDate"))
{
m_lastExecutionDate = jsonValue.GetDouble("LastExecutionDate");
m_lastExecutionDateHasBeenSet = true;
}
if(jsonValue.ValueExists("LastSuccessfulExecutionDate"))
{
m_lastSuccessfulExecutionDate = jsonValue.GetDouble("LastSuccessfulExecutionDate");
m_lastSuccessfulExecutionDateHasBeenSet = true;
}
if(jsonValue.ValueExists("AssociationName"))
{
m_associationName = jsonValue.GetString("AssociationName");
m_associationNameHasBeenSet = true;
}
if(jsonValue.ValueExists("MaxErrors"))
{
m_maxErrors = jsonValue.GetString("MaxErrors");
m_maxErrorsHasBeenSet = true;
}
if(jsonValue.ValueExists("MaxConcurrency"))
{
m_maxConcurrency = jsonValue.GetString("MaxConcurrency");
m_maxConcurrencyHasBeenSet = true;
}
if(jsonValue.ValueExists("ComplianceSeverity"))
{
m_complianceSeverity = AssociationComplianceSeverityMapper::GetAssociationComplianceSeverityForName(jsonValue.GetString("ComplianceSeverity"));
m_complianceSeverityHasBeenSet = true;
}
if(jsonValue.ValueExists("SyncCompliance"))
{
m_syncCompliance = AssociationSyncComplianceMapper::GetAssociationSyncComplianceForName(jsonValue.GetString("SyncCompliance"));
m_syncComplianceHasBeenSet = true;
}
if(jsonValue.ValueExists("ApplyOnlyAtCronInterval"))
{
m_applyOnlyAtCronInterval = jsonValue.GetBool("ApplyOnlyAtCronInterval");
m_applyOnlyAtCronIntervalHasBeenSet = true;
}
return *this;
}
JsonValue AssociationDescription::Jsonize() const
{
JsonValue payload;
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
if(m_instanceIdHasBeenSet)
{
payload.WithString("InstanceId", m_instanceId);
}
if(m_associationVersionHasBeenSet)
{
payload.WithString("AssociationVersion", m_associationVersion);
}
if(m_dateHasBeenSet)
{
payload.WithDouble("Date", m_date.SecondsWithMSPrecision());
}
if(m_lastUpdateAssociationDateHasBeenSet)
{
payload.WithDouble("LastUpdateAssociationDate", m_lastUpdateAssociationDate.SecondsWithMSPrecision());
}
if(m_statusHasBeenSet)
{
payload.WithObject("Status", m_status.Jsonize());
}
if(m_overviewHasBeenSet)
{
payload.WithObject("Overview", m_overview.Jsonize());
}
if(m_documentVersionHasBeenSet)
{
payload.WithString("DocumentVersion", m_documentVersion);
}
if(m_automationTargetParameterNameHasBeenSet)
{
payload.WithString("AutomationTargetParameterName", m_automationTargetParameterName);
}
if(m_parametersHasBeenSet)
{
JsonValue parametersJsonMap;
for(auto& parametersItem : m_parameters)
{
Array<JsonValue> parameterValueListJsonList(parametersItem.second.size());
for(unsigned parameterValueListIndex = 0; parameterValueListIndex < parameterValueListJsonList.GetLength(); ++parameterValueListIndex)
{
parameterValueListJsonList[parameterValueListIndex].AsString(parametersItem.second[parameterValueListIndex]);
}
parametersJsonMap.WithArray(parametersItem.first, std::move(parameterValueListJsonList));
}
payload.WithObject("Parameters", std::move(parametersJsonMap));
}
if(m_associationIdHasBeenSet)
{
payload.WithString("AssociationId", m_associationId);
}
if(m_targetsHasBeenSet)
{
Array<JsonValue> targetsJsonList(m_targets.size());
for(unsigned targetsIndex = 0; targetsIndex < targetsJsonList.GetLength(); ++targetsIndex)
{
targetsJsonList[targetsIndex].AsObject(m_targets[targetsIndex].Jsonize());
}
payload.WithArray("Targets", std::move(targetsJsonList));
}
if(m_scheduleExpressionHasBeenSet)
{
payload.WithString("ScheduleExpression", m_scheduleExpression);
}
if(m_outputLocationHasBeenSet)
{
payload.WithObject("OutputLocation", m_outputLocation.Jsonize());
}
if(m_lastExecutionDateHasBeenSet)
{
payload.WithDouble("LastExecutionDate", m_lastExecutionDate.SecondsWithMSPrecision());
}
if(m_lastSuccessfulExecutionDateHasBeenSet)
{
payload.WithDouble("LastSuccessfulExecutionDate", m_lastSuccessfulExecutionDate.SecondsWithMSPrecision());
}
if(m_associationNameHasBeenSet)
{
payload.WithString("AssociationName", m_associationName);
}
if(m_maxErrorsHasBeenSet)
{
payload.WithString("MaxErrors", m_maxErrors);
}
if(m_maxConcurrencyHasBeenSet)
{
payload.WithString("MaxConcurrency", m_maxConcurrency);
}
if(m_complianceSeverityHasBeenSet)
{
payload.WithString("ComplianceSeverity", AssociationComplianceSeverityMapper::GetNameForAssociationComplianceSeverity(m_complianceSeverity));
}
if(m_syncComplianceHasBeenSet)
{
payload.WithString("SyncCompliance", AssociationSyncComplianceMapper::GetNameForAssociationSyncCompliance(m_syncCompliance));
}
if(m_applyOnlyAtCronIntervalHasBeenSet)
{
payload.WithBool("ApplyOnlyAtCronInterval", m_applyOnlyAtCronInterval);
}
return payload;
}
} // namespace Model
} // namespace SSM
} // namespace Aws

View File

@@ -0,0 +1,162 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/AssociationExecution.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SSM
{
namespace Model
{
AssociationExecution::AssociationExecution() :
m_associationIdHasBeenSet(false),
m_associationVersionHasBeenSet(false),
m_executionIdHasBeenSet(false),
m_statusHasBeenSet(false),
m_detailedStatusHasBeenSet(false),
m_createdTimeHasBeenSet(false),
m_lastExecutionDateHasBeenSet(false),
m_resourceCountByStatusHasBeenSet(false)
{
}
AssociationExecution::AssociationExecution(JsonView jsonValue) :
m_associationIdHasBeenSet(false),
m_associationVersionHasBeenSet(false),
m_executionIdHasBeenSet(false),
m_statusHasBeenSet(false),
m_detailedStatusHasBeenSet(false),
m_createdTimeHasBeenSet(false),
m_lastExecutionDateHasBeenSet(false),
m_resourceCountByStatusHasBeenSet(false)
{
*this = jsonValue;
}
AssociationExecution& AssociationExecution::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("AssociationId"))
{
m_associationId = jsonValue.GetString("AssociationId");
m_associationIdHasBeenSet = true;
}
if(jsonValue.ValueExists("AssociationVersion"))
{
m_associationVersion = jsonValue.GetString("AssociationVersion");
m_associationVersionHasBeenSet = true;
}
if(jsonValue.ValueExists("ExecutionId"))
{
m_executionId = jsonValue.GetString("ExecutionId");
m_executionIdHasBeenSet = true;
}
if(jsonValue.ValueExists("Status"))
{
m_status = jsonValue.GetString("Status");
m_statusHasBeenSet = true;
}
if(jsonValue.ValueExists("DetailedStatus"))
{
m_detailedStatus = jsonValue.GetString("DetailedStatus");
m_detailedStatusHasBeenSet = true;
}
if(jsonValue.ValueExists("CreatedTime"))
{
m_createdTime = jsonValue.GetDouble("CreatedTime");
m_createdTimeHasBeenSet = true;
}
if(jsonValue.ValueExists("LastExecutionDate"))
{
m_lastExecutionDate = jsonValue.GetDouble("LastExecutionDate");
m_lastExecutionDateHasBeenSet = true;
}
if(jsonValue.ValueExists("ResourceCountByStatus"))
{
m_resourceCountByStatus = jsonValue.GetString("ResourceCountByStatus");
m_resourceCountByStatusHasBeenSet = true;
}
return *this;
}
JsonValue AssociationExecution::Jsonize() const
{
JsonValue payload;
if(m_associationIdHasBeenSet)
{
payload.WithString("AssociationId", m_associationId);
}
if(m_associationVersionHasBeenSet)
{
payload.WithString("AssociationVersion", m_associationVersion);
}
if(m_executionIdHasBeenSet)
{
payload.WithString("ExecutionId", m_executionId);
}
if(m_statusHasBeenSet)
{
payload.WithString("Status", m_status);
}
if(m_detailedStatusHasBeenSet)
{
payload.WithString("DetailedStatus", m_detailedStatus);
}
if(m_createdTimeHasBeenSet)
{
payload.WithDouble("CreatedTime", m_createdTime.SecondsWithMSPrecision());
}
if(m_lastExecutionDateHasBeenSet)
{
payload.WithDouble("LastExecutionDate", m_lastExecutionDate.SecondsWithMSPrecision());
}
if(m_resourceCountByStatusHasBeenSet)
{
payload.WithString("ResourceCountByStatus", m_resourceCountByStatus);
}
return payload;
}
} // namespace Model
} // namespace SSM
} // 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/ssm/model/AssociationExecutionFilter.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SSM
{
namespace Model
{
AssociationExecutionFilter::AssociationExecutionFilter() :
m_key(AssociationExecutionFilterKey::NOT_SET),
m_keyHasBeenSet(false),
m_valueHasBeenSet(false),
m_type(AssociationFilterOperatorType::NOT_SET),
m_typeHasBeenSet(false)
{
}
AssociationExecutionFilter::AssociationExecutionFilter(JsonView jsonValue) :
m_key(AssociationExecutionFilterKey::NOT_SET),
m_keyHasBeenSet(false),
m_valueHasBeenSet(false),
m_type(AssociationFilterOperatorType::NOT_SET),
m_typeHasBeenSet(false)
{
*this = jsonValue;
}
AssociationExecutionFilter& AssociationExecutionFilter::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Key"))
{
m_key = AssociationExecutionFilterKeyMapper::GetAssociationExecutionFilterKeyForName(jsonValue.GetString("Key"));
m_keyHasBeenSet = true;
}
if(jsonValue.ValueExists("Value"))
{
m_value = jsonValue.GetString("Value");
m_valueHasBeenSet = true;
}
if(jsonValue.ValueExists("Type"))
{
m_type = AssociationFilterOperatorTypeMapper::GetAssociationFilterOperatorTypeForName(jsonValue.GetString("Type"));
m_typeHasBeenSet = true;
}
return *this;
}
JsonValue AssociationExecutionFilter::Jsonize() const
{
JsonValue payload;
if(m_keyHasBeenSet)
{
payload.WithString("Key", AssociationExecutionFilterKeyMapper::GetNameForAssociationExecutionFilterKey(m_key));
}
if(m_valueHasBeenSet)
{
payload.WithString("Value", m_value);
}
if(m_typeHasBeenSet)
{
payload.WithString("Type", AssociationFilterOperatorTypeMapper::GetNameForAssociationFilterOperatorType(m_type));
}
return payload;
}
} // namespace Model
} // namespace SSM
} // 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/ssm/model/AssociationExecutionFilterKey.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 SSM
{
namespace Model
{
namespace AssociationExecutionFilterKeyMapper
{
static const int ExecutionId_HASH = HashingUtils::HashString("ExecutionId");
static const int Status_HASH = HashingUtils::HashString("Status");
static const int CreatedTime_HASH = HashingUtils::HashString("CreatedTime");
AssociationExecutionFilterKey GetAssociationExecutionFilterKeyForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == ExecutionId_HASH)
{
return AssociationExecutionFilterKey::ExecutionId;
}
else if (hashCode == Status_HASH)
{
return AssociationExecutionFilterKey::Status;
}
else if (hashCode == CreatedTime_HASH)
{
return AssociationExecutionFilterKey::CreatedTime;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<AssociationExecutionFilterKey>(hashCode);
}
return AssociationExecutionFilterKey::NOT_SET;
}
Aws::String GetNameForAssociationExecutionFilterKey(AssociationExecutionFilterKey enumValue)
{
switch(enumValue)
{
case AssociationExecutionFilterKey::ExecutionId:
return "ExecutionId";
case AssociationExecutionFilterKey::Status:
return "Status";
case AssociationExecutionFilterKey::CreatedTime:
return "CreatedTime";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace AssociationExecutionFilterKeyMapper
} // namespace Model
} // namespace SSM
} // namespace Aws

View File

@@ -0,0 +1,178 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/AssociationExecutionTarget.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SSM
{
namespace Model
{
AssociationExecutionTarget::AssociationExecutionTarget() :
m_associationIdHasBeenSet(false),
m_associationVersionHasBeenSet(false),
m_executionIdHasBeenSet(false),
m_resourceIdHasBeenSet(false),
m_resourceTypeHasBeenSet(false),
m_statusHasBeenSet(false),
m_detailedStatusHasBeenSet(false),
m_lastExecutionDateHasBeenSet(false),
m_outputSourceHasBeenSet(false)
{
}
AssociationExecutionTarget::AssociationExecutionTarget(JsonView jsonValue) :
m_associationIdHasBeenSet(false),
m_associationVersionHasBeenSet(false),
m_executionIdHasBeenSet(false),
m_resourceIdHasBeenSet(false),
m_resourceTypeHasBeenSet(false),
m_statusHasBeenSet(false),
m_detailedStatusHasBeenSet(false),
m_lastExecutionDateHasBeenSet(false),
m_outputSourceHasBeenSet(false)
{
*this = jsonValue;
}
AssociationExecutionTarget& AssociationExecutionTarget::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("AssociationId"))
{
m_associationId = jsonValue.GetString("AssociationId");
m_associationIdHasBeenSet = true;
}
if(jsonValue.ValueExists("AssociationVersion"))
{
m_associationVersion = jsonValue.GetString("AssociationVersion");
m_associationVersionHasBeenSet = true;
}
if(jsonValue.ValueExists("ExecutionId"))
{
m_executionId = jsonValue.GetString("ExecutionId");
m_executionIdHasBeenSet = true;
}
if(jsonValue.ValueExists("ResourceId"))
{
m_resourceId = jsonValue.GetString("ResourceId");
m_resourceIdHasBeenSet = true;
}
if(jsonValue.ValueExists("ResourceType"))
{
m_resourceType = jsonValue.GetString("ResourceType");
m_resourceTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("Status"))
{
m_status = jsonValue.GetString("Status");
m_statusHasBeenSet = true;
}
if(jsonValue.ValueExists("DetailedStatus"))
{
m_detailedStatus = jsonValue.GetString("DetailedStatus");
m_detailedStatusHasBeenSet = true;
}
if(jsonValue.ValueExists("LastExecutionDate"))
{
m_lastExecutionDate = jsonValue.GetDouble("LastExecutionDate");
m_lastExecutionDateHasBeenSet = true;
}
if(jsonValue.ValueExists("OutputSource"))
{
m_outputSource = jsonValue.GetObject("OutputSource");
m_outputSourceHasBeenSet = true;
}
return *this;
}
JsonValue AssociationExecutionTarget::Jsonize() const
{
JsonValue payload;
if(m_associationIdHasBeenSet)
{
payload.WithString("AssociationId", m_associationId);
}
if(m_associationVersionHasBeenSet)
{
payload.WithString("AssociationVersion", m_associationVersion);
}
if(m_executionIdHasBeenSet)
{
payload.WithString("ExecutionId", m_executionId);
}
if(m_resourceIdHasBeenSet)
{
payload.WithString("ResourceId", m_resourceId);
}
if(m_resourceTypeHasBeenSet)
{
payload.WithString("ResourceType", m_resourceType);
}
if(m_statusHasBeenSet)
{
payload.WithString("Status", m_status);
}
if(m_detailedStatusHasBeenSet)
{
payload.WithString("DetailedStatus", m_detailedStatus);
}
if(m_lastExecutionDateHasBeenSet)
{
payload.WithDouble("LastExecutionDate", m_lastExecutionDate.SecondsWithMSPrecision());
}
if(m_outputSourceHasBeenSet)
{
payload.WithObject("OutputSource", m_outputSource.Jsonize());
}
return payload;
}
} // namespace Model
} // namespace SSM
} // namespace Aws

View File

@@ -0,0 +1,75 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/AssociationExecutionTargetsFilter.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SSM
{
namespace Model
{
AssociationExecutionTargetsFilter::AssociationExecutionTargetsFilter() :
m_key(AssociationExecutionTargetsFilterKey::NOT_SET),
m_keyHasBeenSet(false),
m_valueHasBeenSet(false)
{
}
AssociationExecutionTargetsFilter::AssociationExecutionTargetsFilter(JsonView jsonValue) :
m_key(AssociationExecutionTargetsFilterKey::NOT_SET),
m_keyHasBeenSet(false),
m_valueHasBeenSet(false)
{
*this = jsonValue;
}
AssociationExecutionTargetsFilter& AssociationExecutionTargetsFilter::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Key"))
{
m_key = AssociationExecutionTargetsFilterKeyMapper::GetAssociationExecutionTargetsFilterKeyForName(jsonValue.GetString("Key"));
m_keyHasBeenSet = true;
}
if(jsonValue.ValueExists("Value"))
{
m_value = jsonValue.GetString("Value");
m_valueHasBeenSet = true;
}
return *this;
}
JsonValue AssociationExecutionTargetsFilter::Jsonize() const
{
JsonValue payload;
if(m_keyHasBeenSet)
{
payload.WithString("Key", AssociationExecutionTargetsFilterKeyMapper::GetNameForAssociationExecutionTargetsFilterKey(m_key));
}
if(m_valueHasBeenSet)
{
payload.WithString("Value", m_value);
}
return payload;
}
} // namespace Model
} // namespace SSM
} // 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/ssm/model/AssociationExecutionTargetsFilterKey.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 SSM
{
namespace Model
{
namespace AssociationExecutionTargetsFilterKeyMapper
{
static const int Status_HASH = HashingUtils::HashString("Status");
static const int ResourceId_HASH = HashingUtils::HashString("ResourceId");
static const int ResourceType_HASH = HashingUtils::HashString("ResourceType");
AssociationExecutionTargetsFilterKey GetAssociationExecutionTargetsFilterKeyForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == Status_HASH)
{
return AssociationExecutionTargetsFilterKey::Status;
}
else if (hashCode == ResourceId_HASH)
{
return AssociationExecutionTargetsFilterKey::ResourceId;
}
else if (hashCode == ResourceType_HASH)
{
return AssociationExecutionTargetsFilterKey::ResourceType;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<AssociationExecutionTargetsFilterKey>(hashCode);
}
return AssociationExecutionTargetsFilterKey::NOT_SET;
}
Aws::String GetNameForAssociationExecutionTargetsFilterKey(AssociationExecutionTargetsFilterKey enumValue)
{
switch(enumValue)
{
case AssociationExecutionTargetsFilterKey::Status:
return "Status";
case AssociationExecutionTargetsFilterKey::ResourceId:
return "ResourceId";
case AssociationExecutionTargetsFilterKey::ResourceType:
return "ResourceType";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace AssociationExecutionTargetsFilterKeyMapper
} // namespace Model
} // namespace SSM
} // namespace Aws

View File

@@ -0,0 +1,75 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/AssociationFilter.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SSM
{
namespace Model
{
AssociationFilter::AssociationFilter() :
m_key(AssociationFilterKey::NOT_SET),
m_keyHasBeenSet(false),
m_valueHasBeenSet(false)
{
}
AssociationFilter::AssociationFilter(JsonView jsonValue) :
m_key(AssociationFilterKey::NOT_SET),
m_keyHasBeenSet(false),
m_valueHasBeenSet(false)
{
*this = jsonValue;
}
AssociationFilter& AssociationFilter::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("key"))
{
m_key = AssociationFilterKeyMapper::GetAssociationFilterKeyForName(jsonValue.GetString("key"));
m_keyHasBeenSet = true;
}
if(jsonValue.ValueExists("value"))
{
m_value = jsonValue.GetString("value");
m_valueHasBeenSet = true;
}
return *this;
}
JsonValue AssociationFilter::Jsonize() const
{
JsonValue payload;
if(m_keyHasBeenSet)
{
payload.WithString("key", AssociationFilterKeyMapper::GetNameForAssociationFilterKey(m_key));
}
if(m_valueHasBeenSet)
{
payload.WithString("value", m_value);
}
return payload;
}
} // namespace Model
} // namespace SSM
} // 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/ssm/model/AssociationFilterKey.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 SSM
{
namespace Model
{
namespace AssociationFilterKeyMapper
{
static const int InstanceId_HASH = HashingUtils::HashString("InstanceId");
static const int Name_HASH = HashingUtils::HashString("Name");
static const int AssociationId_HASH = HashingUtils::HashString("AssociationId");
static const int AssociationStatusName_HASH = HashingUtils::HashString("AssociationStatusName");
static const int LastExecutedBefore_HASH = HashingUtils::HashString("LastExecutedBefore");
static const int LastExecutedAfter_HASH = HashingUtils::HashString("LastExecutedAfter");
static const int AssociationName_HASH = HashingUtils::HashString("AssociationName");
static const int ResourceGroupName_HASH = HashingUtils::HashString("ResourceGroupName");
AssociationFilterKey GetAssociationFilterKeyForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == InstanceId_HASH)
{
return AssociationFilterKey::InstanceId;
}
else if (hashCode == Name_HASH)
{
return AssociationFilterKey::Name;
}
else if (hashCode == AssociationId_HASH)
{
return AssociationFilterKey::AssociationId;
}
else if (hashCode == AssociationStatusName_HASH)
{
return AssociationFilterKey::AssociationStatusName;
}
else if (hashCode == LastExecutedBefore_HASH)
{
return AssociationFilterKey::LastExecutedBefore;
}
else if (hashCode == LastExecutedAfter_HASH)
{
return AssociationFilterKey::LastExecutedAfter;
}
else if (hashCode == AssociationName_HASH)
{
return AssociationFilterKey::AssociationName;
}
else if (hashCode == ResourceGroupName_HASH)
{
return AssociationFilterKey::ResourceGroupName;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<AssociationFilterKey>(hashCode);
}
return AssociationFilterKey::NOT_SET;
}
Aws::String GetNameForAssociationFilterKey(AssociationFilterKey enumValue)
{
switch(enumValue)
{
case AssociationFilterKey::InstanceId:
return "InstanceId";
case AssociationFilterKey::Name:
return "Name";
case AssociationFilterKey::AssociationId:
return "AssociationId";
case AssociationFilterKey::AssociationStatusName:
return "AssociationStatusName";
case AssociationFilterKey::LastExecutedBefore:
return "LastExecutedBefore";
case AssociationFilterKey::LastExecutedAfter:
return "LastExecutedAfter";
case AssociationFilterKey::AssociationName:
return "AssociationName";
case AssociationFilterKey::ResourceGroupName:
return "ResourceGroupName";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace AssociationFilterKeyMapper
} // namespace Model
} // namespace SSM
} // 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/ssm/model/AssociationFilterOperatorType.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 SSM
{
namespace Model
{
namespace AssociationFilterOperatorTypeMapper
{
static const int EQUAL_HASH = HashingUtils::HashString("EQUAL");
static const int LESS_THAN_HASH = HashingUtils::HashString("LESS_THAN");
static const int GREATER_THAN_HASH = HashingUtils::HashString("GREATER_THAN");
AssociationFilterOperatorType GetAssociationFilterOperatorTypeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == EQUAL_HASH)
{
return AssociationFilterOperatorType::EQUAL;
}
else if (hashCode == LESS_THAN_HASH)
{
return AssociationFilterOperatorType::LESS_THAN;
}
else if (hashCode == GREATER_THAN_HASH)
{
return AssociationFilterOperatorType::GREATER_THAN;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<AssociationFilterOperatorType>(hashCode);
}
return AssociationFilterOperatorType::NOT_SET;
}
Aws::String GetNameForAssociationFilterOperatorType(AssociationFilterOperatorType enumValue)
{
switch(enumValue)
{
case AssociationFilterOperatorType::EQUAL:
return "EQUAL";
case AssociationFilterOperatorType::LESS_THAN:
return "LESS_THAN";
case AssociationFilterOperatorType::GREATER_THAN:
return "GREATER_THAN";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace AssociationFilterOperatorTypeMapper
} // namespace Model
} // namespace SSM
} // 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/ssm/model/AssociationOverview.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SSM
{
namespace Model
{
AssociationOverview::AssociationOverview() :
m_statusHasBeenSet(false),
m_detailedStatusHasBeenSet(false),
m_associationStatusAggregatedCountHasBeenSet(false)
{
}
AssociationOverview::AssociationOverview(JsonView jsonValue) :
m_statusHasBeenSet(false),
m_detailedStatusHasBeenSet(false),
m_associationStatusAggregatedCountHasBeenSet(false)
{
*this = jsonValue;
}
AssociationOverview& AssociationOverview::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Status"))
{
m_status = jsonValue.GetString("Status");
m_statusHasBeenSet = true;
}
if(jsonValue.ValueExists("DetailedStatus"))
{
m_detailedStatus = jsonValue.GetString("DetailedStatus");
m_detailedStatusHasBeenSet = true;
}
if(jsonValue.ValueExists("AssociationStatusAggregatedCount"))
{
Aws::Map<Aws::String, JsonView> associationStatusAggregatedCountJsonMap = jsonValue.GetObject("AssociationStatusAggregatedCount").GetAllObjects();
for(auto& associationStatusAggregatedCountItem : associationStatusAggregatedCountJsonMap)
{
m_associationStatusAggregatedCount[associationStatusAggregatedCountItem.first] = associationStatusAggregatedCountItem.second.AsInteger();
}
m_associationStatusAggregatedCountHasBeenSet = true;
}
return *this;
}
JsonValue AssociationOverview::Jsonize() const
{
JsonValue payload;
if(m_statusHasBeenSet)
{
payload.WithString("Status", m_status);
}
if(m_detailedStatusHasBeenSet)
{
payload.WithString("DetailedStatus", m_detailedStatus);
}
if(m_associationStatusAggregatedCountHasBeenSet)
{
JsonValue associationStatusAggregatedCountJsonMap;
for(auto& associationStatusAggregatedCountItem : m_associationStatusAggregatedCount)
{
associationStatusAggregatedCountJsonMap.WithInteger(associationStatusAggregatedCountItem.first, associationStatusAggregatedCountItem.second);
}
payload.WithObject("AssociationStatusAggregatedCount", std::move(associationStatusAggregatedCountJsonMap));
}
return payload;
}
} // namespace Model
} // namespace SSM
} // namespace Aws

View File

@@ -0,0 +1,104 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/AssociationStatus.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SSM
{
namespace Model
{
AssociationStatus::AssociationStatus() :
m_dateHasBeenSet(false),
m_name(AssociationStatusName::NOT_SET),
m_nameHasBeenSet(false),
m_messageHasBeenSet(false),
m_additionalInfoHasBeenSet(false)
{
}
AssociationStatus::AssociationStatus(JsonView jsonValue) :
m_dateHasBeenSet(false),
m_name(AssociationStatusName::NOT_SET),
m_nameHasBeenSet(false),
m_messageHasBeenSet(false),
m_additionalInfoHasBeenSet(false)
{
*this = jsonValue;
}
AssociationStatus& AssociationStatus::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Date"))
{
m_date = jsonValue.GetDouble("Date");
m_dateHasBeenSet = true;
}
if(jsonValue.ValueExists("Name"))
{
m_name = AssociationStatusNameMapper::GetAssociationStatusNameForName(jsonValue.GetString("Name"));
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("Message"))
{
m_message = jsonValue.GetString("Message");
m_messageHasBeenSet = true;
}
if(jsonValue.ValueExists("AdditionalInfo"))
{
m_additionalInfo = jsonValue.GetString("AdditionalInfo");
m_additionalInfoHasBeenSet = true;
}
return *this;
}
JsonValue AssociationStatus::Jsonize() const
{
JsonValue payload;
if(m_dateHasBeenSet)
{
payload.WithDouble("Date", m_date.SecondsWithMSPrecision());
}
if(m_nameHasBeenSet)
{
payload.WithString("Name", AssociationStatusNameMapper::GetNameForAssociationStatusName(m_name));
}
if(m_messageHasBeenSet)
{
payload.WithString("Message", m_message);
}
if(m_additionalInfoHasBeenSet)
{
payload.WithString("AdditionalInfo", m_additionalInfo);
}
return payload;
}
} // namespace Model
} // namespace SSM
} // 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/ssm/model/AssociationStatusName.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 SSM
{
namespace Model
{
namespace AssociationStatusNameMapper
{
static const int Pending_HASH = HashingUtils::HashString("Pending");
static const int Success_HASH = HashingUtils::HashString("Success");
static const int Failed_HASH = HashingUtils::HashString("Failed");
AssociationStatusName GetAssociationStatusNameForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == Pending_HASH)
{
return AssociationStatusName::Pending;
}
else if (hashCode == Success_HASH)
{
return AssociationStatusName::Success;
}
else if (hashCode == Failed_HASH)
{
return AssociationStatusName::Failed;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<AssociationStatusName>(hashCode);
}
return AssociationStatusName::NOT_SET;
}
Aws::String GetNameForAssociationStatusName(AssociationStatusName enumValue)
{
switch(enumValue)
{
case AssociationStatusName::Pending:
return "Pending";
case AssociationStatusName::Success:
return "Success";
case AssociationStatusName::Failed:
return "Failed";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace AssociationStatusNameMapper
} // namespace Model
} // namespace SSM
} // 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/ssm/model/AssociationSyncCompliance.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 SSM
{
namespace Model
{
namespace AssociationSyncComplianceMapper
{
static const int AUTO_HASH = HashingUtils::HashString("AUTO");
static const int MANUAL_HASH = HashingUtils::HashString("MANUAL");
AssociationSyncCompliance GetAssociationSyncComplianceForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == AUTO_HASH)
{
return AssociationSyncCompliance::AUTO;
}
else if (hashCode == MANUAL_HASH)
{
return AssociationSyncCompliance::MANUAL;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<AssociationSyncCompliance>(hashCode);
}
return AssociationSyncCompliance::NOT_SET;
}
Aws::String GetNameForAssociationSyncCompliance(AssociationSyncCompliance enumValue)
{
switch(enumValue)
{
case AssociationSyncCompliance::AUTO:
return "AUTO";
case AssociationSyncCompliance::MANUAL:
return "MANUAL";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace AssociationSyncComplianceMapper
} // namespace Model
} // namespace SSM
} // namespace Aws

View File

@@ -0,0 +1,300 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/AssociationVersionInfo.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SSM
{
namespace Model
{
AssociationVersionInfo::AssociationVersionInfo() :
m_associationIdHasBeenSet(false),
m_associationVersionHasBeenSet(false),
m_createdDateHasBeenSet(false),
m_nameHasBeenSet(false),
m_documentVersionHasBeenSet(false),
m_parametersHasBeenSet(false),
m_targetsHasBeenSet(false),
m_scheduleExpressionHasBeenSet(false),
m_outputLocationHasBeenSet(false),
m_associationNameHasBeenSet(false),
m_maxErrorsHasBeenSet(false),
m_maxConcurrencyHasBeenSet(false),
m_complianceSeverity(AssociationComplianceSeverity::NOT_SET),
m_complianceSeverityHasBeenSet(false),
m_syncCompliance(AssociationSyncCompliance::NOT_SET),
m_syncComplianceHasBeenSet(false),
m_applyOnlyAtCronInterval(false),
m_applyOnlyAtCronIntervalHasBeenSet(false)
{
}
AssociationVersionInfo::AssociationVersionInfo(JsonView jsonValue) :
m_associationIdHasBeenSet(false),
m_associationVersionHasBeenSet(false),
m_createdDateHasBeenSet(false),
m_nameHasBeenSet(false),
m_documentVersionHasBeenSet(false),
m_parametersHasBeenSet(false),
m_targetsHasBeenSet(false),
m_scheduleExpressionHasBeenSet(false),
m_outputLocationHasBeenSet(false),
m_associationNameHasBeenSet(false),
m_maxErrorsHasBeenSet(false),
m_maxConcurrencyHasBeenSet(false),
m_complianceSeverity(AssociationComplianceSeverity::NOT_SET),
m_complianceSeverityHasBeenSet(false),
m_syncCompliance(AssociationSyncCompliance::NOT_SET),
m_syncComplianceHasBeenSet(false),
m_applyOnlyAtCronInterval(false),
m_applyOnlyAtCronIntervalHasBeenSet(false)
{
*this = jsonValue;
}
AssociationVersionInfo& AssociationVersionInfo::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("AssociationId"))
{
m_associationId = jsonValue.GetString("AssociationId");
m_associationIdHasBeenSet = true;
}
if(jsonValue.ValueExists("AssociationVersion"))
{
m_associationVersion = jsonValue.GetString("AssociationVersion");
m_associationVersionHasBeenSet = true;
}
if(jsonValue.ValueExists("CreatedDate"))
{
m_createdDate = jsonValue.GetDouble("CreatedDate");
m_createdDateHasBeenSet = true;
}
if(jsonValue.ValueExists("Name"))
{
m_name = jsonValue.GetString("Name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("DocumentVersion"))
{
m_documentVersion = jsonValue.GetString("DocumentVersion");
m_documentVersionHasBeenSet = true;
}
if(jsonValue.ValueExists("Parameters"))
{
Aws::Map<Aws::String, JsonView> parametersJsonMap = jsonValue.GetObject("Parameters").GetAllObjects();
for(auto& parametersItem : parametersJsonMap)
{
Array<JsonView> parameterValueListJsonList = parametersItem.second.AsArray();
Aws::Vector<Aws::String> parameterValueListList;
parameterValueListList.reserve((size_t)parameterValueListJsonList.GetLength());
for(unsigned parameterValueListIndex = 0; parameterValueListIndex < parameterValueListJsonList.GetLength(); ++parameterValueListIndex)
{
parameterValueListList.push_back(parameterValueListJsonList[parameterValueListIndex].AsString());
}
m_parameters[parametersItem.first] = std::move(parameterValueListList);
}
m_parametersHasBeenSet = true;
}
if(jsonValue.ValueExists("Targets"))
{
Array<JsonView> targetsJsonList = jsonValue.GetArray("Targets");
for(unsigned targetsIndex = 0; targetsIndex < targetsJsonList.GetLength(); ++targetsIndex)
{
m_targets.push_back(targetsJsonList[targetsIndex].AsObject());
}
m_targetsHasBeenSet = true;
}
if(jsonValue.ValueExists("ScheduleExpression"))
{
m_scheduleExpression = jsonValue.GetString("ScheduleExpression");
m_scheduleExpressionHasBeenSet = true;
}
if(jsonValue.ValueExists("OutputLocation"))
{
m_outputLocation = jsonValue.GetObject("OutputLocation");
m_outputLocationHasBeenSet = true;
}
if(jsonValue.ValueExists("AssociationName"))
{
m_associationName = jsonValue.GetString("AssociationName");
m_associationNameHasBeenSet = true;
}
if(jsonValue.ValueExists("MaxErrors"))
{
m_maxErrors = jsonValue.GetString("MaxErrors");
m_maxErrorsHasBeenSet = true;
}
if(jsonValue.ValueExists("MaxConcurrency"))
{
m_maxConcurrency = jsonValue.GetString("MaxConcurrency");
m_maxConcurrencyHasBeenSet = true;
}
if(jsonValue.ValueExists("ComplianceSeverity"))
{
m_complianceSeverity = AssociationComplianceSeverityMapper::GetAssociationComplianceSeverityForName(jsonValue.GetString("ComplianceSeverity"));
m_complianceSeverityHasBeenSet = true;
}
if(jsonValue.ValueExists("SyncCompliance"))
{
m_syncCompliance = AssociationSyncComplianceMapper::GetAssociationSyncComplianceForName(jsonValue.GetString("SyncCompliance"));
m_syncComplianceHasBeenSet = true;
}
if(jsonValue.ValueExists("ApplyOnlyAtCronInterval"))
{
m_applyOnlyAtCronInterval = jsonValue.GetBool("ApplyOnlyAtCronInterval");
m_applyOnlyAtCronIntervalHasBeenSet = true;
}
return *this;
}
JsonValue AssociationVersionInfo::Jsonize() const
{
JsonValue payload;
if(m_associationIdHasBeenSet)
{
payload.WithString("AssociationId", m_associationId);
}
if(m_associationVersionHasBeenSet)
{
payload.WithString("AssociationVersion", m_associationVersion);
}
if(m_createdDateHasBeenSet)
{
payload.WithDouble("CreatedDate", m_createdDate.SecondsWithMSPrecision());
}
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
if(m_documentVersionHasBeenSet)
{
payload.WithString("DocumentVersion", m_documentVersion);
}
if(m_parametersHasBeenSet)
{
JsonValue parametersJsonMap;
for(auto& parametersItem : m_parameters)
{
Array<JsonValue> parameterValueListJsonList(parametersItem.second.size());
for(unsigned parameterValueListIndex = 0; parameterValueListIndex < parameterValueListJsonList.GetLength(); ++parameterValueListIndex)
{
parameterValueListJsonList[parameterValueListIndex].AsString(parametersItem.second[parameterValueListIndex]);
}
parametersJsonMap.WithArray(parametersItem.first, std::move(parameterValueListJsonList));
}
payload.WithObject("Parameters", std::move(parametersJsonMap));
}
if(m_targetsHasBeenSet)
{
Array<JsonValue> targetsJsonList(m_targets.size());
for(unsigned targetsIndex = 0; targetsIndex < targetsJsonList.GetLength(); ++targetsIndex)
{
targetsJsonList[targetsIndex].AsObject(m_targets[targetsIndex].Jsonize());
}
payload.WithArray("Targets", std::move(targetsJsonList));
}
if(m_scheduleExpressionHasBeenSet)
{
payload.WithString("ScheduleExpression", m_scheduleExpression);
}
if(m_outputLocationHasBeenSet)
{
payload.WithObject("OutputLocation", m_outputLocation.Jsonize());
}
if(m_associationNameHasBeenSet)
{
payload.WithString("AssociationName", m_associationName);
}
if(m_maxErrorsHasBeenSet)
{
payload.WithString("MaxErrors", m_maxErrors);
}
if(m_maxConcurrencyHasBeenSet)
{
payload.WithString("MaxConcurrency", m_maxConcurrency);
}
if(m_complianceSeverityHasBeenSet)
{
payload.WithString("ComplianceSeverity", AssociationComplianceSeverityMapper::GetNameForAssociationComplianceSeverity(m_complianceSeverity));
}
if(m_syncComplianceHasBeenSet)
{
payload.WithString("SyncCompliance", AssociationSyncComplianceMapper::GetNameForAssociationSyncCompliance(m_syncCompliance));
}
if(m_applyOnlyAtCronIntervalHasBeenSet)
{
payload.WithBool("ApplyOnlyAtCronInterval", m_applyOnlyAtCronInterval);
}
return payload;
}
} // namespace Model
} // namespace SSM
} // namespace Aws

View File

@@ -0,0 +1,122 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/AttachmentContent.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SSM
{
namespace Model
{
AttachmentContent::AttachmentContent() :
m_nameHasBeenSet(false),
m_size(0),
m_sizeHasBeenSet(false),
m_hashHasBeenSet(false),
m_hashType(AttachmentHashType::NOT_SET),
m_hashTypeHasBeenSet(false),
m_urlHasBeenSet(false)
{
}
AttachmentContent::AttachmentContent(JsonView jsonValue) :
m_nameHasBeenSet(false),
m_size(0),
m_sizeHasBeenSet(false),
m_hashHasBeenSet(false),
m_hashType(AttachmentHashType::NOT_SET),
m_hashTypeHasBeenSet(false),
m_urlHasBeenSet(false)
{
*this = jsonValue;
}
AttachmentContent& AttachmentContent::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Name"))
{
m_name = jsonValue.GetString("Name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("Size"))
{
m_size = jsonValue.GetInt64("Size");
m_sizeHasBeenSet = true;
}
if(jsonValue.ValueExists("Hash"))
{
m_hash = jsonValue.GetString("Hash");
m_hashHasBeenSet = true;
}
if(jsonValue.ValueExists("HashType"))
{
m_hashType = AttachmentHashTypeMapper::GetAttachmentHashTypeForName(jsonValue.GetString("HashType"));
m_hashTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("Url"))
{
m_url = jsonValue.GetString("Url");
m_urlHasBeenSet = true;
}
return *this;
}
JsonValue AttachmentContent::Jsonize() const
{
JsonValue payload;
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
if(m_sizeHasBeenSet)
{
payload.WithInt64("Size", m_size);
}
if(m_hashHasBeenSet)
{
payload.WithString("Hash", m_hash);
}
if(m_hashTypeHasBeenSet)
{
payload.WithString("HashType", AttachmentHashTypeMapper::GetNameForAttachmentHashType(m_hashType));
}
if(m_urlHasBeenSet)
{
payload.WithString("Url", m_url);
}
return payload;
}
} // namespace Model
} // namespace SSM
} // 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/ssm/model/AttachmentHashType.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 SSM
{
namespace Model
{
namespace AttachmentHashTypeMapper
{
static const int Sha256_HASH = HashingUtils::HashString("Sha256");
AttachmentHashType GetAttachmentHashTypeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == Sha256_HASH)
{
return AttachmentHashType::Sha256;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<AttachmentHashType>(hashCode);
}
return AttachmentHashType::NOT_SET;
}
Aws::String GetNameForAttachmentHashType(AttachmentHashType enumValue)
{
switch(enumValue)
{
case AttachmentHashType::Sha256:
return "Sha256";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace AttachmentHashTypeMapper
} // namespace Model
} // namespace SSM
} // 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/ssm/model/AttachmentInformation.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SSM
{
namespace Model
{
AttachmentInformation::AttachmentInformation() :
m_nameHasBeenSet(false)
{
}
AttachmentInformation::AttachmentInformation(JsonView jsonValue) :
m_nameHasBeenSet(false)
{
*this = jsonValue;
}
AttachmentInformation& AttachmentInformation::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Name"))
{
m_name = jsonValue.GetString("Name");
m_nameHasBeenSet = true;
}
return *this;
}
JsonValue AttachmentInformation::Jsonize() const
{
JsonValue payload;
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
return payload;
}
} // namespace Model
} // namespace SSM
} // 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/ssm/model/AttachmentsSource.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SSM
{
namespace Model
{
AttachmentsSource::AttachmentsSource() :
m_key(AttachmentsSourceKey::NOT_SET),
m_keyHasBeenSet(false),
m_valuesHasBeenSet(false),
m_nameHasBeenSet(false)
{
}
AttachmentsSource::AttachmentsSource(JsonView jsonValue) :
m_key(AttachmentsSourceKey::NOT_SET),
m_keyHasBeenSet(false),
m_valuesHasBeenSet(false),
m_nameHasBeenSet(false)
{
*this = jsonValue;
}
AttachmentsSource& AttachmentsSource::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Key"))
{
m_key = AttachmentsSourceKeyMapper::GetAttachmentsSourceKeyForName(jsonValue.GetString("Key"));
m_keyHasBeenSet = true;
}
if(jsonValue.ValueExists("Values"))
{
Array<JsonView> valuesJsonList = jsonValue.GetArray("Values");
for(unsigned valuesIndex = 0; valuesIndex < valuesJsonList.GetLength(); ++valuesIndex)
{
m_values.push_back(valuesJsonList[valuesIndex].AsString());
}
m_valuesHasBeenSet = true;
}
if(jsonValue.ValueExists("Name"))
{
m_name = jsonValue.GetString("Name");
m_nameHasBeenSet = true;
}
return *this;
}
JsonValue AttachmentsSource::Jsonize() const
{
JsonValue payload;
if(m_keyHasBeenSet)
{
payload.WithString("Key", AttachmentsSourceKeyMapper::GetNameForAttachmentsSourceKey(m_key));
}
if(m_valuesHasBeenSet)
{
Array<JsonValue> valuesJsonList(m_values.size());
for(unsigned valuesIndex = 0; valuesIndex < valuesJsonList.GetLength(); ++valuesIndex)
{
valuesJsonList[valuesIndex].AsString(m_values[valuesIndex]);
}
payload.WithArray("Values", std::move(valuesJsonList));
}
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
return payload;
}
} // namespace Model
} // namespace SSM
} // 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/ssm/model/AttachmentsSourceKey.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 SSM
{
namespace Model
{
namespace AttachmentsSourceKeyMapper
{
static const int SourceUrl_HASH = HashingUtils::HashString("SourceUrl");
static const int S3FileUrl_HASH = HashingUtils::HashString("S3FileUrl");
static const int AttachmentReference_HASH = HashingUtils::HashString("AttachmentReference");
AttachmentsSourceKey GetAttachmentsSourceKeyForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == SourceUrl_HASH)
{
return AttachmentsSourceKey::SourceUrl;
}
else if (hashCode == S3FileUrl_HASH)
{
return AttachmentsSourceKey::S3FileUrl;
}
else if (hashCode == AttachmentReference_HASH)
{
return AttachmentsSourceKey::AttachmentReference;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<AttachmentsSourceKey>(hashCode);
}
return AttachmentsSourceKey::NOT_SET;
}
Aws::String GetNameForAttachmentsSourceKey(AttachmentsSourceKey enumValue)
{
switch(enumValue)
{
case AttachmentsSourceKey::SourceUrl:
return "SourceUrl";
case AttachmentsSourceKey::S3FileUrl:
return "S3FileUrl";
case AttachmentsSourceKey::AttachmentReference:
return "AttachmentReference";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace AttachmentsSourceKeyMapper
} // namespace Model
} // namespace SSM
} // namespace Aws

View File

@@ -0,0 +1,516 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/AutomationExecution.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SSM
{
namespace Model
{
AutomationExecution::AutomationExecution() :
m_automationExecutionIdHasBeenSet(false),
m_documentNameHasBeenSet(false),
m_documentVersionHasBeenSet(false),
m_executionStartTimeHasBeenSet(false),
m_executionEndTimeHasBeenSet(false),
m_automationExecutionStatus(AutomationExecutionStatus::NOT_SET),
m_automationExecutionStatusHasBeenSet(false),
m_stepExecutionsHasBeenSet(false),
m_stepExecutionsTruncated(false),
m_stepExecutionsTruncatedHasBeenSet(false),
m_parametersHasBeenSet(false),
m_outputsHasBeenSet(false),
m_failureMessageHasBeenSet(false),
m_mode(ExecutionMode::NOT_SET),
m_modeHasBeenSet(false),
m_parentAutomationExecutionIdHasBeenSet(false),
m_executedByHasBeenSet(false),
m_currentStepNameHasBeenSet(false),
m_currentActionHasBeenSet(false),
m_targetParameterNameHasBeenSet(false),
m_targetsHasBeenSet(false),
m_targetMapsHasBeenSet(false),
m_resolvedTargetsHasBeenSet(false),
m_maxConcurrencyHasBeenSet(false),
m_maxErrorsHasBeenSet(false),
m_targetHasBeenSet(false),
m_targetLocationsHasBeenSet(false),
m_progressCountersHasBeenSet(false)
{
}
AutomationExecution::AutomationExecution(JsonView jsonValue) :
m_automationExecutionIdHasBeenSet(false),
m_documentNameHasBeenSet(false),
m_documentVersionHasBeenSet(false),
m_executionStartTimeHasBeenSet(false),
m_executionEndTimeHasBeenSet(false),
m_automationExecutionStatus(AutomationExecutionStatus::NOT_SET),
m_automationExecutionStatusHasBeenSet(false),
m_stepExecutionsHasBeenSet(false),
m_stepExecutionsTruncated(false),
m_stepExecutionsTruncatedHasBeenSet(false),
m_parametersHasBeenSet(false),
m_outputsHasBeenSet(false),
m_failureMessageHasBeenSet(false),
m_mode(ExecutionMode::NOT_SET),
m_modeHasBeenSet(false),
m_parentAutomationExecutionIdHasBeenSet(false),
m_executedByHasBeenSet(false),
m_currentStepNameHasBeenSet(false),
m_currentActionHasBeenSet(false),
m_targetParameterNameHasBeenSet(false),
m_targetsHasBeenSet(false),
m_targetMapsHasBeenSet(false),
m_resolvedTargetsHasBeenSet(false),
m_maxConcurrencyHasBeenSet(false),
m_maxErrorsHasBeenSet(false),
m_targetHasBeenSet(false),
m_targetLocationsHasBeenSet(false),
m_progressCountersHasBeenSet(false)
{
*this = jsonValue;
}
AutomationExecution& AutomationExecution::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("AutomationExecutionId"))
{
m_automationExecutionId = jsonValue.GetString("AutomationExecutionId");
m_automationExecutionIdHasBeenSet = true;
}
if(jsonValue.ValueExists("DocumentName"))
{
m_documentName = jsonValue.GetString("DocumentName");
m_documentNameHasBeenSet = true;
}
if(jsonValue.ValueExists("DocumentVersion"))
{
m_documentVersion = jsonValue.GetString("DocumentVersion");
m_documentVersionHasBeenSet = true;
}
if(jsonValue.ValueExists("ExecutionStartTime"))
{
m_executionStartTime = jsonValue.GetDouble("ExecutionStartTime");
m_executionStartTimeHasBeenSet = true;
}
if(jsonValue.ValueExists("ExecutionEndTime"))
{
m_executionEndTime = jsonValue.GetDouble("ExecutionEndTime");
m_executionEndTimeHasBeenSet = true;
}
if(jsonValue.ValueExists("AutomationExecutionStatus"))
{
m_automationExecutionStatus = AutomationExecutionStatusMapper::GetAutomationExecutionStatusForName(jsonValue.GetString("AutomationExecutionStatus"));
m_automationExecutionStatusHasBeenSet = true;
}
if(jsonValue.ValueExists("StepExecutions"))
{
Array<JsonView> stepExecutionsJsonList = jsonValue.GetArray("StepExecutions");
for(unsigned stepExecutionsIndex = 0; stepExecutionsIndex < stepExecutionsJsonList.GetLength(); ++stepExecutionsIndex)
{
m_stepExecutions.push_back(stepExecutionsJsonList[stepExecutionsIndex].AsObject());
}
m_stepExecutionsHasBeenSet = true;
}
if(jsonValue.ValueExists("StepExecutionsTruncated"))
{
m_stepExecutionsTruncated = jsonValue.GetBool("StepExecutionsTruncated");
m_stepExecutionsTruncatedHasBeenSet = true;
}
if(jsonValue.ValueExists("Parameters"))
{
Aws::Map<Aws::String, JsonView> parametersJsonMap = jsonValue.GetObject("Parameters").GetAllObjects();
for(auto& parametersItem : parametersJsonMap)
{
Array<JsonView> automationParameterValueListJsonList = parametersItem.second.AsArray();
Aws::Vector<Aws::String> automationParameterValueListList;
automationParameterValueListList.reserve((size_t)automationParameterValueListJsonList.GetLength());
for(unsigned automationParameterValueListIndex = 0; automationParameterValueListIndex < automationParameterValueListJsonList.GetLength(); ++automationParameterValueListIndex)
{
automationParameterValueListList.push_back(automationParameterValueListJsonList[automationParameterValueListIndex].AsString());
}
m_parameters[parametersItem.first] = std::move(automationParameterValueListList);
}
m_parametersHasBeenSet = true;
}
if(jsonValue.ValueExists("Outputs"))
{
Aws::Map<Aws::String, JsonView> outputsJsonMap = jsonValue.GetObject("Outputs").GetAllObjects();
for(auto& outputsItem : outputsJsonMap)
{
Array<JsonView> automationParameterValueListJsonList = outputsItem.second.AsArray();
Aws::Vector<Aws::String> automationParameterValueListList;
automationParameterValueListList.reserve((size_t)automationParameterValueListJsonList.GetLength());
for(unsigned automationParameterValueListIndex = 0; automationParameterValueListIndex < automationParameterValueListJsonList.GetLength(); ++automationParameterValueListIndex)
{
automationParameterValueListList.push_back(automationParameterValueListJsonList[automationParameterValueListIndex].AsString());
}
m_outputs[outputsItem.first] = std::move(automationParameterValueListList);
}
m_outputsHasBeenSet = true;
}
if(jsonValue.ValueExists("FailureMessage"))
{
m_failureMessage = jsonValue.GetString("FailureMessage");
m_failureMessageHasBeenSet = true;
}
if(jsonValue.ValueExists("Mode"))
{
m_mode = ExecutionModeMapper::GetExecutionModeForName(jsonValue.GetString("Mode"));
m_modeHasBeenSet = true;
}
if(jsonValue.ValueExists("ParentAutomationExecutionId"))
{
m_parentAutomationExecutionId = jsonValue.GetString("ParentAutomationExecutionId");
m_parentAutomationExecutionIdHasBeenSet = true;
}
if(jsonValue.ValueExists("ExecutedBy"))
{
m_executedBy = jsonValue.GetString("ExecutedBy");
m_executedByHasBeenSet = true;
}
if(jsonValue.ValueExists("CurrentStepName"))
{
m_currentStepName = jsonValue.GetString("CurrentStepName");
m_currentStepNameHasBeenSet = true;
}
if(jsonValue.ValueExists("CurrentAction"))
{
m_currentAction = jsonValue.GetString("CurrentAction");
m_currentActionHasBeenSet = true;
}
if(jsonValue.ValueExists("TargetParameterName"))
{
m_targetParameterName = jsonValue.GetString("TargetParameterName");
m_targetParameterNameHasBeenSet = true;
}
if(jsonValue.ValueExists("Targets"))
{
Array<JsonView> targetsJsonList = jsonValue.GetArray("Targets");
for(unsigned targetsIndex = 0; targetsIndex < targetsJsonList.GetLength(); ++targetsIndex)
{
m_targets.push_back(targetsJsonList[targetsIndex].AsObject());
}
m_targetsHasBeenSet = true;
}
if(jsonValue.ValueExists("TargetMaps"))
{
Array<JsonView> targetMapsJsonList = jsonValue.GetArray("TargetMaps");
for(unsigned targetMapsIndex = 0; targetMapsIndex < targetMapsJsonList.GetLength(); ++targetMapsIndex)
{
Aws::Map<Aws::String, JsonView> targetMapJsonMap = targetMapsJsonList[targetMapsIndex].GetAllObjects();
Aws::Map<Aws::String, Aws::Vector<Aws::String>> targetMapMap;
for(auto& targetMapItem : targetMapJsonMap)
{
Array<JsonView> targetMapValueListJsonList = targetMapItem.second.AsArray();
Aws::Vector<Aws::String> targetMapValueListList;
targetMapValueListList.reserve((size_t)targetMapValueListJsonList.GetLength());
for(unsigned targetMapValueListIndex = 0; targetMapValueListIndex < targetMapValueListJsonList.GetLength(); ++targetMapValueListIndex)
{
targetMapValueListList.push_back(targetMapValueListJsonList[targetMapValueListIndex].AsString());
}
targetMapMap[targetMapItem.first] = std::move(targetMapValueListList);
}
m_targetMaps.push_back(std::move(targetMapMap));
}
m_targetMapsHasBeenSet = true;
}
if(jsonValue.ValueExists("ResolvedTargets"))
{
m_resolvedTargets = jsonValue.GetObject("ResolvedTargets");
m_resolvedTargetsHasBeenSet = true;
}
if(jsonValue.ValueExists("MaxConcurrency"))
{
m_maxConcurrency = jsonValue.GetString("MaxConcurrency");
m_maxConcurrencyHasBeenSet = true;
}
if(jsonValue.ValueExists("MaxErrors"))
{
m_maxErrors = jsonValue.GetString("MaxErrors");
m_maxErrorsHasBeenSet = true;
}
if(jsonValue.ValueExists("Target"))
{
m_target = jsonValue.GetString("Target");
m_targetHasBeenSet = true;
}
if(jsonValue.ValueExists("TargetLocations"))
{
Array<JsonView> targetLocationsJsonList = jsonValue.GetArray("TargetLocations");
for(unsigned targetLocationsIndex = 0; targetLocationsIndex < targetLocationsJsonList.GetLength(); ++targetLocationsIndex)
{
m_targetLocations.push_back(targetLocationsJsonList[targetLocationsIndex].AsObject());
}
m_targetLocationsHasBeenSet = true;
}
if(jsonValue.ValueExists("ProgressCounters"))
{
m_progressCounters = jsonValue.GetObject("ProgressCounters");
m_progressCountersHasBeenSet = true;
}
return *this;
}
JsonValue AutomationExecution::Jsonize() const
{
JsonValue payload;
if(m_automationExecutionIdHasBeenSet)
{
payload.WithString("AutomationExecutionId", m_automationExecutionId);
}
if(m_documentNameHasBeenSet)
{
payload.WithString("DocumentName", m_documentName);
}
if(m_documentVersionHasBeenSet)
{
payload.WithString("DocumentVersion", m_documentVersion);
}
if(m_executionStartTimeHasBeenSet)
{
payload.WithDouble("ExecutionStartTime", m_executionStartTime.SecondsWithMSPrecision());
}
if(m_executionEndTimeHasBeenSet)
{
payload.WithDouble("ExecutionEndTime", m_executionEndTime.SecondsWithMSPrecision());
}
if(m_automationExecutionStatusHasBeenSet)
{
payload.WithString("AutomationExecutionStatus", AutomationExecutionStatusMapper::GetNameForAutomationExecutionStatus(m_automationExecutionStatus));
}
if(m_stepExecutionsHasBeenSet)
{
Array<JsonValue> stepExecutionsJsonList(m_stepExecutions.size());
for(unsigned stepExecutionsIndex = 0; stepExecutionsIndex < stepExecutionsJsonList.GetLength(); ++stepExecutionsIndex)
{
stepExecutionsJsonList[stepExecutionsIndex].AsObject(m_stepExecutions[stepExecutionsIndex].Jsonize());
}
payload.WithArray("StepExecutions", std::move(stepExecutionsJsonList));
}
if(m_stepExecutionsTruncatedHasBeenSet)
{
payload.WithBool("StepExecutionsTruncated", m_stepExecutionsTruncated);
}
if(m_parametersHasBeenSet)
{
JsonValue parametersJsonMap;
for(auto& parametersItem : m_parameters)
{
Array<JsonValue> automationParameterValueListJsonList(parametersItem.second.size());
for(unsigned automationParameterValueListIndex = 0; automationParameterValueListIndex < automationParameterValueListJsonList.GetLength(); ++automationParameterValueListIndex)
{
automationParameterValueListJsonList[automationParameterValueListIndex].AsString(parametersItem.second[automationParameterValueListIndex]);
}
parametersJsonMap.WithArray(parametersItem.first, std::move(automationParameterValueListJsonList));
}
payload.WithObject("Parameters", std::move(parametersJsonMap));
}
if(m_outputsHasBeenSet)
{
JsonValue outputsJsonMap;
for(auto& outputsItem : m_outputs)
{
Array<JsonValue> automationParameterValueListJsonList(outputsItem.second.size());
for(unsigned automationParameterValueListIndex = 0; automationParameterValueListIndex < automationParameterValueListJsonList.GetLength(); ++automationParameterValueListIndex)
{
automationParameterValueListJsonList[automationParameterValueListIndex].AsString(outputsItem.second[automationParameterValueListIndex]);
}
outputsJsonMap.WithArray(outputsItem.first, std::move(automationParameterValueListJsonList));
}
payload.WithObject("Outputs", std::move(outputsJsonMap));
}
if(m_failureMessageHasBeenSet)
{
payload.WithString("FailureMessage", m_failureMessage);
}
if(m_modeHasBeenSet)
{
payload.WithString("Mode", ExecutionModeMapper::GetNameForExecutionMode(m_mode));
}
if(m_parentAutomationExecutionIdHasBeenSet)
{
payload.WithString("ParentAutomationExecutionId", m_parentAutomationExecutionId);
}
if(m_executedByHasBeenSet)
{
payload.WithString("ExecutedBy", m_executedBy);
}
if(m_currentStepNameHasBeenSet)
{
payload.WithString("CurrentStepName", m_currentStepName);
}
if(m_currentActionHasBeenSet)
{
payload.WithString("CurrentAction", m_currentAction);
}
if(m_targetParameterNameHasBeenSet)
{
payload.WithString("TargetParameterName", m_targetParameterName);
}
if(m_targetsHasBeenSet)
{
Array<JsonValue> targetsJsonList(m_targets.size());
for(unsigned targetsIndex = 0; targetsIndex < targetsJsonList.GetLength(); ++targetsIndex)
{
targetsJsonList[targetsIndex].AsObject(m_targets[targetsIndex].Jsonize());
}
payload.WithArray("Targets", std::move(targetsJsonList));
}
if(m_targetMapsHasBeenSet)
{
Array<JsonValue> targetMapsJsonList(m_targetMaps.size());
for(unsigned targetMapsIndex = 0; targetMapsIndex < targetMapsJsonList.GetLength(); ++targetMapsIndex)
{
JsonValue targetMapJsonMap;
for(auto& targetMapItem : m_targetMaps[targetMapsIndex])
{
Array<JsonValue> targetMapValueListJsonList(targetMapItem.second.size());
for(unsigned targetMapValueListIndex = 0; targetMapValueListIndex < targetMapValueListJsonList.GetLength(); ++targetMapValueListIndex)
{
targetMapValueListJsonList[targetMapValueListIndex].AsString(targetMapItem.second[targetMapValueListIndex]);
}
targetMapJsonMap.WithArray(targetMapItem.first, std::move(targetMapValueListJsonList));
}
targetMapsJsonList[targetMapsIndex].AsObject(std::move(targetMapJsonMap));
}
payload.WithArray("TargetMaps", std::move(targetMapsJsonList));
}
if(m_resolvedTargetsHasBeenSet)
{
payload.WithObject("ResolvedTargets", m_resolvedTargets.Jsonize());
}
if(m_maxConcurrencyHasBeenSet)
{
payload.WithString("MaxConcurrency", m_maxConcurrency);
}
if(m_maxErrorsHasBeenSet)
{
payload.WithString("MaxErrors", m_maxErrors);
}
if(m_targetHasBeenSet)
{
payload.WithString("Target", m_target);
}
if(m_targetLocationsHasBeenSet)
{
Array<JsonValue> targetLocationsJsonList(m_targetLocations.size());
for(unsigned targetLocationsIndex = 0; targetLocationsIndex < targetLocationsJsonList.GetLength(); ++targetLocationsIndex)
{
targetLocationsJsonList[targetLocationsIndex].AsObject(m_targetLocations[targetLocationsIndex].Jsonize());
}
payload.WithArray("TargetLocations", std::move(targetLocationsJsonList));
}
if(m_progressCountersHasBeenSet)
{
payload.WithObject("ProgressCounters", m_progressCounters.Jsonize());
}
return payload;
}
} // namespace Model
} // namespace SSM
} // namespace Aws

View File

@@ -0,0 +1,83 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/AutomationExecutionFilter.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SSM
{
namespace Model
{
AutomationExecutionFilter::AutomationExecutionFilter() :
m_key(AutomationExecutionFilterKey::NOT_SET),
m_keyHasBeenSet(false),
m_valuesHasBeenSet(false)
{
}
AutomationExecutionFilter::AutomationExecutionFilter(JsonView jsonValue) :
m_key(AutomationExecutionFilterKey::NOT_SET),
m_keyHasBeenSet(false),
m_valuesHasBeenSet(false)
{
*this = jsonValue;
}
AutomationExecutionFilter& AutomationExecutionFilter::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Key"))
{
m_key = AutomationExecutionFilterKeyMapper::GetAutomationExecutionFilterKeyForName(jsonValue.GetString("Key"));
m_keyHasBeenSet = true;
}
if(jsonValue.ValueExists("Values"))
{
Array<JsonView> valuesJsonList = jsonValue.GetArray("Values");
for(unsigned valuesIndex = 0; valuesIndex < valuesJsonList.GetLength(); ++valuesIndex)
{
m_values.push_back(valuesJsonList[valuesIndex].AsString());
}
m_valuesHasBeenSet = true;
}
return *this;
}
JsonValue AutomationExecutionFilter::Jsonize() const
{
JsonValue payload;
if(m_keyHasBeenSet)
{
payload.WithString("Key", AutomationExecutionFilterKeyMapper::GetNameForAutomationExecutionFilterKey(m_key));
}
if(m_valuesHasBeenSet)
{
Array<JsonValue> valuesJsonList(m_values.size());
for(unsigned valuesIndex = 0; valuesIndex < valuesJsonList.GetLength(); ++valuesIndex)
{
valuesJsonList[valuesIndex].AsString(m_values[valuesIndex]);
}
payload.WithArray("Values", std::move(valuesJsonList));
}
return payload;
}
} // namespace Model
} // namespace SSM
} // namespace Aws

View File

@@ -0,0 +1,119 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/AutomationExecutionFilterKey.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 SSM
{
namespace Model
{
namespace AutomationExecutionFilterKeyMapper
{
static const int DocumentNamePrefix_HASH = HashingUtils::HashString("DocumentNamePrefix");
static const int ExecutionStatus_HASH = HashingUtils::HashString("ExecutionStatus");
static const int ExecutionId_HASH = HashingUtils::HashString("ExecutionId");
static const int ParentExecutionId_HASH = HashingUtils::HashString("ParentExecutionId");
static const int CurrentAction_HASH = HashingUtils::HashString("CurrentAction");
static const int StartTimeBefore_HASH = HashingUtils::HashString("StartTimeBefore");
static const int StartTimeAfter_HASH = HashingUtils::HashString("StartTimeAfter");
static const int AutomationType_HASH = HashingUtils::HashString("AutomationType");
static const int TagKey_HASH = HashingUtils::HashString("TagKey");
AutomationExecutionFilterKey GetAutomationExecutionFilterKeyForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == DocumentNamePrefix_HASH)
{
return AutomationExecutionFilterKey::DocumentNamePrefix;
}
else if (hashCode == ExecutionStatus_HASH)
{
return AutomationExecutionFilterKey::ExecutionStatus;
}
else if (hashCode == ExecutionId_HASH)
{
return AutomationExecutionFilterKey::ExecutionId;
}
else if (hashCode == ParentExecutionId_HASH)
{
return AutomationExecutionFilterKey::ParentExecutionId;
}
else if (hashCode == CurrentAction_HASH)
{
return AutomationExecutionFilterKey::CurrentAction;
}
else if (hashCode == StartTimeBefore_HASH)
{
return AutomationExecutionFilterKey::StartTimeBefore;
}
else if (hashCode == StartTimeAfter_HASH)
{
return AutomationExecutionFilterKey::StartTimeAfter;
}
else if (hashCode == AutomationType_HASH)
{
return AutomationExecutionFilterKey::AutomationType;
}
else if (hashCode == TagKey_HASH)
{
return AutomationExecutionFilterKey::TagKey;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<AutomationExecutionFilterKey>(hashCode);
}
return AutomationExecutionFilterKey::NOT_SET;
}
Aws::String GetNameForAutomationExecutionFilterKey(AutomationExecutionFilterKey enumValue)
{
switch(enumValue)
{
case AutomationExecutionFilterKey::DocumentNamePrefix:
return "DocumentNamePrefix";
case AutomationExecutionFilterKey::ExecutionStatus:
return "ExecutionStatus";
case AutomationExecutionFilterKey::ExecutionId:
return "ExecutionId";
case AutomationExecutionFilterKey::ParentExecutionId:
return "ParentExecutionId";
case AutomationExecutionFilterKey::CurrentAction:
return "CurrentAction";
case AutomationExecutionFilterKey::StartTimeBefore:
return "StartTimeBefore";
case AutomationExecutionFilterKey::StartTimeAfter:
return "StartTimeAfter";
case AutomationExecutionFilterKey::AutomationType:
return "AutomationType";
case AutomationExecutionFilterKey::TagKey:
return "TagKey";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace AutomationExecutionFilterKeyMapper
} // namespace Model
} // namespace SSM
} // 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/ssm/model/AutomationExecutionMetadata.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SSM
{
namespace Model
{
AutomationExecutionMetadata::AutomationExecutionMetadata() :
m_automationExecutionIdHasBeenSet(false),
m_documentNameHasBeenSet(false),
m_documentVersionHasBeenSet(false),
m_automationExecutionStatus(AutomationExecutionStatus::NOT_SET),
m_automationExecutionStatusHasBeenSet(false),
m_executionStartTimeHasBeenSet(false),
m_executionEndTimeHasBeenSet(false),
m_executedByHasBeenSet(false),
m_logFileHasBeenSet(false),
m_outputsHasBeenSet(false),
m_mode(ExecutionMode::NOT_SET),
m_modeHasBeenSet(false),
m_parentAutomationExecutionIdHasBeenSet(false),
m_currentStepNameHasBeenSet(false),
m_currentActionHasBeenSet(false),
m_failureMessageHasBeenSet(false),
m_targetParameterNameHasBeenSet(false),
m_targetsHasBeenSet(false),
m_targetMapsHasBeenSet(false),
m_resolvedTargetsHasBeenSet(false),
m_maxConcurrencyHasBeenSet(false),
m_maxErrorsHasBeenSet(false),
m_targetHasBeenSet(false),
m_automationType(AutomationType::NOT_SET),
m_automationTypeHasBeenSet(false)
{
}
AutomationExecutionMetadata::AutomationExecutionMetadata(JsonView jsonValue) :
m_automationExecutionIdHasBeenSet(false),
m_documentNameHasBeenSet(false),
m_documentVersionHasBeenSet(false),
m_automationExecutionStatus(AutomationExecutionStatus::NOT_SET),
m_automationExecutionStatusHasBeenSet(false),
m_executionStartTimeHasBeenSet(false),
m_executionEndTimeHasBeenSet(false),
m_executedByHasBeenSet(false),
m_logFileHasBeenSet(false),
m_outputsHasBeenSet(false),
m_mode(ExecutionMode::NOT_SET),
m_modeHasBeenSet(false),
m_parentAutomationExecutionIdHasBeenSet(false),
m_currentStepNameHasBeenSet(false),
m_currentActionHasBeenSet(false),
m_failureMessageHasBeenSet(false),
m_targetParameterNameHasBeenSet(false),
m_targetsHasBeenSet(false),
m_targetMapsHasBeenSet(false),
m_resolvedTargetsHasBeenSet(false),
m_maxConcurrencyHasBeenSet(false),
m_maxErrorsHasBeenSet(false),
m_targetHasBeenSet(false),
m_automationType(AutomationType::NOT_SET),
m_automationTypeHasBeenSet(false)
{
*this = jsonValue;
}
AutomationExecutionMetadata& AutomationExecutionMetadata::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("AutomationExecutionId"))
{
m_automationExecutionId = jsonValue.GetString("AutomationExecutionId");
m_automationExecutionIdHasBeenSet = true;
}
if(jsonValue.ValueExists("DocumentName"))
{
m_documentName = jsonValue.GetString("DocumentName");
m_documentNameHasBeenSet = true;
}
if(jsonValue.ValueExists("DocumentVersion"))
{
m_documentVersion = jsonValue.GetString("DocumentVersion");
m_documentVersionHasBeenSet = true;
}
if(jsonValue.ValueExists("AutomationExecutionStatus"))
{
m_automationExecutionStatus = AutomationExecutionStatusMapper::GetAutomationExecutionStatusForName(jsonValue.GetString("AutomationExecutionStatus"));
m_automationExecutionStatusHasBeenSet = true;
}
if(jsonValue.ValueExists("ExecutionStartTime"))
{
m_executionStartTime = jsonValue.GetDouble("ExecutionStartTime");
m_executionStartTimeHasBeenSet = true;
}
if(jsonValue.ValueExists("ExecutionEndTime"))
{
m_executionEndTime = jsonValue.GetDouble("ExecutionEndTime");
m_executionEndTimeHasBeenSet = true;
}
if(jsonValue.ValueExists("ExecutedBy"))
{
m_executedBy = jsonValue.GetString("ExecutedBy");
m_executedByHasBeenSet = true;
}
if(jsonValue.ValueExists("LogFile"))
{
m_logFile = jsonValue.GetString("LogFile");
m_logFileHasBeenSet = true;
}
if(jsonValue.ValueExists("Outputs"))
{
Aws::Map<Aws::String, JsonView> outputsJsonMap = jsonValue.GetObject("Outputs").GetAllObjects();
for(auto& outputsItem : outputsJsonMap)
{
Array<JsonView> automationParameterValueListJsonList = outputsItem.second.AsArray();
Aws::Vector<Aws::String> automationParameterValueListList;
automationParameterValueListList.reserve((size_t)automationParameterValueListJsonList.GetLength());
for(unsigned automationParameterValueListIndex = 0; automationParameterValueListIndex < automationParameterValueListJsonList.GetLength(); ++automationParameterValueListIndex)
{
automationParameterValueListList.push_back(automationParameterValueListJsonList[automationParameterValueListIndex].AsString());
}
m_outputs[outputsItem.first] = std::move(automationParameterValueListList);
}
m_outputsHasBeenSet = true;
}
if(jsonValue.ValueExists("Mode"))
{
m_mode = ExecutionModeMapper::GetExecutionModeForName(jsonValue.GetString("Mode"));
m_modeHasBeenSet = true;
}
if(jsonValue.ValueExists("ParentAutomationExecutionId"))
{
m_parentAutomationExecutionId = jsonValue.GetString("ParentAutomationExecutionId");
m_parentAutomationExecutionIdHasBeenSet = true;
}
if(jsonValue.ValueExists("CurrentStepName"))
{
m_currentStepName = jsonValue.GetString("CurrentStepName");
m_currentStepNameHasBeenSet = true;
}
if(jsonValue.ValueExists("CurrentAction"))
{
m_currentAction = jsonValue.GetString("CurrentAction");
m_currentActionHasBeenSet = true;
}
if(jsonValue.ValueExists("FailureMessage"))
{
m_failureMessage = jsonValue.GetString("FailureMessage");
m_failureMessageHasBeenSet = true;
}
if(jsonValue.ValueExists("TargetParameterName"))
{
m_targetParameterName = jsonValue.GetString("TargetParameterName");
m_targetParameterNameHasBeenSet = true;
}
if(jsonValue.ValueExists("Targets"))
{
Array<JsonView> targetsJsonList = jsonValue.GetArray("Targets");
for(unsigned targetsIndex = 0; targetsIndex < targetsJsonList.GetLength(); ++targetsIndex)
{
m_targets.push_back(targetsJsonList[targetsIndex].AsObject());
}
m_targetsHasBeenSet = true;
}
if(jsonValue.ValueExists("TargetMaps"))
{
Array<JsonView> targetMapsJsonList = jsonValue.GetArray("TargetMaps");
for(unsigned targetMapsIndex = 0; targetMapsIndex < targetMapsJsonList.GetLength(); ++targetMapsIndex)
{
Aws::Map<Aws::String, JsonView> targetMapJsonMap = targetMapsJsonList[targetMapsIndex].GetAllObjects();
Aws::Map<Aws::String, Aws::Vector<Aws::String>> targetMapMap;
for(auto& targetMapItem : targetMapJsonMap)
{
Array<JsonView> targetMapValueListJsonList = targetMapItem.second.AsArray();
Aws::Vector<Aws::String> targetMapValueListList;
targetMapValueListList.reserve((size_t)targetMapValueListJsonList.GetLength());
for(unsigned targetMapValueListIndex = 0; targetMapValueListIndex < targetMapValueListJsonList.GetLength(); ++targetMapValueListIndex)
{
targetMapValueListList.push_back(targetMapValueListJsonList[targetMapValueListIndex].AsString());
}
targetMapMap[targetMapItem.first] = std::move(targetMapValueListList);
}
m_targetMaps.push_back(std::move(targetMapMap));
}
m_targetMapsHasBeenSet = true;
}
if(jsonValue.ValueExists("ResolvedTargets"))
{
m_resolvedTargets = jsonValue.GetObject("ResolvedTargets");
m_resolvedTargetsHasBeenSet = true;
}
if(jsonValue.ValueExists("MaxConcurrency"))
{
m_maxConcurrency = jsonValue.GetString("MaxConcurrency");
m_maxConcurrencyHasBeenSet = true;
}
if(jsonValue.ValueExists("MaxErrors"))
{
m_maxErrors = jsonValue.GetString("MaxErrors");
m_maxErrorsHasBeenSet = true;
}
if(jsonValue.ValueExists("Target"))
{
m_target = jsonValue.GetString("Target");
m_targetHasBeenSet = true;
}
if(jsonValue.ValueExists("AutomationType"))
{
m_automationType = AutomationTypeMapper::GetAutomationTypeForName(jsonValue.GetString("AutomationType"));
m_automationTypeHasBeenSet = true;
}
return *this;
}
JsonValue AutomationExecutionMetadata::Jsonize() const
{
JsonValue payload;
if(m_automationExecutionIdHasBeenSet)
{
payload.WithString("AutomationExecutionId", m_automationExecutionId);
}
if(m_documentNameHasBeenSet)
{
payload.WithString("DocumentName", m_documentName);
}
if(m_documentVersionHasBeenSet)
{
payload.WithString("DocumentVersion", m_documentVersion);
}
if(m_automationExecutionStatusHasBeenSet)
{
payload.WithString("AutomationExecutionStatus", AutomationExecutionStatusMapper::GetNameForAutomationExecutionStatus(m_automationExecutionStatus));
}
if(m_executionStartTimeHasBeenSet)
{
payload.WithDouble("ExecutionStartTime", m_executionStartTime.SecondsWithMSPrecision());
}
if(m_executionEndTimeHasBeenSet)
{
payload.WithDouble("ExecutionEndTime", m_executionEndTime.SecondsWithMSPrecision());
}
if(m_executedByHasBeenSet)
{
payload.WithString("ExecutedBy", m_executedBy);
}
if(m_logFileHasBeenSet)
{
payload.WithString("LogFile", m_logFile);
}
if(m_outputsHasBeenSet)
{
JsonValue outputsJsonMap;
for(auto& outputsItem : m_outputs)
{
Array<JsonValue> automationParameterValueListJsonList(outputsItem.second.size());
for(unsigned automationParameterValueListIndex = 0; automationParameterValueListIndex < automationParameterValueListJsonList.GetLength(); ++automationParameterValueListIndex)
{
automationParameterValueListJsonList[automationParameterValueListIndex].AsString(outputsItem.second[automationParameterValueListIndex]);
}
outputsJsonMap.WithArray(outputsItem.first, std::move(automationParameterValueListJsonList));
}
payload.WithObject("Outputs", std::move(outputsJsonMap));
}
if(m_modeHasBeenSet)
{
payload.WithString("Mode", ExecutionModeMapper::GetNameForExecutionMode(m_mode));
}
if(m_parentAutomationExecutionIdHasBeenSet)
{
payload.WithString("ParentAutomationExecutionId", m_parentAutomationExecutionId);
}
if(m_currentStepNameHasBeenSet)
{
payload.WithString("CurrentStepName", m_currentStepName);
}
if(m_currentActionHasBeenSet)
{
payload.WithString("CurrentAction", m_currentAction);
}
if(m_failureMessageHasBeenSet)
{
payload.WithString("FailureMessage", m_failureMessage);
}
if(m_targetParameterNameHasBeenSet)
{
payload.WithString("TargetParameterName", m_targetParameterName);
}
if(m_targetsHasBeenSet)
{
Array<JsonValue> targetsJsonList(m_targets.size());
for(unsigned targetsIndex = 0; targetsIndex < targetsJsonList.GetLength(); ++targetsIndex)
{
targetsJsonList[targetsIndex].AsObject(m_targets[targetsIndex].Jsonize());
}
payload.WithArray("Targets", std::move(targetsJsonList));
}
if(m_targetMapsHasBeenSet)
{
Array<JsonValue> targetMapsJsonList(m_targetMaps.size());
for(unsigned targetMapsIndex = 0; targetMapsIndex < targetMapsJsonList.GetLength(); ++targetMapsIndex)
{
JsonValue targetMapJsonMap;
for(auto& targetMapItem : m_targetMaps[targetMapsIndex])
{
Array<JsonValue> targetMapValueListJsonList(targetMapItem.second.size());
for(unsigned targetMapValueListIndex = 0; targetMapValueListIndex < targetMapValueListJsonList.GetLength(); ++targetMapValueListIndex)
{
targetMapValueListJsonList[targetMapValueListIndex].AsString(targetMapItem.second[targetMapValueListIndex]);
}
targetMapJsonMap.WithArray(targetMapItem.first, std::move(targetMapValueListJsonList));
}
targetMapsJsonList[targetMapsIndex].AsObject(std::move(targetMapJsonMap));
}
payload.WithArray("TargetMaps", std::move(targetMapsJsonList));
}
if(m_resolvedTargetsHasBeenSet)
{
payload.WithObject("ResolvedTargets", m_resolvedTargets.Jsonize());
}
if(m_maxConcurrencyHasBeenSet)
{
payload.WithString("MaxConcurrency", m_maxConcurrency);
}
if(m_maxErrorsHasBeenSet)
{
payload.WithString("MaxErrors", m_maxErrors);
}
if(m_targetHasBeenSet)
{
payload.WithString("Target", m_target);
}
if(m_automationTypeHasBeenSet)
{
payload.WithString("AutomationType", AutomationTypeMapper::GetNameForAutomationType(m_automationType));
}
return payload;
}
} // namespace Model
} // namespace SSM
} // 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/ssm/model/AutomationExecutionStatus.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 SSM
{
namespace Model
{
namespace AutomationExecutionStatusMapper
{
static const int Pending_HASH = HashingUtils::HashString("Pending");
static const int InProgress_HASH = HashingUtils::HashString("InProgress");
static const int Waiting_HASH = HashingUtils::HashString("Waiting");
static const int Success_HASH = HashingUtils::HashString("Success");
static const int TimedOut_HASH = HashingUtils::HashString("TimedOut");
static const int Cancelling_HASH = HashingUtils::HashString("Cancelling");
static const int Cancelled_HASH = HashingUtils::HashString("Cancelled");
static const int Failed_HASH = HashingUtils::HashString("Failed");
AutomationExecutionStatus GetAutomationExecutionStatusForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == Pending_HASH)
{
return AutomationExecutionStatus::Pending;
}
else if (hashCode == InProgress_HASH)
{
return AutomationExecutionStatus::InProgress;
}
else if (hashCode == Waiting_HASH)
{
return AutomationExecutionStatus::Waiting;
}
else if (hashCode == Success_HASH)
{
return AutomationExecutionStatus::Success;
}
else if (hashCode == TimedOut_HASH)
{
return AutomationExecutionStatus::TimedOut;
}
else if (hashCode == Cancelling_HASH)
{
return AutomationExecutionStatus::Cancelling;
}
else if (hashCode == Cancelled_HASH)
{
return AutomationExecutionStatus::Cancelled;
}
else if (hashCode == Failed_HASH)
{
return AutomationExecutionStatus::Failed;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<AutomationExecutionStatus>(hashCode);
}
return AutomationExecutionStatus::NOT_SET;
}
Aws::String GetNameForAutomationExecutionStatus(AutomationExecutionStatus enumValue)
{
switch(enumValue)
{
case AutomationExecutionStatus::Pending:
return "Pending";
case AutomationExecutionStatus::InProgress:
return "InProgress";
case AutomationExecutionStatus::Waiting:
return "Waiting";
case AutomationExecutionStatus::Success:
return "Success";
case AutomationExecutionStatus::TimedOut:
return "TimedOut";
case AutomationExecutionStatus::Cancelling:
return "Cancelling";
case AutomationExecutionStatus::Cancelled:
return "Cancelled";
case AutomationExecutionStatus::Failed:
return "Failed";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace AutomationExecutionStatusMapper
} // namespace Model
} // namespace SSM
} // 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/ssm/model/AutomationType.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 SSM
{
namespace Model
{
namespace AutomationTypeMapper
{
static const int CrossAccount_HASH = HashingUtils::HashString("CrossAccount");
static const int Local_HASH = HashingUtils::HashString("Local");
AutomationType GetAutomationTypeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == CrossAccount_HASH)
{
return AutomationType::CrossAccount;
}
else if (hashCode == Local_HASH)
{
return AutomationType::Local;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<AutomationType>(hashCode);
}
return AutomationType::NOT_SET;
}
Aws::String GetNameForAutomationType(AutomationType enumValue)
{
switch(enumValue)
{
case AutomationType::CrossAccount:
return "CrossAccount";
case AutomationType::Local:
return "Local";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace AutomationTypeMapper
} // namespace Model
} // namespace SSM
} // 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/ssm/model/CalendarState.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 SSM
{
namespace Model
{
namespace CalendarStateMapper
{
static const int OPEN_HASH = HashingUtils::HashString("OPEN");
static const int CLOSED_HASH = HashingUtils::HashString("CLOSED");
CalendarState GetCalendarStateForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == OPEN_HASH)
{
return CalendarState::OPEN;
}
else if (hashCode == CLOSED_HASH)
{
return CalendarState::CLOSED;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<CalendarState>(hashCode);
}
return CalendarState::NOT_SET;
}
Aws::String GetNameForCalendarState(CalendarState enumValue)
{
switch(enumValue)
{
case CalendarState::OPEN:
return "OPEN";
case CalendarState::CLOSED:
return "CLOSED";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace CalendarStateMapper
} // namespace Model
} // namespace SSM
} // namespace Aws

View File

@@ -0,0 +1,55 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/CancelCommandRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::SSM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CancelCommandRequest::CancelCommandRequest() :
m_commandIdHasBeenSet(false),
m_instanceIdsHasBeenSet(false)
{
}
Aws::String CancelCommandRequest::SerializePayload() const
{
JsonValue payload;
if(m_commandIdHasBeenSet)
{
payload.WithString("CommandId", m_commandId);
}
if(m_instanceIdsHasBeenSet)
{
Array<JsonValue> instanceIdsJsonList(m_instanceIds.size());
for(unsigned instanceIdsIndex = 0; instanceIdsIndex < instanceIdsJsonList.GetLength(); ++instanceIdsIndex)
{
instanceIdsJsonList[instanceIdsIndex].AsString(m_instanceIds[instanceIdsIndex]);
}
payload.WithArray("InstanceIds", std::move(instanceIdsJsonList));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CancelCommandRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AmazonSSM.CancelCommand"));
return headers;
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/CancelCommandResult.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::SSM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CancelCommandResult::CancelCommandResult()
{
}
CancelCommandResult::CancelCommandResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CancelCommandResult& CancelCommandResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
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/ssm/model/CancelMaintenanceWindowExecutionRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::SSM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CancelMaintenanceWindowExecutionRequest::CancelMaintenanceWindowExecutionRequest() :
m_windowExecutionIdHasBeenSet(false)
{
}
Aws::String CancelMaintenanceWindowExecutionRequest::SerializePayload() const
{
JsonValue payload;
if(m_windowExecutionIdHasBeenSet)
{
payload.WithString("WindowExecutionId", m_windowExecutionId);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CancelMaintenanceWindowExecutionRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AmazonSSM.CancelMaintenanceWindowExecution"));
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/ssm/model/CancelMaintenanceWindowExecutionResult.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::SSM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CancelMaintenanceWindowExecutionResult::CancelMaintenanceWindowExecutionResult()
{
}
CancelMaintenanceWindowExecutionResult::CancelMaintenanceWindowExecutionResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CancelMaintenanceWindowExecutionResult& CancelMaintenanceWindowExecutionResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("WindowExecutionId"))
{
m_windowExecutionId = jsonValue.GetString("WindowExecutionId");
}
return *this;
}

View File

@@ -0,0 +1,76 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/CloudWatchOutputConfig.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SSM
{
namespace Model
{
CloudWatchOutputConfig::CloudWatchOutputConfig() :
m_cloudWatchLogGroupNameHasBeenSet(false),
m_cloudWatchOutputEnabled(false),
m_cloudWatchOutputEnabledHasBeenSet(false)
{
}
CloudWatchOutputConfig::CloudWatchOutputConfig(JsonView jsonValue) :
m_cloudWatchLogGroupNameHasBeenSet(false),
m_cloudWatchOutputEnabled(false),
m_cloudWatchOutputEnabledHasBeenSet(false)
{
*this = jsonValue;
}
CloudWatchOutputConfig& CloudWatchOutputConfig::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("CloudWatchLogGroupName"))
{
m_cloudWatchLogGroupName = jsonValue.GetString("CloudWatchLogGroupName");
m_cloudWatchLogGroupNameHasBeenSet = true;
}
if(jsonValue.ValueExists("CloudWatchOutputEnabled"))
{
m_cloudWatchOutputEnabled = jsonValue.GetBool("CloudWatchOutputEnabled");
m_cloudWatchOutputEnabledHasBeenSet = true;
}
return *this;
}
JsonValue CloudWatchOutputConfig::Jsonize() const
{
JsonValue payload;
if(m_cloudWatchLogGroupNameHasBeenSet)
{
payload.WithString("CloudWatchLogGroupName", m_cloudWatchLogGroupName);
}
if(m_cloudWatchOutputEnabledHasBeenSet)
{
payload.WithBool("CloudWatchOutputEnabled", m_cloudWatchOutputEnabled);
}
return payload;
}
} // namespace Model
} // namespace SSM
} // namespace Aws

View File

@@ -0,0 +1,449 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/Command.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SSM
{
namespace Model
{
Command::Command() :
m_commandIdHasBeenSet(false),
m_documentNameHasBeenSet(false),
m_documentVersionHasBeenSet(false),
m_commentHasBeenSet(false),
m_expiresAfterHasBeenSet(false),
m_parametersHasBeenSet(false),
m_instanceIdsHasBeenSet(false),
m_targetsHasBeenSet(false),
m_requestedDateTimeHasBeenSet(false),
m_status(CommandStatus::NOT_SET),
m_statusHasBeenSet(false),
m_statusDetailsHasBeenSet(false),
m_outputS3RegionHasBeenSet(false),
m_outputS3BucketNameHasBeenSet(false),
m_outputS3KeyPrefixHasBeenSet(false),
m_maxConcurrencyHasBeenSet(false),
m_maxErrorsHasBeenSet(false),
m_targetCount(0),
m_targetCountHasBeenSet(false),
m_completedCount(0),
m_completedCountHasBeenSet(false),
m_errorCount(0),
m_errorCountHasBeenSet(false),
m_deliveryTimedOutCount(0),
m_deliveryTimedOutCountHasBeenSet(false),
m_serviceRoleHasBeenSet(false),
m_notificationConfigHasBeenSet(false),
m_cloudWatchOutputConfigHasBeenSet(false),
m_timeoutSeconds(0),
m_timeoutSecondsHasBeenSet(false)
{
}
Command::Command(JsonView jsonValue) :
m_commandIdHasBeenSet(false),
m_documentNameHasBeenSet(false),
m_documentVersionHasBeenSet(false),
m_commentHasBeenSet(false),
m_expiresAfterHasBeenSet(false),
m_parametersHasBeenSet(false),
m_instanceIdsHasBeenSet(false),
m_targetsHasBeenSet(false),
m_requestedDateTimeHasBeenSet(false),
m_status(CommandStatus::NOT_SET),
m_statusHasBeenSet(false),
m_statusDetailsHasBeenSet(false),
m_outputS3RegionHasBeenSet(false),
m_outputS3BucketNameHasBeenSet(false),
m_outputS3KeyPrefixHasBeenSet(false),
m_maxConcurrencyHasBeenSet(false),
m_maxErrorsHasBeenSet(false),
m_targetCount(0),
m_targetCountHasBeenSet(false),
m_completedCount(0),
m_completedCountHasBeenSet(false),
m_errorCount(0),
m_errorCountHasBeenSet(false),
m_deliveryTimedOutCount(0),
m_deliveryTimedOutCountHasBeenSet(false),
m_serviceRoleHasBeenSet(false),
m_notificationConfigHasBeenSet(false),
m_cloudWatchOutputConfigHasBeenSet(false),
m_timeoutSeconds(0),
m_timeoutSecondsHasBeenSet(false)
{
*this = jsonValue;
}
Command& Command::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("CommandId"))
{
m_commandId = jsonValue.GetString("CommandId");
m_commandIdHasBeenSet = true;
}
if(jsonValue.ValueExists("DocumentName"))
{
m_documentName = jsonValue.GetString("DocumentName");
m_documentNameHasBeenSet = true;
}
if(jsonValue.ValueExists("DocumentVersion"))
{
m_documentVersion = jsonValue.GetString("DocumentVersion");
m_documentVersionHasBeenSet = true;
}
if(jsonValue.ValueExists("Comment"))
{
m_comment = jsonValue.GetString("Comment");
m_commentHasBeenSet = true;
}
if(jsonValue.ValueExists("ExpiresAfter"))
{
m_expiresAfter = jsonValue.GetDouble("ExpiresAfter");
m_expiresAfterHasBeenSet = true;
}
if(jsonValue.ValueExists("Parameters"))
{
Aws::Map<Aws::String, JsonView> parametersJsonMap = jsonValue.GetObject("Parameters").GetAllObjects();
for(auto& parametersItem : parametersJsonMap)
{
Array<JsonView> parameterValueListJsonList = parametersItem.second.AsArray();
Aws::Vector<Aws::String> parameterValueListList;
parameterValueListList.reserve((size_t)parameterValueListJsonList.GetLength());
for(unsigned parameterValueListIndex = 0; parameterValueListIndex < parameterValueListJsonList.GetLength(); ++parameterValueListIndex)
{
parameterValueListList.push_back(parameterValueListJsonList[parameterValueListIndex].AsString());
}
m_parameters[parametersItem.first] = std::move(parameterValueListList);
}
m_parametersHasBeenSet = true;
}
if(jsonValue.ValueExists("InstanceIds"))
{
Array<JsonView> instanceIdsJsonList = jsonValue.GetArray("InstanceIds");
for(unsigned instanceIdsIndex = 0; instanceIdsIndex < instanceIdsJsonList.GetLength(); ++instanceIdsIndex)
{
m_instanceIds.push_back(instanceIdsJsonList[instanceIdsIndex].AsString());
}
m_instanceIdsHasBeenSet = true;
}
if(jsonValue.ValueExists("Targets"))
{
Array<JsonView> targetsJsonList = jsonValue.GetArray("Targets");
for(unsigned targetsIndex = 0; targetsIndex < targetsJsonList.GetLength(); ++targetsIndex)
{
m_targets.push_back(targetsJsonList[targetsIndex].AsObject());
}
m_targetsHasBeenSet = true;
}
if(jsonValue.ValueExists("RequestedDateTime"))
{
m_requestedDateTime = jsonValue.GetDouble("RequestedDateTime");
m_requestedDateTimeHasBeenSet = true;
}
if(jsonValue.ValueExists("Status"))
{
m_status = CommandStatusMapper::GetCommandStatusForName(jsonValue.GetString("Status"));
m_statusHasBeenSet = true;
}
if(jsonValue.ValueExists("StatusDetails"))
{
m_statusDetails = jsonValue.GetString("StatusDetails");
m_statusDetailsHasBeenSet = true;
}
if(jsonValue.ValueExists("OutputS3Region"))
{
m_outputS3Region = jsonValue.GetString("OutputS3Region");
m_outputS3RegionHasBeenSet = true;
}
if(jsonValue.ValueExists("OutputS3BucketName"))
{
m_outputS3BucketName = jsonValue.GetString("OutputS3BucketName");
m_outputS3BucketNameHasBeenSet = true;
}
if(jsonValue.ValueExists("OutputS3KeyPrefix"))
{
m_outputS3KeyPrefix = jsonValue.GetString("OutputS3KeyPrefix");
m_outputS3KeyPrefixHasBeenSet = true;
}
if(jsonValue.ValueExists("MaxConcurrency"))
{
m_maxConcurrency = jsonValue.GetString("MaxConcurrency");
m_maxConcurrencyHasBeenSet = true;
}
if(jsonValue.ValueExists("MaxErrors"))
{
m_maxErrors = jsonValue.GetString("MaxErrors");
m_maxErrorsHasBeenSet = true;
}
if(jsonValue.ValueExists("TargetCount"))
{
m_targetCount = jsonValue.GetInteger("TargetCount");
m_targetCountHasBeenSet = true;
}
if(jsonValue.ValueExists("CompletedCount"))
{
m_completedCount = jsonValue.GetInteger("CompletedCount");
m_completedCountHasBeenSet = true;
}
if(jsonValue.ValueExists("ErrorCount"))
{
m_errorCount = jsonValue.GetInteger("ErrorCount");
m_errorCountHasBeenSet = true;
}
if(jsonValue.ValueExists("DeliveryTimedOutCount"))
{
m_deliveryTimedOutCount = jsonValue.GetInteger("DeliveryTimedOutCount");
m_deliveryTimedOutCountHasBeenSet = true;
}
if(jsonValue.ValueExists("ServiceRole"))
{
m_serviceRole = jsonValue.GetString("ServiceRole");
m_serviceRoleHasBeenSet = true;
}
if(jsonValue.ValueExists("NotificationConfig"))
{
m_notificationConfig = jsonValue.GetObject("NotificationConfig");
m_notificationConfigHasBeenSet = true;
}
if(jsonValue.ValueExists("CloudWatchOutputConfig"))
{
m_cloudWatchOutputConfig = jsonValue.GetObject("CloudWatchOutputConfig");
m_cloudWatchOutputConfigHasBeenSet = true;
}
if(jsonValue.ValueExists("TimeoutSeconds"))
{
m_timeoutSeconds = jsonValue.GetInteger("TimeoutSeconds");
m_timeoutSecondsHasBeenSet = true;
}
return *this;
}
JsonValue Command::Jsonize() const
{
JsonValue payload;
if(m_commandIdHasBeenSet)
{
payload.WithString("CommandId", m_commandId);
}
if(m_documentNameHasBeenSet)
{
payload.WithString("DocumentName", m_documentName);
}
if(m_documentVersionHasBeenSet)
{
payload.WithString("DocumentVersion", m_documentVersion);
}
if(m_commentHasBeenSet)
{
payload.WithString("Comment", m_comment);
}
if(m_expiresAfterHasBeenSet)
{
payload.WithDouble("ExpiresAfter", m_expiresAfter.SecondsWithMSPrecision());
}
if(m_parametersHasBeenSet)
{
JsonValue parametersJsonMap;
for(auto& parametersItem : m_parameters)
{
Array<JsonValue> parameterValueListJsonList(parametersItem.second.size());
for(unsigned parameterValueListIndex = 0; parameterValueListIndex < parameterValueListJsonList.GetLength(); ++parameterValueListIndex)
{
parameterValueListJsonList[parameterValueListIndex].AsString(parametersItem.second[parameterValueListIndex]);
}
parametersJsonMap.WithArray(parametersItem.first, std::move(parameterValueListJsonList));
}
payload.WithObject("Parameters", std::move(parametersJsonMap));
}
if(m_instanceIdsHasBeenSet)
{
Array<JsonValue> instanceIdsJsonList(m_instanceIds.size());
for(unsigned instanceIdsIndex = 0; instanceIdsIndex < instanceIdsJsonList.GetLength(); ++instanceIdsIndex)
{
instanceIdsJsonList[instanceIdsIndex].AsString(m_instanceIds[instanceIdsIndex]);
}
payload.WithArray("InstanceIds", std::move(instanceIdsJsonList));
}
if(m_targetsHasBeenSet)
{
Array<JsonValue> targetsJsonList(m_targets.size());
for(unsigned targetsIndex = 0; targetsIndex < targetsJsonList.GetLength(); ++targetsIndex)
{
targetsJsonList[targetsIndex].AsObject(m_targets[targetsIndex].Jsonize());
}
payload.WithArray("Targets", std::move(targetsJsonList));
}
if(m_requestedDateTimeHasBeenSet)
{
payload.WithDouble("RequestedDateTime", m_requestedDateTime.SecondsWithMSPrecision());
}
if(m_statusHasBeenSet)
{
payload.WithString("Status", CommandStatusMapper::GetNameForCommandStatus(m_status));
}
if(m_statusDetailsHasBeenSet)
{
payload.WithString("StatusDetails", m_statusDetails);
}
if(m_outputS3RegionHasBeenSet)
{
payload.WithString("OutputS3Region", m_outputS3Region);
}
if(m_outputS3BucketNameHasBeenSet)
{
payload.WithString("OutputS3BucketName", m_outputS3BucketName);
}
if(m_outputS3KeyPrefixHasBeenSet)
{
payload.WithString("OutputS3KeyPrefix", m_outputS3KeyPrefix);
}
if(m_maxConcurrencyHasBeenSet)
{
payload.WithString("MaxConcurrency", m_maxConcurrency);
}
if(m_maxErrorsHasBeenSet)
{
payload.WithString("MaxErrors", m_maxErrors);
}
if(m_targetCountHasBeenSet)
{
payload.WithInteger("TargetCount", m_targetCount);
}
if(m_completedCountHasBeenSet)
{
payload.WithInteger("CompletedCount", m_completedCount);
}
if(m_errorCountHasBeenSet)
{
payload.WithInteger("ErrorCount", m_errorCount);
}
if(m_deliveryTimedOutCountHasBeenSet)
{
payload.WithInteger("DeliveryTimedOutCount", m_deliveryTimedOutCount);
}
if(m_serviceRoleHasBeenSet)
{
payload.WithString("ServiceRole", m_serviceRole);
}
if(m_notificationConfigHasBeenSet)
{
payload.WithObject("NotificationConfig", m_notificationConfig.Jsonize());
}
if(m_cloudWatchOutputConfigHasBeenSet)
{
payload.WithObject("CloudWatchOutputConfig", m_cloudWatchOutputConfig.Jsonize());
}
if(m_timeoutSecondsHasBeenSet)
{
payload.WithInteger("TimeoutSeconds", m_timeoutSeconds);
}
return payload;
}
} // namespace Model
} // namespace SSM
} // namespace Aws

View File

@@ -0,0 +1,75 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/CommandFilter.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SSM
{
namespace Model
{
CommandFilter::CommandFilter() :
m_key(CommandFilterKey::NOT_SET),
m_keyHasBeenSet(false),
m_valueHasBeenSet(false)
{
}
CommandFilter::CommandFilter(JsonView jsonValue) :
m_key(CommandFilterKey::NOT_SET),
m_keyHasBeenSet(false),
m_valueHasBeenSet(false)
{
*this = jsonValue;
}
CommandFilter& CommandFilter::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("key"))
{
m_key = CommandFilterKeyMapper::GetCommandFilterKeyForName(jsonValue.GetString("key"));
m_keyHasBeenSet = true;
}
if(jsonValue.ValueExists("value"))
{
m_value = jsonValue.GetString("value");
m_valueHasBeenSet = true;
}
return *this;
}
JsonValue CommandFilter::Jsonize() const
{
JsonValue payload;
if(m_keyHasBeenSet)
{
payload.WithString("key", CommandFilterKeyMapper::GetNameForCommandFilterKey(m_key));
}
if(m_valueHasBeenSet)
{
payload.WithString("value", m_value);
}
return payload;
}
} // namespace Model
} // namespace SSM
} // 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/ssm/model/CommandFilterKey.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 SSM
{
namespace Model
{
namespace CommandFilterKeyMapper
{
static const int InvokedAfter_HASH = HashingUtils::HashString("InvokedAfter");
static const int InvokedBefore_HASH = HashingUtils::HashString("InvokedBefore");
static const int Status_HASH = HashingUtils::HashString("Status");
static const int ExecutionStage_HASH = HashingUtils::HashString("ExecutionStage");
static const int DocumentName_HASH = HashingUtils::HashString("DocumentName");
CommandFilterKey GetCommandFilterKeyForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == InvokedAfter_HASH)
{
return CommandFilterKey::InvokedAfter;
}
else if (hashCode == InvokedBefore_HASH)
{
return CommandFilterKey::InvokedBefore;
}
else if (hashCode == Status_HASH)
{
return CommandFilterKey::Status;
}
else if (hashCode == ExecutionStage_HASH)
{
return CommandFilterKey::ExecutionStage;
}
else if (hashCode == DocumentName_HASH)
{
return CommandFilterKey::DocumentName;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<CommandFilterKey>(hashCode);
}
return CommandFilterKey::NOT_SET;
}
Aws::String GetNameForCommandFilterKey(CommandFilterKey enumValue)
{
switch(enumValue)
{
case CommandFilterKey::InvokedAfter:
return "InvokedAfter";
case CommandFilterKey::InvokedBefore:
return "InvokedBefore";
case CommandFilterKey::Status:
return "Status";
case CommandFilterKey::ExecutionStage:
return "ExecutionStage";
case CommandFilterKey::DocumentName:
return "DocumentName";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace CommandFilterKeyMapper
} // namespace Model
} // namespace SSM
} // namespace Aws

View File

@@ -0,0 +1,292 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/CommandInvocation.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SSM
{
namespace Model
{
CommandInvocation::CommandInvocation() :
m_commandIdHasBeenSet(false),
m_instanceIdHasBeenSet(false),
m_instanceNameHasBeenSet(false),
m_commentHasBeenSet(false),
m_documentNameHasBeenSet(false),
m_documentVersionHasBeenSet(false),
m_requestedDateTimeHasBeenSet(false),
m_status(CommandInvocationStatus::NOT_SET),
m_statusHasBeenSet(false),
m_statusDetailsHasBeenSet(false),
m_traceOutputHasBeenSet(false),
m_standardOutputUrlHasBeenSet(false),
m_standardErrorUrlHasBeenSet(false),
m_commandPluginsHasBeenSet(false),
m_serviceRoleHasBeenSet(false),
m_notificationConfigHasBeenSet(false),
m_cloudWatchOutputConfigHasBeenSet(false)
{
}
CommandInvocation::CommandInvocation(JsonView jsonValue) :
m_commandIdHasBeenSet(false),
m_instanceIdHasBeenSet(false),
m_instanceNameHasBeenSet(false),
m_commentHasBeenSet(false),
m_documentNameHasBeenSet(false),
m_documentVersionHasBeenSet(false),
m_requestedDateTimeHasBeenSet(false),
m_status(CommandInvocationStatus::NOT_SET),
m_statusHasBeenSet(false),
m_statusDetailsHasBeenSet(false),
m_traceOutputHasBeenSet(false),
m_standardOutputUrlHasBeenSet(false),
m_standardErrorUrlHasBeenSet(false),
m_commandPluginsHasBeenSet(false),
m_serviceRoleHasBeenSet(false),
m_notificationConfigHasBeenSet(false),
m_cloudWatchOutputConfigHasBeenSet(false)
{
*this = jsonValue;
}
CommandInvocation& CommandInvocation::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("CommandId"))
{
m_commandId = jsonValue.GetString("CommandId");
m_commandIdHasBeenSet = true;
}
if(jsonValue.ValueExists("InstanceId"))
{
m_instanceId = jsonValue.GetString("InstanceId");
m_instanceIdHasBeenSet = true;
}
if(jsonValue.ValueExists("InstanceName"))
{
m_instanceName = jsonValue.GetString("InstanceName");
m_instanceNameHasBeenSet = true;
}
if(jsonValue.ValueExists("Comment"))
{
m_comment = jsonValue.GetString("Comment");
m_commentHasBeenSet = true;
}
if(jsonValue.ValueExists("DocumentName"))
{
m_documentName = jsonValue.GetString("DocumentName");
m_documentNameHasBeenSet = true;
}
if(jsonValue.ValueExists("DocumentVersion"))
{
m_documentVersion = jsonValue.GetString("DocumentVersion");
m_documentVersionHasBeenSet = true;
}
if(jsonValue.ValueExists("RequestedDateTime"))
{
m_requestedDateTime = jsonValue.GetDouble("RequestedDateTime");
m_requestedDateTimeHasBeenSet = true;
}
if(jsonValue.ValueExists("Status"))
{
m_status = CommandInvocationStatusMapper::GetCommandInvocationStatusForName(jsonValue.GetString("Status"));
m_statusHasBeenSet = true;
}
if(jsonValue.ValueExists("StatusDetails"))
{
m_statusDetails = jsonValue.GetString("StatusDetails");
m_statusDetailsHasBeenSet = true;
}
if(jsonValue.ValueExists("TraceOutput"))
{
m_traceOutput = jsonValue.GetString("TraceOutput");
m_traceOutputHasBeenSet = true;
}
if(jsonValue.ValueExists("StandardOutputUrl"))
{
m_standardOutputUrl = jsonValue.GetString("StandardOutputUrl");
m_standardOutputUrlHasBeenSet = true;
}
if(jsonValue.ValueExists("StandardErrorUrl"))
{
m_standardErrorUrl = jsonValue.GetString("StandardErrorUrl");
m_standardErrorUrlHasBeenSet = true;
}
if(jsonValue.ValueExists("CommandPlugins"))
{
Array<JsonView> commandPluginsJsonList = jsonValue.GetArray("CommandPlugins");
for(unsigned commandPluginsIndex = 0; commandPluginsIndex < commandPluginsJsonList.GetLength(); ++commandPluginsIndex)
{
m_commandPlugins.push_back(commandPluginsJsonList[commandPluginsIndex].AsObject());
}
m_commandPluginsHasBeenSet = true;
}
if(jsonValue.ValueExists("ServiceRole"))
{
m_serviceRole = jsonValue.GetString("ServiceRole");
m_serviceRoleHasBeenSet = true;
}
if(jsonValue.ValueExists("NotificationConfig"))
{
m_notificationConfig = jsonValue.GetObject("NotificationConfig");
m_notificationConfigHasBeenSet = true;
}
if(jsonValue.ValueExists("CloudWatchOutputConfig"))
{
m_cloudWatchOutputConfig = jsonValue.GetObject("CloudWatchOutputConfig");
m_cloudWatchOutputConfigHasBeenSet = true;
}
return *this;
}
JsonValue CommandInvocation::Jsonize() const
{
JsonValue payload;
if(m_commandIdHasBeenSet)
{
payload.WithString("CommandId", m_commandId);
}
if(m_instanceIdHasBeenSet)
{
payload.WithString("InstanceId", m_instanceId);
}
if(m_instanceNameHasBeenSet)
{
payload.WithString("InstanceName", m_instanceName);
}
if(m_commentHasBeenSet)
{
payload.WithString("Comment", m_comment);
}
if(m_documentNameHasBeenSet)
{
payload.WithString("DocumentName", m_documentName);
}
if(m_documentVersionHasBeenSet)
{
payload.WithString("DocumentVersion", m_documentVersion);
}
if(m_requestedDateTimeHasBeenSet)
{
payload.WithDouble("RequestedDateTime", m_requestedDateTime.SecondsWithMSPrecision());
}
if(m_statusHasBeenSet)
{
payload.WithString("Status", CommandInvocationStatusMapper::GetNameForCommandInvocationStatus(m_status));
}
if(m_statusDetailsHasBeenSet)
{
payload.WithString("StatusDetails", m_statusDetails);
}
if(m_traceOutputHasBeenSet)
{
payload.WithString("TraceOutput", m_traceOutput);
}
if(m_standardOutputUrlHasBeenSet)
{
payload.WithString("StandardOutputUrl", m_standardOutputUrl);
}
if(m_standardErrorUrlHasBeenSet)
{
payload.WithString("StandardErrorUrl", m_standardErrorUrl);
}
if(m_commandPluginsHasBeenSet)
{
Array<JsonValue> commandPluginsJsonList(m_commandPlugins.size());
for(unsigned commandPluginsIndex = 0; commandPluginsIndex < commandPluginsJsonList.GetLength(); ++commandPluginsIndex)
{
commandPluginsJsonList[commandPluginsIndex].AsObject(m_commandPlugins[commandPluginsIndex].Jsonize());
}
payload.WithArray("CommandPlugins", std::move(commandPluginsJsonList));
}
if(m_serviceRoleHasBeenSet)
{
payload.WithString("ServiceRole", m_serviceRole);
}
if(m_notificationConfigHasBeenSet)
{
payload.WithObject("NotificationConfig", m_notificationConfig.Jsonize());
}
if(m_cloudWatchOutputConfigHasBeenSet)
{
payload.WithObject("CloudWatchOutputConfig", m_cloudWatchOutputConfig.Jsonize());
}
return payload;
}
} // namespace Model
} // namespace SSM
} // 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/ssm/model/CommandInvocationStatus.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 SSM
{
namespace Model
{
namespace CommandInvocationStatusMapper
{
static const int Pending_HASH = HashingUtils::HashString("Pending");
static const int InProgress_HASH = HashingUtils::HashString("InProgress");
static const int Delayed_HASH = HashingUtils::HashString("Delayed");
static const int Success_HASH = HashingUtils::HashString("Success");
static const int Cancelled_HASH = HashingUtils::HashString("Cancelled");
static const int TimedOut_HASH = HashingUtils::HashString("TimedOut");
static const int Failed_HASH = HashingUtils::HashString("Failed");
static const int Cancelling_HASH = HashingUtils::HashString("Cancelling");
CommandInvocationStatus GetCommandInvocationStatusForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == Pending_HASH)
{
return CommandInvocationStatus::Pending;
}
else if (hashCode == InProgress_HASH)
{
return CommandInvocationStatus::InProgress;
}
else if (hashCode == Delayed_HASH)
{
return CommandInvocationStatus::Delayed;
}
else if (hashCode == Success_HASH)
{
return CommandInvocationStatus::Success;
}
else if (hashCode == Cancelled_HASH)
{
return CommandInvocationStatus::Cancelled;
}
else if (hashCode == TimedOut_HASH)
{
return CommandInvocationStatus::TimedOut;
}
else if (hashCode == Failed_HASH)
{
return CommandInvocationStatus::Failed;
}
else if (hashCode == Cancelling_HASH)
{
return CommandInvocationStatus::Cancelling;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<CommandInvocationStatus>(hashCode);
}
return CommandInvocationStatus::NOT_SET;
}
Aws::String GetNameForCommandInvocationStatus(CommandInvocationStatus enumValue)
{
switch(enumValue)
{
case CommandInvocationStatus::Pending:
return "Pending";
case CommandInvocationStatus::InProgress:
return "InProgress";
case CommandInvocationStatus::Delayed:
return "Delayed";
case CommandInvocationStatus::Success:
return "Success";
case CommandInvocationStatus::Cancelled:
return "Cancelled";
case CommandInvocationStatus::TimedOut:
return "TimedOut";
case CommandInvocationStatus::Failed:
return "Failed";
case CommandInvocationStatus::Cancelling:
return "Cancelling";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace CommandInvocationStatusMapper
} // namespace Model
} // namespace SSM
} // namespace Aws

View File

@@ -0,0 +1,225 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/CommandPlugin.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SSM
{
namespace Model
{
CommandPlugin::CommandPlugin() :
m_nameHasBeenSet(false),
m_status(CommandPluginStatus::NOT_SET),
m_statusHasBeenSet(false),
m_statusDetailsHasBeenSet(false),
m_responseCode(0),
m_responseCodeHasBeenSet(false),
m_responseStartDateTimeHasBeenSet(false),
m_responseFinishDateTimeHasBeenSet(false),
m_outputHasBeenSet(false),
m_standardOutputUrlHasBeenSet(false),
m_standardErrorUrlHasBeenSet(false),
m_outputS3RegionHasBeenSet(false),
m_outputS3BucketNameHasBeenSet(false),
m_outputS3KeyPrefixHasBeenSet(false)
{
}
CommandPlugin::CommandPlugin(JsonView jsonValue) :
m_nameHasBeenSet(false),
m_status(CommandPluginStatus::NOT_SET),
m_statusHasBeenSet(false),
m_statusDetailsHasBeenSet(false),
m_responseCode(0),
m_responseCodeHasBeenSet(false),
m_responseStartDateTimeHasBeenSet(false),
m_responseFinishDateTimeHasBeenSet(false),
m_outputHasBeenSet(false),
m_standardOutputUrlHasBeenSet(false),
m_standardErrorUrlHasBeenSet(false),
m_outputS3RegionHasBeenSet(false),
m_outputS3BucketNameHasBeenSet(false),
m_outputS3KeyPrefixHasBeenSet(false)
{
*this = jsonValue;
}
CommandPlugin& CommandPlugin::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Name"))
{
m_name = jsonValue.GetString("Name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("Status"))
{
m_status = CommandPluginStatusMapper::GetCommandPluginStatusForName(jsonValue.GetString("Status"));
m_statusHasBeenSet = true;
}
if(jsonValue.ValueExists("StatusDetails"))
{
m_statusDetails = jsonValue.GetString("StatusDetails");
m_statusDetailsHasBeenSet = true;
}
if(jsonValue.ValueExists("ResponseCode"))
{
m_responseCode = jsonValue.GetInteger("ResponseCode");
m_responseCodeHasBeenSet = true;
}
if(jsonValue.ValueExists("ResponseStartDateTime"))
{
m_responseStartDateTime = jsonValue.GetDouble("ResponseStartDateTime");
m_responseStartDateTimeHasBeenSet = true;
}
if(jsonValue.ValueExists("ResponseFinishDateTime"))
{
m_responseFinishDateTime = jsonValue.GetDouble("ResponseFinishDateTime");
m_responseFinishDateTimeHasBeenSet = true;
}
if(jsonValue.ValueExists("Output"))
{
m_output = jsonValue.GetString("Output");
m_outputHasBeenSet = true;
}
if(jsonValue.ValueExists("StandardOutputUrl"))
{
m_standardOutputUrl = jsonValue.GetString("StandardOutputUrl");
m_standardOutputUrlHasBeenSet = true;
}
if(jsonValue.ValueExists("StandardErrorUrl"))
{
m_standardErrorUrl = jsonValue.GetString("StandardErrorUrl");
m_standardErrorUrlHasBeenSet = true;
}
if(jsonValue.ValueExists("OutputS3Region"))
{
m_outputS3Region = jsonValue.GetString("OutputS3Region");
m_outputS3RegionHasBeenSet = true;
}
if(jsonValue.ValueExists("OutputS3BucketName"))
{
m_outputS3BucketName = jsonValue.GetString("OutputS3BucketName");
m_outputS3BucketNameHasBeenSet = true;
}
if(jsonValue.ValueExists("OutputS3KeyPrefix"))
{
m_outputS3KeyPrefix = jsonValue.GetString("OutputS3KeyPrefix");
m_outputS3KeyPrefixHasBeenSet = true;
}
return *this;
}
JsonValue CommandPlugin::Jsonize() const
{
JsonValue payload;
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
if(m_statusHasBeenSet)
{
payload.WithString("Status", CommandPluginStatusMapper::GetNameForCommandPluginStatus(m_status));
}
if(m_statusDetailsHasBeenSet)
{
payload.WithString("StatusDetails", m_statusDetails);
}
if(m_responseCodeHasBeenSet)
{
payload.WithInteger("ResponseCode", m_responseCode);
}
if(m_responseStartDateTimeHasBeenSet)
{
payload.WithDouble("ResponseStartDateTime", m_responseStartDateTime.SecondsWithMSPrecision());
}
if(m_responseFinishDateTimeHasBeenSet)
{
payload.WithDouble("ResponseFinishDateTime", m_responseFinishDateTime.SecondsWithMSPrecision());
}
if(m_outputHasBeenSet)
{
payload.WithString("Output", m_output);
}
if(m_standardOutputUrlHasBeenSet)
{
payload.WithString("StandardOutputUrl", m_standardOutputUrl);
}
if(m_standardErrorUrlHasBeenSet)
{
payload.WithString("StandardErrorUrl", m_standardErrorUrl);
}
if(m_outputS3RegionHasBeenSet)
{
payload.WithString("OutputS3Region", m_outputS3Region);
}
if(m_outputS3BucketNameHasBeenSet)
{
payload.WithString("OutputS3BucketName", m_outputS3BucketName);
}
if(m_outputS3KeyPrefixHasBeenSet)
{
payload.WithString("OutputS3KeyPrefix", m_outputS3KeyPrefix);
}
return payload;
}
} // namespace Model
} // namespace SSM
} // 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/ssm/model/CommandPluginStatus.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 SSM
{
namespace Model
{
namespace CommandPluginStatusMapper
{
static const int Pending_HASH = HashingUtils::HashString("Pending");
static const int InProgress_HASH = HashingUtils::HashString("InProgress");
static const int Success_HASH = HashingUtils::HashString("Success");
static const int TimedOut_HASH = HashingUtils::HashString("TimedOut");
static const int Cancelled_HASH = HashingUtils::HashString("Cancelled");
static const int Failed_HASH = HashingUtils::HashString("Failed");
CommandPluginStatus GetCommandPluginStatusForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == Pending_HASH)
{
return CommandPluginStatus::Pending;
}
else if (hashCode == InProgress_HASH)
{
return CommandPluginStatus::InProgress;
}
else if (hashCode == Success_HASH)
{
return CommandPluginStatus::Success;
}
else if (hashCode == TimedOut_HASH)
{
return CommandPluginStatus::TimedOut;
}
else if (hashCode == Cancelled_HASH)
{
return CommandPluginStatus::Cancelled;
}
else if (hashCode == Failed_HASH)
{
return CommandPluginStatus::Failed;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<CommandPluginStatus>(hashCode);
}
return CommandPluginStatus::NOT_SET;
}
Aws::String GetNameForCommandPluginStatus(CommandPluginStatus enumValue)
{
switch(enumValue)
{
case CommandPluginStatus::Pending:
return "Pending";
case CommandPluginStatus::InProgress:
return "InProgress";
case CommandPluginStatus::Success:
return "Success";
case CommandPluginStatus::TimedOut:
return "TimedOut";
case CommandPluginStatus::Cancelled:
return "Cancelled";
case CommandPluginStatus::Failed:
return "Failed";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace CommandPluginStatusMapper
} // namespace Model
} // namespace SSM
} // namespace Aws

View File

@@ -0,0 +1,105 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/CommandStatus.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 SSM
{
namespace Model
{
namespace CommandStatusMapper
{
static const int Pending_HASH = HashingUtils::HashString("Pending");
static const int InProgress_HASH = HashingUtils::HashString("InProgress");
static const int Success_HASH = HashingUtils::HashString("Success");
static const int Cancelled_HASH = HashingUtils::HashString("Cancelled");
static const int Failed_HASH = HashingUtils::HashString("Failed");
static const int TimedOut_HASH = HashingUtils::HashString("TimedOut");
static const int Cancelling_HASH = HashingUtils::HashString("Cancelling");
CommandStatus GetCommandStatusForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == Pending_HASH)
{
return CommandStatus::Pending;
}
else if (hashCode == InProgress_HASH)
{
return CommandStatus::InProgress;
}
else if (hashCode == Success_HASH)
{
return CommandStatus::Success;
}
else if (hashCode == Cancelled_HASH)
{
return CommandStatus::Cancelled;
}
else if (hashCode == Failed_HASH)
{
return CommandStatus::Failed;
}
else if (hashCode == TimedOut_HASH)
{
return CommandStatus::TimedOut;
}
else if (hashCode == Cancelling_HASH)
{
return CommandStatus::Cancelling;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<CommandStatus>(hashCode);
}
return CommandStatus::NOT_SET;
}
Aws::String GetNameForCommandStatus(CommandStatus enumValue)
{
switch(enumValue)
{
case CommandStatus::Pending:
return "Pending";
case CommandStatus::InProgress:
return "InProgress";
case CommandStatus::Success:
return "Success";
case CommandStatus::Cancelled:
return "Cancelled";
case CommandStatus::Failed:
return "Failed";
case CommandStatus::TimedOut:
return "TimedOut";
case CommandStatus::Cancelling:
return "Cancelling";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace CommandStatusMapper
} // namespace Model
} // namespace SSM
} // namespace Aws

View File

@@ -0,0 +1,88 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/ComplianceExecutionSummary.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SSM
{
namespace Model
{
ComplianceExecutionSummary::ComplianceExecutionSummary() :
m_executionTimeHasBeenSet(false),
m_executionIdHasBeenSet(false),
m_executionTypeHasBeenSet(false)
{
}
ComplianceExecutionSummary::ComplianceExecutionSummary(JsonView jsonValue) :
m_executionTimeHasBeenSet(false),
m_executionIdHasBeenSet(false),
m_executionTypeHasBeenSet(false)
{
*this = jsonValue;
}
ComplianceExecutionSummary& ComplianceExecutionSummary::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("ExecutionTime"))
{
m_executionTime = jsonValue.GetDouble("ExecutionTime");
m_executionTimeHasBeenSet = true;
}
if(jsonValue.ValueExists("ExecutionId"))
{
m_executionId = jsonValue.GetString("ExecutionId");
m_executionIdHasBeenSet = true;
}
if(jsonValue.ValueExists("ExecutionType"))
{
m_executionType = jsonValue.GetString("ExecutionType");
m_executionTypeHasBeenSet = true;
}
return *this;
}
JsonValue ComplianceExecutionSummary::Jsonize() const
{
JsonValue payload;
if(m_executionTimeHasBeenSet)
{
payload.WithDouble("ExecutionTime", m_executionTime.SecondsWithMSPrecision());
}
if(m_executionIdHasBeenSet)
{
payload.WithString("ExecutionId", m_executionId);
}
if(m_executionTypeHasBeenSet)
{
payload.WithString("ExecutionType", m_executionType);
}
return payload;
}
} // namespace Model
} // namespace SSM
} // namespace Aws

View File

@@ -0,0 +1,189 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/ComplianceItem.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SSM
{
namespace Model
{
ComplianceItem::ComplianceItem() :
m_complianceTypeHasBeenSet(false),
m_resourceTypeHasBeenSet(false),
m_resourceIdHasBeenSet(false),
m_idHasBeenSet(false),
m_titleHasBeenSet(false),
m_status(ComplianceStatus::NOT_SET),
m_statusHasBeenSet(false),
m_severity(ComplianceSeverity::NOT_SET),
m_severityHasBeenSet(false),
m_executionSummaryHasBeenSet(false),
m_detailsHasBeenSet(false)
{
}
ComplianceItem::ComplianceItem(JsonView jsonValue) :
m_complianceTypeHasBeenSet(false),
m_resourceTypeHasBeenSet(false),
m_resourceIdHasBeenSet(false),
m_idHasBeenSet(false),
m_titleHasBeenSet(false),
m_status(ComplianceStatus::NOT_SET),
m_statusHasBeenSet(false),
m_severity(ComplianceSeverity::NOT_SET),
m_severityHasBeenSet(false),
m_executionSummaryHasBeenSet(false),
m_detailsHasBeenSet(false)
{
*this = jsonValue;
}
ComplianceItem& ComplianceItem::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("ComplianceType"))
{
m_complianceType = jsonValue.GetString("ComplianceType");
m_complianceTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("ResourceType"))
{
m_resourceType = jsonValue.GetString("ResourceType");
m_resourceTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("ResourceId"))
{
m_resourceId = jsonValue.GetString("ResourceId");
m_resourceIdHasBeenSet = 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("Status"))
{
m_status = ComplianceStatusMapper::GetComplianceStatusForName(jsonValue.GetString("Status"));
m_statusHasBeenSet = true;
}
if(jsonValue.ValueExists("Severity"))
{
m_severity = ComplianceSeverityMapper::GetComplianceSeverityForName(jsonValue.GetString("Severity"));
m_severityHasBeenSet = true;
}
if(jsonValue.ValueExists("ExecutionSummary"))
{
m_executionSummary = jsonValue.GetObject("ExecutionSummary");
m_executionSummaryHasBeenSet = true;
}
if(jsonValue.ValueExists("Details"))
{
Aws::Map<Aws::String, JsonView> detailsJsonMap = jsonValue.GetObject("Details").GetAllObjects();
for(auto& detailsItem : detailsJsonMap)
{
m_details[detailsItem.first] = detailsItem.second.AsString();
}
m_detailsHasBeenSet = true;
}
return *this;
}
JsonValue ComplianceItem::Jsonize() const
{
JsonValue payload;
if(m_complianceTypeHasBeenSet)
{
payload.WithString("ComplianceType", m_complianceType);
}
if(m_resourceTypeHasBeenSet)
{
payload.WithString("ResourceType", m_resourceType);
}
if(m_resourceIdHasBeenSet)
{
payload.WithString("ResourceId", m_resourceId);
}
if(m_idHasBeenSet)
{
payload.WithString("Id", m_id);
}
if(m_titleHasBeenSet)
{
payload.WithString("Title", m_title);
}
if(m_statusHasBeenSet)
{
payload.WithString("Status", ComplianceStatusMapper::GetNameForComplianceStatus(m_status));
}
if(m_severityHasBeenSet)
{
payload.WithString("Severity", ComplianceSeverityMapper::GetNameForComplianceSeverity(m_severity));
}
if(m_executionSummaryHasBeenSet)
{
payload.WithObject("ExecutionSummary", m_executionSummary.Jsonize());
}
if(m_detailsHasBeenSet)
{
JsonValue detailsJsonMap;
for(auto& detailsItem : m_details)
{
detailsJsonMap.WithString(detailsItem.first, detailsItem.second);
}
payload.WithObject("Details", std::move(detailsJsonMap));
}
return payload;
}
} // namespace Model
} // namespace SSM
} // namespace Aws

View File

@@ -0,0 +1,129 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/ComplianceItemEntry.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SSM
{
namespace Model
{
ComplianceItemEntry::ComplianceItemEntry() :
m_idHasBeenSet(false),
m_titleHasBeenSet(false),
m_severity(ComplianceSeverity::NOT_SET),
m_severityHasBeenSet(false),
m_status(ComplianceStatus::NOT_SET),
m_statusHasBeenSet(false),
m_detailsHasBeenSet(false)
{
}
ComplianceItemEntry::ComplianceItemEntry(JsonView jsonValue) :
m_idHasBeenSet(false),
m_titleHasBeenSet(false),
m_severity(ComplianceSeverity::NOT_SET),
m_severityHasBeenSet(false),
m_status(ComplianceStatus::NOT_SET),
m_statusHasBeenSet(false),
m_detailsHasBeenSet(false)
{
*this = jsonValue;
}
ComplianceItemEntry& ComplianceItemEntry::operator =(JsonView jsonValue)
{
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("Severity"))
{
m_severity = ComplianceSeverityMapper::GetComplianceSeverityForName(jsonValue.GetString("Severity"));
m_severityHasBeenSet = true;
}
if(jsonValue.ValueExists("Status"))
{
m_status = ComplianceStatusMapper::GetComplianceStatusForName(jsonValue.GetString("Status"));
m_statusHasBeenSet = true;
}
if(jsonValue.ValueExists("Details"))
{
Aws::Map<Aws::String, JsonView> detailsJsonMap = jsonValue.GetObject("Details").GetAllObjects();
for(auto& detailsItem : detailsJsonMap)
{
m_details[detailsItem.first] = detailsItem.second.AsString();
}
m_detailsHasBeenSet = true;
}
return *this;
}
JsonValue ComplianceItemEntry::Jsonize() const
{
JsonValue payload;
if(m_idHasBeenSet)
{
payload.WithString("Id", m_id);
}
if(m_titleHasBeenSet)
{
payload.WithString("Title", m_title);
}
if(m_severityHasBeenSet)
{
payload.WithString("Severity", ComplianceSeverityMapper::GetNameForComplianceSeverity(m_severity));
}
if(m_statusHasBeenSet)
{
payload.WithString("Status", ComplianceStatusMapper::GetNameForComplianceStatus(m_status));
}
if(m_detailsHasBeenSet)
{
JsonValue detailsJsonMap;
for(auto& detailsItem : m_details)
{
detailsJsonMap.WithString(detailsItem.first, detailsItem.second);
}
payload.WithObject("Details", std::move(detailsJsonMap));
}
return payload;
}
} // namespace Model
} // namespace SSM
} // 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/ssm/model/ComplianceQueryOperatorType.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 SSM
{
namespace Model
{
namespace ComplianceQueryOperatorTypeMapper
{
static const int EQUAL_HASH = HashingUtils::HashString("EQUAL");
static const int NOT_EQUAL_HASH = HashingUtils::HashString("NOT_EQUAL");
static const int BEGIN_WITH_HASH = HashingUtils::HashString("BEGIN_WITH");
static const int LESS_THAN_HASH = HashingUtils::HashString("LESS_THAN");
static const int GREATER_THAN_HASH = HashingUtils::HashString("GREATER_THAN");
ComplianceQueryOperatorType GetComplianceQueryOperatorTypeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == EQUAL_HASH)
{
return ComplianceQueryOperatorType::EQUAL;
}
else if (hashCode == NOT_EQUAL_HASH)
{
return ComplianceQueryOperatorType::NOT_EQUAL;
}
else if (hashCode == BEGIN_WITH_HASH)
{
return ComplianceQueryOperatorType::BEGIN_WITH;
}
else if (hashCode == LESS_THAN_HASH)
{
return ComplianceQueryOperatorType::LESS_THAN;
}
else if (hashCode == GREATER_THAN_HASH)
{
return ComplianceQueryOperatorType::GREATER_THAN;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<ComplianceQueryOperatorType>(hashCode);
}
return ComplianceQueryOperatorType::NOT_SET;
}
Aws::String GetNameForComplianceQueryOperatorType(ComplianceQueryOperatorType enumValue)
{
switch(enumValue)
{
case ComplianceQueryOperatorType::EQUAL:
return "EQUAL";
case ComplianceQueryOperatorType::NOT_EQUAL:
return "NOT_EQUAL";
case ComplianceQueryOperatorType::BEGIN_WITH:
return "BEGIN_WITH";
case ComplianceQueryOperatorType::LESS_THAN:
return "LESS_THAN";
case ComplianceQueryOperatorType::GREATER_THAN:
return "GREATER_THAN";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace ComplianceQueryOperatorTypeMapper
} // namespace Model
} // namespace SSM
} // 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/ssm/model/ComplianceSeverity.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 SSM
{
namespace Model
{
namespace ComplianceSeverityMapper
{
static const int CRITICAL_HASH = HashingUtils::HashString("CRITICAL");
static const int HIGH_HASH = HashingUtils::HashString("HIGH");
static const int MEDIUM_HASH = HashingUtils::HashString("MEDIUM");
static const int LOW_HASH = HashingUtils::HashString("LOW");
static const int INFORMATIONAL_HASH = HashingUtils::HashString("INFORMATIONAL");
static const int UNSPECIFIED_HASH = HashingUtils::HashString("UNSPECIFIED");
ComplianceSeverity GetComplianceSeverityForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == CRITICAL_HASH)
{
return ComplianceSeverity::CRITICAL;
}
else if (hashCode == HIGH_HASH)
{
return ComplianceSeverity::HIGH;
}
else if (hashCode == MEDIUM_HASH)
{
return ComplianceSeverity::MEDIUM;
}
else if (hashCode == LOW_HASH)
{
return ComplianceSeverity::LOW;
}
else if (hashCode == INFORMATIONAL_HASH)
{
return ComplianceSeverity::INFORMATIONAL;
}
else if (hashCode == UNSPECIFIED_HASH)
{
return ComplianceSeverity::UNSPECIFIED;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<ComplianceSeverity>(hashCode);
}
return ComplianceSeverity::NOT_SET;
}
Aws::String GetNameForComplianceSeverity(ComplianceSeverity enumValue)
{
switch(enumValue)
{
case ComplianceSeverity::CRITICAL:
return "CRITICAL";
case ComplianceSeverity::HIGH:
return "HIGH";
case ComplianceSeverity::MEDIUM:
return "MEDIUM";
case ComplianceSeverity::LOW:
return "LOW";
case ComplianceSeverity::INFORMATIONAL:
return "INFORMATIONAL";
case ComplianceSeverity::UNSPECIFIED:
return "UNSPECIFIED";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace ComplianceSeverityMapper
} // namespace Model
} // namespace SSM
} // 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/ssm/model/ComplianceStatus.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 SSM
{
namespace Model
{
namespace ComplianceStatusMapper
{
static const int COMPLIANT_HASH = HashingUtils::HashString("COMPLIANT");
static const int NON_COMPLIANT_HASH = HashingUtils::HashString("NON_COMPLIANT");
ComplianceStatus GetComplianceStatusForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == COMPLIANT_HASH)
{
return ComplianceStatus::COMPLIANT;
}
else if (hashCode == NON_COMPLIANT_HASH)
{
return ComplianceStatus::NON_COMPLIANT;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<ComplianceStatus>(hashCode);
}
return ComplianceStatus::NOT_SET;
}
Aws::String GetNameForComplianceStatus(ComplianceStatus enumValue)
{
switch(enumValue)
{
case ComplianceStatus::COMPLIANT:
return "COMPLIANT";
case ComplianceStatus::NON_COMPLIANT:
return "NON_COMPLIANT";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace ComplianceStatusMapper
} // namespace Model
} // namespace SSM
} // 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/ssm/model/ComplianceStringFilter.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SSM
{
namespace Model
{
ComplianceStringFilter::ComplianceStringFilter() :
m_keyHasBeenSet(false),
m_valuesHasBeenSet(false),
m_type(ComplianceQueryOperatorType::NOT_SET),
m_typeHasBeenSet(false)
{
}
ComplianceStringFilter::ComplianceStringFilter(JsonView jsonValue) :
m_keyHasBeenSet(false),
m_valuesHasBeenSet(false),
m_type(ComplianceQueryOperatorType::NOT_SET),
m_typeHasBeenSet(false)
{
*this = jsonValue;
}
ComplianceStringFilter& ComplianceStringFilter::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Key"))
{
m_key = jsonValue.GetString("Key");
m_keyHasBeenSet = true;
}
if(jsonValue.ValueExists("Values"))
{
Array<JsonView> valuesJsonList = jsonValue.GetArray("Values");
for(unsigned valuesIndex = 0; valuesIndex < valuesJsonList.GetLength(); ++valuesIndex)
{
m_values.push_back(valuesJsonList[valuesIndex].AsString());
}
m_valuesHasBeenSet = true;
}
if(jsonValue.ValueExists("Type"))
{
m_type = ComplianceQueryOperatorTypeMapper::GetComplianceQueryOperatorTypeForName(jsonValue.GetString("Type"));
m_typeHasBeenSet = true;
}
return *this;
}
JsonValue ComplianceStringFilter::Jsonize() const
{
JsonValue payload;
if(m_keyHasBeenSet)
{
payload.WithString("Key", m_key);
}
if(m_valuesHasBeenSet)
{
Array<JsonValue> valuesJsonList(m_values.size());
for(unsigned valuesIndex = 0; valuesIndex < valuesJsonList.GetLength(); ++valuesIndex)
{
valuesJsonList[valuesIndex].AsString(m_values[valuesIndex]);
}
payload.WithArray("Values", std::move(valuesJsonList));
}
if(m_typeHasBeenSet)
{
payload.WithString("Type", ComplianceQueryOperatorTypeMapper::GetNameForComplianceQueryOperatorType(m_type));
}
return payload;
}
} // namespace Model
} // namespace SSM
} // namespace Aws

View File

@@ -0,0 +1,89 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/ComplianceSummaryItem.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SSM
{
namespace Model
{
ComplianceSummaryItem::ComplianceSummaryItem() :
m_complianceTypeHasBeenSet(false),
m_compliantSummaryHasBeenSet(false),
m_nonCompliantSummaryHasBeenSet(false)
{
}
ComplianceSummaryItem::ComplianceSummaryItem(JsonView jsonValue) :
m_complianceTypeHasBeenSet(false),
m_compliantSummaryHasBeenSet(false),
m_nonCompliantSummaryHasBeenSet(false)
{
*this = jsonValue;
}
ComplianceSummaryItem& ComplianceSummaryItem::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("ComplianceType"))
{
m_complianceType = jsonValue.GetString("ComplianceType");
m_complianceTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("CompliantSummary"))
{
m_compliantSummary = jsonValue.GetObject("CompliantSummary");
m_compliantSummaryHasBeenSet = true;
}
if(jsonValue.ValueExists("NonCompliantSummary"))
{
m_nonCompliantSummary = jsonValue.GetObject("NonCompliantSummary");
m_nonCompliantSummaryHasBeenSet = true;
}
return *this;
}
JsonValue ComplianceSummaryItem::Jsonize() const
{
JsonValue payload;
if(m_complianceTypeHasBeenSet)
{
payload.WithString("ComplianceType", m_complianceType);
}
if(m_compliantSummaryHasBeenSet)
{
payload.WithObject("CompliantSummary", m_compliantSummary.Jsonize());
}
if(m_nonCompliantSummaryHasBeenSet)
{
payload.WithObject("NonCompliantSummary", m_nonCompliantSummary.Jsonize());
}
return payload;
}
} // namespace Model
} // namespace SSM
} // 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/ssm/model/ComplianceUploadType.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 SSM
{
namespace Model
{
namespace ComplianceUploadTypeMapper
{
static const int COMPLETE_HASH = HashingUtils::HashString("COMPLETE");
static const int PARTIAL_HASH = HashingUtils::HashString("PARTIAL");
ComplianceUploadType GetComplianceUploadTypeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == COMPLETE_HASH)
{
return ComplianceUploadType::COMPLETE;
}
else if (hashCode == PARTIAL_HASH)
{
return ComplianceUploadType::PARTIAL;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<ComplianceUploadType>(hashCode);
}
return ComplianceUploadType::NOT_SET;
}
Aws::String GetNameForComplianceUploadType(ComplianceUploadType enumValue)
{
switch(enumValue)
{
case ComplianceUploadType::COMPLETE:
return "COMPLETE";
case ComplianceUploadType::PARTIAL:
return "PARTIAL";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace ComplianceUploadTypeMapper
} // namespace Model
} // namespace SSM
} // 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/ssm/model/CompliantSummary.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SSM
{
namespace Model
{
CompliantSummary::CompliantSummary() :
m_compliantCount(0),
m_compliantCountHasBeenSet(false),
m_severitySummaryHasBeenSet(false)
{
}
CompliantSummary::CompliantSummary(JsonView jsonValue) :
m_compliantCount(0),
m_compliantCountHasBeenSet(false),
m_severitySummaryHasBeenSet(false)
{
*this = jsonValue;
}
CompliantSummary& CompliantSummary::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("CompliantCount"))
{
m_compliantCount = jsonValue.GetInteger("CompliantCount");
m_compliantCountHasBeenSet = true;
}
if(jsonValue.ValueExists("SeveritySummary"))
{
m_severitySummary = jsonValue.GetObject("SeveritySummary");
m_severitySummaryHasBeenSet = true;
}
return *this;
}
JsonValue CompliantSummary::Jsonize() const
{
JsonValue payload;
if(m_compliantCountHasBeenSet)
{
payload.WithInteger("CompliantCount", m_compliantCount);
}
if(m_severitySummaryHasBeenSet)
{
payload.WithObject("SeveritySummary", m_severitySummary.Jsonize());
}
return payload;
}
} // namespace Model
} // namespace SSM
} // 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/ssm/model/ConnectionStatus.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 SSM
{
namespace Model
{
namespace ConnectionStatusMapper
{
static const int Connected_HASH = HashingUtils::HashString("Connected");
static const int NotConnected_HASH = HashingUtils::HashString("NotConnected");
ConnectionStatus GetConnectionStatusForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == Connected_HASH)
{
return ConnectionStatus::Connected;
}
else if (hashCode == NotConnected_HASH)
{
return ConnectionStatus::NotConnected;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<ConnectionStatus>(hashCode);
}
return ConnectionStatus::NOT_SET;
}
Aws::String GetNameForConnectionStatus(ConnectionStatus enumValue)
{
switch(enumValue)
{
case ConnectionStatus::Connected:
return "Connected";
case ConnectionStatus::NotConnected:
return "NotConnected";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace ConnectionStatusMapper
} // namespace Model
} // namespace SSM
} // namespace Aws

View File

@@ -0,0 +1,83 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/CreateActivationRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::SSM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateActivationRequest::CreateActivationRequest() :
m_descriptionHasBeenSet(false),
m_defaultInstanceNameHasBeenSet(false),
m_iamRoleHasBeenSet(false),
m_registrationLimit(0),
m_registrationLimitHasBeenSet(false),
m_expirationDateHasBeenSet(false),
m_tagsHasBeenSet(false)
{
}
Aws::String CreateActivationRequest::SerializePayload() const
{
JsonValue payload;
if(m_descriptionHasBeenSet)
{
payload.WithString("Description", m_description);
}
if(m_defaultInstanceNameHasBeenSet)
{
payload.WithString("DefaultInstanceName", m_defaultInstanceName);
}
if(m_iamRoleHasBeenSet)
{
payload.WithString("IamRole", m_iamRole);
}
if(m_registrationLimitHasBeenSet)
{
payload.WithInteger("RegistrationLimit", m_registrationLimit);
}
if(m_expirationDateHasBeenSet)
{
payload.WithDouble("ExpirationDate", m_expirationDate.SecondsWithMSPrecision());
}
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));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CreateActivationRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AmazonSSM.CreateActivation"));
return headers;
}

View File

@@ -0,0 +1,46 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/CreateActivationResult.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::SSM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateActivationResult::CreateActivationResult()
{
}
CreateActivationResult::CreateActivationResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreateActivationResult& CreateActivationResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("ActivationId"))
{
m_activationId = jsonValue.GetString("ActivationId");
}
if(jsonValue.ValueExists("ActivationCode"))
{
m_activationCode = jsonValue.GetString("ActivationCode");
}
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/ssm/model/CreateAssociationBatchRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::SSM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateAssociationBatchRequest::CreateAssociationBatchRequest() :
m_entriesHasBeenSet(false)
{
}
Aws::String CreateAssociationBatchRequest::SerializePayload() const
{
JsonValue payload;
if(m_entriesHasBeenSet)
{
Array<JsonValue> entriesJsonList(m_entries.size());
for(unsigned entriesIndex = 0; entriesIndex < entriesJsonList.GetLength(); ++entriesIndex)
{
entriesJsonList[entriesIndex].AsObject(m_entries[entriesIndex].Jsonize());
}
payload.WithArray("Entries", std::move(entriesJsonList));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CreateAssociationBatchRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AmazonSSM.CreateAssociationBatch"));
return headers;
}

View File

@@ -0,0 +1,286 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/CreateAssociationBatchRequestEntry.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace SSM
{
namespace Model
{
CreateAssociationBatchRequestEntry::CreateAssociationBatchRequestEntry() :
m_nameHasBeenSet(false),
m_instanceIdHasBeenSet(false),
m_parametersHasBeenSet(false),
m_automationTargetParameterNameHasBeenSet(false),
m_documentVersionHasBeenSet(false),
m_targetsHasBeenSet(false),
m_scheduleExpressionHasBeenSet(false),
m_outputLocationHasBeenSet(false),
m_associationNameHasBeenSet(false),
m_maxErrorsHasBeenSet(false),
m_maxConcurrencyHasBeenSet(false),
m_complianceSeverity(AssociationComplianceSeverity::NOT_SET),
m_complianceSeverityHasBeenSet(false),
m_syncCompliance(AssociationSyncCompliance::NOT_SET),
m_syncComplianceHasBeenSet(false),
m_applyOnlyAtCronInterval(false),
m_applyOnlyAtCronIntervalHasBeenSet(false)
{
}
CreateAssociationBatchRequestEntry::CreateAssociationBatchRequestEntry(JsonView jsonValue) :
m_nameHasBeenSet(false),
m_instanceIdHasBeenSet(false),
m_parametersHasBeenSet(false),
m_automationTargetParameterNameHasBeenSet(false),
m_documentVersionHasBeenSet(false),
m_targetsHasBeenSet(false),
m_scheduleExpressionHasBeenSet(false),
m_outputLocationHasBeenSet(false),
m_associationNameHasBeenSet(false),
m_maxErrorsHasBeenSet(false),
m_maxConcurrencyHasBeenSet(false),
m_complianceSeverity(AssociationComplianceSeverity::NOT_SET),
m_complianceSeverityHasBeenSet(false),
m_syncCompliance(AssociationSyncCompliance::NOT_SET),
m_syncComplianceHasBeenSet(false),
m_applyOnlyAtCronInterval(false),
m_applyOnlyAtCronIntervalHasBeenSet(false)
{
*this = jsonValue;
}
CreateAssociationBatchRequestEntry& CreateAssociationBatchRequestEntry::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("Name"))
{
m_name = jsonValue.GetString("Name");
m_nameHasBeenSet = true;
}
if(jsonValue.ValueExists("InstanceId"))
{
m_instanceId = jsonValue.GetString("InstanceId");
m_instanceIdHasBeenSet = true;
}
if(jsonValue.ValueExists("Parameters"))
{
Aws::Map<Aws::String, JsonView> parametersJsonMap = jsonValue.GetObject("Parameters").GetAllObjects();
for(auto& parametersItem : parametersJsonMap)
{
Array<JsonView> parameterValueListJsonList = parametersItem.second.AsArray();
Aws::Vector<Aws::String> parameterValueListList;
parameterValueListList.reserve((size_t)parameterValueListJsonList.GetLength());
for(unsigned parameterValueListIndex = 0; parameterValueListIndex < parameterValueListJsonList.GetLength(); ++parameterValueListIndex)
{
parameterValueListList.push_back(parameterValueListJsonList[parameterValueListIndex].AsString());
}
m_parameters[parametersItem.first] = std::move(parameterValueListList);
}
m_parametersHasBeenSet = true;
}
if(jsonValue.ValueExists("AutomationTargetParameterName"))
{
m_automationTargetParameterName = jsonValue.GetString("AutomationTargetParameterName");
m_automationTargetParameterNameHasBeenSet = true;
}
if(jsonValue.ValueExists("DocumentVersion"))
{
m_documentVersion = jsonValue.GetString("DocumentVersion");
m_documentVersionHasBeenSet = true;
}
if(jsonValue.ValueExists("Targets"))
{
Array<JsonView> targetsJsonList = jsonValue.GetArray("Targets");
for(unsigned targetsIndex = 0; targetsIndex < targetsJsonList.GetLength(); ++targetsIndex)
{
m_targets.push_back(targetsJsonList[targetsIndex].AsObject());
}
m_targetsHasBeenSet = true;
}
if(jsonValue.ValueExists("ScheduleExpression"))
{
m_scheduleExpression = jsonValue.GetString("ScheduleExpression");
m_scheduleExpressionHasBeenSet = true;
}
if(jsonValue.ValueExists("OutputLocation"))
{
m_outputLocation = jsonValue.GetObject("OutputLocation");
m_outputLocationHasBeenSet = true;
}
if(jsonValue.ValueExists("AssociationName"))
{
m_associationName = jsonValue.GetString("AssociationName");
m_associationNameHasBeenSet = true;
}
if(jsonValue.ValueExists("MaxErrors"))
{
m_maxErrors = jsonValue.GetString("MaxErrors");
m_maxErrorsHasBeenSet = true;
}
if(jsonValue.ValueExists("MaxConcurrency"))
{
m_maxConcurrency = jsonValue.GetString("MaxConcurrency");
m_maxConcurrencyHasBeenSet = true;
}
if(jsonValue.ValueExists("ComplianceSeverity"))
{
m_complianceSeverity = AssociationComplianceSeverityMapper::GetAssociationComplianceSeverityForName(jsonValue.GetString("ComplianceSeverity"));
m_complianceSeverityHasBeenSet = true;
}
if(jsonValue.ValueExists("SyncCompliance"))
{
m_syncCompliance = AssociationSyncComplianceMapper::GetAssociationSyncComplianceForName(jsonValue.GetString("SyncCompliance"));
m_syncComplianceHasBeenSet = true;
}
if(jsonValue.ValueExists("ApplyOnlyAtCronInterval"))
{
m_applyOnlyAtCronInterval = jsonValue.GetBool("ApplyOnlyAtCronInterval");
m_applyOnlyAtCronIntervalHasBeenSet = true;
}
return *this;
}
JsonValue CreateAssociationBatchRequestEntry::Jsonize() const
{
JsonValue payload;
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
if(m_instanceIdHasBeenSet)
{
payload.WithString("InstanceId", m_instanceId);
}
if(m_parametersHasBeenSet)
{
JsonValue parametersJsonMap;
for(auto& parametersItem : m_parameters)
{
Array<JsonValue> parameterValueListJsonList(parametersItem.second.size());
for(unsigned parameterValueListIndex = 0; parameterValueListIndex < parameterValueListJsonList.GetLength(); ++parameterValueListIndex)
{
parameterValueListJsonList[parameterValueListIndex].AsString(parametersItem.second[parameterValueListIndex]);
}
parametersJsonMap.WithArray(parametersItem.first, std::move(parameterValueListJsonList));
}
payload.WithObject("Parameters", std::move(parametersJsonMap));
}
if(m_automationTargetParameterNameHasBeenSet)
{
payload.WithString("AutomationTargetParameterName", m_automationTargetParameterName);
}
if(m_documentVersionHasBeenSet)
{
payload.WithString("DocumentVersion", m_documentVersion);
}
if(m_targetsHasBeenSet)
{
Array<JsonValue> targetsJsonList(m_targets.size());
for(unsigned targetsIndex = 0; targetsIndex < targetsJsonList.GetLength(); ++targetsIndex)
{
targetsJsonList[targetsIndex].AsObject(m_targets[targetsIndex].Jsonize());
}
payload.WithArray("Targets", std::move(targetsJsonList));
}
if(m_scheduleExpressionHasBeenSet)
{
payload.WithString("ScheduleExpression", m_scheduleExpression);
}
if(m_outputLocationHasBeenSet)
{
payload.WithObject("OutputLocation", m_outputLocation.Jsonize());
}
if(m_associationNameHasBeenSet)
{
payload.WithString("AssociationName", m_associationName);
}
if(m_maxErrorsHasBeenSet)
{
payload.WithString("MaxErrors", m_maxErrors);
}
if(m_maxConcurrencyHasBeenSet)
{
payload.WithString("MaxConcurrency", m_maxConcurrency);
}
if(m_complianceSeverityHasBeenSet)
{
payload.WithString("ComplianceSeverity", AssociationComplianceSeverityMapper::GetNameForAssociationComplianceSeverity(m_complianceSeverity));
}
if(m_syncComplianceHasBeenSet)
{
payload.WithString("SyncCompliance", AssociationSyncComplianceMapper::GetNameForAssociationSyncCompliance(m_syncCompliance));
}
if(m_applyOnlyAtCronIntervalHasBeenSet)
{
payload.WithBool("ApplyOnlyAtCronInterval", m_applyOnlyAtCronInterval);
}
return payload;
}
} // namespace Model
} // namespace SSM
} // namespace Aws

View File

@@ -0,0 +1,52 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/CreateAssociationBatchResult.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::SSM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateAssociationBatchResult::CreateAssociationBatchResult()
{
}
CreateAssociationBatchResult::CreateAssociationBatchResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreateAssociationBatchResult& CreateAssociationBatchResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("Successful"))
{
Array<JsonView> successfulJsonList = jsonValue.GetArray("Successful");
for(unsigned successfulIndex = 0; successfulIndex < successfulJsonList.GetLength(); ++successfulIndex)
{
m_successful.push_back(successfulJsonList[successfulIndex].AsObject());
}
}
if(jsonValue.ValueExists("Failed"))
{
Array<JsonView> failedJsonList = jsonValue.GetArray("Failed");
for(unsigned failedIndex = 0; failedIndex < failedJsonList.GetLength(); ++failedIndex)
{
m_failed.push_back(failedJsonList[failedIndex].AsObject());
}
}
return *this;
}

View File

@@ -0,0 +1,150 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/CreateAssociationRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::SSM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateAssociationRequest::CreateAssociationRequest() :
m_nameHasBeenSet(false),
m_documentVersionHasBeenSet(false),
m_instanceIdHasBeenSet(false),
m_parametersHasBeenSet(false),
m_targetsHasBeenSet(false),
m_scheduleExpressionHasBeenSet(false),
m_outputLocationHasBeenSet(false),
m_associationNameHasBeenSet(false),
m_automationTargetParameterNameHasBeenSet(false),
m_maxErrorsHasBeenSet(false),
m_maxConcurrencyHasBeenSet(false),
m_complianceSeverity(AssociationComplianceSeverity::NOT_SET),
m_complianceSeverityHasBeenSet(false),
m_syncCompliance(AssociationSyncCompliance::NOT_SET),
m_syncComplianceHasBeenSet(false),
m_applyOnlyAtCronInterval(false),
m_applyOnlyAtCronIntervalHasBeenSet(false)
{
}
Aws::String CreateAssociationRequest::SerializePayload() const
{
JsonValue payload;
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
if(m_documentVersionHasBeenSet)
{
payload.WithString("DocumentVersion", m_documentVersion);
}
if(m_instanceIdHasBeenSet)
{
payload.WithString("InstanceId", m_instanceId);
}
if(m_parametersHasBeenSet)
{
JsonValue parametersJsonMap;
for(auto& parametersItem : m_parameters)
{
Array<JsonValue> parameterValueListJsonList(parametersItem.second.size());
for(unsigned parameterValueListIndex = 0; parameterValueListIndex < parameterValueListJsonList.GetLength(); ++parameterValueListIndex)
{
parameterValueListJsonList[parameterValueListIndex].AsString(parametersItem.second[parameterValueListIndex]);
}
parametersJsonMap.WithArray(parametersItem.first, std::move(parameterValueListJsonList));
}
payload.WithObject("Parameters", std::move(parametersJsonMap));
}
if(m_targetsHasBeenSet)
{
Array<JsonValue> targetsJsonList(m_targets.size());
for(unsigned targetsIndex = 0; targetsIndex < targetsJsonList.GetLength(); ++targetsIndex)
{
targetsJsonList[targetsIndex].AsObject(m_targets[targetsIndex].Jsonize());
}
payload.WithArray("Targets", std::move(targetsJsonList));
}
if(m_scheduleExpressionHasBeenSet)
{
payload.WithString("ScheduleExpression", m_scheduleExpression);
}
if(m_outputLocationHasBeenSet)
{
payload.WithObject("OutputLocation", m_outputLocation.Jsonize());
}
if(m_associationNameHasBeenSet)
{
payload.WithString("AssociationName", m_associationName);
}
if(m_automationTargetParameterNameHasBeenSet)
{
payload.WithString("AutomationTargetParameterName", m_automationTargetParameterName);
}
if(m_maxErrorsHasBeenSet)
{
payload.WithString("MaxErrors", m_maxErrors);
}
if(m_maxConcurrencyHasBeenSet)
{
payload.WithString("MaxConcurrency", m_maxConcurrency);
}
if(m_complianceSeverityHasBeenSet)
{
payload.WithString("ComplianceSeverity", AssociationComplianceSeverityMapper::GetNameForAssociationComplianceSeverity(m_complianceSeverity));
}
if(m_syncComplianceHasBeenSet)
{
payload.WithString("SyncCompliance", AssociationSyncComplianceMapper::GetNameForAssociationSyncCompliance(m_syncCompliance));
}
if(m_applyOnlyAtCronIntervalHasBeenSet)
{
payload.WithBool("ApplyOnlyAtCronInterval", m_applyOnlyAtCronInterval);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CreateAssociationRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AmazonSSM.CreateAssociation"));
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/ssm/model/CreateAssociationResult.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::SSM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateAssociationResult::CreateAssociationResult()
{
}
CreateAssociationResult::CreateAssociationResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreateAssociationResult& CreateAssociationResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("AssociationDescription"))
{
m_associationDescription = jsonValue.GetObject("AssociationDescription");
}
return *this;
}

View File

@@ -0,0 +1,114 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/CreateDocumentRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::SSM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateDocumentRequest::CreateDocumentRequest() :
m_contentHasBeenSet(false),
m_requiresHasBeenSet(false),
m_attachmentsHasBeenSet(false),
m_nameHasBeenSet(false),
m_versionNameHasBeenSet(false),
m_documentType(DocumentType::NOT_SET),
m_documentTypeHasBeenSet(false),
m_documentFormat(DocumentFormat::NOT_SET),
m_documentFormatHasBeenSet(false),
m_targetTypeHasBeenSet(false),
m_tagsHasBeenSet(false)
{
}
Aws::String CreateDocumentRequest::SerializePayload() const
{
JsonValue payload;
if(m_contentHasBeenSet)
{
payload.WithString("Content", m_content);
}
if(m_requiresHasBeenSet)
{
Array<JsonValue> requiresJsonList(m_requires.size());
for(unsigned requiresIndex = 0; requiresIndex < requiresJsonList.GetLength(); ++requiresIndex)
{
requiresJsonList[requiresIndex].AsObject(m_requires[requiresIndex].Jsonize());
}
payload.WithArray("Requires", std::move(requiresJsonList));
}
if(m_attachmentsHasBeenSet)
{
Array<JsonValue> attachmentsJsonList(m_attachments.size());
for(unsigned attachmentsIndex = 0; attachmentsIndex < attachmentsJsonList.GetLength(); ++attachmentsIndex)
{
attachmentsJsonList[attachmentsIndex].AsObject(m_attachments[attachmentsIndex].Jsonize());
}
payload.WithArray("Attachments", std::move(attachmentsJsonList));
}
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
if(m_versionNameHasBeenSet)
{
payload.WithString("VersionName", m_versionName);
}
if(m_documentTypeHasBeenSet)
{
payload.WithString("DocumentType", DocumentTypeMapper::GetNameForDocumentType(m_documentType));
}
if(m_documentFormatHasBeenSet)
{
payload.WithString("DocumentFormat", DocumentFormatMapper::GetNameForDocumentFormat(m_documentFormat));
}
if(m_targetTypeHasBeenSet)
{
payload.WithString("TargetType", m_targetType);
}
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));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CreateDocumentRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AmazonSSM.CreateDocument"));
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/ssm/model/CreateDocumentResult.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::SSM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateDocumentResult::CreateDocumentResult()
{
}
CreateDocumentResult::CreateDocumentResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreateDocumentResult& CreateDocumentResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("DocumentDescription"))
{
m_documentDescription = jsonValue.GetObject("DocumentDescription");
}
return *this;
}

View File

@@ -0,0 +1,130 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/CreateMaintenanceWindowRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::SSM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateMaintenanceWindowRequest::CreateMaintenanceWindowRequest() :
m_nameHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_startDateHasBeenSet(false),
m_endDateHasBeenSet(false),
m_scheduleHasBeenSet(false),
m_scheduleTimezoneHasBeenSet(false),
m_scheduleOffset(0),
m_scheduleOffsetHasBeenSet(false),
m_duration(0),
m_durationHasBeenSet(false),
m_cutoff(0),
m_cutoffHasBeenSet(false),
m_allowUnassociatedTargets(false),
m_allowUnassociatedTargetsHasBeenSet(false),
m_clientToken(Aws::Utils::UUID::RandomUUID()),
m_clientTokenHasBeenSet(true),
m_tagsHasBeenSet(false)
{
}
Aws::String CreateMaintenanceWindowRequest::SerializePayload() const
{
JsonValue payload;
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
if(m_descriptionHasBeenSet)
{
payload.WithString("Description", m_description);
}
if(m_startDateHasBeenSet)
{
payload.WithString("StartDate", m_startDate);
}
if(m_endDateHasBeenSet)
{
payload.WithString("EndDate", m_endDate);
}
if(m_scheduleHasBeenSet)
{
payload.WithString("Schedule", m_schedule);
}
if(m_scheduleTimezoneHasBeenSet)
{
payload.WithString("ScheduleTimezone", m_scheduleTimezone);
}
if(m_scheduleOffsetHasBeenSet)
{
payload.WithInteger("ScheduleOffset", m_scheduleOffset);
}
if(m_durationHasBeenSet)
{
payload.WithInteger("Duration", m_duration);
}
if(m_cutoffHasBeenSet)
{
payload.WithInteger("Cutoff", m_cutoff);
}
if(m_allowUnassociatedTargetsHasBeenSet)
{
payload.WithBool("AllowUnassociatedTargets", m_allowUnassociatedTargets);
}
if(m_clientTokenHasBeenSet)
{
payload.WithString("ClientToken", m_clientToken);
}
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));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CreateMaintenanceWindowRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AmazonSSM.CreateMaintenanceWindow"));
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/ssm/model/CreateMaintenanceWindowResult.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::SSM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateMaintenanceWindowResult::CreateMaintenanceWindowResult()
{
}
CreateMaintenanceWindowResult::CreateMaintenanceWindowResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreateMaintenanceWindowResult& CreateMaintenanceWindowResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("WindowId"))
{
m_windowId = jsonValue.GetString("WindowId");
}
return *this;
}

View File

@@ -0,0 +1,127 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/CreateOpsItemRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::SSM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateOpsItemRequest::CreateOpsItemRequest() :
m_descriptionHasBeenSet(false),
m_operationalDataHasBeenSet(false),
m_notificationsHasBeenSet(false),
m_priority(0),
m_priorityHasBeenSet(false),
m_relatedOpsItemsHasBeenSet(false),
m_sourceHasBeenSet(false),
m_titleHasBeenSet(false),
m_tagsHasBeenSet(false),
m_categoryHasBeenSet(false),
m_severityHasBeenSet(false)
{
}
Aws::String CreateOpsItemRequest::SerializePayload() const
{
JsonValue payload;
if(m_descriptionHasBeenSet)
{
payload.WithString("Description", m_description);
}
if(m_operationalDataHasBeenSet)
{
JsonValue operationalDataJsonMap;
for(auto& operationalDataItem : m_operationalData)
{
operationalDataJsonMap.WithObject(operationalDataItem.first, operationalDataItem.second.Jsonize());
}
payload.WithObject("OperationalData", std::move(operationalDataJsonMap));
}
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_priorityHasBeenSet)
{
payload.WithInteger("Priority", m_priority);
}
if(m_relatedOpsItemsHasBeenSet)
{
Array<JsonValue> relatedOpsItemsJsonList(m_relatedOpsItems.size());
for(unsigned relatedOpsItemsIndex = 0; relatedOpsItemsIndex < relatedOpsItemsJsonList.GetLength(); ++relatedOpsItemsIndex)
{
relatedOpsItemsJsonList[relatedOpsItemsIndex].AsObject(m_relatedOpsItems[relatedOpsItemsIndex].Jsonize());
}
payload.WithArray("RelatedOpsItems", std::move(relatedOpsItemsJsonList));
}
if(m_sourceHasBeenSet)
{
payload.WithString("Source", m_source);
}
if(m_titleHasBeenSet)
{
payload.WithString("Title", m_title);
}
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_categoryHasBeenSet)
{
payload.WithString("Category", m_category);
}
if(m_severityHasBeenSet)
{
payload.WithString("Severity", m_severity);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CreateOpsItemRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AmazonSSM.CreateOpsItem"));
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/ssm/model/CreateOpsItemResult.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::SSM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateOpsItemResult::CreateOpsItemResult()
{
}
CreateOpsItemResult::CreateOpsItemResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreateOpsItemResult& CreateOpsItemResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("OpsItemId"))
{
m_opsItemId = jsonValue.GetString("OpsItemId");
}
return *this;
}

View File

@@ -0,0 +1,149 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/CreatePatchBaselineRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::SSM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreatePatchBaselineRequest::CreatePatchBaselineRequest() :
m_operatingSystem(OperatingSystem::NOT_SET),
m_operatingSystemHasBeenSet(false),
m_nameHasBeenSet(false),
m_globalFiltersHasBeenSet(false),
m_approvalRulesHasBeenSet(false),
m_approvedPatchesHasBeenSet(false),
m_approvedPatchesComplianceLevel(PatchComplianceLevel::NOT_SET),
m_approvedPatchesComplianceLevelHasBeenSet(false),
m_approvedPatchesEnableNonSecurity(false),
m_approvedPatchesEnableNonSecurityHasBeenSet(false),
m_rejectedPatchesHasBeenSet(false),
m_rejectedPatchesAction(PatchAction::NOT_SET),
m_rejectedPatchesActionHasBeenSet(false),
m_descriptionHasBeenSet(false),
m_sourcesHasBeenSet(false),
m_clientToken(Aws::Utils::UUID::RandomUUID()),
m_clientTokenHasBeenSet(true),
m_tagsHasBeenSet(false)
{
}
Aws::String CreatePatchBaselineRequest::SerializePayload() const
{
JsonValue payload;
if(m_operatingSystemHasBeenSet)
{
payload.WithString("OperatingSystem", OperatingSystemMapper::GetNameForOperatingSystem(m_operatingSystem));
}
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
if(m_globalFiltersHasBeenSet)
{
payload.WithObject("GlobalFilters", m_globalFilters.Jsonize());
}
if(m_approvalRulesHasBeenSet)
{
payload.WithObject("ApprovalRules", m_approvalRules.Jsonize());
}
if(m_approvedPatchesHasBeenSet)
{
Array<JsonValue> approvedPatchesJsonList(m_approvedPatches.size());
for(unsigned approvedPatchesIndex = 0; approvedPatchesIndex < approvedPatchesJsonList.GetLength(); ++approvedPatchesIndex)
{
approvedPatchesJsonList[approvedPatchesIndex].AsString(m_approvedPatches[approvedPatchesIndex]);
}
payload.WithArray("ApprovedPatches", std::move(approvedPatchesJsonList));
}
if(m_approvedPatchesComplianceLevelHasBeenSet)
{
payload.WithString("ApprovedPatchesComplianceLevel", PatchComplianceLevelMapper::GetNameForPatchComplianceLevel(m_approvedPatchesComplianceLevel));
}
if(m_approvedPatchesEnableNonSecurityHasBeenSet)
{
payload.WithBool("ApprovedPatchesEnableNonSecurity", m_approvedPatchesEnableNonSecurity);
}
if(m_rejectedPatchesHasBeenSet)
{
Array<JsonValue> rejectedPatchesJsonList(m_rejectedPatches.size());
for(unsigned rejectedPatchesIndex = 0; rejectedPatchesIndex < rejectedPatchesJsonList.GetLength(); ++rejectedPatchesIndex)
{
rejectedPatchesJsonList[rejectedPatchesIndex].AsString(m_rejectedPatches[rejectedPatchesIndex]);
}
payload.WithArray("RejectedPatches", std::move(rejectedPatchesJsonList));
}
if(m_rejectedPatchesActionHasBeenSet)
{
payload.WithString("RejectedPatchesAction", PatchActionMapper::GetNameForPatchAction(m_rejectedPatchesAction));
}
if(m_descriptionHasBeenSet)
{
payload.WithString("Description", m_description);
}
if(m_sourcesHasBeenSet)
{
Array<JsonValue> sourcesJsonList(m_sources.size());
for(unsigned sourcesIndex = 0; sourcesIndex < sourcesJsonList.GetLength(); ++sourcesIndex)
{
sourcesJsonList[sourcesIndex].AsObject(m_sources[sourcesIndex].Jsonize());
}
payload.WithArray("Sources", std::move(sourcesJsonList));
}
if(m_clientTokenHasBeenSet)
{
payload.WithString("ClientToken", m_clientToken);
}
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));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CreatePatchBaselineRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AmazonSSM.CreatePatchBaseline"));
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/ssm/model/CreatePatchBaselineResult.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::SSM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreatePatchBaselineResult::CreatePatchBaselineResult()
{
}
CreatePatchBaselineResult::CreatePatchBaselineResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreatePatchBaselineResult& CreatePatchBaselineResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("BaselineId"))
{
m_baselineId = jsonValue.GetString("BaselineId");
}
return *this;
}

View File

@@ -0,0 +1,64 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/CreateResourceDataSyncRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::SSM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
CreateResourceDataSyncRequest::CreateResourceDataSyncRequest() :
m_syncNameHasBeenSet(false),
m_s3DestinationHasBeenSet(false),
m_syncTypeHasBeenSet(false),
m_syncSourceHasBeenSet(false)
{
}
Aws::String CreateResourceDataSyncRequest::SerializePayload() const
{
JsonValue payload;
if(m_syncNameHasBeenSet)
{
payload.WithString("SyncName", m_syncName);
}
if(m_s3DestinationHasBeenSet)
{
payload.WithObject("S3Destination", m_s3Destination.Jsonize());
}
if(m_syncTypeHasBeenSet)
{
payload.WithString("SyncType", m_syncType);
}
if(m_syncSourceHasBeenSet)
{
payload.WithObject("SyncSource", m_syncSource.Jsonize());
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection CreateResourceDataSyncRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AmazonSSM.CreateResourceDataSync"));
return headers;
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/CreateResourceDataSyncResult.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::SSM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
CreateResourceDataSyncResult::CreateResourceDataSyncResult()
{
}
CreateResourceDataSyncResult::CreateResourceDataSyncResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
CreateResourceDataSyncResult& CreateResourceDataSyncResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
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/ssm/model/DeleteActivationRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::SSM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeleteActivationRequest::DeleteActivationRequest() :
m_activationIdHasBeenSet(false)
{
}
Aws::String DeleteActivationRequest::SerializePayload() const
{
JsonValue payload;
if(m_activationIdHasBeenSet)
{
payload.WithString("ActivationId", m_activationId);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DeleteActivationRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AmazonSSM.DeleteActivation"));
return headers;
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/DeleteActivationResult.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::SSM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DeleteActivationResult::DeleteActivationResult()
{
}
DeleteActivationResult::DeleteActivationResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DeleteActivationResult& DeleteActivationResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
return *this;
}

View File

@@ -0,0 +1,57 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/DeleteAssociationRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::SSM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeleteAssociationRequest::DeleteAssociationRequest() :
m_nameHasBeenSet(false),
m_instanceIdHasBeenSet(false),
m_associationIdHasBeenSet(false)
{
}
Aws::String DeleteAssociationRequest::SerializePayload() const
{
JsonValue payload;
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
if(m_instanceIdHasBeenSet)
{
payload.WithString("InstanceId", m_instanceId);
}
if(m_associationIdHasBeenSet)
{
payload.WithString("AssociationId", m_associationId);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DeleteAssociationRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AmazonSSM.DeleteAssociation"));
return headers;
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/DeleteAssociationResult.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::SSM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DeleteAssociationResult::DeleteAssociationResult()
{
}
DeleteAssociationResult::DeleteAssociationResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DeleteAssociationResult& DeleteAssociationResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
return *this;
}

View File

@@ -0,0 +1,65 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/DeleteDocumentRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::SSM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeleteDocumentRequest::DeleteDocumentRequest() :
m_nameHasBeenSet(false),
m_documentVersionHasBeenSet(false),
m_versionNameHasBeenSet(false),
m_force(false),
m_forceHasBeenSet(false)
{
}
Aws::String DeleteDocumentRequest::SerializePayload() const
{
JsonValue payload;
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
if(m_documentVersionHasBeenSet)
{
payload.WithString("DocumentVersion", m_documentVersion);
}
if(m_versionNameHasBeenSet)
{
payload.WithString("VersionName", m_versionName);
}
if(m_forceHasBeenSet)
{
payload.WithBool("Force", m_force);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DeleteDocumentRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AmazonSSM.DeleteDocument"));
return headers;
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/DeleteDocumentResult.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::SSM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DeleteDocumentResult::DeleteDocumentResult()
{
}
DeleteDocumentResult::DeleteDocumentResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DeleteDocumentResult& DeleteDocumentResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
return *this;
}

View File

@@ -0,0 +1,66 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/DeleteInventoryRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::SSM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeleteInventoryRequest::DeleteInventoryRequest() :
m_typeNameHasBeenSet(false),
m_schemaDeleteOption(InventorySchemaDeleteOption::NOT_SET),
m_schemaDeleteOptionHasBeenSet(false),
m_dryRun(false),
m_dryRunHasBeenSet(false),
m_clientToken(Aws::Utils::UUID::RandomUUID()),
m_clientTokenHasBeenSet(true)
{
}
Aws::String DeleteInventoryRequest::SerializePayload() const
{
JsonValue payload;
if(m_typeNameHasBeenSet)
{
payload.WithString("TypeName", m_typeName);
}
if(m_schemaDeleteOptionHasBeenSet)
{
payload.WithString("SchemaDeleteOption", InventorySchemaDeleteOptionMapper::GetNameForInventorySchemaDeleteOption(m_schemaDeleteOption));
}
if(m_dryRunHasBeenSet)
{
payload.WithBool("DryRun", m_dryRun);
}
if(m_clientTokenHasBeenSet)
{
payload.WithString("ClientToken", m_clientToken);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DeleteInventoryRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AmazonSSM.DeleteInventory"));
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/ssm/model/DeleteInventoryResult.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::SSM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DeleteInventoryResult::DeleteInventoryResult()
{
}
DeleteInventoryResult::DeleteInventoryResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DeleteInventoryResult& DeleteInventoryResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("DeletionId"))
{
m_deletionId = jsonValue.GetString("DeletionId");
}
if(jsonValue.ValueExists("TypeName"))
{
m_typeName = jsonValue.GetString("TypeName");
}
if(jsonValue.ValueExists("DeletionSummary"))
{
m_deletionSummary = jsonValue.GetObject("DeletionSummary");
}
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/ssm/model/DeleteMaintenanceWindowRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::SSM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeleteMaintenanceWindowRequest::DeleteMaintenanceWindowRequest() :
m_windowIdHasBeenSet(false)
{
}
Aws::String DeleteMaintenanceWindowRequest::SerializePayload() const
{
JsonValue payload;
if(m_windowIdHasBeenSet)
{
payload.WithString("WindowId", m_windowId);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DeleteMaintenanceWindowRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AmazonSSM.DeleteMaintenanceWindow"));
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/ssm/model/DeleteMaintenanceWindowResult.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::SSM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DeleteMaintenanceWindowResult::DeleteMaintenanceWindowResult()
{
}
DeleteMaintenanceWindowResult::DeleteMaintenanceWindowResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DeleteMaintenanceWindowResult& DeleteMaintenanceWindowResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("WindowId"))
{
m_windowId = jsonValue.GetString("WindowId");
}
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/ssm/model/DeleteParameterRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::SSM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeleteParameterRequest::DeleteParameterRequest() :
m_nameHasBeenSet(false)
{
}
Aws::String DeleteParameterRequest::SerializePayload() const
{
JsonValue payload;
if(m_nameHasBeenSet)
{
payload.WithString("Name", m_name);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DeleteParameterRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AmazonSSM.DeleteParameter"));
return headers;
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/DeleteParameterResult.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::SSM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DeleteParameterResult::DeleteParameterResult()
{
}
DeleteParameterResult::DeleteParameterResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DeleteParameterResult& DeleteParameterResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
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/ssm/model/DeleteParametersRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::SSM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeleteParametersRequest::DeleteParametersRequest() :
m_namesHasBeenSet(false)
{
}
Aws::String DeleteParametersRequest::SerializePayload() const
{
JsonValue payload;
if(m_namesHasBeenSet)
{
Array<JsonValue> namesJsonList(m_names.size());
for(unsigned namesIndex = 0; namesIndex < namesJsonList.GetLength(); ++namesIndex)
{
namesJsonList[namesIndex].AsString(m_names[namesIndex]);
}
payload.WithArray("Names", std::move(namesJsonList));
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DeleteParametersRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AmazonSSM.DeleteParameters"));
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/ssm/model/DeleteParametersResult.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::SSM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DeleteParametersResult::DeleteParametersResult()
{
}
DeleteParametersResult::DeleteParametersResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DeleteParametersResult& DeleteParametersResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("DeletedParameters"))
{
Array<JsonView> deletedParametersJsonList = jsonValue.GetArray("DeletedParameters");
for(unsigned deletedParametersIndex = 0; deletedParametersIndex < deletedParametersJsonList.GetLength(); ++deletedParametersIndex)
{
m_deletedParameters.push_back(deletedParametersJsonList[deletedParametersIndex].AsString());
}
}
if(jsonValue.ValueExists("InvalidParameters"))
{
Array<JsonView> invalidParametersJsonList = jsonValue.GetArray("InvalidParameters");
for(unsigned invalidParametersIndex = 0; invalidParametersIndex < invalidParametersJsonList.GetLength(); ++invalidParametersIndex)
{
m_invalidParameters.push_back(invalidParametersJsonList[invalidParametersIndex].AsString());
}
}
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/ssm/model/DeletePatchBaselineRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::SSM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeletePatchBaselineRequest::DeletePatchBaselineRequest() :
m_baselineIdHasBeenSet(false)
{
}
Aws::String DeletePatchBaselineRequest::SerializePayload() const
{
JsonValue payload;
if(m_baselineIdHasBeenSet)
{
payload.WithString("BaselineId", m_baselineId);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DeletePatchBaselineRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AmazonSSM.DeletePatchBaseline"));
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/ssm/model/DeletePatchBaselineResult.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::SSM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DeletePatchBaselineResult::DeletePatchBaselineResult()
{
}
DeletePatchBaselineResult::DeletePatchBaselineResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DeletePatchBaselineResult& DeletePatchBaselineResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("BaselineId"))
{
m_baselineId = jsonValue.GetString("BaselineId");
}
return *this;
}

View File

@@ -0,0 +1,50 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/DeleteResourceDataSyncRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::SSM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeleteResourceDataSyncRequest::DeleteResourceDataSyncRequest() :
m_syncNameHasBeenSet(false),
m_syncTypeHasBeenSet(false)
{
}
Aws::String DeleteResourceDataSyncRequest::SerializePayload() const
{
JsonValue payload;
if(m_syncNameHasBeenSet)
{
payload.WithString("SyncName", m_syncName);
}
if(m_syncTypeHasBeenSet)
{
payload.WithString("SyncType", m_syncType);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DeleteResourceDataSyncRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AmazonSSM.DeleteResourceDataSync"));
return headers;
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/DeleteResourceDataSyncResult.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::SSM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DeleteResourceDataSyncResult::DeleteResourceDataSyncResult()
{
}
DeleteResourceDataSyncResult::DeleteResourceDataSyncResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DeleteResourceDataSyncResult& DeleteResourceDataSyncResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
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/ssm/model/DeregisterManagedInstanceRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::SSM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeregisterManagedInstanceRequest::DeregisterManagedInstanceRequest() :
m_instanceIdHasBeenSet(false)
{
}
Aws::String DeregisterManagedInstanceRequest::SerializePayload() const
{
JsonValue payload;
if(m_instanceIdHasBeenSet)
{
payload.WithString("InstanceId", m_instanceId);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DeregisterManagedInstanceRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AmazonSSM.DeregisterManagedInstance"));
return headers;
}

View File

@@ -0,0 +1,34 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/DeregisterManagedInstanceResult.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::SSM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DeregisterManagedInstanceResult::DeregisterManagedInstanceResult()
{
}
DeregisterManagedInstanceResult::DeregisterManagedInstanceResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DeregisterManagedInstanceResult& DeregisterManagedInstanceResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
AWS_UNREFERENCED_PARAM(result);
return *this;
}

View File

@@ -0,0 +1,50 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/DeregisterPatchBaselineForPatchGroupRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::SSM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
DeregisterPatchBaselineForPatchGroupRequest::DeregisterPatchBaselineForPatchGroupRequest() :
m_baselineIdHasBeenSet(false),
m_patchGroupHasBeenSet(false)
{
}
Aws::String DeregisterPatchBaselineForPatchGroupRequest::SerializePayload() const
{
JsonValue payload;
if(m_baselineIdHasBeenSet)
{
payload.WithString("BaselineId", m_baselineId);
}
if(m_patchGroupHasBeenSet)
{
payload.WithString("PatchGroup", m_patchGroup);
}
return payload.View().WriteReadable();
}
Aws::Http::HeaderValueCollection DeregisterPatchBaselineForPatchGroupRequest::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AmazonSSM.DeregisterPatchBaselineForPatchGroup"));
return headers;
}

View File

@@ -0,0 +1,46 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/ssm/model/DeregisterPatchBaselineForPatchGroupResult.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::SSM::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;
DeregisterPatchBaselineForPatchGroupResult::DeregisterPatchBaselineForPatchGroupResult()
{
}
DeregisterPatchBaselineForPatchGroupResult::DeregisterPatchBaselineForPatchGroupResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
*this = result;
}
DeregisterPatchBaselineForPatchGroupResult& DeregisterPatchBaselineForPatchGroupResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
JsonView jsonValue = result.GetPayload().View();
if(jsonValue.ValueExists("BaselineId"))
{
m_baselineId = jsonValue.GetString("BaselineId");
}
if(jsonValue.ValueExists("PatchGroup"))
{
m_patchGroup = jsonValue.GetString("PatchGroup");
}
return *this;
}

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