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