{-# 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.Redshift.ModifyClusterIamRoles
-- 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)
--
-- Modifies the list of Identity and Access Management (IAM) roles that can
-- be used by the cluster to access other Amazon Web Services services.
--
-- A cluster can have up to 10 IAM roles associated at any time.
module Amazonka.Redshift.ModifyClusterIamRoles
  ( -- * Creating a Request
    ModifyClusterIamRoles (..),
    newModifyClusterIamRoles,

    -- * Request Lenses
    modifyClusterIamRoles_removeIamRoles,
    modifyClusterIamRoles_addIamRoles,
    modifyClusterIamRoles_clusterIdentifier,

    -- * Destructuring the Response
    ModifyClusterIamRolesResponse (..),
    newModifyClusterIamRolesResponse,

    -- * Response Lenses
    modifyClusterIamRolesResponse_cluster,
    modifyClusterIamRolesResponse_httpStatus,
  )
where

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

-- |
--
-- /See:/ 'newModifyClusterIamRoles' smart constructor.
data ModifyClusterIamRoles = ModifyClusterIamRoles'
  { -- | Zero or more IAM roles in ARN format to disassociate from the cluster.
    -- You can disassociate up to 10 IAM roles from a single cluster in a
    -- single request.
    ModifyClusterIamRoles -> Maybe [Text]
removeIamRoles :: Prelude.Maybe [Prelude.Text],
    -- | Zero or more IAM roles to associate with the cluster. The roles must be
    -- in their Amazon Resource Name (ARN) format. You can associate up to 10
    -- IAM roles with a single cluster in a single request.
    ModifyClusterIamRoles -> Maybe [Text]
addIamRoles :: Prelude.Maybe [Prelude.Text],
    -- | The unique identifier of the cluster for which you want to associate or
    -- disassociate IAM roles.
    ModifyClusterIamRoles -> Text
clusterIdentifier :: Prelude.Text
  }
  deriving (ModifyClusterIamRoles -> ModifyClusterIamRoles -> Bool
(ModifyClusterIamRoles -> ModifyClusterIamRoles -> Bool)
-> (ModifyClusterIamRoles -> ModifyClusterIamRoles -> Bool)
-> Eq ModifyClusterIamRoles
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModifyClusterIamRoles -> ModifyClusterIamRoles -> Bool
$c/= :: ModifyClusterIamRoles -> ModifyClusterIamRoles -> Bool
== :: ModifyClusterIamRoles -> ModifyClusterIamRoles -> Bool
$c== :: ModifyClusterIamRoles -> ModifyClusterIamRoles -> Bool
Prelude.Eq, ReadPrec [ModifyClusterIamRoles]
ReadPrec ModifyClusterIamRoles
Int -> ReadS ModifyClusterIamRoles
ReadS [ModifyClusterIamRoles]
(Int -> ReadS ModifyClusterIamRoles)
-> ReadS [ModifyClusterIamRoles]
-> ReadPrec ModifyClusterIamRoles
-> ReadPrec [ModifyClusterIamRoles]
-> Read ModifyClusterIamRoles
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ModifyClusterIamRoles]
$creadListPrec :: ReadPrec [ModifyClusterIamRoles]
readPrec :: ReadPrec ModifyClusterIamRoles
$creadPrec :: ReadPrec ModifyClusterIamRoles
readList :: ReadS [ModifyClusterIamRoles]
$creadList :: ReadS [ModifyClusterIamRoles]
readsPrec :: Int -> ReadS ModifyClusterIamRoles
$creadsPrec :: Int -> ReadS ModifyClusterIamRoles
Prelude.Read, Int -> ModifyClusterIamRoles -> ShowS
[ModifyClusterIamRoles] -> ShowS
ModifyClusterIamRoles -> String
(Int -> ModifyClusterIamRoles -> ShowS)
-> (ModifyClusterIamRoles -> String)
-> ([ModifyClusterIamRoles] -> ShowS)
-> Show ModifyClusterIamRoles
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModifyClusterIamRoles] -> ShowS
$cshowList :: [ModifyClusterIamRoles] -> ShowS
show :: ModifyClusterIamRoles -> String
$cshow :: ModifyClusterIamRoles -> String
showsPrec :: Int -> ModifyClusterIamRoles -> ShowS
$cshowsPrec :: Int -> ModifyClusterIamRoles -> ShowS
Prelude.Show, (forall x. ModifyClusterIamRoles -> Rep ModifyClusterIamRoles x)
-> (forall x. Rep ModifyClusterIamRoles x -> ModifyClusterIamRoles)
-> Generic ModifyClusterIamRoles
forall x. Rep ModifyClusterIamRoles x -> ModifyClusterIamRoles
forall x. ModifyClusterIamRoles -> Rep ModifyClusterIamRoles x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ModifyClusterIamRoles x -> ModifyClusterIamRoles
$cfrom :: forall x. ModifyClusterIamRoles -> Rep ModifyClusterIamRoles x
Prelude.Generic)

-- |
-- Create a value of 'ModifyClusterIamRoles' 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:
--
-- 'removeIamRoles', 'modifyClusterIamRoles_removeIamRoles' - Zero or more IAM roles in ARN format to disassociate from the cluster.
-- You can disassociate up to 10 IAM roles from a single cluster in a
-- single request.
--
-- 'addIamRoles', 'modifyClusterIamRoles_addIamRoles' - Zero or more IAM roles to associate with the cluster. The roles must be
-- in their Amazon Resource Name (ARN) format. You can associate up to 10
-- IAM roles with a single cluster in a single request.
--
-- 'clusterIdentifier', 'modifyClusterIamRoles_clusterIdentifier' - The unique identifier of the cluster for which you want to associate or
-- disassociate IAM roles.
newModifyClusterIamRoles ::
  -- | 'clusterIdentifier'
  Prelude.Text ->
  ModifyClusterIamRoles
newModifyClusterIamRoles :: Text -> ModifyClusterIamRoles
newModifyClusterIamRoles Text
pClusterIdentifier_ =
  ModifyClusterIamRoles' :: Maybe [Text] -> Maybe [Text] -> Text -> ModifyClusterIamRoles
ModifyClusterIamRoles'
    { $sel:removeIamRoles:ModifyClusterIamRoles' :: Maybe [Text]
removeIamRoles =
        Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:addIamRoles:ModifyClusterIamRoles' :: Maybe [Text]
addIamRoles = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:clusterIdentifier:ModifyClusterIamRoles' :: Text
clusterIdentifier = Text
pClusterIdentifier_
    }

-- | Zero or more IAM roles in ARN format to disassociate from the cluster.
-- You can disassociate up to 10 IAM roles from a single cluster in a
-- single request.
modifyClusterIamRoles_removeIamRoles :: Lens.Lens' ModifyClusterIamRoles (Prelude.Maybe [Prelude.Text])
modifyClusterIamRoles_removeIamRoles :: (Maybe [Text] -> f (Maybe [Text]))
-> ModifyClusterIamRoles -> f ModifyClusterIamRoles
modifyClusterIamRoles_removeIamRoles = (ModifyClusterIamRoles -> Maybe [Text])
-> (ModifyClusterIamRoles -> Maybe [Text] -> ModifyClusterIamRoles)
-> Lens
     ModifyClusterIamRoles
     ModifyClusterIamRoles
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyClusterIamRoles' {Maybe [Text]
removeIamRoles :: Maybe [Text]
$sel:removeIamRoles:ModifyClusterIamRoles' :: ModifyClusterIamRoles -> Maybe [Text]
removeIamRoles} -> Maybe [Text]
removeIamRoles) (\s :: ModifyClusterIamRoles
s@ModifyClusterIamRoles' {} Maybe [Text]
a -> ModifyClusterIamRoles
s {$sel:removeIamRoles:ModifyClusterIamRoles' :: Maybe [Text]
removeIamRoles = Maybe [Text]
a} :: ModifyClusterIamRoles) ((Maybe [Text] -> f (Maybe [Text]))
 -> ModifyClusterIamRoles -> f ModifyClusterIamRoles)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ModifyClusterIamRoles
-> f ModifyClusterIamRoles
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Zero or more IAM roles to associate with the cluster. The roles must be
-- in their Amazon Resource Name (ARN) format. You can associate up to 10
-- IAM roles with a single cluster in a single request.
modifyClusterIamRoles_addIamRoles :: Lens.Lens' ModifyClusterIamRoles (Prelude.Maybe [Prelude.Text])
modifyClusterIamRoles_addIamRoles :: (Maybe [Text] -> f (Maybe [Text]))
-> ModifyClusterIamRoles -> f ModifyClusterIamRoles
modifyClusterIamRoles_addIamRoles = (ModifyClusterIamRoles -> Maybe [Text])
-> (ModifyClusterIamRoles -> Maybe [Text] -> ModifyClusterIamRoles)
-> Lens
     ModifyClusterIamRoles
     ModifyClusterIamRoles
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyClusterIamRoles' {Maybe [Text]
addIamRoles :: Maybe [Text]
$sel:addIamRoles:ModifyClusterIamRoles' :: ModifyClusterIamRoles -> Maybe [Text]
addIamRoles} -> Maybe [Text]
addIamRoles) (\s :: ModifyClusterIamRoles
s@ModifyClusterIamRoles' {} Maybe [Text]
a -> ModifyClusterIamRoles
s {$sel:addIamRoles:ModifyClusterIamRoles' :: Maybe [Text]
addIamRoles = Maybe [Text]
a} :: ModifyClusterIamRoles) ((Maybe [Text] -> f (Maybe [Text]))
 -> ModifyClusterIamRoles -> f ModifyClusterIamRoles)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ModifyClusterIamRoles
-> f ModifyClusterIamRoles
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The unique identifier of the cluster for which you want to associate or
-- disassociate IAM roles.
modifyClusterIamRoles_clusterIdentifier :: Lens.Lens' ModifyClusterIamRoles Prelude.Text
modifyClusterIamRoles_clusterIdentifier :: (Text -> f Text)
-> ModifyClusterIamRoles -> f ModifyClusterIamRoles
modifyClusterIamRoles_clusterIdentifier = (ModifyClusterIamRoles -> Text)
-> (ModifyClusterIamRoles -> Text -> ModifyClusterIamRoles)
-> Lens ModifyClusterIamRoles ModifyClusterIamRoles Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyClusterIamRoles' {Text
clusterIdentifier :: Text
$sel:clusterIdentifier:ModifyClusterIamRoles' :: ModifyClusterIamRoles -> Text
clusterIdentifier} -> Text
clusterIdentifier) (\s :: ModifyClusterIamRoles
s@ModifyClusterIamRoles' {} Text
a -> ModifyClusterIamRoles
s {$sel:clusterIdentifier:ModifyClusterIamRoles' :: Text
clusterIdentifier = Text
a} :: ModifyClusterIamRoles)

instance Core.AWSRequest ModifyClusterIamRoles where
  type
    AWSResponse ModifyClusterIamRoles =
      ModifyClusterIamRolesResponse
  request :: ModifyClusterIamRoles -> Request ModifyClusterIamRoles
request = Service -> ModifyClusterIamRoles -> Request ModifyClusterIamRoles
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy ModifyClusterIamRoles
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ModifyClusterIamRoles)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse ModifyClusterIamRoles))
-> Logger
-> Service
-> Proxy ModifyClusterIamRoles
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ModifyClusterIamRoles)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"ModifyClusterIamRolesResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Cluster -> Int -> ModifyClusterIamRolesResponse
ModifyClusterIamRolesResponse'
            (Maybe Cluster -> Int -> ModifyClusterIamRolesResponse)
-> Either String (Maybe Cluster)
-> Either String (Int -> ModifyClusterIamRolesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Cluster)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"Cluster")
            Either String (Int -> ModifyClusterIamRolesResponse)
-> Either String Int -> Either String ModifyClusterIamRolesResponse
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 ModifyClusterIamRoles

instance Prelude.NFData ModifyClusterIamRoles

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

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

instance Core.ToQuery ModifyClusterIamRoles where
  toQuery :: ModifyClusterIamRoles -> QueryString
toQuery ModifyClusterIamRoles' {Maybe [Text]
Text
clusterIdentifier :: Text
addIamRoles :: Maybe [Text]
removeIamRoles :: Maybe [Text]
$sel:clusterIdentifier:ModifyClusterIamRoles' :: ModifyClusterIamRoles -> Text
$sel:addIamRoles:ModifyClusterIamRoles' :: ModifyClusterIamRoles -> Maybe [Text]
$sel:removeIamRoles:ModifyClusterIamRoles' :: ModifyClusterIamRoles -> Maybe [Text]
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"ModifyClusterIamRoles" :: Prelude.ByteString),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2012-12-01" :: Prelude.ByteString),
        ByteString
"RemoveIamRoles"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            ( ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"IamRoleArn"
                ([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
removeIamRoles
            ),
        ByteString
"AddIamRoles"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            ( ByteString -> [Text] -> QueryString
forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Core.toQueryList ByteString
"IamRoleArn"
                ([Text] -> QueryString) -> Maybe [Text] -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
addIamRoles
            ),
        ByteString
"ClusterIdentifier" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
clusterIdentifier
      ]

-- | /See:/ 'newModifyClusterIamRolesResponse' smart constructor.
data ModifyClusterIamRolesResponse = ModifyClusterIamRolesResponse'
  { ModifyClusterIamRolesResponse -> Maybe Cluster
cluster :: Prelude.Maybe Cluster,
    -- | The response's http status code.
    ModifyClusterIamRolesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ModifyClusterIamRolesResponse
-> ModifyClusterIamRolesResponse -> Bool
(ModifyClusterIamRolesResponse
 -> ModifyClusterIamRolesResponse -> Bool)
-> (ModifyClusterIamRolesResponse
    -> ModifyClusterIamRolesResponse -> Bool)
-> Eq ModifyClusterIamRolesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ModifyClusterIamRolesResponse
-> ModifyClusterIamRolesResponse -> Bool
$c/= :: ModifyClusterIamRolesResponse
-> ModifyClusterIamRolesResponse -> Bool
== :: ModifyClusterIamRolesResponse
-> ModifyClusterIamRolesResponse -> Bool
$c== :: ModifyClusterIamRolesResponse
-> ModifyClusterIamRolesResponse -> Bool
Prelude.Eq, ReadPrec [ModifyClusterIamRolesResponse]
ReadPrec ModifyClusterIamRolesResponse
Int -> ReadS ModifyClusterIamRolesResponse
ReadS [ModifyClusterIamRolesResponse]
(Int -> ReadS ModifyClusterIamRolesResponse)
-> ReadS [ModifyClusterIamRolesResponse]
-> ReadPrec ModifyClusterIamRolesResponse
-> ReadPrec [ModifyClusterIamRolesResponse]
-> Read ModifyClusterIamRolesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ModifyClusterIamRolesResponse]
$creadListPrec :: ReadPrec [ModifyClusterIamRolesResponse]
readPrec :: ReadPrec ModifyClusterIamRolesResponse
$creadPrec :: ReadPrec ModifyClusterIamRolesResponse
readList :: ReadS [ModifyClusterIamRolesResponse]
$creadList :: ReadS [ModifyClusterIamRolesResponse]
readsPrec :: Int -> ReadS ModifyClusterIamRolesResponse
$creadsPrec :: Int -> ReadS ModifyClusterIamRolesResponse
Prelude.Read, Int -> ModifyClusterIamRolesResponse -> ShowS
[ModifyClusterIamRolesResponse] -> ShowS
ModifyClusterIamRolesResponse -> String
(Int -> ModifyClusterIamRolesResponse -> ShowS)
-> (ModifyClusterIamRolesResponse -> String)
-> ([ModifyClusterIamRolesResponse] -> ShowS)
-> Show ModifyClusterIamRolesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ModifyClusterIamRolesResponse] -> ShowS
$cshowList :: [ModifyClusterIamRolesResponse] -> ShowS
show :: ModifyClusterIamRolesResponse -> String
$cshow :: ModifyClusterIamRolesResponse -> String
showsPrec :: Int -> ModifyClusterIamRolesResponse -> ShowS
$cshowsPrec :: Int -> ModifyClusterIamRolesResponse -> ShowS
Prelude.Show, (forall x.
 ModifyClusterIamRolesResponse
 -> Rep ModifyClusterIamRolesResponse x)
-> (forall x.
    Rep ModifyClusterIamRolesResponse x
    -> ModifyClusterIamRolesResponse)
-> Generic ModifyClusterIamRolesResponse
forall x.
Rep ModifyClusterIamRolesResponse x
-> ModifyClusterIamRolesResponse
forall x.
ModifyClusterIamRolesResponse
-> Rep ModifyClusterIamRolesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ModifyClusterIamRolesResponse x
-> ModifyClusterIamRolesResponse
$cfrom :: forall x.
ModifyClusterIamRolesResponse
-> Rep ModifyClusterIamRolesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ModifyClusterIamRolesResponse' 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:
--
-- 'cluster', 'modifyClusterIamRolesResponse_cluster' - Undocumented member.
--
-- 'httpStatus', 'modifyClusterIamRolesResponse_httpStatus' - The response's http status code.
newModifyClusterIamRolesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ModifyClusterIamRolesResponse
newModifyClusterIamRolesResponse :: Int -> ModifyClusterIamRolesResponse
newModifyClusterIamRolesResponse Int
pHttpStatus_ =
  ModifyClusterIamRolesResponse' :: Maybe Cluster -> Int -> ModifyClusterIamRolesResponse
ModifyClusterIamRolesResponse'
    { $sel:cluster:ModifyClusterIamRolesResponse' :: Maybe Cluster
cluster =
        Maybe Cluster
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ModifyClusterIamRolesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Undocumented member.
modifyClusterIamRolesResponse_cluster :: Lens.Lens' ModifyClusterIamRolesResponse (Prelude.Maybe Cluster)
modifyClusterIamRolesResponse_cluster :: (Maybe Cluster -> f (Maybe Cluster))
-> ModifyClusterIamRolesResponse -> f ModifyClusterIamRolesResponse
modifyClusterIamRolesResponse_cluster = (ModifyClusterIamRolesResponse -> Maybe Cluster)
-> (ModifyClusterIamRolesResponse
    -> Maybe Cluster -> ModifyClusterIamRolesResponse)
-> Lens
     ModifyClusterIamRolesResponse
     ModifyClusterIamRolesResponse
     (Maybe Cluster)
     (Maybe Cluster)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ModifyClusterIamRolesResponse' {Maybe Cluster
cluster :: Maybe Cluster
$sel:cluster:ModifyClusterIamRolesResponse' :: ModifyClusterIamRolesResponse -> Maybe Cluster
cluster} -> Maybe Cluster
cluster) (\s :: ModifyClusterIamRolesResponse
s@ModifyClusterIamRolesResponse' {} Maybe Cluster
a -> ModifyClusterIamRolesResponse
s {$sel:cluster:ModifyClusterIamRolesResponse' :: Maybe Cluster
cluster = Maybe Cluster
a} :: ModifyClusterIamRolesResponse)

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

instance Prelude.NFData ModifyClusterIamRolesResponse