{-# 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.OptionRestrictionRegex where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data OptionRestrictionRegex = OptionRestrictionRegex'
{
OptionRestrictionRegex -> Maybe Text
pattern' :: Prelude.Maybe Prelude.Text,
OptionRestrictionRegex -> Maybe Text
label :: Prelude.Maybe Prelude.Text
}
deriving (OptionRestrictionRegex -> OptionRestrictionRegex -> Bool
(OptionRestrictionRegex -> OptionRestrictionRegex -> Bool)
-> (OptionRestrictionRegex -> OptionRestrictionRegex -> Bool)
-> Eq OptionRestrictionRegex
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: OptionRestrictionRegex -> OptionRestrictionRegex -> Bool
$c/= :: OptionRestrictionRegex -> OptionRestrictionRegex -> Bool
== :: OptionRestrictionRegex -> OptionRestrictionRegex -> Bool
$c== :: OptionRestrictionRegex -> OptionRestrictionRegex -> Bool
Prelude.Eq, ReadPrec [OptionRestrictionRegex]
ReadPrec OptionRestrictionRegex
Int -> ReadS OptionRestrictionRegex
ReadS [OptionRestrictionRegex]
(Int -> ReadS OptionRestrictionRegex)
-> ReadS [OptionRestrictionRegex]
-> ReadPrec OptionRestrictionRegex
-> ReadPrec [OptionRestrictionRegex]
-> Read OptionRestrictionRegex
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [OptionRestrictionRegex]
$creadListPrec :: ReadPrec [OptionRestrictionRegex]
readPrec :: ReadPrec OptionRestrictionRegex
$creadPrec :: ReadPrec OptionRestrictionRegex
readList :: ReadS [OptionRestrictionRegex]
$creadList :: ReadS [OptionRestrictionRegex]
readsPrec :: Int -> ReadS OptionRestrictionRegex
$creadsPrec :: Int -> ReadS OptionRestrictionRegex
Prelude.Read, Int -> OptionRestrictionRegex -> ShowS
[OptionRestrictionRegex] -> ShowS
OptionRestrictionRegex -> String
(Int -> OptionRestrictionRegex -> ShowS)
-> (OptionRestrictionRegex -> String)
-> ([OptionRestrictionRegex] -> ShowS)
-> Show OptionRestrictionRegex
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [OptionRestrictionRegex] -> ShowS
$cshowList :: [OptionRestrictionRegex] -> ShowS
show :: OptionRestrictionRegex -> String
$cshow :: OptionRestrictionRegex -> String
showsPrec :: Int -> OptionRestrictionRegex -> ShowS
$cshowsPrec :: Int -> OptionRestrictionRegex -> ShowS
Prelude.Show, (forall x. OptionRestrictionRegex -> Rep OptionRestrictionRegex x)
-> (forall x.
Rep OptionRestrictionRegex x -> OptionRestrictionRegex)
-> Generic OptionRestrictionRegex
forall x. Rep OptionRestrictionRegex x -> OptionRestrictionRegex
forall x. OptionRestrictionRegex -> Rep OptionRestrictionRegex x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep OptionRestrictionRegex x -> OptionRestrictionRegex
$cfrom :: forall x. OptionRestrictionRegex -> Rep OptionRestrictionRegex x
Prelude.Generic)
newOptionRestrictionRegex ::
OptionRestrictionRegex
newOptionRestrictionRegex :: OptionRestrictionRegex
newOptionRestrictionRegex =
OptionRestrictionRegex' :: Maybe Text -> Maybe Text -> OptionRestrictionRegex
OptionRestrictionRegex'
{ $sel:pattern':OptionRestrictionRegex' :: Maybe Text
pattern' = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:label:OptionRestrictionRegex' :: Maybe Text
label = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
optionRestrictionRegex_pattern :: Lens.Lens' OptionRestrictionRegex (Prelude.Maybe Prelude.Text)
optionRestrictionRegex_pattern :: (Maybe Text -> f (Maybe Text))
-> OptionRestrictionRegex -> f OptionRestrictionRegex
optionRestrictionRegex_pattern = (OptionRestrictionRegex -> Maybe Text)
-> (OptionRestrictionRegex -> Maybe Text -> OptionRestrictionRegex)
-> Lens
OptionRestrictionRegex
OptionRestrictionRegex
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OptionRestrictionRegex' {Maybe Text
pattern' :: Maybe Text
$sel:pattern':OptionRestrictionRegex' :: OptionRestrictionRegex -> Maybe Text
pattern'} -> Maybe Text
pattern') (\s :: OptionRestrictionRegex
s@OptionRestrictionRegex' {} Maybe Text
a -> OptionRestrictionRegex
s {$sel:pattern':OptionRestrictionRegex' :: Maybe Text
pattern' = Maybe Text
a} :: OptionRestrictionRegex)
optionRestrictionRegex_label :: Lens.Lens' OptionRestrictionRegex (Prelude.Maybe Prelude.Text)
optionRestrictionRegex_label :: (Maybe Text -> f (Maybe Text))
-> OptionRestrictionRegex -> f OptionRestrictionRegex
optionRestrictionRegex_label = (OptionRestrictionRegex -> Maybe Text)
-> (OptionRestrictionRegex -> Maybe Text -> OptionRestrictionRegex)
-> Lens
OptionRestrictionRegex
OptionRestrictionRegex
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\OptionRestrictionRegex' {Maybe Text
label :: Maybe Text
$sel:label:OptionRestrictionRegex' :: OptionRestrictionRegex -> Maybe Text
label} -> Maybe Text
label) (\s :: OptionRestrictionRegex
s@OptionRestrictionRegex' {} Maybe Text
a -> OptionRestrictionRegex
s {$sel:label:OptionRestrictionRegex' :: Maybe Text
label = Maybe Text
a} :: OptionRestrictionRegex)
instance Core.FromXML OptionRestrictionRegex where
parseXML :: [Node] -> Either String OptionRestrictionRegex
parseXML [Node]
x =
Maybe Text -> Maybe Text -> OptionRestrictionRegex
OptionRestrictionRegex'
(Maybe Text -> Maybe Text -> OptionRestrictionRegex)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> OptionRestrictionRegex)
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
"Pattern")
Either String (Maybe Text -> OptionRestrictionRegex)
-> Either String (Maybe Text)
-> Either String OptionRestrictionRegex
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
"Label")
instance Prelude.Hashable OptionRestrictionRegex
instance Prelude.NFData OptionRestrictionRegex