{-# 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.UpdateVodSource
-- 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)
--
-- Updates a specific VOD source in a specific source location.
module Amazonka.MediaTailor.UpdateVodSource
  ( -- * Creating a Request
    UpdateVodSource (..),
    newUpdateVodSource,

    -- * Request Lenses
    updateVodSource_sourceLocationName,
    updateVodSource_vodSourceName,
    updateVodSource_httpPackageConfigurations,

    -- * Destructuring the Response
    UpdateVodSourceResponse (..),
    newUpdateVodSourceResponse,

    -- * Response Lenses
    updateVodSourceResponse_creationTime,
    updateVodSourceResponse_sourceLocationName,
    updateVodSourceResponse_arn,
    updateVodSourceResponse_lastModifiedTime,
    updateVodSourceResponse_httpPackageConfigurations,
    updateVodSourceResponse_vodSourceName,
    updateVodSourceResponse_tags,
    updateVodSourceResponse_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:/ 'newUpdateVodSource' smart constructor.
data UpdateVodSource = UpdateVodSource'
  { -- | The identifier for the source location you are working on.
    UpdateVodSource -> Text
sourceLocationName :: Prelude.Text,
    -- | The identifier for the VOD source you are working on.
    UpdateVodSource -> Text
vodSourceName :: Prelude.Text,
    -- | An array of HTTP package configurations for the VOD source on this
    -- account.
    UpdateVodSource -> [HttpPackageConfiguration]
httpPackageConfigurations :: [HttpPackageConfiguration]
  }
  deriving (UpdateVodSource -> UpdateVodSource -> Bool
(UpdateVodSource -> UpdateVodSource -> Bool)
-> (UpdateVodSource -> UpdateVodSource -> Bool)
-> Eq UpdateVodSource
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateVodSource -> UpdateVodSource -> Bool
$c/= :: UpdateVodSource -> UpdateVodSource -> Bool
== :: UpdateVodSource -> UpdateVodSource -> Bool
$c== :: UpdateVodSource -> UpdateVodSource -> Bool
Prelude.Eq, ReadPrec [UpdateVodSource]
ReadPrec UpdateVodSource
Int -> ReadS UpdateVodSource
ReadS [UpdateVodSource]
(Int -> ReadS UpdateVodSource)
-> ReadS [UpdateVodSource]
-> ReadPrec UpdateVodSource
-> ReadPrec [UpdateVodSource]
-> Read UpdateVodSource
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateVodSource]
$creadListPrec :: ReadPrec [UpdateVodSource]
readPrec :: ReadPrec UpdateVodSource
$creadPrec :: ReadPrec UpdateVodSource
readList :: ReadS [UpdateVodSource]
$creadList :: ReadS [UpdateVodSource]
readsPrec :: Int -> ReadS UpdateVodSource
$creadsPrec :: Int -> ReadS UpdateVodSource
Prelude.Read, Int -> UpdateVodSource -> ShowS
[UpdateVodSource] -> ShowS
UpdateVodSource -> String
(Int -> UpdateVodSource -> ShowS)
-> (UpdateVodSource -> String)
-> ([UpdateVodSource] -> ShowS)
-> Show UpdateVodSource
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateVodSource] -> ShowS
$cshowList :: [UpdateVodSource] -> ShowS
show :: UpdateVodSource -> String
$cshow :: UpdateVodSource -> String
showsPrec :: Int -> UpdateVodSource -> ShowS
$cshowsPrec :: Int -> UpdateVodSource -> ShowS
Prelude.Show, (forall x. UpdateVodSource -> Rep UpdateVodSource x)
-> (forall x. Rep UpdateVodSource x -> UpdateVodSource)
-> Generic UpdateVodSource
forall x. Rep UpdateVodSource x -> UpdateVodSource
forall x. UpdateVodSource -> Rep UpdateVodSource x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateVodSource x -> UpdateVodSource
$cfrom :: forall x. UpdateVodSource -> Rep UpdateVodSource x
Prelude.Generic)

-- |
-- Create a value of 'UpdateVodSource' 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:
--
-- 'sourceLocationName', 'updateVodSource_sourceLocationName' - The identifier for the source location you are working on.
--
-- 'vodSourceName', 'updateVodSource_vodSourceName' - The identifier for the VOD source you are working on.
--
-- 'httpPackageConfigurations', 'updateVodSource_httpPackageConfigurations' - An array of HTTP package configurations for the VOD source on this
-- account.
newUpdateVodSource ::
  -- | 'sourceLocationName'
  Prelude.Text ->
  -- | 'vodSourceName'
  Prelude.Text ->
  UpdateVodSource
newUpdateVodSource :: Text -> Text -> UpdateVodSource
newUpdateVodSource
  Text
pSourceLocationName_
  Text
pVodSourceName_ =
    UpdateVodSource' :: Text -> Text -> [HttpPackageConfiguration] -> UpdateVodSource
UpdateVodSource'
      { $sel:sourceLocationName:UpdateVodSource' :: Text
sourceLocationName =
          Text
pSourceLocationName_,
        $sel:vodSourceName:UpdateVodSource' :: Text
vodSourceName = Text
pVodSourceName_,
        $sel:httpPackageConfigurations:UpdateVodSource' :: [HttpPackageConfiguration]
httpPackageConfigurations = [HttpPackageConfiguration]
forall a. Monoid a => a
Prelude.mempty
      }

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

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

-- | An array of HTTP package configurations for the VOD source on this
-- account.
updateVodSource_httpPackageConfigurations :: Lens.Lens' UpdateVodSource [HttpPackageConfiguration]
updateVodSource_httpPackageConfigurations :: ([HttpPackageConfiguration] -> f [HttpPackageConfiguration])
-> UpdateVodSource -> f UpdateVodSource
updateVodSource_httpPackageConfigurations = (UpdateVodSource -> [HttpPackageConfiguration])
-> (UpdateVodSource
    -> [HttpPackageConfiguration] -> UpdateVodSource)
-> Lens
     UpdateVodSource
     UpdateVodSource
     [HttpPackageConfiguration]
     [HttpPackageConfiguration]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateVodSource' {[HttpPackageConfiguration]
httpPackageConfigurations :: [HttpPackageConfiguration]
$sel:httpPackageConfigurations:UpdateVodSource' :: UpdateVodSource -> [HttpPackageConfiguration]
httpPackageConfigurations} -> [HttpPackageConfiguration]
httpPackageConfigurations) (\s :: UpdateVodSource
s@UpdateVodSource' {} [HttpPackageConfiguration]
a -> UpdateVodSource
s {$sel:httpPackageConfigurations:UpdateVodSource' :: [HttpPackageConfiguration]
httpPackageConfigurations = [HttpPackageConfiguration]
a} :: UpdateVodSource) (([HttpPackageConfiguration] -> f [HttpPackageConfiguration])
 -> UpdateVodSource -> f UpdateVodSource)
-> (([HttpPackageConfiguration] -> f [HttpPackageConfiguration])
    -> [HttpPackageConfiguration] -> f [HttpPackageConfiguration])
-> ([HttpPackageConfiguration] -> f [HttpPackageConfiguration])
-> UpdateVodSource
-> f UpdateVodSource
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([HttpPackageConfiguration] -> f [HttpPackageConfiguration])
-> [HttpPackageConfiguration] -> f [HttpPackageConfiguration]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.AWSRequest UpdateVodSource where
  type
    AWSResponse UpdateVodSource =
      UpdateVodSourceResponse
  request :: UpdateVodSource -> Request UpdateVodSource
request = Service -> UpdateVodSource -> Request UpdateVodSource
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateVodSource
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateVodSource)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateVodSource))
-> Logger
-> Service
-> Proxy UpdateVodSource
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateVodSource)))
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 POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe [HttpPackageConfiguration]
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> UpdateVodSourceResponse
UpdateVodSourceResponse'
            (Maybe POSIX
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe [HttpPackageConfiguration]
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Int
 -> UpdateVodSourceResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [HttpPackageConfiguration]
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> UpdateVodSourceResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CreationTime")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [HttpPackageConfiguration]
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> UpdateVodSourceResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe POSIX
      -> Maybe [HttpPackageConfiguration]
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> UpdateVodSourceResponse)
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
"SourceLocationName")
            Either
  String
  (Maybe Text
   -> Maybe POSIX
   -> Maybe [HttpPackageConfiguration]
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> UpdateVodSourceResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe POSIX
      -> Maybe [HttpPackageConfiguration]
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> UpdateVodSourceResponse)
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
"Arn")
            Either
  String
  (Maybe POSIX
   -> Maybe [HttpPackageConfiguration]
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> UpdateVodSourceResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe [HttpPackageConfiguration]
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> UpdateVodSourceResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"LastModifiedTime")
            Either
  String
  (Maybe [HttpPackageConfiguration]
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> UpdateVodSourceResponse)
-> Either String (Maybe [HttpPackageConfiguration])
-> Either
     String
     (Maybe Text
      -> Maybe (HashMap Text Text) -> Int -> UpdateVodSourceResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Either String (Maybe (Maybe [HttpPackageConfiguration]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"HttpPackageConfigurations"
                            Either String (Maybe (Maybe [HttpPackageConfiguration]))
-> Maybe [HttpPackageConfiguration]
-> Either String (Maybe [HttpPackageConfiguration])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [HttpPackageConfiguration]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String
  (Maybe Text
   -> Maybe (HashMap Text Text) -> Int -> UpdateVodSourceResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe (HashMap Text Text) -> Int -> UpdateVodSourceResponse)
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
"VodSourceName")
            Either
  String
  (Maybe (HashMap Text Text) -> Int -> UpdateVodSourceResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either String (Int -> UpdateVodSourceResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"tags" Either String (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text)
-> Either String (Maybe (HashMap Text Text))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> UpdateVodSourceResponse)
-> Either String Int -> Either String UpdateVodSourceResponse
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 UpdateVodSource

instance Prelude.NFData UpdateVodSource

instance Core.ToHeaders UpdateVodSource where
  toHeaders :: UpdateVodSource -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateVodSource -> 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.ToJSON UpdateVodSource where
  toJSON :: UpdateVodSource -> Value
toJSON UpdateVodSource' {[HttpPackageConfiguration]
Text
httpPackageConfigurations :: [HttpPackageConfiguration]
vodSourceName :: Text
sourceLocationName :: Text
$sel:httpPackageConfigurations:UpdateVodSource' :: UpdateVodSource -> [HttpPackageConfiguration]
$sel:vodSourceName:UpdateVodSource' :: UpdateVodSource -> Text
$sel:sourceLocationName:UpdateVodSource' :: UpdateVodSource -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"HttpPackageConfigurations"
                  Text -> [HttpPackageConfiguration] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [HttpPackageConfiguration]
httpPackageConfigurations
              )
          ]
      )

instance Core.ToPath UpdateVodSource where
  toPath :: UpdateVodSource -> ByteString
toPath UpdateVodSource' {[HttpPackageConfiguration]
Text
httpPackageConfigurations :: [HttpPackageConfiguration]
vodSourceName :: Text
sourceLocationName :: Text
$sel:httpPackageConfigurations:UpdateVodSource' :: UpdateVodSource -> [HttpPackageConfiguration]
$sel:vodSourceName:UpdateVodSource' :: UpdateVodSource -> Text
$sel:sourceLocationName:UpdateVodSource' :: UpdateVodSource -> 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
"/vodSource/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
vodSourceName
      ]

instance Core.ToQuery UpdateVodSource where
  toQuery :: UpdateVodSource -> QueryString
toQuery = QueryString -> UpdateVodSource -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newUpdateVodSourceResponse' smart constructor.
data UpdateVodSourceResponse = UpdateVodSourceResponse'
  { -- | The timestamp that indicates when the VOD source was created.
    UpdateVodSourceResponse -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
    -- | The name of the source location associated with the VOD source.
    UpdateVodSourceResponse -> Maybe Text
sourceLocationName :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the VOD source.
    UpdateVodSourceResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The ARN for the VOD source.
    UpdateVodSourceResponse -> Maybe POSIX
lastModifiedTime :: Prelude.Maybe Core.POSIX,
    -- | The HTTP package configurations.
    UpdateVodSourceResponse -> Maybe [HttpPackageConfiguration]
httpPackageConfigurations :: Prelude.Maybe [HttpPackageConfiguration],
    -- | The name of the VOD source.
    UpdateVodSourceResponse -> Maybe Text
vodSourceName :: Prelude.Maybe Prelude.Text,
    -- | The tags assigned to the VOD source.
    UpdateVodSourceResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The response's http status code.
    UpdateVodSourceResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateVodSourceResponse -> UpdateVodSourceResponse -> Bool
(UpdateVodSourceResponse -> UpdateVodSourceResponse -> Bool)
-> (UpdateVodSourceResponse -> UpdateVodSourceResponse -> Bool)
-> Eq UpdateVodSourceResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateVodSourceResponse -> UpdateVodSourceResponse -> Bool
$c/= :: UpdateVodSourceResponse -> UpdateVodSourceResponse -> Bool
== :: UpdateVodSourceResponse -> UpdateVodSourceResponse -> Bool
$c== :: UpdateVodSourceResponse -> UpdateVodSourceResponse -> Bool
Prelude.Eq, ReadPrec [UpdateVodSourceResponse]
ReadPrec UpdateVodSourceResponse
Int -> ReadS UpdateVodSourceResponse
ReadS [UpdateVodSourceResponse]
(Int -> ReadS UpdateVodSourceResponse)
-> ReadS [UpdateVodSourceResponse]
-> ReadPrec UpdateVodSourceResponse
-> ReadPrec [UpdateVodSourceResponse]
-> Read UpdateVodSourceResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateVodSourceResponse]
$creadListPrec :: ReadPrec [UpdateVodSourceResponse]
readPrec :: ReadPrec UpdateVodSourceResponse
$creadPrec :: ReadPrec UpdateVodSourceResponse
readList :: ReadS [UpdateVodSourceResponse]
$creadList :: ReadS [UpdateVodSourceResponse]
readsPrec :: Int -> ReadS UpdateVodSourceResponse
$creadsPrec :: Int -> ReadS UpdateVodSourceResponse
Prelude.Read, Int -> UpdateVodSourceResponse -> ShowS
[UpdateVodSourceResponse] -> ShowS
UpdateVodSourceResponse -> String
(Int -> UpdateVodSourceResponse -> ShowS)
-> (UpdateVodSourceResponse -> String)
-> ([UpdateVodSourceResponse] -> ShowS)
-> Show UpdateVodSourceResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateVodSourceResponse] -> ShowS
$cshowList :: [UpdateVodSourceResponse] -> ShowS
show :: UpdateVodSourceResponse -> String
$cshow :: UpdateVodSourceResponse -> String
showsPrec :: Int -> UpdateVodSourceResponse -> ShowS
$cshowsPrec :: Int -> UpdateVodSourceResponse -> ShowS
Prelude.Show, (forall x.
 UpdateVodSourceResponse -> Rep UpdateVodSourceResponse x)
-> (forall x.
    Rep UpdateVodSourceResponse x -> UpdateVodSourceResponse)
-> Generic UpdateVodSourceResponse
forall x. Rep UpdateVodSourceResponse x -> UpdateVodSourceResponse
forall x. UpdateVodSourceResponse -> Rep UpdateVodSourceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateVodSourceResponse x -> UpdateVodSourceResponse
$cfrom :: forall x. UpdateVodSourceResponse -> Rep UpdateVodSourceResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateVodSourceResponse' 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:
--
-- 'creationTime', 'updateVodSourceResponse_creationTime' - The timestamp that indicates when the VOD source was created.
--
-- 'sourceLocationName', 'updateVodSourceResponse_sourceLocationName' - The name of the source location associated with the VOD source.
--
-- 'arn', 'updateVodSourceResponse_arn' - The ARN of the VOD source.
--
-- 'lastModifiedTime', 'updateVodSourceResponse_lastModifiedTime' - The ARN for the VOD source.
--
-- 'httpPackageConfigurations', 'updateVodSourceResponse_httpPackageConfigurations' - The HTTP package configurations.
--
-- 'vodSourceName', 'updateVodSourceResponse_vodSourceName' - The name of the VOD source.
--
-- 'tags', 'updateVodSourceResponse_tags' - The tags assigned to the VOD source.
--
-- 'httpStatus', 'updateVodSourceResponse_httpStatus' - The response's http status code.
newUpdateVodSourceResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateVodSourceResponse
newUpdateVodSourceResponse :: Int -> UpdateVodSourceResponse
newUpdateVodSourceResponse Int
pHttpStatus_ =
  UpdateVodSourceResponse' :: Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe [HttpPackageConfiguration]
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> UpdateVodSourceResponse
UpdateVodSourceResponse'
    { $sel:creationTime:UpdateVodSourceResponse' :: Maybe POSIX
creationTime =
        Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:sourceLocationName:UpdateVodSourceResponse' :: Maybe Text
sourceLocationName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:UpdateVodSourceResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModifiedTime:UpdateVodSourceResponse' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:httpPackageConfigurations:UpdateVodSourceResponse' :: Maybe [HttpPackageConfiguration]
httpPackageConfigurations = Maybe [HttpPackageConfiguration]
forall a. Maybe a
Prelude.Nothing,
      $sel:vodSourceName:UpdateVodSourceResponse' :: Maybe Text
vodSourceName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:UpdateVodSourceResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateVodSourceResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The timestamp that indicates when the VOD source was created.
updateVodSourceResponse_creationTime :: Lens.Lens' UpdateVodSourceResponse (Prelude.Maybe Prelude.UTCTime)
updateVodSourceResponse_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> UpdateVodSourceResponse -> f UpdateVodSourceResponse
updateVodSourceResponse_creationTime = (UpdateVodSourceResponse -> Maybe POSIX)
-> (UpdateVodSourceResponse
    -> Maybe POSIX -> UpdateVodSourceResponse)
-> Lens
     UpdateVodSourceResponse
     UpdateVodSourceResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateVodSourceResponse' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:UpdateVodSourceResponse' :: UpdateVodSourceResponse -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: UpdateVodSourceResponse
s@UpdateVodSourceResponse' {} Maybe POSIX
a -> UpdateVodSourceResponse
s {$sel:creationTime:UpdateVodSourceResponse' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: UpdateVodSourceResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> UpdateVodSourceResponse -> f UpdateVodSourceResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> UpdateVodSourceResponse
-> f UpdateVodSourceResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The name of the source location associated with the VOD source.
updateVodSourceResponse_sourceLocationName :: Lens.Lens' UpdateVodSourceResponse (Prelude.Maybe Prelude.Text)
updateVodSourceResponse_sourceLocationName :: (Maybe Text -> f (Maybe Text))
-> UpdateVodSourceResponse -> f UpdateVodSourceResponse
updateVodSourceResponse_sourceLocationName = (UpdateVodSourceResponse -> Maybe Text)
-> (UpdateVodSourceResponse
    -> Maybe Text -> UpdateVodSourceResponse)
-> Lens
     UpdateVodSourceResponse
     UpdateVodSourceResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateVodSourceResponse' {Maybe Text
sourceLocationName :: Maybe Text
$sel:sourceLocationName:UpdateVodSourceResponse' :: UpdateVodSourceResponse -> Maybe Text
sourceLocationName} -> Maybe Text
sourceLocationName) (\s :: UpdateVodSourceResponse
s@UpdateVodSourceResponse' {} Maybe Text
a -> UpdateVodSourceResponse
s {$sel:sourceLocationName:UpdateVodSourceResponse' :: Maybe Text
sourceLocationName = Maybe Text
a} :: UpdateVodSourceResponse)

-- | The ARN of the VOD source.
updateVodSourceResponse_arn :: Lens.Lens' UpdateVodSourceResponse (Prelude.Maybe Prelude.Text)
updateVodSourceResponse_arn :: (Maybe Text -> f (Maybe Text))
-> UpdateVodSourceResponse -> f UpdateVodSourceResponse
updateVodSourceResponse_arn = (UpdateVodSourceResponse -> Maybe Text)
-> (UpdateVodSourceResponse
    -> Maybe Text -> UpdateVodSourceResponse)
-> Lens
     UpdateVodSourceResponse
     UpdateVodSourceResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateVodSourceResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:UpdateVodSourceResponse' :: UpdateVodSourceResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: UpdateVodSourceResponse
s@UpdateVodSourceResponse' {} Maybe Text
a -> UpdateVodSourceResponse
s {$sel:arn:UpdateVodSourceResponse' :: Maybe Text
arn = Maybe Text
a} :: UpdateVodSourceResponse)

-- | The ARN for the VOD source.
updateVodSourceResponse_lastModifiedTime :: Lens.Lens' UpdateVodSourceResponse (Prelude.Maybe Prelude.UTCTime)
updateVodSourceResponse_lastModifiedTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> UpdateVodSourceResponse -> f UpdateVodSourceResponse
updateVodSourceResponse_lastModifiedTime = (UpdateVodSourceResponse -> Maybe POSIX)
-> (UpdateVodSourceResponse
    -> Maybe POSIX -> UpdateVodSourceResponse)
-> Lens
     UpdateVodSourceResponse
     UpdateVodSourceResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateVodSourceResponse' {Maybe POSIX
lastModifiedTime :: Maybe POSIX
$sel:lastModifiedTime:UpdateVodSourceResponse' :: UpdateVodSourceResponse -> Maybe POSIX
lastModifiedTime} -> Maybe POSIX
lastModifiedTime) (\s :: UpdateVodSourceResponse
s@UpdateVodSourceResponse' {} Maybe POSIX
a -> UpdateVodSourceResponse
s {$sel:lastModifiedTime:UpdateVodSourceResponse' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
a} :: UpdateVodSourceResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> UpdateVodSourceResponse -> f UpdateVodSourceResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> UpdateVodSourceResponse
-> f UpdateVodSourceResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The HTTP package configurations.
updateVodSourceResponse_httpPackageConfigurations :: Lens.Lens' UpdateVodSourceResponse (Prelude.Maybe [HttpPackageConfiguration])
updateVodSourceResponse_httpPackageConfigurations :: (Maybe [HttpPackageConfiguration]
 -> f (Maybe [HttpPackageConfiguration]))
-> UpdateVodSourceResponse -> f UpdateVodSourceResponse
updateVodSourceResponse_httpPackageConfigurations = (UpdateVodSourceResponse -> Maybe [HttpPackageConfiguration])
-> (UpdateVodSourceResponse
    -> Maybe [HttpPackageConfiguration] -> UpdateVodSourceResponse)
-> Lens
     UpdateVodSourceResponse
     UpdateVodSourceResponse
     (Maybe [HttpPackageConfiguration])
     (Maybe [HttpPackageConfiguration])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateVodSourceResponse' {Maybe [HttpPackageConfiguration]
httpPackageConfigurations :: Maybe [HttpPackageConfiguration]
$sel:httpPackageConfigurations:UpdateVodSourceResponse' :: UpdateVodSourceResponse -> Maybe [HttpPackageConfiguration]
httpPackageConfigurations} -> Maybe [HttpPackageConfiguration]
httpPackageConfigurations) (\s :: UpdateVodSourceResponse
s@UpdateVodSourceResponse' {} Maybe [HttpPackageConfiguration]
a -> UpdateVodSourceResponse
s {$sel:httpPackageConfigurations:UpdateVodSourceResponse' :: Maybe [HttpPackageConfiguration]
httpPackageConfigurations = Maybe [HttpPackageConfiguration]
a} :: UpdateVodSourceResponse) ((Maybe [HttpPackageConfiguration]
  -> f (Maybe [HttpPackageConfiguration]))
 -> UpdateVodSourceResponse -> f UpdateVodSourceResponse)
-> ((Maybe [HttpPackageConfiguration]
     -> f (Maybe [HttpPackageConfiguration]))
    -> Maybe [HttpPackageConfiguration]
    -> f (Maybe [HttpPackageConfiguration]))
-> (Maybe [HttpPackageConfiguration]
    -> f (Maybe [HttpPackageConfiguration]))
-> UpdateVodSourceResponse
-> f UpdateVodSourceResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [HttpPackageConfiguration]
  [HttpPackageConfiguration]
  [HttpPackageConfiguration]
  [HttpPackageConfiguration]
-> Iso
     (Maybe [HttpPackageConfiguration])
     (Maybe [HttpPackageConfiguration])
     (Maybe [HttpPackageConfiguration])
     (Maybe [HttpPackageConfiguration])
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
  [HttpPackageConfiguration]
  [HttpPackageConfiguration]
  [HttpPackageConfiguration]
  [HttpPackageConfiguration]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of the VOD source.
updateVodSourceResponse_vodSourceName :: Lens.Lens' UpdateVodSourceResponse (Prelude.Maybe Prelude.Text)
updateVodSourceResponse_vodSourceName :: (Maybe Text -> f (Maybe Text))
-> UpdateVodSourceResponse -> f UpdateVodSourceResponse
updateVodSourceResponse_vodSourceName = (UpdateVodSourceResponse -> Maybe Text)
-> (UpdateVodSourceResponse
    -> Maybe Text -> UpdateVodSourceResponse)
-> Lens
     UpdateVodSourceResponse
     UpdateVodSourceResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateVodSourceResponse' {Maybe Text
vodSourceName :: Maybe Text
$sel:vodSourceName:UpdateVodSourceResponse' :: UpdateVodSourceResponse -> Maybe Text
vodSourceName} -> Maybe Text
vodSourceName) (\s :: UpdateVodSourceResponse
s@UpdateVodSourceResponse' {} Maybe Text
a -> UpdateVodSourceResponse
s {$sel:vodSourceName:UpdateVodSourceResponse' :: Maybe Text
vodSourceName = Maybe Text
a} :: UpdateVodSourceResponse)

-- | The tags assigned to the VOD source.
updateVodSourceResponse_tags :: Lens.Lens' UpdateVodSourceResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
updateVodSourceResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> UpdateVodSourceResponse -> f UpdateVodSourceResponse
updateVodSourceResponse_tags = (UpdateVodSourceResponse -> Maybe (HashMap Text Text))
-> (UpdateVodSourceResponse
    -> Maybe (HashMap Text Text) -> UpdateVodSourceResponse)
-> Lens
     UpdateVodSourceResponse
     UpdateVodSourceResponse
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateVodSourceResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:UpdateVodSourceResponse' :: UpdateVodSourceResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: UpdateVodSourceResponse
s@UpdateVodSourceResponse' {} Maybe (HashMap Text Text)
a -> UpdateVodSourceResponse
s {$sel:tags:UpdateVodSourceResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: UpdateVodSourceResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> UpdateVodSourceResponse -> f UpdateVodSourceResponse)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> UpdateVodSourceResponse
-> f UpdateVodSourceResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
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
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData UpdateVodSourceResponse