{-# 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.DeleteVolumeOntapResponse
-- 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.DeleteVolumeOntapResponse where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.FSx.Types.Tag
import qualified Amazonka.Prelude as Prelude

-- | The response object for the Amazon FSx for NetApp ONTAP volume being
-- deleted in the @DeleteVolume@ operation.
--
-- /See:/ 'newDeleteVolumeOntapResponse' smart constructor.
data DeleteVolumeOntapResponse = DeleteVolumeOntapResponse'
  { DeleteVolumeOntapResponse -> Maybe Text
finalBackupId :: Prelude.Maybe Prelude.Text,
    DeleteVolumeOntapResponse -> Maybe (NonEmpty Tag)
finalBackupTags :: Prelude.Maybe (Prelude.NonEmpty Tag)
  }
  deriving (DeleteVolumeOntapResponse -> DeleteVolumeOntapResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteVolumeOntapResponse -> DeleteVolumeOntapResponse -> Bool
$c/= :: DeleteVolumeOntapResponse -> DeleteVolumeOntapResponse -> Bool
== :: DeleteVolumeOntapResponse -> DeleteVolumeOntapResponse -> Bool
$c== :: DeleteVolumeOntapResponse -> DeleteVolumeOntapResponse -> Bool
Prelude.Eq, ReadPrec [DeleteVolumeOntapResponse]
ReadPrec DeleteVolumeOntapResponse
Int -> ReadS DeleteVolumeOntapResponse
ReadS [DeleteVolumeOntapResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteVolumeOntapResponse]
$creadListPrec :: ReadPrec [DeleteVolumeOntapResponse]
readPrec :: ReadPrec DeleteVolumeOntapResponse
$creadPrec :: ReadPrec DeleteVolumeOntapResponse
readList :: ReadS [DeleteVolumeOntapResponse]
$creadList :: ReadS [DeleteVolumeOntapResponse]
readsPrec :: Int -> ReadS DeleteVolumeOntapResponse
$creadsPrec :: Int -> ReadS DeleteVolumeOntapResponse
Prelude.Read, Int -> DeleteVolumeOntapResponse -> ShowS
[DeleteVolumeOntapResponse] -> ShowS
DeleteVolumeOntapResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteVolumeOntapResponse] -> ShowS
$cshowList :: [DeleteVolumeOntapResponse] -> ShowS
show :: DeleteVolumeOntapResponse -> String
$cshow :: DeleteVolumeOntapResponse -> String
showsPrec :: Int -> DeleteVolumeOntapResponse -> ShowS
$cshowsPrec :: Int -> DeleteVolumeOntapResponse -> ShowS
Prelude.Show, forall x.
Rep DeleteVolumeOntapResponse x -> DeleteVolumeOntapResponse
forall x.
DeleteVolumeOntapResponse -> Rep DeleteVolumeOntapResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteVolumeOntapResponse x -> DeleteVolumeOntapResponse
$cfrom :: forall x.
DeleteVolumeOntapResponse -> Rep DeleteVolumeOntapResponse x
Prelude.Generic)

-- |
-- Create a value of 'DeleteVolumeOntapResponse' 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:
--
-- 'finalBackupId', 'deleteVolumeOntapResponse_finalBackupId' - Undocumented member.
--
-- 'finalBackupTags', 'deleteVolumeOntapResponse_finalBackupTags' - Undocumented member.
newDeleteVolumeOntapResponse ::
  DeleteVolumeOntapResponse
newDeleteVolumeOntapResponse :: DeleteVolumeOntapResponse
newDeleteVolumeOntapResponse =
  DeleteVolumeOntapResponse'
    { $sel:finalBackupId:DeleteVolumeOntapResponse' :: Maybe Text
finalBackupId =
        forall a. Maybe a
Prelude.Nothing,
      $sel:finalBackupTags:DeleteVolumeOntapResponse' :: Maybe (NonEmpty Tag)
finalBackupTags = forall a. Maybe a
Prelude.Nothing
    }

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

-- | Undocumented member.
deleteVolumeOntapResponse_finalBackupTags :: Lens.Lens' DeleteVolumeOntapResponse (Prelude.Maybe (Prelude.NonEmpty Tag))
deleteVolumeOntapResponse_finalBackupTags :: Lens' DeleteVolumeOntapResponse (Maybe (NonEmpty Tag))
deleteVolumeOntapResponse_finalBackupTags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteVolumeOntapResponse' {Maybe (NonEmpty Tag)
finalBackupTags :: Maybe (NonEmpty Tag)
$sel:finalBackupTags:DeleteVolumeOntapResponse' :: DeleteVolumeOntapResponse -> Maybe (NonEmpty Tag)
finalBackupTags} -> Maybe (NonEmpty Tag)
finalBackupTags) (\s :: DeleteVolumeOntapResponse
s@DeleteVolumeOntapResponse' {} Maybe (NonEmpty Tag)
a -> DeleteVolumeOntapResponse
s {$sel:finalBackupTags:DeleteVolumeOntapResponse' :: Maybe (NonEmpty Tag)
finalBackupTags = Maybe (NonEmpty Tag)
a} :: DeleteVolumeOntapResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Data.FromJSON DeleteVolumeOntapResponse where
  parseJSON :: Value -> Parser DeleteVolumeOntapResponse
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"DeleteVolumeOntapResponse"
      ( \Object
x ->
          Maybe Text -> Maybe (NonEmpty Tag) -> DeleteVolumeOntapResponse
DeleteVolumeOntapResponse'
            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
"FinalBackupId")
            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
"FinalBackupTags")
      )

instance Prelude.Hashable DeleteVolumeOntapResponse where
  hashWithSalt :: Int -> DeleteVolumeOntapResponse -> Int
hashWithSalt Int
_salt DeleteVolumeOntapResponse' {Maybe (NonEmpty Tag)
Maybe Text
finalBackupTags :: Maybe (NonEmpty Tag)
finalBackupId :: Maybe Text
$sel:finalBackupTags:DeleteVolumeOntapResponse' :: DeleteVolumeOntapResponse -> Maybe (NonEmpty Tag)
$sel:finalBackupId:DeleteVolumeOntapResponse' :: DeleteVolumeOntapResponse -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
finalBackupId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty Tag)
finalBackupTags

instance Prelude.NFData DeleteVolumeOntapResponse where
  rnf :: DeleteVolumeOntapResponse -> ()
rnf DeleteVolumeOntapResponse' {Maybe (NonEmpty Tag)
Maybe Text
finalBackupTags :: Maybe (NonEmpty Tag)
finalBackupId :: Maybe Text
$sel:finalBackupTags:DeleteVolumeOntapResponse' :: DeleteVolumeOntapResponse -> Maybe (NonEmpty Tag)
$sel:finalBackupId:DeleteVolumeOntapResponse' :: DeleteVolumeOntapResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
finalBackupId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty Tag)
finalBackupTags