This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
pxz-hos-client-cpp-module/support/aws-sdk-cpp-master/aws-cpp-sdk-elasticfilesystem/source/model/MountTargetDescription.cpp

196 lines
4.1 KiB
C++

/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/elasticfilesystem/model/MountTargetDescription.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace EFS
{
namespace Model
{
MountTargetDescription::MountTargetDescription() :
m_ownerIdHasBeenSet(false),
m_mountTargetIdHasBeenSet(false),
m_fileSystemIdHasBeenSet(false),
m_subnetIdHasBeenSet(false),
m_lifeCycleState(LifeCycleState::NOT_SET),
m_lifeCycleStateHasBeenSet(false),
m_ipAddressHasBeenSet(false),
m_networkInterfaceIdHasBeenSet(false),
m_availabilityZoneIdHasBeenSet(false),
m_availabilityZoneNameHasBeenSet(false),
m_vpcIdHasBeenSet(false)
{
}
MountTargetDescription::MountTargetDescription(JsonView jsonValue) :
m_ownerIdHasBeenSet(false),
m_mountTargetIdHasBeenSet(false),
m_fileSystemIdHasBeenSet(false),
m_subnetIdHasBeenSet(false),
m_lifeCycleState(LifeCycleState::NOT_SET),
m_lifeCycleStateHasBeenSet(false),
m_ipAddressHasBeenSet(false),
m_networkInterfaceIdHasBeenSet(false),
m_availabilityZoneIdHasBeenSet(false),
m_availabilityZoneNameHasBeenSet(false),
m_vpcIdHasBeenSet(false)
{
*this = jsonValue;
}
MountTargetDescription& MountTargetDescription::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("OwnerId"))
{
m_ownerId = jsonValue.GetString("OwnerId");
m_ownerIdHasBeenSet = true;
}
if(jsonValue.ValueExists("MountTargetId"))
{
m_mountTargetId = jsonValue.GetString("MountTargetId");
m_mountTargetIdHasBeenSet = true;
}
if(jsonValue.ValueExists("FileSystemId"))
{
m_fileSystemId = jsonValue.GetString("FileSystemId");
m_fileSystemIdHasBeenSet = true;
}
if(jsonValue.ValueExists("SubnetId"))
{
m_subnetId = jsonValue.GetString("SubnetId");
m_subnetIdHasBeenSet = true;
}
if(jsonValue.ValueExists("LifeCycleState"))
{
m_lifeCycleState = LifeCycleStateMapper::GetLifeCycleStateForName(jsonValue.GetString("LifeCycleState"));
m_lifeCycleStateHasBeenSet = true;
}
if(jsonValue.ValueExists("IpAddress"))
{
m_ipAddress = jsonValue.GetString("IpAddress");
m_ipAddressHasBeenSet = true;
}
if(jsonValue.ValueExists("NetworkInterfaceId"))
{
m_networkInterfaceId = jsonValue.GetString("NetworkInterfaceId");
m_networkInterfaceIdHasBeenSet = true;
}
if(jsonValue.ValueExists("AvailabilityZoneId"))
{
m_availabilityZoneId = jsonValue.GetString("AvailabilityZoneId");
m_availabilityZoneIdHasBeenSet = true;
}
if(jsonValue.ValueExists("AvailabilityZoneName"))
{
m_availabilityZoneName = jsonValue.GetString("AvailabilityZoneName");
m_availabilityZoneNameHasBeenSet = true;
}
if(jsonValue.ValueExists("VpcId"))
{
m_vpcId = jsonValue.GetString("VpcId");
m_vpcIdHasBeenSet = true;
}
return *this;
}
JsonValue MountTargetDescription::Jsonize() const
{
JsonValue payload;
if(m_ownerIdHasBeenSet)
{
payload.WithString("OwnerId", m_ownerId);
}
if(m_mountTargetIdHasBeenSet)
{
payload.WithString("MountTargetId", m_mountTargetId);
}
if(m_fileSystemIdHasBeenSet)
{
payload.WithString("FileSystemId", m_fileSystemId);
}
if(m_subnetIdHasBeenSet)
{
payload.WithString("SubnetId", m_subnetId);
}
if(m_lifeCycleStateHasBeenSet)
{
payload.WithString("LifeCycleState", LifeCycleStateMapper::GetNameForLifeCycleState(m_lifeCycleState));
}
if(m_ipAddressHasBeenSet)
{
payload.WithString("IpAddress", m_ipAddress);
}
if(m_networkInterfaceIdHasBeenSet)
{
payload.WithString("NetworkInterfaceId", m_networkInterfaceId);
}
if(m_availabilityZoneIdHasBeenSet)
{
payload.WithString("AvailabilityZoneId", m_availabilityZoneId);
}
if(m_availabilityZoneNameHasBeenSet)
{
payload.WithString("AvailabilityZoneName", m_availabilityZoneName);
}
if(m_vpcIdHasBeenSet)
{
payload.WithString("VpcId", m_vpcId);
}
return payload;
}
} // namespace Model
} // namespace EFS
} // namespace Aws