Skip to content

Commit

Permalink
dont serialize enum members when value is not set
Browse files Browse the repository at this point in the history
  • Loading branch information
sbiscigl committed Feb 27, 2024
1 parent 013587c commit 71f643f
Show file tree
Hide file tree
Showing 118 changed files with 216 additions and 212 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Aws::Http::HeaderValueCollection BatchReadRequest::GetRequestSpecificHeaders() c
ss.str("");
}

if(m_consistencyLevelHasBeenSet)
if(m_consistencyLevelHasBeenSet && m_consistencyLevel != ConsistencyLevel::NOT_SET)
{
headers.emplace("x-amz-consistency-level", ConsistencyLevelMapper::GetNameForConsistencyLevel(m_consistencyLevel));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Aws::Http::HeaderValueCollection GetObjectAttributesRequest::GetRequestSpecificH
ss.str("");
}

if(m_consistencyLevelHasBeenSet)
if(m_consistencyLevelHasBeenSet && m_consistencyLevel != ConsistencyLevel::NOT_SET)
{
headers.emplace("x-amz-consistency-level", ConsistencyLevelMapper::GetNameForConsistencyLevel(m_consistencyLevel));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Aws::Http::HeaderValueCollection GetObjectInformationRequest::GetRequestSpecific
ss.str("");
}

if(m_consistencyLevelHasBeenSet)
if(m_consistencyLevelHasBeenSet && m_consistencyLevel != ConsistencyLevel::NOT_SET)
{
headers.emplace("x-amz-consistency-level", ConsistencyLevelMapper::GetNameForConsistencyLevel(m_consistencyLevel));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Aws::Http::HeaderValueCollection ListAttachedIndicesRequest::GetRequestSpecificH
ss.str("");
}

if(m_consistencyLevelHasBeenSet)
if(m_consistencyLevelHasBeenSet && m_consistencyLevel != ConsistencyLevel::NOT_SET)
{
headers.emplace("x-amz-consistency-level", ConsistencyLevelMapper::GetNameForConsistencyLevel(m_consistencyLevel));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Aws::Http::HeaderValueCollection ListIndexRequest::GetRequestSpecificHeaders() c
ss.str("");
}

if(m_consistencyLevelHasBeenSet)
if(m_consistencyLevelHasBeenSet && m_consistencyLevel != ConsistencyLevel::NOT_SET)
{
headers.emplace("x-amz-consistency-level", ConsistencyLevelMapper::GetNameForConsistencyLevel(m_consistencyLevel));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Aws::Http::HeaderValueCollection ListObjectAttributesRequest::GetRequestSpecific
ss.str("");
}

if(m_consistencyLevelHasBeenSet)
if(m_consistencyLevelHasBeenSet && m_consistencyLevel != ConsistencyLevel::NOT_SET)
{
headers.emplace("x-amz-consistency-level", ConsistencyLevelMapper::GetNameForConsistencyLevel(m_consistencyLevel));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Aws::Http::HeaderValueCollection ListObjectChildrenRequest::GetRequestSpecificHe
ss.str("");
}

if(m_consistencyLevelHasBeenSet)
if(m_consistencyLevelHasBeenSet && m_consistencyLevel != ConsistencyLevel::NOT_SET)
{
headers.emplace("x-amz-consistency-level", ConsistencyLevelMapper::GetNameForConsistencyLevel(m_consistencyLevel));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Aws::Http::HeaderValueCollection ListObjectParentsRequest::GetRequestSpecificHea
ss.str("");
}

if(m_consistencyLevelHasBeenSet)
if(m_consistencyLevelHasBeenSet && m_consistencyLevel != ConsistencyLevel::NOT_SET)
{
headers.emplace("x-amz-consistency-level", ConsistencyLevelMapper::GetNameForConsistencyLevel(m_consistencyLevel));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Aws::Http::HeaderValueCollection ListObjectPoliciesRequest::GetRequestSpecificHe
ss.str("");
}

if(m_consistencyLevelHasBeenSet)
if(m_consistencyLevelHasBeenSet && m_consistencyLevel != ConsistencyLevel::NOT_SET)
{
headers.emplace("x-amz-consistency-level", ConsistencyLevelMapper::GetNameForConsistencyLevel(m_consistencyLevel));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Aws::Http::HeaderValueCollection ListPolicyAttachmentsRequest::GetRequestSpecifi
ss.str("");
}

if(m_consistencyLevelHasBeenSet)
if(m_consistencyLevelHasBeenSet && m_consistencyLevel != ConsistencyLevel::NOT_SET)
{
headers.emplace("x-amz-consistency-level", ConsistencyLevelMapper::GetNameForConsistencyLevel(m_consistencyLevel));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ Aws::Http::HeaderValueCollection CompleteSnapshotRequest::GetRequestSpecificHead
ss.str("");
}

if(m_checksumAlgorithmHasBeenSet)
if(m_checksumAlgorithmHasBeenSet && m_checksumAlgorithm != ChecksumAlgorithm::NOT_SET)
{
headers.emplace("x-amz-checksum-algorithm", ChecksumAlgorithmMapper::GetNameForChecksumAlgorithm(m_checksumAlgorithm));
}

if(m_checksumAggregationMethodHasBeenSet)
if(m_checksumAggregationMethodHasBeenSet && m_checksumAggregationMethod != ChecksumAggregationMethod::NOT_SET)
{
headers.emplace("x-amz-checksum-aggregation-method", ChecksumAggregationMethodMapper::GetNameForChecksumAggregationMethod(m_checksumAggregationMethod));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Aws::Http::HeaderValueCollection PutSnapshotBlockRequest::GetRequestSpecificHead
ss.str("");
}

if(m_checksumAlgorithmHasBeenSet)
if(m_checksumAlgorithmHasBeenSet && m_checksumAlgorithm != ChecksumAlgorithm::NOT_SET)
{
headers.emplace("x-amz-checksum-algorithm", ChecksumAlgorithmMapper::GetNameForChecksumAlgorithm(m_checksumAlgorithm));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Aws::Http::HeaderValueCollection PublishRequest::GetRequestSpecificHeaders() con
ss.str("");
}

if(m_payloadFormatIndicatorHasBeenSet)
if(m_payloadFormatIndicatorHasBeenSet && m_payloadFormatIndicator != PayloadFormatIndicator::NOT_SET)
{
headers.emplace("x-amz-mqtt5-payload-format-indicator", PayloadFormatIndicatorMapper::GetNameForPayloadFormatIndicator(m_payloadFormatIndicator));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ Aws::Http::HeaderValueCollection InvokeRequest::GetRequestSpecificHeaders() cons
{
Aws::Http::HeaderValueCollection headers;
Aws::StringStream ss;
if(m_invocationTypeHasBeenSet)
if(m_invocationTypeHasBeenSet && m_invocationType != InvocationType::NOT_SET)
{
headers.emplace("x-amz-invocation-type", InvocationTypeMapper::GetNameForInvocationType(m_invocationType));
}

if(m_logTypeHasBeenSet)
if(m_logTypeHasBeenSet && m_logType != LogType::NOT_SET)
{
headers.emplace("x-amz-log-type", LogTypeMapper::GetNameForLogType(m_logType));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ Aws::Http::HeaderValueCollection InvokeWithResponseStreamRequest::GetRequestSpec
{
Aws::Http::HeaderValueCollection headers;
Aws::StringStream ss;
if(m_invocationTypeHasBeenSet)
if(m_invocationTypeHasBeenSet && m_invocationType != ResponseStreamingInvocationType::NOT_SET)
{
headers.emplace("x-amz-invocation-type", ResponseStreamingInvocationTypeMapper::GetNameForResponseStreamingInvocationType(m_invocationType));
}

if(m_logTypeHasBeenSet)
if(m_logTypeHasBeenSet && m_logType != LogType::NOT_SET)
{
headers.emplace("x-amz-log-type", LogTypeMapper::GetNameForLogType(m_logType));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Aws::Http::HeaderValueCollection StartConversationRequest::GetRequestSpecificHea
Aws::Http::HeaderValueCollection headers;
headers.emplace(Aws::Http::CONTENT_TYPE_HEADER, Aws::AMZN_EVENTSTREAM_CONTENT_TYPE);
Aws::StringStream ss;
if(m_conversationModeHasBeenSet)
if(m_conversationModeHasBeenSet && m_conversationMode != ConversationMode::NOT_SET)
{
headers.emplace("x-amz-lex-conversation-mode", ConversationModeMapper::GetNameForConversationMode(m_conversationMode));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Aws::Http::HeaderValueCollection DescribeInputDeviceThumbnailRequest::GetRequest
{
Aws::Http::HeaderValueCollection headers;
Aws::StringStream ss;
if(m_acceptHasBeenSet)
if(m_acceptHasBeenSet && m_accept != AcceptHeader::NOT_SET)
{
headers.emplace("accept", AcceptHeaderMapper::GetNameForAcceptHeader(m_accept));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ Aws::Http::HeaderValueCollection PutObjectRequest::GetRequestSpecificHeaders() c
ss.str("");
}

if(m_storageClassHasBeenSet)
if(m_storageClassHasBeenSet && m_storageClass != StorageClass::NOT_SET)
{
headers.emplace("x-amz-storage-class", StorageClassMapper::GetNameForStorageClass(m_storageClass));
}

if(m_uploadAvailabilityHasBeenSet)
if(m_uploadAvailabilityHasBeenSet && m_uploadAvailability != UploadAvailability::NOT_SET)
{
headers.emplace("x-amz-upload-availability", UploadAvailabilityMapper::GetNameForUploadAvailability(m_uploadAvailability));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Aws::Http::HeaderValueCollection GetPropertygraphStreamRequest::GetRequestSpecif
{
Aws::Http::HeaderValueCollection headers;
Aws::StringStream ss;
if(m_encodingHasBeenSet)
if(m_encodingHasBeenSet && m_encoding != Encoding::NOT_SET)
{
headers.emplace("accept-encoding", EncodingMapper::GetNameForEncoding(m_encoding));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Aws::Http::HeaderValueCollection GetSparqlStreamRequest::GetRequestSpecificHeade
{
Aws::Http::HeaderValueCollection headers;
Aws::StringStream ss;
if(m_encodingHasBeenSet)
if(m_encodingHasBeenSet && m_encoding != Encoding::NOT_SET)
{
headers.emplace("accept-encoding", EncodingMapper::GetNameForEncoding(m_encoding));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Aws::Http::HeaderValueCollection AbortMultipartUploadRequest::GetRequestSpecific
{
Aws::Http::HeaderValueCollection headers;
Aws::StringStream ss;
if(m_requestPayerHasBeenSet)
if(m_requestPayerHasBeenSet && m_requestPayer != RequestPayer::NOT_SET)
{
headers.emplace("x-amz-request-payer", RequestPayerMapper::GetNameForRequestPayer(m_requestPayer));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ Aws::Http::HeaderValueCollection CompleteMultipartUploadRequest::GetRequestSpeci
ss.str("");
}

if(m_requestPayerHasBeenSet)
if(m_requestPayerHasBeenSet && m_requestPayer != RequestPayer::NOT_SET)
{
headers.emplace("x-amz-request-payer", RequestPayerMapper::GetNameForRequestPayer(m_requestPayer));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ Aws::Http::HeaderValueCollection CopyObjectRequest::GetRequestSpecificHeaders()
{
Aws::Http::HeaderValueCollection headers;
Aws::StringStream ss;
if(m_aCLHasBeenSet)
if(m_aCLHasBeenSet && m_aCL != ObjectCannedACL::NOT_SET)
{
headers.emplace("x-amz-acl", ObjectCannedACLMapper::GetNameForObjectCannedACL(m_aCL));
}
Expand All @@ -137,7 +137,7 @@ Aws::Http::HeaderValueCollection CopyObjectRequest::GetRequestSpecificHeaders()
ss.str("");
}

if(m_checksumAlgorithmHasBeenSet)
if(m_checksumAlgorithmHasBeenSet && m_checksumAlgorithm != ChecksumAlgorithm::NOT_SET)
{
headers.emplace("x-amz-checksum-algorithm", ChecksumAlgorithmMapper::GetNameForChecksumAlgorithm(m_checksumAlgorithm));
}
Expand Down Expand Up @@ -244,22 +244,22 @@ Aws::Http::HeaderValueCollection CopyObjectRequest::GetRequestSpecificHeaders()
}
}

if(m_metadataDirectiveHasBeenSet)
if(m_metadataDirectiveHasBeenSet && m_metadataDirective != MetadataDirective::NOT_SET)
{
headers.emplace("x-amz-metadata-directive", MetadataDirectiveMapper::GetNameForMetadataDirective(m_metadataDirective));
}

if(m_taggingDirectiveHasBeenSet)
if(m_taggingDirectiveHasBeenSet && m_taggingDirective != TaggingDirective::NOT_SET)
{
headers.emplace("x-amz-tagging-directive", TaggingDirectiveMapper::GetNameForTaggingDirective(m_taggingDirective));
}

if(m_serverSideEncryptionHasBeenSet)
if(m_serverSideEncryptionHasBeenSet && m_serverSideEncryption != ServerSideEncryption::NOT_SET)
{
headers.emplace("x-amz-server-side-encryption", ServerSideEncryptionMapper::GetNameForServerSideEncryption(m_serverSideEncryption));
}

if(m_storageClassHasBeenSet)
if(m_storageClassHasBeenSet && m_storageClass != StorageClass::NOT_SET)
{
headers.emplace("x-amz-storage-class", StorageClassMapper::GetNameForStorageClass(m_storageClass));
}
Expand Down Expand Up @@ -334,7 +334,7 @@ Aws::Http::HeaderValueCollection CopyObjectRequest::GetRequestSpecificHeaders()
ss.str("");
}

if(m_requestPayerHasBeenSet)
if(m_requestPayerHasBeenSet && m_requestPayer != RequestPayer::NOT_SET)
{
headers.emplace("x-amz-request-payer", RequestPayerMapper::GetNameForRequestPayer(m_requestPayer));
}
Expand All @@ -346,7 +346,7 @@ Aws::Http::HeaderValueCollection CopyObjectRequest::GetRequestSpecificHeaders()
ss.str("");
}

if(m_objectLockModeHasBeenSet)
if(m_objectLockModeHasBeenSet && m_objectLockMode != ObjectLockMode::NOT_SET)
{
headers.emplace("x-amz-object-lock-mode", ObjectLockModeMapper::GetNameForObjectLockMode(m_objectLockMode));
}
Expand All @@ -356,7 +356,7 @@ Aws::Http::HeaderValueCollection CopyObjectRequest::GetRequestSpecificHeaders()
headers.emplace("x-amz-object-lock-retain-until-date", m_objectLockRetainUntilDate.ToGmtString(Aws::Utils::DateFormat::ISO_8601));
}

if(m_objectLockLegalHoldStatusHasBeenSet)
if(m_objectLockLegalHoldStatusHasBeenSet && m_objectLockLegalHoldStatus != ObjectLockLegalHoldStatus::NOT_SET)
{
headers.emplace("x-amz-object-lock-legal-hold", ObjectLockLegalHoldStatusMapper::GetNameForObjectLockLegalHoldStatus(m_objectLockLegalHoldStatus));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Aws::Http::HeaderValueCollection CreateBucketRequest::GetRequestSpecificHeaders(
{
Aws::Http::HeaderValueCollection headers;
Aws::StringStream ss;
if(m_aCLHasBeenSet)
if(m_aCLHasBeenSet && m_aCL != BucketCannedACL::NOT_SET)
{
headers.emplace("x-amz-acl", BucketCannedACLMapper::GetNameForBucketCannedACL(m_aCL));
}
Expand Down Expand Up @@ -123,7 +123,7 @@ Aws::Http::HeaderValueCollection CreateBucketRequest::GetRequestSpecificHeaders(
ss.str("");
}

if(m_objectOwnershipHasBeenSet)
if(m_objectOwnershipHasBeenSet && m_objectOwnership != ObjectOwnership::NOT_SET)
{
headers.emplace("x-amz-object-ownership", ObjectOwnershipMapper::GetNameForObjectOwnership(m_objectOwnership));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Aws::Http::HeaderValueCollection CreateMultipartUploadRequest::GetRequestSpecifi
{
Aws::Http::HeaderValueCollection headers;
Aws::StringStream ss;
if(m_aCLHasBeenSet)
if(m_aCLHasBeenSet && m_aCL != ObjectCannedACL::NOT_SET)
{
headers.emplace("x-amz-acl", ObjectCannedACLMapper::GetNameForObjectCannedACL(m_aCL));
}
Expand Down Expand Up @@ -173,12 +173,12 @@ Aws::Http::HeaderValueCollection CreateMultipartUploadRequest::GetRequestSpecifi
}
}

if(m_serverSideEncryptionHasBeenSet)
if(m_serverSideEncryptionHasBeenSet && m_serverSideEncryption != ServerSideEncryption::NOT_SET)
{
headers.emplace("x-amz-server-side-encryption", ServerSideEncryptionMapper::GetNameForServerSideEncryption(m_serverSideEncryption));
}

if(m_storageClassHasBeenSet)
if(m_storageClassHasBeenSet && m_storageClass != StorageClass::NOT_SET)
{
headers.emplace("x-amz-storage-class", StorageClassMapper::GetNameForStorageClass(m_storageClass));
}
Expand Down Expand Up @@ -232,7 +232,7 @@ Aws::Http::HeaderValueCollection CreateMultipartUploadRequest::GetRequestSpecifi
ss.str("");
}

if(m_requestPayerHasBeenSet)
if(m_requestPayerHasBeenSet && m_requestPayer != RequestPayer::NOT_SET)
{
headers.emplace("x-amz-request-payer", RequestPayerMapper::GetNameForRequestPayer(m_requestPayer));
}
Expand All @@ -244,7 +244,7 @@ Aws::Http::HeaderValueCollection CreateMultipartUploadRequest::GetRequestSpecifi
ss.str("");
}

if(m_objectLockModeHasBeenSet)
if(m_objectLockModeHasBeenSet && m_objectLockMode != ObjectLockMode::NOT_SET)
{
headers.emplace("x-amz-object-lock-mode", ObjectLockModeMapper::GetNameForObjectLockMode(m_objectLockMode));
}
Expand All @@ -254,7 +254,7 @@ Aws::Http::HeaderValueCollection CreateMultipartUploadRequest::GetRequestSpecifi
headers.emplace("x-amz-object-lock-retain-until-date", m_objectLockRetainUntilDate.ToGmtString(Aws::Utils::DateFormat::ISO_8601));
}

if(m_objectLockLegalHoldStatusHasBeenSet)
if(m_objectLockLegalHoldStatusHasBeenSet && m_objectLockLegalHoldStatus != ObjectLockLegalHoldStatus::NOT_SET)
{
headers.emplace("x-amz-object-lock-legal-hold", ObjectLockLegalHoldStatusMapper::GetNameForObjectLockLegalHoldStatus(m_objectLockLegalHoldStatus));
}
Expand All @@ -266,7 +266,7 @@ Aws::Http::HeaderValueCollection CreateMultipartUploadRequest::GetRequestSpecifi
ss.str("");
}

if(m_checksumAlgorithmHasBeenSet)
if(m_checksumAlgorithmHasBeenSet && m_checksumAlgorithm != ChecksumAlgorithm::NOT_SET)
{
headers.emplace("x-amz-checksum-algorithm", ChecksumAlgorithmMapper::GetNameForChecksumAlgorithm(m_checksumAlgorithm));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Aws::Http::HeaderValueCollection CreateSessionRequest::GetRequestSpecificHeaders
{
Aws::Http::HeaderValueCollection headers;
Aws::StringStream ss;
if(m_sessionModeHasBeenSet)
if(m_sessionModeHasBeenSet && m_sessionMode != SessionMode::NOT_SET)
{
headers.emplace("x-amz-create-session-mode", SessionModeMapper::GetNameForSessionMode(m_sessionMode));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Aws::Http::HeaderValueCollection DeleteObjectRequest::GetRequestSpecificHeaders(
ss.str("");
}

if(m_requestPayerHasBeenSet)
if(m_requestPayerHasBeenSet && m_requestPayer != RequestPayer::NOT_SET)
{
headers.emplace("x-amz-request-payer", RequestPayerMapper::GetNameForRequestPayer(m_requestPayer));
}
Expand Down
Loading

0 comments on commit 71f643f

Please sign in to comment.