{-# 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.UpdateServer
(
UpdateServer (..),
newUpdateServer,
updateServer_certificate,
updateServer_endpointDetails,
updateServer_endpointType,
updateServer_hostKey,
updateServer_identityProviderDetails,
updateServer_loggingRole,
updateServer_postAuthenticationLoginBanner,
updateServer_preAuthenticationLoginBanner,
updateServer_protocolDetails,
updateServer_protocols,
updateServer_securityPolicyName,
updateServer_workflowDetails,
updateServer_serverId,
UpdateServerResponse (..),
newUpdateServerResponse,
updateServerResponse_httpStatus,
updateServerResponse_serverId,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.Transfer.Types
data UpdateServer = UpdateServer'
{
UpdateServer -> Maybe Text
certificate :: Prelude.Maybe Prelude.Text,
UpdateServer -> Maybe EndpointDetails
endpointDetails :: Prelude.Maybe EndpointDetails,
UpdateServer -> Maybe EndpointType
endpointType :: Prelude.Maybe EndpointType,
UpdateServer -> Maybe (Sensitive Text)
hostKey :: Prelude.Maybe (Data.Sensitive Prelude.Text),
UpdateServer -> Maybe IdentityProviderDetails
identityProviderDetails :: Prelude.Maybe IdentityProviderDetails,
UpdateServer -> Maybe Text
loggingRole :: Prelude.Maybe Prelude.Text,
UpdateServer -> Maybe Text
postAuthenticationLoginBanner :: Prelude.Maybe Prelude.Text,
UpdateServer -> Maybe Text
preAuthenticationLoginBanner :: Prelude.Maybe Prelude.Text,
UpdateServer -> Maybe ProtocolDetails
protocolDetails :: Prelude.Maybe ProtocolDetails,
UpdateServer -> Maybe (NonEmpty Protocol)
protocols :: Prelude.Maybe (Prelude.NonEmpty Protocol),
UpdateServer -> Maybe Text
securityPolicyName :: Prelude.Maybe Prelude.Text,
UpdateServer -> Maybe WorkflowDetails
workflowDetails :: Prelude.Maybe WorkflowDetails,
UpdateServer -> Text
serverId :: Prelude.Text
}
deriving (UpdateServer -> UpdateServer -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateServer -> UpdateServer -> Bool
$c/= :: UpdateServer -> UpdateServer -> Bool
== :: UpdateServer -> UpdateServer -> Bool
$c== :: UpdateServer -> UpdateServer -> Bool
Prelude.Eq, Int -> UpdateServer -> ShowS
[UpdateServer] -> ShowS
UpdateServer -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateServer] -> ShowS
$cshowList :: [UpdateServer] -> ShowS
show :: UpdateServer -> String
$cshow :: UpdateServer -> String
showsPrec :: Int -> UpdateServer -> ShowS
$cshowsPrec :: Int -> UpdateServer -> ShowS
Prelude.Show, forall x. Rep UpdateServer x -> UpdateServer
forall x. UpdateServer -> Rep UpdateServer x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateServer x -> UpdateServer
$cfrom :: forall x. UpdateServer -> Rep UpdateServer x
Prelude.Generic)
newUpdateServer ::
Prelude.Text ->
UpdateServer
newUpdateServer :: Text -> UpdateServer
newUpdateServer Text
pServerId_ =
UpdateServer'
{ $sel:certificate:UpdateServer' :: Maybe Text
certificate = forall a. Maybe a
Prelude.Nothing,
$sel:endpointDetails:UpdateServer' :: Maybe EndpointDetails
endpointDetails = forall a. Maybe a
Prelude.Nothing,
$sel:endpointType:UpdateServer' :: Maybe EndpointType
endpointType = forall a. Maybe a
Prelude.Nothing,
$sel:hostKey:UpdateServer' :: Maybe (Sensitive Text)
hostKey = forall a. Maybe a
Prelude.Nothing,
$sel:identityProviderDetails:UpdateServer' :: Maybe IdentityProviderDetails
identityProviderDetails = forall a. Maybe a
Prelude.Nothing,
$sel:loggingRole:UpdateServer' :: Maybe Text
loggingRole = forall a. Maybe a
Prelude.Nothing,
$sel:postAuthenticationLoginBanner:UpdateServer' :: Maybe Text
postAuthenticationLoginBanner = forall a. Maybe a
Prelude.Nothing,
$sel:preAuthenticationLoginBanner:UpdateServer' :: Maybe Text
preAuthenticationLoginBanner = forall a. Maybe a
Prelude.Nothing,
$sel:protocolDetails:UpdateServer' :: Maybe ProtocolDetails
protocolDetails = forall a. Maybe a
Prelude.Nothing,
$sel:protocols:UpdateServer' :: Maybe (NonEmpty Protocol)
protocols = forall a. Maybe a
Prelude.Nothing,
$sel:securityPolicyName:UpdateServer' :: Maybe Text
securityPolicyName = forall a. Maybe a
Prelude.Nothing,
$sel:workflowDetails:UpdateServer' :: Maybe WorkflowDetails
workflowDetails = forall a. Maybe a
Prelude.Nothing,
$sel:serverId:UpdateServer' :: Text
serverId = Text
pServerId_
}
updateServer_certificate :: Lens.Lens' UpdateServer (Prelude.Maybe Prelude.Text)
updateServer_certificate :: Lens' UpdateServer (Maybe Text)
updateServer_certificate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateServer' {Maybe Text
certificate :: Maybe Text
$sel:certificate:UpdateServer' :: UpdateServer -> Maybe Text
certificate} -> Maybe Text
certificate) (\s :: UpdateServer
s@UpdateServer' {} Maybe Text
a -> UpdateServer
s {$sel:certificate:UpdateServer' :: Maybe Text
certificate = Maybe Text
a} :: UpdateServer)
updateServer_endpointDetails :: Lens.Lens' UpdateServer (Prelude.Maybe EndpointDetails)
updateServer_endpointDetails :: Lens' UpdateServer (Maybe EndpointDetails)
updateServer_endpointDetails = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateServer' {Maybe EndpointDetails
endpointDetails :: Maybe EndpointDetails
$sel:endpointDetails:UpdateServer' :: UpdateServer -> Maybe EndpointDetails
endpointDetails} -> Maybe EndpointDetails
endpointDetails) (\s :: UpdateServer
s@UpdateServer' {} Maybe EndpointDetails
a -> UpdateServer
s {$sel:endpointDetails:UpdateServer' :: Maybe EndpointDetails
endpointDetails = Maybe EndpointDetails
a} :: UpdateServer)
updateServer_endpointType :: Lens.Lens' UpdateServer (Prelude.Maybe EndpointType)
updateServer_endpointType :: Lens' UpdateServer (Maybe EndpointType)
updateServer_endpointType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateServer' {Maybe EndpointType
endpointType :: Maybe EndpointType
$sel:endpointType:UpdateServer' :: UpdateServer -> Maybe EndpointType
endpointType} -> Maybe EndpointType
endpointType) (\s :: UpdateServer
s@UpdateServer' {} Maybe EndpointType
a -> UpdateServer
s {$sel:endpointType:UpdateServer' :: Maybe EndpointType
endpointType = Maybe EndpointType
a} :: UpdateServer)
updateServer_hostKey :: Lens.Lens' UpdateServer (Prelude.Maybe Prelude.Text)
updateServer_hostKey :: Lens' UpdateServer (Maybe Text)
updateServer_hostKey = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateServer' {Maybe (Sensitive Text)
hostKey :: Maybe (Sensitive Text)
$sel:hostKey:UpdateServer' :: UpdateServer -> Maybe (Sensitive Text)
hostKey} -> Maybe (Sensitive Text)
hostKey) (\s :: UpdateServer
s@UpdateServer' {} Maybe (Sensitive Text)
a -> UpdateServer
s {$sel:hostKey:UpdateServer' :: Maybe (Sensitive Text)
hostKey = Maybe (Sensitive Text)
a} :: UpdateServer) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall a. Iso' (Sensitive a) a
Data._Sensitive
updateServer_identityProviderDetails :: Lens.Lens' UpdateServer (Prelude.Maybe IdentityProviderDetails)
updateServer_identityProviderDetails :: Lens' UpdateServer (Maybe IdentityProviderDetails)
updateServer_identityProviderDetails = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateServer' {Maybe IdentityProviderDetails
identityProviderDetails :: Maybe IdentityProviderDetails
$sel:identityProviderDetails:UpdateServer' :: UpdateServer -> Maybe IdentityProviderDetails
identityProviderDetails} -> Maybe IdentityProviderDetails
identityProviderDetails) (\s :: UpdateServer
s@UpdateServer' {} Maybe IdentityProviderDetails
a -> UpdateServer
s {$sel:identityProviderDetails:UpdateServer' :: Maybe IdentityProviderDetails
identityProviderDetails = Maybe IdentityProviderDetails
a} :: UpdateServer)
updateServer_loggingRole :: Lens.Lens' UpdateServer (Prelude.Maybe Prelude.Text)
updateServer_loggingRole :: Lens' UpdateServer (Maybe Text)
updateServer_loggingRole = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateServer' {Maybe Text
loggingRole :: Maybe Text
$sel:loggingRole:UpdateServer' :: UpdateServer -> Maybe Text
loggingRole} -> Maybe Text
loggingRole) (\s :: UpdateServer
s@UpdateServer' {} Maybe Text
a -> UpdateServer
s {$sel:loggingRole:UpdateServer' :: Maybe Text
loggingRole = Maybe Text
a} :: UpdateServer)
updateServer_postAuthenticationLoginBanner :: Lens.Lens' UpdateServer (Prelude.Maybe Prelude.Text)
updateServer_postAuthenticationLoginBanner :: Lens' UpdateServer (Maybe Text)
updateServer_postAuthenticationLoginBanner = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateServer' {Maybe Text
postAuthenticationLoginBanner :: Maybe Text
$sel:postAuthenticationLoginBanner:UpdateServer' :: UpdateServer -> Maybe Text
postAuthenticationLoginBanner} -> Maybe Text
postAuthenticationLoginBanner) (\s :: UpdateServer
s@UpdateServer' {} Maybe Text
a -> UpdateServer
s {$sel:postAuthenticationLoginBanner:UpdateServer' :: Maybe Text
postAuthenticationLoginBanner = Maybe Text
a} :: UpdateServer)
updateServer_preAuthenticationLoginBanner :: Lens.Lens' UpdateServer (Prelude.Maybe Prelude.Text)
updateServer_preAuthenticationLoginBanner :: Lens' UpdateServer (Maybe Text)
updateServer_preAuthenticationLoginBanner = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateServer' {Maybe Text
preAuthenticationLoginBanner :: Maybe Text
$sel:preAuthenticationLoginBanner:UpdateServer' :: UpdateServer -> Maybe Text
preAuthenticationLoginBanner} -> Maybe Text
preAuthenticationLoginBanner) (\s :: UpdateServer
s@UpdateServer' {} Maybe Text
a -> UpdateServer
s {$sel:preAuthenticationLoginBanner:UpdateServer' :: Maybe Text
preAuthenticationLoginBanner = Maybe Text
a} :: UpdateServer)
updateServer_protocolDetails :: Lens.Lens' UpdateServer (Prelude.Maybe ProtocolDetails)
updateServer_protocolDetails :: Lens' UpdateServer (Maybe ProtocolDetails)
updateServer_protocolDetails = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateServer' {Maybe ProtocolDetails
protocolDetails :: Maybe ProtocolDetails
$sel:protocolDetails:UpdateServer' :: UpdateServer -> Maybe ProtocolDetails
protocolDetails} -> Maybe ProtocolDetails
protocolDetails) (\s :: UpdateServer
s@UpdateServer' {} Maybe ProtocolDetails
a -> UpdateServer
s {$sel:protocolDetails:UpdateServer' :: Maybe ProtocolDetails
protocolDetails = Maybe ProtocolDetails
a} :: UpdateServer)
updateServer_protocols :: Lens.Lens' UpdateServer (Prelude.Maybe (Prelude.NonEmpty Protocol))
updateServer_protocols :: Lens' UpdateServer (Maybe (NonEmpty Protocol))
updateServer_protocols = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateServer' {Maybe (NonEmpty Protocol)
protocols :: Maybe (NonEmpty Protocol)
$sel:protocols:UpdateServer' :: UpdateServer -> Maybe (NonEmpty Protocol)
protocols} -> Maybe (NonEmpty Protocol)
protocols) (\s :: UpdateServer
s@UpdateServer' {} Maybe (NonEmpty Protocol)
a -> UpdateServer
s {$sel:protocols:UpdateServer' :: Maybe (NonEmpty Protocol)
protocols = Maybe (NonEmpty Protocol)
a} :: UpdateServer) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
updateServer_securityPolicyName :: Lens.Lens' UpdateServer (Prelude.Maybe Prelude.Text)
updateServer_securityPolicyName :: Lens' UpdateServer (Maybe Text)
updateServer_securityPolicyName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateServer' {Maybe Text
securityPolicyName :: Maybe Text
$sel:securityPolicyName:UpdateServer' :: UpdateServer -> Maybe Text
securityPolicyName} -> Maybe Text
securityPolicyName) (\s :: UpdateServer
s@UpdateServer' {} Maybe Text
a -> UpdateServer
s {$sel:securityPolicyName:UpdateServer' :: Maybe Text
securityPolicyName = Maybe Text
a} :: UpdateServer)
updateServer_workflowDetails :: Lens.Lens' UpdateServer (Prelude.Maybe WorkflowDetails)
updateServer_workflowDetails :: Lens' UpdateServer (Maybe WorkflowDetails)
updateServer_workflowDetails = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateServer' {Maybe WorkflowDetails
workflowDetails :: Maybe WorkflowDetails
$sel:workflowDetails:UpdateServer' :: UpdateServer -> Maybe WorkflowDetails
workflowDetails} -> Maybe WorkflowDetails
workflowDetails) (\s :: UpdateServer
s@UpdateServer' {} Maybe WorkflowDetails
a -> UpdateServer
s {$sel:workflowDetails:UpdateServer' :: Maybe WorkflowDetails
workflowDetails = Maybe WorkflowDetails
a} :: UpdateServer)
updateServer_serverId :: Lens.Lens' UpdateServer Prelude.Text
updateServer_serverId :: Lens' UpdateServer Text
updateServer_serverId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateServer' {Text
serverId :: Text
$sel:serverId:UpdateServer' :: UpdateServer -> Text
serverId} -> Text
serverId) (\s :: UpdateServer
s@UpdateServer' {} Text
a -> UpdateServer
s {$sel:serverId:UpdateServer' :: Text
serverId = Text
a} :: UpdateServer)
instance Core.AWSRequest UpdateServer where
type AWSResponse UpdateServer = UpdateServerResponse
request :: (Service -> Service) -> UpdateServer -> Request UpdateServer
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy UpdateServer
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateServer)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Int -> Text -> UpdateServerResponse
UpdateServerResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"ServerId")
)
instance Prelude.Hashable UpdateServer where
hashWithSalt :: Int -> UpdateServer -> Int
hashWithSalt Int
_salt UpdateServer' {Maybe (NonEmpty Protocol)
Maybe Text
Maybe (Sensitive Text)
Maybe EndpointDetails
Maybe EndpointType
Maybe IdentityProviderDetails
Maybe ProtocolDetails
Maybe WorkflowDetails
Text
serverId :: Text
workflowDetails :: Maybe WorkflowDetails
securityPolicyName :: Maybe Text
protocols :: Maybe (NonEmpty Protocol)
protocolDetails :: Maybe ProtocolDetails
preAuthenticationLoginBanner :: Maybe Text
postAuthenticationLoginBanner :: Maybe Text
loggingRole :: Maybe Text
identityProviderDetails :: Maybe IdentityProviderDetails
hostKey :: Maybe (Sensitive Text)
endpointType :: Maybe EndpointType
endpointDetails :: Maybe EndpointDetails
certificate :: Maybe Text
$sel:serverId:UpdateServer' :: UpdateServer -> Text
$sel:workflowDetails:UpdateServer' :: UpdateServer -> Maybe WorkflowDetails
$sel:securityPolicyName:UpdateServer' :: UpdateServer -> Maybe Text
$sel:protocols:UpdateServer' :: UpdateServer -> Maybe (NonEmpty Protocol)
$sel:protocolDetails:UpdateServer' :: UpdateServer -> Maybe ProtocolDetails
$sel:preAuthenticationLoginBanner:UpdateServer' :: UpdateServer -> Maybe Text
$sel:postAuthenticationLoginBanner:UpdateServer' :: UpdateServer -> Maybe Text
$sel:loggingRole:UpdateServer' :: UpdateServer -> Maybe Text
$sel:identityProviderDetails:UpdateServer' :: UpdateServer -> Maybe IdentityProviderDetails
$sel:hostKey:UpdateServer' :: UpdateServer -> Maybe (Sensitive Text)
$sel:endpointType:UpdateServer' :: UpdateServer -> Maybe EndpointType
$sel:endpointDetails:UpdateServer' :: UpdateServer -> Maybe EndpointDetails
$sel:certificate:UpdateServer' :: UpdateServer -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
certificate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe EndpointDetails
endpointDetails
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe EndpointType
endpointType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
hostKey
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe IdentityProviderDetails
identityProviderDetails
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
loggingRole
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
postAuthenticationLoginBanner
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
preAuthenticationLoginBanner
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ProtocolDetails
protocolDetails
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty Protocol)
protocols
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
securityPolicyName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe WorkflowDetails
workflowDetails
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
serverId
instance Prelude.NFData UpdateServer where
rnf :: UpdateServer -> ()
rnf UpdateServer' {Maybe (NonEmpty Protocol)
Maybe Text
Maybe (Sensitive Text)
Maybe EndpointDetails
Maybe EndpointType
Maybe IdentityProviderDetails
Maybe ProtocolDetails
Maybe WorkflowDetails
Text
serverId :: Text
workflowDetails :: Maybe WorkflowDetails
securityPolicyName :: Maybe Text
protocols :: Maybe (NonEmpty Protocol)
protocolDetails :: Maybe ProtocolDetails
preAuthenticationLoginBanner :: Maybe Text
postAuthenticationLoginBanner :: Maybe Text
loggingRole :: Maybe Text
identityProviderDetails :: Maybe IdentityProviderDetails
hostKey :: Maybe (Sensitive Text)
endpointType :: Maybe EndpointType
endpointDetails :: Maybe EndpointDetails
certificate :: Maybe Text
$sel:serverId:UpdateServer' :: UpdateServer -> Text
$sel:workflowDetails:UpdateServer' :: UpdateServer -> Maybe WorkflowDetails
$sel:securityPolicyName:UpdateServer' :: UpdateServer -> Maybe Text
$sel:protocols:UpdateServer' :: UpdateServer -> Maybe (NonEmpty Protocol)
$sel:protocolDetails:UpdateServer' :: UpdateServer -> Maybe ProtocolDetails
$sel:preAuthenticationLoginBanner:UpdateServer' :: UpdateServer -> Maybe Text
$sel:postAuthenticationLoginBanner:UpdateServer' :: UpdateServer -> Maybe Text
$sel:loggingRole:UpdateServer' :: UpdateServer -> Maybe Text
$sel:identityProviderDetails:UpdateServer' :: UpdateServer -> Maybe IdentityProviderDetails
$sel:hostKey:UpdateServer' :: UpdateServer -> Maybe (Sensitive Text)
$sel:endpointType:UpdateServer' :: UpdateServer -> Maybe EndpointType
$sel:endpointDetails:UpdateServer' :: UpdateServer -> Maybe EndpointDetails
$sel:certificate:UpdateServer' :: UpdateServer -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
certificate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe EndpointDetails
endpointDetails
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe EndpointType
endpointType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
hostKey
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe IdentityProviderDetails
identityProviderDetails
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
loggingRole
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
postAuthenticationLoginBanner
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
preAuthenticationLoginBanner
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ProtocolDetails
protocolDetails
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty Protocol)
protocols
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
securityPolicyName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe WorkflowDetails
workflowDetails
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
serverId
instance Data.ToHeaders UpdateServer where
toHeaders :: UpdateServer -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"TransferService.UpdateServer" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON UpdateServer where
toJSON :: UpdateServer -> Value
toJSON UpdateServer' {Maybe (NonEmpty Protocol)
Maybe Text
Maybe (Sensitive Text)
Maybe EndpointDetails
Maybe EndpointType
Maybe IdentityProviderDetails
Maybe ProtocolDetails
Maybe WorkflowDetails
Text
serverId :: Text
workflowDetails :: Maybe WorkflowDetails
securityPolicyName :: Maybe Text
protocols :: Maybe (NonEmpty Protocol)
protocolDetails :: Maybe ProtocolDetails
preAuthenticationLoginBanner :: Maybe Text
postAuthenticationLoginBanner :: Maybe Text
loggingRole :: Maybe Text
identityProviderDetails :: Maybe IdentityProviderDetails
hostKey :: Maybe (Sensitive Text)
endpointType :: Maybe EndpointType
endpointDetails :: Maybe EndpointDetails
certificate :: Maybe Text
$sel:serverId:UpdateServer' :: UpdateServer -> Text
$sel:workflowDetails:UpdateServer' :: UpdateServer -> Maybe WorkflowDetails
$sel:securityPolicyName:UpdateServer' :: UpdateServer -> Maybe Text
$sel:protocols:UpdateServer' :: UpdateServer -> Maybe (NonEmpty Protocol)
$sel:protocolDetails:UpdateServer' :: UpdateServer -> Maybe ProtocolDetails
$sel:preAuthenticationLoginBanner:UpdateServer' :: UpdateServer -> Maybe Text
$sel:postAuthenticationLoginBanner:UpdateServer' :: UpdateServer -> Maybe Text
$sel:loggingRole:UpdateServer' :: UpdateServer -> Maybe Text
$sel:identityProviderDetails:UpdateServer' :: UpdateServer -> Maybe IdentityProviderDetails
$sel:hostKey:UpdateServer' :: UpdateServer -> Maybe (Sensitive Text)
$sel:endpointType:UpdateServer' :: UpdateServer -> Maybe EndpointType
$sel:endpointDetails:UpdateServer' :: UpdateServer -> Maybe EndpointDetails
$sel:certificate:UpdateServer' :: UpdateServer -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"Certificate" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
certificate,
(Key
"EndpointDetails" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EndpointDetails
endpointDetails,
(Key
"EndpointType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EndpointType
endpointType,
(Key
"HostKey" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
hostKey,
(Key
"IdentityProviderDetails" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe IdentityProviderDetails
identityProviderDetails,
(Key
"LoggingRole" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
loggingRole,
(Key
"PostAuthenticationLoginBanner" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
postAuthenticationLoginBanner,
(Key
"PreAuthenticationLoginBanner" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
preAuthenticationLoginBanner,
(Key
"ProtocolDetails" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ProtocolDetails
protocolDetails,
(Key
"Protocols" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Protocol)
protocols,
(Key
"SecurityPolicyName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
securityPolicyName,
(Key
"WorkflowDetails" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe WorkflowDetails
workflowDetails,
forall a. a -> Maybe a
Prelude.Just (Key
"ServerId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
serverId)
]
)
instance Data.ToPath UpdateServer where
toPath :: UpdateServer -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery UpdateServer where
toQuery :: UpdateServer -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data UpdateServerResponse = UpdateServerResponse'
{
UpdateServerResponse -> Int
httpStatus :: Prelude.Int,
UpdateServerResponse -> Text
serverId :: Prelude.Text
}
deriving (UpdateServerResponse -> UpdateServerResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateServerResponse -> UpdateServerResponse -> Bool
$c/= :: UpdateServerResponse -> UpdateServerResponse -> Bool
== :: UpdateServerResponse -> UpdateServerResponse -> Bool
$c== :: UpdateServerResponse -> UpdateServerResponse -> Bool
Prelude.Eq, ReadPrec [UpdateServerResponse]
ReadPrec UpdateServerResponse
Int -> ReadS UpdateServerResponse
ReadS [UpdateServerResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateServerResponse]
$creadListPrec :: ReadPrec [UpdateServerResponse]
readPrec :: ReadPrec UpdateServerResponse
$creadPrec :: ReadPrec UpdateServerResponse
readList :: ReadS [UpdateServerResponse]
$creadList :: ReadS [UpdateServerResponse]
readsPrec :: Int -> ReadS UpdateServerResponse
$creadsPrec :: Int -> ReadS UpdateServerResponse
Prelude.Read, Int -> UpdateServerResponse -> ShowS
[UpdateServerResponse] -> ShowS
UpdateServerResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateServerResponse] -> ShowS
$cshowList :: [UpdateServerResponse] -> ShowS
show :: UpdateServerResponse -> String
$cshow :: UpdateServerResponse -> String
showsPrec :: Int -> UpdateServerResponse -> ShowS
$cshowsPrec :: Int -> UpdateServerResponse -> ShowS
Prelude.Show, forall x. Rep UpdateServerResponse x -> UpdateServerResponse
forall x. UpdateServerResponse -> Rep UpdateServerResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateServerResponse x -> UpdateServerResponse
$cfrom :: forall x. UpdateServerResponse -> Rep UpdateServerResponse x
Prelude.Generic)
newUpdateServerResponse ::
Prelude.Int ->
Prelude.Text ->
UpdateServerResponse
newUpdateServerResponse :: Int -> Text -> UpdateServerResponse
newUpdateServerResponse Int
pHttpStatus_ Text
pServerId_ =
UpdateServerResponse'
{ $sel:httpStatus:UpdateServerResponse' :: Int
httpStatus = Int
pHttpStatus_,
$sel:serverId:UpdateServerResponse' :: Text
serverId = Text
pServerId_
}
updateServerResponse_httpStatus :: Lens.Lens' UpdateServerResponse Prelude.Int
updateServerResponse_httpStatus :: Lens' UpdateServerResponse Int
updateServerResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateServerResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateServerResponse' :: UpdateServerResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateServerResponse
s@UpdateServerResponse' {} Int
a -> UpdateServerResponse
s {$sel:httpStatus:UpdateServerResponse' :: Int
httpStatus = Int
a} :: UpdateServerResponse)
updateServerResponse_serverId :: Lens.Lens' UpdateServerResponse Prelude.Text
updateServerResponse_serverId :: Lens' UpdateServerResponse Text
updateServerResponse_serverId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateServerResponse' {Text
serverId :: Text
$sel:serverId:UpdateServerResponse' :: UpdateServerResponse -> Text
serverId} -> Text
serverId) (\s :: UpdateServerResponse
s@UpdateServerResponse' {} Text
a -> UpdateServerResponse
s {$sel:serverId:UpdateServerResponse' :: Text
serverId = Text
a} :: UpdateServerResponse)
instance Prelude.NFData UpdateServerResponse where
rnf :: UpdateServerResponse -> ()
rnf UpdateServerResponse' {Int
Text
serverId :: Text
httpStatus :: Int
$sel:serverId:UpdateServerResponse' :: UpdateServerResponse -> Text
$sel:httpStatus:UpdateServerResponse' :: UpdateServerResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
serverId