/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include #include using namespace Aws::BillingConductor::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; CreateBillingGroupRequest::CreateBillingGroupRequest() : m_clientToken(Aws::Utils::UUID::PseudoRandomUUID()), m_clientTokenHasBeenSet(true), m_nameHasBeenSet(false), m_accountGroupingHasBeenSet(false), m_computationPreferenceHasBeenSet(false), m_primaryAccountIdHasBeenSet(false), m_descriptionHasBeenSet(false), m_tagsHasBeenSet(false) { } Aws::String CreateBillingGroupRequest::SerializePayload() const { JsonValue payload; if(m_nameHasBeenSet) { payload.WithString("Name", m_name); } if(m_accountGroupingHasBeenSet) { payload.WithObject("AccountGrouping", m_accountGrouping.Jsonize()); } if(m_computationPreferenceHasBeenSet) { payload.WithObject("ComputationPreference", m_computationPreference.Jsonize()); } if(m_primaryAccountIdHasBeenSet) { payload.WithString("PrimaryAccountId", m_primaryAccountId); } if(m_descriptionHasBeenSet) { payload.WithString("Description", m_description); } if(m_tagsHasBeenSet) { JsonValue tagsJsonMap; for(auto& tagsItem : m_tags) { tagsJsonMap.WithString(tagsItem.first, tagsItem.second); } payload.WithObject("Tags", std::move(tagsJsonMap)); } return payload.View().WriteReadable(); } Aws::Http::HeaderValueCollection CreateBillingGroupRequest::GetRequestSpecificHeaders() const { Aws::Http::HeaderValueCollection headers; Aws::StringStream ss; if(m_clientTokenHasBeenSet) { ss << m_clientToken; headers.emplace("x-amzn-client-token", ss.str()); ss.str(""); } return headers; }