{-# 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.FSx.Types.ActiveDirectoryBackupAttributes
-- 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.FSx.Types.ActiveDirectoryBackupAttributes 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

-- | The Microsoft Active Directory attributes of the Amazon FSx for Windows
-- File Server file system.
--
-- /See:/ 'newActiveDirectoryBackupAttributes' smart constructor.
data ActiveDirectoryBackupAttributes = ActiveDirectoryBackupAttributes'
  { -- | The ID of the Amazon Web Services Managed Microsoft Active Directory
    -- instance to which the file system is joined.
    ActiveDirectoryBackupAttributes -> Maybe Text
activeDirectoryId :: Prelude.Maybe Prelude.Text,
    -- | The fully qualified domain name of the self-managed Active Directory
    -- directory.
    ActiveDirectoryBackupAttributes -> Maybe Text
domainName :: Prelude.Maybe Prelude.Text,
    ActiveDirectoryBackupAttributes -> Maybe Text
resourceARN :: Prelude.Maybe Prelude.Text
  }
  deriving (ActiveDirectoryBackupAttributes
-> ActiveDirectoryBackupAttributes -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ActiveDirectoryBackupAttributes
-> ActiveDirectoryBackupAttributes -> Bool
$c/= :: ActiveDirectoryBackupAttributes
-> ActiveDirectoryBackupAttributes -> Bool
== :: ActiveDirectoryBackupAttributes
-> ActiveDirectoryBackupAttributes -> Bool
$c== :: ActiveDirectoryBackupAttributes
-> ActiveDirectoryBackupAttributes -> Bool
Prelude.Eq, ReadPrec [ActiveDirectoryBackupAttributes]
ReadPrec ActiveDirectoryBackupAttributes
Int -> ReadS ActiveDirectoryBackupAttributes
ReadS [ActiveDirectoryBackupAttributes]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ActiveDirectoryBackupAttributes]
$creadListPrec :: ReadPrec [ActiveDirectoryBackupAttributes]
readPrec :: ReadPrec ActiveDirectoryBackupAttributes
$creadPrec :: ReadPrec ActiveDirectoryBackupAttributes
readList :: ReadS [ActiveDirectoryBackupAttributes]
$creadList :: ReadS [ActiveDirectoryBackupAttributes]
readsPrec :: Int -> ReadS ActiveDirectoryBackupAttributes
$creadsPrec :: Int -> ReadS ActiveDirectoryBackupAttributes
Prelude.Read, Int -> ActiveDirectoryBackupAttributes -> ShowS
[ActiveDirectoryBackupAttributes] -> ShowS
ActiveDirectoryBackupAttributes -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ActiveDirectoryBackupAttributes] -> ShowS
$cshowList :: [ActiveDirectoryBackupAttributes] -> ShowS
show :: ActiveDirectoryBackupAttributes -> String
$cshow :: ActiveDirectoryBackupAttributes -> String
showsPrec :: Int -> ActiveDirectoryBackupAttributes -> ShowS
$cshowsPrec :: Int -> ActiveDirectoryBackupAttributes -> ShowS
Prelude.Show, forall x.
Rep ActiveDirectoryBackupAttributes x
-> ActiveDirectoryBackupAttributes
forall x.
ActiveDirectoryBackupAttributes
-> Rep ActiveDirectoryBackupAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ActiveDirectoryBackupAttributes x
-> ActiveDirectoryBackupAttributes
$cfrom :: forall x.
ActiveDirectoryBackupAttributes
-> Rep ActiveDirectoryBackupAttributes x
Prelude.Generic)

-- |
-- Create a value of 'ActiveDirectoryBackupAttributes' 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:
--
-- 'activeDirectoryId', 'activeDirectoryBackupAttributes_activeDirectoryId' - The ID of the Amazon Web Services Managed Microsoft Active Directory
-- instance to which the file system is joined.
--
-- 'domainName', 'activeDirectoryBackupAttributes_domainName' - The fully qualified domain name of the self-managed Active Directory
-- directory.
--
-- 'resourceARN', 'activeDirectoryBackupAttributes_resourceARN' - Undocumented member.
newActiveDirectoryBackupAttributes ::
  ActiveDirectoryBackupAttributes
newActiveDirectoryBackupAttributes :: ActiveDirectoryBackupAttributes
newActiveDirectoryBackupAttributes =
  ActiveDirectoryBackupAttributes'
    { $sel:activeDirectoryId:ActiveDirectoryBackupAttributes' :: Maybe Text
activeDirectoryId =
        forall a. Maybe a
Prelude.Nothing,
      $sel:domainName:ActiveDirectoryBackupAttributes' :: Maybe Text
domainName = forall a. Maybe a
Prelude.Nothing,
      $sel:resourceARN:ActiveDirectoryBackupAttributes' :: Maybe Text
resourceARN = forall a. Maybe a
Prelude.Nothing
    }

-- | The ID of the Amazon Web Services Managed Microsoft Active Directory
-- instance to which the file system is joined.
activeDirectoryBackupAttributes_activeDirectoryId :: Lens.Lens' ActiveDirectoryBackupAttributes (Prelude.Maybe Prelude.Text)
activeDirectoryBackupAttributes_activeDirectoryId :: Lens' ActiveDirectoryBackupAttributes (Maybe Text)
activeDirectoryBackupAttributes_activeDirectoryId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActiveDirectoryBackupAttributes' {Maybe Text
activeDirectoryId :: Maybe Text
$sel:activeDirectoryId:ActiveDirectoryBackupAttributes' :: ActiveDirectoryBackupAttributes -> Maybe Text
activeDirectoryId} -> Maybe Text
activeDirectoryId) (\s :: ActiveDirectoryBackupAttributes
s@ActiveDirectoryBackupAttributes' {} Maybe Text
a -> ActiveDirectoryBackupAttributes
s {$sel:activeDirectoryId:ActiveDirectoryBackupAttributes' :: Maybe Text
activeDirectoryId = Maybe Text
a} :: ActiveDirectoryBackupAttributes)

-- | The fully qualified domain name of the self-managed Active Directory
-- directory.
activeDirectoryBackupAttributes_domainName :: Lens.Lens' ActiveDirectoryBackupAttributes (Prelude.Maybe Prelude.Text)
activeDirectoryBackupAttributes_domainName :: Lens' ActiveDirectoryBackupAttributes (Maybe Text)
activeDirectoryBackupAttributes_domainName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActiveDirectoryBackupAttributes' {Maybe Text
domainName :: Maybe Text
$sel:domainName:ActiveDirectoryBackupAttributes' :: ActiveDirectoryBackupAttributes -> Maybe Text
domainName} -> Maybe Text
domainName) (\s :: ActiveDirectoryBackupAttributes
s@ActiveDirectoryBackupAttributes' {} Maybe Text
a -> ActiveDirectoryBackupAttributes
s {$sel:domainName:ActiveDirectoryBackupAttributes' :: Maybe Text
domainName = Maybe Text
a} :: ActiveDirectoryBackupAttributes)

-- | Undocumented member.
activeDirectoryBackupAttributes_resourceARN :: Lens.Lens' ActiveDirectoryBackupAttributes (Prelude.Maybe Prelude.Text)
activeDirectoryBackupAttributes_resourceARN :: Lens' ActiveDirectoryBackupAttributes (Maybe Text)
activeDirectoryBackupAttributes_resourceARN = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ActiveDirectoryBackupAttributes' {Maybe Text
resourceARN :: Maybe Text
$sel:resourceARN:ActiveDirectoryBackupAttributes' :: ActiveDirectoryBackupAttributes -> Maybe Text
resourceARN} -> Maybe Text
resourceARN) (\s :: ActiveDirectoryBackupAttributes
s@ActiveDirectoryBackupAttributes' {} Maybe Text
a -> ActiveDirectoryBackupAttributes
s {$sel:resourceARN:ActiveDirectoryBackupAttributes' :: Maybe Text
resourceARN = Maybe Text
a} :: ActiveDirectoryBackupAttributes)

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

instance
  Prelude.Hashable
    ActiveDirectoryBackupAttributes
  where
  hashWithSalt :: Int -> ActiveDirectoryBackupAttributes -> Int
hashWithSalt
    Int
_salt
    ActiveDirectoryBackupAttributes' {Maybe Text
resourceARN :: Maybe Text
domainName :: Maybe Text
activeDirectoryId :: Maybe Text
$sel:resourceARN:ActiveDirectoryBackupAttributes' :: ActiveDirectoryBackupAttributes -> Maybe Text
$sel:domainName:ActiveDirectoryBackupAttributes' :: ActiveDirectoryBackupAttributes -> Maybe Text
$sel:activeDirectoryId:ActiveDirectoryBackupAttributes' :: ActiveDirectoryBackupAttributes -> Maybe Text
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
activeDirectoryId
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
domainName
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
resourceARN

instance
  Prelude.NFData
    ActiveDirectoryBackupAttributes
  where
  rnf :: ActiveDirectoryBackupAttributes -> ()
rnf ActiveDirectoryBackupAttributes' {Maybe Text
resourceARN :: Maybe Text
domainName :: Maybe Text
activeDirectoryId :: Maybe Text
$sel:resourceARN:ActiveDirectoryBackupAttributes' :: ActiveDirectoryBackupAttributes -> Maybe Text
$sel:domainName:ActiveDirectoryBackupAttributes' :: ActiveDirectoryBackupAttributes -> Maybe Text
$sel:activeDirectoryId:ActiveDirectoryBackupAttributes' :: ActiveDirectoryBackupAttributes -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
activeDirectoryId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
domainName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
resourceARN