{-# 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.WorkMail.Types.MobileDeviceAccessMatchedRule where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data MobileDeviceAccessMatchedRule = MobileDeviceAccessMatchedRule'
{
MobileDeviceAccessMatchedRule -> Maybe Text
mobileDeviceAccessRuleId :: Prelude.Maybe Prelude.Text,
MobileDeviceAccessMatchedRule -> Maybe Text
name :: Prelude.Maybe Prelude.Text
}
deriving (MobileDeviceAccessMatchedRule
-> MobileDeviceAccessMatchedRule -> Bool
(MobileDeviceAccessMatchedRule
-> MobileDeviceAccessMatchedRule -> Bool)
-> (MobileDeviceAccessMatchedRule
-> MobileDeviceAccessMatchedRule -> Bool)
-> Eq MobileDeviceAccessMatchedRule
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MobileDeviceAccessMatchedRule
-> MobileDeviceAccessMatchedRule -> Bool
$c/= :: MobileDeviceAccessMatchedRule
-> MobileDeviceAccessMatchedRule -> Bool
== :: MobileDeviceAccessMatchedRule
-> MobileDeviceAccessMatchedRule -> Bool
$c== :: MobileDeviceAccessMatchedRule
-> MobileDeviceAccessMatchedRule -> Bool
Prelude.Eq, ReadPrec [MobileDeviceAccessMatchedRule]
ReadPrec MobileDeviceAccessMatchedRule
Int -> ReadS MobileDeviceAccessMatchedRule
ReadS [MobileDeviceAccessMatchedRule]
(Int -> ReadS MobileDeviceAccessMatchedRule)
-> ReadS [MobileDeviceAccessMatchedRule]
-> ReadPrec MobileDeviceAccessMatchedRule
-> ReadPrec [MobileDeviceAccessMatchedRule]
-> Read MobileDeviceAccessMatchedRule
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MobileDeviceAccessMatchedRule]
$creadListPrec :: ReadPrec [MobileDeviceAccessMatchedRule]
readPrec :: ReadPrec MobileDeviceAccessMatchedRule
$creadPrec :: ReadPrec MobileDeviceAccessMatchedRule
readList :: ReadS [MobileDeviceAccessMatchedRule]
$creadList :: ReadS [MobileDeviceAccessMatchedRule]
readsPrec :: Int -> ReadS MobileDeviceAccessMatchedRule
$creadsPrec :: Int -> ReadS MobileDeviceAccessMatchedRule
Prelude.Read, Int -> MobileDeviceAccessMatchedRule -> ShowS
[MobileDeviceAccessMatchedRule] -> ShowS
MobileDeviceAccessMatchedRule -> String
(Int -> MobileDeviceAccessMatchedRule -> ShowS)
-> (MobileDeviceAccessMatchedRule -> String)
-> ([MobileDeviceAccessMatchedRule] -> ShowS)
-> Show MobileDeviceAccessMatchedRule
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MobileDeviceAccessMatchedRule] -> ShowS
$cshowList :: [MobileDeviceAccessMatchedRule] -> ShowS
show :: MobileDeviceAccessMatchedRule -> String
$cshow :: MobileDeviceAccessMatchedRule -> String
showsPrec :: Int -> MobileDeviceAccessMatchedRule -> ShowS
$cshowsPrec :: Int -> MobileDeviceAccessMatchedRule -> ShowS
Prelude.Show, (forall x.
MobileDeviceAccessMatchedRule
-> Rep MobileDeviceAccessMatchedRule x)
-> (forall x.
Rep MobileDeviceAccessMatchedRule x
-> MobileDeviceAccessMatchedRule)
-> Generic MobileDeviceAccessMatchedRule
forall x.
Rep MobileDeviceAccessMatchedRule x
-> MobileDeviceAccessMatchedRule
forall x.
MobileDeviceAccessMatchedRule
-> Rep MobileDeviceAccessMatchedRule x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep MobileDeviceAccessMatchedRule x
-> MobileDeviceAccessMatchedRule
$cfrom :: forall x.
MobileDeviceAccessMatchedRule
-> Rep MobileDeviceAccessMatchedRule x
Prelude.Generic)
newMobileDeviceAccessMatchedRule ::
MobileDeviceAccessMatchedRule
newMobileDeviceAccessMatchedRule :: MobileDeviceAccessMatchedRule
newMobileDeviceAccessMatchedRule =
MobileDeviceAccessMatchedRule' :: Maybe Text -> Maybe Text -> MobileDeviceAccessMatchedRule
MobileDeviceAccessMatchedRule'
{ $sel:mobileDeviceAccessRuleId:MobileDeviceAccessMatchedRule' :: Maybe Text
mobileDeviceAccessRuleId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:MobileDeviceAccessMatchedRule' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
mobileDeviceAccessMatchedRule_mobileDeviceAccessRuleId :: Lens.Lens' MobileDeviceAccessMatchedRule (Prelude.Maybe Prelude.Text)
mobileDeviceAccessMatchedRule_mobileDeviceAccessRuleId :: (Maybe Text -> f (Maybe Text))
-> MobileDeviceAccessMatchedRule -> f MobileDeviceAccessMatchedRule
mobileDeviceAccessMatchedRule_mobileDeviceAccessRuleId = (MobileDeviceAccessMatchedRule -> Maybe Text)
-> (MobileDeviceAccessMatchedRule
-> Maybe Text -> MobileDeviceAccessMatchedRule)
-> Lens
MobileDeviceAccessMatchedRule
MobileDeviceAccessMatchedRule
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MobileDeviceAccessMatchedRule' {Maybe Text
mobileDeviceAccessRuleId :: Maybe Text
$sel:mobileDeviceAccessRuleId:MobileDeviceAccessMatchedRule' :: MobileDeviceAccessMatchedRule -> Maybe Text
mobileDeviceAccessRuleId} -> Maybe Text
mobileDeviceAccessRuleId) (\s :: MobileDeviceAccessMatchedRule
s@MobileDeviceAccessMatchedRule' {} Maybe Text
a -> MobileDeviceAccessMatchedRule
s {$sel:mobileDeviceAccessRuleId:MobileDeviceAccessMatchedRule' :: Maybe Text
mobileDeviceAccessRuleId = Maybe Text
a} :: MobileDeviceAccessMatchedRule)
mobileDeviceAccessMatchedRule_name :: Lens.Lens' MobileDeviceAccessMatchedRule (Prelude.Maybe Prelude.Text)
mobileDeviceAccessMatchedRule_name :: (Maybe Text -> f (Maybe Text))
-> MobileDeviceAccessMatchedRule -> f MobileDeviceAccessMatchedRule
mobileDeviceAccessMatchedRule_name = (MobileDeviceAccessMatchedRule -> Maybe Text)
-> (MobileDeviceAccessMatchedRule
-> Maybe Text -> MobileDeviceAccessMatchedRule)
-> Lens
MobileDeviceAccessMatchedRule
MobileDeviceAccessMatchedRule
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MobileDeviceAccessMatchedRule' {Maybe Text
name :: Maybe Text
$sel:name:MobileDeviceAccessMatchedRule' :: MobileDeviceAccessMatchedRule -> Maybe Text
name} -> Maybe Text
name) (\s :: MobileDeviceAccessMatchedRule
s@MobileDeviceAccessMatchedRule' {} Maybe Text
a -> MobileDeviceAccessMatchedRule
s {$sel:name:MobileDeviceAccessMatchedRule' :: Maybe Text
name = Maybe Text
a} :: MobileDeviceAccessMatchedRule)
instance Core.FromJSON MobileDeviceAccessMatchedRule where
parseJSON :: Value -> Parser MobileDeviceAccessMatchedRule
parseJSON =
String
-> (Object -> Parser MobileDeviceAccessMatchedRule)
-> Value
-> Parser MobileDeviceAccessMatchedRule
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"MobileDeviceAccessMatchedRule"
( \Object
x ->
Maybe Text -> Maybe Text -> MobileDeviceAccessMatchedRule
MobileDeviceAccessMatchedRule'
(Maybe Text -> Maybe Text -> MobileDeviceAccessMatchedRule)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> MobileDeviceAccessMatchedRule)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MobileDeviceAccessRuleId")
Parser (Maybe Text -> MobileDeviceAccessMatchedRule)
-> Parser (Maybe Text) -> Parser MobileDeviceAccessMatchedRule
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Name")
)
instance
Prelude.Hashable
MobileDeviceAccessMatchedRule
instance Prelude.NFData MobileDeviceAccessMatchedRule