{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.WorkMail.Types.MobileDeviceAccessRule
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.WorkMail.Types.MobileDeviceAccessRule where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.WorkMail.Types.MobileDeviceAccessRuleEffect

-- | A rule that controls access to mobile devices for an Amazon WorkMail
-- group.
--
-- /See:/ 'newMobileDeviceAccessRule' smart constructor.
data MobileDeviceAccessRule = MobileDeviceAccessRule'
  { -- | The effect of the rule when it matches. Allowed values are @ALLOW@ or
    -- @DENY@.
    MobileDeviceAccessRule -> Maybe MobileDeviceAccessRuleEffect
effect :: Prelude.Maybe MobileDeviceAccessRuleEffect,
    -- | Device user agents that a rule will match.
    MobileDeviceAccessRule -> Maybe (NonEmpty Text)
deviceUserAgents :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
    -- | Device types that a rule will match.
    MobileDeviceAccessRule -> Maybe (NonEmpty Text)
deviceTypes :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
    -- | Device types that a rule __will not__ match. All other device types will
    -- match.
    MobileDeviceAccessRule -> Maybe (NonEmpty Text)
notDeviceTypes :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
    -- | Device operating systems that a rule __will not__ match. All other
    -- device types will match.
    MobileDeviceAccessRule -> Maybe (NonEmpty Text)
notDeviceOperatingSystems :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
    -- | The date and time at which an access rule was created.
    MobileDeviceAccessRule -> Maybe POSIX
dateCreated :: Prelude.Maybe Core.POSIX,
    -- | Device models that a rule will match.
    MobileDeviceAccessRule -> Maybe (NonEmpty Text)
deviceModels :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
    -- | The ID assigned to a mobile access rule.
    MobileDeviceAccessRule -> Maybe Text
mobileDeviceAccessRuleId :: Prelude.Maybe Prelude.Text,
    -- | The name of a mobile access rule.
    MobileDeviceAccessRule -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The date and time at which an access rule was modified.
    MobileDeviceAccessRule -> Maybe POSIX
dateModified :: Prelude.Maybe Core.POSIX,
    -- | Device operating systems that a rule will match.
    MobileDeviceAccessRule -> Maybe (NonEmpty Text)
deviceOperatingSystems :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
    -- | The description of a mobile access rule.
    MobileDeviceAccessRule -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | Device user agents that a rule __will not__ match. All other device user
    -- agents will match.
    MobileDeviceAccessRule -> Maybe (NonEmpty Text)
notDeviceUserAgents :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
    -- | Device models that a rule __will not__ match. All other device models
    -- will match.
    MobileDeviceAccessRule -> Maybe (NonEmpty Text)
notDeviceModels :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text)
  }
  deriving (MobileDeviceAccessRule -> MobileDeviceAccessRule -> Bool
(MobileDeviceAccessRule -> MobileDeviceAccessRule -> Bool)
-> (MobileDeviceAccessRule -> MobileDeviceAccessRule -> Bool)
-> Eq MobileDeviceAccessRule
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: MobileDeviceAccessRule -> MobileDeviceAccessRule -> Bool
$c/= :: MobileDeviceAccessRule -> MobileDeviceAccessRule -> Bool
== :: MobileDeviceAccessRule -> MobileDeviceAccessRule -> Bool
$c== :: MobileDeviceAccessRule -> MobileDeviceAccessRule -> Bool
Prelude.Eq, ReadPrec [MobileDeviceAccessRule]
ReadPrec MobileDeviceAccessRule
Int -> ReadS MobileDeviceAccessRule
ReadS [MobileDeviceAccessRule]
(Int -> ReadS MobileDeviceAccessRule)
-> ReadS [MobileDeviceAccessRule]
-> ReadPrec MobileDeviceAccessRule
-> ReadPrec [MobileDeviceAccessRule]
-> Read MobileDeviceAccessRule
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [MobileDeviceAccessRule]
$creadListPrec :: ReadPrec [MobileDeviceAccessRule]
readPrec :: ReadPrec MobileDeviceAccessRule
$creadPrec :: ReadPrec MobileDeviceAccessRule
readList :: ReadS [MobileDeviceAccessRule]
$creadList :: ReadS [MobileDeviceAccessRule]
readsPrec :: Int -> ReadS MobileDeviceAccessRule
$creadsPrec :: Int -> ReadS MobileDeviceAccessRule
Prelude.Read, Int -> MobileDeviceAccessRule -> ShowS
[MobileDeviceAccessRule] -> ShowS
MobileDeviceAccessRule -> String
(Int -> MobileDeviceAccessRule -> ShowS)
-> (MobileDeviceAccessRule -> String)
-> ([MobileDeviceAccessRule] -> ShowS)
-> Show MobileDeviceAccessRule
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [MobileDeviceAccessRule] -> ShowS
$cshowList :: [MobileDeviceAccessRule] -> ShowS
show :: MobileDeviceAccessRule -> String
$cshow :: MobileDeviceAccessRule -> String
showsPrec :: Int -> MobileDeviceAccessRule -> ShowS
$cshowsPrec :: Int -> MobileDeviceAccessRule -> ShowS
Prelude.Show, (forall x. MobileDeviceAccessRule -> Rep MobileDeviceAccessRule x)
-> (forall x.
    Rep MobileDeviceAccessRule x -> MobileDeviceAccessRule)
-> Generic MobileDeviceAccessRule
forall x. Rep MobileDeviceAccessRule x -> MobileDeviceAccessRule
forall x. MobileDeviceAccessRule -> Rep MobileDeviceAccessRule x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep MobileDeviceAccessRule x -> MobileDeviceAccessRule
$cfrom :: forall x. MobileDeviceAccessRule -> Rep MobileDeviceAccessRule x
Prelude.Generic)

-- |
-- Create a value of 'MobileDeviceAccessRule' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'effect', 'mobileDeviceAccessRule_effect' - The effect of the rule when it matches. Allowed values are @ALLOW@ or
-- @DENY@.
--
-- 'deviceUserAgents', 'mobileDeviceAccessRule_deviceUserAgents' - Device user agents that a rule will match.
--
-- 'deviceTypes', 'mobileDeviceAccessRule_deviceTypes' - Device types that a rule will match.
--
-- 'notDeviceTypes', 'mobileDeviceAccessRule_notDeviceTypes' - Device types that a rule __will not__ match. All other device types will
-- match.
--
-- 'notDeviceOperatingSystems', 'mobileDeviceAccessRule_notDeviceOperatingSystems' - Device operating systems that a rule __will not__ match. All other
-- device types will match.
--
-- 'dateCreated', 'mobileDeviceAccessRule_dateCreated' - The date and time at which an access rule was created.
--
-- 'deviceModels', 'mobileDeviceAccessRule_deviceModels' - Device models that a rule will match.
--
-- 'mobileDeviceAccessRuleId', 'mobileDeviceAccessRule_mobileDeviceAccessRuleId' - The ID assigned to a mobile access rule.
--
-- 'name', 'mobileDeviceAccessRule_name' - The name of a mobile access rule.
--
-- 'dateModified', 'mobileDeviceAccessRule_dateModified' - The date and time at which an access rule was modified.
--
-- 'deviceOperatingSystems', 'mobileDeviceAccessRule_deviceOperatingSystems' - Device operating systems that a rule will match.
--
-- 'description', 'mobileDeviceAccessRule_description' - The description of a mobile access rule.
--
-- 'notDeviceUserAgents', 'mobileDeviceAccessRule_notDeviceUserAgents' - Device user agents that a rule __will not__ match. All other device user
-- agents will match.
--
-- 'notDeviceModels', 'mobileDeviceAccessRule_notDeviceModels' - Device models that a rule __will not__ match. All other device models
-- will match.
newMobileDeviceAccessRule ::
  MobileDeviceAccessRule
newMobileDeviceAccessRule :: MobileDeviceAccessRule
newMobileDeviceAccessRule =
  MobileDeviceAccessRule' :: Maybe MobileDeviceAccessRuleEffect
-> Maybe (NonEmpty Text)
-> Maybe (NonEmpty Text)
-> Maybe (NonEmpty Text)
-> Maybe (NonEmpty Text)
-> Maybe POSIX
-> Maybe (NonEmpty Text)
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe (NonEmpty Text)
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe (NonEmpty Text)
-> MobileDeviceAccessRule
MobileDeviceAccessRule'
    { $sel:effect:MobileDeviceAccessRule' :: Maybe MobileDeviceAccessRuleEffect
effect = Maybe MobileDeviceAccessRuleEffect
forall a. Maybe a
Prelude.Nothing,
      $sel:deviceUserAgents:MobileDeviceAccessRule' :: Maybe (NonEmpty Text)
deviceUserAgents = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:deviceTypes:MobileDeviceAccessRule' :: Maybe (NonEmpty Text)
deviceTypes = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:notDeviceTypes:MobileDeviceAccessRule' :: Maybe (NonEmpty Text)
notDeviceTypes = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:notDeviceOperatingSystems:MobileDeviceAccessRule' :: Maybe (NonEmpty Text)
notDeviceOperatingSystems = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:dateCreated:MobileDeviceAccessRule' :: Maybe POSIX
dateCreated = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:deviceModels:MobileDeviceAccessRule' :: Maybe (NonEmpty Text)
deviceModels = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:mobileDeviceAccessRuleId:MobileDeviceAccessRule' :: Maybe Text
mobileDeviceAccessRuleId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:MobileDeviceAccessRule' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:dateModified:MobileDeviceAccessRule' :: Maybe POSIX
dateModified = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:deviceOperatingSystems:MobileDeviceAccessRule' :: Maybe (NonEmpty Text)
deviceOperatingSystems = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:description:MobileDeviceAccessRule' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:notDeviceUserAgents:MobileDeviceAccessRule' :: Maybe (NonEmpty Text)
notDeviceUserAgents = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:notDeviceModels:MobileDeviceAccessRule' :: Maybe (NonEmpty Text)
notDeviceModels = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing
    }

-- | The effect of the rule when it matches. Allowed values are @ALLOW@ or
-- @DENY@.
mobileDeviceAccessRule_effect :: Lens.Lens' MobileDeviceAccessRule (Prelude.Maybe MobileDeviceAccessRuleEffect)
mobileDeviceAccessRule_effect :: (Maybe MobileDeviceAccessRuleEffect
 -> f (Maybe MobileDeviceAccessRuleEffect))
-> MobileDeviceAccessRule -> f MobileDeviceAccessRule
mobileDeviceAccessRule_effect = (MobileDeviceAccessRule -> Maybe MobileDeviceAccessRuleEffect)
-> (MobileDeviceAccessRule
    -> Maybe MobileDeviceAccessRuleEffect -> MobileDeviceAccessRule)
-> Lens
     MobileDeviceAccessRule
     MobileDeviceAccessRule
     (Maybe MobileDeviceAccessRuleEffect)
     (Maybe MobileDeviceAccessRuleEffect)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MobileDeviceAccessRule' {Maybe MobileDeviceAccessRuleEffect
effect :: Maybe MobileDeviceAccessRuleEffect
$sel:effect:MobileDeviceAccessRule' :: MobileDeviceAccessRule -> Maybe MobileDeviceAccessRuleEffect
effect} -> Maybe MobileDeviceAccessRuleEffect
effect) (\s :: MobileDeviceAccessRule
s@MobileDeviceAccessRule' {} Maybe MobileDeviceAccessRuleEffect
a -> MobileDeviceAccessRule
s {$sel:effect:MobileDeviceAccessRule' :: Maybe MobileDeviceAccessRuleEffect
effect = Maybe MobileDeviceAccessRuleEffect
a} :: MobileDeviceAccessRule)

-- | Device user agents that a rule will match.
mobileDeviceAccessRule_deviceUserAgents :: Lens.Lens' MobileDeviceAccessRule (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
mobileDeviceAccessRule_deviceUserAgents :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> MobileDeviceAccessRule -> f MobileDeviceAccessRule
mobileDeviceAccessRule_deviceUserAgents = (MobileDeviceAccessRule -> Maybe (NonEmpty Text))
-> (MobileDeviceAccessRule
    -> Maybe (NonEmpty Text) -> MobileDeviceAccessRule)
-> Lens
     MobileDeviceAccessRule
     MobileDeviceAccessRule
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MobileDeviceAccessRule' {Maybe (NonEmpty Text)
deviceUserAgents :: Maybe (NonEmpty Text)
$sel:deviceUserAgents:MobileDeviceAccessRule' :: MobileDeviceAccessRule -> Maybe (NonEmpty Text)
deviceUserAgents} -> Maybe (NonEmpty Text)
deviceUserAgents) (\s :: MobileDeviceAccessRule
s@MobileDeviceAccessRule' {} Maybe (NonEmpty Text)
a -> MobileDeviceAccessRule
s {$sel:deviceUserAgents:MobileDeviceAccessRule' :: Maybe (NonEmpty Text)
deviceUserAgents = Maybe (NonEmpty Text)
a} :: MobileDeviceAccessRule) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
 -> MobileDeviceAccessRule -> f MobileDeviceAccessRule)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
    -> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> MobileDeviceAccessRule
-> f MobileDeviceAccessRule
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty 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
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Device types that a rule will match.
mobileDeviceAccessRule_deviceTypes :: Lens.Lens' MobileDeviceAccessRule (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
mobileDeviceAccessRule_deviceTypes :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> MobileDeviceAccessRule -> f MobileDeviceAccessRule
mobileDeviceAccessRule_deviceTypes = (MobileDeviceAccessRule -> Maybe (NonEmpty Text))
-> (MobileDeviceAccessRule
    -> Maybe (NonEmpty Text) -> MobileDeviceAccessRule)
-> Lens
     MobileDeviceAccessRule
     MobileDeviceAccessRule
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MobileDeviceAccessRule' {Maybe (NonEmpty Text)
deviceTypes :: Maybe (NonEmpty Text)
$sel:deviceTypes:MobileDeviceAccessRule' :: MobileDeviceAccessRule -> Maybe (NonEmpty Text)
deviceTypes} -> Maybe (NonEmpty Text)
deviceTypes) (\s :: MobileDeviceAccessRule
s@MobileDeviceAccessRule' {} Maybe (NonEmpty Text)
a -> MobileDeviceAccessRule
s {$sel:deviceTypes:MobileDeviceAccessRule' :: Maybe (NonEmpty Text)
deviceTypes = Maybe (NonEmpty Text)
a} :: MobileDeviceAccessRule) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
 -> MobileDeviceAccessRule -> f MobileDeviceAccessRule)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
    -> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> MobileDeviceAccessRule
-> f MobileDeviceAccessRule
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty 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
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Device types that a rule __will not__ match. All other device types will
-- match.
mobileDeviceAccessRule_notDeviceTypes :: Lens.Lens' MobileDeviceAccessRule (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
mobileDeviceAccessRule_notDeviceTypes :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> MobileDeviceAccessRule -> f MobileDeviceAccessRule
mobileDeviceAccessRule_notDeviceTypes = (MobileDeviceAccessRule -> Maybe (NonEmpty Text))
-> (MobileDeviceAccessRule
    -> Maybe (NonEmpty Text) -> MobileDeviceAccessRule)
-> Lens
     MobileDeviceAccessRule
     MobileDeviceAccessRule
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MobileDeviceAccessRule' {Maybe (NonEmpty Text)
notDeviceTypes :: Maybe (NonEmpty Text)
$sel:notDeviceTypes:MobileDeviceAccessRule' :: MobileDeviceAccessRule -> Maybe (NonEmpty Text)
notDeviceTypes} -> Maybe (NonEmpty Text)
notDeviceTypes) (\s :: MobileDeviceAccessRule
s@MobileDeviceAccessRule' {} Maybe (NonEmpty Text)
a -> MobileDeviceAccessRule
s {$sel:notDeviceTypes:MobileDeviceAccessRule' :: Maybe (NonEmpty Text)
notDeviceTypes = Maybe (NonEmpty Text)
a} :: MobileDeviceAccessRule) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
 -> MobileDeviceAccessRule -> f MobileDeviceAccessRule)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
    -> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> MobileDeviceAccessRule
-> f MobileDeviceAccessRule
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty 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
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Device operating systems that a rule __will not__ match. All other
-- device types will match.
mobileDeviceAccessRule_notDeviceOperatingSystems :: Lens.Lens' MobileDeviceAccessRule (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
mobileDeviceAccessRule_notDeviceOperatingSystems :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> MobileDeviceAccessRule -> f MobileDeviceAccessRule
mobileDeviceAccessRule_notDeviceOperatingSystems = (MobileDeviceAccessRule -> Maybe (NonEmpty Text))
-> (MobileDeviceAccessRule
    -> Maybe (NonEmpty Text) -> MobileDeviceAccessRule)
-> Lens
     MobileDeviceAccessRule
     MobileDeviceAccessRule
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MobileDeviceAccessRule' {Maybe (NonEmpty Text)
notDeviceOperatingSystems :: Maybe (NonEmpty Text)
$sel:notDeviceOperatingSystems:MobileDeviceAccessRule' :: MobileDeviceAccessRule -> Maybe (NonEmpty Text)
notDeviceOperatingSystems} -> Maybe (NonEmpty Text)
notDeviceOperatingSystems) (\s :: MobileDeviceAccessRule
s@MobileDeviceAccessRule' {} Maybe (NonEmpty Text)
a -> MobileDeviceAccessRule
s {$sel:notDeviceOperatingSystems:MobileDeviceAccessRule' :: Maybe (NonEmpty Text)
notDeviceOperatingSystems = Maybe (NonEmpty Text)
a} :: MobileDeviceAccessRule) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
 -> MobileDeviceAccessRule -> f MobileDeviceAccessRule)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
    -> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> MobileDeviceAccessRule
-> f MobileDeviceAccessRule
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty 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
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The date and time at which an access rule was created.
mobileDeviceAccessRule_dateCreated :: Lens.Lens' MobileDeviceAccessRule (Prelude.Maybe Prelude.UTCTime)
mobileDeviceAccessRule_dateCreated :: (Maybe UTCTime -> f (Maybe UTCTime))
-> MobileDeviceAccessRule -> f MobileDeviceAccessRule
mobileDeviceAccessRule_dateCreated = (MobileDeviceAccessRule -> Maybe POSIX)
-> (MobileDeviceAccessRule
    -> Maybe POSIX -> MobileDeviceAccessRule)
-> Lens
     MobileDeviceAccessRule
     MobileDeviceAccessRule
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MobileDeviceAccessRule' {Maybe POSIX
dateCreated :: Maybe POSIX
$sel:dateCreated:MobileDeviceAccessRule' :: MobileDeviceAccessRule -> Maybe POSIX
dateCreated} -> Maybe POSIX
dateCreated) (\s :: MobileDeviceAccessRule
s@MobileDeviceAccessRule' {} Maybe POSIX
a -> MobileDeviceAccessRule
s {$sel:dateCreated:MobileDeviceAccessRule' :: Maybe POSIX
dateCreated = Maybe POSIX
a} :: MobileDeviceAccessRule) ((Maybe POSIX -> f (Maybe POSIX))
 -> MobileDeviceAccessRule -> f MobileDeviceAccessRule)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> MobileDeviceAccessRule
-> f MobileDeviceAccessRule
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | Device models that a rule will match.
mobileDeviceAccessRule_deviceModels :: Lens.Lens' MobileDeviceAccessRule (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
mobileDeviceAccessRule_deviceModels :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> MobileDeviceAccessRule -> f MobileDeviceAccessRule
mobileDeviceAccessRule_deviceModels = (MobileDeviceAccessRule -> Maybe (NonEmpty Text))
-> (MobileDeviceAccessRule
    -> Maybe (NonEmpty Text) -> MobileDeviceAccessRule)
-> Lens
     MobileDeviceAccessRule
     MobileDeviceAccessRule
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MobileDeviceAccessRule' {Maybe (NonEmpty Text)
deviceModels :: Maybe (NonEmpty Text)
$sel:deviceModels:MobileDeviceAccessRule' :: MobileDeviceAccessRule -> Maybe (NonEmpty Text)
deviceModels} -> Maybe (NonEmpty Text)
deviceModels) (\s :: MobileDeviceAccessRule
s@MobileDeviceAccessRule' {} Maybe (NonEmpty Text)
a -> MobileDeviceAccessRule
s {$sel:deviceModels:MobileDeviceAccessRule' :: Maybe (NonEmpty Text)
deviceModels = Maybe (NonEmpty Text)
a} :: MobileDeviceAccessRule) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
 -> MobileDeviceAccessRule -> f MobileDeviceAccessRule)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
    -> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> MobileDeviceAccessRule
-> f MobileDeviceAccessRule
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty 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
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The ID assigned to a mobile access rule.
mobileDeviceAccessRule_mobileDeviceAccessRuleId :: Lens.Lens' MobileDeviceAccessRule (Prelude.Maybe Prelude.Text)
mobileDeviceAccessRule_mobileDeviceAccessRuleId :: (Maybe Text -> f (Maybe Text))
-> MobileDeviceAccessRule -> f MobileDeviceAccessRule
mobileDeviceAccessRule_mobileDeviceAccessRuleId = (MobileDeviceAccessRule -> Maybe Text)
-> (MobileDeviceAccessRule -> Maybe Text -> MobileDeviceAccessRule)
-> Lens
     MobileDeviceAccessRule
     MobileDeviceAccessRule
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MobileDeviceAccessRule' {Maybe Text
mobileDeviceAccessRuleId :: Maybe Text
$sel:mobileDeviceAccessRuleId:MobileDeviceAccessRule' :: MobileDeviceAccessRule -> Maybe Text
mobileDeviceAccessRuleId} -> Maybe Text
mobileDeviceAccessRuleId) (\s :: MobileDeviceAccessRule
s@MobileDeviceAccessRule' {} Maybe Text
a -> MobileDeviceAccessRule
s {$sel:mobileDeviceAccessRuleId:MobileDeviceAccessRule' :: Maybe Text
mobileDeviceAccessRuleId = Maybe Text
a} :: MobileDeviceAccessRule)

-- | The name of a mobile access rule.
mobileDeviceAccessRule_name :: Lens.Lens' MobileDeviceAccessRule (Prelude.Maybe Prelude.Text)
mobileDeviceAccessRule_name :: (Maybe Text -> f (Maybe Text))
-> MobileDeviceAccessRule -> f MobileDeviceAccessRule
mobileDeviceAccessRule_name = (MobileDeviceAccessRule -> Maybe Text)
-> (MobileDeviceAccessRule -> Maybe Text -> MobileDeviceAccessRule)
-> Lens
     MobileDeviceAccessRule
     MobileDeviceAccessRule
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MobileDeviceAccessRule' {Maybe Text
name :: Maybe Text
$sel:name:MobileDeviceAccessRule' :: MobileDeviceAccessRule -> Maybe Text
name} -> Maybe Text
name) (\s :: MobileDeviceAccessRule
s@MobileDeviceAccessRule' {} Maybe Text
a -> MobileDeviceAccessRule
s {$sel:name:MobileDeviceAccessRule' :: Maybe Text
name = Maybe Text
a} :: MobileDeviceAccessRule)

-- | The date and time at which an access rule was modified.
mobileDeviceAccessRule_dateModified :: Lens.Lens' MobileDeviceAccessRule (Prelude.Maybe Prelude.UTCTime)
mobileDeviceAccessRule_dateModified :: (Maybe UTCTime -> f (Maybe UTCTime))
-> MobileDeviceAccessRule -> f MobileDeviceAccessRule
mobileDeviceAccessRule_dateModified = (MobileDeviceAccessRule -> Maybe POSIX)
-> (MobileDeviceAccessRule
    -> Maybe POSIX -> MobileDeviceAccessRule)
-> Lens
     MobileDeviceAccessRule
     MobileDeviceAccessRule
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MobileDeviceAccessRule' {Maybe POSIX
dateModified :: Maybe POSIX
$sel:dateModified:MobileDeviceAccessRule' :: MobileDeviceAccessRule -> Maybe POSIX
dateModified} -> Maybe POSIX
dateModified) (\s :: MobileDeviceAccessRule
s@MobileDeviceAccessRule' {} Maybe POSIX
a -> MobileDeviceAccessRule
s {$sel:dateModified:MobileDeviceAccessRule' :: Maybe POSIX
dateModified = Maybe POSIX
a} :: MobileDeviceAccessRule) ((Maybe POSIX -> f (Maybe POSIX))
 -> MobileDeviceAccessRule -> f MobileDeviceAccessRule)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> MobileDeviceAccessRule
-> f MobileDeviceAccessRule
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | Device operating systems that a rule will match.
mobileDeviceAccessRule_deviceOperatingSystems :: Lens.Lens' MobileDeviceAccessRule (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
mobileDeviceAccessRule_deviceOperatingSystems :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> MobileDeviceAccessRule -> f MobileDeviceAccessRule
mobileDeviceAccessRule_deviceOperatingSystems = (MobileDeviceAccessRule -> Maybe (NonEmpty Text))
-> (MobileDeviceAccessRule
    -> Maybe (NonEmpty Text) -> MobileDeviceAccessRule)
-> Lens
     MobileDeviceAccessRule
     MobileDeviceAccessRule
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MobileDeviceAccessRule' {Maybe (NonEmpty Text)
deviceOperatingSystems :: Maybe (NonEmpty Text)
$sel:deviceOperatingSystems:MobileDeviceAccessRule' :: MobileDeviceAccessRule -> Maybe (NonEmpty Text)
deviceOperatingSystems} -> Maybe (NonEmpty Text)
deviceOperatingSystems) (\s :: MobileDeviceAccessRule
s@MobileDeviceAccessRule' {} Maybe (NonEmpty Text)
a -> MobileDeviceAccessRule
s {$sel:deviceOperatingSystems:MobileDeviceAccessRule' :: Maybe (NonEmpty Text)
deviceOperatingSystems = Maybe (NonEmpty Text)
a} :: MobileDeviceAccessRule) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
 -> MobileDeviceAccessRule -> f MobileDeviceAccessRule)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
    -> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> MobileDeviceAccessRule
-> f MobileDeviceAccessRule
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty 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
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The description of a mobile access rule.
mobileDeviceAccessRule_description :: Lens.Lens' MobileDeviceAccessRule (Prelude.Maybe Prelude.Text)
mobileDeviceAccessRule_description :: (Maybe Text -> f (Maybe Text))
-> MobileDeviceAccessRule -> f MobileDeviceAccessRule
mobileDeviceAccessRule_description = (MobileDeviceAccessRule -> Maybe Text)
-> (MobileDeviceAccessRule -> Maybe Text -> MobileDeviceAccessRule)
-> Lens
     MobileDeviceAccessRule
     MobileDeviceAccessRule
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MobileDeviceAccessRule' {Maybe Text
description :: Maybe Text
$sel:description:MobileDeviceAccessRule' :: MobileDeviceAccessRule -> Maybe Text
description} -> Maybe Text
description) (\s :: MobileDeviceAccessRule
s@MobileDeviceAccessRule' {} Maybe Text
a -> MobileDeviceAccessRule
s {$sel:description:MobileDeviceAccessRule' :: Maybe Text
description = Maybe Text
a} :: MobileDeviceAccessRule)

-- | Device user agents that a rule __will not__ match. All other device user
-- agents will match.
mobileDeviceAccessRule_notDeviceUserAgents :: Lens.Lens' MobileDeviceAccessRule (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
mobileDeviceAccessRule_notDeviceUserAgents :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> MobileDeviceAccessRule -> f MobileDeviceAccessRule
mobileDeviceAccessRule_notDeviceUserAgents = (MobileDeviceAccessRule -> Maybe (NonEmpty Text))
-> (MobileDeviceAccessRule
    -> Maybe (NonEmpty Text) -> MobileDeviceAccessRule)
-> Lens
     MobileDeviceAccessRule
     MobileDeviceAccessRule
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MobileDeviceAccessRule' {Maybe (NonEmpty Text)
notDeviceUserAgents :: Maybe (NonEmpty Text)
$sel:notDeviceUserAgents:MobileDeviceAccessRule' :: MobileDeviceAccessRule -> Maybe (NonEmpty Text)
notDeviceUserAgents} -> Maybe (NonEmpty Text)
notDeviceUserAgents) (\s :: MobileDeviceAccessRule
s@MobileDeviceAccessRule' {} Maybe (NonEmpty Text)
a -> MobileDeviceAccessRule
s {$sel:notDeviceUserAgents:MobileDeviceAccessRule' :: Maybe (NonEmpty Text)
notDeviceUserAgents = Maybe (NonEmpty Text)
a} :: MobileDeviceAccessRule) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
 -> MobileDeviceAccessRule -> f MobileDeviceAccessRule)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
    -> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> MobileDeviceAccessRule
-> f MobileDeviceAccessRule
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty 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
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Device models that a rule __will not__ match. All other device models
-- will match.
mobileDeviceAccessRule_notDeviceModels :: Lens.Lens' MobileDeviceAccessRule (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
mobileDeviceAccessRule_notDeviceModels :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> MobileDeviceAccessRule -> f MobileDeviceAccessRule
mobileDeviceAccessRule_notDeviceModels = (MobileDeviceAccessRule -> Maybe (NonEmpty Text))
-> (MobileDeviceAccessRule
    -> Maybe (NonEmpty Text) -> MobileDeviceAccessRule)
-> Lens
     MobileDeviceAccessRule
     MobileDeviceAccessRule
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\MobileDeviceAccessRule' {Maybe (NonEmpty Text)
notDeviceModels :: Maybe (NonEmpty Text)
$sel:notDeviceModels:MobileDeviceAccessRule' :: MobileDeviceAccessRule -> Maybe (NonEmpty Text)
notDeviceModels} -> Maybe (NonEmpty Text)
notDeviceModels) (\s :: MobileDeviceAccessRule
s@MobileDeviceAccessRule' {} Maybe (NonEmpty Text)
a -> MobileDeviceAccessRule
s {$sel:notDeviceModels:MobileDeviceAccessRule' :: Maybe (NonEmpty Text)
notDeviceModels = Maybe (NonEmpty Text)
a} :: MobileDeviceAccessRule) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
 -> MobileDeviceAccessRule -> f MobileDeviceAccessRule)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
    -> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> MobileDeviceAccessRule
-> f MobileDeviceAccessRule
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty 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
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.FromJSON MobileDeviceAccessRule where
  parseJSON :: Value -> Parser MobileDeviceAccessRule
parseJSON =
    String
-> (Object -> Parser MobileDeviceAccessRule)
-> Value
-> Parser MobileDeviceAccessRule
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"MobileDeviceAccessRule"
      ( \Object
x ->
          Maybe MobileDeviceAccessRuleEffect
-> Maybe (NonEmpty Text)
-> Maybe (NonEmpty Text)
-> Maybe (NonEmpty Text)
-> Maybe (NonEmpty Text)
-> Maybe POSIX
-> Maybe (NonEmpty Text)
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe (NonEmpty Text)
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe (NonEmpty Text)
-> MobileDeviceAccessRule
MobileDeviceAccessRule'
            (Maybe MobileDeviceAccessRuleEffect
 -> Maybe (NonEmpty Text)
 -> Maybe (NonEmpty Text)
 -> Maybe (NonEmpty Text)
 -> Maybe (NonEmpty Text)
 -> Maybe POSIX
 -> Maybe (NonEmpty Text)
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe (NonEmpty Text)
 -> Maybe Text
 -> Maybe (NonEmpty Text)
 -> Maybe (NonEmpty Text)
 -> MobileDeviceAccessRule)
-> Parser (Maybe MobileDeviceAccessRuleEffect)
-> Parser
     (Maybe (NonEmpty Text)
      -> Maybe (NonEmpty Text)
      -> Maybe (NonEmpty Text)
      -> Maybe (NonEmpty Text)
      -> Maybe POSIX
      -> Maybe (NonEmpty Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe (NonEmpty Text)
      -> Maybe Text
      -> Maybe (NonEmpty Text)
      -> Maybe (NonEmpty Text)
      -> MobileDeviceAccessRule)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe MobileDeviceAccessRuleEffect)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Effect")
            Parser
  (Maybe (NonEmpty Text)
   -> Maybe (NonEmpty Text)
   -> Maybe (NonEmpty Text)
   -> Maybe (NonEmpty Text)
   -> Maybe POSIX
   -> Maybe (NonEmpty Text)
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe (NonEmpty Text)
   -> Maybe Text
   -> Maybe (NonEmpty Text)
   -> Maybe (NonEmpty Text)
   -> MobileDeviceAccessRule)
-> Parser (Maybe (NonEmpty Text))
-> Parser
     (Maybe (NonEmpty Text)
      -> Maybe (NonEmpty Text)
      -> Maybe (NonEmpty Text)
      -> Maybe POSIX
      -> Maybe (NonEmpty Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe (NonEmpty Text)
      -> Maybe Text
      -> Maybe (NonEmpty Text)
      -> Maybe (NonEmpty Text)
      -> MobileDeviceAccessRule)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DeviceUserAgents")
            Parser
  (Maybe (NonEmpty Text)
   -> Maybe (NonEmpty Text)
   -> Maybe (NonEmpty Text)
   -> Maybe POSIX
   -> Maybe (NonEmpty Text)
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe (NonEmpty Text)
   -> Maybe Text
   -> Maybe (NonEmpty Text)
   -> Maybe (NonEmpty Text)
   -> MobileDeviceAccessRule)
-> Parser (Maybe (NonEmpty Text))
-> Parser
     (Maybe (NonEmpty Text)
      -> Maybe (NonEmpty Text)
      -> Maybe POSIX
      -> Maybe (NonEmpty Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe (NonEmpty Text)
      -> Maybe Text
      -> Maybe (NonEmpty Text)
      -> Maybe (NonEmpty Text)
      -> MobileDeviceAccessRule)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DeviceTypes")
            Parser
  (Maybe (NonEmpty Text)
   -> Maybe (NonEmpty Text)
   -> Maybe POSIX
   -> Maybe (NonEmpty Text)
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe (NonEmpty Text)
   -> Maybe Text
   -> Maybe (NonEmpty Text)
   -> Maybe (NonEmpty Text)
   -> MobileDeviceAccessRule)
-> Parser (Maybe (NonEmpty Text))
-> Parser
     (Maybe (NonEmpty Text)
      -> Maybe POSIX
      -> Maybe (NonEmpty Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe (NonEmpty Text)
      -> Maybe Text
      -> Maybe (NonEmpty Text)
      -> Maybe (NonEmpty Text)
      -> MobileDeviceAccessRule)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"NotDeviceTypes")
            Parser
  (Maybe (NonEmpty Text)
   -> Maybe POSIX
   -> Maybe (NonEmpty Text)
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe (NonEmpty Text)
   -> Maybe Text
   -> Maybe (NonEmpty Text)
   -> Maybe (NonEmpty Text)
   -> MobileDeviceAccessRule)
-> Parser (Maybe (NonEmpty Text))
-> Parser
     (Maybe POSIX
      -> Maybe (NonEmpty Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe (NonEmpty Text)
      -> Maybe Text
      -> Maybe (NonEmpty Text)
      -> Maybe (NonEmpty Text)
      -> MobileDeviceAccessRule)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"NotDeviceOperatingSystems")
            Parser
  (Maybe POSIX
   -> Maybe (NonEmpty Text)
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe (NonEmpty Text)
   -> Maybe Text
   -> Maybe (NonEmpty Text)
   -> Maybe (NonEmpty Text)
   -> MobileDeviceAccessRule)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe (NonEmpty Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe (NonEmpty Text)
      -> Maybe Text
      -> Maybe (NonEmpty Text)
      -> Maybe (NonEmpty Text)
      -> MobileDeviceAccessRule)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DateCreated")
            Parser
  (Maybe (NonEmpty Text)
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe (NonEmpty Text)
   -> Maybe Text
   -> Maybe (NonEmpty Text)
   -> Maybe (NonEmpty Text)
   -> MobileDeviceAccessRule)
-> Parser (Maybe (NonEmpty Text))
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe (NonEmpty Text)
      -> Maybe Text
      -> Maybe (NonEmpty Text)
      -> Maybe (NonEmpty Text)
      -> MobileDeviceAccessRule)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DeviceModels")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe (NonEmpty Text)
   -> Maybe Text
   -> Maybe (NonEmpty Text)
   -> Maybe (NonEmpty Text)
   -> MobileDeviceAccessRule)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe (NonEmpty Text)
      -> Maybe Text
      -> Maybe (NonEmpty Text)
      -> Maybe (NonEmpty Text)
      -> MobileDeviceAccessRule)
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
"MobileDeviceAccessRuleId")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe (NonEmpty Text)
   -> Maybe Text
   -> Maybe (NonEmpty Text)
   -> Maybe (NonEmpty Text)
   -> MobileDeviceAccessRule)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe (NonEmpty Text)
      -> Maybe Text
      -> Maybe (NonEmpty Text)
      -> Maybe (NonEmpty Text)
      -> MobileDeviceAccessRule)
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")
            Parser
  (Maybe POSIX
   -> Maybe (NonEmpty Text)
   -> Maybe Text
   -> Maybe (NonEmpty Text)
   -> Maybe (NonEmpty Text)
   -> MobileDeviceAccessRule)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe (NonEmpty Text)
      -> Maybe Text
      -> Maybe (NonEmpty Text)
      -> Maybe (NonEmpty Text)
      -> MobileDeviceAccessRule)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DateModified")
            Parser
  (Maybe (NonEmpty Text)
   -> Maybe Text
   -> Maybe (NonEmpty Text)
   -> Maybe (NonEmpty Text)
   -> MobileDeviceAccessRule)
-> Parser (Maybe (NonEmpty Text))
-> Parser
     (Maybe Text
      -> Maybe (NonEmpty Text)
      -> Maybe (NonEmpty Text)
      -> MobileDeviceAccessRule)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DeviceOperatingSystems")
            Parser
  (Maybe Text
   -> Maybe (NonEmpty Text)
   -> Maybe (NonEmpty Text)
   -> MobileDeviceAccessRule)
-> Parser (Maybe Text)
-> Parser
     (Maybe (NonEmpty Text)
      -> Maybe (NonEmpty Text) -> MobileDeviceAccessRule)
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
"Description")
            Parser
  (Maybe (NonEmpty Text)
   -> Maybe (NonEmpty Text) -> MobileDeviceAccessRule)
-> Parser (Maybe (NonEmpty Text))
-> Parser (Maybe (NonEmpty Text) -> MobileDeviceAccessRule)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"NotDeviceUserAgents")
            Parser (Maybe (NonEmpty Text) -> MobileDeviceAccessRule)
-> Parser (Maybe (NonEmpty Text)) -> Parser MobileDeviceAccessRule
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"NotDeviceModels")
      )

instance Prelude.Hashable MobileDeviceAccessRule

instance Prelude.NFData MobileDeviceAccessRule