{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.WorkSpacesWeb.Types.NetworkSettingsSummary
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.WorkSpacesWeb.Types.NetworkSettingsSummary 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

-- | The summary of network settings.
--
-- /See:/ 'newNetworkSettingsSummary' smart constructor.
data NetworkSettingsSummary = NetworkSettingsSummary'
  { -- | The ARN of the network settings.
    NetworkSettingsSummary -> Maybe Text
networkSettingsArn :: Prelude.Maybe Prelude.Text,
    -- | The VPC ID of the network settings.
    NetworkSettingsSummary -> Maybe Text
vpcId :: Prelude.Maybe Prelude.Text
  }
  deriving (NetworkSettingsSummary -> NetworkSettingsSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NetworkSettingsSummary -> NetworkSettingsSummary -> Bool
$c/= :: NetworkSettingsSummary -> NetworkSettingsSummary -> Bool
== :: NetworkSettingsSummary -> NetworkSettingsSummary -> Bool
$c== :: NetworkSettingsSummary -> NetworkSettingsSummary -> Bool
Prelude.Eq, ReadPrec [NetworkSettingsSummary]
ReadPrec NetworkSettingsSummary
Int -> ReadS NetworkSettingsSummary
ReadS [NetworkSettingsSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [NetworkSettingsSummary]
$creadListPrec :: ReadPrec [NetworkSettingsSummary]
readPrec :: ReadPrec NetworkSettingsSummary
$creadPrec :: ReadPrec NetworkSettingsSummary
readList :: ReadS [NetworkSettingsSummary]
$creadList :: ReadS [NetworkSettingsSummary]
readsPrec :: Int -> ReadS NetworkSettingsSummary
$creadsPrec :: Int -> ReadS NetworkSettingsSummary
Prelude.Read, Int -> NetworkSettingsSummary -> ShowS
[NetworkSettingsSummary] -> ShowS
NetworkSettingsSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NetworkSettingsSummary] -> ShowS
$cshowList :: [NetworkSettingsSummary] -> ShowS
show :: NetworkSettingsSummary -> String
$cshow :: NetworkSettingsSummary -> String
showsPrec :: Int -> NetworkSettingsSummary -> ShowS
$cshowsPrec :: Int -> NetworkSettingsSummary -> ShowS
Prelude.Show, forall x. Rep NetworkSettingsSummary x -> NetworkSettingsSummary
forall x. NetworkSettingsSummary -> Rep NetworkSettingsSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep NetworkSettingsSummary x -> NetworkSettingsSummary
$cfrom :: forall x. NetworkSettingsSummary -> Rep NetworkSettingsSummary x
Prelude.Generic)

-- |
-- Create a value of 'NetworkSettingsSummary' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'networkSettingsArn', 'networkSettingsSummary_networkSettingsArn' - The ARN of the network settings.
--
-- 'vpcId', 'networkSettingsSummary_vpcId' - The VPC ID of the network settings.
newNetworkSettingsSummary ::
  NetworkSettingsSummary
newNetworkSettingsSummary :: NetworkSettingsSummary
newNetworkSettingsSummary =
  NetworkSettingsSummary'
    { $sel:networkSettingsArn:NetworkSettingsSummary' :: Maybe Text
networkSettingsArn =
        forall a. Maybe a
Prelude.Nothing,
      $sel:vpcId:NetworkSettingsSummary' :: Maybe Text
vpcId = forall a. Maybe a
Prelude.Nothing
    }

-- | The ARN of the network settings.
networkSettingsSummary_networkSettingsArn :: Lens.Lens' NetworkSettingsSummary (Prelude.Maybe Prelude.Text)
networkSettingsSummary_networkSettingsArn :: Lens' NetworkSettingsSummary (Maybe Text)
networkSettingsSummary_networkSettingsArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkSettingsSummary' {Maybe Text
networkSettingsArn :: Maybe Text
$sel:networkSettingsArn:NetworkSettingsSummary' :: NetworkSettingsSummary -> Maybe Text
networkSettingsArn} -> Maybe Text
networkSettingsArn) (\s :: NetworkSettingsSummary
s@NetworkSettingsSummary' {} Maybe Text
a -> NetworkSettingsSummary
s {$sel:networkSettingsArn:NetworkSettingsSummary' :: Maybe Text
networkSettingsArn = Maybe Text
a} :: NetworkSettingsSummary)

-- | The VPC ID of the network settings.
networkSettingsSummary_vpcId :: Lens.Lens' NetworkSettingsSummary (Prelude.Maybe Prelude.Text)
networkSettingsSummary_vpcId :: Lens' NetworkSettingsSummary (Maybe Text)
networkSettingsSummary_vpcId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\NetworkSettingsSummary' {Maybe Text
vpcId :: Maybe Text
$sel:vpcId:NetworkSettingsSummary' :: NetworkSettingsSummary -> Maybe Text
vpcId} -> Maybe Text
vpcId) (\s :: NetworkSettingsSummary
s@NetworkSettingsSummary' {} Maybe Text
a -> NetworkSettingsSummary
s {$sel:vpcId:NetworkSettingsSummary' :: Maybe Text
vpcId = Maybe Text
a} :: NetworkSettingsSummary)

instance Data.FromJSON NetworkSettingsSummary where
  parseJSON :: Value -> Parser NetworkSettingsSummary
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"NetworkSettingsSummary"
      ( \Object
x ->
          Maybe Text -> Maybe Text -> NetworkSettingsSummary
NetworkSettingsSummary'
            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
"networkSettingsArn")
            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
"vpcId")
      )

instance Prelude.Hashable NetworkSettingsSummary where
  hashWithSalt :: Int -> NetworkSettingsSummary -> Int
hashWithSalt Int
_salt NetworkSettingsSummary' {Maybe Text
vpcId :: Maybe Text
networkSettingsArn :: Maybe Text
$sel:vpcId:NetworkSettingsSummary' :: NetworkSettingsSummary -> Maybe Text
$sel:networkSettingsArn:NetworkSettingsSummary' :: NetworkSettingsSummary -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
networkSettingsArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
vpcId

instance Prelude.NFData NetworkSettingsSummary where
  rnf :: NetworkSettingsSummary -> ()
rnf NetworkSettingsSummary' {Maybe Text
vpcId :: Maybe Text
networkSettingsArn :: Maybe Text
$sel:vpcId:NetworkSettingsSummary' :: NetworkSettingsSummary -> Maybe Text
$sel:networkSettingsArn:NetworkSettingsSummary' :: NetworkSettingsSummary -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
networkSettingsArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
vpcId