{-# 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.UpdateDimension
-- 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)
--
-- Updates the definition for a dimension. You cannot change the type of a
-- dimension after it is created (you can delete it and recreate it).
--
-- Requires permission to access the
-- <https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions UpdateDimension>
-- action.
module Amazonka.IoT.UpdateDimension
  ( -- * Creating a Request
    UpdateDimension (..),
    newUpdateDimension,

    -- * Request Lenses
    updateDimension_name,
    updateDimension_stringValues,

    -- * Destructuring the Response
    UpdateDimensionResponse (..),
    newUpdateDimensionResponse,

    -- * Response Lenses
    updateDimensionResponse_lastModifiedDate,
    updateDimensionResponse_arn,
    updateDimensionResponse_stringValues,
    updateDimensionResponse_name,
    updateDimensionResponse_creationDate,
    updateDimensionResponse_type,
    updateDimensionResponse_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:/ 'newUpdateDimension' smart constructor.
data UpdateDimension = UpdateDimension'
  { -- | A unique identifier for the dimension. Choose something that describes
    -- the type and value to make it easy to remember what it does.
    UpdateDimension -> Text
name :: Prelude.Text,
    -- | Specifies the value or list of values for the dimension. For
    -- @TOPIC_FILTER@ dimensions, this is a pattern used to match the MQTT
    -- topic (for example, \"admin\/#\").
    UpdateDimension -> NonEmpty Text
stringValues :: Prelude.NonEmpty Prelude.Text
  }
  deriving (UpdateDimension -> UpdateDimension -> Bool
(UpdateDimension -> UpdateDimension -> Bool)
-> (UpdateDimension -> UpdateDimension -> Bool)
-> Eq UpdateDimension
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateDimension -> UpdateDimension -> Bool
$c/= :: UpdateDimension -> UpdateDimension -> Bool
== :: UpdateDimension -> UpdateDimension -> Bool
$c== :: UpdateDimension -> UpdateDimension -> Bool
Prelude.Eq, ReadPrec [UpdateDimension]
ReadPrec UpdateDimension
Int -> ReadS UpdateDimension
ReadS [UpdateDimension]
(Int -> ReadS UpdateDimension)
-> ReadS [UpdateDimension]
-> ReadPrec UpdateDimension
-> ReadPrec [UpdateDimension]
-> Read UpdateDimension
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateDimension]
$creadListPrec :: ReadPrec [UpdateDimension]
readPrec :: ReadPrec UpdateDimension
$creadPrec :: ReadPrec UpdateDimension
readList :: ReadS [UpdateDimension]
$creadList :: ReadS [UpdateDimension]
readsPrec :: Int -> ReadS UpdateDimension
$creadsPrec :: Int -> ReadS UpdateDimension
Prelude.Read, Int -> UpdateDimension -> ShowS
[UpdateDimension] -> ShowS
UpdateDimension -> String
(Int -> UpdateDimension -> ShowS)
-> (UpdateDimension -> String)
-> ([UpdateDimension] -> ShowS)
-> Show UpdateDimension
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateDimension] -> ShowS
$cshowList :: [UpdateDimension] -> ShowS
show :: UpdateDimension -> String
$cshow :: UpdateDimension -> String
showsPrec :: Int -> UpdateDimension -> ShowS
$cshowsPrec :: Int -> UpdateDimension -> ShowS
Prelude.Show, (forall x. UpdateDimension -> Rep UpdateDimension x)
-> (forall x. Rep UpdateDimension x -> UpdateDimension)
-> Generic UpdateDimension
forall x. Rep UpdateDimension x -> UpdateDimension
forall x. UpdateDimension -> Rep UpdateDimension x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateDimension x -> UpdateDimension
$cfrom :: forall x. UpdateDimension -> Rep UpdateDimension x
Prelude.Generic)

-- |
-- Create a value of 'UpdateDimension' 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', 'updateDimension_name' - A unique identifier for the dimension. Choose something that describes
-- the type and value to make it easy to remember what it does.
--
-- 'stringValues', 'updateDimension_stringValues' - Specifies the value or list of values for the dimension. For
-- @TOPIC_FILTER@ dimensions, this is a pattern used to match the MQTT
-- topic (for example, \"admin\/#\").
newUpdateDimension ::
  -- | 'name'
  Prelude.Text ->
  -- | 'stringValues'
  Prelude.NonEmpty Prelude.Text ->
  UpdateDimension
newUpdateDimension :: Text -> NonEmpty Text -> UpdateDimension
newUpdateDimension Text
pName_ NonEmpty Text
pStringValues_ =
  UpdateDimension' :: Text -> NonEmpty Text -> UpdateDimension
UpdateDimension'
    { $sel:name:UpdateDimension' :: Text
name = Text
pName_,
      $sel:stringValues:UpdateDimension' :: NonEmpty Text
stringValues = Tagged (NonEmpty Text) (Identity (NonEmpty Text))
-> Tagged (NonEmpty Text) (Identity (NonEmpty Text))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced (Tagged (NonEmpty Text) (Identity (NonEmpty Text))
 -> Tagged (NonEmpty Text) (Identity (NonEmpty Text)))
-> NonEmpty Text -> NonEmpty Text
forall t b. AReview t b -> b -> t
Lens.# NonEmpty Text
pStringValues_
    }

-- | A unique identifier for the dimension. Choose something that describes
-- the type and value to make it easy to remember what it does.
updateDimension_name :: Lens.Lens' UpdateDimension Prelude.Text
updateDimension_name :: (Text -> f Text) -> UpdateDimension -> f UpdateDimension
updateDimension_name = (UpdateDimension -> Text)
-> (UpdateDimension -> Text -> UpdateDimension)
-> Lens UpdateDimension UpdateDimension Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDimension' {Text
name :: Text
$sel:name:UpdateDimension' :: UpdateDimension -> Text
name} -> Text
name) (\s :: UpdateDimension
s@UpdateDimension' {} Text
a -> UpdateDimension
s {$sel:name:UpdateDimension' :: Text
name = Text
a} :: UpdateDimension)

-- | Specifies the value or list of values for the dimension. For
-- @TOPIC_FILTER@ dimensions, this is a pattern used to match the MQTT
-- topic (for example, \"admin\/#\").
updateDimension_stringValues :: Lens.Lens' UpdateDimension (Prelude.NonEmpty Prelude.Text)
updateDimension_stringValues :: (NonEmpty Text -> f (NonEmpty Text))
-> UpdateDimension -> f UpdateDimension
updateDimension_stringValues = (UpdateDimension -> NonEmpty Text)
-> (UpdateDimension -> NonEmpty Text -> UpdateDimension)
-> Lens
     UpdateDimension UpdateDimension (NonEmpty Text) (NonEmpty Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDimension' {NonEmpty Text
stringValues :: NonEmpty Text
$sel:stringValues:UpdateDimension' :: UpdateDimension -> NonEmpty Text
stringValues} -> NonEmpty Text
stringValues) (\s :: UpdateDimension
s@UpdateDimension' {} NonEmpty Text
a -> UpdateDimension
s {$sel:stringValues:UpdateDimension' :: NonEmpty Text
stringValues = NonEmpty Text
a} :: UpdateDimension) ((NonEmpty Text -> f (NonEmpty Text))
 -> UpdateDimension -> f UpdateDimension)
-> ((NonEmpty Text -> f (NonEmpty Text))
    -> NonEmpty Text -> f (NonEmpty Text))
-> (NonEmpty Text -> f (NonEmpty Text))
-> UpdateDimension
-> f UpdateDimension
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (NonEmpty Text -> f (NonEmpty Text))
-> NonEmpty Text -> f (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.AWSRequest UpdateDimension where
  type
    AWSResponse UpdateDimension =
      UpdateDimensionResponse
  request :: UpdateDimension -> Request UpdateDimension
request = Service -> UpdateDimension -> Request UpdateDimension
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.patchJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateDimension
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateDimension)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateDimension))
-> Logger
-> Service
-> Proxy UpdateDimension
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateDimension)))
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
-> UpdateDimensionResponse
UpdateDimensionResponse'
            (Maybe POSIX
 -> Maybe Text
 -> Maybe (NonEmpty Text)
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe DimensionType
 -> Int
 -> UpdateDimensionResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe (NonEmpty Text)
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe DimensionType
      -> Int
      -> UpdateDimensionResponse)
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
   -> UpdateDimensionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe (NonEmpty Text)
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe DimensionType
      -> Int
      -> UpdateDimensionResponse)
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
   -> UpdateDimensionResponse)
-> Either String (Maybe (NonEmpty Text))
-> Either
     String
     (Maybe Text
      -> Maybe POSIX
      -> Maybe DimensionType
      -> Int
      -> UpdateDimensionResponse)
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
   -> UpdateDimensionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe POSIX
      -> Maybe DimensionType -> Int -> UpdateDimensionResponse)
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 -> UpdateDimensionResponse)
-> Either String (Maybe POSIX)
-> Either
     String (Maybe DimensionType -> Int -> UpdateDimensionResponse)
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 -> UpdateDimensionResponse)
-> Either String (Maybe DimensionType)
-> Either String (Int -> UpdateDimensionResponse)
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 -> UpdateDimensionResponse)
-> Either String Int -> Either String UpdateDimensionResponse
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 UpdateDimension

instance Prelude.NFData UpdateDimension

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

instance Core.ToJSON UpdateDimension where
  toJSON :: UpdateDimension -> Value
toJSON UpdateDimension' {NonEmpty Text
Text
stringValues :: NonEmpty Text
name :: Text
$sel:stringValues:UpdateDimension' :: UpdateDimension -> NonEmpty Text
$sel:name:UpdateDimension' :: UpdateDimension -> 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
"stringValues" Text -> NonEmpty Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= NonEmpty Text
stringValues)]
      )

instance Core.ToPath UpdateDimension where
  toPath :: UpdateDimension -> ByteString
toPath UpdateDimension' {NonEmpty Text
Text
stringValues :: NonEmpty Text
name :: Text
$sel:stringValues:UpdateDimension' :: UpdateDimension -> NonEmpty Text
$sel:name:UpdateDimension' :: UpdateDimension -> 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 UpdateDimension where
  toQuery :: UpdateDimension -> QueryString
toQuery = QueryString -> UpdateDimension -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newUpdateDimensionResponse' smart constructor.
data UpdateDimensionResponse = UpdateDimensionResponse'
  { -- | The date and time, in milliseconds since epoch, when the dimension was
    -- most recently updated.
    UpdateDimensionResponse -> Maybe POSIX
lastModifiedDate :: Prelude.Maybe Core.POSIX,
    -- | The Amazon Resource Name (ARN)of the created dimension.
    UpdateDimensionResponse -> 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.
    UpdateDimensionResponse -> Maybe (NonEmpty Text)
stringValues :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
    -- | A unique identifier for the dimension.
    UpdateDimensionResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The date and time, in milliseconds since epoch, when the dimension was
    -- initially created.
    UpdateDimensionResponse -> Maybe POSIX
creationDate :: Prelude.Maybe Core.POSIX,
    -- | The type of the dimension.
    UpdateDimensionResponse -> Maybe DimensionType
type' :: Prelude.Maybe DimensionType,
    -- | The response's http status code.
    UpdateDimensionResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateDimensionResponse -> UpdateDimensionResponse -> Bool
(UpdateDimensionResponse -> UpdateDimensionResponse -> Bool)
-> (UpdateDimensionResponse -> UpdateDimensionResponse -> Bool)
-> Eq UpdateDimensionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateDimensionResponse -> UpdateDimensionResponse -> Bool
$c/= :: UpdateDimensionResponse -> UpdateDimensionResponse -> Bool
== :: UpdateDimensionResponse -> UpdateDimensionResponse -> Bool
$c== :: UpdateDimensionResponse -> UpdateDimensionResponse -> Bool
Prelude.Eq, ReadPrec [UpdateDimensionResponse]
ReadPrec UpdateDimensionResponse
Int -> ReadS UpdateDimensionResponse
ReadS [UpdateDimensionResponse]
(Int -> ReadS UpdateDimensionResponse)
-> ReadS [UpdateDimensionResponse]
-> ReadPrec UpdateDimensionResponse
-> ReadPrec [UpdateDimensionResponse]
-> Read UpdateDimensionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateDimensionResponse]
$creadListPrec :: ReadPrec [UpdateDimensionResponse]
readPrec :: ReadPrec UpdateDimensionResponse
$creadPrec :: ReadPrec UpdateDimensionResponse
readList :: ReadS [UpdateDimensionResponse]
$creadList :: ReadS [UpdateDimensionResponse]
readsPrec :: Int -> ReadS UpdateDimensionResponse
$creadsPrec :: Int -> ReadS UpdateDimensionResponse
Prelude.Read, Int -> UpdateDimensionResponse -> ShowS
[UpdateDimensionResponse] -> ShowS
UpdateDimensionResponse -> String
(Int -> UpdateDimensionResponse -> ShowS)
-> (UpdateDimensionResponse -> String)
-> ([UpdateDimensionResponse] -> ShowS)
-> Show UpdateDimensionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateDimensionResponse] -> ShowS
$cshowList :: [UpdateDimensionResponse] -> ShowS
show :: UpdateDimensionResponse -> String
$cshow :: UpdateDimensionResponse -> String
showsPrec :: Int -> UpdateDimensionResponse -> ShowS
$cshowsPrec :: Int -> UpdateDimensionResponse -> ShowS
Prelude.Show, (forall x.
 UpdateDimensionResponse -> Rep UpdateDimensionResponse x)
-> (forall x.
    Rep UpdateDimensionResponse x -> UpdateDimensionResponse)
-> Generic UpdateDimensionResponse
forall x. Rep UpdateDimensionResponse x -> UpdateDimensionResponse
forall x. UpdateDimensionResponse -> Rep UpdateDimensionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateDimensionResponse x -> UpdateDimensionResponse
$cfrom :: forall x. UpdateDimensionResponse -> Rep UpdateDimensionResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateDimensionResponse' 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', 'updateDimensionResponse_lastModifiedDate' - The date and time, in milliseconds since epoch, when the dimension was
-- most recently updated.
--
-- 'arn', 'updateDimensionResponse_arn' - The Amazon Resource Name (ARN)of the created dimension.
--
-- 'stringValues', 'updateDimensionResponse_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', 'updateDimensionResponse_name' - A unique identifier for the dimension.
--
-- 'creationDate', 'updateDimensionResponse_creationDate' - The date and time, in milliseconds since epoch, when the dimension was
-- initially created.
--
-- 'type'', 'updateDimensionResponse_type' - The type of the dimension.
--
-- 'httpStatus', 'updateDimensionResponse_httpStatus' - The response's http status code.
newUpdateDimensionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateDimensionResponse
newUpdateDimensionResponse :: Int -> UpdateDimensionResponse
newUpdateDimensionResponse Int
pHttpStatus_ =
  UpdateDimensionResponse' :: Maybe POSIX
-> Maybe Text
-> Maybe (NonEmpty Text)
-> Maybe Text
-> Maybe POSIX
-> Maybe DimensionType
-> Int
-> UpdateDimensionResponse
UpdateDimensionResponse'
    { $sel:lastModifiedDate:UpdateDimensionResponse' :: Maybe POSIX
lastModifiedDate =
        Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:UpdateDimensionResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:stringValues:UpdateDimensionResponse' :: Maybe (NonEmpty Text)
stringValues = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:name:UpdateDimensionResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:creationDate:UpdateDimensionResponse' :: Maybe POSIX
creationDate = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:type':UpdateDimensionResponse' :: Maybe DimensionType
type' = Maybe DimensionType
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateDimensionResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The date and time, in milliseconds since epoch, when the dimension was
-- most recently updated.
updateDimensionResponse_lastModifiedDate :: Lens.Lens' UpdateDimensionResponse (Prelude.Maybe Prelude.UTCTime)
updateDimensionResponse_lastModifiedDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> UpdateDimensionResponse -> f UpdateDimensionResponse
updateDimensionResponse_lastModifiedDate = (UpdateDimensionResponse -> Maybe POSIX)
-> (UpdateDimensionResponse
    -> Maybe POSIX -> UpdateDimensionResponse)
-> Lens
     UpdateDimensionResponse
     UpdateDimensionResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDimensionResponse' {Maybe POSIX
lastModifiedDate :: Maybe POSIX
$sel:lastModifiedDate:UpdateDimensionResponse' :: UpdateDimensionResponse -> Maybe POSIX
lastModifiedDate} -> Maybe POSIX
lastModifiedDate) (\s :: UpdateDimensionResponse
s@UpdateDimensionResponse' {} Maybe POSIX
a -> UpdateDimensionResponse
s {$sel:lastModifiedDate:UpdateDimensionResponse' :: Maybe POSIX
lastModifiedDate = Maybe POSIX
a} :: UpdateDimensionResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> UpdateDimensionResponse -> f UpdateDimensionResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> UpdateDimensionResponse
-> f UpdateDimensionResponse
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 created dimension.
updateDimensionResponse_arn :: Lens.Lens' UpdateDimensionResponse (Prelude.Maybe Prelude.Text)
updateDimensionResponse_arn :: (Maybe Text -> f (Maybe Text))
-> UpdateDimensionResponse -> f UpdateDimensionResponse
updateDimensionResponse_arn = (UpdateDimensionResponse -> Maybe Text)
-> (UpdateDimensionResponse
    -> Maybe Text -> UpdateDimensionResponse)
-> Lens
     UpdateDimensionResponse
     UpdateDimensionResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDimensionResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:UpdateDimensionResponse' :: UpdateDimensionResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: UpdateDimensionResponse
s@UpdateDimensionResponse' {} Maybe Text
a -> UpdateDimensionResponse
s {$sel:arn:UpdateDimensionResponse' :: Maybe Text
arn = Maybe Text
a} :: UpdateDimensionResponse)

-- | 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.
updateDimensionResponse_stringValues :: Lens.Lens' UpdateDimensionResponse (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
updateDimensionResponse_stringValues :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> UpdateDimensionResponse -> f UpdateDimensionResponse
updateDimensionResponse_stringValues = (UpdateDimensionResponse -> Maybe (NonEmpty Text))
-> (UpdateDimensionResponse
    -> Maybe (NonEmpty Text) -> UpdateDimensionResponse)
-> Lens
     UpdateDimensionResponse
     UpdateDimensionResponse
     (Maybe (NonEmpty Text))
     (Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDimensionResponse' {Maybe (NonEmpty Text)
stringValues :: Maybe (NonEmpty Text)
$sel:stringValues:UpdateDimensionResponse' :: UpdateDimensionResponse -> Maybe (NonEmpty Text)
stringValues} -> Maybe (NonEmpty Text)
stringValues) (\s :: UpdateDimensionResponse
s@UpdateDimensionResponse' {} Maybe (NonEmpty Text)
a -> UpdateDimensionResponse
s {$sel:stringValues:UpdateDimensionResponse' :: Maybe (NonEmpty Text)
stringValues = Maybe (NonEmpty Text)
a} :: UpdateDimensionResponse) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
 -> UpdateDimensionResponse -> f UpdateDimensionResponse)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
    -> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> UpdateDimensionResponse
-> f UpdateDimensionResponse
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

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

-- | The date and time, in milliseconds since epoch, when the dimension was
-- initially created.
updateDimensionResponse_creationDate :: Lens.Lens' UpdateDimensionResponse (Prelude.Maybe Prelude.UTCTime)
updateDimensionResponse_creationDate :: (Maybe UTCTime -> f (Maybe UTCTime))
-> UpdateDimensionResponse -> f UpdateDimensionResponse
updateDimensionResponse_creationDate = (UpdateDimensionResponse -> Maybe POSIX)
-> (UpdateDimensionResponse
    -> Maybe POSIX -> UpdateDimensionResponse)
-> Lens
     UpdateDimensionResponse
     UpdateDimensionResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDimensionResponse' {Maybe POSIX
creationDate :: Maybe POSIX
$sel:creationDate:UpdateDimensionResponse' :: UpdateDimensionResponse -> Maybe POSIX
creationDate} -> Maybe POSIX
creationDate) (\s :: UpdateDimensionResponse
s@UpdateDimensionResponse' {} Maybe POSIX
a -> UpdateDimensionResponse
s {$sel:creationDate:UpdateDimensionResponse' :: Maybe POSIX
creationDate = Maybe POSIX
a} :: UpdateDimensionResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> UpdateDimensionResponse -> f UpdateDimensionResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> UpdateDimensionResponse
-> f UpdateDimensionResponse
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.
updateDimensionResponse_type :: Lens.Lens' UpdateDimensionResponse (Prelude.Maybe DimensionType)
updateDimensionResponse_type :: (Maybe DimensionType -> f (Maybe DimensionType))
-> UpdateDimensionResponse -> f UpdateDimensionResponse
updateDimensionResponse_type = (UpdateDimensionResponse -> Maybe DimensionType)
-> (UpdateDimensionResponse
    -> Maybe DimensionType -> UpdateDimensionResponse)
-> Lens
     UpdateDimensionResponse
     UpdateDimensionResponse
     (Maybe DimensionType)
     (Maybe DimensionType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDimensionResponse' {Maybe DimensionType
type' :: Maybe DimensionType
$sel:type':UpdateDimensionResponse' :: UpdateDimensionResponse -> Maybe DimensionType
type'} -> Maybe DimensionType
type') (\s :: UpdateDimensionResponse
s@UpdateDimensionResponse' {} Maybe DimensionType
a -> UpdateDimensionResponse
s {$sel:type':UpdateDimensionResponse' :: Maybe DimensionType
type' = Maybe DimensionType
a} :: UpdateDimensionResponse)

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

instance Prelude.NFData UpdateDimensionResponse