{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.EC2.Types.DeviceOptions where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EC2.Internal
import qualified Amazonka.Prelude as Prelude
data DeviceOptions = DeviceOptions'
{
DeviceOptions -> Maybe Text
tenantId :: Prelude.Maybe Prelude.Text
}
deriving (DeviceOptions -> DeviceOptions -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeviceOptions -> DeviceOptions -> Bool
$c/= :: DeviceOptions -> DeviceOptions -> Bool
== :: DeviceOptions -> DeviceOptions -> Bool
$c== :: DeviceOptions -> DeviceOptions -> Bool
Prelude.Eq, ReadPrec [DeviceOptions]
ReadPrec DeviceOptions
Int -> ReadS DeviceOptions
ReadS [DeviceOptions]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeviceOptions]
$creadListPrec :: ReadPrec [DeviceOptions]
readPrec :: ReadPrec DeviceOptions
$creadPrec :: ReadPrec DeviceOptions
readList :: ReadS [DeviceOptions]
$creadList :: ReadS [DeviceOptions]
readsPrec :: Int -> ReadS DeviceOptions
$creadsPrec :: Int -> ReadS DeviceOptions
Prelude.Read, Int -> DeviceOptions -> ShowS
[DeviceOptions] -> ShowS
DeviceOptions -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeviceOptions] -> ShowS
$cshowList :: [DeviceOptions] -> ShowS
show :: DeviceOptions -> String
$cshow :: DeviceOptions -> String
showsPrec :: Int -> DeviceOptions -> ShowS
$cshowsPrec :: Int -> DeviceOptions -> ShowS
Prelude.Show, forall x. Rep DeviceOptions x -> DeviceOptions
forall x. DeviceOptions -> Rep DeviceOptions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeviceOptions x -> DeviceOptions
$cfrom :: forall x. DeviceOptions -> Rep DeviceOptions x
Prelude.Generic)
newDeviceOptions ::
DeviceOptions
newDeviceOptions :: DeviceOptions
newDeviceOptions =
DeviceOptions' {$sel:tenantId:DeviceOptions' :: Maybe Text
tenantId = forall a. Maybe a
Prelude.Nothing}
deviceOptions_tenantId :: Lens.Lens' DeviceOptions (Prelude.Maybe Prelude.Text)
deviceOptions_tenantId :: Lens' DeviceOptions (Maybe Text)
deviceOptions_tenantId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeviceOptions' {Maybe Text
tenantId :: Maybe Text
$sel:tenantId:DeviceOptions' :: DeviceOptions -> Maybe Text
tenantId} -> Maybe Text
tenantId) (\s :: DeviceOptions
s@DeviceOptions' {} Maybe Text
a -> DeviceOptions
s {$sel:tenantId:DeviceOptions' :: Maybe Text
tenantId = Maybe Text
a} :: DeviceOptions)
instance Data.FromXML DeviceOptions where
parseXML :: [Node] -> Either String DeviceOptions
parseXML [Node]
x =
Maybe Text -> DeviceOptions
DeviceOptions' forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"tenantId")
instance Prelude.Hashable DeviceOptions where
hashWithSalt :: Int -> DeviceOptions -> Int
hashWithSalt Int
_salt DeviceOptions' {Maybe Text
tenantId :: Maybe Text
$sel:tenantId:DeviceOptions' :: DeviceOptions -> Maybe Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
tenantId
instance Prelude.NFData DeviceOptions where
rnf :: DeviceOptions -> ()
rnf DeviceOptions' {Maybe Text
tenantId :: Maybe Text
$sel:tenantId:DeviceOptions' :: DeviceOptions -> Maybe Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
tenantId