{-# 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.QuickSight.UpdateDashboard
-- 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 a dashboard in an Amazon Web Services account.
--
-- Updating a Dashboard creates a new dashboard version but does not
-- immediately publish the new version. You can update the published
-- version of a dashboard by using the UpdateDashboardPublishedVersion API
-- operation.
module Amazonka.QuickSight.UpdateDashboard
  ( -- * Creating a Request
    UpdateDashboard (..),
    newUpdateDashboard,

    -- * Request Lenses
    updateDashboard_themeArn,
    updateDashboard_dashboardPublishOptions,
    updateDashboard_versionDescription,
    updateDashboard_parameters,
    updateDashboard_awsAccountId,
    updateDashboard_dashboardId,
    updateDashboard_name,
    updateDashboard_sourceEntity,

    -- * Destructuring the Response
    UpdateDashboardResponse (..),
    newUpdateDashboardResponse,

    -- * Response Lenses
    updateDashboardResponse_requestId,
    updateDashboardResponse_status,
    updateDashboardResponse_arn,
    updateDashboardResponse_creationStatus,
    updateDashboardResponse_dashboardId,
    updateDashboardResponse_versionArn,
    updateDashboardResponse_httpStatus,
  )
where

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

-- | /See:/ 'newUpdateDashboard' smart constructor.
data UpdateDashboard = UpdateDashboard'
  { -- | The Amazon Resource Name (ARN) of the theme that is being used for this
    -- dashboard. If you add a value for this field, it overrides the value
    -- that was originally associated with the entity. The theme ARN must exist
    -- in the same Amazon Web Services account where you create the dashboard.
    UpdateDashboard -> Maybe Text
themeArn :: Prelude.Maybe Prelude.Text,
    -- | Options for publishing the dashboard when you create it:
    --
    -- -   @AvailabilityStatus@ for @AdHocFilteringOption@ - This status can be
    --     either @ENABLED@ or @DISABLED@. When this is set to @DISABLED@,
    --     Amazon QuickSight disables the left filter pane on the published
    --     dashboard, which can be used for ad hoc (one-time) filtering. This
    --     option is @ENABLED@ by default.
    --
    -- -   @AvailabilityStatus@ for @ExportToCSVOption@ - This status can be
    --     either @ENABLED@ or @DISABLED@. The visual option to export data to
    --     .CSV format isn\'t enabled when this is set to @DISABLED@. This
    --     option is @ENABLED@ by default.
    --
    -- -   @VisibilityState@ for @SheetControlsOption@ - This visibility state
    --     can be either @COLLAPSED@ or @EXPANDED@. This option is @COLLAPSED@
    --     by default.
    UpdateDashboard -> Maybe DashboardPublishOptions
dashboardPublishOptions :: Prelude.Maybe DashboardPublishOptions,
    -- | A description for the first version of the dashboard being created.
    UpdateDashboard -> Maybe Text
versionDescription :: Prelude.Maybe Prelude.Text,
    -- | A structure that contains the parameters of the dashboard. These are
    -- parameter overrides for a dashboard. A dashboard can have any type of
    -- parameters, and some parameters might accept multiple values.
    UpdateDashboard -> Maybe Parameters
parameters :: Prelude.Maybe Parameters,
    -- | The ID of the Amazon Web Services account that contains the dashboard
    -- that you\'re updating.
    UpdateDashboard -> Text
awsAccountId :: Prelude.Text,
    -- | The ID for the dashboard.
    UpdateDashboard -> Text
dashboardId :: Prelude.Text,
    -- | The display name of the dashboard.
    UpdateDashboard -> Text
name :: Prelude.Text,
    -- | The entity that you are using as a source when you update the dashboard.
    -- In @SourceEntity@, you specify the type of object you\'re using as
    -- source. You can only update a dashboard from a template, so you use a
    -- @SourceTemplate@ entity. If you need to update a dashboard from an
    -- analysis, first convert the analysis to a template by using the
    -- CreateTemplate API operation. For @SourceTemplate@, specify the Amazon
    -- Resource Name (ARN) of the source template. The @SourceTemplate@ ARN can
    -- contain any Amazon Web Services account and any Amazon
    -- QuickSight-supported Amazon Web Services Region.
    --
    -- Use the @DataSetReferences@ entity within @SourceTemplate@ to list the
    -- replacement datasets for the placeholders listed in the original. The
    -- schema in each dataset must match its placeholder.
    UpdateDashboard -> DashboardSourceEntity
sourceEntity :: DashboardSourceEntity
  }
  deriving (UpdateDashboard -> UpdateDashboard -> Bool
(UpdateDashboard -> UpdateDashboard -> Bool)
-> (UpdateDashboard -> UpdateDashboard -> Bool)
-> Eq UpdateDashboard
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateDashboard -> UpdateDashboard -> Bool
$c/= :: UpdateDashboard -> UpdateDashboard -> Bool
== :: UpdateDashboard -> UpdateDashboard -> Bool
$c== :: UpdateDashboard -> UpdateDashboard -> Bool
Prelude.Eq, ReadPrec [UpdateDashboard]
ReadPrec UpdateDashboard
Int -> ReadS UpdateDashboard
ReadS [UpdateDashboard]
(Int -> ReadS UpdateDashboard)
-> ReadS [UpdateDashboard]
-> ReadPrec UpdateDashboard
-> ReadPrec [UpdateDashboard]
-> Read UpdateDashboard
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateDashboard]
$creadListPrec :: ReadPrec [UpdateDashboard]
readPrec :: ReadPrec UpdateDashboard
$creadPrec :: ReadPrec UpdateDashboard
readList :: ReadS [UpdateDashboard]
$creadList :: ReadS [UpdateDashboard]
readsPrec :: Int -> ReadS UpdateDashboard
$creadsPrec :: Int -> ReadS UpdateDashboard
Prelude.Read, Int -> UpdateDashboard -> ShowS
[UpdateDashboard] -> ShowS
UpdateDashboard -> String
(Int -> UpdateDashboard -> ShowS)
-> (UpdateDashboard -> String)
-> ([UpdateDashboard] -> ShowS)
-> Show UpdateDashboard
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateDashboard] -> ShowS
$cshowList :: [UpdateDashboard] -> ShowS
show :: UpdateDashboard -> String
$cshow :: UpdateDashboard -> String
showsPrec :: Int -> UpdateDashboard -> ShowS
$cshowsPrec :: Int -> UpdateDashboard -> ShowS
Prelude.Show, (forall x. UpdateDashboard -> Rep UpdateDashboard x)
-> (forall x. Rep UpdateDashboard x -> UpdateDashboard)
-> Generic UpdateDashboard
forall x. Rep UpdateDashboard x -> UpdateDashboard
forall x. UpdateDashboard -> Rep UpdateDashboard x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateDashboard x -> UpdateDashboard
$cfrom :: forall x. UpdateDashboard -> Rep UpdateDashboard x
Prelude.Generic)

-- |
-- Create a value of 'UpdateDashboard' 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:
--
-- 'themeArn', 'updateDashboard_themeArn' - The Amazon Resource Name (ARN) of the theme that is being used for this
-- dashboard. If you add a value for this field, it overrides the value
-- that was originally associated with the entity. The theme ARN must exist
-- in the same Amazon Web Services account where you create the dashboard.
--
-- 'dashboardPublishOptions', 'updateDashboard_dashboardPublishOptions' - Options for publishing the dashboard when you create it:
--
-- -   @AvailabilityStatus@ for @AdHocFilteringOption@ - This status can be
--     either @ENABLED@ or @DISABLED@. When this is set to @DISABLED@,
--     Amazon QuickSight disables the left filter pane on the published
--     dashboard, which can be used for ad hoc (one-time) filtering. This
--     option is @ENABLED@ by default.
--
-- -   @AvailabilityStatus@ for @ExportToCSVOption@ - This status can be
--     either @ENABLED@ or @DISABLED@. The visual option to export data to
--     .CSV format isn\'t enabled when this is set to @DISABLED@. This
--     option is @ENABLED@ by default.
--
-- -   @VisibilityState@ for @SheetControlsOption@ - This visibility state
--     can be either @COLLAPSED@ or @EXPANDED@. This option is @COLLAPSED@
--     by default.
--
-- 'versionDescription', 'updateDashboard_versionDescription' - A description for the first version of the dashboard being created.
--
-- 'parameters', 'updateDashboard_parameters' - A structure that contains the parameters of the dashboard. These are
-- parameter overrides for a dashboard. A dashboard can have any type of
-- parameters, and some parameters might accept multiple values.
--
-- 'awsAccountId', 'updateDashboard_awsAccountId' - The ID of the Amazon Web Services account that contains the dashboard
-- that you\'re updating.
--
-- 'dashboardId', 'updateDashboard_dashboardId' - The ID for the dashboard.
--
-- 'name', 'updateDashboard_name' - The display name of the dashboard.
--
-- 'sourceEntity', 'updateDashboard_sourceEntity' - The entity that you are using as a source when you update the dashboard.
-- In @SourceEntity@, you specify the type of object you\'re using as
-- source. You can only update a dashboard from a template, so you use a
-- @SourceTemplate@ entity. If you need to update a dashboard from an
-- analysis, first convert the analysis to a template by using the
-- CreateTemplate API operation. For @SourceTemplate@, specify the Amazon
-- Resource Name (ARN) of the source template. The @SourceTemplate@ ARN can
-- contain any Amazon Web Services account and any Amazon
-- QuickSight-supported Amazon Web Services Region.
--
-- Use the @DataSetReferences@ entity within @SourceTemplate@ to list the
-- replacement datasets for the placeholders listed in the original. The
-- schema in each dataset must match its placeholder.
newUpdateDashboard ::
  -- | 'awsAccountId'
  Prelude.Text ->
  -- | 'dashboardId'
  Prelude.Text ->
  -- | 'name'
  Prelude.Text ->
  -- | 'sourceEntity'
  DashboardSourceEntity ->
  UpdateDashboard
newUpdateDashboard :: Text -> Text -> Text -> DashboardSourceEntity -> UpdateDashboard
newUpdateDashboard
  Text
pAwsAccountId_
  Text
pDashboardId_
  Text
pName_
  DashboardSourceEntity
pSourceEntity_ =
    UpdateDashboard' :: Maybe Text
-> Maybe DashboardPublishOptions
-> Maybe Text
-> Maybe Parameters
-> Text
-> Text
-> Text
-> DashboardSourceEntity
-> UpdateDashboard
UpdateDashboard'
      { $sel:themeArn:UpdateDashboard' :: Maybe Text
themeArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:dashboardPublishOptions:UpdateDashboard' :: Maybe DashboardPublishOptions
dashboardPublishOptions = Maybe DashboardPublishOptions
forall a. Maybe a
Prelude.Nothing,
        $sel:versionDescription:UpdateDashboard' :: Maybe Text
versionDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:parameters:UpdateDashboard' :: Maybe Parameters
parameters = Maybe Parameters
forall a. Maybe a
Prelude.Nothing,
        $sel:awsAccountId:UpdateDashboard' :: Text
awsAccountId = Text
pAwsAccountId_,
        $sel:dashboardId:UpdateDashboard' :: Text
dashboardId = Text
pDashboardId_,
        $sel:name:UpdateDashboard' :: Text
name = Text
pName_,
        $sel:sourceEntity:UpdateDashboard' :: DashboardSourceEntity
sourceEntity = DashboardSourceEntity
pSourceEntity_
      }

-- | The Amazon Resource Name (ARN) of the theme that is being used for this
-- dashboard. If you add a value for this field, it overrides the value
-- that was originally associated with the entity. The theme ARN must exist
-- in the same Amazon Web Services account where you create the dashboard.
updateDashboard_themeArn :: Lens.Lens' UpdateDashboard (Prelude.Maybe Prelude.Text)
updateDashboard_themeArn :: (Maybe Text -> f (Maybe Text))
-> UpdateDashboard -> f UpdateDashboard
updateDashboard_themeArn = (UpdateDashboard -> Maybe Text)
-> (UpdateDashboard -> Maybe Text -> UpdateDashboard)
-> Lens UpdateDashboard UpdateDashboard (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDashboard' {Maybe Text
themeArn :: Maybe Text
$sel:themeArn:UpdateDashboard' :: UpdateDashboard -> Maybe Text
themeArn} -> Maybe Text
themeArn) (\s :: UpdateDashboard
s@UpdateDashboard' {} Maybe Text
a -> UpdateDashboard
s {$sel:themeArn:UpdateDashboard' :: Maybe Text
themeArn = Maybe Text
a} :: UpdateDashboard)

-- | Options for publishing the dashboard when you create it:
--
-- -   @AvailabilityStatus@ for @AdHocFilteringOption@ - This status can be
--     either @ENABLED@ or @DISABLED@. When this is set to @DISABLED@,
--     Amazon QuickSight disables the left filter pane on the published
--     dashboard, which can be used for ad hoc (one-time) filtering. This
--     option is @ENABLED@ by default.
--
-- -   @AvailabilityStatus@ for @ExportToCSVOption@ - This status can be
--     either @ENABLED@ or @DISABLED@. The visual option to export data to
--     .CSV format isn\'t enabled when this is set to @DISABLED@. This
--     option is @ENABLED@ by default.
--
-- -   @VisibilityState@ for @SheetControlsOption@ - This visibility state
--     can be either @COLLAPSED@ or @EXPANDED@. This option is @COLLAPSED@
--     by default.
updateDashboard_dashboardPublishOptions :: Lens.Lens' UpdateDashboard (Prelude.Maybe DashboardPublishOptions)
updateDashboard_dashboardPublishOptions :: (Maybe DashboardPublishOptions
 -> f (Maybe DashboardPublishOptions))
-> UpdateDashboard -> f UpdateDashboard
updateDashboard_dashboardPublishOptions = (UpdateDashboard -> Maybe DashboardPublishOptions)
-> (UpdateDashboard
    -> Maybe DashboardPublishOptions -> UpdateDashboard)
-> Lens
     UpdateDashboard
     UpdateDashboard
     (Maybe DashboardPublishOptions)
     (Maybe DashboardPublishOptions)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDashboard' {Maybe DashboardPublishOptions
dashboardPublishOptions :: Maybe DashboardPublishOptions
$sel:dashboardPublishOptions:UpdateDashboard' :: UpdateDashboard -> Maybe DashboardPublishOptions
dashboardPublishOptions} -> Maybe DashboardPublishOptions
dashboardPublishOptions) (\s :: UpdateDashboard
s@UpdateDashboard' {} Maybe DashboardPublishOptions
a -> UpdateDashboard
s {$sel:dashboardPublishOptions:UpdateDashboard' :: Maybe DashboardPublishOptions
dashboardPublishOptions = Maybe DashboardPublishOptions
a} :: UpdateDashboard)

-- | A description for the first version of the dashboard being created.
updateDashboard_versionDescription :: Lens.Lens' UpdateDashboard (Prelude.Maybe Prelude.Text)
updateDashboard_versionDescription :: (Maybe Text -> f (Maybe Text))
-> UpdateDashboard -> f UpdateDashboard
updateDashboard_versionDescription = (UpdateDashboard -> Maybe Text)
-> (UpdateDashboard -> Maybe Text -> UpdateDashboard)
-> Lens UpdateDashboard UpdateDashboard (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDashboard' {Maybe Text
versionDescription :: Maybe Text
$sel:versionDescription:UpdateDashboard' :: UpdateDashboard -> Maybe Text
versionDescription} -> Maybe Text
versionDescription) (\s :: UpdateDashboard
s@UpdateDashboard' {} Maybe Text
a -> UpdateDashboard
s {$sel:versionDescription:UpdateDashboard' :: Maybe Text
versionDescription = Maybe Text
a} :: UpdateDashboard)

-- | A structure that contains the parameters of the dashboard. These are
-- parameter overrides for a dashboard. A dashboard can have any type of
-- parameters, and some parameters might accept multiple values.
updateDashboard_parameters :: Lens.Lens' UpdateDashboard (Prelude.Maybe Parameters)
updateDashboard_parameters :: (Maybe Parameters -> f (Maybe Parameters))
-> UpdateDashboard -> f UpdateDashboard
updateDashboard_parameters = (UpdateDashboard -> Maybe Parameters)
-> (UpdateDashboard -> Maybe Parameters -> UpdateDashboard)
-> Lens
     UpdateDashboard
     UpdateDashboard
     (Maybe Parameters)
     (Maybe Parameters)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDashboard' {Maybe Parameters
parameters :: Maybe Parameters
$sel:parameters:UpdateDashboard' :: UpdateDashboard -> Maybe Parameters
parameters} -> Maybe Parameters
parameters) (\s :: UpdateDashboard
s@UpdateDashboard' {} Maybe Parameters
a -> UpdateDashboard
s {$sel:parameters:UpdateDashboard' :: Maybe Parameters
parameters = Maybe Parameters
a} :: UpdateDashboard)

-- | The ID of the Amazon Web Services account that contains the dashboard
-- that you\'re updating.
updateDashboard_awsAccountId :: Lens.Lens' UpdateDashboard Prelude.Text
updateDashboard_awsAccountId :: (Text -> f Text) -> UpdateDashboard -> f UpdateDashboard
updateDashboard_awsAccountId = (UpdateDashboard -> Text)
-> (UpdateDashboard -> Text -> UpdateDashboard)
-> Lens UpdateDashboard UpdateDashboard Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDashboard' {Text
awsAccountId :: Text
$sel:awsAccountId:UpdateDashboard' :: UpdateDashboard -> Text
awsAccountId} -> Text
awsAccountId) (\s :: UpdateDashboard
s@UpdateDashboard' {} Text
a -> UpdateDashboard
s {$sel:awsAccountId:UpdateDashboard' :: Text
awsAccountId = Text
a} :: UpdateDashboard)

-- | The ID for the dashboard.
updateDashboard_dashboardId :: Lens.Lens' UpdateDashboard Prelude.Text
updateDashboard_dashboardId :: (Text -> f Text) -> UpdateDashboard -> f UpdateDashboard
updateDashboard_dashboardId = (UpdateDashboard -> Text)
-> (UpdateDashboard -> Text -> UpdateDashboard)
-> Lens UpdateDashboard UpdateDashboard Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDashboard' {Text
dashboardId :: Text
$sel:dashboardId:UpdateDashboard' :: UpdateDashboard -> Text
dashboardId} -> Text
dashboardId) (\s :: UpdateDashboard
s@UpdateDashboard' {} Text
a -> UpdateDashboard
s {$sel:dashboardId:UpdateDashboard' :: Text
dashboardId = Text
a} :: UpdateDashboard)

-- | The display name of the dashboard.
updateDashboard_name :: Lens.Lens' UpdateDashboard Prelude.Text
updateDashboard_name :: (Text -> f Text) -> UpdateDashboard -> f UpdateDashboard
updateDashboard_name = (UpdateDashboard -> Text)
-> (UpdateDashboard -> Text -> UpdateDashboard)
-> Lens UpdateDashboard UpdateDashboard Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDashboard' {Text
name :: Text
$sel:name:UpdateDashboard' :: UpdateDashboard -> Text
name} -> Text
name) (\s :: UpdateDashboard
s@UpdateDashboard' {} Text
a -> UpdateDashboard
s {$sel:name:UpdateDashboard' :: Text
name = Text
a} :: UpdateDashboard)

-- | The entity that you are using as a source when you update the dashboard.
-- In @SourceEntity@, you specify the type of object you\'re using as
-- source. You can only update a dashboard from a template, so you use a
-- @SourceTemplate@ entity. If you need to update a dashboard from an
-- analysis, first convert the analysis to a template by using the
-- CreateTemplate API operation. For @SourceTemplate@, specify the Amazon
-- Resource Name (ARN) of the source template. The @SourceTemplate@ ARN can
-- contain any Amazon Web Services account and any Amazon
-- QuickSight-supported Amazon Web Services Region.
--
-- Use the @DataSetReferences@ entity within @SourceTemplate@ to list the
-- replacement datasets for the placeholders listed in the original. The
-- schema in each dataset must match its placeholder.
updateDashboard_sourceEntity :: Lens.Lens' UpdateDashboard DashboardSourceEntity
updateDashboard_sourceEntity :: (DashboardSourceEntity -> f DashboardSourceEntity)
-> UpdateDashboard -> f UpdateDashboard
updateDashboard_sourceEntity = (UpdateDashboard -> DashboardSourceEntity)
-> (UpdateDashboard -> DashboardSourceEntity -> UpdateDashboard)
-> Lens
     UpdateDashboard
     UpdateDashboard
     DashboardSourceEntity
     DashboardSourceEntity
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDashboard' {DashboardSourceEntity
sourceEntity :: DashboardSourceEntity
$sel:sourceEntity:UpdateDashboard' :: UpdateDashboard -> DashboardSourceEntity
sourceEntity} -> DashboardSourceEntity
sourceEntity) (\s :: UpdateDashboard
s@UpdateDashboard' {} DashboardSourceEntity
a -> UpdateDashboard
s {$sel:sourceEntity:UpdateDashboard' :: DashboardSourceEntity
sourceEntity = DashboardSourceEntity
a} :: UpdateDashboard)

instance Core.AWSRequest UpdateDashboard where
  type
    AWSResponse UpdateDashboard =
      UpdateDashboardResponse
  request :: UpdateDashboard -> Request UpdateDashboard
request = Service -> UpdateDashboard -> Request UpdateDashboard
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateDashboard
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateDashboard)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateDashboard))
-> Logger
-> Service
-> Proxy UpdateDashboard
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateDashboard)))
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 Text
-> Maybe Int
-> Maybe Text
-> Maybe ResourceStatus
-> Maybe Text
-> Maybe Text
-> Int
-> UpdateDashboardResponse
UpdateDashboardResponse'
            (Maybe Text
 -> Maybe Int
 -> Maybe Text
 -> Maybe ResourceStatus
 -> Maybe Text
 -> Maybe Text
 -> Int
 -> UpdateDashboardResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Int
      -> Maybe Text
      -> Maybe ResourceStatus
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> UpdateDashboardResponse)
forall (f :: * -> *) a b. Functor 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
"RequestId")
            Either
  String
  (Maybe Int
   -> Maybe Text
   -> Maybe ResourceStatus
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> UpdateDashboardResponse)
-> Either String (Maybe Int)
-> Either
     String
     (Maybe Text
      -> Maybe ResourceStatus
      -> Maybe Text
      -> Maybe Text
      -> Int
      -> UpdateDashboardResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Int)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Status")
            Either
  String
  (Maybe Text
   -> Maybe ResourceStatus
   -> Maybe Text
   -> Maybe Text
   -> Int
   -> UpdateDashboardResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe ResourceStatus
      -> Maybe Text -> Maybe Text -> Int -> UpdateDashboardResponse)
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 ResourceStatus
   -> Maybe Text -> Maybe Text -> Int -> UpdateDashboardResponse)
-> Either String (Maybe ResourceStatus)
-> Either
     String (Maybe Text -> Maybe Text -> Int -> UpdateDashboardResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe ResourceStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CreationStatus")
            Either
  String (Maybe Text -> Maybe Text -> Int -> UpdateDashboardResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Int -> UpdateDashboardResponse)
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
"DashboardId")
            Either String (Maybe Text -> Int -> UpdateDashboardResponse)
-> Either String (Maybe Text)
-> Either String (Int -> UpdateDashboardResponse)
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
"VersionArn")
            Either String (Int -> UpdateDashboardResponse)
-> Either String Int -> Either String UpdateDashboardResponse
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 UpdateDashboard

instance Prelude.NFData UpdateDashboard

instance Core.ToHeaders UpdateDashboard where
  toHeaders :: UpdateDashboard -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateDashboard -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.0" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON UpdateDashboard where
  toJSON :: UpdateDashboard -> Value
toJSON UpdateDashboard' {Maybe Text
Maybe DashboardPublishOptions
Maybe Parameters
Text
DashboardSourceEntity
sourceEntity :: DashboardSourceEntity
name :: Text
dashboardId :: Text
awsAccountId :: Text
parameters :: Maybe Parameters
versionDescription :: Maybe Text
dashboardPublishOptions :: Maybe DashboardPublishOptions
themeArn :: Maybe Text
$sel:sourceEntity:UpdateDashboard' :: UpdateDashboard -> DashboardSourceEntity
$sel:name:UpdateDashboard' :: UpdateDashboard -> Text
$sel:dashboardId:UpdateDashboard' :: UpdateDashboard -> Text
$sel:awsAccountId:UpdateDashboard' :: UpdateDashboard -> Text
$sel:parameters:UpdateDashboard' :: UpdateDashboard -> Maybe Parameters
$sel:versionDescription:UpdateDashboard' :: UpdateDashboard -> Maybe Text
$sel:dashboardPublishOptions:UpdateDashboard' :: UpdateDashboard -> Maybe DashboardPublishOptions
$sel:themeArn:UpdateDashboard' :: UpdateDashboard -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"ThemeArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
themeArn,
            (Text
"DashboardPublishOptions" Text -> DashboardPublishOptions -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (DashboardPublishOptions -> Pair)
-> Maybe DashboardPublishOptions -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DashboardPublishOptions
dashboardPublishOptions,
            (Text
"VersionDescription" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
versionDescription,
            (Text
"Parameters" Text -> Parameters -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Parameters -> Pair) -> Maybe Parameters -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Parameters
parameters,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"SourceEntity" Text -> DashboardSourceEntity -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= DashboardSourceEntity
sourceEntity)
          ]
      )

instance Core.ToPath UpdateDashboard where
  toPath :: UpdateDashboard -> ByteString
toPath UpdateDashboard' {Maybe Text
Maybe DashboardPublishOptions
Maybe Parameters
Text
DashboardSourceEntity
sourceEntity :: DashboardSourceEntity
name :: Text
dashboardId :: Text
awsAccountId :: Text
parameters :: Maybe Parameters
versionDescription :: Maybe Text
dashboardPublishOptions :: Maybe DashboardPublishOptions
themeArn :: Maybe Text
$sel:sourceEntity:UpdateDashboard' :: UpdateDashboard -> DashboardSourceEntity
$sel:name:UpdateDashboard' :: UpdateDashboard -> Text
$sel:dashboardId:UpdateDashboard' :: UpdateDashboard -> Text
$sel:awsAccountId:UpdateDashboard' :: UpdateDashboard -> Text
$sel:parameters:UpdateDashboard' :: UpdateDashboard -> Maybe Parameters
$sel:versionDescription:UpdateDashboard' :: UpdateDashboard -> Maybe Text
$sel:dashboardPublishOptions:UpdateDashboard' :: UpdateDashboard -> Maybe DashboardPublishOptions
$sel:themeArn:UpdateDashboard' :: UpdateDashboard -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/accounts/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
awsAccountId,
        ByteString
"/dashboards/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
dashboardId
      ]

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

-- | /See:/ 'newUpdateDashboardResponse' smart constructor.
data UpdateDashboardResponse = UpdateDashboardResponse'
  { -- | The Amazon Web Services request ID for this operation.
    UpdateDashboardResponse -> Maybe Text
requestId :: Prelude.Maybe Prelude.Text,
    -- | The HTTP status of the request.
    UpdateDashboardResponse -> Maybe Int
status :: Prelude.Maybe Prelude.Int,
    -- | The Amazon Resource Name (ARN) of the resource.
    UpdateDashboardResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The creation status of the request.
    UpdateDashboardResponse -> Maybe ResourceStatus
creationStatus :: Prelude.Maybe ResourceStatus,
    -- | The ID for the dashboard.
    UpdateDashboardResponse -> Maybe Text
dashboardId :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the dashboard, including the version number.
    UpdateDashboardResponse -> Maybe Text
versionArn :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    UpdateDashboardResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateDashboardResponse -> UpdateDashboardResponse -> Bool
(UpdateDashboardResponse -> UpdateDashboardResponse -> Bool)
-> (UpdateDashboardResponse -> UpdateDashboardResponse -> Bool)
-> Eq UpdateDashboardResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateDashboardResponse -> UpdateDashboardResponse -> Bool
$c/= :: UpdateDashboardResponse -> UpdateDashboardResponse -> Bool
== :: UpdateDashboardResponse -> UpdateDashboardResponse -> Bool
$c== :: UpdateDashboardResponse -> UpdateDashboardResponse -> Bool
Prelude.Eq, ReadPrec [UpdateDashboardResponse]
ReadPrec UpdateDashboardResponse
Int -> ReadS UpdateDashboardResponse
ReadS [UpdateDashboardResponse]
(Int -> ReadS UpdateDashboardResponse)
-> ReadS [UpdateDashboardResponse]
-> ReadPrec UpdateDashboardResponse
-> ReadPrec [UpdateDashboardResponse]
-> Read UpdateDashboardResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateDashboardResponse]
$creadListPrec :: ReadPrec [UpdateDashboardResponse]
readPrec :: ReadPrec UpdateDashboardResponse
$creadPrec :: ReadPrec UpdateDashboardResponse
readList :: ReadS [UpdateDashboardResponse]
$creadList :: ReadS [UpdateDashboardResponse]
readsPrec :: Int -> ReadS UpdateDashboardResponse
$creadsPrec :: Int -> ReadS UpdateDashboardResponse
Prelude.Read, Int -> UpdateDashboardResponse -> ShowS
[UpdateDashboardResponse] -> ShowS
UpdateDashboardResponse -> String
(Int -> UpdateDashboardResponse -> ShowS)
-> (UpdateDashboardResponse -> String)
-> ([UpdateDashboardResponse] -> ShowS)
-> Show UpdateDashboardResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateDashboardResponse] -> ShowS
$cshowList :: [UpdateDashboardResponse] -> ShowS
show :: UpdateDashboardResponse -> String
$cshow :: UpdateDashboardResponse -> String
showsPrec :: Int -> UpdateDashboardResponse -> ShowS
$cshowsPrec :: Int -> UpdateDashboardResponse -> ShowS
Prelude.Show, (forall x.
 UpdateDashboardResponse -> Rep UpdateDashboardResponse x)
-> (forall x.
    Rep UpdateDashboardResponse x -> UpdateDashboardResponse)
-> Generic UpdateDashboardResponse
forall x. Rep UpdateDashboardResponse x -> UpdateDashboardResponse
forall x. UpdateDashboardResponse -> Rep UpdateDashboardResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateDashboardResponse x -> UpdateDashboardResponse
$cfrom :: forall x. UpdateDashboardResponse -> Rep UpdateDashboardResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateDashboardResponse' 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:
--
-- 'requestId', 'updateDashboardResponse_requestId' - The Amazon Web Services request ID for this operation.
--
-- 'status', 'updateDashboardResponse_status' - The HTTP status of the request.
--
-- 'arn', 'updateDashboardResponse_arn' - The Amazon Resource Name (ARN) of the resource.
--
-- 'creationStatus', 'updateDashboardResponse_creationStatus' - The creation status of the request.
--
-- 'dashboardId', 'updateDashboardResponse_dashboardId' - The ID for the dashboard.
--
-- 'versionArn', 'updateDashboardResponse_versionArn' - The ARN of the dashboard, including the version number.
--
-- 'httpStatus', 'updateDashboardResponse_httpStatus' - The response's http status code.
newUpdateDashboardResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateDashboardResponse
newUpdateDashboardResponse :: Int -> UpdateDashboardResponse
newUpdateDashboardResponse Int
pHttpStatus_ =
  UpdateDashboardResponse' :: Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe ResourceStatus
-> Maybe Text
-> Maybe Text
-> Int
-> UpdateDashboardResponse
UpdateDashboardResponse'
    { $sel:requestId:UpdateDashboardResponse' :: Maybe Text
requestId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:status:UpdateDashboardResponse' :: Maybe Int
status = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:UpdateDashboardResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:creationStatus:UpdateDashboardResponse' :: Maybe ResourceStatus
creationStatus = Maybe ResourceStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:dashboardId:UpdateDashboardResponse' :: Maybe Text
dashboardId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:versionArn:UpdateDashboardResponse' :: Maybe Text
versionArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateDashboardResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The Amazon Web Services request ID for this operation.
updateDashboardResponse_requestId :: Lens.Lens' UpdateDashboardResponse (Prelude.Maybe Prelude.Text)
updateDashboardResponse_requestId :: (Maybe Text -> f (Maybe Text))
-> UpdateDashboardResponse -> f UpdateDashboardResponse
updateDashboardResponse_requestId = (UpdateDashboardResponse -> Maybe Text)
-> (UpdateDashboardResponse
    -> Maybe Text -> UpdateDashboardResponse)
-> Lens
     UpdateDashboardResponse
     UpdateDashboardResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDashboardResponse' {Maybe Text
requestId :: Maybe Text
$sel:requestId:UpdateDashboardResponse' :: UpdateDashboardResponse -> Maybe Text
requestId} -> Maybe Text
requestId) (\s :: UpdateDashboardResponse
s@UpdateDashboardResponse' {} Maybe Text
a -> UpdateDashboardResponse
s {$sel:requestId:UpdateDashboardResponse' :: Maybe Text
requestId = Maybe Text
a} :: UpdateDashboardResponse)

-- | The HTTP status of the request.
updateDashboardResponse_status :: Lens.Lens' UpdateDashboardResponse (Prelude.Maybe Prelude.Int)
updateDashboardResponse_status :: (Maybe Int -> f (Maybe Int))
-> UpdateDashboardResponse -> f UpdateDashboardResponse
updateDashboardResponse_status = (UpdateDashboardResponse -> Maybe Int)
-> (UpdateDashboardResponse
    -> Maybe Int -> UpdateDashboardResponse)
-> Lens
     UpdateDashboardResponse
     UpdateDashboardResponse
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDashboardResponse' {Maybe Int
status :: Maybe Int
$sel:status:UpdateDashboardResponse' :: UpdateDashboardResponse -> Maybe Int
status} -> Maybe Int
status) (\s :: UpdateDashboardResponse
s@UpdateDashboardResponse' {} Maybe Int
a -> UpdateDashboardResponse
s {$sel:status:UpdateDashboardResponse' :: Maybe Int
status = Maybe Int
a} :: UpdateDashboardResponse)

-- | The Amazon Resource Name (ARN) of the resource.
updateDashboardResponse_arn :: Lens.Lens' UpdateDashboardResponse (Prelude.Maybe Prelude.Text)
updateDashboardResponse_arn :: (Maybe Text -> f (Maybe Text))
-> UpdateDashboardResponse -> f UpdateDashboardResponse
updateDashboardResponse_arn = (UpdateDashboardResponse -> Maybe Text)
-> (UpdateDashboardResponse
    -> Maybe Text -> UpdateDashboardResponse)
-> Lens
     UpdateDashboardResponse
     UpdateDashboardResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDashboardResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:UpdateDashboardResponse' :: UpdateDashboardResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: UpdateDashboardResponse
s@UpdateDashboardResponse' {} Maybe Text
a -> UpdateDashboardResponse
s {$sel:arn:UpdateDashboardResponse' :: Maybe Text
arn = Maybe Text
a} :: UpdateDashboardResponse)

-- | The creation status of the request.
updateDashboardResponse_creationStatus :: Lens.Lens' UpdateDashboardResponse (Prelude.Maybe ResourceStatus)
updateDashboardResponse_creationStatus :: (Maybe ResourceStatus -> f (Maybe ResourceStatus))
-> UpdateDashboardResponse -> f UpdateDashboardResponse
updateDashboardResponse_creationStatus = (UpdateDashboardResponse -> Maybe ResourceStatus)
-> (UpdateDashboardResponse
    -> Maybe ResourceStatus -> UpdateDashboardResponse)
-> Lens
     UpdateDashboardResponse
     UpdateDashboardResponse
     (Maybe ResourceStatus)
     (Maybe ResourceStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDashboardResponse' {Maybe ResourceStatus
creationStatus :: Maybe ResourceStatus
$sel:creationStatus:UpdateDashboardResponse' :: UpdateDashboardResponse -> Maybe ResourceStatus
creationStatus} -> Maybe ResourceStatus
creationStatus) (\s :: UpdateDashboardResponse
s@UpdateDashboardResponse' {} Maybe ResourceStatus
a -> UpdateDashboardResponse
s {$sel:creationStatus:UpdateDashboardResponse' :: Maybe ResourceStatus
creationStatus = Maybe ResourceStatus
a} :: UpdateDashboardResponse)

-- | The ID for the dashboard.
updateDashboardResponse_dashboardId :: Lens.Lens' UpdateDashboardResponse (Prelude.Maybe Prelude.Text)
updateDashboardResponse_dashboardId :: (Maybe Text -> f (Maybe Text))
-> UpdateDashboardResponse -> f UpdateDashboardResponse
updateDashboardResponse_dashboardId = (UpdateDashboardResponse -> Maybe Text)
-> (UpdateDashboardResponse
    -> Maybe Text -> UpdateDashboardResponse)
-> Lens
     UpdateDashboardResponse
     UpdateDashboardResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDashboardResponse' {Maybe Text
dashboardId :: Maybe Text
$sel:dashboardId:UpdateDashboardResponse' :: UpdateDashboardResponse -> Maybe Text
dashboardId} -> Maybe Text
dashboardId) (\s :: UpdateDashboardResponse
s@UpdateDashboardResponse' {} Maybe Text
a -> UpdateDashboardResponse
s {$sel:dashboardId:UpdateDashboardResponse' :: Maybe Text
dashboardId = Maybe Text
a} :: UpdateDashboardResponse)

-- | The ARN of the dashboard, including the version number.
updateDashboardResponse_versionArn :: Lens.Lens' UpdateDashboardResponse (Prelude.Maybe Prelude.Text)
updateDashboardResponse_versionArn :: (Maybe Text -> f (Maybe Text))
-> UpdateDashboardResponse -> f UpdateDashboardResponse
updateDashboardResponse_versionArn = (UpdateDashboardResponse -> Maybe Text)
-> (UpdateDashboardResponse
    -> Maybe Text -> UpdateDashboardResponse)
-> Lens
     UpdateDashboardResponse
     UpdateDashboardResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDashboardResponse' {Maybe Text
versionArn :: Maybe Text
$sel:versionArn:UpdateDashboardResponse' :: UpdateDashboardResponse -> Maybe Text
versionArn} -> Maybe Text
versionArn) (\s :: UpdateDashboardResponse
s@UpdateDashboardResponse' {} Maybe Text
a -> UpdateDashboardResponse
s {$sel:versionArn:UpdateDashboardResponse' :: Maybe Text
versionArn = Maybe Text
a} :: UpdateDashboardResponse)

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

instance Prelude.NFData UpdateDashboardResponse