{-# 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.EC2.Types.Phase2IntegrityAlgorithmsRequestListValue
-- 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.EC2.Types.Phase2IntegrityAlgorithmsRequestListValue where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EC2.Internal
import qualified Amazonka.Prelude as Prelude

-- | Specifies the integrity algorithm for the VPN tunnel for phase 2 IKE
-- negotiations.
--
-- /See:/ 'newPhase2IntegrityAlgorithmsRequestListValue' smart constructor.
data Phase2IntegrityAlgorithmsRequestListValue = Phase2IntegrityAlgorithmsRequestListValue'
  { -- | The integrity algorithm.
    Phase2IntegrityAlgorithmsRequestListValue -> Maybe Text
value :: Prelude.Maybe Prelude.Text
  }
  deriving (Phase2IntegrityAlgorithmsRequestListValue
-> Phase2IntegrityAlgorithmsRequestListValue -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Phase2IntegrityAlgorithmsRequestListValue
-> Phase2IntegrityAlgorithmsRequestListValue -> Bool
$c/= :: Phase2IntegrityAlgorithmsRequestListValue
-> Phase2IntegrityAlgorithmsRequestListValue -> Bool
== :: Phase2IntegrityAlgorithmsRequestListValue
-> Phase2IntegrityAlgorithmsRequestListValue -> Bool
$c== :: Phase2IntegrityAlgorithmsRequestListValue
-> Phase2IntegrityAlgorithmsRequestListValue -> Bool
Prelude.Eq, ReadPrec [Phase2IntegrityAlgorithmsRequestListValue]
ReadPrec Phase2IntegrityAlgorithmsRequestListValue
Int -> ReadS Phase2IntegrityAlgorithmsRequestListValue
ReadS [Phase2IntegrityAlgorithmsRequestListValue]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Phase2IntegrityAlgorithmsRequestListValue]
$creadListPrec :: ReadPrec [Phase2IntegrityAlgorithmsRequestListValue]
readPrec :: ReadPrec Phase2IntegrityAlgorithmsRequestListValue
$creadPrec :: ReadPrec Phase2IntegrityAlgorithmsRequestListValue
readList :: ReadS [Phase2IntegrityAlgorithmsRequestListValue]
$creadList :: ReadS [Phase2IntegrityAlgorithmsRequestListValue]
readsPrec :: Int -> ReadS Phase2IntegrityAlgorithmsRequestListValue
$creadsPrec :: Int -> ReadS Phase2IntegrityAlgorithmsRequestListValue
Prelude.Read, Int -> Phase2IntegrityAlgorithmsRequestListValue -> ShowS
[Phase2IntegrityAlgorithmsRequestListValue] -> ShowS
Phase2IntegrityAlgorithmsRequestListValue -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Phase2IntegrityAlgorithmsRequestListValue] -> ShowS
$cshowList :: [Phase2IntegrityAlgorithmsRequestListValue] -> ShowS
show :: Phase2IntegrityAlgorithmsRequestListValue -> String
$cshow :: Phase2IntegrityAlgorithmsRequestListValue -> String
showsPrec :: Int -> Phase2IntegrityAlgorithmsRequestListValue -> ShowS
$cshowsPrec :: Int -> Phase2IntegrityAlgorithmsRequestListValue -> ShowS
Prelude.Show, forall x.
Rep Phase2IntegrityAlgorithmsRequestListValue x
-> Phase2IntegrityAlgorithmsRequestListValue
forall x.
Phase2IntegrityAlgorithmsRequestListValue
-> Rep Phase2IntegrityAlgorithmsRequestListValue x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep Phase2IntegrityAlgorithmsRequestListValue x
-> Phase2IntegrityAlgorithmsRequestListValue
$cfrom :: forall x.
Phase2IntegrityAlgorithmsRequestListValue
-> Rep Phase2IntegrityAlgorithmsRequestListValue x
Prelude.Generic)

-- |
-- Create a value of 'Phase2IntegrityAlgorithmsRequestListValue' 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:
--
-- 'value', 'phase2IntegrityAlgorithmsRequestListValue_value' - The integrity algorithm.
newPhase2IntegrityAlgorithmsRequestListValue ::
  Phase2IntegrityAlgorithmsRequestListValue
newPhase2IntegrityAlgorithmsRequestListValue :: Phase2IntegrityAlgorithmsRequestListValue
newPhase2IntegrityAlgorithmsRequestListValue =
  Phase2IntegrityAlgorithmsRequestListValue'
    { $sel:value:Phase2IntegrityAlgorithmsRequestListValue' :: Maybe Text
value =
        forall a. Maybe a
Prelude.Nothing
    }

-- | The integrity algorithm.
phase2IntegrityAlgorithmsRequestListValue_value :: Lens.Lens' Phase2IntegrityAlgorithmsRequestListValue (Prelude.Maybe Prelude.Text)
phase2IntegrityAlgorithmsRequestListValue_value :: Lens' Phase2IntegrityAlgorithmsRequestListValue (Maybe Text)
phase2IntegrityAlgorithmsRequestListValue_value = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Phase2IntegrityAlgorithmsRequestListValue' {Maybe Text
value :: Maybe Text
$sel:value:Phase2IntegrityAlgorithmsRequestListValue' :: Phase2IntegrityAlgorithmsRequestListValue -> Maybe Text
value} -> Maybe Text
value) (\s :: Phase2IntegrityAlgorithmsRequestListValue
s@Phase2IntegrityAlgorithmsRequestListValue' {} Maybe Text
a -> Phase2IntegrityAlgorithmsRequestListValue
s {$sel:value:Phase2IntegrityAlgorithmsRequestListValue' :: Maybe Text
value = Maybe Text
a} :: Phase2IntegrityAlgorithmsRequestListValue)

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

instance
  Prelude.NFData
    Phase2IntegrityAlgorithmsRequestListValue
  where
  rnf :: Phase2IntegrityAlgorithmsRequestListValue -> ()
rnf Phase2IntegrityAlgorithmsRequestListValue' {Maybe Text
value :: Maybe Text
$sel:value:Phase2IntegrityAlgorithmsRequestListValue' :: Phase2IntegrityAlgorithmsRequestListValue -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
value

instance
  Data.ToQuery
    Phase2IntegrityAlgorithmsRequestListValue
  where
  toQuery :: Phase2IntegrityAlgorithmsRequestListValue -> QueryString
toQuery
    Phase2IntegrityAlgorithmsRequestListValue' {Maybe Text
value :: Maybe Text
$sel:value:Phase2IntegrityAlgorithmsRequestListValue' :: Phase2IntegrityAlgorithmsRequestListValue -> Maybe Text
..} =
      forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"Value" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
value]