{-# 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.VpcPeeringAuthorization where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data VpcPeeringAuthorization = VpcPeeringAuthorization'
{
VpcPeeringAuthorization -> Maybe POSIX
creationTime :: Prelude.Maybe Data.POSIX,
VpcPeeringAuthorization -> Maybe POSIX
expirationTime :: Prelude.Maybe Data.POSIX,
VpcPeeringAuthorization -> Maybe Text
gameLiftAwsAccountId :: Prelude.Maybe Prelude.Text,
VpcPeeringAuthorization -> Maybe Text
peerVpcAwsAccountId :: Prelude.Maybe Prelude.Text,
VpcPeeringAuthorization -> Maybe Text
peerVpcId :: Prelude.Maybe Prelude.Text
}
deriving (VpcPeeringAuthorization -> VpcPeeringAuthorization -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VpcPeeringAuthorization -> VpcPeeringAuthorization -> Bool
$c/= :: VpcPeeringAuthorization -> VpcPeeringAuthorization -> Bool
== :: VpcPeeringAuthorization -> VpcPeeringAuthorization -> Bool
$c== :: VpcPeeringAuthorization -> VpcPeeringAuthorization -> Bool
Prelude.Eq, ReadPrec [VpcPeeringAuthorization]
ReadPrec VpcPeeringAuthorization
Int -> ReadS VpcPeeringAuthorization
ReadS [VpcPeeringAuthorization]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VpcPeeringAuthorization]
$creadListPrec :: ReadPrec [VpcPeeringAuthorization]
readPrec :: ReadPrec VpcPeeringAuthorization
$creadPrec :: ReadPrec VpcPeeringAuthorization
readList :: ReadS [VpcPeeringAuthorization]
$creadList :: ReadS [VpcPeeringAuthorization]
readsPrec :: Int -> ReadS VpcPeeringAuthorization
$creadsPrec :: Int -> ReadS VpcPeeringAuthorization
Prelude.Read, Int -> VpcPeeringAuthorization -> ShowS
[VpcPeeringAuthorization] -> ShowS
VpcPeeringAuthorization -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VpcPeeringAuthorization] -> ShowS
$cshowList :: [VpcPeeringAuthorization] -> ShowS
show :: VpcPeeringAuthorization -> String
$cshow :: VpcPeeringAuthorization -> String
showsPrec :: Int -> VpcPeeringAuthorization -> ShowS
$cshowsPrec :: Int -> VpcPeeringAuthorization -> ShowS
Prelude.Show, forall x. Rep VpcPeeringAuthorization x -> VpcPeeringAuthorization
forall x. VpcPeeringAuthorization -> Rep VpcPeeringAuthorization x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep VpcPeeringAuthorization x -> VpcPeeringAuthorization
$cfrom :: forall x. VpcPeeringAuthorization -> Rep VpcPeeringAuthorization x
Prelude.Generic)
newVpcPeeringAuthorization ::
VpcPeeringAuthorization
newVpcPeeringAuthorization :: VpcPeeringAuthorization
newVpcPeeringAuthorization =
VpcPeeringAuthorization'
{ $sel:creationTime:VpcPeeringAuthorization' :: Maybe POSIX
creationTime =
forall a. Maybe a
Prelude.Nothing,
$sel:expirationTime:VpcPeeringAuthorization' :: Maybe POSIX
expirationTime = forall a. Maybe a
Prelude.Nothing,
$sel:gameLiftAwsAccountId:VpcPeeringAuthorization' :: Maybe Text
gameLiftAwsAccountId = forall a. Maybe a
Prelude.Nothing,
$sel:peerVpcAwsAccountId:VpcPeeringAuthorization' :: Maybe Text
peerVpcAwsAccountId = forall a. Maybe a
Prelude.Nothing,
$sel:peerVpcId:VpcPeeringAuthorization' :: Maybe Text
peerVpcId = forall a. Maybe a
Prelude.Nothing
}
vpcPeeringAuthorization_creationTime :: Lens.Lens' VpcPeeringAuthorization (Prelude.Maybe Prelude.UTCTime)
vpcPeeringAuthorization_creationTime :: Lens' VpcPeeringAuthorization (Maybe UTCTime)
vpcPeeringAuthorization_creationTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpcPeeringAuthorization' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:VpcPeeringAuthorization' :: VpcPeeringAuthorization -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: VpcPeeringAuthorization
s@VpcPeeringAuthorization' {} Maybe POSIX
a -> VpcPeeringAuthorization
s {$sel:creationTime:VpcPeeringAuthorization' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: VpcPeeringAuthorization) 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
vpcPeeringAuthorization_expirationTime :: Lens.Lens' VpcPeeringAuthorization (Prelude.Maybe Prelude.UTCTime)
vpcPeeringAuthorization_expirationTime :: Lens' VpcPeeringAuthorization (Maybe UTCTime)
vpcPeeringAuthorization_expirationTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpcPeeringAuthorization' {Maybe POSIX
expirationTime :: Maybe POSIX
$sel:expirationTime:VpcPeeringAuthorization' :: VpcPeeringAuthorization -> Maybe POSIX
expirationTime} -> Maybe POSIX
expirationTime) (\s :: VpcPeeringAuthorization
s@VpcPeeringAuthorization' {} Maybe POSIX
a -> VpcPeeringAuthorization
s {$sel:expirationTime:VpcPeeringAuthorization' :: Maybe POSIX
expirationTime = Maybe POSIX
a} :: VpcPeeringAuthorization) 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
vpcPeeringAuthorization_gameLiftAwsAccountId :: Lens.Lens' VpcPeeringAuthorization (Prelude.Maybe Prelude.Text)
vpcPeeringAuthorization_gameLiftAwsAccountId :: Lens' VpcPeeringAuthorization (Maybe Text)
vpcPeeringAuthorization_gameLiftAwsAccountId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpcPeeringAuthorization' {Maybe Text
gameLiftAwsAccountId :: Maybe Text
$sel:gameLiftAwsAccountId:VpcPeeringAuthorization' :: VpcPeeringAuthorization -> Maybe Text
gameLiftAwsAccountId} -> Maybe Text
gameLiftAwsAccountId) (\s :: VpcPeeringAuthorization
s@VpcPeeringAuthorization' {} Maybe Text
a -> VpcPeeringAuthorization
s {$sel:gameLiftAwsAccountId:VpcPeeringAuthorization' :: Maybe Text
gameLiftAwsAccountId = Maybe Text
a} :: VpcPeeringAuthorization)
vpcPeeringAuthorization_peerVpcAwsAccountId :: Lens.Lens' VpcPeeringAuthorization (Prelude.Maybe Prelude.Text)
vpcPeeringAuthorization_peerVpcAwsAccountId :: Lens' VpcPeeringAuthorization (Maybe Text)
vpcPeeringAuthorization_peerVpcAwsAccountId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpcPeeringAuthorization' {Maybe Text
peerVpcAwsAccountId :: Maybe Text
$sel:peerVpcAwsAccountId:VpcPeeringAuthorization' :: VpcPeeringAuthorization -> Maybe Text
peerVpcAwsAccountId} -> Maybe Text
peerVpcAwsAccountId) (\s :: VpcPeeringAuthorization
s@VpcPeeringAuthorization' {} Maybe Text
a -> VpcPeeringAuthorization
s {$sel:peerVpcAwsAccountId:VpcPeeringAuthorization' :: Maybe Text
peerVpcAwsAccountId = Maybe Text
a} :: VpcPeeringAuthorization)
vpcPeeringAuthorization_peerVpcId :: Lens.Lens' VpcPeeringAuthorization (Prelude.Maybe Prelude.Text)
vpcPeeringAuthorization_peerVpcId :: Lens' VpcPeeringAuthorization (Maybe Text)
vpcPeeringAuthorization_peerVpcId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpcPeeringAuthorization' {Maybe Text
peerVpcId :: Maybe Text
$sel:peerVpcId:VpcPeeringAuthorization' :: VpcPeeringAuthorization -> Maybe Text
peerVpcId} -> Maybe Text
peerVpcId) (\s :: VpcPeeringAuthorization
s@VpcPeeringAuthorization' {} Maybe Text
a -> VpcPeeringAuthorization
s {$sel:peerVpcId:VpcPeeringAuthorization' :: Maybe Text
peerVpcId = Maybe Text
a} :: VpcPeeringAuthorization)
instance Data.FromJSON VpcPeeringAuthorization where
parseJSON :: Value -> Parser VpcPeeringAuthorization
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"VpcPeeringAuthorization"
( \Object
x ->
Maybe POSIX
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> VpcPeeringAuthorization
VpcPeeringAuthorization'
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
"ExpirationTime")
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
"GameLiftAwsAccountId")
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
"PeerVpcAwsAccountId")
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
"PeerVpcId")
)
instance Prelude.Hashable VpcPeeringAuthorization where
hashWithSalt :: Int -> VpcPeeringAuthorization -> Int
hashWithSalt Int
_salt VpcPeeringAuthorization' {Maybe Text
Maybe POSIX
peerVpcId :: Maybe Text
peerVpcAwsAccountId :: Maybe Text
gameLiftAwsAccountId :: Maybe Text
expirationTime :: Maybe POSIX
creationTime :: Maybe POSIX
$sel:peerVpcId:VpcPeeringAuthorization' :: VpcPeeringAuthorization -> Maybe Text
$sel:peerVpcAwsAccountId:VpcPeeringAuthorization' :: VpcPeeringAuthorization -> Maybe Text
$sel:gameLiftAwsAccountId:VpcPeeringAuthorization' :: VpcPeeringAuthorization -> Maybe Text
$sel:expirationTime:VpcPeeringAuthorization' :: VpcPeeringAuthorization -> Maybe POSIX
$sel:creationTime:VpcPeeringAuthorization' :: VpcPeeringAuthorization -> 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
expirationTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
gameLiftAwsAccountId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
peerVpcAwsAccountId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
peerVpcId
instance Prelude.NFData VpcPeeringAuthorization where
rnf :: VpcPeeringAuthorization -> ()
rnf VpcPeeringAuthorization' {Maybe Text
Maybe POSIX
peerVpcId :: Maybe Text
peerVpcAwsAccountId :: Maybe Text
gameLiftAwsAccountId :: Maybe Text
expirationTime :: Maybe POSIX
creationTime :: Maybe POSIX
$sel:peerVpcId:VpcPeeringAuthorization' :: VpcPeeringAuthorization -> Maybe Text
$sel:peerVpcAwsAccountId:VpcPeeringAuthorization' :: VpcPeeringAuthorization -> Maybe Text
$sel:gameLiftAwsAccountId:VpcPeeringAuthorization' :: VpcPeeringAuthorization -> Maybe Text
$sel:expirationTime:VpcPeeringAuthorization' :: VpcPeeringAuthorization -> Maybe POSIX
$sel:creationTime:VpcPeeringAuthorization' :: VpcPeeringAuthorization -> 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
expirationTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
gameLiftAwsAccountId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
peerVpcAwsAccountId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
peerVpcId