68 lines
1.4 KiB
C++
68 lines
1.4 KiB
C++
|
|
/**
|
|||
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|||
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
#include <aws/sagemaker/model/OidcMemberDefinition.h>
|
|||
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|||
|
|
|
|||
|
|
#include <utility>
|
|||
|
|
|
|||
|
|
using namespace Aws::Utils::Json;
|
|||
|
|
using namespace Aws::Utils;
|
|||
|
|
|
|||
|
|
namespace Aws
|
|||
|
|
{
|
|||
|
|
namespace SageMaker
|
|||
|
|
{
|
|||
|
|
namespace Model
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
OidcMemberDefinition::OidcMemberDefinition() :
|
|||
|
|
m_groupsHasBeenSet(false)
|
|||
|
|
{
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
OidcMemberDefinition::OidcMemberDefinition(JsonView jsonValue) :
|
|||
|
|
m_groupsHasBeenSet(false)
|
|||
|
|
{
|
|||
|
|
*this = jsonValue;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
OidcMemberDefinition& OidcMemberDefinition::operator =(JsonView jsonValue)
|
|||
|
|
{
|
|||
|
|
if(jsonValue.ValueExists("Groups"))
|
|||
|
|
{
|
|||
|
|
Array<JsonView> groupsJsonList = jsonValue.GetArray("Groups");
|
|||
|
|
for(unsigned groupsIndex = 0; groupsIndex < groupsJsonList.GetLength(); ++groupsIndex)
|
|||
|
|
{
|
|||
|
|
m_groups.push_back(groupsJsonList[groupsIndex].AsString());
|
|||
|
|
}
|
|||
|
|
m_groupsHasBeenSet = true;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return *this;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
JsonValue OidcMemberDefinition::Jsonize() const
|
|||
|
|
{
|
|||
|
|
JsonValue payload;
|
|||
|
|
|
|||
|
|
if(m_groupsHasBeenSet)
|
|||
|
|
{
|
|||
|
|
Array<JsonValue> groupsJsonList(m_groups.size());
|
|||
|
|
for(unsigned groupsIndex = 0; groupsIndex < groupsJsonList.GetLength(); ++groupsIndex)
|
|||
|
|
{
|
|||
|
|
groupsJsonList[groupsIndex].AsString(m_groups[groupsIndex]);
|
|||
|
|
}
|
|||
|
|
payload.WithArray("Groups", std::move(groupsJsonList));
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return payload;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
} // namespace Model
|
|||
|
|
} // namespace SageMaker
|
|||
|
|
} // namespace Aws
|