{-# 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.RDS.Types.Outpost
-- 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.RDS.Types.Outpost 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

-- | A data type that represents an Outpost.
--
-- For more information about RDS on Outposts, see
-- <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-on-outposts.html Amazon RDS on Amazon Web Services Outposts>
-- in the /Amazon RDS User Guide./
--
-- /See:/ 'newOutpost' smart constructor.
data Outpost = Outpost'
  { -- | The Amazon Resource Name (ARN) of the Outpost.
    Outpost -> Maybe Text
arn :: Prelude.Maybe Prelude.Text
  }
  deriving (Outpost -> Outpost -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Outpost -> Outpost -> Bool
$c/= :: Outpost -> Outpost -> Bool
== :: Outpost -> Outpost -> Bool
$c== :: Outpost -> Outpost -> Bool
Prelude.Eq, ReadPrec [Outpost]
ReadPrec Outpost
Int -> ReadS Outpost
ReadS [Outpost]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Outpost]
$creadListPrec :: ReadPrec [Outpost]
readPrec :: ReadPrec Outpost
$creadPrec :: ReadPrec Outpost
readList :: ReadS [Outpost]
$creadList :: ReadS [Outpost]
readsPrec :: Int -> ReadS Outpost
$creadsPrec :: Int -> ReadS Outpost
Prelude.Read, Int -> Outpost -> ShowS
[Outpost] -> ShowS
Outpost -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Outpost] -> ShowS
$cshowList :: [Outpost] -> ShowS
show :: Outpost -> String
$cshow :: Outpost -> String
showsPrec :: Int -> Outpost -> ShowS
$cshowsPrec :: Int -> Outpost -> ShowS
Prelude.Show, forall x. Rep Outpost x -> Outpost
forall x. Outpost -> Rep Outpost x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Outpost x -> Outpost
$cfrom :: forall x. Outpost -> Rep Outpost x
Prelude.Generic)

-- |
-- Create a value of 'Outpost' 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:
--
-- 'arn', 'outpost_arn' - The Amazon Resource Name (ARN) of the Outpost.
newOutpost ::
  Outpost
newOutpost :: Outpost
newOutpost = Outpost' {$sel:arn:Outpost' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing}

-- | The Amazon Resource Name (ARN) of the Outpost.
outpost_arn :: Lens.Lens' Outpost (Prelude.Maybe Prelude.Text)
outpost_arn :: Lens' Outpost (Maybe Text)
outpost_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Outpost' {Maybe Text
arn :: Maybe Text
$sel:arn:Outpost' :: Outpost -> Maybe Text
arn} -> Maybe Text
arn) (\s :: Outpost
s@Outpost' {} Maybe Text
a -> Outpost
s {$sel:arn:Outpost' :: Maybe Text
arn = Maybe Text
a} :: Outpost)

instance Data.FromXML Outpost where
  parseXML :: [Node] -> Either String Outpost
parseXML [Node]
x = Maybe Text -> Outpost
Outpost' forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"Arn")

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

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