{-# 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.ECS.ListAccountSettings
(
ListAccountSettings (..),
newListAccountSettings,
listAccountSettings_value,
listAccountSettings_nextToken,
listAccountSettings_name,
listAccountSettings_principalArn,
listAccountSettings_effectiveSettings,
listAccountSettings_maxResults,
ListAccountSettingsResponse (..),
newListAccountSettingsResponse,
listAccountSettingsResponse_settings,
listAccountSettingsResponse_nextToken,
listAccountSettingsResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.ECS.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 ListAccountSettings = ListAccountSettings'
{
ListAccountSettings -> Maybe Text
value :: Prelude.Maybe Prelude.Text,
ListAccountSettings -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListAccountSettings -> Maybe SettingName
name :: Prelude.Maybe SettingName,
ListAccountSettings -> Maybe Text
principalArn :: Prelude.Maybe Prelude.Text,
ListAccountSettings -> Maybe Bool
effectiveSettings :: Prelude.Maybe Prelude.Bool,
ListAccountSettings -> Maybe Int
maxResults :: Prelude.Maybe Prelude.Int
}
deriving (ListAccountSettings -> ListAccountSettings -> Bool
(ListAccountSettings -> ListAccountSettings -> Bool)
-> (ListAccountSettings -> ListAccountSettings -> Bool)
-> Eq ListAccountSettings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListAccountSettings -> ListAccountSettings -> Bool
$c/= :: ListAccountSettings -> ListAccountSettings -> Bool
== :: ListAccountSettings -> ListAccountSettings -> Bool
$c== :: ListAccountSettings -> ListAccountSettings -> Bool
Prelude.Eq, ReadPrec [ListAccountSettings]
ReadPrec ListAccountSettings
Int -> ReadS ListAccountSettings
ReadS [ListAccountSettings]
(Int -> ReadS ListAccountSettings)
-> ReadS [ListAccountSettings]
-> ReadPrec ListAccountSettings
-> ReadPrec [ListAccountSettings]
-> Read ListAccountSettings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListAccountSettings]
$creadListPrec :: ReadPrec [ListAccountSettings]
readPrec :: ReadPrec ListAccountSettings
$creadPrec :: ReadPrec ListAccountSettings
readList :: ReadS [ListAccountSettings]
$creadList :: ReadS [ListAccountSettings]
readsPrec :: Int -> ReadS ListAccountSettings
$creadsPrec :: Int -> ReadS ListAccountSettings
Prelude.Read, Int -> ListAccountSettings -> ShowS
[ListAccountSettings] -> ShowS
ListAccountSettings -> String
(Int -> ListAccountSettings -> ShowS)
-> (ListAccountSettings -> String)
-> ([ListAccountSettings] -> ShowS)
-> Show ListAccountSettings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListAccountSettings] -> ShowS
$cshowList :: [ListAccountSettings] -> ShowS
show :: ListAccountSettings -> String
$cshow :: ListAccountSettings -> String
showsPrec :: Int -> ListAccountSettings -> ShowS
$cshowsPrec :: Int -> ListAccountSettings -> ShowS
Prelude.Show, (forall x. ListAccountSettings -> Rep ListAccountSettings x)
-> (forall x. Rep ListAccountSettings x -> ListAccountSettings)
-> Generic ListAccountSettings
forall x. Rep ListAccountSettings x -> ListAccountSettings
forall x. ListAccountSettings -> Rep ListAccountSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListAccountSettings x -> ListAccountSettings
$cfrom :: forall x. ListAccountSettings -> Rep ListAccountSettings x
Prelude.Generic)
newListAccountSettings ::
ListAccountSettings
newListAccountSettings :: ListAccountSettings
newListAccountSettings =
ListAccountSettings' :: Maybe Text
-> Maybe Text
-> Maybe SettingName
-> Maybe Text
-> Maybe Bool
-> Maybe Int
-> ListAccountSettings
ListAccountSettings'
{ $sel:value:ListAccountSettings' :: Maybe Text
value = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListAccountSettings' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:ListAccountSettings' :: Maybe SettingName
name = Maybe SettingName
forall a. Maybe a
Prelude.Nothing,
$sel:principalArn:ListAccountSettings' :: Maybe Text
principalArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:effectiveSettings:ListAccountSettings' :: Maybe Bool
effectiveSettings = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:ListAccountSettings' :: Maybe Int
maxResults = Maybe Int
forall a. Maybe a
Prelude.Nothing
}
listAccountSettings_value :: Lens.Lens' ListAccountSettings (Prelude.Maybe Prelude.Text)
listAccountSettings_value :: (Maybe Text -> f (Maybe Text))
-> ListAccountSettings -> f ListAccountSettings
listAccountSettings_value = (ListAccountSettings -> Maybe Text)
-> (ListAccountSettings -> Maybe Text -> ListAccountSettings)
-> Lens
ListAccountSettings ListAccountSettings (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAccountSettings' {Maybe Text
value :: Maybe Text
$sel:value:ListAccountSettings' :: ListAccountSettings -> Maybe Text
value} -> Maybe Text
value) (\s :: ListAccountSettings
s@ListAccountSettings' {} Maybe Text
a -> ListAccountSettings
s {$sel:value:ListAccountSettings' :: Maybe Text
value = Maybe Text
a} :: ListAccountSettings)
listAccountSettings_nextToken :: Lens.Lens' ListAccountSettings (Prelude.Maybe Prelude.Text)
listAccountSettings_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListAccountSettings -> f ListAccountSettings
listAccountSettings_nextToken = (ListAccountSettings -> Maybe Text)
-> (ListAccountSettings -> Maybe Text -> ListAccountSettings)
-> Lens
ListAccountSettings ListAccountSettings (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAccountSettings' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListAccountSettings' :: ListAccountSettings -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListAccountSettings
s@ListAccountSettings' {} Maybe Text
a -> ListAccountSettings
s {$sel:nextToken:ListAccountSettings' :: Maybe Text
nextToken = Maybe Text
a} :: ListAccountSettings)
listAccountSettings_name :: Lens.Lens' ListAccountSettings (Prelude.Maybe SettingName)
listAccountSettings_name :: (Maybe SettingName -> f (Maybe SettingName))
-> ListAccountSettings -> f ListAccountSettings
listAccountSettings_name = (ListAccountSettings -> Maybe SettingName)
-> (ListAccountSettings
-> Maybe SettingName -> ListAccountSettings)
-> Lens
ListAccountSettings
ListAccountSettings
(Maybe SettingName)
(Maybe SettingName)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAccountSettings' {Maybe SettingName
name :: Maybe SettingName
$sel:name:ListAccountSettings' :: ListAccountSettings -> Maybe SettingName
name} -> Maybe SettingName
name) (\s :: ListAccountSettings
s@ListAccountSettings' {} Maybe SettingName
a -> ListAccountSettings
s {$sel:name:ListAccountSettings' :: Maybe SettingName
name = Maybe SettingName
a} :: ListAccountSettings)
listAccountSettings_principalArn :: Lens.Lens' ListAccountSettings (Prelude.Maybe Prelude.Text)
listAccountSettings_principalArn :: (Maybe Text -> f (Maybe Text))
-> ListAccountSettings -> f ListAccountSettings
listAccountSettings_principalArn = (ListAccountSettings -> Maybe Text)
-> (ListAccountSettings -> Maybe Text -> ListAccountSettings)
-> Lens
ListAccountSettings ListAccountSettings (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAccountSettings' {Maybe Text
principalArn :: Maybe Text
$sel:principalArn:ListAccountSettings' :: ListAccountSettings -> Maybe Text
principalArn} -> Maybe Text
principalArn) (\s :: ListAccountSettings
s@ListAccountSettings' {} Maybe Text
a -> ListAccountSettings
s {$sel:principalArn:ListAccountSettings' :: Maybe Text
principalArn = Maybe Text
a} :: ListAccountSettings)
listAccountSettings_effectiveSettings :: Lens.Lens' ListAccountSettings (Prelude.Maybe Prelude.Bool)
listAccountSettings_effectiveSettings :: (Maybe Bool -> f (Maybe Bool))
-> ListAccountSettings -> f ListAccountSettings
listAccountSettings_effectiveSettings = (ListAccountSettings -> Maybe Bool)
-> (ListAccountSettings -> Maybe Bool -> ListAccountSettings)
-> Lens
ListAccountSettings ListAccountSettings (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAccountSettings' {Maybe Bool
effectiveSettings :: Maybe Bool
$sel:effectiveSettings:ListAccountSettings' :: ListAccountSettings -> Maybe Bool
effectiveSettings} -> Maybe Bool
effectiveSettings) (\s :: ListAccountSettings
s@ListAccountSettings' {} Maybe Bool
a -> ListAccountSettings
s {$sel:effectiveSettings:ListAccountSettings' :: Maybe Bool
effectiveSettings = Maybe Bool
a} :: ListAccountSettings)
listAccountSettings_maxResults :: Lens.Lens' ListAccountSettings (Prelude.Maybe Prelude.Int)
listAccountSettings_maxResults :: (Maybe Int -> f (Maybe Int))
-> ListAccountSettings -> f ListAccountSettings
listAccountSettings_maxResults = (ListAccountSettings -> Maybe Int)
-> (ListAccountSettings -> Maybe Int -> ListAccountSettings)
-> Lens
ListAccountSettings ListAccountSettings (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAccountSettings' {Maybe Int
maxResults :: Maybe Int
$sel:maxResults:ListAccountSettings' :: ListAccountSettings -> Maybe Int
maxResults} -> Maybe Int
maxResults) (\s :: ListAccountSettings
s@ListAccountSettings' {} Maybe Int
a -> ListAccountSettings
s {$sel:maxResults:ListAccountSettings' :: Maybe Int
maxResults = Maybe Int
a} :: ListAccountSettings)
instance Core.AWSPager ListAccountSettings where
page :: ListAccountSettings
-> AWSResponse ListAccountSettings -> Maybe ListAccountSettings
page ListAccountSettings
rq AWSResponse ListAccountSettings
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListAccountSettings
ListAccountSettingsResponse
rs
ListAccountSettingsResponse
-> Getting (First Text) ListAccountSettingsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListAccountSettingsResponse
-> Const (First Text) ListAccountSettingsResponse
Lens' ListAccountSettingsResponse (Maybe Text)
listAccountSettingsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListAccountSettingsResponse
-> Const (First Text) ListAccountSettingsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListAccountSettingsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe ListAccountSettings
forall a. Maybe a
Prelude.Nothing
| Maybe [Setting] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse ListAccountSettings
ListAccountSettingsResponse
rs
ListAccountSettingsResponse
-> Getting (First [Setting]) ListAccountSettingsResponse [Setting]
-> Maybe [Setting]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [Setting] -> Const (First [Setting]) (Maybe [Setting]))
-> ListAccountSettingsResponse
-> Const (First [Setting]) ListAccountSettingsResponse
Lens' ListAccountSettingsResponse (Maybe [Setting])
listAccountSettingsResponse_settings
((Maybe [Setting] -> Const (First [Setting]) (Maybe [Setting]))
-> ListAccountSettingsResponse
-> Const (First [Setting]) ListAccountSettingsResponse)
-> (([Setting] -> Const (First [Setting]) [Setting])
-> Maybe [Setting] -> Const (First [Setting]) (Maybe [Setting]))
-> Getting (First [Setting]) ListAccountSettingsResponse [Setting]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Setting] -> Const (First [Setting]) [Setting])
-> Maybe [Setting] -> Const (First [Setting]) (Maybe [Setting])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe ListAccountSettings
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
ListAccountSettings -> Maybe ListAccountSettings
forall a. a -> Maybe a
Prelude.Just (ListAccountSettings -> Maybe ListAccountSettings)
-> ListAccountSettings -> Maybe ListAccountSettings
forall a b. (a -> b) -> a -> b
Prelude.$
ListAccountSettings
rq
ListAccountSettings
-> (ListAccountSettings -> ListAccountSettings)
-> ListAccountSettings
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListAccountSettings -> Identity ListAccountSettings
Lens
ListAccountSettings ListAccountSettings (Maybe Text) (Maybe Text)
listAccountSettings_nextToken
((Maybe Text -> Identity (Maybe Text))
-> ListAccountSettings -> Identity ListAccountSettings)
-> Maybe Text -> ListAccountSettings -> ListAccountSettings
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListAccountSettings
ListAccountSettingsResponse
rs
ListAccountSettingsResponse
-> Getting (First Text) ListAccountSettingsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListAccountSettingsResponse
-> Const (First Text) ListAccountSettingsResponse
Lens' ListAccountSettingsResponse (Maybe Text)
listAccountSettingsResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> ListAccountSettingsResponse
-> Const (First Text) ListAccountSettingsResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListAccountSettingsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
instance Core.AWSRequest ListAccountSettings where
type
AWSResponse ListAccountSettings =
ListAccountSettingsResponse
request :: ListAccountSettings -> Request ListAccountSettings
request = Service -> ListAccountSettings -> Request ListAccountSettings
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy ListAccountSettings
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListAccountSettings)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse ListAccountSettings))
-> Logger
-> Service
-> Proxy ListAccountSettings
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse ListAccountSettings)))
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 [Setting] -> Maybe Text -> Int -> ListAccountSettingsResponse
ListAccountSettingsResponse'
(Maybe [Setting]
-> Maybe Text -> Int -> ListAccountSettingsResponse)
-> Either String (Maybe [Setting])
-> Either String (Maybe Text -> Int -> ListAccountSettingsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [Setting]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"settings" Either String (Maybe (Maybe [Setting]))
-> Maybe [Setting] -> Either String (Maybe [Setting])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Setting]
forall a. Monoid a => a
Prelude.mempty)
Either String (Maybe Text -> Int -> ListAccountSettingsResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListAccountSettingsResponse)
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 -> ListAccountSettingsResponse)
-> Either String Int -> Either String ListAccountSettingsResponse
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 ListAccountSettings
instance Prelude.NFData ListAccountSettings
instance Core.ToHeaders ListAccountSettings where
toHeaders :: ListAccountSettings -> ResponseHeaders
toHeaders =
ResponseHeaders -> ListAccountSettings -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AmazonEC2ContainerServiceV20141113.ListAccountSettings" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON ListAccountSettings where
toJSON :: ListAccountSettings -> Value
toJSON ListAccountSettings' {Maybe Bool
Maybe Int
Maybe Text
Maybe SettingName
maxResults :: Maybe Int
effectiveSettings :: Maybe Bool
principalArn :: Maybe Text
name :: Maybe SettingName
nextToken :: Maybe Text
value :: Maybe Text
$sel:maxResults:ListAccountSettings' :: ListAccountSettings -> Maybe Int
$sel:effectiveSettings:ListAccountSettings' :: ListAccountSettings -> Maybe Bool
$sel:principalArn:ListAccountSettings' :: ListAccountSettings -> Maybe Text
$sel:name:ListAccountSettings' :: ListAccountSettings -> Maybe SettingName
$sel:nextToken:ListAccountSettings' :: ListAccountSettings -> Maybe Text
$sel:value:ListAccountSettings' :: ListAccountSettings -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"value" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
value,
(Text
"nextToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
nextToken,
(Text
"name" Text -> SettingName -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (SettingName -> Pair) -> Maybe SettingName -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SettingName
name,
(Text
"principalArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
principalArn,
(Text
"effectiveSettings" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
effectiveSettings,
(Text
"maxResults" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
maxResults
]
)
instance Core.ToPath ListAccountSettings where
toPath :: ListAccountSettings -> ByteString
toPath = ByteString -> ListAccountSettings -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery ListAccountSettings where
toQuery :: ListAccountSettings -> QueryString
toQuery = QueryString -> ListAccountSettings -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data ListAccountSettingsResponse = ListAccountSettingsResponse'
{
ListAccountSettingsResponse -> Maybe [Setting]
settings :: Prelude.Maybe [Setting],
ListAccountSettingsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
ListAccountSettingsResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ListAccountSettingsResponse -> ListAccountSettingsResponse -> Bool
(ListAccountSettingsResponse
-> ListAccountSettingsResponse -> Bool)
-> (ListAccountSettingsResponse
-> ListAccountSettingsResponse -> Bool)
-> Eq ListAccountSettingsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListAccountSettingsResponse -> ListAccountSettingsResponse -> Bool
$c/= :: ListAccountSettingsResponse -> ListAccountSettingsResponse -> Bool
== :: ListAccountSettingsResponse -> ListAccountSettingsResponse -> Bool
$c== :: ListAccountSettingsResponse -> ListAccountSettingsResponse -> Bool
Prelude.Eq, ReadPrec [ListAccountSettingsResponse]
ReadPrec ListAccountSettingsResponse
Int -> ReadS ListAccountSettingsResponse
ReadS [ListAccountSettingsResponse]
(Int -> ReadS ListAccountSettingsResponse)
-> ReadS [ListAccountSettingsResponse]
-> ReadPrec ListAccountSettingsResponse
-> ReadPrec [ListAccountSettingsResponse]
-> Read ListAccountSettingsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListAccountSettingsResponse]
$creadListPrec :: ReadPrec [ListAccountSettingsResponse]
readPrec :: ReadPrec ListAccountSettingsResponse
$creadPrec :: ReadPrec ListAccountSettingsResponse
readList :: ReadS [ListAccountSettingsResponse]
$creadList :: ReadS [ListAccountSettingsResponse]
readsPrec :: Int -> ReadS ListAccountSettingsResponse
$creadsPrec :: Int -> ReadS ListAccountSettingsResponse
Prelude.Read, Int -> ListAccountSettingsResponse -> ShowS
[ListAccountSettingsResponse] -> ShowS
ListAccountSettingsResponse -> String
(Int -> ListAccountSettingsResponse -> ShowS)
-> (ListAccountSettingsResponse -> String)
-> ([ListAccountSettingsResponse] -> ShowS)
-> Show ListAccountSettingsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListAccountSettingsResponse] -> ShowS
$cshowList :: [ListAccountSettingsResponse] -> ShowS
show :: ListAccountSettingsResponse -> String
$cshow :: ListAccountSettingsResponse -> String
showsPrec :: Int -> ListAccountSettingsResponse -> ShowS
$cshowsPrec :: Int -> ListAccountSettingsResponse -> ShowS
Prelude.Show, (forall x.
ListAccountSettingsResponse -> Rep ListAccountSettingsResponse x)
-> (forall x.
Rep ListAccountSettingsResponse x -> ListAccountSettingsResponse)
-> Generic ListAccountSettingsResponse
forall x.
Rep ListAccountSettingsResponse x -> ListAccountSettingsResponse
forall x.
ListAccountSettingsResponse -> Rep ListAccountSettingsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListAccountSettingsResponse x -> ListAccountSettingsResponse
$cfrom :: forall x.
ListAccountSettingsResponse -> Rep ListAccountSettingsResponse x
Prelude.Generic)
newListAccountSettingsResponse ::
Prelude.Int ->
ListAccountSettingsResponse
newListAccountSettingsResponse :: Int -> ListAccountSettingsResponse
newListAccountSettingsResponse Int
pHttpStatus_ =
ListAccountSettingsResponse' :: Maybe [Setting] -> Maybe Text -> Int -> ListAccountSettingsResponse
ListAccountSettingsResponse'
{ $sel:settings:ListAccountSettingsResponse' :: Maybe [Setting]
settings =
Maybe [Setting]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:ListAccountSettingsResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ListAccountSettingsResponse' :: Int
httpStatus = Int
pHttpStatus_
}
listAccountSettingsResponse_settings :: Lens.Lens' ListAccountSettingsResponse (Prelude.Maybe [Setting])
listAccountSettingsResponse_settings :: (Maybe [Setting] -> f (Maybe [Setting]))
-> ListAccountSettingsResponse -> f ListAccountSettingsResponse
listAccountSettingsResponse_settings = (ListAccountSettingsResponse -> Maybe [Setting])
-> (ListAccountSettingsResponse
-> Maybe [Setting] -> ListAccountSettingsResponse)
-> Lens' ListAccountSettingsResponse (Maybe [Setting])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAccountSettingsResponse' {Maybe [Setting]
settings :: Maybe [Setting]
$sel:settings:ListAccountSettingsResponse' :: ListAccountSettingsResponse -> Maybe [Setting]
settings} -> Maybe [Setting]
settings) (\s :: ListAccountSettingsResponse
s@ListAccountSettingsResponse' {} Maybe [Setting]
a -> ListAccountSettingsResponse
s {$sel:settings:ListAccountSettingsResponse' :: Maybe [Setting]
settings = Maybe [Setting]
a} :: ListAccountSettingsResponse) ((Maybe [Setting] -> f (Maybe [Setting]))
-> ListAccountSettingsResponse -> f ListAccountSettingsResponse)
-> ((Maybe [Setting] -> f (Maybe [Setting]))
-> Maybe [Setting] -> f (Maybe [Setting]))
-> (Maybe [Setting] -> f (Maybe [Setting]))
-> ListAccountSettingsResponse
-> f ListAccountSettingsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Setting] [Setting] [Setting] [Setting]
-> Iso
(Maybe [Setting])
(Maybe [Setting])
(Maybe [Setting])
(Maybe [Setting])
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 [Setting] [Setting] [Setting] [Setting]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
listAccountSettingsResponse_nextToken :: Lens.Lens' ListAccountSettingsResponse (Prelude.Maybe Prelude.Text)
listAccountSettingsResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListAccountSettingsResponse -> f ListAccountSettingsResponse
listAccountSettingsResponse_nextToken = (ListAccountSettingsResponse -> Maybe Text)
-> (ListAccountSettingsResponse
-> Maybe Text -> ListAccountSettingsResponse)
-> Lens' ListAccountSettingsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAccountSettingsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListAccountSettingsResponse' :: ListAccountSettingsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListAccountSettingsResponse
s@ListAccountSettingsResponse' {} Maybe Text
a -> ListAccountSettingsResponse
s {$sel:nextToken:ListAccountSettingsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListAccountSettingsResponse)
listAccountSettingsResponse_httpStatus :: Lens.Lens' ListAccountSettingsResponse Prelude.Int
listAccountSettingsResponse_httpStatus :: (Int -> f Int)
-> ListAccountSettingsResponse -> f ListAccountSettingsResponse
listAccountSettingsResponse_httpStatus = (ListAccountSettingsResponse -> Int)
-> (ListAccountSettingsResponse
-> Int -> ListAccountSettingsResponse)
-> Lens
ListAccountSettingsResponse ListAccountSettingsResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListAccountSettingsResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListAccountSettingsResponse' :: ListAccountSettingsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListAccountSettingsResponse
s@ListAccountSettingsResponse' {} Int
a -> ListAccountSettingsResponse
s {$sel:httpStatus:ListAccountSettingsResponse' :: Int
httpStatus = Int
a} :: ListAccountSettingsResponse)
instance Prelude.NFData ListAccountSettingsResponse