{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.MediaTailor.Types.VodSource where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MediaTailor.Types.HttpPackageConfiguration
import qualified Amazonka.Prelude as Prelude
data VodSource = VodSource'
{
VodSource -> Maybe POSIX
creationTime :: Prelude.Maybe Data.POSIX,
VodSource -> Maybe POSIX
lastModifiedTime :: Prelude.Maybe Data.POSIX,
VodSource -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
VodSource -> Text
arn :: Prelude.Text,
VodSource -> [HttpPackageConfiguration]
httpPackageConfigurations :: [HttpPackageConfiguration],
VodSource -> Text
sourceLocationName :: Prelude.Text,
VodSource -> Text
vodSourceName :: Prelude.Text
}
deriving (VodSource -> VodSource -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VodSource -> VodSource -> Bool
$c/= :: VodSource -> VodSource -> Bool
== :: VodSource -> VodSource -> Bool
$c== :: VodSource -> VodSource -> Bool
Prelude.Eq, ReadPrec [VodSource]
ReadPrec VodSource
Int -> ReadS VodSource
ReadS [VodSource]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VodSource]
$creadListPrec :: ReadPrec [VodSource]
readPrec :: ReadPrec VodSource
$creadPrec :: ReadPrec VodSource
readList :: ReadS [VodSource]
$creadList :: ReadS [VodSource]
readsPrec :: Int -> ReadS VodSource
$creadsPrec :: Int -> ReadS VodSource
Prelude.Read, Int -> VodSource -> ShowS
[VodSource] -> ShowS
VodSource -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VodSource] -> ShowS
$cshowList :: [VodSource] -> ShowS
show :: VodSource -> String
$cshow :: VodSource -> String
showsPrec :: Int -> VodSource -> ShowS
$cshowsPrec :: Int -> VodSource -> ShowS
Prelude.Show, forall x. Rep VodSource x -> VodSource
forall x. VodSource -> Rep VodSource x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep VodSource x -> VodSource
$cfrom :: forall x. VodSource -> Rep VodSource x
Prelude.Generic)
newVodSource ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
VodSource
newVodSource :: Text -> Text -> Text -> VodSource
newVodSource
Text
pArn_
Text
pSourceLocationName_
Text
pVodSourceName_ =
VodSource'
{ $sel:creationTime:VodSource' :: Maybe POSIX
creationTime = forall a. Maybe a
Prelude.Nothing,
$sel:lastModifiedTime:VodSource' :: Maybe POSIX
lastModifiedTime = forall a. Maybe a
Prelude.Nothing,
$sel:tags:VodSource' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
$sel:arn:VodSource' :: Text
arn = Text
pArn_,
$sel:httpPackageConfigurations:VodSource' :: [HttpPackageConfiguration]
httpPackageConfigurations = forall a. Monoid a => a
Prelude.mempty,
$sel:sourceLocationName:VodSource' :: Text
sourceLocationName = Text
pSourceLocationName_,
$sel:vodSourceName:VodSource' :: Text
vodSourceName = Text
pVodSourceName_
}
vodSource_creationTime :: Lens.Lens' VodSource (Prelude.Maybe Prelude.UTCTime)
vodSource_creationTime :: Lens' VodSource (Maybe UTCTime)
vodSource_creationTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VodSource' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:VodSource' :: VodSource -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: VodSource
s@VodSource' {} Maybe POSIX
a -> VodSource
s {$sel:creationTime:VodSource' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: VodSource) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
vodSource_lastModifiedTime :: Lens.Lens' VodSource (Prelude.Maybe Prelude.UTCTime)
vodSource_lastModifiedTime :: Lens' VodSource (Maybe UTCTime)
vodSource_lastModifiedTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VodSource' {Maybe POSIX
lastModifiedTime :: Maybe POSIX
$sel:lastModifiedTime:VodSource' :: VodSource -> Maybe POSIX
lastModifiedTime} -> Maybe POSIX
lastModifiedTime) (\s :: VodSource
s@VodSource' {} Maybe POSIX
a -> VodSource
s {$sel:lastModifiedTime:VodSource' :: Maybe POSIX
lastModifiedTime = Maybe POSIX
a} :: VodSource) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
vodSource_tags :: Lens.Lens' VodSource (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
vodSource_tags :: Lens' VodSource (Maybe (HashMap Text Text))
vodSource_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VodSource' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:VodSource' :: VodSource -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: VodSource
s@VodSource' {} Maybe (HashMap Text Text)
a -> VodSource
s {$sel:tags:VodSource' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: VodSource) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
vodSource_arn :: Lens.Lens' VodSource Prelude.Text
vodSource_arn :: Lens' VodSource Text
vodSource_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VodSource' {Text
arn :: Text
$sel:arn:VodSource' :: VodSource -> Text
arn} -> Text
arn) (\s :: VodSource
s@VodSource' {} Text
a -> VodSource
s {$sel:arn:VodSource' :: Text
arn = Text
a} :: VodSource)
vodSource_httpPackageConfigurations :: Lens.Lens' VodSource [HttpPackageConfiguration]
vodSource_httpPackageConfigurations :: Lens' VodSource [HttpPackageConfiguration]
vodSource_httpPackageConfigurations = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VodSource' {[HttpPackageConfiguration]
httpPackageConfigurations :: [HttpPackageConfiguration]
$sel:httpPackageConfigurations:VodSource' :: VodSource -> [HttpPackageConfiguration]
httpPackageConfigurations} -> [HttpPackageConfiguration]
httpPackageConfigurations) (\s :: VodSource
s@VodSource' {} [HttpPackageConfiguration]
a -> VodSource
s {$sel:httpPackageConfigurations:VodSource' :: [HttpPackageConfiguration]
httpPackageConfigurations = [HttpPackageConfiguration]
a} :: VodSource) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
vodSource_sourceLocationName :: Lens.Lens' VodSource Prelude.Text
vodSource_sourceLocationName :: Lens' VodSource Text
vodSource_sourceLocationName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VodSource' {Text
sourceLocationName :: Text
$sel:sourceLocationName:VodSource' :: VodSource -> Text
sourceLocationName} -> Text
sourceLocationName) (\s :: VodSource
s@VodSource' {} Text
a -> VodSource
s {$sel:sourceLocationName:VodSource' :: Text
sourceLocationName = Text
a} :: VodSource)
vodSource_vodSourceName :: Lens.Lens' VodSource Prelude.Text
vodSource_vodSourceName :: Lens' VodSource Text
vodSource_vodSourceName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VodSource' {Text
vodSourceName :: Text
$sel:vodSourceName:VodSource' :: VodSource -> Text
vodSourceName} -> Text
vodSourceName) (\s :: VodSource
s@VodSource' {} Text
a -> VodSource
s {$sel:vodSourceName:VodSource' :: Text
vodSourceName = Text
a} :: VodSource)
instance Data.FromJSON VodSource where
parseJSON :: Value -> Parser VodSource
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"VodSource"
( \Object
x ->
Maybe POSIX
-> Maybe POSIX
-> Maybe (HashMap Text Text)
-> Text
-> [HttpPackageConfiguration]
-> Text
-> Text
-> VodSource
VodSource'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"CreationTime")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"LastModifiedTime")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"tags" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"Arn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"HttpPackageConfigurations"
forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"SourceLocationName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"VodSourceName")
)
instance Prelude.Hashable VodSource where
hashWithSalt :: Int -> VodSource -> Int
hashWithSalt Int
_salt VodSource' {[HttpPackageConfiguration]
Maybe (HashMap Text Text)
Maybe POSIX
Text
vodSourceName :: Text
sourceLocationName :: Text
httpPackageConfigurations :: [HttpPackageConfiguration]
arn :: Text
tags :: Maybe (HashMap Text Text)
lastModifiedTime :: Maybe POSIX
creationTime :: Maybe POSIX
$sel:vodSourceName:VodSource' :: VodSource -> Text
$sel:sourceLocationName:VodSource' :: VodSource -> Text
$sel:httpPackageConfigurations:VodSource' :: VodSource -> [HttpPackageConfiguration]
$sel:arn:VodSource' :: VodSource -> Text
$sel:tags:VodSource' :: VodSource -> Maybe (HashMap Text Text)
$sel:lastModifiedTime:VodSource' :: VodSource -> Maybe POSIX
$sel:creationTime:VodSource' :: VodSource -> Maybe POSIX
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
creationTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
lastModifiedTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
arn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [HttpPackageConfiguration]
httpPackageConfigurations
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
sourceLocationName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
vodSourceName
instance Prelude.NFData VodSource where
rnf :: VodSource -> ()
rnf VodSource' {[HttpPackageConfiguration]
Maybe (HashMap Text Text)
Maybe POSIX
Text
vodSourceName :: Text
sourceLocationName :: Text
httpPackageConfigurations :: [HttpPackageConfiguration]
arn :: Text
tags :: Maybe (HashMap Text Text)
lastModifiedTime :: Maybe POSIX
creationTime :: Maybe POSIX
$sel:vodSourceName:VodSource' :: VodSource -> Text
$sel:sourceLocationName:VodSource' :: VodSource -> Text
$sel:httpPackageConfigurations:VodSource' :: VodSource -> [HttpPackageConfiguration]
$sel:arn:VodSource' :: VodSource -> Text
$sel:tags:VodSource' :: VodSource -> Maybe (HashMap Text Text)
$sel:lastModifiedTime:VodSource' :: VodSource -> Maybe POSIX
$sel:creationTime:VodSource' :: VodSource -> Maybe POSIX
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
creationTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
lastModifiedTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
arn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [HttpPackageConfiguration]
httpPackageConfigurations
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
sourceLocationName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
vodSourceName