{-# 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.MediaTailor.GetChannelSchedule
(
GetChannelSchedule (..),
newGetChannelSchedule,
getChannelSchedule_nextToken,
getChannelSchedule_durationMinutes,
getChannelSchedule_maxResults,
getChannelSchedule_channelName,
GetChannelScheduleResponse (..),
newGetChannelScheduleResponse,
getChannelScheduleResponse_items,
getChannelScheduleResponse_nextToken,
getChannelScheduleResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MediaTailor.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data GetChannelSchedule = GetChannelSchedule'
{
GetChannelSchedule -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
GetChannelSchedule -> Maybe Text
durationMinutes :: Prelude.Maybe Prelude.Text,
GetChannelSchedule -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
GetChannelSchedule -> Text
channelName :: Prelude.Text
}
deriving (GetChannelSchedule -> GetChannelSchedule -> Bool
(GetChannelSchedule -> GetChannelSchedule -> Bool)
-> (GetChannelSchedule -> GetChannelSchedule -> Bool)
-> Eq GetChannelSchedule
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetChannelSchedule -> GetChannelSchedule -> Bool
$c/= :: GetChannelSchedule -> GetChannelSchedule -> Bool
== :: GetChannelSchedule -> GetChannelSchedule -> Bool
$c== :: GetChannelSchedule -> GetChannelSchedule -> Bool
Prelude.Eq, ReadPrec [GetChannelSchedule]
ReadPrec GetChannelSchedule
Int -> ReadS GetChannelSchedule
ReadS [GetChannelSchedule]
(Int -> ReadS GetChannelSchedule)
-> ReadS [GetChannelSchedule]
-> ReadPrec GetChannelSchedule
-> ReadPrec [GetChannelSchedule]
-> Read GetChannelSchedule
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetChannelSchedule]
$creadListPrec :: ReadPrec [GetChannelSchedule]
readPrec :: ReadPrec GetChannelSchedule
$creadPrec :: ReadPrec GetChannelSchedule
readList :: ReadS [GetChannelSchedule]
$creadList :: ReadS [GetChannelSchedule]
readsPrec :: Int -> ReadS GetChannelSchedule
$creadsPrec :: Int -> ReadS GetChannelSchedule
Prelude.Read, Int -> GetChannelSchedule -> ShowS
[GetChannelSchedule] -> ShowS
GetChannelSchedule -> String
(Int -> GetChannelSchedule -> ShowS)
-> (GetChannelSchedule -> String)
-> ([GetChannelSchedule] -> ShowS)
-> Show GetChannelSchedule
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetChannelSchedule] -> ShowS
$cshowList :: [GetChannelSchedule] -> ShowS
show :: GetChannelSchedule -> String
$cshow :: GetChannelSchedule -> String
showsPrec :: Int -> GetChannelSchedule -> ShowS
$cshowsPrec :: Int -> GetChannelSchedule -> ShowS
Prelude.Show, (forall x. GetChannelSchedule -> Rep GetChannelSchedule x)
-> (forall x. Rep GetChannelSchedule x -> GetChannelSchedule)
-> Generic GetChannelSchedule
forall x. Rep GetChannelSchedule x -> GetChannelSchedule
forall x. GetChannelSchedule -> Rep GetChannelSchedule x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetChannelSchedule x -> GetChannelSchedule
$cfrom :: forall x. GetChannelSchedule -> Rep GetChannelSchedule x
Prelude.Generic)
newGetChannelSchedule ::
Prelude.Text ->
GetChannelSchedule
newGetChannelSchedule :: Text -> GetChannelSchedule
newGetChannelSchedule Text
pChannelName_ =
GetChannelSchedule' :: Maybe Text
-> Maybe Text -> Maybe Natural -> Text -> GetChannelSchedule
GetChannelSchedule'
{ $sel:nextToken:GetChannelSchedule' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:durationMinutes:GetChannelSchedule' :: Maybe Text
durationMinutes = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:maxResults:GetChannelSchedule' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:channelName:GetChannelSchedule' :: Text
channelName = Text
pChannelName_
}
getChannelSchedule_nextToken :: Lens.Lens' GetChannelSchedule (Prelude.Maybe Prelude.Text)
getChannelSchedule_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetChannelSchedule -> f GetChannelSchedule
getChannelSchedule_nextToken = (GetChannelSchedule -> Maybe Text)
-> (GetChannelSchedule -> Maybe Text -> GetChannelSchedule)
-> Lens
GetChannelSchedule GetChannelSchedule (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetChannelSchedule' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetChannelSchedule' :: GetChannelSchedule -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetChannelSchedule
s@GetChannelSchedule' {} Maybe Text
a -> GetChannelSchedule
s {$sel:nextToken:GetChannelSchedule' :: Maybe Text
nextToken = Maybe Text
a} :: GetChannelSchedule)
getChannelSchedule_durationMinutes :: Lens.Lens' GetChannelSchedule (Prelude.Maybe Prelude.Text)
getChannelSchedule_durationMinutes :: (Maybe Text -> f (Maybe Text))
-> GetChannelSchedule -> f GetChannelSchedule
getChannelSchedule_durationMinutes = (GetChannelSchedule -> Maybe Text)
-> (GetChannelSchedule -> Maybe Text -> GetChannelSchedule)
-> Lens
GetChannelSchedule GetChannelSchedule (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetChannelSchedule' {Maybe Text
durationMinutes :: Maybe Text
$sel:durationMinutes:GetChannelSchedule' :: GetChannelSchedule -> Maybe Text
durationMinutes} -> Maybe Text
durationMinutes) (\s :: GetChannelSchedule
s@GetChannelSchedule' {} Maybe Text
a -> GetChannelSchedule
s {$sel:durationMinutes:GetChannelSchedule' :: Maybe Text
durationMinutes = Maybe Text
a} :: GetChannelSchedule)
getChannelSchedule_maxResults :: Lens.Lens' GetChannelSchedule (Prelude.Maybe Prelude.Natural)
getChannelSchedule_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> GetChannelSchedule -> f GetChannelSchedule
getChannelSchedule_maxResults = (GetChannelSchedule -> Maybe Natural)
-> (GetChannelSchedule -> Maybe Natural -> GetChannelSchedule)
-> Lens
GetChannelSchedule
GetChannelSchedule
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetChannelSchedule' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:GetChannelSchedule' :: GetChannelSchedule -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: GetChannelSchedule
s@GetChannelSchedule' {} Maybe Natural
a -> GetChannelSchedule
s {$sel:maxResults:GetChannelSchedule' :: Maybe Natural
maxResults = Maybe Natural
a} :: GetChannelSchedule)
getChannelSchedule_channelName :: Lens.Lens' GetChannelSchedule Prelude.Text
getChannelSchedule_channelName :: (Text -> f Text) -> GetChannelSchedule -> f GetChannelSchedule
getChannelSchedule_channelName = (GetChannelSchedule -> Text)
-> (GetChannelSchedule -> Text -> GetChannelSchedule)
-> Lens GetChannelSchedule GetChannelSchedule Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetChannelSchedule' {Text
channelName :: Text
$sel:channelName:GetChannelSchedule' :: GetChannelSchedule -> Text
channelName} -> Text
channelName) (\s :: GetChannelSchedule
s@GetChannelSchedule' {} Text
a -> GetChannelSchedule
s {$sel:channelName:GetChannelSchedule' :: Text
channelName = Text
a} :: GetChannelSchedule)
instance Core.AWSPager GetChannelSchedule where
page :: GetChannelSchedule
-> AWSResponse GetChannelSchedule -> Maybe GetChannelSchedule
page GetChannelSchedule
rq AWSResponse GetChannelSchedule
rs
| Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse GetChannelSchedule
GetChannelScheduleResponse
rs
GetChannelScheduleResponse
-> Getting (First Text) GetChannelScheduleResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> GetChannelScheduleResponse
-> Const (First Text) GetChannelScheduleResponse
Lens' GetChannelScheduleResponse (Maybe Text)
getChannelScheduleResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> GetChannelScheduleResponse
-> Const (First Text) GetChannelScheduleResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) GetChannelScheduleResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe GetChannelSchedule
forall a. Maybe a
Prelude.Nothing
| Maybe [ScheduleEntry] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
( AWSResponse GetChannelSchedule
GetChannelScheduleResponse
rs
GetChannelScheduleResponse
-> Getting
(First [ScheduleEntry]) GetChannelScheduleResponse [ScheduleEntry]
-> Maybe [ScheduleEntry]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [ScheduleEntry]
-> Const (First [ScheduleEntry]) (Maybe [ScheduleEntry]))
-> GetChannelScheduleResponse
-> Const (First [ScheduleEntry]) GetChannelScheduleResponse
Lens' GetChannelScheduleResponse (Maybe [ScheduleEntry])
getChannelScheduleResponse_items
((Maybe [ScheduleEntry]
-> Const (First [ScheduleEntry]) (Maybe [ScheduleEntry]))
-> GetChannelScheduleResponse
-> Const (First [ScheduleEntry]) GetChannelScheduleResponse)
-> (([ScheduleEntry]
-> Const (First [ScheduleEntry]) [ScheduleEntry])
-> Maybe [ScheduleEntry]
-> Const (First [ScheduleEntry]) (Maybe [ScheduleEntry]))
-> Getting
(First [ScheduleEntry]) GetChannelScheduleResponse [ScheduleEntry]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([ScheduleEntry] -> Const (First [ScheduleEntry]) [ScheduleEntry])
-> Maybe [ScheduleEntry]
-> Const (First [ScheduleEntry]) (Maybe [ScheduleEntry])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
) =
Maybe GetChannelSchedule
forall a. Maybe a
Prelude.Nothing
| Bool
Prelude.otherwise =
GetChannelSchedule -> Maybe GetChannelSchedule
forall a. a -> Maybe a
Prelude.Just (GetChannelSchedule -> Maybe GetChannelSchedule)
-> GetChannelSchedule -> Maybe GetChannelSchedule
forall a b. (a -> b) -> a -> b
Prelude.$
GetChannelSchedule
rq
GetChannelSchedule
-> (GetChannelSchedule -> GetChannelSchedule) -> GetChannelSchedule
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> GetChannelSchedule -> Identity GetChannelSchedule
Lens
GetChannelSchedule GetChannelSchedule (Maybe Text) (Maybe Text)
getChannelSchedule_nextToken
((Maybe Text -> Identity (Maybe Text))
-> GetChannelSchedule -> Identity GetChannelSchedule)
-> Maybe Text -> GetChannelSchedule -> GetChannelSchedule
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse GetChannelSchedule
GetChannelScheduleResponse
rs
GetChannelScheduleResponse
-> Getting (First Text) GetChannelScheduleResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> GetChannelScheduleResponse
-> Const (First Text) GetChannelScheduleResponse
Lens' GetChannelScheduleResponse (Maybe Text)
getChannelScheduleResponse_nextToken
((Maybe Text -> Const (First Text) (Maybe Text))
-> GetChannelScheduleResponse
-> Const (First Text) GetChannelScheduleResponse)
-> ((Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) GetChannelScheduleResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
instance Core.AWSRequest GetChannelSchedule where
type
AWSResponse GetChannelSchedule =
GetChannelScheduleResponse
request :: GetChannelSchedule -> Request GetChannelSchedule
request = Service -> GetChannelSchedule -> Request GetChannelSchedule
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
response :: Logger
-> Service
-> Proxy GetChannelSchedule
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetChannelSchedule)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse GetChannelSchedule))
-> Logger
-> Service
-> Proxy GetChannelSchedule
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetChannelSchedule)))
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 [ScheduleEntry]
-> Maybe Text -> Int -> GetChannelScheduleResponse
GetChannelScheduleResponse'
(Maybe [ScheduleEntry]
-> Maybe Text -> Int -> GetChannelScheduleResponse)
-> Either String (Maybe [ScheduleEntry])
-> Either String (Maybe Text -> Int -> GetChannelScheduleResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [ScheduleEntry]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Items" Either String (Maybe (Maybe [ScheduleEntry]))
-> Maybe [ScheduleEntry] -> Either String (Maybe [ScheduleEntry])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [ScheduleEntry]
forall a. Monoid a => a
Prelude.mempty)
Either String (Maybe Text -> Int -> GetChannelScheduleResponse)
-> Either String (Maybe Text)
-> Either String (Int -> GetChannelScheduleResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"NextToken")
Either String (Int -> GetChannelScheduleResponse)
-> Either String Int -> Either String GetChannelScheduleResponse
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 GetChannelSchedule
instance Prelude.NFData GetChannelSchedule
instance Core.ToHeaders GetChannelSchedule where
toHeaders :: GetChannelSchedule -> ResponseHeaders
toHeaders =
ResponseHeaders -> GetChannelSchedule -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ 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.ToPath GetChannelSchedule where
toPath :: GetChannelSchedule -> ByteString
toPath GetChannelSchedule' {Maybe Natural
Maybe Text
Text
channelName :: Text
maxResults :: Maybe Natural
durationMinutes :: Maybe Text
nextToken :: Maybe Text
$sel:channelName:GetChannelSchedule' :: GetChannelSchedule -> Text
$sel:maxResults:GetChannelSchedule' :: GetChannelSchedule -> Maybe Natural
$sel:durationMinutes:GetChannelSchedule' :: GetChannelSchedule -> Maybe Text
$sel:nextToken:GetChannelSchedule' :: GetChannelSchedule -> Maybe Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/channel/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
channelName, ByteString
"/schedule"]
instance Core.ToQuery GetChannelSchedule where
toQuery :: GetChannelSchedule -> QueryString
toQuery GetChannelSchedule' {Maybe Natural
Maybe Text
Text
channelName :: Text
maxResults :: Maybe Natural
durationMinutes :: Maybe Text
nextToken :: Maybe Text
$sel:channelName:GetChannelSchedule' :: GetChannelSchedule -> Text
$sel:maxResults:GetChannelSchedule' :: GetChannelSchedule -> Maybe Natural
$sel:durationMinutes:GetChannelSchedule' :: GetChannelSchedule -> Maybe Text
$sel:nextToken:GetChannelSchedule' :: GetChannelSchedule -> Maybe Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"nextToken" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
nextToken,
ByteString
"durationMinutes" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
durationMinutes,
ByteString
"maxResults" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxResults
]
data GetChannelScheduleResponse = GetChannelScheduleResponse'
{
GetChannelScheduleResponse -> Maybe [ScheduleEntry]
items :: Prelude.Maybe [ScheduleEntry],
GetChannelScheduleResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
GetChannelScheduleResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetChannelScheduleResponse -> GetChannelScheduleResponse -> Bool
(GetChannelScheduleResponse -> GetChannelScheduleResponse -> Bool)
-> (GetChannelScheduleResponse
-> GetChannelScheduleResponse -> Bool)
-> Eq GetChannelScheduleResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetChannelScheduleResponse -> GetChannelScheduleResponse -> Bool
$c/= :: GetChannelScheduleResponse -> GetChannelScheduleResponse -> Bool
== :: GetChannelScheduleResponse -> GetChannelScheduleResponse -> Bool
$c== :: GetChannelScheduleResponse -> GetChannelScheduleResponse -> Bool
Prelude.Eq, ReadPrec [GetChannelScheduleResponse]
ReadPrec GetChannelScheduleResponse
Int -> ReadS GetChannelScheduleResponse
ReadS [GetChannelScheduleResponse]
(Int -> ReadS GetChannelScheduleResponse)
-> ReadS [GetChannelScheduleResponse]
-> ReadPrec GetChannelScheduleResponse
-> ReadPrec [GetChannelScheduleResponse]
-> Read GetChannelScheduleResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetChannelScheduleResponse]
$creadListPrec :: ReadPrec [GetChannelScheduleResponse]
readPrec :: ReadPrec GetChannelScheduleResponse
$creadPrec :: ReadPrec GetChannelScheduleResponse
readList :: ReadS [GetChannelScheduleResponse]
$creadList :: ReadS [GetChannelScheduleResponse]
readsPrec :: Int -> ReadS GetChannelScheduleResponse
$creadsPrec :: Int -> ReadS GetChannelScheduleResponse
Prelude.Read, Int -> GetChannelScheduleResponse -> ShowS
[GetChannelScheduleResponse] -> ShowS
GetChannelScheduleResponse -> String
(Int -> GetChannelScheduleResponse -> ShowS)
-> (GetChannelScheduleResponse -> String)
-> ([GetChannelScheduleResponse] -> ShowS)
-> Show GetChannelScheduleResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetChannelScheduleResponse] -> ShowS
$cshowList :: [GetChannelScheduleResponse] -> ShowS
show :: GetChannelScheduleResponse -> String
$cshow :: GetChannelScheduleResponse -> String
showsPrec :: Int -> GetChannelScheduleResponse -> ShowS
$cshowsPrec :: Int -> GetChannelScheduleResponse -> ShowS
Prelude.Show, (forall x.
GetChannelScheduleResponse -> Rep GetChannelScheduleResponse x)
-> (forall x.
Rep GetChannelScheduleResponse x -> GetChannelScheduleResponse)
-> Generic GetChannelScheduleResponse
forall x.
Rep GetChannelScheduleResponse x -> GetChannelScheduleResponse
forall x.
GetChannelScheduleResponse -> Rep GetChannelScheduleResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetChannelScheduleResponse x -> GetChannelScheduleResponse
$cfrom :: forall x.
GetChannelScheduleResponse -> Rep GetChannelScheduleResponse x
Prelude.Generic)
newGetChannelScheduleResponse ::
Prelude.Int ->
GetChannelScheduleResponse
newGetChannelScheduleResponse :: Int -> GetChannelScheduleResponse
newGetChannelScheduleResponse Int
pHttpStatus_ =
GetChannelScheduleResponse' :: Maybe [ScheduleEntry]
-> Maybe Text -> Int -> GetChannelScheduleResponse
GetChannelScheduleResponse'
{ $sel:items:GetChannelScheduleResponse' :: Maybe [ScheduleEntry]
items =
Maybe [ScheduleEntry]
forall a. Maybe a
Prelude.Nothing,
$sel:nextToken:GetChannelScheduleResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetChannelScheduleResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getChannelScheduleResponse_items :: Lens.Lens' GetChannelScheduleResponse (Prelude.Maybe [ScheduleEntry])
getChannelScheduleResponse_items :: (Maybe [ScheduleEntry] -> f (Maybe [ScheduleEntry]))
-> GetChannelScheduleResponse -> f GetChannelScheduleResponse
getChannelScheduleResponse_items = (GetChannelScheduleResponse -> Maybe [ScheduleEntry])
-> (GetChannelScheduleResponse
-> Maybe [ScheduleEntry] -> GetChannelScheduleResponse)
-> Lens' GetChannelScheduleResponse (Maybe [ScheduleEntry])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetChannelScheduleResponse' {Maybe [ScheduleEntry]
items :: Maybe [ScheduleEntry]
$sel:items:GetChannelScheduleResponse' :: GetChannelScheduleResponse -> Maybe [ScheduleEntry]
items} -> Maybe [ScheduleEntry]
items) (\s :: GetChannelScheduleResponse
s@GetChannelScheduleResponse' {} Maybe [ScheduleEntry]
a -> GetChannelScheduleResponse
s {$sel:items:GetChannelScheduleResponse' :: Maybe [ScheduleEntry]
items = Maybe [ScheduleEntry]
a} :: GetChannelScheduleResponse) ((Maybe [ScheduleEntry] -> f (Maybe [ScheduleEntry]))
-> GetChannelScheduleResponse -> f GetChannelScheduleResponse)
-> ((Maybe [ScheduleEntry] -> f (Maybe [ScheduleEntry]))
-> Maybe [ScheduleEntry] -> f (Maybe [ScheduleEntry]))
-> (Maybe [ScheduleEntry] -> f (Maybe [ScheduleEntry]))
-> GetChannelScheduleResponse
-> f GetChannelScheduleResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[ScheduleEntry] [ScheduleEntry] [ScheduleEntry] [ScheduleEntry]
-> Iso
(Maybe [ScheduleEntry])
(Maybe [ScheduleEntry])
(Maybe [ScheduleEntry])
(Maybe [ScheduleEntry])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
[ScheduleEntry] [ScheduleEntry] [ScheduleEntry] [ScheduleEntry]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
getChannelScheduleResponse_nextToken :: Lens.Lens' GetChannelScheduleResponse (Prelude.Maybe Prelude.Text)
getChannelScheduleResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> GetChannelScheduleResponse -> f GetChannelScheduleResponse
getChannelScheduleResponse_nextToken = (GetChannelScheduleResponse -> Maybe Text)
-> (GetChannelScheduleResponse
-> Maybe Text -> GetChannelScheduleResponse)
-> Lens' GetChannelScheduleResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetChannelScheduleResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetChannelScheduleResponse' :: GetChannelScheduleResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetChannelScheduleResponse
s@GetChannelScheduleResponse' {} Maybe Text
a -> GetChannelScheduleResponse
s {$sel:nextToken:GetChannelScheduleResponse' :: Maybe Text
nextToken = Maybe Text
a} :: GetChannelScheduleResponse)
getChannelScheduleResponse_httpStatus :: Lens.Lens' GetChannelScheduleResponse Prelude.Int
getChannelScheduleResponse_httpStatus :: (Int -> f Int)
-> GetChannelScheduleResponse -> f GetChannelScheduleResponse
getChannelScheduleResponse_httpStatus = (GetChannelScheduleResponse -> Int)
-> (GetChannelScheduleResponse
-> Int -> GetChannelScheduleResponse)
-> Lens
GetChannelScheduleResponse GetChannelScheduleResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetChannelScheduleResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetChannelScheduleResponse' :: GetChannelScheduleResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetChannelScheduleResponse
s@GetChannelScheduleResponse' {} Int
a -> GetChannelScheduleResponse
s {$sel:httpStatus:GetChannelScheduleResponse' :: Int
httpStatus = Int
a} :: GetChannelScheduleResponse)
instance Prelude.NFData GetChannelScheduleResponse