{-# 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.CreateVerifiedAccessEndpointEniOptions
-- 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.CreateVerifiedAccessEndpointEniOptions 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 Amazonka.EC2.Types.VerifiedAccessEndpointProtocol
import qualified Amazonka.Prelude as Prelude

-- | Options for a network interface-type endpoint.
--
-- /See:/ 'newCreateVerifiedAccessEndpointEniOptions' smart constructor.
data CreateVerifiedAccessEndpointEniOptions = CreateVerifiedAccessEndpointEniOptions'
  { -- | The ID of the network interface.
    CreateVerifiedAccessEndpointEniOptions -> Maybe Text
networkInterfaceId :: Prelude.Maybe Prelude.Text,
    -- | The IP port number.
    CreateVerifiedAccessEndpointEniOptions -> Maybe Natural
port :: Prelude.Maybe Prelude.Natural,
    -- | The IP protocol.
    CreateVerifiedAccessEndpointEniOptions
-> Maybe VerifiedAccessEndpointProtocol
protocol :: Prelude.Maybe VerifiedAccessEndpointProtocol
  }
  deriving (CreateVerifiedAccessEndpointEniOptions
-> CreateVerifiedAccessEndpointEniOptions -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateVerifiedAccessEndpointEniOptions
-> CreateVerifiedAccessEndpointEniOptions -> Bool
$c/= :: CreateVerifiedAccessEndpointEniOptions
-> CreateVerifiedAccessEndpointEniOptions -> Bool
== :: CreateVerifiedAccessEndpointEniOptions
-> CreateVerifiedAccessEndpointEniOptions -> Bool
$c== :: CreateVerifiedAccessEndpointEniOptions
-> CreateVerifiedAccessEndpointEniOptions -> Bool
Prelude.Eq, ReadPrec [CreateVerifiedAccessEndpointEniOptions]
ReadPrec CreateVerifiedAccessEndpointEniOptions
Int -> ReadS CreateVerifiedAccessEndpointEniOptions
ReadS [CreateVerifiedAccessEndpointEniOptions]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateVerifiedAccessEndpointEniOptions]
$creadListPrec :: ReadPrec [CreateVerifiedAccessEndpointEniOptions]
readPrec :: ReadPrec CreateVerifiedAccessEndpointEniOptions
$creadPrec :: ReadPrec CreateVerifiedAccessEndpointEniOptions
readList :: ReadS [CreateVerifiedAccessEndpointEniOptions]
$creadList :: ReadS [CreateVerifiedAccessEndpointEniOptions]
readsPrec :: Int -> ReadS CreateVerifiedAccessEndpointEniOptions
$creadsPrec :: Int -> ReadS CreateVerifiedAccessEndpointEniOptions
Prelude.Read, Int -> CreateVerifiedAccessEndpointEniOptions -> ShowS
[CreateVerifiedAccessEndpointEniOptions] -> ShowS
CreateVerifiedAccessEndpointEniOptions -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateVerifiedAccessEndpointEniOptions] -> ShowS
$cshowList :: [CreateVerifiedAccessEndpointEniOptions] -> ShowS
show :: CreateVerifiedAccessEndpointEniOptions -> String
$cshow :: CreateVerifiedAccessEndpointEniOptions -> String
showsPrec :: Int -> CreateVerifiedAccessEndpointEniOptions -> ShowS
$cshowsPrec :: Int -> CreateVerifiedAccessEndpointEniOptions -> ShowS
Prelude.Show, forall x.
Rep CreateVerifiedAccessEndpointEniOptions x
-> CreateVerifiedAccessEndpointEniOptions
forall x.
CreateVerifiedAccessEndpointEniOptions
-> Rep CreateVerifiedAccessEndpointEniOptions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateVerifiedAccessEndpointEniOptions x
-> CreateVerifiedAccessEndpointEniOptions
$cfrom :: forall x.
CreateVerifiedAccessEndpointEniOptions
-> Rep CreateVerifiedAccessEndpointEniOptions x
Prelude.Generic)

-- |
-- Create a value of 'CreateVerifiedAccessEndpointEniOptions' 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:
--
-- 'networkInterfaceId', 'createVerifiedAccessEndpointEniOptions_networkInterfaceId' - The ID of the network interface.
--
-- 'port', 'createVerifiedAccessEndpointEniOptions_port' - The IP port number.
--
-- 'protocol', 'createVerifiedAccessEndpointEniOptions_protocol' - The IP protocol.
newCreateVerifiedAccessEndpointEniOptions ::
  CreateVerifiedAccessEndpointEniOptions
newCreateVerifiedAccessEndpointEniOptions :: CreateVerifiedAccessEndpointEniOptions
newCreateVerifiedAccessEndpointEniOptions =
  CreateVerifiedAccessEndpointEniOptions'
    { $sel:networkInterfaceId:CreateVerifiedAccessEndpointEniOptions' :: Maybe Text
networkInterfaceId =
        forall a. Maybe a
Prelude.Nothing,
      $sel:port:CreateVerifiedAccessEndpointEniOptions' :: Maybe Natural
port = forall a. Maybe a
Prelude.Nothing,
      $sel:protocol:CreateVerifiedAccessEndpointEniOptions' :: Maybe VerifiedAccessEndpointProtocol
protocol = forall a. Maybe a
Prelude.Nothing
    }

-- | The ID of the network interface.
createVerifiedAccessEndpointEniOptions_networkInterfaceId :: Lens.Lens' CreateVerifiedAccessEndpointEniOptions (Prelude.Maybe Prelude.Text)
createVerifiedAccessEndpointEniOptions_networkInterfaceId :: Lens' CreateVerifiedAccessEndpointEniOptions (Maybe Text)
createVerifiedAccessEndpointEniOptions_networkInterfaceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVerifiedAccessEndpointEniOptions' {Maybe Text
networkInterfaceId :: Maybe Text
$sel:networkInterfaceId:CreateVerifiedAccessEndpointEniOptions' :: CreateVerifiedAccessEndpointEniOptions -> Maybe Text
networkInterfaceId} -> Maybe Text
networkInterfaceId) (\s :: CreateVerifiedAccessEndpointEniOptions
s@CreateVerifiedAccessEndpointEniOptions' {} Maybe Text
a -> CreateVerifiedAccessEndpointEniOptions
s {$sel:networkInterfaceId:CreateVerifiedAccessEndpointEniOptions' :: Maybe Text
networkInterfaceId = Maybe Text
a} :: CreateVerifiedAccessEndpointEniOptions)

-- | The IP port number.
createVerifiedAccessEndpointEniOptions_port :: Lens.Lens' CreateVerifiedAccessEndpointEniOptions (Prelude.Maybe Prelude.Natural)
createVerifiedAccessEndpointEniOptions_port :: Lens' CreateVerifiedAccessEndpointEniOptions (Maybe Natural)
createVerifiedAccessEndpointEniOptions_port = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVerifiedAccessEndpointEniOptions' {Maybe Natural
port :: Maybe Natural
$sel:port:CreateVerifiedAccessEndpointEniOptions' :: CreateVerifiedAccessEndpointEniOptions -> Maybe Natural
port} -> Maybe Natural
port) (\s :: CreateVerifiedAccessEndpointEniOptions
s@CreateVerifiedAccessEndpointEniOptions' {} Maybe Natural
a -> CreateVerifiedAccessEndpointEniOptions
s {$sel:port:CreateVerifiedAccessEndpointEniOptions' :: Maybe Natural
port = Maybe Natural
a} :: CreateVerifiedAccessEndpointEniOptions)

-- | The IP protocol.
createVerifiedAccessEndpointEniOptions_protocol :: Lens.Lens' CreateVerifiedAccessEndpointEniOptions (Prelude.Maybe VerifiedAccessEndpointProtocol)
createVerifiedAccessEndpointEniOptions_protocol :: Lens'
  CreateVerifiedAccessEndpointEniOptions
  (Maybe VerifiedAccessEndpointProtocol)
createVerifiedAccessEndpointEniOptions_protocol = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVerifiedAccessEndpointEniOptions' {Maybe VerifiedAccessEndpointProtocol
protocol :: Maybe VerifiedAccessEndpointProtocol
$sel:protocol:CreateVerifiedAccessEndpointEniOptions' :: CreateVerifiedAccessEndpointEniOptions
-> Maybe VerifiedAccessEndpointProtocol
protocol} -> Maybe VerifiedAccessEndpointProtocol
protocol) (\s :: CreateVerifiedAccessEndpointEniOptions
s@CreateVerifiedAccessEndpointEniOptions' {} Maybe VerifiedAccessEndpointProtocol
a -> CreateVerifiedAccessEndpointEniOptions
s {$sel:protocol:CreateVerifiedAccessEndpointEniOptions' :: Maybe VerifiedAccessEndpointProtocol
protocol = Maybe VerifiedAccessEndpointProtocol
a} :: CreateVerifiedAccessEndpointEniOptions)

instance
  Prelude.Hashable
    CreateVerifiedAccessEndpointEniOptions
  where
  hashWithSalt :: Int -> CreateVerifiedAccessEndpointEniOptions -> Int
hashWithSalt
    Int
_salt
    CreateVerifiedAccessEndpointEniOptions' {Maybe Natural
Maybe Text
Maybe VerifiedAccessEndpointProtocol
protocol :: Maybe VerifiedAccessEndpointProtocol
port :: Maybe Natural
networkInterfaceId :: Maybe Text
$sel:protocol:CreateVerifiedAccessEndpointEniOptions' :: CreateVerifiedAccessEndpointEniOptions
-> Maybe VerifiedAccessEndpointProtocol
$sel:port:CreateVerifiedAccessEndpointEniOptions' :: CreateVerifiedAccessEndpointEniOptions -> Maybe Natural
$sel:networkInterfaceId:CreateVerifiedAccessEndpointEniOptions' :: CreateVerifiedAccessEndpointEniOptions -> Maybe Text
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
networkInterfaceId
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
port
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe VerifiedAccessEndpointProtocol
protocol

instance
  Prelude.NFData
    CreateVerifiedAccessEndpointEniOptions
  where
  rnf :: CreateVerifiedAccessEndpointEniOptions -> ()
rnf CreateVerifiedAccessEndpointEniOptions' {Maybe Natural
Maybe Text
Maybe VerifiedAccessEndpointProtocol
protocol :: Maybe VerifiedAccessEndpointProtocol
port :: Maybe Natural
networkInterfaceId :: Maybe Text
$sel:protocol:CreateVerifiedAccessEndpointEniOptions' :: CreateVerifiedAccessEndpointEniOptions
-> Maybe VerifiedAccessEndpointProtocol
$sel:port:CreateVerifiedAccessEndpointEniOptions' :: CreateVerifiedAccessEndpointEniOptions -> Maybe Natural
$sel:networkInterfaceId:CreateVerifiedAccessEndpointEniOptions' :: CreateVerifiedAccessEndpointEniOptions -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
networkInterfaceId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
port
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe VerifiedAccessEndpointProtocol
protocol

instance
  Data.ToQuery
    CreateVerifiedAccessEndpointEniOptions
  where
  toQuery :: CreateVerifiedAccessEndpointEniOptions -> QueryString
toQuery CreateVerifiedAccessEndpointEniOptions' {Maybe Natural
Maybe Text
Maybe VerifiedAccessEndpointProtocol
protocol :: Maybe VerifiedAccessEndpointProtocol
port :: Maybe Natural
networkInterfaceId :: Maybe Text
$sel:protocol:CreateVerifiedAccessEndpointEniOptions' :: CreateVerifiedAccessEndpointEniOptions
-> Maybe VerifiedAccessEndpointProtocol
$sel:port:CreateVerifiedAccessEndpointEniOptions' :: CreateVerifiedAccessEndpointEniOptions -> Maybe Natural
$sel:networkInterfaceId:CreateVerifiedAccessEndpointEniOptions' :: CreateVerifiedAccessEndpointEniOptions -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"NetworkInterfaceId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
networkInterfaceId,
        ByteString
"Port" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
port,
        ByteString
"Protocol" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe VerifiedAccessEndpointProtocol
protocol
      ]