{-# 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.IoT.DescribeDimension
-- 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)
--
-- Provides details about a dimension that is defined in your Amazon Web
-- Services accounts.
--
-- Requires permission to access the
-- <https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions DescribeDimension>
-- action.
module Amazonka.IoT.DescribeDimension
  ( -- * Creating a Request
    DescribeDimension (..),
    newDescribeDimension,

    -- * Request Lenses
    describeDimension_name,

    -- * Destructuring the Response
    DescribeDimensionResponse (..),
    newDescribeDimensionResponse,

    -- * Response Lenses
    describeDimensionResponse_lastModifiedDate,
    describeDimensionResponse_arn,
    describeDimensionResponse_stringValues,
    describeDimensionResponse_name,
    describeDimensionResponse_creationDate,
    describeDimensionResponse_type,
    describeDimensionResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.IoT.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

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

-- |
-- Create a value of 'DescribeDimension' 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:
--
-- 'name', 'describeDimension_name' - The unique identifier for the dimension.
newDescribeDimension ::
  -- | 'name'
  Prelude.Text ->
  DescribeDimension
newDescribeDimension :: Text -> DescribeDimension
newDescribeDimension Text
pName_ =
  DescribeDimension' :: Text -> DescribeDimension
DescribeDimension' {$sel:name:DescribeDimension' :: Text
name = Text
pName_}

-- | The unique identifier for the dimension.
describeDimension_name :: Lens.Lens' DescribeDimension Prelude.Text
describeDimension_name :: (Text -> f Text) -> DescribeDimension -> f DescribeDimension
describeDimension_name = (DescribeDimension -> Text)
-> (DescribeDimension -> Text -> DescribeDimension)
-> Lens DescribeDimension DescribeDimension Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDimension' {Text
name :: Text
$sel:name:DescribeDimension' :: DescribeDimension -> Text
name} -> Text
name) (\s :: DescribeDimension
s@DescribeDimension' {} Text
a -> DescribeDimension
s {$sel:name:DescribeDimension' :: Text
name = Text
a} :: DescribeDimension)

instance Core.AWSRequest DescribeDimension where
  type
    AWSResponse DescribeDimension =
      DescribeDimensionResponse
  request :: DescribeDimension -> Request DescribeDimension
request = Service -> DescribeDimension -> Request DescribeDimension
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeDimension
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeDimension)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeDimension))
-> Logger
-> Service
-> Proxy DescribeDimension
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeDimension)))
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 POSIX
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe Text
-> Maybe POSIX
-> Maybe DimensionType
-> Int
-> DescribeDimensionResponse
DescribeDimensionResponse'
            (Maybe POSIX
 -> Maybe Text
 -> Maybe (NonEmpty Text)
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe DimensionType
 -> Int
 -> DescribeDimensionResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe (NonEmpty Text)
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe DimensionType
      -> Int
      -> DescribeDimensionResponse)
forall (f :: * -> *) a b. Functor 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
"lastModifiedDate")
            Either
  String
  (Maybe Text
   -> Maybe (NonEmpty Text)
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe DimensionType
   -> Int
   -> DescribeDimensionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe (NonEmpty Text)
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe DimensionType
      -> Int
      -> DescribeDimensionResponse)
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
"arn")
            Either
  String
  (Maybe (NonEmpty Text)
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe DimensionType
   -> Int
   -> DescribeDimensionResponse)
-> Either String (Maybe (NonEmpty Text))
-> Either
     String
     (Maybe Text
      -> Maybe POSIX
      -> Maybe DimensionType
      -> Int
      -> DescribeDimensionResponse)
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
"stringValues")
            Either
  String
  (Maybe Text
   -> Maybe POSIX
   -> Maybe DimensionType
   -> Int
   -> DescribeDimensionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe POSIX
      -> Maybe DimensionType -> Int -> DescribeDimensionResponse)
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
"name")
            Either
  String
  (Maybe POSIX
   -> Maybe DimensionType -> Int -> DescribeDimensionResponse)
-> Either String (Maybe POSIX)
-> Either
     String (Maybe DimensionType -> Int -> DescribeDimensionResponse)
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
"creationDate")
            Either
  String (Maybe DimensionType -> Int -> DescribeDimensionResponse)
-> Either String (Maybe DimensionType)
-> Either String (Int -> DescribeDimensionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe DimensionType)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"type")
            Either String (Int -> DescribeDimensionResponse)
-> Either String Int -> Either String DescribeDimensionResponse
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 DescribeDimension

instance Prelude.NFData DescribeDimension

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

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

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

-- | /See:/ 'newDescribeDimensionResponse' smart constructor.
data DescribeDimensionResponse = DescribeDimensionResponse'
  { -- | The date the dimension was last modified.
    DescribeDimensionResponse -> Maybe POSIX
lastModifiedDate :: Prelude.Maybe Core.POSIX,
    -- | The Amazon Resource Name (ARN) for the dimension.
    DescribeDimensionResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The value or list of values used to scope the dimension. For example,
    -- for topic filters, this is the pattern used to match the MQTT topic
    -- name.
    DescribeDimensionResponse -> Maybe (NonEmpty Text)
stringValues :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
    -- | The unique identifier for the dimension.
    DescribeDimensionResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The date the dimension was created.
    DescribeDimensionResponse -> Maybe POSIX
creationDate :: Prelude.Maybe Core.POSIX,
    -- | The type of the dimension.
    DescribeDimensionResponse -> Maybe DimensionType
type' :: Prelude.Maybe DimensionType,
    -- | The response's http status code.
    DescribeDimensionResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeDimensionResponse -> DescribeDimensionResponse -> Bool
(DescribeDimensionResponse -> DescribeDimensionResponse -> Bool)
-> (DescribeDimensionResponse -> DescribeDimensionResponse -> Bool)
-> Eq DescribeDimensionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeDimensionResponse -> DescribeDimensionResponse -> Bool
$c/= :: DescribeDimensionResponse -> DescribeDimensionResponse -> Bool
== :: DescribeDimensionResponse -> DescribeDimensionResponse -> Bool
$c== :: DescribeDimensionResponse -> DescribeDimensionResponse -> Bool
Prelude.Eq, ReadPrec [DescribeDimensionResponse]
ReadPrec DescribeDimensionResponse
Int -> ReadS DescribeDimensionResponse
ReadS [DescribeDimensionResponse]
(Int -> ReadS DescribeDimensionResponse)
-> ReadS [DescribeDimensionResponse]
-> ReadPrec DescribeDimensionResponse
-> ReadPrec [DescribeDimensionResponse]
-> Read DescribeDimensionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeDimensionResponse]
$creadListPrec :: ReadPrec [DescribeDimensionResponse]
readPrec :: ReadPrec DescribeDimensionResponse
$creadPrec :: ReadPrec DescribeDimensionResponse
readList :: ReadS [DescribeDimensionResponse]
$creadList :: ReadS [DescribeDimensionResponse]
readsPrec :: Int -> ReadS DescribeDimensionResponse
$creadsPrec :: Int -> ReadS DescribeDimensionResponse
Prelude.Read, Int -> DescribeDimensionResponse -> ShowS
[DescribeDimensionResponse] -> ShowS
DescribeDimensionResponse -> String
(Int -> DescribeDimensionResponse -> ShowS)
-> (DescribeDimensionResponse -> String)
-> ([DescribeDimensionResponse] -> ShowS)
-> Show DescribeDimensionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeDimensionResponse] -> ShowS
$cshowList :: [DescribeDimensionResponse] -> ShowS
show :: DescribeDimensionResponse -> String
$cshow :: DescribeDimensionResponse -> String
showsPrec :: Int -> DescribeDimensionResponse -> ShowS
$cshowsPrec :: Int -> DescribeDimensionResponse -> ShowS
Prelude.Show, (forall x.
 DescribeDimensionResponse -> Rep DescribeDimensionResponse x)
-> (forall x.
    Rep DescribeDimensionResponse x -> DescribeDimensionResponse)
-> Generic DescribeDimensionResponse
forall x.
Rep DescribeDimensionResponse x -> DescribeDimensionResponse
forall x.
DescribeDimensionResponse -> Rep DescribeDimensionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeDimensionResponse x -> DescribeDimensionResponse
$cfrom :: forall x.
DescribeDimensionResponse -> Rep DescribeDimensionResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeDimensionResponse' 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:
--
-- 'lastModifiedDate', 'describeDimensionResponse_lastModifiedDate' - The date the dimension was last modified.
--
-- 'arn', 'describeDimensionResponse_arn' - The Amazon Resource Name (ARN) for the dimension.
--
-- 'stringValues', 'describeDimensionResponse_stringValues' - The value or list of values used to scope the dimension. For example,
-- for topic filters, this is the pattern used to match the MQTT topic
-- name.
--
-- 'name', 'describeDimensionResponse_name' - The unique identifier for the dimension.
--
-- 'creationDate', 'describeDimensionResponse_creationDate' - The date the dimension was created.
--
-- 'type'', 'describeDimensionResponse_type' - The type of the dimension.
--
-- 'httpStatus', 'describeDimensionResponse_httpStatus' - The response's http status code.
newDescribeDimensionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeDimensionResponse
newDescribeDimensionResponse :: Int -> DescribeDimensionResponse
newDescribeDimensionResponse Int
pHttpStatus_ =
  DescribeDimensionResponse' :: Maybe POSIX
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe Text
-> Maybe POSIX
-> Maybe DimensionType
-> Int
-> DescribeDimensionResponse
DescribeDimensionResponse'
    { $sel:lastModifiedDate:DescribeDimensionResponse' :: Maybe POSIX
lastModifiedDate =
        Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:DescribeDimensionResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:stringValues:DescribeDimensionResponse' :: Maybe (NonEmpty Text)
stringValues = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:name:DescribeDimensionResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:creationDate:DescribeDimensionResponse' :: Maybe POSIX
creationDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:type':DescribeDimensionResponse' :: Maybe DimensionType
type' = Maybe DimensionType
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeDimensionResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The date the dimension was last modified.
describeDimensionResponse_lastModifiedDate :: Lens.Lens' DescribeDimensionResponse (Prelude.Maybe Prelude.UTCTime)
describeDimensionResponse_lastModifiedDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeDimensionResponse -> f DescribeDimensionResponse
describeDimensionResponse_lastModifiedDate = (DescribeDimensionResponse -> Maybe POSIX)
-> (DescribeDimensionResponse
    -> Maybe POSIX -> DescribeDimensionResponse)
-> Lens
     DescribeDimensionResponse
     DescribeDimensionResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDimensionResponse' {Maybe POSIX
lastModifiedDate :: Maybe POSIX
$sel:lastModifiedDate:DescribeDimensionResponse' :: DescribeDimensionResponse -> Maybe POSIX
lastModifiedDate} -> Maybe POSIX
lastModifiedDate) (\s :: DescribeDimensionResponse
s@DescribeDimensionResponse' {} Maybe POSIX
a -> DescribeDimensionResponse
s {$sel:lastModifiedDate:DescribeDimensionResponse' :: Maybe POSIX
lastModifiedDate = Maybe POSIX
a} :: DescribeDimensionResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeDimensionResponse -> f DescribeDimensionResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeDimensionResponse
-> f DescribeDimensionResponse
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) for the dimension.
describeDimensionResponse_arn :: Lens.Lens' DescribeDimensionResponse (Prelude.Maybe Prelude.Text)
describeDimensionResponse_arn :: (Maybe Text -> f (Maybe Text))
-> DescribeDimensionResponse -> f DescribeDimensionResponse
describeDimensionResponse_arn = (DescribeDimensionResponse -> Maybe Text)
-> (DescribeDimensionResponse
    -> Maybe Text -> DescribeDimensionResponse)
-> Lens
     DescribeDimensionResponse
     DescribeDimensionResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDimensionResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:DescribeDimensionResponse' :: DescribeDimensionResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: DescribeDimensionResponse
s@DescribeDimensionResponse' {} Maybe Text
a -> DescribeDimensionResponse
s {$sel:arn:DescribeDimensionResponse' :: Maybe Text
arn = Maybe Text
a} :: DescribeDimensionResponse)

-- | The value or list of values used to scope the dimension. For example,
-- for topic filters, this is the pattern used to match the MQTT topic
-- name.
describeDimensionResponse_stringValues :: Lens.Lens' DescribeDimensionResponse (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
describeDimensionResponse_stringValues :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> DescribeDimensionResponse -> f DescribeDimensionResponse
describeDimensionResponse_stringValues = (DescribeDimensionResponse -> Maybe (NonEmpty Text))
-> (DescribeDimensionResponse
    -> Maybe (NonEmpty Text) -> DescribeDimensionResponse)
-> Lens
     DescribeDimensionResponse
     DescribeDimensionResponse
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDimensionResponse' {Maybe (NonEmpty Text)
stringValues :: Maybe (NonEmpty Text)
$sel:stringValues:DescribeDimensionResponse' :: DescribeDimensionResponse -> Maybe (NonEmpty Text)
stringValues} -> Maybe (NonEmpty Text)
stringValues) (\s :: DescribeDimensionResponse
s@DescribeDimensionResponse' {} Maybe (NonEmpty Text)
a -> DescribeDimensionResponse
s {$sel:stringValues:DescribeDimensionResponse' :: Maybe (NonEmpty Text)
stringValues = Maybe (NonEmpty Text)
a} :: DescribeDimensionResponse) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
 -> DescribeDimensionResponse -> f DescribeDimensionResponse)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
    -> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> DescribeDimensionResponse
-> f DescribeDimensionResponse
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 unique identifier for the dimension.
describeDimensionResponse_name :: Lens.Lens' DescribeDimensionResponse (Prelude.Maybe Prelude.Text)
describeDimensionResponse_name :: (Maybe Text -> f (Maybe Text))
-> DescribeDimensionResponse -> f DescribeDimensionResponse
describeDimensionResponse_name = (DescribeDimensionResponse -> Maybe Text)
-> (DescribeDimensionResponse
    -> Maybe Text -> DescribeDimensionResponse)
-> Lens
     DescribeDimensionResponse
     DescribeDimensionResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDimensionResponse' {Maybe Text
name :: Maybe Text
$sel:name:DescribeDimensionResponse' :: DescribeDimensionResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: DescribeDimensionResponse
s@DescribeDimensionResponse' {} Maybe Text
a -> DescribeDimensionResponse
s {$sel:name:DescribeDimensionResponse' :: Maybe Text
name = Maybe Text
a} :: DescribeDimensionResponse)

-- | The date the dimension was created.
describeDimensionResponse_creationDate :: Lens.Lens' DescribeDimensionResponse (Prelude.Maybe Prelude.UTCTime)
describeDimensionResponse_creationDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeDimensionResponse -> f DescribeDimensionResponse
describeDimensionResponse_creationDate = (DescribeDimensionResponse -> Maybe POSIX)
-> (DescribeDimensionResponse
    -> Maybe POSIX -> DescribeDimensionResponse)
-> Lens
     DescribeDimensionResponse
     DescribeDimensionResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDimensionResponse' {Maybe POSIX
creationDate :: Maybe POSIX
$sel:creationDate:DescribeDimensionResponse' :: DescribeDimensionResponse -> Maybe POSIX
creationDate} -> Maybe POSIX
creationDate) (\s :: DescribeDimensionResponse
s@DescribeDimensionResponse' {} Maybe POSIX
a -> DescribeDimensionResponse
s {$sel:creationDate:DescribeDimensionResponse' :: Maybe POSIX
creationDate = Maybe POSIX
a} :: DescribeDimensionResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> DescribeDimensionResponse -> f DescribeDimensionResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> DescribeDimensionResponse
-> f DescribeDimensionResponse
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 type of the dimension.
describeDimensionResponse_type :: Lens.Lens' DescribeDimensionResponse (Prelude.Maybe DimensionType)
describeDimensionResponse_type :: (Maybe DimensionType -> f (Maybe DimensionType))
-> DescribeDimensionResponse -> f DescribeDimensionResponse
describeDimensionResponse_type = (DescribeDimensionResponse -> Maybe DimensionType)
-> (DescribeDimensionResponse
    -> Maybe DimensionType -> DescribeDimensionResponse)
-> Lens
     DescribeDimensionResponse
     DescribeDimensionResponse
     (Maybe DimensionType)
     (Maybe DimensionType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeDimensionResponse' {Maybe DimensionType
type' :: Maybe DimensionType
$sel:type':DescribeDimensionResponse' :: DescribeDimensionResponse -> Maybe DimensionType
type'} -> Maybe DimensionType
type') (\s :: DescribeDimensionResponse
s@DescribeDimensionResponse' {} Maybe DimensionType
a -> DescribeDimensionResponse
s {$sel:type':DescribeDimensionResponse' :: Maybe DimensionType
type' = Maybe DimensionType
a} :: DescribeDimensionResponse)

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

instance Prelude.NFData DescribeDimensionResponse