{-# 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.AppStream.Types.NetworkAccessConfiguration where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data NetworkAccessConfiguration = NetworkAccessConfiguration'
{
NetworkAccessConfiguration -> Maybe Text
eniId :: Prelude.Maybe Prelude.Text,
NetworkAccessConfiguration -> Maybe Text
eniPrivateIpAddress :: Prelude.Maybe Prelude.Text
}
deriving (NetworkAccessConfiguration -> NetworkAccessConfiguration -> Bool
(NetworkAccessConfiguration -> NetworkAccessConfiguration -> Bool)
-> (NetworkAccessConfiguration
-> NetworkAccessConfiguration -> Bool)
-> Eq NetworkAccessConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NetworkAccessConfiguration -> NetworkAccessConfiguration -> Bool
$c/= :: NetworkAccessConfiguration -> NetworkAccessConfiguration -> Bool
== :: NetworkAccessConfiguration -> NetworkAccessConfiguration -> Bool
$c== :: NetworkAccessConfiguration -> NetworkAccessConfiguration -> Bool
Prelude.Eq, ReadPrec [NetworkAccessConfiguration]
ReadPrec NetworkAccessConfiguration
Int -> ReadS NetworkAccessConfiguration
ReadS [NetworkAccessConfiguration]
(Int -> ReadS NetworkAccessConfiguration)
-> ReadS [NetworkAccessConfiguration]
-> ReadPrec NetworkAccessConfiguration
-> ReadPrec [NetworkAccessConfiguration]
-> Read NetworkAccessConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [NetworkAccessConfiguration]
$creadListPrec :: ReadPrec [NetworkAccessConfiguration]
readPrec :: ReadPrec NetworkAccessConfiguration
$creadPrec :: ReadPrec NetworkAccessConfiguration
readList :: ReadS [NetworkAccessConfiguration]
$creadList :: ReadS [NetworkAccessConfiguration]
readsPrec :: Int -> ReadS NetworkAccessConfiguration
$creadsPrec :: Int -> ReadS NetworkAccessConfiguration
Prelude.Read, Int -> NetworkAccessConfiguration -> ShowS
[NetworkAccessConfiguration] -> ShowS
NetworkAccessConfiguration -> String
(Int -> NetworkAccessConfiguration -> ShowS)
-> (NetworkAccessConfiguration -> String)
-> ([NetworkAccessConfiguration] -> ShowS)
-> Show NetworkAccessConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NetworkAccessConfiguration] -> ShowS
$cshowList :: [NetworkAccessConfiguration] -> ShowS
show :: NetworkAccessConfiguration -> String
$cshow :: NetworkAccessConfiguration -> String
showsPrec :: Int -> NetworkAccessConfiguration -> ShowS
$cshowsPrec :: Int -> NetworkAccessConfiguration -> ShowS
Prelude.Show, (forall x.
NetworkAccessConfiguration -> Rep NetworkAccessConfiguration x)
-> (forall x.
Rep NetworkAccessConfiguration x -> NetworkAccessConfiguration)
-> Generic NetworkAccessConfiguration
forall x.
Rep NetworkAccessConfiguration x -> NetworkAccessConfiguration
forall x.
NetworkAccessConfiguration -> Rep NetworkAccessConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep NetworkAccessConfiguration x -> NetworkAccessConfiguration
$cfrom :: forall x.
NetworkAccessConfiguration -> Rep NetworkAccessConfiguration x
Prelude.Generic)
newNetworkAccessConfiguration ::
NetworkAccessConfiguration
newNetworkAccessConfiguration :: NetworkAccessConfiguration
newNetworkAccessConfiguration =
NetworkAccessConfiguration' :: Maybe Text -> Maybe Text -> NetworkAccessConfiguration
NetworkAccessConfiguration'
{ $sel:eniId:NetworkAccessConfiguration' :: Maybe Text
eniId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:eniPrivateIpAddress:NetworkAccessConfiguration' :: Maybe Text
eniPrivateIpAddress = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
networkAccessConfiguration_eniId :: Lens.Lens' NetworkAccessConfiguration (Prelude.Maybe Prelude.Text)
networkAccessConfiguration_eniId :: (Maybe Text -> f (Maybe Text))
-> NetworkAccessConfiguration -> f NetworkAccessConfiguration
networkAccessConfiguration_eniId = (NetworkAccessConfiguration -> Maybe Text)
-> (NetworkAccessConfiguration
-> Maybe Text -> NetworkAccessConfiguration)
-> Lens
NetworkAccessConfiguration
NetworkAccessConfiguration
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkAccessConfiguration' {Maybe Text
eniId :: Maybe Text
$sel:eniId:NetworkAccessConfiguration' :: NetworkAccessConfiguration -> Maybe Text
eniId} -> Maybe Text
eniId) (\s :: NetworkAccessConfiguration
s@NetworkAccessConfiguration' {} Maybe Text
a -> NetworkAccessConfiguration
s {$sel:eniId:NetworkAccessConfiguration' :: Maybe Text
eniId = Maybe Text
a} :: NetworkAccessConfiguration)
networkAccessConfiguration_eniPrivateIpAddress :: Lens.Lens' NetworkAccessConfiguration (Prelude.Maybe Prelude.Text)
networkAccessConfiguration_eniPrivateIpAddress :: (Maybe Text -> f (Maybe Text))
-> NetworkAccessConfiguration -> f NetworkAccessConfiguration
networkAccessConfiguration_eniPrivateIpAddress = (NetworkAccessConfiguration -> Maybe Text)
-> (NetworkAccessConfiguration
-> Maybe Text -> NetworkAccessConfiguration)
-> Lens
NetworkAccessConfiguration
NetworkAccessConfiguration
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkAccessConfiguration' {Maybe Text
eniPrivateIpAddress :: Maybe Text
$sel:eniPrivateIpAddress:NetworkAccessConfiguration' :: NetworkAccessConfiguration -> Maybe Text
eniPrivateIpAddress} -> Maybe Text
eniPrivateIpAddress) (\s :: NetworkAccessConfiguration
s@NetworkAccessConfiguration' {} Maybe Text
a -> NetworkAccessConfiguration
s {$sel:eniPrivateIpAddress:NetworkAccessConfiguration' :: Maybe Text
eniPrivateIpAddress = Maybe Text
a} :: NetworkAccessConfiguration)
instance Core.FromJSON NetworkAccessConfiguration where
parseJSON :: Value -> Parser NetworkAccessConfiguration
parseJSON =
String
-> (Object -> Parser NetworkAccessConfiguration)
-> Value
-> Parser NetworkAccessConfiguration
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"NetworkAccessConfiguration"
( \Object
x ->
Maybe Text -> Maybe Text -> NetworkAccessConfiguration
NetworkAccessConfiguration'
(Maybe Text -> Maybe Text -> NetworkAccessConfiguration)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> NetworkAccessConfiguration)
forall (f :: * -> *) a b. Functor 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
"EniId")
Parser (Maybe Text -> NetworkAccessConfiguration)
-> Parser (Maybe Text) -> Parser NetworkAccessConfiguration
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
"EniPrivateIpAddress")
)
instance Prelude.Hashable NetworkAccessConfiguration
instance Prelude.NFData NetworkAccessConfiguration