{-# 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.AppRunner.Types.VpcIngressConnectionSummary
-- 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.AppRunner.Types.VpcIngressConnectionSummary 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

-- | Provides summary information about an VPC Ingress Connection, which
-- includes its VPC Ingress Connection ARN and its associated Service ARN.
--
-- /See:/ 'newVpcIngressConnectionSummary' smart constructor.
data VpcIngressConnectionSummary = VpcIngressConnectionSummary'
  { -- | The Amazon Resource Name (ARN) of the service associated with the VPC
    -- Ingress Connection.
    VpcIngressConnectionSummary -> Maybe Text
serviceArn :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the VPC Ingress Connection.
    VpcIngressConnectionSummary -> Maybe Text
vpcIngressConnectionArn :: Prelude.Maybe Prelude.Text
  }
  deriving (VpcIngressConnectionSummary -> VpcIngressConnectionSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VpcIngressConnectionSummary -> VpcIngressConnectionSummary -> Bool
$c/= :: VpcIngressConnectionSummary -> VpcIngressConnectionSummary -> Bool
== :: VpcIngressConnectionSummary -> VpcIngressConnectionSummary -> Bool
$c== :: VpcIngressConnectionSummary -> VpcIngressConnectionSummary -> Bool
Prelude.Eq, ReadPrec [VpcIngressConnectionSummary]
ReadPrec VpcIngressConnectionSummary
Int -> ReadS VpcIngressConnectionSummary
ReadS [VpcIngressConnectionSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [VpcIngressConnectionSummary]
$creadListPrec :: ReadPrec [VpcIngressConnectionSummary]
readPrec :: ReadPrec VpcIngressConnectionSummary
$creadPrec :: ReadPrec VpcIngressConnectionSummary
readList :: ReadS [VpcIngressConnectionSummary]
$creadList :: ReadS [VpcIngressConnectionSummary]
readsPrec :: Int -> ReadS VpcIngressConnectionSummary
$creadsPrec :: Int -> ReadS VpcIngressConnectionSummary
Prelude.Read, Int -> VpcIngressConnectionSummary -> ShowS
[VpcIngressConnectionSummary] -> ShowS
VpcIngressConnectionSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VpcIngressConnectionSummary] -> ShowS
$cshowList :: [VpcIngressConnectionSummary] -> ShowS
show :: VpcIngressConnectionSummary -> String
$cshow :: VpcIngressConnectionSummary -> String
showsPrec :: Int -> VpcIngressConnectionSummary -> ShowS
$cshowsPrec :: Int -> VpcIngressConnectionSummary -> ShowS
Prelude.Show, forall x.
Rep VpcIngressConnectionSummary x -> VpcIngressConnectionSummary
forall x.
VpcIngressConnectionSummary -> Rep VpcIngressConnectionSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep VpcIngressConnectionSummary x -> VpcIngressConnectionSummary
$cfrom :: forall x.
VpcIngressConnectionSummary -> Rep VpcIngressConnectionSummary x
Prelude.Generic)

-- |
-- Create a value of 'VpcIngressConnectionSummary' 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:
--
-- 'serviceArn', 'vpcIngressConnectionSummary_serviceArn' - The Amazon Resource Name (ARN) of the service associated with the VPC
-- Ingress Connection.
--
-- 'vpcIngressConnectionArn', 'vpcIngressConnectionSummary_vpcIngressConnectionArn' - The Amazon Resource Name (ARN) of the VPC Ingress Connection.
newVpcIngressConnectionSummary ::
  VpcIngressConnectionSummary
newVpcIngressConnectionSummary :: VpcIngressConnectionSummary
newVpcIngressConnectionSummary =
  VpcIngressConnectionSummary'
    { $sel:serviceArn:VpcIngressConnectionSummary' :: Maybe Text
serviceArn =
        forall a. Maybe a
Prelude.Nothing,
      $sel:vpcIngressConnectionArn:VpcIngressConnectionSummary' :: Maybe Text
vpcIngressConnectionArn = forall a. Maybe a
Prelude.Nothing
    }

-- | The Amazon Resource Name (ARN) of the service associated with the VPC
-- Ingress Connection.
vpcIngressConnectionSummary_serviceArn :: Lens.Lens' VpcIngressConnectionSummary (Prelude.Maybe Prelude.Text)
vpcIngressConnectionSummary_serviceArn :: Lens' VpcIngressConnectionSummary (Maybe Text)
vpcIngressConnectionSummary_serviceArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpcIngressConnectionSummary' {Maybe Text
serviceArn :: Maybe Text
$sel:serviceArn:VpcIngressConnectionSummary' :: VpcIngressConnectionSummary -> Maybe Text
serviceArn} -> Maybe Text
serviceArn) (\s :: VpcIngressConnectionSummary
s@VpcIngressConnectionSummary' {} Maybe Text
a -> VpcIngressConnectionSummary
s {$sel:serviceArn:VpcIngressConnectionSummary' :: Maybe Text
serviceArn = Maybe Text
a} :: VpcIngressConnectionSummary)

-- | The Amazon Resource Name (ARN) of the VPC Ingress Connection.
vpcIngressConnectionSummary_vpcIngressConnectionArn :: Lens.Lens' VpcIngressConnectionSummary (Prelude.Maybe Prelude.Text)
vpcIngressConnectionSummary_vpcIngressConnectionArn :: Lens' VpcIngressConnectionSummary (Maybe Text)
vpcIngressConnectionSummary_vpcIngressConnectionArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\VpcIngressConnectionSummary' {Maybe Text
vpcIngressConnectionArn :: Maybe Text
$sel:vpcIngressConnectionArn:VpcIngressConnectionSummary' :: VpcIngressConnectionSummary -> Maybe Text
vpcIngressConnectionArn} -> Maybe Text
vpcIngressConnectionArn) (\s :: VpcIngressConnectionSummary
s@VpcIngressConnectionSummary' {} Maybe Text
a -> VpcIngressConnectionSummary
s {$sel:vpcIngressConnectionArn:VpcIngressConnectionSummary' :: Maybe Text
vpcIngressConnectionArn = Maybe Text
a} :: VpcIngressConnectionSummary)

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

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

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