{-# 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.ElasticBeanstalk.Types.CustomAmi where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CustomAmi = CustomAmi'
{
CustomAmi -> Maybe Text
virtualizationType :: Prelude.Maybe Prelude.Text,
CustomAmi -> Maybe Text
imageId :: Prelude.Maybe Prelude.Text
}
deriving (CustomAmi -> CustomAmi -> Bool
(CustomAmi -> CustomAmi -> Bool)
-> (CustomAmi -> CustomAmi -> Bool) -> Eq CustomAmi
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CustomAmi -> CustomAmi -> Bool
$c/= :: CustomAmi -> CustomAmi -> Bool
== :: CustomAmi -> CustomAmi -> Bool
$c== :: CustomAmi -> CustomAmi -> Bool
Prelude.Eq, ReadPrec [CustomAmi]
ReadPrec CustomAmi
Int -> ReadS CustomAmi
ReadS [CustomAmi]
(Int -> ReadS CustomAmi)
-> ReadS [CustomAmi]
-> ReadPrec CustomAmi
-> ReadPrec [CustomAmi]
-> Read CustomAmi
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CustomAmi]
$creadListPrec :: ReadPrec [CustomAmi]
readPrec :: ReadPrec CustomAmi
$creadPrec :: ReadPrec CustomAmi
readList :: ReadS [CustomAmi]
$creadList :: ReadS [CustomAmi]
readsPrec :: Int -> ReadS CustomAmi
$creadsPrec :: Int -> ReadS CustomAmi
Prelude.Read, Int -> CustomAmi -> ShowS
[CustomAmi] -> ShowS
CustomAmi -> String
(Int -> CustomAmi -> ShowS)
-> (CustomAmi -> String)
-> ([CustomAmi] -> ShowS)
-> Show CustomAmi
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CustomAmi] -> ShowS
$cshowList :: [CustomAmi] -> ShowS
show :: CustomAmi -> String
$cshow :: CustomAmi -> String
showsPrec :: Int -> CustomAmi -> ShowS
$cshowsPrec :: Int -> CustomAmi -> ShowS
Prelude.Show, (forall x. CustomAmi -> Rep CustomAmi x)
-> (forall x. Rep CustomAmi x -> CustomAmi) -> Generic CustomAmi
forall x. Rep CustomAmi x -> CustomAmi
forall x. CustomAmi -> Rep CustomAmi x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CustomAmi x -> CustomAmi
$cfrom :: forall x. CustomAmi -> Rep CustomAmi x
Prelude.Generic)
newCustomAmi ::
CustomAmi
newCustomAmi :: CustomAmi
newCustomAmi =
CustomAmi' :: Maybe Text -> Maybe Text -> CustomAmi
CustomAmi'
{ $sel:virtualizationType:CustomAmi' :: Maybe Text
virtualizationType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:imageId:CustomAmi' :: Maybe Text
imageId = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
customAmi_virtualizationType :: Lens.Lens' CustomAmi (Prelude.Maybe Prelude.Text)
customAmi_virtualizationType :: (Maybe Text -> f (Maybe Text)) -> CustomAmi -> f CustomAmi
customAmi_virtualizationType = (CustomAmi -> Maybe Text)
-> (CustomAmi -> Maybe Text -> CustomAmi)
-> Lens CustomAmi CustomAmi (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomAmi' {Maybe Text
virtualizationType :: Maybe Text
$sel:virtualizationType:CustomAmi' :: CustomAmi -> Maybe Text
virtualizationType} -> Maybe Text
virtualizationType) (\s :: CustomAmi
s@CustomAmi' {} Maybe Text
a -> CustomAmi
s {$sel:virtualizationType:CustomAmi' :: Maybe Text
virtualizationType = Maybe Text
a} :: CustomAmi)
customAmi_imageId :: Lens.Lens' CustomAmi (Prelude.Maybe Prelude.Text)
customAmi_imageId :: (Maybe Text -> f (Maybe Text)) -> CustomAmi -> f CustomAmi
customAmi_imageId = (CustomAmi -> Maybe Text)
-> (CustomAmi -> Maybe Text -> CustomAmi)
-> Lens CustomAmi CustomAmi (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomAmi' {Maybe Text
imageId :: Maybe Text
$sel:imageId:CustomAmi' :: CustomAmi -> Maybe Text
imageId} -> Maybe Text
imageId) (\s :: CustomAmi
s@CustomAmi' {} Maybe Text
a -> CustomAmi
s {$sel:imageId:CustomAmi' :: Maybe Text
imageId = Maybe Text
a} :: CustomAmi)
instance Core.FromXML CustomAmi where
parseXML :: [Node] -> Either String CustomAmi
parseXML [Node]
x =
Maybe Text -> Maybe Text -> CustomAmi
CustomAmi'
(Maybe Text -> Maybe Text -> CustomAmi)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> CustomAmi)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"VirtualizationType")
Either String (Maybe Text -> CustomAmi)
-> Either String (Maybe Text) -> Either String CustomAmi
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ImageId")
instance Prelude.Hashable CustomAmi
instance Prelude.NFData CustomAmi