{-# 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.Transfer.UpdateAccess
(
UpdateAccess (..),
newUpdateAccess,
updateAccess_homeDirectoryType,
updateAccess_posixProfile,
updateAccess_homeDirectoryMappings,
updateAccess_role,
updateAccess_policy,
updateAccess_homeDirectory,
updateAccess_serverId,
updateAccess_externalId,
UpdateAccessResponse (..),
newUpdateAccessResponse,
updateAccessResponse_httpStatus,
updateAccessResponse_serverId,
updateAccessResponse_externalId,
)
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.Transfer.Types
data UpdateAccess = UpdateAccess'
{
UpdateAccess -> Maybe HomeDirectoryType
homeDirectoryType :: Prelude.Maybe HomeDirectoryType,
UpdateAccess -> Maybe PosixProfile
posixProfile :: Prelude.Maybe PosixProfile,
UpdateAccess -> Maybe (NonEmpty HomeDirectoryMapEntry)
homeDirectoryMappings :: Prelude.Maybe (Prelude.NonEmpty HomeDirectoryMapEntry),
UpdateAccess -> Maybe Text
role' :: Prelude.Maybe Prelude.Text,
UpdateAccess -> Maybe Text
policy :: Prelude.Maybe Prelude.Text,
UpdateAccess -> Maybe Text
homeDirectory :: Prelude.Maybe Prelude.Text,
UpdateAccess -> Text
serverId :: Prelude.Text,
UpdateAccess -> Text
externalId :: Prelude.Text
}
deriving (UpdateAccess -> UpdateAccess -> Bool
(UpdateAccess -> UpdateAccess -> Bool)
-> (UpdateAccess -> UpdateAccess -> Bool) -> Eq UpdateAccess
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateAccess -> UpdateAccess -> Bool
$c/= :: UpdateAccess -> UpdateAccess -> Bool
== :: UpdateAccess -> UpdateAccess -> Bool
$c== :: UpdateAccess -> UpdateAccess -> Bool
Prelude.Eq, ReadPrec [UpdateAccess]
ReadPrec UpdateAccess
Int -> ReadS UpdateAccess
ReadS [UpdateAccess]
(Int -> ReadS UpdateAccess)
-> ReadS [UpdateAccess]
-> ReadPrec UpdateAccess
-> ReadPrec [UpdateAccess]
-> Read UpdateAccess
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateAccess]
$creadListPrec :: ReadPrec [UpdateAccess]
readPrec :: ReadPrec UpdateAccess
$creadPrec :: ReadPrec UpdateAccess
readList :: ReadS [UpdateAccess]
$creadList :: ReadS [UpdateAccess]
readsPrec :: Int -> ReadS UpdateAccess
$creadsPrec :: Int -> ReadS UpdateAccess
Prelude.Read, Int -> UpdateAccess -> ShowS
[UpdateAccess] -> ShowS
UpdateAccess -> String
(Int -> UpdateAccess -> ShowS)
-> (UpdateAccess -> String)
-> ([UpdateAccess] -> ShowS)
-> Show UpdateAccess
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateAccess] -> ShowS
$cshowList :: [UpdateAccess] -> ShowS
show :: UpdateAccess -> String
$cshow :: UpdateAccess -> String
showsPrec :: Int -> UpdateAccess -> ShowS
$cshowsPrec :: Int -> UpdateAccess -> ShowS
Prelude.Show, (forall x. UpdateAccess -> Rep UpdateAccess x)
-> (forall x. Rep UpdateAccess x -> UpdateAccess)
-> Generic UpdateAccess
forall x. Rep UpdateAccess x -> UpdateAccess
forall x. UpdateAccess -> Rep UpdateAccess x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateAccess x -> UpdateAccess
$cfrom :: forall x. UpdateAccess -> Rep UpdateAccess x
Prelude.Generic)
newUpdateAccess ::
Prelude.Text ->
Prelude.Text ->
UpdateAccess
newUpdateAccess :: Text -> Text -> UpdateAccess
newUpdateAccess Text
pServerId_ Text
pExternalId_ =
UpdateAccess' :: Maybe HomeDirectoryType
-> Maybe PosixProfile
-> Maybe (NonEmpty HomeDirectoryMapEntry)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> Text
-> UpdateAccess
UpdateAccess'
{ $sel:homeDirectoryType:UpdateAccess' :: Maybe HomeDirectoryType
homeDirectoryType = Maybe HomeDirectoryType
forall a. Maybe a
Prelude.Nothing,
$sel:posixProfile:UpdateAccess' :: Maybe PosixProfile
posixProfile = Maybe PosixProfile
forall a. Maybe a
Prelude.Nothing,
$sel:homeDirectoryMappings:UpdateAccess' :: Maybe (NonEmpty HomeDirectoryMapEntry)
homeDirectoryMappings = Maybe (NonEmpty HomeDirectoryMapEntry)
forall a. Maybe a
Prelude.Nothing,
$sel:role':UpdateAccess' :: Maybe Text
role' = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:policy:UpdateAccess' :: Maybe Text
policy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:homeDirectory:UpdateAccess' :: Maybe Text
homeDirectory = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:serverId:UpdateAccess' :: Text
serverId = Text
pServerId_,
$sel:externalId:UpdateAccess' :: Text
externalId = Text
pExternalId_
}
updateAccess_homeDirectoryType :: Lens.Lens' UpdateAccess (Prelude.Maybe HomeDirectoryType)
updateAccess_homeDirectoryType :: (Maybe HomeDirectoryType -> f (Maybe HomeDirectoryType))
-> UpdateAccess -> f UpdateAccess
updateAccess_homeDirectoryType = (UpdateAccess -> Maybe HomeDirectoryType)
-> (UpdateAccess -> Maybe HomeDirectoryType -> UpdateAccess)
-> Lens
UpdateAccess
UpdateAccess
(Maybe HomeDirectoryType)
(Maybe HomeDirectoryType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAccess' {Maybe HomeDirectoryType
homeDirectoryType :: Maybe HomeDirectoryType
$sel:homeDirectoryType:UpdateAccess' :: UpdateAccess -> Maybe HomeDirectoryType
homeDirectoryType} -> Maybe HomeDirectoryType
homeDirectoryType) (\s :: UpdateAccess
s@UpdateAccess' {} Maybe HomeDirectoryType
a -> UpdateAccess
s {$sel:homeDirectoryType:UpdateAccess' :: Maybe HomeDirectoryType
homeDirectoryType = Maybe HomeDirectoryType
a} :: UpdateAccess)
updateAccess_posixProfile :: Lens.Lens' UpdateAccess (Prelude.Maybe PosixProfile)
updateAccess_posixProfile :: (Maybe PosixProfile -> f (Maybe PosixProfile))
-> UpdateAccess -> f UpdateAccess
updateAccess_posixProfile = (UpdateAccess -> Maybe PosixProfile)
-> (UpdateAccess -> Maybe PosixProfile -> UpdateAccess)
-> Lens
UpdateAccess UpdateAccess (Maybe PosixProfile) (Maybe PosixProfile)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAccess' {Maybe PosixProfile
posixProfile :: Maybe PosixProfile
$sel:posixProfile:UpdateAccess' :: UpdateAccess -> Maybe PosixProfile
posixProfile} -> Maybe PosixProfile
posixProfile) (\s :: UpdateAccess
s@UpdateAccess' {} Maybe PosixProfile
a -> UpdateAccess
s {$sel:posixProfile:UpdateAccess' :: Maybe PosixProfile
posixProfile = Maybe PosixProfile
a} :: UpdateAccess)
updateAccess_homeDirectoryMappings :: Lens.Lens' UpdateAccess (Prelude.Maybe (Prelude.NonEmpty HomeDirectoryMapEntry))
updateAccess_homeDirectoryMappings :: (Maybe (NonEmpty HomeDirectoryMapEntry)
-> f (Maybe (NonEmpty HomeDirectoryMapEntry)))
-> UpdateAccess -> f UpdateAccess
updateAccess_homeDirectoryMappings = (UpdateAccess -> Maybe (NonEmpty HomeDirectoryMapEntry))
-> (UpdateAccess
-> Maybe (NonEmpty HomeDirectoryMapEntry) -> UpdateAccess)
-> Lens
UpdateAccess
UpdateAccess
(Maybe (NonEmpty HomeDirectoryMapEntry))
(Maybe (NonEmpty HomeDirectoryMapEntry))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAccess' {Maybe (NonEmpty HomeDirectoryMapEntry)
homeDirectoryMappings :: Maybe (NonEmpty HomeDirectoryMapEntry)
$sel:homeDirectoryMappings:UpdateAccess' :: UpdateAccess -> Maybe (NonEmpty HomeDirectoryMapEntry)
homeDirectoryMappings} -> Maybe (NonEmpty HomeDirectoryMapEntry)
homeDirectoryMappings) (\s :: UpdateAccess
s@UpdateAccess' {} Maybe (NonEmpty HomeDirectoryMapEntry)
a -> UpdateAccess
s {$sel:homeDirectoryMappings:UpdateAccess' :: Maybe (NonEmpty HomeDirectoryMapEntry)
homeDirectoryMappings = Maybe (NonEmpty HomeDirectoryMapEntry)
a} :: UpdateAccess) ((Maybe (NonEmpty HomeDirectoryMapEntry)
-> f (Maybe (NonEmpty HomeDirectoryMapEntry)))
-> UpdateAccess -> f UpdateAccess)
-> ((Maybe (NonEmpty HomeDirectoryMapEntry)
-> f (Maybe (NonEmpty HomeDirectoryMapEntry)))
-> Maybe (NonEmpty HomeDirectoryMapEntry)
-> f (Maybe (NonEmpty HomeDirectoryMapEntry)))
-> (Maybe (NonEmpty HomeDirectoryMapEntry)
-> f (Maybe (NonEmpty HomeDirectoryMapEntry)))
-> UpdateAccess
-> f UpdateAccess
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty HomeDirectoryMapEntry)
(NonEmpty HomeDirectoryMapEntry)
(NonEmpty HomeDirectoryMapEntry)
(NonEmpty HomeDirectoryMapEntry)
-> Iso
(Maybe (NonEmpty HomeDirectoryMapEntry))
(Maybe (NonEmpty HomeDirectoryMapEntry))
(Maybe (NonEmpty HomeDirectoryMapEntry))
(Maybe (NonEmpty HomeDirectoryMapEntry))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
(NonEmpty HomeDirectoryMapEntry)
(NonEmpty HomeDirectoryMapEntry)
(NonEmpty HomeDirectoryMapEntry)
(NonEmpty HomeDirectoryMapEntry)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
updateAccess_role :: Lens.Lens' UpdateAccess (Prelude.Maybe Prelude.Text)
updateAccess_role :: (Maybe Text -> f (Maybe Text)) -> UpdateAccess -> f UpdateAccess
updateAccess_role = (UpdateAccess -> Maybe Text)
-> (UpdateAccess -> Maybe Text -> UpdateAccess)
-> Lens UpdateAccess UpdateAccess (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAccess' {Maybe Text
role' :: Maybe Text
$sel:role':UpdateAccess' :: UpdateAccess -> Maybe Text
role'} -> Maybe Text
role') (\s :: UpdateAccess
s@UpdateAccess' {} Maybe Text
a -> UpdateAccess
s {$sel:role':UpdateAccess' :: Maybe Text
role' = Maybe Text
a} :: UpdateAccess)
updateAccess_policy :: Lens.Lens' UpdateAccess (Prelude.Maybe Prelude.Text)
updateAccess_policy :: (Maybe Text -> f (Maybe Text)) -> UpdateAccess -> f UpdateAccess
updateAccess_policy = (UpdateAccess -> Maybe Text)
-> (UpdateAccess -> Maybe Text -> UpdateAccess)
-> Lens UpdateAccess UpdateAccess (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAccess' {Maybe Text
policy :: Maybe Text
$sel:policy:UpdateAccess' :: UpdateAccess -> Maybe Text
policy} -> Maybe Text
policy) (\s :: UpdateAccess
s@UpdateAccess' {} Maybe Text
a -> UpdateAccess
s {$sel:policy:UpdateAccess' :: Maybe Text
policy = Maybe Text
a} :: UpdateAccess)
updateAccess_homeDirectory :: Lens.Lens' UpdateAccess (Prelude.Maybe Prelude.Text)
updateAccess_homeDirectory :: (Maybe Text -> f (Maybe Text)) -> UpdateAccess -> f UpdateAccess
updateAccess_homeDirectory = (UpdateAccess -> Maybe Text)
-> (UpdateAccess -> Maybe Text -> UpdateAccess)
-> Lens UpdateAccess UpdateAccess (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAccess' {Maybe Text
homeDirectory :: Maybe Text
$sel:homeDirectory:UpdateAccess' :: UpdateAccess -> Maybe Text
homeDirectory} -> Maybe Text
homeDirectory) (\s :: UpdateAccess
s@UpdateAccess' {} Maybe Text
a -> UpdateAccess
s {$sel:homeDirectory:UpdateAccess' :: Maybe Text
homeDirectory = Maybe Text
a} :: UpdateAccess)
updateAccess_serverId :: Lens.Lens' UpdateAccess Prelude.Text
updateAccess_serverId :: (Text -> f Text) -> UpdateAccess -> f UpdateAccess
updateAccess_serverId = (UpdateAccess -> Text)
-> (UpdateAccess -> Text -> UpdateAccess)
-> Lens UpdateAccess UpdateAccess Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAccess' {Text
serverId :: Text
$sel:serverId:UpdateAccess' :: UpdateAccess -> Text
serverId} -> Text
serverId) (\s :: UpdateAccess
s@UpdateAccess' {} Text
a -> UpdateAccess
s {$sel:serverId:UpdateAccess' :: Text
serverId = Text
a} :: UpdateAccess)
updateAccess_externalId :: Lens.Lens' UpdateAccess Prelude.Text
updateAccess_externalId :: (Text -> f Text) -> UpdateAccess -> f UpdateAccess
updateAccess_externalId = (UpdateAccess -> Text)
-> (UpdateAccess -> Text -> UpdateAccess)
-> Lens UpdateAccess UpdateAccess Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAccess' {Text
externalId :: Text
$sel:externalId:UpdateAccess' :: UpdateAccess -> Text
externalId} -> Text
externalId) (\s :: UpdateAccess
s@UpdateAccess' {} Text
a -> UpdateAccess
s {$sel:externalId:UpdateAccess' :: Text
externalId = Text
a} :: UpdateAccess)
instance Core.AWSRequest UpdateAccess where
type AWSResponse UpdateAccess = UpdateAccessResponse
request :: UpdateAccess -> Request UpdateAccess
request = Service -> UpdateAccess -> Request UpdateAccess
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy UpdateAccess
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateAccess)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse UpdateAccess))
-> Logger
-> Service
-> Proxy UpdateAccess
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateAccess)))
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 ->
Int -> Text -> Text -> UpdateAccessResponse
UpdateAccessResponse'
(Int -> Text -> Text -> UpdateAccessResponse)
-> Either String Int
-> Either String (Text -> Text -> UpdateAccessResponse)
forall (f :: * -> *) a b. Functor 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))
Either String (Text -> Text -> UpdateAccessResponse)
-> Either String Text
-> Either String (Text -> UpdateAccessResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"ServerId")
Either String (Text -> UpdateAccessResponse)
-> Either String Text -> Either String UpdateAccessResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"ExternalId")
)
instance Prelude.Hashable UpdateAccess
instance Prelude.NFData UpdateAccess
instance Core.ToHeaders UpdateAccess where
toHeaders :: UpdateAccess -> ResponseHeaders
toHeaders =
ResponseHeaders -> UpdateAccess -> 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
"TransferService.UpdateAccess" ::
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 UpdateAccess where
toJSON :: UpdateAccess -> Value
toJSON UpdateAccess' {Maybe (NonEmpty HomeDirectoryMapEntry)
Maybe Text
Maybe HomeDirectoryType
Maybe PosixProfile
Text
externalId :: Text
serverId :: Text
homeDirectory :: Maybe Text
policy :: Maybe Text
role' :: Maybe Text
homeDirectoryMappings :: Maybe (NonEmpty HomeDirectoryMapEntry)
posixProfile :: Maybe PosixProfile
homeDirectoryType :: Maybe HomeDirectoryType
$sel:externalId:UpdateAccess' :: UpdateAccess -> Text
$sel:serverId:UpdateAccess' :: UpdateAccess -> Text
$sel:homeDirectory:UpdateAccess' :: UpdateAccess -> Maybe Text
$sel:policy:UpdateAccess' :: UpdateAccess -> Maybe Text
$sel:role':UpdateAccess' :: UpdateAccess -> Maybe Text
$sel:homeDirectoryMappings:UpdateAccess' :: UpdateAccess -> Maybe (NonEmpty HomeDirectoryMapEntry)
$sel:posixProfile:UpdateAccess' :: UpdateAccess -> Maybe PosixProfile
$sel:homeDirectoryType:UpdateAccess' :: UpdateAccess -> Maybe HomeDirectoryType
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"HomeDirectoryType" Text -> HomeDirectoryType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(HomeDirectoryType -> Pair)
-> Maybe HomeDirectoryType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HomeDirectoryType
homeDirectoryType,
(Text
"PosixProfile" Text -> PosixProfile -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (PosixProfile -> Pair) -> Maybe PosixProfile -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PosixProfile
posixProfile,
(Text
"HomeDirectoryMappings" Text -> NonEmpty HomeDirectoryMapEntry -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(NonEmpty HomeDirectoryMapEntry -> Pair)
-> Maybe (NonEmpty HomeDirectoryMapEntry) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty HomeDirectoryMapEntry)
homeDirectoryMappings,
(Text
"Role" 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
role',
(Text
"Policy" 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
policy,
(Text
"HomeDirectory" 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
homeDirectory,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ServerId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
serverId),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ExternalId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
externalId)
]
)
instance Core.ToPath UpdateAccess where
toPath :: UpdateAccess -> ByteString
toPath = ByteString -> UpdateAccess -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery UpdateAccess where
toQuery :: UpdateAccess -> QueryString
toQuery = QueryString -> UpdateAccess -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data UpdateAccessResponse = UpdateAccessResponse'
{
UpdateAccessResponse -> Int
httpStatus :: Prelude.Int,
UpdateAccessResponse -> Text
serverId :: Prelude.Text,
UpdateAccessResponse -> Text
externalId :: Prelude.Text
}
deriving (UpdateAccessResponse -> UpdateAccessResponse -> Bool
(UpdateAccessResponse -> UpdateAccessResponse -> Bool)
-> (UpdateAccessResponse -> UpdateAccessResponse -> Bool)
-> Eq UpdateAccessResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateAccessResponse -> UpdateAccessResponse -> Bool
$c/= :: UpdateAccessResponse -> UpdateAccessResponse -> Bool
== :: UpdateAccessResponse -> UpdateAccessResponse -> Bool
$c== :: UpdateAccessResponse -> UpdateAccessResponse -> Bool
Prelude.Eq, ReadPrec [UpdateAccessResponse]
ReadPrec UpdateAccessResponse
Int -> ReadS UpdateAccessResponse
ReadS [UpdateAccessResponse]
(Int -> ReadS UpdateAccessResponse)
-> ReadS [UpdateAccessResponse]
-> ReadPrec UpdateAccessResponse
-> ReadPrec [UpdateAccessResponse]
-> Read UpdateAccessResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateAccessResponse]
$creadListPrec :: ReadPrec [UpdateAccessResponse]
readPrec :: ReadPrec UpdateAccessResponse
$creadPrec :: ReadPrec UpdateAccessResponse
readList :: ReadS [UpdateAccessResponse]
$creadList :: ReadS [UpdateAccessResponse]
readsPrec :: Int -> ReadS UpdateAccessResponse
$creadsPrec :: Int -> ReadS UpdateAccessResponse
Prelude.Read, Int -> UpdateAccessResponse -> ShowS
[UpdateAccessResponse] -> ShowS
UpdateAccessResponse -> String
(Int -> UpdateAccessResponse -> ShowS)
-> (UpdateAccessResponse -> String)
-> ([UpdateAccessResponse] -> ShowS)
-> Show UpdateAccessResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateAccessResponse] -> ShowS
$cshowList :: [UpdateAccessResponse] -> ShowS
show :: UpdateAccessResponse -> String
$cshow :: UpdateAccessResponse -> String
showsPrec :: Int -> UpdateAccessResponse -> ShowS
$cshowsPrec :: Int -> UpdateAccessResponse -> ShowS
Prelude.Show, (forall x. UpdateAccessResponse -> Rep UpdateAccessResponse x)
-> (forall x. Rep UpdateAccessResponse x -> UpdateAccessResponse)
-> Generic UpdateAccessResponse
forall x. Rep UpdateAccessResponse x -> UpdateAccessResponse
forall x. UpdateAccessResponse -> Rep UpdateAccessResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateAccessResponse x -> UpdateAccessResponse
$cfrom :: forall x. UpdateAccessResponse -> Rep UpdateAccessResponse x
Prelude.Generic)
newUpdateAccessResponse ::
Prelude.Int ->
Prelude.Text ->
Prelude.Text ->
UpdateAccessResponse
newUpdateAccessResponse :: Int -> Text -> Text -> UpdateAccessResponse
newUpdateAccessResponse
Int
pHttpStatus_
Text
pServerId_
Text
pExternalId_ =
UpdateAccessResponse' :: Int -> Text -> Text -> UpdateAccessResponse
UpdateAccessResponse'
{ $sel:httpStatus:UpdateAccessResponse' :: Int
httpStatus = Int
pHttpStatus_,
$sel:serverId:UpdateAccessResponse' :: Text
serverId = Text
pServerId_,
$sel:externalId:UpdateAccessResponse' :: Text
externalId = Text
pExternalId_
}
updateAccessResponse_httpStatus :: Lens.Lens' UpdateAccessResponse Prelude.Int
updateAccessResponse_httpStatus :: (Int -> f Int) -> UpdateAccessResponse -> f UpdateAccessResponse
updateAccessResponse_httpStatus = (UpdateAccessResponse -> Int)
-> (UpdateAccessResponse -> Int -> UpdateAccessResponse)
-> Lens UpdateAccessResponse UpdateAccessResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAccessResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateAccessResponse' :: UpdateAccessResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateAccessResponse
s@UpdateAccessResponse' {} Int
a -> UpdateAccessResponse
s {$sel:httpStatus:UpdateAccessResponse' :: Int
httpStatus = Int
a} :: UpdateAccessResponse)
updateAccessResponse_serverId :: Lens.Lens' UpdateAccessResponse Prelude.Text
updateAccessResponse_serverId :: (Text -> f Text) -> UpdateAccessResponse -> f UpdateAccessResponse
updateAccessResponse_serverId = (UpdateAccessResponse -> Text)
-> (UpdateAccessResponse -> Text -> UpdateAccessResponse)
-> Lens UpdateAccessResponse UpdateAccessResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAccessResponse' {Text
serverId :: Text
$sel:serverId:UpdateAccessResponse' :: UpdateAccessResponse -> Text
serverId} -> Text
serverId) (\s :: UpdateAccessResponse
s@UpdateAccessResponse' {} Text
a -> UpdateAccessResponse
s {$sel:serverId:UpdateAccessResponse' :: Text
serverId = Text
a} :: UpdateAccessResponse)
updateAccessResponse_externalId :: Lens.Lens' UpdateAccessResponse Prelude.Text
updateAccessResponse_externalId :: (Text -> f Text) -> UpdateAccessResponse -> f UpdateAccessResponse
updateAccessResponse_externalId = (UpdateAccessResponse -> Text)
-> (UpdateAccessResponse -> Text -> UpdateAccessResponse)
-> Lens UpdateAccessResponse UpdateAccessResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAccessResponse' {Text
externalId :: Text
$sel:externalId:UpdateAccessResponse' :: UpdateAccessResponse -> Text
externalId} -> Text
externalId) (\s :: UpdateAccessResponse
s@UpdateAccessResponse' {} Text
a -> UpdateAccessResponse
s {$sel:externalId:UpdateAccessResponse' :: Text
externalId = Text
a} :: UpdateAccessResponse)
instance Prelude.NFData UpdateAccessResponse