{-# 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.Location.UpdateGeofenceCollection
-- 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)
--
-- Updates the specified properties of a given geofence collection.
module Amazonka.Location.UpdateGeofenceCollection
  ( -- * Creating a Request
    UpdateGeofenceCollection (..),
    newUpdateGeofenceCollection,

    -- * Request Lenses
    updateGeofenceCollection_pricingPlan,
    updateGeofenceCollection_pricingPlanDataSource,
    updateGeofenceCollection_description,
    updateGeofenceCollection_collectionName,

    -- * Destructuring the Response
    UpdateGeofenceCollectionResponse (..),
    newUpdateGeofenceCollectionResponse,

    -- * Response Lenses
    updateGeofenceCollectionResponse_httpStatus,
    updateGeofenceCollectionResponse_collectionArn,
    updateGeofenceCollectionResponse_collectionName,
    updateGeofenceCollectionResponse_updateTime,
  )
where

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

-- | /See:/ 'newUpdateGeofenceCollection' smart constructor.
data UpdateGeofenceCollection = UpdateGeofenceCollection'
  { -- | Updates the pricing plan for the geofence collection.
    --
    -- For more information about each pricing plan option restrictions, see
    -- <https://aws.amazon.com/location/pricing/ Amazon Location Service pricing>.
    UpdateGeofenceCollection -> Maybe PricingPlan
pricingPlan :: Prelude.Maybe PricingPlan,
    -- | Updates the data provider for the geofence collection.
    --
    -- A required value for the following pricing plans: @MobileAssetTracking@|
    -- @MobileAssetManagement@
    --
    -- For more information about
    -- <https://aws.amazon.com/location/data-providers/ data providers> and
    -- <https://aws.amazon.com/location/pricing/ pricing plans>, see the Amazon
    -- Location Service product page.
    --
    -- This can only be updated when updating the @PricingPlan@ in the same
    -- request.
    --
    -- Amazon Location Service uses @PricingPlanDataSource@ to calculate
    -- billing for your geofence collection. Your data won\'t be shared with
    -- the data provider, and will remain in your AWS account and Region unless
    -- you move it.
    UpdateGeofenceCollection -> Maybe Text
pricingPlanDataSource :: Prelude.Maybe Prelude.Text,
    -- | Updates the description for the geofence collection.
    UpdateGeofenceCollection -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The name of the geofence collection to update.
    UpdateGeofenceCollection -> Text
collectionName :: Prelude.Text
  }
  deriving (UpdateGeofenceCollection -> UpdateGeofenceCollection -> Bool
(UpdateGeofenceCollection -> UpdateGeofenceCollection -> Bool)
-> (UpdateGeofenceCollection -> UpdateGeofenceCollection -> Bool)
-> Eq UpdateGeofenceCollection
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateGeofenceCollection -> UpdateGeofenceCollection -> Bool
$c/= :: UpdateGeofenceCollection -> UpdateGeofenceCollection -> Bool
== :: UpdateGeofenceCollection -> UpdateGeofenceCollection -> Bool
$c== :: UpdateGeofenceCollection -> UpdateGeofenceCollection -> Bool
Prelude.Eq, ReadPrec [UpdateGeofenceCollection]
ReadPrec UpdateGeofenceCollection
Int -> ReadS UpdateGeofenceCollection
ReadS [UpdateGeofenceCollection]
(Int -> ReadS UpdateGeofenceCollection)
-> ReadS [UpdateGeofenceCollection]
-> ReadPrec UpdateGeofenceCollection
-> ReadPrec [UpdateGeofenceCollection]
-> Read UpdateGeofenceCollection
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateGeofenceCollection]
$creadListPrec :: ReadPrec [UpdateGeofenceCollection]
readPrec :: ReadPrec UpdateGeofenceCollection
$creadPrec :: ReadPrec UpdateGeofenceCollection
readList :: ReadS [UpdateGeofenceCollection]
$creadList :: ReadS [UpdateGeofenceCollection]
readsPrec :: Int -> ReadS UpdateGeofenceCollection
$creadsPrec :: Int -> ReadS UpdateGeofenceCollection
Prelude.Read, Int -> UpdateGeofenceCollection -> ShowS
[UpdateGeofenceCollection] -> ShowS
UpdateGeofenceCollection -> String
(Int -> UpdateGeofenceCollection -> ShowS)
-> (UpdateGeofenceCollection -> String)
-> ([UpdateGeofenceCollection] -> ShowS)
-> Show UpdateGeofenceCollection
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateGeofenceCollection] -> ShowS
$cshowList :: [UpdateGeofenceCollection] -> ShowS
show :: UpdateGeofenceCollection -> String
$cshow :: UpdateGeofenceCollection -> String
showsPrec :: Int -> UpdateGeofenceCollection -> ShowS
$cshowsPrec :: Int -> UpdateGeofenceCollection -> ShowS
Prelude.Show, (forall x.
 UpdateGeofenceCollection -> Rep UpdateGeofenceCollection x)
-> (forall x.
    Rep UpdateGeofenceCollection x -> UpdateGeofenceCollection)
-> Generic UpdateGeofenceCollection
forall x.
Rep UpdateGeofenceCollection x -> UpdateGeofenceCollection
forall x.
UpdateGeofenceCollection -> Rep UpdateGeofenceCollection x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateGeofenceCollection x -> UpdateGeofenceCollection
$cfrom :: forall x.
UpdateGeofenceCollection -> Rep UpdateGeofenceCollection x
Prelude.Generic)

-- |
-- Create a value of 'UpdateGeofenceCollection' 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:
--
-- 'pricingPlan', 'updateGeofenceCollection_pricingPlan' - Updates the pricing plan for the geofence collection.
--
-- For more information about each pricing plan option restrictions, see
-- <https://aws.amazon.com/location/pricing/ Amazon Location Service pricing>.
--
-- 'pricingPlanDataSource', 'updateGeofenceCollection_pricingPlanDataSource' - Updates the data provider for the geofence collection.
--
-- A required value for the following pricing plans: @MobileAssetTracking@|
-- @MobileAssetManagement@
--
-- For more information about
-- <https://aws.amazon.com/location/data-providers/ data providers> and
-- <https://aws.amazon.com/location/pricing/ pricing plans>, see the Amazon
-- Location Service product page.
--
-- This can only be updated when updating the @PricingPlan@ in the same
-- request.
--
-- Amazon Location Service uses @PricingPlanDataSource@ to calculate
-- billing for your geofence collection. Your data won\'t be shared with
-- the data provider, and will remain in your AWS account and Region unless
-- you move it.
--
-- 'description', 'updateGeofenceCollection_description' - Updates the description for the geofence collection.
--
-- 'collectionName', 'updateGeofenceCollection_collectionName' - The name of the geofence collection to update.
newUpdateGeofenceCollection ::
  -- | 'collectionName'
  Prelude.Text ->
  UpdateGeofenceCollection
newUpdateGeofenceCollection :: Text -> UpdateGeofenceCollection
newUpdateGeofenceCollection Text
pCollectionName_ =
  UpdateGeofenceCollection' :: Maybe PricingPlan
-> Maybe Text -> Maybe Text -> Text -> UpdateGeofenceCollection
UpdateGeofenceCollection'
    { $sel:pricingPlan:UpdateGeofenceCollection' :: Maybe PricingPlan
pricingPlan =
        Maybe PricingPlan
forall a. Maybe a
Prelude.Nothing,
      $sel:pricingPlanDataSource:UpdateGeofenceCollection' :: Maybe Text
pricingPlanDataSource = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:description:UpdateGeofenceCollection' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:collectionName:UpdateGeofenceCollection' :: Text
collectionName = Text
pCollectionName_
    }

-- | Updates the pricing plan for the geofence collection.
--
-- For more information about each pricing plan option restrictions, see
-- <https://aws.amazon.com/location/pricing/ Amazon Location Service pricing>.
updateGeofenceCollection_pricingPlan :: Lens.Lens' UpdateGeofenceCollection (Prelude.Maybe PricingPlan)
updateGeofenceCollection_pricingPlan :: (Maybe PricingPlan -> f (Maybe PricingPlan))
-> UpdateGeofenceCollection -> f UpdateGeofenceCollection
updateGeofenceCollection_pricingPlan = (UpdateGeofenceCollection -> Maybe PricingPlan)
-> (UpdateGeofenceCollection
    -> Maybe PricingPlan -> UpdateGeofenceCollection)
-> Lens
     UpdateGeofenceCollection
     UpdateGeofenceCollection
     (Maybe PricingPlan)
     (Maybe PricingPlan)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateGeofenceCollection' {Maybe PricingPlan
pricingPlan :: Maybe PricingPlan
$sel:pricingPlan:UpdateGeofenceCollection' :: UpdateGeofenceCollection -> Maybe PricingPlan
pricingPlan} -> Maybe PricingPlan
pricingPlan) (\s :: UpdateGeofenceCollection
s@UpdateGeofenceCollection' {} Maybe PricingPlan
a -> UpdateGeofenceCollection
s {$sel:pricingPlan:UpdateGeofenceCollection' :: Maybe PricingPlan
pricingPlan = Maybe PricingPlan
a} :: UpdateGeofenceCollection)

-- | Updates the data provider for the geofence collection.
--
-- A required value for the following pricing plans: @MobileAssetTracking@|
-- @MobileAssetManagement@
--
-- For more information about
-- <https://aws.amazon.com/location/data-providers/ data providers> and
-- <https://aws.amazon.com/location/pricing/ pricing plans>, see the Amazon
-- Location Service product page.
--
-- This can only be updated when updating the @PricingPlan@ in the same
-- request.
--
-- Amazon Location Service uses @PricingPlanDataSource@ to calculate
-- billing for your geofence collection. Your data won\'t be shared with
-- the data provider, and will remain in your AWS account and Region unless
-- you move it.
updateGeofenceCollection_pricingPlanDataSource :: Lens.Lens' UpdateGeofenceCollection (Prelude.Maybe Prelude.Text)
updateGeofenceCollection_pricingPlanDataSource :: (Maybe Text -> f (Maybe Text))
-> UpdateGeofenceCollection -> f UpdateGeofenceCollection
updateGeofenceCollection_pricingPlanDataSource = (UpdateGeofenceCollection -> Maybe Text)
-> (UpdateGeofenceCollection
    -> Maybe Text -> UpdateGeofenceCollection)
-> Lens
     UpdateGeofenceCollection
     UpdateGeofenceCollection
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateGeofenceCollection' {Maybe Text
pricingPlanDataSource :: Maybe Text
$sel:pricingPlanDataSource:UpdateGeofenceCollection' :: UpdateGeofenceCollection -> Maybe Text
pricingPlanDataSource} -> Maybe Text
pricingPlanDataSource) (\s :: UpdateGeofenceCollection
s@UpdateGeofenceCollection' {} Maybe Text
a -> UpdateGeofenceCollection
s {$sel:pricingPlanDataSource:UpdateGeofenceCollection' :: Maybe Text
pricingPlanDataSource = Maybe Text
a} :: UpdateGeofenceCollection)

-- | Updates the description for the geofence collection.
updateGeofenceCollection_description :: Lens.Lens' UpdateGeofenceCollection (Prelude.Maybe Prelude.Text)
updateGeofenceCollection_description :: (Maybe Text -> f (Maybe Text))
-> UpdateGeofenceCollection -> f UpdateGeofenceCollection
updateGeofenceCollection_description = (UpdateGeofenceCollection -> Maybe Text)
-> (UpdateGeofenceCollection
    -> Maybe Text -> UpdateGeofenceCollection)
-> Lens
     UpdateGeofenceCollection
     UpdateGeofenceCollection
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateGeofenceCollection' {Maybe Text
description :: Maybe Text
$sel:description:UpdateGeofenceCollection' :: UpdateGeofenceCollection -> Maybe Text
description} -> Maybe Text
description) (\s :: UpdateGeofenceCollection
s@UpdateGeofenceCollection' {} Maybe Text
a -> UpdateGeofenceCollection
s {$sel:description:UpdateGeofenceCollection' :: Maybe Text
description = Maybe Text
a} :: UpdateGeofenceCollection)

-- | The name of the geofence collection to update.
updateGeofenceCollection_collectionName :: Lens.Lens' UpdateGeofenceCollection Prelude.Text
updateGeofenceCollection_collectionName :: (Text -> f Text)
-> UpdateGeofenceCollection -> f UpdateGeofenceCollection
updateGeofenceCollection_collectionName = (UpdateGeofenceCollection -> Text)
-> (UpdateGeofenceCollection -> Text -> UpdateGeofenceCollection)
-> Lens UpdateGeofenceCollection UpdateGeofenceCollection Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateGeofenceCollection' {Text
collectionName :: Text
$sel:collectionName:UpdateGeofenceCollection' :: UpdateGeofenceCollection -> Text
collectionName} -> Text
collectionName) (\s :: UpdateGeofenceCollection
s@UpdateGeofenceCollection' {} Text
a -> UpdateGeofenceCollection
s {$sel:collectionName:UpdateGeofenceCollection' :: Text
collectionName = Text
a} :: UpdateGeofenceCollection)

instance Core.AWSRequest UpdateGeofenceCollection where
  type
    AWSResponse UpdateGeofenceCollection =
      UpdateGeofenceCollectionResponse
  request :: UpdateGeofenceCollection -> Request UpdateGeofenceCollection
request = Service
-> UpdateGeofenceCollection -> Request UpdateGeofenceCollection
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.patchJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateGeofenceCollection
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateGeofenceCollection)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateGeofenceCollection))
-> Logger
-> Service
-> Proxy UpdateGeofenceCollection
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateGeofenceCollection)))
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 ->
          Int -> Text -> Text -> POSIX -> UpdateGeofenceCollectionResponse
UpdateGeofenceCollectionResponse'
            (Int -> Text -> Text -> POSIX -> UpdateGeofenceCollectionResponse)
-> Either String Int
-> Either
     String (Text -> Text -> POSIX -> UpdateGeofenceCollectionResponse)
forall (f :: * -> *) a b. Functor 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))
            Either
  String (Text -> Text -> POSIX -> UpdateGeofenceCollectionResponse)
-> Either String Text
-> Either
     String (Text -> POSIX -> UpdateGeofenceCollectionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"CollectionArn")
            Either String (Text -> POSIX -> UpdateGeofenceCollectionResponse)
-> Either String Text
-> Either String (POSIX -> UpdateGeofenceCollectionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"CollectionName")
            Either String (POSIX -> UpdateGeofenceCollectionResponse)
-> Either String POSIX
-> Either String UpdateGeofenceCollectionResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String POSIX
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"UpdateTime")
      )

instance Prelude.Hashable UpdateGeofenceCollection

instance Prelude.NFData UpdateGeofenceCollection

instance Core.ToHeaders UpdateGeofenceCollection where
  toHeaders :: UpdateGeofenceCollection -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateGeofenceCollection -> 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 UpdateGeofenceCollection where
  toJSON :: UpdateGeofenceCollection -> Value
toJSON UpdateGeofenceCollection' {Maybe Text
Maybe PricingPlan
Text
collectionName :: Text
description :: Maybe Text
pricingPlanDataSource :: Maybe Text
pricingPlan :: Maybe PricingPlan
$sel:collectionName:UpdateGeofenceCollection' :: UpdateGeofenceCollection -> Text
$sel:description:UpdateGeofenceCollection' :: UpdateGeofenceCollection -> Maybe Text
$sel:pricingPlanDataSource:UpdateGeofenceCollection' :: UpdateGeofenceCollection -> Maybe Text
$sel:pricingPlan:UpdateGeofenceCollection' :: UpdateGeofenceCollection -> Maybe PricingPlan
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"PricingPlan" Text -> PricingPlan -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (PricingPlan -> Pair) -> Maybe PricingPlan -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PricingPlan
pricingPlan,
            (Text
"PricingPlanDataSource" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
pricingPlanDataSource,
            (Text
"Description" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description
          ]
      )

instance Core.ToPath UpdateGeofenceCollection where
  toPath :: UpdateGeofenceCollection -> ByteString
toPath UpdateGeofenceCollection' {Maybe Text
Maybe PricingPlan
Text
collectionName :: Text
description :: Maybe Text
pricingPlanDataSource :: Maybe Text
pricingPlan :: Maybe PricingPlan
$sel:collectionName:UpdateGeofenceCollection' :: UpdateGeofenceCollection -> Text
$sel:description:UpdateGeofenceCollection' :: UpdateGeofenceCollection -> Maybe Text
$sel:pricingPlanDataSource:UpdateGeofenceCollection' :: UpdateGeofenceCollection -> Maybe Text
$sel:pricingPlan:UpdateGeofenceCollection' :: UpdateGeofenceCollection -> Maybe PricingPlan
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/geofencing/v0/collections/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
collectionName
      ]

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

-- | /See:/ 'newUpdateGeofenceCollectionResponse' smart constructor.
data UpdateGeofenceCollectionResponse = UpdateGeofenceCollectionResponse'
  { -- | The response's http status code.
    UpdateGeofenceCollectionResponse -> Int
httpStatus :: Prelude.Int,
    -- | The Amazon Resource Name (ARN) of the updated geofence collection. Used
    -- to specify a resource across AWS.
    --
    -- -   Format example:
    --     @arn:aws:geo:region:account-id:geofence-collection\/ExampleGeofenceCollection@
    UpdateGeofenceCollectionResponse -> Text
collectionArn :: Prelude.Text,
    -- | The name of the updated geofence collection.
    UpdateGeofenceCollectionResponse -> Text
collectionName :: Prelude.Text,
    -- | The time when the geofence collection was last updated in
    -- <https://www.iso.org/iso-8601-date-and-time-format.html ISO 8601>
    -- format: @YYYY-MM-DDThh:mm:ss.sssZ@
    UpdateGeofenceCollectionResponse -> POSIX
updateTime :: Core.POSIX
  }
  deriving (UpdateGeofenceCollectionResponse
-> UpdateGeofenceCollectionResponse -> Bool
(UpdateGeofenceCollectionResponse
 -> UpdateGeofenceCollectionResponse -> Bool)
-> (UpdateGeofenceCollectionResponse
    -> UpdateGeofenceCollectionResponse -> Bool)
-> Eq UpdateGeofenceCollectionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateGeofenceCollectionResponse
-> UpdateGeofenceCollectionResponse -> Bool
$c/= :: UpdateGeofenceCollectionResponse
-> UpdateGeofenceCollectionResponse -> Bool
== :: UpdateGeofenceCollectionResponse
-> UpdateGeofenceCollectionResponse -> Bool
$c== :: UpdateGeofenceCollectionResponse
-> UpdateGeofenceCollectionResponse -> Bool
Prelude.Eq, ReadPrec [UpdateGeofenceCollectionResponse]
ReadPrec UpdateGeofenceCollectionResponse
Int -> ReadS UpdateGeofenceCollectionResponse
ReadS [UpdateGeofenceCollectionResponse]
(Int -> ReadS UpdateGeofenceCollectionResponse)
-> ReadS [UpdateGeofenceCollectionResponse]
-> ReadPrec UpdateGeofenceCollectionResponse
-> ReadPrec [UpdateGeofenceCollectionResponse]
-> Read UpdateGeofenceCollectionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateGeofenceCollectionResponse]
$creadListPrec :: ReadPrec [UpdateGeofenceCollectionResponse]
readPrec :: ReadPrec UpdateGeofenceCollectionResponse
$creadPrec :: ReadPrec UpdateGeofenceCollectionResponse
readList :: ReadS [UpdateGeofenceCollectionResponse]
$creadList :: ReadS [UpdateGeofenceCollectionResponse]
readsPrec :: Int -> ReadS UpdateGeofenceCollectionResponse
$creadsPrec :: Int -> ReadS UpdateGeofenceCollectionResponse
Prelude.Read, Int -> UpdateGeofenceCollectionResponse -> ShowS
[UpdateGeofenceCollectionResponse] -> ShowS
UpdateGeofenceCollectionResponse -> String
(Int -> UpdateGeofenceCollectionResponse -> ShowS)
-> (UpdateGeofenceCollectionResponse -> String)
-> ([UpdateGeofenceCollectionResponse] -> ShowS)
-> Show UpdateGeofenceCollectionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateGeofenceCollectionResponse] -> ShowS
$cshowList :: [UpdateGeofenceCollectionResponse] -> ShowS
show :: UpdateGeofenceCollectionResponse -> String
$cshow :: UpdateGeofenceCollectionResponse -> String
showsPrec :: Int -> UpdateGeofenceCollectionResponse -> ShowS
$cshowsPrec :: Int -> UpdateGeofenceCollectionResponse -> ShowS
Prelude.Show, (forall x.
 UpdateGeofenceCollectionResponse
 -> Rep UpdateGeofenceCollectionResponse x)
-> (forall x.
    Rep UpdateGeofenceCollectionResponse x
    -> UpdateGeofenceCollectionResponse)
-> Generic UpdateGeofenceCollectionResponse
forall x.
Rep UpdateGeofenceCollectionResponse x
-> UpdateGeofenceCollectionResponse
forall x.
UpdateGeofenceCollectionResponse
-> Rep UpdateGeofenceCollectionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateGeofenceCollectionResponse x
-> UpdateGeofenceCollectionResponse
$cfrom :: forall x.
UpdateGeofenceCollectionResponse
-> Rep UpdateGeofenceCollectionResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateGeofenceCollectionResponse' 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:
--
-- 'httpStatus', 'updateGeofenceCollectionResponse_httpStatus' - The response's http status code.
--
-- 'collectionArn', 'updateGeofenceCollectionResponse_collectionArn' - The Amazon Resource Name (ARN) of the updated geofence collection. Used
-- to specify a resource across AWS.
--
-- -   Format example:
--     @arn:aws:geo:region:account-id:geofence-collection\/ExampleGeofenceCollection@
--
-- 'collectionName', 'updateGeofenceCollectionResponse_collectionName' - The name of the updated geofence collection.
--
-- 'updateTime', 'updateGeofenceCollectionResponse_updateTime' - The time when the geofence collection was last updated in
-- <https://www.iso.org/iso-8601-date-and-time-format.html ISO 8601>
-- format: @YYYY-MM-DDThh:mm:ss.sssZ@
newUpdateGeofenceCollectionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'collectionArn'
  Prelude.Text ->
  -- | 'collectionName'
  Prelude.Text ->
  -- | 'updateTime'
  Prelude.UTCTime ->
  UpdateGeofenceCollectionResponse
newUpdateGeofenceCollectionResponse :: Int -> Text -> Text -> UTCTime -> UpdateGeofenceCollectionResponse
newUpdateGeofenceCollectionResponse
  Int
pHttpStatus_
  Text
pCollectionArn_
  Text
pCollectionName_
  UTCTime
pUpdateTime_ =
    UpdateGeofenceCollectionResponse' :: Int -> Text -> Text -> POSIX -> UpdateGeofenceCollectionResponse
UpdateGeofenceCollectionResponse'
      { $sel:httpStatus:UpdateGeofenceCollectionResponse' :: Int
httpStatus =
          Int
pHttpStatus_,
        $sel:collectionArn:UpdateGeofenceCollectionResponse' :: Text
collectionArn = Text
pCollectionArn_,
        $sel:collectionName:UpdateGeofenceCollectionResponse' :: Text
collectionName = Text
pCollectionName_,
        $sel:updateTime:UpdateGeofenceCollectionResponse' :: POSIX
updateTime =
          Tagged UTCTime (Identity UTCTime) -> Tagged POSIX (Identity POSIX)
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time (Tagged UTCTime (Identity UTCTime)
 -> Tagged POSIX (Identity POSIX))
-> UTCTime -> POSIX
forall t b. AReview t b -> b -> t
Lens.# UTCTime
pUpdateTime_
      }

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

-- | The Amazon Resource Name (ARN) of the updated geofence collection. Used
-- to specify a resource across AWS.
--
-- -   Format example:
--     @arn:aws:geo:region:account-id:geofence-collection\/ExampleGeofenceCollection@
updateGeofenceCollectionResponse_collectionArn :: Lens.Lens' UpdateGeofenceCollectionResponse Prelude.Text
updateGeofenceCollectionResponse_collectionArn :: (Text -> f Text)
-> UpdateGeofenceCollectionResponse
-> f UpdateGeofenceCollectionResponse
updateGeofenceCollectionResponse_collectionArn = (UpdateGeofenceCollectionResponse -> Text)
-> (UpdateGeofenceCollectionResponse
    -> Text -> UpdateGeofenceCollectionResponse)
-> Lens
     UpdateGeofenceCollectionResponse
     UpdateGeofenceCollectionResponse
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateGeofenceCollectionResponse' {Text
collectionArn :: Text
$sel:collectionArn:UpdateGeofenceCollectionResponse' :: UpdateGeofenceCollectionResponse -> Text
collectionArn} -> Text
collectionArn) (\s :: UpdateGeofenceCollectionResponse
s@UpdateGeofenceCollectionResponse' {} Text
a -> UpdateGeofenceCollectionResponse
s {$sel:collectionArn:UpdateGeofenceCollectionResponse' :: Text
collectionArn = Text
a} :: UpdateGeofenceCollectionResponse)

-- | The name of the updated geofence collection.
updateGeofenceCollectionResponse_collectionName :: Lens.Lens' UpdateGeofenceCollectionResponse Prelude.Text
updateGeofenceCollectionResponse_collectionName :: (Text -> f Text)
-> UpdateGeofenceCollectionResponse
-> f UpdateGeofenceCollectionResponse
updateGeofenceCollectionResponse_collectionName = (UpdateGeofenceCollectionResponse -> Text)
-> (UpdateGeofenceCollectionResponse
    -> Text -> UpdateGeofenceCollectionResponse)
-> Lens
     UpdateGeofenceCollectionResponse
     UpdateGeofenceCollectionResponse
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateGeofenceCollectionResponse' {Text
collectionName :: Text
$sel:collectionName:UpdateGeofenceCollectionResponse' :: UpdateGeofenceCollectionResponse -> Text
collectionName} -> Text
collectionName) (\s :: UpdateGeofenceCollectionResponse
s@UpdateGeofenceCollectionResponse' {} Text
a -> UpdateGeofenceCollectionResponse
s {$sel:collectionName:UpdateGeofenceCollectionResponse' :: Text
collectionName = Text
a} :: UpdateGeofenceCollectionResponse)

-- | The time when the geofence collection was last updated in
-- <https://www.iso.org/iso-8601-date-and-time-format.html ISO 8601>
-- format: @YYYY-MM-DDThh:mm:ss.sssZ@
updateGeofenceCollectionResponse_updateTime :: Lens.Lens' UpdateGeofenceCollectionResponse Prelude.UTCTime
updateGeofenceCollectionResponse_updateTime :: (UTCTime -> f UTCTime)
-> UpdateGeofenceCollectionResponse
-> f UpdateGeofenceCollectionResponse
updateGeofenceCollectionResponse_updateTime = (UpdateGeofenceCollectionResponse -> POSIX)
-> (UpdateGeofenceCollectionResponse
    -> POSIX -> UpdateGeofenceCollectionResponse)
-> Lens
     UpdateGeofenceCollectionResponse
     UpdateGeofenceCollectionResponse
     POSIX
     POSIX
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateGeofenceCollectionResponse' {POSIX
updateTime :: POSIX
$sel:updateTime:UpdateGeofenceCollectionResponse' :: UpdateGeofenceCollectionResponse -> POSIX
updateTime} -> POSIX
updateTime) (\s :: UpdateGeofenceCollectionResponse
s@UpdateGeofenceCollectionResponse' {} POSIX
a -> UpdateGeofenceCollectionResponse
s {$sel:updateTime:UpdateGeofenceCollectionResponse' :: POSIX
updateTime = POSIX
a} :: UpdateGeofenceCollectionResponse) ((POSIX -> f POSIX)
 -> UpdateGeofenceCollectionResponse
 -> f UpdateGeofenceCollectionResponse)
-> ((UTCTime -> f UTCTime) -> POSIX -> f POSIX)
-> (UTCTime -> f UTCTime)
-> UpdateGeofenceCollectionResponse
-> f UpdateGeofenceCollectionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (UTCTime -> f UTCTime) -> POSIX -> f POSIX
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

instance
  Prelude.NFData
    UpdateGeofenceCollectionResponse