{-# 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.RDS.CreateCustomAvailabilityZone
-- 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 custom Availability Zone (AZ).
--
-- A custom AZ is an on-premises AZ that is integrated with a VMware
-- vSphere cluster.
--
-- For more information about RDS on VMware, see the
-- <https://docs.aws.amazon.com/AmazonRDS/latest/RDSonVMwareUserGuide/rds-on-vmware.html RDS on VMware User Guide.>
module Amazonka.RDS.CreateCustomAvailabilityZone
  ( -- * Creating a Request
    CreateCustomAvailabilityZone (..),
    newCreateCustomAvailabilityZone,

    -- * Request Lenses
    createCustomAvailabilityZone_vpnTunnelOriginatorIP,
    createCustomAvailabilityZone_newVpnTunnelName,
    createCustomAvailabilityZone_existingVpnId,
    createCustomAvailabilityZone_customAvailabilityZoneName,

    -- * Destructuring the Response
    CreateCustomAvailabilityZoneResponse (..),
    newCreateCustomAvailabilityZoneResponse,

    -- * Response Lenses
    createCustomAvailabilityZoneResponse_customAvailabilityZone,
    createCustomAvailabilityZoneResponse_httpStatus,
  )
where

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

-- |
--
-- /See:/ 'newCreateCustomAvailabilityZone' smart constructor.
data CreateCustomAvailabilityZone = CreateCustomAvailabilityZone'
  { -- | The IP address of network traffic from your on-premises data center. A
    -- custom AZ receives the network traffic.
    --
    -- Specify this parameter only if @ExistingVpnId@ isn\'t specified.
    CreateCustomAvailabilityZone -> Maybe Text
vpnTunnelOriginatorIP :: Prelude.Maybe Prelude.Text,
    -- | The name of a new VPN tunnel between the Amazon RDS website and the
    -- VMware vSphere cluster.
    --
    -- Specify this parameter only if @ExistingVpnId@ isn\'t specified.
    CreateCustomAvailabilityZone -> Maybe Text
newVpnTunnelName' :: Prelude.Maybe Prelude.Text,
    -- | The ID of an existing virtual private network (VPN) between the Amazon
    -- RDS website and the VMware vSphere cluster.
    CreateCustomAvailabilityZone -> Maybe Text
existingVpnId :: Prelude.Maybe Prelude.Text,
    -- | The name of the custom Availability Zone (AZ).
    CreateCustomAvailabilityZone -> Text
customAvailabilityZoneName :: Prelude.Text
  }
  deriving (CreateCustomAvailabilityZone
-> CreateCustomAvailabilityZone -> Bool
(CreateCustomAvailabilityZone
 -> CreateCustomAvailabilityZone -> Bool)
-> (CreateCustomAvailabilityZone
    -> CreateCustomAvailabilityZone -> Bool)
-> Eq CreateCustomAvailabilityZone
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateCustomAvailabilityZone
-> CreateCustomAvailabilityZone -> Bool
$c/= :: CreateCustomAvailabilityZone
-> CreateCustomAvailabilityZone -> Bool
== :: CreateCustomAvailabilityZone
-> CreateCustomAvailabilityZone -> Bool
$c== :: CreateCustomAvailabilityZone
-> CreateCustomAvailabilityZone -> Bool
Prelude.Eq, ReadPrec [CreateCustomAvailabilityZone]
ReadPrec CreateCustomAvailabilityZone
Int -> ReadS CreateCustomAvailabilityZone
ReadS [CreateCustomAvailabilityZone]
(Int -> ReadS CreateCustomAvailabilityZone)
-> ReadS [CreateCustomAvailabilityZone]
-> ReadPrec CreateCustomAvailabilityZone
-> ReadPrec [CreateCustomAvailabilityZone]
-> Read CreateCustomAvailabilityZone
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateCustomAvailabilityZone]
$creadListPrec :: ReadPrec [CreateCustomAvailabilityZone]
readPrec :: ReadPrec CreateCustomAvailabilityZone
$creadPrec :: ReadPrec CreateCustomAvailabilityZone
readList :: ReadS [CreateCustomAvailabilityZone]
$creadList :: ReadS [CreateCustomAvailabilityZone]
readsPrec :: Int -> ReadS CreateCustomAvailabilityZone
$creadsPrec :: Int -> ReadS CreateCustomAvailabilityZone
Prelude.Read, Int -> CreateCustomAvailabilityZone -> ShowS
[CreateCustomAvailabilityZone] -> ShowS
CreateCustomAvailabilityZone -> String
(Int -> CreateCustomAvailabilityZone -> ShowS)
-> (CreateCustomAvailabilityZone -> String)
-> ([CreateCustomAvailabilityZone] -> ShowS)
-> Show CreateCustomAvailabilityZone
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateCustomAvailabilityZone] -> ShowS
$cshowList :: [CreateCustomAvailabilityZone] -> ShowS
show :: CreateCustomAvailabilityZone -> String
$cshow :: CreateCustomAvailabilityZone -> String
showsPrec :: Int -> CreateCustomAvailabilityZone -> ShowS
$cshowsPrec :: Int -> CreateCustomAvailabilityZone -> ShowS
Prelude.Show, (forall x.
 CreateCustomAvailabilityZone -> Rep CreateCustomAvailabilityZone x)
-> (forall x.
    Rep CreateCustomAvailabilityZone x -> CreateCustomAvailabilityZone)
-> Generic CreateCustomAvailabilityZone
forall x.
Rep CreateCustomAvailabilityZone x -> CreateCustomAvailabilityZone
forall x.
CreateCustomAvailabilityZone -> Rep CreateCustomAvailabilityZone x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateCustomAvailabilityZone x -> CreateCustomAvailabilityZone
$cfrom :: forall x.
CreateCustomAvailabilityZone -> Rep CreateCustomAvailabilityZone x
Prelude.Generic)

-- |
-- Create a value of 'CreateCustomAvailabilityZone' 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:
--
-- 'vpnTunnelOriginatorIP', 'createCustomAvailabilityZone_vpnTunnelOriginatorIP' - The IP address of network traffic from your on-premises data center. A
-- custom AZ receives the network traffic.
--
-- Specify this parameter only if @ExistingVpnId@ isn\'t specified.
--
-- 'newVpnTunnelName'', 'createCustomAvailabilityZone_newVpnTunnelName' - The name of a new VPN tunnel between the Amazon RDS website and the
-- VMware vSphere cluster.
--
-- Specify this parameter only if @ExistingVpnId@ isn\'t specified.
--
-- 'existingVpnId', 'createCustomAvailabilityZone_existingVpnId' - The ID of an existing virtual private network (VPN) between the Amazon
-- RDS website and the VMware vSphere cluster.
--
-- 'customAvailabilityZoneName', 'createCustomAvailabilityZone_customAvailabilityZoneName' - The name of the custom Availability Zone (AZ).
newCreateCustomAvailabilityZone ::
  -- | 'customAvailabilityZoneName'
  Prelude.Text ->
  CreateCustomAvailabilityZone
newCreateCustomAvailabilityZone :: Text -> CreateCustomAvailabilityZone
newCreateCustomAvailabilityZone
  Text
pCustomAvailabilityZoneName_ =
    CreateCustomAvailabilityZone' :: Maybe Text
-> Maybe Text -> Maybe Text -> Text -> CreateCustomAvailabilityZone
CreateCustomAvailabilityZone'
      { $sel:vpnTunnelOriginatorIP:CreateCustomAvailabilityZone' :: Maybe Text
vpnTunnelOriginatorIP =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:newVpnTunnelName':CreateCustomAvailabilityZone' :: Maybe Text
newVpnTunnelName' = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:existingVpnId:CreateCustomAvailabilityZone' :: Maybe Text
existingVpnId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:customAvailabilityZoneName:CreateCustomAvailabilityZone' :: Text
customAvailabilityZoneName =
          Text
pCustomAvailabilityZoneName_
      }

-- | The IP address of network traffic from your on-premises data center. A
-- custom AZ receives the network traffic.
--
-- Specify this parameter only if @ExistingVpnId@ isn\'t specified.
createCustomAvailabilityZone_vpnTunnelOriginatorIP :: Lens.Lens' CreateCustomAvailabilityZone (Prelude.Maybe Prelude.Text)
createCustomAvailabilityZone_vpnTunnelOriginatorIP :: (Maybe Text -> f (Maybe Text))
-> CreateCustomAvailabilityZone -> f CreateCustomAvailabilityZone
createCustomAvailabilityZone_vpnTunnelOriginatorIP = (CreateCustomAvailabilityZone -> Maybe Text)
-> (CreateCustomAvailabilityZone
    -> Maybe Text -> CreateCustomAvailabilityZone)
-> Lens
     CreateCustomAvailabilityZone
     CreateCustomAvailabilityZone
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCustomAvailabilityZone' {Maybe Text
vpnTunnelOriginatorIP :: Maybe Text
$sel:vpnTunnelOriginatorIP:CreateCustomAvailabilityZone' :: CreateCustomAvailabilityZone -> Maybe Text
vpnTunnelOriginatorIP} -> Maybe Text
vpnTunnelOriginatorIP) (\s :: CreateCustomAvailabilityZone
s@CreateCustomAvailabilityZone' {} Maybe Text
a -> CreateCustomAvailabilityZone
s {$sel:vpnTunnelOriginatorIP:CreateCustomAvailabilityZone' :: Maybe Text
vpnTunnelOriginatorIP = Maybe Text
a} :: CreateCustomAvailabilityZone)

-- | The name of a new VPN tunnel between the Amazon RDS website and the
-- VMware vSphere cluster.
--
-- Specify this parameter only if @ExistingVpnId@ isn\'t specified.
createCustomAvailabilityZone_newVpnTunnelName :: Lens.Lens' CreateCustomAvailabilityZone (Prelude.Maybe Prelude.Text)
createCustomAvailabilityZone_newVpnTunnelName :: (Maybe Text -> f (Maybe Text))
-> CreateCustomAvailabilityZone -> f CreateCustomAvailabilityZone
createCustomAvailabilityZone_newVpnTunnelName = (CreateCustomAvailabilityZone -> Maybe Text)
-> (CreateCustomAvailabilityZone
    -> Maybe Text -> CreateCustomAvailabilityZone)
-> Lens
     CreateCustomAvailabilityZone
     CreateCustomAvailabilityZone
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCustomAvailabilityZone' {Maybe Text
newVpnTunnelName' :: Maybe Text
$sel:newVpnTunnelName':CreateCustomAvailabilityZone' :: CreateCustomAvailabilityZone -> Maybe Text
newVpnTunnelName'} -> Maybe Text
newVpnTunnelName') (\s :: CreateCustomAvailabilityZone
s@CreateCustomAvailabilityZone' {} Maybe Text
a -> CreateCustomAvailabilityZone
s {$sel:newVpnTunnelName':CreateCustomAvailabilityZone' :: Maybe Text
newVpnTunnelName' = Maybe Text
a} :: CreateCustomAvailabilityZone)

-- | The ID of an existing virtual private network (VPN) between the Amazon
-- RDS website and the VMware vSphere cluster.
createCustomAvailabilityZone_existingVpnId :: Lens.Lens' CreateCustomAvailabilityZone (Prelude.Maybe Prelude.Text)
createCustomAvailabilityZone_existingVpnId :: (Maybe Text -> f (Maybe Text))
-> CreateCustomAvailabilityZone -> f CreateCustomAvailabilityZone
createCustomAvailabilityZone_existingVpnId = (CreateCustomAvailabilityZone -> Maybe Text)
-> (CreateCustomAvailabilityZone
    -> Maybe Text -> CreateCustomAvailabilityZone)
-> Lens
     CreateCustomAvailabilityZone
     CreateCustomAvailabilityZone
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCustomAvailabilityZone' {Maybe Text
existingVpnId :: Maybe Text
$sel:existingVpnId:CreateCustomAvailabilityZone' :: CreateCustomAvailabilityZone -> Maybe Text
existingVpnId} -> Maybe Text
existingVpnId) (\s :: CreateCustomAvailabilityZone
s@CreateCustomAvailabilityZone' {} Maybe Text
a -> CreateCustomAvailabilityZone
s {$sel:existingVpnId:CreateCustomAvailabilityZone' :: Maybe Text
existingVpnId = Maybe Text
a} :: CreateCustomAvailabilityZone)

-- | The name of the custom Availability Zone (AZ).
createCustomAvailabilityZone_customAvailabilityZoneName :: Lens.Lens' CreateCustomAvailabilityZone Prelude.Text
createCustomAvailabilityZone_customAvailabilityZoneName :: (Text -> f Text)
-> CreateCustomAvailabilityZone -> f CreateCustomAvailabilityZone
createCustomAvailabilityZone_customAvailabilityZoneName = (CreateCustomAvailabilityZone -> Text)
-> (CreateCustomAvailabilityZone
    -> Text -> CreateCustomAvailabilityZone)
-> Lens
     CreateCustomAvailabilityZone CreateCustomAvailabilityZone Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCustomAvailabilityZone' {Text
customAvailabilityZoneName :: Text
$sel:customAvailabilityZoneName:CreateCustomAvailabilityZone' :: CreateCustomAvailabilityZone -> Text
customAvailabilityZoneName} -> Text
customAvailabilityZoneName) (\s :: CreateCustomAvailabilityZone
s@CreateCustomAvailabilityZone' {} Text
a -> CreateCustomAvailabilityZone
s {$sel:customAvailabilityZoneName:CreateCustomAvailabilityZone' :: Text
customAvailabilityZoneName = Text
a} :: CreateCustomAvailabilityZone)

instance Core.AWSRequest CreateCustomAvailabilityZone where
  type
    AWSResponse CreateCustomAvailabilityZone =
      CreateCustomAvailabilityZoneResponse
  request :: CreateCustomAvailabilityZone
-> Request CreateCustomAvailabilityZone
request = Service
-> CreateCustomAvailabilityZone
-> Request CreateCustomAvailabilityZone
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateCustomAvailabilityZone
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateCustomAvailabilityZone)))
response =
    Text
-> (Int
    -> ResponseHeaders
    -> [Node]
    -> Either String (AWSResponse CreateCustomAvailabilityZone))
-> Logger
-> Service
-> Proxy CreateCustomAvailabilityZone
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreateCustomAvailabilityZone)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
    -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
      Text
"CreateCustomAvailabilityZoneResult"
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe CustomAvailabilityZone
-> Int -> CreateCustomAvailabilityZoneResponse
CreateCustomAvailabilityZoneResponse'
            (Maybe CustomAvailabilityZone
 -> Int -> CreateCustomAvailabilityZoneResponse)
-> Either String (Maybe CustomAvailabilityZone)
-> Either String (Int -> CreateCustomAvailabilityZoneResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe CustomAvailabilityZone)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"CustomAvailabilityZone")
            Either String (Int -> CreateCustomAvailabilityZoneResponse)
-> Either String Int
-> Either String CreateCustomAvailabilityZoneResponse
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
    CreateCustomAvailabilityZone

instance Prelude.NFData CreateCustomAvailabilityZone

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

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

instance Core.ToQuery CreateCustomAvailabilityZone where
  toQuery :: CreateCustomAvailabilityZone -> QueryString
toQuery CreateCustomAvailabilityZone' {Maybe Text
Text
customAvailabilityZoneName :: Text
existingVpnId :: Maybe Text
newVpnTunnelName' :: Maybe Text
vpnTunnelOriginatorIP :: Maybe Text
$sel:customAvailabilityZoneName:CreateCustomAvailabilityZone' :: CreateCustomAvailabilityZone -> Text
$sel:existingVpnId:CreateCustomAvailabilityZone' :: CreateCustomAvailabilityZone -> Maybe Text
$sel:newVpnTunnelName':CreateCustomAvailabilityZone' :: CreateCustomAvailabilityZone -> Maybe Text
$sel:vpnTunnelOriginatorIP:CreateCustomAvailabilityZone' :: CreateCustomAvailabilityZone -> Maybe Text
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ( ByteString
"CreateCustomAvailabilityZone" ::
                      Prelude.ByteString
                  ),
        ByteString
"Version"
          ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2014-10-31" :: Prelude.ByteString),
        ByteString
"VpnTunnelOriginatorIP"
          ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
vpnTunnelOriginatorIP,
        ByteString
"NewVpnTunnelName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
newVpnTunnelName',
        ByteString
"ExistingVpnId" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
existingVpnId,
        ByteString
"CustomAvailabilityZoneName"
          ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
customAvailabilityZoneName
      ]

-- | /See:/ 'newCreateCustomAvailabilityZoneResponse' smart constructor.
data CreateCustomAvailabilityZoneResponse = CreateCustomAvailabilityZoneResponse'
  { CreateCustomAvailabilityZoneResponse
-> Maybe CustomAvailabilityZone
customAvailabilityZone :: Prelude.Maybe CustomAvailabilityZone,
    -- | The response's http status code.
    CreateCustomAvailabilityZoneResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateCustomAvailabilityZoneResponse
-> CreateCustomAvailabilityZoneResponse -> Bool
(CreateCustomAvailabilityZoneResponse
 -> CreateCustomAvailabilityZoneResponse -> Bool)
-> (CreateCustomAvailabilityZoneResponse
    -> CreateCustomAvailabilityZoneResponse -> Bool)
-> Eq CreateCustomAvailabilityZoneResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateCustomAvailabilityZoneResponse
-> CreateCustomAvailabilityZoneResponse -> Bool
$c/= :: CreateCustomAvailabilityZoneResponse
-> CreateCustomAvailabilityZoneResponse -> Bool
== :: CreateCustomAvailabilityZoneResponse
-> CreateCustomAvailabilityZoneResponse -> Bool
$c== :: CreateCustomAvailabilityZoneResponse
-> CreateCustomAvailabilityZoneResponse -> Bool
Prelude.Eq, Int -> CreateCustomAvailabilityZoneResponse -> ShowS
[CreateCustomAvailabilityZoneResponse] -> ShowS
CreateCustomAvailabilityZoneResponse -> String
(Int -> CreateCustomAvailabilityZoneResponse -> ShowS)
-> (CreateCustomAvailabilityZoneResponse -> String)
-> ([CreateCustomAvailabilityZoneResponse] -> ShowS)
-> Show CreateCustomAvailabilityZoneResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateCustomAvailabilityZoneResponse] -> ShowS
$cshowList :: [CreateCustomAvailabilityZoneResponse] -> ShowS
show :: CreateCustomAvailabilityZoneResponse -> String
$cshow :: CreateCustomAvailabilityZoneResponse -> String
showsPrec :: Int -> CreateCustomAvailabilityZoneResponse -> ShowS
$cshowsPrec :: Int -> CreateCustomAvailabilityZoneResponse -> ShowS
Prelude.Show, (forall x.
 CreateCustomAvailabilityZoneResponse
 -> Rep CreateCustomAvailabilityZoneResponse x)
-> (forall x.
    Rep CreateCustomAvailabilityZoneResponse x
    -> CreateCustomAvailabilityZoneResponse)
-> Generic CreateCustomAvailabilityZoneResponse
forall x.
Rep CreateCustomAvailabilityZoneResponse x
-> CreateCustomAvailabilityZoneResponse
forall x.
CreateCustomAvailabilityZoneResponse
-> Rep CreateCustomAvailabilityZoneResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateCustomAvailabilityZoneResponse x
-> CreateCustomAvailabilityZoneResponse
$cfrom :: forall x.
CreateCustomAvailabilityZoneResponse
-> Rep CreateCustomAvailabilityZoneResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateCustomAvailabilityZoneResponse' 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:
--
-- 'customAvailabilityZone', 'createCustomAvailabilityZoneResponse_customAvailabilityZone' - Undocumented member.
--
-- 'httpStatus', 'createCustomAvailabilityZoneResponse_httpStatus' - The response's http status code.
newCreateCustomAvailabilityZoneResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateCustomAvailabilityZoneResponse
newCreateCustomAvailabilityZoneResponse :: Int -> CreateCustomAvailabilityZoneResponse
newCreateCustomAvailabilityZoneResponse Int
pHttpStatus_ =
  CreateCustomAvailabilityZoneResponse' :: Maybe CustomAvailabilityZone
-> Int -> CreateCustomAvailabilityZoneResponse
CreateCustomAvailabilityZoneResponse'
    { $sel:customAvailabilityZone:CreateCustomAvailabilityZoneResponse' :: Maybe CustomAvailabilityZone
customAvailabilityZone =
        Maybe CustomAvailabilityZone
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateCustomAvailabilityZoneResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Undocumented member.
createCustomAvailabilityZoneResponse_customAvailabilityZone :: Lens.Lens' CreateCustomAvailabilityZoneResponse (Prelude.Maybe CustomAvailabilityZone)
createCustomAvailabilityZoneResponse_customAvailabilityZone :: (Maybe CustomAvailabilityZone -> f (Maybe CustomAvailabilityZone))
-> CreateCustomAvailabilityZoneResponse
-> f CreateCustomAvailabilityZoneResponse
createCustomAvailabilityZoneResponse_customAvailabilityZone = (CreateCustomAvailabilityZoneResponse
 -> Maybe CustomAvailabilityZone)
-> (CreateCustomAvailabilityZoneResponse
    -> Maybe CustomAvailabilityZone
    -> CreateCustomAvailabilityZoneResponse)
-> Lens
     CreateCustomAvailabilityZoneResponse
     CreateCustomAvailabilityZoneResponse
     (Maybe CustomAvailabilityZone)
     (Maybe CustomAvailabilityZone)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateCustomAvailabilityZoneResponse' {Maybe CustomAvailabilityZone
customAvailabilityZone :: Maybe CustomAvailabilityZone
$sel:customAvailabilityZone:CreateCustomAvailabilityZoneResponse' :: CreateCustomAvailabilityZoneResponse
-> Maybe CustomAvailabilityZone
customAvailabilityZone} -> Maybe CustomAvailabilityZone
customAvailabilityZone) (\s :: CreateCustomAvailabilityZoneResponse
s@CreateCustomAvailabilityZoneResponse' {} Maybe CustomAvailabilityZone
a -> CreateCustomAvailabilityZoneResponse
s {$sel:customAvailabilityZone:CreateCustomAvailabilityZoneResponse' :: Maybe CustomAvailabilityZone
customAvailabilityZone = Maybe CustomAvailabilityZone
a} :: CreateCustomAvailabilityZoneResponse)

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

instance
  Prelude.NFData
    CreateCustomAvailabilityZoneResponse