{-# 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.DataSync.CreateLocationEfs
-- 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 an endpoint for an Amazon EFS file system.
module Amazonka.DataSync.CreateLocationEfs
  ( -- * Creating a Request
    CreateLocationEfs (..),
    newCreateLocationEfs,

    -- * Request Lenses
    createLocationEfs_subdirectory,
    createLocationEfs_tags,
    createLocationEfs_efsFilesystemArn,
    createLocationEfs_ec2Config,

    -- * Destructuring the Response
    CreateLocationEfsResponse (..),
    newCreateLocationEfsResponse,

    -- * Response Lenses
    createLocationEfsResponse_locationArn,
    createLocationEfsResponse_httpStatus,
  )
where

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

-- | CreateLocationEfsRequest
--
-- /See:/ 'newCreateLocationEfs' smart constructor.
data CreateLocationEfs = CreateLocationEfs'
  { -- | A subdirectory in the location’s path. This subdirectory in the EFS file
    -- system is used to read data from the EFS source location or write data
    -- to the EFS destination. By default, DataSync uses the root directory.
    --
    -- @Subdirectory@ must be specified with forward slashes. For example,
    -- @\/path\/to\/folder@.
    CreateLocationEfs -> Maybe Text
subdirectory :: Prelude.Maybe Prelude.Text,
    -- | The key-value pair that represents a tag that you want to add to the
    -- resource. The value can be an empty string. This value helps you manage,
    -- filter, and search for your resources. We recommend that you create a
    -- name tag for your location.
    CreateLocationEfs -> Maybe [TagListEntry]
tags :: Prelude.Maybe [TagListEntry],
    -- | The Amazon Resource Name (ARN) for the Amazon EFS file system.
    CreateLocationEfs -> Text
efsFilesystemArn :: Prelude.Text,
    -- | The subnet and security group that the Amazon EFS file system uses. The
    -- security group that you provide needs to be able to communicate with the
    -- security group on the mount target in the subnet specified.
    --
    -- The exact relationship between security group M (of the mount target)
    -- and security group S (which you provide for DataSync to use at this
    -- stage) is as follows:
    --
    -- -   Security group M (which you associate with the mount target) must
    --     allow inbound access for the Transmission Control Protocol (TCP) on
    --     the NFS port (2049) from security group S. You can enable inbound
    --     connections either by IP address (CIDR range) or security group.
    --
    -- -   Security group S (provided to DataSync to access EFS) should have a
    --     rule that enables outbound connections to the NFS port on one of the
    --     file system’s mount targets. You can enable outbound connections
    --     either by IP address (CIDR range) or security group.
    --
    --     For information about security groups and mount targets, see
    --     Security Groups for Amazon EC2 Instances and Mount Targets in the
    --     /Amazon EFS User Guide./
    CreateLocationEfs -> Ec2Config
ec2Config :: Ec2Config
  }
  deriving (CreateLocationEfs -> CreateLocationEfs -> Bool
(CreateLocationEfs -> CreateLocationEfs -> Bool)
-> (CreateLocationEfs -> CreateLocationEfs -> Bool)
-> Eq CreateLocationEfs
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateLocationEfs -> CreateLocationEfs -> Bool
$c/= :: CreateLocationEfs -> CreateLocationEfs -> Bool
== :: CreateLocationEfs -> CreateLocationEfs -> Bool
$c== :: CreateLocationEfs -> CreateLocationEfs -> Bool
Prelude.Eq, ReadPrec [CreateLocationEfs]
ReadPrec CreateLocationEfs
Int -> ReadS CreateLocationEfs
ReadS [CreateLocationEfs]
(Int -> ReadS CreateLocationEfs)
-> ReadS [CreateLocationEfs]
-> ReadPrec CreateLocationEfs
-> ReadPrec [CreateLocationEfs]
-> Read CreateLocationEfs
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateLocationEfs]
$creadListPrec :: ReadPrec [CreateLocationEfs]
readPrec :: ReadPrec CreateLocationEfs
$creadPrec :: ReadPrec CreateLocationEfs
readList :: ReadS [CreateLocationEfs]
$creadList :: ReadS [CreateLocationEfs]
readsPrec :: Int -> ReadS CreateLocationEfs
$creadsPrec :: Int -> ReadS CreateLocationEfs
Prelude.Read, Int -> CreateLocationEfs -> ShowS
[CreateLocationEfs] -> ShowS
CreateLocationEfs -> String
(Int -> CreateLocationEfs -> ShowS)
-> (CreateLocationEfs -> String)
-> ([CreateLocationEfs] -> ShowS)
-> Show CreateLocationEfs
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateLocationEfs] -> ShowS
$cshowList :: [CreateLocationEfs] -> ShowS
show :: CreateLocationEfs -> String
$cshow :: CreateLocationEfs -> String
showsPrec :: Int -> CreateLocationEfs -> ShowS
$cshowsPrec :: Int -> CreateLocationEfs -> ShowS
Prelude.Show, (forall x. CreateLocationEfs -> Rep CreateLocationEfs x)
-> (forall x. Rep CreateLocationEfs x -> CreateLocationEfs)
-> Generic CreateLocationEfs
forall x. Rep CreateLocationEfs x -> CreateLocationEfs
forall x. CreateLocationEfs -> Rep CreateLocationEfs x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateLocationEfs x -> CreateLocationEfs
$cfrom :: forall x. CreateLocationEfs -> Rep CreateLocationEfs x
Prelude.Generic)

-- |
-- Create a value of 'CreateLocationEfs' 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:
--
-- 'subdirectory', 'createLocationEfs_subdirectory' - A subdirectory in the location’s path. This subdirectory in the EFS file
-- system is used to read data from the EFS source location or write data
-- to the EFS destination. By default, DataSync uses the root directory.
--
-- @Subdirectory@ must be specified with forward slashes. For example,
-- @\/path\/to\/folder@.
--
-- 'tags', 'createLocationEfs_tags' - The key-value pair that represents a tag that you want to add to the
-- resource. The value can be an empty string. This value helps you manage,
-- filter, and search for your resources. We recommend that you create a
-- name tag for your location.
--
-- 'efsFilesystemArn', 'createLocationEfs_efsFilesystemArn' - The Amazon Resource Name (ARN) for the Amazon EFS file system.
--
-- 'ec2Config', 'createLocationEfs_ec2Config' - The subnet and security group that the Amazon EFS file system uses. The
-- security group that you provide needs to be able to communicate with the
-- security group on the mount target in the subnet specified.
--
-- The exact relationship between security group M (of the mount target)
-- and security group S (which you provide for DataSync to use at this
-- stage) is as follows:
--
-- -   Security group M (which you associate with the mount target) must
--     allow inbound access for the Transmission Control Protocol (TCP) on
--     the NFS port (2049) from security group S. You can enable inbound
--     connections either by IP address (CIDR range) or security group.
--
-- -   Security group S (provided to DataSync to access EFS) should have a
--     rule that enables outbound connections to the NFS port on one of the
--     file system’s mount targets. You can enable outbound connections
--     either by IP address (CIDR range) or security group.
--
--     For information about security groups and mount targets, see
--     Security Groups for Amazon EC2 Instances and Mount Targets in the
--     /Amazon EFS User Guide./
newCreateLocationEfs ::
  -- | 'efsFilesystemArn'
  Prelude.Text ->
  -- | 'ec2Config'
  Ec2Config ->
  CreateLocationEfs
newCreateLocationEfs :: Text -> Ec2Config -> CreateLocationEfs
newCreateLocationEfs Text
pEfsFilesystemArn_ Ec2Config
pEc2Config_ =
  CreateLocationEfs' :: Maybe Text
-> Maybe [TagListEntry] -> Text -> Ec2Config -> CreateLocationEfs
CreateLocationEfs'
    { $sel:subdirectory:CreateLocationEfs' :: Maybe Text
subdirectory = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateLocationEfs' :: Maybe [TagListEntry]
tags = Maybe [TagListEntry]
forall a. Maybe a
Prelude.Nothing,
      $sel:efsFilesystemArn:CreateLocationEfs' :: Text
efsFilesystemArn = Text
pEfsFilesystemArn_,
      $sel:ec2Config:CreateLocationEfs' :: Ec2Config
ec2Config = Ec2Config
pEc2Config_
    }

-- | A subdirectory in the location’s path. This subdirectory in the EFS file
-- system is used to read data from the EFS source location or write data
-- to the EFS destination. By default, DataSync uses the root directory.
--
-- @Subdirectory@ must be specified with forward slashes. For example,
-- @\/path\/to\/folder@.
createLocationEfs_subdirectory :: Lens.Lens' CreateLocationEfs (Prelude.Maybe Prelude.Text)
createLocationEfs_subdirectory :: (Maybe Text -> f (Maybe Text))
-> CreateLocationEfs -> f CreateLocationEfs
createLocationEfs_subdirectory = (CreateLocationEfs -> Maybe Text)
-> (CreateLocationEfs -> Maybe Text -> CreateLocationEfs)
-> Lens
     CreateLocationEfs CreateLocationEfs (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLocationEfs' {Maybe Text
subdirectory :: Maybe Text
$sel:subdirectory:CreateLocationEfs' :: CreateLocationEfs -> Maybe Text
subdirectory} -> Maybe Text
subdirectory) (\s :: CreateLocationEfs
s@CreateLocationEfs' {} Maybe Text
a -> CreateLocationEfs
s {$sel:subdirectory:CreateLocationEfs' :: Maybe Text
subdirectory = Maybe Text
a} :: CreateLocationEfs)

-- | The key-value pair that represents a tag that you want to add to the
-- resource. The value can be an empty string. This value helps you manage,
-- filter, and search for your resources. We recommend that you create a
-- name tag for your location.
createLocationEfs_tags :: Lens.Lens' CreateLocationEfs (Prelude.Maybe [TagListEntry])
createLocationEfs_tags :: (Maybe [TagListEntry] -> f (Maybe [TagListEntry]))
-> CreateLocationEfs -> f CreateLocationEfs
createLocationEfs_tags = (CreateLocationEfs -> Maybe [TagListEntry])
-> (CreateLocationEfs -> Maybe [TagListEntry] -> CreateLocationEfs)
-> Lens
     CreateLocationEfs
     CreateLocationEfs
     (Maybe [TagListEntry])
     (Maybe [TagListEntry])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLocationEfs' {Maybe [TagListEntry]
tags :: Maybe [TagListEntry]
$sel:tags:CreateLocationEfs' :: CreateLocationEfs -> Maybe [TagListEntry]
tags} -> Maybe [TagListEntry]
tags) (\s :: CreateLocationEfs
s@CreateLocationEfs' {} Maybe [TagListEntry]
a -> CreateLocationEfs
s {$sel:tags:CreateLocationEfs' :: Maybe [TagListEntry]
tags = Maybe [TagListEntry]
a} :: CreateLocationEfs) ((Maybe [TagListEntry] -> f (Maybe [TagListEntry]))
 -> CreateLocationEfs -> f CreateLocationEfs)
-> ((Maybe [TagListEntry] -> f (Maybe [TagListEntry]))
    -> Maybe [TagListEntry] -> f (Maybe [TagListEntry]))
-> (Maybe [TagListEntry] -> f (Maybe [TagListEntry]))
-> CreateLocationEfs
-> f CreateLocationEfs
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [TagListEntry] [TagListEntry] [TagListEntry] [TagListEntry]
-> Iso
     (Maybe [TagListEntry])
     (Maybe [TagListEntry])
     (Maybe [TagListEntry])
     (Maybe [TagListEntry])
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 [TagListEntry] [TagListEntry] [TagListEntry] [TagListEntry]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The Amazon Resource Name (ARN) for the Amazon EFS file system.
createLocationEfs_efsFilesystemArn :: Lens.Lens' CreateLocationEfs Prelude.Text
createLocationEfs_efsFilesystemArn :: (Text -> f Text) -> CreateLocationEfs -> f CreateLocationEfs
createLocationEfs_efsFilesystemArn = (CreateLocationEfs -> Text)
-> (CreateLocationEfs -> Text -> CreateLocationEfs)
-> Lens CreateLocationEfs CreateLocationEfs Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLocationEfs' {Text
efsFilesystemArn :: Text
$sel:efsFilesystemArn:CreateLocationEfs' :: CreateLocationEfs -> Text
efsFilesystemArn} -> Text
efsFilesystemArn) (\s :: CreateLocationEfs
s@CreateLocationEfs' {} Text
a -> CreateLocationEfs
s {$sel:efsFilesystemArn:CreateLocationEfs' :: Text
efsFilesystemArn = Text
a} :: CreateLocationEfs)

-- | The subnet and security group that the Amazon EFS file system uses. The
-- security group that you provide needs to be able to communicate with the
-- security group on the mount target in the subnet specified.
--
-- The exact relationship between security group M (of the mount target)
-- and security group S (which you provide for DataSync to use at this
-- stage) is as follows:
--
-- -   Security group M (which you associate with the mount target) must
--     allow inbound access for the Transmission Control Protocol (TCP) on
--     the NFS port (2049) from security group S. You can enable inbound
--     connections either by IP address (CIDR range) or security group.
--
-- -   Security group S (provided to DataSync to access EFS) should have a
--     rule that enables outbound connections to the NFS port on one of the
--     file system’s mount targets. You can enable outbound connections
--     either by IP address (CIDR range) or security group.
--
--     For information about security groups and mount targets, see
--     Security Groups for Amazon EC2 Instances and Mount Targets in the
--     /Amazon EFS User Guide./
createLocationEfs_ec2Config :: Lens.Lens' CreateLocationEfs Ec2Config
createLocationEfs_ec2Config :: (Ec2Config -> f Ec2Config)
-> CreateLocationEfs -> f CreateLocationEfs
createLocationEfs_ec2Config = (CreateLocationEfs -> Ec2Config)
-> (CreateLocationEfs -> Ec2Config -> CreateLocationEfs)
-> Lens CreateLocationEfs CreateLocationEfs Ec2Config Ec2Config
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLocationEfs' {Ec2Config
ec2Config :: Ec2Config
$sel:ec2Config:CreateLocationEfs' :: CreateLocationEfs -> Ec2Config
ec2Config} -> Ec2Config
ec2Config) (\s :: CreateLocationEfs
s@CreateLocationEfs' {} Ec2Config
a -> CreateLocationEfs
s {$sel:ec2Config:CreateLocationEfs' :: Ec2Config
ec2Config = Ec2Config
a} :: CreateLocationEfs)

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

instance Prelude.NFData CreateLocationEfs

instance Core.ToHeaders CreateLocationEfs where
  toHeaders :: CreateLocationEfs -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateLocationEfs -> 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
"FmrsService.CreateLocationEfs" ::
                          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 CreateLocationEfs where
  toJSON :: CreateLocationEfs -> Value
toJSON CreateLocationEfs' {Maybe [TagListEntry]
Maybe Text
Text
Ec2Config
ec2Config :: Ec2Config
efsFilesystemArn :: Text
tags :: Maybe [TagListEntry]
subdirectory :: Maybe Text
$sel:ec2Config:CreateLocationEfs' :: CreateLocationEfs -> Ec2Config
$sel:efsFilesystemArn:CreateLocationEfs' :: CreateLocationEfs -> Text
$sel:tags:CreateLocationEfs' :: CreateLocationEfs -> Maybe [TagListEntry]
$sel:subdirectory:CreateLocationEfs' :: CreateLocationEfs -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"Subdirectory" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
subdirectory,
            (Text
"Tags" Text -> [TagListEntry] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([TagListEntry] -> Pair) -> Maybe [TagListEntry] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [TagListEntry]
tags,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"EfsFilesystemArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
efsFilesystemArn),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Ec2Config" Text -> Ec2Config -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Ec2Config
ec2Config)
          ]
      )

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

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

-- | CreateLocationEfs
--
-- /See:/ 'newCreateLocationEfsResponse' smart constructor.
data CreateLocationEfsResponse = CreateLocationEfsResponse'
  { -- | The Amazon Resource Name (ARN) of the Amazon EFS file system location
    -- that is created.
    CreateLocationEfsResponse -> Maybe Text
locationArn :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    CreateLocationEfsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateLocationEfsResponse -> CreateLocationEfsResponse -> Bool
(CreateLocationEfsResponse -> CreateLocationEfsResponse -> Bool)
-> (CreateLocationEfsResponse -> CreateLocationEfsResponse -> Bool)
-> Eq CreateLocationEfsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateLocationEfsResponse -> CreateLocationEfsResponse -> Bool
$c/= :: CreateLocationEfsResponse -> CreateLocationEfsResponse -> Bool
== :: CreateLocationEfsResponse -> CreateLocationEfsResponse -> Bool
$c== :: CreateLocationEfsResponse -> CreateLocationEfsResponse -> Bool
Prelude.Eq, ReadPrec [CreateLocationEfsResponse]
ReadPrec CreateLocationEfsResponse
Int -> ReadS CreateLocationEfsResponse
ReadS [CreateLocationEfsResponse]
(Int -> ReadS CreateLocationEfsResponse)
-> ReadS [CreateLocationEfsResponse]
-> ReadPrec CreateLocationEfsResponse
-> ReadPrec [CreateLocationEfsResponse]
-> Read CreateLocationEfsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateLocationEfsResponse]
$creadListPrec :: ReadPrec [CreateLocationEfsResponse]
readPrec :: ReadPrec CreateLocationEfsResponse
$creadPrec :: ReadPrec CreateLocationEfsResponse
readList :: ReadS [CreateLocationEfsResponse]
$creadList :: ReadS [CreateLocationEfsResponse]
readsPrec :: Int -> ReadS CreateLocationEfsResponse
$creadsPrec :: Int -> ReadS CreateLocationEfsResponse
Prelude.Read, Int -> CreateLocationEfsResponse -> ShowS
[CreateLocationEfsResponse] -> ShowS
CreateLocationEfsResponse -> String
(Int -> CreateLocationEfsResponse -> ShowS)
-> (CreateLocationEfsResponse -> String)
-> ([CreateLocationEfsResponse] -> ShowS)
-> Show CreateLocationEfsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateLocationEfsResponse] -> ShowS
$cshowList :: [CreateLocationEfsResponse] -> ShowS
show :: CreateLocationEfsResponse -> String
$cshow :: CreateLocationEfsResponse -> String
showsPrec :: Int -> CreateLocationEfsResponse -> ShowS
$cshowsPrec :: Int -> CreateLocationEfsResponse -> ShowS
Prelude.Show, (forall x.
 CreateLocationEfsResponse -> Rep CreateLocationEfsResponse x)
-> (forall x.
    Rep CreateLocationEfsResponse x -> CreateLocationEfsResponse)
-> Generic CreateLocationEfsResponse
forall x.
Rep CreateLocationEfsResponse x -> CreateLocationEfsResponse
forall x.
CreateLocationEfsResponse -> Rep CreateLocationEfsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateLocationEfsResponse x -> CreateLocationEfsResponse
$cfrom :: forall x.
CreateLocationEfsResponse -> Rep CreateLocationEfsResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateLocationEfsResponse' 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:
--
-- 'locationArn', 'createLocationEfsResponse_locationArn' - The Amazon Resource Name (ARN) of the Amazon EFS file system location
-- that is created.
--
-- 'httpStatus', 'createLocationEfsResponse_httpStatus' - The response's http status code.
newCreateLocationEfsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateLocationEfsResponse
newCreateLocationEfsResponse :: Int -> CreateLocationEfsResponse
newCreateLocationEfsResponse Int
pHttpStatus_ =
  CreateLocationEfsResponse' :: Maybe Text -> Int -> CreateLocationEfsResponse
CreateLocationEfsResponse'
    { $sel:locationArn:CreateLocationEfsResponse' :: Maybe Text
locationArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateLocationEfsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The Amazon Resource Name (ARN) of the Amazon EFS file system location
-- that is created.
createLocationEfsResponse_locationArn :: Lens.Lens' CreateLocationEfsResponse (Prelude.Maybe Prelude.Text)
createLocationEfsResponse_locationArn :: (Maybe Text -> f (Maybe Text))
-> CreateLocationEfsResponse -> f CreateLocationEfsResponse
createLocationEfsResponse_locationArn = (CreateLocationEfsResponse -> Maybe Text)
-> (CreateLocationEfsResponse
    -> Maybe Text -> CreateLocationEfsResponse)
-> Lens
     CreateLocationEfsResponse
     CreateLocationEfsResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateLocationEfsResponse' {Maybe Text
locationArn :: Maybe Text
$sel:locationArn:CreateLocationEfsResponse' :: CreateLocationEfsResponse -> Maybe Text
locationArn} -> Maybe Text
locationArn) (\s :: CreateLocationEfsResponse
s@CreateLocationEfsResponse' {} Maybe Text
a -> CreateLocationEfsResponse
s {$sel:locationArn:CreateLocationEfsResponse' :: Maybe Text
locationArn = Maybe Text
a} :: CreateLocationEfsResponse)

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

instance Prelude.NFData CreateLocationEfsResponse