{-# 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 #-}
module Amazonka.EFS.DescribeAccountPreferences
(
DescribeAccountPreferences (..),
newDescribeAccountPreferences,
describeAccountPreferences_nextToken,
describeAccountPreferences_maxResults,
DescribeAccountPreferencesResponse (..),
newDescribeAccountPreferencesResponse,
describeAccountPreferencesResponse_resourceIdPreference,
describeAccountPreferencesResponse_nextToken,
describeAccountPreferencesResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.EFS.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DescribeAccountPreferences = DescribeAccountPreferences'
{
DescribeAccountPreferences -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeAccountPreferences -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural
}
deriving (DescribeAccountPreferences -> DescribeAccountPreferences -> Bool
(DescribeAccountPreferences -> DescribeAccountPreferences -> Bool)
-> (DescribeAccountPreferences
-> DescribeAccountPreferences -> Bool)
-> Eq DescribeAccountPreferences
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeAccountPreferences -> DescribeAccountPreferences -> Bool
$c/= :: DescribeAccountPreferences -> DescribeAccountPreferences -> Bool
== :: DescribeAccountPreferences -> DescribeAccountPreferences -> Bool
$c== :: DescribeAccountPreferences -> DescribeAccountPreferences -> Bool
Prelude.Eq, ReadPrec [DescribeAccountPreferences]
ReadPrec DescribeAccountPreferences
Int -> ReadS DescribeAccountPreferences
ReadS [DescribeAccountPreferences]
(Int -> ReadS DescribeAccountPreferences)
-> ReadS [DescribeAccountPreferences]
-> ReadPrec DescribeAccountPreferences
-> ReadPrec [DescribeAccountPreferences]
-> Read DescribeAccountPreferences
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeAccountPreferences]
$creadListPrec :: ReadPrec [DescribeAccountPreferences]
readPrec :: ReadPrec DescribeAccountPreferences
$creadPrec :: ReadPrec DescribeAccountPreferences
readList :: ReadS [DescribeAccountPreferences]
$creadList :: ReadS [DescribeAccountPreferences]
readsPrec :: Int -> ReadS DescribeAccountPreferences
$creadsPrec :: Int -> ReadS DescribeAccountPreferences
Prelude.Read, Int -> DescribeAccountPreferences -> ShowS
[DescribeAccountPreferences] -> ShowS
DescribeAccountPreferences -> String
(Int -> DescribeAccountPreferences -> ShowS)
-> (DescribeAccountPreferences -> String)
-> ([DescribeAccountPreferences] -> ShowS)
-> Show DescribeAccountPreferences
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeAccountPreferences] -> ShowS
$cshowList :: [DescribeAccountPreferences] -> ShowS
show :: DescribeAccountPreferences -> String
$cshow :: DescribeAccountPreferences -> String
showsPrec :: Int -> DescribeAccountPreferences -> ShowS
$cshowsPrec :: Int -> DescribeAccountPreferences -> ShowS
Prelude.Show, (forall x.
DescribeAccountPreferences -> Rep DescribeAccountPreferences x)
-> (forall x.
Rep DescribeAccountPreferences x -> DescribeAccountPreferences)
-> Generic DescribeAccountPreferences
forall x.
Rep DescribeAccountPreferences x -> DescribeAccountPreferences
forall x.
DescribeAccountPreferences -> Rep DescribeAccountPreferences x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeAccountPreferences x -> DescribeAccountPreferences
$cfrom :: forall x.
DescribeAccountPreferences -> Rep DescribeAccountPreferences x
Prelude.Generic)
newDescribeAccountPreferences ::
DescribeAccountPreferences
newDescribeAccountPreferences :: DescribeAccountPreferences
newDescribeAccountPreferences =
DescribeAccountPreferences' :: Maybe Text -> Maybe Natural -> DescribeAccountPreferences
DescribeAccountPreferences'
{ $sel:nextToken:DescribeAccountPreferences' :: Maybe Text
nextToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:DescribeAccountPreferences' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing
}
describeAccountPreferences_nextToken :: Lens.Lens' DescribeAccountPreferences (Prelude.Maybe Prelude.Text)
describeAccountPreferences_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeAccountPreferences -> f DescribeAccountPreferences
describeAccountPreferences_nextToken = (DescribeAccountPreferences -> Maybe Text)
-> (DescribeAccountPreferences
-> Maybe Text -> DescribeAccountPreferences)
-> Lens
DescribeAccountPreferences
DescribeAccountPreferences
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAccountPreferences' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeAccountPreferences' :: DescribeAccountPreferences -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeAccountPreferences
s@DescribeAccountPreferences' {} Maybe Text
a -> DescribeAccountPreferences
s {$sel:nextToken:DescribeAccountPreferences' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeAccountPreferences)
describeAccountPreferences_maxResults :: Lens.Lens' DescribeAccountPreferences (Prelude.Maybe Prelude.Natural)
describeAccountPreferences_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> DescribeAccountPreferences -> f DescribeAccountPreferences
describeAccountPreferences_maxResults = (DescribeAccountPreferences -> Maybe Natural)
-> (DescribeAccountPreferences
-> Maybe Natural -> DescribeAccountPreferences)
-> Lens
DescribeAccountPreferences
DescribeAccountPreferences
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAccountPreferences' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:DescribeAccountPreferences' :: DescribeAccountPreferences -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: DescribeAccountPreferences
s@DescribeAccountPreferences' {} Maybe Natural
a -> DescribeAccountPreferences
s {$sel:maxResults:DescribeAccountPreferences' :: Maybe Natural
maxResults = Maybe Natural
a} :: DescribeAccountPreferences)
instance Core.AWSRequest DescribeAccountPreferences where
type
AWSResponse DescribeAccountPreferences =
DescribeAccountPreferencesResponse
request :: DescribeAccountPreferences -> Request DescribeAccountPreferences
request = Service
-> DescribeAccountPreferences -> Request DescribeAccountPreferences
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
response :: Logger
-> Service
-> Proxy DescribeAccountPreferences
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeAccountPreferences)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DescribeAccountPreferences))
-> Logger
-> Service
-> Proxy DescribeAccountPreferences
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DescribeAccountPreferences)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe ResourceIdPreference
-> Maybe Text -> Int -> DescribeAccountPreferencesResponse
DescribeAccountPreferencesResponse'
(Maybe ResourceIdPreference
-> Maybe Text -> Int -> DescribeAccountPreferencesResponse)
-> Either String (Maybe ResourceIdPreference)
-> Either
String (Maybe Text -> Int -> DescribeAccountPreferencesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe ResourceIdPreference)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ResourceIdPreference")
Either
String (Maybe Text -> Int -> DescribeAccountPreferencesResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeAccountPreferencesResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NextToken")
Either String (Int -> DescribeAccountPreferencesResponse)
-> Either String Int
-> Either String DescribeAccountPreferencesResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable DescribeAccountPreferences
instance Prelude.NFData DescribeAccountPreferences
instance Core.ToHeaders DescribeAccountPreferences where
toHeaders :: DescribeAccountPreferences -> ResponseHeaders
toHeaders = ResponseHeaders -> DescribeAccountPreferences -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath DescribeAccountPreferences where
toPath :: DescribeAccountPreferences -> ByteString
toPath =
ByteString -> DescribeAccountPreferences -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/2015-02-01/account-preferences"
instance Core.ToQuery DescribeAccountPreferences where
toQuery :: DescribeAccountPreferences -> QueryString
toQuery = QueryString -> DescribeAccountPreferences -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DescribeAccountPreferencesResponse = DescribeAccountPreferencesResponse'
{
DescribeAccountPreferencesResponse -> Maybe ResourceIdPreference
resourceIdPreference :: Prelude.Maybe ResourceIdPreference,
DescribeAccountPreferencesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
DescribeAccountPreferencesResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DescribeAccountPreferencesResponse
-> DescribeAccountPreferencesResponse -> Bool
(DescribeAccountPreferencesResponse
-> DescribeAccountPreferencesResponse -> Bool)
-> (DescribeAccountPreferencesResponse
-> DescribeAccountPreferencesResponse -> Bool)
-> Eq DescribeAccountPreferencesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeAccountPreferencesResponse
-> DescribeAccountPreferencesResponse -> Bool
$c/= :: DescribeAccountPreferencesResponse
-> DescribeAccountPreferencesResponse -> Bool
== :: DescribeAccountPreferencesResponse
-> DescribeAccountPreferencesResponse -> Bool
$c== :: DescribeAccountPreferencesResponse
-> DescribeAccountPreferencesResponse -> Bool
Prelude.Eq, ReadPrec [DescribeAccountPreferencesResponse]
ReadPrec DescribeAccountPreferencesResponse
Int -> ReadS DescribeAccountPreferencesResponse
ReadS [DescribeAccountPreferencesResponse]
(Int -> ReadS DescribeAccountPreferencesResponse)
-> ReadS [DescribeAccountPreferencesResponse]
-> ReadPrec DescribeAccountPreferencesResponse
-> ReadPrec [DescribeAccountPreferencesResponse]
-> Read DescribeAccountPreferencesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeAccountPreferencesResponse]
$creadListPrec :: ReadPrec [DescribeAccountPreferencesResponse]
readPrec :: ReadPrec DescribeAccountPreferencesResponse
$creadPrec :: ReadPrec DescribeAccountPreferencesResponse
readList :: ReadS [DescribeAccountPreferencesResponse]
$creadList :: ReadS [DescribeAccountPreferencesResponse]
readsPrec :: Int -> ReadS DescribeAccountPreferencesResponse
$creadsPrec :: Int -> ReadS DescribeAccountPreferencesResponse
Prelude.Read, Int -> DescribeAccountPreferencesResponse -> ShowS
[DescribeAccountPreferencesResponse] -> ShowS
DescribeAccountPreferencesResponse -> String
(Int -> DescribeAccountPreferencesResponse -> ShowS)
-> (DescribeAccountPreferencesResponse -> String)
-> ([DescribeAccountPreferencesResponse] -> ShowS)
-> Show DescribeAccountPreferencesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeAccountPreferencesResponse] -> ShowS
$cshowList :: [DescribeAccountPreferencesResponse] -> ShowS
show :: DescribeAccountPreferencesResponse -> String
$cshow :: DescribeAccountPreferencesResponse -> String
showsPrec :: Int -> DescribeAccountPreferencesResponse -> ShowS
$cshowsPrec :: Int -> DescribeAccountPreferencesResponse -> ShowS
Prelude.Show, (forall x.
DescribeAccountPreferencesResponse
-> Rep DescribeAccountPreferencesResponse x)
-> (forall x.
Rep DescribeAccountPreferencesResponse x
-> DescribeAccountPreferencesResponse)
-> Generic DescribeAccountPreferencesResponse
forall x.
Rep DescribeAccountPreferencesResponse x
-> DescribeAccountPreferencesResponse
forall x.
DescribeAccountPreferencesResponse
-> Rep DescribeAccountPreferencesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeAccountPreferencesResponse x
-> DescribeAccountPreferencesResponse
$cfrom :: forall x.
DescribeAccountPreferencesResponse
-> Rep DescribeAccountPreferencesResponse x
Prelude.Generic)
newDescribeAccountPreferencesResponse ::
Prelude.Int ->
DescribeAccountPreferencesResponse
newDescribeAccountPreferencesResponse :: Int -> DescribeAccountPreferencesResponse
newDescribeAccountPreferencesResponse Int
pHttpStatus_ =
DescribeAccountPreferencesResponse' :: Maybe ResourceIdPreference
-> Maybe Text -> Int -> DescribeAccountPreferencesResponse
DescribeAccountPreferencesResponse'
{ $sel:resourceIdPreference:DescribeAccountPreferencesResponse' :: Maybe ResourceIdPreference
resourceIdPreference =
Maybe ResourceIdPreference
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:DescribeAccountPreferencesResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DescribeAccountPreferencesResponse' :: Int
httpStatus = Int
pHttpStatus_
}
describeAccountPreferencesResponse_resourceIdPreference :: Lens.Lens' DescribeAccountPreferencesResponse (Prelude.Maybe ResourceIdPreference)
describeAccountPreferencesResponse_resourceIdPreference :: (Maybe ResourceIdPreference -> f (Maybe ResourceIdPreference))
-> DescribeAccountPreferencesResponse
-> f DescribeAccountPreferencesResponse
describeAccountPreferencesResponse_resourceIdPreference = (DescribeAccountPreferencesResponse -> Maybe ResourceIdPreference)
-> (DescribeAccountPreferencesResponse
-> Maybe ResourceIdPreference
-> DescribeAccountPreferencesResponse)
-> Lens
DescribeAccountPreferencesResponse
DescribeAccountPreferencesResponse
(Maybe ResourceIdPreference)
(Maybe ResourceIdPreference)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAccountPreferencesResponse' {Maybe ResourceIdPreference
resourceIdPreference :: Maybe ResourceIdPreference
$sel:resourceIdPreference:DescribeAccountPreferencesResponse' :: DescribeAccountPreferencesResponse -> Maybe ResourceIdPreference
resourceIdPreference} -> Maybe ResourceIdPreference
resourceIdPreference) (\s :: DescribeAccountPreferencesResponse
s@DescribeAccountPreferencesResponse' {} Maybe ResourceIdPreference
a -> DescribeAccountPreferencesResponse
s {$sel:resourceIdPreference:DescribeAccountPreferencesResponse' :: Maybe ResourceIdPreference
resourceIdPreference = Maybe ResourceIdPreference
a} :: DescribeAccountPreferencesResponse)
describeAccountPreferencesResponse_nextToken :: Lens.Lens' DescribeAccountPreferencesResponse (Prelude.Maybe Prelude.Text)
describeAccountPreferencesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> DescribeAccountPreferencesResponse
-> f DescribeAccountPreferencesResponse
describeAccountPreferencesResponse_nextToken = (DescribeAccountPreferencesResponse -> Maybe Text)
-> (DescribeAccountPreferencesResponse
-> Maybe Text -> DescribeAccountPreferencesResponse)
-> Lens
DescribeAccountPreferencesResponse
DescribeAccountPreferencesResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAccountPreferencesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeAccountPreferencesResponse' :: DescribeAccountPreferencesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeAccountPreferencesResponse
s@DescribeAccountPreferencesResponse' {} Maybe Text
a -> DescribeAccountPreferencesResponse
s {$sel:nextToken:DescribeAccountPreferencesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeAccountPreferencesResponse)
describeAccountPreferencesResponse_httpStatus :: Lens.Lens' DescribeAccountPreferencesResponse Prelude.Int
describeAccountPreferencesResponse_httpStatus :: (Int -> f Int)
-> DescribeAccountPreferencesResponse
-> f DescribeAccountPreferencesResponse
describeAccountPreferencesResponse_httpStatus = (DescribeAccountPreferencesResponse -> Int)
-> (DescribeAccountPreferencesResponse
-> Int -> DescribeAccountPreferencesResponse)
-> Lens
DescribeAccountPreferencesResponse
DescribeAccountPreferencesResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeAccountPreferencesResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeAccountPreferencesResponse' :: DescribeAccountPreferencesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeAccountPreferencesResponse
s@DescribeAccountPreferencesResponse' {} Int
a -> DescribeAccountPreferencesResponse
s {$sel:httpStatus:DescribeAccountPreferencesResponse' :: Int
httpStatus = Int
a} :: DescribeAccountPreferencesResponse)
instance
Prelude.NFData
DescribeAccountPreferencesResponse