{-# 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.NetworkManager.Types.CustomerGatewayAssociation where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.NetworkManager.Types.CustomerGatewayAssociationState
import qualified Amazonka.Prelude as Prelude
data CustomerGatewayAssociation = CustomerGatewayAssociation'
{
CustomerGatewayAssociation -> Maybe Text
customerGatewayArn :: Prelude.Maybe Prelude.Text,
CustomerGatewayAssociation -> Maybe Text
deviceId :: Prelude.Maybe Prelude.Text,
CustomerGatewayAssociation -> Maybe Text
globalNetworkId :: Prelude.Maybe Prelude.Text,
CustomerGatewayAssociation -> Maybe Text
linkId :: Prelude.Maybe Prelude.Text,
CustomerGatewayAssociation -> Maybe CustomerGatewayAssociationState
state :: Prelude.Maybe CustomerGatewayAssociationState
}
deriving (CustomerGatewayAssociation -> CustomerGatewayAssociation -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CustomerGatewayAssociation -> CustomerGatewayAssociation -> Bool
$c/= :: CustomerGatewayAssociation -> CustomerGatewayAssociation -> Bool
== :: CustomerGatewayAssociation -> CustomerGatewayAssociation -> Bool
$c== :: CustomerGatewayAssociation -> CustomerGatewayAssociation -> Bool
Prelude.Eq, ReadPrec [CustomerGatewayAssociation]
ReadPrec CustomerGatewayAssociation
Int -> ReadS CustomerGatewayAssociation
ReadS [CustomerGatewayAssociation]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CustomerGatewayAssociation]
$creadListPrec :: ReadPrec [CustomerGatewayAssociation]
readPrec :: ReadPrec CustomerGatewayAssociation
$creadPrec :: ReadPrec CustomerGatewayAssociation
readList :: ReadS [CustomerGatewayAssociation]
$creadList :: ReadS [CustomerGatewayAssociation]
readsPrec :: Int -> ReadS CustomerGatewayAssociation
$creadsPrec :: Int -> ReadS CustomerGatewayAssociation
Prelude.Read, Int -> CustomerGatewayAssociation -> ShowS
[CustomerGatewayAssociation] -> ShowS
CustomerGatewayAssociation -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CustomerGatewayAssociation] -> ShowS
$cshowList :: [CustomerGatewayAssociation] -> ShowS
show :: CustomerGatewayAssociation -> String
$cshow :: CustomerGatewayAssociation -> String
showsPrec :: Int -> CustomerGatewayAssociation -> ShowS
$cshowsPrec :: Int -> CustomerGatewayAssociation -> ShowS
Prelude.Show, forall x.
Rep CustomerGatewayAssociation x -> CustomerGatewayAssociation
forall x.
CustomerGatewayAssociation -> Rep CustomerGatewayAssociation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CustomerGatewayAssociation x -> CustomerGatewayAssociation
$cfrom :: forall x.
CustomerGatewayAssociation -> Rep CustomerGatewayAssociation x
Prelude.Generic)
newCustomerGatewayAssociation ::
CustomerGatewayAssociation
newCustomerGatewayAssociation :: CustomerGatewayAssociation
newCustomerGatewayAssociation =
CustomerGatewayAssociation'
{ $sel:customerGatewayArn:CustomerGatewayAssociation' :: Maybe Text
customerGatewayArn =
forall a. Maybe a
Prelude.Nothing,
$sel:deviceId:CustomerGatewayAssociation' :: Maybe Text
deviceId = forall a. Maybe a
Prelude.Nothing,
$sel:globalNetworkId:CustomerGatewayAssociation' :: Maybe Text
globalNetworkId = forall a. Maybe a
Prelude.Nothing,
$sel:linkId:CustomerGatewayAssociation' :: Maybe Text
linkId = forall a. Maybe a
Prelude.Nothing,
$sel:state:CustomerGatewayAssociation' :: Maybe CustomerGatewayAssociationState
state = forall a. Maybe a
Prelude.Nothing
}
customerGatewayAssociation_customerGatewayArn :: Lens.Lens' CustomerGatewayAssociation (Prelude.Maybe Prelude.Text)
customerGatewayAssociation_customerGatewayArn :: Lens' CustomerGatewayAssociation (Maybe Text)
customerGatewayAssociation_customerGatewayArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomerGatewayAssociation' {Maybe Text
customerGatewayArn :: Maybe Text
$sel:customerGatewayArn:CustomerGatewayAssociation' :: CustomerGatewayAssociation -> Maybe Text
customerGatewayArn} -> Maybe Text
customerGatewayArn) (\s :: CustomerGatewayAssociation
s@CustomerGatewayAssociation' {} Maybe Text
a -> CustomerGatewayAssociation
s {$sel:customerGatewayArn:CustomerGatewayAssociation' :: Maybe Text
customerGatewayArn = Maybe Text
a} :: CustomerGatewayAssociation)
customerGatewayAssociation_deviceId :: Lens.Lens' CustomerGatewayAssociation (Prelude.Maybe Prelude.Text)
customerGatewayAssociation_deviceId :: Lens' CustomerGatewayAssociation (Maybe Text)
customerGatewayAssociation_deviceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomerGatewayAssociation' {Maybe Text
deviceId :: Maybe Text
$sel:deviceId:CustomerGatewayAssociation' :: CustomerGatewayAssociation -> Maybe Text
deviceId} -> Maybe Text
deviceId) (\s :: CustomerGatewayAssociation
s@CustomerGatewayAssociation' {} Maybe Text
a -> CustomerGatewayAssociation
s {$sel:deviceId:CustomerGatewayAssociation' :: Maybe Text
deviceId = Maybe Text
a} :: CustomerGatewayAssociation)
customerGatewayAssociation_globalNetworkId :: Lens.Lens' CustomerGatewayAssociation (Prelude.Maybe Prelude.Text)
customerGatewayAssociation_globalNetworkId :: Lens' CustomerGatewayAssociation (Maybe Text)
customerGatewayAssociation_globalNetworkId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomerGatewayAssociation' {Maybe Text
globalNetworkId :: Maybe Text
$sel:globalNetworkId:CustomerGatewayAssociation' :: CustomerGatewayAssociation -> Maybe Text
globalNetworkId} -> Maybe Text
globalNetworkId) (\s :: CustomerGatewayAssociation
s@CustomerGatewayAssociation' {} Maybe Text
a -> CustomerGatewayAssociation
s {$sel:globalNetworkId:CustomerGatewayAssociation' :: Maybe Text
globalNetworkId = Maybe Text
a} :: CustomerGatewayAssociation)
customerGatewayAssociation_linkId :: Lens.Lens' CustomerGatewayAssociation (Prelude.Maybe Prelude.Text)
customerGatewayAssociation_linkId :: Lens' CustomerGatewayAssociation (Maybe Text)
customerGatewayAssociation_linkId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomerGatewayAssociation' {Maybe Text
linkId :: Maybe Text
$sel:linkId:CustomerGatewayAssociation' :: CustomerGatewayAssociation -> Maybe Text
linkId} -> Maybe Text
linkId) (\s :: CustomerGatewayAssociation
s@CustomerGatewayAssociation' {} Maybe Text
a -> CustomerGatewayAssociation
s {$sel:linkId:CustomerGatewayAssociation' :: Maybe Text
linkId = Maybe Text
a} :: CustomerGatewayAssociation)
customerGatewayAssociation_state :: Lens.Lens' CustomerGatewayAssociation (Prelude.Maybe CustomerGatewayAssociationState)
customerGatewayAssociation_state :: Lens'
CustomerGatewayAssociation (Maybe CustomerGatewayAssociationState)
customerGatewayAssociation_state = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CustomerGatewayAssociation' {Maybe CustomerGatewayAssociationState
state :: Maybe CustomerGatewayAssociationState
$sel:state:CustomerGatewayAssociation' :: CustomerGatewayAssociation -> Maybe CustomerGatewayAssociationState
state} -> Maybe CustomerGatewayAssociationState
state) (\s :: CustomerGatewayAssociation
s@CustomerGatewayAssociation' {} Maybe CustomerGatewayAssociationState
a -> CustomerGatewayAssociation
s {$sel:state:CustomerGatewayAssociation' :: Maybe CustomerGatewayAssociationState
state = Maybe CustomerGatewayAssociationState
a} :: CustomerGatewayAssociation)
instance Data.FromJSON CustomerGatewayAssociation where
parseJSON :: Value -> Parser CustomerGatewayAssociation
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"CustomerGatewayAssociation"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe CustomerGatewayAssociationState
-> CustomerGatewayAssociation
CustomerGatewayAssociation'
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
"CustomerGatewayArn")
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
"DeviceId")
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
"GlobalNetworkId")
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
"LinkId")
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
"State")
)
instance Prelude.Hashable CustomerGatewayAssociation where
hashWithSalt :: Int -> CustomerGatewayAssociation -> Int
hashWithSalt Int
_salt CustomerGatewayAssociation' {Maybe Text
Maybe CustomerGatewayAssociationState
state :: Maybe CustomerGatewayAssociationState
linkId :: Maybe Text
globalNetworkId :: Maybe Text
deviceId :: Maybe Text
customerGatewayArn :: Maybe Text
$sel:state:CustomerGatewayAssociation' :: CustomerGatewayAssociation -> Maybe CustomerGatewayAssociationState
$sel:linkId:CustomerGatewayAssociation' :: CustomerGatewayAssociation -> Maybe Text
$sel:globalNetworkId:CustomerGatewayAssociation' :: CustomerGatewayAssociation -> Maybe Text
$sel:deviceId:CustomerGatewayAssociation' :: CustomerGatewayAssociation -> Maybe Text
$sel:customerGatewayArn:CustomerGatewayAssociation' :: CustomerGatewayAssociation -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
customerGatewayArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
deviceId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
globalNetworkId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
linkId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CustomerGatewayAssociationState
state
instance Prelude.NFData CustomerGatewayAssociation where
rnf :: CustomerGatewayAssociation -> ()
rnf CustomerGatewayAssociation' {Maybe Text
Maybe CustomerGatewayAssociationState
state :: Maybe CustomerGatewayAssociationState
linkId :: Maybe Text
globalNetworkId :: Maybe Text
deviceId :: Maybe Text
customerGatewayArn :: Maybe Text
$sel:state:CustomerGatewayAssociation' :: CustomerGatewayAssociation -> Maybe CustomerGatewayAssociationState
$sel:linkId:CustomerGatewayAssociation' :: CustomerGatewayAssociation -> Maybe Text
$sel:globalNetworkId:CustomerGatewayAssociation' :: CustomerGatewayAssociation -> Maybe Text
$sel:deviceId:CustomerGatewayAssociation' :: CustomerGatewayAssociation -> Maybe Text
$sel:customerGatewayArn:CustomerGatewayAssociation' :: CustomerGatewayAssociation -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
customerGatewayArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
deviceId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
globalNetworkId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
linkId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe CustomerGatewayAssociationState
state