{-# 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.WorkSpaces.CopyWorkspaceImage
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Copies the specified image from the specified Region to the current
-- Region. For more information about copying images, see
-- <https://docs.aws.amazon.com/workspaces/latest/adminguide/copy-custom-image.html Copy a Custom WorkSpaces Image>.
--
-- In the China (Ningxia) Region, you can copy images only within the same
-- Region.
--
-- In Amazon Web Services GovCloud (US), to copy images to and from other
-- Regions, contact Amazon Web Services Support.
--
-- Before copying a shared image, be sure to verify that it has been shared
-- from the correct Amazon Web Services account. To determine if an image
-- has been shared and to see the ID of the Amazon Web Services account
-- that owns an image, use the
-- <https://docs.aws.amazon.com/workspaces/latest/api/API_DescribeWorkspaceImages.html DescribeWorkSpaceImages>
-- and
-- <https://docs.aws.amazon.com/workspaces/latest/api/API_DescribeWorkspaceImagePermissions.html DescribeWorkspaceImagePermissions>
-- API operations.
module Amazonka.WorkSpaces.CopyWorkspaceImage
  ( -- * Creating a Request
    CopyWorkspaceImage (..),
    newCopyWorkspaceImage,

    -- * Request Lenses
    copyWorkspaceImage_description,
    copyWorkspaceImage_tags,
    copyWorkspaceImage_name,
    copyWorkspaceImage_sourceImageId,
    copyWorkspaceImage_sourceRegion,

    -- * Destructuring the Response
    CopyWorkspaceImageResponse (..),
    newCopyWorkspaceImageResponse,

    -- * Response Lenses
    copyWorkspaceImageResponse_imageId,
    copyWorkspaceImageResponse_httpStatus,
  )
where

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

-- | /See:/ 'newCopyWorkspaceImage' smart constructor.
data CopyWorkspaceImage = CopyWorkspaceImage'
  { -- | A description of the image.
    CopyWorkspaceImage -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The tags for the image.
    CopyWorkspaceImage -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The name of the image.
    CopyWorkspaceImage -> Text
name :: Prelude.Text,
    -- | The identifier of the source image.
    CopyWorkspaceImage -> Text
sourceImageId :: Prelude.Text,
    -- | The identifier of the source Region.
    CopyWorkspaceImage -> Text
sourceRegion :: Prelude.Text
  }
  deriving (CopyWorkspaceImage -> CopyWorkspaceImage -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CopyWorkspaceImage -> CopyWorkspaceImage -> Bool
$c/= :: CopyWorkspaceImage -> CopyWorkspaceImage -> Bool
== :: CopyWorkspaceImage -> CopyWorkspaceImage -> Bool
$c== :: CopyWorkspaceImage -> CopyWorkspaceImage -> Bool
Prelude.Eq, ReadPrec [CopyWorkspaceImage]
ReadPrec CopyWorkspaceImage
Int -> ReadS CopyWorkspaceImage
ReadS [CopyWorkspaceImage]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CopyWorkspaceImage]
$creadListPrec :: ReadPrec [CopyWorkspaceImage]
readPrec :: ReadPrec CopyWorkspaceImage
$creadPrec :: ReadPrec CopyWorkspaceImage
readList :: ReadS [CopyWorkspaceImage]
$creadList :: ReadS [CopyWorkspaceImage]
readsPrec :: Int -> ReadS CopyWorkspaceImage
$creadsPrec :: Int -> ReadS CopyWorkspaceImage
Prelude.Read, Int -> CopyWorkspaceImage -> ShowS
[CopyWorkspaceImage] -> ShowS
CopyWorkspaceImage -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CopyWorkspaceImage] -> ShowS
$cshowList :: [CopyWorkspaceImage] -> ShowS
show :: CopyWorkspaceImage -> String
$cshow :: CopyWorkspaceImage -> String
showsPrec :: Int -> CopyWorkspaceImage -> ShowS
$cshowsPrec :: Int -> CopyWorkspaceImage -> ShowS
Prelude.Show, forall x. Rep CopyWorkspaceImage x -> CopyWorkspaceImage
forall x. CopyWorkspaceImage -> Rep CopyWorkspaceImage x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CopyWorkspaceImage x -> CopyWorkspaceImage
$cfrom :: forall x. CopyWorkspaceImage -> Rep CopyWorkspaceImage x
Prelude.Generic)

-- |
-- Create a value of 'CopyWorkspaceImage' 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', 'copyWorkspaceImage_description' - A description of the image.
--
-- 'tags', 'copyWorkspaceImage_tags' - The tags for the image.
--
-- 'name', 'copyWorkspaceImage_name' - The name of the image.
--
-- 'sourceImageId', 'copyWorkspaceImage_sourceImageId' - The identifier of the source image.
--
-- 'sourceRegion', 'copyWorkspaceImage_sourceRegion' - The identifier of the source Region.
newCopyWorkspaceImage ::
  -- | 'name'
  Prelude.Text ->
  -- | 'sourceImageId'
  Prelude.Text ->
  -- | 'sourceRegion'
  Prelude.Text ->
  CopyWorkspaceImage
newCopyWorkspaceImage :: Text -> Text -> Text -> CopyWorkspaceImage
newCopyWorkspaceImage
  Text
pName_
  Text
pSourceImageId_
  Text
pSourceRegion_ =
    CopyWorkspaceImage'
      { $sel:description:CopyWorkspaceImage' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
        $sel:tags:CopyWorkspaceImage' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
        $sel:name:CopyWorkspaceImage' :: Text
name = Text
pName_,
        $sel:sourceImageId:CopyWorkspaceImage' :: Text
sourceImageId = Text
pSourceImageId_,
        $sel:sourceRegion:CopyWorkspaceImage' :: Text
sourceRegion = Text
pSourceRegion_
      }

-- | A description of the image.
copyWorkspaceImage_description :: Lens.Lens' CopyWorkspaceImage (Prelude.Maybe Prelude.Text)
copyWorkspaceImage_description :: Lens' CopyWorkspaceImage (Maybe Text)
copyWorkspaceImage_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyWorkspaceImage' {Maybe Text
description :: Maybe Text
$sel:description:CopyWorkspaceImage' :: CopyWorkspaceImage -> Maybe Text
description} -> Maybe Text
description) (\s :: CopyWorkspaceImage
s@CopyWorkspaceImage' {} Maybe Text
a -> CopyWorkspaceImage
s {$sel:description:CopyWorkspaceImage' :: Maybe Text
description = Maybe Text
a} :: CopyWorkspaceImage)

-- | The tags for the image.
copyWorkspaceImage_tags :: Lens.Lens' CopyWorkspaceImage (Prelude.Maybe [Tag])
copyWorkspaceImage_tags :: Lens' CopyWorkspaceImage (Maybe [Tag])
copyWorkspaceImage_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyWorkspaceImage' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CopyWorkspaceImage' :: CopyWorkspaceImage -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CopyWorkspaceImage
s@CopyWorkspaceImage' {} Maybe [Tag]
a -> CopyWorkspaceImage
s {$sel:tags:CopyWorkspaceImage' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CopyWorkspaceImage) 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 name of the image.
copyWorkspaceImage_name :: Lens.Lens' CopyWorkspaceImage Prelude.Text
copyWorkspaceImage_name :: Lens' CopyWorkspaceImage Text
copyWorkspaceImage_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyWorkspaceImage' {Text
name :: Text
$sel:name:CopyWorkspaceImage' :: CopyWorkspaceImage -> Text
name} -> Text
name) (\s :: CopyWorkspaceImage
s@CopyWorkspaceImage' {} Text
a -> CopyWorkspaceImage
s {$sel:name:CopyWorkspaceImage' :: Text
name = Text
a} :: CopyWorkspaceImage)

-- | The identifier of the source image.
copyWorkspaceImage_sourceImageId :: Lens.Lens' CopyWorkspaceImage Prelude.Text
copyWorkspaceImage_sourceImageId :: Lens' CopyWorkspaceImage Text
copyWorkspaceImage_sourceImageId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyWorkspaceImage' {Text
sourceImageId :: Text
$sel:sourceImageId:CopyWorkspaceImage' :: CopyWorkspaceImage -> Text
sourceImageId} -> Text
sourceImageId) (\s :: CopyWorkspaceImage
s@CopyWorkspaceImage' {} Text
a -> CopyWorkspaceImage
s {$sel:sourceImageId:CopyWorkspaceImage' :: Text
sourceImageId = Text
a} :: CopyWorkspaceImage)

-- | The identifier of the source Region.
copyWorkspaceImage_sourceRegion :: Lens.Lens' CopyWorkspaceImage Prelude.Text
copyWorkspaceImage_sourceRegion :: Lens' CopyWorkspaceImage Text
copyWorkspaceImage_sourceRegion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyWorkspaceImage' {Text
sourceRegion :: Text
$sel:sourceRegion:CopyWorkspaceImage' :: CopyWorkspaceImage -> Text
sourceRegion} -> Text
sourceRegion) (\s :: CopyWorkspaceImage
s@CopyWorkspaceImage' {} Text
a -> CopyWorkspaceImage
s {$sel:sourceRegion:CopyWorkspaceImage' :: Text
sourceRegion = Text
a} :: CopyWorkspaceImage)

instance Core.AWSRequest CopyWorkspaceImage where
  type
    AWSResponse CopyWorkspaceImage =
      CopyWorkspaceImageResponse
  request :: (Service -> Service)
-> CopyWorkspaceImage -> Request CopyWorkspaceImage
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 CopyWorkspaceImage
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CopyWorkspaceImage)))
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 Text -> Int -> CopyWorkspaceImageResponse
CopyWorkspaceImageResponse'
            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
"ImageId")
            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 CopyWorkspaceImage where
  hashWithSalt :: Int -> CopyWorkspaceImage -> Int
hashWithSalt Int
_salt CopyWorkspaceImage' {Maybe [Tag]
Maybe Text
Text
sourceRegion :: Text
sourceImageId :: Text
name :: Text
tags :: Maybe [Tag]
description :: Maybe Text
$sel:sourceRegion:CopyWorkspaceImage' :: CopyWorkspaceImage -> Text
$sel:sourceImageId:CopyWorkspaceImage' :: CopyWorkspaceImage -> Text
$sel:name:CopyWorkspaceImage' :: CopyWorkspaceImage -> Text
$sel:tags:CopyWorkspaceImage' :: CopyWorkspaceImage -> Maybe [Tag]
$sel:description:CopyWorkspaceImage' :: CopyWorkspaceImage -> 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 [Tag]
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
sourceImageId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
sourceRegion

instance Prelude.NFData CopyWorkspaceImage where
  rnf :: CopyWorkspaceImage -> ()
rnf CopyWorkspaceImage' {Maybe [Tag]
Maybe Text
Text
sourceRegion :: Text
sourceImageId :: Text
name :: Text
tags :: Maybe [Tag]
description :: Maybe Text
$sel:sourceRegion:CopyWorkspaceImage' :: CopyWorkspaceImage -> Text
$sel:sourceImageId:CopyWorkspaceImage' :: CopyWorkspaceImage -> Text
$sel:name:CopyWorkspaceImage' :: CopyWorkspaceImage -> Text
$sel:tags:CopyWorkspaceImage' :: CopyWorkspaceImage -> Maybe [Tag]
$sel:description:CopyWorkspaceImage' :: CopyWorkspaceImage -> 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 [Tag]
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
sourceImageId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
sourceRegion

instance Data.ToHeaders CopyWorkspaceImage where
  toHeaders :: CopyWorkspaceImage -> 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
"WorkspacesService.CopyWorkspaceImage" ::
                          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 CopyWorkspaceImage where
  toJSON :: CopyWorkspaceImage -> Value
toJSON CopyWorkspaceImage' {Maybe [Tag]
Maybe Text
Text
sourceRegion :: Text
sourceImageId :: Text
name :: Text
tags :: Maybe [Tag]
description :: Maybe Text
$sel:sourceRegion:CopyWorkspaceImage' :: CopyWorkspaceImage -> Text
$sel:sourceImageId:CopyWorkspaceImage' :: CopyWorkspaceImage -> Text
$sel:name:CopyWorkspaceImage' :: CopyWorkspaceImage -> Text
$sel:tags:CopyWorkspaceImage' :: CopyWorkspaceImage -> Maybe [Tag]
$sel:description:CopyWorkspaceImage' :: CopyWorkspaceImage -> 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
"Tags" 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 [Tag]
tags,
            forall a. a -> Maybe a
Prelude.Just (Key
"Name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
name),
            forall a. a -> Maybe a
Prelude.Just (Key
"SourceImageId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
sourceImageId),
            forall a. a -> Maybe a
Prelude.Just (Key
"SourceRegion" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
sourceRegion)
          ]
      )

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

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

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

-- |
-- Create a value of 'CopyWorkspaceImageResponse' 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:
--
-- 'imageId', 'copyWorkspaceImageResponse_imageId' - The identifier of the image.
--
-- 'httpStatus', 'copyWorkspaceImageResponse_httpStatus' - The response's http status code.
newCopyWorkspaceImageResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CopyWorkspaceImageResponse
newCopyWorkspaceImageResponse :: Int -> CopyWorkspaceImageResponse
newCopyWorkspaceImageResponse Int
pHttpStatus_ =
  CopyWorkspaceImageResponse'
    { $sel:imageId:CopyWorkspaceImageResponse' :: Maybe Text
imageId =
        forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CopyWorkspaceImageResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The identifier of the image.
copyWorkspaceImageResponse_imageId :: Lens.Lens' CopyWorkspaceImageResponse (Prelude.Maybe Prelude.Text)
copyWorkspaceImageResponse_imageId :: Lens' CopyWorkspaceImageResponse (Maybe Text)
copyWorkspaceImageResponse_imageId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CopyWorkspaceImageResponse' {Maybe Text
imageId :: Maybe Text
$sel:imageId:CopyWorkspaceImageResponse' :: CopyWorkspaceImageResponse -> Maybe Text
imageId} -> Maybe Text
imageId) (\s :: CopyWorkspaceImageResponse
s@CopyWorkspaceImageResponse' {} Maybe Text
a -> CopyWorkspaceImageResponse
s {$sel:imageId:CopyWorkspaceImageResponse' :: Maybe Text
imageId = Maybe Text
a} :: CopyWorkspaceImageResponse)

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

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