{-# 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.MediaStore.Types.Container where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MediaStore.Types.ContainerStatus
import qualified Amazonka.Prelude as Prelude
data Container = Container'
{
Container -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
Container -> Maybe Bool
accessLoggingEnabled :: Prelude.Maybe Prelude.Bool,
Container -> Maybe POSIX
creationTime :: Prelude.Maybe Data.POSIX,
Container -> Maybe Text
endpoint :: Prelude.Maybe Prelude.Text,
Container -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
Container -> Maybe ContainerStatus
status :: Prelude.Maybe ContainerStatus
}
deriving (Container -> Container -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Container -> Container -> Bool
$c/= :: Container -> Container -> Bool
== :: Container -> Container -> Bool
$c== :: Container -> Container -> Bool
Prelude.Eq, ReadPrec [Container]
ReadPrec Container
Int -> ReadS Container
ReadS [Container]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Container]
$creadListPrec :: ReadPrec [Container]
readPrec :: ReadPrec Container
$creadPrec :: ReadPrec Container
readList :: ReadS [Container]
$creadList :: ReadS [Container]
readsPrec :: Int -> ReadS Container
$creadsPrec :: Int -> ReadS Container
Prelude.Read, Int -> Container -> ShowS
[Container] -> ShowS
Container -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Container] -> ShowS
$cshowList :: [Container] -> ShowS
show :: Container -> String
$cshow :: Container -> String
showsPrec :: Int -> Container -> ShowS
$cshowsPrec :: Int -> Container -> ShowS
Prelude.Show, forall x. Rep Container x -> Container
forall x. Container -> Rep Container x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Container x -> Container
$cfrom :: forall x. Container -> Rep Container x
Prelude.Generic)
newContainer ::
Container
newContainer :: Container
newContainer =
Container'
{ $sel:arn:Container' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
$sel:accessLoggingEnabled:Container' :: Maybe Bool
accessLoggingEnabled = forall a. Maybe a
Prelude.Nothing,
$sel:creationTime:Container' :: Maybe POSIX
creationTime = forall a. Maybe a
Prelude.Nothing,
$sel:endpoint:Container' :: Maybe Text
endpoint = forall a. Maybe a
Prelude.Nothing,
$sel:name:Container' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:status:Container' :: Maybe ContainerStatus
status = forall a. Maybe a
Prelude.Nothing
}
container_arn :: Lens.Lens' Container (Prelude.Maybe Prelude.Text)
container_arn :: Lens' Container (Maybe Text)
container_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Container' {Maybe Text
arn :: Maybe Text
$sel:arn:Container' :: Container -> Maybe Text
arn} -> Maybe Text
arn) (\s :: Container
s@Container' {} Maybe Text
a -> Container
s {$sel:arn:Container' :: Maybe Text
arn = Maybe Text
a} :: Container)
container_accessLoggingEnabled :: Lens.Lens' Container (Prelude.Maybe Prelude.Bool)
container_accessLoggingEnabled :: Lens' Container (Maybe Bool)
container_accessLoggingEnabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Container' {Maybe Bool
accessLoggingEnabled :: Maybe Bool
$sel:accessLoggingEnabled:Container' :: Container -> Maybe Bool
accessLoggingEnabled} -> Maybe Bool
accessLoggingEnabled) (\s :: Container
s@Container' {} Maybe Bool
a -> Container
s {$sel:accessLoggingEnabled:Container' :: Maybe Bool
accessLoggingEnabled = Maybe Bool
a} :: Container)
container_creationTime :: Lens.Lens' Container (Prelude.Maybe Prelude.UTCTime)
container_creationTime :: Lens' Container (Maybe UTCTime)
container_creationTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Container' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:Container' :: Container -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: Container
s@Container' {} Maybe POSIX
a -> Container
s {$sel:creationTime:Container' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: Container) 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
container_endpoint :: Lens.Lens' Container (Prelude.Maybe Prelude.Text)
container_endpoint :: Lens' Container (Maybe Text)
container_endpoint = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Container' {Maybe Text
endpoint :: Maybe Text
$sel:endpoint:Container' :: Container -> Maybe Text
endpoint} -> Maybe Text
endpoint) (\s :: Container
s@Container' {} Maybe Text
a -> Container
s {$sel:endpoint:Container' :: Maybe Text
endpoint = Maybe Text
a} :: Container)
container_name :: Lens.Lens' Container (Prelude.Maybe Prelude.Text)
container_name :: Lens' Container (Maybe Text)
container_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Container' {Maybe Text
name :: Maybe Text
$sel:name:Container' :: Container -> Maybe Text
name} -> Maybe Text
name) (\s :: Container
s@Container' {} Maybe Text
a -> Container
s {$sel:name:Container' :: Maybe Text
name = Maybe Text
a} :: Container)
container_status :: Lens.Lens' Container (Prelude.Maybe ContainerStatus)
container_status :: Lens' Container (Maybe ContainerStatus)
container_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Container' {Maybe ContainerStatus
status :: Maybe ContainerStatus
$sel:status:Container' :: Container -> Maybe ContainerStatus
status} -> Maybe ContainerStatus
status) (\s :: Container
s@Container' {} Maybe ContainerStatus
a -> Container
s {$sel:status:Container' :: Maybe ContainerStatus
status = Maybe ContainerStatus
a} :: Container)
instance Data.FromJSON Container where
parseJSON :: Value -> Parser Container
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"Container"
( \Object
x ->
Maybe Text
-> Maybe Bool
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe ContainerStatus
-> Container
Container'
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
"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
"AccessLoggingEnabled")
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
"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
"Endpoint")
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
"Name")
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
"Status")
)
instance Prelude.Hashable Container where
hashWithSalt :: Int -> Container -> Int
hashWithSalt Int
_salt Container' {Maybe Bool
Maybe Text
Maybe POSIX
Maybe ContainerStatus
status :: Maybe ContainerStatus
name :: Maybe Text
endpoint :: Maybe Text
creationTime :: Maybe POSIX
accessLoggingEnabled :: Maybe Bool
arn :: Maybe Text
$sel:status:Container' :: Container -> Maybe ContainerStatus
$sel:name:Container' :: Container -> Maybe Text
$sel:endpoint:Container' :: Container -> Maybe Text
$sel:creationTime:Container' :: Container -> Maybe POSIX
$sel:accessLoggingEnabled:Container' :: Container -> Maybe Bool
$sel:arn:Container' :: Container -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
accessLoggingEnabled
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
creationTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
endpoint
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ContainerStatus
status
instance Prelude.NFData Container where
rnf :: Container -> ()
rnf Container' {Maybe Bool
Maybe Text
Maybe POSIX
Maybe ContainerStatus
status :: Maybe ContainerStatus
name :: Maybe Text
endpoint :: Maybe Text
creationTime :: Maybe POSIX
accessLoggingEnabled :: Maybe Bool
arn :: Maybe Text
$sel:status:Container' :: Container -> Maybe ContainerStatus
$sel:name:Container' :: Container -> Maybe Text
$sel:endpoint:Container' :: Container -> Maybe Text
$sel:creationTime:Container' :: Container -> Maybe POSIX
$sel:accessLoggingEnabled:Container' :: Container -> Maybe Bool
$sel:arn:Container' :: Container -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
accessLoggingEnabled
seq :: forall a b. a -> b -> b
`Prelude.seq` 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 Text
endpoint
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ContainerStatus
status