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,31 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/CloudFrontEndpoint.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <aws/core/utils/HashingUtils.h>
using namespace Aws;
using namespace Aws::CloudFront;
namespace Aws
{
namespace CloudFront
{
namespace CloudFrontEndpoint
{
Aws::String ForRegion(const Aws::String& regionName, bool useDualStack)
{
AWS_UNREFERENCED_PARAM(regionName);
AWS_UNREFERENCED_PARAM(useDualStack);
return "cloudfront.amazonaws.com";
}
} // namespace CloudFrontEndpoint
} // namespace CloudFront
} // 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/cloudfront/CloudFrontErrorMarshaller.h>
#include <aws/cloudfront/CloudFrontErrors.h>
using namespace Aws::Client;
using namespace Aws::CloudFront;
AWSError<CoreErrors> CloudFrontErrorMarshaller::FindErrorByName(const char* errorName) const
{
AWSError<CoreErrors> error = CloudFrontErrorMapper::GetErrorForName(errorName);
if(error.GetErrorType() != CoreErrors::UNKNOWN)
{
return error;
}
return AWSErrorMarshaller::FindErrorByName(errorName);
}

View File

@@ -0,0 +1,522 @@
/**
* 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/cloudfront/CloudFrontErrors.h>
using namespace Aws::Client;
using namespace Aws::Utils;
using namespace Aws::CloudFront;
namespace Aws
{
namespace CloudFront
{
namespace CloudFrontErrorMapper
{
static const int INVALID_ERROR_CODE_HASH = HashingUtils::HashString("InvalidErrorCode");
static const int TOO_MANY_STREAMING_DISTRIBUTION_C_N_A_M_ES_HASH = HashingUtils::HashString("TooManyStreamingDistributionCNAMEs");
static const int ORIGIN_REQUEST_POLICY_ALREADY_EXISTS_HASH = HashingUtils::HashString("OriginRequestPolicyAlreadyExists");
static const int NO_SUCH_ORIGIN_HASH = HashingUtils::HashString("NoSuchOrigin");
static const int NO_SUCH_RESOURCE_HASH = HashingUtils::HashString("NoSuchResource");
static const int TOO_MANY_ORIGIN_REQUEST_POLICIES_HASH = HashingUtils::HashString("TooManyOriginRequestPolicies");
static const int FIELD_LEVEL_ENCRYPTION_CONFIG_ALREADY_EXISTS_HASH = HashingUtils::HashString("FieldLevelEncryptionConfigAlreadyExists");
static const int TOO_MANY_HEADERS_IN_FORWARDED_VALUES_HASH = HashingUtils::HashString("TooManyHeadersInForwardedValues");
static const int INCONSISTENT_QUANTITIES_HASH = HashingUtils::HashString("InconsistentQuantities");
static const int TOO_MANY_COOKIES_IN_ORIGIN_REQUEST_POLICY_HASH = HashingUtils::HashString("TooManyCookiesInOriginRequestPolicy");
static const int INVALID_IF_MATCH_VERSION_HASH = HashingUtils::HashString("InvalidIfMatchVersion");
static const int INVALID_TAGGING_HASH = HashingUtils::HashString("InvalidTagging");
static const int TOO_MANY_DISTRIBUTIONS_HASH = HashingUtils::HashString("TooManyDistributions");
static const int CACHE_POLICY_IN_USE_HASH = HashingUtils::HashString("CachePolicyInUse");
static const int INVALID_LOCATION_CODE_HASH = HashingUtils::HashString("InvalidLocationCode");
static const int PUBLIC_KEY_IN_USE_HASH = HashingUtils::HashString("PublicKeyInUse");
static const int TOO_MANY_QUERY_STRING_PARAMETERS_HASH = HashingUtils::HashString("TooManyQueryStringParameters");
static const int TOO_MANY_CERTIFICATES_HASH = HashingUtils::HashString("TooManyCertificates");
static const int NO_SUCH_PUBLIC_KEY_HASH = HashingUtils::HashString("NoSuchPublicKey");
static const int TOO_MANY_CACHE_POLICIES_HASH = HashingUtils::HashString("TooManyCachePolicies");
static const int ORIGIN_REQUEST_POLICY_IN_USE_HASH = HashingUtils::HashString("OriginRequestPolicyInUse");
static const int NO_SUCH_CACHE_POLICY_HASH = HashingUtils::HashString("NoSuchCachePolicy");
static const int NO_SUCH_FIELD_LEVEL_ENCRYPTION_PROFILE_HASH = HashingUtils::HashString("NoSuchFieldLevelEncryptionProfile");
static const int INVALID_ORIGIN_READ_TIMEOUT_HASH = HashingUtils::HashString("InvalidOriginReadTimeout");
static const int INVALID_ORIGIN_KEEPALIVE_TIMEOUT_HASH = HashingUtils::HashString("InvalidOriginKeepaliveTimeout");
static const int TOO_MANY_CLOUD_FRONT_ORIGIN_ACCESS_IDENTITIES_HASH = HashingUtils::HashString("TooManyCloudFrontOriginAccessIdentities");
static const int INVALID_HEADERS_FOR_S3_ORIGIN_HASH = HashingUtils::HashString("InvalidHeadersForS3Origin");
static const int FIELD_LEVEL_ENCRYPTION_PROFILE_ALREADY_EXISTS_HASH = HashingUtils::HashString("FieldLevelEncryptionProfileAlreadyExists");
static const int TOO_MANY_HEADERS_IN_ORIGIN_REQUEST_POLICY_HASH = HashingUtils::HashString("TooManyHeadersInOriginRequestPolicy");
static const int TOO_MANY_ORIGIN_CUSTOM_HEADERS_HASH = HashingUtils::HashString("TooManyOriginCustomHeaders");
static const int INVALID_GEO_RESTRICTION_PARAMETER_HASH = HashingUtils::HashString("InvalidGeoRestrictionParameter");
static const int TOO_MANY_FIELD_LEVEL_ENCRYPTION_PROFILES_HASH = HashingUtils::HashString("TooManyFieldLevelEncryptionProfiles");
static const int ILLEGAL_DELETE_HASH = HashingUtils::HashString("IllegalDelete");
static const int TOO_MANY_FIELD_LEVEL_ENCRYPTION_FIELD_PATTERNS_HASH = HashingUtils::HashString("TooManyFieldLevelEncryptionFieldPatterns");
static const int NO_SUCH_STREAMING_DISTRIBUTION_HASH = HashingUtils::HashString("NoSuchStreamingDistribution");
static const int INVALID_T_T_L_ORDER_HASH = HashingUtils::HashString("InvalidTTLOrder");
static const int TOO_MANY_FIELD_LEVEL_ENCRYPTION_QUERY_ARG_PROFILES_HASH = HashingUtils::HashString("TooManyFieldLevelEncryptionQueryArgProfiles");
static const int C_N_A_M_E_ALREADY_EXISTS_HASH = HashingUtils::HashString("CNAMEAlreadyExists");
static const int TOO_MANY_COOKIES_IN_CACHE_POLICY_HASH = HashingUtils::HashString("TooManyCookiesInCachePolicy");
static const int INVALID_REQUIRED_PROTOCOL_HASH = HashingUtils::HashString("InvalidRequiredProtocol");
static const int TOO_MANY_DISTRIBUTIONS_WITH_LAMBDA_ASSOCIATIONS_HASH = HashingUtils::HashString("TooManyDistributionsWithLambdaAssociations");
static const int TOO_MANY_LAMBDA_FUNCTION_ASSOCIATIONS_HASH = HashingUtils::HashString("TooManyLambdaFunctionAssociations");
static const int TOO_MANY_QUERY_STRINGS_IN_ORIGIN_REQUEST_POLICY_HASH = HashingUtils::HashString("TooManyQueryStringsInOriginRequestPolicy");
static const int TOO_MANY_PUBLIC_KEYS_HASH = HashingUtils::HashString("TooManyPublicKeys");
static const int TOO_MANY_STREAMING_DISTRIBUTIONS_HASH = HashingUtils::HashString("TooManyStreamingDistributions");
static const int ILLEGAL_FIELD_LEVEL_ENCRYPTION_CONFIG_ASSOCIATION_WITH_CACHE_BEHAVIOR_HASH = HashingUtils::HashString("IllegalFieldLevelEncryptionConfigAssociationWithCacheBehavior");
static const int INVALID_ORIGIN_HASH = HashingUtils::HashString("InvalidOrigin");
static const int TRUSTED_SIGNER_DOES_NOT_EXIST_HASH = HashingUtils::HashString("TrustedSignerDoesNotExist");
static const int TOO_MANY_FIELD_LEVEL_ENCRYPTION_CONFIGS_HASH = HashingUtils::HashString("TooManyFieldLevelEncryptionConfigs");
static const int NO_SUCH_INVALIDATION_HASH = HashingUtils::HashString("NoSuchInvalidation");
static const int TOO_MANY_ORIGINS_HASH = HashingUtils::HashString("TooManyOrigins");
static const int TOO_MANY_QUERY_STRINGS_IN_CACHE_POLICY_HASH = HashingUtils::HashString("TooManyQueryStringsInCachePolicy");
static const int DISTRIBUTION_ALREADY_EXISTS_HASH = HashingUtils::HashString("DistributionAlreadyExists");
static const int FIELD_LEVEL_ENCRYPTION_PROFILE_SIZE_EXCEEDED_HASH = HashingUtils::HashString("FieldLevelEncryptionProfileSizeExceeded");
static const int TOO_MANY_CACHE_BEHAVIORS_HASH = HashingUtils::HashString("TooManyCacheBehaviors");
static const int TOO_MANY_HEADERS_IN_CACHE_POLICY_HASH = HashingUtils::HashString("TooManyHeadersInCachePolicy");
static const int TOO_MANY_ORIGIN_GROUPS_PER_DISTRIBUTION_HASH = HashingUtils::HashString("TooManyOriginGroupsPerDistribution");
static const int FIELD_LEVEL_ENCRYPTION_CONFIG_IN_USE_HASH = HashingUtils::HashString("FieldLevelEncryptionConfigInUse");
static const int TOO_MANY_DISTRIBUTIONS_ASSOCIATED_TO_ORIGIN_REQUEST_POLICY_HASH = HashingUtils::HashString("TooManyDistributionsAssociatedToOriginRequestPolicy");
static const int FIELD_LEVEL_ENCRYPTION_PROFILE_IN_USE_HASH = HashingUtils::HashString("FieldLevelEncryptionProfileInUse");
static const int TOO_MANY_INVALIDATIONS_IN_PROGRESS_HASH = HashingUtils::HashString("TooManyInvalidationsInProgress");
static const int NO_SUCH_DISTRIBUTION_HASH = HashingUtils::HashString("NoSuchDistribution");
static const int INVALID_RESPONSE_CODE_HASH = HashingUtils::HashString("InvalidResponseCode");
static const int INVALID_DEFAULT_ROOT_OBJECT_HASH = HashingUtils::HashString("InvalidDefaultRootObject");
static const int NO_SUCH_FIELD_LEVEL_ENCRYPTION_CONFIG_HASH = HashingUtils::HashString("NoSuchFieldLevelEncryptionConfig");
static const int INVALID_WEB_A_C_L_ID_HASH = HashingUtils::HashString("InvalidWebACLId");
static const int STREAMING_DISTRIBUTION_NOT_DISABLED_HASH = HashingUtils::HashString("StreamingDistributionNotDisabled");
static const int TOO_MANY_TRUSTED_SIGNERS_HASH = HashingUtils::HashString("TooManyTrustedSigners");
static const int NO_SUCH_CLOUD_FRONT_ORIGIN_ACCESS_IDENTITY_HASH = HashingUtils::HashString("NoSuchCloudFrontOriginAccessIdentity");
static const int CLOUD_FRONT_ORIGIN_ACCESS_IDENTITY_ALREADY_EXISTS_HASH = HashingUtils::HashString("CloudFrontOriginAccessIdentityAlreadyExists");
static const int INVALID_FORWARD_COOKIES_HASH = HashingUtils::HashString("InvalidForwardCookies");
static const int QUERY_ARG_PROFILE_EMPTY_HASH = HashingUtils::HashString("QueryArgProfileEmpty");
static const int TOO_MANY_DISTRIBUTIONS_ASSOCIATED_TO_CACHE_POLICY_HASH = HashingUtils::HashString("TooManyDistributionsAssociatedToCachePolicy");
static const int PRECONDITION_FAILED_HASH = HashingUtils::HashString("PreconditionFailed");
static const int TOO_MANY_COOKIE_NAMES_IN_WHITE_LIST_HASH = HashingUtils::HashString("TooManyCookieNamesInWhiteList");
static const int INVALID_LAMBDA_FUNCTION_ASSOCIATION_HASH = HashingUtils::HashString("InvalidLambdaFunctionAssociation");
static const int TOO_MANY_FIELD_LEVEL_ENCRYPTION_CONTENT_TYPE_PROFILES_HASH = HashingUtils::HashString("TooManyFieldLevelEncryptionContentTypeProfiles");
static const int TOO_MANY_FIELD_LEVEL_ENCRYPTION_ENCRYPTION_ENTITIES_HASH = HashingUtils::HashString("TooManyFieldLevelEncryptionEncryptionEntities");
static const int INVALID_QUERY_STRING_PARAMETERS_HASH = HashingUtils::HashString("InvalidQueryStringParameters");
static const int INVALID_PROTOCOL_SETTINGS_HASH = HashingUtils::HashString("InvalidProtocolSettings");
static const int BATCH_TOO_LARGE_HASH = HashingUtils::HashString("BatchTooLarge");
static const int INVALID_ORIGIN_ACCESS_IDENTITY_HASH = HashingUtils::HashString("InvalidOriginAccessIdentity");
static const int INVALID_MINIMUM_PROTOCOL_VERSION_HASH = HashingUtils::HashString("InvalidMinimumProtocolVersion");
static const int STREAMING_DISTRIBUTION_ALREADY_EXISTS_HASH = HashingUtils::HashString("StreamingDistributionAlreadyExists");
static const int ILLEGAL_UPDATE_HASH = HashingUtils::HashString("IllegalUpdate");
static const int TOO_MANY_DISTRIBUTIONS_WITH_SINGLE_FUNCTION_A_R_N_HASH = HashingUtils::HashString("TooManyDistributionsWithSingleFunctionARN");
static const int CACHE_POLICY_ALREADY_EXISTS_HASH = HashingUtils::HashString("CachePolicyAlreadyExists");
static const int NO_SUCH_ORIGIN_REQUEST_POLICY_HASH = HashingUtils::HashString("NoSuchOriginRequestPolicy");
static const int TOO_MANY_DISTRIBUTION_C_N_A_M_ES_HASH = HashingUtils::HashString("TooManyDistributionCNAMEs");
static const int INVALID_RELATIVE_PATH_HASH = HashingUtils::HashString("InvalidRelativePath");
static const int INVALID_VIEWER_CERTIFICATE_HASH = HashingUtils::HashString("InvalidViewerCertificate");
static const int CANNOT_CHANGE_IMMUTABLE_PUBLIC_KEY_FIELDS_HASH = HashingUtils::HashString("CannotChangeImmutablePublicKeyFields");
static const int TOO_MANY_DISTRIBUTIONS_ASSOCIATED_TO_FIELD_LEVEL_ENCRYPTION_CONFIG_HASH = HashingUtils::HashString("TooManyDistributionsAssociatedToFieldLevelEncryptionConfig");
static const int DISTRIBUTION_NOT_DISABLED_HASH = HashingUtils::HashString("DistributionNotDisabled");
static const int INVALID_ARGUMENT_HASH = HashingUtils::HashString("InvalidArgument");
static const int PUBLIC_KEY_ALREADY_EXISTS_HASH = HashingUtils::HashString("PublicKeyAlreadyExists");
static const int CLOUD_FRONT_ORIGIN_ACCESS_IDENTITY_IN_USE_HASH = HashingUtils::HashString("CloudFrontOriginAccessIdentityInUse");
static const int MISSING_BODY_HASH = HashingUtils::HashString("MissingBody");
AWSError<CoreErrors> GetErrorForName(const char* errorName)
{
int hashCode = HashingUtils::HashString(errorName);
if (hashCode == INVALID_ERROR_CODE_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::INVALID_ERROR_CODE), false);
}
else if (hashCode == TOO_MANY_STREAMING_DISTRIBUTION_C_N_A_M_ES_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::TOO_MANY_STREAMING_DISTRIBUTION_C_N_A_M_ES), false);
}
else if (hashCode == ORIGIN_REQUEST_POLICY_ALREADY_EXISTS_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::ORIGIN_REQUEST_POLICY_ALREADY_EXISTS), false);
}
else if (hashCode == NO_SUCH_ORIGIN_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::NO_SUCH_ORIGIN), false);
}
else if (hashCode == NO_SUCH_RESOURCE_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::NO_SUCH_RESOURCE), false);
}
else if (hashCode == TOO_MANY_ORIGIN_REQUEST_POLICIES_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::TOO_MANY_ORIGIN_REQUEST_POLICIES), false);
}
else if (hashCode == FIELD_LEVEL_ENCRYPTION_CONFIG_ALREADY_EXISTS_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::FIELD_LEVEL_ENCRYPTION_CONFIG_ALREADY_EXISTS), false);
}
else if (hashCode == TOO_MANY_HEADERS_IN_FORWARDED_VALUES_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::TOO_MANY_HEADERS_IN_FORWARDED_VALUES), false);
}
else if (hashCode == INCONSISTENT_QUANTITIES_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::INCONSISTENT_QUANTITIES), false);
}
else if (hashCode == TOO_MANY_COOKIES_IN_ORIGIN_REQUEST_POLICY_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::TOO_MANY_COOKIES_IN_ORIGIN_REQUEST_POLICY), false);
}
else if (hashCode == INVALID_IF_MATCH_VERSION_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::INVALID_IF_MATCH_VERSION), false);
}
else if (hashCode == INVALID_TAGGING_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::INVALID_TAGGING), false);
}
else if (hashCode == TOO_MANY_DISTRIBUTIONS_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::TOO_MANY_DISTRIBUTIONS), false);
}
else if (hashCode == CACHE_POLICY_IN_USE_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::CACHE_POLICY_IN_USE), false);
}
else if (hashCode == INVALID_LOCATION_CODE_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::INVALID_LOCATION_CODE), false);
}
else if (hashCode == PUBLIC_KEY_IN_USE_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::PUBLIC_KEY_IN_USE), false);
}
else if (hashCode == TOO_MANY_QUERY_STRING_PARAMETERS_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::TOO_MANY_QUERY_STRING_PARAMETERS), false);
}
else if (hashCode == TOO_MANY_CERTIFICATES_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::TOO_MANY_CERTIFICATES), false);
}
else if (hashCode == NO_SUCH_PUBLIC_KEY_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::NO_SUCH_PUBLIC_KEY), false);
}
else if (hashCode == TOO_MANY_CACHE_POLICIES_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::TOO_MANY_CACHE_POLICIES), false);
}
else if (hashCode == ORIGIN_REQUEST_POLICY_IN_USE_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::ORIGIN_REQUEST_POLICY_IN_USE), false);
}
else if (hashCode == NO_SUCH_CACHE_POLICY_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::NO_SUCH_CACHE_POLICY), false);
}
else if (hashCode == NO_SUCH_FIELD_LEVEL_ENCRYPTION_PROFILE_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::NO_SUCH_FIELD_LEVEL_ENCRYPTION_PROFILE), false);
}
else if (hashCode == INVALID_ORIGIN_READ_TIMEOUT_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::INVALID_ORIGIN_READ_TIMEOUT), false);
}
else if (hashCode == INVALID_ORIGIN_KEEPALIVE_TIMEOUT_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::INVALID_ORIGIN_KEEPALIVE_TIMEOUT), false);
}
else if (hashCode == TOO_MANY_CLOUD_FRONT_ORIGIN_ACCESS_IDENTITIES_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::TOO_MANY_CLOUD_FRONT_ORIGIN_ACCESS_IDENTITIES), false);
}
else if (hashCode == INVALID_HEADERS_FOR_S3_ORIGIN_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::INVALID_HEADERS_FOR_S3_ORIGIN), false);
}
else if (hashCode == FIELD_LEVEL_ENCRYPTION_PROFILE_ALREADY_EXISTS_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::FIELD_LEVEL_ENCRYPTION_PROFILE_ALREADY_EXISTS), false);
}
else if (hashCode == TOO_MANY_HEADERS_IN_ORIGIN_REQUEST_POLICY_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::TOO_MANY_HEADERS_IN_ORIGIN_REQUEST_POLICY), false);
}
else if (hashCode == TOO_MANY_ORIGIN_CUSTOM_HEADERS_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::TOO_MANY_ORIGIN_CUSTOM_HEADERS), false);
}
else if (hashCode == INVALID_GEO_RESTRICTION_PARAMETER_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::INVALID_GEO_RESTRICTION_PARAMETER), false);
}
else if (hashCode == TOO_MANY_FIELD_LEVEL_ENCRYPTION_PROFILES_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::TOO_MANY_FIELD_LEVEL_ENCRYPTION_PROFILES), false);
}
else if (hashCode == ILLEGAL_DELETE_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::ILLEGAL_DELETE), false);
}
else if (hashCode == TOO_MANY_FIELD_LEVEL_ENCRYPTION_FIELD_PATTERNS_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::TOO_MANY_FIELD_LEVEL_ENCRYPTION_FIELD_PATTERNS), false);
}
else if (hashCode == NO_SUCH_STREAMING_DISTRIBUTION_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::NO_SUCH_STREAMING_DISTRIBUTION), false);
}
else if (hashCode == INVALID_T_T_L_ORDER_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::INVALID_T_T_L_ORDER), false);
}
else if (hashCode == TOO_MANY_FIELD_LEVEL_ENCRYPTION_QUERY_ARG_PROFILES_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::TOO_MANY_FIELD_LEVEL_ENCRYPTION_QUERY_ARG_PROFILES), false);
}
else if (hashCode == C_N_A_M_E_ALREADY_EXISTS_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::C_N_A_M_E_ALREADY_EXISTS), false);
}
else if (hashCode == TOO_MANY_COOKIES_IN_CACHE_POLICY_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::TOO_MANY_COOKIES_IN_CACHE_POLICY), false);
}
else if (hashCode == INVALID_REQUIRED_PROTOCOL_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::INVALID_REQUIRED_PROTOCOL), false);
}
else if (hashCode == TOO_MANY_DISTRIBUTIONS_WITH_LAMBDA_ASSOCIATIONS_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::TOO_MANY_DISTRIBUTIONS_WITH_LAMBDA_ASSOCIATIONS), false);
}
else if (hashCode == TOO_MANY_LAMBDA_FUNCTION_ASSOCIATIONS_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::TOO_MANY_LAMBDA_FUNCTION_ASSOCIATIONS), false);
}
else if (hashCode == TOO_MANY_QUERY_STRINGS_IN_ORIGIN_REQUEST_POLICY_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::TOO_MANY_QUERY_STRINGS_IN_ORIGIN_REQUEST_POLICY), false);
}
else if (hashCode == TOO_MANY_PUBLIC_KEYS_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::TOO_MANY_PUBLIC_KEYS), false);
}
else if (hashCode == TOO_MANY_STREAMING_DISTRIBUTIONS_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::TOO_MANY_STREAMING_DISTRIBUTIONS), false);
}
else if (hashCode == ILLEGAL_FIELD_LEVEL_ENCRYPTION_CONFIG_ASSOCIATION_WITH_CACHE_BEHAVIOR_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::ILLEGAL_FIELD_LEVEL_ENCRYPTION_CONFIG_ASSOCIATION_WITH_CACHE_BEHAVIOR), false);
}
else if (hashCode == INVALID_ORIGIN_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::INVALID_ORIGIN), false);
}
else if (hashCode == TRUSTED_SIGNER_DOES_NOT_EXIST_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::TRUSTED_SIGNER_DOES_NOT_EXIST), false);
}
else if (hashCode == TOO_MANY_FIELD_LEVEL_ENCRYPTION_CONFIGS_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::TOO_MANY_FIELD_LEVEL_ENCRYPTION_CONFIGS), false);
}
else if (hashCode == NO_SUCH_INVALIDATION_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::NO_SUCH_INVALIDATION), false);
}
else if (hashCode == TOO_MANY_ORIGINS_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::TOO_MANY_ORIGINS), false);
}
else if (hashCode == TOO_MANY_QUERY_STRINGS_IN_CACHE_POLICY_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::TOO_MANY_QUERY_STRINGS_IN_CACHE_POLICY), false);
}
else if (hashCode == DISTRIBUTION_ALREADY_EXISTS_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::DISTRIBUTION_ALREADY_EXISTS), false);
}
else if (hashCode == FIELD_LEVEL_ENCRYPTION_PROFILE_SIZE_EXCEEDED_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::FIELD_LEVEL_ENCRYPTION_PROFILE_SIZE_EXCEEDED), false);
}
else if (hashCode == TOO_MANY_CACHE_BEHAVIORS_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::TOO_MANY_CACHE_BEHAVIORS), false);
}
else if (hashCode == TOO_MANY_HEADERS_IN_CACHE_POLICY_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::TOO_MANY_HEADERS_IN_CACHE_POLICY), false);
}
else if (hashCode == TOO_MANY_ORIGIN_GROUPS_PER_DISTRIBUTION_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::TOO_MANY_ORIGIN_GROUPS_PER_DISTRIBUTION), false);
}
else if (hashCode == FIELD_LEVEL_ENCRYPTION_CONFIG_IN_USE_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::FIELD_LEVEL_ENCRYPTION_CONFIG_IN_USE), false);
}
else if (hashCode == TOO_MANY_DISTRIBUTIONS_ASSOCIATED_TO_ORIGIN_REQUEST_POLICY_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::TOO_MANY_DISTRIBUTIONS_ASSOCIATED_TO_ORIGIN_REQUEST_POLICY), false);
}
else if (hashCode == FIELD_LEVEL_ENCRYPTION_PROFILE_IN_USE_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::FIELD_LEVEL_ENCRYPTION_PROFILE_IN_USE), false);
}
else if (hashCode == TOO_MANY_INVALIDATIONS_IN_PROGRESS_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::TOO_MANY_INVALIDATIONS_IN_PROGRESS), false);
}
else if (hashCode == NO_SUCH_DISTRIBUTION_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::NO_SUCH_DISTRIBUTION), false);
}
else if (hashCode == INVALID_RESPONSE_CODE_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::INVALID_RESPONSE_CODE), false);
}
else if (hashCode == INVALID_DEFAULT_ROOT_OBJECT_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::INVALID_DEFAULT_ROOT_OBJECT), false);
}
else if (hashCode == NO_SUCH_FIELD_LEVEL_ENCRYPTION_CONFIG_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::NO_SUCH_FIELD_LEVEL_ENCRYPTION_CONFIG), false);
}
else if (hashCode == INVALID_WEB_A_C_L_ID_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::INVALID_WEB_A_C_L_ID), false);
}
else if (hashCode == STREAMING_DISTRIBUTION_NOT_DISABLED_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::STREAMING_DISTRIBUTION_NOT_DISABLED), false);
}
else if (hashCode == TOO_MANY_TRUSTED_SIGNERS_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::TOO_MANY_TRUSTED_SIGNERS), false);
}
else if (hashCode == NO_SUCH_CLOUD_FRONT_ORIGIN_ACCESS_IDENTITY_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::NO_SUCH_CLOUD_FRONT_ORIGIN_ACCESS_IDENTITY), false);
}
else if (hashCode == CLOUD_FRONT_ORIGIN_ACCESS_IDENTITY_ALREADY_EXISTS_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::CLOUD_FRONT_ORIGIN_ACCESS_IDENTITY_ALREADY_EXISTS), false);
}
else if (hashCode == INVALID_FORWARD_COOKIES_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::INVALID_FORWARD_COOKIES), false);
}
else if (hashCode == QUERY_ARG_PROFILE_EMPTY_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::QUERY_ARG_PROFILE_EMPTY), false);
}
else if (hashCode == TOO_MANY_DISTRIBUTIONS_ASSOCIATED_TO_CACHE_POLICY_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::TOO_MANY_DISTRIBUTIONS_ASSOCIATED_TO_CACHE_POLICY), false);
}
else if (hashCode == PRECONDITION_FAILED_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::PRECONDITION_FAILED), false);
}
else if (hashCode == TOO_MANY_COOKIE_NAMES_IN_WHITE_LIST_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::TOO_MANY_COOKIE_NAMES_IN_WHITE_LIST), false);
}
else if (hashCode == INVALID_LAMBDA_FUNCTION_ASSOCIATION_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::INVALID_LAMBDA_FUNCTION_ASSOCIATION), false);
}
else if (hashCode == TOO_MANY_FIELD_LEVEL_ENCRYPTION_CONTENT_TYPE_PROFILES_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::TOO_MANY_FIELD_LEVEL_ENCRYPTION_CONTENT_TYPE_PROFILES), false);
}
else if (hashCode == TOO_MANY_FIELD_LEVEL_ENCRYPTION_ENCRYPTION_ENTITIES_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::TOO_MANY_FIELD_LEVEL_ENCRYPTION_ENCRYPTION_ENTITIES), false);
}
else if (hashCode == INVALID_QUERY_STRING_PARAMETERS_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::INVALID_QUERY_STRING_PARAMETERS), false);
}
else if (hashCode == INVALID_PROTOCOL_SETTINGS_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::INVALID_PROTOCOL_SETTINGS), false);
}
else if (hashCode == BATCH_TOO_LARGE_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::BATCH_TOO_LARGE), false);
}
else if (hashCode == INVALID_ORIGIN_ACCESS_IDENTITY_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::INVALID_ORIGIN_ACCESS_IDENTITY), false);
}
else if (hashCode == INVALID_MINIMUM_PROTOCOL_VERSION_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::INVALID_MINIMUM_PROTOCOL_VERSION), false);
}
else if (hashCode == STREAMING_DISTRIBUTION_ALREADY_EXISTS_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::STREAMING_DISTRIBUTION_ALREADY_EXISTS), false);
}
else if (hashCode == ILLEGAL_UPDATE_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::ILLEGAL_UPDATE), false);
}
else if (hashCode == TOO_MANY_DISTRIBUTIONS_WITH_SINGLE_FUNCTION_A_R_N_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::TOO_MANY_DISTRIBUTIONS_WITH_SINGLE_FUNCTION_A_R_N), false);
}
else if (hashCode == CACHE_POLICY_ALREADY_EXISTS_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::CACHE_POLICY_ALREADY_EXISTS), false);
}
else if (hashCode == NO_SUCH_ORIGIN_REQUEST_POLICY_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::NO_SUCH_ORIGIN_REQUEST_POLICY), false);
}
else if (hashCode == TOO_MANY_DISTRIBUTION_C_N_A_M_ES_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::TOO_MANY_DISTRIBUTION_C_N_A_M_ES), false);
}
else if (hashCode == INVALID_RELATIVE_PATH_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::INVALID_RELATIVE_PATH), false);
}
else if (hashCode == INVALID_VIEWER_CERTIFICATE_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::INVALID_VIEWER_CERTIFICATE), false);
}
else if (hashCode == CANNOT_CHANGE_IMMUTABLE_PUBLIC_KEY_FIELDS_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::CANNOT_CHANGE_IMMUTABLE_PUBLIC_KEY_FIELDS), false);
}
else if (hashCode == TOO_MANY_DISTRIBUTIONS_ASSOCIATED_TO_FIELD_LEVEL_ENCRYPTION_CONFIG_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::TOO_MANY_DISTRIBUTIONS_ASSOCIATED_TO_FIELD_LEVEL_ENCRYPTION_CONFIG), false);
}
else if (hashCode == DISTRIBUTION_NOT_DISABLED_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::DISTRIBUTION_NOT_DISABLED), false);
}
else if (hashCode == INVALID_ARGUMENT_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::INVALID_ARGUMENT), false);
}
else if (hashCode == PUBLIC_KEY_ALREADY_EXISTS_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::PUBLIC_KEY_ALREADY_EXISTS), false);
}
else if (hashCode == CLOUD_FRONT_ORIGIN_ACCESS_IDENTITY_IN_USE_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::CLOUD_FRONT_ORIGIN_ACCESS_IDENTITY_IN_USE), false);
}
else if (hashCode == MISSING_BODY_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(CloudFrontErrors::MISSING_BODY), false);
}
return AWSError<CoreErrors>(CoreErrors::UNKNOWN, false);
}
} // namespace CloudFrontErrorMapper
} // namespace CloudFront
} // namespace Aws

View File

@@ -0,0 +1,110 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/ActiveTrustedSigners.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudFront
{
namespace Model
{
ActiveTrustedSigners::ActiveTrustedSigners() :
m_enabled(false),
m_enabledHasBeenSet(false),
m_quantity(0),
m_quantityHasBeenSet(false),
m_itemsHasBeenSet(false)
{
}
ActiveTrustedSigners::ActiveTrustedSigners(const XmlNode& xmlNode) :
m_enabled(false),
m_enabledHasBeenSet(false),
m_quantity(0),
m_quantityHasBeenSet(false),
m_itemsHasBeenSet(false)
{
*this = xmlNode;
}
ActiveTrustedSigners& ActiveTrustedSigners::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode enabledNode = resultNode.FirstChild("Enabled");
if(!enabledNode.IsNull())
{
m_enabled = StringUtils::ConvertToBool(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(enabledNode.GetText()).c_str()).c_str());
m_enabledHasBeenSet = true;
}
XmlNode quantityNode = resultNode.FirstChild("Quantity");
if(!quantityNode.IsNull())
{
m_quantity = StringUtils::ConvertToInt32(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(quantityNode.GetText()).c_str()).c_str());
m_quantityHasBeenSet = true;
}
XmlNode itemsNode = resultNode.FirstChild("Items");
if(!itemsNode.IsNull())
{
XmlNode itemsMember = itemsNode.FirstChild("Signer");
while(!itemsMember.IsNull())
{
m_items.push_back(itemsMember);
itemsMember = itemsMember.NextNode("Signer");
}
m_itemsHasBeenSet = true;
}
}
return *this;
}
void ActiveTrustedSigners::AddToNode(XmlNode& parentNode) const
{
Aws::StringStream ss;
if(m_enabledHasBeenSet)
{
XmlNode enabledNode = parentNode.CreateChildElement("Enabled");
ss << std::boolalpha << m_enabled;
enabledNode.SetText(ss.str());
ss.str("");
}
if(m_quantityHasBeenSet)
{
XmlNode quantityNode = parentNode.CreateChildElement("Quantity");
ss << m_quantity;
quantityNode.SetText(ss.str());
ss.str("");
}
if(m_itemsHasBeenSet)
{
XmlNode itemsParentNode = parentNode.CreateChildElement("Items");
for(const auto& item : m_items)
{
XmlNode itemsNode = itemsParentNode.CreateChildElement("Signer");
item.AddToNode(itemsNode);
}
}
}
} // namespace Model
} // namespace CloudFront
} // namespace Aws

View File

@@ -0,0 +1,80 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/AliasICPRecordal.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudFront
{
namespace Model
{
AliasICPRecordal::AliasICPRecordal() :
m_cNAMEHasBeenSet(false),
m_iCPRecordalStatus(ICPRecordalStatus::NOT_SET),
m_iCPRecordalStatusHasBeenSet(false)
{
}
AliasICPRecordal::AliasICPRecordal(const XmlNode& xmlNode) :
m_cNAMEHasBeenSet(false),
m_iCPRecordalStatus(ICPRecordalStatus::NOT_SET),
m_iCPRecordalStatusHasBeenSet(false)
{
*this = xmlNode;
}
AliasICPRecordal& AliasICPRecordal::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode cNAMENode = resultNode.FirstChild("CNAME");
if(!cNAMENode.IsNull())
{
m_cNAME = Aws::Utils::Xml::DecodeEscapedXmlText(cNAMENode.GetText());
m_cNAMEHasBeenSet = true;
}
XmlNode iCPRecordalStatusNode = resultNode.FirstChild("ICPRecordalStatus");
if(!iCPRecordalStatusNode.IsNull())
{
m_iCPRecordalStatus = ICPRecordalStatusMapper::GetICPRecordalStatusForName(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(iCPRecordalStatusNode.GetText()).c_str()).c_str());
m_iCPRecordalStatusHasBeenSet = true;
}
}
return *this;
}
void AliasICPRecordal::AddToNode(XmlNode& parentNode) const
{
Aws::StringStream ss;
if(m_cNAMEHasBeenSet)
{
XmlNode cNAMENode = parentNode.CreateChildElement("CNAME");
cNAMENode.SetText(m_cNAME);
}
if(m_iCPRecordalStatusHasBeenSet)
{
XmlNode iCPRecordalStatusNode = parentNode.CreateChildElement("ICPRecordalStatus");
iCPRecordalStatusNode.SetText(ICPRecordalStatusMapper::GetNameForICPRecordalStatus(m_iCPRecordalStatus));
}
}
} // namespace Model
} // namespace CloudFront
} // namespace Aws

View File

@@ -0,0 +1,92 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/Aliases.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudFront
{
namespace Model
{
Aliases::Aliases() :
m_quantity(0),
m_quantityHasBeenSet(false),
m_itemsHasBeenSet(false)
{
}
Aliases::Aliases(const XmlNode& xmlNode) :
m_quantity(0),
m_quantityHasBeenSet(false),
m_itemsHasBeenSet(false)
{
*this = xmlNode;
}
Aliases& Aliases::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode quantityNode = resultNode.FirstChild("Quantity");
if(!quantityNode.IsNull())
{
m_quantity = StringUtils::ConvertToInt32(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(quantityNode.GetText()).c_str()).c_str());
m_quantityHasBeenSet = true;
}
XmlNode itemsNode = resultNode.FirstChild("Items");
if(!itemsNode.IsNull())
{
XmlNode itemsMember = itemsNode.FirstChild("CNAME");
while(!itemsMember.IsNull())
{
m_items.push_back(itemsMember.GetText());
itemsMember = itemsMember.NextNode("CNAME");
}
m_itemsHasBeenSet = true;
}
}
return *this;
}
void Aliases::AddToNode(XmlNode& parentNode) const
{
Aws::StringStream ss;
if(m_quantityHasBeenSet)
{
XmlNode quantityNode = parentNode.CreateChildElement("Quantity");
ss << m_quantity;
quantityNode.SetText(ss.str());
ss.str("");
}
if(m_itemsHasBeenSet)
{
XmlNode itemsParentNode = parentNode.CreateChildElement("Items");
for(const auto& item : m_items)
{
XmlNode itemsNode = itemsParentNode.CreateChildElement("String");
itemsNode.SetText(item);
}
}
}
} // namespace Model
} // namespace CloudFront
} // namespace Aws

View File

@@ -0,0 +1,106 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/AllowedMethods.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudFront
{
namespace Model
{
AllowedMethods::AllowedMethods() :
m_quantity(0),
m_quantityHasBeenSet(false),
m_itemsHasBeenSet(false),
m_cachedMethodsHasBeenSet(false)
{
}
AllowedMethods::AllowedMethods(const XmlNode& xmlNode) :
m_quantity(0),
m_quantityHasBeenSet(false),
m_itemsHasBeenSet(false),
m_cachedMethodsHasBeenSet(false)
{
*this = xmlNode;
}
AllowedMethods& AllowedMethods::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode quantityNode = resultNode.FirstChild("Quantity");
if(!quantityNode.IsNull())
{
m_quantity = StringUtils::ConvertToInt32(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(quantityNode.GetText()).c_str()).c_str());
m_quantityHasBeenSet = true;
}
XmlNode itemsNode = resultNode.FirstChild("Items");
if(!itemsNode.IsNull())
{
XmlNode itemsMember = itemsNode.FirstChild("Method");
while(!itemsMember.IsNull())
{
m_items.push_back(MethodMapper::GetMethodForName(StringUtils::Trim(itemsMember.GetText().c_str())));
itemsMember = itemsMember.NextNode("Method");
}
m_itemsHasBeenSet = true;
}
XmlNode cachedMethodsNode = resultNode.FirstChild("CachedMethods");
if(!cachedMethodsNode.IsNull())
{
m_cachedMethods = cachedMethodsNode;
m_cachedMethodsHasBeenSet = true;
}
}
return *this;
}
void AllowedMethods::AddToNode(XmlNode& parentNode) const
{
Aws::StringStream ss;
if(m_quantityHasBeenSet)
{
XmlNode quantityNode = parentNode.CreateChildElement("Quantity");
ss << m_quantity;
quantityNode.SetText(ss.str());
ss.str("");
}
if(m_itemsHasBeenSet)
{
XmlNode itemsParentNode = parentNode.CreateChildElement("Items");
for(const auto& item : m_items)
{
XmlNode itemsNode = itemsParentNode.CreateChildElement("Method");
itemsNode.SetText(MethodMapper::GetNameForMethod(item));
}
}
if(m_cachedMethodsHasBeenSet)
{
XmlNode cachedMethodsNode = parentNode.CreateChildElement("CachedMethods");
m_cachedMethods.AddToNode(cachedMethodsNode);
}
}
} // namespace Model
} // namespace CloudFront
} // namespace Aws

View File

@@ -0,0 +1,214 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/CacheBehavior.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudFront
{
namespace Model
{
CacheBehavior::CacheBehavior() :
m_pathPatternHasBeenSet(false),
m_targetOriginIdHasBeenSet(false),
m_trustedSignersHasBeenSet(false),
m_viewerProtocolPolicy(ViewerProtocolPolicy::NOT_SET),
m_viewerProtocolPolicyHasBeenSet(false),
m_allowedMethodsHasBeenSet(false),
m_smoothStreaming(false),
m_smoothStreamingHasBeenSet(false),
m_compress(false),
m_compressHasBeenSet(false),
m_lambdaFunctionAssociationsHasBeenSet(false),
m_fieldLevelEncryptionIdHasBeenSet(false),
m_cachePolicyIdHasBeenSet(false),
m_originRequestPolicyIdHasBeenSet(false)
{
}
CacheBehavior::CacheBehavior(const XmlNode& xmlNode) :
m_pathPatternHasBeenSet(false),
m_targetOriginIdHasBeenSet(false),
m_trustedSignersHasBeenSet(false),
m_viewerProtocolPolicy(ViewerProtocolPolicy::NOT_SET),
m_viewerProtocolPolicyHasBeenSet(false),
m_allowedMethodsHasBeenSet(false),
m_smoothStreaming(false),
m_smoothStreamingHasBeenSet(false),
m_compress(false),
m_compressHasBeenSet(false),
m_lambdaFunctionAssociationsHasBeenSet(false),
m_fieldLevelEncryptionIdHasBeenSet(false),
m_cachePolicyIdHasBeenSet(false),
m_originRequestPolicyIdHasBeenSet(false)
{
*this = xmlNode;
}
CacheBehavior& CacheBehavior::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode pathPatternNode = resultNode.FirstChild("PathPattern");
if(!pathPatternNode.IsNull())
{
m_pathPattern = Aws::Utils::Xml::DecodeEscapedXmlText(pathPatternNode.GetText());
m_pathPatternHasBeenSet = true;
}
XmlNode targetOriginIdNode = resultNode.FirstChild("TargetOriginId");
if(!targetOriginIdNode.IsNull())
{
m_targetOriginId = Aws::Utils::Xml::DecodeEscapedXmlText(targetOriginIdNode.GetText());
m_targetOriginIdHasBeenSet = true;
}
XmlNode trustedSignersNode = resultNode.FirstChild("TrustedSigners");
if(!trustedSignersNode.IsNull())
{
m_trustedSigners = trustedSignersNode;
m_trustedSignersHasBeenSet = true;
}
XmlNode viewerProtocolPolicyNode = resultNode.FirstChild("ViewerProtocolPolicy");
if(!viewerProtocolPolicyNode.IsNull())
{
m_viewerProtocolPolicy = ViewerProtocolPolicyMapper::GetViewerProtocolPolicyForName(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(viewerProtocolPolicyNode.GetText()).c_str()).c_str());
m_viewerProtocolPolicyHasBeenSet = true;
}
XmlNode allowedMethodsNode = resultNode.FirstChild("AllowedMethods");
if(!allowedMethodsNode.IsNull())
{
m_allowedMethods = allowedMethodsNode;
m_allowedMethodsHasBeenSet = true;
}
XmlNode smoothStreamingNode = resultNode.FirstChild("SmoothStreaming");
if(!smoothStreamingNode.IsNull())
{
m_smoothStreaming = StringUtils::ConvertToBool(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(smoothStreamingNode.GetText()).c_str()).c_str());
m_smoothStreamingHasBeenSet = true;
}
XmlNode compressNode = resultNode.FirstChild("Compress");
if(!compressNode.IsNull())
{
m_compress = StringUtils::ConvertToBool(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(compressNode.GetText()).c_str()).c_str());
m_compressHasBeenSet = true;
}
XmlNode lambdaFunctionAssociationsNode = resultNode.FirstChild("LambdaFunctionAssociations");
if(!lambdaFunctionAssociationsNode.IsNull())
{
m_lambdaFunctionAssociations = lambdaFunctionAssociationsNode;
m_lambdaFunctionAssociationsHasBeenSet = true;
}
XmlNode fieldLevelEncryptionIdNode = resultNode.FirstChild("FieldLevelEncryptionId");
if(!fieldLevelEncryptionIdNode.IsNull())
{
m_fieldLevelEncryptionId = Aws::Utils::Xml::DecodeEscapedXmlText(fieldLevelEncryptionIdNode.GetText());
m_fieldLevelEncryptionIdHasBeenSet = true;
}
XmlNode cachePolicyIdNode = resultNode.FirstChild("CachePolicyId");
if(!cachePolicyIdNode.IsNull())
{
m_cachePolicyId = Aws::Utils::Xml::DecodeEscapedXmlText(cachePolicyIdNode.GetText());
m_cachePolicyIdHasBeenSet = true;
}
XmlNode originRequestPolicyIdNode = resultNode.FirstChild("OriginRequestPolicyId");
if(!originRequestPolicyIdNode.IsNull())
{
m_originRequestPolicyId = Aws::Utils::Xml::DecodeEscapedXmlText(originRequestPolicyIdNode.GetText());
m_originRequestPolicyIdHasBeenSet = true;
}
}
return *this;
}
void CacheBehavior::AddToNode(XmlNode& parentNode) const
{
Aws::StringStream ss;
if(m_pathPatternHasBeenSet)
{
XmlNode pathPatternNode = parentNode.CreateChildElement("PathPattern");
pathPatternNode.SetText(m_pathPattern);
}
if(m_targetOriginIdHasBeenSet)
{
XmlNode targetOriginIdNode = parentNode.CreateChildElement("TargetOriginId");
targetOriginIdNode.SetText(m_targetOriginId);
}
if(m_trustedSignersHasBeenSet)
{
XmlNode trustedSignersNode = parentNode.CreateChildElement("TrustedSigners");
m_trustedSigners.AddToNode(trustedSignersNode);
}
if(m_viewerProtocolPolicyHasBeenSet)
{
XmlNode viewerProtocolPolicyNode = parentNode.CreateChildElement("ViewerProtocolPolicy");
viewerProtocolPolicyNode.SetText(ViewerProtocolPolicyMapper::GetNameForViewerProtocolPolicy(m_viewerProtocolPolicy));
}
if(m_allowedMethodsHasBeenSet)
{
XmlNode allowedMethodsNode = parentNode.CreateChildElement("AllowedMethods");
m_allowedMethods.AddToNode(allowedMethodsNode);
}
if(m_smoothStreamingHasBeenSet)
{
XmlNode smoothStreamingNode = parentNode.CreateChildElement("SmoothStreaming");
ss << std::boolalpha << m_smoothStreaming;
smoothStreamingNode.SetText(ss.str());
ss.str("");
}
if(m_compressHasBeenSet)
{
XmlNode compressNode = parentNode.CreateChildElement("Compress");
ss << std::boolalpha << m_compress;
compressNode.SetText(ss.str());
ss.str("");
}
if(m_lambdaFunctionAssociationsHasBeenSet)
{
XmlNode lambdaFunctionAssociationsNode = parentNode.CreateChildElement("LambdaFunctionAssociations");
m_lambdaFunctionAssociations.AddToNode(lambdaFunctionAssociationsNode);
}
if(m_fieldLevelEncryptionIdHasBeenSet)
{
XmlNode fieldLevelEncryptionIdNode = parentNode.CreateChildElement("FieldLevelEncryptionId");
fieldLevelEncryptionIdNode.SetText(m_fieldLevelEncryptionId);
}
if(m_cachePolicyIdHasBeenSet)
{
XmlNode cachePolicyIdNode = parentNode.CreateChildElement("CachePolicyId");
cachePolicyIdNode.SetText(m_cachePolicyId);
}
if(m_originRequestPolicyIdHasBeenSet)
{
XmlNode originRequestPolicyIdNode = parentNode.CreateChildElement("OriginRequestPolicyId");
originRequestPolicyIdNode.SetText(m_originRequestPolicyId);
}
}
} // namespace Model
} // namespace CloudFront
} // namespace Aws

View File

@@ -0,0 +1,92 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/CacheBehaviors.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudFront
{
namespace Model
{
CacheBehaviors::CacheBehaviors() :
m_quantity(0),
m_quantityHasBeenSet(false),
m_itemsHasBeenSet(false)
{
}
CacheBehaviors::CacheBehaviors(const XmlNode& xmlNode) :
m_quantity(0),
m_quantityHasBeenSet(false),
m_itemsHasBeenSet(false)
{
*this = xmlNode;
}
CacheBehaviors& CacheBehaviors::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode quantityNode = resultNode.FirstChild("Quantity");
if(!quantityNode.IsNull())
{
m_quantity = StringUtils::ConvertToInt32(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(quantityNode.GetText()).c_str()).c_str());
m_quantityHasBeenSet = true;
}
XmlNode itemsNode = resultNode.FirstChild("Items");
if(!itemsNode.IsNull())
{
XmlNode itemsMember = itemsNode.FirstChild("CacheBehavior");
while(!itemsMember.IsNull())
{
m_items.push_back(itemsMember);
itemsMember = itemsMember.NextNode("CacheBehavior");
}
m_itemsHasBeenSet = true;
}
}
return *this;
}
void CacheBehaviors::AddToNode(XmlNode& parentNode) const
{
Aws::StringStream ss;
if(m_quantityHasBeenSet)
{
XmlNode quantityNode = parentNode.CreateChildElement("Quantity");
ss << m_quantity;
quantityNode.SetText(ss.str());
ss.str("");
}
if(m_itemsHasBeenSet)
{
XmlNode itemsParentNode = parentNode.CreateChildElement("Items");
for(const auto& item : m_items)
{
XmlNode itemsNode = itemsParentNode.CreateChildElement("CacheBehavior");
item.AddToNode(itemsNode);
}
}
}
} // namespace Model
} // namespace CloudFront
} // namespace Aws

View File

@@ -0,0 +1,92 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/CachePolicy.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudFront
{
namespace Model
{
CachePolicy::CachePolicy() :
m_idHasBeenSet(false),
m_lastModifiedTimeHasBeenSet(false),
m_cachePolicyConfigHasBeenSet(false)
{
}
CachePolicy::CachePolicy(const XmlNode& xmlNode) :
m_idHasBeenSet(false),
m_lastModifiedTimeHasBeenSet(false),
m_cachePolicyConfigHasBeenSet(false)
{
*this = xmlNode;
}
CachePolicy& CachePolicy::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode idNode = resultNode.FirstChild("Id");
if(!idNode.IsNull())
{
m_id = Aws::Utils::Xml::DecodeEscapedXmlText(idNode.GetText());
m_idHasBeenSet = true;
}
XmlNode lastModifiedTimeNode = resultNode.FirstChild("LastModifiedTime");
if(!lastModifiedTimeNode.IsNull())
{
m_lastModifiedTime = DateTime(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(lastModifiedTimeNode.GetText()).c_str()).c_str(), DateFormat::ISO_8601);
m_lastModifiedTimeHasBeenSet = true;
}
XmlNode cachePolicyConfigNode = resultNode.FirstChild("CachePolicyConfig");
if(!cachePolicyConfigNode.IsNull())
{
m_cachePolicyConfig = cachePolicyConfigNode;
m_cachePolicyConfigHasBeenSet = true;
}
}
return *this;
}
void CachePolicy::AddToNode(XmlNode& parentNode) const
{
Aws::StringStream ss;
if(m_idHasBeenSet)
{
XmlNode idNode = parentNode.CreateChildElement("Id");
idNode.SetText(m_id);
}
if(m_lastModifiedTimeHasBeenSet)
{
XmlNode lastModifiedTimeNode = parentNode.CreateChildElement("LastModifiedTime");
lastModifiedTimeNode.SetText(m_lastModifiedTime.ToGmtString(DateFormat::ISO_8601));
}
if(m_cachePolicyConfigHasBeenSet)
{
XmlNode cachePolicyConfigNode = parentNode.CreateChildElement("CachePolicyConfig");
m_cachePolicyConfig.AddToNode(cachePolicyConfigNode);
}
}
} // namespace Model
} // namespace CloudFront
} // namespace Aws

View File

@@ -0,0 +1,146 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/CachePolicyConfig.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudFront
{
namespace Model
{
CachePolicyConfig::CachePolicyConfig() :
m_commentHasBeenSet(false),
m_nameHasBeenSet(false),
m_defaultTTL(0),
m_defaultTTLHasBeenSet(false),
m_maxTTL(0),
m_maxTTLHasBeenSet(false),
m_minTTL(0),
m_minTTLHasBeenSet(false),
m_parametersInCacheKeyAndForwardedToOriginHasBeenSet(false)
{
}
CachePolicyConfig::CachePolicyConfig(const XmlNode& xmlNode) :
m_commentHasBeenSet(false),
m_nameHasBeenSet(false),
m_defaultTTL(0),
m_defaultTTLHasBeenSet(false),
m_maxTTL(0),
m_maxTTLHasBeenSet(false),
m_minTTL(0),
m_minTTLHasBeenSet(false),
m_parametersInCacheKeyAndForwardedToOriginHasBeenSet(false)
{
*this = xmlNode;
}
CachePolicyConfig& CachePolicyConfig::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode commentNode = resultNode.FirstChild("Comment");
if(!commentNode.IsNull())
{
m_comment = Aws::Utils::Xml::DecodeEscapedXmlText(commentNode.GetText());
m_commentHasBeenSet = true;
}
XmlNode nameNode = resultNode.FirstChild("Name");
if(!nameNode.IsNull())
{
m_name = Aws::Utils::Xml::DecodeEscapedXmlText(nameNode.GetText());
m_nameHasBeenSet = true;
}
XmlNode defaultTTLNode = resultNode.FirstChild("DefaultTTL");
if(!defaultTTLNode.IsNull())
{
m_defaultTTL = StringUtils::ConvertToInt64(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(defaultTTLNode.GetText()).c_str()).c_str());
m_defaultTTLHasBeenSet = true;
}
XmlNode maxTTLNode = resultNode.FirstChild("MaxTTL");
if(!maxTTLNode.IsNull())
{
m_maxTTL = StringUtils::ConvertToInt64(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(maxTTLNode.GetText()).c_str()).c_str());
m_maxTTLHasBeenSet = true;
}
XmlNode minTTLNode = resultNode.FirstChild("MinTTL");
if(!minTTLNode.IsNull())
{
m_minTTL = StringUtils::ConvertToInt64(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(minTTLNode.GetText()).c_str()).c_str());
m_minTTLHasBeenSet = true;
}
XmlNode parametersInCacheKeyAndForwardedToOriginNode = resultNode.FirstChild("ParametersInCacheKeyAndForwardedToOrigin");
if(!parametersInCacheKeyAndForwardedToOriginNode.IsNull())
{
m_parametersInCacheKeyAndForwardedToOrigin = parametersInCacheKeyAndForwardedToOriginNode;
m_parametersInCacheKeyAndForwardedToOriginHasBeenSet = true;
}
}
return *this;
}
void CachePolicyConfig::AddToNode(XmlNode& parentNode) const
{
Aws::StringStream ss;
if(m_commentHasBeenSet)
{
XmlNode commentNode = parentNode.CreateChildElement("Comment");
commentNode.SetText(m_comment);
}
if(m_nameHasBeenSet)
{
XmlNode nameNode = parentNode.CreateChildElement("Name");
nameNode.SetText(m_name);
}
if(m_defaultTTLHasBeenSet)
{
XmlNode defaultTTLNode = parentNode.CreateChildElement("DefaultTTL");
ss << m_defaultTTL;
defaultTTLNode.SetText(ss.str());
ss.str("");
}
if(m_maxTTLHasBeenSet)
{
XmlNode maxTTLNode = parentNode.CreateChildElement("MaxTTL");
ss << m_maxTTL;
maxTTLNode.SetText(ss.str());
ss.str("");
}
if(m_minTTLHasBeenSet)
{
XmlNode minTTLNode = parentNode.CreateChildElement("MinTTL");
ss << m_minTTL;
minTTLNode.SetText(ss.str());
ss.str("");
}
if(m_parametersInCacheKeyAndForwardedToOriginHasBeenSet)
{
XmlNode parametersInCacheKeyAndForwardedToOriginNode = parentNode.CreateChildElement("ParametersInCacheKeyAndForwardedToOrigin");
m_parametersInCacheKeyAndForwardedToOrigin.AddToNode(parametersInCacheKeyAndForwardedToOriginNode);
}
}
} // namespace Model
} // namespace CloudFront
} // namespace Aws

View File

@@ -0,0 +1,84 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/CachePolicyCookieBehavior.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 CloudFront
{
namespace Model
{
namespace CachePolicyCookieBehaviorMapper
{
static const int none_HASH = HashingUtils::HashString("none");
static const int whitelist_HASH = HashingUtils::HashString("whitelist");
static const int allExcept_HASH = HashingUtils::HashString("allExcept");
static const int all_HASH = HashingUtils::HashString("all");
CachePolicyCookieBehavior GetCachePolicyCookieBehaviorForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == none_HASH)
{
return CachePolicyCookieBehavior::none;
}
else if (hashCode == whitelist_HASH)
{
return CachePolicyCookieBehavior::whitelist;
}
else if (hashCode == allExcept_HASH)
{
return CachePolicyCookieBehavior::allExcept;
}
else if (hashCode == all_HASH)
{
return CachePolicyCookieBehavior::all;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<CachePolicyCookieBehavior>(hashCode);
}
return CachePolicyCookieBehavior::NOT_SET;
}
Aws::String GetNameForCachePolicyCookieBehavior(CachePolicyCookieBehavior enumValue)
{
switch(enumValue)
{
case CachePolicyCookieBehavior::none:
return "none";
case CachePolicyCookieBehavior::whitelist:
return "whitelist";
case CachePolicyCookieBehavior::allExcept:
return "allExcept";
case CachePolicyCookieBehavior::all:
return "all";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace CachePolicyCookieBehaviorMapper
} // namespace Model
} // namespace CloudFront
} // namespace Aws

View File

@@ -0,0 +1,80 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/CachePolicyCookiesConfig.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudFront
{
namespace Model
{
CachePolicyCookiesConfig::CachePolicyCookiesConfig() :
m_cookieBehavior(CachePolicyCookieBehavior::NOT_SET),
m_cookieBehaviorHasBeenSet(false),
m_cookiesHasBeenSet(false)
{
}
CachePolicyCookiesConfig::CachePolicyCookiesConfig(const XmlNode& xmlNode) :
m_cookieBehavior(CachePolicyCookieBehavior::NOT_SET),
m_cookieBehaviorHasBeenSet(false),
m_cookiesHasBeenSet(false)
{
*this = xmlNode;
}
CachePolicyCookiesConfig& CachePolicyCookiesConfig::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode cookieBehaviorNode = resultNode.FirstChild("CookieBehavior");
if(!cookieBehaviorNode.IsNull())
{
m_cookieBehavior = CachePolicyCookieBehaviorMapper::GetCachePolicyCookieBehaviorForName(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(cookieBehaviorNode.GetText()).c_str()).c_str());
m_cookieBehaviorHasBeenSet = true;
}
XmlNode cookiesNode = resultNode.FirstChild("Cookies");
if(!cookiesNode.IsNull())
{
m_cookies = cookiesNode;
m_cookiesHasBeenSet = true;
}
}
return *this;
}
void CachePolicyCookiesConfig::AddToNode(XmlNode& parentNode) const
{
Aws::StringStream ss;
if(m_cookieBehaviorHasBeenSet)
{
XmlNode cookieBehaviorNode = parentNode.CreateChildElement("CookieBehavior");
cookieBehaviorNode.SetText(CachePolicyCookieBehaviorMapper::GetNameForCachePolicyCookieBehavior(m_cookieBehavior));
}
if(m_cookiesHasBeenSet)
{
XmlNode cookiesNode = parentNode.CreateChildElement("Cookies");
m_cookies.AddToNode(cookiesNode);
}
}
} // namespace Model
} // namespace CloudFront
} // 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/cloudfront/model/CachePolicyHeaderBehavior.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 CloudFront
{
namespace Model
{
namespace CachePolicyHeaderBehaviorMapper
{
static const int none_HASH = HashingUtils::HashString("none");
static const int whitelist_HASH = HashingUtils::HashString("whitelist");
CachePolicyHeaderBehavior GetCachePolicyHeaderBehaviorForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == none_HASH)
{
return CachePolicyHeaderBehavior::none;
}
else if (hashCode == whitelist_HASH)
{
return CachePolicyHeaderBehavior::whitelist;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<CachePolicyHeaderBehavior>(hashCode);
}
return CachePolicyHeaderBehavior::NOT_SET;
}
Aws::String GetNameForCachePolicyHeaderBehavior(CachePolicyHeaderBehavior enumValue)
{
switch(enumValue)
{
case CachePolicyHeaderBehavior::none:
return "none";
case CachePolicyHeaderBehavior::whitelist:
return "whitelist";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace CachePolicyHeaderBehaviorMapper
} // namespace Model
} // namespace CloudFront
} // namespace Aws

View File

@@ -0,0 +1,80 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/CachePolicyHeadersConfig.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudFront
{
namespace Model
{
CachePolicyHeadersConfig::CachePolicyHeadersConfig() :
m_headerBehavior(CachePolicyHeaderBehavior::NOT_SET),
m_headerBehaviorHasBeenSet(false),
m_headersHasBeenSet(false)
{
}
CachePolicyHeadersConfig::CachePolicyHeadersConfig(const XmlNode& xmlNode) :
m_headerBehavior(CachePolicyHeaderBehavior::NOT_SET),
m_headerBehaviorHasBeenSet(false),
m_headersHasBeenSet(false)
{
*this = xmlNode;
}
CachePolicyHeadersConfig& CachePolicyHeadersConfig::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode headerBehaviorNode = resultNode.FirstChild("HeaderBehavior");
if(!headerBehaviorNode.IsNull())
{
m_headerBehavior = CachePolicyHeaderBehaviorMapper::GetCachePolicyHeaderBehaviorForName(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(headerBehaviorNode.GetText()).c_str()).c_str());
m_headerBehaviorHasBeenSet = true;
}
XmlNode headersNode = resultNode.FirstChild("Headers");
if(!headersNode.IsNull())
{
m_headers = headersNode;
m_headersHasBeenSet = true;
}
}
return *this;
}
void CachePolicyHeadersConfig::AddToNode(XmlNode& parentNode) const
{
Aws::StringStream ss;
if(m_headerBehaviorHasBeenSet)
{
XmlNode headerBehaviorNode = parentNode.CreateChildElement("HeaderBehavior");
headerBehaviorNode.SetText(CachePolicyHeaderBehaviorMapper::GetNameForCachePolicyHeaderBehavior(m_headerBehavior));
}
if(m_headersHasBeenSet)
{
XmlNode headersNode = parentNode.CreateChildElement("Headers");
m_headers.AddToNode(headersNode);
}
}
} // namespace Model
} // namespace CloudFront
} // namespace Aws

View File

@@ -0,0 +1,124 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/CachePolicyList.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudFront
{
namespace Model
{
CachePolicyList::CachePolicyList() :
m_nextMarkerHasBeenSet(false),
m_maxItems(0),
m_maxItemsHasBeenSet(false),
m_quantity(0),
m_quantityHasBeenSet(false),
m_itemsHasBeenSet(false)
{
}
CachePolicyList::CachePolicyList(const XmlNode& xmlNode) :
m_nextMarkerHasBeenSet(false),
m_maxItems(0),
m_maxItemsHasBeenSet(false),
m_quantity(0),
m_quantityHasBeenSet(false),
m_itemsHasBeenSet(false)
{
*this = xmlNode;
}
CachePolicyList& CachePolicyList::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode nextMarkerNode = resultNode.FirstChild("NextMarker");
if(!nextMarkerNode.IsNull())
{
m_nextMarker = Aws::Utils::Xml::DecodeEscapedXmlText(nextMarkerNode.GetText());
m_nextMarkerHasBeenSet = true;
}
XmlNode maxItemsNode = resultNode.FirstChild("MaxItems");
if(!maxItemsNode.IsNull())
{
m_maxItems = StringUtils::ConvertToInt32(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(maxItemsNode.GetText()).c_str()).c_str());
m_maxItemsHasBeenSet = true;
}
XmlNode quantityNode = resultNode.FirstChild("Quantity");
if(!quantityNode.IsNull())
{
m_quantity = StringUtils::ConvertToInt32(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(quantityNode.GetText()).c_str()).c_str());
m_quantityHasBeenSet = true;
}
XmlNode itemsNode = resultNode.FirstChild("Items");
if(!itemsNode.IsNull())
{
XmlNode itemsMember = itemsNode.FirstChild("CachePolicySummary");
while(!itemsMember.IsNull())
{
m_items.push_back(itemsMember);
itemsMember = itemsMember.NextNode("CachePolicySummary");
}
m_itemsHasBeenSet = true;
}
}
return *this;
}
void CachePolicyList::AddToNode(XmlNode& parentNode) const
{
Aws::StringStream ss;
if(m_nextMarkerHasBeenSet)
{
XmlNode nextMarkerNode = parentNode.CreateChildElement("NextMarker");
nextMarkerNode.SetText(m_nextMarker);
}
if(m_maxItemsHasBeenSet)
{
XmlNode maxItemsNode = parentNode.CreateChildElement("MaxItems");
ss << m_maxItems;
maxItemsNode.SetText(ss.str());
ss.str("");
}
if(m_quantityHasBeenSet)
{
XmlNode quantityNode = parentNode.CreateChildElement("Quantity");
ss << m_quantity;
quantityNode.SetText(ss.str());
ss.str("");
}
if(m_itemsHasBeenSet)
{
XmlNode itemsParentNode = parentNode.CreateChildElement("Items");
for(const auto& item : m_items)
{
XmlNode itemsNode = itemsParentNode.CreateChildElement("CachePolicySummary");
item.AddToNode(itemsNode);
}
}
}
} // namespace Model
} // namespace CloudFront
} // namespace Aws

View File

@@ -0,0 +1,84 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/CachePolicyQueryStringBehavior.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 CloudFront
{
namespace Model
{
namespace CachePolicyQueryStringBehaviorMapper
{
static const int none_HASH = HashingUtils::HashString("none");
static const int whitelist_HASH = HashingUtils::HashString("whitelist");
static const int allExcept_HASH = HashingUtils::HashString("allExcept");
static const int all_HASH = HashingUtils::HashString("all");
CachePolicyQueryStringBehavior GetCachePolicyQueryStringBehaviorForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == none_HASH)
{
return CachePolicyQueryStringBehavior::none;
}
else if (hashCode == whitelist_HASH)
{
return CachePolicyQueryStringBehavior::whitelist;
}
else if (hashCode == allExcept_HASH)
{
return CachePolicyQueryStringBehavior::allExcept;
}
else if (hashCode == all_HASH)
{
return CachePolicyQueryStringBehavior::all;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<CachePolicyQueryStringBehavior>(hashCode);
}
return CachePolicyQueryStringBehavior::NOT_SET;
}
Aws::String GetNameForCachePolicyQueryStringBehavior(CachePolicyQueryStringBehavior enumValue)
{
switch(enumValue)
{
case CachePolicyQueryStringBehavior::none:
return "none";
case CachePolicyQueryStringBehavior::whitelist:
return "whitelist";
case CachePolicyQueryStringBehavior::allExcept:
return "allExcept";
case CachePolicyQueryStringBehavior::all:
return "all";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace CachePolicyQueryStringBehaviorMapper
} // namespace Model
} // namespace CloudFront
} // namespace Aws

View File

@@ -0,0 +1,80 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/CachePolicyQueryStringsConfig.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudFront
{
namespace Model
{
CachePolicyQueryStringsConfig::CachePolicyQueryStringsConfig() :
m_queryStringBehavior(CachePolicyQueryStringBehavior::NOT_SET),
m_queryStringBehaviorHasBeenSet(false),
m_queryStringsHasBeenSet(false)
{
}
CachePolicyQueryStringsConfig::CachePolicyQueryStringsConfig(const XmlNode& xmlNode) :
m_queryStringBehavior(CachePolicyQueryStringBehavior::NOT_SET),
m_queryStringBehaviorHasBeenSet(false),
m_queryStringsHasBeenSet(false)
{
*this = xmlNode;
}
CachePolicyQueryStringsConfig& CachePolicyQueryStringsConfig::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode queryStringBehaviorNode = resultNode.FirstChild("QueryStringBehavior");
if(!queryStringBehaviorNode.IsNull())
{
m_queryStringBehavior = CachePolicyQueryStringBehaviorMapper::GetCachePolicyQueryStringBehaviorForName(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(queryStringBehaviorNode.GetText()).c_str()).c_str());
m_queryStringBehaviorHasBeenSet = true;
}
XmlNode queryStringsNode = resultNode.FirstChild("QueryStrings");
if(!queryStringsNode.IsNull())
{
m_queryStrings = queryStringsNode;
m_queryStringsHasBeenSet = true;
}
}
return *this;
}
void CachePolicyQueryStringsConfig::AddToNode(XmlNode& parentNode) const
{
Aws::StringStream ss;
if(m_queryStringBehaviorHasBeenSet)
{
XmlNode queryStringBehaviorNode = parentNode.CreateChildElement("QueryStringBehavior");
queryStringBehaviorNode.SetText(CachePolicyQueryStringBehaviorMapper::GetNameForCachePolicyQueryStringBehavior(m_queryStringBehavior));
}
if(m_queryStringsHasBeenSet)
{
XmlNode queryStringsNode = parentNode.CreateChildElement("QueryStrings");
m_queryStrings.AddToNode(queryStringsNode);
}
}
} // namespace Model
} // namespace CloudFront
} // namespace Aws

View File

@@ -0,0 +1,80 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/CachePolicySummary.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudFront
{
namespace Model
{
CachePolicySummary::CachePolicySummary() :
m_type(CachePolicyType::NOT_SET),
m_typeHasBeenSet(false),
m_cachePolicyHasBeenSet(false)
{
}
CachePolicySummary::CachePolicySummary(const XmlNode& xmlNode) :
m_type(CachePolicyType::NOT_SET),
m_typeHasBeenSet(false),
m_cachePolicyHasBeenSet(false)
{
*this = xmlNode;
}
CachePolicySummary& CachePolicySummary::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode typeNode = resultNode.FirstChild("Type");
if(!typeNode.IsNull())
{
m_type = CachePolicyTypeMapper::GetCachePolicyTypeForName(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(typeNode.GetText()).c_str()).c_str());
m_typeHasBeenSet = true;
}
XmlNode cachePolicyNode = resultNode.FirstChild("CachePolicy");
if(!cachePolicyNode.IsNull())
{
m_cachePolicy = cachePolicyNode;
m_cachePolicyHasBeenSet = true;
}
}
return *this;
}
void CachePolicySummary::AddToNode(XmlNode& parentNode) const
{
Aws::StringStream ss;
if(m_typeHasBeenSet)
{
XmlNode typeNode = parentNode.CreateChildElement("Type");
typeNode.SetText(CachePolicyTypeMapper::GetNameForCachePolicyType(m_type));
}
if(m_cachePolicyHasBeenSet)
{
XmlNode cachePolicyNode = parentNode.CreateChildElement("CachePolicy");
m_cachePolicy.AddToNode(cachePolicyNode);
}
}
} // namespace Model
} // namespace CloudFront
} // 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/cloudfront/model/CachePolicyType.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 CloudFront
{
namespace Model
{
namespace CachePolicyTypeMapper
{
static const int managed_HASH = HashingUtils::HashString("managed");
static const int custom_HASH = HashingUtils::HashString("custom");
CachePolicyType GetCachePolicyTypeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == managed_HASH)
{
return CachePolicyType::managed;
}
else if (hashCode == custom_HASH)
{
return CachePolicyType::custom;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<CachePolicyType>(hashCode);
}
return CachePolicyType::NOT_SET;
}
Aws::String GetNameForCachePolicyType(CachePolicyType enumValue)
{
switch(enumValue)
{
case CachePolicyType::managed:
return "managed";
case CachePolicyType::custom:
return "custom";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace CachePolicyTypeMapper
} // namespace Model
} // namespace CloudFront
} // namespace Aws

View File

@@ -0,0 +1,92 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/CachedMethods.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudFront
{
namespace Model
{
CachedMethods::CachedMethods() :
m_quantity(0),
m_quantityHasBeenSet(false),
m_itemsHasBeenSet(false)
{
}
CachedMethods::CachedMethods(const XmlNode& xmlNode) :
m_quantity(0),
m_quantityHasBeenSet(false),
m_itemsHasBeenSet(false)
{
*this = xmlNode;
}
CachedMethods& CachedMethods::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode quantityNode = resultNode.FirstChild("Quantity");
if(!quantityNode.IsNull())
{
m_quantity = StringUtils::ConvertToInt32(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(quantityNode.GetText()).c_str()).c_str());
m_quantityHasBeenSet = true;
}
XmlNode itemsNode = resultNode.FirstChild("Items");
if(!itemsNode.IsNull())
{
XmlNode itemsMember = itemsNode.FirstChild("Method");
while(!itemsMember.IsNull())
{
m_items.push_back(MethodMapper::GetMethodForName(StringUtils::Trim(itemsMember.GetText().c_str())));
itemsMember = itemsMember.NextNode("Method");
}
m_itemsHasBeenSet = true;
}
}
return *this;
}
void CachedMethods::AddToNode(XmlNode& parentNode) const
{
Aws::StringStream ss;
if(m_quantityHasBeenSet)
{
XmlNode quantityNode = parentNode.CreateChildElement("Quantity");
ss << m_quantity;
quantityNode.SetText(ss.str());
ss.str("");
}
if(m_itemsHasBeenSet)
{
XmlNode itemsParentNode = parentNode.CreateChildElement("Items");
for(const auto& item : m_items)
{
XmlNode itemsNode = itemsParentNode.CreateChildElement("Method");
itemsNode.SetText(MethodMapper::GetNameForMethod(item));
}
}
}
} // namespace Model
} // namespace CloudFront
} // namespace Aws

View File

@@ -0,0 +1,92 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/CloudFrontOriginAccessIdentity.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudFront
{
namespace Model
{
CloudFrontOriginAccessIdentity::CloudFrontOriginAccessIdentity() :
m_idHasBeenSet(false),
m_s3CanonicalUserIdHasBeenSet(false),
m_cloudFrontOriginAccessIdentityConfigHasBeenSet(false)
{
}
CloudFrontOriginAccessIdentity::CloudFrontOriginAccessIdentity(const XmlNode& xmlNode) :
m_idHasBeenSet(false),
m_s3CanonicalUserIdHasBeenSet(false),
m_cloudFrontOriginAccessIdentityConfigHasBeenSet(false)
{
*this = xmlNode;
}
CloudFrontOriginAccessIdentity& CloudFrontOriginAccessIdentity::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode idNode = resultNode.FirstChild("Id");
if(!idNode.IsNull())
{
m_id = Aws::Utils::Xml::DecodeEscapedXmlText(idNode.GetText());
m_idHasBeenSet = true;
}
XmlNode s3CanonicalUserIdNode = resultNode.FirstChild("S3CanonicalUserId");
if(!s3CanonicalUserIdNode.IsNull())
{
m_s3CanonicalUserId = Aws::Utils::Xml::DecodeEscapedXmlText(s3CanonicalUserIdNode.GetText());
m_s3CanonicalUserIdHasBeenSet = true;
}
XmlNode cloudFrontOriginAccessIdentityConfigNode = resultNode.FirstChild("CloudFrontOriginAccessIdentityConfig");
if(!cloudFrontOriginAccessIdentityConfigNode.IsNull())
{
m_cloudFrontOriginAccessIdentityConfig = cloudFrontOriginAccessIdentityConfigNode;
m_cloudFrontOriginAccessIdentityConfigHasBeenSet = true;
}
}
return *this;
}
void CloudFrontOriginAccessIdentity::AddToNode(XmlNode& parentNode) const
{
Aws::StringStream ss;
if(m_idHasBeenSet)
{
XmlNode idNode = parentNode.CreateChildElement("Id");
idNode.SetText(m_id);
}
if(m_s3CanonicalUserIdHasBeenSet)
{
XmlNode s3CanonicalUserIdNode = parentNode.CreateChildElement("S3CanonicalUserId");
s3CanonicalUserIdNode.SetText(m_s3CanonicalUserId);
}
if(m_cloudFrontOriginAccessIdentityConfigHasBeenSet)
{
XmlNode cloudFrontOriginAccessIdentityConfigNode = parentNode.CreateChildElement("CloudFrontOriginAccessIdentityConfig");
m_cloudFrontOriginAccessIdentityConfig.AddToNode(cloudFrontOriginAccessIdentityConfigNode);
}
}
} // namespace Model
} // namespace CloudFront
} // namespace Aws

View File

@@ -0,0 +1,78 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/CloudFrontOriginAccessIdentityConfig.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudFront
{
namespace Model
{
CloudFrontOriginAccessIdentityConfig::CloudFrontOriginAccessIdentityConfig() :
m_callerReferenceHasBeenSet(false),
m_commentHasBeenSet(false)
{
}
CloudFrontOriginAccessIdentityConfig::CloudFrontOriginAccessIdentityConfig(const XmlNode& xmlNode) :
m_callerReferenceHasBeenSet(false),
m_commentHasBeenSet(false)
{
*this = xmlNode;
}
CloudFrontOriginAccessIdentityConfig& CloudFrontOriginAccessIdentityConfig::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode callerReferenceNode = resultNode.FirstChild("CallerReference");
if(!callerReferenceNode.IsNull())
{
m_callerReference = Aws::Utils::Xml::DecodeEscapedXmlText(callerReferenceNode.GetText());
m_callerReferenceHasBeenSet = true;
}
XmlNode commentNode = resultNode.FirstChild("Comment");
if(!commentNode.IsNull())
{
m_comment = Aws::Utils::Xml::DecodeEscapedXmlText(commentNode.GetText());
m_commentHasBeenSet = true;
}
}
return *this;
}
void CloudFrontOriginAccessIdentityConfig::AddToNode(XmlNode& parentNode) const
{
Aws::StringStream ss;
if(m_callerReferenceHasBeenSet)
{
XmlNode callerReferenceNode = parentNode.CreateChildElement("CallerReference");
callerReferenceNode.SetText(m_callerReference);
}
if(m_commentHasBeenSet)
{
XmlNode commentNode = parentNode.CreateChildElement("Comment");
commentNode.SetText(m_comment);
}
}
} // namespace Model
} // namespace CloudFront
} // namespace Aws

View File

@@ -0,0 +1,156 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/CloudFrontOriginAccessIdentityList.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudFront
{
namespace Model
{
CloudFrontOriginAccessIdentityList::CloudFrontOriginAccessIdentityList() :
m_markerHasBeenSet(false),
m_nextMarkerHasBeenSet(false),
m_maxItems(0),
m_maxItemsHasBeenSet(false),
m_isTruncated(false),
m_isTruncatedHasBeenSet(false),
m_quantity(0),
m_quantityHasBeenSet(false),
m_itemsHasBeenSet(false)
{
}
CloudFrontOriginAccessIdentityList::CloudFrontOriginAccessIdentityList(const XmlNode& xmlNode) :
m_markerHasBeenSet(false),
m_nextMarkerHasBeenSet(false),
m_maxItems(0),
m_maxItemsHasBeenSet(false),
m_isTruncated(false),
m_isTruncatedHasBeenSet(false),
m_quantity(0),
m_quantityHasBeenSet(false),
m_itemsHasBeenSet(false)
{
*this = xmlNode;
}
CloudFrontOriginAccessIdentityList& CloudFrontOriginAccessIdentityList::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode markerNode = resultNode.FirstChild("Marker");
if(!markerNode.IsNull())
{
m_marker = Aws::Utils::Xml::DecodeEscapedXmlText(markerNode.GetText());
m_markerHasBeenSet = true;
}
XmlNode nextMarkerNode = resultNode.FirstChild("NextMarker");
if(!nextMarkerNode.IsNull())
{
m_nextMarker = Aws::Utils::Xml::DecodeEscapedXmlText(nextMarkerNode.GetText());
m_nextMarkerHasBeenSet = true;
}
XmlNode maxItemsNode = resultNode.FirstChild("MaxItems");
if(!maxItemsNode.IsNull())
{
m_maxItems = StringUtils::ConvertToInt32(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(maxItemsNode.GetText()).c_str()).c_str());
m_maxItemsHasBeenSet = true;
}
XmlNode isTruncatedNode = resultNode.FirstChild("IsTruncated");
if(!isTruncatedNode.IsNull())
{
m_isTruncated = StringUtils::ConvertToBool(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(isTruncatedNode.GetText()).c_str()).c_str());
m_isTruncatedHasBeenSet = true;
}
XmlNode quantityNode = resultNode.FirstChild("Quantity");
if(!quantityNode.IsNull())
{
m_quantity = StringUtils::ConvertToInt32(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(quantityNode.GetText()).c_str()).c_str());
m_quantityHasBeenSet = true;
}
XmlNode itemsNode = resultNode.FirstChild("Items");
if(!itemsNode.IsNull())
{
XmlNode itemsMember = itemsNode.FirstChild("CloudFrontOriginAccessIdentitySummary");
while(!itemsMember.IsNull())
{
m_items.push_back(itemsMember);
itemsMember = itemsMember.NextNode("CloudFrontOriginAccessIdentitySummary");
}
m_itemsHasBeenSet = true;
}
}
return *this;
}
void CloudFrontOriginAccessIdentityList::AddToNode(XmlNode& parentNode) const
{
Aws::StringStream ss;
if(m_markerHasBeenSet)
{
XmlNode markerNode = parentNode.CreateChildElement("Marker");
markerNode.SetText(m_marker);
}
if(m_nextMarkerHasBeenSet)
{
XmlNode nextMarkerNode = parentNode.CreateChildElement("NextMarker");
nextMarkerNode.SetText(m_nextMarker);
}
if(m_maxItemsHasBeenSet)
{
XmlNode maxItemsNode = parentNode.CreateChildElement("MaxItems");
ss << m_maxItems;
maxItemsNode.SetText(ss.str());
ss.str("");
}
if(m_isTruncatedHasBeenSet)
{
XmlNode isTruncatedNode = parentNode.CreateChildElement("IsTruncated");
ss << std::boolalpha << m_isTruncated;
isTruncatedNode.SetText(ss.str());
ss.str("");
}
if(m_quantityHasBeenSet)
{
XmlNode quantityNode = parentNode.CreateChildElement("Quantity");
ss << m_quantity;
quantityNode.SetText(ss.str());
ss.str("");
}
if(m_itemsHasBeenSet)
{
XmlNode itemsParentNode = parentNode.CreateChildElement("Items");
for(const auto& item : m_items)
{
XmlNode itemsNode = itemsParentNode.CreateChildElement("CloudFrontOriginAccessIdentitySummary");
item.AddToNode(itemsNode);
}
}
}
} // namespace Model
} // namespace CloudFront
} // namespace Aws

View File

@@ -0,0 +1,92 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/CloudFrontOriginAccessIdentitySummary.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudFront
{
namespace Model
{
CloudFrontOriginAccessIdentitySummary::CloudFrontOriginAccessIdentitySummary() :
m_idHasBeenSet(false),
m_s3CanonicalUserIdHasBeenSet(false),
m_commentHasBeenSet(false)
{
}
CloudFrontOriginAccessIdentitySummary::CloudFrontOriginAccessIdentitySummary(const XmlNode& xmlNode) :
m_idHasBeenSet(false),
m_s3CanonicalUserIdHasBeenSet(false),
m_commentHasBeenSet(false)
{
*this = xmlNode;
}
CloudFrontOriginAccessIdentitySummary& CloudFrontOriginAccessIdentitySummary::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode idNode = resultNode.FirstChild("Id");
if(!idNode.IsNull())
{
m_id = Aws::Utils::Xml::DecodeEscapedXmlText(idNode.GetText());
m_idHasBeenSet = true;
}
XmlNode s3CanonicalUserIdNode = resultNode.FirstChild("S3CanonicalUserId");
if(!s3CanonicalUserIdNode.IsNull())
{
m_s3CanonicalUserId = Aws::Utils::Xml::DecodeEscapedXmlText(s3CanonicalUserIdNode.GetText());
m_s3CanonicalUserIdHasBeenSet = true;
}
XmlNode commentNode = resultNode.FirstChild("Comment");
if(!commentNode.IsNull())
{
m_comment = Aws::Utils::Xml::DecodeEscapedXmlText(commentNode.GetText());
m_commentHasBeenSet = true;
}
}
return *this;
}
void CloudFrontOriginAccessIdentitySummary::AddToNode(XmlNode& parentNode) const
{
Aws::StringStream ss;
if(m_idHasBeenSet)
{
XmlNode idNode = parentNode.CreateChildElement("Id");
idNode.SetText(m_id);
}
if(m_s3CanonicalUserIdHasBeenSet)
{
XmlNode s3CanonicalUserIdNode = parentNode.CreateChildElement("S3CanonicalUserId");
s3CanonicalUserIdNode.SetText(m_s3CanonicalUserId);
}
if(m_commentHasBeenSet)
{
XmlNode commentNode = parentNode.CreateChildElement("Comment");
commentNode.SetText(m_comment);
}
}
} // namespace Model
} // namespace CloudFront
} // namespace Aws

View File

@@ -0,0 +1,94 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/ContentTypeProfile.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudFront
{
namespace Model
{
ContentTypeProfile::ContentTypeProfile() :
m_format(Format::NOT_SET),
m_formatHasBeenSet(false),
m_profileIdHasBeenSet(false),
m_contentTypeHasBeenSet(false)
{
}
ContentTypeProfile::ContentTypeProfile(const XmlNode& xmlNode) :
m_format(Format::NOT_SET),
m_formatHasBeenSet(false),
m_profileIdHasBeenSet(false),
m_contentTypeHasBeenSet(false)
{
*this = xmlNode;
}
ContentTypeProfile& ContentTypeProfile::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode formatNode = resultNode.FirstChild("Format");
if(!formatNode.IsNull())
{
m_format = FormatMapper::GetFormatForName(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(formatNode.GetText()).c_str()).c_str());
m_formatHasBeenSet = true;
}
XmlNode profileIdNode = resultNode.FirstChild("ProfileId");
if(!profileIdNode.IsNull())
{
m_profileId = Aws::Utils::Xml::DecodeEscapedXmlText(profileIdNode.GetText());
m_profileIdHasBeenSet = true;
}
XmlNode contentTypeNode = resultNode.FirstChild("ContentType");
if(!contentTypeNode.IsNull())
{
m_contentType = Aws::Utils::Xml::DecodeEscapedXmlText(contentTypeNode.GetText());
m_contentTypeHasBeenSet = true;
}
}
return *this;
}
void ContentTypeProfile::AddToNode(XmlNode& parentNode) const
{
Aws::StringStream ss;
if(m_formatHasBeenSet)
{
XmlNode formatNode = parentNode.CreateChildElement("Format");
formatNode.SetText(FormatMapper::GetNameForFormat(m_format));
}
if(m_profileIdHasBeenSet)
{
XmlNode profileIdNode = parentNode.CreateChildElement("ProfileId");
profileIdNode.SetText(m_profileId);
}
if(m_contentTypeHasBeenSet)
{
XmlNode contentTypeNode = parentNode.CreateChildElement("ContentType");
contentTypeNode.SetText(m_contentType);
}
}
} // namespace Model
} // namespace CloudFront
} // namespace Aws

View File

@@ -0,0 +1,82 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/ContentTypeProfileConfig.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudFront
{
namespace Model
{
ContentTypeProfileConfig::ContentTypeProfileConfig() :
m_forwardWhenContentTypeIsUnknown(false),
m_forwardWhenContentTypeIsUnknownHasBeenSet(false),
m_contentTypeProfilesHasBeenSet(false)
{
}
ContentTypeProfileConfig::ContentTypeProfileConfig(const XmlNode& xmlNode) :
m_forwardWhenContentTypeIsUnknown(false),
m_forwardWhenContentTypeIsUnknownHasBeenSet(false),
m_contentTypeProfilesHasBeenSet(false)
{
*this = xmlNode;
}
ContentTypeProfileConfig& ContentTypeProfileConfig::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode forwardWhenContentTypeIsUnknownNode = resultNode.FirstChild("ForwardWhenContentTypeIsUnknown");
if(!forwardWhenContentTypeIsUnknownNode.IsNull())
{
m_forwardWhenContentTypeIsUnknown = StringUtils::ConvertToBool(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(forwardWhenContentTypeIsUnknownNode.GetText()).c_str()).c_str());
m_forwardWhenContentTypeIsUnknownHasBeenSet = true;
}
XmlNode contentTypeProfilesNode = resultNode.FirstChild("ContentTypeProfiles");
if(!contentTypeProfilesNode.IsNull())
{
m_contentTypeProfiles = contentTypeProfilesNode;
m_contentTypeProfilesHasBeenSet = true;
}
}
return *this;
}
void ContentTypeProfileConfig::AddToNode(XmlNode& parentNode) const
{
Aws::StringStream ss;
if(m_forwardWhenContentTypeIsUnknownHasBeenSet)
{
XmlNode forwardWhenContentTypeIsUnknownNode = parentNode.CreateChildElement("ForwardWhenContentTypeIsUnknown");
ss << std::boolalpha << m_forwardWhenContentTypeIsUnknown;
forwardWhenContentTypeIsUnknownNode.SetText(ss.str());
ss.str("");
}
if(m_contentTypeProfilesHasBeenSet)
{
XmlNode contentTypeProfilesNode = parentNode.CreateChildElement("ContentTypeProfiles");
m_contentTypeProfiles.AddToNode(contentTypeProfilesNode);
}
}
} // namespace Model
} // namespace CloudFront
} // namespace Aws

View File

@@ -0,0 +1,92 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/ContentTypeProfiles.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudFront
{
namespace Model
{
ContentTypeProfiles::ContentTypeProfiles() :
m_quantity(0),
m_quantityHasBeenSet(false),
m_itemsHasBeenSet(false)
{
}
ContentTypeProfiles::ContentTypeProfiles(const XmlNode& xmlNode) :
m_quantity(0),
m_quantityHasBeenSet(false),
m_itemsHasBeenSet(false)
{
*this = xmlNode;
}
ContentTypeProfiles& ContentTypeProfiles::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode quantityNode = resultNode.FirstChild("Quantity");
if(!quantityNode.IsNull())
{
m_quantity = StringUtils::ConvertToInt32(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(quantityNode.GetText()).c_str()).c_str());
m_quantityHasBeenSet = true;
}
XmlNode itemsNode = resultNode.FirstChild("Items");
if(!itemsNode.IsNull())
{
XmlNode itemsMember = itemsNode.FirstChild("ContentTypeProfile");
while(!itemsMember.IsNull())
{
m_items.push_back(itemsMember);
itemsMember = itemsMember.NextNode("ContentTypeProfile");
}
m_itemsHasBeenSet = true;
}
}
return *this;
}
void ContentTypeProfiles::AddToNode(XmlNode& parentNode) const
{
Aws::StringStream ss;
if(m_quantityHasBeenSet)
{
XmlNode quantityNode = parentNode.CreateChildElement("Quantity");
ss << m_quantity;
quantityNode.SetText(ss.str());
ss.str("");
}
if(m_itemsHasBeenSet)
{
XmlNode itemsParentNode = parentNode.CreateChildElement("Items");
for(const auto& item : m_items)
{
XmlNode itemsNode = itemsParentNode.CreateChildElement("ContentTypeProfile");
item.AddToNode(itemsNode);
}
}
}
} // namespace Model
} // namespace CloudFront
} // namespace Aws

View File

@@ -0,0 +1,92 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/CookieNames.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudFront
{
namespace Model
{
CookieNames::CookieNames() :
m_quantity(0),
m_quantityHasBeenSet(false),
m_itemsHasBeenSet(false)
{
}
CookieNames::CookieNames(const XmlNode& xmlNode) :
m_quantity(0),
m_quantityHasBeenSet(false),
m_itemsHasBeenSet(false)
{
*this = xmlNode;
}
CookieNames& CookieNames::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode quantityNode = resultNode.FirstChild("Quantity");
if(!quantityNode.IsNull())
{
m_quantity = StringUtils::ConvertToInt32(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(quantityNode.GetText()).c_str()).c_str());
m_quantityHasBeenSet = true;
}
XmlNode itemsNode = resultNode.FirstChild("Items");
if(!itemsNode.IsNull())
{
XmlNode itemsMember = itemsNode.FirstChild("Name");
while(!itemsMember.IsNull())
{
m_items.push_back(itemsMember.GetText());
itemsMember = itemsMember.NextNode("Name");
}
m_itemsHasBeenSet = true;
}
}
return *this;
}
void CookieNames::AddToNode(XmlNode& parentNode) const
{
Aws::StringStream ss;
if(m_quantityHasBeenSet)
{
XmlNode quantityNode = parentNode.CreateChildElement("Quantity");
ss << m_quantity;
quantityNode.SetText(ss.str());
ss.str("");
}
if(m_itemsHasBeenSet)
{
XmlNode itemsParentNode = parentNode.CreateChildElement("Items");
for(const auto& item : m_items)
{
XmlNode itemsNode = itemsParentNode.CreateChildElement("String");
itemsNode.SetText(item);
}
}
}
} // namespace Model
} // namespace CloudFront
} // namespace Aws

View File

@@ -0,0 +1,80 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/CookiePreference.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudFront
{
namespace Model
{
CookiePreference::CookiePreference() :
m_forward(ItemSelection::NOT_SET),
m_forwardHasBeenSet(false),
m_whitelistedNamesHasBeenSet(false)
{
}
CookiePreference::CookiePreference(const XmlNode& xmlNode) :
m_forward(ItemSelection::NOT_SET),
m_forwardHasBeenSet(false),
m_whitelistedNamesHasBeenSet(false)
{
*this = xmlNode;
}
CookiePreference& CookiePreference::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode forwardNode = resultNode.FirstChild("Forward");
if(!forwardNode.IsNull())
{
m_forward = ItemSelectionMapper::GetItemSelectionForName(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(forwardNode.GetText()).c_str()).c_str());
m_forwardHasBeenSet = true;
}
XmlNode whitelistedNamesNode = resultNode.FirstChild("WhitelistedNames");
if(!whitelistedNamesNode.IsNull())
{
m_whitelistedNames = whitelistedNamesNode;
m_whitelistedNamesHasBeenSet = true;
}
}
return *this;
}
void CookiePreference::AddToNode(XmlNode& parentNode) const
{
Aws::StringStream ss;
if(m_forwardHasBeenSet)
{
XmlNode forwardNode = parentNode.CreateChildElement("Forward");
forwardNode.SetText(ItemSelectionMapper::GetNameForItemSelection(m_forward));
}
if(m_whitelistedNamesHasBeenSet)
{
XmlNode whitelistedNamesNode = parentNode.CreateChildElement("WhitelistedNames");
m_whitelistedNames.AddToNode(whitelistedNamesNode);
}
}
} // namespace Model
} // namespace CloudFront
} // namespace Aws

View File

@@ -0,0 +1,37 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/CreateCachePolicy2020_05_31Request.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CloudFront::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
CreateCachePolicy2020_05_31Request::CreateCachePolicy2020_05_31Request() :
m_cachePolicyConfigHasBeenSet(false)
{
}
Aws::String CreateCachePolicy2020_05_31Request::SerializePayload() const
{
XmlDocument payloadDoc = XmlDocument::CreateWithRootNode("CachePolicyConfig");
XmlNode parentNode = payloadDoc.GetRootElement();
parentNode.SetAttributeValue("xmlns", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
m_cachePolicyConfig.AddToNode(parentNode);
if(parentNode.HasChildren())
{
return payloadDoc.ConvertToString();
}
return {};
}

View File

@@ -0,0 +1,52 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/CreateCachePolicy2020_05_31Result.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CloudFront::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
using namespace Aws;
CreateCachePolicy2020_05_31Result::CreateCachePolicy2020_05_31Result()
{
}
CreateCachePolicy2020_05_31Result::CreateCachePolicy2020_05_31Result(const AmazonWebServiceResult<XmlDocument>& result)
{
*this = result;
}
CreateCachePolicy2020_05_31Result& CreateCachePolicy2020_05_31Result::operator =(const AmazonWebServiceResult<XmlDocument>& result)
{
const XmlDocument& xmlDocument = result.GetPayload();
XmlNode resultNode = xmlDocument.GetRootElement();
if(!resultNode.IsNull())
{
m_cachePolicy = resultNode;
}
const auto& headers = result.GetHeaderValueCollection();
const auto& locationIter = headers.find("location");
if(locationIter != headers.end())
{
m_location = locationIter->second;
}
const auto& eTagIter = headers.find("etag");
if(eTagIter != headers.end())
{
m_eTag = eTagIter->second;
}
return *this;
}

View File

@@ -0,0 +1,37 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/CreateCloudFrontOriginAccessIdentity2020_05_31Request.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CloudFront::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
CreateCloudFrontOriginAccessIdentity2020_05_31Request::CreateCloudFrontOriginAccessIdentity2020_05_31Request() :
m_cloudFrontOriginAccessIdentityConfigHasBeenSet(false)
{
}
Aws::String CreateCloudFrontOriginAccessIdentity2020_05_31Request::SerializePayload() const
{
XmlDocument payloadDoc = XmlDocument::CreateWithRootNode("CloudFrontOriginAccessIdentityConfig");
XmlNode parentNode = payloadDoc.GetRootElement();
parentNode.SetAttributeValue("xmlns", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
m_cloudFrontOriginAccessIdentityConfig.AddToNode(parentNode);
if(parentNode.HasChildren())
{
return payloadDoc.ConvertToString();
}
return {};
}

View File

@@ -0,0 +1,52 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/CreateCloudFrontOriginAccessIdentity2020_05_31Result.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CloudFront::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
using namespace Aws;
CreateCloudFrontOriginAccessIdentity2020_05_31Result::CreateCloudFrontOriginAccessIdentity2020_05_31Result()
{
}
CreateCloudFrontOriginAccessIdentity2020_05_31Result::CreateCloudFrontOriginAccessIdentity2020_05_31Result(const AmazonWebServiceResult<XmlDocument>& result)
{
*this = result;
}
CreateCloudFrontOriginAccessIdentity2020_05_31Result& CreateCloudFrontOriginAccessIdentity2020_05_31Result::operator =(const AmazonWebServiceResult<XmlDocument>& result)
{
const XmlDocument& xmlDocument = result.GetPayload();
XmlNode resultNode = xmlDocument.GetRootElement();
if(!resultNode.IsNull())
{
m_cloudFrontOriginAccessIdentity = resultNode;
}
const auto& headers = result.GetHeaderValueCollection();
const auto& locationIter = headers.find("location");
if(locationIter != headers.end())
{
m_location = locationIter->second;
}
const auto& eTagIter = headers.find("etag");
if(eTagIter != headers.end())
{
m_eTag = eTagIter->second;
}
return *this;
}

View File

@@ -0,0 +1,37 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/CreateDistribution2020_05_31Request.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CloudFront::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
CreateDistribution2020_05_31Request::CreateDistribution2020_05_31Request() :
m_distributionConfigHasBeenSet(false)
{
}
Aws::String CreateDistribution2020_05_31Request::SerializePayload() const
{
XmlDocument payloadDoc = XmlDocument::CreateWithRootNode("DistributionConfig");
XmlNode parentNode = payloadDoc.GetRootElement();
parentNode.SetAttributeValue("xmlns", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
m_distributionConfig.AddToNode(parentNode);
if(parentNode.HasChildren())
{
return payloadDoc.ConvertToString();
}
return {};
}

View File

@@ -0,0 +1,52 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/CreateDistribution2020_05_31Result.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CloudFront::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
using namespace Aws;
CreateDistribution2020_05_31Result::CreateDistribution2020_05_31Result()
{
}
CreateDistribution2020_05_31Result::CreateDistribution2020_05_31Result(const AmazonWebServiceResult<XmlDocument>& result)
{
*this = result;
}
CreateDistribution2020_05_31Result& CreateDistribution2020_05_31Result::operator =(const AmazonWebServiceResult<XmlDocument>& result)
{
const XmlDocument& xmlDocument = result.GetPayload();
XmlNode resultNode = xmlDocument.GetRootElement();
if(!resultNode.IsNull())
{
m_distribution = resultNode;
}
const auto& headers = result.GetHeaderValueCollection();
const auto& locationIter = headers.find("location");
if(locationIter != headers.end())
{
m_location = locationIter->second;
}
const auto& eTagIter = headers.find("etag");
if(eTagIter != headers.end())
{
m_eTag = eTagIter->second;
}
return *this;
}

View File

@@ -0,0 +1,37 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/CreateDistributionWithTags2020_05_31Request.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CloudFront::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
CreateDistributionWithTags2020_05_31Request::CreateDistributionWithTags2020_05_31Request() :
m_distributionConfigWithTagsHasBeenSet(false)
{
}
Aws::String CreateDistributionWithTags2020_05_31Request::SerializePayload() const
{
XmlDocument payloadDoc = XmlDocument::CreateWithRootNode("DistributionConfigWithTags");
XmlNode parentNode = payloadDoc.GetRootElement();
parentNode.SetAttributeValue("xmlns", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
m_distributionConfigWithTags.AddToNode(parentNode);
if(parentNode.HasChildren())
{
return payloadDoc.ConvertToString();
}
return {};
}

View File

@@ -0,0 +1,52 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/CreateDistributionWithTags2020_05_31Result.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CloudFront::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
using namespace Aws;
CreateDistributionWithTags2020_05_31Result::CreateDistributionWithTags2020_05_31Result()
{
}
CreateDistributionWithTags2020_05_31Result::CreateDistributionWithTags2020_05_31Result(const AmazonWebServiceResult<XmlDocument>& result)
{
*this = result;
}
CreateDistributionWithTags2020_05_31Result& CreateDistributionWithTags2020_05_31Result::operator =(const AmazonWebServiceResult<XmlDocument>& result)
{
const XmlDocument& xmlDocument = result.GetPayload();
XmlNode resultNode = xmlDocument.GetRootElement();
if(!resultNode.IsNull())
{
m_distribution = resultNode;
}
const auto& headers = result.GetHeaderValueCollection();
const auto& locationIter = headers.find("location");
if(locationIter != headers.end())
{
m_location = locationIter->second;
}
const auto& eTagIter = headers.find("etag");
if(eTagIter != headers.end())
{
m_eTag = eTagIter->second;
}
return *this;
}

View File

@@ -0,0 +1,37 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/CreateFieldLevelEncryptionConfig2020_05_31Request.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CloudFront::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
CreateFieldLevelEncryptionConfig2020_05_31Request::CreateFieldLevelEncryptionConfig2020_05_31Request() :
m_fieldLevelEncryptionConfigHasBeenSet(false)
{
}
Aws::String CreateFieldLevelEncryptionConfig2020_05_31Request::SerializePayload() const
{
XmlDocument payloadDoc = XmlDocument::CreateWithRootNode("FieldLevelEncryptionConfig");
XmlNode parentNode = payloadDoc.GetRootElement();
parentNode.SetAttributeValue("xmlns", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
m_fieldLevelEncryptionConfig.AddToNode(parentNode);
if(parentNode.HasChildren())
{
return payloadDoc.ConvertToString();
}
return {};
}

View File

@@ -0,0 +1,52 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/CreateFieldLevelEncryptionConfig2020_05_31Result.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CloudFront::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
using namespace Aws;
CreateFieldLevelEncryptionConfig2020_05_31Result::CreateFieldLevelEncryptionConfig2020_05_31Result()
{
}
CreateFieldLevelEncryptionConfig2020_05_31Result::CreateFieldLevelEncryptionConfig2020_05_31Result(const AmazonWebServiceResult<XmlDocument>& result)
{
*this = result;
}
CreateFieldLevelEncryptionConfig2020_05_31Result& CreateFieldLevelEncryptionConfig2020_05_31Result::operator =(const AmazonWebServiceResult<XmlDocument>& result)
{
const XmlDocument& xmlDocument = result.GetPayload();
XmlNode resultNode = xmlDocument.GetRootElement();
if(!resultNode.IsNull())
{
m_fieldLevelEncryption = resultNode;
}
const auto& headers = result.GetHeaderValueCollection();
const auto& locationIter = headers.find("location");
if(locationIter != headers.end())
{
m_location = locationIter->second;
}
const auto& eTagIter = headers.find("etag");
if(eTagIter != headers.end())
{
m_eTag = eTagIter->second;
}
return *this;
}

View File

@@ -0,0 +1,37 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/CreateFieldLevelEncryptionProfile2020_05_31Request.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CloudFront::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
CreateFieldLevelEncryptionProfile2020_05_31Request::CreateFieldLevelEncryptionProfile2020_05_31Request() :
m_fieldLevelEncryptionProfileConfigHasBeenSet(false)
{
}
Aws::String CreateFieldLevelEncryptionProfile2020_05_31Request::SerializePayload() const
{
XmlDocument payloadDoc = XmlDocument::CreateWithRootNode("FieldLevelEncryptionProfileConfig");
XmlNode parentNode = payloadDoc.GetRootElement();
parentNode.SetAttributeValue("xmlns", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
m_fieldLevelEncryptionProfileConfig.AddToNode(parentNode);
if(parentNode.HasChildren())
{
return payloadDoc.ConvertToString();
}
return {};
}

View File

@@ -0,0 +1,52 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/CreateFieldLevelEncryptionProfile2020_05_31Result.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CloudFront::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
using namespace Aws;
CreateFieldLevelEncryptionProfile2020_05_31Result::CreateFieldLevelEncryptionProfile2020_05_31Result()
{
}
CreateFieldLevelEncryptionProfile2020_05_31Result::CreateFieldLevelEncryptionProfile2020_05_31Result(const AmazonWebServiceResult<XmlDocument>& result)
{
*this = result;
}
CreateFieldLevelEncryptionProfile2020_05_31Result& CreateFieldLevelEncryptionProfile2020_05_31Result::operator =(const AmazonWebServiceResult<XmlDocument>& result)
{
const XmlDocument& xmlDocument = result.GetPayload();
XmlNode resultNode = xmlDocument.GetRootElement();
if(!resultNode.IsNull())
{
m_fieldLevelEncryptionProfile = resultNode;
}
const auto& headers = result.GetHeaderValueCollection();
const auto& locationIter = headers.find("location");
if(locationIter != headers.end())
{
m_location = locationIter->second;
}
const auto& eTagIter = headers.find("etag");
if(eTagIter != headers.end())
{
m_eTag = eTagIter->second;
}
return *this;
}

View File

@@ -0,0 +1,38 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/CreateInvalidation2020_05_31Request.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CloudFront::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
CreateInvalidation2020_05_31Request::CreateInvalidation2020_05_31Request() :
m_distributionIdHasBeenSet(false),
m_invalidationBatchHasBeenSet(false)
{
}
Aws::String CreateInvalidation2020_05_31Request::SerializePayload() const
{
XmlDocument payloadDoc = XmlDocument::CreateWithRootNode("InvalidationBatch");
XmlNode parentNode = payloadDoc.GetRootElement();
parentNode.SetAttributeValue("xmlns", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
m_invalidationBatch.AddToNode(parentNode);
if(parentNode.HasChildren())
{
return payloadDoc.ConvertToString();
}
return {};
}

View File

@@ -0,0 +1,46 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/CreateInvalidation2020_05_31Result.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CloudFront::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
using namespace Aws;
CreateInvalidation2020_05_31Result::CreateInvalidation2020_05_31Result()
{
}
CreateInvalidation2020_05_31Result::CreateInvalidation2020_05_31Result(const AmazonWebServiceResult<XmlDocument>& result)
{
*this = result;
}
CreateInvalidation2020_05_31Result& CreateInvalidation2020_05_31Result::operator =(const AmazonWebServiceResult<XmlDocument>& result)
{
const XmlDocument& xmlDocument = result.GetPayload();
XmlNode resultNode = xmlDocument.GetRootElement();
if(!resultNode.IsNull())
{
m_invalidation = resultNode;
}
const auto& headers = result.GetHeaderValueCollection();
const auto& locationIter = headers.find("location");
if(locationIter != headers.end())
{
m_location = locationIter->second;
}
return *this;
}

View File

@@ -0,0 +1,37 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/CreateOriginRequestPolicy2020_05_31Request.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CloudFront::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
CreateOriginRequestPolicy2020_05_31Request::CreateOriginRequestPolicy2020_05_31Request() :
m_originRequestPolicyConfigHasBeenSet(false)
{
}
Aws::String CreateOriginRequestPolicy2020_05_31Request::SerializePayload() const
{
XmlDocument payloadDoc = XmlDocument::CreateWithRootNode("OriginRequestPolicyConfig");
XmlNode parentNode = payloadDoc.GetRootElement();
parentNode.SetAttributeValue("xmlns", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
m_originRequestPolicyConfig.AddToNode(parentNode);
if(parentNode.HasChildren())
{
return payloadDoc.ConvertToString();
}
return {};
}

View File

@@ -0,0 +1,52 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/CreateOriginRequestPolicy2020_05_31Result.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CloudFront::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
using namespace Aws;
CreateOriginRequestPolicy2020_05_31Result::CreateOriginRequestPolicy2020_05_31Result()
{
}
CreateOriginRequestPolicy2020_05_31Result::CreateOriginRequestPolicy2020_05_31Result(const AmazonWebServiceResult<XmlDocument>& result)
{
*this = result;
}
CreateOriginRequestPolicy2020_05_31Result& CreateOriginRequestPolicy2020_05_31Result::operator =(const AmazonWebServiceResult<XmlDocument>& result)
{
const XmlDocument& xmlDocument = result.GetPayload();
XmlNode resultNode = xmlDocument.GetRootElement();
if(!resultNode.IsNull())
{
m_originRequestPolicy = resultNode;
}
const auto& headers = result.GetHeaderValueCollection();
const auto& locationIter = headers.find("location");
if(locationIter != headers.end())
{
m_location = locationIter->second;
}
const auto& eTagIter = headers.find("etag");
if(eTagIter != headers.end())
{
m_eTag = eTagIter->second;
}
return *this;
}

View File

@@ -0,0 +1,37 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/CreatePublicKey2020_05_31Request.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CloudFront::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
CreatePublicKey2020_05_31Request::CreatePublicKey2020_05_31Request() :
m_publicKeyConfigHasBeenSet(false)
{
}
Aws::String CreatePublicKey2020_05_31Request::SerializePayload() const
{
XmlDocument payloadDoc = XmlDocument::CreateWithRootNode("PublicKeyConfig");
XmlNode parentNode = payloadDoc.GetRootElement();
parentNode.SetAttributeValue("xmlns", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
m_publicKeyConfig.AddToNode(parentNode);
if(parentNode.HasChildren())
{
return payloadDoc.ConvertToString();
}
return {};
}

View File

@@ -0,0 +1,52 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/CreatePublicKey2020_05_31Result.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CloudFront::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
using namespace Aws;
CreatePublicKey2020_05_31Result::CreatePublicKey2020_05_31Result()
{
}
CreatePublicKey2020_05_31Result::CreatePublicKey2020_05_31Result(const AmazonWebServiceResult<XmlDocument>& result)
{
*this = result;
}
CreatePublicKey2020_05_31Result& CreatePublicKey2020_05_31Result::operator =(const AmazonWebServiceResult<XmlDocument>& result)
{
const XmlDocument& xmlDocument = result.GetPayload();
XmlNode resultNode = xmlDocument.GetRootElement();
if(!resultNode.IsNull())
{
m_publicKey = resultNode;
}
const auto& headers = result.GetHeaderValueCollection();
const auto& locationIter = headers.find("location");
if(locationIter != headers.end())
{
m_location = locationIter->second;
}
const auto& eTagIter = headers.find("etag");
if(eTagIter != headers.end())
{
m_eTag = eTagIter->second;
}
return *this;
}

View File

@@ -0,0 +1,37 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/CreateStreamingDistribution2020_05_31Request.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CloudFront::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
CreateStreamingDistribution2020_05_31Request::CreateStreamingDistribution2020_05_31Request() :
m_streamingDistributionConfigHasBeenSet(false)
{
}
Aws::String CreateStreamingDistribution2020_05_31Request::SerializePayload() const
{
XmlDocument payloadDoc = XmlDocument::CreateWithRootNode("StreamingDistributionConfig");
XmlNode parentNode = payloadDoc.GetRootElement();
parentNode.SetAttributeValue("xmlns", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
m_streamingDistributionConfig.AddToNode(parentNode);
if(parentNode.HasChildren())
{
return payloadDoc.ConvertToString();
}
return {};
}

View File

@@ -0,0 +1,52 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/CreateStreamingDistribution2020_05_31Result.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CloudFront::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
using namespace Aws;
CreateStreamingDistribution2020_05_31Result::CreateStreamingDistribution2020_05_31Result()
{
}
CreateStreamingDistribution2020_05_31Result::CreateStreamingDistribution2020_05_31Result(const AmazonWebServiceResult<XmlDocument>& result)
{
*this = result;
}
CreateStreamingDistribution2020_05_31Result& CreateStreamingDistribution2020_05_31Result::operator =(const AmazonWebServiceResult<XmlDocument>& result)
{
const XmlDocument& xmlDocument = result.GetPayload();
XmlNode resultNode = xmlDocument.GetRootElement();
if(!resultNode.IsNull())
{
m_streamingDistribution = resultNode;
}
const auto& headers = result.GetHeaderValueCollection();
const auto& locationIter = headers.find("location");
if(locationIter != headers.end())
{
m_location = locationIter->second;
}
const auto& eTagIter = headers.find("etag");
if(eTagIter != headers.end())
{
m_eTag = eTagIter->second;
}
return *this;
}

View File

@@ -0,0 +1,37 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/CreateStreamingDistributionWithTags2020_05_31Request.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CloudFront::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
CreateStreamingDistributionWithTags2020_05_31Request::CreateStreamingDistributionWithTags2020_05_31Request() :
m_streamingDistributionConfigWithTagsHasBeenSet(false)
{
}
Aws::String CreateStreamingDistributionWithTags2020_05_31Request::SerializePayload() const
{
XmlDocument payloadDoc = XmlDocument::CreateWithRootNode("StreamingDistributionConfigWithTags");
XmlNode parentNode = payloadDoc.GetRootElement();
parentNode.SetAttributeValue("xmlns", "http://cloudfront.amazonaws.com/doc/2020-05-31/");
m_streamingDistributionConfigWithTags.AddToNode(parentNode);
if(parentNode.HasChildren())
{
return payloadDoc.ConvertToString();
}
return {};
}

View File

@@ -0,0 +1,52 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/CreateStreamingDistributionWithTags2020_05_31Result.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CloudFront::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
using namespace Aws;
CreateStreamingDistributionWithTags2020_05_31Result::CreateStreamingDistributionWithTags2020_05_31Result()
{
}
CreateStreamingDistributionWithTags2020_05_31Result::CreateStreamingDistributionWithTags2020_05_31Result(const AmazonWebServiceResult<XmlDocument>& result)
{
*this = result;
}
CreateStreamingDistributionWithTags2020_05_31Result& CreateStreamingDistributionWithTags2020_05_31Result::operator =(const AmazonWebServiceResult<XmlDocument>& result)
{
const XmlDocument& xmlDocument = result.GetPayload();
XmlNode resultNode = xmlDocument.GetRootElement();
if(!resultNode.IsNull())
{
m_streamingDistribution = resultNode;
}
const auto& headers = result.GetHeaderValueCollection();
const auto& locationIter = headers.find("location");
if(locationIter != headers.end())
{
m_location = locationIter->second;
}
const auto& eTagIter = headers.find("etag");
if(eTagIter != headers.end())
{
m_eTag = eTagIter->second;
}
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/cloudfront/model/CustomErrorResponse.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudFront
{
namespace Model
{
CustomErrorResponse::CustomErrorResponse() :
m_errorCode(0),
m_errorCodeHasBeenSet(false),
m_responsePagePathHasBeenSet(false),
m_responseCodeHasBeenSet(false),
m_errorCachingMinTTL(0),
m_errorCachingMinTTLHasBeenSet(false)
{
}
CustomErrorResponse::CustomErrorResponse(const XmlNode& xmlNode) :
m_errorCode(0),
m_errorCodeHasBeenSet(false),
m_responsePagePathHasBeenSet(false),
m_responseCodeHasBeenSet(false),
m_errorCachingMinTTL(0),
m_errorCachingMinTTLHasBeenSet(false)
{
*this = xmlNode;
}
CustomErrorResponse& CustomErrorResponse::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode errorCodeNode = resultNode.FirstChild("ErrorCode");
if(!errorCodeNode.IsNull())
{
m_errorCode = StringUtils::ConvertToInt32(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(errorCodeNode.GetText()).c_str()).c_str());
m_errorCodeHasBeenSet = true;
}
XmlNode responsePagePathNode = resultNode.FirstChild("ResponsePagePath");
if(!responsePagePathNode.IsNull())
{
m_responsePagePath = Aws::Utils::Xml::DecodeEscapedXmlText(responsePagePathNode.GetText());
m_responsePagePathHasBeenSet = true;
}
XmlNode responseCodeNode = resultNode.FirstChild("ResponseCode");
if(!responseCodeNode.IsNull())
{
m_responseCode = Aws::Utils::Xml::DecodeEscapedXmlText(responseCodeNode.GetText());
m_responseCodeHasBeenSet = true;
}
XmlNode errorCachingMinTTLNode = resultNode.FirstChild("ErrorCachingMinTTL");
if(!errorCachingMinTTLNode.IsNull())
{
m_errorCachingMinTTL = StringUtils::ConvertToInt64(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(errorCachingMinTTLNode.GetText()).c_str()).c_str());
m_errorCachingMinTTLHasBeenSet = true;
}
}
return *this;
}
void CustomErrorResponse::AddToNode(XmlNode& parentNode) const
{
Aws::StringStream ss;
if(m_errorCodeHasBeenSet)
{
XmlNode errorCodeNode = parentNode.CreateChildElement("ErrorCode");
ss << m_errorCode;
errorCodeNode.SetText(ss.str());
ss.str("");
}
if(m_responsePagePathHasBeenSet)
{
XmlNode responsePagePathNode = parentNode.CreateChildElement("ResponsePagePath");
responsePagePathNode.SetText(m_responsePagePath);
}
if(m_responseCodeHasBeenSet)
{
XmlNode responseCodeNode = parentNode.CreateChildElement("ResponseCode");
responseCodeNode.SetText(m_responseCode);
}
if(m_errorCachingMinTTLHasBeenSet)
{
XmlNode errorCachingMinTTLNode = parentNode.CreateChildElement("ErrorCachingMinTTL");
ss << m_errorCachingMinTTL;
errorCachingMinTTLNode.SetText(ss.str());
ss.str("");
}
}
} // namespace Model
} // namespace CloudFront
} // namespace Aws

View File

@@ -0,0 +1,92 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/CustomErrorResponses.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudFront
{
namespace Model
{
CustomErrorResponses::CustomErrorResponses() :
m_quantity(0),
m_quantityHasBeenSet(false),
m_itemsHasBeenSet(false)
{
}
CustomErrorResponses::CustomErrorResponses(const XmlNode& xmlNode) :
m_quantity(0),
m_quantityHasBeenSet(false),
m_itemsHasBeenSet(false)
{
*this = xmlNode;
}
CustomErrorResponses& CustomErrorResponses::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode quantityNode = resultNode.FirstChild("Quantity");
if(!quantityNode.IsNull())
{
m_quantity = StringUtils::ConvertToInt32(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(quantityNode.GetText()).c_str()).c_str());
m_quantityHasBeenSet = true;
}
XmlNode itemsNode = resultNode.FirstChild("Items");
if(!itemsNode.IsNull())
{
XmlNode itemsMember = itemsNode.FirstChild("CustomErrorResponse");
while(!itemsMember.IsNull())
{
m_items.push_back(itemsMember);
itemsMember = itemsMember.NextNode("CustomErrorResponse");
}
m_itemsHasBeenSet = true;
}
}
return *this;
}
void CustomErrorResponses::AddToNode(XmlNode& parentNode) const
{
Aws::StringStream ss;
if(m_quantityHasBeenSet)
{
XmlNode quantityNode = parentNode.CreateChildElement("Quantity");
ss << m_quantity;
quantityNode.SetText(ss.str());
ss.str("");
}
if(m_itemsHasBeenSet)
{
XmlNode itemsParentNode = parentNode.CreateChildElement("Items");
for(const auto& item : m_items)
{
XmlNode itemsNode = itemsParentNode.CreateChildElement("CustomErrorResponse");
item.AddToNode(itemsNode);
}
}
}
} // namespace Model
} // namespace CloudFront
} // namespace Aws

View File

@@ -0,0 +1,92 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/CustomHeaders.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudFront
{
namespace Model
{
CustomHeaders::CustomHeaders() :
m_quantity(0),
m_quantityHasBeenSet(false),
m_itemsHasBeenSet(false)
{
}
CustomHeaders::CustomHeaders(const XmlNode& xmlNode) :
m_quantity(0),
m_quantityHasBeenSet(false),
m_itemsHasBeenSet(false)
{
*this = xmlNode;
}
CustomHeaders& CustomHeaders::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode quantityNode = resultNode.FirstChild("Quantity");
if(!quantityNode.IsNull())
{
m_quantity = StringUtils::ConvertToInt32(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(quantityNode.GetText()).c_str()).c_str());
m_quantityHasBeenSet = true;
}
XmlNode itemsNode = resultNode.FirstChild("Items");
if(!itemsNode.IsNull())
{
XmlNode itemsMember = itemsNode.FirstChild("OriginCustomHeader");
while(!itemsMember.IsNull())
{
m_items.push_back(itemsMember);
itemsMember = itemsMember.NextNode("OriginCustomHeader");
}
m_itemsHasBeenSet = true;
}
}
return *this;
}
void CustomHeaders::AddToNode(XmlNode& parentNode) const
{
Aws::StringStream ss;
if(m_quantityHasBeenSet)
{
XmlNode quantityNode = parentNode.CreateChildElement("Quantity");
ss << m_quantity;
quantityNode.SetText(ss.str());
ss.str("");
}
if(m_itemsHasBeenSet)
{
XmlNode itemsParentNode = parentNode.CreateChildElement("Items");
for(const auto& item : m_items)
{
XmlNode itemsNode = itemsParentNode.CreateChildElement("OriginCustomHeader");
item.AddToNode(itemsNode);
}
}
}
} // namespace Model
} // namespace CloudFront
} // namespace Aws

View File

@@ -0,0 +1,152 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/CustomOriginConfig.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudFront
{
namespace Model
{
CustomOriginConfig::CustomOriginConfig() :
m_hTTPPort(0),
m_hTTPPortHasBeenSet(false),
m_hTTPSPort(0),
m_hTTPSPortHasBeenSet(false),
m_originProtocolPolicy(OriginProtocolPolicy::NOT_SET),
m_originProtocolPolicyHasBeenSet(false),
m_originSslProtocolsHasBeenSet(false),
m_originReadTimeout(0),
m_originReadTimeoutHasBeenSet(false),
m_originKeepaliveTimeout(0),
m_originKeepaliveTimeoutHasBeenSet(false)
{
}
CustomOriginConfig::CustomOriginConfig(const XmlNode& xmlNode) :
m_hTTPPort(0),
m_hTTPPortHasBeenSet(false),
m_hTTPSPort(0),
m_hTTPSPortHasBeenSet(false),
m_originProtocolPolicy(OriginProtocolPolicy::NOT_SET),
m_originProtocolPolicyHasBeenSet(false),
m_originSslProtocolsHasBeenSet(false),
m_originReadTimeout(0),
m_originReadTimeoutHasBeenSet(false),
m_originKeepaliveTimeout(0),
m_originKeepaliveTimeoutHasBeenSet(false)
{
*this = xmlNode;
}
CustomOriginConfig& CustomOriginConfig::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode hTTPPortNode = resultNode.FirstChild("HTTPPort");
if(!hTTPPortNode.IsNull())
{
m_hTTPPort = StringUtils::ConvertToInt32(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(hTTPPortNode.GetText()).c_str()).c_str());
m_hTTPPortHasBeenSet = true;
}
XmlNode hTTPSPortNode = resultNode.FirstChild("HTTPSPort");
if(!hTTPSPortNode.IsNull())
{
m_hTTPSPort = StringUtils::ConvertToInt32(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(hTTPSPortNode.GetText()).c_str()).c_str());
m_hTTPSPortHasBeenSet = true;
}
XmlNode originProtocolPolicyNode = resultNode.FirstChild("OriginProtocolPolicy");
if(!originProtocolPolicyNode.IsNull())
{
m_originProtocolPolicy = OriginProtocolPolicyMapper::GetOriginProtocolPolicyForName(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(originProtocolPolicyNode.GetText()).c_str()).c_str());
m_originProtocolPolicyHasBeenSet = true;
}
XmlNode originSslProtocolsNode = resultNode.FirstChild("OriginSslProtocols");
if(!originSslProtocolsNode.IsNull())
{
m_originSslProtocols = originSslProtocolsNode;
m_originSslProtocolsHasBeenSet = true;
}
XmlNode originReadTimeoutNode = resultNode.FirstChild("OriginReadTimeout");
if(!originReadTimeoutNode.IsNull())
{
m_originReadTimeout = StringUtils::ConvertToInt32(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(originReadTimeoutNode.GetText()).c_str()).c_str());
m_originReadTimeoutHasBeenSet = true;
}
XmlNode originKeepaliveTimeoutNode = resultNode.FirstChild("OriginKeepaliveTimeout");
if(!originKeepaliveTimeoutNode.IsNull())
{
m_originKeepaliveTimeout = StringUtils::ConvertToInt32(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(originKeepaliveTimeoutNode.GetText()).c_str()).c_str());
m_originKeepaliveTimeoutHasBeenSet = true;
}
}
return *this;
}
void CustomOriginConfig::AddToNode(XmlNode& parentNode) const
{
Aws::StringStream ss;
if(m_hTTPPortHasBeenSet)
{
XmlNode hTTPPortNode = parentNode.CreateChildElement("HTTPPort");
ss << m_hTTPPort;
hTTPPortNode.SetText(ss.str());
ss.str("");
}
if(m_hTTPSPortHasBeenSet)
{
XmlNode hTTPSPortNode = parentNode.CreateChildElement("HTTPSPort");
ss << m_hTTPSPort;
hTTPSPortNode.SetText(ss.str());
ss.str("");
}
if(m_originProtocolPolicyHasBeenSet)
{
XmlNode originProtocolPolicyNode = parentNode.CreateChildElement("OriginProtocolPolicy");
originProtocolPolicyNode.SetText(OriginProtocolPolicyMapper::GetNameForOriginProtocolPolicy(m_originProtocolPolicy));
}
if(m_originSslProtocolsHasBeenSet)
{
XmlNode originSslProtocolsNode = parentNode.CreateChildElement("OriginSslProtocols");
m_originSslProtocols.AddToNode(originSslProtocolsNode);
}
if(m_originReadTimeoutHasBeenSet)
{
XmlNode originReadTimeoutNode = parentNode.CreateChildElement("OriginReadTimeout");
ss << m_originReadTimeout;
originReadTimeoutNode.SetText(ss.str());
ss.str("");
}
if(m_originKeepaliveTimeoutHasBeenSet)
{
XmlNode originKeepaliveTimeoutNode = parentNode.CreateChildElement("OriginKeepaliveTimeout");
ss << m_originKeepaliveTimeout;
originKeepaliveTimeoutNode.SetText(ss.str());
ss.str("");
}
}
} // namespace Model
} // namespace CloudFront
} // namespace Aws

View File

@@ -0,0 +1,200 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/DefaultCacheBehavior.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudFront
{
namespace Model
{
DefaultCacheBehavior::DefaultCacheBehavior() :
m_targetOriginIdHasBeenSet(false),
m_trustedSignersHasBeenSet(false),
m_viewerProtocolPolicy(ViewerProtocolPolicy::NOT_SET),
m_viewerProtocolPolicyHasBeenSet(false),
m_allowedMethodsHasBeenSet(false),
m_smoothStreaming(false),
m_smoothStreamingHasBeenSet(false),
m_compress(false),
m_compressHasBeenSet(false),
m_lambdaFunctionAssociationsHasBeenSet(false),
m_fieldLevelEncryptionIdHasBeenSet(false),
m_cachePolicyIdHasBeenSet(false),
m_originRequestPolicyIdHasBeenSet(false)
{
}
DefaultCacheBehavior::DefaultCacheBehavior(const XmlNode& xmlNode) :
m_targetOriginIdHasBeenSet(false),
m_trustedSignersHasBeenSet(false),
m_viewerProtocolPolicy(ViewerProtocolPolicy::NOT_SET),
m_viewerProtocolPolicyHasBeenSet(false),
m_allowedMethodsHasBeenSet(false),
m_smoothStreaming(false),
m_smoothStreamingHasBeenSet(false),
m_compress(false),
m_compressHasBeenSet(false),
m_lambdaFunctionAssociationsHasBeenSet(false),
m_fieldLevelEncryptionIdHasBeenSet(false),
m_cachePolicyIdHasBeenSet(false),
m_originRequestPolicyIdHasBeenSet(false)
{
*this = xmlNode;
}
DefaultCacheBehavior& DefaultCacheBehavior::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode targetOriginIdNode = resultNode.FirstChild("TargetOriginId");
if(!targetOriginIdNode.IsNull())
{
m_targetOriginId = Aws::Utils::Xml::DecodeEscapedXmlText(targetOriginIdNode.GetText());
m_targetOriginIdHasBeenSet = true;
}
XmlNode trustedSignersNode = resultNode.FirstChild("TrustedSigners");
if(!trustedSignersNode.IsNull())
{
m_trustedSigners = trustedSignersNode;
m_trustedSignersHasBeenSet = true;
}
XmlNode viewerProtocolPolicyNode = resultNode.FirstChild("ViewerProtocolPolicy");
if(!viewerProtocolPolicyNode.IsNull())
{
m_viewerProtocolPolicy = ViewerProtocolPolicyMapper::GetViewerProtocolPolicyForName(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(viewerProtocolPolicyNode.GetText()).c_str()).c_str());
m_viewerProtocolPolicyHasBeenSet = true;
}
XmlNode allowedMethodsNode = resultNode.FirstChild("AllowedMethods");
if(!allowedMethodsNode.IsNull())
{
m_allowedMethods = allowedMethodsNode;
m_allowedMethodsHasBeenSet = true;
}
XmlNode smoothStreamingNode = resultNode.FirstChild("SmoothStreaming");
if(!smoothStreamingNode.IsNull())
{
m_smoothStreaming = StringUtils::ConvertToBool(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(smoothStreamingNode.GetText()).c_str()).c_str());
m_smoothStreamingHasBeenSet = true;
}
XmlNode compressNode = resultNode.FirstChild("Compress");
if(!compressNode.IsNull())
{
m_compress = StringUtils::ConvertToBool(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(compressNode.GetText()).c_str()).c_str());
m_compressHasBeenSet = true;
}
XmlNode lambdaFunctionAssociationsNode = resultNode.FirstChild("LambdaFunctionAssociations");
if(!lambdaFunctionAssociationsNode.IsNull())
{
m_lambdaFunctionAssociations = lambdaFunctionAssociationsNode;
m_lambdaFunctionAssociationsHasBeenSet = true;
}
XmlNode fieldLevelEncryptionIdNode = resultNode.FirstChild("FieldLevelEncryptionId");
if(!fieldLevelEncryptionIdNode.IsNull())
{
m_fieldLevelEncryptionId = Aws::Utils::Xml::DecodeEscapedXmlText(fieldLevelEncryptionIdNode.GetText());
m_fieldLevelEncryptionIdHasBeenSet = true;
}
XmlNode cachePolicyIdNode = resultNode.FirstChild("CachePolicyId");
if(!cachePolicyIdNode.IsNull())
{
m_cachePolicyId = Aws::Utils::Xml::DecodeEscapedXmlText(cachePolicyIdNode.GetText());
m_cachePolicyIdHasBeenSet = true;
}
XmlNode originRequestPolicyIdNode = resultNode.FirstChild("OriginRequestPolicyId");
if(!originRequestPolicyIdNode.IsNull())
{
m_originRequestPolicyId = Aws::Utils::Xml::DecodeEscapedXmlText(originRequestPolicyIdNode.GetText());
m_originRequestPolicyIdHasBeenSet = true;
}
}
return *this;
}
void DefaultCacheBehavior::AddToNode(XmlNode& parentNode) const
{
Aws::StringStream ss;
if(m_targetOriginIdHasBeenSet)
{
XmlNode targetOriginIdNode = parentNode.CreateChildElement("TargetOriginId");
targetOriginIdNode.SetText(m_targetOriginId);
}
if(m_trustedSignersHasBeenSet)
{
XmlNode trustedSignersNode = parentNode.CreateChildElement("TrustedSigners");
m_trustedSigners.AddToNode(trustedSignersNode);
}
if(m_viewerProtocolPolicyHasBeenSet)
{
XmlNode viewerProtocolPolicyNode = parentNode.CreateChildElement("ViewerProtocolPolicy");
viewerProtocolPolicyNode.SetText(ViewerProtocolPolicyMapper::GetNameForViewerProtocolPolicy(m_viewerProtocolPolicy));
}
if(m_allowedMethodsHasBeenSet)
{
XmlNode allowedMethodsNode = parentNode.CreateChildElement("AllowedMethods");
m_allowedMethods.AddToNode(allowedMethodsNode);
}
if(m_smoothStreamingHasBeenSet)
{
XmlNode smoothStreamingNode = parentNode.CreateChildElement("SmoothStreaming");
ss << std::boolalpha << m_smoothStreaming;
smoothStreamingNode.SetText(ss.str());
ss.str("");
}
if(m_compressHasBeenSet)
{
XmlNode compressNode = parentNode.CreateChildElement("Compress");
ss << std::boolalpha << m_compress;
compressNode.SetText(ss.str());
ss.str("");
}
if(m_lambdaFunctionAssociationsHasBeenSet)
{
XmlNode lambdaFunctionAssociationsNode = parentNode.CreateChildElement("LambdaFunctionAssociations");
m_lambdaFunctionAssociations.AddToNode(lambdaFunctionAssociationsNode);
}
if(m_fieldLevelEncryptionIdHasBeenSet)
{
XmlNode fieldLevelEncryptionIdNode = parentNode.CreateChildElement("FieldLevelEncryptionId");
fieldLevelEncryptionIdNode.SetText(m_fieldLevelEncryptionId);
}
if(m_cachePolicyIdHasBeenSet)
{
XmlNode cachePolicyIdNode = parentNode.CreateChildElement("CachePolicyId");
cachePolicyIdNode.SetText(m_cachePolicyId);
}
if(m_originRequestPolicyIdHasBeenSet)
{
XmlNode originRequestPolicyIdNode = parentNode.CreateChildElement("OriginRequestPolicyId");
originRequestPolicyIdNode.SetText(m_originRequestPolicyId);
}
}
} // namespace Model
} // namespace CloudFront
} // namespace Aws

View File

@@ -0,0 +1,41 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/DeleteCachePolicy2020_05_31Request.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CloudFront::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
DeleteCachePolicy2020_05_31Request::DeleteCachePolicy2020_05_31Request() :
m_idHasBeenSet(false),
m_ifMatchHasBeenSet(false)
{
}
Aws::String DeleteCachePolicy2020_05_31Request::SerializePayload() const
{
return {};
}
Aws::Http::HeaderValueCollection DeleteCachePolicy2020_05_31Request::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
Aws::StringStream ss;
if(m_ifMatchHasBeenSet)
{
ss << m_ifMatch;
headers.emplace("if-match", ss.str());
ss.str("");
}
return headers;
}

View File

@@ -0,0 +1,41 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/DeleteCloudFrontOriginAccessIdentity2020_05_31Request.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CloudFront::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
DeleteCloudFrontOriginAccessIdentity2020_05_31Request::DeleteCloudFrontOriginAccessIdentity2020_05_31Request() :
m_idHasBeenSet(false),
m_ifMatchHasBeenSet(false)
{
}
Aws::String DeleteCloudFrontOriginAccessIdentity2020_05_31Request::SerializePayload() const
{
return {};
}
Aws::Http::HeaderValueCollection DeleteCloudFrontOriginAccessIdentity2020_05_31Request::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
Aws::StringStream ss;
if(m_ifMatchHasBeenSet)
{
ss << m_ifMatch;
headers.emplace("if-match", ss.str());
ss.str("");
}
return headers;
}

View File

@@ -0,0 +1,41 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/DeleteDistribution2020_05_31Request.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CloudFront::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
DeleteDistribution2020_05_31Request::DeleteDistribution2020_05_31Request() :
m_idHasBeenSet(false),
m_ifMatchHasBeenSet(false)
{
}
Aws::String DeleteDistribution2020_05_31Request::SerializePayload() const
{
return {};
}
Aws::Http::HeaderValueCollection DeleteDistribution2020_05_31Request::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
Aws::StringStream ss;
if(m_ifMatchHasBeenSet)
{
ss << m_ifMatch;
headers.emplace("if-match", ss.str());
ss.str("");
}
return headers;
}

View File

@@ -0,0 +1,41 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/DeleteFieldLevelEncryptionConfig2020_05_31Request.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CloudFront::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
DeleteFieldLevelEncryptionConfig2020_05_31Request::DeleteFieldLevelEncryptionConfig2020_05_31Request() :
m_idHasBeenSet(false),
m_ifMatchHasBeenSet(false)
{
}
Aws::String DeleteFieldLevelEncryptionConfig2020_05_31Request::SerializePayload() const
{
return {};
}
Aws::Http::HeaderValueCollection DeleteFieldLevelEncryptionConfig2020_05_31Request::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
Aws::StringStream ss;
if(m_ifMatchHasBeenSet)
{
ss << m_ifMatch;
headers.emplace("if-match", ss.str());
ss.str("");
}
return headers;
}

View File

@@ -0,0 +1,41 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/DeleteFieldLevelEncryptionProfile2020_05_31Request.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CloudFront::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
DeleteFieldLevelEncryptionProfile2020_05_31Request::DeleteFieldLevelEncryptionProfile2020_05_31Request() :
m_idHasBeenSet(false),
m_ifMatchHasBeenSet(false)
{
}
Aws::String DeleteFieldLevelEncryptionProfile2020_05_31Request::SerializePayload() const
{
return {};
}
Aws::Http::HeaderValueCollection DeleteFieldLevelEncryptionProfile2020_05_31Request::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
Aws::StringStream ss;
if(m_ifMatchHasBeenSet)
{
ss << m_ifMatch;
headers.emplace("if-match", ss.str());
ss.str("");
}
return headers;
}

View File

@@ -0,0 +1,41 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/DeleteOriginRequestPolicy2020_05_31Request.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CloudFront::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
DeleteOriginRequestPolicy2020_05_31Request::DeleteOriginRequestPolicy2020_05_31Request() :
m_idHasBeenSet(false),
m_ifMatchHasBeenSet(false)
{
}
Aws::String DeleteOriginRequestPolicy2020_05_31Request::SerializePayload() const
{
return {};
}
Aws::Http::HeaderValueCollection DeleteOriginRequestPolicy2020_05_31Request::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
Aws::StringStream ss;
if(m_ifMatchHasBeenSet)
{
ss << m_ifMatch;
headers.emplace("if-match", ss.str());
ss.str("");
}
return headers;
}

View File

@@ -0,0 +1,41 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/DeletePublicKey2020_05_31Request.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CloudFront::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
DeletePublicKey2020_05_31Request::DeletePublicKey2020_05_31Request() :
m_idHasBeenSet(false),
m_ifMatchHasBeenSet(false)
{
}
Aws::String DeletePublicKey2020_05_31Request::SerializePayload() const
{
return {};
}
Aws::Http::HeaderValueCollection DeletePublicKey2020_05_31Request::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
Aws::StringStream ss;
if(m_ifMatchHasBeenSet)
{
ss << m_ifMatch;
headers.emplace("if-match", ss.str());
ss.str("");
}
return headers;
}

View File

@@ -0,0 +1,41 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/DeleteStreamingDistribution2020_05_31Request.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CloudFront::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
DeleteStreamingDistribution2020_05_31Request::DeleteStreamingDistribution2020_05_31Request() :
m_idHasBeenSet(false),
m_ifMatchHasBeenSet(false)
{
}
Aws::String DeleteStreamingDistribution2020_05_31Request::SerializePayload() const
{
return {};
}
Aws::Http::HeaderValueCollection DeleteStreamingDistribution2020_05_31Request::GetRequestSpecificHeaders() const
{
Aws::Http::HeaderValueCollection headers;
Aws::StringStream ss;
if(m_ifMatchHasBeenSet)
{
ss << m_ifMatch;
headers.emplace("if-match", ss.str());
ss.str("");
}
return headers;
}

View File

@@ -0,0 +1,190 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/Distribution.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudFront
{
namespace Model
{
Distribution::Distribution() :
m_idHasBeenSet(false),
m_aRNHasBeenSet(false),
m_statusHasBeenSet(false),
m_lastModifiedTimeHasBeenSet(false),
m_inProgressInvalidationBatches(0),
m_inProgressInvalidationBatchesHasBeenSet(false),
m_domainNameHasBeenSet(false),
m_activeTrustedSignersHasBeenSet(false),
m_distributionConfigHasBeenSet(false),
m_aliasICPRecordalsHasBeenSet(false)
{
}
Distribution::Distribution(const XmlNode& xmlNode) :
m_idHasBeenSet(false),
m_aRNHasBeenSet(false),
m_statusHasBeenSet(false),
m_lastModifiedTimeHasBeenSet(false),
m_inProgressInvalidationBatches(0),
m_inProgressInvalidationBatchesHasBeenSet(false),
m_domainNameHasBeenSet(false),
m_activeTrustedSignersHasBeenSet(false),
m_distributionConfigHasBeenSet(false),
m_aliasICPRecordalsHasBeenSet(false)
{
*this = xmlNode;
}
Distribution& Distribution::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode idNode = resultNode.FirstChild("Id");
if(!idNode.IsNull())
{
m_id = Aws::Utils::Xml::DecodeEscapedXmlText(idNode.GetText());
m_idHasBeenSet = true;
}
XmlNode aRNNode = resultNode.FirstChild("ARN");
if(!aRNNode.IsNull())
{
m_aRN = Aws::Utils::Xml::DecodeEscapedXmlText(aRNNode.GetText());
m_aRNHasBeenSet = true;
}
XmlNode statusNode = resultNode.FirstChild("Status");
if(!statusNode.IsNull())
{
m_status = Aws::Utils::Xml::DecodeEscapedXmlText(statusNode.GetText());
m_statusHasBeenSet = true;
}
XmlNode lastModifiedTimeNode = resultNode.FirstChild("LastModifiedTime");
if(!lastModifiedTimeNode.IsNull())
{
m_lastModifiedTime = DateTime(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(lastModifiedTimeNode.GetText()).c_str()).c_str(), DateFormat::ISO_8601);
m_lastModifiedTimeHasBeenSet = true;
}
XmlNode inProgressInvalidationBatchesNode = resultNode.FirstChild("InProgressInvalidationBatches");
if(!inProgressInvalidationBatchesNode.IsNull())
{
m_inProgressInvalidationBatches = StringUtils::ConvertToInt32(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(inProgressInvalidationBatchesNode.GetText()).c_str()).c_str());
m_inProgressInvalidationBatchesHasBeenSet = true;
}
XmlNode domainNameNode = resultNode.FirstChild("DomainName");
if(!domainNameNode.IsNull())
{
m_domainName = Aws::Utils::Xml::DecodeEscapedXmlText(domainNameNode.GetText());
m_domainNameHasBeenSet = true;
}
XmlNode activeTrustedSignersNode = resultNode.FirstChild("ActiveTrustedSigners");
if(!activeTrustedSignersNode.IsNull())
{
m_activeTrustedSigners = activeTrustedSignersNode;
m_activeTrustedSignersHasBeenSet = true;
}
XmlNode distributionConfigNode = resultNode.FirstChild("DistributionConfig");
if(!distributionConfigNode.IsNull())
{
m_distributionConfig = distributionConfigNode;
m_distributionConfigHasBeenSet = true;
}
XmlNode aliasICPRecordalsNode = resultNode.FirstChild("AliasICPRecordals");
if(!aliasICPRecordalsNode.IsNull())
{
XmlNode aliasICPRecordalsMember = aliasICPRecordalsNode.FirstChild("AliasICPRecordal");
while(!aliasICPRecordalsMember.IsNull())
{
m_aliasICPRecordals.push_back(aliasICPRecordalsMember);
aliasICPRecordalsMember = aliasICPRecordalsMember.NextNode("AliasICPRecordal");
}
m_aliasICPRecordalsHasBeenSet = true;
}
}
return *this;
}
void Distribution::AddToNode(XmlNode& parentNode) const
{
Aws::StringStream ss;
if(m_idHasBeenSet)
{
XmlNode idNode = parentNode.CreateChildElement("Id");
idNode.SetText(m_id);
}
if(m_aRNHasBeenSet)
{
XmlNode aRNNode = parentNode.CreateChildElement("ARN");
aRNNode.SetText(m_aRN);
}
if(m_statusHasBeenSet)
{
XmlNode statusNode = parentNode.CreateChildElement("Status");
statusNode.SetText(m_status);
}
if(m_lastModifiedTimeHasBeenSet)
{
XmlNode lastModifiedTimeNode = parentNode.CreateChildElement("LastModifiedTime");
lastModifiedTimeNode.SetText(m_lastModifiedTime.ToGmtString(DateFormat::ISO_8601));
}
if(m_inProgressInvalidationBatchesHasBeenSet)
{
XmlNode inProgressInvalidationBatchesNode = parentNode.CreateChildElement("InProgressInvalidationBatches");
ss << m_inProgressInvalidationBatches;
inProgressInvalidationBatchesNode.SetText(ss.str());
ss.str("");
}
if(m_domainNameHasBeenSet)
{
XmlNode domainNameNode = parentNode.CreateChildElement("DomainName");
domainNameNode.SetText(m_domainName);
}
if(m_activeTrustedSignersHasBeenSet)
{
XmlNode activeTrustedSignersNode = parentNode.CreateChildElement("ActiveTrustedSigners");
m_activeTrustedSigners.AddToNode(activeTrustedSignersNode);
}
if(m_distributionConfigHasBeenSet)
{
XmlNode distributionConfigNode = parentNode.CreateChildElement("DistributionConfig");
m_distributionConfig.AddToNode(distributionConfigNode);
}
if(m_aliasICPRecordalsHasBeenSet)
{
XmlNode aliasICPRecordalsParentNode = parentNode.CreateChildElement("AliasICPRecordals");
for(const auto& item : m_aliasICPRecordals)
{
XmlNode aliasICPRecordalsNode = aliasICPRecordalsParentNode.CreateChildElement("AliasICPRecordal");
item.AddToNode(aliasICPRecordalsNode);
}
}
}
} // namespace Model
} // namespace CloudFront
} // 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/cloudfront/model/DistributionConfig.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudFront
{
namespace Model
{
DistributionConfig::DistributionConfig() :
m_callerReferenceHasBeenSet(false),
m_aliasesHasBeenSet(false),
m_defaultRootObjectHasBeenSet(false),
m_originsHasBeenSet(false),
m_originGroupsHasBeenSet(false),
m_defaultCacheBehaviorHasBeenSet(false),
m_cacheBehaviorsHasBeenSet(false),
m_customErrorResponsesHasBeenSet(false),
m_commentHasBeenSet(false),
m_loggingHasBeenSet(false),
m_priceClass(PriceClass::NOT_SET),
m_priceClassHasBeenSet(false),
m_enabled(false),
m_enabledHasBeenSet(false),
m_viewerCertificateHasBeenSet(false),
m_restrictionsHasBeenSet(false),
m_webACLIdHasBeenSet(false),
m_httpVersion(HttpVersion::NOT_SET),
m_httpVersionHasBeenSet(false),
m_isIPV6Enabled(false),
m_isIPV6EnabledHasBeenSet(false)
{
}
DistributionConfig::DistributionConfig(const XmlNode& xmlNode) :
m_callerReferenceHasBeenSet(false),
m_aliasesHasBeenSet(false),
m_defaultRootObjectHasBeenSet(false),
m_originsHasBeenSet(false),
m_originGroupsHasBeenSet(false),
m_defaultCacheBehaviorHasBeenSet(false),
m_cacheBehaviorsHasBeenSet(false),
m_customErrorResponsesHasBeenSet(false),
m_commentHasBeenSet(false),
m_loggingHasBeenSet(false),
m_priceClass(PriceClass::NOT_SET),
m_priceClassHasBeenSet(false),
m_enabled(false),
m_enabledHasBeenSet(false),
m_viewerCertificateHasBeenSet(false),
m_restrictionsHasBeenSet(false),
m_webACLIdHasBeenSet(false),
m_httpVersion(HttpVersion::NOT_SET),
m_httpVersionHasBeenSet(false),
m_isIPV6Enabled(false),
m_isIPV6EnabledHasBeenSet(false)
{
*this = xmlNode;
}
DistributionConfig& DistributionConfig::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode callerReferenceNode = resultNode.FirstChild("CallerReference");
if(!callerReferenceNode.IsNull())
{
m_callerReference = Aws::Utils::Xml::DecodeEscapedXmlText(callerReferenceNode.GetText());
m_callerReferenceHasBeenSet = true;
}
XmlNode aliasesNode = resultNode.FirstChild("Aliases");
if(!aliasesNode.IsNull())
{
m_aliases = aliasesNode;
m_aliasesHasBeenSet = true;
}
XmlNode defaultRootObjectNode = resultNode.FirstChild("DefaultRootObject");
if(!defaultRootObjectNode.IsNull())
{
m_defaultRootObject = Aws::Utils::Xml::DecodeEscapedXmlText(defaultRootObjectNode.GetText());
m_defaultRootObjectHasBeenSet = true;
}
XmlNode originsNode = resultNode.FirstChild("Origins");
if(!originsNode.IsNull())
{
m_origins = originsNode;
m_originsHasBeenSet = true;
}
XmlNode originGroupsNode = resultNode.FirstChild("OriginGroups");
if(!originGroupsNode.IsNull())
{
m_originGroups = originGroupsNode;
m_originGroupsHasBeenSet = true;
}
XmlNode defaultCacheBehaviorNode = resultNode.FirstChild("DefaultCacheBehavior");
if(!defaultCacheBehaviorNode.IsNull())
{
m_defaultCacheBehavior = defaultCacheBehaviorNode;
m_defaultCacheBehaviorHasBeenSet = true;
}
XmlNode cacheBehaviorsNode = resultNode.FirstChild("CacheBehaviors");
if(!cacheBehaviorsNode.IsNull())
{
m_cacheBehaviors = cacheBehaviorsNode;
m_cacheBehaviorsHasBeenSet = true;
}
XmlNode customErrorResponsesNode = resultNode.FirstChild("CustomErrorResponses");
if(!customErrorResponsesNode.IsNull())
{
m_customErrorResponses = customErrorResponsesNode;
m_customErrorResponsesHasBeenSet = true;
}
XmlNode commentNode = resultNode.FirstChild("Comment");
if(!commentNode.IsNull())
{
m_comment = Aws::Utils::Xml::DecodeEscapedXmlText(commentNode.GetText());
m_commentHasBeenSet = true;
}
XmlNode loggingNode = resultNode.FirstChild("Logging");
if(!loggingNode.IsNull())
{
m_logging = loggingNode;
m_loggingHasBeenSet = true;
}
XmlNode priceClassNode = resultNode.FirstChild("PriceClass");
if(!priceClassNode.IsNull())
{
m_priceClass = PriceClassMapper::GetPriceClassForName(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(priceClassNode.GetText()).c_str()).c_str());
m_priceClassHasBeenSet = true;
}
XmlNode enabledNode = resultNode.FirstChild("Enabled");
if(!enabledNode.IsNull())
{
m_enabled = StringUtils::ConvertToBool(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(enabledNode.GetText()).c_str()).c_str());
m_enabledHasBeenSet = true;
}
XmlNode viewerCertificateNode = resultNode.FirstChild("ViewerCertificate");
if(!viewerCertificateNode.IsNull())
{
m_viewerCertificate = viewerCertificateNode;
m_viewerCertificateHasBeenSet = true;
}
XmlNode restrictionsNode = resultNode.FirstChild("Restrictions");
if(!restrictionsNode.IsNull())
{
m_restrictions = restrictionsNode;
m_restrictionsHasBeenSet = true;
}
XmlNode webACLIdNode = resultNode.FirstChild("WebACLId");
if(!webACLIdNode.IsNull())
{
m_webACLId = Aws::Utils::Xml::DecodeEscapedXmlText(webACLIdNode.GetText());
m_webACLIdHasBeenSet = true;
}
XmlNode httpVersionNode = resultNode.FirstChild("HttpVersion");
if(!httpVersionNode.IsNull())
{
m_httpVersion = HttpVersionMapper::GetHttpVersionForName(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(httpVersionNode.GetText()).c_str()).c_str());
m_httpVersionHasBeenSet = true;
}
XmlNode isIPV6EnabledNode = resultNode.FirstChild("IsIPV6Enabled");
if(!isIPV6EnabledNode.IsNull())
{
m_isIPV6Enabled = StringUtils::ConvertToBool(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(isIPV6EnabledNode.GetText()).c_str()).c_str());
m_isIPV6EnabledHasBeenSet = true;
}
}
return *this;
}
void DistributionConfig::AddToNode(XmlNode& parentNode) const
{
Aws::StringStream ss;
if(m_callerReferenceHasBeenSet)
{
XmlNode callerReferenceNode = parentNode.CreateChildElement("CallerReference");
callerReferenceNode.SetText(m_callerReference);
}
if(m_aliasesHasBeenSet)
{
XmlNode aliasesNode = parentNode.CreateChildElement("Aliases");
m_aliases.AddToNode(aliasesNode);
}
if(m_defaultRootObjectHasBeenSet)
{
XmlNode defaultRootObjectNode = parentNode.CreateChildElement("DefaultRootObject");
defaultRootObjectNode.SetText(m_defaultRootObject);
}
if(m_originsHasBeenSet)
{
XmlNode originsNode = parentNode.CreateChildElement("Origins");
m_origins.AddToNode(originsNode);
}
if(m_originGroupsHasBeenSet)
{
XmlNode originGroupsNode = parentNode.CreateChildElement("OriginGroups");
m_originGroups.AddToNode(originGroupsNode);
}
if(m_defaultCacheBehaviorHasBeenSet)
{
XmlNode defaultCacheBehaviorNode = parentNode.CreateChildElement("DefaultCacheBehavior");
m_defaultCacheBehavior.AddToNode(defaultCacheBehaviorNode);
}
if(m_cacheBehaviorsHasBeenSet)
{
XmlNode cacheBehaviorsNode = parentNode.CreateChildElement("CacheBehaviors");
m_cacheBehaviors.AddToNode(cacheBehaviorsNode);
}
if(m_customErrorResponsesHasBeenSet)
{
XmlNode customErrorResponsesNode = parentNode.CreateChildElement("CustomErrorResponses");
m_customErrorResponses.AddToNode(customErrorResponsesNode);
}
if(m_commentHasBeenSet)
{
XmlNode commentNode = parentNode.CreateChildElement("Comment");
commentNode.SetText(m_comment);
}
if(m_loggingHasBeenSet)
{
XmlNode loggingNode = parentNode.CreateChildElement("Logging");
m_logging.AddToNode(loggingNode);
}
if(m_priceClassHasBeenSet)
{
XmlNode priceClassNode = parentNode.CreateChildElement("PriceClass");
priceClassNode.SetText(PriceClassMapper::GetNameForPriceClass(m_priceClass));
}
if(m_enabledHasBeenSet)
{
XmlNode enabledNode = parentNode.CreateChildElement("Enabled");
ss << std::boolalpha << m_enabled;
enabledNode.SetText(ss.str());
ss.str("");
}
if(m_viewerCertificateHasBeenSet)
{
XmlNode viewerCertificateNode = parentNode.CreateChildElement("ViewerCertificate");
m_viewerCertificate.AddToNode(viewerCertificateNode);
}
if(m_restrictionsHasBeenSet)
{
XmlNode restrictionsNode = parentNode.CreateChildElement("Restrictions");
m_restrictions.AddToNode(restrictionsNode);
}
if(m_webACLIdHasBeenSet)
{
XmlNode webACLIdNode = parentNode.CreateChildElement("WebACLId");
webACLIdNode.SetText(m_webACLId);
}
if(m_httpVersionHasBeenSet)
{
XmlNode httpVersionNode = parentNode.CreateChildElement("HttpVersion");
httpVersionNode.SetText(HttpVersionMapper::GetNameForHttpVersion(m_httpVersion));
}
if(m_isIPV6EnabledHasBeenSet)
{
XmlNode isIPV6EnabledNode = parentNode.CreateChildElement("IsIPV6Enabled");
ss << std::boolalpha << m_isIPV6Enabled;
isIPV6EnabledNode.SetText(ss.str());
ss.str("");
}
}
} // namespace Model
} // namespace CloudFront
} // namespace Aws

View File

@@ -0,0 +1,78 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/DistributionConfigWithTags.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudFront
{
namespace Model
{
DistributionConfigWithTags::DistributionConfigWithTags() :
m_distributionConfigHasBeenSet(false),
m_tagsHasBeenSet(false)
{
}
DistributionConfigWithTags::DistributionConfigWithTags(const XmlNode& xmlNode) :
m_distributionConfigHasBeenSet(false),
m_tagsHasBeenSet(false)
{
*this = xmlNode;
}
DistributionConfigWithTags& DistributionConfigWithTags::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode distributionConfigNode = resultNode.FirstChild("DistributionConfig");
if(!distributionConfigNode.IsNull())
{
m_distributionConfig = distributionConfigNode;
m_distributionConfigHasBeenSet = true;
}
XmlNode tagsNode = resultNode.FirstChild("Tags");
if(!tagsNode.IsNull())
{
m_tags = tagsNode;
m_tagsHasBeenSet = true;
}
}
return *this;
}
void DistributionConfigWithTags::AddToNode(XmlNode& parentNode) const
{
Aws::StringStream ss;
if(m_distributionConfigHasBeenSet)
{
XmlNode distributionConfigNode = parentNode.CreateChildElement("DistributionConfig");
m_distributionConfig.AddToNode(distributionConfigNode);
}
if(m_tagsHasBeenSet)
{
XmlNode tagsNode = parentNode.CreateChildElement("Tags");
m_tags.AddToNode(tagsNode);
}
}
} // namespace Model
} // namespace CloudFront
} // namespace Aws

View File

@@ -0,0 +1,156 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/DistributionIdList.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudFront
{
namespace Model
{
DistributionIdList::DistributionIdList() :
m_markerHasBeenSet(false),
m_nextMarkerHasBeenSet(false),
m_maxItems(0),
m_maxItemsHasBeenSet(false),
m_isTruncated(false),
m_isTruncatedHasBeenSet(false),
m_quantity(0),
m_quantityHasBeenSet(false),
m_itemsHasBeenSet(false)
{
}
DistributionIdList::DistributionIdList(const XmlNode& xmlNode) :
m_markerHasBeenSet(false),
m_nextMarkerHasBeenSet(false),
m_maxItems(0),
m_maxItemsHasBeenSet(false),
m_isTruncated(false),
m_isTruncatedHasBeenSet(false),
m_quantity(0),
m_quantityHasBeenSet(false),
m_itemsHasBeenSet(false)
{
*this = xmlNode;
}
DistributionIdList& DistributionIdList::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode markerNode = resultNode.FirstChild("Marker");
if(!markerNode.IsNull())
{
m_marker = Aws::Utils::Xml::DecodeEscapedXmlText(markerNode.GetText());
m_markerHasBeenSet = true;
}
XmlNode nextMarkerNode = resultNode.FirstChild("NextMarker");
if(!nextMarkerNode.IsNull())
{
m_nextMarker = Aws::Utils::Xml::DecodeEscapedXmlText(nextMarkerNode.GetText());
m_nextMarkerHasBeenSet = true;
}
XmlNode maxItemsNode = resultNode.FirstChild("MaxItems");
if(!maxItemsNode.IsNull())
{
m_maxItems = StringUtils::ConvertToInt32(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(maxItemsNode.GetText()).c_str()).c_str());
m_maxItemsHasBeenSet = true;
}
XmlNode isTruncatedNode = resultNode.FirstChild("IsTruncated");
if(!isTruncatedNode.IsNull())
{
m_isTruncated = StringUtils::ConvertToBool(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(isTruncatedNode.GetText()).c_str()).c_str());
m_isTruncatedHasBeenSet = true;
}
XmlNode quantityNode = resultNode.FirstChild("Quantity");
if(!quantityNode.IsNull())
{
m_quantity = StringUtils::ConvertToInt32(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(quantityNode.GetText()).c_str()).c_str());
m_quantityHasBeenSet = true;
}
XmlNode itemsNode = resultNode.FirstChild("Items");
if(!itemsNode.IsNull())
{
XmlNode itemsMember = itemsNode.FirstChild("DistributionId");
while(!itemsMember.IsNull())
{
m_items.push_back(itemsMember.GetText());
itemsMember = itemsMember.NextNode("DistributionId");
}
m_itemsHasBeenSet = true;
}
}
return *this;
}
void DistributionIdList::AddToNode(XmlNode& parentNode) const
{
Aws::StringStream ss;
if(m_markerHasBeenSet)
{
XmlNode markerNode = parentNode.CreateChildElement("Marker");
markerNode.SetText(m_marker);
}
if(m_nextMarkerHasBeenSet)
{
XmlNode nextMarkerNode = parentNode.CreateChildElement("NextMarker");
nextMarkerNode.SetText(m_nextMarker);
}
if(m_maxItemsHasBeenSet)
{
XmlNode maxItemsNode = parentNode.CreateChildElement("MaxItems");
ss << m_maxItems;
maxItemsNode.SetText(ss.str());
ss.str("");
}
if(m_isTruncatedHasBeenSet)
{
XmlNode isTruncatedNode = parentNode.CreateChildElement("IsTruncated");
ss << std::boolalpha << m_isTruncated;
isTruncatedNode.SetText(ss.str());
ss.str("");
}
if(m_quantityHasBeenSet)
{
XmlNode quantityNode = parentNode.CreateChildElement("Quantity");
ss << m_quantity;
quantityNode.SetText(ss.str());
ss.str("");
}
if(m_itemsHasBeenSet)
{
XmlNode itemsParentNode = parentNode.CreateChildElement("Items");
for(const auto& item : m_items)
{
XmlNode itemsNode = itemsParentNode.CreateChildElement("String");
itemsNode.SetText(item);
}
}
}
} // namespace Model
} // namespace CloudFront
} // namespace Aws

View File

@@ -0,0 +1,156 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/DistributionList.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudFront
{
namespace Model
{
DistributionList::DistributionList() :
m_markerHasBeenSet(false),
m_nextMarkerHasBeenSet(false),
m_maxItems(0),
m_maxItemsHasBeenSet(false),
m_isTruncated(false),
m_isTruncatedHasBeenSet(false),
m_quantity(0),
m_quantityHasBeenSet(false),
m_itemsHasBeenSet(false)
{
}
DistributionList::DistributionList(const XmlNode& xmlNode) :
m_markerHasBeenSet(false),
m_nextMarkerHasBeenSet(false),
m_maxItems(0),
m_maxItemsHasBeenSet(false),
m_isTruncated(false),
m_isTruncatedHasBeenSet(false),
m_quantity(0),
m_quantityHasBeenSet(false),
m_itemsHasBeenSet(false)
{
*this = xmlNode;
}
DistributionList& DistributionList::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode markerNode = resultNode.FirstChild("Marker");
if(!markerNode.IsNull())
{
m_marker = Aws::Utils::Xml::DecodeEscapedXmlText(markerNode.GetText());
m_markerHasBeenSet = true;
}
XmlNode nextMarkerNode = resultNode.FirstChild("NextMarker");
if(!nextMarkerNode.IsNull())
{
m_nextMarker = Aws::Utils::Xml::DecodeEscapedXmlText(nextMarkerNode.GetText());
m_nextMarkerHasBeenSet = true;
}
XmlNode maxItemsNode = resultNode.FirstChild("MaxItems");
if(!maxItemsNode.IsNull())
{
m_maxItems = StringUtils::ConvertToInt32(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(maxItemsNode.GetText()).c_str()).c_str());
m_maxItemsHasBeenSet = true;
}
XmlNode isTruncatedNode = resultNode.FirstChild("IsTruncated");
if(!isTruncatedNode.IsNull())
{
m_isTruncated = StringUtils::ConvertToBool(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(isTruncatedNode.GetText()).c_str()).c_str());
m_isTruncatedHasBeenSet = true;
}
XmlNode quantityNode = resultNode.FirstChild("Quantity");
if(!quantityNode.IsNull())
{
m_quantity = StringUtils::ConvertToInt32(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(quantityNode.GetText()).c_str()).c_str());
m_quantityHasBeenSet = true;
}
XmlNode itemsNode = resultNode.FirstChild("Items");
if(!itemsNode.IsNull())
{
XmlNode itemsMember = itemsNode.FirstChild("DistributionSummary");
while(!itemsMember.IsNull())
{
m_items.push_back(itemsMember);
itemsMember = itemsMember.NextNode("DistributionSummary");
}
m_itemsHasBeenSet = true;
}
}
return *this;
}
void DistributionList::AddToNode(XmlNode& parentNode) const
{
Aws::StringStream ss;
if(m_markerHasBeenSet)
{
XmlNode markerNode = parentNode.CreateChildElement("Marker");
markerNode.SetText(m_marker);
}
if(m_nextMarkerHasBeenSet)
{
XmlNode nextMarkerNode = parentNode.CreateChildElement("NextMarker");
nextMarkerNode.SetText(m_nextMarker);
}
if(m_maxItemsHasBeenSet)
{
XmlNode maxItemsNode = parentNode.CreateChildElement("MaxItems");
ss << m_maxItems;
maxItemsNode.SetText(ss.str());
ss.str("");
}
if(m_isTruncatedHasBeenSet)
{
XmlNode isTruncatedNode = parentNode.CreateChildElement("IsTruncated");
ss << std::boolalpha << m_isTruncated;
isTruncatedNode.SetText(ss.str());
ss.str("");
}
if(m_quantityHasBeenSet)
{
XmlNode quantityNode = parentNode.CreateChildElement("Quantity");
ss << m_quantity;
quantityNode.SetText(ss.str());
ss.str("");
}
if(m_itemsHasBeenSet)
{
XmlNode itemsParentNode = parentNode.CreateChildElement("Items");
for(const auto& item : m_items)
{
XmlNode itemsNode = itemsParentNode.CreateChildElement("DistributionSummary");
item.AddToNode(itemsNode);
}
}
}
} // namespace Model
} // namespace CloudFront
} // namespace Aws

View File

@@ -0,0 +1,352 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/DistributionSummary.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudFront
{
namespace Model
{
DistributionSummary::DistributionSummary() :
m_idHasBeenSet(false),
m_aRNHasBeenSet(false),
m_statusHasBeenSet(false),
m_lastModifiedTimeHasBeenSet(false),
m_domainNameHasBeenSet(false),
m_aliasesHasBeenSet(false),
m_originsHasBeenSet(false),
m_originGroupsHasBeenSet(false),
m_defaultCacheBehaviorHasBeenSet(false),
m_cacheBehaviorsHasBeenSet(false),
m_customErrorResponsesHasBeenSet(false),
m_commentHasBeenSet(false),
m_priceClass(PriceClass::NOT_SET),
m_priceClassHasBeenSet(false),
m_enabled(false),
m_enabledHasBeenSet(false),
m_viewerCertificateHasBeenSet(false),
m_restrictionsHasBeenSet(false),
m_webACLIdHasBeenSet(false),
m_httpVersion(HttpVersion::NOT_SET),
m_httpVersionHasBeenSet(false),
m_isIPV6Enabled(false),
m_isIPV6EnabledHasBeenSet(false),
m_aliasICPRecordalsHasBeenSet(false)
{
}
DistributionSummary::DistributionSummary(const XmlNode& xmlNode) :
m_idHasBeenSet(false),
m_aRNHasBeenSet(false),
m_statusHasBeenSet(false),
m_lastModifiedTimeHasBeenSet(false),
m_domainNameHasBeenSet(false),
m_aliasesHasBeenSet(false),
m_originsHasBeenSet(false),
m_originGroupsHasBeenSet(false),
m_defaultCacheBehaviorHasBeenSet(false),
m_cacheBehaviorsHasBeenSet(false),
m_customErrorResponsesHasBeenSet(false),
m_commentHasBeenSet(false),
m_priceClass(PriceClass::NOT_SET),
m_priceClassHasBeenSet(false),
m_enabled(false),
m_enabledHasBeenSet(false),
m_viewerCertificateHasBeenSet(false),
m_restrictionsHasBeenSet(false),
m_webACLIdHasBeenSet(false),
m_httpVersion(HttpVersion::NOT_SET),
m_httpVersionHasBeenSet(false),
m_isIPV6Enabled(false),
m_isIPV6EnabledHasBeenSet(false),
m_aliasICPRecordalsHasBeenSet(false)
{
*this = xmlNode;
}
DistributionSummary& DistributionSummary::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode idNode = resultNode.FirstChild("Id");
if(!idNode.IsNull())
{
m_id = Aws::Utils::Xml::DecodeEscapedXmlText(idNode.GetText());
m_idHasBeenSet = true;
}
XmlNode aRNNode = resultNode.FirstChild("ARN");
if(!aRNNode.IsNull())
{
m_aRN = Aws::Utils::Xml::DecodeEscapedXmlText(aRNNode.GetText());
m_aRNHasBeenSet = true;
}
XmlNode statusNode = resultNode.FirstChild("Status");
if(!statusNode.IsNull())
{
m_status = Aws::Utils::Xml::DecodeEscapedXmlText(statusNode.GetText());
m_statusHasBeenSet = true;
}
XmlNode lastModifiedTimeNode = resultNode.FirstChild("LastModifiedTime");
if(!lastModifiedTimeNode.IsNull())
{
m_lastModifiedTime = DateTime(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(lastModifiedTimeNode.GetText()).c_str()).c_str(), DateFormat::ISO_8601);
m_lastModifiedTimeHasBeenSet = true;
}
XmlNode domainNameNode = resultNode.FirstChild("DomainName");
if(!domainNameNode.IsNull())
{
m_domainName = Aws::Utils::Xml::DecodeEscapedXmlText(domainNameNode.GetText());
m_domainNameHasBeenSet = true;
}
XmlNode aliasesNode = resultNode.FirstChild("Aliases");
if(!aliasesNode.IsNull())
{
m_aliases = aliasesNode;
m_aliasesHasBeenSet = true;
}
XmlNode originsNode = resultNode.FirstChild("Origins");
if(!originsNode.IsNull())
{
m_origins = originsNode;
m_originsHasBeenSet = true;
}
XmlNode originGroupsNode = resultNode.FirstChild("OriginGroups");
if(!originGroupsNode.IsNull())
{
m_originGroups = originGroupsNode;
m_originGroupsHasBeenSet = true;
}
XmlNode defaultCacheBehaviorNode = resultNode.FirstChild("DefaultCacheBehavior");
if(!defaultCacheBehaviorNode.IsNull())
{
m_defaultCacheBehavior = defaultCacheBehaviorNode;
m_defaultCacheBehaviorHasBeenSet = true;
}
XmlNode cacheBehaviorsNode = resultNode.FirstChild("CacheBehaviors");
if(!cacheBehaviorsNode.IsNull())
{
m_cacheBehaviors = cacheBehaviorsNode;
m_cacheBehaviorsHasBeenSet = true;
}
XmlNode customErrorResponsesNode = resultNode.FirstChild("CustomErrorResponses");
if(!customErrorResponsesNode.IsNull())
{
m_customErrorResponses = customErrorResponsesNode;
m_customErrorResponsesHasBeenSet = true;
}
XmlNode commentNode = resultNode.FirstChild("Comment");
if(!commentNode.IsNull())
{
m_comment = Aws::Utils::Xml::DecodeEscapedXmlText(commentNode.GetText());
m_commentHasBeenSet = true;
}
XmlNode priceClassNode = resultNode.FirstChild("PriceClass");
if(!priceClassNode.IsNull())
{
m_priceClass = PriceClassMapper::GetPriceClassForName(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(priceClassNode.GetText()).c_str()).c_str());
m_priceClassHasBeenSet = true;
}
XmlNode enabledNode = resultNode.FirstChild("Enabled");
if(!enabledNode.IsNull())
{
m_enabled = StringUtils::ConvertToBool(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(enabledNode.GetText()).c_str()).c_str());
m_enabledHasBeenSet = true;
}
XmlNode viewerCertificateNode = resultNode.FirstChild("ViewerCertificate");
if(!viewerCertificateNode.IsNull())
{
m_viewerCertificate = viewerCertificateNode;
m_viewerCertificateHasBeenSet = true;
}
XmlNode restrictionsNode = resultNode.FirstChild("Restrictions");
if(!restrictionsNode.IsNull())
{
m_restrictions = restrictionsNode;
m_restrictionsHasBeenSet = true;
}
XmlNode webACLIdNode = resultNode.FirstChild("WebACLId");
if(!webACLIdNode.IsNull())
{
m_webACLId = Aws::Utils::Xml::DecodeEscapedXmlText(webACLIdNode.GetText());
m_webACLIdHasBeenSet = true;
}
XmlNode httpVersionNode = resultNode.FirstChild("HttpVersion");
if(!httpVersionNode.IsNull())
{
m_httpVersion = HttpVersionMapper::GetHttpVersionForName(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(httpVersionNode.GetText()).c_str()).c_str());
m_httpVersionHasBeenSet = true;
}
XmlNode isIPV6EnabledNode = resultNode.FirstChild("IsIPV6Enabled");
if(!isIPV6EnabledNode.IsNull())
{
m_isIPV6Enabled = StringUtils::ConvertToBool(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(isIPV6EnabledNode.GetText()).c_str()).c_str());
m_isIPV6EnabledHasBeenSet = true;
}
XmlNode aliasICPRecordalsNode = resultNode.FirstChild("AliasICPRecordals");
if(!aliasICPRecordalsNode.IsNull())
{
XmlNode aliasICPRecordalsMember = aliasICPRecordalsNode.FirstChild("AliasICPRecordal");
while(!aliasICPRecordalsMember.IsNull())
{
m_aliasICPRecordals.push_back(aliasICPRecordalsMember);
aliasICPRecordalsMember = aliasICPRecordalsMember.NextNode("AliasICPRecordal");
}
m_aliasICPRecordalsHasBeenSet = true;
}
}
return *this;
}
void DistributionSummary::AddToNode(XmlNode& parentNode) const
{
Aws::StringStream ss;
if(m_idHasBeenSet)
{
XmlNode idNode = parentNode.CreateChildElement("Id");
idNode.SetText(m_id);
}
if(m_aRNHasBeenSet)
{
XmlNode aRNNode = parentNode.CreateChildElement("ARN");
aRNNode.SetText(m_aRN);
}
if(m_statusHasBeenSet)
{
XmlNode statusNode = parentNode.CreateChildElement("Status");
statusNode.SetText(m_status);
}
if(m_lastModifiedTimeHasBeenSet)
{
XmlNode lastModifiedTimeNode = parentNode.CreateChildElement("LastModifiedTime");
lastModifiedTimeNode.SetText(m_lastModifiedTime.ToGmtString(DateFormat::ISO_8601));
}
if(m_domainNameHasBeenSet)
{
XmlNode domainNameNode = parentNode.CreateChildElement("DomainName");
domainNameNode.SetText(m_domainName);
}
if(m_aliasesHasBeenSet)
{
XmlNode aliasesNode = parentNode.CreateChildElement("Aliases");
m_aliases.AddToNode(aliasesNode);
}
if(m_originsHasBeenSet)
{
XmlNode originsNode = parentNode.CreateChildElement("Origins");
m_origins.AddToNode(originsNode);
}
if(m_originGroupsHasBeenSet)
{
XmlNode originGroupsNode = parentNode.CreateChildElement("OriginGroups");
m_originGroups.AddToNode(originGroupsNode);
}
if(m_defaultCacheBehaviorHasBeenSet)
{
XmlNode defaultCacheBehaviorNode = parentNode.CreateChildElement("DefaultCacheBehavior");
m_defaultCacheBehavior.AddToNode(defaultCacheBehaviorNode);
}
if(m_cacheBehaviorsHasBeenSet)
{
XmlNode cacheBehaviorsNode = parentNode.CreateChildElement("CacheBehaviors");
m_cacheBehaviors.AddToNode(cacheBehaviorsNode);
}
if(m_customErrorResponsesHasBeenSet)
{
XmlNode customErrorResponsesNode = parentNode.CreateChildElement("CustomErrorResponses");
m_customErrorResponses.AddToNode(customErrorResponsesNode);
}
if(m_commentHasBeenSet)
{
XmlNode commentNode = parentNode.CreateChildElement("Comment");
commentNode.SetText(m_comment);
}
if(m_priceClassHasBeenSet)
{
XmlNode priceClassNode = parentNode.CreateChildElement("PriceClass");
priceClassNode.SetText(PriceClassMapper::GetNameForPriceClass(m_priceClass));
}
if(m_enabledHasBeenSet)
{
XmlNode enabledNode = parentNode.CreateChildElement("Enabled");
ss << std::boolalpha << m_enabled;
enabledNode.SetText(ss.str());
ss.str("");
}
if(m_viewerCertificateHasBeenSet)
{
XmlNode viewerCertificateNode = parentNode.CreateChildElement("ViewerCertificate");
m_viewerCertificate.AddToNode(viewerCertificateNode);
}
if(m_restrictionsHasBeenSet)
{
XmlNode restrictionsNode = parentNode.CreateChildElement("Restrictions");
m_restrictions.AddToNode(restrictionsNode);
}
if(m_webACLIdHasBeenSet)
{
XmlNode webACLIdNode = parentNode.CreateChildElement("WebACLId");
webACLIdNode.SetText(m_webACLId);
}
if(m_httpVersionHasBeenSet)
{
XmlNode httpVersionNode = parentNode.CreateChildElement("HttpVersion");
httpVersionNode.SetText(HttpVersionMapper::GetNameForHttpVersion(m_httpVersion));
}
if(m_isIPV6EnabledHasBeenSet)
{
XmlNode isIPV6EnabledNode = parentNode.CreateChildElement("IsIPV6Enabled");
ss << std::boolalpha << m_isIPV6Enabled;
isIPV6EnabledNode.SetText(ss.str());
ss.str("");
}
if(m_aliasICPRecordalsHasBeenSet)
{
XmlNode aliasICPRecordalsParentNode = parentNode.CreateChildElement("AliasICPRecordals");
for(const auto& item : m_aliasICPRecordals)
{
XmlNode aliasICPRecordalsNode = aliasICPRecordalsParentNode.CreateChildElement("AliasICPRecordal");
item.AddToNode(aliasICPRecordalsNode);
}
}
}
} // namespace Model
} // namespace CloudFront
} // namespace Aws

View File

@@ -0,0 +1,92 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/EncryptionEntities.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudFront
{
namespace Model
{
EncryptionEntities::EncryptionEntities() :
m_quantity(0),
m_quantityHasBeenSet(false),
m_itemsHasBeenSet(false)
{
}
EncryptionEntities::EncryptionEntities(const XmlNode& xmlNode) :
m_quantity(0),
m_quantityHasBeenSet(false),
m_itemsHasBeenSet(false)
{
*this = xmlNode;
}
EncryptionEntities& EncryptionEntities::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode quantityNode = resultNode.FirstChild("Quantity");
if(!quantityNode.IsNull())
{
m_quantity = StringUtils::ConvertToInt32(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(quantityNode.GetText()).c_str()).c_str());
m_quantityHasBeenSet = true;
}
XmlNode itemsNode = resultNode.FirstChild("Items");
if(!itemsNode.IsNull())
{
XmlNode itemsMember = itemsNode.FirstChild("EncryptionEntity");
while(!itemsMember.IsNull())
{
m_items.push_back(itemsMember);
itemsMember = itemsMember.NextNode("EncryptionEntity");
}
m_itemsHasBeenSet = true;
}
}
return *this;
}
void EncryptionEntities::AddToNode(XmlNode& parentNode) const
{
Aws::StringStream ss;
if(m_quantityHasBeenSet)
{
XmlNode quantityNode = parentNode.CreateChildElement("Quantity");
ss << m_quantity;
quantityNode.SetText(ss.str());
ss.str("");
}
if(m_itemsHasBeenSet)
{
XmlNode itemsParentNode = parentNode.CreateChildElement("Items");
for(const auto& item : m_items)
{
XmlNode itemsNode = itemsParentNode.CreateChildElement("EncryptionEntity");
item.AddToNode(itemsNode);
}
}
}
} // namespace Model
} // namespace CloudFront
} // namespace Aws

View File

@@ -0,0 +1,92 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/EncryptionEntity.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudFront
{
namespace Model
{
EncryptionEntity::EncryptionEntity() :
m_publicKeyIdHasBeenSet(false),
m_providerIdHasBeenSet(false),
m_fieldPatternsHasBeenSet(false)
{
}
EncryptionEntity::EncryptionEntity(const XmlNode& xmlNode) :
m_publicKeyIdHasBeenSet(false),
m_providerIdHasBeenSet(false),
m_fieldPatternsHasBeenSet(false)
{
*this = xmlNode;
}
EncryptionEntity& EncryptionEntity::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode publicKeyIdNode = resultNode.FirstChild("PublicKeyId");
if(!publicKeyIdNode.IsNull())
{
m_publicKeyId = Aws::Utils::Xml::DecodeEscapedXmlText(publicKeyIdNode.GetText());
m_publicKeyIdHasBeenSet = true;
}
XmlNode providerIdNode = resultNode.FirstChild("ProviderId");
if(!providerIdNode.IsNull())
{
m_providerId = Aws::Utils::Xml::DecodeEscapedXmlText(providerIdNode.GetText());
m_providerIdHasBeenSet = true;
}
XmlNode fieldPatternsNode = resultNode.FirstChild("FieldPatterns");
if(!fieldPatternsNode.IsNull())
{
m_fieldPatterns = fieldPatternsNode;
m_fieldPatternsHasBeenSet = true;
}
}
return *this;
}
void EncryptionEntity::AddToNode(XmlNode& parentNode) const
{
Aws::StringStream ss;
if(m_publicKeyIdHasBeenSet)
{
XmlNode publicKeyIdNode = parentNode.CreateChildElement("PublicKeyId");
publicKeyIdNode.SetText(m_publicKeyId);
}
if(m_providerIdHasBeenSet)
{
XmlNode providerIdNode = parentNode.CreateChildElement("ProviderId");
providerIdNode.SetText(m_providerId);
}
if(m_fieldPatternsHasBeenSet)
{
XmlNode fieldPatternsNode = parentNode.CreateChildElement("FieldPatterns");
m_fieldPatterns.AddToNode(fieldPatternsNode);
}
}
} // namespace Model
} // namespace CloudFront
} // namespace Aws

View File

@@ -0,0 +1,84 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/EventType.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 CloudFront
{
namespace Model
{
namespace EventTypeMapper
{
static const int viewer_request_HASH = HashingUtils::HashString("viewer-request");
static const int viewer_response_HASH = HashingUtils::HashString("viewer-response");
static const int origin_request_HASH = HashingUtils::HashString("origin-request");
static const int origin_response_HASH = HashingUtils::HashString("origin-response");
EventType GetEventTypeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == viewer_request_HASH)
{
return EventType::viewer_request;
}
else if (hashCode == viewer_response_HASH)
{
return EventType::viewer_response;
}
else if (hashCode == origin_request_HASH)
{
return EventType::origin_request;
}
else if (hashCode == origin_response_HASH)
{
return EventType::origin_response;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<EventType>(hashCode);
}
return EventType::NOT_SET;
}
Aws::String GetNameForEventType(EventType enumValue)
{
switch(enumValue)
{
case EventType::viewer_request:
return "viewer-request";
case EventType::viewer_response:
return "viewer-response";
case EventType::origin_request:
return "origin-request";
case EventType::origin_response:
return "origin-response";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace EventTypeMapper
} // namespace Model
} // namespace CloudFront
} // namespace Aws

View File

@@ -0,0 +1,92 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/FieldLevelEncryption.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudFront
{
namespace Model
{
FieldLevelEncryption::FieldLevelEncryption() :
m_idHasBeenSet(false),
m_lastModifiedTimeHasBeenSet(false),
m_fieldLevelEncryptionConfigHasBeenSet(false)
{
}
FieldLevelEncryption::FieldLevelEncryption(const XmlNode& xmlNode) :
m_idHasBeenSet(false),
m_lastModifiedTimeHasBeenSet(false),
m_fieldLevelEncryptionConfigHasBeenSet(false)
{
*this = xmlNode;
}
FieldLevelEncryption& FieldLevelEncryption::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode idNode = resultNode.FirstChild("Id");
if(!idNode.IsNull())
{
m_id = Aws::Utils::Xml::DecodeEscapedXmlText(idNode.GetText());
m_idHasBeenSet = true;
}
XmlNode lastModifiedTimeNode = resultNode.FirstChild("LastModifiedTime");
if(!lastModifiedTimeNode.IsNull())
{
m_lastModifiedTime = DateTime(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(lastModifiedTimeNode.GetText()).c_str()).c_str(), DateFormat::ISO_8601);
m_lastModifiedTimeHasBeenSet = true;
}
XmlNode fieldLevelEncryptionConfigNode = resultNode.FirstChild("FieldLevelEncryptionConfig");
if(!fieldLevelEncryptionConfigNode.IsNull())
{
m_fieldLevelEncryptionConfig = fieldLevelEncryptionConfigNode;
m_fieldLevelEncryptionConfigHasBeenSet = true;
}
}
return *this;
}
void FieldLevelEncryption::AddToNode(XmlNode& parentNode) const
{
Aws::StringStream ss;
if(m_idHasBeenSet)
{
XmlNode idNode = parentNode.CreateChildElement("Id");
idNode.SetText(m_id);
}
if(m_lastModifiedTimeHasBeenSet)
{
XmlNode lastModifiedTimeNode = parentNode.CreateChildElement("LastModifiedTime");
lastModifiedTimeNode.SetText(m_lastModifiedTime.ToGmtString(DateFormat::ISO_8601));
}
if(m_fieldLevelEncryptionConfigHasBeenSet)
{
XmlNode fieldLevelEncryptionConfigNode = parentNode.CreateChildElement("FieldLevelEncryptionConfig");
m_fieldLevelEncryptionConfig.AddToNode(fieldLevelEncryptionConfigNode);
}
}
} // namespace Model
} // namespace CloudFront
} // namespace Aws

View File

@@ -0,0 +1,106 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/FieldLevelEncryptionConfig.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudFront
{
namespace Model
{
FieldLevelEncryptionConfig::FieldLevelEncryptionConfig() :
m_callerReferenceHasBeenSet(false),
m_commentHasBeenSet(false),
m_queryArgProfileConfigHasBeenSet(false),
m_contentTypeProfileConfigHasBeenSet(false)
{
}
FieldLevelEncryptionConfig::FieldLevelEncryptionConfig(const XmlNode& xmlNode) :
m_callerReferenceHasBeenSet(false),
m_commentHasBeenSet(false),
m_queryArgProfileConfigHasBeenSet(false),
m_contentTypeProfileConfigHasBeenSet(false)
{
*this = xmlNode;
}
FieldLevelEncryptionConfig& FieldLevelEncryptionConfig::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode callerReferenceNode = resultNode.FirstChild("CallerReference");
if(!callerReferenceNode.IsNull())
{
m_callerReference = Aws::Utils::Xml::DecodeEscapedXmlText(callerReferenceNode.GetText());
m_callerReferenceHasBeenSet = true;
}
XmlNode commentNode = resultNode.FirstChild("Comment");
if(!commentNode.IsNull())
{
m_comment = Aws::Utils::Xml::DecodeEscapedXmlText(commentNode.GetText());
m_commentHasBeenSet = true;
}
XmlNode queryArgProfileConfigNode = resultNode.FirstChild("QueryArgProfileConfig");
if(!queryArgProfileConfigNode.IsNull())
{
m_queryArgProfileConfig = queryArgProfileConfigNode;
m_queryArgProfileConfigHasBeenSet = true;
}
XmlNode contentTypeProfileConfigNode = resultNode.FirstChild("ContentTypeProfileConfig");
if(!contentTypeProfileConfigNode.IsNull())
{
m_contentTypeProfileConfig = contentTypeProfileConfigNode;
m_contentTypeProfileConfigHasBeenSet = true;
}
}
return *this;
}
void FieldLevelEncryptionConfig::AddToNode(XmlNode& parentNode) const
{
Aws::StringStream ss;
if(m_callerReferenceHasBeenSet)
{
XmlNode callerReferenceNode = parentNode.CreateChildElement("CallerReference");
callerReferenceNode.SetText(m_callerReference);
}
if(m_commentHasBeenSet)
{
XmlNode commentNode = parentNode.CreateChildElement("Comment");
commentNode.SetText(m_comment);
}
if(m_queryArgProfileConfigHasBeenSet)
{
XmlNode queryArgProfileConfigNode = parentNode.CreateChildElement("QueryArgProfileConfig");
m_queryArgProfileConfig.AddToNode(queryArgProfileConfigNode);
}
if(m_contentTypeProfileConfigHasBeenSet)
{
XmlNode contentTypeProfileConfigNode = parentNode.CreateChildElement("ContentTypeProfileConfig");
m_contentTypeProfileConfig.AddToNode(contentTypeProfileConfigNode);
}
}
} // namespace Model
} // namespace CloudFront
} // namespace Aws

View File

@@ -0,0 +1,124 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/FieldLevelEncryptionList.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudFront
{
namespace Model
{
FieldLevelEncryptionList::FieldLevelEncryptionList() :
m_nextMarkerHasBeenSet(false),
m_maxItems(0),
m_maxItemsHasBeenSet(false),
m_quantity(0),
m_quantityHasBeenSet(false),
m_itemsHasBeenSet(false)
{
}
FieldLevelEncryptionList::FieldLevelEncryptionList(const XmlNode& xmlNode) :
m_nextMarkerHasBeenSet(false),
m_maxItems(0),
m_maxItemsHasBeenSet(false),
m_quantity(0),
m_quantityHasBeenSet(false),
m_itemsHasBeenSet(false)
{
*this = xmlNode;
}
FieldLevelEncryptionList& FieldLevelEncryptionList::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode nextMarkerNode = resultNode.FirstChild("NextMarker");
if(!nextMarkerNode.IsNull())
{
m_nextMarker = Aws::Utils::Xml::DecodeEscapedXmlText(nextMarkerNode.GetText());
m_nextMarkerHasBeenSet = true;
}
XmlNode maxItemsNode = resultNode.FirstChild("MaxItems");
if(!maxItemsNode.IsNull())
{
m_maxItems = StringUtils::ConvertToInt32(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(maxItemsNode.GetText()).c_str()).c_str());
m_maxItemsHasBeenSet = true;
}
XmlNode quantityNode = resultNode.FirstChild("Quantity");
if(!quantityNode.IsNull())
{
m_quantity = StringUtils::ConvertToInt32(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(quantityNode.GetText()).c_str()).c_str());
m_quantityHasBeenSet = true;
}
XmlNode itemsNode = resultNode.FirstChild("Items");
if(!itemsNode.IsNull())
{
XmlNode itemsMember = itemsNode.FirstChild("FieldLevelEncryptionSummary");
while(!itemsMember.IsNull())
{
m_items.push_back(itemsMember);
itemsMember = itemsMember.NextNode("FieldLevelEncryptionSummary");
}
m_itemsHasBeenSet = true;
}
}
return *this;
}
void FieldLevelEncryptionList::AddToNode(XmlNode& parentNode) const
{
Aws::StringStream ss;
if(m_nextMarkerHasBeenSet)
{
XmlNode nextMarkerNode = parentNode.CreateChildElement("NextMarker");
nextMarkerNode.SetText(m_nextMarker);
}
if(m_maxItemsHasBeenSet)
{
XmlNode maxItemsNode = parentNode.CreateChildElement("MaxItems");
ss << m_maxItems;
maxItemsNode.SetText(ss.str());
ss.str("");
}
if(m_quantityHasBeenSet)
{
XmlNode quantityNode = parentNode.CreateChildElement("Quantity");
ss << m_quantity;
quantityNode.SetText(ss.str());
ss.str("");
}
if(m_itemsHasBeenSet)
{
XmlNode itemsParentNode = parentNode.CreateChildElement("Items");
for(const auto& item : m_items)
{
XmlNode itemsNode = itemsParentNode.CreateChildElement("FieldLevelEncryptionSummary");
item.AddToNode(itemsNode);
}
}
}
} // namespace Model
} // namespace CloudFront
} // namespace Aws

View File

@@ -0,0 +1,92 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/FieldLevelEncryptionProfile.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudFront
{
namespace Model
{
FieldLevelEncryptionProfile::FieldLevelEncryptionProfile() :
m_idHasBeenSet(false),
m_lastModifiedTimeHasBeenSet(false),
m_fieldLevelEncryptionProfileConfigHasBeenSet(false)
{
}
FieldLevelEncryptionProfile::FieldLevelEncryptionProfile(const XmlNode& xmlNode) :
m_idHasBeenSet(false),
m_lastModifiedTimeHasBeenSet(false),
m_fieldLevelEncryptionProfileConfigHasBeenSet(false)
{
*this = xmlNode;
}
FieldLevelEncryptionProfile& FieldLevelEncryptionProfile::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode idNode = resultNode.FirstChild("Id");
if(!idNode.IsNull())
{
m_id = Aws::Utils::Xml::DecodeEscapedXmlText(idNode.GetText());
m_idHasBeenSet = true;
}
XmlNode lastModifiedTimeNode = resultNode.FirstChild("LastModifiedTime");
if(!lastModifiedTimeNode.IsNull())
{
m_lastModifiedTime = DateTime(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(lastModifiedTimeNode.GetText()).c_str()).c_str(), DateFormat::ISO_8601);
m_lastModifiedTimeHasBeenSet = true;
}
XmlNode fieldLevelEncryptionProfileConfigNode = resultNode.FirstChild("FieldLevelEncryptionProfileConfig");
if(!fieldLevelEncryptionProfileConfigNode.IsNull())
{
m_fieldLevelEncryptionProfileConfig = fieldLevelEncryptionProfileConfigNode;
m_fieldLevelEncryptionProfileConfigHasBeenSet = true;
}
}
return *this;
}
void FieldLevelEncryptionProfile::AddToNode(XmlNode& parentNode) const
{
Aws::StringStream ss;
if(m_idHasBeenSet)
{
XmlNode idNode = parentNode.CreateChildElement("Id");
idNode.SetText(m_id);
}
if(m_lastModifiedTimeHasBeenSet)
{
XmlNode lastModifiedTimeNode = parentNode.CreateChildElement("LastModifiedTime");
lastModifiedTimeNode.SetText(m_lastModifiedTime.ToGmtString(DateFormat::ISO_8601));
}
if(m_fieldLevelEncryptionProfileConfigHasBeenSet)
{
XmlNode fieldLevelEncryptionProfileConfigNode = parentNode.CreateChildElement("FieldLevelEncryptionProfileConfig");
m_fieldLevelEncryptionProfileConfig.AddToNode(fieldLevelEncryptionProfileConfigNode);
}
}
} // namespace Model
} // namespace CloudFront
} // namespace Aws

View File

@@ -0,0 +1,106 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/FieldLevelEncryptionProfileConfig.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudFront
{
namespace Model
{
FieldLevelEncryptionProfileConfig::FieldLevelEncryptionProfileConfig() :
m_nameHasBeenSet(false),
m_callerReferenceHasBeenSet(false),
m_commentHasBeenSet(false),
m_encryptionEntitiesHasBeenSet(false)
{
}
FieldLevelEncryptionProfileConfig::FieldLevelEncryptionProfileConfig(const XmlNode& xmlNode) :
m_nameHasBeenSet(false),
m_callerReferenceHasBeenSet(false),
m_commentHasBeenSet(false),
m_encryptionEntitiesHasBeenSet(false)
{
*this = xmlNode;
}
FieldLevelEncryptionProfileConfig& FieldLevelEncryptionProfileConfig::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode nameNode = resultNode.FirstChild("Name");
if(!nameNode.IsNull())
{
m_name = Aws::Utils::Xml::DecodeEscapedXmlText(nameNode.GetText());
m_nameHasBeenSet = true;
}
XmlNode callerReferenceNode = resultNode.FirstChild("CallerReference");
if(!callerReferenceNode.IsNull())
{
m_callerReference = Aws::Utils::Xml::DecodeEscapedXmlText(callerReferenceNode.GetText());
m_callerReferenceHasBeenSet = true;
}
XmlNode commentNode = resultNode.FirstChild("Comment");
if(!commentNode.IsNull())
{
m_comment = Aws::Utils::Xml::DecodeEscapedXmlText(commentNode.GetText());
m_commentHasBeenSet = true;
}
XmlNode encryptionEntitiesNode = resultNode.FirstChild("EncryptionEntities");
if(!encryptionEntitiesNode.IsNull())
{
m_encryptionEntities = encryptionEntitiesNode;
m_encryptionEntitiesHasBeenSet = true;
}
}
return *this;
}
void FieldLevelEncryptionProfileConfig::AddToNode(XmlNode& parentNode) const
{
Aws::StringStream ss;
if(m_nameHasBeenSet)
{
XmlNode nameNode = parentNode.CreateChildElement("Name");
nameNode.SetText(m_name);
}
if(m_callerReferenceHasBeenSet)
{
XmlNode callerReferenceNode = parentNode.CreateChildElement("CallerReference");
callerReferenceNode.SetText(m_callerReference);
}
if(m_commentHasBeenSet)
{
XmlNode commentNode = parentNode.CreateChildElement("Comment");
commentNode.SetText(m_comment);
}
if(m_encryptionEntitiesHasBeenSet)
{
XmlNode encryptionEntitiesNode = parentNode.CreateChildElement("EncryptionEntities");
m_encryptionEntities.AddToNode(encryptionEntitiesNode);
}
}
} // namespace Model
} // namespace CloudFront
} // namespace Aws

View File

@@ -0,0 +1,124 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/FieldLevelEncryptionProfileList.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudFront
{
namespace Model
{
FieldLevelEncryptionProfileList::FieldLevelEncryptionProfileList() :
m_nextMarkerHasBeenSet(false),
m_maxItems(0),
m_maxItemsHasBeenSet(false),
m_quantity(0),
m_quantityHasBeenSet(false),
m_itemsHasBeenSet(false)
{
}
FieldLevelEncryptionProfileList::FieldLevelEncryptionProfileList(const XmlNode& xmlNode) :
m_nextMarkerHasBeenSet(false),
m_maxItems(0),
m_maxItemsHasBeenSet(false),
m_quantity(0),
m_quantityHasBeenSet(false),
m_itemsHasBeenSet(false)
{
*this = xmlNode;
}
FieldLevelEncryptionProfileList& FieldLevelEncryptionProfileList::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode nextMarkerNode = resultNode.FirstChild("NextMarker");
if(!nextMarkerNode.IsNull())
{
m_nextMarker = Aws::Utils::Xml::DecodeEscapedXmlText(nextMarkerNode.GetText());
m_nextMarkerHasBeenSet = true;
}
XmlNode maxItemsNode = resultNode.FirstChild("MaxItems");
if(!maxItemsNode.IsNull())
{
m_maxItems = StringUtils::ConvertToInt32(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(maxItemsNode.GetText()).c_str()).c_str());
m_maxItemsHasBeenSet = true;
}
XmlNode quantityNode = resultNode.FirstChild("Quantity");
if(!quantityNode.IsNull())
{
m_quantity = StringUtils::ConvertToInt32(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(quantityNode.GetText()).c_str()).c_str());
m_quantityHasBeenSet = true;
}
XmlNode itemsNode = resultNode.FirstChild("Items");
if(!itemsNode.IsNull())
{
XmlNode itemsMember = itemsNode.FirstChild("FieldLevelEncryptionProfileSummary");
while(!itemsMember.IsNull())
{
m_items.push_back(itemsMember);
itemsMember = itemsMember.NextNode("FieldLevelEncryptionProfileSummary");
}
m_itemsHasBeenSet = true;
}
}
return *this;
}
void FieldLevelEncryptionProfileList::AddToNode(XmlNode& parentNode) const
{
Aws::StringStream ss;
if(m_nextMarkerHasBeenSet)
{
XmlNode nextMarkerNode = parentNode.CreateChildElement("NextMarker");
nextMarkerNode.SetText(m_nextMarker);
}
if(m_maxItemsHasBeenSet)
{
XmlNode maxItemsNode = parentNode.CreateChildElement("MaxItems");
ss << m_maxItems;
maxItemsNode.SetText(ss.str());
ss.str("");
}
if(m_quantityHasBeenSet)
{
XmlNode quantityNode = parentNode.CreateChildElement("Quantity");
ss << m_quantity;
quantityNode.SetText(ss.str());
ss.str("");
}
if(m_itemsHasBeenSet)
{
XmlNode itemsParentNode = parentNode.CreateChildElement("Items");
for(const auto& item : m_items)
{
XmlNode itemsNode = itemsParentNode.CreateChildElement("FieldLevelEncryptionProfileSummary");
item.AddToNode(itemsNode);
}
}
}
} // namespace Model
} // namespace CloudFront
} // namespace Aws

View File

@@ -0,0 +1,120 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/FieldLevelEncryptionProfileSummary.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudFront
{
namespace Model
{
FieldLevelEncryptionProfileSummary::FieldLevelEncryptionProfileSummary() :
m_idHasBeenSet(false),
m_lastModifiedTimeHasBeenSet(false),
m_nameHasBeenSet(false),
m_encryptionEntitiesHasBeenSet(false),
m_commentHasBeenSet(false)
{
}
FieldLevelEncryptionProfileSummary::FieldLevelEncryptionProfileSummary(const XmlNode& xmlNode) :
m_idHasBeenSet(false),
m_lastModifiedTimeHasBeenSet(false),
m_nameHasBeenSet(false),
m_encryptionEntitiesHasBeenSet(false),
m_commentHasBeenSet(false)
{
*this = xmlNode;
}
FieldLevelEncryptionProfileSummary& FieldLevelEncryptionProfileSummary::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode idNode = resultNode.FirstChild("Id");
if(!idNode.IsNull())
{
m_id = Aws::Utils::Xml::DecodeEscapedXmlText(idNode.GetText());
m_idHasBeenSet = true;
}
XmlNode lastModifiedTimeNode = resultNode.FirstChild("LastModifiedTime");
if(!lastModifiedTimeNode.IsNull())
{
m_lastModifiedTime = DateTime(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(lastModifiedTimeNode.GetText()).c_str()).c_str(), DateFormat::ISO_8601);
m_lastModifiedTimeHasBeenSet = true;
}
XmlNode nameNode = resultNode.FirstChild("Name");
if(!nameNode.IsNull())
{
m_name = Aws::Utils::Xml::DecodeEscapedXmlText(nameNode.GetText());
m_nameHasBeenSet = true;
}
XmlNode encryptionEntitiesNode = resultNode.FirstChild("EncryptionEntities");
if(!encryptionEntitiesNode.IsNull())
{
m_encryptionEntities = encryptionEntitiesNode;
m_encryptionEntitiesHasBeenSet = true;
}
XmlNode commentNode = resultNode.FirstChild("Comment");
if(!commentNode.IsNull())
{
m_comment = Aws::Utils::Xml::DecodeEscapedXmlText(commentNode.GetText());
m_commentHasBeenSet = true;
}
}
return *this;
}
void FieldLevelEncryptionProfileSummary::AddToNode(XmlNode& parentNode) const
{
Aws::StringStream ss;
if(m_idHasBeenSet)
{
XmlNode idNode = parentNode.CreateChildElement("Id");
idNode.SetText(m_id);
}
if(m_lastModifiedTimeHasBeenSet)
{
XmlNode lastModifiedTimeNode = parentNode.CreateChildElement("LastModifiedTime");
lastModifiedTimeNode.SetText(m_lastModifiedTime.ToGmtString(DateFormat::ISO_8601));
}
if(m_nameHasBeenSet)
{
XmlNode nameNode = parentNode.CreateChildElement("Name");
nameNode.SetText(m_name);
}
if(m_encryptionEntitiesHasBeenSet)
{
XmlNode encryptionEntitiesNode = parentNode.CreateChildElement("EncryptionEntities");
m_encryptionEntities.AddToNode(encryptionEntitiesNode);
}
if(m_commentHasBeenSet)
{
XmlNode commentNode = parentNode.CreateChildElement("Comment");
commentNode.SetText(m_comment);
}
}
} // namespace Model
} // namespace CloudFront
} // namespace Aws

View File

@@ -0,0 +1,120 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/FieldLevelEncryptionSummary.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudFront
{
namespace Model
{
FieldLevelEncryptionSummary::FieldLevelEncryptionSummary() :
m_idHasBeenSet(false),
m_lastModifiedTimeHasBeenSet(false),
m_commentHasBeenSet(false),
m_queryArgProfileConfigHasBeenSet(false),
m_contentTypeProfileConfigHasBeenSet(false)
{
}
FieldLevelEncryptionSummary::FieldLevelEncryptionSummary(const XmlNode& xmlNode) :
m_idHasBeenSet(false),
m_lastModifiedTimeHasBeenSet(false),
m_commentHasBeenSet(false),
m_queryArgProfileConfigHasBeenSet(false),
m_contentTypeProfileConfigHasBeenSet(false)
{
*this = xmlNode;
}
FieldLevelEncryptionSummary& FieldLevelEncryptionSummary::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode idNode = resultNode.FirstChild("Id");
if(!idNode.IsNull())
{
m_id = Aws::Utils::Xml::DecodeEscapedXmlText(idNode.GetText());
m_idHasBeenSet = true;
}
XmlNode lastModifiedTimeNode = resultNode.FirstChild("LastModifiedTime");
if(!lastModifiedTimeNode.IsNull())
{
m_lastModifiedTime = DateTime(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(lastModifiedTimeNode.GetText()).c_str()).c_str(), DateFormat::ISO_8601);
m_lastModifiedTimeHasBeenSet = true;
}
XmlNode commentNode = resultNode.FirstChild("Comment");
if(!commentNode.IsNull())
{
m_comment = Aws::Utils::Xml::DecodeEscapedXmlText(commentNode.GetText());
m_commentHasBeenSet = true;
}
XmlNode queryArgProfileConfigNode = resultNode.FirstChild("QueryArgProfileConfig");
if(!queryArgProfileConfigNode.IsNull())
{
m_queryArgProfileConfig = queryArgProfileConfigNode;
m_queryArgProfileConfigHasBeenSet = true;
}
XmlNode contentTypeProfileConfigNode = resultNode.FirstChild("ContentTypeProfileConfig");
if(!contentTypeProfileConfigNode.IsNull())
{
m_contentTypeProfileConfig = contentTypeProfileConfigNode;
m_contentTypeProfileConfigHasBeenSet = true;
}
}
return *this;
}
void FieldLevelEncryptionSummary::AddToNode(XmlNode& parentNode) const
{
Aws::StringStream ss;
if(m_idHasBeenSet)
{
XmlNode idNode = parentNode.CreateChildElement("Id");
idNode.SetText(m_id);
}
if(m_lastModifiedTimeHasBeenSet)
{
XmlNode lastModifiedTimeNode = parentNode.CreateChildElement("LastModifiedTime");
lastModifiedTimeNode.SetText(m_lastModifiedTime.ToGmtString(DateFormat::ISO_8601));
}
if(m_commentHasBeenSet)
{
XmlNode commentNode = parentNode.CreateChildElement("Comment");
commentNode.SetText(m_comment);
}
if(m_queryArgProfileConfigHasBeenSet)
{
XmlNode queryArgProfileConfigNode = parentNode.CreateChildElement("QueryArgProfileConfig");
m_queryArgProfileConfig.AddToNode(queryArgProfileConfigNode);
}
if(m_contentTypeProfileConfigHasBeenSet)
{
XmlNode contentTypeProfileConfigNode = parentNode.CreateChildElement("ContentTypeProfileConfig");
m_contentTypeProfileConfig.AddToNode(contentTypeProfileConfigNode);
}
}
} // namespace Model
} // namespace CloudFront
} // namespace Aws

View File

@@ -0,0 +1,92 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/FieldPatterns.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudFront
{
namespace Model
{
FieldPatterns::FieldPatterns() :
m_quantity(0),
m_quantityHasBeenSet(false),
m_itemsHasBeenSet(false)
{
}
FieldPatterns::FieldPatterns(const XmlNode& xmlNode) :
m_quantity(0),
m_quantityHasBeenSet(false),
m_itemsHasBeenSet(false)
{
*this = xmlNode;
}
FieldPatterns& FieldPatterns::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode quantityNode = resultNode.FirstChild("Quantity");
if(!quantityNode.IsNull())
{
m_quantity = StringUtils::ConvertToInt32(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(quantityNode.GetText()).c_str()).c_str());
m_quantityHasBeenSet = true;
}
XmlNode itemsNode = resultNode.FirstChild("Items");
if(!itemsNode.IsNull())
{
XmlNode itemsMember = itemsNode.FirstChild("FieldPattern");
while(!itemsMember.IsNull())
{
m_items.push_back(itemsMember.GetText());
itemsMember = itemsMember.NextNode("FieldPattern");
}
m_itemsHasBeenSet = true;
}
}
return *this;
}
void FieldPatterns::AddToNode(XmlNode& parentNode) const
{
Aws::StringStream ss;
if(m_quantityHasBeenSet)
{
XmlNode quantityNode = parentNode.CreateChildElement("Quantity");
ss << m_quantity;
quantityNode.SetText(ss.str());
ss.str("");
}
if(m_itemsHasBeenSet)
{
XmlNode itemsParentNode = parentNode.CreateChildElement("Items");
for(const auto& item : m_items)
{
XmlNode itemsNode = itemsParentNode.CreateChildElement("String");
itemsNode.SetText(item);
}
}
}
} // namespace Model
} // namespace CloudFront
} // 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/cloudfront/model/Format.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 CloudFront
{
namespace Model
{
namespace FormatMapper
{
static const int URLEncoded_HASH = HashingUtils::HashString("URLEncoded");
Format GetFormatForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == URLEncoded_HASH)
{
return Format::URLEncoded;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<Format>(hashCode);
}
return Format::NOT_SET;
}
Aws::String GetNameForFormat(Format enumValue)
{
switch(enumValue)
{
case Format::URLEncoded:
return "URLEncoded";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace FormatMapper
} // namespace Model
} // namespace CloudFront
} // namespace Aws

View File

@@ -0,0 +1,108 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/GeoRestriction.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
namespace Aws
{
namespace CloudFront
{
namespace Model
{
GeoRestriction::GeoRestriction() :
m_restrictionType(GeoRestrictionType::NOT_SET),
m_restrictionTypeHasBeenSet(false),
m_quantity(0),
m_quantityHasBeenSet(false),
m_itemsHasBeenSet(false)
{
}
GeoRestriction::GeoRestriction(const XmlNode& xmlNode) :
m_restrictionType(GeoRestrictionType::NOT_SET),
m_restrictionTypeHasBeenSet(false),
m_quantity(0),
m_quantityHasBeenSet(false),
m_itemsHasBeenSet(false)
{
*this = xmlNode;
}
GeoRestriction& GeoRestriction::operator =(const XmlNode& xmlNode)
{
XmlNode resultNode = xmlNode;
if(!resultNode.IsNull())
{
XmlNode restrictionTypeNode = resultNode.FirstChild("RestrictionType");
if(!restrictionTypeNode.IsNull())
{
m_restrictionType = GeoRestrictionTypeMapper::GetGeoRestrictionTypeForName(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(restrictionTypeNode.GetText()).c_str()).c_str());
m_restrictionTypeHasBeenSet = true;
}
XmlNode quantityNode = resultNode.FirstChild("Quantity");
if(!quantityNode.IsNull())
{
m_quantity = StringUtils::ConvertToInt32(StringUtils::Trim(Aws::Utils::Xml::DecodeEscapedXmlText(quantityNode.GetText()).c_str()).c_str());
m_quantityHasBeenSet = true;
}
XmlNode itemsNode = resultNode.FirstChild("Items");
if(!itemsNode.IsNull())
{
XmlNode itemsMember = itemsNode.FirstChild("Location");
while(!itemsMember.IsNull())
{
m_items.push_back(itemsMember.GetText());
itemsMember = itemsMember.NextNode("Location");
}
m_itemsHasBeenSet = true;
}
}
return *this;
}
void GeoRestriction::AddToNode(XmlNode& parentNode) const
{
Aws::StringStream ss;
if(m_restrictionTypeHasBeenSet)
{
XmlNode restrictionTypeNode = parentNode.CreateChildElement("RestrictionType");
restrictionTypeNode.SetText(GeoRestrictionTypeMapper::GetNameForGeoRestrictionType(m_restrictionType));
}
if(m_quantityHasBeenSet)
{
XmlNode quantityNode = parentNode.CreateChildElement("Quantity");
ss << m_quantity;
quantityNode.SetText(ss.str());
ss.str("");
}
if(m_itemsHasBeenSet)
{
XmlNode itemsParentNode = parentNode.CreateChildElement("Items");
for(const auto& item : m_items)
{
XmlNode itemsNode = itemsParentNode.CreateChildElement("String");
itemsNode.SetText(item);
}
}
}
} // namespace Model
} // namespace CloudFront
} // 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/cloudfront/model/GeoRestrictionType.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 CloudFront
{
namespace Model
{
namespace GeoRestrictionTypeMapper
{
static const int blacklist_HASH = HashingUtils::HashString("blacklist");
static const int whitelist_HASH = HashingUtils::HashString("whitelist");
static const int none_HASH = HashingUtils::HashString("none");
GeoRestrictionType GetGeoRestrictionTypeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == blacklist_HASH)
{
return GeoRestrictionType::blacklist;
}
else if (hashCode == whitelist_HASH)
{
return GeoRestrictionType::whitelist;
}
else if (hashCode == none_HASH)
{
return GeoRestrictionType::none;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<GeoRestrictionType>(hashCode);
}
return GeoRestrictionType::NOT_SET;
}
Aws::String GetNameForGeoRestrictionType(GeoRestrictionType enumValue)
{
switch(enumValue)
{
case GeoRestrictionType::blacklist:
return "blacklist";
case GeoRestrictionType::whitelist:
return "whitelist";
case GeoRestrictionType::none:
return "none";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace GeoRestrictionTypeMapper
} // namespace Model
} // namespace CloudFront
} // namespace Aws

View File

@@ -0,0 +1,26 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/GetCachePolicy2020_05_31Request.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CloudFront::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
GetCachePolicy2020_05_31Request::GetCachePolicy2020_05_31Request() :
m_idHasBeenSet(false)
{
}
Aws::String GetCachePolicy2020_05_31Request::SerializePayload() const
{
return {};
}

View File

@@ -0,0 +1,46 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/GetCachePolicy2020_05_31Result.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CloudFront::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
using namespace Aws;
GetCachePolicy2020_05_31Result::GetCachePolicy2020_05_31Result()
{
}
GetCachePolicy2020_05_31Result::GetCachePolicy2020_05_31Result(const AmazonWebServiceResult<XmlDocument>& result)
{
*this = result;
}
GetCachePolicy2020_05_31Result& GetCachePolicy2020_05_31Result::operator =(const AmazonWebServiceResult<XmlDocument>& result)
{
const XmlDocument& xmlDocument = result.GetPayload();
XmlNode resultNode = xmlDocument.GetRootElement();
if(!resultNode.IsNull())
{
m_cachePolicy = resultNode;
}
const auto& headers = result.GetHeaderValueCollection();
const auto& eTagIter = headers.find("etag");
if(eTagIter != headers.end())
{
m_eTag = eTagIter->second;
}
return *this;
}

View File

@@ -0,0 +1,26 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/GetCachePolicyConfig2020_05_31Request.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CloudFront::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
GetCachePolicyConfig2020_05_31Request::GetCachePolicyConfig2020_05_31Request() :
m_idHasBeenSet(false)
{
}
Aws::String GetCachePolicyConfig2020_05_31Request::SerializePayload() const
{
return {};
}

View File

@@ -0,0 +1,46 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/GetCachePolicyConfig2020_05_31Result.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CloudFront::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
using namespace Aws;
GetCachePolicyConfig2020_05_31Result::GetCachePolicyConfig2020_05_31Result()
{
}
GetCachePolicyConfig2020_05_31Result::GetCachePolicyConfig2020_05_31Result(const AmazonWebServiceResult<XmlDocument>& result)
{
*this = result;
}
GetCachePolicyConfig2020_05_31Result& GetCachePolicyConfig2020_05_31Result::operator =(const AmazonWebServiceResult<XmlDocument>& result)
{
const XmlDocument& xmlDocument = result.GetPayload();
XmlNode resultNode = xmlDocument.GetRootElement();
if(!resultNode.IsNull())
{
m_cachePolicyConfig = resultNode;
}
const auto& headers = result.GetHeaderValueCollection();
const auto& eTagIter = headers.find("etag");
if(eTagIter != headers.end())
{
m_eTag = eTagIter->second;
}
return *this;
}

View File

@@ -0,0 +1,26 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/GetCloudFrontOriginAccessIdentity2020_05_31Request.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CloudFront::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
GetCloudFrontOriginAccessIdentity2020_05_31Request::GetCloudFrontOriginAccessIdentity2020_05_31Request() :
m_idHasBeenSet(false)
{
}
Aws::String GetCloudFrontOriginAccessIdentity2020_05_31Request::SerializePayload() const
{
return {};
}

View File

@@ -0,0 +1,46 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/GetCloudFrontOriginAccessIdentity2020_05_31Result.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CloudFront::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
using namespace Aws;
GetCloudFrontOriginAccessIdentity2020_05_31Result::GetCloudFrontOriginAccessIdentity2020_05_31Result()
{
}
GetCloudFrontOriginAccessIdentity2020_05_31Result::GetCloudFrontOriginAccessIdentity2020_05_31Result(const AmazonWebServiceResult<XmlDocument>& result)
{
*this = result;
}
GetCloudFrontOriginAccessIdentity2020_05_31Result& GetCloudFrontOriginAccessIdentity2020_05_31Result::operator =(const AmazonWebServiceResult<XmlDocument>& result)
{
const XmlDocument& xmlDocument = result.GetPayload();
XmlNode resultNode = xmlDocument.GetRootElement();
if(!resultNode.IsNull())
{
m_cloudFrontOriginAccessIdentity = resultNode;
}
const auto& headers = result.GetHeaderValueCollection();
const auto& eTagIter = headers.find("etag");
if(eTagIter != headers.end())
{
m_eTag = eTagIter->second;
}
return *this;
}

View File

@@ -0,0 +1,26 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/GetCloudFrontOriginAccessIdentityConfig2020_05_31Request.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CloudFront::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
GetCloudFrontOriginAccessIdentityConfig2020_05_31Request::GetCloudFrontOriginAccessIdentityConfig2020_05_31Request() :
m_idHasBeenSet(false)
{
}
Aws::String GetCloudFrontOriginAccessIdentityConfig2020_05_31Request::SerializePayload() const
{
return {};
}

View File

@@ -0,0 +1,46 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/GetCloudFrontOriginAccessIdentityConfig2020_05_31Result.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CloudFront::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
using namespace Aws;
GetCloudFrontOriginAccessIdentityConfig2020_05_31Result::GetCloudFrontOriginAccessIdentityConfig2020_05_31Result()
{
}
GetCloudFrontOriginAccessIdentityConfig2020_05_31Result::GetCloudFrontOriginAccessIdentityConfig2020_05_31Result(const AmazonWebServiceResult<XmlDocument>& result)
{
*this = result;
}
GetCloudFrontOriginAccessIdentityConfig2020_05_31Result& GetCloudFrontOriginAccessIdentityConfig2020_05_31Result::operator =(const AmazonWebServiceResult<XmlDocument>& result)
{
const XmlDocument& xmlDocument = result.GetPayload();
XmlNode resultNode = xmlDocument.GetRootElement();
if(!resultNode.IsNull())
{
m_cloudFrontOriginAccessIdentityConfig = resultNode;
}
const auto& headers = result.GetHeaderValueCollection();
const auto& eTagIter = headers.find("etag");
if(eTagIter != headers.end())
{
m_eTag = eTagIter->second;
}
return *this;
}

View File

@@ -0,0 +1,26 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/GetDistribution2020_05_31Request.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CloudFront::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
GetDistribution2020_05_31Request::GetDistribution2020_05_31Request() :
m_idHasBeenSet(false)
{
}
Aws::String GetDistribution2020_05_31Request::SerializePayload() const
{
return {};
}

View File

@@ -0,0 +1,46 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/GetDistribution2020_05_31Result.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CloudFront::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
using namespace Aws;
GetDistribution2020_05_31Result::GetDistribution2020_05_31Result()
{
}
GetDistribution2020_05_31Result::GetDistribution2020_05_31Result(const AmazonWebServiceResult<XmlDocument>& result)
{
*this = result;
}
GetDistribution2020_05_31Result& GetDistribution2020_05_31Result::operator =(const AmazonWebServiceResult<XmlDocument>& result)
{
const XmlDocument& xmlDocument = result.GetPayload();
XmlNode resultNode = xmlDocument.GetRootElement();
if(!resultNode.IsNull())
{
m_distribution = resultNode;
}
const auto& headers = result.GetHeaderValueCollection();
const auto& eTagIter = headers.find("etag");
if(eTagIter != headers.end())
{
m_eTag = eTagIter->second;
}
return *this;
}

View File

@@ -0,0 +1,26 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/GetDistributionConfig2020_05_31Request.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CloudFront::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
GetDistributionConfig2020_05_31Request::GetDistributionConfig2020_05_31Request() :
m_idHasBeenSet(false)
{
}
Aws::String GetDistributionConfig2020_05_31Request::SerializePayload() const
{
return {};
}

View File

@@ -0,0 +1,46 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/GetDistributionConfig2020_05_31Result.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CloudFront::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
using namespace Aws;
GetDistributionConfig2020_05_31Result::GetDistributionConfig2020_05_31Result()
{
}
GetDistributionConfig2020_05_31Result::GetDistributionConfig2020_05_31Result(const AmazonWebServiceResult<XmlDocument>& result)
{
*this = result;
}
GetDistributionConfig2020_05_31Result& GetDistributionConfig2020_05_31Result::operator =(const AmazonWebServiceResult<XmlDocument>& result)
{
const XmlDocument& xmlDocument = result.GetPayload();
XmlNode resultNode = xmlDocument.GetRootElement();
if(!resultNode.IsNull())
{
m_distributionConfig = resultNode;
}
const auto& headers = result.GetHeaderValueCollection();
const auto& eTagIter = headers.find("etag");
if(eTagIter != headers.end())
{
m_eTag = eTagIter->second;
}
return *this;
}

View File

@@ -0,0 +1,26 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/cloudfront/model/GetFieldLevelEncryption2020_05_31Request.h>
#include <aws/core/utils/xml/XmlSerializer.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <utility>
using namespace Aws::CloudFront::Model;
using namespace Aws::Utils::Xml;
using namespace Aws::Utils;
GetFieldLevelEncryption2020_05_31Request::GetFieldLevelEncryption2020_05_31Request() :
m_idHasBeenSet(false)
{
}
Aws::String GetFieldLevelEncryption2020_05_31Request::SerializePayload() const
{
return {};
}

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