{-# 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.GameLift.Types.Build where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.GameLift.Types.BuildStatus
import Amazonka.GameLift.Types.OperatingSystem
import qualified Amazonka.Prelude as Prelude
data Build = Build'
{
Build -> Maybe Text
buildArn :: Prelude.Maybe Prelude.Text,
Build -> Maybe Text
buildId :: Prelude.Maybe Prelude.Text,
Build -> Maybe POSIX
creationTime :: Prelude.Maybe Data.POSIX,
Build -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
Build -> Maybe OperatingSystem
operatingSystem :: Prelude.Maybe OperatingSystem,
Build -> Maybe Text
serverSdkVersion :: Prelude.Maybe Prelude.Text,
Build -> Maybe Natural
sizeOnDisk :: Prelude.Maybe Prelude.Natural,
Build -> Maybe BuildStatus
status :: Prelude.Maybe BuildStatus,
Build -> Maybe Text
version :: Prelude.Maybe Prelude.Text
}
deriving (Build -> Build -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Build -> Build -> Bool
$c/= :: Build -> Build -> Bool
== :: Build -> Build -> Bool
$c== :: Build -> Build -> Bool
Prelude.Eq, ReadPrec [Build]
ReadPrec Build
Int -> ReadS Build
ReadS [Build]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Build]
$creadListPrec :: ReadPrec [Build]
readPrec :: ReadPrec Build
$creadPrec :: ReadPrec Build
readList :: ReadS [Build]
$creadList :: ReadS [Build]
readsPrec :: Int -> ReadS Build
$creadsPrec :: Int -> ReadS Build
Prelude.Read, Int -> Build -> ShowS
[Build] -> ShowS
Build -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Build] -> ShowS
$cshowList :: [Build] -> ShowS
show :: Build -> String
$cshow :: Build -> String
showsPrec :: Int -> Build -> ShowS
$cshowsPrec :: Int -> Build -> ShowS
Prelude.Show, forall x. Rep Build x -> Build
forall x. Build -> Rep Build x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Build x -> Build
$cfrom :: forall x. Build -> Rep Build x
Prelude.Generic)
newBuild ::
Build
newBuild :: Build
newBuild =
Build'
{ $sel:buildArn:Build' :: Maybe Text
buildArn = forall a. Maybe a
Prelude.Nothing,
$sel:buildId:Build' :: Maybe Text
buildId = forall a. Maybe a
Prelude.Nothing,
$sel:creationTime:Build' :: Maybe POSIX
creationTime = forall a. Maybe a
Prelude.Nothing,
$sel:name:Build' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:operatingSystem:Build' :: Maybe OperatingSystem
operatingSystem = forall a. Maybe a
Prelude.Nothing,
$sel:serverSdkVersion:Build' :: Maybe Text
serverSdkVersion = forall a. Maybe a
Prelude.Nothing,
$sel:sizeOnDisk:Build' :: Maybe Natural
sizeOnDisk = forall a. Maybe a
Prelude.Nothing,
$sel:status:Build' :: Maybe BuildStatus
status = forall a. Maybe a
Prelude.Nothing,
$sel:version:Build' :: Maybe Text
version = forall a. Maybe a
Prelude.Nothing
}
build_buildArn :: Lens.Lens' Build (Prelude.Maybe Prelude.Text)
build_buildArn :: Lens' Build (Maybe Text)
build_buildArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Build' {Maybe Text
buildArn :: Maybe Text
$sel:buildArn:Build' :: Build -> Maybe Text
buildArn} -> Maybe Text
buildArn) (\s :: Build
s@Build' {} Maybe Text
a -> Build
s {$sel:buildArn:Build' :: Maybe Text
buildArn = Maybe Text
a} :: Build)
build_buildId :: Lens.Lens' Build (Prelude.Maybe Prelude.Text)
build_buildId :: Lens' Build (Maybe Text)
build_buildId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Build' {Maybe Text
buildId :: Maybe Text
$sel:buildId:Build' :: Build -> Maybe Text
buildId} -> Maybe Text
buildId) (\s :: Build
s@Build' {} Maybe Text
a -> Build
s {$sel:buildId:Build' :: Maybe Text
buildId = Maybe Text
a} :: Build)
build_creationTime :: Lens.Lens' Build (Prelude.Maybe Prelude.UTCTime)
build_creationTime :: Lens' Build (Maybe UTCTime)
build_creationTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Build' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:Build' :: Build -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: Build
s@Build' {} Maybe POSIX
a -> Build
s {$sel:creationTime:Build' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: Build) 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
build_name :: Lens.Lens' Build (Prelude.Maybe Prelude.Text)
build_name :: Lens' Build (Maybe Text)
build_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Build' {Maybe Text
name :: Maybe Text
$sel:name:Build' :: Build -> Maybe Text
name} -> Maybe Text
name) (\s :: Build
s@Build' {} Maybe Text
a -> Build
s {$sel:name:Build' :: Maybe Text
name = Maybe Text
a} :: Build)
build_operatingSystem :: Lens.Lens' Build (Prelude.Maybe OperatingSystem)
build_operatingSystem :: Lens' Build (Maybe OperatingSystem)
build_operatingSystem = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Build' {Maybe OperatingSystem
operatingSystem :: Maybe OperatingSystem
$sel:operatingSystem:Build' :: Build -> Maybe OperatingSystem
operatingSystem} -> Maybe OperatingSystem
operatingSystem) (\s :: Build
s@Build' {} Maybe OperatingSystem
a -> Build
s {$sel:operatingSystem:Build' :: Maybe OperatingSystem
operatingSystem = Maybe OperatingSystem
a} :: Build)
build_serverSdkVersion :: Lens.Lens' Build (Prelude.Maybe Prelude.Text)
build_serverSdkVersion :: Lens' Build (Maybe Text)
build_serverSdkVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Build' {Maybe Text
serverSdkVersion :: Maybe Text
$sel:serverSdkVersion:Build' :: Build -> Maybe Text
serverSdkVersion} -> Maybe Text
serverSdkVersion) (\s :: Build
s@Build' {} Maybe Text
a -> Build
s {$sel:serverSdkVersion:Build' :: Maybe Text
serverSdkVersion = Maybe Text
a} :: Build)
build_sizeOnDisk :: Lens.Lens' Build (Prelude.Maybe Prelude.Natural)
build_sizeOnDisk :: Lens' Build (Maybe Natural)
build_sizeOnDisk = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Build' {Maybe Natural
sizeOnDisk :: Maybe Natural
$sel:sizeOnDisk:Build' :: Build -> Maybe Natural
sizeOnDisk} -> Maybe Natural
sizeOnDisk) (\s :: Build
s@Build' {} Maybe Natural
a -> Build
s {$sel:sizeOnDisk:Build' :: Maybe Natural
sizeOnDisk = Maybe Natural
a} :: Build)
build_status :: Lens.Lens' Build (Prelude.Maybe BuildStatus)
build_status :: Lens' Build (Maybe BuildStatus)
build_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Build' {Maybe BuildStatus
status :: Maybe BuildStatus
$sel:status:Build' :: Build -> Maybe BuildStatus
status} -> Maybe BuildStatus
status) (\s :: Build
s@Build' {} Maybe BuildStatus
a -> Build
s {$sel:status:Build' :: Maybe BuildStatus
status = Maybe BuildStatus
a} :: Build)
build_version :: Lens.Lens' Build (Prelude.Maybe Prelude.Text)
build_version :: Lens' Build (Maybe Text)
build_version = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Build' {Maybe Text
version :: Maybe Text
$sel:version:Build' :: Build -> Maybe Text
version} -> Maybe Text
version) (\s :: Build
s@Build' {} Maybe Text
a -> Build
s {$sel:version:Build' :: Maybe Text
version = Maybe Text
a} :: Build)
instance Data.FromJSON Build where
parseJSON :: Value -> Parser Build
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"Build"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe OperatingSystem
-> Maybe Text
-> Maybe Natural
-> Maybe BuildStatus
-> Maybe Text
-> Build
Build'
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
"BuildArn")
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
"BuildId")
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
"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
"OperatingSystem")
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
"ServerSdkVersion")
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
"SizeOnDisk")
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")
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
"Version")
)
instance Prelude.Hashable Build where
hashWithSalt :: Int -> Build -> Int
hashWithSalt Int
_salt Build' {Maybe Natural
Maybe Text
Maybe POSIX
Maybe BuildStatus
Maybe OperatingSystem
version :: Maybe Text
status :: Maybe BuildStatus
sizeOnDisk :: Maybe Natural
serverSdkVersion :: Maybe Text
operatingSystem :: Maybe OperatingSystem
name :: Maybe Text
creationTime :: Maybe POSIX
buildId :: Maybe Text
buildArn :: Maybe Text
$sel:version:Build' :: Build -> Maybe Text
$sel:status:Build' :: Build -> Maybe BuildStatus
$sel:sizeOnDisk:Build' :: Build -> Maybe Natural
$sel:serverSdkVersion:Build' :: Build -> Maybe Text
$sel:operatingSystem:Build' :: Build -> Maybe OperatingSystem
$sel:name:Build' :: Build -> Maybe Text
$sel:creationTime:Build' :: Build -> Maybe POSIX
$sel:buildId:Build' :: Build -> Maybe Text
$sel:buildArn:Build' :: Build -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
buildArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
buildId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
creationTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe OperatingSystem
operatingSystem
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
serverSdkVersion
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
sizeOnDisk
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe BuildStatus
status
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
version
instance Prelude.NFData Build where
rnf :: Build -> ()
rnf Build' {Maybe Natural
Maybe Text
Maybe POSIX
Maybe BuildStatus
Maybe OperatingSystem
version :: Maybe Text
status :: Maybe BuildStatus
sizeOnDisk :: Maybe Natural
serverSdkVersion :: Maybe Text
operatingSystem :: Maybe OperatingSystem
name :: Maybe Text
creationTime :: Maybe POSIX
buildId :: Maybe Text
buildArn :: Maybe Text
$sel:version:Build' :: Build -> Maybe Text
$sel:status:Build' :: Build -> Maybe BuildStatus
$sel:sizeOnDisk:Build' :: Build -> Maybe Natural
$sel:serverSdkVersion:Build' :: Build -> Maybe Text
$sel:operatingSystem:Build' :: Build -> Maybe OperatingSystem
$sel:name:Build' :: Build -> Maybe Text
$sel:creationTime:Build' :: Build -> Maybe POSIX
$sel:buildId:Build' :: Build -> Maybe Text
$sel:buildArn:Build' :: Build -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
buildArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
buildId
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
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe OperatingSystem
operatingSystem
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
serverSdkVersion
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
sizeOnDisk
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe BuildStatus
status
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
version