{-# 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.MediaLive.StartInputDeviceMaintenanceWindow
(
StartInputDeviceMaintenanceWindow (..),
newStartInputDeviceMaintenanceWindow,
startInputDeviceMaintenanceWindow_inputDeviceId,
StartInputDeviceMaintenanceWindowResponse (..),
newStartInputDeviceMaintenanceWindowResponse,
startInputDeviceMaintenanceWindowResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MediaLive.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data StartInputDeviceMaintenanceWindow = StartInputDeviceMaintenanceWindow'
{
StartInputDeviceMaintenanceWindow -> Text
inputDeviceId :: Prelude.Text
}
deriving (StartInputDeviceMaintenanceWindow
-> StartInputDeviceMaintenanceWindow -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartInputDeviceMaintenanceWindow
-> StartInputDeviceMaintenanceWindow -> Bool
$c/= :: StartInputDeviceMaintenanceWindow
-> StartInputDeviceMaintenanceWindow -> Bool
== :: StartInputDeviceMaintenanceWindow
-> StartInputDeviceMaintenanceWindow -> Bool
$c== :: StartInputDeviceMaintenanceWindow
-> StartInputDeviceMaintenanceWindow -> Bool
Prelude.Eq, ReadPrec [StartInputDeviceMaintenanceWindow]
ReadPrec StartInputDeviceMaintenanceWindow
Int -> ReadS StartInputDeviceMaintenanceWindow
ReadS [StartInputDeviceMaintenanceWindow]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartInputDeviceMaintenanceWindow]
$creadListPrec :: ReadPrec [StartInputDeviceMaintenanceWindow]
readPrec :: ReadPrec StartInputDeviceMaintenanceWindow
$creadPrec :: ReadPrec StartInputDeviceMaintenanceWindow
readList :: ReadS [StartInputDeviceMaintenanceWindow]
$creadList :: ReadS [StartInputDeviceMaintenanceWindow]
readsPrec :: Int -> ReadS StartInputDeviceMaintenanceWindow
$creadsPrec :: Int -> ReadS StartInputDeviceMaintenanceWindow
Prelude.Read, Int -> StartInputDeviceMaintenanceWindow -> ShowS
[StartInputDeviceMaintenanceWindow] -> ShowS
StartInputDeviceMaintenanceWindow -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartInputDeviceMaintenanceWindow] -> ShowS
$cshowList :: [StartInputDeviceMaintenanceWindow] -> ShowS
show :: StartInputDeviceMaintenanceWindow -> String
$cshow :: StartInputDeviceMaintenanceWindow -> String
showsPrec :: Int -> StartInputDeviceMaintenanceWindow -> ShowS
$cshowsPrec :: Int -> StartInputDeviceMaintenanceWindow -> ShowS
Prelude.Show, forall x.
Rep StartInputDeviceMaintenanceWindow x
-> StartInputDeviceMaintenanceWindow
forall x.
StartInputDeviceMaintenanceWindow
-> Rep StartInputDeviceMaintenanceWindow x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartInputDeviceMaintenanceWindow x
-> StartInputDeviceMaintenanceWindow
$cfrom :: forall x.
StartInputDeviceMaintenanceWindow
-> Rep StartInputDeviceMaintenanceWindow x
Prelude.Generic)
newStartInputDeviceMaintenanceWindow ::
Prelude.Text ->
StartInputDeviceMaintenanceWindow
newStartInputDeviceMaintenanceWindow :: Text -> StartInputDeviceMaintenanceWindow
newStartInputDeviceMaintenanceWindow Text
pInputDeviceId_ =
StartInputDeviceMaintenanceWindow'
{ $sel:inputDeviceId:StartInputDeviceMaintenanceWindow' :: Text
inputDeviceId =
Text
pInputDeviceId_
}
startInputDeviceMaintenanceWindow_inputDeviceId :: Lens.Lens' StartInputDeviceMaintenanceWindow Prelude.Text
startInputDeviceMaintenanceWindow_inputDeviceId :: Lens' StartInputDeviceMaintenanceWindow Text
startInputDeviceMaintenanceWindow_inputDeviceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartInputDeviceMaintenanceWindow' {Text
inputDeviceId :: Text
$sel:inputDeviceId:StartInputDeviceMaintenanceWindow' :: StartInputDeviceMaintenanceWindow -> Text
inputDeviceId} -> Text
inputDeviceId) (\s :: StartInputDeviceMaintenanceWindow
s@StartInputDeviceMaintenanceWindow' {} Text
a -> StartInputDeviceMaintenanceWindow
s {$sel:inputDeviceId:StartInputDeviceMaintenanceWindow' :: Text
inputDeviceId = Text
a} :: StartInputDeviceMaintenanceWindow)
instance
Core.AWSRequest
StartInputDeviceMaintenanceWindow
where
type
AWSResponse StartInputDeviceMaintenanceWindow =
StartInputDeviceMaintenanceWindowResponse
request :: (Service -> Service)
-> StartInputDeviceMaintenanceWindow
-> Request StartInputDeviceMaintenanceWindow
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 StartInputDeviceMaintenanceWindow
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse StartInputDeviceMaintenanceWindow)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> StartInputDeviceMaintenanceWindowResponse
StartInputDeviceMaintenanceWindowResponse'
forall (f :: * -> *) a b. Functor 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
StartInputDeviceMaintenanceWindow
where
hashWithSalt :: Int -> StartInputDeviceMaintenanceWindow -> Int
hashWithSalt
Int
_salt
StartInputDeviceMaintenanceWindow' {Text
inputDeviceId :: Text
$sel:inputDeviceId:StartInputDeviceMaintenanceWindow' :: StartInputDeviceMaintenanceWindow -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
inputDeviceId
instance
Prelude.NFData
StartInputDeviceMaintenanceWindow
where
rnf :: StartInputDeviceMaintenanceWindow -> ()
rnf StartInputDeviceMaintenanceWindow' {Text
inputDeviceId :: Text
$sel:inputDeviceId:StartInputDeviceMaintenanceWindow' :: StartInputDeviceMaintenanceWindow -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
inputDeviceId
instance
Data.ToHeaders
StartInputDeviceMaintenanceWindow
where
toHeaders :: StartInputDeviceMaintenanceWindow -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance
Data.ToJSON
StartInputDeviceMaintenanceWindow
where
toJSON :: StartInputDeviceMaintenanceWindow -> Value
toJSON = forall a b. a -> b -> a
Prelude.const (Object -> Value
Data.Object forall a. Monoid a => a
Prelude.mempty)
instance
Data.ToPath
StartInputDeviceMaintenanceWindow
where
toPath :: StartInputDeviceMaintenanceWindow -> ByteString
toPath StartInputDeviceMaintenanceWindow' {Text
inputDeviceId :: Text
$sel:inputDeviceId:StartInputDeviceMaintenanceWindow' :: StartInputDeviceMaintenanceWindow -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/prod/inputDevices/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
inputDeviceId,
ByteString
"/startInputDeviceMaintenanceWindow"
]
instance
Data.ToQuery
StartInputDeviceMaintenanceWindow
where
toQuery :: StartInputDeviceMaintenanceWindow -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data StartInputDeviceMaintenanceWindowResponse = StartInputDeviceMaintenanceWindowResponse'
{
StartInputDeviceMaintenanceWindowResponse -> Int
httpStatus :: Prelude.Int
}
deriving (StartInputDeviceMaintenanceWindowResponse
-> StartInputDeviceMaintenanceWindowResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartInputDeviceMaintenanceWindowResponse
-> StartInputDeviceMaintenanceWindowResponse -> Bool
$c/= :: StartInputDeviceMaintenanceWindowResponse
-> StartInputDeviceMaintenanceWindowResponse -> Bool
== :: StartInputDeviceMaintenanceWindowResponse
-> StartInputDeviceMaintenanceWindowResponse -> Bool
$c== :: StartInputDeviceMaintenanceWindowResponse
-> StartInputDeviceMaintenanceWindowResponse -> Bool
Prelude.Eq, ReadPrec [StartInputDeviceMaintenanceWindowResponse]
ReadPrec StartInputDeviceMaintenanceWindowResponse
Int -> ReadS StartInputDeviceMaintenanceWindowResponse
ReadS [StartInputDeviceMaintenanceWindowResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartInputDeviceMaintenanceWindowResponse]
$creadListPrec :: ReadPrec [StartInputDeviceMaintenanceWindowResponse]
readPrec :: ReadPrec StartInputDeviceMaintenanceWindowResponse
$creadPrec :: ReadPrec StartInputDeviceMaintenanceWindowResponse
readList :: ReadS [StartInputDeviceMaintenanceWindowResponse]
$creadList :: ReadS [StartInputDeviceMaintenanceWindowResponse]
readsPrec :: Int -> ReadS StartInputDeviceMaintenanceWindowResponse
$creadsPrec :: Int -> ReadS StartInputDeviceMaintenanceWindowResponse
Prelude.Read, Int -> StartInputDeviceMaintenanceWindowResponse -> ShowS
[StartInputDeviceMaintenanceWindowResponse] -> ShowS
StartInputDeviceMaintenanceWindowResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartInputDeviceMaintenanceWindowResponse] -> ShowS
$cshowList :: [StartInputDeviceMaintenanceWindowResponse] -> ShowS
show :: StartInputDeviceMaintenanceWindowResponse -> String
$cshow :: StartInputDeviceMaintenanceWindowResponse -> String
showsPrec :: Int -> StartInputDeviceMaintenanceWindowResponse -> ShowS
$cshowsPrec :: Int -> StartInputDeviceMaintenanceWindowResponse -> ShowS
Prelude.Show, forall x.
Rep StartInputDeviceMaintenanceWindowResponse x
-> StartInputDeviceMaintenanceWindowResponse
forall x.
StartInputDeviceMaintenanceWindowResponse
-> Rep StartInputDeviceMaintenanceWindowResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StartInputDeviceMaintenanceWindowResponse x
-> StartInputDeviceMaintenanceWindowResponse
$cfrom :: forall x.
StartInputDeviceMaintenanceWindowResponse
-> Rep StartInputDeviceMaintenanceWindowResponse x
Prelude.Generic)
newStartInputDeviceMaintenanceWindowResponse ::
Prelude.Int ->
StartInputDeviceMaintenanceWindowResponse
newStartInputDeviceMaintenanceWindowResponse :: Int -> StartInputDeviceMaintenanceWindowResponse
newStartInputDeviceMaintenanceWindowResponse
Int
pHttpStatus_ =
StartInputDeviceMaintenanceWindowResponse'
{ $sel:httpStatus:StartInputDeviceMaintenanceWindowResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
startInputDeviceMaintenanceWindowResponse_httpStatus :: Lens.Lens' StartInputDeviceMaintenanceWindowResponse Prelude.Int
startInputDeviceMaintenanceWindowResponse_httpStatus :: Lens' StartInputDeviceMaintenanceWindowResponse Int
startInputDeviceMaintenanceWindowResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartInputDeviceMaintenanceWindowResponse' {Int
httpStatus :: Int
$sel:httpStatus:StartInputDeviceMaintenanceWindowResponse' :: StartInputDeviceMaintenanceWindowResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: StartInputDeviceMaintenanceWindowResponse
s@StartInputDeviceMaintenanceWindowResponse' {} Int
a -> StartInputDeviceMaintenanceWindowResponse
s {$sel:httpStatus:StartInputDeviceMaintenanceWindowResponse' :: Int
httpStatus = Int
a} :: StartInputDeviceMaintenanceWindowResponse)
instance
Prelude.NFData
StartInputDeviceMaintenanceWindowResponse
where
rnf :: StartInputDeviceMaintenanceWindowResponse -> ()
rnf StartInputDeviceMaintenanceWindowResponse' {Int
httpStatus :: Int
$sel:httpStatus:StartInputDeviceMaintenanceWindowResponse' :: StartInputDeviceMaintenanceWindowResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus