{-# 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.ServiceCatalog.EnableAWSOrganizationsAccess
(
EnableAWSOrganizationsAccess (..),
newEnableAWSOrganizationsAccess,
EnableAWSOrganizationsAccessResponse (..),
newEnableAWSOrganizationsAccessResponse,
enableAWSOrganizationsAccessResponse_httpStatus,
)
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.ServiceCatalog.Types
data EnableAWSOrganizationsAccess = EnableAWSOrganizationsAccess'
{
}
deriving (EnableAWSOrganizationsAccess
-> EnableAWSOrganizationsAccess -> Bool
(EnableAWSOrganizationsAccess
-> EnableAWSOrganizationsAccess -> Bool)
-> (EnableAWSOrganizationsAccess
-> EnableAWSOrganizationsAccess -> Bool)
-> Eq EnableAWSOrganizationsAccess
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EnableAWSOrganizationsAccess
-> EnableAWSOrganizationsAccess -> Bool
$c/= :: EnableAWSOrganizationsAccess
-> EnableAWSOrganizationsAccess -> Bool
== :: EnableAWSOrganizationsAccess
-> EnableAWSOrganizationsAccess -> Bool
$c== :: EnableAWSOrganizationsAccess
-> EnableAWSOrganizationsAccess -> Bool
Prelude.Eq, ReadPrec [EnableAWSOrganizationsAccess]
ReadPrec EnableAWSOrganizationsAccess
Int -> ReadS EnableAWSOrganizationsAccess
ReadS [EnableAWSOrganizationsAccess]
(Int -> ReadS EnableAWSOrganizationsAccess)
-> ReadS [EnableAWSOrganizationsAccess]
-> ReadPrec EnableAWSOrganizationsAccess
-> ReadPrec [EnableAWSOrganizationsAccess]
-> Read EnableAWSOrganizationsAccess
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EnableAWSOrganizationsAccess]
$creadListPrec :: ReadPrec [EnableAWSOrganizationsAccess]
readPrec :: ReadPrec EnableAWSOrganizationsAccess
$creadPrec :: ReadPrec EnableAWSOrganizationsAccess
readList :: ReadS [EnableAWSOrganizationsAccess]
$creadList :: ReadS [EnableAWSOrganizationsAccess]
readsPrec :: Int -> ReadS EnableAWSOrganizationsAccess
$creadsPrec :: Int -> ReadS EnableAWSOrganizationsAccess
Prelude.Read, Int -> EnableAWSOrganizationsAccess -> ShowS
[EnableAWSOrganizationsAccess] -> ShowS
EnableAWSOrganizationsAccess -> String
(Int -> EnableAWSOrganizationsAccess -> ShowS)
-> (EnableAWSOrganizationsAccess -> String)
-> ([EnableAWSOrganizationsAccess] -> ShowS)
-> Show EnableAWSOrganizationsAccess
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EnableAWSOrganizationsAccess] -> ShowS
$cshowList :: [EnableAWSOrganizationsAccess] -> ShowS
show :: EnableAWSOrganizationsAccess -> String
$cshow :: EnableAWSOrganizationsAccess -> String
showsPrec :: Int -> EnableAWSOrganizationsAccess -> ShowS
$cshowsPrec :: Int -> EnableAWSOrganizationsAccess -> ShowS
Prelude.Show, (forall x.
EnableAWSOrganizationsAccess -> Rep EnableAWSOrganizationsAccess x)
-> (forall x.
Rep EnableAWSOrganizationsAccess x -> EnableAWSOrganizationsAccess)
-> Generic EnableAWSOrganizationsAccess
forall x.
Rep EnableAWSOrganizationsAccess x -> EnableAWSOrganizationsAccess
forall x.
EnableAWSOrganizationsAccess -> Rep EnableAWSOrganizationsAccess x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep EnableAWSOrganizationsAccess x -> EnableAWSOrganizationsAccess
$cfrom :: forall x.
EnableAWSOrganizationsAccess -> Rep EnableAWSOrganizationsAccess x
Prelude.Generic)
newEnableAWSOrganizationsAccess ::
EnableAWSOrganizationsAccess
newEnableAWSOrganizationsAccess :: EnableAWSOrganizationsAccess
newEnableAWSOrganizationsAccess =
EnableAWSOrganizationsAccess
EnableAWSOrganizationsAccess'
instance Core.AWSRequest EnableAWSOrganizationsAccess where
type
AWSResponse EnableAWSOrganizationsAccess =
EnableAWSOrganizationsAccessResponse
request :: EnableAWSOrganizationsAccess
-> Request EnableAWSOrganizationsAccess
request = Service
-> EnableAWSOrganizationsAccess
-> Request EnableAWSOrganizationsAccess
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy EnableAWSOrganizationsAccess
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse EnableAWSOrganizationsAccess)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse EnableAWSOrganizationsAccess))
-> Logger
-> Service
-> Proxy EnableAWSOrganizationsAccess
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse EnableAWSOrganizationsAccess)))
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 -> EnableAWSOrganizationsAccessResponse
EnableAWSOrganizationsAccessResponse'
(Int -> EnableAWSOrganizationsAccessResponse)
-> Either String Int
-> Either String EnableAWSOrganizationsAccessResponse
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
EnableAWSOrganizationsAccess
instance Prelude.NFData EnableAWSOrganizationsAccess
instance Core.ToHeaders EnableAWSOrganizationsAccess where
toHeaders :: EnableAWSOrganizationsAccess -> ResponseHeaders
toHeaders =
ResponseHeaders -> EnableAWSOrganizationsAccess -> 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
"AWS242ServiceCatalogService.EnableAWSOrganizationsAccess" ::
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 EnableAWSOrganizationsAccess where
toJSON :: EnableAWSOrganizationsAccess -> Value
toJSON = Value -> EnableAWSOrganizationsAccess -> Value
forall a b. a -> b -> a
Prelude.const (Object -> Value
Core.Object Object
forall a. Monoid a => a
Prelude.mempty)
instance Core.ToPath EnableAWSOrganizationsAccess where
toPath :: EnableAWSOrganizationsAccess -> ByteString
toPath = ByteString -> EnableAWSOrganizationsAccess -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery EnableAWSOrganizationsAccess where
toQuery :: EnableAWSOrganizationsAccess -> QueryString
toQuery = QueryString -> EnableAWSOrganizationsAccess -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data EnableAWSOrganizationsAccessResponse = EnableAWSOrganizationsAccessResponse'
{
EnableAWSOrganizationsAccessResponse -> Int
httpStatus :: Prelude.Int
}
deriving (EnableAWSOrganizationsAccessResponse
-> EnableAWSOrganizationsAccessResponse -> Bool
(EnableAWSOrganizationsAccessResponse
-> EnableAWSOrganizationsAccessResponse -> Bool)
-> (EnableAWSOrganizationsAccessResponse
-> EnableAWSOrganizationsAccessResponse -> Bool)
-> Eq EnableAWSOrganizationsAccessResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EnableAWSOrganizationsAccessResponse
-> EnableAWSOrganizationsAccessResponse -> Bool
$c/= :: EnableAWSOrganizationsAccessResponse
-> EnableAWSOrganizationsAccessResponse -> Bool
== :: EnableAWSOrganizationsAccessResponse
-> EnableAWSOrganizationsAccessResponse -> Bool
$c== :: EnableAWSOrganizationsAccessResponse
-> EnableAWSOrganizationsAccessResponse -> Bool
Prelude.Eq, ReadPrec [EnableAWSOrganizationsAccessResponse]
ReadPrec EnableAWSOrganizationsAccessResponse
Int -> ReadS EnableAWSOrganizationsAccessResponse
ReadS [EnableAWSOrganizationsAccessResponse]
(Int -> ReadS EnableAWSOrganizationsAccessResponse)
-> ReadS [EnableAWSOrganizationsAccessResponse]
-> ReadPrec EnableAWSOrganizationsAccessResponse
-> ReadPrec [EnableAWSOrganizationsAccessResponse]
-> Read EnableAWSOrganizationsAccessResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [EnableAWSOrganizationsAccessResponse]
$creadListPrec :: ReadPrec [EnableAWSOrganizationsAccessResponse]
readPrec :: ReadPrec EnableAWSOrganizationsAccessResponse
$creadPrec :: ReadPrec EnableAWSOrganizationsAccessResponse
readList :: ReadS [EnableAWSOrganizationsAccessResponse]
$creadList :: ReadS [EnableAWSOrganizationsAccessResponse]
readsPrec :: Int -> ReadS EnableAWSOrganizationsAccessResponse
$creadsPrec :: Int -> ReadS EnableAWSOrganizationsAccessResponse
Prelude.Read, Int -> EnableAWSOrganizationsAccessResponse -> ShowS
[EnableAWSOrganizationsAccessResponse] -> ShowS
EnableAWSOrganizationsAccessResponse -> String
(Int -> EnableAWSOrganizationsAccessResponse -> ShowS)
-> (EnableAWSOrganizationsAccessResponse -> String)
-> ([EnableAWSOrganizationsAccessResponse] -> ShowS)
-> Show EnableAWSOrganizationsAccessResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [EnableAWSOrganizationsAccessResponse] -> ShowS
$cshowList :: [EnableAWSOrganizationsAccessResponse] -> ShowS
show :: EnableAWSOrganizationsAccessResponse -> String
$cshow :: EnableAWSOrganizationsAccessResponse -> String
showsPrec :: Int -> EnableAWSOrganizationsAccessResponse -> ShowS
$cshowsPrec :: Int -> EnableAWSOrganizationsAccessResponse -> ShowS
Prelude.Show, (forall x.
EnableAWSOrganizationsAccessResponse
-> Rep EnableAWSOrganizationsAccessResponse x)
-> (forall x.
Rep EnableAWSOrganizationsAccessResponse x
-> EnableAWSOrganizationsAccessResponse)
-> Generic EnableAWSOrganizationsAccessResponse
forall x.
Rep EnableAWSOrganizationsAccessResponse x
-> EnableAWSOrganizationsAccessResponse
forall x.
EnableAWSOrganizationsAccessResponse
-> Rep EnableAWSOrganizationsAccessResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep EnableAWSOrganizationsAccessResponse x
-> EnableAWSOrganizationsAccessResponse
$cfrom :: forall x.
EnableAWSOrganizationsAccessResponse
-> Rep EnableAWSOrganizationsAccessResponse x
Prelude.Generic)
newEnableAWSOrganizationsAccessResponse ::
Prelude.Int ->
EnableAWSOrganizationsAccessResponse
newEnableAWSOrganizationsAccessResponse :: Int -> EnableAWSOrganizationsAccessResponse
newEnableAWSOrganizationsAccessResponse Int
pHttpStatus_ =
EnableAWSOrganizationsAccessResponse' :: Int -> EnableAWSOrganizationsAccessResponse
EnableAWSOrganizationsAccessResponse'
{ $sel:httpStatus:EnableAWSOrganizationsAccessResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
enableAWSOrganizationsAccessResponse_httpStatus :: Lens.Lens' EnableAWSOrganizationsAccessResponse Prelude.Int
enableAWSOrganizationsAccessResponse_httpStatus :: (Int -> f Int)
-> EnableAWSOrganizationsAccessResponse
-> f EnableAWSOrganizationsAccessResponse
enableAWSOrganizationsAccessResponse_httpStatus = (EnableAWSOrganizationsAccessResponse -> Int)
-> (EnableAWSOrganizationsAccessResponse
-> Int -> EnableAWSOrganizationsAccessResponse)
-> Lens
EnableAWSOrganizationsAccessResponse
EnableAWSOrganizationsAccessResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\EnableAWSOrganizationsAccessResponse' {Int
httpStatus :: Int
$sel:httpStatus:EnableAWSOrganizationsAccessResponse' :: EnableAWSOrganizationsAccessResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: EnableAWSOrganizationsAccessResponse
s@EnableAWSOrganizationsAccessResponse' {} Int
a -> EnableAWSOrganizationsAccessResponse
s {$sel:httpStatus:EnableAWSOrganizationsAccessResponse' :: Int
httpStatus = Int
a} :: EnableAWSOrganizationsAccessResponse)
instance
Prelude.NFData
EnableAWSOrganizationsAccessResponse