{-# 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.MediaStoreData.DescribeObject
-- 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 headers for an object at the specified path.
module Amazonka.MediaStoreData.DescribeObject
  ( -- * Creating a Request
    DescribeObject (..),
    newDescribeObject,

    -- * Request Lenses
    describeObject_path,

    -- * Destructuring the Response
    DescribeObjectResponse (..),
    newDescribeObjectResponse,

    -- * Response Lenses
    describeObjectResponse_eTag,
    describeObjectResponse_contentLength,
    describeObjectResponse_cacheControl,
    describeObjectResponse_lastModified,
    describeObjectResponse_contentType,
    describeObjectResponse_httpStatus,
  )
where

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

-- | /See:/ 'newDescribeObject' smart constructor.
data DescribeObject = DescribeObject'
  { -- | The path (including the file name) where the object is stored in the
    -- container. Format: \<folder name>\/\<folder name>\/\<file name>
    DescribeObject -> Text
path :: Prelude.Text
  }
  deriving (DescribeObject -> DescribeObject -> Bool
(DescribeObject -> DescribeObject -> Bool)
-> (DescribeObject -> DescribeObject -> Bool) -> Eq DescribeObject
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeObject -> DescribeObject -> Bool
$c/= :: DescribeObject -> DescribeObject -> Bool
== :: DescribeObject -> DescribeObject -> Bool
$c== :: DescribeObject -> DescribeObject -> Bool
Prelude.Eq, ReadPrec [DescribeObject]
ReadPrec DescribeObject
Int -> ReadS DescribeObject
ReadS [DescribeObject]
(Int -> ReadS DescribeObject)
-> ReadS [DescribeObject]
-> ReadPrec DescribeObject
-> ReadPrec [DescribeObject]
-> Read DescribeObject
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeObject]
$creadListPrec :: ReadPrec [DescribeObject]
readPrec :: ReadPrec DescribeObject
$creadPrec :: ReadPrec DescribeObject
readList :: ReadS [DescribeObject]
$creadList :: ReadS [DescribeObject]
readsPrec :: Int -> ReadS DescribeObject
$creadsPrec :: Int -> ReadS DescribeObject
Prelude.Read, Int -> DescribeObject -> ShowS
[DescribeObject] -> ShowS
DescribeObject -> String
(Int -> DescribeObject -> ShowS)
-> (DescribeObject -> String)
-> ([DescribeObject] -> ShowS)
-> Show DescribeObject
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeObject] -> ShowS
$cshowList :: [DescribeObject] -> ShowS
show :: DescribeObject -> String
$cshow :: DescribeObject -> String
showsPrec :: Int -> DescribeObject -> ShowS
$cshowsPrec :: Int -> DescribeObject -> ShowS
Prelude.Show, (forall x. DescribeObject -> Rep DescribeObject x)
-> (forall x. Rep DescribeObject x -> DescribeObject)
-> Generic DescribeObject
forall x. Rep DescribeObject x -> DescribeObject
forall x. DescribeObject -> Rep DescribeObject x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeObject x -> DescribeObject
$cfrom :: forall x. DescribeObject -> Rep DescribeObject x
Prelude.Generic)

-- |
-- Create a value of 'DescribeObject' 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:
--
-- 'path', 'describeObject_path' - The path (including the file name) where the object is stored in the
-- container. Format: \<folder name>\/\<folder name>\/\<file name>
newDescribeObject ::
  -- | 'path'
  Prelude.Text ->
  DescribeObject
newDescribeObject :: Text -> DescribeObject
newDescribeObject Text
pPath_ =
  DescribeObject' :: Text -> DescribeObject
DescribeObject' {$sel:path:DescribeObject' :: Text
path = Text
pPath_}

-- | The path (including the file name) where the object is stored in the
-- container. Format: \<folder name>\/\<folder name>\/\<file name>
describeObject_path :: Lens.Lens' DescribeObject Prelude.Text
describeObject_path :: (Text -> f Text) -> DescribeObject -> f DescribeObject
describeObject_path = (DescribeObject -> Text)
-> (DescribeObject -> Text -> DescribeObject)
-> Lens DescribeObject DescribeObject Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeObject' {Text
path :: Text
$sel:path:DescribeObject' :: DescribeObject -> Text
path} -> Text
path) (\s :: DescribeObject
s@DescribeObject' {} Text
a -> DescribeObject
s {$sel:path:DescribeObject' :: Text
path = Text
a} :: DescribeObject)

instance Core.AWSRequest DescribeObject where
  type
    AWSResponse DescribeObject =
      DescribeObjectResponse
  request :: DescribeObject -> Request DescribeObject
request = Service -> DescribeObject -> Request DescribeObject
forall a. ToRequest a => Service -> a -> Request a
Request.head' Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeObject
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeObject)))
response =
    (Int
 -> ResponseHeaders
 -> ()
 -> Either String (AWSResponse DescribeObject))
-> Logger
-> Service
-> Proxy DescribeObject
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DescribeObject)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
      ( \Int
s ResponseHeaders
h ()
x ->
          Maybe Text
-> Maybe Natural
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Int
-> DescribeObjectResponse
DescribeObjectResponse'
            (Maybe Text
 -> Maybe Natural
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Int
 -> DescribeObjectResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Natural
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe Text
      -> Int
      -> DescribeObjectResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (ResponseHeaders
h ResponseHeaders -> HeaderName -> Either String (Maybe Text)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"ETag")
            Either
  String
  (Maybe Natural
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe Text
   -> Int
   -> DescribeObjectResponse)
-> Either String (Maybe Natural)
-> Either
     String
     (Maybe Text
      -> Maybe POSIX -> Maybe Text -> Int -> DescribeObjectResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h ResponseHeaders -> HeaderName -> Either String (Maybe Natural)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"Content-Length")
            Either
  String
  (Maybe Text
   -> Maybe POSIX -> Maybe Text -> Int -> DescribeObjectResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe POSIX -> Maybe Text -> Int -> DescribeObjectResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h ResponseHeaders -> HeaderName -> Either String (Maybe Text)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"Cache-Control")
            Either
  String (Maybe POSIX -> Maybe Text -> Int -> DescribeObjectResponse)
-> Either String (Maybe POSIX)
-> Either String (Maybe Text -> Int -> DescribeObjectResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h ResponseHeaders -> HeaderName -> Either String (Maybe POSIX)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"Last-Modified")
            Either String (Maybe Text -> Int -> DescribeObjectResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DescribeObjectResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h ResponseHeaders -> HeaderName -> Either String (Maybe Text)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"Content-Type")
            Either String (Int -> DescribeObjectResponse)
-> Either String Int -> Either String DescribeObjectResponse
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 DescribeObject

instance Prelude.NFData DescribeObject

instance Core.ToHeaders DescribeObject where
  toHeaders :: DescribeObject -> ResponseHeaders
toHeaders = ResponseHeaders -> DescribeObject -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

instance Core.ToPath DescribeObject where
  toPath :: DescribeObject -> ByteString
toPath DescribeObject' {Text
path :: Text
$sel:path:DescribeObject' :: DescribeObject -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
path]

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

-- | /See:/ 'newDescribeObjectResponse' smart constructor.
data DescribeObjectResponse = DescribeObjectResponse'
  { -- | The ETag that represents a unique instance of the object.
    DescribeObjectResponse -> Maybe Text
eTag :: Prelude.Maybe Prelude.Text,
    -- | The length of the object in bytes.
    DescribeObjectResponse -> Maybe Natural
contentLength :: Prelude.Maybe Prelude.Natural,
    -- | An optional @CacheControl@ header that allows the caller to control the
    -- object\'s cache behavior. Headers can be passed in as specified in the
    -- HTTP at
    -- <https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9>.
    --
    -- Headers with a custom user-defined value are also accepted.
    DescribeObjectResponse -> Maybe Text
cacheControl :: Prelude.Maybe Prelude.Text,
    -- | The date and time that the object was last modified.
    DescribeObjectResponse -> Maybe POSIX
lastModified :: Prelude.Maybe Core.POSIX,
    -- | The content type of the object.
    DescribeObjectResponse -> Maybe Text
contentType :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    DescribeObjectResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeObjectResponse -> DescribeObjectResponse -> Bool
(DescribeObjectResponse -> DescribeObjectResponse -> Bool)
-> (DescribeObjectResponse -> DescribeObjectResponse -> Bool)
-> Eq DescribeObjectResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeObjectResponse -> DescribeObjectResponse -> Bool
$c/= :: DescribeObjectResponse -> DescribeObjectResponse -> Bool
== :: DescribeObjectResponse -> DescribeObjectResponse -> Bool
$c== :: DescribeObjectResponse -> DescribeObjectResponse -> Bool
Prelude.Eq, ReadPrec [DescribeObjectResponse]
ReadPrec DescribeObjectResponse
Int -> ReadS DescribeObjectResponse
ReadS [DescribeObjectResponse]
(Int -> ReadS DescribeObjectResponse)
-> ReadS [DescribeObjectResponse]
-> ReadPrec DescribeObjectResponse
-> ReadPrec [DescribeObjectResponse]
-> Read DescribeObjectResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeObjectResponse]
$creadListPrec :: ReadPrec [DescribeObjectResponse]
readPrec :: ReadPrec DescribeObjectResponse
$creadPrec :: ReadPrec DescribeObjectResponse
readList :: ReadS [DescribeObjectResponse]
$creadList :: ReadS [DescribeObjectResponse]
readsPrec :: Int -> ReadS DescribeObjectResponse
$creadsPrec :: Int -> ReadS DescribeObjectResponse
Prelude.Read, Int -> DescribeObjectResponse -> ShowS
[DescribeObjectResponse] -> ShowS
DescribeObjectResponse -> String
(Int -> DescribeObjectResponse -> ShowS)
-> (DescribeObjectResponse -> String)
-> ([DescribeObjectResponse] -> ShowS)
-> Show DescribeObjectResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeObjectResponse] -> ShowS
$cshowList :: [DescribeObjectResponse] -> ShowS
show :: DescribeObjectResponse -> String
$cshow :: DescribeObjectResponse -> String
showsPrec :: Int -> DescribeObjectResponse -> ShowS
$cshowsPrec :: Int -> DescribeObjectResponse -> ShowS
Prelude.Show, (forall x. DescribeObjectResponse -> Rep DescribeObjectResponse x)
-> (forall x.
    Rep DescribeObjectResponse x -> DescribeObjectResponse)
-> Generic DescribeObjectResponse
forall x. Rep DescribeObjectResponse x -> DescribeObjectResponse
forall x. DescribeObjectResponse -> Rep DescribeObjectResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeObjectResponse x -> DescribeObjectResponse
$cfrom :: forall x. DescribeObjectResponse -> Rep DescribeObjectResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeObjectResponse' 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:
--
-- 'eTag', 'describeObjectResponse_eTag' - The ETag that represents a unique instance of the object.
--
-- 'contentLength', 'describeObjectResponse_contentLength' - The length of the object in bytes.
--
-- 'cacheControl', 'describeObjectResponse_cacheControl' - An optional @CacheControl@ header that allows the caller to control the
-- object\'s cache behavior. Headers can be passed in as specified in the
-- HTTP at
-- <https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9>.
--
-- Headers with a custom user-defined value are also accepted.
--
-- 'lastModified', 'describeObjectResponse_lastModified' - The date and time that the object was last modified.
--
-- 'contentType', 'describeObjectResponse_contentType' - The content type of the object.
--
-- 'httpStatus', 'describeObjectResponse_httpStatus' - The response's http status code.
newDescribeObjectResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeObjectResponse
newDescribeObjectResponse :: Int -> DescribeObjectResponse
newDescribeObjectResponse Int
pHttpStatus_ =
  DescribeObjectResponse' :: Maybe Text
-> Maybe Natural
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Int
-> DescribeObjectResponse
DescribeObjectResponse'
    { $sel:eTag:DescribeObjectResponse' :: Maybe Text
eTag = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:contentLength:DescribeObjectResponse' :: Maybe Natural
contentLength = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:cacheControl:DescribeObjectResponse' :: Maybe Text
cacheControl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastModified:DescribeObjectResponse' :: Maybe POSIX
lastModified = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:contentType:DescribeObjectResponse' :: Maybe Text
contentType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeObjectResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The ETag that represents a unique instance of the object.
describeObjectResponse_eTag :: Lens.Lens' DescribeObjectResponse (Prelude.Maybe Prelude.Text)
describeObjectResponse_eTag :: (Maybe Text -> f (Maybe Text))
-> DescribeObjectResponse -> f DescribeObjectResponse
describeObjectResponse_eTag = (DescribeObjectResponse -> Maybe Text)
-> (DescribeObjectResponse -> Maybe Text -> DescribeObjectResponse)
-> Lens
     DescribeObjectResponse
     DescribeObjectResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeObjectResponse' {Maybe Text
eTag :: Maybe Text
$sel:eTag:DescribeObjectResponse' :: DescribeObjectResponse -> Maybe Text
eTag} -> Maybe Text
eTag) (\s :: DescribeObjectResponse
s@DescribeObjectResponse' {} Maybe Text
a -> DescribeObjectResponse
s {$sel:eTag:DescribeObjectResponse' :: Maybe Text
eTag = Maybe Text
a} :: DescribeObjectResponse)

-- | The length of the object in bytes.
describeObjectResponse_contentLength :: Lens.Lens' DescribeObjectResponse (Prelude.Maybe Prelude.Natural)
describeObjectResponse_contentLength :: (Maybe Natural -> f (Maybe Natural))
-> DescribeObjectResponse -> f DescribeObjectResponse
describeObjectResponse_contentLength = (DescribeObjectResponse -> Maybe Natural)
-> (DescribeObjectResponse
    -> Maybe Natural -> DescribeObjectResponse)
-> Lens
     DescribeObjectResponse
     DescribeObjectResponse
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeObjectResponse' {Maybe Natural
contentLength :: Maybe Natural
$sel:contentLength:DescribeObjectResponse' :: DescribeObjectResponse -> Maybe Natural
contentLength} -> Maybe Natural
contentLength) (\s :: DescribeObjectResponse
s@DescribeObjectResponse' {} Maybe Natural
a -> DescribeObjectResponse
s {$sel:contentLength:DescribeObjectResponse' :: Maybe Natural
contentLength = Maybe Natural
a} :: DescribeObjectResponse)

-- | An optional @CacheControl@ header that allows the caller to control the
-- object\'s cache behavior. Headers can be passed in as specified in the
-- HTTP at
-- <https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9>.
--
-- Headers with a custom user-defined value are also accepted.
describeObjectResponse_cacheControl :: Lens.Lens' DescribeObjectResponse (Prelude.Maybe Prelude.Text)
describeObjectResponse_cacheControl :: (Maybe Text -> f (Maybe Text))
-> DescribeObjectResponse -> f DescribeObjectResponse
describeObjectResponse_cacheControl = (DescribeObjectResponse -> Maybe Text)
-> (DescribeObjectResponse -> Maybe Text -> DescribeObjectResponse)
-> Lens
     DescribeObjectResponse
     DescribeObjectResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeObjectResponse' {Maybe Text
cacheControl :: Maybe Text
$sel:cacheControl:DescribeObjectResponse' :: DescribeObjectResponse -> Maybe Text
cacheControl} -> Maybe Text
cacheControl) (\s :: DescribeObjectResponse
s@DescribeObjectResponse' {} Maybe Text
a -> DescribeObjectResponse
s {$sel:cacheControl:DescribeObjectResponse' :: Maybe Text
cacheControl = Maybe Text
a} :: DescribeObjectResponse)

-- | The date and time that the object was last modified.
describeObjectResponse_lastModified :: Lens.Lens' DescribeObjectResponse (Prelude.Maybe Prelude.UTCTime)
describeObjectResponse_lastModified :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeObjectResponse -> f DescribeObjectResponse
describeObjectResponse_lastModified = (DescribeObjectResponse -> Maybe POSIX)
-> (DescribeObjectResponse
    -> Maybe POSIX -> DescribeObjectResponse)
-> Lens
     DescribeObjectResponse
     DescribeObjectResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeObjectResponse' {Maybe POSIX
lastModified :: Maybe POSIX
$sel:lastModified:DescribeObjectResponse' :: DescribeObjectResponse -> Maybe POSIX
lastModified} -> Maybe POSIX
lastModified) (\s :: DescribeObjectResponse
s@DescribeObjectResponse' {} Maybe POSIX
a -> DescribeObjectResponse
s {$sel:lastModified:DescribeObjectResponse' :: Maybe POSIX
lastModified = Maybe POSIX
a} :: DescribeObjectResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeObjectResponse -> f DescribeObjectResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeObjectResponse
-> f DescribeObjectResponse
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 content type of the object.
describeObjectResponse_contentType :: Lens.Lens' DescribeObjectResponse (Prelude.Maybe Prelude.Text)
describeObjectResponse_contentType :: (Maybe Text -> f (Maybe Text))
-> DescribeObjectResponse -> f DescribeObjectResponse
describeObjectResponse_contentType = (DescribeObjectResponse -> Maybe Text)
-> (DescribeObjectResponse -> Maybe Text -> DescribeObjectResponse)
-> Lens
     DescribeObjectResponse
     DescribeObjectResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeObjectResponse' {Maybe Text
contentType :: Maybe Text
$sel:contentType:DescribeObjectResponse' :: DescribeObjectResponse -> Maybe Text
contentType} -> Maybe Text
contentType) (\s :: DescribeObjectResponse
s@DescribeObjectResponse' {} Maybe Text
a -> DescribeObjectResponse
s {$sel:contentType:DescribeObjectResponse' :: Maybe Text
contentType = Maybe Text
a} :: DescribeObjectResponse)

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

instance Prelude.NFData DescribeObjectResponse