72 lines
1.6 KiB
C++
72 lines
1.6 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/appstream/model/CreateUserRequest.h>
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|
|
|
#include <utility>
|
|
|
|
using namespace Aws::AppStream::Model;
|
|
using namespace Aws::Utils::Json;
|
|
using namespace Aws::Utils;
|
|
|
|
CreateUserRequest::CreateUserRequest() :
|
|
m_userNameHasBeenSet(false),
|
|
m_messageAction(MessageAction::NOT_SET),
|
|
m_messageActionHasBeenSet(false),
|
|
m_firstNameHasBeenSet(false),
|
|
m_lastNameHasBeenSet(false),
|
|
m_authenticationType(AuthenticationType::NOT_SET),
|
|
m_authenticationTypeHasBeenSet(false)
|
|
{
|
|
}
|
|
|
|
Aws::String CreateUserRequest::SerializePayload() const
|
|
{
|
|
JsonValue payload;
|
|
|
|
if(m_userNameHasBeenSet)
|
|
{
|
|
payload.WithString("UserName", m_userName);
|
|
|
|
}
|
|
|
|
if(m_messageActionHasBeenSet)
|
|
{
|
|
payload.WithString("MessageAction", MessageActionMapper::GetNameForMessageAction(m_messageAction));
|
|
}
|
|
|
|
if(m_firstNameHasBeenSet)
|
|
{
|
|
payload.WithString("FirstName", m_firstName);
|
|
|
|
}
|
|
|
|
if(m_lastNameHasBeenSet)
|
|
{
|
|
payload.WithString("LastName", m_lastName);
|
|
|
|
}
|
|
|
|
if(m_authenticationTypeHasBeenSet)
|
|
{
|
|
payload.WithString("AuthenticationType", AuthenticationTypeMapper::GetNameForAuthenticationType(m_authenticationType));
|
|
}
|
|
|
|
return payload.View().WriteReadable();
|
|
}
|
|
|
|
Aws::Http::HeaderValueCollection CreateUserRequest::GetRequestSpecificHeaders() const
|
|
{
|
|
Aws::Http::HeaderValueCollection headers;
|
|
headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "PhotonAdminProxyService.CreateUser"));
|
|
return headers;
|
|
|
|
}
|
|
|
|
|
|
|
|
|