{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.MediaTailor.ListVodSources
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Lists all the VOD sources in a source location.
--
-- This operation returns paginated results.
module Amazonka.MediaTailor.ListVodSources
  ( -- * Creating a Request
    ListVodSources (..),
    newListVodSources,

    -- * Request Lenses
    listVodSources_nextToken,
    listVodSources_maxResults,
    listVodSources_sourceLocationName,

    -- * Destructuring the Response
    ListVodSourcesResponse (..),
    newListVodSourcesResponse,

    -- * Response Lenses
    listVodSourcesResponse_items,
    listVodSourcesResponse_nextToken,
    listVodSourcesResponse_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

-- | /See:/ 'newListVodSources' smart constructor.
data ListVodSources = ListVodSources'
  { -- | Pagination token from the GET list request. Use the token to fetch the
    -- next page of results.
    ListVodSources -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Upper bound on number of records to return. The maximum number of
    -- results is 100.
    ListVodSources -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The identifier for the source location you are working on.
    ListVodSources -> Text
sourceLocationName :: Prelude.Text
  }
  deriving (ListVodSources -> ListVodSources -> Bool
(ListVodSources -> ListVodSources -> Bool)
-> (ListVodSources -> ListVodSources -> Bool) -> Eq ListVodSources
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListVodSources -> ListVodSources -> Bool
$c/= :: ListVodSources -> ListVodSources -> Bool
== :: ListVodSources -> ListVodSources -> Bool
$c== :: ListVodSources -> ListVodSources -> Bool
Prelude.Eq, ReadPrec [ListVodSources]
ReadPrec ListVodSources
Int -> ReadS ListVodSources
ReadS [ListVodSources]
(Int -> ReadS ListVodSources)
-> ReadS [ListVodSources]
-> ReadPrec ListVodSources
-> ReadPrec [ListVodSources]
-> Read ListVodSources
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListVodSources]
$creadListPrec :: ReadPrec [ListVodSources]
readPrec :: ReadPrec ListVodSources
$creadPrec :: ReadPrec ListVodSources
readList :: ReadS [ListVodSources]
$creadList :: ReadS [ListVodSources]
readsPrec :: Int -> ReadS ListVodSources
$creadsPrec :: Int -> ReadS ListVodSources
Prelude.Read, Int -> ListVodSources -> ShowS
[ListVodSources] -> ShowS
ListVodSources -> String
(Int -> ListVodSources -> ShowS)
-> (ListVodSources -> String)
-> ([ListVodSources] -> ShowS)
-> Show ListVodSources
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListVodSources] -> ShowS
$cshowList :: [ListVodSources] -> ShowS
show :: ListVodSources -> String
$cshow :: ListVodSources -> String
showsPrec :: Int -> ListVodSources -> ShowS
$cshowsPrec :: Int -> ListVodSources -> ShowS
Prelude.Show, (forall x. ListVodSources -> Rep ListVodSources x)
-> (forall x. Rep ListVodSources x -> ListVodSources)
-> Generic ListVodSources
forall x. Rep ListVodSources x -> ListVodSources
forall x. ListVodSources -> Rep ListVodSources x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListVodSources x -> ListVodSources
$cfrom :: forall x. ListVodSources -> Rep ListVodSources x
Prelude.Generic)

-- |
-- Create a value of 'ListVodSources' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'nextToken', 'listVodSources_nextToken' - Pagination token from the GET list request. Use the token to fetch the
-- next page of results.
--
-- 'maxResults', 'listVodSources_maxResults' - Upper bound on number of records to return. The maximum number of
-- results is 100.
--
-- 'sourceLocationName', 'listVodSources_sourceLocationName' - The identifier for the source location you are working on.
newListVodSources ::
  -- | 'sourceLocationName'
  Prelude.Text ->
  ListVodSources
newListVodSources :: Text -> ListVodSources
newListVodSources Text
pSourceLocationName_ =
  ListVodSources' :: Maybe Text -> Maybe Natural -> Text -> ListVodSources
ListVodSources'
    { $sel:nextToken:ListVodSources' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:ListVodSources' :: Maybe Natural
maxResults = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:sourceLocationName:ListVodSources' :: Text
sourceLocationName = Text
pSourceLocationName_
    }

-- | Pagination token from the GET list request. Use the token to fetch the
-- next page of results.
listVodSources_nextToken :: Lens.Lens' ListVodSources (Prelude.Maybe Prelude.Text)
listVodSources_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListVodSources -> f ListVodSources
listVodSources_nextToken = (ListVodSources -> Maybe Text)
-> (ListVodSources -> Maybe Text -> ListVodSources)
-> Lens ListVodSources ListVodSources (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListVodSources' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListVodSources' :: ListVodSources -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListVodSources
s@ListVodSources' {} Maybe Text
a -> ListVodSources
s {$sel:nextToken:ListVodSources' :: Maybe Text
nextToken = Maybe Text
a} :: ListVodSources)

-- | Upper bound on number of records to return. The maximum number of
-- results is 100.
listVodSources_maxResults :: Lens.Lens' ListVodSources (Prelude.Maybe Prelude.Natural)
listVodSources_maxResults :: (Maybe Natural -> f (Maybe Natural))
-> ListVodSources -> f ListVodSources
listVodSources_maxResults = (ListVodSources -> Maybe Natural)
-> (ListVodSources -> Maybe Natural -> ListVodSources)
-> Lens
     ListVodSources ListVodSources (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListVodSources' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:ListVodSources' :: ListVodSources -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: ListVodSources
s@ListVodSources' {} Maybe Natural
a -> ListVodSources
s {$sel:maxResults:ListVodSources' :: Maybe Natural
maxResults = Maybe Natural
a} :: ListVodSources)

-- | The identifier for the source location you are working on.
listVodSources_sourceLocationName :: Lens.Lens' ListVodSources Prelude.Text
listVodSources_sourceLocationName :: (Text -> f Text) -> ListVodSources -> f ListVodSources
listVodSources_sourceLocationName = (ListVodSources -> Text)
-> (ListVodSources -> Text -> ListVodSources)
-> Lens ListVodSources ListVodSources Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListVodSources' {Text
sourceLocationName :: Text
$sel:sourceLocationName:ListVodSources' :: ListVodSources -> Text
sourceLocationName} -> Text
sourceLocationName) (\s :: ListVodSources
s@ListVodSources' {} Text
a -> ListVodSources
s {$sel:sourceLocationName:ListVodSources' :: Text
sourceLocationName = Text
a} :: ListVodSources)

instance Core.AWSPager ListVodSources where
  page :: ListVodSources
-> AWSResponse ListVodSources -> Maybe ListVodSources
page ListVodSources
rq AWSResponse ListVodSources
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListVodSources
ListVodSourcesResponse
rs
            ListVodSourcesResponse
-> Getting (First Text) ListVodSourcesResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListVodSourcesResponse
-> Const (First Text) ListVodSourcesResponse
Lens' ListVodSourcesResponse (Maybe Text)
listVodSourcesResponse_nextToken
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListVodSourcesResponse
 -> Const (First Text) ListVodSourcesResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListVodSourcesResponse 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 ListVodSources
forall a. Maybe a
Prelude.Nothing
    | Maybe [VodSource] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse ListVodSources
ListVodSourcesResponse
rs
            ListVodSourcesResponse
-> Getting (First [VodSource]) ListVodSourcesResponse [VodSource]
-> Maybe [VodSource]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [VodSource]
 -> Const (First [VodSource]) (Maybe [VodSource]))
-> ListVodSourcesResponse
-> Const (First [VodSource]) ListVodSourcesResponse
Lens' ListVodSourcesResponse (Maybe [VodSource])
listVodSourcesResponse_items ((Maybe [VodSource]
  -> Const (First [VodSource]) (Maybe [VodSource]))
 -> ListVodSourcesResponse
 -> Const (First [VodSource]) ListVodSourcesResponse)
-> (([VodSource] -> Const (First [VodSource]) [VodSource])
    -> Maybe [VodSource]
    -> Const (First [VodSource]) (Maybe [VodSource]))
-> Getting (First [VodSource]) ListVodSourcesResponse [VodSource]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([VodSource] -> Const (First [VodSource]) [VodSource])
-> Maybe [VodSource]
-> Const (First [VodSource]) (Maybe [VodSource])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe ListVodSources
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      ListVodSources -> Maybe ListVodSources
forall a. a -> Maybe a
Prelude.Just (ListVodSources -> Maybe ListVodSources)
-> ListVodSources -> Maybe ListVodSources
forall a b. (a -> b) -> a -> b
Prelude.$
        ListVodSources
rq
          ListVodSources
-> (ListVodSources -> ListVodSources) -> ListVodSources
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> ListVodSources -> Identity ListVodSources
Lens ListVodSources ListVodSources (Maybe Text) (Maybe Text)
listVodSources_nextToken
          ((Maybe Text -> Identity (Maybe Text))
 -> ListVodSources -> Identity ListVodSources)
-> Maybe Text -> ListVodSources -> ListVodSources
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse ListVodSources
ListVodSourcesResponse
rs
          ListVodSourcesResponse
-> Getting (First Text) ListVodSourcesResponse Text -> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> ListVodSourcesResponse
-> Const (First Text) ListVodSourcesResponse
Lens' ListVodSourcesResponse (Maybe Text)
listVodSourcesResponse_nextToken ((Maybe Text -> Const (First Text) (Maybe Text))
 -> ListVodSourcesResponse
 -> Const (First Text) ListVodSourcesResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) ListVodSourcesResponse 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 ListVodSources where
  type
    AWSResponse ListVodSources =
      ListVodSourcesResponse
  request :: ListVodSources -> Request ListVodSources
request = Service -> ListVodSources -> Request ListVodSources
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy ListVodSources
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListVodSources)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ListVodSources))
-> Logger
-> Service
-> Proxy ListVodSources
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ListVodSources)))
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 [VodSource] -> Maybe Text -> Int -> ListVodSourcesResponse
ListVodSourcesResponse'
            (Maybe [VodSource] -> Maybe Text -> Int -> ListVodSourcesResponse)
-> Either String (Maybe [VodSource])
-> Either String (Maybe Text -> Int -> ListVodSourcesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [VodSource]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Items" Either String (Maybe (Maybe [VodSource]))
-> Maybe [VodSource] -> Either String (Maybe [VodSource])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [VodSource]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Maybe Text -> Int -> ListVodSourcesResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ListVodSourcesResponse)
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 -> ListVodSourcesResponse)
-> Either String Int -> Either String ListVodSourcesResponse
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 ListVodSources

instance Prelude.NFData ListVodSources

instance Core.ToHeaders ListVodSources where
  toHeaders :: ListVodSources -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ListVodSources -> 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 ListVodSources where
  toPath :: ListVodSources -> ByteString
toPath ListVodSources' {Maybe Natural
Maybe Text
Text
sourceLocationName :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:sourceLocationName:ListVodSources' :: ListVodSources -> Text
$sel:maxResults:ListVodSources' :: ListVodSources -> Maybe Natural
$sel:nextToken:ListVodSources' :: ListVodSources -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/sourceLocation/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
sourceLocationName,
        ByteString
"/vodSources"
      ]

instance Core.ToQuery ListVodSources where
  toQuery :: ListVodSources -> QueryString
toQuery ListVodSources' {Maybe Natural
Maybe Text
Text
sourceLocationName :: Text
maxResults :: Maybe Natural
nextToken :: Maybe Text
$sel:sourceLocationName:ListVodSources' :: ListVodSources -> Text
$sel:maxResults:ListVodSources' :: ListVodSources -> Maybe Natural
$sel:nextToken:ListVodSources' :: ListVodSources -> 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
"maxResults" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
maxResults
      ]

-- | /See:/ 'newListVodSourcesResponse' smart constructor.
data ListVodSourcesResponse = ListVodSourcesResponse'
  { -- | Lists the VOD sources.
    ListVodSourcesResponse -> Maybe [VodSource]
items :: Prelude.Maybe [VodSource],
    -- | Pagination token from the list request. Use the token to fetch the next
    -- page of results.
    ListVodSourcesResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListVodSourcesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ListVodSourcesResponse -> ListVodSourcesResponse -> Bool
(ListVodSourcesResponse -> ListVodSourcesResponse -> Bool)
-> (ListVodSourcesResponse -> ListVodSourcesResponse -> Bool)
-> Eq ListVodSourcesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListVodSourcesResponse -> ListVodSourcesResponse -> Bool
$c/= :: ListVodSourcesResponse -> ListVodSourcesResponse -> Bool
== :: ListVodSourcesResponse -> ListVodSourcesResponse -> Bool
$c== :: ListVodSourcesResponse -> ListVodSourcesResponse -> Bool
Prelude.Eq, ReadPrec [ListVodSourcesResponse]
ReadPrec ListVodSourcesResponse
Int -> ReadS ListVodSourcesResponse
ReadS [ListVodSourcesResponse]
(Int -> ReadS ListVodSourcesResponse)
-> ReadS [ListVodSourcesResponse]
-> ReadPrec ListVodSourcesResponse
-> ReadPrec [ListVodSourcesResponse]
-> Read ListVodSourcesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListVodSourcesResponse]
$creadListPrec :: ReadPrec [ListVodSourcesResponse]
readPrec :: ReadPrec ListVodSourcesResponse
$creadPrec :: ReadPrec ListVodSourcesResponse
readList :: ReadS [ListVodSourcesResponse]
$creadList :: ReadS [ListVodSourcesResponse]
readsPrec :: Int -> ReadS ListVodSourcesResponse
$creadsPrec :: Int -> ReadS ListVodSourcesResponse
Prelude.Read, Int -> ListVodSourcesResponse -> ShowS
[ListVodSourcesResponse] -> ShowS
ListVodSourcesResponse -> String
(Int -> ListVodSourcesResponse -> ShowS)
-> (ListVodSourcesResponse -> String)
-> ([ListVodSourcesResponse] -> ShowS)
-> Show ListVodSourcesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListVodSourcesResponse] -> ShowS
$cshowList :: [ListVodSourcesResponse] -> ShowS
show :: ListVodSourcesResponse -> String
$cshow :: ListVodSourcesResponse -> String
showsPrec :: Int -> ListVodSourcesResponse -> ShowS
$cshowsPrec :: Int -> ListVodSourcesResponse -> ShowS
Prelude.Show, (forall x. ListVodSourcesResponse -> Rep ListVodSourcesResponse x)
-> (forall x.
    Rep ListVodSourcesResponse x -> ListVodSourcesResponse)
-> Generic ListVodSourcesResponse
forall x. Rep ListVodSourcesResponse x -> ListVodSourcesResponse
forall x. ListVodSourcesResponse -> Rep ListVodSourcesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListVodSourcesResponse x -> ListVodSourcesResponse
$cfrom :: forall x. ListVodSourcesResponse -> Rep ListVodSourcesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListVodSourcesResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'items', 'listVodSourcesResponse_items' - Lists the VOD sources.
--
-- 'nextToken', 'listVodSourcesResponse_nextToken' - Pagination token from the list request. Use the token to fetch the next
-- page of results.
--
-- 'httpStatus', 'listVodSourcesResponse_httpStatus' - The response's http status code.
newListVodSourcesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ListVodSourcesResponse
newListVodSourcesResponse :: Int -> ListVodSourcesResponse
newListVodSourcesResponse Int
pHttpStatus_ =
  ListVodSourcesResponse' :: Maybe [VodSource] -> Maybe Text -> Int -> ListVodSourcesResponse
ListVodSourcesResponse'
    { $sel:items:ListVodSourcesResponse' :: Maybe [VodSource]
items = Maybe [VodSource]
forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListVodSourcesResponse' :: Maybe Text
nextToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ListVodSourcesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Lists the VOD sources.
listVodSourcesResponse_items :: Lens.Lens' ListVodSourcesResponse (Prelude.Maybe [VodSource])
listVodSourcesResponse_items :: (Maybe [VodSource] -> f (Maybe [VodSource]))
-> ListVodSourcesResponse -> f ListVodSourcesResponse
listVodSourcesResponse_items = (ListVodSourcesResponse -> Maybe [VodSource])
-> (ListVodSourcesResponse
    -> Maybe [VodSource] -> ListVodSourcesResponse)
-> Lens' ListVodSourcesResponse (Maybe [VodSource])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListVodSourcesResponse' {Maybe [VodSource]
items :: Maybe [VodSource]
$sel:items:ListVodSourcesResponse' :: ListVodSourcesResponse -> Maybe [VodSource]
items} -> Maybe [VodSource]
items) (\s :: ListVodSourcesResponse
s@ListVodSourcesResponse' {} Maybe [VodSource]
a -> ListVodSourcesResponse
s {$sel:items:ListVodSourcesResponse' :: Maybe [VodSource]
items = Maybe [VodSource]
a} :: ListVodSourcesResponse) ((Maybe [VodSource] -> f (Maybe [VodSource]))
 -> ListVodSourcesResponse -> f ListVodSourcesResponse)
-> ((Maybe [VodSource] -> f (Maybe [VodSource]))
    -> Maybe [VodSource] -> f (Maybe [VodSource]))
-> (Maybe [VodSource] -> f (Maybe [VodSource]))
-> ListVodSourcesResponse
-> f ListVodSourcesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [VodSource] [VodSource] [VodSource] [VodSource]
-> Iso
     (Maybe [VodSource])
     (Maybe [VodSource])
     (Maybe [VodSource])
     (Maybe [VodSource])
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 [VodSource] [VodSource] [VodSource] [VodSource]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Pagination token from the list request. Use the token to fetch the next
-- page of results.
listVodSourcesResponse_nextToken :: Lens.Lens' ListVodSourcesResponse (Prelude.Maybe Prelude.Text)
listVodSourcesResponse_nextToken :: (Maybe Text -> f (Maybe Text))
-> ListVodSourcesResponse -> f ListVodSourcesResponse
listVodSourcesResponse_nextToken = (ListVodSourcesResponse -> Maybe Text)
-> (ListVodSourcesResponse -> Maybe Text -> ListVodSourcesResponse)
-> Lens' ListVodSourcesResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListVodSourcesResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListVodSourcesResponse' :: ListVodSourcesResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListVodSourcesResponse
s@ListVodSourcesResponse' {} Maybe Text
a -> ListVodSourcesResponse
s {$sel:nextToken:ListVodSourcesResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListVodSourcesResponse)

-- | The response's http status code.
listVodSourcesResponse_httpStatus :: Lens.Lens' ListVodSourcesResponse Prelude.Int
listVodSourcesResponse_httpStatus :: (Int -> f Int)
-> ListVodSourcesResponse -> f ListVodSourcesResponse
listVodSourcesResponse_httpStatus = (ListVodSourcesResponse -> Int)
-> (ListVodSourcesResponse -> Int -> ListVodSourcesResponse)
-> Lens ListVodSourcesResponse ListVodSourcesResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListVodSourcesResponse' {Int
httpStatus :: Int
$sel:httpStatus:ListVodSourcesResponse' :: ListVodSourcesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ListVodSourcesResponse
s@ListVodSourcesResponse' {} Int
a -> ListVodSourcesResponse
s {$sel:httpStatus:ListVodSourcesResponse' :: Int
httpStatus = Int
a} :: ListVodSourcesResponse)

instance Prelude.NFData ListVodSourcesResponse