{-# 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.Compute 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.ComputeStatus
import Amazonka.GameLift.Types.EC2InstanceType
import Amazonka.GameLift.Types.OperatingSystem
import qualified Amazonka.Prelude as Prelude
data Compute = Compute'
{
Compute -> Maybe Text
computeArn :: Prelude.Maybe Prelude.Text,
Compute -> Maybe Text
computeName :: Prelude.Maybe Prelude.Text,
Compute -> Maybe ComputeStatus
computeStatus :: Prelude.Maybe ComputeStatus,
Compute -> Maybe POSIX
creationTime :: Prelude.Maybe Data.POSIX,
Compute -> Maybe Text
dnsName :: Prelude.Maybe Prelude.Text,
Compute -> Maybe Text
fleetArn :: Prelude.Maybe Prelude.Text,
Compute -> Maybe Text
fleetId :: Prelude.Maybe Prelude.Text,
Compute -> Maybe Text
gameLiftServiceSdkEndpoint :: Prelude.Maybe Prelude.Text,
Compute -> Maybe Text
ipAddress :: Prelude.Maybe Prelude.Text,
Compute -> Maybe Text
location :: Prelude.Maybe Prelude.Text,
Compute -> Maybe OperatingSystem
operatingSystem :: Prelude.Maybe OperatingSystem,
Compute -> Maybe EC2InstanceType
type' :: Prelude.Maybe EC2InstanceType
}
deriving (Compute -> Compute -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Compute -> Compute -> Bool
$c/= :: Compute -> Compute -> Bool
== :: Compute -> Compute -> Bool
$c== :: Compute -> Compute -> Bool
Prelude.Eq, ReadPrec [Compute]
ReadPrec Compute
Int -> ReadS Compute
ReadS [Compute]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Compute]
$creadListPrec :: ReadPrec [Compute]
readPrec :: ReadPrec Compute
$creadPrec :: ReadPrec Compute
readList :: ReadS [Compute]
$creadList :: ReadS [Compute]
readsPrec :: Int -> ReadS Compute
$creadsPrec :: Int -> ReadS Compute
Prelude.Read, Int -> Compute -> ShowS
[Compute] -> ShowS
Compute -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Compute] -> ShowS
$cshowList :: [Compute] -> ShowS
show :: Compute -> String
$cshow :: Compute -> String
showsPrec :: Int -> Compute -> ShowS
$cshowsPrec :: Int -> Compute -> ShowS
Prelude.Show, forall x. Rep Compute x -> Compute
forall x. Compute -> Rep Compute x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Compute x -> Compute
$cfrom :: forall x. Compute -> Rep Compute x
Prelude.Generic)
newCompute ::
Compute
newCompute :: Compute
newCompute =
Compute'
{ $sel:computeArn:Compute' :: Maybe Text
computeArn = forall a. Maybe a
Prelude.Nothing,
$sel:computeName:Compute' :: Maybe Text
computeName = forall a. Maybe a
Prelude.Nothing,
$sel:computeStatus:Compute' :: Maybe ComputeStatus
computeStatus = forall a. Maybe a
Prelude.Nothing,
$sel:creationTime:Compute' :: Maybe POSIX
creationTime = forall a. Maybe a
Prelude.Nothing,
$sel:dnsName:Compute' :: Maybe Text
dnsName = forall a. Maybe a
Prelude.Nothing,
$sel:fleetArn:Compute' :: Maybe Text
fleetArn = forall a. Maybe a
Prelude.Nothing,
$sel:fleetId:Compute' :: Maybe Text
fleetId = forall a. Maybe a
Prelude.Nothing,
$sel:gameLiftServiceSdkEndpoint:Compute' :: Maybe Text
gameLiftServiceSdkEndpoint = forall a. Maybe a
Prelude.Nothing,
$sel:ipAddress:Compute' :: Maybe Text
ipAddress = forall a. Maybe a
Prelude.Nothing,
$sel:location:Compute' :: Maybe Text
location = forall a. Maybe a
Prelude.Nothing,
$sel:operatingSystem:Compute' :: Maybe OperatingSystem
operatingSystem = forall a. Maybe a
Prelude.Nothing,
$sel:type':Compute' :: Maybe EC2InstanceType
type' = forall a. Maybe a
Prelude.Nothing
}
compute_computeArn :: Lens.Lens' Compute (Prelude.Maybe Prelude.Text)
compute_computeArn :: Lens' Compute (Maybe Text)
compute_computeArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Compute' {Maybe Text
computeArn :: Maybe Text
$sel:computeArn:Compute' :: Compute -> Maybe Text
computeArn} -> Maybe Text
computeArn) (\s :: Compute
s@Compute' {} Maybe Text
a -> Compute
s {$sel:computeArn:Compute' :: Maybe Text
computeArn = Maybe Text
a} :: Compute)
compute_computeName :: Lens.Lens' Compute (Prelude.Maybe Prelude.Text)
compute_computeName :: Lens' Compute (Maybe Text)
compute_computeName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Compute' {Maybe Text
computeName :: Maybe Text
$sel:computeName:Compute' :: Compute -> Maybe Text
computeName} -> Maybe Text
computeName) (\s :: Compute
s@Compute' {} Maybe Text
a -> Compute
s {$sel:computeName:Compute' :: Maybe Text
computeName = Maybe Text
a} :: Compute)
compute_computeStatus :: Lens.Lens' Compute (Prelude.Maybe ComputeStatus)
compute_computeStatus :: Lens' Compute (Maybe ComputeStatus)
compute_computeStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Compute' {Maybe ComputeStatus
computeStatus :: Maybe ComputeStatus
$sel:computeStatus:Compute' :: Compute -> Maybe ComputeStatus
computeStatus} -> Maybe ComputeStatus
computeStatus) (\s :: Compute
s@Compute' {} Maybe ComputeStatus
a -> Compute
s {$sel:computeStatus:Compute' :: Maybe ComputeStatus
computeStatus = Maybe ComputeStatus
a} :: Compute)
compute_creationTime :: Lens.Lens' Compute (Prelude.Maybe Prelude.UTCTime)
compute_creationTime :: Lens' Compute (Maybe UTCTime)
compute_creationTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Compute' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:Compute' :: Compute -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: Compute
s@Compute' {} Maybe POSIX
a -> Compute
s {$sel:creationTime:Compute' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: Compute) 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
compute_dnsName :: Lens.Lens' Compute (Prelude.Maybe Prelude.Text)
compute_dnsName :: Lens' Compute (Maybe Text)
compute_dnsName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Compute' {Maybe Text
dnsName :: Maybe Text
$sel:dnsName:Compute' :: Compute -> Maybe Text
dnsName} -> Maybe Text
dnsName) (\s :: Compute
s@Compute' {} Maybe Text
a -> Compute
s {$sel:dnsName:Compute' :: Maybe Text
dnsName = Maybe Text
a} :: Compute)
compute_fleetArn :: Lens.Lens' Compute (Prelude.Maybe Prelude.Text)
compute_fleetArn :: Lens' Compute (Maybe Text)
compute_fleetArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Compute' {Maybe Text
fleetArn :: Maybe Text
$sel:fleetArn:Compute' :: Compute -> Maybe Text
fleetArn} -> Maybe Text
fleetArn) (\s :: Compute
s@Compute' {} Maybe Text
a -> Compute
s {$sel:fleetArn:Compute' :: Maybe Text
fleetArn = Maybe Text
a} :: Compute)
compute_fleetId :: Lens.Lens' Compute (Prelude.Maybe Prelude.Text)
compute_fleetId :: Lens' Compute (Maybe Text)
compute_fleetId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Compute' {Maybe Text
fleetId :: Maybe Text
$sel:fleetId:Compute' :: Compute -> Maybe Text
fleetId} -> Maybe Text
fleetId) (\s :: Compute
s@Compute' {} Maybe Text
a -> Compute
s {$sel:fleetId:Compute' :: Maybe Text
fleetId = Maybe Text
a} :: Compute)
compute_gameLiftServiceSdkEndpoint :: Lens.Lens' Compute (Prelude.Maybe Prelude.Text)
compute_gameLiftServiceSdkEndpoint :: Lens' Compute (Maybe Text)
compute_gameLiftServiceSdkEndpoint = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Compute' {Maybe Text
gameLiftServiceSdkEndpoint :: Maybe Text
$sel:gameLiftServiceSdkEndpoint:Compute' :: Compute -> Maybe Text
gameLiftServiceSdkEndpoint} -> Maybe Text
gameLiftServiceSdkEndpoint) (\s :: Compute
s@Compute' {} Maybe Text
a -> Compute
s {$sel:gameLiftServiceSdkEndpoint:Compute' :: Maybe Text
gameLiftServiceSdkEndpoint = Maybe Text
a} :: Compute)
compute_ipAddress :: Lens.Lens' Compute (Prelude.Maybe Prelude.Text)
compute_ipAddress :: Lens' Compute (Maybe Text)
compute_ipAddress = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Compute' {Maybe Text
ipAddress :: Maybe Text
$sel:ipAddress:Compute' :: Compute -> Maybe Text
ipAddress} -> Maybe Text
ipAddress) (\s :: Compute
s@Compute' {} Maybe Text
a -> Compute
s {$sel:ipAddress:Compute' :: Maybe Text
ipAddress = Maybe Text
a} :: Compute)
compute_location :: Lens.Lens' Compute (Prelude.Maybe Prelude.Text)
compute_location :: Lens' Compute (Maybe Text)
compute_location = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Compute' {Maybe Text
location :: Maybe Text
$sel:location:Compute' :: Compute -> Maybe Text
location} -> Maybe Text
location) (\s :: Compute
s@Compute' {} Maybe Text
a -> Compute
s {$sel:location:Compute' :: Maybe Text
location = Maybe Text
a} :: Compute)
compute_operatingSystem :: Lens.Lens' Compute (Prelude.Maybe OperatingSystem)
compute_operatingSystem :: Lens' Compute (Maybe OperatingSystem)
compute_operatingSystem = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Compute' {Maybe OperatingSystem
operatingSystem :: Maybe OperatingSystem
$sel:operatingSystem:Compute' :: Compute -> Maybe OperatingSystem
operatingSystem} -> Maybe OperatingSystem
operatingSystem) (\s :: Compute
s@Compute' {} Maybe OperatingSystem
a -> Compute
s {$sel:operatingSystem:Compute' :: Maybe OperatingSystem
operatingSystem = Maybe OperatingSystem
a} :: Compute)
compute_type :: Lens.Lens' Compute (Prelude.Maybe EC2InstanceType)
compute_type :: Lens' Compute (Maybe EC2InstanceType)
compute_type = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Compute' {Maybe EC2InstanceType
type' :: Maybe EC2InstanceType
$sel:type':Compute' :: Compute -> Maybe EC2InstanceType
type'} -> Maybe EC2InstanceType
type') (\s :: Compute
s@Compute' {} Maybe EC2InstanceType
a -> Compute
s {$sel:type':Compute' :: Maybe EC2InstanceType
type' = Maybe EC2InstanceType
a} :: Compute)
instance Data.FromJSON Compute where
parseJSON :: Value -> Parser Compute
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"Compute"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe ComputeStatus
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe OperatingSystem
-> Maybe EC2InstanceType
-> Compute
Compute'
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
"ComputeArn")
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
"ComputeName")
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
"ComputeStatus")
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
"DnsName")
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
"FleetArn")
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
"FleetId")
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
"GameLiftServiceSdkEndpoint")
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
"IpAddress")
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
"Location")
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
"Type")
)
instance Prelude.Hashable Compute where
hashWithSalt :: Int -> Compute -> Int
hashWithSalt Int
_salt Compute' {Maybe Text
Maybe POSIX
Maybe ComputeStatus
Maybe EC2InstanceType
Maybe OperatingSystem
type' :: Maybe EC2InstanceType
operatingSystem :: Maybe OperatingSystem
location :: Maybe Text
ipAddress :: Maybe Text
gameLiftServiceSdkEndpoint :: Maybe Text
fleetId :: Maybe Text
fleetArn :: Maybe Text
dnsName :: Maybe Text
creationTime :: Maybe POSIX
computeStatus :: Maybe ComputeStatus
computeName :: Maybe Text
computeArn :: Maybe Text
$sel:type':Compute' :: Compute -> Maybe EC2InstanceType
$sel:operatingSystem:Compute' :: Compute -> Maybe OperatingSystem
$sel:location:Compute' :: Compute -> Maybe Text
$sel:ipAddress:Compute' :: Compute -> Maybe Text
$sel:gameLiftServiceSdkEndpoint:Compute' :: Compute -> Maybe Text
$sel:fleetId:Compute' :: Compute -> Maybe Text
$sel:fleetArn:Compute' :: Compute -> Maybe Text
$sel:dnsName:Compute' :: Compute -> Maybe Text
$sel:creationTime:Compute' :: Compute -> Maybe POSIX
$sel:computeStatus:Compute' :: Compute -> Maybe ComputeStatus
$sel:computeName:Compute' :: Compute -> Maybe Text
$sel:computeArn:Compute' :: Compute -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
computeArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
computeName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ComputeStatus
computeStatus
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
creationTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
dnsName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
fleetArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
fleetId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
gameLiftServiceSdkEndpoint
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ipAddress
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
location
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe OperatingSystem
operatingSystem
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe EC2InstanceType
type'
instance Prelude.NFData Compute where
rnf :: Compute -> ()
rnf Compute' {Maybe Text
Maybe POSIX
Maybe ComputeStatus
Maybe EC2InstanceType
Maybe OperatingSystem
type' :: Maybe EC2InstanceType
operatingSystem :: Maybe OperatingSystem
location :: Maybe Text
ipAddress :: Maybe Text
gameLiftServiceSdkEndpoint :: Maybe Text
fleetId :: Maybe Text
fleetArn :: Maybe Text
dnsName :: Maybe Text
creationTime :: Maybe POSIX
computeStatus :: Maybe ComputeStatus
computeName :: Maybe Text
computeArn :: Maybe Text
$sel:type':Compute' :: Compute -> Maybe EC2InstanceType
$sel:operatingSystem:Compute' :: Compute -> Maybe OperatingSystem
$sel:location:Compute' :: Compute -> Maybe Text
$sel:ipAddress:Compute' :: Compute -> Maybe Text
$sel:gameLiftServiceSdkEndpoint:Compute' :: Compute -> Maybe Text
$sel:fleetId:Compute' :: Compute -> Maybe Text
$sel:fleetArn:Compute' :: Compute -> Maybe Text
$sel:dnsName:Compute' :: Compute -> Maybe Text
$sel:creationTime:Compute' :: Compute -> Maybe POSIX
$sel:computeStatus:Compute' :: Compute -> Maybe ComputeStatus
$sel:computeName:Compute' :: Compute -> Maybe Text
$sel:computeArn:Compute' :: Compute -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
computeArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
computeName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ComputeStatus
computeStatus
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
dnsName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
fleetArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
fleetId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
gameLiftServiceSdkEndpoint
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
ipAddress
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
location
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 EC2InstanceType
type'