{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.WorkMail.GetDefaultRetentionPolicy
-- 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)
--
-- Gets the default retention policy details for the specified
-- organization.
module Amazonka.WorkMail.GetDefaultRetentionPolicy
  ( -- * Creating a Request
    GetDefaultRetentionPolicy (..),
    newGetDefaultRetentionPolicy,

    -- * Request Lenses
    getDefaultRetentionPolicy_organizationId,

    -- * Destructuring the Response
    GetDefaultRetentionPolicyResponse (..),
    newGetDefaultRetentionPolicyResponse,

    -- * Response Lenses
    getDefaultRetentionPolicyResponse_name,
    getDefaultRetentionPolicyResponse_id,
    getDefaultRetentionPolicyResponse_folderConfigurations,
    getDefaultRetentionPolicyResponse_description,
    getDefaultRetentionPolicyResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.WorkMail.Types

-- | /See:/ 'newGetDefaultRetentionPolicy' smart constructor.
data GetDefaultRetentionPolicy = GetDefaultRetentionPolicy'
  { -- | The organization ID.
    GetDefaultRetentionPolicy -> Text
organizationId :: Prelude.Text
  }
  deriving (GetDefaultRetentionPolicy -> GetDefaultRetentionPolicy -> Bool
(GetDefaultRetentionPolicy -> GetDefaultRetentionPolicy -> Bool)
-> (GetDefaultRetentionPolicy -> GetDefaultRetentionPolicy -> Bool)
-> Eq GetDefaultRetentionPolicy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetDefaultRetentionPolicy -> GetDefaultRetentionPolicy -> Bool
$c/= :: GetDefaultRetentionPolicy -> GetDefaultRetentionPolicy -> Bool
== :: GetDefaultRetentionPolicy -> GetDefaultRetentionPolicy -> Bool
$c== :: GetDefaultRetentionPolicy -> GetDefaultRetentionPolicy -> Bool
Prelude.Eq, ReadPrec [GetDefaultRetentionPolicy]
ReadPrec GetDefaultRetentionPolicy
Int -> ReadS GetDefaultRetentionPolicy
ReadS [GetDefaultRetentionPolicy]
(Int -> ReadS GetDefaultRetentionPolicy)
-> ReadS [GetDefaultRetentionPolicy]
-> ReadPrec GetDefaultRetentionPolicy
-> ReadPrec [GetDefaultRetentionPolicy]
-> Read GetDefaultRetentionPolicy
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetDefaultRetentionPolicy]
$creadListPrec :: ReadPrec [GetDefaultRetentionPolicy]
readPrec :: ReadPrec GetDefaultRetentionPolicy
$creadPrec :: ReadPrec GetDefaultRetentionPolicy
readList :: ReadS [GetDefaultRetentionPolicy]
$creadList :: ReadS [GetDefaultRetentionPolicy]
readsPrec :: Int -> ReadS GetDefaultRetentionPolicy
$creadsPrec :: Int -> ReadS GetDefaultRetentionPolicy
Prelude.Read, Int -> GetDefaultRetentionPolicy -> ShowS
[GetDefaultRetentionPolicy] -> ShowS
GetDefaultRetentionPolicy -> String
(Int -> GetDefaultRetentionPolicy -> ShowS)
-> (GetDefaultRetentionPolicy -> String)
-> ([GetDefaultRetentionPolicy] -> ShowS)
-> Show GetDefaultRetentionPolicy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetDefaultRetentionPolicy] -> ShowS
$cshowList :: [GetDefaultRetentionPolicy] -> ShowS
show :: GetDefaultRetentionPolicy -> String
$cshow :: GetDefaultRetentionPolicy -> String
showsPrec :: Int -> GetDefaultRetentionPolicy -> ShowS
$cshowsPrec :: Int -> GetDefaultRetentionPolicy -> ShowS
Prelude.Show, (forall x.
 GetDefaultRetentionPolicy -> Rep GetDefaultRetentionPolicy x)
-> (forall x.
    Rep GetDefaultRetentionPolicy x -> GetDefaultRetentionPolicy)
-> Generic GetDefaultRetentionPolicy
forall x.
Rep GetDefaultRetentionPolicy x -> GetDefaultRetentionPolicy
forall x.
GetDefaultRetentionPolicy -> Rep GetDefaultRetentionPolicy x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetDefaultRetentionPolicy x -> GetDefaultRetentionPolicy
$cfrom :: forall x.
GetDefaultRetentionPolicy -> Rep GetDefaultRetentionPolicy x
Prelude.Generic)

-- |
-- Create a value of 'GetDefaultRetentionPolicy' 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:
--
-- 'organizationId', 'getDefaultRetentionPolicy_organizationId' - The organization ID.
newGetDefaultRetentionPolicy ::
  -- | 'organizationId'
  Prelude.Text ->
  GetDefaultRetentionPolicy
newGetDefaultRetentionPolicy :: Text -> GetDefaultRetentionPolicy
newGetDefaultRetentionPolicy Text
pOrganizationId_ =
  GetDefaultRetentionPolicy' :: Text -> GetDefaultRetentionPolicy
GetDefaultRetentionPolicy'
    { $sel:organizationId:GetDefaultRetentionPolicy' :: Text
organizationId =
        Text
pOrganizationId_
    }

-- | The organization ID.
getDefaultRetentionPolicy_organizationId :: Lens.Lens' GetDefaultRetentionPolicy Prelude.Text
getDefaultRetentionPolicy_organizationId :: (Text -> f Text)
-> GetDefaultRetentionPolicy -> f GetDefaultRetentionPolicy
getDefaultRetentionPolicy_organizationId = (GetDefaultRetentionPolicy -> Text)
-> (GetDefaultRetentionPolicy -> Text -> GetDefaultRetentionPolicy)
-> Lens
     GetDefaultRetentionPolicy GetDefaultRetentionPolicy Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDefaultRetentionPolicy' {Text
organizationId :: Text
$sel:organizationId:GetDefaultRetentionPolicy' :: GetDefaultRetentionPolicy -> Text
organizationId} -> Text
organizationId) (\s :: GetDefaultRetentionPolicy
s@GetDefaultRetentionPolicy' {} Text
a -> GetDefaultRetentionPolicy
s {$sel:organizationId:GetDefaultRetentionPolicy' :: Text
organizationId = Text
a} :: GetDefaultRetentionPolicy)

instance Core.AWSRequest GetDefaultRetentionPolicy where
  type
    AWSResponse GetDefaultRetentionPolicy =
      GetDefaultRetentionPolicyResponse
  request :: GetDefaultRetentionPolicy -> Request GetDefaultRetentionPolicy
request = Service
-> GetDefaultRetentionPolicy -> Request GetDefaultRetentionPolicy
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy GetDefaultRetentionPolicy
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetDefaultRetentionPolicy)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetDefaultRetentionPolicy))
-> Logger
-> Service
-> Proxy GetDefaultRetentionPolicy
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetDefaultRetentionPolicy)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe [FolderConfiguration]
-> Maybe Text
-> Int
-> GetDefaultRetentionPolicyResponse
GetDefaultRetentionPolicyResponse'
            (Maybe Text
 -> Maybe Text
 -> Maybe [FolderConfiguration]
 -> Maybe Text
 -> Int
 -> GetDefaultRetentionPolicyResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe [FolderConfiguration]
      -> Maybe Text
      -> Int
      -> GetDefaultRetentionPolicyResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Name")
            Either
  String
  (Maybe Text
   -> Maybe [FolderConfiguration]
   -> Maybe Text
   -> Int
   -> GetDefaultRetentionPolicyResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe [FolderConfiguration]
      -> Maybe Text -> Int -> GetDefaultRetentionPolicyResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Id")
            Either
  String
  (Maybe [FolderConfiguration]
   -> Maybe Text -> Int -> GetDefaultRetentionPolicyResponse)
-> Either String (Maybe [FolderConfiguration])
-> Either
     String (Maybe Text -> Int -> GetDefaultRetentionPolicyResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text -> Either String (Maybe (Maybe [FolderConfiguration]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"FolderConfigurations"
                            Either String (Maybe (Maybe [FolderConfiguration]))
-> Maybe [FolderConfiguration]
-> Either String (Maybe [FolderConfiguration])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [FolderConfiguration]
forall a. Monoid a => a
Prelude.mempty
                        )
            Either
  String (Maybe Text -> Int -> GetDefaultRetentionPolicyResponse)
-> Either String (Maybe Text)
-> Either String (Int -> GetDefaultRetentionPolicyResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Description")
            Either String (Int -> GetDefaultRetentionPolicyResponse)
-> Either String Int
-> Either String GetDefaultRetentionPolicyResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable GetDefaultRetentionPolicy

instance Prelude.NFData GetDefaultRetentionPolicy

instance Core.ToHeaders GetDefaultRetentionPolicy where
  toHeaders :: GetDefaultRetentionPolicy -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetDefaultRetentionPolicy -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"WorkMailService.GetDefaultRetentionPolicy" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON GetDefaultRetentionPolicy where
  toJSON :: GetDefaultRetentionPolicy -> Value
toJSON GetDefaultRetentionPolicy' {Text
organizationId :: Text
$sel:organizationId:GetDefaultRetentionPolicy' :: GetDefaultRetentionPolicy -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"OrganizationId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
organizationId)
          ]
      )

instance Core.ToPath GetDefaultRetentionPolicy where
  toPath :: GetDefaultRetentionPolicy -> ByteString
toPath = ByteString -> GetDefaultRetentionPolicy -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery GetDefaultRetentionPolicy where
  toQuery :: GetDefaultRetentionPolicy -> QueryString
toQuery = QueryString -> GetDefaultRetentionPolicy -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newGetDefaultRetentionPolicyResponse' smart constructor.
data GetDefaultRetentionPolicyResponse = GetDefaultRetentionPolicyResponse'
  { -- | The retention policy name.
    GetDefaultRetentionPolicyResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The retention policy ID.
    GetDefaultRetentionPolicyResponse -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
    -- | The retention policy folder configurations.
    GetDefaultRetentionPolicyResponse -> Maybe [FolderConfiguration]
folderConfigurations :: Prelude.Maybe [FolderConfiguration],
    -- | The retention policy description.
    GetDefaultRetentionPolicyResponse -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    GetDefaultRetentionPolicyResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetDefaultRetentionPolicyResponse
-> GetDefaultRetentionPolicyResponse -> Bool
(GetDefaultRetentionPolicyResponse
 -> GetDefaultRetentionPolicyResponse -> Bool)
-> (GetDefaultRetentionPolicyResponse
    -> GetDefaultRetentionPolicyResponse -> Bool)
-> Eq GetDefaultRetentionPolicyResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetDefaultRetentionPolicyResponse
-> GetDefaultRetentionPolicyResponse -> Bool
$c/= :: GetDefaultRetentionPolicyResponse
-> GetDefaultRetentionPolicyResponse -> Bool
== :: GetDefaultRetentionPolicyResponse
-> GetDefaultRetentionPolicyResponse -> Bool
$c== :: GetDefaultRetentionPolicyResponse
-> GetDefaultRetentionPolicyResponse -> Bool
Prelude.Eq, ReadPrec [GetDefaultRetentionPolicyResponse]
ReadPrec GetDefaultRetentionPolicyResponse
Int -> ReadS GetDefaultRetentionPolicyResponse
ReadS [GetDefaultRetentionPolicyResponse]
(Int -> ReadS GetDefaultRetentionPolicyResponse)
-> ReadS [GetDefaultRetentionPolicyResponse]
-> ReadPrec GetDefaultRetentionPolicyResponse
-> ReadPrec [GetDefaultRetentionPolicyResponse]
-> Read GetDefaultRetentionPolicyResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetDefaultRetentionPolicyResponse]
$creadListPrec :: ReadPrec [GetDefaultRetentionPolicyResponse]
readPrec :: ReadPrec GetDefaultRetentionPolicyResponse
$creadPrec :: ReadPrec GetDefaultRetentionPolicyResponse
readList :: ReadS [GetDefaultRetentionPolicyResponse]
$creadList :: ReadS [GetDefaultRetentionPolicyResponse]
readsPrec :: Int -> ReadS GetDefaultRetentionPolicyResponse
$creadsPrec :: Int -> ReadS GetDefaultRetentionPolicyResponse
Prelude.Read, Int -> GetDefaultRetentionPolicyResponse -> ShowS
[GetDefaultRetentionPolicyResponse] -> ShowS
GetDefaultRetentionPolicyResponse -> String
(Int -> GetDefaultRetentionPolicyResponse -> ShowS)
-> (GetDefaultRetentionPolicyResponse -> String)
-> ([GetDefaultRetentionPolicyResponse] -> ShowS)
-> Show GetDefaultRetentionPolicyResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetDefaultRetentionPolicyResponse] -> ShowS
$cshowList :: [GetDefaultRetentionPolicyResponse] -> ShowS
show :: GetDefaultRetentionPolicyResponse -> String
$cshow :: GetDefaultRetentionPolicyResponse -> String
showsPrec :: Int -> GetDefaultRetentionPolicyResponse -> ShowS
$cshowsPrec :: Int -> GetDefaultRetentionPolicyResponse -> ShowS
Prelude.Show, (forall x.
 GetDefaultRetentionPolicyResponse
 -> Rep GetDefaultRetentionPolicyResponse x)
-> (forall x.
    Rep GetDefaultRetentionPolicyResponse x
    -> GetDefaultRetentionPolicyResponse)
-> Generic GetDefaultRetentionPolicyResponse
forall x.
Rep GetDefaultRetentionPolicyResponse x
-> GetDefaultRetentionPolicyResponse
forall x.
GetDefaultRetentionPolicyResponse
-> Rep GetDefaultRetentionPolicyResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetDefaultRetentionPolicyResponse x
-> GetDefaultRetentionPolicyResponse
$cfrom :: forall x.
GetDefaultRetentionPolicyResponse
-> Rep GetDefaultRetentionPolicyResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetDefaultRetentionPolicyResponse' 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:
--
-- 'name', 'getDefaultRetentionPolicyResponse_name' - The retention policy name.
--
-- 'id', 'getDefaultRetentionPolicyResponse_id' - The retention policy ID.
--
-- 'folderConfigurations', 'getDefaultRetentionPolicyResponse_folderConfigurations' - The retention policy folder configurations.
--
-- 'description', 'getDefaultRetentionPolicyResponse_description' - The retention policy description.
--
-- 'httpStatus', 'getDefaultRetentionPolicyResponse_httpStatus' - The response's http status code.
newGetDefaultRetentionPolicyResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetDefaultRetentionPolicyResponse
newGetDefaultRetentionPolicyResponse :: Int -> GetDefaultRetentionPolicyResponse
newGetDefaultRetentionPolicyResponse Int
pHttpStatus_ =
  GetDefaultRetentionPolicyResponse' :: Maybe Text
-> Maybe Text
-> Maybe [FolderConfiguration]
-> Maybe Text
-> Int
-> GetDefaultRetentionPolicyResponse
GetDefaultRetentionPolicyResponse'
    { $sel:name:GetDefaultRetentionPolicyResponse' :: Maybe Text
name =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:id:GetDefaultRetentionPolicyResponse' :: Maybe Text
id = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:folderConfigurations:GetDefaultRetentionPolicyResponse' :: Maybe [FolderConfiguration]
folderConfigurations = Maybe [FolderConfiguration]
forall a. Maybe a
Prelude.Nothing,
      $sel:description:GetDefaultRetentionPolicyResponse' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetDefaultRetentionPolicyResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The retention policy name.
getDefaultRetentionPolicyResponse_name :: Lens.Lens' GetDefaultRetentionPolicyResponse (Prelude.Maybe Prelude.Text)
getDefaultRetentionPolicyResponse_name :: (Maybe Text -> f (Maybe Text))
-> GetDefaultRetentionPolicyResponse
-> f GetDefaultRetentionPolicyResponse
getDefaultRetentionPolicyResponse_name = (GetDefaultRetentionPolicyResponse -> Maybe Text)
-> (GetDefaultRetentionPolicyResponse
    -> Maybe Text -> GetDefaultRetentionPolicyResponse)
-> Lens
     GetDefaultRetentionPolicyResponse
     GetDefaultRetentionPolicyResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDefaultRetentionPolicyResponse' {Maybe Text
name :: Maybe Text
$sel:name:GetDefaultRetentionPolicyResponse' :: GetDefaultRetentionPolicyResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: GetDefaultRetentionPolicyResponse
s@GetDefaultRetentionPolicyResponse' {} Maybe Text
a -> GetDefaultRetentionPolicyResponse
s {$sel:name:GetDefaultRetentionPolicyResponse' :: Maybe Text
name = Maybe Text
a} :: GetDefaultRetentionPolicyResponse)

-- | The retention policy ID.
getDefaultRetentionPolicyResponse_id :: Lens.Lens' GetDefaultRetentionPolicyResponse (Prelude.Maybe Prelude.Text)
getDefaultRetentionPolicyResponse_id :: (Maybe Text -> f (Maybe Text))
-> GetDefaultRetentionPolicyResponse
-> f GetDefaultRetentionPolicyResponse
getDefaultRetentionPolicyResponse_id = (GetDefaultRetentionPolicyResponse -> Maybe Text)
-> (GetDefaultRetentionPolicyResponse
    -> Maybe Text -> GetDefaultRetentionPolicyResponse)
-> Lens
     GetDefaultRetentionPolicyResponse
     GetDefaultRetentionPolicyResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDefaultRetentionPolicyResponse' {Maybe Text
id :: Maybe Text
$sel:id:GetDefaultRetentionPolicyResponse' :: GetDefaultRetentionPolicyResponse -> Maybe Text
id} -> Maybe Text
id) (\s :: GetDefaultRetentionPolicyResponse
s@GetDefaultRetentionPolicyResponse' {} Maybe Text
a -> GetDefaultRetentionPolicyResponse
s {$sel:id:GetDefaultRetentionPolicyResponse' :: Maybe Text
id = Maybe Text
a} :: GetDefaultRetentionPolicyResponse)

-- | The retention policy folder configurations.
getDefaultRetentionPolicyResponse_folderConfigurations :: Lens.Lens' GetDefaultRetentionPolicyResponse (Prelude.Maybe [FolderConfiguration])
getDefaultRetentionPolicyResponse_folderConfigurations :: (Maybe [FolderConfiguration] -> f (Maybe [FolderConfiguration]))
-> GetDefaultRetentionPolicyResponse
-> f GetDefaultRetentionPolicyResponse
getDefaultRetentionPolicyResponse_folderConfigurations = (GetDefaultRetentionPolicyResponse -> Maybe [FolderConfiguration])
-> (GetDefaultRetentionPolicyResponse
    -> Maybe [FolderConfiguration]
    -> GetDefaultRetentionPolicyResponse)
-> Lens
     GetDefaultRetentionPolicyResponse
     GetDefaultRetentionPolicyResponse
     (Maybe [FolderConfiguration])
     (Maybe [FolderConfiguration])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDefaultRetentionPolicyResponse' {Maybe [FolderConfiguration]
folderConfigurations :: Maybe [FolderConfiguration]
$sel:folderConfigurations:GetDefaultRetentionPolicyResponse' :: GetDefaultRetentionPolicyResponse -> Maybe [FolderConfiguration]
folderConfigurations} -> Maybe [FolderConfiguration]
folderConfigurations) (\s :: GetDefaultRetentionPolicyResponse
s@GetDefaultRetentionPolicyResponse' {} Maybe [FolderConfiguration]
a -> GetDefaultRetentionPolicyResponse
s {$sel:folderConfigurations:GetDefaultRetentionPolicyResponse' :: Maybe [FolderConfiguration]
folderConfigurations = Maybe [FolderConfiguration]
a} :: GetDefaultRetentionPolicyResponse) ((Maybe [FolderConfiguration] -> f (Maybe [FolderConfiguration]))
 -> GetDefaultRetentionPolicyResponse
 -> f GetDefaultRetentionPolicyResponse)
-> ((Maybe [FolderConfiguration]
     -> f (Maybe [FolderConfiguration]))
    -> Maybe [FolderConfiguration] -> f (Maybe [FolderConfiguration]))
-> (Maybe [FolderConfiguration] -> f (Maybe [FolderConfiguration]))
-> GetDefaultRetentionPolicyResponse
-> f GetDefaultRetentionPolicyResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [FolderConfiguration]
  [FolderConfiguration]
  [FolderConfiguration]
  [FolderConfiguration]
-> Iso
     (Maybe [FolderConfiguration])
     (Maybe [FolderConfiguration])
     (Maybe [FolderConfiguration])
     (Maybe [FolderConfiguration])
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 AnIso
  [FolderConfiguration]
  [FolderConfiguration]
  [FolderConfiguration]
  [FolderConfiguration]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The retention policy description.
getDefaultRetentionPolicyResponse_description :: Lens.Lens' GetDefaultRetentionPolicyResponse (Prelude.Maybe Prelude.Text)
getDefaultRetentionPolicyResponse_description :: (Maybe Text -> f (Maybe Text))
-> GetDefaultRetentionPolicyResponse
-> f GetDefaultRetentionPolicyResponse
getDefaultRetentionPolicyResponse_description = (GetDefaultRetentionPolicyResponse -> Maybe Text)
-> (GetDefaultRetentionPolicyResponse
    -> Maybe Text -> GetDefaultRetentionPolicyResponse)
-> Lens
     GetDefaultRetentionPolicyResponse
     GetDefaultRetentionPolicyResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDefaultRetentionPolicyResponse' {Maybe Text
description :: Maybe Text
$sel:description:GetDefaultRetentionPolicyResponse' :: GetDefaultRetentionPolicyResponse -> Maybe Text
description} -> Maybe Text
description) (\s :: GetDefaultRetentionPolicyResponse
s@GetDefaultRetentionPolicyResponse' {} Maybe Text
a -> GetDefaultRetentionPolicyResponse
s {$sel:description:GetDefaultRetentionPolicyResponse' :: Maybe Text
description = Maybe Text
a} :: GetDefaultRetentionPolicyResponse)

-- | The response's http status code.
getDefaultRetentionPolicyResponse_httpStatus :: Lens.Lens' GetDefaultRetentionPolicyResponse Prelude.Int
getDefaultRetentionPolicyResponse_httpStatus :: (Int -> f Int)
-> GetDefaultRetentionPolicyResponse
-> f GetDefaultRetentionPolicyResponse
getDefaultRetentionPolicyResponse_httpStatus = (GetDefaultRetentionPolicyResponse -> Int)
-> (GetDefaultRetentionPolicyResponse
    -> Int -> GetDefaultRetentionPolicyResponse)
-> Lens
     GetDefaultRetentionPolicyResponse
     GetDefaultRetentionPolicyResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDefaultRetentionPolicyResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetDefaultRetentionPolicyResponse' :: GetDefaultRetentionPolicyResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetDefaultRetentionPolicyResponse
s@GetDefaultRetentionPolicyResponse' {} Int
a -> GetDefaultRetentionPolicyResponse
s {$sel:httpStatus:GetDefaultRetentionPolicyResponse' :: Int
httpStatus = Int
a} :: GetDefaultRetentionPolicyResponse)

instance
  Prelude.NFData
    GetDefaultRetentionPolicyResponse