187 lines
4.9 KiB
C++
187 lines
4.9 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#include <aws/fsx/model/CreateFileSystemWindowsConfiguration.h>
|
|
#include <aws/core/utils/json/JsonSerializer.h>
|
|
|
|
#include <utility>
|
|
|
|
using namespace Aws::Utils::Json;
|
|
using namespace Aws::Utils;
|
|
|
|
namespace Aws
|
|
{
|
|
namespace FSx
|
|
{
|
|
namespace Model
|
|
{
|
|
|
|
CreateFileSystemWindowsConfiguration::CreateFileSystemWindowsConfiguration() :
|
|
m_activeDirectoryIdHasBeenSet(false),
|
|
m_selfManagedActiveDirectoryConfigurationHasBeenSet(false),
|
|
m_deploymentType(WindowsDeploymentType::NOT_SET),
|
|
m_deploymentTypeHasBeenSet(false),
|
|
m_preferredSubnetIdHasBeenSet(false),
|
|
m_throughputCapacity(0),
|
|
m_throughputCapacityHasBeenSet(false),
|
|
m_weeklyMaintenanceStartTimeHasBeenSet(false),
|
|
m_dailyAutomaticBackupStartTimeHasBeenSet(false),
|
|
m_automaticBackupRetentionDays(0),
|
|
m_automaticBackupRetentionDaysHasBeenSet(false),
|
|
m_copyTagsToBackups(false),
|
|
m_copyTagsToBackupsHasBeenSet(false)
|
|
{
|
|
}
|
|
|
|
CreateFileSystemWindowsConfiguration::CreateFileSystemWindowsConfiguration(JsonView jsonValue) :
|
|
m_activeDirectoryIdHasBeenSet(false),
|
|
m_selfManagedActiveDirectoryConfigurationHasBeenSet(false),
|
|
m_deploymentType(WindowsDeploymentType::NOT_SET),
|
|
m_deploymentTypeHasBeenSet(false),
|
|
m_preferredSubnetIdHasBeenSet(false),
|
|
m_throughputCapacity(0),
|
|
m_throughputCapacityHasBeenSet(false),
|
|
m_weeklyMaintenanceStartTimeHasBeenSet(false),
|
|
m_dailyAutomaticBackupStartTimeHasBeenSet(false),
|
|
m_automaticBackupRetentionDays(0),
|
|
m_automaticBackupRetentionDaysHasBeenSet(false),
|
|
m_copyTagsToBackups(false),
|
|
m_copyTagsToBackupsHasBeenSet(false)
|
|
{
|
|
*this = jsonValue;
|
|
}
|
|
|
|
CreateFileSystemWindowsConfiguration& CreateFileSystemWindowsConfiguration::operator =(JsonView jsonValue)
|
|
{
|
|
if(jsonValue.ValueExists("ActiveDirectoryId"))
|
|
{
|
|
m_activeDirectoryId = jsonValue.GetString("ActiveDirectoryId");
|
|
|
|
m_activeDirectoryIdHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("SelfManagedActiveDirectoryConfiguration"))
|
|
{
|
|
m_selfManagedActiveDirectoryConfiguration = jsonValue.GetObject("SelfManagedActiveDirectoryConfiguration");
|
|
|
|
m_selfManagedActiveDirectoryConfigurationHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("DeploymentType"))
|
|
{
|
|
m_deploymentType = WindowsDeploymentTypeMapper::GetWindowsDeploymentTypeForName(jsonValue.GetString("DeploymentType"));
|
|
|
|
m_deploymentTypeHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("PreferredSubnetId"))
|
|
{
|
|
m_preferredSubnetId = jsonValue.GetString("PreferredSubnetId");
|
|
|
|
m_preferredSubnetIdHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("ThroughputCapacity"))
|
|
{
|
|
m_throughputCapacity = jsonValue.GetInteger("ThroughputCapacity");
|
|
|
|
m_throughputCapacityHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("WeeklyMaintenanceStartTime"))
|
|
{
|
|
m_weeklyMaintenanceStartTime = jsonValue.GetString("WeeklyMaintenanceStartTime");
|
|
|
|
m_weeklyMaintenanceStartTimeHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("DailyAutomaticBackupStartTime"))
|
|
{
|
|
m_dailyAutomaticBackupStartTime = jsonValue.GetString("DailyAutomaticBackupStartTime");
|
|
|
|
m_dailyAutomaticBackupStartTimeHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("AutomaticBackupRetentionDays"))
|
|
{
|
|
m_automaticBackupRetentionDays = jsonValue.GetInteger("AutomaticBackupRetentionDays");
|
|
|
|
m_automaticBackupRetentionDaysHasBeenSet = true;
|
|
}
|
|
|
|
if(jsonValue.ValueExists("CopyTagsToBackups"))
|
|
{
|
|
m_copyTagsToBackups = jsonValue.GetBool("CopyTagsToBackups");
|
|
|
|
m_copyTagsToBackupsHasBeenSet = true;
|
|
}
|
|
|
|
return *this;
|
|
}
|
|
|
|
JsonValue CreateFileSystemWindowsConfiguration::Jsonize() const
|
|
{
|
|
JsonValue payload;
|
|
|
|
if(m_activeDirectoryIdHasBeenSet)
|
|
{
|
|
payload.WithString("ActiveDirectoryId", m_activeDirectoryId);
|
|
|
|
}
|
|
|
|
if(m_selfManagedActiveDirectoryConfigurationHasBeenSet)
|
|
{
|
|
payload.WithObject("SelfManagedActiveDirectoryConfiguration", m_selfManagedActiveDirectoryConfiguration.Jsonize());
|
|
|
|
}
|
|
|
|
if(m_deploymentTypeHasBeenSet)
|
|
{
|
|
payload.WithString("DeploymentType", WindowsDeploymentTypeMapper::GetNameForWindowsDeploymentType(m_deploymentType));
|
|
}
|
|
|
|
if(m_preferredSubnetIdHasBeenSet)
|
|
{
|
|
payload.WithString("PreferredSubnetId", m_preferredSubnetId);
|
|
|
|
}
|
|
|
|
if(m_throughputCapacityHasBeenSet)
|
|
{
|
|
payload.WithInteger("ThroughputCapacity", m_throughputCapacity);
|
|
|
|
}
|
|
|
|
if(m_weeklyMaintenanceStartTimeHasBeenSet)
|
|
{
|
|
payload.WithString("WeeklyMaintenanceStartTime", m_weeklyMaintenanceStartTime);
|
|
|
|
}
|
|
|
|
if(m_dailyAutomaticBackupStartTimeHasBeenSet)
|
|
{
|
|
payload.WithString("DailyAutomaticBackupStartTime", m_dailyAutomaticBackupStartTime);
|
|
|
|
}
|
|
|
|
if(m_automaticBackupRetentionDaysHasBeenSet)
|
|
{
|
|
payload.WithInteger("AutomaticBackupRetentionDays", m_automaticBackupRetentionDays);
|
|
|
|
}
|
|
|
|
if(m_copyTagsToBackupsHasBeenSet)
|
|
{
|
|
payload.WithBool("CopyTagsToBackups", m_copyTagsToBackups);
|
|
|
|
}
|
|
|
|
return payload;
|
|
}
|
|
|
|
} // namespace Model
|
|
} // namespace FSx
|
|
} // namespace Aws
|