92 lines
1.7 KiB
C++
92 lines
1.7 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/clouddirectory/model/BatchLookupPolicy.h>
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|
|
|
#include <utility>
|
|
|
|
using namespace Aws::Utils::Json;
|
|
using namespace Aws::Utils;
|
|
|
|
namespace Aws
|
|
{
|
|
namespace CloudDirectory
|
|
{
|
|
namespace Model
|
|
{
|
|
|
|
BatchLookupPolicy::BatchLookupPolicy() :
|
|
m_objectReferenceHasBeenSet(false),
|
|
m_nextTokenHasBeenSet(false),
|
|
m_maxResults(0),
|
|
m_maxResultsHasBeenSet(false)
|
|
{
|
|
}
|
|
|
|
BatchLookupPolicy::BatchLookupPolicy(JsonView jsonValue) :
|
|
m_objectReferenceHasBeenSet(false),
|
|
m_nextTokenHasBeenSet(false),
|
|
m_maxResults(0),
|
|
m_maxResultsHasBeenSet(false)
|
|
{
|
|
*this = jsonValue;
|
|
}
|
|
|
|
BatchLookupPolicy& BatchLookupPolicy::operator =(JsonView jsonValue)
|
|
{
|
|
if(jsonValue.ValueExists("ObjectReference"))
|
|
{
|
|
m_objectReference = jsonValue.GetObject("ObjectReference");
|
|
|
|
m_objectReferenceHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("NextToken"))
|
|
{
|
|
m_nextToken = jsonValue.GetString("NextToken");
|
|
|
|
m_nextTokenHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("MaxResults"))
|
|
{
|
|
m_maxResults = jsonValue.GetInteger("MaxResults");
|
|
|
|
m_maxResultsHasBeenSet = true;
|
|
}
|
|
|
|
return *this;
|
|
}
|
|
|
|
JsonValue BatchLookupPolicy::Jsonize() const
|
|
{
|
|
JsonValue payload;
|
|
|
|
if(m_objectReferenceHasBeenSet)
|
|
{
|
|
payload.WithObject("ObjectReference", m_objectReference.Jsonize());
|
|
|
|
}
|
|
|
|
if(m_nextTokenHasBeenSet)
|
|
{
|
|
payload.WithString("NextToken", m_nextToken);
|
|
|
|
}
|
|
|
|
if(m_maxResultsHasBeenSet)
|
|
{
|
|
payload.WithInteger("MaxResults", m_maxResults);
|
|
|
|
}
|
|
|
|
return payload;
|
|
}
|
|
|
|
} // namespace Model
|
|
} // namespace CloudDirectory
|
|
} // namespace Aws
|