{-# 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.PlatformFilter where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data PlatformFilter = PlatformFilter'
{
PlatformFilter -> Maybe [Text]
values :: Prelude.Maybe [Prelude.Text],
PlatformFilter -> Maybe Text
operator :: Prelude.Maybe Prelude.Text,
PlatformFilter -> Maybe Text
type' :: Prelude.Maybe Prelude.Text
}
deriving (PlatformFilter -> PlatformFilter -> Bool
(PlatformFilter -> PlatformFilter -> Bool)
-> (PlatformFilter -> PlatformFilter -> Bool) -> Eq PlatformFilter
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PlatformFilter -> PlatformFilter -> Bool
$c/= :: PlatformFilter -> PlatformFilter -> Bool
== :: PlatformFilter -> PlatformFilter -> Bool
$c== :: PlatformFilter -> PlatformFilter -> Bool
Prelude.Eq, ReadPrec [PlatformFilter]
ReadPrec PlatformFilter
Int -> ReadS PlatformFilter
ReadS [PlatformFilter]
(Int -> ReadS PlatformFilter)
-> ReadS [PlatformFilter]
-> ReadPrec PlatformFilter
-> ReadPrec [PlatformFilter]
-> Read PlatformFilter
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PlatformFilter]
$creadListPrec :: ReadPrec [PlatformFilter]
readPrec :: ReadPrec PlatformFilter
$creadPrec :: ReadPrec PlatformFilter
readList :: ReadS [PlatformFilter]
$creadList :: ReadS [PlatformFilter]
readsPrec :: Int -> ReadS PlatformFilter
$creadsPrec :: Int -> ReadS PlatformFilter
Prelude.Read, Int -> PlatformFilter -> ShowS
[PlatformFilter] -> ShowS
PlatformFilter -> String
(Int -> PlatformFilter -> ShowS)
-> (PlatformFilter -> String)
-> ([PlatformFilter] -> ShowS)
-> Show PlatformFilter
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PlatformFilter] -> ShowS
$cshowList :: [PlatformFilter] -> ShowS
show :: PlatformFilter -> String
$cshow :: PlatformFilter -> String
showsPrec :: Int -> PlatformFilter -> ShowS
$cshowsPrec :: Int -> PlatformFilter -> ShowS
Prelude.Show, (forall x. PlatformFilter -> Rep PlatformFilter x)
-> (forall x. Rep PlatformFilter x -> PlatformFilter)
-> Generic PlatformFilter
forall x. Rep PlatformFilter x -> PlatformFilter
forall x. PlatformFilter -> Rep PlatformFilter x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PlatformFilter x -> PlatformFilter
$cfrom :: forall x. PlatformFilter -> Rep PlatformFilter x
Prelude.Generic)
newPlatformFilter ::
PlatformFilter
newPlatformFilter :: PlatformFilter
newPlatformFilter =
PlatformFilter' :: Maybe [Text] -> Maybe Text -> Maybe Text -> PlatformFilter
PlatformFilter'
{ $sel:values:PlatformFilter' :: Maybe [Text]
values = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:operator:PlatformFilter' :: Maybe Text
operator = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:type':PlatformFilter' :: Maybe Text
type' = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
platformFilter_values :: Lens.Lens' PlatformFilter (Prelude.Maybe [Prelude.Text])
platformFilter_values :: (Maybe [Text] -> f (Maybe [Text]))
-> PlatformFilter -> f PlatformFilter
platformFilter_values = (PlatformFilter -> Maybe [Text])
-> (PlatformFilter -> Maybe [Text] -> PlatformFilter)
-> Lens PlatformFilter PlatformFilter (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PlatformFilter' {Maybe [Text]
values :: Maybe [Text]
$sel:values:PlatformFilter' :: PlatformFilter -> Maybe [Text]
values} -> Maybe [Text]
values) (\s :: PlatformFilter
s@PlatformFilter' {} Maybe [Text]
a -> PlatformFilter
s {$sel:values:PlatformFilter' :: Maybe [Text]
values = Maybe [Text]
a} :: PlatformFilter) ((Maybe [Text] -> f (Maybe [Text]))
-> PlatformFilter -> f PlatformFilter)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> PlatformFilter
-> f PlatformFilter
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
platformFilter_operator :: Lens.Lens' PlatformFilter (Prelude.Maybe Prelude.Text)
platformFilter_operator :: (Maybe Text -> f (Maybe Text))
-> PlatformFilter -> f PlatformFilter
platformFilter_operator = (PlatformFilter -> Maybe Text)
-> (PlatformFilter -> Maybe Text -> PlatformFilter)
-> Lens PlatformFilter PlatformFilter (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PlatformFilter' {Maybe Text
operator :: Maybe Text
$sel:operator:PlatformFilter' :: PlatformFilter -> Maybe Text
operator} -> Maybe Text
operator) (\s :: PlatformFilter
s@PlatformFilter' {} Maybe Text
a -> PlatformFilter
s {$sel:operator:PlatformFilter' :: Maybe Text
operator = Maybe Text
a} :: PlatformFilter)
platformFilter_type :: Lens.Lens' PlatformFilter (Prelude.Maybe Prelude.Text)
platformFilter_type :: (Maybe Text -> f (Maybe Text))
-> PlatformFilter -> f PlatformFilter
platformFilter_type = (PlatformFilter -> Maybe Text)
-> (PlatformFilter -> Maybe Text -> PlatformFilter)
-> Lens PlatformFilter PlatformFilter (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PlatformFilter' {Maybe Text
type' :: Maybe Text
$sel:type':PlatformFilter' :: PlatformFilter -> Maybe Text
type'} -> Maybe Text
type') (\s :: PlatformFilter
s@PlatformFilter' {} Maybe Text
a -> PlatformFilter
s {$sel:type':PlatformFilter' :: Maybe Text
type' = Maybe Text
a} :: PlatformFilter)
instance Prelude.Hashable PlatformFilter
instance Prelude.NFData PlatformFilter
instance Core.ToQuery PlatformFilter where
toQuery :: PlatformFilter -> QueryString
toQuery PlatformFilter' {Maybe [Text]
Maybe Text
type' :: Maybe Text
operator :: Maybe Text
values :: Maybe [Text]
$sel:type':PlatformFilter' :: PlatformFilter -> Maybe Text
$sel:operator:PlatformFilter' :: PlatformFilter -> Maybe Text
$sel:values:PlatformFilter' :: PlatformFilter -> Maybe [Text]
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Values"
ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
(ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"member" ([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
values),
ByteString
"Operator" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
operator,
ByteString
"Type" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
type'
]