{-# 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.SecretsManager.GetRandomPassword
(
GetRandomPassword (..),
newGetRandomPassword,
getRandomPassword_includeSpace,
getRandomPassword_excludeNumbers,
getRandomPassword_excludeLowercase,
getRandomPassword_excludeCharacters,
getRandomPassword_excludePunctuation,
getRandomPassword_requireEachIncludedType,
getRandomPassword_excludeUppercase,
getRandomPassword_passwordLength,
GetRandomPasswordResponse (..),
newGetRandomPasswordResponse,
getRandomPasswordResponse_randomPassword,
getRandomPasswordResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.SecretsManager.Types
data GetRandomPassword = GetRandomPassword'
{
GetRandomPassword -> Maybe Bool
includeSpace :: Prelude.Maybe Prelude.Bool,
GetRandomPassword -> Maybe Bool
excludeNumbers :: Prelude.Maybe Prelude.Bool,
GetRandomPassword -> Maybe Bool
excludeLowercase :: Prelude.Maybe Prelude.Bool,
GetRandomPassword -> Maybe Text
excludeCharacters :: Prelude.Maybe Prelude.Text,
GetRandomPassword -> Maybe Bool
excludePunctuation :: Prelude.Maybe Prelude.Bool,
GetRandomPassword -> Maybe Bool
requireEachIncludedType :: Prelude.Maybe Prelude.Bool,
GetRandomPassword -> Maybe Bool
excludeUppercase :: Prelude.Maybe Prelude.Bool,
GetRandomPassword -> Maybe Natural
passwordLength :: Prelude.Maybe Prelude.Natural
}
deriving (GetRandomPassword -> GetRandomPassword -> Bool
(GetRandomPassword -> GetRandomPassword -> Bool)
-> (GetRandomPassword -> GetRandomPassword -> Bool)
-> Eq GetRandomPassword
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetRandomPassword -> GetRandomPassword -> Bool
$c/= :: GetRandomPassword -> GetRandomPassword -> Bool
== :: GetRandomPassword -> GetRandomPassword -> Bool
$c== :: GetRandomPassword -> GetRandomPassword -> Bool
Prelude.Eq, ReadPrec [GetRandomPassword]
ReadPrec GetRandomPassword
Int -> ReadS GetRandomPassword
ReadS [GetRandomPassword]
(Int -> ReadS GetRandomPassword)
-> ReadS [GetRandomPassword]
-> ReadPrec GetRandomPassword
-> ReadPrec [GetRandomPassword]
-> Read GetRandomPassword
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetRandomPassword]
$creadListPrec :: ReadPrec [GetRandomPassword]
readPrec :: ReadPrec GetRandomPassword
$creadPrec :: ReadPrec GetRandomPassword
readList :: ReadS [GetRandomPassword]
$creadList :: ReadS [GetRandomPassword]
readsPrec :: Int -> ReadS GetRandomPassword
$creadsPrec :: Int -> ReadS GetRandomPassword
Prelude.Read, Int -> GetRandomPassword -> ShowS
[GetRandomPassword] -> ShowS
GetRandomPassword -> String
(Int -> GetRandomPassword -> ShowS)
-> (GetRandomPassword -> String)
-> ([GetRandomPassword] -> ShowS)
-> Show GetRandomPassword
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetRandomPassword] -> ShowS
$cshowList :: [GetRandomPassword] -> ShowS
show :: GetRandomPassword -> String
$cshow :: GetRandomPassword -> String
showsPrec :: Int -> GetRandomPassword -> ShowS
$cshowsPrec :: Int -> GetRandomPassword -> ShowS
Prelude.Show, (forall x. GetRandomPassword -> Rep GetRandomPassword x)
-> (forall x. Rep GetRandomPassword x -> GetRandomPassword)
-> Generic GetRandomPassword
forall x. Rep GetRandomPassword x -> GetRandomPassword
forall x. GetRandomPassword -> Rep GetRandomPassword x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetRandomPassword x -> GetRandomPassword
$cfrom :: forall x. GetRandomPassword -> Rep GetRandomPassword x
Prelude.Generic)
newGetRandomPassword ::
GetRandomPassword
newGetRandomPassword :: GetRandomPassword
newGetRandomPassword =
GetRandomPassword' :: Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Natural
-> GetRandomPassword
GetRandomPassword'
{ $sel:includeSpace:GetRandomPassword' :: Maybe Bool
includeSpace = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:excludeNumbers:GetRandomPassword' :: Maybe Bool
excludeNumbers = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:excludeLowercase:GetRandomPassword' :: Maybe Bool
excludeLowercase = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:excludeCharacters:GetRandomPassword' :: Maybe Text
excludeCharacters = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:excludePunctuation:GetRandomPassword' :: Maybe Bool
excludePunctuation = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:requireEachIncludedType:GetRandomPassword' :: Maybe Bool
requireEachIncludedType = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:excludeUppercase:GetRandomPassword' :: Maybe Bool
excludeUppercase = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:passwordLength:GetRandomPassword' :: Maybe Natural
passwordLength = Maybe Natural
forall a. Maybe a
Prelude.Nothing
}
getRandomPassword_includeSpace :: Lens.Lens' GetRandomPassword (Prelude.Maybe Prelude.Bool)
getRandomPassword_includeSpace :: (Maybe Bool -> f (Maybe Bool))
-> GetRandomPassword -> f GetRandomPassword
getRandomPassword_includeSpace = (GetRandomPassword -> Maybe Bool)
-> (GetRandomPassword -> Maybe Bool -> GetRandomPassword)
-> Lens
GetRandomPassword GetRandomPassword (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRandomPassword' {Maybe Bool
includeSpace :: Maybe Bool
$sel:includeSpace:GetRandomPassword' :: GetRandomPassword -> Maybe Bool
includeSpace} -> Maybe Bool
includeSpace) (\s :: GetRandomPassword
s@GetRandomPassword' {} Maybe Bool
a -> GetRandomPassword
s {$sel:includeSpace:GetRandomPassword' :: Maybe Bool
includeSpace = Maybe Bool
a} :: GetRandomPassword)
getRandomPassword_excludeNumbers :: Lens.Lens' GetRandomPassword (Prelude.Maybe Prelude.Bool)
getRandomPassword_excludeNumbers :: (Maybe Bool -> f (Maybe Bool))
-> GetRandomPassword -> f GetRandomPassword
getRandomPassword_excludeNumbers = (GetRandomPassword -> Maybe Bool)
-> (GetRandomPassword -> Maybe Bool -> GetRandomPassword)
-> Lens
GetRandomPassword GetRandomPassword (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRandomPassword' {Maybe Bool
excludeNumbers :: Maybe Bool
$sel:excludeNumbers:GetRandomPassword' :: GetRandomPassword -> Maybe Bool
excludeNumbers} -> Maybe Bool
excludeNumbers) (\s :: GetRandomPassword
s@GetRandomPassword' {} Maybe Bool
a -> GetRandomPassword
s {$sel:excludeNumbers:GetRandomPassword' :: Maybe Bool
excludeNumbers = Maybe Bool
a} :: GetRandomPassword)
getRandomPassword_excludeLowercase :: Lens.Lens' GetRandomPassword (Prelude.Maybe Prelude.Bool)
getRandomPassword_excludeLowercase :: (Maybe Bool -> f (Maybe Bool))
-> GetRandomPassword -> f GetRandomPassword
getRandomPassword_excludeLowercase = (GetRandomPassword -> Maybe Bool)
-> (GetRandomPassword -> Maybe Bool -> GetRandomPassword)
-> Lens
GetRandomPassword GetRandomPassword (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRandomPassword' {Maybe Bool
excludeLowercase :: Maybe Bool
$sel:excludeLowercase:GetRandomPassword' :: GetRandomPassword -> Maybe Bool
excludeLowercase} -> Maybe Bool
excludeLowercase) (\s :: GetRandomPassword
s@GetRandomPassword' {} Maybe Bool
a -> GetRandomPassword
s {$sel:excludeLowercase:GetRandomPassword' :: Maybe Bool
excludeLowercase = Maybe Bool
a} :: GetRandomPassword)
getRandomPassword_excludeCharacters :: Lens.Lens' GetRandomPassword (Prelude.Maybe Prelude.Text)
getRandomPassword_excludeCharacters :: (Maybe Text -> f (Maybe Text))
-> GetRandomPassword -> f GetRandomPassword
getRandomPassword_excludeCharacters = (GetRandomPassword -> Maybe Text)
-> (GetRandomPassword -> Maybe Text -> GetRandomPassword)
-> Lens
GetRandomPassword GetRandomPassword (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRandomPassword' {Maybe Text
excludeCharacters :: Maybe Text
$sel:excludeCharacters:GetRandomPassword' :: GetRandomPassword -> Maybe Text
excludeCharacters} -> Maybe Text
excludeCharacters) (\s :: GetRandomPassword
s@GetRandomPassword' {} Maybe Text
a -> GetRandomPassword
s {$sel:excludeCharacters:GetRandomPassword' :: Maybe Text
excludeCharacters = Maybe Text
a} :: GetRandomPassword)
getRandomPassword_excludePunctuation :: Lens.Lens' GetRandomPassword (Prelude.Maybe Prelude.Bool)
getRandomPassword_excludePunctuation :: (Maybe Bool -> f (Maybe Bool))
-> GetRandomPassword -> f GetRandomPassword
getRandomPassword_excludePunctuation = (GetRandomPassword -> Maybe Bool)
-> (GetRandomPassword -> Maybe Bool -> GetRandomPassword)
-> Lens
GetRandomPassword GetRandomPassword (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRandomPassword' {Maybe Bool
excludePunctuation :: Maybe Bool
$sel:excludePunctuation:GetRandomPassword' :: GetRandomPassword -> Maybe Bool
excludePunctuation} -> Maybe Bool
excludePunctuation) (\s :: GetRandomPassword
s@GetRandomPassword' {} Maybe Bool
a -> GetRandomPassword
s {$sel:excludePunctuation:GetRandomPassword' :: Maybe Bool
excludePunctuation = Maybe Bool
a} :: GetRandomPassword)
getRandomPassword_requireEachIncludedType :: Lens.Lens' GetRandomPassword (Prelude.Maybe Prelude.Bool)
getRandomPassword_requireEachIncludedType :: (Maybe Bool -> f (Maybe Bool))
-> GetRandomPassword -> f GetRandomPassword
getRandomPassword_requireEachIncludedType = (GetRandomPassword -> Maybe Bool)
-> (GetRandomPassword -> Maybe Bool -> GetRandomPassword)
-> Lens
GetRandomPassword GetRandomPassword (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRandomPassword' {Maybe Bool
requireEachIncludedType :: Maybe Bool
$sel:requireEachIncludedType:GetRandomPassword' :: GetRandomPassword -> Maybe Bool
requireEachIncludedType} -> Maybe Bool
requireEachIncludedType) (\s :: GetRandomPassword
s@GetRandomPassword' {} Maybe Bool
a -> GetRandomPassword
s {$sel:requireEachIncludedType:GetRandomPassword' :: Maybe Bool
requireEachIncludedType = Maybe Bool
a} :: GetRandomPassword)
getRandomPassword_excludeUppercase :: Lens.Lens' GetRandomPassword (Prelude.Maybe Prelude.Bool)
getRandomPassword_excludeUppercase :: (Maybe Bool -> f (Maybe Bool))
-> GetRandomPassword -> f GetRandomPassword
getRandomPassword_excludeUppercase = (GetRandomPassword -> Maybe Bool)
-> (GetRandomPassword -> Maybe Bool -> GetRandomPassword)
-> Lens
GetRandomPassword GetRandomPassword (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRandomPassword' {Maybe Bool
excludeUppercase :: Maybe Bool
$sel:excludeUppercase:GetRandomPassword' :: GetRandomPassword -> Maybe Bool
excludeUppercase} -> Maybe Bool
excludeUppercase) (\s :: GetRandomPassword
s@GetRandomPassword' {} Maybe Bool
a -> GetRandomPassword
s {$sel:excludeUppercase:GetRandomPassword' :: Maybe Bool
excludeUppercase = Maybe Bool
a} :: GetRandomPassword)
getRandomPassword_passwordLength :: Lens.Lens' GetRandomPassword (Prelude.Maybe Prelude.Natural)
getRandomPassword_passwordLength :: (Maybe Natural -> f (Maybe Natural))
-> GetRandomPassword -> f GetRandomPassword
getRandomPassword_passwordLength = (GetRandomPassword -> Maybe Natural)
-> (GetRandomPassword -> Maybe Natural -> GetRandomPassword)
-> Lens
GetRandomPassword GetRandomPassword (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRandomPassword' {Maybe Natural
passwordLength :: Maybe Natural
$sel:passwordLength:GetRandomPassword' :: GetRandomPassword -> Maybe Natural
passwordLength} -> Maybe Natural
passwordLength) (\s :: GetRandomPassword
s@GetRandomPassword' {} Maybe Natural
a -> GetRandomPassword
s {$sel:passwordLength:GetRandomPassword' :: Maybe Natural
passwordLength = Maybe Natural
a} :: GetRandomPassword)
instance Core.AWSRequest GetRandomPassword where
type
AWSResponse GetRandomPassword =
GetRandomPasswordResponse
request :: GetRandomPassword -> Request GetRandomPassword
request = Service -> GetRandomPassword -> Request GetRandomPassword
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy GetRandomPassword
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetRandomPassword)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse GetRandomPassword))
-> Logger
-> Service
-> Proxy GetRandomPassword
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetRandomPassword)))
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 (Sensitive Text) -> Int -> GetRandomPasswordResponse
GetRandomPasswordResponse'
(Maybe (Sensitive Text) -> Int -> GetRandomPasswordResponse)
-> Either String (Maybe (Sensitive Text))
-> Either String (Int -> GetRandomPasswordResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Sensitive Text))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"RandomPassword")
Either String (Int -> GetRandomPasswordResponse)
-> Either String Int -> Either String GetRandomPasswordResponse
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 GetRandomPassword
instance Prelude.NFData GetRandomPassword
instance Core.ToHeaders GetRandomPassword where
toHeaders :: GetRandomPassword -> ResponseHeaders
toHeaders =
ResponseHeaders -> GetRandomPassword -> 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
"secretsmanager.GetRandomPassword" ::
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 GetRandomPassword where
toJSON :: GetRandomPassword -> Value
toJSON GetRandomPassword' {Maybe Bool
Maybe Natural
Maybe Text
passwordLength :: Maybe Natural
excludeUppercase :: Maybe Bool
requireEachIncludedType :: Maybe Bool
excludePunctuation :: Maybe Bool
excludeCharacters :: Maybe Text
excludeLowercase :: Maybe Bool
excludeNumbers :: Maybe Bool
includeSpace :: Maybe Bool
$sel:passwordLength:GetRandomPassword' :: GetRandomPassword -> Maybe Natural
$sel:excludeUppercase:GetRandomPassword' :: GetRandomPassword -> Maybe Bool
$sel:requireEachIncludedType:GetRandomPassword' :: GetRandomPassword -> Maybe Bool
$sel:excludePunctuation:GetRandomPassword' :: GetRandomPassword -> Maybe Bool
$sel:excludeCharacters:GetRandomPassword' :: GetRandomPassword -> Maybe Text
$sel:excludeLowercase:GetRandomPassword' :: GetRandomPassword -> Maybe Bool
$sel:excludeNumbers:GetRandomPassword' :: GetRandomPassword -> Maybe Bool
$sel:includeSpace:GetRandomPassword' :: GetRandomPassword -> Maybe Bool
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"IncludeSpace" 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
includeSpace,
(Text
"ExcludeNumbers" 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
excludeNumbers,
(Text
"ExcludeLowercase" 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
excludeLowercase,
(Text
"ExcludeCharacters" 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
excludeCharacters,
(Text
"ExcludePunctuation" 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
excludePunctuation,
(Text
"RequireEachIncludedType" 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
requireEachIncludedType,
(Text
"ExcludeUppercase" 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
excludeUppercase,
(Text
"PasswordLength" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
passwordLength
]
)
instance Core.ToPath GetRandomPassword where
toPath :: GetRandomPassword -> ByteString
toPath = ByteString -> GetRandomPassword -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery GetRandomPassword where
toQuery :: GetRandomPassword -> QueryString
toQuery = QueryString -> GetRandomPassword -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data GetRandomPasswordResponse = GetRandomPasswordResponse'
{
GetRandomPasswordResponse -> Maybe (Sensitive Text)
randomPassword :: Prelude.Maybe (Core.Sensitive Prelude.Text),
GetRandomPasswordResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetRandomPasswordResponse -> GetRandomPasswordResponse -> Bool
(GetRandomPasswordResponse -> GetRandomPasswordResponse -> Bool)
-> (GetRandomPasswordResponse -> GetRandomPasswordResponse -> Bool)
-> Eq GetRandomPasswordResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetRandomPasswordResponse -> GetRandomPasswordResponse -> Bool
$c/= :: GetRandomPasswordResponse -> GetRandomPasswordResponse -> Bool
== :: GetRandomPasswordResponse -> GetRandomPasswordResponse -> Bool
$c== :: GetRandomPasswordResponse -> GetRandomPasswordResponse -> Bool
Prelude.Eq, Int -> GetRandomPasswordResponse -> ShowS
[GetRandomPasswordResponse] -> ShowS
GetRandomPasswordResponse -> String
(Int -> GetRandomPasswordResponse -> ShowS)
-> (GetRandomPasswordResponse -> String)
-> ([GetRandomPasswordResponse] -> ShowS)
-> Show GetRandomPasswordResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetRandomPasswordResponse] -> ShowS
$cshowList :: [GetRandomPasswordResponse] -> ShowS
show :: GetRandomPasswordResponse -> String
$cshow :: GetRandomPasswordResponse -> String
showsPrec :: Int -> GetRandomPasswordResponse -> ShowS
$cshowsPrec :: Int -> GetRandomPasswordResponse -> ShowS
Prelude.Show, (forall x.
GetRandomPasswordResponse -> Rep GetRandomPasswordResponse x)
-> (forall x.
Rep GetRandomPasswordResponse x -> GetRandomPasswordResponse)
-> Generic GetRandomPasswordResponse
forall x.
Rep GetRandomPasswordResponse x -> GetRandomPasswordResponse
forall x.
GetRandomPasswordResponse -> Rep GetRandomPasswordResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetRandomPasswordResponse x -> GetRandomPasswordResponse
$cfrom :: forall x.
GetRandomPasswordResponse -> Rep GetRandomPasswordResponse x
Prelude.Generic)
newGetRandomPasswordResponse ::
Prelude.Int ->
GetRandomPasswordResponse
newGetRandomPasswordResponse :: Int -> GetRandomPasswordResponse
newGetRandomPasswordResponse Int
pHttpStatus_ =
GetRandomPasswordResponse' :: Maybe (Sensitive Text) -> Int -> GetRandomPasswordResponse
GetRandomPasswordResponse'
{ $sel:randomPassword:GetRandomPasswordResponse' :: Maybe (Sensitive Text)
randomPassword =
Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetRandomPasswordResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getRandomPasswordResponse_randomPassword :: Lens.Lens' GetRandomPasswordResponse (Prelude.Maybe Prelude.Text)
getRandomPasswordResponse_randomPassword :: (Maybe Text -> f (Maybe Text))
-> GetRandomPasswordResponse -> f GetRandomPasswordResponse
getRandomPasswordResponse_randomPassword = (GetRandomPasswordResponse -> Maybe (Sensitive Text))
-> (GetRandomPasswordResponse
-> Maybe (Sensitive Text) -> GetRandomPasswordResponse)
-> Lens
GetRandomPasswordResponse
GetRandomPasswordResponse
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRandomPasswordResponse' {Maybe (Sensitive Text)
randomPassword :: Maybe (Sensitive Text)
$sel:randomPassword:GetRandomPasswordResponse' :: GetRandomPasswordResponse -> Maybe (Sensitive Text)
randomPassword} -> Maybe (Sensitive Text)
randomPassword) (\s :: GetRandomPasswordResponse
s@GetRandomPasswordResponse' {} Maybe (Sensitive Text)
a -> GetRandomPasswordResponse
s {$sel:randomPassword:GetRandomPasswordResponse' :: Maybe (Sensitive Text)
randomPassword = Maybe (Sensitive Text)
a} :: GetRandomPasswordResponse) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> GetRandomPasswordResponse -> f GetRandomPasswordResponse)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> GetRandomPasswordResponse
-> f GetRandomPasswordResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
(Maybe Text)
(Maybe 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 (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive
getRandomPasswordResponse_httpStatus :: Lens.Lens' GetRandomPasswordResponse Prelude.Int
getRandomPasswordResponse_httpStatus :: (Int -> f Int)
-> GetRandomPasswordResponse -> f GetRandomPasswordResponse
getRandomPasswordResponse_httpStatus = (GetRandomPasswordResponse -> Int)
-> (GetRandomPasswordResponse -> Int -> GetRandomPasswordResponse)
-> Lens GetRandomPasswordResponse GetRandomPasswordResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetRandomPasswordResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetRandomPasswordResponse' :: GetRandomPasswordResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetRandomPasswordResponse
s@GetRandomPasswordResponse' {} Int
a -> GetRandomPasswordResponse
s {$sel:httpStatus:GetRandomPasswordResponse' :: Int
httpStatus = Int
a} :: GetRandomPasswordResponse)
instance Prelude.NFData GetRandomPasswordResponse