{-# 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.CreateFleet
-- 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 fleet, a logical group of robots running the same robot
-- application.
module Amazonka.RobOMaker.CreateFleet
  ( -- * Creating a Request
    CreateFleet (..),
    newCreateFleet,

    -- * Request Lenses
    createFleet_tags,
    createFleet_name,

    -- * Destructuring the Response
    CreateFleetResponse (..),
    newCreateFleetResponse,

    -- * Response Lenses
    createFleetResponse_arn,
    createFleetResponse_createdAt,
    createFleetResponse_name,
    createFleetResponse_tags,
    createFleetResponse_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:/ 'newCreateFleet' smart constructor.
data CreateFleet = CreateFleet'
  { -- | A map that contains tag keys and tag values that are attached to the
    -- fleet.
    CreateFleet -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The name of the fleet.
    CreateFleet -> Text
name :: Prelude.Text
  }
  deriving (CreateFleet -> CreateFleet -> Bool
(CreateFleet -> CreateFleet -> Bool)
-> (CreateFleet -> CreateFleet -> Bool) -> Eq CreateFleet
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateFleet -> CreateFleet -> Bool
$c/= :: CreateFleet -> CreateFleet -> Bool
== :: CreateFleet -> CreateFleet -> Bool
$c== :: CreateFleet -> CreateFleet -> Bool
Prelude.Eq, ReadPrec [CreateFleet]
ReadPrec CreateFleet
Int -> ReadS CreateFleet
ReadS [CreateFleet]
(Int -> ReadS CreateFleet)
-> ReadS [CreateFleet]
-> ReadPrec CreateFleet
-> ReadPrec [CreateFleet]
-> Read CreateFleet
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateFleet]
$creadListPrec :: ReadPrec [CreateFleet]
readPrec :: ReadPrec CreateFleet
$creadPrec :: ReadPrec CreateFleet
readList :: ReadS [CreateFleet]
$creadList :: ReadS [CreateFleet]
readsPrec :: Int -> ReadS CreateFleet
$creadsPrec :: Int -> ReadS CreateFleet
Prelude.Read, Int -> CreateFleet -> ShowS
[CreateFleet] -> ShowS
CreateFleet -> String
(Int -> CreateFleet -> ShowS)
-> (CreateFleet -> String)
-> ([CreateFleet] -> ShowS)
-> Show CreateFleet
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateFleet] -> ShowS
$cshowList :: [CreateFleet] -> ShowS
show :: CreateFleet -> String
$cshow :: CreateFleet -> String
showsPrec :: Int -> CreateFleet -> ShowS
$cshowsPrec :: Int -> CreateFleet -> ShowS
Prelude.Show, (forall x. CreateFleet -> Rep CreateFleet x)
-> (forall x. Rep CreateFleet x -> CreateFleet)
-> Generic CreateFleet
forall x. Rep CreateFleet x -> CreateFleet
forall x. CreateFleet -> Rep CreateFleet x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateFleet x -> CreateFleet
$cfrom :: forall x. CreateFleet -> Rep CreateFleet x
Prelude.Generic)

-- |
-- Create a value of 'CreateFleet' 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:
--
-- 'tags', 'createFleet_tags' - A map that contains tag keys and tag values that are attached to the
-- fleet.
--
-- 'name', 'createFleet_name' - The name of the fleet.
newCreateFleet ::
  -- | 'name'
  Prelude.Text ->
  CreateFleet
newCreateFleet :: Text -> CreateFleet
newCreateFleet Text
pName_ =
  CreateFleet' :: Maybe (HashMap Text Text) -> Text -> CreateFleet
CreateFleet' {$sel:tags:CreateFleet' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing, $sel:name:CreateFleet' :: Text
name = Text
pName_}

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

instance Core.AWSRequest CreateFleet where
  type AWSResponse CreateFleet = CreateFleetResponse
  request :: CreateFleet -> Request CreateFleet
request = Service -> CreateFleet -> Request CreateFleet
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateFleet
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateFleet)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CreateFleet))
-> Logger
-> Service
-> Proxy CreateFleet
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateFleet)))
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 (HashMap Text Text)
-> Int
-> CreateFleetResponse
CreateFleetResponse'
            (Maybe Text
 -> Maybe POSIX
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Int
 -> CreateFleetResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe POSIX
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Int
      -> CreateFleetResponse)
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 (HashMap Text Text)
   -> Int
   -> CreateFleetResponse)
-> Either String (Maybe POSIX)
-> Either
     String
     (Maybe Text
      -> Maybe (HashMap Text Text) -> Int -> CreateFleetResponse)
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 (HashMap Text Text) -> Int -> CreateFleetResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe (HashMap Text Text) -> Int -> CreateFleetResponse)
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 (HashMap Text Text) -> Int -> CreateFleetResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either String (Int -> CreateFleetResponse)
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 -> CreateFleetResponse)
-> Either String Int -> Either String CreateFleetResponse
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 CreateFleet

instance Prelude.NFData CreateFleet

instance Core.ToHeaders CreateFleet where
  toHeaders :: CreateFleet -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateFleet -> 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 CreateFleet where
  toJSON :: CreateFleet -> Value
toJSON CreateFleet' {Maybe (HashMap Text Text)
Text
name :: Text
tags :: Maybe (HashMap Text Text)
$sel:name:CreateFleet' :: CreateFleet -> Text
$sel:tags:CreateFleet' :: CreateFleet -> 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)
          ]
      )

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

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

-- | /See:/ 'newCreateFleetResponse' smart constructor.
data CreateFleetResponse = CreateFleetResponse'
  { -- | The Amazon Resource Name (ARN) of the fleet.
    CreateFleetResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The time, in milliseconds since the epoch, when the fleet was created.
    CreateFleetResponse -> Maybe POSIX
createdAt :: Prelude.Maybe Core.POSIX,
    -- | The name of the fleet.
    CreateFleetResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The list of all tags added to the fleet.
    CreateFleetResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The response's http status code.
    CreateFleetResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateFleetResponse -> CreateFleetResponse -> Bool
(CreateFleetResponse -> CreateFleetResponse -> Bool)
-> (CreateFleetResponse -> CreateFleetResponse -> Bool)
-> Eq CreateFleetResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateFleetResponse -> CreateFleetResponse -> Bool
$c/= :: CreateFleetResponse -> CreateFleetResponse -> Bool
== :: CreateFleetResponse -> CreateFleetResponse -> Bool
$c== :: CreateFleetResponse -> CreateFleetResponse -> Bool
Prelude.Eq, ReadPrec [CreateFleetResponse]
ReadPrec CreateFleetResponse
Int -> ReadS CreateFleetResponse
ReadS [CreateFleetResponse]
(Int -> ReadS CreateFleetResponse)
-> ReadS [CreateFleetResponse]
-> ReadPrec CreateFleetResponse
-> ReadPrec [CreateFleetResponse]
-> Read CreateFleetResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateFleetResponse]
$creadListPrec :: ReadPrec [CreateFleetResponse]
readPrec :: ReadPrec CreateFleetResponse
$creadPrec :: ReadPrec CreateFleetResponse
readList :: ReadS [CreateFleetResponse]
$creadList :: ReadS [CreateFleetResponse]
readsPrec :: Int -> ReadS CreateFleetResponse
$creadsPrec :: Int -> ReadS CreateFleetResponse
Prelude.Read, Int -> CreateFleetResponse -> ShowS
[CreateFleetResponse] -> ShowS
CreateFleetResponse -> String
(Int -> CreateFleetResponse -> ShowS)
-> (CreateFleetResponse -> String)
-> ([CreateFleetResponse] -> ShowS)
-> Show CreateFleetResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateFleetResponse] -> ShowS
$cshowList :: [CreateFleetResponse] -> ShowS
show :: CreateFleetResponse -> String
$cshow :: CreateFleetResponse -> String
showsPrec :: Int -> CreateFleetResponse -> ShowS
$cshowsPrec :: Int -> CreateFleetResponse -> ShowS
Prelude.Show, (forall x. CreateFleetResponse -> Rep CreateFleetResponse x)
-> (forall x. Rep CreateFleetResponse x -> CreateFleetResponse)
-> Generic CreateFleetResponse
forall x. Rep CreateFleetResponse x -> CreateFleetResponse
forall x. CreateFleetResponse -> Rep CreateFleetResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateFleetResponse x -> CreateFleetResponse
$cfrom :: forall x. CreateFleetResponse -> Rep CreateFleetResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateFleetResponse' 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:
--
-- 'arn', 'createFleetResponse_arn' - The Amazon Resource Name (ARN) of the fleet.
--
-- 'createdAt', 'createFleetResponse_createdAt' - The time, in milliseconds since the epoch, when the fleet was created.
--
-- 'name', 'createFleetResponse_name' - The name of the fleet.
--
-- 'tags', 'createFleetResponse_tags' - The list of all tags added to the fleet.
--
-- 'httpStatus', 'createFleetResponse_httpStatus' - The response's http status code.
newCreateFleetResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateFleetResponse
newCreateFleetResponse :: Int -> CreateFleetResponse
newCreateFleetResponse Int
pHttpStatus_ =
  CreateFleetResponse' :: Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Int
-> CreateFleetResponse
CreateFleetResponse'
    { $sel:arn:CreateFleetResponse' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:CreateFleetResponse' :: Maybe POSIX
createdAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:name:CreateFleetResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateFleetResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateFleetResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The Amazon Resource Name (ARN) of the fleet.
createFleetResponse_arn :: Lens.Lens' CreateFleetResponse (Prelude.Maybe Prelude.Text)
createFleetResponse_arn :: (Maybe Text -> f (Maybe Text))
-> CreateFleetResponse -> f CreateFleetResponse
createFleetResponse_arn = (CreateFleetResponse -> Maybe Text)
-> (CreateFleetResponse -> Maybe Text -> CreateFleetResponse)
-> Lens
     CreateFleetResponse CreateFleetResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFleetResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:CreateFleetResponse' :: CreateFleetResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: CreateFleetResponse
s@CreateFleetResponse' {} Maybe Text
a -> CreateFleetResponse
s {$sel:arn:CreateFleetResponse' :: Maybe Text
arn = Maybe Text
a} :: CreateFleetResponse)

-- | The time, in milliseconds since the epoch, when the fleet was created.
createFleetResponse_createdAt :: Lens.Lens' CreateFleetResponse (Prelude.Maybe Prelude.UTCTime)
createFleetResponse_createdAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateFleetResponse -> f CreateFleetResponse
createFleetResponse_createdAt = (CreateFleetResponse -> Maybe POSIX)
-> (CreateFleetResponse -> Maybe POSIX -> CreateFleetResponse)
-> Lens
     CreateFleetResponse CreateFleetResponse (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFleetResponse' {Maybe POSIX
createdAt :: Maybe POSIX
$sel:createdAt:CreateFleetResponse' :: CreateFleetResponse -> Maybe POSIX
createdAt} -> Maybe POSIX
createdAt) (\s :: CreateFleetResponse
s@CreateFleetResponse' {} Maybe POSIX
a -> CreateFleetResponse
s {$sel:createdAt:CreateFleetResponse' :: Maybe POSIX
createdAt = Maybe POSIX
a} :: CreateFleetResponse) ((Maybe POSIX -> f (Maybe POSIX))
 -> CreateFleetResponse -> f CreateFleetResponse)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> CreateFleetResponse
-> f CreateFleetResponse
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 name of the fleet.
createFleetResponse_name :: Lens.Lens' CreateFleetResponse (Prelude.Maybe Prelude.Text)
createFleetResponse_name :: (Maybe Text -> f (Maybe Text))
-> CreateFleetResponse -> f CreateFleetResponse
createFleetResponse_name = (CreateFleetResponse -> Maybe Text)
-> (CreateFleetResponse -> Maybe Text -> CreateFleetResponse)
-> Lens
     CreateFleetResponse CreateFleetResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFleetResponse' {Maybe Text
name :: Maybe Text
$sel:name:CreateFleetResponse' :: CreateFleetResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: CreateFleetResponse
s@CreateFleetResponse' {} Maybe Text
a -> CreateFleetResponse
s {$sel:name:CreateFleetResponse' :: Maybe Text
name = Maybe Text
a} :: CreateFleetResponse)

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

instance Prelude.NFData CreateFleetResponse