{-# 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.RobOMaker.CreateRobotApplication
-- 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)
--
-- Creates a robot application.
module Amazonka.RobOMaker.CreateRobotApplication
  ( -- * Creating a Request
    CreateRobotApplication (..),
    newCreateRobotApplication,

    -- * Request Lenses
    createRobotApplication_environment,
    createRobotApplication_sources,
    createRobotApplication_tags,
    createRobotApplication_name,
    createRobotApplication_robotSoftwareSuite,

    -- * Destructuring the Response
    CreateRobotApplicationResponse (..),
    newCreateRobotApplicationResponse,

    -- * Response Lenses
    createRobotApplicationResponse_lastUpdatedAt,
    createRobotApplicationResponse_arn,
    createRobotApplicationResponse_environment,
    createRobotApplicationResponse_sources,
    createRobotApplicationResponse_name,
    createRobotApplicationResponse_version,
    createRobotApplicationResponse_robotSoftwareSuite,
    createRobotApplicationResponse_revisionId,
    createRobotApplicationResponse_tags,
    createRobotApplicationResponse_httpStatus,
  )
where

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

-- | /See:/ 'newCreateRobotApplication' smart constructor.
data CreateRobotApplication = CreateRobotApplication'
  { -- | The object that contains that URI of the Docker image that you use for
    -- your robot application.
    CreateRobotApplication -> Maybe Environment
environment :: Prelude.Maybe Environment,
    -- | The sources of the robot application.
    CreateRobotApplication -> Maybe [SourceConfig]
sources :: Prelude.Maybe [SourceConfig],
    -- | A map that contains tag keys and tag values that are attached to the
    -- robot application.
    CreateRobotApplication -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The name of the robot application.
    CreateRobotApplication -> Text
name :: Prelude.Text,
    -- | The robot software suite (ROS distribuition) used by the robot
    -- application.
    CreateRobotApplication -> RobotSoftwareSuite
robotSoftwareSuite :: RobotSoftwareSuite
  }
  deriving (CreateRobotApplication -> CreateRobotApplication -> Bool
(CreateRobotApplication -> CreateRobotApplication -> Bool)
-> (CreateRobotApplication -> CreateRobotApplication -> Bool)
-> Eq CreateRobotApplication
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateRobotApplication -> CreateRobotApplication -> Bool
$c/= :: CreateRobotApplication -> CreateRobotApplication -> Bool
== :: CreateRobotApplication -> CreateRobotApplication -> Bool
$c== :: CreateRobotApplication -> CreateRobotApplication -> Bool
Prelude.Eq, ReadPrec [CreateRobotApplication]
ReadPrec CreateRobotApplication
Int -> ReadS CreateRobotApplication
ReadS [CreateRobotApplication]
(Int -> ReadS CreateRobotApplication)
-> ReadS [CreateRobotApplication]
-> ReadPrec CreateRobotApplication
-> ReadPrec [CreateRobotApplication]
-> Read CreateRobotApplication
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateRobotApplication]
$creadListPrec :: ReadPrec [CreateRobotApplication]
readPrec :: ReadPrec CreateRobotApplication
$creadPrec :: ReadPrec CreateRobotApplication
readList :: ReadS [CreateRobotApplication]
$creadList :: ReadS [CreateRobotApplication]
readsPrec :: Int -> ReadS CreateRobotApplication
$creadsPrec :: Int -> ReadS CreateRobotApplication
Prelude.Read, Int -> CreateRobotApplication -> ShowS
[CreateRobotApplication] -> ShowS
CreateRobotApplication -> String
(Int -> CreateRobotApplication -> ShowS)
-> (CreateRobotApplication -> String)
-> ([CreateRobotApplication] -> ShowS)
-> Show CreateRobotApplication
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateRobotApplication] -> ShowS
$cshowList :: [CreateRobotApplication] -> ShowS
show :: CreateRobotApplication -> String
$cshow :: CreateRobotApplication -> String
showsPrec :: Int -> CreateRobotApplication -> ShowS
$cshowsPrec :: Int -> CreateRobotApplication -> ShowS
Prelude.Show, (forall x. CreateRobotApplication -> Rep CreateRobotApplication x)
-> (forall x.
    Rep CreateRobotApplication x -> CreateRobotApplication)
-> Generic CreateRobotApplication
forall x. Rep CreateRobotApplication x -> CreateRobotApplication
forall x. CreateRobotApplication -> Rep CreateRobotApplication x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateRobotApplication x -> CreateRobotApplication
$cfrom :: forall x. CreateRobotApplication -> Rep CreateRobotApplication x
Prelude.Generic)

-- |
-- Create a value of 'CreateRobotApplication' 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:
--
-- 'environment', 'createRobotApplication_environment' - The object that contains that URI of the Docker image that you use for
-- your robot application.
--
-- 'sources', 'createRobotApplication_sources' - The sources of the robot application.
--
-- 'tags', 'createRobotApplication_tags' - A map that contains tag keys and tag values that are attached to the
-- robot application.
--
-- 'name', 'createRobotApplication_name' - The name of the robot application.
--
-- 'robotSoftwareSuite', 'createRobotApplication_robotSoftwareSuite' - The robot software suite (ROS distribuition) used by the robot
-- application.
newCreateRobotApplication ::
  -- | 'name'
  Prelude.Text ->
  -- | 'robotSoftwareSuite'
  RobotSoftwareSuite ->
  CreateRobotApplication
newCreateRobotApplication :: Text -> RobotSoftwareSuite -> CreateRobotApplication
newCreateRobotApplication Text
pName_ RobotSoftwareSuite
pRobotSoftwareSuite_ =
  CreateRobotApplication' :: Maybe Environment
-> Maybe [SourceConfig]
-> Maybe (HashMap Text Text)
-> Text
-> RobotSoftwareSuite
-> CreateRobotApplication
CreateRobotApplication'
    { $sel:environment:CreateRobotApplication' :: Maybe Environment
environment =
        Maybe Environment
forall a. Maybe a
Prelude.Nothing,
      $sel:sources:CreateRobotApplication' :: Maybe [SourceConfig]
sources = Maybe [SourceConfig]
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateRobotApplication' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:name:CreateRobotApplication' :: Text
name = Text
pName_,
      $sel:robotSoftwareSuite:CreateRobotApplication' :: RobotSoftwareSuite
robotSoftwareSuite = RobotSoftwareSuite
pRobotSoftwareSuite_
    }

-- | The object that contains that URI of the Docker image that you use for
-- your robot application.
createRobotApplication_environment :: Lens.Lens' CreateRobotApplication (Prelude.Maybe Environment)
createRobotApplication_environment :: (Maybe Environment -> f (Maybe Environment))
-> CreateRobotApplication -> f CreateRobotApplication
createRobotApplication_environment = (CreateRobotApplication -> Maybe Environment)
-> (CreateRobotApplication
    -> Maybe Environment -> CreateRobotApplication)
-> Lens
     CreateRobotApplication
     CreateRobotApplication
     (Maybe Environment)
     (Maybe Environment)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRobotApplication' {Maybe Environment
environment :: Maybe Environment
$sel:environment:CreateRobotApplication' :: CreateRobotApplication -> Maybe Environment
environment} -> Maybe Environment
environment) (\s :: CreateRobotApplication
s@CreateRobotApplication' {} Maybe Environment
a -> CreateRobotApplication
s {$sel:environment:CreateRobotApplication' :: Maybe Environment
environment = Maybe Environment
a} :: CreateRobotApplication)

-- | The sources of the robot application.
createRobotApplication_sources :: Lens.Lens' CreateRobotApplication (Prelude.Maybe [SourceConfig])
createRobotApplication_sources :: (Maybe [SourceConfig] -> f (Maybe [SourceConfig]))
-> CreateRobotApplication -> f CreateRobotApplication
createRobotApplication_sources = (CreateRobotApplication -> Maybe [SourceConfig])
-> (CreateRobotApplication
    -> Maybe [SourceConfig] -> CreateRobotApplication)
-> Lens
     CreateRobotApplication
     CreateRobotApplication
     (Maybe [SourceConfig])
     (Maybe [SourceConfig])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRobotApplication' {Maybe [SourceConfig]
sources :: Maybe [SourceConfig]
$sel:sources:CreateRobotApplication' :: CreateRobotApplication -> Maybe [SourceConfig]
sources} -> Maybe [SourceConfig]
sources) (\s :: CreateRobotApplication
s@CreateRobotApplication' {} Maybe [SourceConfig]
a -> CreateRobotApplication
s {$sel:sources:CreateRobotApplication' :: Maybe [SourceConfig]
sources = Maybe [SourceConfig]
a} :: CreateRobotApplication) ((Maybe [SourceConfig] -> f (Maybe [SourceConfig]))
 -> CreateRobotApplication -> f CreateRobotApplication)
-> ((Maybe [SourceConfig] -> f (Maybe [SourceConfig]))
    -> Maybe [SourceConfig] -> f (Maybe [SourceConfig]))
-> (Maybe [SourceConfig] -> f (Maybe [SourceConfig]))
-> CreateRobotApplication
-> f CreateRobotApplication
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [SourceConfig] [SourceConfig] [SourceConfig] [SourceConfig]
-> Iso
     (Maybe [SourceConfig])
     (Maybe [SourceConfig])
     (Maybe [SourceConfig])
     (Maybe [SourceConfig])
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 [SourceConfig] [SourceConfig] [SourceConfig] [SourceConfig]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A map that contains tag keys and tag values that are attached to the
-- robot application.
createRobotApplication_tags :: Lens.Lens' CreateRobotApplication (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createRobotApplication_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateRobotApplication -> f CreateRobotApplication
createRobotApplication_tags = (CreateRobotApplication -> Maybe (HashMap Text Text))
-> (CreateRobotApplication
    -> Maybe (HashMap Text Text) -> CreateRobotApplication)
-> Lens
     CreateRobotApplication
     CreateRobotApplication
     (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 (\CreateRobotApplication' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateRobotApplication' :: CreateRobotApplication -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateRobotApplication
s@CreateRobotApplication' {} Maybe (HashMap Text Text)
a -> CreateRobotApplication
s {$sel:tags:CreateRobotApplication' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateRobotApplication) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> CreateRobotApplication -> f CreateRobotApplication)
-> ((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)))
-> CreateRobotApplication
-> f CreateRobotApplication
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 name of the robot application.
createRobotApplication_name :: Lens.Lens' CreateRobotApplication Prelude.Text
createRobotApplication_name :: (Text -> f Text)
-> CreateRobotApplication -> f CreateRobotApplication
createRobotApplication_name = (CreateRobotApplication -> Text)
-> (CreateRobotApplication -> Text -> CreateRobotApplication)
-> Lens CreateRobotApplication CreateRobotApplication Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRobotApplication' {Text
name :: Text
$sel:name:CreateRobotApplication' :: CreateRobotApplication -> Text
name} -> Text
name) (\s :: CreateRobotApplication
s@CreateRobotApplication' {} Text
a -> CreateRobotApplication
s {$sel:name:CreateRobotApplication' :: Text
name = Text
a} :: CreateRobotApplication)

-- | The robot software suite (ROS distribuition) used by the robot
-- application.
createRobotApplication_robotSoftwareSuite :: Lens.Lens' CreateRobotApplication RobotSoftwareSuite
createRobotApplication_robotSoftwareSuite :: (RobotSoftwareSuite -> f RobotSoftwareSuite)
-> CreateRobotApplication -> f CreateRobotApplication
createRobotApplication_robotSoftwareSuite = (CreateRobotApplication -> RobotSoftwareSuite)
-> (CreateRobotApplication
    -> RobotSoftwareSuite -> CreateRobotApplication)
-> Lens
     CreateRobotApplication
     CreateRobotApplication
     RobotSoftwareSuite
     RobotSoftwareSuite
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRobotApplication' {RobotSoftwareSuite
robotSoftwareSuite :: RobotSoftwareSuite
$sel:robotSoftwareSuite:CreateRobotApplication' :: CreateRobotApplication -> RobotSoftwareSuite
robotSoftwareSuite} -> RobotSoftwareSuite
robotSoftwareSuite) (\s :: CreateRobotApplication
s@CreateRobotApplication' {} RobotSoftwareSuite
a -> CreateRobotApplication
s {$sel:robotSoftwareSuite:CreateRobotApplication' :: RobotSoftwareSuite
robotSoftwareSuite = RobotSoftwareSuite
a} :: CreateRobotApplication)

instance Core.AWSRequest CreateRobotApplication where
  type
    AWSResponse CreateRobotApplication =
      CreateRobotApplicationResponse
  request :: CreateRobotApplication -> Request CreateRobotApplication
request = Service -> CreateRobotApplication -> Request CreateRobotApplication
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateRobotApplication
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateRobotApplication)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CreateRobotApplication))
-> Logger
-> Service
-> Proxy CreateRobotApplication
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateRobotApplication)))
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 POSIX
-> Maybe Text
-> Maybe Environment
-> Maybe [Source]
-> Maybe Text
-> Maybe Text
-> Maybe RobotSoftwareSuite
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> CreateRobotApplicationResponse
CreateRobotApplicationResponse'
            (Maybe POSIX
 -> Maybe Text
 -> Maybe Environment
 -> Maybe [Source]
 -> Maybe Text
 -> Maybe Text
 -> Maybe RobotSoftwareSuite
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Int
 -> CreateRobotApplicationResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe Environment
      -> Maybe [Source]
      -> Maybe Text
      -> Maybe Text
      -> Maybe RobotSoftwareSuite
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> CreateRobotApplicationResponse)
forall (f :: * -> *) a b. Functor 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
"lastUpdatedAt")
            Either
  String
  (Maybe Text
   -> Maybe Environment
   -> Maybe [Source]
   -> Maybe Text
   -> Maybe Text
   -> Maybe RobotSoftwareSuite
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> CreateRobotApplicationResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Environment
      -> Maybe [Source]
      -> Maybe Text
      -> Maybe Text
      -> Maybe RobotSoftwareSuite
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> CreateRobotApplicationResponse)
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
"arn")
            Either
  String
  (Maybe Environment
   -> Maybe [Source]
   -> Maybe Text
   -> Maybe Text
   -> Maybe RobotSoftwareSuite
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> CreateRobotApplicationResponse)
-> Either String (Maybe Environment)
-> Either
     String
     (Maybe [Source]
      -> Maybe Text
      -> Maybe Text
      -> Maybe RobotSoftwareSuite
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> CreateRobotApplicationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Environment)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"environment")
            Either
  String
  (Maybe [Source]
   -> Maybe Text
   -> Maybe Text
   -> Maybe RobotSoftwareSuite
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> CreateRobotApplicationResponse)
-> Either String (Maybe [Source])
-> Either
     String
     (Maybe Text
      -> Maybe Text
      -> Maybe RobotSoftwareSuite
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> CreateRobotApplicationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [Source]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"sources" Either String (Maybe (Maybe [Source]))
-> Maybe [Source] -> Either String (Maybe [Source])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Source]
forall a. Monoid a => a
Prelude.mempty)
            Either
  String
  (Maybe Text
   -> Maybe Text
   -> Maybe RobotSoftwareSuite
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> CreateRobotApplicationResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Text
      -> Maybe RobotSoftwareSuite
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> CreateRobotApplicationResponse)
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
"name")
            Either
  String
  (Maybe Text
   -> Maybe RobotSoftwareSuite
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> CreateRobotApplicationResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe RobotSoftwareSuite
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> CreateRobotApplicationResponse)
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
"version")
            Either
  String
  (Maybe RobotSoftwareSuite
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> CreateRobotApplicationResponse)
-> Either String (Maybe RobotSoftwareSuite)
-> Either
     String
     (Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> CreateRobotApplicationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe RobotSoftwareSuite)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"robotSoftwareSuite")
            Either
  String
  (Maybe Text
   -> Maybe (HashMap Text Text)
   -> Int
   -> CreateRobotApplicationResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe (HashMap Text Text)
      -> Int -> CreateRobotApplicationResponse)
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 (HashMap Text Text)
   -> Int -> CreateRobotApplicationResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either String (Int -> CreateRobotApplicationResponse)
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 -> CreateRobotApplicationResponse)
-> Either String Int
-> Either String CreateRobotApplicationResponse
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 CreateRobotApplication

instance Prelude.NFData CreateRobotApplication

instance Core.ToHeaders CreateRobotApplication where
  toHeaders :: CreateRobotApplication -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateRobotApplication -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON CreateRobotApplication where
  toJSON :: CreateRobotApplication -> Value
toJSON CreateRobotApplication' {Maybe [SourceConfig]
Maybe (HashMap Text Text)
Maybe Environment
Text
RobotSoftwareSuite
robotSoftwareSuite :: RobotSoftwareSuite
name :: Text
tags :: Maybe (HashMap Text Text)
sources :: Maybe [SourceConfig]
environment :: Maybe Environment
$sel:robotSoftwareSuite:CreateRobotApplication' :: CreateRobotApplication -> RobotSoftwareSuite
$sel:name:CreateRobotApplication' :: CreateRobotApplication -> Text
$sel:tags:CreateRobotApplication' :: CreateRobotApplication -> Maybe (HashMap Text Text)
$sel:sources:CreateRobotApplication' :: CreateRobotApplication -> Maybe [SourceConfig]
$sel:environment:CreateRobotApplication' :: CreateRobotApplication -> Maybe Environment
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"environment" Text -> Environment -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Environment -> Pair) -> Maybe Environment -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Environment
environment,
            (Text
"sources" Text -> [SourceConfig] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([SourceConfig] -> Pair) -> Maybe [SourceConfig] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [SourceConfig]
sources,
            (Text
"tags" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"robotSoftwareSuite" Text -> RobotSoftwareSuite -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= RobotSoftwareSuite
robotSoftwareSuite)
          ]
      )

instance Core.ToPath CreateRobotApplication where
  toPath :: CreateRobotApplication -> ByteString
toPath = ByteString -> CreateRobotApplication -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/createRobotApplication"

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

-- | /See:/ 'newCreateRobotApplicationResponse' smart constructor.
data CreateRobotApplicationResponse = CreateRobotApplicationResponse'
  { -- | The time, in milliseconds since the epoch, when the robot application
    -- was last updated.
    CreateRobotApplicationResponse -> Maybe POSIX
lastUpdatedAt :: Prelude.Maybe Core.POSIX,
    -- | The Amazon Resource Name (ARN) of the robot application.
    CreateRobotApplicationResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | An object that contains the Docker image URI used to a create your robot
    -- application.
    CreateRobotApplicationResponse -> Maybe Environment
environment :: Prelude.Maybe Environment,
    -- | The sources of the robot application.
    CreateRobotApplicationResponse -> Maybe [Source]
sources :: Prelude.Maybe [Source],
    -- | The name of the robot application.
    CreateRobotApplicationResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The version of the robot application.
    CreateRobotApplicationResponse -> Maybe Text
version :: Prelude.Maybe Prelude.Text,
    -- | The robot software suite (ROS distribution) used by the robot
    -- application.
    CreateRobotApplicationResponse -> Maybe RobotSoftwareSuite
robotSoftwareSuite :: Prelude.Maybe RobotSoftwareSuite,
    -- | The revision id of the robot application.
    CreateRobotApplicationResponse -> Maybe Text
revisionId :: Prelude.Maybe Prelude.Text,
    -- | The list of all tags added to the robot application.
    CreateRobotApplicationResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The response's http status code.
    CreateRobotApplicationResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateRobotApplicationResponse
-> CreateRobotApplicationResponse -> Bool
(CreateRobotApplicationResponse
 -> CreateRobotApplicationResponse -> Bool)
-> (CreateRobotApplicationResponse
    -> CreateRobotApplicationResponse -> Bool)
-> Eq CreateRobotApplicationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateRobotApplicationResponse
-> CreateRobotApplicationResponse -> Bool
$c/= :: CreateRobotApplicationResponse
-> CreateRobotApplicationResponse -> Bool
== :: CreateRobotApplicationResponse
-> CreateRobotApplicationResponse -> Bool
$c== :: CreateRobotApplicationResponse
-> CreateRobotApplicationResponse -> Bool
Prelude.Eq, ReadPrec [CreateRobotApplicationResponse]
ReadPrec CreateRobotApplicationResponse
Int -> ReadS CreateRobotApplicationResponse
ReadS [CreateRobotApplicationResponse]
(Int -> ReadS CreateRobotApplicationResponse)
-> ReadS [CreateRobotApplicationResponse]
-> ReadPrec CreateRobotApplicationResponse
-> ReadPrec [CreateRobotApplicationResponse]
-> Read CreateRobotApplicationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateRobotApplicationResponse]
$creadListPrec :: ReadPrec [CreateRobotApplicationResponse]
readPrec :: ReadPrec CreateRobotApplicationResponse
$creadPrec :: ReadPrec CreateRobotApplicationResponse
readList :: ReadS [CreateRobotApplicationResponse]
$creadList :: ReadS [CreateRobotApplicationResponse]
readsPrec :: Int -> ReadS CreateRobotApplicationResponse
$creadsPrec :: Int -> ReadS CreateRobotApplicationResponse
Prelude.Read, Int -> CreateRobotApplicationResponse -> ShowS
[CreateRobotApplicationResponse] -> ShowS
CreateRobotApplicationResponse -> String
(Int -> CreateRobotApplicationResponse -> ShowS)
-> (CreateRobotApplicationResponse -> String)
-> ([CreateRobotApplicationResponse] -> ShowS)
-> Show CreateRobotApplicationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateRobotApplicationResponse] -> ShowS
$cshowList :: [CreateRobotApplicationResponse] -> ShowS
show :: CreateRobotApplicationResponse -> String
$cshow :: CreateRobotApplicationResponse -> String
showsPrec :: Int -> CreateRobotApplicationResponse -> ShowS
$cshowsPrec :: Int -> CreateRobotApplicationResponse -> ShowS
Prelude.Show, (forall x.
 CreateRobotApplicationResponse
 -> Rep CreateRobotApplicationResponse x)
-> (forall x.
    Rep CreateRobotApplicationResponse x
    -> CreateRobotApplicationResponse)
-> Generic CreateRobotApplicationResponse
forall x.
Rep CreateRobotApplicationResponse x
-> CreateRobotApplicationResponse
forall x.
CreateRobotApplicationResponse
-> Rep CreateRobotApplicationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateRobotApplicationResponse x
-> CreateRobotApplicationResponse
$cfrom :: forall x.
CreateRobotApplicationResponse
-> Rep CreateRobotApplicationResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateRobotApplicationResponse' 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:
--
-- 'lastUpdatedAt', 'createRobotApplicationResponse_lastUpdatedAt' - The time, in milliseconds since the epoch, when the robot application
-- was last updated.
--
-- 'arn', 'createRobotApplicationResponse_arn' - The Amazon Resource Name (ARN) of the robot application.
--
-- 'environment', 'createRobotApplicationResponse_environment' - An object that contains the Docker image URI used to a create your robot
-- application.
--
-- 'sources', 'createRobotApplicationResponse_sources' - The sources of the robot application.
--
-- 'name', 'createRobotApplicationResponse_name' - The name of the robot application.
--
-- 'version', 'createRobotApplicationResponse_version' - The version of the robot application.
--
-- 'robotSoftwareSuite', 'createRobotApplicationResponse_robotSoftwareSuite' - The robot software suite (ROS distribution) used by the robot
-- application.
--
-- 'revisionId', 'createRobotApplicationResponse_revisionId' - The revision id of the robot application.
--
-- 'tags', 'createRobotApplicationResponse_tags' - The list of all tags added to the robot application.
--
-- 'httpStatus', 'createRobotApplicationResponse_httpStatus' - The response's http status code.
newCreateRobotApplicationResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateRobotApplicationResponse
newCreateRobotApplicationResponse :: Int -> CreateRobotApplicationResponse
newCreateRobotApplicationResponse Int
pHttpStatus_ =
  CreateRobotApplicationResponse' :: Maybe POSIX
-> Maybe Text
-> Maybe Environment
-> Maybe [Source]
-> Maybe Text
-> Maybe Text
-> Maybe RobotSoftwareSuite
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> CreateRobotApplicationResponse
CreateRobotApplicationResponse'
    { $sel:lastUpdatedAt:CreateRobotApplicationResponse' :: Maybe POSIX
lastUpdatedAt =
        Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:CreateRobotApplicationResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:environment:CreateRobotApplicationResponse' :: Maybe Environment
environment = Maybe Environment
forall a. Maybe a
Prelude.Nothing,
      $sel:sources:CreateRobotApplicationResponse' :: Maybe [Source]
sources = Maybe [Source]
forall a. Maybe a
Prelude.Nothing,
      $sel:name:CreateRobotApplicationResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:version:CreateRobotApplicationResponse' :: Maybe Text
version = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:robotSoftwareSuite:CreateRobotApplicationResponse' :: Maybe RobotSoftwareSuite
robotSoftwareSuite = Maybe RobotSoftwareSuite
forall a. Maybe a
Prelude.Nothing,
      $sel:revisionId:CreateRobotApplicationResponse' :: Maybe Text
revisionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateRobotApplicationResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateRobotApplicationResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The time, in milliseconds since the epoch, when the robot application
-- was last updated.
createRobotApplicationResponse_lastUpdatedAt :: Lens.Lens' CreateRobotApplicationResponse (Prelude.Maybe Prelude.UTCTime)
createRobotApplicationResponse_lastUpdatedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateRobotApplicationResponse
-> f CreateRobotApplicationResponse
createRobotApplicationResponse_lastUpdatedAt = (CreateRobotApplicationResponse -> Maybe POSIX)
-> (CreateRobotApplicationResponse
    -> Maybe POSIX -> CreateRobotApplicationResponse)
-> Lens
     CreateRobotApplicationResponse
     CreateRobotApplicationResponse
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRobotApplicationResponse' {Maybe POSIX
lastUpdatedAt :: Maybe POSIX
$sel:lastUpdatedAt:CreateRobotApplicationResponse' :: CreateRobotApplicationResponse -> Maybe POSIX
lastUpdatedAt} -> Maybe POSIX
lastUpdatedAt) (\s :: CreateRobotApplicationResponse
s@CreateRobotApplicationResponse' {} Maybe POSIX
a -> CreateRobotApplicationResponse
s {$sel:lastUpdatedAt:CreateRobotApplicationResponse' :: Maybe POSIX
lastUpdatedAt = Maybe POSIX
a} :: CreateRobotApplicationResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> CreateRobotApplicationResponse
 -> f CreateRobotApplicationResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateRobotApplicationResponse
-> f CreateRobotApplicationResponse
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 Amazon Resource Name (ARN) of the robot application.
createRobotApplicationResponse_arn :: Lens.Lens' CreateRobotApplicationResponse (Prelude.Maybe Prelude.Text)
createRobotApplicationResponse_arn :: (Maybe Text -> f (Maybe Text))
-> CreateRobotApplicationResponse
-> f CreateRobotApplicationResponse
createRobotApplicationResponse_arn = (CreateRobotApplicationResponse -> Maybe Text)
-> (CreateRobotApplicationResponse
    -> Maybe Text -> CreateRobotApplicationResponse)
-> Lens
     CreateRobotApplicationResponse
     CreateRobotApplicationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRobotApplicationResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:CreateRobotApplicationResponse' :: CreateRobotApplicationResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: CreateRobotApplicationResponse
s@CreateRobotApplicationResponse' {} Maybe Text
a -> CreateRobotApplicationResponse
s {$sel:arn:CreateRobotApplicationResponse' :: Maybe Text
arn = Maybe Text
a} :: CreateRobotApplicationResponse)

-- | An object that contains the Docker image URI used to a create your robot
-- application.
createRobotApplicationResponse_environment :: Lens.Lens' CreateRobotApplicationResponse (Prelude.Maybe Environment)
createRobotApplicationResponse_environment :: (Maybe Environment -> f (Maybe Environment))
-> CreateRobotApplicationResponse
-> f CreateRobotApplicationResponse
createRobotApplicationResponse_environment = (CreateRobotApplicationResponse -> Maybe Environment)
-> (CreateRobotApplicationResponse
    -> Maybe Environment -> CreateRobotApplicationResponse)
-> Lens
     CreateRobotApplicationResponse
     CreateRobotApplicationResponse
     (Maybe Environment)
     (Maybe Environment)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRobotApplicationResponse' {Maybe Environment
environment :: Maybe Environment
$sel:environment:CreateRobotApplicationResponse' :: CreateRobotApplicationResponse -> Maybe Environment
environment} -> Maybe Environment
environment) (\s :: CreateRobotApplicationResponse
s@CreateRobotApplicationResponse' {} Maybe Environment
a -> CreateRobotApplicationResponse
s {$sel:environment:CreateRobotApplicationResponse' :: Maybe Environment
environment = Maybe Environment
a} :: CreateRobotApplicationResponse)

-- | The sources of the robot application.
createRobotApplicationResponse_sources :: Lens.Lens' CreateRobotApplicationResponse (Prelude.Maybe [Source])
createRobotApplicationResponse_sources :: (Maybe [Source] -> f (Maybe [Source]))
-> CreateRobotApplicationResponse
-> f CreateRobotApplicationResponse
createRobotApplicationResponse_sources = (CreateRobotApplicationResponse -> Maybe [Source])
-> (CreateRobotApplicationResponse
    -> Maybe [Source] -> CreateRobotApplicationResponse)
-> Lens
     CreateRobotApplicationResponse
     CreateRobotApplicationResponse
     (Maybe [Source])
     (Maybe [Source])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRobotApplicationResponse' {Maybe [Source]
sources :: Maybe [Source]
$sel:sources:CreateRobotApplicationResponse' :: CreateRobotApplicationResponse -> Maybe [Source]
sources} -> Maybe [Source]
sources) (\s :: CreateRobotApplicationResponse
s@CreateRobotApplicationResponse' {} Maybe [Source]
a -> CreateRobotApplicationResponse
s {$sel:sources:CreateRobotApplicationResponse' :: Maybe [Source]
sources = Maybe [Source]
a} :: CreateRobotApplicationResponse) ((Maybe [Source] -> f (Maybe [Source]))
 -> CreateRobotApplicationResponse
 -> f CreateRobotApplicationResponse)
-> ((Maybe [Source] -> f (Maybe [Source]))
    -> Maybe [Source] -> f (Maybe [Source]))
-> (Maybe [Source] -> f (Maybe [Source]))
-> CreateRobotApplicationResponse
-> f CreateRobotApplicationResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Source] [Source] [Source] [Source]
-> Iso
     (Maybe [Source]) (Maybe [Source]) (Maybe [Source]) (Maybe [Source])
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 [Source] [Source] [Source] [Source]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The name of the robot application.
createRobotApplicationResponse_name :: Lens.Lens' CreateRobotApplicationResponse (Prelude.Maybe Prelude.Text)
createRobotApplicationResponse_name :: (Maybe Text -> f (Maybe Text))
-> CreateRobotApplicationResponse
-> f CreateRobotApplicationResponse
createRobotApplicationResponse_name = (CreateRobotApplicationResponse -> Maybe Text)
-> (CreateRobotApplicationResponse
    -> Maybe Text -> CreateRobotApplicationResponse)
-> Lens
     CreateRobotApplicationResponse
     CreateRobotApplicationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRobotApplicationResponse' {Maybe Text
name :: Maybe Text
$sel:name:CreateRobotApplicationResponse' :: CreateRobotApplicationResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: CreateRobotApplicationResponse
s@CreateRobotApplicationResponse' {} Maybe Text
a -> CreateRobotApplicationResponse
s {$sel:name:CreateRobotApplicationResponse' :: Maybe Text
name = Maybe Text
a} :: CreateRobotApplicationResponse)

-- | The version of the robot application.
createRobotApplicationResponse_version :: Lens.Lens' CreateRobotApplicationResponse (Prelude.Maybe Prelude.Text)
createRobotApplicationResponse_version :: (Maybe Text -> f (Maybe Text))
-> CreateRobotApplicationResponse
-> f CreateRobotApplicationResponse
createRobotApplicationResponse_version = (CreateRobotApplicationResponse -> Maybe Text)
-> (CreateRobotApplicationResponse
    -> Maybe Text -> CreateRobotApplicationResponse)
-> Lens
     CreateRobotApplicationResponse
     CreateRobotApplicationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRobotApplicationResponse' {Maybe Text
version :: Maybe Text
$sel:version:CreateRobotApplicationResponse' :: CreateRobotApplicationResponse -> Maybe Text
version} -> Maybe Text
version) (\s :: CreateRobotApplicationResponse
s@CreateRobotApplicationResponse' {} Maybe Text
a -> CreateRobotApplicationResponse
s {$sel:version:CreateRobotApplicationResponse' :: Maybe Text
version = Maybe Text
a} :: CreateRobotApplicationResponse)

-- | The robot software suite (ROS distribution) used by the robot
-- application.
createRobotApplicationResponse_robotSoftwareSuite :: Lens.Lens' CreateRobotApplicationResponse (Prelude.Maybe RobotSoftwareSuite)
createRobotApplicationResponse_robotSoftwareSuite :: (Maybe RobotSoftwareSuite -> f (Maybe RobotSoftwareSuite))
-> CreateRobotApplicationResponse
-> f CreateRobotApplicationResponse
createRobotApplicationResponse_robotSoftwareSuite = (CreateRobotApplicationResponse -> Maybe RobotSoftwareSuite)
-> (CreateRobotApplicationResponse
    -> Maybe RobotSoftwareSuite -> CreateRobotApplicationResponse)
-> Lens
     CreateRobotApplicationResponse
     CreateRobotApplicationResponse
     (Maybe RobotSoftwareSuite)
     (Maybe RobotSoftwareSuite)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRobotApplicationResponse' {Maybe RobotSoftwareSuite
robotSoftwareSuite :: Maybe RobotSoftwareSuite
$sel:robotSoftwareSuite:CreateRobotApplicationResponse' :: CreateRobotApplicationResponse -> Maybe RobotSoftwareSuite
robotSoftwareSuite} -> Maybe RobotSoftwareSuite
robotSoftwareSuite) (\s :: CreateRobotApplicationResponse
s@CreateRobotApplicationResponse' {} Maybe RobotSoftwareSuite
a -> CreateRobotApplicationResponse
s {$sel:robotSoftwareSuite:CreateRobotApplicationResponse' :: Maybe RobotSoftwareSuite
robotSoftwareSuite = Maybe RobotSoftwareSuite
a} :: CreateRobotApplicationResponse)

-- | The revision id of the robot application.
createRobotApplicationResponse_revisionId :: Lens.Lens' CreateRobotApplicationResponse (Prelude.Maybe Prelude.Text)
createRobotApplicationResponse_revisionId :: (Maybe Text -> f (Maybe Text))
-> CreateRobotApplicationResponse
-> f CreateRobotApplicationResponse
createRobotApplicationResponse_revisionId = (CreateRobotApplicationResponse -> Maybe Text)
-> (CreateRobotApplicationResponse
    -> Maybe Text -> CreateRobotApplicationResponse)
-> Lens
     CreateRobotApplicationResponse
     CreateRobotApplicationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRobotApplicationResponse' {Maybe Text
revisionId :: Maybe Text
$sel:revisionId:CreateRobotApplicationResponse' :: CreateRobotApplicationResponse -> Maybe Text
revisionId} -> Maybe Text
revisionId) (\s :: CreateRobotApplicationResponse
s@CreateRobotApplicationResponse' {} Maybe Text
a -> CreateRobotApplicationResponse
s {$sel:revisionId:CreateRobotApplicationResponse' :: Maybe Text
revisionId = Maybe Text
a} :: CreateRobotApplicationResponse)

-- | The list of all tags added to the robot application.
createRobotApplicationResponse_tags :: Lens.Lens' CreateRobotApplicationResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createRobotApplicationResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateRobotApplicationResponse
-> f CreateRobotApplicationResponse
createRobotApplicationResponse_tags = (CreateRobotApplicationResponse -> Maybe (HashMap Text Text))
-> (CreateRobotApplicationResponse
    -> Maybe (HashMap Text Text) -> CreateRobotApplicationResponse)
-> Lens
     CreateRobotApplicationResponse
     CreateRobotApplicationResponse
     (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 (\CreateRobotApplicationResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateRobotApplicationResponse' :: CreateRobotApplicationResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateRobotApplicationResponse
s@CreateRobotApplicationResponse' {} Maybe (HashMap Text Text)
a -> CreateRobotApplicationResponse
s {$sel:tags:CreateRobotApplicationResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateRobotApplicationResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> CreateRobotApplicationResponse
 -> f CreateRobotApplicationResponse)
-> ((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)))
-> CreateRobotApplicationResponse
-> f CreateRobotApplicationResponse
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.
createRobotApplicationResponse_httpStatus :: Lens.Lens' CreateRobotApplicationResponse Prelude.Int
createRobotApplicationResponse_httpStatus :: (Int -> f Int)
-> CreateRobotApplicationResponse
-> f CreateRobotApplicationResponse
createRobotApplicationResponse_httpStatus = (CreateRobotApplicationResponse -> Int)
-> (CreateRobotApplicationResponse
    -> Int -> CreateRobotApplicationResponse)
-> Lens
     CreateRobotApplicationResponse
     CreateRobotApplicationResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRobotApplicationResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateRobotApplicationResponse' :: CreateRobotApplicationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateRobotApplicationResponse
s@CreateRobotApplicationResponse' {} Int
a -> CreateRobotApplicationResponse
s {$sel:httpStatus:CreateRobotApplicationResponse' :: Int
httpStatus = Int
a} :: CreateRobotApplicationResponse)

instance
  Prelude.NFData
    CreateRobotApplicationResponse