1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #include <aws/fsx/model/DisassociateFileSystemAliasesRequest.h>
7 #include <aws/core/utils/json/JsonSerializer.h>
8 
9 #include <utility>
10 
11 using namespace Aws::FSx::Model;
12 using namespace Aws::Utils::Json;
13 using namespace Aws::Utils;
14 
DisassociateFileSystemAliasesRequest()15 DisassociateFileSystemAliasesRequest::DisassociateFileSystemAliasesRequest() :
16     m_clientRequestToken(Aws::Utils::UUID::RandomUUID()),
17     m_clientRequestTokenHasBeenSet(true),
18     m_fileSystemIdHasBeenSet(false),
19     m_aliasesHasBeenSet(false)
20 {
21 }
22 
SerializePayload() const23 Aws::String DisassociateFileSystemAliasesRequest::SerializePayload() const
24 {
25   JsonValue payload;
26 
27   if(m_clientRequestTokenHasBeenSet)
28   {
29    payload.WithString("ClientRequestToken", m_clientRequestToken);
30 
31   }
32 
33   if(m_fileSystemIdHasBeenSet)
34   {
35    payload.WithString("FileSystemId", m_fileSystemId);
36 
37   }
38 
39   if(m_aliasesHasBeenSet)
40   {
41    Array<JsonValue> aliasesJsonList(m_aliases.size());
42    for(unsigned aliasesIndex = 0; aliasesIndex < aliasesJsonList.GetLength(); ++aliasesIndex)
43    {
44      aliasesJsonList[aliasesIndex].AsString(m_aliases[aliasesIndex]);
45    }
46    payload.WithArray("Aliases", std::move(aliasesJsonList));
47 
48   }
49 
50   return payload.View().WriteReadable();
51 }
52 
GetRequestSpecificHeaders() const53 Aws::Http::HeaderValueCollection DisassociateFileSystemAliasesRequest::GetRequestSpecificHeaders() const
54 {
55   Aws::Http::HeaderValueCollection headers;
56   headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "AWSSimbaAPIService_v20180301.DisassociateFileSystemAliases"));
57   return headers;
58 
59 }
60 
61 
62 
63 
64