{-# 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.IKEVersionsRequestListValue
-- 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.IKEVersionsRequestListValue 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

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

-- |
-- Create a value of 'IKEVersionsRequestListValue' 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', 'iKEVersionsRequestListValue_value' - The IKE version.
newIKEVersionsRequestListValue ::
  IKEVersionsRequestListValue
newIKEVersionsRequestListValue :: IKEVersionsRequestListValue
newIKEVersionsRequestListValue =
  IKEVersionsRequestListValue'
    { $sel:value:IKEVersionsRequestListValue' :: Maybe Text
value =
        forall a. Maybe a
Prelude.Nothing
    }

-- | The IKE version.
iKEVersionsRequestListValue_value :: Lens.Lens' IKEVersionsRequestListValue (Prelude.Maybe Prelude.Text)
iKEVersionsRequestListValue_value :: Lens' IKEVersionsRequestListValue (Maybe Text)
iKEVersionsRequestListValue_value = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\IKEVersionsRequestListValue' {Maybe Text
value :: Maybe Text
$sel:value:IKEVersionsRequestListValue' :: IKEVersionsRequestListValue -> Maybe Text
value} -> Maybe Text
value) (\s :: IKEVersionsRequestListValue
s@IKEVersionsRequestListValue' {} Maybe Text
a -> IKEVersionsRequestListValue
s {$sel:value:IKEVersionsRequestListValue' :: Maybe Text
value = Maybe Text
a} :: IKEVersionsRequestListValue)

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

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

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