{-# 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 #-}
module Amazonka.Grafana.UpdateWorkspace
(
UpdateWorkspace (..),
newUpdateWorkspace,
updateWorkspace_workspaceRoleArn,
updateWorkspace_workspaceDataSources,
updateWorkspace_permissionType,
updateWorkspace_workspaceNotificationDestinations,
updateWorkspace_workspaceName,
updateWorkspace_accountAccessType,
updateWorkspace_organizationRoleName,
updateWorkspace_workspaceDescription,
updateWorkspace_stackSetName,
updateWorkspace_workspaceOrganizationalUnits,
updateWorkspace_workspaceId,
UpdateWorkspaceResponse (..),
newUpdateWorkspaceResponse,
updateWorkspaceResponse_httpStatus,
updateWorkspaceResponse_workspace,
)
where
import qualified Amazonka.Core as Core
import Amazonka.Grafana.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
data UpdateWorkspace = UpdateWorkspace'
{
UpdateWorkspace -> Maybe (Sensitive Text)
workspaceRoleArn :: Prelude.Maybe (Core.Sensitive Prelude.Text),
UpdateWorkspace -> Maybe [DataSourceType]
workspaceDataSources :: Prelude.Maybe [DataSourceType],
UpdateWorkspace -> Maybe PermissionType
permissionType :: Prelude.Maybe PermissionType,
UpdateWorkspace -> Maybe [NotificationDestinationType]
workspaceNotificationDestinations :: Prelude.Maybe [NotificationDestinationType],
UpdateWorkspace -> Maybe (Sensitive Text)
workspaceName :: Prelude.Maybe (Core.Sensitive Prelude.Text),
UpdateWorkspace -> Maybe AccountAccessType
accountAccessType :: Prelude.Maybe AccountAccessType,
UpdateWorkspace -> Maybe (Sensitive Text)
organizationRoleName :: Prelude.Maybe (Core.Sensitive Prelude.Text),
UpdateWorkspace -> Maybe (Sensitive Text)
workspaceDescription :: Prelude.Maybe (Core.Sensitive Prelude.Text),
UpdateWorkspace -> Maybe Text
stackSetName :: Prelude.Maybe Prelude.Text,
UpdateWorkspace -> Maybe (Sensitive [Text])
workspaceOrganizationalUnits :: Prelude.Maybe (Core.Sensitive [Prelude.Text]),
UpdateWorkspace -> Text
workspaceId :: Prelude.Text
}
deriving (UpdateWorkspace -> UpdateWorkspace -> Bool
(UpdateWorkspace -> UpdateWorkspace -> Bool)
-> (UpdateWorkspace -> UpdateWorkspace -> Bool)
-> Eq UpdateWorkspace
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateWorkspace -> UpdateWorkspace -> Bool
$c/= :: UpdateWorkspace -> UpdateWorkspace -> Bool
== :: UpdateWorkspace -> UpdateWorkspace -> Bool
$c== :: UpdateWorkspace -> UpdateWorkspace -> Bool
Prelude.Eq, Int -> UpdateWorkspace -> ShowS
[UpdateWorkspace] -> ShowS
UpdateWorkspace -> String
(Int -> UpdateWorkspace -> ShowS)
-> (UpdateWorkspace -> String)
-> ([UpdateWorkspace] -> ShowS)
-> Show UpdateWorkspace
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateWorkspace] -> ShowS
$cshowList :: [UpdateWorkspace] -> ShowS
show :: UpdateWorkspace -> String
$cshow :: UpdateWorkspace -> String
showsPrec :: Int -> UpdateWorkspace -> ShowS
$cshowsPrec :: Int -> UpdateWorkspace -> ShowS
Prelude.Show, (forall x. UpdateWorkspace -> Rep UpdateWorkspace x)
-> (forall x. Rep UpdateWorkspace x -> UpdateWorkspace)
-> Generic UpdateWorkspace
forall x. Rep UpdateWorkspace x -> UpdateWorkspace
forall x. UpdateWorkspace -> Rep UpdateWorkspace x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateWorkspace x -> UpdateWorkspace
$cfrom :: forall x. UpdateWorkspace -> Rep UpdateWorkspace x
Prelude.Generic)
newUpdateWorkspace ::
Prelude.Text ->
UpdateWorkspace
newUpdateWorkspace :: Text -> UpdateWorkspace
newUpdateWorkspace Text
pWorkspaceId_ =
UpdateWorkspace' :: Maybe (Sensitive Text)
-> Maybe [DataSourceType]
-> Maybe PermissionType
-> Maybe [NotificationDestinationType]
-> Maybe (Sensitive Text)
-> Maybe AccountAccessType
-> Maybe (Sensitive Text)
-> Maybe (Sensitive Text)
-> Maybe Text
-> Maybe (Sensitive [Text])
-> Text
-> UpdateWorkspace
UpdateWorkspace'
{ $sel:workspaceRoleArn:UpdateWorkspace' :: Maybe (Sensitive Text)
workspaceRoleArn =
Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:workspaceDataSources:UpdateWorkspace' :: Maybe [DataSourceType]
workspaceDataSources = Maybe [DataSourceType]
forall a. Maybe a
Prelude.Nothing,
$sel:permissionType:UpdateWorkspace' :: Maybe PermissionType
permissionType = Maybe PermissionType
forall a. Maybe a
Prelude.Nothing,
$sel:workspaceNotificationDestinations:UpdateWorkspace' :: Maybe [NotificationDestinationType]
workspaceNotificationDestinations = Maybe [NotificationDestinationType]
forall a. Maybe a
Prelude.Nothing,
$sel:workspaceName:UpdateWorkspace' :: Maybe (Sensitive Text)
workspaceName = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:accountAccessType:UpdateWorkspace' :: Maybe AccountAccessType
accountAccessType = Maybe AccountAccessType
forall a. Maybe a
Prelude.Nothing,
$sel:organizationRoleName:UpdateWorkspace' :: Maybe (Sensitive Text)
organizationRoleName = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:workspaceDescription:UpdateWorkspace' :: Maybe (Sensitive Text)
workspaceDescription = Maybe (Sensitive Text)
forall a. Maybe a
Prelude.Nothing,
$sel:stackSetName:UpdateWorkspace' :: Maybe Text
stackSetName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:workspaceOrganizationalUnits:UpdateWorkspace' :: Maybe (Sensitive [Text])
workspaceOrganizationalUnits = Maybe (Sensitive [Text])
forall a. Maybe a
Prelude.Nothing,
$sel:workspaceId:UpdateWorkspace' :: Text
workspaceId = Text
pWorkspaceId_
}
updateWorkspace_workspaceRoleArn :: Lens.Lens' UpdateWorkspace (Prelude.Maybe Prelude.Text)
updateWorkspace_workspaceRoleArn :: (Maybe Text -> f (Maybe Text))
-> UpdateWorkspace -> f UpdateWorkspace
updateWorkspace_workspaceRoleArn = (UpdateWorkspace -> Maybe (Sensitive Text))
-> (UpdateWorkspace -> Maybe (Sensitive Text) -> UpdateWorkspace)
-> Lens
UpdateWorkspace
UpdateWorkspace
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateWorkspace' {Maybe (Sensitive Text)
workspaceRoleArn :: Maybe (Sensitive Text)
$sel:workspaceRoleArn:UpdateWorkspace' :: UpdateWorkspace -> Maybe (Sensitive Text)
workspaceRoleArn} -> Maybe (Sensitive Text)
workspaceRoleArn) (\s :: UpdateWorkspace
s@UpdateWorkspace' {} Maybe (Sensitive Text)
a -> UpdateWorkspace
s {$sel:workspaceRoleArn:UpdateWorkspace' :: Maybe (Sensitive Text)
workspaceRoleArn = Maybe (Sensitive Text)
a} :: UpdateWorkspace) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> UpdateWorkspace -> f UpdateWorkspace)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> UpdateWorkspace
-> f UpdateWorkspace
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
(Maybe Text)
(Maybe 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 (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive
updateWorkspace_workspaceDataSources :: Lens.Lens' UpdateWorkspace (Prelude.Maybe [DataSourceType])
updateWorkspace_workspaceDataSources :: (Maybe [DataSourceType] -> f (Maybe [DataSourceType]))
-> UpdateWorkspace -> f UpdateWorkspace
updateWorkspace_workspaceDataSources = (UpdateWorkspace -> Maybe [DataSourceType])
-> (UpdateWorkspace -> Maybe [DataSourceType] -> UpdateWorkspace)
-> Lens
UpdateWorkspace
UpdateWorkspace
(Maybe [DataSourceType])
(Maybe [DataSourceType])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateWorkspace' {Maybe [DataSourceType]
workspaceDataSources :: Maybe [DataSourceType]
$sel:workspaceDataSources:UpdateWorkspace' :: UpdateWorkspace -> Maybe [DataSourceType]
workspaceDataSources} -> Maybe [DataSourceType]
workspaceDataSources) (\s :: UpdateWorkspace
s@UpdateWorkspace' {} Maybe [DataSourceType]
a -> UpdateWorkspace
s {$sel:workspaceDataSources:UpdateWorkspace' :: Maybe [DataSourceType]
workspaceDataSources = Maybe [DataSourceType]
a} :: UpdateWorkspace) ((Maybe [DataSourceType] -> f (Maybe [DataSourceType]))
-> UpdateWorkspace -> f UpdateWorkspace)
-> ((Maybe [DataSourceType] -> f (Maybe [DataSourceType]))
-> Maybe [DataSourceType] -> f (Maybe [DataSourceType]))
-> (Maybe [DataSourceType] -> f (Maybe [DataSourceType]))
-> UpdateWorkspace
-> f UpdateWorkspace
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[DataSourceType] [DataSourceType] [DataSourceType] [DataSourceType]
-> Iso
(Maybe [DataSourceType])
(Maybe [DataSourceType])
(Maybe [DataSourceType])
(Maybe [DataSourceType])
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
[DataSourceType] [DataSourceType] [DataSourceType] [DataSourceType]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
updateWorkspace_permissionType :: Lens.Lens' UpdateWorkspace (Prelude.Maybe PermissionType)
updateWorkspace_permissionType :: (Maybe PermissionType -> f (Maybe PermissionType))
-> UpdateWorkspace -> f UpdateWorkspace
updateWorkspace_permissionType = (UpdateWorkspace -> Maybe PermissionType)
-> (UpdateWorkspace -> Maybe PermissionType -> UpdateWorkspace)
-> Lens
UpdateWorkspace
UpdateWorkspace
(Maybe PermissionType)
(Maybe PermissionType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateWorkspace' {Maybe PermissionType
permissionType :: Maybe PermissionType
$sel:permissionType:UpdateWorkspace' :: UpdateWorkspace -> Maybe PermissionType
permissionType} -> Maybe PermissionType
permissionType) (\s :: UpdateWorkspace
s@UpdateWorkspace' {} Maybe PermissionType
a -> UpdateWorkspace
s {$sel:permissionType:UpdateWorkspace' :: Maybe PermissionType
permissionType = Maybe PermissionType
a} :: UpdateWorkspace)
updateWorkspace_workspaceNotificationDestinations :: Lens.Lens' UpdateWorkspace (Prelude.Maybe [NotificationDestinationType])
updateWorkspace_workspaceNotificationDestinations :: (Maybe [NotificationDestinationType]
-> f (Maybe [NotificationDestinationType]))
-> UpdateWorkspace -> f UpdateWorkspace
updateWorkspace_workspaceNotificationDestinations = (UpdateWorkspace -> Maybe [NotificationDestinationType])
-> (UpdateWorkspace
-> Maybe [NotificationDestinationType] -> UpdateWorkspace)
-> Lens
UpdateWorkspace
UpdateWorkspace
(Maybe [NotificationDestinationType])
(Maybe [NotificationDestinationType])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateWorkspace' {Maybe [NotificationDestinationType]
workspaceNotificationDestinations :: Maybe [NotificationDestinationType]
$sel:workspaceNotificationDestinations:UpdateWorkspace' :: UpdateWorkspace -> Maybe [NotificationDestinationType]
workspaceNotificationDestinations} -> Maybe [NotificationDestinationType]
workspaceNotificationDestinations) (\s :: UpdateWorkspace
s@UpdateWorkspace' {} Maybe [NotificationDestinationType]
a -> UpdateWorkspace
s {$sel:workspaceNotificationDestinations:UpdateWorkspace' :: Maybe [NotificationDestinationType]
workspaceNotificationDestinations = Maybe [NotificationDestinationType]
a} :: UpdateWorkspace) ((Maybe [NotificationDestinationType]
-> f (Maybe [NotificationDestinationType]))
-> UpdateWorkspace -> f UpdateWorkspace)
-> ((Maybe [NotificationDestinationType]
-> f (Maybe [NotificationDestinationType]))
-> Maybe [NotificationDestinationType]
-> f (Maybe [NotificationDestinationType]))
-> (Maybe [NotificationDestinationType]
-> f (Maybe [NotificationDestinationType]))
-> UpdateWorkspace
-> f UpdateWorkspace
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[NotificationDestinationType]
[NotificationDestinationType]
[NotificationDestinationType]
[NotificationDestinationType]
-> Iso
(Maybe [NotificationDestinationType])
(Maybe [NotificationDestinationType])
(Maybe [NotificationDestinationType])
(Maybe [NotificationDestinationType])
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
[NotificationDestinationType]
[NotificationDestinationType]
[NotificationDestinationType]
[NotificationDestinationType]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
updateWorkspace_workspaceName :: Lens.Lens' UpdateWorkspace (Prelude.Maybe Prelude.Text)
updateWorkspace_workspaceName :: (Maybe Text -> f (Maybe Text))
-> UpdateWorkspace -> f UpdateWorkspace
updateWorkspace_workspaceName = (UpdateWorkspace -> Maybe (Sensitive Text))
-> (UpdateWorkspace -> Maybe (Sensitive Text) -> UpdateWorkspace)
-> Lens
UpdateWorkspace
UpdateWorkspace
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateWorkspace' {Maybe (Sensitive Text)
workspaceName :: Maybe (Sensitive Text)
$sel:workspaceName:UpdateWorkspace' :: UpdateWorkspace -> Maybe (Sensitive Text)
workspaceName} -> Maybe (Sensitive Text)
workspaceName) (\s :: UpdateWorkspace
s@UpdateWorkspace' {} Maybe (Sensitive Text)
a -> UpdateWorkspace
s {$sel:workspaceName:UpdateWorkspace' :: Maybe (Sensitive Text)
workspaceName = Maybe (Sensitive Text)
a} :: UpdateWorkspace) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> UpdateWorkspace -> f UpdateWorkspace)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> UpdateWorkspace
-> f UpdateWorkspace
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
(Maybe Text)
(Maybe 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 (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive
updateWorkspace_accountAccessType :: Lens.Lens' UpdateWorkspace (Prelude.Maybe AccountAccessType)
updateWorkspace_accountAccessType :: (Maybe AccountAccessType -> f (Maybe AccountAccessType))
-> UpdateWorkspace -> f UpdateWorkspace
updateWorkspace_accountAccessType = (UpdateWorkspace -> Maybe AccountAccessType)
-> (UpdateWorkspace -> Maybe AccountAccessType -> UpdateWorkspace)
-> Lens
UpdateWorkspace
UpdateWorkspace
(Maybe AccountAccessType)
(Maybe AccountAccessType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateWorkspace' {Maybe AccountAccessType
accountAccessType :: Maybe AccountAccessType
$sel:accountAccessType:UpdateWorkspace' :: UpdateWorkspace -> Maybe AccountAccessType
accountAccessType} -> Maybe AccountAccessType
accountAccessType) (\s :: UpdateWorkspace
s@UpdateWorkspace' {} Maybe AccountAccessType
a -> UpdateWorkspace
s {$sel:accountAccessType:UpdateWorkspace' :: Maybe AccountAccessType
accountAccessType = Maybe AccountAccessType
a} :: UpdateWorkspace)
updateWorkspace_organizationRoleName :: Lens.Lens' UpdateWorkspace (Prelude.Maybe Prelude.Text)
updateWorkspace_organizationRoleName :: (Maybe Text -> f (Maybe Text))
-> UpdateWorkspace -> f UpdateWorkspace
updateWorkspace_organizationRoleName = (UpdateWorkspace -> Maybe (Sensitive Text))
-> (UpdateWorkspace -> Maybe (Sensitive Text) -> UpdateWorkspace)
-> Lens
UpdateWorkspace
UpdateWorkspace
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateWorkspace' {Maybe (Sensitive Text)
organizationRoleName :: Maybe (Sensitive Text)
$sel:organizationRoleName:UpdateWorkspace' :: UpdateWorkspace -> Maybe (Sensitive Text)
organizationRoleName} -> Maybe (Sensitive Text)
organizationRoleName) (\s :: UpdateWorkspace
s@UpdateWorkspace' {} Maybe (Sensitive Text)
a -> UpdateWorkspace
s {$sel:organizationRoleName:UpdateWorkspace' :: Maybe (Sensitive Text)
organizationRoleName = Maybe (Sensitive Text)
a} :: UpdateWorkspace) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> UpdateWorkspace -> f UpdateWorkspace)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> UpdateWorkspace
-> f UpdateWorkspace
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
(Maybe Text)
(Maybe 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 (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive
updateWorkspace_workspaceDescription :: Lens.Lens' UpdateWorkspace (Prelude.Maybe Prelude.Text)
updateWorkspace_workspaceDescription :: (Maybe Text -> f (Maybe Text))
-> UpdateWorkspace -> f UpdateWorkspace
updateWorkspace_workspaceDescription = (UpdateWorkspace -> Maybe (Sensitive Text))
-> (UpdateWorkspace -> Maybe (Sensitive Text) -> UpdateWorkspace)
-> Lens
UpdateWorkspace
UpdateWorkspace
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateWorkspace' {Maybe (Sensitive Text)
workspaceDescription :: Maybe (Sensitive Text)
$sel:workspaceDescription:UpdateWorkspace' :: UpdateWorkspace -> Maybe (Sensitive Text)
workspaceDescription} -> Maybe (Sensitive Text)
workspaceDescription) (\s :: UpdateWorkspace
s@UpdateWorkspace' {} Maybe (Sensitive Text)
a -> UpdateWorkspace
s {$sel:workspaceDescription:UpdateWorkspace' :: Maybe (Sensitive Text)
workspaceDescription = Maybe (Sensitive Text)
a} :: UpdateWorkspace) ((Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> UpdateWorkspace -> f UpdateWorkspace)
-> ((Maybe Text -> f (Maybe Text))
-> Maybe (Sensitive Text) -> f (Maybe (Sensitive Text)))
-> (Maybe Text -> f (Maybe Text))
-> UpdateWorkspace
-> f UpdateWorkspace
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive Text) (Sensitive Text) Text Text
-> Iso
(Maybe (Sensitive Text))
(Maybe (Sensitive Text))
(Maybe Text)
(Maybe 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 (Sensitive Text) (Sensitive Text) Text Text
forall a. Iso' (Sensitive a) a
Core._Sensitive
updateWorkspace_stackSetName :: Lens.Lens' UpdateWorkspace (Prelude.Maybe Prelude.Text)
updateWorkspace_stackSetName :: (Maybe Text -> f (Maybe Text))
-> UpdateWorkspace -> f UpdateWorkspace
updateWorkspace_stackSetName = (UpdateWorkspace -> Maybe Text)
-> (UpdateWorkspace -> Maybe Text -> UpdateWorkspace)
-> Lens UpdateWorkspace UpdateWorkspace (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateWorkspace' {Maybe Text
stackSetName :: Maybe Text
$sel:stackSetName:UpdateWorkspace' :: UpdateWorkspace -> Maybe Text
stackSetName} -> Maybe Text
stackSetName) (\s :: UpdateWorkspace
s@UpdateWorkspace' {} Maybe Text
a -> UpdateWorkspace
s {$sel:stackSetName:UpdateWorkspace' :: Maybe Text
stackSetName = Maybe Text
a} :: UpdateWorkspace)
updateWorkspace_workspaceOrganizationalUnits :: Lens.Lens' UpdateWorkspace (Prelude.Maybe [Prelude.Text])
updateWorkspace_workspaceOrganizationalUnits :: (Maybe [Text] -> f (Maybe [Text]))
-> UpdateWorkspace -> f UpdateWorkspace
updateWorkspace_workspaceOrganizationalUnits = (UpdateWorkspace -> Maybe (Sensitive [Text]))
-> (UpdateWorkspace -> Maybe (Sensitive [Text]) -> UpdateWorkspace)
-> Lens
UpdateWorkspace
UpdateWorkspace
(Maybe (Sensitive [Text]))
(Maybe (Sensitive [Text]))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateWorkspace' {Maybe (Sensitive [Text])
workspaceOrganizationalUnits :: Maybe (Sensitive [Text])
$sel:workspaceOrganizationalUnits:UpdateWorkspace' :: UpdateWorkspace -> Maybe (Sensitive [Text])
workspaceOrganizationalUnits} -> Maybe (Sensitive [Text])
workspaceOrganizationalUnits) (\s :: UpdateWorkspace
s@UpdateWorkspace' {} Maybe (Sensitive [Text])
a -> UpdateWorkspace
s {$sel:workspaceOrganizationalUnits:UpdateWorkspace' :: Maybe (Sensitive [Text])
workspaceOrganizationalUnits = Maybe (Sensitive [Text])
a} :: UpdateWorkspace) ((Maybe (Sensitive [Text]) -> f (Maybe (Sensitive [Text])))
-> UpdateWorkspace -> f UpdateWorkspace)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe (Sensitive [Text]) -> f (Maybe (Sensitive [Text])))
-> (Maybe [Text] -> f (Maybe [Text]))
-> UpdateWorkspace
-> f UpdateWorkspace
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso (Sensitive [Text]) (Sensitive [Text]) [Text] [Text]
-> Iso
(Maybe (Sensitive [Text]))
(Maybe (Sensitive [Text]))
(Maybe [Text])
(Maybe [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 (Sensitive [Text]) (Sensitive [Text]) [Text] [Text]
forall a. Iso' (Sensitive a) a
Core._Sensitive AnIso (Sensitive [Text]) (Sensitive [Text]) [Text] [Text]
-> (Exchange [Text] [Text] [Text] (Identity [Text])
-> Exchange [Text] [Text] [Text] (Identity [Text]))
-> AnIso (Sensitive [Text]) (Sensitive [Text]) [Text] [Text]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. Exchange [Text] [Text] [Text] (Identity [Text])
-> Exchange [Text] [Text] [Text] (Identity [Text])
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced)
updateWorkspace_workspaceId :: Lens.Lens' UpdateWorkspace Prelude.Text
updateWorkspace_workspaceId :: (Text -> f Text) -> UpdateWorkspace -> f UpdateWorkspace
updateWorkspace_workspaceId = (UpdateWorkspace -> Text)
-> (UpdateWorkspace -> Text -> UpdateWorkspace)
-> Lens UpdateWorkspace UpdateWorkspace Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateWorkspace' {Text
workspaceId :: Text
$sel:workspaceId:UpdateWorkspace' :: UpdateWorkspace -> Text
workspaceId} -> Text
workspaceId) (\s :: UpdateWorkspace
s@UpdateWorkspace' {} Text
a -> UpdateWorkspace
s {$sel:workspaceId:UpdateWorkspace' :: Text
workspaceId = Text
a} :: UpdateWorkspace)
instance Core.AWSRequest UpdateWorkspace where
type
AWSResponse UpdateWorkspace =
UpdateWorkspaceResponse
request :: UpdateWorkspace -> Request UpdateWorkspace
request = Service -> UpdateWorkspace -> Request UpdateWorkspace
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
response :: Logger
-> Service
-> Proxy UpdateWorkspace
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateWorkspace)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse UpdateWorkspace))
-> Logger
-> Service
-> Proxy UpdateWorkspace
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateWorkspace)))
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 ->
Int -> WorkspaceDescription -> UpdateWorkspaceResponse
UpdateWorkspaceResponse'
(Int -> WorkspaceDescription -> UpdateWorkspaceResponse)
-> Either String Int
-> Either String (WorkspaceDescription -> UpdateWorkspaceResponse)
forall (f :: * -> *) a b. Functor 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))
Either String (WorkspaceDescription -> UpdateWorkspaceResponse)
-> Either String WorkspaceDescription
-> Either String UpdateWorkspaceResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String WorkspaceDescription
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"workspace")
)
instance Prelude.Hashable UpdateWorkspace
instance Prelude.NFData UpdateWorkspace
instance Core.ToHeaders UpdateWorkspace where
toHeaders :: UpdateWorkspace -> ResponseHeaders
toHeaders =
ResponseHeaders -> UpdateWorkspace -> 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.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON UpdateWorkspace where
toJSON :: UpdateWorkspace -> Value
toJSON UpdateWorkspace' {Maybe [DataSourceType]
Maybe [NotificationDestinationType]
Maybe Text
Maybe (Sensitive [Text])
Maybe (Sensitive Text)
Maybe AccountAccessType
Maybe PermissionType
Text
workspaceId :: Text
workspaceOrganizationalUnits :: Maybe (Sensitive [Text])
stackSetName :: Maybe Text
workspaceDescription :: Maybe (Sensitive Text)
organizationRoleName :: Maybe (Sensitive Text)
accountAccessType :: Maybe AccountAccessType
workspaceName :: Maybe (Sensitive Text)
workspaceNotificationDestinations :: Maybe [NotificationDestinationType]
permissionType :: Maybe PermissionType
workspaceDataSources :: Maybe [DataSourceType]
workspaceRoleArn :: Maybe (Sensitive Text)
$sel:workspaceId:UpdateWorkspace' :: UpdateWorkspace -> Text
$sel:workspaceOrganizationalUnits:UpdateWorkspace' :: UpdateWorkspace -> Maybe (Sensitive [Text])
$sel:stackSetName:UpdateWorkspace' :: UpdateWorkspace -> Maybe Text
$sel:workspaceDescription:UpdateWorkspace' :: UpdateWorkspace -> Maybe (Sensitive Text)
$sel:organizationRoleName:UpdateWorkspace' :: UpdateWorkspace -> Maybe (Sensitive Text)
$sel:accountAccessType:UpdateWorkspace' :: UpdateWorkspace -> Maybe AccountAccessType
$sel:workspaceName:UpdateWorkspace' :: UpdateWorkspace -> Maybe (Sensitive Text)
$sel:workspaceNotificationDestinations:UpdateWorkspace' :: UpdateWorkspace -> Maybe [NotificationDestinationType]
$sel:permissionType:UpdateWorkspace' :: UpdateWorkspace -> Maybe PermissionType
$sel:workspaceDataSources:UpdateWorkspace' :: UpdateWorkspace -> Maybe [DataSourceType]
$sel:workspaceRoleArn:UpdateWorkspace' :: UpdateWorkspace -> Maybe (Sensitive Text)
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"workspaceRoleArn" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Sensitive Text -> Pair) -> Maybe (Sensitive Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
workspaceRoleArn,
(Text
"workspaceDataSources" Text -> [DataSourceType] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([DataSourceType] -> Pair) -> Maybe [DataSourceType] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [DataSourceType]
workspaceDataSources,
(Text
"permissionType" Text -> PermissionType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(PermissionType -> Pair) -> Maybe PermissionType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PermissionType
permissionType,
(Text
"workspaceNotificationDestinations" Text -> [NotificationDestinationType] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([NotificationDestinationType] -> Pair)
-> Maybe [NotificationDestinationType] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [NotificationDestinationType]
workspaceNotificationDestinations,
(Text
"workspaceName" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Sensitive Text -> Pair) -> Maybe (Sensitive Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
workspaceName,
(Text
"accountAccessType" Text -> AccountAccessType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(AccountAccessType -> Pair)
-> Maybe AccountAccessType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AccountAccessType
accountAccessType,
(Text
"organizationRoleName" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Sensitive Text -> Pair) -> Maybe (Sensitive Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
organizationRoleName,
(Text
"workspaceDescription" Text -> Sensitive Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Sensitive Text -> Pair) -> Maybe (Sensitive Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
workspaceDescription,
(Text
"stackSetName" 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
stackSetName,
(Text
"workspaceOrganizationalUnits" Text -> Sensitive [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Sensitive [Text] -> Pair)
-> Maybe (Sensitive [Text]) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive [Text])
workspaceOrganizationalUnits
]
)
instance Core.ToPath UpdateWorkspace where
toPath :: UpdateWorkspace -> ByteString
toPath UpdateWorkspace' {Maybe [DataSourceType]
Maybe [NotificationDestinationType]
Maybe Text
Maybe (Sensitive [Text])
Maybe (Sensitive Text)
Maybe AccountAccessType
Maybe PermissionType
Text
workspaceId :: Text
workspaceOrganizationalUnits :: Maybe (Sensitive [Text])
stackSetName :: Maybe Text
workspaceDescription :: Maybe (Sensitive Text)
organizationRoleName :: Maybe (Sensitive Text)
accountAccessType :: Maybe AccountAccessType
workspaceName :: Maybe (Sensitive Text)
workspaceNotificationDestinations :: Maybe [NotificationDestinationType]
permissionType :: Maybe PermissionType
workspaceDataSources :: Maybe [DataSourceType]
workspaceRoleArn :: Maybe (Sensitive Text)
$sel:workspaceId:UpdateWorkspace' :: UpdateWorkspace -> Text
$sel:workspaceOrganizationalUnits:UpdateWorkspace' :: UpdateWorkspace -> Maybe (Sensitive [Text])
$sel:stackSetName:UpdateWorkspace' :: UpdateWorkspace -> Maybe Text
$sel:workspaceDescription:UpdateWorkspace' :: UpdateWorkspace -> Maybe (Sensitive Text)
$sel:organizationRoleName:UpdateWorkspace' :: UpdateWorkspace -> Maybe (Sensitive Text)
$sel:accountAccessType:UpdateWorkspace' :: UpdateWorkspace -> Maybe AccountAccessType
$sel:workspaceName:UpdateWorkspace' :: UpdateWorkspace -> Maybe (Sensitive Text)
$sel:workspaceNotificationDestinations:UpdateWorkspace' :: UpdateWorkspace -> Maybe [NotificationDestinationType]
$sel:permissionType:UpdateWorkspace' :: UpdateWorkspace -> Maybe PermissionType
$sel:workspaceDataSources:UpdateWorkspace' :: UpdateWorkspace -> Maybe [DataSourceType]
$sel:workspaceRoleArn:UpdateWorkspace' :: UpdateWorkspace -> Maybe (Sensitive Text)
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/workspaces/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
workspaceId]
instance Core.ToQuery UpdateWorkspace where
toQuery :: UpdateWorkspace -> QueryString
toQuery = QueryString -> UpdateWorkspace -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data UpdateWorkspaceResponse = UpdateWorkspaceResponse'
{
UpdateWorkspaceResponse -> Int
httpStatus :: Prelude.Int,
UpdateWorkspaceResponse -> WorkspaceDescription
workspace :: WorkspaceDescription
}
deriving (UpdateWorkspaceResponse -> UpdateWorkspaceResponse -> Bool
(UpdateWorkspaceResponse -> UpdateWorkspaceResponse -> Bool)
-> (UpdateWorkspaceResponse -> UpdateWorkspaceResponse -> Bool)
-> Eq UpdateWorkspaceResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateWorkspaceResponse -> UpdateWorkspaceResponse -> Bool
$c/= :: UpdateWorkspaceResponse -> UpdateWorkspaceResponse -> Bool
== :: UpdateWorkspaceResponse -> UpdateWorkspaceResponse -> Bool
$c== :: UpdateWorkspaceResponse -> UpdateWorkspaceResponse -> Bool
Prelude.Eq, Int -> UpdateWorkspaceResponse -> ShowS
[UpdateWorkspaceResponse] -> ShowS
UpdateWorkspaceResponse -> String
(Int -> UpdateWorkspaceResponse -> ShowS)
-> (UpdateWorkspaceResponse -> String)
-> ([UpdateWorkspaceResponse] -> ShowS)
-> Show UpdateWorkspaceResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateWorkspaceResponse] -> ShowS
$cshowList :: [UpdateWorkspaceResponse] -> ShowS
show :: UpdateWorkspaceResponse -> String
$cshow :: UpdateWorkspaceResponse -> String
showsPrec :: Int -> UpdateWorkspaceResponse -> ShowS
$cshowsPrec :: Int -> UpdateWorkspaceResponse -> ShowS
Prelude.Show, (forall x.
UpdateWorkspaceResponse -> Rep UpdateWorkspaceResponse x)
-> (forall x.
Rep UpdateWorkspaceResponse x -> UpdateWorkspaceResponse)
-> Generic UpdateWorkspaceResponse
forall x. Rep UpdateWorkspaceResponse x -> UpdateWorkspaceResponse
forall x. UpdateWorkspaceResponse -> Rep UpdateWorkspaceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateWorkspaceResponse x -> UpdateWorkspaceResponse
$cfrom :: forall x. UpdateWorkspaceResponse -> Rep UpdateWorkspaceResponse x
Prelude.Generic)
newUpdateWorkspaceResponse ::
Prelude.Int ->
WorkspaceDescription ->
UpdateWorkspaceResponse
newUpdateWorkspaceResponse :: Int -> WorkspaceDescription -> UpdateWorkspaceResponse
newUpdateWorkspaceResponse Int
pHttpStatus_ WorkspaceDescription
pWorkspace_ =
UpdateWorkspaceResponse' :: Int -> WorkspaceDescription -> UpdateWorkspaceResponse
UpdateWorkspaceResponse'
{ $sel:httpStatus:UpdateWorkspaceResponse' :: Int
httpStatus = Int
pHttpStatus_,
$sel:workspace:UpdateWorkspaceResponse' :: WorkspaceDescription
workspace = WorkspaceDescription
pWorkspace_
}
updateWorkspaceResponse_httpStatus :: Lens.Lens' UpdateWorkspaceResponse Prelude.Int
updateWorkspaceResponse_httpStatus :: (Int -> f Int)
-> UpdateWorkspaceResponse -> f UpdateWorkspaceResponse
updateWorkspaceResponse_httpStatus = (UpdateWorkspaceResponse -> Int)
-> (UpdateWorkspaceResponse -> Int -> UpdateWorkspaceResponse)
-> Lens UpdateWorkspaceResponse UpdateWorkspaceResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateWorkspaceResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateWorkspaceResponse' :: UpdateWorkspaceResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateWorkspaceResponse
s@UpdateWorkspaceResponse' {} Int
a -> UpdateWorkspaceResponse
s {$sel:httpStatus:UpdateWorkspaceResponse' :: Int
httpStatus = Int
a} :: UpdateWorkspaceResponse)
updateWorkspaceResponse_workspace :: Lens.Lens' UpdateWorkspaceResponse WorkspaceDescription
updateWorkspaceResponse_workspace :: (WorkspaceDescription -> f WorkspaceDescription)
-> UpdateWorkspaceResponse -> f UpdateWorkspaceResponse
updateWorkspaceResponse_workspace = (UpdateWorkspaceResponse -> WorkspaceDescription)
-> (UpdateWorkspaceResponse
-> WorkspaceDescription -> UpdateWorkspaceResponse)
-> Lens
UpdateWorkspaceResponse
UpdateWorkspaceResponse
WorkspaceDescription
WorkspaceDescription
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateWorkspaceResponse' {WorkspaceDescription
workspace :: WorkspaceDescription
$sel:workspace:UpdateWorkspaceResponse' :: UpdateWorkspaceResponse -> WorkspaceDescription
workspace} -> WorkspaceDescription
workspace) (\s :: UpdateWorkspaceResponse
s@UpdateWorkspaceResponse' {} WorkspaceDescription
a -> UpdateWorkspaceResponse
s {$sel:workspace:UpdateWorkspaceResponse' :: WorkspaceDescription
workspace = WorkspaceDescription
a} :: UpdateWorkspaceResponse)
instance Prelude.NFData UpdateWorkspaceResponse