{-# 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 #-}
module Amazonka.RobOMaker.CreateRobot
(
CreateRobot (..),
newCreateRobot,
createRobot_tags,
createRobot_name,
createRobot_architecture,
createRobot_greengrassGroupId,
CreateRobotResponse (..),
newCreateRobotResponse,
createRobotResponse_arn,
createRobotResponse_createdAt,
createRobotResponse_greengrassGroupId,
createRobotResponse_name,
createRobotResponse_architecture,
createRobotResponse_tags,
createRobotResponse_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
data CreateRobot = CreateRobot'
{
CreateRobot -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CreateRobot -> Text
name :: Prelude.Text,
CreateRobot -> Architecture
architecture :: Architecture,
CreateRobot -> Text
greengrassGroupId :: Prelude.Text
}
deriving (CreateRobot -> CreateRobot -> Bool
(CreateRobot -> CreateRobot -> Bool)
-> (CreateRobot -> CreateRobot -> Bool) -> Eq CreateRobot
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateRobot -> CreateRobot -> Bool
$c/= :: CreateRobot -> CreateRobot -> Bool
== :: CreateRobot -> CreateRobot -> Bool
$c== :: CreateRobot -> CreateRobot -> Bool
Prelude.Eq, ReadPrec [CreateRobot]
ReadPrec CreateRobot
Int -> ReadS CreateRobot
ReadS [CreateRobot]
(Int -> ReadS CreateRobot)
-> ReadS [CreateRobot]
-> ReadPrec CreateRobot
-> ReadPrec [CreateRobot]
-> Read CreateRobot
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateRobot]
$creadListPrec :: ReadPrec [CreateRobot]
readPrec :: ReadPrec CreateRobot
$creadPrec :: ReadPrec CreateRobot
readList :: ReadS [CreateRobot]
$creadList :: ReadS [CreateRobot]
readsPrec :: Int -> ReadS CreateRobot
$creadsPrec :: Int -> ReadS CreateRobot
Prelude.Read, Int -> CreateRobot -> ShowS
[CreateRobot] -> ShowS
CreateRobot -> String
(Int -> CreateRobot -> ShowS)
-> (CreateRobot -> String)
-> ([CreateRobot] -> ShowS)
-> Show CreateRobot
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateRobot] -> ShowS
$cshowList :: [CreateRobot] -> ShowS
show :: CreateRobot -> String
$cshow :: CreateRobot -> String
showsPrec :: Int -> CreateRobot -> ShowS
$cshowsPrec :: Int -> CreateRobot -> ShowS
Prelude.Show, (forall x. CreateRobot -> Rep CreateRobot x)
-> (forall x. Rep CreateRobot x -> CreateRobot)
-> Generic CreateRobot
forall x. Rep CreateRobot x -> CreateRobot
forall x. CreateRobot -> Rep CreateRobot x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateRobot x -> CreateRobot
$cfrom :: forall x. CreateRobot -> Rep CreateRobot x
Prelude.Generic)
newCreateRobot ::
Prelude.Text ->
Architecture ->
Prelude.Text ->
CreateRobot
newCreateRobot :: Text -> Architecture -> Text -> CreateRobot
newCreateRobot
Text
pName_
Architecture
pArchitecture_
Text
pGreengrassGroupId_ =
CreateRobot' :: Maybe (HashMap Text Text)
-> Text -> Architecture -> Text -> CreateRobot
CreateRobot'
{ $sel:tags:CreateRobot' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:name:CreateRobot' :: Text
name = Text
pName_,
$sel:architecture:CreateRobot' :: Architecture
architecture = Architecture
pArchitecture_,
$sel:greengrassGroupId:CreateRobot' :: Text
greengrassGroupId = Text
pGreengrassGroupId_
}
createRobot_tags :: Lens.Lens' CreateRobot (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createRobot_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateRobot -> f CreateRobot
createRobot_tags = (CreateRobot -> Maybe (HashMap Text Text))
-> (CreateRobot -> Maybe (HashMap Text Text) -> CreateRobot)
-> Lens
CreateRobot
CreateRobot
(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 (\CreateRobot' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateRobot' :: CreateRobot -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateRobot
s@CreateRobot' {} Maybe (HashMap Text Text)
a -> CreateRobot
s {$sel:tags:CreateRobot' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateRobot) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateRobot -> f CreateRobot)
-> ((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)))
-> CreateRobot
-> f CreateRobot
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
createRobot_name :: Lens.Lens' CreateRobot Prelude.Text
createRobot_name :: (Text -> f Text) -> CreateRobot -> f CreateRobot
createRobot_name = (CreateRobot -> Text)
-> (CreateRobot -> Text -> CreateRobot)
-> Lens CreateRobot CreateRobot Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRobot' {Text
name :: Text
$sel:name:CreateRobot' :: CreateRobot -> Text
name} -> Text
name) (\s :: CreateRobot
s@CreateRobot' {} Text
a -> CreateRobot
s {$sel:name:CreateRobot' :: Text
name = Text
a} :: CreateRobot)
createRobot_architecture :: Lens.Lens' CreateRobot Architecture
createRobot_architecture :: (Architecture -> f Architecture) -> CreateRobot -> f CreateRobot
createRobot_architecture = (CreateRobot -> Architecture)
-> (CreateRobot -> Architecture -> CreateRobot)
-> Lens CreateRobot CreateRobot Architecture Architecture
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRobot' {Architecture
architecture :: Architecture
$sel:architecture:CreateRobot' :: CreateRobot -> Architecture
architecture} -> Architecture
architecture) (\s :: CreateRobot
s@CreateRobot' {} Architecture
a -> CreateRobot
s {$sel:architecture:CreateRobot' :: Architecture
architecture = Architecture
a} :: CreateRobot)
createRobot_greengrassGroupId :: Lens.Lens' CreateRobot Prelude.Text
createRobot_greengrassGroupId :: (Text -> f Text) -> CreateRobot -> f CreateRobot
createRobot_greengrassGroupId = (CreateRobot -> Text)
-> (CreateRobot -> Text -> CreateRobot)
-> Lens CreateRobot CreateRobot Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRobot' {Text
greengrassGroupId :: Text
$sel:greengrassGroupId:CreateRobot' :: CreateRobot -> Text
greengrassGroupId} -> Text
greengrassGroupId) (\s :: CreateRobot
s@CreateRobot' {} Text
a -> CreateRobot
s {$sel:greengrassGroupId:CreateRobot' :: Text
greengrassGroupId = Text
a} :: CreateRobot)
instance Core.AWSRequest CreateRobot where
type AWSResponse CreateRobot = CreateRobotResponse
request :: CreateRobot -> Request CreateRobot
request = Service -> CreateRobot -> Request CreateRobot
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateRobot
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateRobot)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateRobot))
-> Logger
-> Service
-> Proxy CreateRobot
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateRobot)))
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 POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Architecture
-> Maybe (HashMap Text Text)
-> Int
-> CreateRobotResponse
CreateRobotResponse'
(Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Architecture
-> Maybe (HashMap Text Text)
-> Int
-> CreateRobotResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Architecture
-> Maybe (HashMap Text Text)
-> Int
-> CreateRobotResponse)
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
"arn")
Either
String
(Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Architecture
-> Maybe (HashMap Text Text)
-> Int
-> CreateRobotResponse)
-> Either String (Maybe POSIX)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Architecture
-> Maybe (HashMap Text Text)
-> Int
-> CreateRobotResponse)
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
"createdAt")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Architecture
-> Maybe (HashMap Text Text)
-> Int
-> CreateRobotResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Architecture
-> Maybe (HashMap Text Text)
-> Int
-> CreateRobotResponse)
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
"greengrassGroupId")
Either
String
(Maybe Text
-> Maybe Architecture
-> Maybe (HashMap Text Text)
-> Int
-> CreateRobotResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Architecture
-> Maybe (HashMap Text Text) -> Int -> CreateRobotResponse)
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 Architecture
-> Maybe (HashMap Text Text) -> Int -> CreateRobotResponse)
-> Either String (Maybe Architecture)
-> Either
String (Maybe (HashMap Text Text) -> Int -> CreateRobotResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Architecture)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"architecture")
Either
String (Maybe (HashMap Text Text) -> Int -> CreateRobotResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either String (Int -> CreateRobotResponse)
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 -> CreateRobotResponse)
-> Either String Int -> Either String CreateRobotResponse
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 CreateRobot
instance Prelude.NFData CreateRobot
instance Core.ToHeaders CreateRobot where
toHeaders :: CreateRobot -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateRobot -> 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 CreateRobot where
toJSON :: CreateRobot -> Value
toJSON CreateRobot' {Maybe (HashMap Text Text)
Text
Architecture
greengrassGroupId :: Text
architecture :: Architecture
name :: Text
tags :: Maybe (HashMap Text Text)
$sel:greengrassGroupId:CreateRobot' :: CreateRobot -> Text
$sel:architecture:CreateRobot' :: CreateRobot -> Architecture
$sel:name:CreateRobot' :: CreateRobot -> Text
$sel:tags:CreateRobot' :: CreateRobot -> Maybe (HashMap Text Text)
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (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
"architecture" Text -> Architecture -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Architecture
architecture),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"greengrassGroupId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
greengrassGroupId)
]
)
instance Core.ToPath CreateRobot where
toPath :: CreateRobot -> ByteString
toPath = ByteString -> CreateRobot -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/createRobot"
instance Core.ToQuery CreateRobot where
toQuery :: CreateRobot -> QueryString
toQuery = QueryString -> CreateRobot -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateRobotResponse = CreateRobotResponse'
{
CreateRobotResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
CreateRobotResponse -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
CreateRobotResponse -> Maybe Text
greengrassGroupId :: Prelude.Maybe Prelude.Text,
CreateRobotResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
CreateRobotResponse -> Maybe Architecture
architecture :: Prelude.Maybe Architecture,
CreateRobotResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CreateRobotResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateRobotResponse -> CreateRobotResponse -> Bool
(CreateRobotResponse -> CreateRobotResponse -> Bool)
-> (CreateRobotResponse -> CreateRobotResponse -> Bool)
-> Eq CreateRobotResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateRobotResponse -> CreateRobotResponse -> Bool
$c/= :: CreateRobotResponse -> CreateRobotResponse -> Bool
== :: CreateRobotResponse -> CreateRobotResponse -> Bool
$c== :: CreateRobotResponse -> CreateRobotResponse -> Bool
Prelude.Eq, ReadPrec [CreateRobotResponse]
ReadPrec CreateRobotResponse
Int -> ReadS CreateRobotResponse
ReadS [CreateRobotResponse]
(Int -> ReadS CreateRobotResponse)
-> ReadS [CreateRobotResponse]
-> ReadPrec CreateRobotResponse
-> ReadPrec [CreateRobotResponse]
-> Read CreateRobotResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateRobotResponse]
$creadListPrec :: ReadPrec [CreateRobotResponse]
readPrec :: ReadPrec CreateRobotResponse
$creadPrec :: ReadPrec CreateRobotResponse
readList :: ReadS [CreateRobotResponse]
$creadList :: ReadS [CreateRobotResponse]
readsPrec :: Int -> ReadS CreateRobotResponse
$creadsPrec :: Int -> ReadS CreateRobotResponse
Prelude.Read, Int -> CreateRobotResponse -> ShowS
[CreateRobotResponse] -> ShowS
CreateRobotResponse -> String
(Int -> CreateRobotResponse -> ShowS)
-> (CreateRobotResponse -> String)
-> ([CreateRobotResponse] -> ShowS)
-> Show CreateRobotResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateRobotResponse] -> ShowS
$cshowList :: [CreateRobotResponse] -> ShowS
show :: CreateRobotResponse -> String
$cshow :: CreateRobotResponse -> String
showsPrec :: Int -> CreateRobotResponse -> ShowS
$cshowsPrec :: Int -> CreateRobotResponse -> ShowS
Prelude.Show, (forall x. CreateRobotResponse -> Rep CreateRobotResponse x)
-> (forall x. Rep CreateRobotResponse x -> CreateRobotResponse)
-> Generic CreateRobotResponse
forall x. Rep CreateRobotResponse x -> CreateRobotResponse
forall x. CreateRobotResponse -> Rep CreateRobotResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateRobotResponse x -> CreateRobotResponse
$cfrom :: forall x. CreateRobotResponse -> Rep CreateRobotResponse x
Prelude.Generic)
newCreateRobotResponse ::
Prelude.Int ->
CreateRobotResponse
newCreateRobotResponse :: Int -> CreateRobotResponse
newCreateRobotResponse Int
pHttpStatus_ =
CreateRobotResponse' :: Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Architecture
-> Maybe (HashMap Text Text)
-> Int
-> CreateRobotResponse
CreateRobotResponse'
{ $sel:arn:CreateRobotResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:createdAt:CreateRobotResponse' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:greengrassGroupId:CreateRobotResponse' :: Maybe Text
greengrassGroupId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:name:CreateRobotResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:architecture:CreateRobotResponse' :: Maybe Architecture
architecture = Maybe Architecture
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateRobotResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateRobotResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createRobotResponse_arn :: Lens.Lens' CreateRobotResponse (Prelude.Maybe Prelude.Text)
createRobotResponse_arn :: (Maybe Text -> f (Maybe Text))
-> CreateRobotResponse -> f CreateRobotResponse
createRobotResponse_arn = (CreateRobotResponse -> Maybe Text)
-> (CreateRobotResponse -> Maybe Text -> CreateRobotResponse)
-> Lens
CreateRobotResponse CreateRobotResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRobotResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:CreateRobotResponse' :: CreateRobotResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: CreateRobotResponse
s@CreateRobotResponse' {} Maybe Text
a -> CreateRobotResponse
s {$sel:arn:CreateRobotResponse' :: Maybe Text
arn = Maybe Text
a} :: CreateRobotResponse)
createRobotResponse_createdAt :: Lens.Lens' CreateRobotResponse (Prelude.Maybe Prelude.UTCTime)
createRobotResponse_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateRobotResponse -> f CreateRobotResponse
createRobotResponse_createdAt = (CreateRobotResponse -> Maybe POSIX)
-> (CreateRobotResponse -> Maybe POSIX -> CreateRobotResponse)
-> Lens
CreateRobotResponse CreateRobotResponse (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRobotResponse' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:CreateRobotResponse' :: CreateRobotResponse -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: CreateRobotResponse
s@CreateRobotResponse' {} Maybe POSIX
a -> CreateRobotResponse
s {$sel:createdAt:CreateRobotResponse' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: CreateRobotResponse) ((Maybe POSIX -> f (Maybe POSIX))
-> CreateRobotResponse -> f CreateRobotResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateRobotResponse
-> f CreateRobotResponse
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
createRobotResponse_greengrassGroupId :: Lens.Lens' CreateRobotResponse (Prelude.Maybe Prelude.Text)
createRobotResponse_greengrassGroupId :: (Maybe Text -> f (Maybe Text))
-> CreateRobotResponse -> f CreateRobotResponse
createRobotResponse_greengrassGroupId = (CreateRobotResponse -> Maybe Text)
-> (CreateRobotResponse -> Maybe Text -> CreateRobotResponse)
-> Lens
CreateRobotResponse CreateRobotResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRobotResponse' {Maybe Text
greengrassGroupId :: Maybe Text
$sel:greengrassGroupId:CreateRobotResponse' :: CreateRobotResponse -> Maybe Text
greengrassGroupId} -> Maybe Text
greengrassGroupId) (\s :: CreateRobotResponse
s@CreateRobotResponse' {} Maybe Text
a -> CreateRobotResponse
s {$sel:greengrassGroupId:CreateRobotResponse' :: Maybe Text
greengrassGroupId = Maybe Text
a} :: CreateRobotResponse)
createRobotResponse_name :: Lens.Lens' CreateRobotResponse (Prelude.Maybe Prelude.Text)
createRobotResponse_name :: (Maybe Text -> f (Maybe Text))
-> CreateRobotResponse -> f CreateRobotResponse
createRobotResponse_name = (CreateRobotResponse -> Maybe Text)
-> (CreateRobotResponse -> Maybe Text -> CreateRobotResponse)
-> Lens
CreateRobotResponse CreateRobotResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRobotResponse' {Maybe Text
name :: Maybe Text
$sel:name:CreateRobotResponse' :: CreateRobotResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: CreateRobotResponse
s@CreateRobotResponse' {} Maybe Text
a -> CreateRobotResponse
s {$sel:name:CreateRobotResponse' :: Maybe Text
name = Maybe Text
a} :: CreateRobotResponse)
createRobotResponse_architecture :: Lens.Lens' CreateRobotResponse (Prelude.Maybe Architecture)
createRobotResponse_architecture :: (Maybe Architecture -> f (Maybe Architecture))
-> CreateRobotResponse -> f CreateRobotResponse
createRobotResponse_architecture = (CreateRobotResponse -> Maybe Architecture)
-> (CreateRobotResponse
-> Maybe Architecture -> CreateRobotResponse)
-> Lens
CreateRobotResponse
CreateRobotResponse
(Maybe Architecture)
(Maybe Architecture)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRobotResponse' {Maybe Architecture
architecture :: Maybe Architecture
$sel:architecture:CreateRobotResponse' :: CreateRobotResponse -> Maybe Architecture
architecture} -> Maybe Architecture
architecture) (\s :: CreateRobotResponse
s@CreateRobotResponse' {} Maybe Architecture
a -> CreateRobotResponse
s {$sel:architecture:CreateRobotResponse' :: Maybe Architecture
architecture = Maybe Architecture
a} :: CreateRobotResponse)
createRobotResponse_tags :: Lens.Lens' CreateRobotResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createRobotResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateRobotResponse -> f CreateRobotResponse
createRobotResponse_tags = (CreateRobotResponse -> Maybe (HashMap Text Text))
-> (CreateRobotResponse
-> Maybe (HashMap Text Text) -> CreateRobotResponse)
-> Lens
CreateRobotResponse
CreateRobotResponse
(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 (\CreateRobotResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateRobotResponse' :: CreateRobotResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateRobotResponse
s@CreateRobotResponse' {} Maybe (HashMap Text Text)
a -> CreateRobotResponse
s {$sel:tags:CreateRobotResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateRobotResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateRobotResponse -> f CreateRobotResponse)
-> ((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)))
-> CreateRobotResponse
-> f CreateRobotResponse
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
createRobotResponse_httpStatus :: Lens.Lens' CreateRobotResponse Prelude.Int
createRobotResponse_httpStatus :: (Int -> f Int) -> CreateRobotResponse -> f CreateRobotResponse
createRobotResponse_httpStatus = (CreateRobotResponse -> Int)
-> (CreateRobotResponse -> Int -> CreateRobotResponse)
-> Lens CreateRobotResponse CreateRobotResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateRobotResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateRobotResponse' :: CreateRobotResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateRobotResponse
s@CreateRobotResponse' {} Int
a -> CreateRobotResponse
s {$sel:httpStatus:CreateRobotResponse' :: Int
httpStatus = Int
a} :: CreateRobotResponse)
instance Prelude.NFData CreateRobotResponse