{-# 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.DeviceFarm.UpdateInstanceProfile
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Updates information about an existing private device instance profile.
module Amazonka.DeviceFarm.UpdateInstanceProfile
  ( -- * Creating a Request
    UpdateInstanceProfile (..),
    newUpdateInstanceProfile,

    -- * Request Lenses
    updateInstanceProfile_description,
    updateInstanceProfile_excludeAppPackagesFromCleanup,
    updateInstanceProfile_name,
    updateInstanceProfile_packageCleanup,
    updateInstanceProfile_rebootAfterUse,
    updateInstanceProfile_arn,

    -- * Destructuring the Response
    UpdateInstanceProfileResponse (..),
    newUpdateInstanceProfileResponse,

    -- * Response Lenses
    updateInstanceProfileResponse_instanceProfile,
    updateInstanceProfileResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.DeviceFarm.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newUpdateInstanceProfile' smart constructor.
data UpdateInstanceProfile = UpdateInstanceProfile'
  { -- | The updated description for your instance profile.
    UpdateInstanceProfile -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | An array of strings that specifies the list of app packages that should
    -- not be cleaned up from the device after a test run is over.
    --
    -- The list of packages is only considered if you set @packageCleanup@ to
    -- @true@.
    UpdateInstanceProfile -> Maybe [Text]
excludeAppPackagesFromCleanup :: Prelude.Maybe [Prelude.Text],
    -- | The updated name for your instance profile.
    UpdateInstanceProfile -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The updated choice for whether you want to specify package cleanup. The
    -- default value is @false@ for private devices.
    UpdateInstanceProfile -> Maybe Bool
packageCleanup :: Prelude.Maybe Prelude.Bool,
    -- | The updated choice for whether you want to reboot the device after use.
    -- The default value is @true@.
    UpdateInstanceProfile -> Maybe Bool
rebootAfterUse :: Prelude.Maybe Prelude.Bool,
    -- | The Amazon Resource Name (ARN) of the instance profile.
    UpdateInstanceProfile -> Text
arn :: Prelude.Text
  }
  deriving (UpdateInstanceProfile -> UpdateInstanceProfile -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateInstanceProfile -> UpdateInstanceProfile -> Bool
$c/= :: UpdateInstanceProfile -> UpdateInstanceProfile -> Bool
== :: UpdateInstanceProfile -> UpdateInstanceProfile -> Bool
$c== :: UpdateInstanceProfile -> UpdateInstanceProfile -> Bool
Prelude.Eq, ReadPrec [UpdateInstanceProfile]
ReadPrec UpdateInstanceProfile
Int -> ReadS UpdateInstanceProfile
ReadS [UpdateInstanceProfile]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateInstanceProfile]
$creadListPrec :: ReadPrec [UpdateInstanceProfile]
readPrec :: ReadPrec UpdateInstanceProfile
$creadPrec :: ReadPrec UpdateInstanceProfile
readList :: ReadS [UpdateInstanceProfile]
$creadList :: ReadS [UpdateInstanceProfile]
readsPrec :: Int -> ReadS UpdateInstanceProfile
$creadsPrec :: Int -> ReadS UpdateInstanceProfile
Prelude.Read, Int -> UpdateInstanceProfile -> ShowS
[UpdateInstanceProfile] -> ShowS
UpdateInstanceProfile -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateInstanceProfile] -> ShowS
$cshowList :: [UpdateInstanceProfile] -> ShowS
show :: UpdateInstanceProfile -> String
$cshow :: UpdateInstanceProfile -> String
showsPrec :: Int -> UpdateInstanceProfile -> ShowS
$cshowsPrec :: Int -> UpdateInstanceProfile -> ShowS
Prelude.Show, forall x. Rep UpdateInstanceProfile x -> UpdateInstanceProfile
forall x. UpdateInstanceProfile -> Rep UpdateInstanceProfile x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateInstanceProfile x -> UpdateInstanceProfile
$cfrom :: forall x. UpdateInstanceProfile -> Rep UpdateInstanceProfile x
Prelude.Generic)

-- |
-- Create a value of 'UpdateInstanceProfile' 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:
--
-- 'description', 'updateInstanceProfile_description' - The updated description for your instance profile.
--
-- 'excludeAppPackagesFromCleanup', 'updateInstanceProfile_excludeAppPackagesFromCleanup' - An array of strings that specifies the list of app packages that should
-- not be cleaned up from the device after a test run is over.
--
-- The list of packages is only considered if you set @packageCleanup@ to
-- @true@.
--
-- 'name', 'updateInstanceProfile_name' - The updated name for your instance profile.
--
-- 'packageCleanup', 'updateInstanceProfile_packageCleanup' - The updated choice for whether you want to specify package cleanup. The
-- default value is @false@ for private devices.
--
-- 'rebootAfterUse', 'updateInstanceProfile_rebootAfterUse' - The updated choice for whether you want to reboot the device after use.
-- The default value is @true@.
--
-- 'arn', 'updateInstanceProfile_arn' - The Amazon Resource Name (ARN) of the instance profile.
newUpdateInstanceProfile ::
  -- | 'arn'
  Prelude.Text ->
  UpdateInstanceProfile
newUpdateInstanceProfile :: Text -> UpdateInstanceProfile
newUpdateInstanceProfile Text
pArn_ =
  UpdateInstanceProfile'
    { $sel:description:UpdateInstanceProfile' :: Maybe Text
description =
        forall a. Maybe a
Prelude.Nothing,
      $sel:excludeAppPackagesFromCleanup:UpdateInstanceProfile' :: Maybe [Text]
excludeAppPackagesFromCleanup = forall a. Maybe a
Prelude.Nothing,
      $sel:name:UpdateInstanceProfile' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
      $sel:packageCleanup:UpdateInstanceProfile' :: Maybe Bool
packageCleanup = forall a. Maybe a
Prelude.Nothing,
      $sel:rebootAfterUse:UpdateInstanceProfile' :: Maybe Bool
rebootAfterUse = forall a. Maybe a
Prelude.Nothing,
      $sel:arn:UpdateInstanceProfile' :: Text
arn = Text
pArn_
    }

-- | The updated description for your instance profile.
updateInstanceProfile_description :: Lens.Lens' UpdateInstanceProfile (Prelude.Maybe Prelude.Text)
updateInstanceProfile_description :: Lens' UpdateInstanceProfile (Maybe Text)
updateInstanceProfile_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateInstanceProfile' {Maybe Text
description :: Maybe Text
$sel:description:UpdateInstanceProfile' :: UpdateInstanceProfile -> Maybe Text
description} -> Maybe Text
description) (\s :: UpdateInstanceProfile
s@UpdateInstanceProfile' {} Maybe Text
a -> UpdateInstanceProfile
s {$sel:description:UpdateInstanceProfile' :: Maybe Text
description = Maybe Text
a} :: UpdateInstanceProfile)

-- | An array of strings that specifies the list of app packages that should
-- not be cleaned up from the device after a test run is over.
--
-- The list of packages is only considered if you set @packageCleanup@ to
-- @true@.
updateInstanceProfile_excludeAppPackagesFromCleanup :: Lens.Lens' UpdateInstanceProfile (Prelude.Maybe [Prelude.Text])
updateInstanceProfile_excludeAppPackagesFromCleanup :: Lens' UpdateInstanceProfile (Maybe [Text])
updateInstanceProfile_excludeAppPackagesFromCleanup = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateInstanceProfile' {Maybe [Text]
excludeAppPackagesFromCleanup :: Maybe [Text]
$sel:excludeAppPackagesFromCleanup:UpdateInstanceProfile' :: UpdateInstanceProfile -> Maybe [Text]
excludeAppPackagesFromCleanup} -> Maybe [Text]
excludeAppPackagesFromCleanup) (\s :: UpdateInstanceProfile
s@UpdateInstanceProfile' {} Maybe [Text]
a -> UpdateInstanceProfile
s {$sel:excludeAppPackagesFromCleanup:UpdateInstanceProfile' :: Maybe [Text]
excludeAppPackagesFromCleanup = Maybe [Text]
a} :: UpdateInstanceProfile) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The updated name for your instance profile.
updateInstanceProfile_name :: Lens.Lens' UpdateInstanceProfile (Prelude.Maybe Prelude.Text)
updateInstanceProfile_name :: Lens' UpdateInstanceProfile (Maybe Text)
updateInstanceProfile_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateInstanceProfile' {Maybe Text
name :: Maybe Text
$sel:name:UpdateInstanceProfile' :: UpdateInstanceProfile -> Maybe Text
name} -> Maybe Text
name) (\s :: UpdateInstanceProfile
s@UpdateInstanceProfile' {} Maybe Text
a -> UpdateInstanceProfile
s {$sel:name:UpdateInstanceProfile' :: Maybe Text
name = Maybe Text
a} :: UpdateInstanceProfile)

-- | The updated choice for whether you want to specify package cleanup. The
-- default value is @false@ for private devices.
updateInstanceProfile_packageCleanup :: Lens.Lens' UpdateInstanceProfile (Prelude.Maybe Prelude.Bool)
updateInstanceProfile_packageCleanup :: Lens' UpdateInstanceProfile (Maybe Bool)
updateInstanceProfile_packageCleanup = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateInstanceProfile' {Maybe Bool
packageCleanup :: Maybe Bool
$sel:packageCleanup:UpdateInstanceProfile' :: UpdateInstanceProfile -> Maybe Bool
packageCleanup} -> Maybe Bool
packageCleanup) (\s :: UpdateInstanceProfile
s@UpdateInstanceProfile' {} Maybe Bool
a -> UpdateInstanceProfile
s {$sel:packageCleanup:UpdateInstanceProfile' :: Maybe Bool
packageCleanup = Maybe Bool
a} :: UpdateInstanceProfile)

-- | The updated choice for whether you want to reboot the device after use.
-- The default value is @true@.
updateInstanceProfile_rebootAfterUse :: Lens.Lens' UpdateInstanceProfile (Prelude.Maybe Prelude.Bool)
updateInstanceProfile_rebootAfterUse :: Lens' UpdateInstanceProfile (Maybe Bool)
updateInstanceProfile_rebootAfterUse = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateInstanceProfile' {Maybe Bool
rebootAfterUse :: Maybe Bool
$sel:rebootAfterUse:UpdateInstanceProfile' :: UpdateInstanceProfile -> Maybe Bool
rebootAfterUse} -> Maybe Bool
rebootAfterUse) (\s :: UpdateInstanceProfile
s@UpdateInstanceProfile' {} Maybe Bool
a -> UpdateInstanceProfile
s {$sel:rebootAfterUse:UpdateInstanceProfile' :: Maybe Bool
rebootAfterUse = Maybe Bool
a} :: UpdateInstanceProfile)

-- | The Amazon Resource Name (ARN) of the instance profile.
updateInstanceProfile_arn :: Lens.Lens' UpdateInstanceProfile Prelude.Text
updateInstanceProfile_arn :: Lens' UpdateInstanceProfile Text
updateInstanceProfile_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateInstanceProfile' {Text
arn :: Text
$sel:arn:UpdateInstanceProfile' :: UpdateInstanceProfile -> Text
arn} -> Text
arn) (\s :: UpdateInstanceProfile
s@UpdateInstanceProfile' {} Text
a -> UpdateInstanceProfile
s {$sel:arn:UpdateInstanceProfile' :: Text
arn = Text
a} :: UpdateInstanceProfile)

instance Core.AWSRequest UpdateInstanceProfile where
  type
    AWSResponse UpdateInstanceProfile =
      UpdateInstanceProfileResponse
  request :: (Service -> Service)
-> UpdateInstanceProfile -> Request UpdateInstanceProfile
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy UpdateInstanceProfile
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateInstanceProfile)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe InstanceProfile -> Int -> UpdateInstanceProfileResponse
UpdateInstanceProfileResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"instanceProfile")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable UpdateInstanceProfile where
  hashWithSalt :: Int -> UpdateInstanceProfile -> Int
hashWithSalt Int
_salt UpdateInstanceProfile' {Maybe Bool
Maybe [Text]
Maybe Text
Text
arn :: Text
rebootAfterUse :: Maybe Bool
packageCleanup :: Maybe Bool
name :: Maybe Text
excludeAppPackagesFromCleanup :: Maybe [Text]
description :: Maybe Text
$sel:arn:UpdateInstanceProfile' :: UpdateInstanceProfile -> Text
$sel:rebootAfterUse:UpdateInstanceProfile' :: UpdateInstanceProfile -> Maybe Bool
$sel:packageCleanup:UpdateInstanceProfile' :: UpdateInstanceProfile -> Maybe Bool
$sel:name:UpdateInstanceProfile' :: UpdateInstanceProfile -> Maybe Text
$sel:excludeAppPackagesFromCleanup:UpdateInstanceProfile' :: UpdateInstanceProfile -> Maybe [Text]
$sel:description:UpdateInstanceProfile' :: UpdateInstanceProfile -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
excludeAppPackagesFromCleanup
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
packageCleanup
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
rebootAfterUse
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
arn

instance Prelude.NFData UpdateInstanceProfile where
  rnf :: UpdateInstanceProfile -> ()
rnf UpdateInstanceProfile' {Maybe Bool
Maybe [Text]
Maybe Text
Text
arn :: Text
rebootAfterUse :: Maybe Bool
packageCleanup :: Maybe Bool
name :: Maybe Text
excludeAppPackagesFromCleanup :: Maybe [Text]
description :: Maybe Text
$sel:arn:UpdateInstanceProfile' :: UpdateInstanceProfile -> Text
$sel:rebootAfterUse:UpdateInstanceProfile' :: UpdateInstanceProfile -> Maybe Bool
$sel:packageCleanup:UpdateInstanceProfile' :: UpdateInstanceProfile -> Maybe Bool
$sel:name:UpdateInstanceProfile' :: UpdateInstanceProfile -> Maybe Text
$sel:excludeAppPackagesFromCleanup:UpdateInstanceProfile' :: UpdateInstanceProfile -> Maybe [Text]
$sel:description:UpdateInstanceProfile' :: UpdateInstanceProfile -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
excludeAppPackagesFromCleanup
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
packageCleanup
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
rebootAfterUse
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
arn

instance Data.ToHeaders UpdateInstanceProfile where
  toHeaders :: UpdateInstanceProfile -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"DeviceFarm_20150623.UpdateInstanceProfile" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON UpdateInstanceProfile where
  toJSON :: UpdateInstanceProfile -> Value
toJSON UpdateInstanceProfile' {Maybe Bool
Maybe [Text]
Maybe Text
Text
arn :: Text
rebootAfterUse :: Maybe Bool
packageCleanup :: Maybe Bool
name :: Maybe Text
excludeAppPackagesFromCleanup :: Maybe [Text]
description :: Maybe Text
$sel:arn:UpdateInstanceProfile' :: UpdateInstanceProfile -> Text
$sel:rebootAfterUse:UpdateInstanceProfile' :: UpdateInstanceProfile -> Maybe Bool
$sel:packageCleanup:UpdateInstanceProfile' :: UpdateInstanceProfile -> Maybe Bool
$sel:name:UpdateInstanceProfile' :: UpdateInstanceProfile -> Maybe Text
$sel:excludeAppPackagesFromCleanup:UpdateInstanceProfile' :: UpdateInstanceProfile -> Maybe [Text]
$sel:description:UpdateInstanceProfile' :: UpdateInstanceProfile -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"description" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description,
            (Key
"excludeAppPackagesFromCleanup" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
excludeAppPackagesFromCleanup,
            (Key
"name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
name,
            (Key
"packageCleanup" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
packageCleanup,
            (Key
"rebootAfterUse" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
rebootAfterUse,
            forall a. a -> Maybe a
Prelude.Just (Key
"arn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
arn)
          ]
      )

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

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

-- | /See:/ 'newUpdateInstanceProfileResponse' smart constructor.
data UpdateInstanceProfileResponse = UpdateInstanceProfileResponse'
  { -- | An object that contains information about your instance profile.
    UpdateInstanceProfileResponse -> Maybe InstanceProfile
instanceProfile :: Prelude.Maybe InstanceProfile,
    -- | The response's http status code.
    UpdateInstanceProfileResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateInstanceProfileResponse
-> UpdateInstanceProfileResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateInstanceProfileResponse
-> UpdateInstanceProfileResponse -> Bool
$c/= :: UpdateInstanceProfileResponse
-> UpdateInstanceProfileResponse -> Bool
== :: UpdateInstanceProfileResponse
-> UpdateInstanceProfileResponse -> Bool
$c== :: UpdateInstanceProfileResponse
-> UpdateInstanceProfileResponse -> Bool
Prelude.Eq, ReadPrec [UpdateInstanceProfileResponse]
ReadPrec UpdateInstanceProfileResponse
Int -> ReadS UpdateInstanceProfileResponse
ReadS [UpdateInstanceProfileResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateInstanceProfileResponse]
$creadListPrec :: ReadPrec [UpdateInstanceProfileResponse]
readPrec :: ReadPrec UpdateInstanceProfileResponse
$creadPrec :: ReadPrec UpdateInstanceProfileResponse
readList :: ReadS [UpdateInstanceProfileResponse]
$creadList :: ReadS [UpdateInstanceProfileResponse]
readsPrec :: Int -> ReadS UpdateInstanceProfileResponse
$creadsPrec :: Int -> ReadS UpdateInstanceProfileResponse
Prelude.Read, Int -> UpdateInstanceProfileResponse -> ShowS
[UpdateInstanceProfileResponse] -> ShowS
UpdateInstanceProfileResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateInstanceProfileResponse] -> ShowS
$cshowList :: [UpdateInstanceProfileResponse] -> ShowS
show :: UpdateInstanceProfileResponse -> String
$cshow :: UpdateInstanceProfileResponse -> String
showsPrec :: Int -> UpdateInstanceProfileResponse -> ShowS
$cshowsPrec :: Int -> UpdateInstanceProfileResponse -> ShowS
Prelude.Show, forall x.
Rep UpdateInstanceProfileResponse x
-> UpdateInstanceProfileResponse
forall x.
UpdateInstanceProfileResponse
-> Rep UpdateInstanceProfileResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateInstanceProfileResponse x
-> UpdateInstanceProfileResponse
$cfrom :: forall x.
UpdateInstanceProfileResponse
-> Rep UpdateInstanceProfileResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateInstanceProfileResponse' 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:
--
-- 'instanceProfile', 'updateInstanceProfileResponse_instanceProfile' - An object that contains information about your instance profile.
--
-- 'httpStatus', 'updateInstanceProfileResponse_httpStatus' - The response's http status code.
newUpdateInstanceProfileResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateInstanceProfileResponse
newUpdateInstanceProfileResponse :: Int -> UpdateInstanceProfileResponse
newUpdateInstanceProfileResponse Int
pHttpStatus_ =
  UpdateInstanceProfileResponse'
    { $sel:instanceProfile:UpdateInstanceProfileResponse' :: Maybe InstanceProfile
instanceProfile =
        forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateInstanceProfileResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An object that contains information about your instance profile.
updateInstanceProfileResponse_instanceProfile :: Lens.Lens' UpdateInstanceProfileResponse (Prelude.Maybe InstanceProfile)
updateInstanceProfileResponse_instanceProfile :: Lens' UpdateInstanceProfileResponse (Maybe InstanceProfile)
updateInstanceProfileResponse_instanceProfile = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateInstanceProfileResponse' {Maybe InstanceProfile
instanceProfile :: Maybe InstanceProfile
$sel:instanceProfile:UpdateInstanceProfileResponse' :: UpdateInstanceProfileResponse -> Maybe InstanceProfile
instanceProfile} -> Maybe InstanceProfile
instanceProfile) (\s :: UpdateInstanceProfileResponse
s@UpdateInstanceProfileResponse' {} Maybe InstanceProfile
a -> UpdateInstanceProfileResponse
s {$sel:instanceProfile:UpdateInstanceProfileResponse' :: Maybe InstanceProfile
instanceProfile = Maybe InstanceProfile
a} :: UpdateInstanceProfileResponse)

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

instance Prelude.NFData UpdateInstanceProfileResponse where
  rnf :: UpdateInstanceProfileResponse -> ()
rnf UpdateInstanceProfileResponse' {Int
Maybe InstanceProfile
httpStatus :: Int
instanceProfile :: Maybe InstanceProfile
$sel:httpStatus:UpdateInstanceProfileResponse' :: UpdateInstanceProfileResponse -> Int
$sel:instanceProfile:UpdateInstanceProfileResponse' :: UpdateInstanceProfileResponse -> Maybe InstanceProfile
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe InstanceProfile
instanceProfile
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus