{-# 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.IoTSiteWise.BatchDisassociateProjectAssets
-- 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)
--
-- Disassociates a group (batch) of assets from an IoT SiteWise Monitor
-- project.
module Amazonka.IoTSiteWise.BatchDisassociateProjectAssets
  ( -- * Creating a Request
    BatchDisassociateProjectAssets (..),
    newBatchDisassociateProjectAssets,

    -- * Request Lenses
    batchDisassociateProjectAssets_clientToken,
    batchDisassociateProjectAssets_projectId,
    batchDisassociateProjectAssets_assetIds,

    -- * Destructuring the Response
    BatchDisassociateProjectAssetsResponse (..),
    newBatchDisassociateProjectAssetsResponse,

    -- * Response Lenses
    batchDisassociateProjectAssetsResponse_errors,
    batchDisassociateProjectAssetsResponse_httpStatus,
  )
where

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

-- | /See:/ 'newBatchDisassociateProjectAssets' smart constructor.
data BatchDisassociateProjectAssets = BatchDisassociateProjectAssets'
  { -- | A unique case-sensitive identifier that you can provide to ensure the
    -- idempotency of the request. Don\'t reuse this client token if a new
    -- idempotent request is required.
    BatchDisassociateProjectAssets -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
    -- | The ID of the project from which to disassociate the assets.
    BatchDisassociateProjectAssets -> Text
projectId :: Prelude.Text,
    -- | The IDs of the assets to be disassociated from the project.
    BatchDisassociateProjectAssets -> NonEmpty Text
assetIds :: Prelude.NonEmpty Prelude.Text
  }
  deriving (BatchDisassociateProjectAssets
-> BatchDisassociateProjectAssets -> Bool
(BatchDisassociateProjectAssets
 -> BatchDisassociateProjectAssets -> Bool)
-> (BatchDisassociateProjectAssets
    -> BatchDisassociateProjectAssets -> Bool)
-> Eq BatchDisassociateProjectAssets
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchDisassociateProjectAssets
-> BatchDisassociateProjectAssets -> Bool
$c/= :: BatchDisassociateProjectAssets
-> BatchDisassociateProjectAssets -> Bool
== :: BatchDisassociateProjectAssets
-> BatchDisassociateProjectAssets -> Bool
$c== :: BatchDisassociateProjectAssets
-> BatchDisassociateProjectAssets -> Bool
Prelude.Eq, ReadPrec [BatchDisassociateProjectAssets]
ReadPrec BatchDisassociateProjectAssets
Int -> ReadS BatchDisassociateProjectAssets
ReadS [BatchDisassociateProjectAssets]
(Int -> ReadS BatchDisassociateProjectAssets)
-> ReadS [BatchDisassociateProjectAssets]
-> ReadPrec BatchDisassociateProjectAssets
-> ReadPrec [BatchDisassociateProjectAssets]
-> Read BatchDisassociateProjectAssets
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchDisassociateProjectAssets]
$creadListPrec :: ReadPrec [BatchDisassociateProjectAssets]
readPrec :: ReadPrec BatchDisassociateProjectAssets
$creadPrec :: ReadPrec BatchDisassociateProjectAssets
readList :: ReadS [BatchDisassociateProjectAssets]
$creadList :: ReadS [BatchDisassociateProjectAssets]
readsPrec :: Int -> ReadS BatchDisassociateProjectAssets
$creadsPrec :: Int -> ReadS BatchDisassociateProjectAssets
Prelude.Read, Int -> BatchDisassociateProjectAssets -> ShowS
[BatchDisassociateProjectAssets] -> ShowS
BatchDisassociateProjectAssets -> String
(Int -> BatchDisassociateProjectAssets -> ShowS)
-> (BatchDisassociateProjectAssets -> String)
-> ([BatchDisassociateProjectAssets] -> ShowS)
-> Show BatchDisassociateProjectAssets
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchDisassociateProjectAssets] -> ShowS
$cshowList :: [BatchDisassociateProjectAssets] -> ShowS
show :: BatchDisassociateProjectAssets -> String
$cshow :: BatchDisassociateProjectAssets -> String
showsPrec :: Int -> BatchDisassociateProjectAssets -> ShowS
$cshowsPrec :: Int -> BatchDisassociateProjectAssets -> ShowS
Prelude.Show, (forall x.
 BatchDisassociateProjectAssets
 -> Rep BatchDisassociateProjectAssets x)
-> (forall x.
    Rep BatchDisassociateProjectAssets x
    -> BatchDisassociateProjectAssets)
-> Generic BatchDisassociateProjectAssets
forall x.
Rep BatchDisassociateProjectAssets x
-> BatchDisassociateProjectAssets
forall x.
BatchDisassociateProjectAssets
-> Rep BatchDisassociateProjectAssets x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchDisassociateProjectAssets x
-> BatchDisassociateProjectAssets
$cfrom :: forall x.
BatchDisassociateProjectAssets
-> Rep BatchDisassociateProjectAssets x
Prelude.Generic)

-- |
-- Create a value of 'BatchDisassociateProjectAssets' 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:
--
-- 'clientToken', 'batchDisassociateProjectAssets_clientToken' - A unique case-sensitive identifier that you can provide to ensure the
-- idempotency of the request. Don\'t reuse this client token if a new
-- idempotent request is required.
--
-- 'projectId', 'batchDisassociateProjectAssets_projectId' - The ID of the project from which to disassociate the assets.
--
-- 'assetIds', 'batchDisassociateProjectAssets_assetIds' - The IDs of the assets to be disassociated from the project.
newBatchDisassociateProjectAssets ::
  -- | 'projectId'
  Prelude.Text ->
  -- | 'assetIds'
  Prelude.NonEmpty Prelude.Text ->
  BatchDisassociateProjectAssets
newBatchDisassociateProjectAssets :: Text -> NonEmpty Text -> BatchDisassociateProjectAssets
newBatchDisassociateProjectAssets
  Text
pProjectId_
  NonEmpty Text
pAssetIds_ =
    BatchDisassociateProjectAssets' :: Maybe Text
-> Text -> NonEmpty Text -> BatchDisassociateProjectAssets
BatchDisassociateProjectAssets'
      { $sel:clientToken:BatchDisassociateProjectAssets' :: Maybe Text
clientToken =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:projectId:BatchDisassociateProjectAssets' :: Text
projectId = Text
pProjectId_,
        $sel:assetIds:BatchDisassociateProjectAssets' :: NonEmpty Text
assetIds = Tagged (NonEmpty Text) (Identity (NonEmpty Text))
-> Tagged (NonEmpty Text) (Identity (NonEmpty Text))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced (Tagged (NonEmpty Text) (Identity (NonEmpty Text))
 -> Tagged (NonEmpty Text) (Identity (NonEmpty Text)))
-> NonEmpty Text -> NonEmpty Text
forall t b. AReview t b -> b -> t
Lens.# NonEmpty Text
pAssetIds_
      }

-- | A unique case-sensitive identifier that you can provide to ensure the
-- idempotency of the request. Don\'t reuse this client token if a new
-- idempotent request is required.
batchDisassociateProjectAssets_clientToken :: Lens.Lens' BatchDisassociateProjectAssets (Prelude.Maybe Prelude.Text)
batchDisassociateProjectAssets_clientToken :: (Maybe Text -> f (Maybe Text))
-> BatchDisassociateProjectAssets
-> f BatchDisassociateProjectAssets
batchDisassociateProjectAssets_clientToken = (BatchDisassociateProjectAssets -> Maybe Text)
-> (BatchDisassociateProjectAssets
    -> Maybe Text -> BatchDisassociateProjectAssets)
-> Lens
     BatchDisassociateProjectAssets
     BatchDisassociateProjectAssets
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDisassociateProjectAssets' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:BatchDisassociateProjectAssets' :: BatchDisassociateProjectAssets -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: BatchDisassociateProjectAssets
s@BatchDisassociateProjectAssets' {} Maybe Text
a -> BatchDisassociateProjectAssets
s {$sel:clientToken:BatchDisassociateProjectAssets' :: Maybe Text
clientToken = Maybe Text
a} :: BatchDisassociateProjectAssets)

-- | The ID of the project from which to disassociate the assets.
batchDisassociateProjectAssets_projectId :: Lens.Lens' BatchDisassociateProjectAssets Prelude.Text
batchDisassociateProjectAssets_projectId :: (Text -> f Text)
-> BatchDisassociateProjectAssets
-> f BatchDisassociateProjectAssets
batchDisassociateProjectAssets_projectId = (BatchDisassociateProjectAssets -> Text)
-> (BatchDisassociateProjectAssets
    -> Text -> BatchDisassociateProjectAssets)
-> Lens
     BatchDisassociateProjectAssets
     BatchDisassociateProjectAssets
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDisassociateProjectAssets' {Text
projectId :: Text
$sel:projectId:BatchDisassociateProjectAssets' :: BatchDisassociateProjectAssets -> Text
projectId} -> Text
projectId) (\s :: BatchDisassociateProjectAssets
s@BatchDisassociateProjectAssets' {} Text
a -> BatchDisassociateProjectAssets
s {$sel:projectId:BatchDisassociateProjectAssets' :: Text
projectId = Text
a} :: BatchDisassociateProjectAssets)

-- | The IDs of the assets to be disassociated from the project.
batchDisassociateProjectAssets_assetIds :: Lens.Lens' BatchDisassociateProjectAssets (Prelude.NonEmpty Prelude.Text)
batchDisassociateProjectAssets_assetIds :: (NonEmpty Text -> f (NonEmpty Text))
-> BatchDisassociateProjectAssets
-> f BatchDisassociateProjectAssets
batchDisassociateProjectAssets_assetIds = (BatchDisassociateProjectAssets -> NonEmpty Text)
-> (BatchDisassociateProjectAssets
    -> NonEmpty Text -> BatchDisassociateProjectAssets)
-> Lens
     BatchDisassociateProjectAssets
     BatchDisassociateProjectAssets
     (NonEmpty Text)
     (NonEmpty Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDisassociateProjectAssets' {NonEmpty Text
assetIds :: NonEmpty Text
$sel:assetIds:BatchDisassociateProjectAssets' :: BatchDisassociateProjectAssets -> NonEmpty Text
assetIds} -> NonEmpty Text
assetIds) (\s :: BatchDisassociateProjectAssets
s@BatchDisassociateProjectAssets' {} NonEmpty Text
a -> BatchDisassociateProjectAssets
s {$sel:assetIds:BatchDisassociateProjectAssets' :: NonEmpty Text
assetIds = NonEmpty Text
a} :: BatchDisassociateProjectAssets) ((NonEmpty Text -> f (NonEmpty Text))
 -> BatchDisassociateProjectAssets
 -> f BatchDisassociateProjectAssets)
-> ((NonEmpty Text -> f (NonEmpty Text))
    -> NonEmpty Text -> f (NonEmpty Text))
-> (NonEmpty Text -> f (NonEmpty Text))
-> BatchDisassociateProjectAssets
-> f BatchDisassociateProjectAssets
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (NonEmpty Text -> f (NonEmpty Text))
-> NonEmpty Text -> f (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance
  Core.AWSRequest
    BatchDisassociateProjectAssets
  where
  type
    AWSResponse BatchDisassociateProjectAssets =
      BatchDisassociateProjectAssetsResponse
  request :: BatchDisassociateProjectAssets
-> Request BatchDisassociateProjectAssets
request = Service
-> BatchDisassociateProjectAssets
-> Request BatchDisassociateProjectAssets
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy BatchDisassociateProjectAssets
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse BatchDisassociateProjectAssets)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse BatchDisassociateProjectAssets))
-> Logger
-> Service
-> Proxy BatchDisassociateProjectAssets
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse BatchDisassociateProjectAssets)))
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 [AssetErrorDetails]
-> Int -> BatchDisassociateProjectAssetsResponse
BatchDisassociateProjectAssetsResponse'
            (Maybe [AssetErrorDetails]
 -> Int -> BatchDisassociateProjectAssetsResponse)
-> Either String (Maybe [AssetErrorDetails])
-> Either String (Int -> BatchDisassociateProjectAssetsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [AssetErrorDetails]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"errors" Either String (Maybe (Maybe [AssetErrorDetails]))
-> Maybe [AssetErrorDetails]
-> Either String (Maybe [AssetErrorDetails])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [AssetErrorDetails]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> BatchDisassociateProjectAssetsResponse)
-> Either String Int
-> Either String BatchDisassociateProjectAssetsResponse
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
    BatchDisassociateProjectAssets

instance
  Prelude.NFData
    BatchDisassociateProjectAssets

instance
  Core.ToHeaders
    BatchDisassociateProjectAssets
  where
  toHeaders :: BatchDisassociateProjectAssets -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> BatchDisassociateProjectAssets -> 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 BatchDisassociateProjectAssets where
  toJSON :: BatchDisassociateProjectAssets -> Value
toJSON BatchDisassociateProjectAssets' {Maybe Text
NonEmpty Text
Text
assetIds :: NonEmpty Text
projectId :: Text
clientToken :: Maybe Text
$sel:assetIds:BatchDisassociateProjectAssets' :: BatchDisassociateProjectAssets -> NonEmpty Text
$sel:projectId:BatchDisassociateProjectAssets' :: BatchDisassociateProjectAssets -> Text
$sel:clientToken:BatchDisassociateProjectAssets' :: BatchDisassociateProjectAssets -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"clientToken" 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
clientToken,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"assetIds" Text -> NonEmpty Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= NonEmpty Text
assetIds)
          ]
      )

instance Core.ToPath BatchDisassociateProjectAssets where
  toPath :: BatchDisassociateProjectAssets -> ByteString
toPath BatchDisassociateProjectAssets' {Maybe Text
NonEmpty Text
Text
assetIds :: NonEmpty Text
projectId :: Text
clientToken :: Maybe Text
$sel:assetIds:BatchDisassociateProjectAssets' :: BatchDisassociateProjectAssets -> NonEmpty Text
$sel:projectId:BatchDisassociateProjectAssets' :: BatchDisassociateProjectAssets -> Text
$sel:clientToken:BatchDisassociateProjectAssets' :: BatchDisassociateProjectAssets -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/projects/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
projectId,
        ByteString
"/assets/disassociate"
      ]

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

-- | /See:/ 'newBatchDisassociateProjectAssetsResponse' smart constructor.
data BatchDisassociateProjectAssetsResponse = BatchDisassociateProjectAssetsResponse'
  { -- | A list of associated error information, if any.
    BatchDisassociateProjectAssetsResponse -> Maybe [AssetErrorDetails]
errors :: Prelude.Maybe [AssetErrorDetails],
    -- | The response's http status code.
    BatchDisassociateProjectAssetsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (BatchDisassociateProjectAssetsResponse
-> BatchDisassociateProjectAssetsResponse -> Bool
(BatchDisassociateProjectAssetsResponse
 -> BatchDisassociateProjectAssetsResponse -> Bool)
-> (BatchDisassociateProjectAssetsResponse
    -> BatchDisassociateProjectAssetsResponse -> Bool)
-> Eq BatchDisassociateProjectAssetsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchDisassociateProjectAssetsResponse
-> BatchDisassociateProjectAssetsResponse -> Bool
$c/= :: BatchDisassociateProjectAssetsResponse
-> BatchDisassociateProjectAssetsResponse -> Bool
== :: BatchDisassociateProjectAssetsResponse
-> BatchDisassociateProjectAssetsResponse -> Bool
$c== :: BatchDisassociateProjectAssetsResponse
-> BatchDisassociateProjectAssetsResponse -> Bool
Prelude.Eq, ReadPrec [BatchDisassociateProjectAssetsResponse]
ReadPrec BatchDisassociateProjectAssetsResponse
Int -> ReadS BatchDisassociateProjectAssetsResponse
ReadS [BatchDisassociateProjectAssetsResponse]
(Int -> ReadS BatchDisassociateProjectAssetsResponse)
-> ReadS [BatchDisassociateProjectAssetsResponse]
-> ReadPrec BatchDisassociateProjectAssetsResponse
-> ReadPrec [BatchDisassociateProjectAssetsResponse]
-> Read BatchDisassociateProjectAssetsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchDisassociateProjectAssetsResponse]
$creadListPrec :: ReadPrec [BatchDisassociateProjectAssetsResponse]
readPrec :: ReadPrec BatchDisassociateProjectAssetsResponse
$creadPrec :: ReadPrec BatchDisassociateProjectAssetsResponse
readList :: ReadS [BatchDisassociateProjectAssetsResponse]
$creadList :: ReadS [BatchDisassociateProjectAssetsResponse]
readsPrec :: Int -> ReadS BatchDisassociateProjectAssetsResponse
$creadsPrec :: Int -> ReadS BatchDisassociateProjectAssetsResponse
Prelude.Read, Int -> BatchDisassociateProjectAssetsResponse -> ShowS
[BatchDisassociateProjectAssetsResponse] -> ShowS
BatchDisassociateProjectAssetsResponse -> String
(Int -> BatchDisassociateProjectAssetsResponse -> ShowS)
-> (BatchDisassociateProjectAssetsResponse -> String)
-> ([BatchDisassociateProjectAssetsResponse] -> ShowS)
-> Show BatchDisassociateProjectAssetsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchDisassociateProjectAssetsResponse] -> ShowS
$cshowList :: [BatchDisassociateProjectAssetsResponse] -> ShowS
show :: BatchDisassociateProjectAssetsResponse -> String
$cshow :: BatchDisassociateProjectAssetsResponse -> String
showsPrec :: Int -> BatchDisassociateProjectAssetsResponse -> ShowS
$cshowsPrec :: Int -> BatchDisassociateProjectAssetsResponse -> ShowS
Prelude.Show, (forall x.
 BatchDisassociateProjectAssetsResponse
 -> Rep BatchDisassociateProjectAssetsResponse x)
-> (forall x.
    Rep BatchDisassociateProjectAssetsResponse x
    -> BatchDisassociateProjectAssetsResponse)
-> Generic BatchDisassociateProjectAssetsResponse
forall x.
Rep BatchDisassociateProjectAssetsResponse x
-> BatchDisassociateProjectAssetsResponse
forall x.
BatchDisassociateProjectAssetsResponse
-> Rep BatchDisassociateProjectAssetsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchDisassociateProjectAssetsResponse x
-> BatchDisassociateProjectAssetsResponse
$cfrom :: forall x.
BatchDisassociateProjectAssetsResponse
-> Rep BatchDisassociateProjectAssetsResponse x
Prelude.Generic)

-- |
-- Create a value of 'BatchDisassociateProjectAssetsResponse' 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:
--
-- 'errors', 'batchDisassociateProjectAssetsResponse_errors' - A list of associated error information, if any.
--
-- 'httpStatus', 'batchDisassociateProjectAssetsResponse_httpStatus' - The response's http status code.
newBatchDisassociateProjectAssetsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  BatchDisassociateProjectAssetsResponse
newBatchDisassociateProjectAssetsResponse :: Int -> BatchDisassociateProjectAssetsResponse
newBatchDisassociateProjectAssetsResponse
  Int
pHttpStatus_ =
    BatchDisassociateProjectAssetsResponse' :: Maybe [AssetErrorDetails]
-> Int -> BatchDisassociateProjectAssetsResponse
BatchDisassociateProjectAssetsResponse'
      { $sel:errors:BatchDisassociateProjectAssetsResponse' :: Maybe [AssetErrorDetails]
errors =
          Maybe [AssetErrorDetails]
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:BatchDisassociateProjectAssetsResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | A list of associated error information, if any.
batchDisassociateProjectAssetsResponse_errors :: Lens.Lens' BatchDisassociateProjectAssetsResponse (Prelude.Maybe [AssetErrorDetails])
batchDisassociateProjectAssetsResponse_errors :: (Maybe [AssetErrorDetails] -> f (Maybe [AssetErrorDetails]))
-> BatchDisassociateProjectAssetsResponse
-> f BatchDisassociateProjectAssetsResponse
batchDisassociateProjectAssetsResponse_errors = (BatchDisassociateProjectAssetsResponse
 -> Maybe [AssetErrorDetails])
-> (BatchDisassociateProjectAssetsResponse
    -> Maybe [AssetErrorDetails]
    -> BatchDisassociateProjectAssetsResponse)
-> Lens
     BatchDisassociateProjectAssetsResponse
     BatchDisassociateProjectAssetsResponse
     (Maybe [AssetErrorDetails])
     (Maybe [AssetErrorDetails])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchDisassociateProjectAssetsResponse' {Maybe [AssetErrorDetails]
errors :: Maybe [AssetErrorDetails]
$sel:errors:BatchDisassociateProjectAssetsResponse' :: BatchDisassociateProjectAssetsResponse -> Maybe [AssetErrorDetails]
errors} -> Maybe [AssetErrorDetails]
errors) (\s :: BatchDisassociateProjectAssetsResponse
s@BatchDisassociateProjectAssetsResponse' {} Maybe [AssetErrorDetails]
a -> BatchDisassociateProjectAssetsResponse
s {$sel:errors:BatchDisassociateProjectAssetsResponse' :: Maybe [AssetErrorDetails]
errors = Maybe [AssetErrorDetails]
a} :: BatchDisassociateProjectAssetsResponse) ((Maybe [AssetErrorDetails] -> f (Maybe [AssetErrorDetails]))
 -> BatchDisassociateProjectAssetsResponse
 -> f BatchDisassociateProjectAssetsResponse)
-> ((Maybe [AssetErrorDetails] -> f (Maybe [AssetErrorDetails]))
    -> Maybe [AssetErrorDetails] -> f (Maybe [AssetErrorDetails]))
-> (Maybe [AssetErrorDetails] -> f (Maybe [AssetErrorDetails]))
-> BatchDisassociateProjectAssetsResponse
-> f BatchDisassociateProjectAssetsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [AssetErrorDetails]
  [AssetErrorDetails]
  [AssetErrorDetails]
  [AssetErrorDetails]
-> Iso
     (Maybe [AssetErrorDetails])
     (Maybe [AssetErrorDetails])
     (Maybe [AssetErrorDetails])
     (Maybe [AssetErrorDetails])
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
  [AssetErrorDetails]
  [AssetErrorDetails]
  [AssetErrorDetails]
  [AssetErrorDetails]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    BatchDisassociateProjectAssetsResponse