{-# 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.SDB.DomainMetadata
-- 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 information about the domain, including when the domain was
-- created, the number of items and attributes in the domain, and the size
-- of the attribute names and values.
module Amazonka.SDB.DomainMetadata
  ( -- * Creating a Request
    DomainMetadata (..),
    newDomainMetadata,

    -- * Request Lenses
    domainMetadata_domainName,

    -- * Destructuring the Response
    DomainMetadataResponse (..),
    newDomainMetadataResponse,

    -- * Response Lenses
    domainMetadataResponse_itemNamesSizeBytes,
    domainMetadataResponse_attributeValuesSizeBytes,
    domainMetadataResponse_attributeNameCount,
    domainMetadataResponse_attributeNamesSizeBytes,
    domainMetadataResponse_attributeValueCount,
    domainMetadataResponse_itemCount,
    domainMetadataResponse_timestamp,
    domainMetadataResponse_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.SDB.Types

-- | /See:/ 'newDomainMetadata' smart constructor.
data DomainMetadata = DomainMetadata'
  { -- | The name of the domain for which to display the metadata of.
    DomainMetadata -> Text
domainName :: Prelude.Text
  }
  deriving (DomainMetadata -> DomainMetadata -> Bool
(DomainMetadata -> DomainMetadata -> Bool)
-> (DomainMetadata -> DomainMetadata -> Bool) -> Eq DomainMetadata
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DomainMetadata -> DomainMetadata -> Bool
$c/= :: DomainMetadata -> DomainMetadata -> Bool
== :: DomainMetadata -> DomainMetadata -> Bool
$c== :: DomainMetadata -> DomainMetadata -> Bool
Prelude.Eq, ReadPrec [DomainMetadata]
ReadPrec DomainMetadata
Int -> ReadS DomainMetadata
ReadS [DomainMetadata]
(Int -> ReadS DomainMetadata)
-> ReadS [DomainMetadata]
-> ReadPrec DomainMetadata
-> ReadPrec [DomainMetadata]
-> Read DomainMetadata
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DomainMetadata]
$creadListPrec :: ReadPrec [DomainMetadata]
readPrec :: ReadPrec DomainMetadata
$creadPrec :: ReadPrec DomainMetadata
readList :: ReadS [DomainMetadata]
$creadList :: ReadS [DomainMetadata]
readsPrec :: Int -> ReadS DomainMetadata
$creadsPrec :: Int -> ReadS DomainMetadata
Prelude.Read, Int -> DomainMetadata -> ShowS
[DomainMetadata] -> ShowS
DomainMetadata -> String
(Int -> DomainMetadata -> ShowS)
-> (DomainMetadata -> String)
-> ([DomainMetadata] -> ShowS)
-> Show DomainMetadata
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DomainMetadata] -> ShowS
$cshowList :: [DomainMetadata] -> ShowS
show :: DomainMetadata -> String
$cshow :: DomainMetadata -> String
showsPrec :: Int -> DomainMetadata -> ShowS
$cshowsPrec :: Int -> DomainMetadata -> ShowS
Prelude.Show, (forall x. DomainMetadata -> Rep DomainMetadata x)
-> (forall x. Rep DomainMetadata x -> DomainMetadata)
-> Generic DomainMetadata
forall x. Rep DomainMetadata x -> DomainMetadata
forall x. DomainMetadata -> Rep DomainMetadata x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DomainMetadata x -> DomainMetadata
$cfrom :: forall x. DomainMetadata -> Rep DomainMetadata x
Prelude.Generic)

-- |
-- Create a value of 'DomainMetadata' 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:
--
-- 'domainName', 'domainMetadata_domainName' - The name of the domain for which to display the metadata of.
newDomainMetadata ::
  -- | 'domainName'
  Prelude.Text ->
  DomainMetadata
newDomainMetadata :: Text -> DomainMetadata
newDomainMetadata Text
pDomainName_ =
  DomainMetadata' :: Text -> DomainMetadata
DomainMetadata' {$sel:domainName:DomainMetadata' :: Text
domainName = Text
pDomainName_}

-- | The name of the domain for which to display the metadata of.
domainMetadata_domainName :: Lens.Lens' DomainMetadata Prelude.Text
domainMetadata_domainName :: (Text -> f Text) -> DomainMetadata -> f DomainMetadata
domainMetadata_domainName = (DomainMetadata -> Text)
-> (DomainMetadata -> Text -> DomainMetadata)
-> Lens DomainMetadata DomainMetadata Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainMetadata' {Text
domainName :: Text
$sel:domainName:DomainMetadata' :: DomainMetadata -> Text
domainName} -> Text
domainName) (\s :: DomainMetadata
s@DomainMetadata' {} Text
a -> DomainMetadata
s {$sel:domainName:DomainMetadata' :: Text
domainName = Text
a} :: DomainMetadata)

instance Core.AWSRequest DomainMetadata where
  type
    AWSResponse DomainMetadata =
      DomainMetadataResponse
  request :: DomainMetadata -> Request DomainMetadata
request = Service -> DomainMetadata -> Request DomainMetadata
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy DomainMetadata
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DomainMetadata)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse DomainMetadata))
-> Logger
-> Service
-> Proxy DomainMetadata
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DomainMetadata)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"DomainMetadataResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Integer
-> Maybe Integer
-> Maybe Int
-> Maybe Integer
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Int
-> DomainMetadataResponse
DomainMetadataResponse'
            (Maybe Integer
 -> Maybe Integer
 -> Maybe Int
 -> Maybe Integer
 -> Maybe Int
 -> Maybe Int
 -> Maybe Int
 -> Int
 -> DomainMetadataResponse)
-> Either String (Maybe Integer)
-> Either
     String
     (Maybe Integer
      -> Maybe Int
      -> Maybe Integer
      -> Maybe Int
      -> Maybe Int
      -> Maybe Int
      -> Int
      -> DomainMetadataResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Integer)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ItemNamesSizeBytes")
            Either
  String
  (Maybe Integer
   -> Maybe Int
   -> Maybe Integer
   -> Maybe Int
   -> Maybe Int
   -> Maybe Int
   -> Int
   -> DomainMetadataResponse)
-> Either String (Maybe Integer)
-> Either
     String
     (Maybe Int
      -> Maybe Integer
      -> Maybe Int
      -> Maybe Int
      -> Maybe Int
      -> Int
      -> DomainMetadataResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Integer)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"AttributeValuesSizeBytes")
            Either
  String
  (Maybe Int
   -> Maybe Integer
   -> Maybe Int
   -> Maybe Int
   -> Maybe Int
   -> Int
   -> DomainMetadataResponse)
-> Either String (Maybe Int)
-> Either
     String
     (Maybe Integer
      -> Maybe Int
      -> Maybe Int
      -> Maybe Int
      -> Int
      -> DomainMetadataResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Int)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"AttributeNameCount")
            Either
  String
  (Maybe Integer
   -> Maybe Int
   -> Maybe Int
   -> Maybe Int
   -> Int
   -> DomainMetadataResponse)
-> Either String (Maybe Integer)
-> Either
     String
     (Maybe Int
      -> Maybe Int -> Maybe Int -> Int -> DomainMetadataResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Integer)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"AttributeNamesSizeBytes")
            Either
  String
  (Maybe Int
   -> Maybe Int -> Maybe Int -> Int -> DomainMetadataResponse)
-> Either String (Maybe Int)
-> Either
     String (Maybe Int -> Maybe Int -> Int -> DomainMetadataResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Int)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"AttributeValueCount")
            Either
  String (Maybe Int -> Maybe Int -> Int -> DomainMetadataResponse)
-> Either String (Maybe Int)
-> Either String (Maybe Int -> Int -> DomainMetadataResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Int)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"ItemCount")
            Either String (Maybe Int -> Int -> DomainMetadataResponse)
-> Either String (Maybe Int)
-> Either String (Int -> DomainMetadataResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Int)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Timestamp")
            Either String (Int -> DomainMetadataResponse)
-> Either String Int -> Either String DomainMetadataResponse
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 DomainMetadata

instance Prelude.NFData DomainMetadata

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

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

instance Core.ToQuery DomainMetadata where
  toQuery :: DomainMetadata -> QueryString
toQuery DomainMetadata' {Text
domainName :: Text
$sel:domainName:DomainMetadata' :: DomainMetadata -> Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"DomainMetadata" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2009-04-15" :: Prelude.ByteString),
        ByteString
"DomainName" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
domainName
      ]

-- | /See:/ 'newDomainMetadataResponse' smart constructor.
data DomainMetadataResponse = DomainMetadataResponse'
  { -- | The total size of all item names in the domain, in bytes.
    DomainMetadataResponse -> Maybe Integer
itemNamesSizeBytes :: Prelude.Maybe Prelude.Integer,
    -- | The total size of all attribute values in the domain, in bytes.
    DomainMetadataResponse -> Maybe Integer
attributeValuesSizeBytes :: Prelude.Maybe Prelude.Integer,
    -- | The number of unique attribute names in the domain.
    DomainMetadataResponse -> Maybe Int
attributeNameCount :: Prelude.Maybe Prelude.Int,
    -- | The total size of all unique attribute names in the domain, in bytes.
    DomainMetadataResponse -> Maybe Integer
attributeNamesSizeBytes :: Prelude.Maybe Prelude.Integer,
    -- | The number of all attribute name\/value pairs in the domain.
    DomainMetadataResponse -> Maybe Int
attributeValueCount :: Prelude.Maybe Prelude.Int,
    -- | The number of all items in the domain.
    DomainMetadataResponse -> Maybe Int
itemCount :: Prelude.Maybe Prelude.Int,
    -- | The data and time when metadata was calculated, in Epoch (UNIX) seconds.
    DomainMetadataResponse -> Maybe Int
timestamp :: Prelude.Maybe Prelude.Int,
    -- | The response's http status code.
    DomainMetadataResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DomainMetadataResponse -> DomainMetadataResponse -> Bool
(DomainMetadataResponse -> DomainMetadataResponse -> Bool)
-> (DomainMetadataResponse -> DomainMetadataResponse -> Bool)
-> Eq DomainMetadataResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DomainMetadataResponse -> DomainMetadataResponse -> Bool
$c/= :: DomainMetadataResponse -> DomainMetadataResponse -> Bool
== :: DomainMetadataResponse -> DomainMetadataResponse -> Bool
$c== :: DomainMetadataResponse -> DomainMetadataResponse -> Bool
Prelude.Eq, ReadPrec [DomainMetadataResponse]
ReadPrec DomainMetadataResponse
Int -> ReadS DomainMetadataResponse
ReadS [DomainMetadataResponse]
(Int -> ReadS DomainMetadataResponse)
-> ReadS [DomainMetadataResponse]
-> ReadPrec DomainMetadataResponse
-> ReadPrec [DomainMetadataResponse]
-> Read DomainMetadataResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DomainMetadataResponse]
$creadListPrec :: ReadPrec [DomainMetadataResponse]
readPrec :: ReadPrec DomainMetadataResponse
$creadPrec :: ReadPrec DomainMetadataResponse
readList :: ReadS [DomainMetadataResponse]
$creadList :: ReadS [DomainMetadataResponse]
readsPrec :: Int -> ReadS DomainMetadataResponse
$creadsPrec :: Int -> ReadS DomainMetadataResponse
Prelude.Read, Int -> DomainMetadataResponse -> ShowS
[DomainMetadataResponse] -> ShowS
DomainMetadataResponse -> String
(Int -> DomainMetadataResponse -> ShowS)
-> (DomainMetadataResponse -> String)
-> ([DomainMetadataResponse] -> ShowS)
-> Show DomainMetadataResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DomainMetadataResponse] -> ShowS
$cshowList :: [DomainMetadataResponse] -> ShowS
show :: DomainMetadataResponse -> String
$cshow :: DomainMetadataResponse -> String
showsPrec :: Int -> DomainMetadataResponse -> ShowS
$cshowsPrec :: Int -> DomainMetadataResponse -> ShowS
Prelude.Show, (forall x. DomainMetadataResponse -> Rep DomainMetadataResponse x)
-> (forall x.
    Rep DomainMetadataResponse x -> DomainMetadataResponse)
-> Generic DomainMetadataResponse
forall x. Rep DomainMetadataResponse x -> DomainMetadataResponse
forall x. DomainMetadataResponse -> Rep DomainMetadataResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DomainMetadataResponse x -> DomainMetadataResponse
$cfrom :: forall x. DomainMetadataResponse -> Rep DomainMetadataResponse x
Prelude.Generic)

-- |
-- Create a value of 'DomainMetadataResponse' 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:
--
-- 'itemNamesSizeBytes', 'domainMetadataResponse_itemNamesSizeBytes' - The total size of all item names in the domain, in bytes.
--
-- 'attributeValuesSizeBytes', 'domainMetadataResponse_attributeValuesSizeBytes' - The total size of all attribute values in the domain, in bytes.
--
-- 'attributeNameCount', 'domainMetadataResponse_attributeNameCount' - The number of unique attribute names in the domain.
--
-- 'attributeNamesSizeBytes', 'domainMetadataResponse_attributeNamesSizeBytes' - The total size of all unique attribute names in the domain, in bytes.
--
-- 'attributeValueCount', 'domainMetadataResponse_attributeValueCount' - The number of all attribute name\/value pairs in the domain.
--
-- 'itemCount', 'domainMetadataResponse_itemCount' - The number of all items in the domain.
--
-- 'timestamp', 'domainMetadataResponse_timestamp' - The data and time when metadata was calculated, in Epoch (UNIX) seconds.
--
-- 'httpStatus', 'domainMetadataResponse_httpStatus' - The response's http status code.
newDomainMetadataResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DomainMetadataResponse
newDomainMetadataResponse :: Int -> DomainMetadataResponse
newDomainMetadataResponse Int
pHttpStatus_ =
  DomainMetadataResponse' :: Maybe Integer
-> Maybe Integer
-> Maybe Int
-> Maybe Integer
-> Maybe Int
-> Maybe Int
-> Maybe Int
-> Int
-> DomainMetadataResponse
DomainMetadataResponse'
    { $sel:itemNamesSizeBytes:DomainMetadataResponse' :: Maybe Integer
itemNamesSizeBytes =
        Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:attributeValuesSizeBytes:DomainMetadataResponse' :: Maybe Integer
attributeValuesSizeBytes = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:attributeNameCount:DomainMetadataResponse' :: Maybe Int
attributeNameCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:attributeNamesSizeBytes:DomainMetadataResponse' :: Maybe Integer
attributeNamesSizeBytes = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:attributeValueCount:DomainMetadataResponse' :: Maybe Int
attributeValueCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:itemCount:DomainMetadataResponse' :: Maybe Int
itemCount = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:timestamp:DomainMetadataResponse' :: Maybe Int
timestamp = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DomainMetadataResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The total size of all item names in the domain, in bytes.
domainMetadataResponse_itemNamesSizeBytes :: Lens.Lens' DomainMetadataResponse (Prelude.Maybe Prelude.Integer)
domainMetadataResponse_itemNamesSizeBytes :: (Maybe Integer -> f (Maybe Integer))
-> DomainMetadataResponse -> f DomainMetadataResponse
domainMetadataResponse_itemNamesSizeBytes = (DomainMetadataResponse -> Maybe Integer)
-> (DomainMetadataResponse
    -> Maybe Integer -> DomainMetadataResponse)
-> Lens
     DomainMetadataResponse
     DomainMetadataResponse
     (Maybe Integer)
     (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainMetadataResponse' {Maybe Integer
itemNamesSizeBytes :: Maybe Integer
$sel:itemNamesSizeBytes:DomainMetadataResponse' :: DomainMetadataResponse -> Maybe Integer
itemNamesSizeBytes} -> Maybe Integer
itemNamesSizeBytes) (\s :: DomainMetadataResponse
s@DomainMetadataResponse' {} Maybe Integer
a -> DomainMetadataResponse
s {$sel:itemNamesSizeBytes:DomainMetadataResponse' :: Maybe Integer
itemNamesSizeBytes = Maybe Integer
a} :: DomainMetadataResponse)

-- | The total size of all attribute values in the domain, in bytes.
domainMetadataResponse_attributeValuesSizeBytes :: Lens.Lens' DomainMetadataResponse (Prelude.Maybe Prelude.Integer)
domainMetadataResponse_attributeValuesSizeBytes :: (Maybe Integer -> f (Maybe Integer))
-> DomainMetadataResponse -> f DomainMetadataResponse
domainMetadataResponse_attributeValuesSizeBytes = (DomainMetadataResponse -> Maybe Integer)
-> (DomainMetadataResponse
    -> Maybe Integer -> DomainMetadataResponse)
-> Lens
     DomainMetadataResponse
     DomainMetadataResponse
     (Maybe Integer)
     (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainMetadataResponse' {Maybe Integer
attributeValuesSizeBytes :: Maybe Integer
$sel:attributeValuesSizeBytes:DomainMetadataResponse' :: DomainMetadataResponse -> Maybe Integer
attributeValuesSizeBytes} -> Maybe Integer
attributeValuesSizeBytes) (\s :: DomainMetadataResponse
s@DomainMetadataResponse' {} Maybe Integer
a -> DomainMetadataResponse
s {$sel:attributeValuesSizeBytes:DomainMetadataResponse' :: Maybe Integer
attributeValuesSizeBytes = Maybe Integer
a} :: DomainMetadataResponse)

-- | The number of unique attribute names in the domain.
domainMetadataResponse_attributeNameCount :: Lens.Lens' DomainMetadataResponse (Prelude.Maybe Prelude.Int)
domainMetadataResponse_attributeNameCount :: (Maybe Int -> f (Maybe Int))
-> DomainMetadataResponse -> f DomainMetadataResponse
domainMetadataResponse_attributeNameCount = (DomainMetadataResponse -> Maybe Int)
-> (DomainMetadataResponse -> Maybe Int -> DomainMetadataResponse)
-> Lens
     DomainMetadataResponse
     DomainMetadataResponse
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainMetadataResponse' {Maybe Int
attributeNameCount :: Maybe Int
$sel:attributeNameCount:DomainMetadataResponse' :: DomainMetadataResponse -> Maybe Int
attributeNameCount} -> Maybe Int
attributeNameCount) (\s :: DomainMetadataResponse
s@DomainMetadataResponse' {} Maybe Int
a -> DomainMetadataResponse
s {$sel:attributeNameCount:DomainMetadataResponse' :: Maybe Int
attributeNameCount = Maybe Int
a} :: DomainMetadataResponse)

-- | The total size of all unique attribute names in the domain, in bytes.
domainMetadataResponse_attributeNamesSizeBytes :: Lens.Lens' DomainMetadataResponse (Prelude.Maybe Prelude.Integer)
domainMetadataResponse_attributeNamesSizeBytes :: (Maybe Integer -> f (Maybe Integer))
-> DomainMetadataResponse -> f DomainMetadataResponse
domainMetadataResponse_attributeNamesSizeBytes = (DomainMetadataResponse -> Maybe Integer)
-> (DomainMetadataResponse
    -> Maybe Integer -> DomainMetadataResponse)
-> Lens
     DomainMetadataResponse
     DomainMetadataResponse
     (Maybe Integer)
     (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainMetadataResponse' {Maybe Integer
attributeNamesSizeBytes :: Maybe Integer
$sel:attributeNamesSizeBytes:DomainMetadataResponse' :: DomainMetadataResponse -> Maybe Integer
attributeNamesSizeBytes} -> Maybe Integer
attributeNamesSizeBytes) (\s :: DomainMetadataResponse
s@DomainMetadataResponse' {} Maybe Integer
a -> DomainMetadataResponse
s {$sel:attributeNamesSizeBytes:DomainMetadataResponse' :: Maybe Integer
attributeNamesSizeBytes = Maybe Integer
a} :: DomainMetadataResponse)

-- | The number of all attribute name\/value pairs in the domain.
domainMetadataResponse_attributeValueCount :: Lens.Lens' DomainMetadataResponse (Prelude.Maybe Prelude.Int)
domainMetadataResponse_attributeValueCount :: (Maybe Int -> f (Maybe Int))
-> DomainMetadataResponse -> f DomainMetadataResponse
domainMetadataResponse_attributeValueCount = (DomainMetadataResponse -> Maybe Int)
-> (DomainMetadataResponse -> Maybe Int -> DomainMetadataResponse)
-> Lens
     DomainMetadataResponse
     DomainMetadataResponse
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainMetadataResponse' {Maybe Int
attributeValueCount :: Maybe Int
$sel:attributeValueCount:DomainMetadataResponse' :: DomainMetadataResponse -> Maybe Int
attributeValueCount} -> Maybe Int
attributeValueCount) (\s :: DomainMetadataResponse
s@DomainMetadataResponse' {} Maybe Int
a -> DomainMetadataResponse
s {$sel:attributeValueCount:DomainMetadataResponse' :: Maybe Int
attributeValueCount = Maybe Int
a} :: DomainMetadataResponse)

-- | The number of all items in the domain.
domainMetadataResponse_itemCount :: Lens.Lens' DomainMetadataResponse (Prelude.Maybe Prelude.Int)
domainMetadataResponse_itemCount :: (Maybe Int -> f (Maybe Int))
-> DomainMetadataResponse -> f DomainMetadataResponse
domainMetadataResponse_itemCount = (DomainMetadataResponse -> Maybe Int)
-> (DomainMetadataResponse -> Maybe Int -> DomainMetadataResponse)
-> Lens
     DomainMetadataResponse
     DomainMetadataResponse
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainMetadataResponse' {Maybe Int
itemCount :: Maybe Int
$sel:itemCount:DomainMetadataResponse' :: DomainMetadataResponse -> Maybe Int
itemCount} -> Maybe Int
itemCount) (\s :: DomainMetadataResponse
s@DomainMetadataResponse' {} Maybe Int
a -> DomainMetadataResponse
s {$sel:itemCount:DomainMetadataResponse' :: Maybe Int
itemCount = Maybe Int
a} :: DomainMetadataResponse)

-- | The data and time when metadata was calculated, in Epoch (UNIX) seconds.
domainMetadataResponse_timestamp :: Lens.Lens' DomainMetadataResponse (Prelude.Maybe Prelude.Int)
domainMetadataResponse_timestamp :: (Maybe Int -> f (Maybe Int))
-> DomainMetadataResponse -> f DomainMetadataResponse
domainMetadataResponse_timestamp = (DomainMetadataResponse -> Maybe Int)
-> (DomainMetadataResponse -> Maybe Int -> DomainMetadataResponse)
-> Lens
     DomainMetadataResponse
     DomainMetadataResponse
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DomainMetadataResponse' {Maybe Int
timestamp :: Maybe Int
$sel:timestamp:DomainMetadataResponse' :: DomainMetadataResponse -> Maybe Int
timestamp} -> Maybe Int
timestamp) (\s :: DomainMetadataResponse
s@DomainMetadataResponse' {} Maybe Int
a -> DomainMetadataResponse
s {$sel:timestamp:DomainMetadataResponse' :: Maybe Int
timestamp = Maybe Int
a} :: DomainMetadataResponse)

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

instance Prelude.NFData DomainMetadataResponse