/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::RAM::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; DisassociateResourceShareRequest::DisassociateResourceShareRequest() : m_resourceShareArnHasBeenSet(false), m_resourceArnsHasBeenSet(false), m_principalsHasBeenSet(false), m_clientTokenHasBeenSet(false), m_sourcesHasBeenSet(false) { } Aws::String DisassociateResourceShareRequest::SerializePayload() const { JsonValue payload; if(m_resourceShareArnHasBeenSet) { payload.WithString("resourceShareArn", m_resourceShareArn); } if(m_resourceArnsHasBeenSet) { Aws::Utils::Array resourceArnsJsonList(m_resourceArns.size()); for(unsigned resourceArnsIndex = 0; resourceArnsIndex < resourceArnsJsonList.GetLength(); ++resourceArnsIndex) { resourceArnsJsonList[resourceArnsIndex].AsString(m_resourceArns[resourceArnsIndex]); } payload.WithArray("resourceArns", std::move(resourceArnsJsonList)); } if(m_principalsHasBeenSet) { Aws::Utils::Array principalsJsonList(m_principals.size()); for(unsigned principalsIndex = 0; principalsIndex < principalsJsonList.GetLength(); ++principalsIndex) { principalsJsonList[principalsIndex].AsString(m_principals[principalsIndex]); } payload.WithArray("principals", std::move(principalsJsonList)); } if(m_clientTokenHasBeenSet) { payload.WithString("clientToken", m_clientToken); } if(m_sourcesHasBeenSet) { Aws::Utils::Array sourcesJsonList(m_sources.size()); for(unsigned sourcesIndex = 0; sourcesIndex < sourcesJsonList.GetLength(); ++sourcesIndex) { sourcesJsonList[sourcesIndex].AsString(m_sources[sourcesIndex]); } payload.WithArray("sources", std::move(sourcesJsonList)); } return payload.View().WriteReadable(); }