{-# 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.DescribeLocationObjectStorage
-- 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)
--
-- Returns metadata about a self-managed object storage server location.
-- For more information about self-managed object storage locations, see
-- <https://docs.aws.amazon.com/datasync/latest/userguide/create-object-location.html Creating a location for object storage>.
module Amazonka.DataSync.DescribeLocationObjectStorage
  ( -- * Creating a Request
    DescribeLocationObjectStorage (..),
    newDescribeLocationObjectStorage,

    -- * Request Lenses
    describeLocationObjectStorage_locationArn,

    -- * Destructuring the Response
    DescribeLocationObjectStorageResponse (..),
    newDescribeLocationObjectStorageResponse,

    -- * Response Lenses
    describeLocationObjectStorageResponse_serverPort,
    describeLocationObjectStorageResponse_creationTime,
    describeLocationObjectStorageResponse_agentArns,
    describeLocationObjectStorageResponse_locationUri,
    describeLocationObjectStorageResponse_serverProtocol,
    describeLocationObjectStorageResponse_locationArn,
    describeLocationObjectStorageResponse_accessKey,
    describeLocationObjectStorageResponse_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

-- | DescribeLocationObjectStorageRequest
--
-- /See:/ 'newDescribeLocationObjectStorage' smart constructor.
data DescribeLocationObjectStorage = DescribeLocationObjectStorage'
  { -- | The Amazon Resource Name (ARN) of the self-managed object storage server
    -- location that was described.
    DescribeLocationObjectStorage -> Text
locationArn :: Prelude.Text
  }
  deriving (DescribeLocationObjectStorage
-> DescribeLocationObjectStorage -> Bool
(DescribeLocationObjectStorage
 -> DescribeLocationObjectStorage -> Bool)
-> (DescribeLocationObjectStorage
    -> DescribeLocationObjectStorage -> Bool)
-> Eq DescribeLocationObjectStorage
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeLocationObjectStorage
-> DescribeLocationObjectStorage -> Bool
$c/= :: DescribeLocationObjectStorage
-> DescribeLocationObjectStorage -> Bool
== :: DescribeLocationObjectStorage
-> DescribeLocationObjectStorage -> Bool
$c== :: DescribeLocationObjectStorage
-> DescribeLocationObjectStorage -> Bool
Prelude.Eq, ReadPrec [DescribeLocationObjectStorage]
ReadPrec DescribeLocationObjectStorage
Int -> ReadS DescribeLocationObjectStorage
ReadS [DescribeLocationObjectStorage]
(Int -> ReadS DescribeLocationObjectStorage)
-> ReadS [DescribeLocationObjectStorage]
-> ReadPrec DescribeLocationObjectStorage
-> ReadPrec [DescribeLocationObjectStorage]
-> Read DescribeLocationObjectStorage
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeLocationObjectStorage]
$creadListPrec :: ReadPrec [DescribeLocationObjectStorage]
readPrec :: ReadPrec DescribeLocationObjectStorage
$creadPrec :: ReadPrec DescribeLocationObjectStorage
readList :: ReadS [DescribeLocationObjectStorage]
$creadList :: ReadS [DescribeLocationObjectStorage]
readsPrec :: Int -> ReadS DescribeLocationObjectStorage
$creadsPrec :: Int -> ReadS DescribeLocationObjectStorage
Prelude.Read, Int -> DescribeLocationObjectStorage -> ShowS
[DescribeLocationObjectStorage] -> ShowS
DescribeLocationObjectStorage -> String
(Int -> DescribeLocationObjectStorage -> ShowS)
-> (DescribeLocationObjectStorage -> String)
-> ([DescribeLocationObjectStorage] -> ShowS)
-> Show DescribeLocationObjectStorage
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeLocationObjectStorage] -> ShowS
$cshowList :: [DescribeLocationObjectStorage] -> ShowS
show :: DescribeLocationObjectStorage -> String
$cshow :: DescribeLocationObjectStorage -> String
showsPrec :: Int -> DescribeLocationObjectStorage -> ShowS
$cshowsPrec :: Int -> DescribeLocationObjectStorage -> ShowS
Prelude.Show, (forall x.
 DescribeLocationObjectStorage
 -> Rep DescribeLocationObjectStorage x)
-> (forall x.
    Rep DescribeLocationObjectStorage x
    -> DescribeLocationObjectStorage)
-> Generic DescribeLocationObjectStorage
forall x.
Rep DescribeLocationObjectStorage x
-> DescribeLocationObjectStorage
forall x.
DescribeLocationObjectStorage
-> Rep DescribeLocationObjectStorage x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeLocationObjectStorage x
-> DescribeLocationObjectStorage
$cfrom :: forall x.
DescribeLocationObjectStorage
-> Rep DescribeLocationObjectStorage x
Prelude.Generic)

-- |
-- Create a value of 'DescribeLocationObjectStorage' 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', 'describeLocationObjectStorage_locationArn' - The Amazon Resource Name (ARN) of the self-managed object storage server
-- location that was described.
newDescribeLocationObjectStorage ::
  -- | 'locationArn'
  Prelude.Text ->
  DescribeLocationObjectStorage
newDescribeLocationObjectStorage :: Text -> DescribeLocationObjectStorage
newDescribeLocationObjectStorage Text
pLocationArn_ =
  DescribeLocationObjectStorage' :: Text -> DescribeLocationObjectStorage
DescribeLocationObjectStorage'
    { $sel:locationArn:DescribeLocationObjectStorage' :: Text
locationArn =
        Text
pLocationArn_
    }

-- | The Amazon Resource Name (ARN) of the self-managed object storage server
-- location that was described.
describeLocationObjectStorage_locationArn :: Lens.Lens' DescribeLocationObjectStorage Prelude.Text
describeLocationObjectStorage_locationArn :: (Text -> f Text)
-> DescribeLocationObjectStorage -> f DescribeLocationObjectStorage
describeLocationObjectStorage_locationArn = (DescribeLocationObjectStorage -> Text)
-> (DescribeLocationObjectStorage
    -> Text -> DescribeLocationObjectStorage)
-> Lens
     DescribeLocationObjectStorage
     DescribeLocationObjectStorage
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeLocationObjectStorage' {Text
locationArn :: Text
$sel:locationArn:DescribeLocationObjectStorage' :: DescribeLocationObjectStorage -> Text
locationArn} -> Text
locationArn) (\s :: DescribeLocationObjectStorage
s@DescribeLocationObjectStorage' {} Text
a -> DescribeLocationObjectStorage
s {$sel:locationArn:DescribeLocationObjectStorage' :: Text
locationArn = Text
a} :: DescribeLocationObjectStorage)

instance
  Core.AWSRequest
    DescribeLocationObjectStorage
  where
  type
    AWSResponse DescribeLocationObjectStorage =
      DescribeLocationObjectStorageResponse
  request :: DescribeLocationObjectStorage
-> Request DescribeLocationObjectStorage
request = Service
-> DescribeLocationObjectStorage
-> Request DescribeLocationObjectStorage
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeLocationObjectStorage
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeLocationObjectStorage)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeLocationObjectStorage))
-> Logger
-> Service
-> Proxy DescribeLocationObjectStorage
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeLocationObjectStorage)))
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 Natural
-> Maybe POSIX
-> Maybe (NonEmpty Text)
-> Maybe Text
-> Maybe ObjectStorageServerProtocol
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeLocationObjectStorageResponse
DescribeLocationObjectStorageResponse'
            (Maybe Natural
 -> Maybe POSIX
 -> Maybe (NonEmpty Text)
 -> Maybe Text
 -> Maybe ObjectStorageServerProtocol
 -> Maybe Text
 -> Maybe Text
 -> Int
 -> DescribeLocationObjectStorageResponse)
-> Either String (Maybe Natural)
-> Either
     String
     (Maybe POSIX
      -> Maybe (NonEmpty Text)
      -> Maybe Text
      -> Maybe ObjectStorageServerProtocol
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeLocationObjectStorageResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ServerPort")
            Either
  String
  (Maybe POSIX
   -> Maybe (NonEmpty Text)
   -> Maybe Text
   -> Maybe ObjectStorageServerProtocol
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeLocationObjectStorageResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe (NonEmpty Text)
      -> Maybe Text
      -> Maybe ObjectStorageServerProtocol
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeLocationObjectStorageResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CreationTime")
            Either
  String
  (Maybe (NonEmpty Text)
   -> Maybe Text
   -> Maybe ObjectStorageServerProtocol
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeLocationObjectStorageResponse)
-> Either String (Maybe (NonEmpty Text))
-> Either
     String
     (Maybe Text
      -> Maybe ObjectStorageServerProtocol
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeLocationObjectStorageResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (NonEmpty Text))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"AgentArns")
            Either
  String
  (Maybe Text
   -> Maybe ObjectStorageServerProtocol
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeLocationObjectStorageResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe ObjectStorageServerProtocol
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> DescribeLocationObjectStorageResponse)
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
"LocationUri")
            Either
  String
  (Maybe ObjectStorageServerProtocol
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> DescribeLocationObjectStorageResponse)
-> Either String (Maybe ObjectStorageServerProtocol)
-> Either
     String
     (Maybe Text
      -> Maybe Text -> Int -> DescribeLocationObjectStorageResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe ObjectStorageServerProtocol)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ServerProtocol")
            Either
  String
  (Maybe Text
   -> Maybe Text -> Int -> DescribeLocationObjectStorageResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe Text -> Int -> DescribeLocationObjectStorageResponse)
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
"LocationArn")
            Either
  String (Maybe Text -> Int -> DescribeLocationObjectStorageResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeLocationObjectStorageResponse)
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
"AccessKey")
            Either String (Int -> DescribeLocationObjectStorageResponse)
-> Either String Int
-> Either String DescribeLocationObjectStorageResponse
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
    DescribeLocationObjectStorage

instance Prelude.NFData DescribeLocationObjectStorage

instance Core.ToHeaders DescribeLocationObjectStorage where
  toHeaders :: DescribeLocationObjectStorage -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeLocationObjectStorage -> 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.DescribeLocationObjectStorage" ::
                          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 DescribeLocationObjectStorage where
  toJSON :: DescribeLocationObjectStorage -> Value
toJSON DescribeLocationObjectStorage' {Text
locationArn :: Text
$sel:locationArn:DescribeLocationObjectStorage' :: DescribeLocationObjectStorage -> 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
"LocationArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
locationArn)]
      )

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

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

-- | DescribeLocationObjectStorageResponse
--
-- /See:/ 'newDescribeLocationObjectStorageResponse' smart constructor.
data DescribeLocationObjectStorageResponse = DescribeLocationObjectStorageResponse'
  { -- | The port that your self-managed object storage server accepts inbound
    -- network traffic on. The server port is set by default to TCP 80 (HTTP)
    -- or TCP 443 (HTTPS).
    DescribeLocationObjectStorageResponse -> Maybe Natural
serverPort :: Prelude.Maybe Prelude.Natural,
    -- | The time that the self-managed object storage server agent was created.
    DescribeLocationObjectStorageResponse -> Maybe POSIX
creationTime :: Prelude.Maybe Core.POSIX,
    -- | The Amazon Resource Name (ARN) of the agents associated with the
    -- self-managed object storage server location.
    DescribeLocationObjectStorageResponse -> Maybe (NonEmpty Text)
agentArns :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
    -- | The URL of the source self-managed object storage server location that
    -- was described.
    DescribeLocationObjectStorageResponse -> Maybe Text
locationUri :: Prelude.Maybe Prelude.Text,
    -- | The protocol that the object storage server uses to communicate. Valid
    -- values are HTTP or HTTPS.
    DescribeLocationObjectStorageResponse
-> Maybe ObjectStorageServerProtocol
serverProtocol :: Prelude.Maybe ObjectStorageServerProtocol,
    -- | The Amazon Resource Name (ARN) of the self-managed object storage server
    -- location to describe.
    DescribeLocationObjectStorageResponse -> Maybe Text
locationArn :: Prelude.Maybe Prelude.Text,
    -- | Optional. The access key is used if credentials are required to access
    -- the self-managed object storage server. If your object storage requires
    -- a user name and password to authenticate, use @AccessKey@ and
    -- @SecretKey@ to provide the user name and password, respectively.
    DescribeLocationObjectStorageResponse -> Maybe Text
accessKey :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeLocationObjectStorageResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeLocationObjectStorageResponse
-> DescribeLocationObjectStorageResponse -> Bool
(DescribeLocationObjectStorageResponse
 -> DescribeLocationObjectStorageResponse -> Bool)
-> (DescribeLocationObjectStorageResponse
    -> DescribeLocationObjectStorageResponse -> Bool)
-> Eq DescribeLocationObjectStorageResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeLocationObjectStorageResponse
-> DescribeLocationObjectStorageResponse -> Bool
$c/= :: DescribeLocationObjectStorageResponse
-> DescribeLocationObjectStorageResponse -> Bool
== :: DescribeLocationObjectStorageResponse
-> DescribeLocationObjectStorageResponse -> Bool
$c== :: DescribeLocationObjectStorageResponse
-> DescribeLocationObjectStorageResponse -> Bool
Prelude.Eq, ReadPrec [DescribeLocationObjectStorageResponse]
ReadPrec DescribeLocationObjectStorageResponse
Int -> ReadS DescribeLocationObjectStorageResponse
ReadS [DescribeLocationObjectStorageResponse]
(Int -> ReadS DescribeLocationObjectStorageResponse)
-> ReadS [DescribeLocationObjectStorageResponse]
-> ReadPrec DescribeLocationObjectStorageResponse
-> ReadPrec [DescribeLocationObjectStorageResponse]
-> Read DescribeLocationObjectStorageResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeLocationObjectStorageResponse]
$creadListPrec :: ReadPrec [DescribeLocationObjectStorageResponse]
readPrec :: ReadPrec DescribeLocationObjectStorageResponse
$creadPrec :: ReadPrec DescribeLocationObjectStorageResponse
readList :: ReadS [DescribeLocationObjectStorageResponse]
$creadList :: ReadS [DescribeLocationObjectStorageResponse]
readsPrec :: Int -> ReadS DescribeLocationObjectStorageResponse
$creadsPrec :: Int -> ReadS DescribeLocationObjectStorageResponse
Prelude.Read, Int -> DescribeLocationObjectStorageResponse -> ShowS
[DescribeLocationObjectStorageResponse] -> ShowS
DescribeLocationObjectStorageResponse -> String
(Int -> DescribeLocationObjectStorageResponse -> ShowS)
-> (DescribeLocationObjectStorageResponse -> String)
-> ([DescribeLocationObjectStorageResponse] -> ShowS)
-> Show DescribeLocationObjectStorageResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeLocationObjectStorageResponse] -> ShowS
$cshowList :: [DescribeLocationObjectStorageResponse] -> ShowS
show :: DescribeLocationObjectStorageResponse -> String
$cshow :: DescribeLocationObjectStorageResponse -> String
showsPrec :: Int -> DescribeLocationObjectStorageResponse -> ShowS
$cshowsPrec :: Int -> DescribeLocationObjectStorageResponse -> ShowS
Prelude.Show, (forall x.
 DescribeLocationObjectStorageResponse
 -> Rep DescribeLocationObjectStorageResponse x)
-> (forall x.
    Rep DescribeLocationObjectStorageResponse x
    -> DescribeLocationObjectStorageResponse)
-> Generic DescribeLocationObjectStorageResponse
forall x.
Rep DescribeLocationObjectStorageResponse x
-> DescribeLocationObjectStorageResponse
forall x.
DescribeLocationObjectStorageResponse
-> Rep DescribeLocationObjectStorageResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeLocationObjectStorageResponse x
-> DescribeLocationObjectStorageResponse
$cfrom :: forall x.
DescribeLocationObjectStorageResponse
-> Rep DescribeLocationObjectStorageResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeLocationObjectStorageResponse' 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:
--
-- 'serverPort', 'describeLocationObjectStorageResponse_serverPort' - The port that your self-managed object storage server accepts inbound
-- network traffic on. The server port is set by default to TCP 80 (HTTP)
-- or TCP 443 (HTTPS).
--
-- 'creationTime', 'describeLocationObjectStorageResponse_creationTime' - The time that the self-managed object storage server agent was created.
--
-- 'agentArns', 'describeLocationObjectStorageResponse_agentArns' - The Amazon Resource Name (ARN) of the agents associated with the
-- self-managed object storage server location.
--
-- 'locationUri', 'describeLocationObjectStorageResponse_locationUri' - The URL of the source self-managed object storage server location that
-- was described.
--
-- 'serverProtocol', 'describeLocationObjectStorageResponse_serverProtocol' - The protocol that the object storage server uses to communicate. Valid
-- values are HTTP or HTTPS.
--
-- 'locationArn', 'describeLocationObjectStorageResponse_locationArn' - The Amazon Resource Name (ARN) of the self-managed object storage server
-- location to describe.
--
-- 'accessKey', 'describeLocationObjectStorageResponse_accessKey' - Optional. The access key is used if credentials are required to access
-- the self-managed object storage server. If your object storage requires
-- a user name and password to authenticate, use @AccessKey@ and
-- @SecretKey@ to provide the user name and password, respectively.
--
-- 'httpStatus', 'describeLocationObjectStorageResponse_httpStatus' - The response's http status code.
newDescribeLocationObjectStorageResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeLocationObjectStorageResponse
newDescribeLocationObjectStorageResponse :: Int -> DescribeLocationObjectStorageResponse
newDescribeLocationObjectStorageResponse Int
pHttpStatus_ =
  DescribeLocationObjectStorageResponse' :: Maybe Natural
-> Maybe POSIX
-> Maybe (NonEmpty Text)
-> Maybe Text
-> Maybe ObjectStorageServerProtocol
-> Maybe Text
-> Maybe Text
-> Int
-> DescribeLocationObjectStorageResponse
DescribeLocationObjectStorageResponse'
    { $sel:serverPort:DescribeLocationObjectStorageResponse' :: Maybe Natural
serverPort =
        Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:creationTime:DescribeLocationObjectStorageResponse' :: Maybe POSIX
creationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:agentArns:DescribeLocationObjectStorageResponse' :: Maybe (NonEmpty Text)
agentArns = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:locationUri:DescribeLocationObjectStorageResponse' :: Maybe Text
locationUri = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:serverProtocol:DescribeLocationObjectStorageResponse' :: Maybe ObjectStorageServerProtocol
serverProtocol = Maybe ObjectStorageServerProtocol
forall a. Maybe a
Prelude.Nothing,
      $sel:locationArn:DescribeLocationObjectStorageResponse' :: Maybe Text
locationArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:accessKey:DescribeLocationObjectStorageResponse' :: Maybe Text
accessKey = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeLocationObjectStorageResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The port that your self-managed object storage server accepts inbound
-- network traffic on. The server port is set by default to TCP 80 (HTTP)
-- or TCP 443 (HTTPS).
describeLocationObjectStorageResponse_serverPort :: Lens.Lens' DescribeLocationObjectStorageResponse (Prelude.Maybe Prelude.Natural)
describeLocationObjectStorageResponse_serverPort :: (Maybe Natural -> f (Maybe Natural))
-> DescribeLocationObjectStorageResponse
-> f DescribeLocationObjectStorageResponse
describeLocationObjectStorageResponse_serverPort = (DescribeLocationObjectStorageResponse -> Maybe Natural)
-> (DescribeLocationObjectStorageResponse
    -> Maybe Natural -> DescribeLocationObjectStorageResponse)
-> Lens
     DescribeLocationObjectStorageResponse
     DescribeLocationObjectStorageResponse
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeLocationObjectStorageResponse' {Maybe Natural
serverPort :: Maybe Natural
$sel:serverPort:DescribeLocationObjectStorageResponse' :: DescribeLocationObjectStorageResponse -> Maybe Natural
serverPort} -> Maybe Natural
serverPort) (\s :: DescribeLocationObjectStorageResponse
s@DescribeLocationObjectStorageResponse' {} Maybe Natural
a -> DescribeLocationObjectStorageResponse
s {$sel:serverPort:DescribeLocationObjectStorageResponse' :: Maybe Natural
serverPort = Maybe Natural
a} :: DescribeLocationObjectStorageResponse)

-- | The time that the self-managed object storage server agent was created.
describeLocationObjectStorageResponse_creationTime :: Lens.Lens' DescribeLocationObjectStorageResponse (Prelude.Maybe Prelude.UTCTime)
describeLocationObjectStorageResponse_creationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeLocationObjectStorageResponse
-> f DescribeLocationObjectStorageResponse
describeLocationObjectStorageResponse_creationTime = (DescribeLocationObjectStorageResponse -> Maybe POSIX)
-> (DescribeLocationObjectStorageResponse
    -> Maybe POSIX -> DescribeLocationObjectStorageResponse)
-> Lens
     DescribeLocationObjectStorageResponse
     DescribeLocationObjectStorageResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeLocationObjectStorageResponse' {Maybe POSIX
creationTime :: Maybe POSIX
$sel:creationTime:DescribeLocationObjectStorageResponse' :: DescribeLocationObjectStorageResponse -> Maybe POSIX
creationTime} -> Maybe POSIX
creationTime) (\s :: DescribeLocationObjectStorageResponse
s@DescribeLocationObjectStorageResponse' {} Maybe POSIX
a -> DescribeLocationObjectStorageResponse
s {$sel:creationTime:DescribeLocationObjectStorageResponse' :: Maybe POSIX
creationTime = Maybe POSIX
a} :: DescribeLocationObjectStorageResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeLocationObjectStorageResponse
 -> f DescribeLocationObjectStorageResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeLocationObjectStorageResponse
-> f DescribeLocationObjectStorageResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The Amazon Resource Name (ARN) of the agents associated with the
-- self-managed object storage server location.
describeLocationObjectStorageResponse_agentArns :: Lens.Lens' DescribeLocationObjectStorageResponse (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
describeLocationObjectStorageResponse_agentArns :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> DescribeLocationObjectStorageResponse
-> f DescribeLocationObjectStorageResponse
describeLocationObjectStorageResponse_agentArns = (DescribeLocationObjectStorageResponse -> Maybe (NonEmpty Text))
-> (DescribeLocationObjectStorageResponse
    -> Maybe (NonEmpty Text) -> DescribeLocationObjectStorageResponse)
-> Lens
     DescribeLocationObjectStorageResponse
     DescribeLocationObjectStorageResponse
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeLocationObjectStorageResponse' {Maybe (NonEmpty Text)
agentArns :: Maybe (NonEmpty Text)
$sel:agentArns:DescribeLocationObjectStorageResponse' :: DescribeLocationObjectStorageResponse -> Maybe (NonEmpty Text)
agentArns} -> Maybe (NonEmpty Text)
agentArns) (\s :: DescribeLocationObjectStorageResponse
s@DescribeLocationObjectStorageResponse' {} Maybe (NonEmpty Text)
a -> DescribeLocationObjectStorageResponse
s {$sel:agentArns:DescribeLocationObjectStorageResponse' :: Maybe (NonEmpty Text)
agentArns = Maybe (NonEmpty Text)
a} :: DescribeLocationObjectStorageResponse) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
 -> DescribeLocationObjectStorageResponse
 -> f DescribeLocationObjectStorageResponse)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
    -> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> DescribeLocationObjectStorageResponse
-> f DescribeLocationObjectStorageResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
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
  (NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The URL of the source self-managed object storage server location that
-- was described.
describeLocationObjectStorageResponse_locationUri :: Lens.Lens' DescribeLocationObjectStorageResponse (Prelude.Maybe Prelude.Text)
describeLocationObjectStorageResponse_locationUri :: (Maybe Text -> f (Maybe Text))
-> DescribeLocationObjectStorageResponse
-> f DescribeLocationObjectStorageResponse
describeLocationObjectStorageResponse_locationUri = (DescribeLocationObjectStorageResponse -> Maybe Text)
-> (DescribeLocationObjectStorageResponse
    -> Maybe Text -> DescribeLocationObjectStorageResponse)
-> Lens
     DescribeLocationObjectStorageResponse
     DescribeLocationObjectStorageResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeLocationObjectStorageResponse' {Maybe Text
locationUri :: Maybe Text
$sel:locationUri:DescribeLocationObjectStorageResponse' :: DescribeLocationObjectStorageResponse -> Maybe Text
locationUri} -> Maybe Text
locationUri) (\s :: DescribeLocationObjectStorageResponse
s@DescribeLocationObjectStorageResponse' {} Maybe Text
a -> DescribeLocationObjectStorageResponse
s {$sel:locationUri:DescribeLocationObjectStorageResponse' :: Maybe Text
locationUri = Maybe Text
a} :: DescribeLocationObjectStorageResponse)

-- | The protocol that the object storage server uses to communicate. Valid
-- values are HTTP or HTTPS.
describeLocationObjectStorageResponse_serverProtocol :: Lens.Lens' DescribeLocationObjectStorageResponse (Prelude.Maybe ObjectStorageServerProtocol)
describeLocationObjectStorageResponse_serverProtocol :: (Maybe ObjectStorageServerProtocol
 -> f (Maybe ObjectStorageServerProtocol))
-> DescribeLocationObjectStorageResponse
-> f DescribeLocationObjectStorageResponse
describeLocationObjectStorageResponse_serverProtocol = (DescribeLocationObjectStorageResponse
 -> Maybe ObjectStorageServerProtocol)
-> (DescribeLocationObjectStorageResponse
    -> Maybe ObjectStorageServerProtocol
    -> DescribeLocationObjectStorageResponse)
-> Lens
     DescribeLocationObjectStorageResponse
     DescribeLocationObjectStorageResponse
     (Maybe ObjectStorageServerProtocol)
     (Maybe ObjectStorageServerProtocol)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeLocationObjectStorageResponse' {Maybe ObjectStorageServerProtocol
serverProtocol :: Maybe ObjectStorageServerProtocol
$sel:serverProtocol:DescribeLocationObjectStorageResponse' :: DescribeLocationObjectStorageResponse
-> Maybe ObjectStorageServerProtocol
serverProtocol} -> Maybe ObjectStorageServerProtocol
serverProtocol) (\s :: DescribeLocationObjectStorageResponse
s@DescribeLocationObjectStorageResponse' {} Maybe ObjectStorageServerProtocol
a -> DescribeLocationObjectStorageResponse
s {$sel:serverProtocol:DescribeLocationObjectStorageResponse' :: Maybe ObjectStorageServerProtocol
serverProtocol = Maybe ObjectStorageServerProtocol
a} :: DescribeLocationObjectStorageResponse)

-- | The Amazon Resource Name (ARN) of the self-managed object storage server
-- location to describe.
describeLocationObjectStorageResponse_locationArn :: Lens.Lens' DescribeLocationObjectStorageResponse (Prelude.Maybe Prelude.Text)
describeLocationObjectStorageResponse_locationArn :: (Maybe Text -> f (Maybe Text))
-> DescribeLocationObjectStorageResponse
-> f DescribeLocationObjectStorageResponse
describeLocationObjectStorageResponse_locationArn = (DescribeLocationObjectStorageResponse -> Maybe Text)
-> (DescribeLocationObjectStorageResponse
    -> Maybe Text -> DescribeLocationObjectStorageResponse)
-> Lens
     DescribeLocationObjectStorageResponse
     DescribeLocationObjectStorageResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeLocationObjectStorageResponse' {Maybe Text
locationArn :: Maybe Text
$sel:locationArn:DescribeLocationObjectStorageResponse' :: DescribeLocationObjectStorageResponse -> Maybe Text
locationArn} -> Maybe Text
locationArn) (\s :: DescribeLocationObjectStorageResponse
s@DescribeLocationObjectStorageResponse' {} Maybe Text
a -> DescribeLocationObjectStorageResponse
s {$sel:locationArn:DescribeLocationObjectStorageResponse' :: Maybe Text
locationArn = Maybe Text
a} :: DescribeLocationObjectStorageResponse)

-- | Optional. The access key is used if credentials are required to access
-- the self-managed object storage server. If your object storage requires
-- a user name and password to authenticate, use @AccessKey@ and
-- @SecretKey@ to provide the user name and password, respectively.
describeLocationObjectStorageResponse_accessKey :: Lens.Lens' DescribeLocationObjectStorageResponse (Prelude.Maybe Prelude.Text)
describeLocationObjectStorageResponse_accessKey :: (Maybe Text -> f (Maybe Text))
-> DescribeLocationObjectStorageResponse
-> f DescribeLocationObjectStorageResponse
describeLocationObjectStorageResponse_accessKey = (DescribeLocationObjectStorageResponse -> Maybe Text)
-> (DescribeLocationObjectStorageResponse
    -> Maybe Text -> DescribeLocationObjectStorageResponse)
-> Lens
     DescribeLocationObjectStorageResponse
     DescribeLocationObjectStorageResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeLocationObjectStorageResponse' {Maybe Text
accessKey :: Maybe Text
$sel:accessKey:DescribeLocationObjectStorageResponse' :: DescribeLocationObjectStorageResponse -> Maybe Text
accessKey} -> Maybe Text
accessKey) (\s :: DescribeLocationObjectStorageResponse
s@DescribeLocationObjectStorageResponse' {} Maybe Text
a -> DescribeLocationObjectStorageResponse
s {$sel:accessKey:DescribeLocationObjectStorageResponse' :: Maybe Text
accessKey = Maybe Text
a} :: DescribeLocationObjectStorageResponse)

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

instance
  Prelude.NFData
    DescribeLocationObjectStorageResponse