{-# 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.Route53.CreateHealthCheck
-- 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 new health check.
--
-- For information about adding health checks to resource record sets, see
-- <https://docs.aws.amazon.com/Route53/latest/APIReference/API_ResourceRecordSet.html#Route53-Type-ResourceRecordSet-HealthCheckId HealthCheckId>
-- in
-- <https://docs.aws.amazon.com/Route53/latest/APIReference/API_ChangeResourceRecordSets.html ChangeResourceRecordSets>.
--
-- __ELB Load Balancers__
--
-- If you\'re registering EC2 instances with an Elastic Load Balancing
-- (ELB) load balancer, do not create Amazon Route 53 health checks for the
-- EC2 instances. When you register an EC2 instance with a load balancer,
-- you configure settings for an ELB health check, which performs a similar
-- function to a Route 53 health check.
--
-- __Private Hosted Zones__
--
-- You can associate health checks with failover resource record sets in a
-- private hosted zone. Note the following:
--
-- -   Route 53 health checkers are outside the VPC. To check the health of
--     an endpoint within a VPC by IP address, you must assign a public IP
--     address to the instance in the VPC.
--
-- -   You can configure a health checker to check the health of an
--     external resource that the instance relies on, such as a database
--     server.
--
-- -   You can create a CloudWatch metric, associate an alarm with the
--     metric, and then create a health check that is based on the state of
--     the alarm. For example, you might create a CloudWatch metric that
--     checks the status of the Amazon EC2 @StatusCheckFailed@ metric, add
--     an alarm to the metric, and then create a health check that is based
--     on the state of the alarm. For information about creating CloudWatch
--     metrics and alarms by using the CloudWatch console, see the
--     <https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/WhatIsCloudWatch.html Amazon CloudWatch User Guide>.
module Amazonka.Route53.CreateHealthCheck
  ( -- * Creating a Request
    CreateHealthCheck (..),
    newCreateHealthCheck,

    -- * Request Lenses
    createHealthCheck_callerReference,
    createHealthCheck_healthCheckConfig,

    -- * Destructuring the Response
    CreateHealthCheckResponse (..),
    newCreateHealthCheckResponse,

    -- * Response Lenses
    createHealthCheckResponse_httpStatus,
    createHealthCheckResponse_healthCheck,
    createHealthCheckResponse_location,
  )
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.Route53.Types

-- | A complex type that contains the health check request information.
--
-- /See:/ 'newCreateHealthCheck' smart constructor.
data CreateHealthCheck = CreateHealthCheck'
  { -- | A unique string that identifies the request and that allows you to retry
    -- a failed @CreateHealthCheck@ request without the risk of creating two
    -- identical health checks:
    --
    -- -   If you send a @CreateHealthCheck@ request with the same
    --     @CallerReference@ and settings as a previous request, and if the
    --     health check doesn\'t exist, Amazon Route 53 creates the health
    --     check. If the health check does exist, Route 53 returns the settings
    --     for the existing health check.
    --
    -- -   If you send a @CreateHealthCheck@ request with the same
    --     @CallerReference@ as a deleted health check, regardless of the
    --     settings, Route 53 returns a @HealthCheckAlreadyExists@ error.
    --
    -- -   If you send a @CreateHealthCheck@ request with the same
    --     @CallerReference@ as an existing health check but with different
    --     settings, Route 53 returns a @HealthCheckAlreadyExists@ error.
    --
    -- -   If you send a @CreateHealthCheck@ request with a unique
    --     @CallerReference@ but settings identical to an existing health
    --     check, Route 53 creates the health check.
    CreateHealthCheck -> Text
callerReference :: Prelude.Text,
    -- | A complex type that contains settings for a new health check.
    CreateHealthCheck -> HealthCheckConfig
healthCheckConfig :: HealthCheckConfig
  }
  deriving (CreateHealthCheck -> CreateHealthCheck -> Bool
(CreateHealthCheck -> CreateHealthCheck -> Bool)
-> (CreateHealthCheck -> CreateHealthCheck -> Bool)
-> Eq CreateHealthCheck
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateHealthCheck -> CreateHealthCheck -> Bool
$c/= :: CreateHealthCheck -> CreateHealthCheck -> Bool
== :: CreateHealthCheck -> CreateHealthCheck -> Bool
$c== :: CreateHealthCheck -> CreateHealthCheck -> Bool
Prelude.Eq, ReadPrec [CreateHealthCheck]
ReadPrec CreateHealthCheck
Int -> ReadS CreateHealthCheck
ReadS [CreateHealthCheck]
(Int -> ReadS CreateHealthCheck)
-> ReadS [CreateHealthCheck]
-> ReadPrec CreateHealthCheck
-> ReadPrec [CreateHealthCheck]
-> Read CreateHealthCheck
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateHealthCheck]
$creadListPrec :: ReadPrec [CreateHealthCheck]
readPrec :: ReadPrec CreateHealthCheck
$creadPrec :: ReadPrec CreateHealthCheck
readList :: ReadS [CreateHealthCheck]
$creadList :: ReadS [CreateHealthCheck]
readsPrec :: Int -> ReadS CreateHealthCheck
$creadsPrec :: Int -> ReadS CreateHealthCheck
Prelude.Read, Int -> CreateHealthCheck -> ShowS
[CreateHealthCheck] -> ShowS
CreateHealthCheck -> String
(Int -> CreateHealthCheck -> ShowS)
-> (CreateHealthCheck -> String)
-> ([CreateHealthCheck] -> ShowS)
-> Show CreateHealthCheck
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateHealthCheck] -> ShowS
$cshowList :: [CreateHealthCheck] -> ShowS
show :: CreateHealthCheck -> String
$cshow :: CreateHealthCheck -> String
showsPrec :: Int -> CreateHealthCheck -> ShowS
$cshowsPrec :: Int -> CreateHealthCheck -> ShowS
Prelude.Show, (forall x. CreateHealthCheck -> Rep CreateHealthCheck x)
-> (forall x. Rep CreateHealthCheck x -> CreateHealthCheck)
-> Generic CreateHealthCheck
forall x. Rep CreateHealthCheck x -> CreateHealthCheck
forall x. CreateHealthCheck -> Rep CreateHealthCheck x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateHealthCheck x -> CreateHealthCheck
$cfrom :: forall x. CreateHealthCheck -> Rep CreateHealthCheck x
Prelude.Generic)

-- |
-- Create a value of 'CreateHealthCheck' 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:
--
-- 'callerReference', 'createHealthCheck_callerReference' - A unique string that identifies the request and that allows you to retry
-- a failed @CreateHealthCheck@ request without the risk of creating two
-- identical health checks:
--
-- -   If you send a @CreateHealthCheck@ request with the same
--     @CallerReference@ and settings as a previous request, and if the
--     health check doesn\'t exist, Amazon Route 53 creates the health
--     check. If the health check does exist, Route 53 returns the settings
--     for the existing health check.
--
-- -   If you send a @CreateHealthCheck@ request with the same
--     @CallerReference@ as a deleted health check, regardless of the
--     settings, Route 53 returns a @HealthCheckAlreadyExists@ error.
--
-- -   If you send a @CreateHealthCheck@ request with the same
--     @CallerReference@ as an existing health check but with different
--     settings, Route 53 returns a @HealthCheckAlreadyExists@ error.
--
-- -   If you send a @CreateHealthCheck@ request with a unique
--     @CallerReference@ but settings identical to an existing health
--     check, Route 53 creates the health check.
--
-- 'healthCheckConfig', 'createHealthCheck_healthCheckConfig' - A complex type that contains settings for a new health check.
newCreateHealthCheck ::
  -- | 'callerReference'
  Prelude.Text ->
  -- | 'healthCheckConfig'
  HealthCheckConfig ->
  CreateHealthCheck
newCreateHealthCheck :: Text -> HealthCheckConfig -> CreateHealthCheck
newCreateHealthCheck
  Text
pCallerReference_
  HealthCheckConfig
pHealthCheckConfig_ =
    CreateHealthCheck' :: Text -> HealthCheckConfig -> CreateHealthCheck
CreateHealthCheck'
      { $sel:callerReference:CreateHealthCheck' :: Text
callerReference =
          Text
pCallerReference_,
        $sel:healthCheckConfig:CreateHealthCheck' :: HealthCheckConfig
healthCheckConfig = HealthCheckConfig
pHealthCheckConfig_
      }

-- | A unique string that identifies the request and that allows you to retry
-- a failed @CreateHealthCheck@ request without the risk of creating two
-- identical health checks:
--
-- -   If you send a @CreateHealthCheck@ request with the same
--     @CallerReference@ and settings as a previous request, and if the
--     health check doesn\'t exist, Amazon Route 53 creates the health
--     check. If the health check does exist, Route 53 returns the settings
--     for the existing health check.
--
-- -   If you send a @CreateHealthCheck@ request with the same
--     @CallerReference@ as a deleted health check, regardless of the
--     settings, Route 53 returns a @HealthCheckAlreadyExists@ error.
--
-- -   If you send a @CreateHealthCheck@ request with the same
--     @CallerReference@ as an existing health check but with different
--     settings, Route 53 returns a @HealthCheckAlreadyExists@ error.
--
-- -   If you send a @CreateHealthCheck@ request with a unique
--     @CallerReference@ but settings identical to an existing health
--     check, Route 53 creates the health check.
createHealthCheck_callerReference :: Lens.Lens' CreateHealthCheck Prelude.Text
createHealthCheck_callerReference :: (Text -> f Text) -> CreateHealthCheck -> f CreateHealthCheck
createHealthCheck_callerReference = (CreateHealthCheck -> Text)
-> (CreateHealthCheck -> Text -> CreateHealthCheck)
-> Lens CreateHealthCheck CreateHealthCheck Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateHealthCheck' {Text
callerReference :: Text
$sel:callerReference:CreateHealthCheck' :: CreateHealthCheck -> Text
callerReference} -> Text
callerReference) (\s :: CreateHealthCheck
s@CreateHealthCheck' {} Text
a -> CreateHealthCheck
s {$sel:callerReference:CreateHealthCheck' :: Text
callerReference = Text
a} :: CreateHealthCheck)

-- | A complex type that contains settings for a new health check.
createHealthCheck_healthCheckConfig :: Lens.Lens' CreateHealthCheck HealthCheckConfig
createHealthCheck_healthCheckConfig :: (HealthCheckConfig -> f HealthCheckConfig)
-> CreateHealthCheck -> f CreateHealthCheck
createHealthCheck_healthCheckConfig = (CreateHealthCheck -> HealthCheckConfig)
-> (CreateHealthCheck -> HealthCheckConfig -> CreateHealthCheck)
-> Lens
     CreateHealthCheck
     CreateHealthCheck
     HealthCheckConfig
     HealthCheckConfig
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateHealthCheck' {HealthCheckConfig
healthCheckConfig :: HealthCheckConfig
$sel:healthCheckConfig:CreateHealthCheck' :: CreateHealthCheck -> HealthCheckConfig
healthCheckConfig} -> HealthCheckConfig
healthCheckConfig) (\s :: CreateHealthCheck
s@CreateHealthCheck' {} HealthCheckConfig
a -> CreateHealthCheck
s {$sel:healthCheckConfig:CreateHealthCheck' :: HealthCheckConfig
healthCheckConfig = HealthCheckConfig
a} :: CreateHealthCheck)

instance Core.AWSRequest CreateHealthCheck where
  type
    AWSResponse CreateHealthCheck =
      CreateHealthCheckResponse
  request :: CreateHealthCheck -> Request CreateHealthCheck
request = Service -> CreateHealthCheck -> Request CreateHealthCheck
forall a. (ToRequest a, ToElement a) => Service -> a -> Request a
Request.postXML Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateHealthCheck
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateHealthCheck)))
response =
    (Int
 -> ResponseHeaders
 -> [Node]
 -> Either String (AWSResponse CreateHealthCheck))
-> Logger
-> Service
-> Proxy CreateHealthCheck
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateHealthCheck)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXML
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Int -> HealthCheck -> Text -> CreateHealthCheckResponse
CreateHealthCheckResponse'
            (Int -> HealthCheck -> Text -> CreateHealthCheckResponse)
-> Either String Int
-> Either String (HealthCheck -> Text -> CreateHealthCheckResponse)
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 (HealthCheck -> Text -> CreateHealthCheckResponse)
-> Either String HealthCheck
-> Either String (Text -> CreateHealthCheckResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String HealthCheck
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"HealthCheck")
            Either String (Text -> CreateHealthCheckResponse)
-> Either String Text -> Either String CreateHealthCheckResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h ResponseHeaders -> HeaderName -> Either String Text
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String a
Core..# HeaderName
"Location")
      )

instance Prelude.Hashable CreateHealthCheck

instance Prelude.NFData CreateHealthCheck

instance Core.ToElement CreateHealthCheck where
  toElement :: CreateHealthCheck -> Element
toElement =
    Name -> CreateHealthCheck -> Element
forall a. ToXML a => Name -> a -> Element
Core.mkElement
      Name
"{https://route53.amazonaws.com/doc/2013-04-01/}CreateHealthCheckRequest"

instance Core.ToHeaders CreateHealthCheck where
  toHeaders :: CreateHealthCheck -> ResponseHeaders
toHeaders = ResponseHeaders -> CreateHealthCheck -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty

instance Core.ToPath CreateHealthCheck where
  toPath :: CreateHealthCheck -> ByteString
toPath = ByteString -> CreateHealthCheck -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/2013-04-01/healthcheck"

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

instance Core.ToXML CreateHealthCheck where
  toXML :: CreateHealthCheck -> XML
toXML CreateHealthCheck' {Text
HealthCheckConfig
healthCheckConfig :: HealthCheckConfig
callerReference :: Text
$sel:healthCheckConfig:CreateHealthCheck' :: CreateHealthCheck -> HealthCheckConfig
$sel:callerReference:CreateHealthCheck' :: CreateHealthCheck -> Text
..} =
    [XML] -> XML
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ Name
"CallerReference" Name -> Text -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= Text
callerReference,
        Name
"HealthCheckConfig" Name -> HealthCheckConfig -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= HealthCheckConfig
healthCheckConfig
      ]

-- | A complex type containing the response information for the new health
-- check.
--
-- /See:/ 'newCreateHealthCheckResponse' smart constructor.
data CreateHealthCheckResponse = CreateHealthCheckResponse'
  { -- | The response's http status code.
    CreateHealthCheckResponse -> Int
httpStatus :: Prelude.Int,
    -- | A complex type that contains identifying information about the health
    -- check.
    CreateHealthCheckResponse -> HealthCheck
healthCheck :: HealthCheck,
    -- | The unique URL representing the new health check.
    CreateHealthCheckResponse -> Text
location :: Prelude.Text
  }
  deriving (CreateHealthCheckResponse -> CreateHealthCheckResponse -> Bool
(CreateHealthCheckResponse -> CreateHealthCheckResponse -> Bool)
-> (CreateHealthCheckResponse -> CreateHealthCheckResponse -> Bool)
-> Eq CreateHealthCheckResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateHealthCheckResponse -> CreateHealthCheckResponse -> Bool
$c/= :: CreateHealthCheckResponse -> CreateHealthCheckResponse -> Bool
== :: CreateHealthCheckResponse -> CreateHealthCheckResponse -> Bool
$c== :: CreateHealthCheckResponse -> CreateHealthCheckResponse -> Bool
Prelude.Eq, ReadPrec [CreateHealthCheckResponse]
ReadPrec CreateHealthCheckResponse
Int -> ReadS CreateHealthCheckResponse
ReadS [CreateHealthCheckResponse]
(Int -> ReadS CreateHealthCheckResponse)
-> ReadS [CreateHealthCheckResponse]
-> ReadPrec CreateHealthCheckResponse
-> ReadPrec [CreateHealthCheckResponse]
-> Read CreateHealthCheckResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateHealthCheckResponse]
$creadListPrec :: ReadPrec [CreateHealthCheckResponse]
readPrec :: ReadPrec CreateHealthCheckResponse
$creadPrec :: ReadPrec CreateHealthCheckResponse
readList :: ReadS [CreateHealthCheckResponse]
$creadList :: ReadS [CreateHealthCheckResponse]
readsPrec :: Int -> ReadS CreateHealthCheckResponse
$creadsPrec :: Int -> ReadS CreateHealthCheckResponse
Prelude.Read, Int -> CreateHealthCheckResponse -> ShowS
[CreateHealthCheckResponse] -> ShowS
CreateHealthCheckResponse -> String
(Int -> CreateHealthCheckResponse -> ShowS)
-> (CreateHealthCheckResponse -> String)
-> ([CreateHealthCheckResponse] -> ShowS)
-> Show CreateHealthCheckResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateHealthCheckResponse] -> ShowS
$cshowList :: [CreateHealthCheckResponse] -> ShowS
show :: CreateHealthCheckResponse -> String
$cshow :: CreateHealthCheckResponse -> String
showsPrec :: Int -> CreateHealthCheckResponse -> ShowS
$cshowsPrec :: Int -> CreateHealthCheckResponse -> ShowS
Prelude.Show, (forall x.
 CreateHealthCheckResponse -> Rep CreateHealthCheckResponse x)
-> (forall x.
    Rep CreateHealthCheckResponse x -> CreateHealthCheckResponse)
-> Generic CreateHealthCheckResponse
forall x.
Rep CreateHealthCheckResponse x -> CreateHealthCheckResponse
forall x.
CreateHealthCheckResponse -> Rep CreateHealthCheckResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateHealthCheckResponse x -> CreateHealthCheckResponse
$cfrom :: forall x.
CreateHealthCheckResponse -> Rep CreateHealthCheckResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateHealthCheckResponse' 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', 'createHealthCheckResponse_httpStatus' - The response's http status code.
--
-- 'healthCheck', 'createHealthCheckResponse_healthCheck' - A complex type that contains identifying information about the health
-- check.
--
-- 'location', 'createHealthCheckResponse_location' - The unique URL representing the new health check.
newCreateHealthCheckResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'healthCheck'
  HealthCheck ->
  -- | 'location'
  Prelude.Text ->
  CreateHealthCheckResponse
newCreateHealthCheckResponse :: Int -> HealthCheck -> Text -> CreateHealthCheckResponse
newCreateHealthCheckResponse
  Int
pHttpStatus_
  HealthCheck
pHealthCheck_
  Text
pLocation_ =
    CreateHealthCheckResponse' :: Int -> HealthCheck -> Text -> CreateHealthCheckResponse
CreateHealthCheckResponse'
      { $sel:httpStatus:CreateHealthCheckResponse' :: Int
httpStatus =
          Int
pHttpStatus_,
        $sel:healthCheck:CreateHealthCheckResponse' :: HealthCheck
healthCheck = HealthCheck
pHealthCheck_,
        $sel:location:CreateHealthCheckResponse' :: Text
location = Text
pLocation_
      }

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

-- | A complex type that contains identifying information about the health
-- check.
createHealthCheckResponse_healthCheck :: Lens.Lens' CreateHealthCheckResponse HealthCheck
createHealthCheckResponse_healthCheck :: (HealthCheck -> f HealthCheck)
-> CreateHealthCheckResponse -> f CreateHealthCheckResponse
createHealthCheckResponse_healthCheck = (CreateHealthCheckResponse -> HealthCheck)
-> (CreateHealthCheckResponse
    -> HealthCheck -> CreateHealthCheckResponse)
-> Lens
     CreateHealthCheckResponse
     CreateHealthCheckResponse
     HealthCheck
     HealthCheck
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateHealthCheckResponse' {HealthCheck
healthCheck :: HealthCheck
$sel:healthCheck:CreateHealthCheckResponse' :: CreateHealthCheckResponse -> HealthCheck
healthCheck} -> HealthCheck
healthCheck) (\s :: CreateHealthCheckResponse
s@CreateHealthCheckResponse' {} HealthCheck
a -> CreateHealthCheckResponse
s {$sel:healthCheck:CreateHealthCheckResponse' :: HealthCheck
healthCheck = HealthCheck
a} :: CreateHealthCheckResponse)

-- | The unique URL representing the new health check.
createHealthCheckResponse_location :: Lens.Lens' CreateHealthCheckResponse Prelude.Text
createHealthCheckResponse_location :: (Text -> f Text)
-> CreateHealthCheckResponse -> f CreateHealthCheckResponse
createHealthCheckResponse_location = (CreateHealthCheckResponse -> Text)
-> (CreateHealthCheckResponse -> Text -> CreateHealthCheckResponse)
-> Lens
     CreateHealthCheckResponse CreateHealthCheckResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateHealthCheckResponse' {Text
location :: Text
$sel:location:CreateHealthCheckResponse' :: CreateHealthCheckResponse -> Text
location} -> Text
location) (\s :: CreateHealthCheckResponse
s@CreateHealthCheckResponse' {} Text
a -> CreateHealthCheckResponse
s {$sel:location:CreateHealthCheckResponse' :: Text
location = Text
a} :: CreateHealthCheckResponse)

instance Prelude.NFData CreateHealthCheckResponse