{-# 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.AppStream.DescribeImagePermissions
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Retrieves a list that describes the permissions for shared AWS account
-- IDs on a private image that you own.
module Amazonka.AppStream.DescribeImagePermissions
  ( -- * Creating a Request
    DescribeImagePermissions (..),
    newDescribeImagePermissions,

    -- * Request Lenses
    describeImagePermissions_maxResults,
    describeImagePermissions_nextToken,
    describeImagePermissions_sharedAwsAccountIds,
    describeImagePermissions_name,

    -- * Destructuring the Response
    DescribeImagePermissionsResponse (..),
    newDescribeImagePermissionsResponse,

    -- * Response Lenses
    describeImagePermissionsResponse_name,
    describeImagePermissionsResponse_nextToken,
    describeImagePermissionsResponse_sharedImagePermissionsList,
    describeImagePermissionsResponse_httpStatus,
  )
where

import Amazonka.AppStream.Types
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

-- | /See:/ 'newDescribeImagePermissions' smart constructor.
data DescribeImagePermissions = DescribeImagePermissions'
  { -- | The maximum size of each page of results.
    DescribeImagePermissions -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The pagination token to use to retrieve the next page of results for
    -- this operation. If this value is null, it retrieves the first page.
    DescribeImagePermissions -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The 12-digit identifier of one or more AWS accounts with which the image
    -- is shared.
    DescribeImagePermissions -> Maybe (NonEmpty Text)
sharedAwsAccountIds :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
    -- | The name of the private image for which to describe permissions. The
    -- image must be one that you own.
    DescribeImagePermissions -> Text
name :: Prelude.Text
  }
  deriving (DescribeImagePermissions -> DescribeImagePermissions -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeImagePermissions -> DescribeImagePermissions -> Bool
$c/= :: DescribeImagePermissions -> DescribeImagePermissions -> Bool
== :: DescribeImagePermissions -> DescribeImagePermissions -> Bool
$c== :: DescribeImagePermissions -> DescribeImagePermissions -> Bool
Prelude.Eq, ReadPrec [DescribeImagePermissions]
ReadPrec DescribeImagePermissions
Int -> ReadS DescribeImagePermissions
ReadS [DescribeImagePermissions]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeImagePermissions]
$creadListPrec :: ReadPrec [DescribeImagePermissions]
readPrec :: ReadPrec DescribeImagePermissions
$creadPrec :: ReadPrec DescribeImagePermissions
readList :: ReadS [DescribeImagePermissions]
$creadList :: ReadS [DescribeImagePermissions]
readsPrec :: Int -> ReadS DescribeImagePermissions
$creadsPrec :: Int -> ReadS DescribeImagePermissions
Prelude.Read, Int -> DescribeImagePermissions -> ShowS
[DescribeImagePermissions] -> ShowS
DescribeImagePermissions -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeImagePermissions] -> ShowS
$cshowList :: [DescribeImagePermissions] -> ShowS
show :: DescribeImagePermissions -> String
$cshow :: DescribeImagePermissions -> String
showsPrec :: Int -> DescribeImagePermissions -> ShowS
$cshowsPrec :: Int -> DescribeImagePermissions -> ShowS
Prelude.Show, forall x.
Rep DescribeImagePermissions x -> DescribeImagePermissions
forall x.
DescribeImagePermissions -> Rep DescribeImagePermissions x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeImagePermissions x -> DescribeImagePermissions
$cfrom :: forall x.
DescribeImagePermissions -> Rep DescribeImagePermissions x
Prelude.Generic)

-- |
-- Create a value of 'DescribeImagePermissions' 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:
--
-- 'maxResults', 'describeImagePermissions_maxResults' - The maximum size of each page of results.
--
-- 'nextToken', 'describeImagePermissions_nextToken' - The pagination token to use to retrieve the next page of results for
-- this operation. If this value is null, it retrieves the first page.
--
-- 'sharedAwsAccountIds', 'describeImagePermissions_sharedAwsAccountIds' - The 12-digit identifier of one or more AWS accounts with which the image
-- is shared.
--
-- 'name', 'describeImagePermissions_name' - The name of the private image for which to describe permissions. The
-- image must be one that you own.
newDescribeImagePermissions ::
  -- | 'name'
  Prelude.Text ->
  DescribeImagePermissions
newDescribeImagePermissions :: Text -> DescribeImagePermissions
newDescribeImagePermissions Text
pName_ =
  DescribeImagePermissions'
    { $sel:maxResults:DescribeImagePermissions' :: Maybe Natural
maxResults =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeImagePermissions' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:sharedAwsAccountIds:DescribeImagePermissions' :: Maybe (NonEmpty Text)
sharedAwsAccountIds = forall a. Maybe a
Prelude.Nothing,
      $sel:name:DescribeImagePermissions' :: Text
name = Text
pName_
    }

-- | The maximum size of each page of results.
describeImagePermissions_maxResults :: Lens.Lens' DescribeImagePermissions (Prelude.Maybe Prelude.Natural)
describeImagePermissions_maxResults :: Lens' DescribeImagePermissions (Maybe Natural)
describeImagePermissions_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImagePermissions' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:DescribeImagePermissions' :: DescribeImagePermissions -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: DescribeImagePermissions
s@DescribeImagePermissions' {} Maybe Natural
a -> DescribeImagePermissions
s {$sel:maxResults:DescribeImagePermissions' :: Maybe Natural
maxResults = Maybe Natural
a} :: DescribeImagePermissions)

-- | The pagination token to use to retrieve the next page of results for
-- this operation. If this value is null, it retrieves the first page.
describeImagePermissions_nextToken :: Lens.Lens' DescribeImagePermissions (Prelude.Maybe Prelude.Text)
describeImagePermissions_nextToken :: Lens' DescribeImagePermissions (Maybe Text)
describeImagePermissions_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImagePermissions' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeImagePermissions' :: DescribeImagePermissions -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeImagePermissions
s@DescribeImagePermissions' {} Maybe Text
a -> DescribeImagePermissions
s {$sel:nextToken:DescribeImagePermissions' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeImagePermissions)

-- | The 12-digit identifier of one or more AWS accounts with which the image
-- is shared.
describeImagePermissions_sharedAwsAccountIds :: Lens.Lens' DescribeImagePermissions (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
describeImagePermissions_sharedAwsAccountIds :: Lens' DescribeImagePermissions (Maybe (NonEmpty Text))
describeImagePermissions_sharedAwsAccountIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImagePermissions' {Maybe (NonEmpty Text)
sharedAwsAccountIds :: Maybe (NonEmpty Text)
$sel:sharedAwsAccountIds:DescribeImagePermissions' :: DescribeImagePermissions -> Maybe (NonEmpty Text)
sharedAwsAccountIds} -> Maybe (NonEmpty Text)
sharedAwsAccountIds) (\s :: DescribeImagePermissions
s@DescribeImagePermissions' {} Maybe (NonEmpty Text)
a -> DescribeImagePermissions
s {$sel:sharedAwsAccountIds:DescribeImagePermissions' :: Maybe (NonEmpty Text)
sharedAwsAccountIds = Maybe (NonEmpty Text)
a} :: DescribeImagePermissions) 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 private image for which to describe permissions. The
-- image must be one that you own.
describeImagePermissions_name :: Lens.Lens' DescribeImagePermissions Prelude.Text
describeImagePermissions_name :: Lens' DescribeImagePermissions Text
describeImagePermissions_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImagePermissions' {Text
name :: Text
$sel:name:DescribeImagePermissions' :: DescribeImagePermissions -> Text
name} -> Text
name) (\s :: DescribeImagePermissions
s@DescribeImagePermissions' {} Text
a -> DescribeImagePermissions
s {$sel:name:DescribeImagePermissions' :: Text
name = Text
a} :: DescribeImagePermissions)

instance Core.AWSRequest DescribeImagePermissions where
  type
    AWSResponse DescribeImagePermissions =
      DescribeImagePermissionsResponse
  request :: (Service -> Service)
-> DescribeImagePermissions -> Request DescribeImagePermissions
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 DescribeImagePermissions
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeImagePermissions)))
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
-> Maybe Text
-> Maybe [SharedImagePermissions]
-> Int
-> DescribeImagePermissionsResponse
DescribeImagePermissionsResponse'
            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
"Name")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"NextToken")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"SharedImagePermissionsList"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                        )
            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 DescribeImagePermissions where
  hashWithSalt :: Int -> DescribeImagePermissions -> Int
hashWithSalt Int
_salt DescribeImagePermissions' {Maybe Natural
Maybe (NonEmpty Text)
Maybe Text
Text
name :: Text
sharedAwsAccountIds :: Maybe (NonEmpty Text)
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:name:DescribeImagePermissions' :: DescribeImagePermissions -> Text
$sel:sharedAwsAccountIds:DescribeImagePermissions' :: DescribeImagePermissions -> Maybe (NonEmpty Text)
$sel:nextToken:DescribeImagePermissions' :: DescribeImagePermissions -> Maybe Text
$sel:maxResults:DescribeImagePermissions' :: DescribeImagePermissions -> Maybe Natural
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty Text)
sharedAwsAccountIds
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name

instance Prelude.NFData DescribeImagePermissions where
  rnf :: DescribeImagePermissions -> ()
rnf DescribeImagePermissions' {Maybe Natural
Maybe (NonEmpty Text)
Maybe Text
Text
name :: Text
sharedAwsAccountIds :: Maybe (NonEmpty Text)
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:name:DescribeImagePermissions' :: DescribeImagePermissions -> Text
$sel:sharedAwsAccountIds:DescribeImagePermissions' :: DescribeImagePermissions -> Maybe (NonEmpty Text)
$sel:nextToken:DescribeImagePermissions' :: DescribeImagePermissions -> Maybe Text
$sel:maxResults:DescribeImagePermissions' :: DescribeImagePermissions -> Maybe Natural
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty Text)
sharedAwsAccountIds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name

instance Data.ToHeaders DescribeImagePermissions where
  toHeaders :: DescribeImagePermissions -> 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
"PhotonAdminProxyService.DescribeImagePermissions" ::
                          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 DescribeImagePermissions where
  toJSON :: DescribeImagePermissions -> Value
toJSON DescribeImagePermissions' {Maybe Natural
Maybe (NonEmpty Text)
Maybe Text
Text
name :: Text
sharedAwsAccountIds :: Maybe (NonEmpty Text)
nextToken :: Maybe Text
maxResults :: Maybe Natural
$sel:name:DescribeImagePermissions' :: DescribeImagePermissions -> Text
$sel:sharedAwsAccountIds:DescribeImagePermissions' :: DescribeImagePermissions -> Maybe (NonEmpty Text)
$sel:nextToken:DescribeImagePermissions' :: DescribeImagePermissions -> Maybe Text
$sel:maxResults:DescribeImagePermissions' :: DescribeImagePermissions -> Maybe Natural
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"MaxResults" 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 Natural
maxResults,
            (Key
"NextToken" 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
nextToken,
            (Key
"SharedAwsAccountIds" 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 (NonEmpty Text)
sharedAwsAccountIds,
            forall a. a -> Maybe a
Prelude.Just (Key
"Name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
name)
          ]
      )

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

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

-- | /See:/ 'newDescribeImagePermissionsResponse' smart constructor.
data DescribeImagePermissionsResponse = DescribeImagePermissionsResponse'
  { -- | The name of the private image.
    DescribeImagePermissionsResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The pagination token to use to retrieve the next page of results for
    -- this operation. If there are no more pages, this value is null.
    DescribeImagePermissionsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The permissions for a private image that you own.
    DescribeImagePermissionsResponse -> Maybe [SharedImagePermissions]
sharedImagePermissionsList :: Prelude.Maybe [SharedImagePermissions],
    -- | The response's http status code.
    DescribeImagePermissionsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeImagePermissionsResponse
-> DescribeImagePermissionsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeImagePermissionsResponse
-> DescribeImagePermissionsResponse -> Bool
$c/= :: DescribeImagePermissionsResponse
-> DescribeImagePermissionsResponse -> Bool
== :: DescribeImagePermissionsResponse
-> DescribeImagePermissionsResponse -> Bool
$c== :: DescribeImagePermissionsResponse
-> DescribeImagePermissionsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeImagePermissionsResponse]
ReadPrec DescribeImagePermissionsResponse
Int -> ReadS DescribeImagePermissionsResponse
ReadS [DescribeImagePermissionsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeImagePermissionsResponse]
$creadListPrec :: ReadPrec [DescribeImagePermissionsResponse]
readPrec :: ReadPrec DescribeImagePermissionsResponse
$creadPrec :: ReadPrec DescribeImagePermissionsResponse
readList :: ReadS [DescribeImagePermissionsResponse]
$creadList :: ReadS [DescribeImagePermissionsResponse]
readsPrec :: Int -> ReadS DescribeImagePermissionsResponse
$creadsPrec :: Int -> ReadS DescribeImagePermissionsResponse
Prelude.Read, Int -> DescribeImagePermissionsResponse -> ShowS
[DescribeImagePermissionsResponse] -> ShowS
DescribeImagePermissionsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeImagePermissionsResponse] -> ShowS
$cshowList :: [DescribeImagePermissionsResponse] -> ShowS
show :: DescribeImagePermissionsResponse -> String
$cshow :: DescribeImagePermissionsResponse -> String
showsPrec :: Int -> DescribeImagePermissionsResponse -> ShowS
$cshowsPrec :: Int -> DescribeImagePermissionsResponse -> ShowS
Prelude.Show, forall x.
Rep DescribeImagePermissionsResponse x
-> DescribeImagePermissionsResponse
forall x.
DescribeImagePermissionsResponse
-> Rep DescribeImagePermissionsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeImagePermissionsResponse x
-> DescribeImagePermissionsResponse
$cfrom :: forall x.
DescribeImagePermissionsResponse
-> Rep DescribeImagePermissionsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeImagePermissionsResponse' 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:
--
-- 'name', 'describeImagePermissionsResponse_name' - The name of the private image.
--
-- 'nextToken', 'describeImagePermissionsResponse_nextToken' - The pagination token to use to retrieve the next page of results for
-- this operation. If there are no more pages, this value is null.
--
-- 'sharedImagePermissionsList', 'describeImagePermissionsResponse_sharedImagePermissionsList' - The permissions for a private image that you own.
--
-- 'httpStatus', 'describeImagePermissionsResponse_httpStatus' - The response's http status code.
newDescribeImagePermissionsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeImagePermissionsResponse
newDescribeImagePermissionsResponse :: Int -> DescribeImagePermissionsResponse
newDescribeImagePermissionsResponse Int
pHttpStatus_ =
  DescribeImagePermissionsResponse'
    { $sel:name:DescribeImagePermissionsResponse' :: Maybe Text
name =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribeImagePermissionsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:sharedImagePermissionsList:DescribeImagePermissionsResponse' :: Maybe [SharedImagePermissions]
sharedImagePermissionsList =
        forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeImagePermissionsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The name of the private image.
describeImagePermissionsResponse_name :: Lens.Lens' DescribeImagePermissionsResponse (Prelude.Maybe Prelude.Text)
describeImagePermissionsResponse_name :: Lens' DescribeImagePermissionsResponse (Maybe Text)
describeImagePermissionsResponse_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImagePermissionsResponse' {Maybe Text
name :: Maybe Text
$sel:name:DescribeImagePermissionsResponse' :: DescribeImagePermissionsResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: DescribeImagePermissionsResponse
s@DescribeImagePermissionsResponse' {} Maybe Text
a -> DescribeImagePermissionsResponse
s {$sel:name:DescribeImagePermissionsResponse' :: Maybe Text
name = Maybe Text
a} :: DescribeImagePermissionsResponse)

-- | The pagination token to use to retrieve the next page of results for
-- this operation. If there are no more pages, this value is null.
describeImagePermissionsResponse_nextToken :: Lens.Lens' DescribeImagePermissionsResponse (Prelude.Maybe Prelude.Text)
describeImagePermissionsResponse_nextToken :: Lens' DescribeImagePermissionsResponse (Maybe Text)
describeImagePermissionsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImagePermissionsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribeImagePermissionsResponse' :: DescribeImagePermissionsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribeImagePermissionsResponse
s@DescribeImagePermissionsResponse' {} Maybe Text
a -> DescribeImagePermissionsResponse
s {$sel:nextToken:DescribeImagePermissionsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribeImagePermissionsResponse)

-- | The permissions for a private image that you own.
describeImagePermissionsResponse_sharedImagePermissionsList :: Lens.Lens' DescribeImagePermissionsResponse (Prelude.Maybe [SharedImagePermissions])
describeImagePermissionsResponse_sharedImagePermissionsList :: Lens'
  DescribeImagePermissionsResponse (Maybe [SharedImagePermissions])
describeImagePermissionsResponse_sharedImagePermissionsList = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImagePermissionsResponse' {Maybe [SharedImagePermissions]
sharedImagePermissionsList :: Maybe [SharedImagePermissions]
$sel:sharedImagePermissionsList:DescribeImagePermissionsResponse' :: DescribeImagePermissionsResponse -> Maybe [SharedImagePermissions]
sharedImagePermissionsList} -> Maybe [SharedImagePermissions]
sharedImagePermissionsList) (\s :: DescribeImagePermissionsResponse
s@DescribeImagePermissionsResponse' {} Maybe [SharedImagePermissions]
a -> DescribeImagePermissionsResponse
s {$sel:sharedImagePermissionsList:DescribeImagePermissionsResponse' :: Maybe [SharedImagePermissions]
sharedImagePermissionsList = Maybe [SharedImagePermissions]
a} :: DescribeImagePermissionsResponse) 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 response's http status code.
describeImagePermissionsResponse_httpStatus :: Lens.Lens' DescribeImagePermissionsResponse Prelude.Int
describeImagePermissionsResponse_httpStatus :: Lens' DescribeImagePermissionsResponse Int
describeImagePermissionsResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeImagePermissionsResponse' {Int
httpStatus :: Int
$sel:httpStatus:DescribeImagePermissionsResponse' :: DescribeImagePermissionsResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DescribeImagePermissionsResponse
s@DescribeImagePermissionsResponse' {} Int
a -> DescribeImagePermissionsResponse
s {$sel:httpStatus:DescribeImagePermissionsResponse' :: Int
httpStatus = Int
a} :: DescribeImagePermissionsResponse)

instance
  Prelude.NFData
    DescribeImagePermissionsResponse
  where
  rnf :: DescribeImagePermissionsResponse -> ()
rnf DescribeImagePermissionsResponse' {Int
Maybe [SharedImagePermissions]
Maybe Text
httpStatus :: Int
sharedImagePermissionsList :: Maybe [SharedImagePermissions]
nextToken :: Maybe Text
name :: Maybe Text
$sel:httpStatus:DescribeImagePermissionsResponse' :: DescribeImagePermissionsResponse -> Int
$sel:sharedImagePermissionsList:DescribeImagePermissionsResponse' :: DescribeImagePermissionsResponse -> Maybe [SharedImagePermissions]
$sel:nextToken:DescribeImagePermissionsResponse' :: DescribeImagePermissionsResponse -> Maybe Text
$sel:name:DescribeImagePermissionsResponse' :: DescribeImagePermissionsResponse -> Maybe Text
..} =
    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 Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [SharedImagePermissions]
sharedImagePermissionsList
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus