{-# 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.Discovery.AssociateConfigurationItemsToApplication
(
AssociateConfigurationItemsToApplication (..),
newAssociateConfigurationItemsToApplication,
associateConfigurationItemsToApplication_applicationConfigurationId,
associateConfigurationItemsToApplication_configurationIds,
AssociateConfigurationItemsToApplicationResponse (..),
newAssociateConfigurationItemsToApplicationResponse,
associateConfigurationItemsToApplicationResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.Discovery.Types
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 AssociateConfigurationItemsToApplication = AssociateConfigurationItemsToApplication'
{
AssociateConfigurationItemsToApplication -> Text
applicationConfigurationId :: Prelude.Text,
AssociateConfigurationItemsToApplication -> [Text]
configurationIds :: [Prelude.Text]
}
deriving (AssociateConfigurationItemsToApplication
-> AssociateConfigurationItemsToApplication -> Bool
(AssociateConfigurationItemsToApplication
-> AssociateConfigurationItemsToApplication -> Bool)
-> (AssociateConfigurationItemsToApplication
-> AssociateConfigurationItemsToApplication -> Bool)
-> Eq AssociateConfigurationItemsToApplication
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssociateConfigurationItemsToApplication
-> AssociateConfigurationItemsToApplication -> Bool
$c/= :: AssociateConfigurationItemsToApplication
-> AssociateConfigurationItemsToApplication -> Bool
== :: AssociateConfigurationItemsToApplication
-> AssociateConfigurationItemsToApplication -> Bool
$c== :: AssociateConfigurationItemsToApplication
-> AssociateConfigurationItemsToApplication -> Bool
Prelude.Eq, ReadPrec [AssociateConfigurationItemsToApplication]
ReadPrec AssociateConfigurationItemsToApplication
Int -> ReadS AssociateConfigurationItemsToApplication
ReadS [AssociateConfigurationItemsToApplication]
(Int -> ReadS AssociateConfigurationItemsToApplication)
-> ReadS [AssociateConfigurationItemsToApplication]
-> ReadPrec AssociateConfigurationItemsToApplication
-> ReadPrec [AssociateConfigurationItemsToApplication]
-> Read AssociateConfigurationItemsToApplication
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssociateConfigurationItemsToApplication]
$creadListPrec :: ReadPrec [AssociateConfigurationItemsToApplication]
readPrec :: ReadPrec AssociateConfigurationItemsToApplication
$creadPrec :: ReadPrec AssociateConfigurationItemsToApplication
readList :: ReadS [AssociateConfigurationItemsToApplication]
$creadList :: ReadS [AssociateConfigurationItemsToApplication]
readsPrec :: Int -> ReadS AssociateConfigurationItemsToApplication
$creadsPrec :: Int -> ReadS AssociateConfigurationItemsToApplication
Prelude.Read, Int -> AssociateConfigurationItemsToApplication -> ShowS
[AssociateConfigurationItemsToApplication] -> ShowS
AssociateConfigurationItemsToApplication -> String
(Int -> AssociateConfigurationItemsToApplication -> ShowS)
-> (AssociateConfigurationItemsToApplication -> String)
-> ([AssociateConfigurationItemsToApplication] -> ShowS)
-> Show AssociateConfigurationItemsToApplication
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssociateConfigurationItemsToApplication] -> ShowS
$cshowList :: [AssociateConfigurationItemsToApplication] -> ShowS
show :: AssociateConfigurationItemsToApplication -> String
$cshow :: AssociateConfigurationItemsToApplication -> String
showsPrec :: Int -> AssociateConfigurationItemsToApplication -> ShowS
$cshowsPrec :: Int -> AssociateConfigurationItemsToApplication -> ShowS
Prelude.Show, (forall x.
AssociateConfigurationItemsToApplication
-> Rep AssociateConfigurationItemsToApplication x)
-> (forall x.
Rep AssociateConfigurationItemsToApplication x
-> AssociateConfigurationItemsToApplication)
-> Generic AssociateConfigurationItemsToApplication
forall x.
Rep AssociateConfigurationItemsToApplication x
-> AssociateConfigurationItemsToApplication
forall x.
AssociateConfigurationItemsToApplication
-> Rep AssociateConfigurationItemsToApplication x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AssociateConfigurationItemsToApplication x
-> AssociateConfigurationItemsToApplication
$cfrom :: forall x.
AssociateConfigurationItemsToApplication
-> Rep AssociateConfigurationItemsToApplication x
Prelude.Generic)
newAssociateConfigurationItemsToApplication ::
Prelude.Text ->
AssociateConfigurationItemsToApplication
newAssociateConfigurationItemsToApplication :: Text -> AssociateConfigurationItemsToApplication
newAssociateConfigurationItemsToApplication
Text
pApplicationConfigurationId_ =
AssociateConfigurationItemsToApplication' :: Text -> [Text] -> AssociateConfigurationItemsToApplication
AssociateConfigurationItemsToApplication'
{ $sel:applicationConfigurationId:AssociateConfigurationItemsToApplication' :: Text
applicationConfigurationId =
Text
pApplicationConfigurationId_,
$sel:configurationIds:AssociateConfigurationItemsToApplication' :: [Text]
configurationIds = [Text]
forall a. Monoid a => a
Prelude.mempty
}
associateConfigurationItemsToApplication_applicationConfigurationId :: Lens.Lens' AssociateConfigurationItemsToApplication Prelude.Text
associateConfigurationItemsToApplication_applicationConfigurationId :: (Text -> f Text)
-> AssociateConfigurationItemsToApplication
-> f AssociateConfigurationItemsToApplication
associateConfigurationItemsToApplication_applicationConfigurationId = (AssociateConfigurationItemsToApplication -> Text)
-> (AssociateConfigurationItemsToApplication
-> Text -> AssociateConfigurationItemsToApplication)
-> Lens
AssociateConfigurationItemsToApplication
AssociateConfigurationItemsToApplication
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateConfigurationItemsToApplication' {Text
applicationConfigurationId :: Text
$sel:applicationConfigurationId:AssociateConfigurationItemsToApplication' :: AssociateConfigurationItemsToApplication -> Text
applicationConfigurationId} -> Text
applicationConfigurationId) (\s :: AssociateConfigurationItemsToApplication
s@AssociateConfigurationItemsToApplication' {} Text
a -> AssociateConfigurationItemsToApplication
s {$sel:applicationConfigurationId:AssociateConfigurationItemsToApplication' :: Text
applicationConfigurationId = Text
a} :: AssociateConfigurationItemsToApplication)
associateConfigurationItemsToApplication_configurationIds :: Lens.Lens' AssociateConfigurationItemsToApplication [Prelude.Text]
associateConfigurationItemsToApplication_configurationIds :: ([Text] -> f [Text])
-> AssociateConfigurationItemsToApplication
-> f AssociateConfigurationItemsToApplication
associateConfigurationItemsToApplication_configurationIds = (AssociateConfigurationItemsToApplication -> [Text])
-> (AssociateConfigurationItemsToApplication
-> [Text] -> AssociateConfigurationItemsToApplication)
-> Lens
AssociateConfigurationItemsToApplication
AssociateConfigurationItemsToApplication
[Text]
[Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateConfigurationItemsToApplication' {[Text]
configurationIds :: [Text]
$sel:configurationIds:AssociateConfigurationItemsToApplication' :: AssociateConfigurationItemsToApplication -> [Text]
configurationIds} -> [Text]
configurationIds) (\s :: AssociateConfigurationItemsToApplication
s@AssociateConfigurationItemsToApplication' {} [Text]
a -> AssociateConfigurationItemsToApplication
s {$sel:configurationIds:AssociateConfigurationItemsToApplication' :: [Text]
configurationIds = [Text]
a} :: AssociateConfigurationItemsToApplication) (([Text] -> f [Text])
-> AssociateConfigurationItemsToApplication
-> f AssociateConfigurationItemsToApplication)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> AssociateConfigurationItemsToApplication
-> f AssociateConfigurationItemsToApplication
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance
Core.AWSRequest
AssociateConfigurationItemsToApplication
where
type
AWSResponse
AssociateConfigurationItemsToApplication =
AssociateConfigurationItemsToApplicationResponse
request :: AssociateConfigurationItemsToApplication
-> Request AssociateConfigurationItemsToApplication
request = Service
-> AssociateConfigurationItemsToApplication
-> Request AssociateConfigurationItemsToApplication
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy AssociateConfigurationItemsToApplication
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse AssociateConfigurationItemsToApplication)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either
String (AWSResponse AssociateConfigurationItemsToApplication))
-> Logger
-> Service
-> Proxy AssociateConfigurationItemsToApplication
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse
(AWSResponse AssociateConfigurationItemsToApplication)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> AssociateConfigurationItemsToApplicationResponse
AssociateConfigurationItemsToApplicationResponse'
(Int -> AssociateConfigurationItemsToApplicationResponse)
-> Either String Int
-> Either String AssociateConfigurationItemsToApplicationResponse
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))
)
instance
Prelude.Hashable
AssociateConfigurationItemsToApplication
instance
Prelude.NFData
AssociateConfigurationItemsToApplication
instance
Core.ToHeaders
AssociateConfigurationItemsToApplication
where
toHeaders :: AssociateConfigurationItemsToApplication -> ResponseHeaders
toHeaders =
ResponseHeaders
-> AssociateConfigurationItemsToApplication -> 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
"AWSPoseidonService_V2015_11_01.AssociateConfigurationItemsToApplication" ::
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
AssociateConfigurationItemsToApplication
where
toJSON :: AssociateConfigurationItemsToApplication -> Value
toJSON AssociateConfigurationItemsToApplication' {[Text]
Text
configurationIds :: [Text]
applicationConfigurationId :: Text
$sel:configurationIds:AssociateConfigurationItemsToApplication' :: AssociateConfigurationItemsToApplication -> [Text]
$sel:applicationConfigurationId:AssociateConfigurationItemsToApplication' :: AssociateConfigurationItemsToApplication -> 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
"applicationConfigurationId"
Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
applicationConfigurationId
),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"configurationIds" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [Text]
configurationIds)
]
)
instance
Core.ToPath
AssociateConfigurationItemsToApplication
where
toPath :: AssociateConfigurationItemsToApplication -> ByteString
toPath = ByteString
-> AssociateConfigurationItemsToApplication -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Core.ToQuery
AssociateConfigurationItemsToApplication
where
toQuery :: AssociateConfigurationItemsToApplication -> QueryString
toQuery = QueryString
-> AssociateConfigurationItemsToApplication -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data AssociateConfigurationItemsToApplicationResponse = AssociateConfigurationItemsToApplicationResponse'
{
AssociateConfigurationItemsToApplicationResponse -> Int
httpStatus :: Prelude.Int
}
deriving (AssociateConfigurationItemsToApplicationResponse
-> AssociateConfigurationItemsToApplicationResponse -> Bool
(AssociateConfigurationItemsToApplicationResponse
-> AssociateConfigurationItemsToApplicationResponse -> Bool)
-> (AssociateConfigurationItemsToApplicationResponse
-> AssociateConfigurationItemsToApplicationResponse -> Bool)
-> Eq AssociateConfigurationItemsToApplicationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssociateConfigurationItemsToApplicationResponse
-> AssociateConfigurationItemsToApplicationResponse -> Bool
$c/= :: AssociateConfigurationItemsToApplicationResponse
-> AssociateConfigurationItemsToApplicationResponse -> Bool
== :: AssociateConfigurationItemsToApplicationResponse
-> AssociateConfigurationItemsToApplicationResponse -> Bool
$c== :: AssociateConfigurationItemsToApplicationResponse
-> AssociateConfigurationItemsToApplicationResponse -> Bool
Prelude.Eq, ReadPrec [AssociateConfigurationItemsToApplicationResponse]
ReadPrec AssociateConfigurationItemsToApplicationResponse
Int -> ReadS AssociateConfigurationItemsToApplicationResponse
ReadS [AssociateConfigurationItemsToApplicationResponse]
(Int -> ReadS AssociateConfigurationItemsToApplicationResponse)
-> ReadS [AssociateConfigurationItemsToApplicationResponse]
-> ReadPrec AssociateConfigurationItemsToApplicationResponse
-> ReadPrec [AssociateConfigurationItemsToApplicationResponse]
-> Read AssociateConfigurationItemsToApplicationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssociateConfigurationItemsToApplicationResponse]
$creadListPrec :: ReadPrec [AssociateConfigurationItemsToApplicationResponse]
readPrec :: ReadPrec AssociateConfigurationItemsToApplicationResponse
$creadPrec :: ReadPrec AssociateConfigurationItemsToApplicationResponse
readList :: ReadS [AssociateConfigurationItemsToApplicationResponse]
$creadList :: ReadS [AssociateConfigurationItemsToApplicationResponse]
readsPrec :: Int -> ReadS AssociateConfigurationItemsToApplicationResponse
$creadsPrec :: Int -> ReadS AssociateConfigurationItemsToApplicationResponse
Prelude.Read, Int -> AssociateConfigurationItemsToApplicationResponse -> ShowS
[AssociateConfigurationItemsToApplicationResponse] -> ShowS
AssociateConfigurationItemsToApplicationResponse -> String
(Int -> AssociateConfigurationItemsToApplicationResponse -> ShowS)
-> (AssociateConfigurationItemsToApplicationResponse -> String)
-> ([AssociateConfigurationItemsToApplicationResponse] -> ShowS)
-> Show AssociateConfigurationItemsToApplicationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssociateConfigurationItemsToApplicationResponse] -> ShowS
$cshowList :: [AssociateConfigurationItemsToApplicationResponse] -> ShowS
show :: AssociateConfigurationItemsToApplicationResponse -> String
$cshow :: AssociateConfigurationItemsToApplicationResponse -> String
showsPrec :: Int -> AssociateConfigurationItemsToApplicationResponse -> ShowS
$cshowsPrec :: Int -> AssociateConfigurationItemsToApplicationResponse -> ShowS
Prelude.Show, (forall x.
AssociateConfigurationItemsToApplicationResponse
-> Rep AssociateConfigurationItemsToApplicationResponse x)
-> (forall x.
Rep AssociateConfigurationItemsToApplicationResponse x
-> AssociateConfigurationItemsToApplicationResponse)
-> Generic AssociateConfigurationItemsToApplicationResponse
forall x.
Rep AssociateConfigurationItemsToApplicationResponse x
-> AssociateConfigurationItemsToApplicationResponse
forall x.
AssociateConfigurationItemsToApplicationResponse
-> Rep AssociateConfigurationItemsToApplicationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AssociateConfigurationItemsToApplicationResponse x
-> AssociateConfigurationItemsToApplicationResponse
$cfrom :: forall x.
AssociateConfigurationItemsToApplicationResponse
-> Rep AssociateConfigurationItemsToApplicationResponse x
Prelude.Generic)
newAssociateConfigurationItemsToApplicationResponse ::
Prelude.Int ->
AssociateConfigurationItemsToApplicationResponse
newAssociateConfigurationItemsToApplicationResponse :: Int -> AssociateConfigurationItemsToApplicationResponse
newAssociateConfigurationItemsToApplicationResponse
Int
pHttpStatus_ =
AssociateConfigurationItemsToApplicationResponse' :: Int -> AssociateConfigurationItemsToApplicationResponse
AssociateConfigurationItemsToApplicationResponse'
{ $sel:httpStatus:AssociateConfigurationItemsToApplicationResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
associateConfigurationItemsToApplicationResponse_httpStatus :: Lens.Lens' AssociateConfigurationItemsToApplicationResponse Prelude.Int
associateConfigurationItemsToApplicationResponse_httpStatus :: (Int -> f Int)
-> AssociateConfigurationItemsToApplicationResponse
-> f AssociateConfigurationItemsToApplicationResponse
associateConfigurationItemsToApplicationResponse_httpStatus = (AssociateConfigurationItemsToApplicationResponse -> Int)
-> (AssociateConfigurationItemsToApplicationResponse
-> Int -> AssociateConfigurationItemsToApplicationResponse)
-> Lens
AssociateConfigurationItemsToApplicationResponse
AssociateConfigurationItemsToApplicationResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateConfigurationItemsToApplicationResponse' {Int
httpStatus :: Int
$sel:httpStatus:AssociateConfigurationItemsToApplicationResponse' :: AssociateConfigurationItemsToApplicationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: AssociateConfigurationItemsToApplicationResponse
s@AssociateConfigurationItemsToApplicationResponse' {} Int
a -> AssociateConfigurationItemsToApplicationResponse
s {$sel:httpStatus:AssociateConfigurationItemsToApplicationResponse' :: Int
httpStatus = Int
a} :: AssociateConfigurationItemsToApplicationResponse)
instance
Prelude.NFData
AssociateConfigurationItemsToApplicationResponse