/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace imagebuilder { namespace Model { /** *

Defines block device mappings for the instance used to configure your * image.

See Also:

AWS * API Reference

*/ class InstanceBlockDeviceMapping { public: AWS_IMAGEBUILDER_API InstanceBlockDeviceMapping(); AWS_IMAGEBUILDER_API InstanceBlockDeviceMapping(Aws::Utils::Json::JsonView jsonValue); AWS_IMAGEBUILDER_API InstanceBlockDeviceMapping& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_IMAGEBUILDER_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The device to which these mappings apply.

*/ inline const Aws::String& GetDeviceName() const{ return m_deviceName; } /** *

The device to which these mappings apply.

*/ inline bool DeviceNameHasBeenSet() const { return m_deviceNameHasBeenSet; } /** *

The device to which these mappings apply.

*/ inline void SetDeviceName(const Aws::String& value) { m_deviceNameHasBeenSet = true; m_deviceName = value; } /** *

The device to which these mappings apply.

*/ inline void SetDeviceName(Aws::String&& value) { m_deviceNameHasBeenSet = true; m_deviceName = std::move(value); } /** *

The device to which these mappings apply.

*/ inline void SetDeviceName(const char* value) { m_deviceNameHasBeenSet = true; m_deviceName.assign(value); } /** *

The device to which these mappings apply.

*/ inline InstanceBlockDeviceMapping& WithDeviceName(const Aws::String& value) { SetDeviceName(value); return *this;} /** *

The device to which these mappings apply.

*/ inline InstanceBlockDeviceMapping& WithDeviceName(Aws::String&& value) { SetDeviceName(std::move(value)); return *this;} /** *

The device to which these mappings apply.

*/ inline InstanceBlockDeviceMapping& WithDeviceName(const char* value) { SetDeviceName(value); return *this;} /** *

Use to manage Amazon EBS-specific configuration for this mapping.

*/ inline const EbsInstanceBlockDeviceSpecification& GetEbs() const{ return m_ebs; } /** *

Use to manage Amazon EBS-specific configuration for this mapping.

*/ inline bool EbsHasBeenSet() const { return m_ebsHasBeenSet; } /** *

Use to manage Amazon EBS-specific configuration for this mapping.

*/ inline void SetEbs(const EbsInstanceBlockDeviceSpecification& value) { m_ebsHasBeenSet = true; m_ebs = value; } /** *

Use to manage Amazon EBS-specific configuration for this mapping.

*/ inline void SetEbs(EbsInstanceBlockDeviceSpecification&& value) { m_ebsHasBeenSet = true; m_ebs = std::move(value); } /** *

Use to manage Amazon EBS-specific configuration for this mapping.

*/ inline InstanceBlockDeviceMapping& WithEbs(const EbsInstanceBlockDeviceSpecification& value) { SetEbs(value); return *this;} /** *

Use to manage Amazon EBS-specific configuration for this mapping.

*/ inline InstanceBlockDeviceMapping& WithEbs(EbsInstanceBlockDeviceSpecification&& value) { SetEbs(std::move(value)); return *this;} /** *

Use to manage instance ephemeral devices.

*/ inline const Aws::String& GetVirtualName() const{ return m_virtualName; } /** *

Use to manage instance ephemeral devices.

*/ inline bool VirtualNameHasBeenSet() const { return m_virtualNameHasBeenSet; } /** *

Use to manage instance ephemeral devices.

*/ inline void SetVirtualName(const Aws::String& value) { m_virtualNameHasBeenSet = true; m_virtualName = value; } /** *

Use to manage instance ephemeral devices.

*/ inline void SetVirtualName(Aws::String&& value) { m_virtualNameHasBeenSet = true; m_virtualName = std::move(value); } /** *

Use to manage instance ephemeral devices.

*/ inline void SetVirtualName(const char* value) { m_virtualNameHasBeenSet = true; m_virtualName.assign(value); } /** *

Use to manage instance ephemeral devices.

*/ inline InstanceBlockDeviceMapping& WithVirtualName(const Aws::String& value) { SetVirtualName(value); return *this;} /** *

Use to manage instance ephemeral devices.

*/ inline InstanceBlockDeviceMapping& WithVirtualName(Aws::String&& value) { SetVirtualName(std::move(value)); return *this;} /** *

Use to manage instance ephemeral devices.

*/ inline InstanceBlockDeviceMapping& WithVirtualName(const char* value) { SetVirtualName(value); return *this;} /** *

Use to remove a mapping from the base image.

*/ inline const Aws::String& GetNoDevice() const{ return m_noDevice; } /** *

Use to remove a mapping from the base image.

*/ inline bool NoDeviceHasBeenSet() const { return m_noDeviceHasBeenSet; } /** *

Use to remove a mapping from the base image.

*/ inline void SetNoDevice(const Aws::String& value) { m_noDeviceHasBeenSet = true; m_noDevice = value; } /** *

Use to remove a mapping from the base image.

*/ inline void SetNoDevice(Aws::String&& value) { m_noDeviceHasBeenSet = true; m_noDevice = std::move(value); } /** *

Use to remove a mapping from the base image.

*/ inline void SetNoDevice(const char* value) { m_noDeviceHasBeenSet = true; m_noDevice.assign(value); } /** *

Use to remove a mapping from the base image.

*/ inline InstanceBlockDeviceMapping& WithNoDevice(const Aws::String& value) { SetNoDevice(value); return *this;} /** *

Use to remove a mapping from the base image.

*/ inline InstanceBlockDeviceMapping& WithNoDevice(Aws::String&& value) { SetNoDevice(std::move(value)); return *this;} /** *

Use to remove a mapping from the base image.

*/ inline InstanceBlockDeviceMapping& WithNoDevice(const char* value) { SetNoDevice(value); return *this;} private: Aws::String m_deviceName; bool m_deviceNameHasBeenSet = false; EbsInstanceBlockDeviceSpecification m_ebs; bool m_ebsHasBeenSet = false; Aws::String m_virtualName; bool m_virtualNameHasBeenSet = false; Aws::String m_noDevice; bool m_noDeviceHasBeenSet = false; }; } // namespace Model } // namespace imagebuilder } // namespace Aws