90 lines
1.5 KiB
C++
90 lines
1.5 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/medialive/model/InputLocation.h>
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|
|
|
#include <utility>
|
|
|
|
using namespace Aws::Utils::Json;
|
|
using namespace Aws::Utils;
|
|
|
|
namespace Aws
|
|
{
|
|
namespace MediaLive
|
|
{
|
|
namespace Model
|
|
{
|
|
|
|
InputLocation::InputLocation() :
|
|
m_passwordParamHasBeenSet(false),
|
|
m_uriHasBeenSet(false),
|
|
m_usernameHasBeenSet(false)
|
|
{
|
|
}
|
|
|
|
InputLocation::InputLocation(JsonView jsonValue) :
|
|
m_passwordParamHasBeenSet(false),
|
|
m_uriHasBeenSet(false),
|
|
m_usernameHasBeenSet(false)
|
|
{
|
|
*this = jsonValue;
|
|
}
|
|
|
|
InputLocation& InputLocation::operator =(JsonView jsonValue)
|
|
{
|
|
if(jsonValue.ValueExists("passwordParam"))
|
|
{
|
|
m_passwordParam = jsonValue.GetString("passwordParam");
|
|
|
|
m_passwordParamHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("uri"))
|
|
{
|
|
m_uri = jsonValue.GetString("uri");
|
|
|
|
m_uriHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("username"))
|
|
{
|
|
m_username = jsonValue.GetString("username");
|
|
|
|
m_usernameHasBeenSet = true;
|
|
}
|
|
|
|
return *this;
|
|
}
|
|
|
|
JsonValue InputLocation::Jsonize() const
|
|
{
|
|
JsonValue payload;
|
|
|
|
if(m_passwordParamHasBeenSet)
|
|
{
|
|
payload.WithString("passwordParam", m_passwordParam);
|
|
|
|
}
|
|
|
|
if(m_uriHasBeenSet)
|
|
{
|
|
payload.WithString("uri", m_uri);
|
|
|
|
}
|
|
|
|
if(m_usernameHasBeenSet)
|
|
{
|
|
payload.WithString("username", m_username);
|
|
|
|
}
|
|
|
|
return payload;
|
|
}
|
|
|
|
} // namespace Model
|
|
} // namespace MediaLive
|
|
} // namespace Aws
|