/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::RecycleBin::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; ListRulesRequest::ListRulesRequest() : m_maxResults(0), m_maxResultsHasBeenSet(false), m_nextTokenHasBeenSet(false), m_resourceType(ResourceType::NOT_SET), m_resourceTypeHasBeenSet(false), m_resourceTagsHasBeenSet(false), m_lockState(LockState::NOT_SET), m_lockStateHasBeenSet(false) { } Aws::String ListRulesRequest::SerializePayload() const { JsonValue payload; if(m_maxResultsHasBeenSet) { payload.WithInteger("MaxResults", m_maxResults); } if(m_nextTokenHasBeenSet) { payload.WithString("NextToken", m_nextToken); } if(m_resourceTypeHasBeenSet) { payload.WithString("ResourceType", ResourceTypeMapper::GetNameForResourceType(m_resourceType)); } if(m_resourceTagsHasBeenSet) { Aws::Utils::Array resourceTagsJsonList(m_resourceTags.size()); for(unsigned resourceTagsIndex = 0; resourceTagsIndex < resourceTagsJsonList.GetLength(); ++resourceTagsIndex) { resourceTagsJsonList[resourceTagsIndex].AsObject(m_resourceTags[resourceTagsIndex].Jsonize()); } payload.WithArray("ResourceTags", std::move(resourceTagsJsonList)); } if(m_lockStateHasBeenSet) { payload.WithString("LockState", LockStateMapper::GetNameForLockState(m_lockState)); } return payload.View().WriteReadable(); }