module Stratosphere.Resources.VolumeAttachment where
import Control.Lens
import Data.Aeson
import Data.Aeson.Types
import Data.Text
import GHC.Generics
import Stratosphere.Values
data VolumeAttachment =
VolumeAttachment
{ _volumeAttachmentDevice :: Val Text
, _volumeAttachmentInstanceId :: Val Text
, _volumeAttachmentVolumeId :: Val Text
} deriving (Show, Generic)
instance ToJSON VolumeAttachment where
toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 17, omitNothingFields = True }
instance FromJSON VolumeAttachment where
parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 17, omitNothingFields = True }
volumeAttachment
:: Val Text
-> Val Text
-> Val Text
-> VolumeAttachment
volumeAttachment devicearg instanceIdarg volumeIdarg =
VolumeAttachment
{ _volumeAttachmentDevice = devicearg
, _volumeAttachmentInstanceId = instanceIdarg
, _volumeAttachmentVolumeId = volumeIdarg
}
vaDevice :: Lens' VolumeAttachment (Val Text)
vaDevice = lens _volumeAttachmentDevice (\s a -> s { _volumeAttachmentDevice = a })
vaInstanceId :: Lens' VolumeAttachment (Val Text)
vaInstanceId = lens _volumeAttachmentInstanceId (\s a -> s { _volumeAttachmentInstanceId = a })
vaVolumeId :: Lens' VolumeAttachment (Val Text)
vaVolumeId = lens _volumeAttachmentVolumeId (\s a -> s { _volumeAttachmentVolumeId = a })