{-# 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.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data VpcPeeringAuthorization = VpcPeeringAuthorization'
{
VpcPeeringAuthorization -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
VpcPeeringAuthorization -> Maybe Text
peerVpcId :: Prelude.Maybe Prelude.Text,
VpcPeeringAuthorization -> Maybe Text
peerVpcAwsAccountId :: Prelude.Maybe Prelude.Text,
VpcPeeringAuthorization -> Maybe Text
gameLiftAwsAccountId :: Prelude.Maybe Prelude.Text,
VpcPeeringAuthorization -> Maybe POSIX
expirationTime :: Prelude.Maybe Core.POSIX
}
deriving (VpcPeeringAuthorization -> VpcPeeringAuthorization -> Bool
(VpcPeeringAuthorization -> VpcPeeringAuthorization -> Bool)
-> (VpcPeeringAuthorization -> VpcPeeringAuthorization -> Bool)
-> Eq VpcPeeringAuthorization
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]
(Int -> ReadS VpcPeeringAuthorization)
-> ReadS [VpcPeeringAuthorization]
-> ReadPrec VpcPeeringAuthorization
-> ReadPrec [VpcPeeringAuthorization]
-> Read 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
(Int -> VpcPeeringAuthorization -> ShowS)
-> (VpcPeeringAuthorization -> String)
-> ([VpcPeeringAuthorization] -> ShowS)
-> Show VpcPeeringAuthorization
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.
VpcPeeringAuthorization -> Rep VpcPeeringAuthorization x)
-> (forall x.
Rep VpcPeeringAuthorization x -> VpcPeeringAuthorization)
-> Generic VpcPeeringAuthorization
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' :: Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> VpcPeeringAuthorization
VpcPeeringAuthorization'
{ $sel:creationTime:VpcPeeringAuthorization' :: Maybe POSIX
creationTime =
Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:peerVpcId:VpcPeeringAuthorization' :: Maybe Text
peerVpcId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:peerVpcAwsAccountId:VpcPeeringAuthorization' :: Maybe Text
peerVpcAwsAccountId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:gameLiftAwsAccountId:VpcPeeringAuthorization' :: Maybe Text
gameLiftAwsAccountId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:expirationTime:VpcPeeringAuthorization' :: Maybe POSIX
expirationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
}
vpcPeeringAuthorization_creationTime :: Lens.Lens' VpcPeeringAuthorization (Prelude.Maybe Prelude.UTCTime)
vpcPeeringAuthorization_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> VpcPeeringAuthorization -> f VpcPeeringAuthorization
vpcPeeringAuthorization_creationTime = (VpcPeeringAuthorization -> Maybe POSIX)
-> (VpcPeeringAuthorization
-> Maybe POSIX -> VpcPeeringAuthorization)
-> Lens
VpcPeeringAuthorization
VpcPeeringAuthorization
(Maybe POSIX)
(Maybe POSIX)
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) ((Maybe POSIX -> f (Maybe POSIX))
-> VpcPeeringAuthorization -> f VpcPeeringAuthorization)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> VpcPeeringAuthorization
-> f VpcPeeringAuthorization
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
vpcPeeringAuthorization_peerVpcId :: Lens.Lens' VpcPeeringAuthorization (Prelude.Maybe Prelude.Text)
vpcPeeringAuthorization_peerVpcId :: (Maybe Text -> f (Maybe Text))
-> VpcPeeringAuthorization -> f VpcPeeringAuthorization
vpcPeeringAuthorization_peerVpcId = (VpcPeeringAuthorization -> Maybe Text)
-> (VpcPeeringAuthorization
-> Maybe Text -> VpcPeeringAuthorization)
-> Lens
VpcPeeringAuthorization
VpcPeeringAuthorization
(Maybe Text)
(Maybe Text)
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)
vpcPeeringAuthorization_peerVpcAwsAccountId :: Lens.Lens' VpcPeeringAuthorization (Prelude.Maybe Prelude.Text)
vpcPeeringAuthorization_peerVpcAwsAccountId :: (Maybe Text -> f (Maybe Text))
-> VpcPeeringAuthorization -> f VpcPeeringAuthorization
vpcPeeringAuthorization_peerVpcAwsAccountId = (VpcPeeringAuthorization -> Maybe Text)
-> (VpcPeeringAuthorization
-> Maybe Text -> VpcPeeringAuthorization)
-> Lens
VpcPeeringAuthorization
VpcPeeringAuthorization
(Maybe Text)
(Maybe Text)
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_gameLiftAwsAccountId :: Lens.Lens' VpcPeeringAuthorization (Prelude.Maybe Prelude.Text)
vpcPeeringAuthorization_gameLiftAwsAccountId :: (Maybe Text -> f (Maybe Text))
-> VpcPeeringAuthorization -> f VpcPeeringAuthorization
vpcPeeringAuthorization_gameLiftAwsAccountId = (VpcPeeringAuthorization -> Maybe Text)
-> (VpcPeeringAuthorization
-> Maybe Text -> VpcPeeringAuthorization)
-> Lens
VpcPeeringAuthorization
VpcPeeringAuthorization
(Maybe Text)
(Maybe Text)
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_expirationTime :: Lens.Lens' VpcPeeringAuthorization (Prelude.Maybe Prelude.UTCTime)
vpcPeeringAuthorization_expirationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> VpcPeeringAuthorization -> f VpcPeeringAuthorization
vpcPeeringAuthorization_expirationTime = (VpcPeeringAuthorization -> Maybe POSIX)
-> (VpcPeeringAuthorization
-> Maybe POSIX -> VpcPeeringAuthorization)
-> Lens
VpcPeeringAuthorization
VpcPeeringAuthorization
(Maybe POSIX)
(Maybe POSIX)
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) ((Maybe POSIX -> f (Maybe POSIX))
-> VpcPeeringAuthorization -> f VpcPeeringAuthorization)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> VpcPeeringAuthorization
-> f VpcPeeringAuthorization
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
instance Core.FromJSON VpcPeeringAuthorization where
parseJSON :: Value -> Parser VpcPeeringAuthorization
parseJSON =
String
-> (Object -> Parser VpcPeeringAuthorization)
-> Value
-> Parser VpcPeeringAuthorization
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"VpcPeeringAuthorization"
( \Object
x ->
Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> VpcPeeringAuthorization
VpcPeeringAuthorization'
(Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> VpcPeeringAuthorization)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> VpcPeeringAuthorization)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreationTime")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> VpcPeeringAuthorization)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe POSIX -> VpcPeeringAuthorization)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PeerVpcId")
Parser
(Maybe Text
-> Maybe Text -> Maybe POSIX -> VpcPeeringAuthorization)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe POSIX -> VpcPeeringAuthorization)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PeerVpcAwsAccountId")
Parser (Maybe Text -> Maybe POSIX -> VpcPeeringAuthorization)
-> Parser (Maybe Text)
-> Parser (Maybe POSIX -> VpcPeeringAuthorization)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"GameLiftAwsAccountId")
Parser (Maybe POSIX -> VpcPeeringAuthorization)
-> Parser (Maybe POSIX) -> Parser VpcPeeringAuthorization
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ExpirationTime")
)
instance Prelude.Hashable VpcPeeringAuthorization
instance Prelude.NFData VpcPeeringAuthorization