/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include #include #include using namespace Aws::Connect::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; CreateVocabularyRequest::CreateVocabularyRequest() : m_clientToken(Aws::Utils::UUID::PseudoRandomUUID()), m_clientTokenHasBeenSet(true), m_instanceIdHasBeenSet(false), m_vocabularyNameHasBeenSet(false), m_languageCode(VocabularyLanguageCode::NOT_SET), m_languageCodeHasBeenSet(false), m_contentHasBeenSet(false), m_tagsHasBeenSet(false) { } Aws::String CreateVocabularyRequest::SerializePayload() const { JsonValue payload; if(m_clientTokenHasBeenSet) { payload.WithString("ClientToken", m_clientToken); } if(m_vocabularyNameHasBeenSet) { payload.WithString("VocabularyName", m_vocabularyName); } if(m_languageCodeHasBeenSet) { payload.WithString("LanguageCode", VocabularyLanguageCodeMapper::GetNameForVocabularyLanguageCode(m_languageCode)); } if(m_contentHasBeenSet) { payload.WithString("Content", m_content); } 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(); }