{-# 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.StorageGateway.CreateTapePool
-- 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)
--
-- Creates a new custom tape pool. You can use custom tape pool to enable
-- tape retention lock on tapes that are archived in the custom pool.
module Amazonka.StorageGateway.CreateTapePool
  ( -- * Creating a Request
    CreateTapePool (..),
    newCreateTapePool,

    -- * Request Lenses
    createTapePool_retentionLockType,
    createTapePool_retentionLockTimeInDays,
    createTapePool_tags,
    createTapePool_poolName,
    createTapePool_storageClass,

    -- * Destructuring the Response
    CreateTapePoolResponse (..),
    newCreateTapePoolResponse,

    -- * Response Lenses
    createTapePoolResponse_poolARN,
    createTapePoolResponse_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.StorageGateway.Types

-- | /See:/ 'newCreateTapePool' smart constructor.
data CreateTapePool = CreateTapePool'
  { -- | Tape retention lock can be configured in two modes. When configured in
    -- governance mode, Amazon Web Services accounts with specific IAM
    -- permissions are authorized to remove the tape retention lock from
    -- archived virtual tapes. When configured in compliance mode, the tape
    -- retention lock cannot be removed by any user, including the root Amazon
    -- Web Services account.
    CreateTapePool -> Maybe RetentionLockType
retentionLockType :: Prelude.Maybe RetentionLockType,
    -- | Tape retention lock time is set in days. Tape retention lock can be
    -- enabled for up to 100 years (36,500 days).
    CreateTapePool -> Maybe Natural
retentionLockTimeInDays :: Prelude.Maybe Prelude.Natural,
    -- | A list of up to 50 tags that can be assigned to tape pool. Each tag is a
    -- key-value pair.
    --
    -- Valid characters for key and value are letters, spaces, and numbers
    -- representable in UTF-8 format, and the following special characters: + -
    -- = . _ : \/ \@. The maximum length of a tag\'s key is 128 characters, and
    -- the maximum length for a tag\'s value is 256.
    CreateTapePool -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The name of the new custom tape pool.
    CreateTapePool -> Text
poolName :: Prelude.Text,
    -- | The storage class that is associated with the new custom pool. When you
    -- use your backup application to eject the tape, the tape is archived
    -- directly into the storage class (S3 Glacier or S3 Glacier Deep Archive)
    -- that corresponds to the pool.
    CreateTapePool -> TapeStorageClass
storageClass :: TapeStorageClass
  }
  deriving (CreateTapePool -> CreateTapePool -> Bool
(CreateTapePool -> CreateTapePool -> Bool)
-> (CreateTapePool -> CreateTapePool -> Bool) -> Eq CreateTapePool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateTapePool -> CreateTapePool -> Bool
$c/= :: CreateTapePool -> CreateTapePool -> Bool
== :: CreateTapePool -> CreateTapePool -> Bool
$c== :: CreateTapePool -> CreateTapePool -> Bool
Prelude.Eq, ReadPrec [CreateTapePool]
ReadPrec CreateTapePool
Int -> ReadS CreateTapePool
ReadS [CreateTapePool]
(Int -> ReadS CreateTapePool)
-> ReadS [CreateTapePool]
-> ReadPrec CreateTapePool
-> ReadPrec [CreateTapePool]
-> Read CreateTapePool
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateTapePool]
$creadListPrec :: ReadPrec [CreateTapePool]
readPrec :: ReadPrec CreateTapePool
$creadPrec :: ReadPrec CreateTapePool
readList :: ReadS [CreateTapePool]
$creadList :: ReadS [CreateTapePool]
readsPrec :: Int -> ReadS CreateTapePool
$creadsPrec :: Int -> ReadS CreateTapePool
Prelude.Read, Int -> CreateTapePool -> ShowS
[CreateTapePool] -> ShowS
CreateTapePool -> String
(Int -> CreateTapePool -> ShowS)
-> (CreateTapePool -> String)
-> ([CreateTapePool] -> ShowS)
-> Show CreateTapePool
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateTapePool] -> ShowS
$cshowList :: [CreateTapePool] -> ShowS
show :: CreateTapePool -> String
$cshow :: CreateTapePool -> String
showsPrec :: Int -> CreateTapePool -> ShowS
$cshowsPrec :: Int -> CreateTapePool -> ShowS
Prelude.Show, (forall x. CreateTapePool -> Rep CreateTapePool x)
-> (forall x. Rep CreateTapePool x -> CreateTapePool)
-> Generic CreateTapePool
forall x. Rep CreateTapePool x -> CreateTapePool
forall x. CreateTapePool -> Rep CreateTapePool x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateTapePool x -> CreateTapePool
$cfrom :: forall x. CreateTapePool -> Rep CreateTapePool x
Prelude.Generic)

-- |
-- Create a value of 'CreateTapePool' 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:
--
-- 'retentionLockType', 'createTapePool_retentionLockType' - Tape retention lock can be configured in two modes. When configured in
-- governance mode, Amazon Web Services accounts with specific IAM
-- permissions are authorized to remove the tape retention lock from
-- archived virtual tapes. When configured in compliance mode, the tape
-- retention lock cannot be removed by any user, including the root Amazon
-- Web Services account.
--
-- 'retentionLockTimeInDays', 'createTapePool_retentionLockTimeInDays' - Tape retention lock time is set in days. Tape retention lock can be
-- enabled for up to 100 years (36,500 days).
--
-- 'tags', 'createTapePool_tags' - A list of up to 50 tags that can be assigned to tape pool. Each tag is a
-- key-value pair.
--
-- Valid characters for key and value are letters, spaces, and numbers
-- representable in UTF-8 format, and the following special characters: + -
-- = . _ : \/ \@. The maximum length of a tag\'s key is 128 characters, and
-- the maximum length for a tag\'s value is 256.
--
-- 'poolName', 'createTapePool_poolName' - The name of the new custom tape pool.
--
-- 'storageClass', 'createTapePool_storageClass' - The storage class that is associated with the new custom pool. When you
-- use your backup application to eject the tape, the tape is archived
-- directly into the storage class (S3 Glacier or S3 Glacier Deep Archive)
-- that corresponds to the pool.
newCreateTapePool ::
  -- | 'poolName'
  Prelude.Text ->
  -- | 'storageClass'
  TapeStorageClass ->
  CreateTapePool
newCreateTapePool :: Text -> TapeStorageClass -> CreateTapePool
newCreateTapePool Text
pPoolName_ TapeStorageClass
pStorageClass_ =
  CreateTapePool' :: Maybe RetentionLockType
-> Maybe Natural
-> Maybe [Tag]
-> Text
-> TapeStorageClass
-> CreateTapePool
CreateTapePool'
    { $sel:retentionLockType:CreateTapePool' :: Maybe RetentionLockType
retentionLockType =
        Maybe RetentionLockType
forall a. Maybe a
Prelude.Nothing,
      $sel:retentionLockTimeInDays:CreateTapePool' :: Maybe Natural
retentionLockTimeInDays = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateTapePool' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
      $sel:poolName:CreateTapePool' :: Text
poolName = Text
pPoolName_,
      $sel:storageClass:CreateTapePool' :: TapeStorageClass
storageClass = TapeStorageClass
pStorageClass_
    }

-- | Tape retention lock can be configured in two modes. When configured in
-- governance mode, Amazon Web Services accounts with specific IAM
-- permissions are authorized to remove the tape retention lock from
-- archived virtual tapes. When configured in compliance mode, the tape
-- retention lock cannot be removed by any user, including the root Amazon
-- Web Services account.
createTapePool_retentionLockType :: Lens.Lens' CreateTapePool (Prelude.Maybe RetentionLockType)
createTapePool_retentionLockType :: (Maybe RetentionLockType -> f (Maybe RetentionLockType))
-> CreateTapePool -> f CreateTapePool
createTapePool_retentionLockType = (CreateTapePool -> Maybe RetentionLockType)
-> (CreateTapePool -> Maybe RetentionLockType -> CreateTapePool)
-> Lens
     CreateTapePool
     CreateTapePool
     (Maybe RetentionLockType)
     (Maybe RetentionLockType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTapePool' {Maybe RetentionLockType
retentionLockType :: Maybe RetentionLockType
$sel:retentionLockType:CreateTapePool' :: CreateTapePool -> Maybe RetentionLockType
retentionLockType} -> Maybe RetentionLockType
retentionLockType) (\s :: CreateTapePool
s@CreateTapePool' {} Maybe RetentionLockType
a -> CreateTapePool
s {$sel:retentionLockType:CreateTapePool' :: Maybe RetentionLockType
retentionLockType = Maybe RetentionLockType
a} :: CreateTapePool)

-- | Tape retention lock time is set in days. Tape retention lock can be
-- enabled for up to 100 years (36,500 days).
createTapePool_retentionLockTimeInDays :: Lens.Lens' CreateTapePool (Prelude.Maybe Prelude.Natural)
createTapePool_retentionLockTimeInDays :: (Maybe Natural -> f (Maybe Natural))
-> CreateTapePool -> f CreateTapePool
createTapePool_retentionLockTimeInDays = (CreateTapePool -> Maybe Natural)
-> (CreateTapePool -> Maybe Natural -> CreateTapePool)
-> Lens
     CreateTapePool CreateTapePool (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTapePool' {Maybe Natural
retentionLockTimeInDays :: Maybe Natural
$sel:retentionLockTimeInDays:CreateTapePool' :: CreateTapePool -> Maybe Natural
retentionLockTimeInDays} -> Maybe Natural
retentionLockTimeInDays) (\s :: CreateTapePool
s@CreateTapePool' {} Maybe Natural
a -> CreateTapePool
s {$sel:retentionLockTimeInDays:CreateTapePool' :: Maybe Natural
retentionLockTimeInDays = Maybe Natural
a} :: CreateTapePool)

-- | A list of up to 50 tags that can be assigned to tape pool. Each tag is a
-- key-value pair.
--
-- Valid characters for key and value are letters, spaces, and numbers
-- representable in UTF-8 format, and the following special characters: + -
-- = . _ : \/ \@. The maximum length of a tag\'s key is 128 characters, and
-- the maximum length for a tag\'s value is 256.
createTapePool_tags :: Lens.Lens' CreateTapePool (Prelude.Maybe [Tag])
createTapePool_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateTapePool -> f CreateTapePool
createTapePool_tags = (CreateTapePool -> Maybe [Tag])
-> (CreateTapePool -> Maybe [Tag] -> CreateTapePool)
-> Lens CreateTapePool CreateTapePool (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTapePool' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateTapePool' :: CreateTapePool -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateTapePool
s@CreateTapePool' {} Maybe [Tag]
a -> CreateTapePool
s {$sel:tags:CreateTapePool' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateTapePool) ((Maybe [Tag] -> f (Maybe [Tag]))
 -> CreateTapePool -> f CreateTapePool)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
    -> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateTapePool
-> f CreateTapePool
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of the new custom tape pool.
createTapePool_poolName :: Lens.Lens' CreateTapePool Prelude.Text
createTapePool_poolName :: (Text -> f Text) -> CreateTapePool -> f CreateTapePool
createTapePool_poolName = (CreateTapePool -> Text)
-> (CreateTapePool -> Text -> CreateTapePool)
-> Lens CreateTapePool CreateTapePool Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTapePool' {Text
poolName :: Text
$sel:poolName:CreateTapePool' :: CreateTapePool -> Text
poolName} -> Text
poolName) (\s :: CreateTapePool
s@CreateTapePool' {} Text
a -> CreateTapePool
s {$sel:poolName:CreateTapePool' :: Text
poolName = Text
a} :: CreateTapePool)

-- | The storage class that is associated with the new custom pool. When you
-- use your backup application to eject the tape, the tape is archived
-- directly into the storage class (S3 Glacier or S3 Glacier Deep Archive)
-- that corresponds to the pool.
createTapePool_storageClass :: Lens.Lens' CreateTapePool TapeStorageClass
createTapePool_storageClass :: (TapeStorageClass -> f TapeStorageClass)
-> CreateTapePool -> f CreateTapePool
createTapePool_storageClass = (CreateTapePool -> TapeStorageClass)
-> (CreateTapePool -> TapeStorageClass -> CreateTapePool)
-> Lens
     CreateTapePool CreateTapePool TapeStorageClass TapeStorageClass
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTapePool' {TapeStorageClass
storageClass :: TapeStorageClass
$sel:storageClass:CreateTapePool' :: CreateTapePool -> TapeStorageClass
storageClass} -> TapeStorageClass
storageClass) (\s :: CreateTapePool
s@CreateTapePool' {} TapeStorageClass
a -> CreateTapePool
s {$sel:storageClass:CreateTapePool' :: TapeStorageClass
storageClass = TapeStorageClass
a} :: CreateTapePool)

instance Core.AWSRequest CreateTapePool where
  type
    AWSResponse CreateTapePool =
      CreateTapePoolResponse
  request :: CreateTapePool -> Request CreateTapePool
request = Service -> CreateTapePool -> Request CreateTapePool
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateTapePool
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateTapePool)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CreateTapePool))
-> Logger
-> Service
-> Proxy CreateTapePool
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateTapePool)))
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 -> Int -> CreateTapePoolResponse
CreateTapePoolResponse'
            (Maybe Text -> Int -> CreateTapePoolResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateTapePoolResponse)
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
"PoolARN")
            Either String (Int -> CreateTapePoolResponse)
-> Either String Int -> Either String CreateTapePoolResponse
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 CreateTapePool

instance Prelude.NFData CreateTapePool

instance Core.ToHeaders CreateTapePool where
  toHeaders :: CreateTapePool -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateTapePool -> 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
"StorageGateway_20130630.CreateTapePool" ::
                          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 CreateTapePool where
  toJSON :: CreateTapePool -> Value
toJSON CreateTapePool' {Maybe Natural
Maybe [Tag]
Maybe RetentionLockType
Text
TapeStorageClass
storageClass :: TapeStorageClass
poolName :: Text
tags :: Maybe [Tag]
retentionLockTimeInDays :: Maybe Natural
retentionLockType :: Maybe RetentionLockType
$sel:storageClass:CreateTapePool' :: CreateTapePool -> TapeStorageClass
$sel:poolName:CreateTapePool' :: CreateTapePool -> Text
$sel:tags:CreateTapePool' :: CreateTapePool -> Maybe [Tag]
$sel:retentionLockTimeInDays:CreateTapePool' :: CreateTapePool -> Maybe Natural
$sel:retentionLockType:CreateTapePool' :: CreateTapePool -> Maybe RetentionLockType
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"RetentionLockType" Text -> RetentionLockType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (RetentionLockType -> Pair)
-> Maybe RetentionLockType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RetentionLockType
retentionLockType,
            (Text
"RetentionLockTimeInDays" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
retentionLockTimeInDays,
            (Text
"Tags" Text -> [Tag] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Tag] -> Pair) -> Maybe [Tag] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"PoolName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
poolName),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"StorageClass" Text -> TapeStorageClass -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= TapeStorageClass
storageClass)
          ]
      )

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

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

-- | /See:/ 'newCreateTapePoolResponse' smart constructor.
data CreateTapePoolResponse = CreateTapePoolResponse'
  { -- | The unique Amazon Resource Name (ARN) that represents the custom tape
    -- pool. Use the ListTapePools operation to return a list of tape pools for
    -- your account and Amazon Web Services Region.
    CreateTapePoolResponse -> Maybe Text
poolARN :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    CreateTapePoolResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateTapePoolResponse -> CreateTapePoolResponse -> Bool
(CreateTapePoolResponse -> CreateTapePoolResponse -> Bool)
-> (CreateTapePoolResponse -> CreateTapePoolResponse -> Bool)
-> Eq CreateTapePoolResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateTapePoolResponse -> CreateTapePoolResponse -> Bool
$c/= :: CreateTapePoolResponse -> CreateTapePoolResponse -> Bool
== :: CreateTapePoolResponse -> CreateTapePoolResponse -> Bool
$c== :: CreateTapePoolResponse -> CreateTapePoolResponse -> Bool
Prelude.Eq, ReadPrec [CreateTapePoolResponse]
ReadPrec CreateTapePoolResponse
Int -> ReadS CreateTapePoolResponse
ReadS [CreateTapePoolResponse]
(Int -> ReadS CreateTapePoolResponse)
-> ReadS [CreateTapePoolResponse]
-> ReadPrec CreateTapePoolResponse
-> ReadPrec [CreateTapePoolResponse]
-> Read CreateTapePoolResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateTapePoolResponse]
$creadListPrec :: ReadPrec [CreateTapePoolResponse]
readPrec :: ReadPrec CreateTapePoolResponse
$creadPrec :: ReadPrec CreateTapePoolResponse
readList :: ReadS [CreateTapePoolResponse]
$creadList :: ReadS [CreateTapePoolResponse]
readsPrec :: Int -> ReadS CreateTapePoolResponse
$creadsPrec :: Int -> ReadS CreateTapePoolResponse
Prelude.Read, Int -> CreateTapePoolResponse -> ShowS
[CreateTapePoolResponse] -> ShowS
CreateTapePoolResponse -> String
(Int -> CreateTapePoolResponse -> ShowS)
-> (CreateTapePoolResponse -> String)
-> ([CreateTapePoolResponse] -> ShowS)
-> Show CreateTapePoolResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateTapePoolResponse] -> ShowS
$cshowList :: [CreateTapePoolResponse] -> ShowS
show :: CreateTapePoolResponse -> String
$cshow :: CreateTapePoolResponse -> String
showsPrec :: Int -> CreateTapePoolResponse -> ShowS
$cshowsPrec :: Int -> CreateTapePoolResponse -> ShowS
Prelude.Show, (forall x. CreateTapePoolResponse -> Rep CreateTapePoolResponse x)
-> (forall x.
    Rep CreateTapePoolResponse x -> CreateTapePoolResponse)
-> Generic CreateTapePoolResponse
forall x. Rep CreateTapePoolResponse x -> CreateTapePoolResponse
forall x. CreateTapePoolResponse -> Rep CreateTapePoolResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateTapePoolResponse x -> CreateTapePoolResponse
$cfrom :: forall x. CreateTapePoolResponse -> Rep CreateTapePoolResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateTapePoolResponse' 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:
--
-- 'poolARN', 'createTapePoolResponse_poolARN' - The unique Amazon Resource Name (ARN) that represents the custom tape
-- pool. Use the ListTapePools operation to return a list of tape pools for
-- your account and Amazon Web Services Region.
--
-- 'httpStatus', 'createTapePoolResponse_httpStatus' - The response's http status code.
newCreateTapePoolResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateTapePoolResponse
newCreateTapePoolResponse :: Int -> CreateTapePoolResponse
newCreateTapePoolResponse Int
pHttpStatus_ =
  CreateTapePoolResponse' :: Maybe Text -> Int -> CreateTapePoolResponse
CreateTapePoolResponse'
    { $sel:poolARN:CreateTapePoolResponse' :: Maybe Text
poolARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateTapePoolResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The unique Amazon Resource Name (ARN) that represents the custom tape
-- pool. Use the ListTapePools operation to return a list of tape pools for
-- your account and Amazon Web Services Region.
createTapePoolResponse_poolARN :: Lens.Lens' CreateTapePoolResponse (Prelude.Maybe Prelude.Text)
createTapePoolResponse_poolARN :: (Maybe Text -> f (Maybe Text))
-> CreateTapePoolResponse -> f CreateTapePoolResponse
createTapePoolResponse_poolARN = (CreateTapePoolResponse -> Maybe Text)
-> (CreateTapePoolResponse -> Maybe Text -> CreateTapePoolResponse)
-> Lens
     CreateTapePoolResponse
     CreateTapePoolResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTapePoolResponse' {Maybe Text
poolARN :: Maybe Text
$sel:poolARN:CreateTapePoolResponse' :: CreateTapePoolResponse -> Maybe Text
poolARN} -> Maybe Text
poolARN) (\s :: CreateTapePoolResponse
s@CreateTapePoolResponse' {} Maybe Text
a -> CreateTapePoolResponse
s {$sel:poolARN:CreateTapePoolResponse' :: Maybe Text
poolARN = Maybe Text
a} :: CreateTapePoolResponse)

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

instance Prelude.NFData CreateTapePoolResponse