{-# 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_protocolDetails,
updateServer_loggingRole,
updateServer_hostKey,
updateServer_protocols,
updateServer_endpointType,
updateServer_securityPolicyName,
updateServer_certificate,
updateServer_identityProviderDetails,
updateServer_workflowDetails,
updateServer_endpointDetails,
updateServer_serverId,
UpdateServerResponse (..),
newUpdateServerResponse,
updateServerResponse_httpStatus,
updateServerResponse_serverId,
)
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 UpdateServer = UpdateServer'
{
UpdateServer -> Maybe ProtocolDetails
protocolDetails :: Prelude.Maybe ProtocolDetails,
UpdateServer -> Maybe Text
loggingRole :: Prelude.Maybe Prelude.Text,
UpdateServer -> Maybe (Sensitive Text)
hostKey :: Prelude.Maybe (Core.Sensitive Prelude.Text),
UpdateServer -> Maybe (NonEmpty Protocol)
protocols :: Prelude.Maybe (Prelude.NonEmpty Protocol),
UpdateServer -> Maybe EndpointType
endpointType :: Prelude.Maybe EndpointType,
UpdateServer -> Maybe Text
securityPolicyName :: Prelude.Maybe Prelude.Text,
UpdateServer -> Maybe Text
certificate :: Prelude.Maybe Prelude.Text,
UpdateServer -> Maybe IdentityProviderDetails
identityProviderDetails :: Prelude.Maybe IdentityProviderDetails,
UpdateServer -> Maybe WorkflowDetails
workflowDetails :: Prelude.Maybe WorkflowDetails,
UpdateServer -> Maybe EndpointDetails
endpointDetails :: Prelude.Maybe EndpointDetails,
UpdateServer -> Text
serverId :: Prelude.Text
}
deriving (UpdateServer -> UpdateServer -> Bool
(UpdateServer -> UpdateServer -> Bool)
-> (UpdateServer -> UpdateServer -> Bool) -> Eq UpdateServer
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
(Int -> UpdateServer -> ShowS)
-> (UpdateServer -> String)
-> ([UpdateServer] -> ShowS)
-> Show UpdateServer
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. UpdateServer -> Rep UpdateServer x)
-> (forall x. Rep UpdateServer x -> UpdateServer)
-> Generic UpdateServer
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' :: Maybe ProtocolDetails
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe (NonEmpty Protocol)
-> Maybe EndpointType
-> Maybe Text
-> Maybe Text
-> Maybe IdentityProviderDetails
-> Maybe WorkflowDetails
-> Maybe EndpointDetails
-> Text
-> UpdateServer
UpdateServer'
{ $sel:protocolDetails:UpdateServer' :: Maybe ProtocolDetails
protocolDetails = Maybe ProtocolDetails
forall a. Maybe a
Prelude.Nothing,
$sel:loggingRole:UpdateServer' :: Maybe Text
loggingRole = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:hostKey:UpdateServer' :: Maybe (Sensitive Text)
hostKey = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:protocols:UpdateServer' :: Maybe (NonEmpty Protocol)
protocols = Maybe (NonEmpty Protocol)
forall a. Maybe a
Prelude.Nothing,
$sel:endpointType:UpdateServer' :: Maybe EndpointType
endpointType = Maybe EndpointType
forall a. Maybe a
Prelude.Nothing,
$sel:securityPolicyName:UpdateServer' :: Maybe Text
securityPolicyName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:certificate:UpdateServer' :: Maybe Text
certificate = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:identityProviderDetails:UpdateServer' :: Maybe IdentityProviderDetails
identityProviderDetails = Maybe IdentityProviderDetails
forall a. Maybe a
Prelude.Nothing,
$sel:workflowDetails:UpdateServer' :: Maybe WorkflowDetails
workflowDetails = Maybe WorkflowDetails
forall a. Maybe a
Prelude.Nothing,
$sel:endpointDetails:UpdateServer' :: Maybe EndpointDetails
endpointDetails = Maybe EndpointDetails
forall a. Maybe a
Prelude.Nothing,
$sel:serverId:UpdateServer' :: Text
serverId = Text
pServerId_
}
updateServer_protocolDetails :: Lens.Lens' UpdateServer (Prelude.Maybe ProtocolDetails)
updateServer_protocolDetails :: (Maybe ProtocolDetails -> f (Maybe ProtocolDetails))
-> UpdateServer -> f UpdateServer
updateServer_protocolDetails = (UpdateServer -> Maybe ProtocolDetails)
-> (UpdateServer -> Maybe ProtocolDetails -> UpdateServer)
-> Lens
UpdateServer
UpdateServer
(Maybe ProtocolDetails)
(Maybe 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_loggingRole :: Lens.Lens' UpdateServer (Prelude.Maybe Prelude.Text)
updateServer_loggingRole :: (Maybe Text -> f (Maybe Text)) -> UpdateServer -> f UpdateServer
updateServer_loggingRole = (UpdateServer -> Maybe Text)
-> (UpdateServer -> Maybe Text -> UpdateServer)
-> Lens UpdateServer UpdateServer (Maybe Text) (Maybe Text)
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_hostKey :: Lens.Lens' UpdateServer (Prelude.Maybe Prelude.Text)
updateServer_hostKey :: (Maybe Text -> f (Maybe Text)) -> UpdateServer -> f UpdateServer
updateServer_hostKey = (UpdateServer -> Maybe (Sensitive Text))
-> (UpdateServer -> Maybe (Sensitive Text) -> UpdateServer)
-> Lens
UpdateServer
UpdateServer
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
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) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> UpdateServer -> f UpdateServer)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> UpdateServer
-> f UpdateServer
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
updateServer_protocols :: Lens.Lens' UpdateServer (Prelude.Maybe (Prelude.NonEmpty Protocol))
updateServer_protocols :: (Maybe (NonEmpty Protocol) -> f (Maybe (NonEmpty Protocol)))
-> UpdateServer -> f UpdateServer
updateServer_protocols = (UpdateServer -> Maybe (NonEmpty Protocol))
-> (UpdateServer -> Maybe (NonEmpty Protocol) -> UpdateServer)
-> Lens
UpdateServer
UpdateServer
(Maybe (NonEmpty Protocol))
(Maybe (NonEmpty Protocol))
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) ((Maybe (NonEmpty Protocol) -> f (Maybe (NonEmpty Protocol)))
-> UpdateServer -> f UpdateServer)
-> ((Maybe (NonEmpty Protocol) -> f (Maybe (NonEmpty Protocol)))
-> Maybe (NonEmpty Protocol) -> f (Maybe (NonEmpty Protocol)))
-> (Maybe (NonEmpty Protocol) -> f (Maybe (NonEmpty Protocol)))
-> UpdateServer
-> f UpdateServer
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty Protocol)
(NonEmpty Protocol)
(NonEmpty Protocol)
(NonEmpty Protocol)
-> Iso
(Maybe (NonEmpty Protocol))
(Maybe (NonEmpty Protocol))
(Maybe (NonEmpty Protocol))
(Maybe (NonEmpty Protocol))
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 Protocol)
(NonEmpty Protocol)
(NonEmpty Protocol)
(NonEmpty Protocol)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
updateServer_endpointType :: Lens.Lens' UpdateServer (Prelude.Maybe EndpointType)
updateServer_endpointType :: (Maybe EndpointType -> f (Maybe EndpointType))
-> UpdateServer -> f UpdateServer
updateServer_endpointType = (UpdateServer -> Maybe EndpointType)
-> (UpdateServer -> Maybe EndpointType -> UpdateServer)
-> Lens
UpdateServer UpdateServer (Maybe EndpointType) (Maybe 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_securityPolicyName :: Lens.Lens' UpdateServer (Prelude.Maybe Prelude.Text)
updateServer_securityPolicyName :: (Maybe Text -> f (Maybe Text)) -> UpdateServer -> f UpdateServer
updateServer_securityPolicyName = (UpdateServer -> Maybe Text)
-> (UpdateServer -> Maybe Text -> UpdateServer)
-> Lens UpdateServer UpdateServer (Maybe Text) (Maybe Text)
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_certificate :: Lens.Lens' UpdateServer (Prelude.Maybe Prelude.Text)
updateServer_certificate :: (Maybe Text -> f (Maybe Text)) -> UpdateServer -> f UpdateServer
updateServer_certificate = (UpdateServer -> Maybe Text)
-> (UpdateServer -> Maybe Text -> UpdateServer)
-> Lens UpdateServer UpdateServer (Maybe Text) (Maybe Text)
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_identityProviderDetails :: Lens.Lens' UpdateServer (Prelude.Maybe IdentityProviderDetails)
updateServer_identityProviderDetails :: (Maybe IdentityProviderDetails
-> f (Maybe IdentityProviderDetails))
-> UpdateServer -> f UpdateServer
updateServer_identityProviderDetails = (UpdateServer -> Maybe IdentityProviderDetails)
-> (UpdateServer -> Maybe IdentityProviderDetails -> UpdateServer)
-> Lens
UpdateServer
UpdateServer
(Maybe IdentityProviderDetails)
(Maybe 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_workflowDetails :: Lens.Lens' UpdateServer (Prelude.Maybe WorkflowDetails)
updateServer_workflowDetails :: (Maybe WorkflowDetails -> f (Maybe WorkflowDetails))
-> UpdateServer -> f UpdateServer
updateServer_workflowDetails = (UpdateServer -> Maybe WorkflowDetails)
-> (UpdateServer -> Maybe WorkflowDetails -> UpdateServer)
-> Lens
UpdateServer
UpdateServer
(Maybe WorkflowDetails)
(Maybe 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_endpointDetails :: Lens.Lens' UpdateServer (Prelude.Maybe EndpointDetails)
updateServer_endpointDetails :: (Maybe EndpointDetails -> f (Maybe EndpointDetails))
-> UpdateServer -> f UpdateServer
updateServer_endpointDetails = (UpdateServer -> Maybe EndpointDetails)
-> (UpdateServer -> Maybe EndpointDetails -> UpdateServer)
-> Lens
UpdateServer
UpdateServer
(Maybe EndpointDetails)
(Maybe 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_serverId :: Lens.Lens' UpdateServer Prelude.Text
updateServer_serverId :: (Text -> f Text) -> UpdateServer -> f UpdateServer
updateServer_serverId = (UpdateServer -> Text)
-> (UpdateServer -> Text -> UpdateServer)
-> Lens UpdateServer UpdateServer Text Text
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 :: UpdateServer -> Request UpdateServer
request = Service -> UpdateServer -> Request UpdateServer
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy UpdateServer
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateServer)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse UpdateServer))
-> Logger
-> Service
-> Proxy UpdateServer
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateServer)))
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 -> UpdateServerResponse
UpdateServerResponse'
(Int -> Text -> UpdateServerResponse)
-> Either String Int
-> Either String (Text -> UpdateServerResponse)
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 -> UpdateServerResponse)
-> Either String Text -> Either String UpdateServerResponse
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")
)
instance Prelude.Hashable UpdateServer
instance Prelude.NFData UpdateServer
instance Core.ToHeaders UpdateServer where
toHeaders :: UpdateServer -> ResponseHeaders
toHeaders =
ResponseHeaders -> UpdateServer -> 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.UpdateServer" ::
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 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
endpointDetails :: Maybe EndpointDetails
workflowDetails :: Maybe WorkflowDetails
identityProviderDetails :: Maybe IdentityProviderDetails
certificate :: Maybe Text
securityPolicyName :: Maybe Text
endpointType :: Maybe EndpointType
protocols :: Maybe (NonEmpty Protocol)
hostKey :: Maybe (Sensitive Text)
loggingRole :: Maybe Text
protocolDetails :: Maybe ProtocolDetails
$sel:serverId:UpdateServer' :: UpdateServer -> Text
$sel:endpointDetails:UpdateServer' :: UpdateServer -> Maybe EndpointDetails
$sel:workflowDetails:UpdateServer' :: UpdateServer -> Maybe WorkflowDetails
$sel:identityProviderDetails:UpdateServer' :: UpdateServer -> Maybe IdentityProviderDetails
$sel:certificate:UpdateServer' :: UpdateServer -> Maybe Text
$sel:securityPolicyName:UpdateServer' :: UpdateServer -> Maybe Text
$sel:endpointType:UpdateServer' :: UpdateServer -> Maybe EndpointType
$sel:protocols:UpdateServer' :: UpdateServer -> Maybe (NonEmpty Protocol)
$sel:hostKey:UpdateServer' :: UpdateServer -> Maybe (Sensitive Text)
$sel:loggingRole:UpdateServer' :: UpdateServer -> Maybe Text
$sel:protocolDetails:UpdateServer' :: UpdateServer -> Maybe ProtocolDetails
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"ProtocolDetails" Text -> ProtocolDetails -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(ProtocolDetails -> Pair) -> Maybe ProtocolDetails -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ProtocolDetails
protocolDetails,
(Text
"LoggingRole" 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
loggingRole,
(Text
"HostKey" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Sensitive Text -> Pair) -> Maybe (Sensitive Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
hostKey,
(Text
"Protocols" Text -> NonEmpty Protocol -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NonEmpty Protocol -> Pair)
-> Maybe (NonEmpty Protocol) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Protocol)
protocols,
(Text
"EndpointType" Text -> EndpointType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (EndpointType -> Pair) -> Maybe EndpointType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EndpointType
endpointType,
(Text
"SecurityPolicyName" 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
securityPolicyName,
(Text
"Certificate" 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
certificate,
(Text
"IdentityProviderDetails" Text -> IdentityProviderDetails -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(IdentityProviderDetails -> Pair)
-> Maybe IdentityProviderDetails -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe IdentityProviderDetails
identityProviderDetails,
(Text
"WorkflowDetails" Text -> WorkflowDetails -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(WorkflowDetails -> Pair) -> Maybe WorkflowDetails -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe WorkflowDetails
workflowDetails,
(Text
"EndpointDetails" Text -> EndpointDetails -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(EndpointDetails -> Pair) -> Maybe EndpointDetails -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe EndpointDetails
endpointDetails,
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)
]
)
instance Core.ToPath UpdateServer where
toPath :: UpdateServer -> ByteString
toPath = ByteString -> UpdateServer -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery UpdateServer where
toQuery :: UpdateServer -> QueryString
toQuery = QueryString -> UpdateServer -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data UpdateServerResponse = UpdateServerResponse'
{
UpdateServerResponse -> Int
httpStatus :: Prelude.Int,
UpdateServerResponse -> Text
serverId :: Prelude.Text
}
deriving (UpdateServerResponse -> UpdateServerResponse -> Bool
(UpdateServerResponse -> UpdateServerResponse -> Bool)
-> (UpdateServerResponse -> UpdateServerResponse -> Bool)
-> Eq UpdateServerResponse
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]
(Int -> ReadS UpdateServerResponse)
-> ReadS [UpdateServerResponse]
-> ReadPrec UpdateServerResponse
-> ReadPrec [UpdateServerResponse]
-> Read 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
(Int -> UpdateServerResponse -> ShowS)
-> (UpdateServerResponse -> String)
-> ([UpdateServerResponse] -> ShowS)
-> Show UpdateServerResponse
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. UpdateServerResponse -> Rep UpdateServerResponse x)
-> (forall x. Rep UpdateServerResponse x -> UpdateServerResponse)
-> Generic UpdateServerResponse
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' :: Int -> Text -> UpdateServerResponse
UpdateServerResponse'
{ $sel:httpStatus:UpdateServerResponse' :: Int
httpStatus = Int
pHttpStatus_,
$sel:serverId:UpdateServerResponse' :: Text
serverId = Text
pServerId_
}
updateServerResponse_httpStatus :: Lens.Lens' UpdateServerResponse Prelude.Int
updateServerResponse_httpStatus :: (Int -> f Int) -> UpdateServerResponse -> f UpdateServerResponse
updateServerResponse_httpStatus = (UpdateServerResponse -> Int)
-> (UpdateServerResponse -> Int -> UpdateServerResponse)
-> Lens UpdateServerResponse UpdateServerResponse Int Int
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 :: (Text -> f Text) -> UpdateServerResponse -> f UpdateServerResponse
updateServerResponse_serverId = (UpdateServerResponse -> Text)
-> (UpdateServerResponse -> Text -> UpdateServerResponse)
-> Lens UpdateServerResponse UpdateServerResponse Text Text
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