{-# 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.GreengrassV2.GetDeployment
-- 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)
--
-- Gets a deployment. Deployments define the components that run on
-- Greengrass core devices.
module Amazonka.GreengrassV2.GetDeployment
  ( -- * Creating a Request
    GetDeployment (..),
    newGetDeployment,

    -- * Request Lenses
    getDeployment_deploymentId,

    -- * Destructuring the Response
    GetDeploymentResponse (..),
    newGetDeploymentResponse,

    -- * Response Lenses
    getDeploymentResponse_targetArn,
    getDeploymentResponse_components,
    getDeploymentResponse_deploymentId,
    getDeploymentResponse_iotJobId,
    getDeploymentResponse_iotJobArn,
    getDeploymentResponse_deploymentPolicies,
    getDeploymentResponse_creationTimestamp,
    getDeploymentResponse_iotJobConfiguration,
    getDeploymentResponse_deploymentStatus,
    getDeploymentResponse_isLatestForTarget,
    getDeploymentResponse_revisionId,
    getDeploymentResponse_deploymentName,
    getDeploymentResponse_tags,
    getDeploymentResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.GreengrassV2.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:/ 'newGetDeployment' smart constructor.
data GetDeployment = GetDeployment'
  { -- | The ID of the deployment.
    GetDeployment -> Text
deploymentId :: Prelude.Text
  }
  deriving (GetDeployment -> GetDeployment -> Bool
(GetDeployment -> GetDeployment -> Bool)
-> (GetDeployment -> GetDeployment -> Bool) -> Eq GetDeployment
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetDeployment -> GetDeployment -> Bool
$c/= :: GetDeployment -> GetDeployment -> Bool
== :: GetDeployment -> GetDeployment -> Bool
$c== :: GetDeployment -> GetDeployment -> Bool
Prelude.Eq, ReadPrec [GetDeployment]
ReadPrec GetDeployment
Int -> ReadS GetDeployment
ReadS [GetDeployment]
(Int -> ReadS GetDeployment)
-> ReadS [GetDeployment]
-> ReadPrec GetDeployment
-> ReadPrec [GetDeployment]
-> Read GetDeployment
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetDeployment]
$creadListPrec :: ReadPrec [GetDeployment]
readPrec :: ReadPrec GetDeployment
$creadPrec :: ReadPrec GetDeployment
readList :: ReadS [GetDeployment]
$creadList :: ReadS [GetDeployment]
readsPrec :: Int -> ReadS GetDeployment
$creadsPrec :: Int -> ReadS GetDeployment
Prelude.Read, Int -> GetDeployment -> ShowS
[GetDeployment] -> ShowS
GetDeployment -> String
(Int -> GetDeployment -> ShowS)
-> (GetDeployment -> String)
-> ([GetDeployment] -> ShowS)
-> Show GetDeployment
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetDeployment] -> ShowS
$cshowList :: [GetDeployment] -> ShowS
show :: GetDeployment -> String
$cshow :: GetDeployment -> String
showsPrec :: Int -> GetDeployment -> ShowS
$cshowsPrec :: Int -> GetDeployment -> ShowS
Prelude.Show, (forall x. GetDeployment -> Rep GetDeployment x)
-> (forall x. Rep GetDeployment x -> GetDeployment)
-> Generic GetDeployment
forall x. Rep GetDeployment x -> GetDeployment
forall x. GetDeployment -> Rep GetDeployment x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetDeployment x -> GetDeployment
$cfrom :: forall x. GetDeployment -> Rep GetDeployment x
Prelude.Generic)

-- |
-- Create a value of 'GetDeployment' 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:
--
-- 'deploymentId', 'getDeployment_deploymentId' - The ID of the deployment.
newGetDeployment ::
  -- | 'deploymentId'
  Prelude.Text ->
  GetDeployment
newGetDeployment :: Text -> GetDeployment
newGetDeployment Text
pDeploymentId_ =
  GetDeployment' :: Text -> GetDeployment
GetDeployment' {$sel:deploymentId:GetDeployment' :: Text
deploymentId = Text
pDeploymentId_}

-- | The ID of the deployment.
getDeployment_deploymentId :: Lens.Lens' GetDeployment Prelude.Text
getDeployment_deploymentId :: (Text -> f Text) -> GetDeployment -> f GetDeployment
getDeployment_deploymentId = (GetDeployment -> Text)
-> (GetDeployment -> Text -> GetDeployment)
-> Lens GetDeployment GetDeployment Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDeployment' {Text
deploymentId :: Text
$sel:deploymentId:GetDeployment' :: GetDeployment -> Text
deploymentId} -> Text
deploymentId) (\s :: GetDeployment
s@GetDeployment' {} Text
a -> GetDeployment
s {$sel:deploymentId:GetDeployment' :: Text
deploymentId = Text
a} :: GetDeployment)

instance Core.AWSRequest GetDeployment where
  type
    AWSResponse GetDeployment =
      GetDeploymentResponse
  request :: GetDeployment -> Request GetDeployment
request = Service -> GetDeployment -> Request GetDeployment
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy GetDeployment
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetDeployment)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetDeployment))
-> Logger
-> Service
-> Proxy GetDeployment
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetDeployment)))
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 Text
-> Maybe (HashMap Text ComponentDeploymentSpecification)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DeploymentPolicies
-> Maybe POSIX
-> Maybe DeploymentIoTJobConfiguration
-> Maybe DeploymentStatus
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> GetDeploymentResponse
GetDeploymentResponse'
            (Maybe Text
 -> Maybe (HashMap Text ComponentDeploymentSpecification)
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe DeploymentPolicies
 -> Maybe POSIX
 -> Maybe DeploymentIoTJobConfiguration
 -> Maybe DeploymentStatus
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Int
 -> GetDeploymentResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe (HashMap Text ComponentDeploymentSpecification)
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe DeploymentPolicies
      -> Maybe POSIX
      -> Maybe DeploymentIoTJobConfiguration
      -> Maybe DeploymentStatus
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> GetDeploymentResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"targetArn")
            Either
  String
  (Maybe (HashMap Text ComponentDeploymentSpecification)
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe DeploymentPolicies
   -> Maybe POSIX
   -> Maybe DeploymentIoTJobConfiguration
   -> Maybe DeploymentStatus
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> GetDeploymentResponse)
-> Either
     String (Maybe (HashMap Text ComponentDeploymentSpecification))
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe DeploymentPolicies
      -> Maybe POSIX
      -> Maybe DeploymentIoTJobConfiguration
      -> Maybe DeploymentStatus
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> GetDeploymentResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text
-> Either
     String
     (Maybe (Maybe (HashMap Text ComponentDeploymentSpecification)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"components" Either
  String
  (Maybe (Maybe (HashMap Text ComponentDeploymentSpecification)))
-> Maybe (HashMap Text ComponentDeploymentSpecification)
-> Either
     String (Maybe (HashMap Text ComponentDeploymentSpecification))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text ComponentDeploymentSpecification)
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe DeploymentPolicies
   -> Maybe POSIX
   -> Maybe DeploymentIoTJobConfiguration
   -> Maybe DeploymentStatus
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> GetDeploymentResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe DeploymentPolicies
      -> Maybe POSIX
      -> Maybe DeploymentIoTJobConfiguration
      -> Maybe DeploymentStatus
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> GetDeploymentResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"deploymentId")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe DeploymentPolicies
   -> Maybe POSIX
   -> Maybe DeploymentIoTJobConfiguration
   -> Maybe DeploymentStatus
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> GetDeploymentResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe DeploymentPolicies
      -> Maybe POSIX
      -> Maybe DeploymentIoTJobConfiguration
      -> Maybe DeploymentStatus
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> GetDeploymentResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"iotJobId")
            Either
  String
  (Maybe Text
   -> Maybe DeploymentPolicies
   -> Maybe POSIX
   -> Maybe DeploymentIoTJobConfiguration
   -> Maybe DeploymentStatus
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> GetDeploymentResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe DeploymentPolicies
      -> Maybe POSIX
      -> Maybe DeploymentIoTJobConfiguration
      -> Maybe DeploymentStatus
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> GetDeploymentResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"iotJobArn")
            Either
  String
  (Maybe DeploymentPolicies
   -> Maybe POSIX
   -> Maybe DeploymentIoTJobConfiguration
   -> Maybe DeploymentStatus
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> GetDeploymentResponse)
-> Either String (Maybe DeploymentPolicies)
-> Either
     String
     (Maybe POSIX
      -> Maybe DeploymentIoTJobConfiguration
      -> Maybe DeploymentStatus
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> GetDeploymentResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe DeploymentPolicies)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"deploymentPolicies")
            Either
  String
  (Maybe POSIX
   -> Maybe DeploymentIoTJobConfiguration
   -> Maybe DeploymentStatus
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> GetDeploymentResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe DeploymentIoTJobConfiguration
      -> Maybe DeploymentStatus
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> GetDeploymentResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"creationTimestamp")
            Either
  String
  (Maybe DeploymentIoTJobConfiguration
   -> Maybe DeploymentStatus
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> GetDeploymentResponse)
-> Either String (Maybe DeploymentIoTJobConfiguration)
-> Either
     String
     (Maybe DeploymentStatus
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> GetDeploymentResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object
-> Text -> Either String (Maybe DeploymentIoTJobConfiguration)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"iotJobConfiguration")
            Either
  String
  (Maybe DeploymentStatus
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> GetDeploymentResponse)
-> Either String (Maybe DeploymentStatus)
-> Either
     String
     (Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> GetDeploymentResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe DeploymentStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"deploymentStatus")
            Either
  String
  (Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> GetDeploymentResponse)
-> Either String (Maybe Bool)
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> GetDeploymentResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"isLatestForTarget")
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> GetDeploymentResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe (HashMap Text Text) -> Int -> GetDeploymentResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"revisionId")
            Either
  String
  (Maybe Text
   -> Maybe (HashMap Text Text) -> Int -> GetDeploymentResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe (HashMap Text Text) -> Int -> GetDeploymentResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"deploymentName")
            Either
  String (Maybe (HashMap Text Text) -> Int -> GetDeploymentResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either String (Int -> GetDeploymentResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"tags" Either String (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text)
-> Either String (Maybe (HashMap Text Text))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> GetDeploymentResponse)
-> Either String Int -> Either String GetDeploymentResponse
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 GetDeployment

instance Prelude.NFData GetDeployment

instance Core.ToHeaders GetDeployment where
  toHeaders :: GetDeployment -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetDeployment -> 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.ToPath GetDeployment where
  toPath :: GetDeployment -> ByteString
toPath GetDeployment' {Text
deploymentId :: Text
$sel:deploymentId:GetDeployment' :: GetDeployment -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/greengrass/v2/deployments/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
deploymentId
      ]

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

-- | /See:/ 'newGetDeploymentResponse' smart constructor.
data GetDeploymentResponse = GetDeploymentResponse'
  { -- | The
    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html ARN>
    -- of the target IoT thing or thing group.
    GetDeploymentResponse -> Maybe Text
targetArn :: Prelude.Maybe Prelude.Text,
    -- | The components to deploy. This is a dictionary, where each key is the
    -- name of a component, and each key\'s value is the version and
    -- configuration to deploy for that component.
    GetDeploymentResponse
-> Maybe (HashMap Text ComponentDeploymentSpecification)
components :: Prelude.Maybe (Prelude.HashMap Prelude.Text ComponentDeploymentSpecification),
    -- | The ID of the deployment.
    GetDeploymentResponse -> Maybe Text
deploymentId :: Prelude.Maybe Prelude.Text,
    -- | The ID of the IoT job that applies the deployment to target devices.
    GetDeploymentResponse -> Maybe Text
iotJobId :: Prelude.Maybe Prelude.Text,
    -- | The
    -- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html ARN>
    -- of the IoT job that applies the deployment to target devices.
    GetDeploymentResponse -> Maybe Text
iotJobArn :: Prelude.Maybe Prelude.Text,
    -- | The deployment policies for the deployment. These policies define how
    -- the deployment updates components and handles failure.
    GetDeploymentResponse -> Maybe DeploymentPolicies
deploymentPolicies :: Prelude.Maybe DeploymentPolicies,
    -- | The time at which the deployment was created, expressed in ISO 8601
    -- format.
    GetDeploymentResponse -> Maybe POSIX
creationTimestamp :: Prelude.Maybe Core.POSIX,
    -- | The job configuration for the deployment configuration. The job
    -- configuration specifies the rollout, timeout, and stop configurations
    -- for the deployment configuration.
    GetDeploymentResponse -> Maybe DeploymentIoTJobConfiguration
iotJobConfiguration :: Prelude.Maybe DeploymentIoTJobConfiguration,
    -- | The status of the deployment.
    GetDeploymentResponse -> Maybe DeploymentStatus
deploymentStatus :: Prelude.Maybe DeploymentStatus,
    -- | Whether or not the deployment is the latest revision for its target.
    GetDeploymentResponse -> Maybe Bool
isLatestForTarget :: Prelude.Maybe Prelude.Bool,
    -- | The revision number of the deployment.
    GetDeploymentResponse -> Maybe Text
revisionId :: Prelude.Maybe Prelude.Text,
    -- | The name of the deployment.
    GetDeploymentResponse -> Maybe Text
deploymentName :: Prelude.Maybe Prelude.Text,
    -- | A list of key-value pairs that contain metadata for the resource. For
    -- more information, see
    -- <https://docs.aws.amazon.com/greengrass/v2/developerguide/tag-resources.html Tag your resources>
    -- in the /IoT Greengrass V2 Developer Guide/.
    GetDeploymentResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The response's http status code.
    GetDeploymentResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetDeploymentResponse -> GetDeploymentResponse -> Bool
(GetDeploymentResponse -> GetDeploymentResponse -> Bool)
-> (GetDeploymentResponse -> GetDeploymentResponse -> Bool)
-> Eq GetDeploymentResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetDeploymentResponse -> GetDeploymentResponse -> Bool
$c/= :: GetDeploymentResponse -> GetDeploymentResponse -> Bool
== :: GetDeploymentResponse -> GetDeploymentResponse -> Bool
$c== :: GetDeploymentResponse -> GetDeploymentResponse -> Bool
Prelude.Eq, ReadPrec [GetDeploymentResponse]
ReadPrec GetDeploymentResponse
Int -> ReadS GetDeploymentResponse
ReadS [GetDeploymentResponse]
(Int -> ReadS GetDeploymentResponse)
-> ReadS [GetDeploymentResponse]
-> ReadPrec GetDeploymentResponse
-> ReadPrec [GetDeploymentResponse]
-> Read GetDeploymentResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetDeploymentResponse]
$creadListPrec :: ReadPrec [GetDeploymentResponse]
readPrec :: ReadPrec GetDeploymentResponse
$creadPrec :: ReadPrec GetDeploymentResponse
readList :: ReadS [GetDeploymentResponse]
$creadList :: ReadS [GetDeploymentResponse]
readsPrec :: Int -> ReadS GetDeploymentResponse
$creadsPrec :: Int -> ReadS GetDeploymentResponse
Prelude.Read, Int -> GetDeploymentResponse -> ShowS
[GetDeploymentResponse] -> ShowS
GetDeploymentResponse -> String
(Int -> GetDeploymentResponse -> ShowS)
-> (GetDeploymentResponse -> String)
-> ([GetDeploymentResponse] -> ShowS)
-> Show GetDeploymentResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetDeploymentResponse] -> ShowS
$cshowList :: [GetDeploymentResponse] -> ShowS
show :: GetDeploymentResponse -> String
$cshow :: GetDeploymentResponse -> String
showsPrec :: Int -> GetDeploymentResponse -> ShowS
$cshowsPrec :: Int -> GetDeploymentResponse -> ShowS
Prelude.Show, (forall x. GetDeploymentResponse -> Rep GetDeploymentResponse x)
-> (forall x. Rep GetDeploymentResponse x -> GetDeploymentResponse)
-> Generic GetDeploymentResponse
forall x. Rep GetDeploymentResponse x -> GetDeploymentResponse
forall x. GetDeploymentResponse -> Rep GetDeploymentResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetDeploymentResponse x -> GetDeploymentResponse
$cfrom :: forall x. GetDeploymentResponse -> Rep GetDeploymentResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetDeploymentResponse' 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:
--
-- 'targetArn', 'getDeploymentResponse_targetArn' - The
-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html ARN>
-- of the target IoT thing or thing group.
--
-- 'components', 'getDeploymentResponse_components' - The components to deploy. This is a dictionary, where each key is the
-- name of a component, and each key\'s value is the version and
-- configuration to deploy for that component.
--
-- 'deploymentId', 'getDeploymentResponse_deploymentId' - The ID of the deployment.
--
-- 'iotJobId', 'getDeploymentResponse_iotJobId' - The ID of the IoT job that applies the deployment to target devices.
--
-- 'iotJobArn', 'getDeploymentResponse_iotJobArn' - The
-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html ARN>
-- of the IoT job that applies the deployment to target devices.
--
-- 'deploymentPolicies', 'getDeploymentResponse_deploymentPolicies' - The deployment policies for the deployment. These policies define how
-- the deployment updates components and handles failure.
--
-- 'creationTimestamp', 'getDeploymentResponse_creationTimestamp' - The time at which the deployment was created, expressed in ISO 8601
-- format.
--
-- 'iotJobConfiguration', 'getDeploymentResponse_iotJobConfiguration' - The job configuration for the deployment configuration. The job
-- configuration specifies the rollout, timeout, and stop configurations
-- for the deployment configuration.
--
-- 'deploymentStatus', 'getDeploymentResponse_deploymentStatus' - The status of the deployment.
--
-- 'isLatestForTarget', 'getDeploymentResponse_isLatestForTarget' - Whether or not the deployment is the latest revision for its target.
--
-- 'revisionId', 'getDeploymentResponse_revisionId' - The revision number of the deployment.
--
-- 'deploymentName', 'getDeploymentResponse_deploymentName' - The name of the deployment.
--
-- 'tags', 'getDeploymentResponse_tags' - A list of key-value pairs that contain metadata for the resource. For
-- more information, see
-- <https://docs.aws.amazon.com/greengrass/v2/developerguide/tag-resources.html Tag your resources>
-- in the /IoT Greengrass V2 Developer Guide/.
--
-- 'httpStatus', 'getDeploymentResponse_httpStatus' - The response's http status code.
newGetDeploymentResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetDeploymentResponse
newGetDeploymentResponse :: Int -> GetDeploymentResponse
newGetDeploymentResponse Int
pHttpStatus_ =
  GetDeploymentResponse' :: Maybe Text
-> Maybe (HashMap Text ComponentDeploymentSpecification)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DeploymentPolicies
-> Maybe POSIX
-> Maybe DeploymentIoTJobConfiguration
-> Maybe DeploymentStatus
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> GetDeploymentResponse
GetDeploymentResponse'
    { $sel:targetArn:GetDeploymentResponse' :: Maybe Text
targetArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:components:GetDeploymentResponse' :: Maybe (HashMap Text ComponentDeploymentSpecification)
components = Maybe (HashMap Text ComponentDeploymentSpecification)
forall a. Maybe a
Prelude.Nothing,
      $sel:deploymentId:GetDeploymentResponse' :: Maybe Text
deploymentId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:iotJobId:GetDeploymentResponse' :: Maybe Text
iotJobId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:iotJobArn:GetDeploymentResponse' :: Maybe Text
iotJobArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:deploymentPolicies:GetDeploymentResponse' :: Maybe DeploymentPolicies
deploymentPolicies = Maybe DeploymentPolicies
forall a. Maybe a
Prelude.Nothing,
      $sel:creationTimestamp:GetDeploymentResponse' :: Maybe POSIX
creationTimestamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:iotJobConfiguration:GetDeploymentResponse' :: Maybe DeploymentIoTJobConfiguration
iotJobConfiguration = Maybe DeploymentIoTJobConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:deploymentStatus:GetDeploymentResponse' :: Maybe DeploymentStatus
deploymentStatus = Maybe DeploymentStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:isLatestForTarget:GetDeploymentResponse' :: Maybe Bool
isLatestForTarget = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:revisionId:GetDeploymentResponse' :: Maybe Text
revisionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:deploymentName:GetDeploymentResponse' :: Maybe Text
deploymentName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:GetDeploymentResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetDeploymentResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The
-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html ARN>
-- of the target IoT thing or thing group.
getDeploymentResponse_targetArn :: Lens.Lens' GetDeploymentResponse (Prelude.Maybe Prelude.Text)
getDeploymentResponse_targetArn :: (Maybe Text -> f (Maybe Text))
-> GetDeploymentResponse -> f GetDeploymentResponse
getDeploymentResponse_targetArn = (GetDeploymentResponse -> Maybe Text)
-> (GetDeploymentResponse -> Maybe Text -> GetDeploymentResponse)
-> Lens
     GetDeploymentResponse
     GetDeploymentResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDeploymentResponse' {Maybe Text
targetArn :: Maybe Text
$sel:targetArn:GetDeploymentResponse' :: GetDeploymentResponse -> Maybe Text
targetArn} -> Maybe Text
targetArn) (\s :: GetDeploymentResponse
s@GetDeploymentResponse' {} Maybe Text
a -> GetDeploymentResponse
s {$sel:targetArn:GetDeploymentResponse' :: Maybe Text
targetArn = Maybe Text
a} :: GetDeploymentResponse)

-- | The components to deploy. This is a dictionary, where each key is the
-- name of a component, and each key\'s value is the version and
-- configuration to deploy for that component.
getDeploymentResponse_components :: Lens.Lens' GetDeploymentResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text ComponentDeploymentSpecification))
getDeploymentResponse_components :: (Maybe (HashMap Text ComponentDeploymentSpecification)
 -> f (Maybe (HashMap Text ComponentDeploymentSpecification)))
-> GetDeploymentResponse -> f GetDeploymentResponse
getDeploymentResponse_components = (GetDeploymentResponse
 -> Maybe (HashMap Text ComponentDeploymentSpecification))
-> (GetDeploymentResponse
    -> Maybe (HashMap Text ComponentDeploymentSpecification)
    -> GetDeploymentResponse)
-> Lens
     GetDeploymentResponse
     GetDeploymentResponse
     (Maybe (HashMap Text ComponentDeploymentSpecification))
     (Maybe (HashMap Text ComponentDeploymentSpecification))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDeploymentResponse' {Maybe (HashMap Text ComponentDeploymentSpecification)
components :: Maybe (HashMap Text ComponentDeploymentSpecification)
$sel:components:GetDeploymentResponse' :: GetDeploymentResponse
-> Maybe (HashMap Text ComponentDeploymentSpecification)
components} -> Maybe (HashMap Text ComponentDeploymentSpecification)
components) (\s :: GetDeploymentResponse
s@GetDeploymentResponse' {} Maybe (HashMap Text ComponentDeploymentSpecification)
a -> GetDeploymentResponse
s {$sel:components:GetDeploymentResponse' :: Maybe (HashMap Text ComponentDeploymentSpecification)
components = Maybe (HashMap Text ComponentDeploymentSpecification)
a} :: GetDeploymentResponse) ((Maybe (HashMap Text ComponentDeploymentSpecification)
  -> f (Maybe (HashMap Text ComponentDeploymentSpecification)))
 -> GetDeploymentResponse -> f GetDeploymentResponse)
-> ((Maybe (HashMap Text ComponentDeploymentSpecification)
     -> f (Maybe (HashMap Text ComponentDeploymentSpecification)))
    -> Maybe (HashMap Text ComponentDeploymentSpecification)
    -> f (Maybe (HashMap Text ComponentDeploymentSpecification)))
-> (Maybe (HashMap Text ComponentDeploymentSpecification)
    -> f (Maybe (HashMap Text ComponentDeploymentSpecification)))
-> GetDeploymentResponse
-> f GetDeploymentResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text ComponentDeploymentSpecification)
  (HashMap Text ComponentDeploymentSpecification)
  (HashMap Text ComponentDeploymentSpecification)
  (HashMap Text ComponentDeploymentSpecification)
-> Iso
     (Maybe (HashMap Text ComponentDeploymentSpecification))
     (Maybe (HashMap Text ComponentDeploymentSpecification))
     (Maybe (HashMap Text ComponentDeploymentSpecification))
     (Maybe (HashMap Text ComponentDeploymentSpecification))
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
  (HashMap Text ComponentDeploymentSpecification)
  (HashMap Text ComponentDeploymentSpecification)
  (HashMap Text ComponentDeploymentSpecification)
  (HashMap Text ComponentDeploymentSpecification)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The ID of the deployment.
getDeploymentResponse_deploymentId :: Lens.Lens' GetDeploymentResponse (Prelude.Maybe Prelude.Text)
getDeploymentResponse_deploymentId :: (Maybe Text -> f (Maybe Text))
-> GetDeploymentResponse -> f GetDeploymentResponse
getDeploymentResponse_deploymentId = (GetDeploymentResponse -> Maybe Text)
-> (GetDeploymentResponse -> Maybe Text -> GetDeploymentResponse)
-> Lens
     GetDeploymentResponse
     GetDeploymentResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDeploymentResponse' {Maybe Text
deploymentId :: Maybe Text
$sel:deploymentId:GetDeploymentResponse' :: GetDeploymentResponse -> Maybe Text
deploymentId} -> Maybe Text
deploymentId) (\s :: GetDeploymentResponse
s@GetDeploymentResponse' {} Maybe Text
a -> GetDeploymentResponse
s {$sel:deploymentId:GetDeploymentResponse' :: Maybe Text
deploymentId = Maybe Text
a} :: GetDeploymentResponse)

-- | The ID of the IoT job that applies the deployment to target devices.
getDeploymentResponse_iotJobId :: Lens.Lens' GetDeploymentResponse (Prelude.Maybe Prelude.Text)
getDeploymentResponse_iotJobId :: (Maybe Text -> f (Maybe Text))
-> GetDeploymentResponse -> f GetDeploymentResponse
getDeploymentResponse_iotJobId = (GetDeploymentResponse -> Maybe Text)
-> (GetDeploymentResponse -> Maybe Text -> GetDeploymentResponse)
-> Lens
     GetDeploymentResponse
     GetDeploymentResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDeploymentResponse' {Maybe Text
iotJobId :: Maybe Text
$sel:iotJobId:GetDeploymentResponse' :: GetDeploymentResponse -> Maybe Text
iotJobId} -> Maybe Text
iotJobId) (\s :: GetDeploymentResponse
s@GetDeploymentResponse' {} Maybe Text
a -> GetDeploymentResponse
s {$sel:iotJobId:GetDeploymentResponse' :: Maybe Text
iotJobId = Maybe Text
a} :: GetDeploymentResponse)

-- | The
-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html ARN>
-- of the IoT job that applies the deployment to target devices.
getDeploymentResponse_iotJobArn :: Lens.Lens' GetDeploymentResponse (Prelude.Maybe Prelude.Text)
getDeploymentResponse_iotJobArn :: (Maybe Text -> f (Maybe Text))
-> GetDeploymentResponse -> f GetDeploymentResponse
getDeploymentResponse_iotJobArn = (GetDeploymentResponse -> Maybe Text)
-> (GetDeploymentResponse -> Maybe Text -> GetDeploymentResponse)
-> Lens
     GetDeploymentResponse
     GetDeploymentResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDeploymentResponse' {Maybe Text
iotJobArn :: Maybe Text
$sel:iotJobArn:GetDeploymentResponse' :: GetDeploymentResponse -> Maybe Text
iotJobArn} -> Maybe Text
iotJobArn) (\s :: GetDeploymentResponse
s@GetDeploymentResponse' {} Maybe Text
a -> GetDeploymentResponse
s {$sel:iotJobArn:GetDeploymentResponse' :: Maybe Text
iotJobArn = Maybe Text
a} :: GetDeploymentResponse)

-- | The deployment policies for the deployment. These policies define how
-- the deployment updates components and handles failure.
getDeploymentResponse_deploymentPolicies :: Lens.Lens' GetDeploymentResponse (Prelude.Maybe DeploymentPolicies)
getDeploymentResponse_deploymentPolicies :: (Maybe DeploymentPolicies -> f (Maybe DeploymentPolicies))
-> GetDeploymentResponse -> f GetDeploymentResponse
getDeploymentResponse_deploymentPolicies = (GetDeploymentResponse -> Maybe DeploymentPolicies)
-> (GetDeploymentResponse
    -> Maybe DeploymentPolicies -> GetDeploymentResponse)
-> Lens
     GetDeploymentResponse
     GetDeploymentResponse
     (Maybe DeploymentPolicies)
     (Maybe DeploymentPolicies)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDeploymentResponse' {Maybe DeploymentPolicies
deploymentPolicies :: Maybe DeploymentPolicies
$sel:deploymentPolicies:GetDeploymentResponse' :: GetDeploymentResponse -> Maybe DeploymentPolicies
deploymentPolicies} -> Maybe DeploymentPolicies
deploymentPolicies) (\s :: GetDeploymentResponse
s@GetDeploymentResponse' {} Maybe DeploymentPolicies
a -> GetDeploymentResponse
s {$sel:deploymentPolicies:GetDeploymentResponse' :: Maybe DeploymentPolicies
deploymentPolicies = Maybe DeploymentPolicies
a} :: GetDeploymentResponse)

-- | The time at which the deployment was created, expressed in ISO 8601
-- format.
getDeploymentResponse_creationTimestamp :: Lens.Lens' GetDeploymentResponse (Prelude.Maybe Prelude.UTCTime)
getDeploymentResponse_creationTimestamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> GetDeploymentResponse -> f GetDeploymentResponse
getDeploymentResponse_creationTimestamp = (GetDeploymentResponse -> Maybe POSIX)
-> (GetDeploymentResponse -> Maybe POSIX -> GetDeploymentResponse)
-> Lens
     GetDeploymentResponse
     GetDeploymentResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDeploymentResponse' {Maybe POSIX
creationTimestamp :: Maybe POSIX
$sel:creationTimestamp:GetDeploymentResponse' :: GetDeploymentResponse -> Maybe POSIX
creationTimestamp} -> Maybe POSIX
creationTimestamp) (\s :: GetDeploymentResponse
s@GetDeploymentResponse' {} Maybe POSIX
a -> GetDeploymentResponse
s {$sel:creationTimestamp:GetDeploymentResponse' :: Maybe POSIX
creationTimestamp = Maybe POSIX
a} :: GetDeploymentResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> GetDeploymentResponse -> f GetDeploymentResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> GetDeploymentResponse
-> f GetDeploymentResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The job configuration for the deployment configuration. The job
-- configuration specifies the rollout, timeout, and stop configurations
-- for the deployment configuration.
getDeploymentResponse_iotJobConfiguration :: Lens.Lens' GetDeploymentResponse (Prelude.Maybe DeploymentIoTJobConfiguration)
getDeploymentResponse_iotJobConfiguration :: (Maybe DeploymentIoTJobConfiguration
 -> f (Maybe DeploymentIoTJobConfiguration))
-> GetDeploymentResponse -> f GetDeploymentResponse
getDeploymentResponse_iotJobConfiguration = (GetDeploymentResponse -> Maybe DeploymentIoTJobConfiguration)
-> (GetDeploymentResponse
    -> Maybe DeploymentIoTJobConfiguration -> GetDeploymentResponse)
-> Lens
     GetDeploymentResponse
     GetDeploymentResponse
     (Maybe DeploymentIoTJobConfiguration)
     (Maybe DeploymentIoTJobConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDeploymentResponse' {Maybe DeploymentIoTJobConfiguration
iotJobConfiguration :: Maybe DeploymentIoTJobConfiguration
$sel:iotJobConfiguration:GetDeploymentResponse' :: GetDeploymentResponse -> Maybe DeploymentIoTJobConfiguration
iotJobConfiguration} -> Maybe DeploymentIoTJobConfiguration
iotJobConfiguration) (\s :: GetDeploymentResponse
s@GetDeploymentResponse' {} Maybe DeploymentIoTJobConfiguration
a -> GetDeploymentResponse
s {$sel:iotJobConfiguration:GetDeploymentResponse' :: Maybe DeploymentIoTJobConfiguration
iotJobConfiguration = Maybe DeploymentIoTJobConfiguration
a} :: GetDeploymentResponse)

-- | The status of the deployment.
getDeploymentResponse_deploymentStatus :: Lens.Lens' GetDeploymentResponse (Prelude.Maybe DeploymentStatus)
getDeploymentResponse_deploymentStatus :: (Maybe DeploymentStatus -> f (Maybe DeploymentStatus))
-> GetDeploymentResponse -> f GetDeploymentResponse
getDeploymentResponse_deploymentStatus = (GetDeploymentResponse -> Maybe DeploymentStatus)
-> (GetDeploymentResponse
    -> Maybe DeploymentStatus -> GetDeploymentResponse)
-> Lens
     GetDeploymentResponse
     GetDeploymentResponse
     (Maybe DeploymentStatus)
     (Maybe DeploymentStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDeploymentResponse' {Maybe DeploymentStatus
deploymentStatus :: Maybe DeploymentStatus
$sel:deploymentStatus:GetDeploymentResponse' :: GetDeploymentResponse -> Maybe DeploymentStatus
deploymentStatus} -> Maybe DeploymentStatus
deploymentStatus) (\s :: GetDeploymentResponse
s@GetDeploymentResponse' {} Maybe DeploymentStatus
a -> GetDeploymentResponse
s {$sel:deploymentStatus:GetDeploymentResponse' :: Maybe DeploymentStatus
deploymentStatus = Maybe DeploymentStatus
a} :: GetDeploymentResponse)

-- | Whether or not the deployment is the latest revision for its target.
getDeploymentResponse_isLatestForTarget :: Lens.Lens' GetDeploymentResponse (Prelude.Maybe Prelude.Bool)
getDeploymentResponse_isLatestForTarget :: (Maybe Bool -> f (Maybe Bool))
-> GetDeploymentResponse -> f GetDeploymentResponse
getDeploymentResponse_isLatestForTarget = (GetDeploymentResponse -> Maybe Bool)
-> (GetDeploymentResponse -> Maybe Bool -> GetDeploymentResponse)
-> Lens
     GetDeploymentResponse
     GetDeploymentResponse
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDeploymentResponse' {Maybe Bool
isLatestForTarget :: Maybe Bool
$sel:isLatestForTarget:GetDeploymentResponse' :: GetDeploymentResponse -> Maybe Bool
isLatestForTarget} -> Maybe Bool
isLatestForTarget) (\s :: GetDeploymentResponse
s@GetDeploymentResponse' {} Maybe Bool
a -> GetDeploymentResponse
s {$sel:isLatestForTarget:GetDeploymentResponse' :: Maybe Bool
isLatestForTarget = Maybe Bool
a} :: GetDeploymentResponse)

-- | The revision number of the deployment.
getDeploymentResponse_revisionId :: Lens.Lens' GetDeploymentResponse (Prelude.Maybe Prelude.Text)
getDeploymentResponse_revisionId :: (Maybe Text -> f (Maybe Text))
-> GetDeploymentResponse -> f GetDeploymentResponse
getDeploymentResponse_revisionId = (GetDeploymentResponse -> Maybe Text)
-> (GetDeploymentResponse -> Maybe Text -> GetDeploymentResponse)
-> Lens
     GetDeploymentResponse
     GetDeploymentResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDeploymentResponse' {Maybe Text
revisionId :: Maybe Text
$sel:revisionId:GetDeploymentResponse' :: GetDeploymentResponse -> Maybe Text
revisionId} -> Maybe Text
revisionId) (\s :: GetDeploymentResponse
s@GetDeploymentResponse' {} Maybe Text
a -> GetDeploymentResponse
s {$sel:revisionId:GetDeploymentResponse' :: Maybe Text
revisionId = Maybe Text
a} :: GetDeploymentResponse)

-- | The name of the deployment.
getDeploymentResponse_deploymentName :: Lens.Lens' GetDeploymentResponse (Prelude.Maybe Prelude.Text)
getDeploymentResponse_deploymentName :: (Maybe Text -> f (Maybe Text))
-> GetDeploymentResponse -> f GetDeploymentResponse
getDeploymentResponse_deploymentName = (GetDeploymentResponse -> Maybe Text)
-> (GetDeploymentResponse -> Maybe Text -> GetDeploymentResponse)
-> Lens
     GetDeploymentResponse
     GetDeploymentResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDeploymentResponse' {Maybe Text
deploymentName :: Maybe Text
$sel:deploymentName:GetDeploymentResponse' :: GetDeploymentResponse -> Maybe Text
deploymentName} -> Maybe Text
deploymentName) (\s :: GetDeploymentResponse
s@GetDeploymentResponse' {} Maybe Text
a -> GetDeploymentResponse
s {$sel:deploymentName:GetDeploymentResponse' :: Maybe Text
deploymentName = Maybe Text
a} :: GetDeploymentResponse)

-- | A list of key-value pairs that contain metadata for the resource. For
-- more information, see
-- <https://docs.aws.amazon.com/greengrass/v2/developerguide/tag-resources.html Tag your resources>
-- in the /IoT Greengrass V2 Developer Guide/.
getDeploymentResponse_tags :: Lens.Lens' GetDeploymentResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
getDeploymentResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> GetDeploymentResponse -> f GetDeploymentResponse
getDeploymentResponse_tags = (GetDeploymentResponse -> Maybe (HashMap Text Text))
-> (GetDeploymentResponse
    -> Maybe (HashMap Text Text) -> GetDeploymentResponse)
-> Lens
     GetDeploymentResponse
     GetDeploymentResponse
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDeploymentResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:GetDeploymentResponse' :: GetDeploymentResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: GetDeploymentResponse
s@GetDeploymentResponse' {} Maybe (HashMap Text Text)
a -> GetDeploymentResponse
s {$sel:tags:GetDeploymentResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: GetDeploymentResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> GetDeploymentResponse -> f GetDeploymentResponse)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> GetDeploymentResponse
-> f GetDeploymentResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData GetDeploymentResponse