{-# 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.AppRunner.DisassociateCustomDomain
(
DisassociateCustomDomain (..),
newDisassociateCustomDomain,
disassociateCustomDomain_serviceArn,
disassociateCustomDomain_domainName,
DisassociateCustomDomainResponse (..),
newDisassociateCustomDomainResponse,
disassociateCustomDomainResponse_httpStatus,
disassociateCustomDomainResponse_dNSTarget,
disassociateCustomDomainResponse_serviceArn,
disassociateCustomDomainResponse_customDomain,
)
where
import Amazonka.AppRunner.Types
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
data DisassociateCustomDomain = DisassociateCustomDomain'
{
DisassociateCustomDomain -> Text
serviceArn :: Prelude.Text,
DisassociateCustomDomain -> Text
domainName :: Prelude.Text
}
deriving (DisassociateCustomDomain -> DisassociateCustomDomain -> Bool
(DisassociateCustomDomain -> DisassociateCustomDomain -> Bool)
-> (DisassociateCustomDomain -> DisassociateCustomDomain -> Bool)
-> Eq DisassociateCustomDomain
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisassociateCustomDomain -> DisassociateCustomDomain -> Bool
$c/= :: DisassociateCustomDomain -> DisassociateCustomDomain -> Bool
== :: DisassociateCustomDomain -> DisassociateCustomDomain -> Bool
$c== :: DisassociateCustomDomain -> DisassociateCustomDomain -> Bool
Prelude.Eq, ReadPrec [DisassociateCustomDomain]
ReadPrec DisassociateCustomDomain
Int -> ReadS DisassociateCustomDomain
ReadS [DisassociateCustomDomain]
(Int -> ReadS DisassociateCustomDomain)
-> ReadS [DisassociateCustomDomain]
-> ReadPrec DisassociateCustomDomain
-> ReadPrec [DisassociateCustomDomain]
-> Read DisassociateCustomDomain
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisassociateCustomDomain]
$creadListPrec :: ReadPrec [DisassociateCustomDomain]
readPrec :: ReadPrec DisassociateCustomDomain
$creadPrec :: ReadPrec DisassociateCustomDomain
readList :: ReadS [DisassociateCustomDomain]
$creadList :: ReadS [DisassociateCustomDomain]
readsPrec :: Int -> ReadS DisassociateCustomDomain
$creadsPrec :: Int -> ReadS DisassociateCustomDomain
Prelude.Read, Int -> DisassociateCustomDomain -> ShowS
[DisassociateCustomDomain] -> ShowS
DisassociateCustomDomain -> String
(Int -> DisassociateCustomDomain -> ShowS)
-> (DisassociateCustomDomain -> String)
-> ([DisassociateCustomDomain] -> ShowS)
-> Show DisassociateCustomDomain
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisassociateCustomDomain] -> ShowS
$cshowList :: [DisassociateCustomDomain] -> ShowS
show :: DisassociateCustomDomain -> String
$cshow :: DisassociateCustomDomain -> String
showsPrec :: Int -> DisassociateCustomDomain -> ShowS
$cshowsPrec :: Int -> DisassociateCustomDomain -> ShowS
Prelude.Show, (forall x.
DisassociateCustomDomain -> Rep DisassociateCustomDomain x)
-> (forall x.
Rep DisassociateCustomDomain x -> DisassociateCustomDomain)
-> Generic DisassociateCustomDomain
forall x.
Rep DisassociateCustomDomain x -> DisassociateCustomDomain
forall x.
DisassociateCustomDomain -> Rep DisassociateCustomDomain x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DisassociateCustomDomain x -> DisassociateCustomDomain
$cfrom :: forall x.
DisassociateCustomDomain -> Rep DisassociateCustomDomain x
Prelude.Generic)
newDisassociateCustomDomain ::
Prelude.Text ->
Prelude.Text ->
DisassociateCustomDomain
newDisassociateCustomDomain :: Text -> Text -> DisassociateCustomDomain
newDisassociateCustomDomain Text
pServiceArn_ Text
pDomainName_ =
DisassociateCustomDomain' :: Text -> Text -> DisassociateCustomDomain
DisassociateCustomDomain'
{ $sel:serviceArn:DisassociateCustomDomain' :: Text
serviceArn =
Text
pServiceArn_,
$sel:domainName:DisassociateCustomDomain' :: Text
domainName = Text
pDomainName_
}
disassociateCustomDomain_serviceArn :: Lens.Lens' DisassociateCustomDomain Prelude.Text
disassociateCustomDomain_serviceArn :: (Text -> f Text)
-> DisassociateCustomDomain -> f DisassociateCustomDomain
disassociateCustomDomain_serviceArn = (DisassociateCustomDomain -> Text)
-> (DisassociateCustomDomain -> Text -> DisassociateCustomDomain)
-> Lens DisassociateCustomDomain DisassociateCustomDomain Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateCustomDomain' {Text
serviceArn :: Text
$sel:serviceArn:DisassociateCustomDomain' :: DisassociateCustomDomain -> Text
serviceArn} -> Text
serviceArn) (\s :: DisassociateCustomDomain
s@DisassociateCustomDomain' {} Text
a -> DisassociateCustomDomain
s {$sel:serviceArn:DisassociateCustomDomain' :: Text
serviceArn = Text
a} :: DisassociateCustomDomain)
disassociateCustomDomain_domainName :: Lens.Lens' DisassociateCustomDomain Prelude.Text
disassociateCustomDomain_domainName :: (Text -> f Text)
-> DisassociateCustomDomain -> f DisassociateCustomDomain
disassociateCustomDomain_domainName = (DisassociateCustomDomain -> Text)
-> (DisassociateCustomDomain -> Text -> DisassociateCustomDomain)
-> Lens DisassociateCustomDomain DisassociateCustomDomain Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateCustomDomain' {Text
domainName :: Text
$sel:domainName:DisassociateCustomDomain' :: DisassociateCustomDomain -> Text
domainName} -> Text
domainName) (\s :: DisassociateCustomDomain
s@DisassociateCustomDomain' {} Text
a -> DisassociateCustomDomain
s {$sel:domainName:DisassociateCustomDomain' :: Text
domainName = Text
a} :: DisassociateCustomDomain)
instance Core.AWSRequest DisassociateCustomDomain where
type
AWSResponse DisassociateCustomDomain =
DisassociateCustomDomainResponse
request :: DisassociateCustomDomain -> Request DisassociateCustomDomain
request = Service
-> DisassociateCustomDomain -> Request DisassociateCustomDomain
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DisassociateCustomDomain
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DisassociateCustomDomain)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DisassociateCustomDomain))
-> Logger
-> Service
-> Proxy DisassociateCustomDomain
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DisassociateCustomDomain)))
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 -> CustomDomain -> DisassociateCustomDomainResponse
DisassociateCustomDomainResponse'
(Int
-> Text
-> Text
-> CustomDomain
-> DisassociateCustomDomainResponse)
-> Either String Int
-> Either
String
(Text -> Text -> CustomDomain -> DisassociateCustomDomainResponse)
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 -> CustomDomain -> DisassociateCustomDomainResponse)
-> Either String Text
-> Either
String (Text -> CustomDomain -> DisassociateCustomDomainResponse)
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
"DNSTarget")
Either
String (Text -> CustomDomain -> DisassociateCustomDomainResponse)
-> Either String Text
-> Either String (CustomDomain -> DisassociateCustomDomainResponse)
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
"ServiceArn")
Either String (CustomDomain -> DisassociateCustomDomainResponse)
-> Either String CustomDomain
-> Either String DisassociateCustomDomainResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String CustomDomain
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"CustomDomain")
)
instance Prelude.Hashable DisassociateCustomDomain
instance Prelude.NFData DisassociateCustomDomain
instance Core.ToHeaders DisassociateCustomDomain where
toHeaders :: DisassociateCustomDomain -> ResponseHeaders
toHeaders =
ResponseHeaders -> DisassociateCustomDomain -> 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
"AppRunner.DisassociateCustomDomain" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.0" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON DisassociateCustomDomain where
toJSON :: DisassociateCustomDomain -> Value
toJSON DisassociateCustomDomain' {Text
domainName :: Text
serviceArn :: Text
$sel:domainName:DisassociateCustomDomain' :: DisassociateCustomDomain -> Text
$sel:serviceArn:DisassociateCustomDomain' :: DisassociateCustomDomain -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ServiceArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
serviceArn),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"DomainName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
domainName)
]
)
instance Core.ToPath DisassociateCustomDomain where
toPath :: DisassociateCustomDomain -> ByteString
toPath = ByteString -> DisassociateCustomDomain -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DisassociateCustomDomain where
toQuery :: DisassociateCustomDomain -> QueryString
toQuery = QueryString -> DisassociateCustomDomain -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DisassociateCustomDomainResponse = DisassociateCustomDomainResponse'
{
DisassociateCustomDomainResponse -> Int
httpStatus :: Prelude.Int,
DisassociateCustomDomainResponse -> Text
dNSTarget :: Prelude.Text,
DisassociateCustomDomainResponse -> Text
serviceArn :: Prelude.Text,
DisassociateCustomDomainResponse -> CustomDomain
customDomain :: CustomDomain
}
deriving (DisassociateCustomDomainResponse
-> DisassociateCustomDomainResponse -> Bool
(DisassociateCustomDomainResponse
-> DisassociateCustomDomainResponse -> Bool)
-> (DisassociateCustomDomainResponse
-> DisassociateCustomDomainResponse -> Bool)
-> Eq DisassociateCustomDomainResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisassociateCustomDomainResponse
-> DisassociateCustomDomainResponse -> Bool
$c/= :: DisassociateCustomDomainResponse
-> DisassociateCustomDomainResponse -> Bool
== :: DisassociateCustomDomainResponse
-> DisassociateCustomDomainResponse -> Bool
$c== :: DisassociateCustomDomainResponse
-> DisassociateCustomDomainResponse -> Bool
Prelude.Eq, ReadPrec [DisassociateCustomDomainResponse]
ReadPrec DisassociateCustomDomainResponse
Int -> ReadS DisassociateCustomDomainResponse
ReadS [DisassociateCustomDomainResponse]
(Int -> ReadS DisassociateCustomDomainResponse)
-> ReadS [DisassociateCustomDomainResponse]
-> ReadPrec DisassociateCustomDomainResponse
-> ReadPrec [DisassociateCustomDomainResponse]
-> Read DisassociateCustomDomainResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisassociateCustomDomainResponse]
$creadListPrec :: ReadPrec [DisassociateCustomDomainResponse]
readPrec :: ReadPrec DisassociateCustomDomainResponse
$creadPrec :: ReadPrec DisassociateCustomDomainResponse
readList :: ReadS [DisassociateCustomDomainResponse]
$creadList :: ReadS [DisassociateCustomDomainResponse]
readsPrec :: Int -> ReadS DisassociateCustomDomainResponse
$creadsPrec :: Int -> ReadS DisassociateCustomDomainResponse
Prelude.Read, Int -> DisassociateCustomDomainResponse -> ShowS
[DisassociateCustomDomainResponse] -> ShowS
DisassociateCustomDomainResponse -> String
(Int -> DisassociateCustomDomainResponse -> ShowS)
-> (DisassociateCustomDomainResponse -> String)
-> ([DisassociateCustomDomainResponse] -> ShowS)
-> Show DisassociateCustomDomainResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisassociateCustomDomainResponse] -> ShowS
$cshowList :: [DisassociateCustomDomainResponse] -> ShowS
show :: DisassociateCustomDomainResponse -> String
$cshow :: DisassociateCustomDomainResponse -> String
showsPrec :: Int -> DisassociateCustomDomainResponse -> ShowS
$cshowsPrec :: Int -> DisassociateCustomDomainResponse -> ShowS
Prelude.Show, (forall x.
DisassociateCustomDomainResponse
-> Rep DisassociateCustomDomainResponse x)
-> (forall x.
Rep DisassociateCustomDomainResponse x
-> DisassociateCustomDomainResponse)
-> Generic DisassociateCustomDomainResponse
forall x.
Rep DisassociateCustomDomainResponse x
-> DisassociateCustomDomainResponse
forall x.
DisassociateCustomDomainResponse
-> Rep DisassociateCustomDomainResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DisassociateCustomDomainResponse x
-> DisassociateCustomDomainResponse
$cfrom :: forall x.
DisassociateCustomDomainResponse
-> Rep DisassociateCustomDomainResponse x
Prelude.Generic)
newDisassociateCustomDomainResponse ::
Prelude.Int ->
Prelude.Text ->
Prelude.Text ->
CustomDomain ->
DisassociateCustomDomainResponse
newDisassociateCustomDomainResponse :: Int
-> Text -> Text -> CustomDomain -> DisassociateCustomDomainResponse
newDisassociateCustomDomainResponse
Int
pHttpStatus_
Text
pDNSTarget_
Text
pServiceArn_
CustomDomain
pCustomDomain_ =
DisassociateCustomDomainResponse' :: Int
-> Text -> Text -> CustomDomain -> DisassociateCustomDomainResponse
DisassociateCustomDomainResponse'
{ $sel:httpStatus:DisassociateCustomDomainResponse' :: Int
httpStatus =
Int
pHttpStatus_,
$sel:dNSTarget:DisassociateCustomDomainResponse' :: Text
dNSTarget = Text
pDNSTarget_,
$sel:serviceArn:DisassociateCustomDomainResponse' :: Text
serviceArn = Text
pServiceArn_,
$sel:customDomain:DisassociateCustomDomainResponse' :: CustomDomain
customDomain = CustomDomain
pCustomDomain_
}
disassociateCustomDomainResponse_httpStatus :: Lens.Lens' DisassociateCustomDomainResponse Prelude.Int
disassociateCustomDomainResponse_httpStatus :: (Int -> f Int)
-> DisassociateCustomDomainResponse
-> f DisassociateCustomDomainResponse
disassociateCustomDomainResponse_httpStatus = (DisassociateCustomDomainResponse -> Int)
-> (DisassociateCustomDomainResponse
-> Int -> DisassociateCustomDomainResponse)
-> Lens
DisassociateCustomDomainResponse
DisassociateCustomDomainResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateCustomDomainResponse' {Int
httpStatus :: Int
$sel:httpStatus:DisassociateCustomDomainResponse' :: DisassociateCustomDomainResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DisassociateCustomDomainResponse
s@DisassociateCustomDomainResponse' {} Int
a -> DisassociateCustomDomainResponse
s {$sel:httpStatus:DisassociateCustomDomainResponse' :: Int
httpStatus = Int
a} :: DisassociateCustomDomainResponse)
disassociateCustomDomainResponse_dNSTarget :: Lens.Lens' DisassociateCustomDomainResponse Prelude.Text
disassociateCustomDomainResponse_dNSTarget :: (Text -> f Text)
-> DisassociateCustomDomainResponse
-> f DisassociateCustomDomainResponse
disassociateCustomDomainResponse_dNSTarget = (DisassociateCustomDomainResponse -> Text)
-> (DisassociateCustomDomainResponse
-> Text -> DisassociateCustomDomainResponse)
-> Lens
DisassociateCustomDomainResponse
DisassociateCustomDomainResponse
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateCustomDomainResponse' {Text
dNSTarget :: Text
$sel:dNSTarget:DisassociateCustomDomainResponse' :: DisassociateCustomDomainResponse -> Text
dNSTarget} -> Text
dNSTarget) (\s :: DisassociateCustomDomainResponse
s@DisassociateCustomDomainResponse' {} Text
a -> DisassociateCustomDomainResponse
s {$sel:dNSTarget:DisassociateCustomDomainResponse' :: Text
dNSTarget = Text
a} :: DisassociateCustomDomainResponse)
disassociateCustomDomainResponse_serviceArn :: Lens.Lens' DisassociateCustomDomainResponse Prelude.Text
disassociateCustomDomainResponse_serviceArn :: (Text -> f Text)
-> DisassociateCustomDomainResponse
-> f DisassociateCustomDomainResponse
disassociateCustomDomainResponse_serviceArn = (DisassociateCustomDomainResponse -> Text)
-> (DisassociateCustomDomainResponse
-> Text -> DisassociateCustomDomainResponse)
-> Lens
DisassociateCustomDomainResponse
DisassociateCustomDomainResponse
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateCustomDomainResponse' {Text
serviceArn :: Text
$sel:serviceArn:DisassociateCustomDomainResponse' :: DisassociateCustomDomainResponse -> Text
serviceArn} -> Text
serviceArn) (\s :: DisassociateCustomDomainResponse
s@DisassociateCustomDomainResponse' {} Text
a -> DisassociateCustomDomainResponse
s {$sel:serviceArn:DisassociateCustomDomainResponse' :: Text
serviceArn = Text
a} :: DisassociateCustomDomainResponse)
disassociateCustomDomainResponse_customDomain :: Lens.Lens' DisassociateCustomDomainResponse CustomDomain
disassociateCustomDomainResponse_customDomain :: (CustomDomain -> f CustomDomain)
-> DisassociateCustomDomainResponse
-> f DisassociateCustomDomainResponse
disassociateCustomDomainResponse_customDomain = (DisassociateCustomDomainResponse -> CustomDomain)
-> (DisassociateCustomDomainResponse
-> CustomDomain -> DisassociateCustomDomainResponse)
-> Lens
DisassociateCustomDomainResponse
DisassociateCustomDomainResponse
CustomDomain
CustomDomain
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateCustomDomainResponse' {CustomDomain
customDomain :: CustomDomain
$sel:customDomain:DisassociateCustomDomainResponse' :: DisassociateCustomDomainResponse -> CustomDomain
customDomain} -> CustomDomain
customDomain) (\s :: DisassociateCustomDomainResponse
s@DisassociateCustomDomainResponse' {} CustomDomain
a -> DisassociateCustomDomainResponse
s {$sel:customDomain:DisassociateCustomDomainResponse' :: CustomDomain
customDomain = CustomDomain
a} :: DisassociateCustomDomainResponse)
instance
Prelude.NFData
DisassociateCustomDomainResponse