{-# 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.Nimble.StartStudioSSOConfigurationRepair
(
StartStudioSSOConfigurationRepair (..),
newStartStudioSSOConfigurationRepair,
startStudioSSOConfigurationRepair_clientToken,
startStudioSSOConfigurationRepair_studioId,
StartStudioSSOConfigurationRepairResponse (..),
newStartStudioSSOConfigurationRepairResponse,
startStudioSSOConfigurationRepairResponse_studio,
startStudioSSOConfigurationRepairResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Nimble.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data StartStudioSSOConfigurationRepair = StartStudioSSOConfigurationRepair'
{
StartStudioSSOConfigurationRepair -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
StartStudioSSOConfigurationRepair -> Text
studioId :: Prelude.Text
}
deriving (StartStudioSSOConfigurationRepair
-> StartStudioSSOConfigurationRepair -> Bool
(StartStudioSSOConfigurationRepair
-> StartStudioSSOConfigurationRepair -> Bool)
-> (StartStudioSSOConfigurationRepair
-> StartStudioSSOConfigurationRepair -> Bool)
-> Eq StartStudioSSOConfigurationRepair
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartStudioSSOConfigurationRepair
-> StartStudioSSOConfigurationRepair -> Bool
$c/= :: StartStudioSSOConfigurationRepair
-> StartStudioSSOConfigurationRepair -> Bool
== :: StartStudioSSOConfigurationRepair
-> StartStudioSSOConfigurationRepair -> Bool
$c== :: StartStudioSSOConfigurationRepair
-> StartStudioSSOConfigurationRepair -> Bool
Prelude.Eq, ReadPrec [StartStudioSSOConfigurationRepair]
ReadPrec StartStudioSSOConfigurationRepair
Int -> ReadS StartStudioSSOConfigurationRepair
ReadS [StartStudioSSOConfigurationRepair]
(Int -> ReadS StartStudioSSOConfigurationRepair)
-> ReadS [StartStudioSSOConfigurationRepair]
-> ReadPrec StartStudioSSOConfigurationRepair
-> ReadPrec [StartStudioSSOConfigurationRepair]
-> Read StartStudioSSOConfigurationRepair
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartStudioSSOConfigurationRepair]
$creadListPrec :: ReadPrec [StartStudioSSOConfigurationRepair]
readPrec :: ReadPrec StartStudioSSOConfigurationRepair
$creadPrec :: ReadPrec StartStudioSSOConfigurationRepair
readList :: ReadS [StartStudioSSOConfigurationRepair]
$creadList :: ReadS [StartStudioSSOConfigurationRepair]
readsPrec :: Int -> ReadS StartStudioSSOConfigurationRepair
$creadsPrec :: Int -> ReadS StartStudioSSOConfigurationRepair
Prelude.Read, Int -> StartStudioSSOConfigurationRepair -> ShowS
[StartStudioSSOConfigurationRepair] -> ShowS
StartStudioSSOConfigurationRepair -> String
(Int -> StartStudioSSOConfigurationRepair -> ShowS)
-> (StartStudioSSOConfigurationRepair -> String)
-> ([StartStudioSSOConfigurationRepair] -> ShowS)
-> Show StartStudioSSOConfigurationRepair
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartStudioSSOConfigurationRepair] -> ShowS
$cshowList :: [StartStudioSSOConfigurationRepair] -> ShowS
show :: StartStudioSSOConfigurationRepair -> String
$cshow :: StartStudioSSOConfigurationRepair -> String
showsPrec :: Int -> StartStudioSSOConfigurationRepair -> ShowS
$cshowsPrec :: Int -> StartStudioSSOConfigurationRepair -> ShowS
Prelude.Show, (forall x.
StartStudioSSOConfigurationRepair
-> Rep StartStudioSSOConfigurationRepair x)
-> (forall x.
Rep StartStudioSSOConfigurationRepair x
-> StartStudioSSOConfigurationRepair)
-> Generic StartStudioSSOConfigurationRepair
forall x.
Rep StartStudioSSOConfigurationRepair x
-> StartStudioSSOConfigurationRepair
forall x.
StartStudioSSOConfigurationRepair
-> Rep StartStudioSSOConfigurationRepair x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartStudioSSOConfigurationRepair x
-> StartStudioSSOConfigurationRepair
$cfrom :: forall x.
StartStudioSSOConfigurationRepair
-> Rep StartStudioSSOConfigurationRepair x
Prelude.Generic)
newStartStudioSSOConfigurationRepair ::
Prelude.Text ->
StartStudioSSOConfigurationRepair
newStartStudioSSOConfigurationRepair :: Text -> StartStudioSSOConfigurationRepair
newStartStudioSSOConfigurationRepair Text
pStudioId_ =
StartStudioSSOConfigurationRepair' :: Maybe Text -> Text -> StartStudioSSOConfigurationRepair
StartStudioSSOConfigurationRepair'
{ $sel:clientToken:StartStudioSSOConfigurationRepair' :: Maybe Text
clientToken =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:studioId:StartStudioSSOConfigurationRepair' :: Text
studioId = Text
pStudioId_
}
startStudioSSOConfigurationRepair_clientToken :: Lens.Lens' StartStudioSSOConfigurationRepair (Prelude.Maybe Prelude.Text)
startStudioSSOConfigurationRepair_clientToken :: (Maybe Text -> f (Maybe Text))
-> StartStudioSSOConfigurationRepair
-> f StartStudioSSOConfigurationRepair
startStudioSSOConfigurationRepair_clientToken = (StartStudioSSOConfigurationRepair -> Maybe Text)
-> (StartStudioSSOConfigurationRepair
-> Maybe Text -> StartStudioSSOConfigurationRepair)
-> Lens
StartStudioSSOConfigurationRepair
StartStudioSSOConfigurationRepair
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartStudioSSOConfigurationRepair' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:StartStudioSSOConfigurationRepair' :: StartStudioSSOConfigurationRepair -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: StartStudioSSOConfigurationRepair
s@StartStudioSSOConfigurationRepair' {} Maybe Text
a -> StartStudioSSOConfigurationRepair
s {$sel:clientToken:StartStudioSSOConfigurationRepair' :: Maybe Text
clientToken = Maybe Text
a} :: StartStudioSSOConfigurationRepair)
startStudioSSOConfigurationRepair_studioId :: Lens.Lens' StartStudioSSOConfigurationRepair Prelude.Text
startStudioSSOConfigurationRepair_studioId :: (Text -> f Text)
-> StartStudioSSOConfigurationRepair
-> f StartStudioSSOConfigurationRepair
startStudioSSOConfigurationRepair_studioId = (StartStudioSSOConfigurationRepair -> Text)
-> (StartStudioSSOConfigurationRepair
-> Text -> StartStudioSSOConfigurationRepair)
-> Lens
StartStudioSSOConfigurationRepair
StartStudioSSOConfigurationRepair
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartStudioSSOConfigurationRepair' {Text
studioId :: Text
$sel:studioId:StartStudioSSOConfigurationRepair' :: StartStudioSSOConfigurationRepair -> Text
studioId} -> Text
studioId) (\s :: StartStudioSSOConfigurationRepair
s@StartStudioSSOConfigurationRepair' {} Text
a -> StartStudioSSOConfigurationRepair
s {$sel:studioId:StartStudioSSOConfigurationRepair' :: Text
studioId = Text
a} :: StartStudioSSOConfigurationRepair)
instance
Core.AWSRequest
StartStudioSSOConfigurationRepair
where
type
AWSResponse StartStudioSSOConfigurationRepair =
StartStudioSSOConfigurationRepairResponse
request :: StartStudioSSOConfigurationRepair
-> Request StartStudioSSOConfigurationRepair
request = Service
-> StartStudioSSOConfigurationRepair
-> Request StartStudioSSOConfigurationRepair
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
response :: Logger
-> Service
-> Proxy StartStudioSSOConfigurationRepair
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse StartStudioSSOConfigurationRepair)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse StartStudioSSOConfigurationRepair))
-> Logger
-> Service
-> Proxy StartStudioSSOConfigurationRepair
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse StartStudioSSOConfigurationRepair)))
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 Studio -> Int -> StartStudioSSOConfigurationRepairResponse
StartStudioSSOConfigurationRepairResponse'
(Maybe Studio -> Int -> StartStudioSSOConfigurationRepairResponse)
-> Either String (Maybe Studio)
-> Either String (Int -> StartStudioSSOConfigurationRepairResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Studio)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"studio")
Either String (Int -> StartStudioSSOConfigurationRepairResponse)
-> Either String Int
-> Either String StartStudioSSOConfigurationRepairResponse
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
StartStudioSSOConfigurationRepair
instance
Prelude.NFData
StartStudioSSOConfigurationRepair
instance
Core.ToHeaders
StartStudioSSOConfigurationRepair
where
toHeaders :: StartStudioSSOConfigurationRepair -> ResponseHeaders
toHeaders StartStudioSSOConfigurationRepair' {Maybe Text
Text
studioId :: Text
clientToken :: Maybe Text
$sel:studioId:StartStudioSSOConfigurationRepair' :: StartStudioSSOConfigurationRepair -> Text
$sel:clientToken:StartStudioSSOConfigurationRepair' :: StartStudioSSOConfigurationRepair -> Maybe Text
..} =
[ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Client-Token" HeaderName -> Maybe Text -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe Text
clientToken,
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
StartStudioSSOConfigurationRepair
where
toJSON :: StartStudioSSOConfigurationRepair -> Value
toJSON = Value -> StartStudioSSOConfigurationRepair -> Value
forall a b. a -> b -> a
Prelude.const (Object -> Value
Core.Object Object
forall a. Monoid a => a
Prelude.mempty)
instance
Core.ToPath
StartStudioSSOConfigurationRepair
where
toPath :: StartStudioSSOConfigurationRepair -> ByteString
toPath StartStudioSSOConfigurationRepair' {Maybe Text
Text
studioId :: Text
clientToken :: Maybe Text
$sel:studioId:StartStudioSSOConfigurationRepair' :: StartStudioSSOConfigurationRepair -> Text
$sel:clientToken:StartStudioSSOConfigurationRepair' :: StartStudioSSOConfigurationRepair -> Maybe Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/2020-08-01/studios/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
studioId,
ByteString
"/sso-configuration"
]
instance
Core.ToQuery
StartStudioSSOConfigurationRepair
where
toQuery :: StartStudioSSOConfigurationRepair -> QueryString
toQuery = QueryString -> StartStudioSSOConfigurationRepair -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data StartStudioSSOConfigurationRepairResponse = StartStudioSSOConfigurationRepairResponse'
{
StartStudioSSOConfigurationRepairResponse -> Maybe Studio
studio :: Prelude.Maybe Studio,
StartStudioSSOConfigurationRepairResponse -> Int
httpStatus :: Prelude.Int
}
deriving (StartStudioSSOConfigurationRepairResponse
-> StartStudioSSOConfigurationRepairResponse -> Bool
(StartStudioSSOConfigurationRepairResponse
-> StartStudioSSOConfigurationRepairResponse -> Bool)
-> (StartStudioSSOConfigurationRepairResponse
-> StartStudioSSOConfigurationRepairResponse -> Bool)
-> Eq StartStudioSSOConfigurationRepairResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartStudioSSOConfigurationRepairResponse
-> StartStudioSSOConfigurationRepairResponse -> Bool
$c/= :: StartStudioSSOConfigurationRepairResponse
-> StartStudioSSOConfigurationRepairResponse -> Bool
== :: StartStudioSSOConfigurationRepairResponse
-> StartStudioSSOConfigurationRepairResponse -> Bool
$c== :: StartStudioSSOConfigurationRepairResponse
-> StartStudioSSOConfigurationRepairResponse -> Bool
Prelude.Eq, ReadPrec [StartStudioSSOConfigurationRepairResponse]
ReadPrec StartStudioSSOConfigurationRepairResponse
Int -> ReadS StartStudioSSOConfigurationRepairResponse
ReadS [StartStudioSSOConfigurationRepairResponse]
(Int -> ReadS StartStudioSSOConfigurationRepairResponse)
-> ReadS [StartStudioSSOConfigurationRepairResponse]
-> ReadPrec StartStudioSSOConfigurationRepairResponse
-> ReadPrec [StartStudioSSOConfigurationRepairResponse]
-> Read StartStudioSSOConfigurationRepairResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartStudioSSOConfigurationRepairResponse]
$creadListPrec :: ReadPrec [StartStudioSSOConfigurationRepairResponse]
readPrec :: ReadPrec StartStudioSSOConfigurationRepairResponse
$creadPrec :: ReadPrec StartStudioSSOConfigurationRepairResponse
readList :: ReadS [StartStudioSSOConfigurationRepairResponse]
$creadList :: ReadS [StartStudioSSOConfigurationRepairResponse]
readsPrec :: Int -> ReadS StartStudioSSOConfigurationRepairResponse
$creadsPrec :: Int -> ReadS StartStudioSSOConfigurationRepairResponse
Prelude.Read, Int -> StartStudioSSOConfigurationRepairResponse -> ShowS
[StartStudioSSOConfigurationRepairResponse] -> ShowS
StartStudioSSOConfigurationRepairResponse -> String
(Int -> StartStudioSSOConfigurationRepairResponse -> ShowS)
-> (StartStudioSSOConfigurationRepairResponse -> String)
-> ([StartStudioSSOConfigurationRepairResponse] -> ShowS)
-> Show StartStudioSSOConfigurationRepairResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartStudioSSOConfigurationRepairResponse] -> ShowS
$cshowList :: [StartStudioSSOConfigurationRepairResponse] -> ShowS
show :: StartStudioSSOConfigurationRepairResponse -> String
$cshow :: StartStudioSSOConfigurationRepairResponse -> String
showsPrec :: Int -> StartStudioSSOConfigurationRepairResponse -> ShowS
$cshowsPrec :: Int -> StartStudioSSOConfigurationRepairResponse -> ShowS
Prelude.Show, (forall x.
StartStudioSSOConfigurationRepairResponse
-> Rep StartStudioSSOConfigurationRepairResponse x)
-> (forall x.
Rep StartStudioSSOConfigurationRepairResponse x
-> StartStudioSSOConfigurationRepairResponse)
-> Generic StartStudioSSOConfigurationRepairResponse
forall x.
Rep StartStudioSSOConfigurationRepairResponse x
-> StartStudioSSOConfigurationRepairResponse
forall x.
StartStudioSSOConfigurationRepairResponse
-> Rep StartStudioSSOConfigurationRepairResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartStudioSSOConfigurationRepairResponse x
-> StartStudioSSOConfigurationRepairResponse
$cfrom :: forall x.
StartStudioSSOConfigurationRepairResponse
-> Rep StartStudioSSOConfigurationRepairResponse x
Prelude.Generic)
newStartStudioSSOConfigurationRepairResponse ::
Prelude.Int ->
StartStudioSSOConfigurationRepairResponse
newStartStudioSSOConfigurationRepairResponse :: Int -> StartStudioSSOConfigurationRepairResponse
newStartStudioSSOConfigurationRepairResponse
Int
pHttpStatus_ =
StartStudioSSOConfigurationRepairResponse' :: Maybe Studio -> Int -> StartStudioSSOConfigurationRepairResponse
StartStudioSSOConfigurationRepairResponse'
{ $sel:studio:StartStudioSSOConfigurationRepairResponse' :: Maybe Studio
studio =
Maybe Studio
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:StartStudioSSOConfigurationRepairResponse' :: Int
httpStatus = Int
pHttpStatus_
}
startStudioSSOConfigurationRepairResponse_studio :: Lens.Lens' StartStudioSSOConfigurationRepairResponse (Prelude.Maybe Studio)
startStudioSSOConfigurationRepairResponse_studio :: (Maybe Studio -> f (Maybe Studio))
-> StartStudioSSOConfigurationRepairResponse
-> f StartStudioSSOConfigurationRepairResponse
startStudioSSOConfigurationRepairResponse_studio = (StartStudioSSOConfigurationRepairResponse -> Maybe Studio)
-> (StartStudioSSOConfigurationRepairResponse
-> Maybe Studio -> StartStudioSSOConfigurationRepairResponse)
-> Lens
StartStudioSSOConfigurationRepairResponse
StartStudioSSOConfigurationRepairResponse
(Maybe Studio)
(Maybe Studio)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartStudioSSOConfigurationRepairResponse' {Maybe Studio
studio :: Maybe Studio
$sel:studio:StartStudioSSOConfigurationRepairResponse' :: StartStudioSSOConfigurationRepairResponse -> Maybe Studio
studio} -> Maybe Studio
studio) (\s :: StartStudioSSOConfigurationRepairResponse
s@StartStudioSSOConfigurationRepairResponse' {} Maybe Studio
a -> StartStudioSSOConfigurationRepairResponse
s {$sel:studio:StartStudioSSOConfigurationRepairResponse' :: Maybe Studio
studio = Maybe Studio
a} :: StartStudioSSOConfigurationRepairResponse)
startStudioSSOConfigurationRepairResponse_httpStatus :: Lens.Lens' StartStudioSSOConfigurationRepairResponse Prelude.Int
startStudioSSOConfigurationRepairResponse_httpStatus :: (Int -> f Int)
-> StartStudioSSOConfigurationRepairResponse
-> f StartStudioSSOConfigurationRepairResponse
startStudioSSOConfigurationRepairResponse_httpStatus = (StartStudioSSOConfigurationRepairResponse -> Int)
-> (StartStudioSSOConfigurationRepairResponse
-> Int -> StartStudioSSOConfigurationRepairResponse)
-> Lens
StartStudioSSOConfigurationRepairResponse
StartStudioSSOConfigurationRepairResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartStudioSSOConfigurationRepairResponse' {Int
httpStatus :: Int
$sel:httpStatus:StartStudioSSOConfigurationRepairResponse' :: StartStudioSSOConfigurationRepairResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: StartStudioSSOConfigurationRepairResponse
s@StartStudioSSOConfigurationRepairResponse' {} Int
a -> StartStudioSSOConfigurationRepairResponse
s {$sel:httpStatus:StartStudioSSOConfigurationRepairResponse' :: Int
httpStatus = Int
a} :: StartStudioSSOConfigurationRepairResponse)
instance
Prelude.NFData
StartStudioSSOConfigurationRepairResponse