{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# 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.ListMobileDeviceAccessOverrides
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Lists all the mobile device access overrides for any given combination
-- of WorkMail organization, user, or device.
module Amazonka.WorkMail.ListMobileDeviceAccessOverrides
  ( -- * Creating a Request
    ListMobileDeviceAccessOverrides (..),
    newListMobileDeviceAccessOverrides,

    -- * Request Lenses
    listMobileDeviceAccessOverrides_deviceId,
    listMobileDeviceAccessOverrides_maxResults,
    listMobileDeviceAccessOverrides_nextToken,
    listMobileDeviceAccessOverrides_userId,
    listMobileDeviceAccessOverrides_organizationId,

    -- * Destructuring the Response
    ListMobileDeviceAccessOverridesResponse (..),
    newListMobileDeviceAccessOverridesResponse,

    -- * Response Lenses
    listMobileDeviceAccessOverridesResponse_nextToken,
    listMobileDeviceAccessOverridesResponse_overrides,
    listMobileDeviceAccessOverridesResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.WorkMail.Types

-- | /See:/ 'newListMobileDeviceAccessOverrides' smart constructor.
data ListMobileDeviceAccessOverrides = ListMobileDeviceAccessOverrides'
  { -- | The mobile device to which the access override applies.
    ListMobileDeviceAccessOverrides -> Maybe Text
deviceId :: Prelude.Maybe Prelude.Text,
    -- | The maximum number of results to return in a single call.
    ListMobileDeviceAccessOverrides -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The token to use to retrieve the next page of results. The first call
    -- does not require a token.
    ListMobileDeviceAccessOverrides -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The WorkMail user under which you list the mobile device access
    -- overrides. Accepts the following types of user identities:
    --
    -- -   User ID: @12345678-1234-1234-1234-123456789012@ or
    --     @S-1-1-12-1234567890-123456789-123456789-1234@
    --
    -- -   Email address: @user\@domain.tld@
    --
    -- -   User name: @user@
    ListMobileDeviceAccessOverrides -> Maybe Text
userId :: Prelude.Maybe Prelude.Text,
    -- | The WorkMail organization under which to list mobile device access
    -- overrides.
    ListMobileDeviceAccessOverrides -> Text
organizationId :: Prelude.Text
  }
  deriving (ListMobileDeviceAccessOverrides
-> ListMobileDeviceAccessOverrides -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListMobileDeviceAccessOverrides
-> ListMobileDeviceAccessOverrides -> Bool
$c/= :: ListMobileDeviceAccessOverrides
-> ListMobileDeviceAccessOverrides -> Bool
== :: ListMobileDeviceAccessOverrides
-> ListMobileDeviceAccessOverrides -> Bool
$c== :: ListMobileDeviceAccessOverrides
-> ListMobileDeviceAccessOverrides -> Bool
Prelude.Eq, ReadPrec [ListMobileDeviceAccessOverrides]
ReadPrec ListMobileDeviceAccessOverrides
Int -> ReadS ListMobileDeviceAccessOverrides
ReadS [ListMobileDeviceAccessOverrides]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListMobileDeviceAccessOverrides]
$creadListPrec :: ReadPrec [ListMobileDeviceAccessOverrides]
readPrec :: ReadPrec ListMobileDeviceAccessOverrides
$creadPrec :: ReadPrec ListMobileDeviceAccessOverrides
readList :: ReadS [ListMobileDeviceAccessOverrides]
$creadList :: ReadS [ListMobileDeviceAccessOverrides]
readsPrec :: Int -> ReadS ListMobileDeviceAccessOverrides
$creadsPrec :: Int -> ReadS ListMobileDeviceAccessOverrides
Prelude.Read, Int -> ListMobileDeviceAccessOverrides -> ShowS
[ListMobileDeviceAccessOverrides] -> ShowS
ListMobileDeviceAccessOverrides -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListMobileDeviceAccessOverrides] -> ShowS
$cshowList :: [ListMobileDeviceAccessOverrides] -> ShowS
show :: ListMobileDeviceAccessOverrides -> String
$cshow :: ListMobileDeviceAccessOverrides -> String
showsPrec :: Int -> ListMobileDeviceAccessOverrides -> ShowS
$cshowsPrec :: Int -> ListMobileDeviceAccessOverrides -> ShowS
Prelude.Show, forall x.
Rep ListMobileDeviceAccessOverrides x
-> ListMobileDeviceAccessOverrides
forall x.
ListMobileDeviceAccessOverrides
-> Rep ListMobileDeviceAccessOverrides x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListMobileDeviceAccessOverrides x
-> ListMobileDeviceAccessOverrides
$cfrom :: forall x.
ListMobileDeviceAccessOverrides
-> Rep ListMobileDeviceAccessOverrides x
Prelude.Generic)

-- |
-- Create a value of 'ListMobileDeviceAccessOverrides' 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:
--
-- 'deviceId', 'listMobileDeviceAccessOverrides_deviceId' - The mobile device to which the access override applies.
--
-- 'maxResults', 'listMobileDeviceAccessOverrides_maxResults' - The maximum number of results to return in a single call.
--
-- 'nextToken', 'listMobileDeviceAccessOverrides_nextToken' - The token to use to retrieve the next page of results. The first call
-- does not require a token.
--
-- 'userId', 'listMobileDeviceAccessOverrides_userId' - The WorkMail user under which you list the mobile device access
-- overrides. Accepts the following types of user identities:
--
-- -   User ID: @12345678-1234-1234-1234-123456789012@ or
--     @S-1-1-12-1234567890-123456789-123456789-1234@
--
-- -   Email address: @user\@domain.tld@
--
-- -   User name: @user@
--
-- 'organizationId', 'listMobileDeviceAccessOverrides_organizationId' - The WorkMail organization under which to list mobile device access
-- overrides.
newListMobileDeviceAccessOverrides ::
  -- | 'organizationId'
  Prelude.Text ->
  ListMobileDeviceAccessOverrides
newListMobileDeviceAccessOverrides :: Text -> ListMobileDeviceAccessOverrides
newListMobileDeviceAccessOverrides Text
pOrganizationId_ =
  ListMobileDeviceAccessOverrides'
    { $sel:deviceId:ListMobileDeviceAccessOverrides' :: Maybe Text
deviceId =
        forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListMobileDeviceAccessOverrides' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListMobileDeviceAccessOverrides' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:userId:ListMobileDeviceAccessOverrides' :: Maybe Text
userId = forall a. Maybe a
Prelude.Nothing,
      $sel:organizationId:ListMobileDeviceAccessOverrides' :: Text
organizationId = Text
pOrganizationId_
    }

-- | The mobile device to which the access override applies.
listMobileDeviceAccessOverrides_deviceId :: Lens.Lens' ListMobileDeviceAccessOverrides (Prelude.Maybe Prelude.Text)
listMobileDeviceAccessOverrides_deviceId :: Lens' ListMobileDeviceAccessOverrides (Maybe Text)
listMobileDeviceAccessOverrides_deviceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMobileDeviceAccessOverrides' {Maybe Text
deviceId :: Maybe Text
$sel:deviceId:ListMobileDeviceAccessOverrides' :: ListMobileDeviceAccessOverrides -> Maybe Text
deviceId} -> Maybe Text
deviceId) (\s :: ListMobileDeviceAccessOverrides
s@ListMobileDeviceAccessOverrides' {} Maybe Text
a -> ListMobileDeviceAccessOverrides
s {$sel:deviceId:ListMobileDeviceAccessOverrides' :: Maybe Text
deviceId = Maybe Text
a} :: ListMobileDeviceAccessOverrides)

-- | The maximum number of results to return in a single call.
listMobileDeviceAccessOverrides_maxResults :: Lens.Lens' ListMobileDeviceAccessOverrides (Prelude.Maybe Prelude.Natural)
listMobileDeviceAccessOverrides_maxResults :: Lens' ListMobileDeviceAccessOverrides (Maybe Natural)
listMobileDeviceAccessOverrides_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMobileDeviceAccessOverrides' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListMobileDeviceAccessOverrides' :: ListMobileDeviceAccessOverrides -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListMobileDeviceAccessOverrides
s@ListMobileDeviceAccessOverrides' {} Maybe Natural
a -> ListMobileDeviceAccessOverrides
s {$sel:maxResults:ListMobileDeviceAccessOverrides' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListMobileDeviceAccessOverrides)

-- | The token to use to retrieve the next page of results. The first call
-- does not require a token.
listMobileDeviceAccessOverrides_nextToken :: Lens.Lens' ListMobileDeviceAccessOverrides (Prelude.Maybe Prelude.Text)
listMobileDeviceAccessOverrides_nextToken :: Lens' ListMobileDeviceAccessOverrides (Maybe Text)
listMobileDeviceAccessOverrides_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMobileDeviceAccessOverrides' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListMobileDeviceAccessOverrides' :: ListMobileDeviceAccessOverrides -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListMobileDeviceAccessOverrides
s@ListMobileDeviceAccessOverrides' {} Maybe Text
a -> ListMobileDeviceAccessOverrides
s {$sel:nextToken:ListMobileDeviceAccessOverrides' :: Maybe Text
nextToken = Maybe Text
a} :: ListMobileDeviceAccessOverrides)

-- | The WorkMail user under which you list the mobile device access
-- overrides. Accepts the following types of user identities:
--
-- -   User ID: @12345678-1234-1234-1234-123456789012@ or
--     @S-1-1-12-1234567890-123456789-123456789-1234@
--
-- -   Email address: @user\@domain.tld@
--
-- -   User name: @user@
listMobileDeviceAccessOverrides_userId :: Lens.Lens' ListMobileDeviceAccessOverrides (Prelude.Maybe Prelude.Text)
listMobileDeviceAccessOverrides_userId :: Lens' ListMobileDeviceAccessOverrides (Maybe Text)
listMobileDeviceAccessOverrides_userId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMobileDeviceAccessOverrides' {Maybe Text
userId :: Maybe Text
$sel:userId:ListMobileDeviceAccessOverrides' :: ListMobileDeviceAccessOverrides -> Maybe Text
userId} -> Maybe Text
userId) (\s :: ListMobileDeviceAccessOverrides
s@ListMobileDeviceAccessOverrides' {} Maybe Text
a -> ListMobileDeviceAccessOverrides
s {$sel:userId:ListMobileDeviceAccessOverrides' :: Maybe Text
userId = Maybe Text
a} :: ListMobileDeviceAccessOverrides)

-- | The WorkMail organization under which to list mobile device access
-- overrides.
listMobileDeviceAccessOverrides_organizationId :: Lens.Lens' ListMobileDeviceAccessOverrides Prelude.Text
listMobileDeviceAccessOverrides_organizationId :: Lens' ListMobileDeviceAccessOverrides Text
listMobileDeviceAccessOverrides_organizationId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMobileDeviceAccessOverrides' {Text
organizationId :: Text
$sel:organizationId:ListMobileDeviceAccessOverrides' :: ListMobileDeviceAccessOverrides -> Text
organizationId} -> Text
organizationId) (\s :: ListMobileDeviceAccessOverrides
s@ListMobileDeviceAccessOverrides' {} Text
a -> ListMobileDeviceAccessOverrides
s {$sel:organizationId:ListMobileDeviceAccessOverrides' :: Text
organizationId = Text
a} :: ListMobileDeviceAccessOverrides)

instance
  Core.AWSRequest
    ListMobileDeviceAccessOverrides
  where
  type
    AWSResponse ListMobileDeviceAccessOverrides =
      ListMobileDeviceAccessOverridesResponse
  request :: (Service -> Service)
-> ListMobileDeviceAccessOverrides
-> Request ListMobileDeviceAccessOverrides
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListMobileDeviceAccessOverrides
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse ListMobileDeviceAccessOverrides)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe [MobileDeviceAccessOverride]
-> Int
-> ListMobileDeviceAccessOverridesResponse
ListMobileDeviceAccessOverridesResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"NextToken")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Overrides" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance
  Prelude.Hashable
    ListMobileDeviceAccessOverrides
  where
  hashWithSalt :: Int -> ListMobileDeviceAccessOverrides -> Int
hashWithSalt
    Int
_salt
    ListMobileDeviceAccessOverrides' {Maybe Natural
Maybe Text
Text
organizationId :: Text
userId :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
deviceId :: Maybe Text
$sel:organizationId:ListMobileDeviceAccessOverrides' :: ListMobileDeviceAccessOverrides -> Text
$sel:userId:ListMobileDeviceAccessOverrides' :: ListMobileDeviceAccessOverrides -> Maybe Text
$sel:nextToken:ListMobileDeviceAccessOverrides' :: ListMobileDeviceAccessOverrides -> Maybe Text
$sel:maxResults:ListMobileDeviceAccessOverrides' :: ListMobileDeviceAccessOverrides -> Maybe Natural
$sel:deviceId:ListMobileDeviceAccessOverrides' :: ListMobileDeviceAccessOverrides -> Maybe Text
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
deviceId
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
userId
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
organizationId

instance
  Prelude.NFData
    ListMobileDeviceAccessOverrides
  where
  rnf :: ListMobileDeviceAccessOverrides -> ()
rnf ListMobileDeviceAccessOverrides' {Maybe Natural
Maybe Text
Text
organizationId :: Text
userId :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
deviceId :: Maybe Text
$sel:organizationId:ListMobileDeviceAccessOverrides' :: ListMobileDeviceAccessOverrides -> Text
$sel:userId:ListMobileDeviceAccessOverrides' :: ListMobileDeviceAccessOverrides -> Maybe Text
$sel:nextToken:ListMobileDeviceAccessOverrides' :: ListMobileDeviceAccessOverrides -> Maybe Text
$sel:maxResults:ListMobileDeviceAccessOverrides' :: ListMobileDeviceAccessOverrides -> Maybe Natural
$sel:deviceId:ListMobileDeviceAccessOverrides' :: ListMobileDeviceAccessOverrides -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
deviceId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
userId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
organizationId

instance
  Data.ToHeaders
    ListMobileDeviceAccessOverrides
  where
  toHeaders :: ListMobileDeviceAccessOverrides -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"WorkMailService.ListMobileDeviceAccessOverrides" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON ListMobileDeviceAccessOverrides where
  toJSON :: ListMobileDeviceAccessOverrides -> Value
toJSON ListMobileDeviceAccessOverrides' {Maybe Natural
Maybe Text
Text
organizationId :: Text
userId :: Maybe Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
deviceId :: Maybe Text
$sel:organizationId:ListMobileDeviceAccessOverrides' :: ListMobileDeviceAccessOverrides -> Text
$sel:userId:ListMobileDeviceAccessOverrides' :: ListMobileDeviceAccessOverrides -> Maybe Text
$sel:nextToken:ListMobileDeviceAccessOverrides' :: ListMobileDeviceAccessOverrides -> Maybe Text
$sel:maxResults:ListMobileDeviceAccessOverrides' :: ListMobileDeviceAccessOverrides -> Maybe Natural
$sel:deviceId:ListMobileDeviceAccessOverrides' :: ListMobileDeviceAccessOverrides -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"DeviceId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
deviceId,
            (Key
"MaxResults" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
maxResults,
            (Key
"NextToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
            (Key
"UserId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
userId,
            forall a. a -> Maybe a
Prelude.Just
              (Key
"OrganizationId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
organizationId)
          ]
      )

instance Data.ToPath ListMobileDeviceAccessOverrides where
  toPath :: ListMobileDeviceAccessOverrides -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Data.ToQuery ListMobileDeviceAccessOverrides where
  toQuery :: ListMobileDeviceAccessOverrides -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newListMobileDeviceAccessOverridesResponse' smart constructor.
data ListMobileDeviceAccessOverridesResponse = ListMobileDeviceAccessOverridesResponse'
  { -- | The token to use to retrieve the next page of results. The value is
    -- “null” when there are no more results to return.
    ListMobileDeviceAccessOverridesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The list of mobile device access overrides that exist for the specified
    -- WorkMail organization and user.
    ListMobileDeviceAccessOverridesResponse
-> Maybe [MobileDeviceAccessOverride]
overrides :: Prelude.Maybe [MobileDeviceAccessOverride],
    -- | The response's http status code.
    ListMobileDeviceAccessOverridesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListMobileDeviceAccessOverridesResponse
-> ListMobileDeviceAccessOverridesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListMobileDeviceAccessOverridesResponse
-> ListMobileDeviceAccessOverridesResponse -> Bool
$c/= :: ListMobileDeviceAccessOverridesResponse
-> ListMobileDeviceAccessOverridesResponse -> Bool
== :: ListMobileDeviceAccessOverridesResponse
-> ListMobileDeviceAccessOverridesResponse -> Bool
$c== :: ListMobileDeviceAccessOverridesResponse
-> ListMobileDeviceAccessOverridesResponse -> Bool
Prelude.Eq, ReadPrec [ListMobileDeviceAccessOverridesResponse]
ReadPrec ListMobileDeviceAccessOverridesResponse
Int -> ReadS ListMobileDeviceAccessOverridesResponse
ReadS [ListMobileDeviceAccessOverridesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListMobileDeviceAccessOverridesResponse]
$creadListPrec :: ReadPrec [ListMobileDeviceAccessOverridesResponse]
readPrec :: ReadPrec ListMobileDeviceAccessOverridesResponse
$creadPrec :: ReadPrec ListMobileDeviceAccessOverridesResponse
readList :: ReadS [ListMobileDeviceAccessOverridesResponse]
$creadList :: ReadS [ListMobileDeviceAccessOverridesResponse]
readsPrec :: Int -> ReadS ListMobileDeviceAccessOverridesResponse
$creadsPrec :: Int -> ReadS ListMobileDeviceAccessOverridesResponse
Prelude.Read, Int -> ListMobileDeviceAccessOverridesResponse -> ShowS
[ListMobileDeviceAccessOverridesResponse] -> ShowS
ListMobileDeviceAccessOverridesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListMobileDeviceAccessOverridesResponse] -> ShowS
$cshowList :: [ListMobileDeviceAccessOverridesResponse] -> ShowS
show :: ListMobileDeviceAccessOverridesResponse -> String
$cshow :: ListMobileDeviceAccessOverridesResponse -> String
showsPrec :: Int -> ListMobileDeviceAccessOverridesResponse -> ShowS
$cshowsPrec :: Int -> ListMobileDeviceAccessOverridesResponse -> ShowS
Prelude.Show, forall x.
Rep ListMobileDeviceAccessOverridesResponse x
-> ListMobileDeviceAccessOverridesResponse
forall x.
ListMobileDeviceAccessOverridesResponse
-> Rep ListMobileDeviceAccessOverridesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListMobileDeviceAccessOverridesResponse x
-> ListMobileDeviceAccessOverridesResponse
$cfrom :: forall x.
ListMobileDeviceAccessOverridesResponse
-> Rep ListMobileDeviceAccessOverridesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListMobileDeviceAccessOverridesResponse' 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:
--
-- 'nextToken', 'listMobileDeviceAccessOverridesResponse_nextToken' - The token to use to retrieve the next page of results. The value is
-- “null” when there are no more results to return.
--
-- 'overrides', 'listMobileDeviceAccessOverridesResponse_overrides' - The list of mobile device access overrides that exist for the specified
-- WorkMail organization and user.
--
-- 'httpStatus', 'listMobileDeviceAccessOverridesResponse_httpStatus' - The response's http status code.
newListMobileDeviceAccessOverridesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListMobileDeviceAccessOverridesResponse
newListMobileDeviceAccessOverridesResponse :: Int -> ListMobileDeviceAccessOverridesResponse
newListMobileDeviceAccessOverridesResponse
  Int
pHttpStatus_ =
    ListMobileDeviceAccessOverridesResponse'
      { $sel:nextToken:ListMobileDeviceAccessOverridesResponse' :: Maybe Text
nextToken =
          forall a. Maybe a
Prelude.Nothing,
        $sel:overrides:ListMobileDeviceAccessOverridesResponse' :: Maybe [MobileDeviceAccessOverride]
overrides = forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:ListMobileDeviceAccessOverridesResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | The token to use to retrieve the next page of results. The value is
-- “null” when there are no more results to return.
listMobileDeviceAccessOverridesResponse_nextToken :: Lens.Lens' ListMobileDeviceAccessOverridesResponse (Prelude.Maybe Prelude.Text)
listMobileDeviceAccessOverridesResponse_nextToken :: Lens' ListMobileDeviceAccessOverridesResponse (Maybe Text)
listMobileDeviceAccessOverridesResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMobileDeviceAccessOverridesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListMobileDeviceAccessOverridesResponse' :: ListMobileDeviceAccessOverridesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListMobileDeviceAccessOverridesResponse
s@ListMobileDeviceAccessOverridesResponse' {} Maybe Text
a -> ListMobileDeviceAccessOverridesResponse
s {$sel:nextToken:ListMobileDeviceAccessOverridesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListMobileDeviceAccessOverridesResponse)

-- | The list of mobile device access overrides that exist for the specified
-- WorkMail organization and user.
listMobileDeviceAccessOverridesResponse_overrides :: Lens.Lens' ListMobileDeviceAccessOverridesResponse (Prelude.Maybe [MobileDeviceAccessOverride])
listMobileDeviceAccessOverridesResponse_overrides :: Lens'
  ListMobileDeviceAccessOverridesResponse
  (Maybe [MobileDeviceAccessOverride])
listMobileDeviceAccessOverridesResponse_overrides = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMobileDeviceAccessOverridesResponse' {Maybe [MobileDeviceAccessOverride]
overrides :: Maybe [MobileDeviceAccessOverride]
$sel:overrides:ListMobileDeviceAccessOverridesResponse' :: ListMobileDeviceAccessOverridesResponse
-> Maybe [MobileDeviceAccessOverride]
overrides} -> Maybe [MobileDeviceAccessOverride]
overrides) (\s :: ListMobileDeviceAccessOverridesResponse
s@ListMobileDeviceAccessOverridesResponse' {} Maybe [MobileDeviceAccessOverride]
a -> ListMobileDeviceAccessOverridesResponse
s {$sel:overrides:ListMobileDeviceAccessOverridesResponse' :: Maybe [MobileDeviceAccessOverride]
overrides = Maybe [MobileDeviceAccessOverride]
a} :: ListMobileDeviceAccessOverridesResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The response's http status code.
listMobileDeviceAccessOverridesResponse_httpStatus :: Lens.Lens' ListMobileDeviceAccessOverridesResponse Prelude.Int
listMobileDeviceAccessOverridesResponse_httpStatus :: Lens' ListMobileDeviceAccessOverridesResponse Int
listMobileDeviceAccessOverridesResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListMobileDeviceAccessOverridesResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListMobileDeviceAccessOverridesResponse' :: ListMobileDeviceAccessOverridesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListMobileDeviceAccessOverridesResponse
s@ListMobileDeviceAccessOverridesResponse' {} Int
a -> ListMobileDeviceAccessOverridesResponse
s {$sel:httpStatus:ListMobileDeviceAccessOverridesResponse' :: Int
httpStatus = Int
a} :: ListMobileDeviceAccessOverridesResponse)

instance
  Prelude.NFData
    ListMobileDeviceAccessOverridesResponse
  where
  rnf :: ListMobileDeviceAccessOverridesResponse -> ()
rnf ListMobileDeviceAccessOverridesResponse' {Int
Maybe [MobileDeviceAccessOverride]
Maybe Text
httpStatus :: Int
overrides :: Maybe [MobileDeviceAccessOverride]
nextToken :: Maybe Text
$sel:httpStatus:ListMobileDeviceAccessOverridesResponse' :: ListMobileDeviceAccessOverridesResponse -> Int
$sel:overrides:ListMobileDeviceAccessOverridesResponse' :: ListMobileDeviceAccessOverridesResponse
-> Maybe [MobileDeviceAccessOverride]
$sel:nextToken:ListMobileDeviceAccessOverridesResponse' :: ListMobileDeviceAccessOverridesResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [MobileDeviceAccessOverride]
overrides
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus