{-# 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-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.RDS.Types.Outpost where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
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
(Outpost -> Outpost -> Bool)
-> (Outpost -> Outpost -> Bool) -> Eq Outpost
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]
(Int -> ReadS Outpost)
-> ReadS [Outpost]
-> ReadPrec Outpost
-> ReadPrec [Outpost]
-> Read 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
(Int -> Outpost -> ShowS)
-> (Outpost -> String) -> ([Outpost] -> ShowS) -> Show Outpost
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. Outpost -> Rep Outpost x)
-> (forall x. Rep Outpost x -> Outpost) -> Generic Outpost
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' :: Maybe Text -> Outpost
Outpost' {$sel:arn:Outpost' :: Maybe Text
arn = Maybe Text
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 :: (Maybe Text -> f (Maybe Text)) -> Outpost -> f Outpost
outpost_arn = (Outpost -> Maybe Text)
-> (Outpost -> Maybe Text -> Outpost)
-> Lens Outpost Outpost (Maybe Text) (Maybe Text)
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 Core.FromXML Outpost where
  parseXML :: [Node] -> Either String Outpost
parseXML [Node]
x = Maybe Text -> Outpost
Outpost' (Maybe Text -> Outpost)
-> Either String (Maybe Text) -> Either String Outpost
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Arn")

instance Prelude.Hashable Outpost

instance Prelude.NFData Outpost