{-# 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.Route53Domains.AssociateDelegationSignerToDomain
(
AssociateDelegationSignerToDomain (..),
newAssociateDelegationSignerToDomain,
associateDelegationSignerToDomain_domainName,
associateDelegationSignerToDomain_signingAttributes,
AssociateDelegationSignerToDomainResponse (..),
newAssociateDelegationSignerToDomainResponse,
associateDelegationSignerToDomainResponse_operationId,
associateDelegationSignerToDomainResponse_httpStatus,
)
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.Route53Domains.Types
data AssociateDelegationSignerToDomain = AssociateDelegationSignerToDomain'
{
AssociateDelegationSignerToDomain -> Text
domainName :: Prelude.Text,
AssociateDelegationSignerToDomain -> DnssecSigningAttributes
signingAttributes :: DnssecSigningAttributes
}
deriving (AssociateDelegationSignerToDomain
-> AssociateDelegationSignerToDomain -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssociateDelegationSignerToDomain
-> AssociateDelegationSignerToDomain -> Bool
$c/= :: AssociateDelegationSignerToDomain
-> AssociateDelegationSignerToDomain -> Bool
== :: AssociateDelegationSignerToDomain
-> AssociateDelegationSignerToDomain -> Bool
$c== :: AssociateDelegationSignerToDomain
-> AssociateDelegationSignerToDomain -> Bool
Prelude.Eq, ReadPrec [AssociateDelegationSignerToDomain]
ReadPrec AssociateDelegationSignerToDomain
Int -> ReadS AssociateDelegationSignerToDomain
ReadS [AssociateDelegationSignerToDomain]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssociateDelegationSignerToDomain]
$creadListPrec :: ReadPrec [AssociateDelegationSignerToDomain]
readPrec :: ReadPrec AssociateDelegationSignerToDomain
$creadPrec :: ReadPrec AssociateDelegationSignerToDomain
readList :: ReadS [AssociateDelegationSignerToDomain]
$creadList :: ReadS [AssociateDelegationSignerToDomain]
readsPrec :: Int -> ReadS AssociateDelegationSignerToDomain
$creadsPrec :: Int -> ReadS AssociateDelegationSignerToDomain
Prelude.Read, Int -> AssociateDelegationSignerToDomain -> ShowS
[AssociateDelegationSignerToDomain] -> ShowS
AssociateDelegationSignerToDomain -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssociateDelegationSignerToDomain] -> ShowS
$cshowList :: [AssociateDelegationSignerToDomain] -> ShowS
show :: AssociateDelegationSignerToDomain -> String
$cshow :: AssociateDelegationSignerToDomain -> String
showsPrec :: Int -> AssociateDelegationSignerToDomain -> ShowS
$cshowsPrec :: Int -> AssociateDelegationSignerToDomain -> ShowS
Prelude.Show, forall x.
Rep AssociateDelegationSignerToDomain x
-> AssociateDelegationSignerToDomain
forall x.
AssociateDelegationSignerToDomain
-> Rep AssociateDelegationSignerToDomain x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AssociateDelegationSignerToDomain x
-> AssociateDelegationSignerToDomain
$cfrom :: forall x.
AssociateDelegationSignerToDomain
-> Rep AssociateDelegationSignerToDomain x
Prelude.Generic)
newAssociateDelegationSignerToDomain ::
Prelude.Text ->
DnssecSigningAttributes ->
AssociateDelegationSignerToDomain
newAssociateDelegationSignerToDomain :: Text
-> DnssecSigningAttributes -> AssociateDelegationSignerToDomain
newAssociateDelegationSignerToDomain
Text
pDomainName_
DnssecSigningAttributes
pSigningAttributes_ =
AssociateDelegationSignerToDomain'
{ $sel:domainName:AssociateDelegationSignerToDomain' :: Text
domainName =
Text
pDomainName_,
$sel:signingAttributes:AssociateDelegationSignerToDomain' :: DnssecSigningAttributes
signingAttributes = DnssecSigningAttributes
pSigningAttributes_
}
associateDelegationSignerToDomain_domainName :: Lens.Lens' AssociateDelegationSignerToDomain Prelude.Text
associateDelegationSignerToDomain_domainName :: Lens' AssociateDelegationSignerToDomain Text
associateDelegationSignerToDomain_domainName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateDelegationSignerToDomain' {Text
domainName :: Text
$sel:domainName:AssociateDelegationSignerToDomain' :: AssociateDelegationSignerToDomain -> Text
domainName} -> Text
domainName) (\s :: AssociateDelegationSignerToDomain
s@AssociateDelegationSignerToDomain' {} Text
a -> AssociateDelegationSignerToDomain
s {$sel:domainName:AssociateDelegationSignerToDomain' :: Text
domainName = Text
a} :: AssociateDelegationSignerToDomain)
associateDelegationSignerToDomain_signingAttributes :: Lens.Lens' AssociateDelegationSignerToDomain DnssecSigningAttributes
associateDelegationSignerToDomain_signingAttributes :: Lens' AssociateDelegationSignerToDomain DnssecSigningAttributes
associateDelegationSignerToDomain_signingAttributes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateDelegationSignerToDomain' {DnssecSigningAttributes
signingAttributes :: DnssecSigningAttributes
$sel:signingAttributes:AssociateDelegationSignerToDomain' :: AssociateDelegationSignerToDomain -> DnssecSigningAttributes
signingAttributes} -> DnssecSigningAttributes
signingAttributes) (\s :: AssociateDelegationSignerToDomain
s@AssociateDelegationSignerToDomain' {} DnssecSigningAttributes
a -> AssociateDelegationSignerToDomain
s {$sel:signingAttributes:AssociateDelegationSignerToDomain' :: DnssecSigningAttributes
signingAttributes = DnssecSigningAttributes
a} :: AssociateDelegationSignerToDomain)
instance
Core.AWSRequest
AssociateDelegationSignerToDomain
where
type
AWSResponse AssociateDelegationSignerToDomain =
AssociateDelegationSignerToDomainResponse
request :: (Service -> Service)
-> AssociateDelegationSignerToDomain
-> Request AssociateDelegationSignerToDomain
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 AssociateDelegationSignerToDomain
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse AssociateDelegationSignerToDomain)))
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 ->
Maybe Text -> Int -> AssociateDelegationSignerToDomainResponse
AssociateDelegationSignerToDomainResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"OperationId")
forall (f :: * -> *) a b. Applicative f => 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))
)
instance
Prelude.Hashable
AssociateDelegationSignerToDomain
where
hashWithSalt :: Int -> AssociateDelegationSignerToDomain -> Int
hashWithSalt
Int
_salt
AssociateDelegationSignerToDomain' {Text
DnssecSigningAttributes
signingAttributes :: DnssecSigningAttributes
domainName :: Text
$sel:signingAttributes:AssociateDelegationSignerToDomain' :: AssociateDelegationSignerToDomain -> DnssecSigningAttributes
$sel:domainName:AssociateDelegationSignerToDomain' :: AssociateDelegationSignerToDomain -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
domainName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` DnssecSigningAttributes
signingAttributes
instance
Prelude.NFData
AssociateDelegationSignerToDomain
where
rnf :: AssociateDelegationSignerToDomain -> ()
rnf AssociateDelegationSignerToDomain' {Text
DnssecSigningAttributes
signingAttributes :: DnssecSigningAttributes
domainName :: Text
$sel:signingAttributes:AssociateDelegationSignerToDomain' :: AssociateDelegationSignerToDomain -> DnssecSigningAttributes
$sel:domainName:AssociateDelegationSignerToDomain' :: AssociateDelegationSignerToDomain -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
domainName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf DnssecSigningAttributes
signingAttributes
instance
Data.ToHeaders
AssociateDelegationSignerToDomain
where
toHeaders :: AssociateDelegationSignerToDomain -> 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
"Route53Domains_v20140515.AssociateDelegationSignerToDomain" ::
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
AssociateDelegationSignerToDomain
where
toJSON :: AssociateDelegationSignerToDomain -> Value
toJSON AssociateDelegationSignerToDomain' {Text
DnssecSigningAttributes
signingAttributes :: DnssecSigningAttributes
domainName :: Text
$sel:signingAttributes:AssociateDelegationSignerToDomain' :: AssociateDelegationSignerToDomain -> DnssecSigningAttributes
$sel:domainName:AssociateDelegationSignerToDomain' :: AssociateDelegationSignerToDomain -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just (Key
"DomainName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
domainName),
forall a. a -> Maybe a
Prelude.Just
(Key
"SigningAttributes" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= DnssecSigningAttributes
signingAttributes)
]
)
instance
Data.ToPath
AssociateDelegationSignerToDomain
where
toPath :: AssociateDelegationSignerToDomain -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Data.ToQuery
AssociateDelegationSignerToDomain
where
toQuery :: AssociateDelegationSignerToDomain -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data AssociateDelegationSignerToDomainResponse = AssociateDelegationSignerToDomainResponse'
{
AssociateDelegationSignerToDomainResponse -> Maybe Text
operationId :: Prelude.Maybe Prelude.Text,
AssociateDelegationSignerToDomainResponse -> Int
httpStatus :: Prelude.Int
}
deriving (AssociateDelegationSignerToDomainResponse
-> AssociateDelegationSignerToDomainResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssociateDelegationSignerToDomainResponse
-> AssociateDelegationSignerToDomainResponse -> Bool
$c/= :: AssociateDelegationSignerToDomainResponse
-> AssociateDelegationSignerToDomainResponse -> Bool
== :: AssociateDelegationSignerToDomainResponse
-> AssociateDelegationSignerToDomainResponse -> Bool
$c== :: AssociateDelegationSignerToDomainResponse
-> AssociateDelegationSignerToDomainResponse -> Bool
Prelude.Eq, ReadPrec [AssociateDelegationSignerToDomainResponse]
ReadPrec AssociateDelegationSignerToDomainResponse
Int -> ReadS AssociateDelegationSignerToDomainResponse
ReadS [AssociateDelegationSignerToDomainResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssociateDelegationSignerToDomainResponse]
$creadListPrec :: ReadPrec [AssociateDelegationSignerToDomainResponse]
readPrec :: ReadPrec AssociateDelegationSignerToDomainResponse
$creadPrec :: ReadPrec AssociateDelegationSignerToDomainResponse
readList :: ReadS [AssociateDelegationSignerToDomainResponse]
$creadList :: ReadS [AssociateDelegationSignerToDomainResponse]
readsPrec :: Int -> ReadS AssociateDelegationSignerToDomainResponse
$creadsPrec :: Int -> ReadS AssociateDelegationSignerToDomainResponse
Prelude.Read, Int -> AssociateDelegationSignerToDomainResponse -> ShowS
[AssociateDelegationSignerToDomainResponse] -> ShowS
AssociateDelegationSignerToDomainResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssociateDelegationSignerToDomainResponse] -> ShowS
$cshowList :: [AssociateDelegationSignerToDomainResponse] -> ShowS
show :: AssociateDelegationSignerToDomainResponse -> String
$cshow :: AssociateDelegationSignerToDomainResponse -> String
showsPrec :: Int -> AssociateDelegationSignerToDomainResponse -> ShowS
$cshowsPrec :: Int -> AssociateDelegationSignerToDomainResponse -> ShowS
Prelude.Show, forall x.
Rep AssociateDelegationSignerToDomainResponse x
-> AssociateDelegationSignerToDomainResponse
forall x.
AssociateDelegationSignerToDomainResponse
-> Rep AssociateDelegationSignerToDomainResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AssociateDelegationSignerToDomainResponse x
-> AssociateDelegationSignerToDomainResponse
$cfrom :: forall x.
AssociateDelegationSignerToDomainResponse
-> Rep AssociateDelegationSignerToDomainResponse x
Prelude.Generic)
newAssociateDelegationSignerToDomainResponse ::
Prelude.Int ->
AssociateDelegationSignerToDomainResponse
newAssociateDelegationSignerToDomainResponse :: Int -> AssociateDelegationSignerToDomainResponse
newAssociateDelegationSignerToDomainResponse
Int
pHttpStatus_ =
AssociateDelegationSignerToDomainResponse'
{ $sel:operationId:AssociateDelegationSignerToDomainResponse' :: Maybe Text
operationId =
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:AssociateDelegationSignerToDomainResponse' :: Int
httpStatus = Int
pHttpStatus_
}
associateDelegationSignerToDomainResponse_operationId :: Lens.Lens' AssociateDelegationSignerToDomainResponse (Prelude.Maybe Prelude.Text)
associateDelegationSignerToDomainResponse_operationId :: Lens' AssociateDelegationSignerToDomainResponse (Maybe Text)
associateDelegationSignerToDomainResponse_operationId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateDelegationSignerToDomainResponse' {Maybe Text
operationId :: Maybe Text
$sel:operationId:AssociateDelegationSignerToDomainResponse' :: AssociateDelegationSignerToDomainResponse -> Maybe Text
operationId} -> Maybe Text
operationId) (\s :: AssociateDelegationSignerToDomainResponse
s@AssociateDelegationSignerToDomainResponse' {} Maybe Text
a -> AssociateDelegationSignerToDomainResponse
s {$sel:operationId:AssociateDelegationSignerToDomainResponse' :: Maybe Text
operationId = Maybe Text
a} :: AssociateDelegationSignerToDomainResponse)
associateDelegationSignerToDomainResponse_httpStatus :: Lens.Lens' AssociateDelegationSignerToDomainResponse Prelude.Int
associateDelegationSignerToDomainResponse_httpStatus :: Lens' AssociateDelegationSignerToDomainResponse Int
associateDelegationSignerToDomainResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateDelegationSignerToDomainResponse' {Int
httpStatus :: Int
$sel:httpStatus:AssociateDelegationSignerToDomainResponse' :: AssociateDelegationSignerToDomainResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: AssociateDelegationSignerToDomainResponse
s@AssociateDelegationSignerToDomainResponse' {} Int
a -> AssociateDelegationSignerToDomainResponse
s {$sel:httpStatus:AssociateDelegationSignerToDomainResponse' :: Int
httpStatus = Int
a} :: AssociateDelegationSignerToDomainResponse)
instance
Prelude.NFData
AssociateDelegationSignerToDomainResponse
where
rnf :: AssociateDelegationSignerToDomainResponse -> ()
rnf AssociateDelegationSignerToDomainResponse' {Int
Maybe Text
httpStatus :: Int
operationId :: Maybe Text
$sel:httpStatus:AssociateDelegationSignerToDomainResponse' :: AssociateDelegationSignerToDomainResponse -> Int
$sel:operationId:AssociateDelegationSignerToDomainResponse' :: AssociateDelegationSignerToDomainResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
operationId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus