{-# 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.DirectConnect.ConfirmPrivateVirtualInterface
-- 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)
--
-- Accepts ownership of a private virtual interface created by another
-- Amazon Web Services account.
--
-- After the virtual interface owner makes this call, the virtual interface
-- is created and attached to the specified virtual private gateway or
-- Direct Connect gateway, and is made available to handle traffic.
module Amazonka.DirectConnect.ConfirmPrivateVirtualInterface
  ( -- * Creating a Request
    ConfirmPrivateVirtualInterface (..),
    newConfirmPrivateVirtualInterface,

    -- * Request Lenses
    confirmPrivateVirtualInterface_virtualGatewayId,
    confirmPrivateVirtualInterface_directConnectGatewayId,
    confirmPrivateVirtualInterface_virtualInterfaceId,

    -- * Destructuring the Response
    ConfirmPrivateVirtualInterfaceResponse (..),
    newConfirmPrivateVirtualInterfaceResponse,

    -- * Response Lenses
    confirmPrivateVirtualInterfaceResponse_virtualInterfaceState,
    confirmPrivateVirtualInterfaceResponse_httpStatus,
  )
where

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

-- | /See:/ 'newConfirmPrivateVirtualInterface' smart constructor.
data ConfirmPrivateVirtualInterface = ConfirmPrivateVirtualInterface'
  { -- | The ID of the virtual private gateway.
    ConfirmPrivateVirtualInterface -> Maybe Text
virtualGatewayId :: Prelude.Maybe Prelude.Text,
    -- | The ID of the Direct Connect gateway.
    ConfirmPrivateVirtualInterface -> Maybe Text
directConnectGatewayId :: Prelude.Maybe Prelude.Text,
    -- | The ID of the virtual interface.
    ConfirmPrivateVirtualInterface -> Text
virtualInterfaceId :: Prelude.Text
  }
  deriving (ConfirmPrivateVirtualInterface
-> ConfirmPrivateVirtualInterface -> Bool
(ConfirmPrivateVirtualInterface
 -> ConfirmPrivateVirtualInterface -> Bool)
-> (ConfirmPrivateVirtualInterface
    -> ConfirmPrivateVirtualInterface -> Bool)
-> Eq ConfirmPrivateVirtualInterface
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConfirmPrivateVirtualInterface
-> ConfirmPrivateVirtualInterface -> Bool
$c/= :: ConfirmPrivateVirtualInterface
-> ConfirmPrivateVirtualInterface -> Bool
== :: ConfirmPrivateVirtualInterface
-> ConfirmPrivateVirtualInterface -> Bool
$c== :: ConfirmPrivateVirtualInterface
-> ConfirmPrivateVirtualInterface -> Bool
Prelude.Eq, ReadPrec [ConfirmPrivateVirtualInterface]
ReadPrec ConfirmPrivateVirtualInterface
Int -> ReadS ConfirmPrivateVirtualInterface
ReadS [ConfirmPrivateVirtualInterface]
(Int -> ReadS ConfirmPrivateVirtualInterface)
-> ReadS [ConfirmPrivateVirtualInterface]
-> ReadPrec ConfirmPrivateVirtualInterface
-> ReadPrec [ConfirmPrivateVirtualInterface]
-> Read ConfirmPrivateVirtualInterface
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ConfirmPrivateVirtualInterface]
$creadListPrec :: ReadPrec [ConfirmPrivateVirtualInterface]
readPrec :: ReadPrec ConfirmPrivateVirtualInterface
$creadPrec :: ReadPrec ConfirmPrivateVirtualInterface
readList :: ReadS [ConfirmPrivateVirtualInterface]
$creadList :: ReadS [ConfirmPrivateVirtualInterface]
readsPrec :: Int -> ReadS ConfirmPrivateVirtualInterface
$creadsPrec :: Int -> ReadS ConfirmPrivateVirtualInterface
Prelude.Read, Int -> ConfirmPrivateVirtualInterface -> ShowS
[ConfirmPrivateVirtualInterface] -> ShowS
ConfirmPrivateVirtualInterface -> String
(Int -> ConfirmPrivateVirtualInterface -> ShowS)
-> (ConfirmPrivateVirtualInterface -> String)
-> ([ConfirmPrivateVirtualInterface] -> ShowS)
-> Show ConfirmPrivateVirtualInterface
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConfirmPrivateVirtualInterface] -> ShowS
$cshowList :: [ConfirmPrivateVirtualInterface] -> ShowS
show :: ConfirmPrivateVirtualInterface -> String
$cshow :: ConfirmPrivateVirtualInterface -> String
showsPrec :: Int -> ConfirmPrivateVirtualInterface -> ShowS
$cshowsPrec :: Int -> ConfirmPrivateVirtualInterface -> ShowS
Prelude.Show, (forall x.
 ConfirmPrivateVirtualInterface
 -> Rep ConfirmPrivateVirtualInterface x)
-> (forall x.
    Rep ConfirmPrivateVirtualInterface x
    -> ConfirmPrivateVirtualInterface)
-> Generic ConfirmPrivateVirtualInterface
forall x.
Rep ConfirmPrivateVirtualInterface x
-> ConfirmPrivateVirtualInterface
forall x.
ConfirmPrivateVirtualInterface
-> Rep ConfirmPrivateVirtualInterface x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ConfirmPrivateVirtualInterface x
-> ConfirmPrivateVirtualInterface
$cfrom :: forall x.
ConfirmPrivateVirtualInterface
-> Rep ConfirmPrivateVirtualInterface x
Prelude.Generic)

-- |
-- Create a value of 'ConfirmPrivateVirtualInterface' 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:
--
-- 'virtualGatewayId', 'confirmPrivateVirtualInterface_virtualGatewayId' - The ID of the virtual private gateway.
--
-- 'directConnectGatewayId', 'confirmPrivateVirtualInterface_directConnectGatewayId' - The ID of the Direct Connect gateway.
--
-- 'virtualInterfaceId', 'confirmPrivateVirtualInterface_virtualInterfaceId' - The ID of the virtual interface.
newConfirmPrivateVirtualInterface ::
  -- | 'virtualInterfaceId'
  Prelude.Text ->
  ConfirmPrivateVirtualInterface
newConfirmPrivateVirtualInterface :: Text -> ConfirmPrivateVirtualInterface
newConfirmPrivateVirtualInterface
  Text
pVirtualInterfaceId_ =
    ConfirmPrivateVirtualInterface' :: Maybe Text -> Maybe Text -> Text -> ConfirmPrivateVirtualInterface
ConfirmPrivateVirtualInterface'
      { $sel:virtualGatewayId:ConfirmPrivateVirtualInterface' :: Maybe Text
virtualGatewayId =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:directConnectGatewayId:ConfirmPrivateVirtualInterface' :: Maybe Text
directConnectGatewayId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:virtualInterfaceId:ConfirmPrivateVirtualInterface' :: Text
virtualInterfaceId = Text
pVirtualInterfaceId_
      }

-- | The ID of the virtual private gateway.
confirmPrivateVirtualInterface_virtualGatewayId :: Lens.Lens' ConfirmPrivateVirtualInterface (Prelude.Maybe Prelude.Text)
confirmPrivateVirtualInterface_virtualGatewayId :: (Maybe Text -> f (Maybe Text))
-> ConfirmPrivateVirtualInterface
-> f ConfirmPrivateVirtualInterface
confirmPrivateVirtualInterface_virtualGatewayId = (ConfirmPrivateVirtualInterface -> Maybe Text)
-> (ConfirmPrivateVirtualInterface
    -> Maybe Text -> ConfirmPrivateVirtualInterface)
-> Lens
     ConfirmPrivateVirtualInterface
     ConfirmPrivateVirtualInterface
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfirmPrivateVirtualInterface' {Maybe Text
virtualGatewayId :: Maybe Text
$sel:virtualGatewayId:ConfirmPrivateVirtualInterface' :: ConfirmPrivateVirtualInterface -> Maybe Text
virtualGatewayId} -> Maybe Text
virtualGatewayId) (\s :: ConfirmPrivateVirtualInterface
s@ConfirmPrivateVirtualInterface' {} Maybe Text
a -> ConfirmPrivateVirtualInterface
s {$sel:virtualGatewayId:ConfirmPrivateVirtualInterface' :: Maybe Text
virtualGatewayId = Maybe Text
a} :: ConfirmPrivateVirtualInterface)

-- | The ID of the Direct Connect gateway.
confirmPrivateVirtualInterface_directConnectGatewayId :: Lens.Lens' ConfirmPrivateVirtualInterface (Prelude.Maybe Prelude.Text)
confirmPrivateVirtualInterface_directConnectGatewayId :: (Maybe Text -> f (Maybe Text))
-> ConfirmPrivateVirtualInterface
-> f ConfirmPrivateVirtualInterface
confirmPrivateVirtualInterface_directConnectGatewayId = (ConfirmPrivateVirtualInterface -> Maybe Text)
-> (ConfirmPrivateVirtualInterface
    -> Maybe Text -> ConfirmPrivateVirtualInterface)
-> Lens
     ConfirmPrivateVirtualInterface
     ConfirmPrivateVirtualInterface
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfirmPrivateVirtualInterface' {Maybe Text
directConnectGatewayId :: Maybe Text
$sel:directConnectGatewayId:ConfirmPrivateVirtualInterface' :: ConfirmPrivateVirtualInterface -> Maybe Text
directConnectGatewayId} -> Maybe Text
directConnectGatewayId) (\s :: ConfirmPrivateVirtualInterface
s@ConfirmPrivateVirtualInterface' {} Maybe Text
a -> ConfirmPrivateVirtualInterface
s {$sel:directConnectGatewayId:ConfirmPrivateVirtualInterface' :: Maybe Text
directConnectGatewayId = Maybe Text
a} :: ConfirmPrivateVirtualInterface)

-- | The ID of the virtual interface.
confirmPrivateVirtualInterface_virtualInterfaceId :: Lens.Lens' ConfirmPrivateVirtualInterface Prelude.Text
confirmPrivateVirtualInterface_virtualInterfaceId :: (Text -> f Text)
-> ConfirmPrivateVirtualInterface
-> f ConfirmPrivateVirtualInterface
confirmPrivateVirtualInterface_virtualInterfaceId = (ConfirmPrivateVirtualInterface -> Text)
-> (ConfirmPrivateVirtualInterface
    -> Text -> ConfirmPrivateVirtualInterface)
-> Lens
     ConfirmPrivateVirtualInterface
     ConfirmPrivateVirtualInterface
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfirmPrivateVirtualInterface' {Text
virtualInterfaceId :: Text
$sel:virtualInterfaceId:ConfirmPrivateVirtualInterface' :: ConfirmPrivateVirtualInterface -> Text
virtualInterfaceId} -> Text
virtualInterfaceId) (\s :: ConfirmPrivateVirtualInterface
s@ConfirmPrivateVirtualInterface' {} Text
a -> ConfirmPrivateVirtualInterface
s {$sel:virtualInterfaceId:ConfirmPrivateVirtualInterface' :: Text
virtualInterfaceId = Text
a} :: ConfirmPrivateVirtualInterface)

instance
  Core.AWSRequest
    ConfirmPrivateVirtualInterface
  where
  type
    AWSResponse ConfirmPrivateVirtualInterface =
      ConfirmPrivateVirtualInterfaceResponse
  request :: ConfirmPrivateVirtualInterface
-> Request ConfirmPrivateVirtualInterface
request = Service
-> ConfirmPrivateVirtualInterface
-> Request ConfirmPrivateVirtualInterface
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy ConfirmPrivateVirtualInterface
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse ConfirmPrivateVirtualInterface)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ConfirmPrivateVirtualInterface))
-> Logger
-> Service
-> Proxy ConfirmPrivateVirtualInterface
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse ConfirmPrivateVirtualInterface)))
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 VirtualInterfaceState
-> Int -> ConfirmPrivateVirtualInterfaceResponse
ConfirmPrivateVirtualInterfaceResponse'
            (Maybe VirtualInterfaceState
 -> Int -> ConfirmPrivateVirtualInterfaceResponse)
-> Either String (Maybe VirtualInterfaceState)
-> Either String (Int -> ConfirmPrivateVirtualInterfaceResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe VirtualInterfaceState)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"virtualInterfaceState")
            Either String (Int -> ConfirmPrivateVirtualInterfaceResponse)
-> Either String Int
-> Either String ConfirmPrivateVirtualInterfaceResponse
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
    ConfirmPrivateVirtualInterface

instance
  Prelude.NFData
    ConfirmPrivateVirtualInterface

instance
  Core.ToHeaders
    ConfirmPrivateVirtualInterface
  where
  toHeaders :: ConfirmPrivateVirtualInterface -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> ConfirmPrivateVirtualInterface -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"OvertureService.ConfirmPrivateVirtualInterface" ::
                          Prelude.ByteString
                      ),
            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 ConfirmPrivateVirtualInterface where
  toJSON :: ConfirmPrivateVirtualInterface -> Value
toJSON ConfirmPrivateVirtualInterface' {Maybe Text
Text
virtualInterfaceId :: Text
directConnectGatewayId :: Maybe Text
virtualGatewayId :: Maybe Text
$sel:virtualInterfaceId:ConfirmPrivateVirtualInterface' :: ConfirmPrivateVirtualInterface -> Text
$sel:directConnectGatewayId:ConfirmPrivateVirtualInterface' :: ConfirmPrivateVirtualInterface -> Maybe Text
$sel:virtualGatewayId:ConfirmPrivateVirtualInterface' :: ConfirmPrivateVirtualInterface -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"virtualGatewayId" 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
virtualGatewayId,
            (Text
"directConnectGatewayId" 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
directConnectGatewayId,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"virtualInterfaceId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
virtualInterfaceId)
          ]
      )

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

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

-- | /See:/ 'newConfirmPrivateVirtualInterfaceResponse' smart constructor.
data ConfirmPrivateVirtualInterfaceResponse = ConfirmPrivateVirtualInterfaceResponse'
  { -- | The state of the virtual interface. The following are the possible
    -- values:
    --
    -- -   @confirming@: The creation of the virtual interface is pending
    --     confirmation from the virtual interface owner. If the owner of the
    --     virtual interface is different from the owner of the connection on
    --     which it is provisioned, then the virtual interface will remain in
    --     this state until it is confirmed by the virtual interface owner.
    --
    -- -   @verifying@: This state only applies to public virtual interfaces.
    --     Each public virtual interface needs validation before the virtual
    --     interface can be created.
    --
    -- -   @pending@: A virtual interface is in this state from the time that
    --     it is created until the virtual interface is ready to forward
    --     traffic.
    --
    -- -   @available@: A virtual interface that is able to forward traffic.
    --
    -- -   @down@: A virtual interface that is BGP down.
    --
    -- -   @deleting@: A virtual interface is in this state immediately after
    --     calling DeleteVirtualInterface until it can no longer forward
    --     traffic.
    --
    -- -   @deleted@: A virtual interface that cannot forward traffic.
    --
    -- -   @rejected@: The virtual interface owner has declined creation of the
    --     virtual interface. If a virtual interface in the @Confirming@ state
    --     is deleted by the virtual interface owner, the virtual interface
    --     enters the @Rejected@ state.
    --
    -- -   @unknown@: The state of the virtual interface is not available.
    ConfirmPrivateVirtualInterfaceResponse
-> Maybe VirtualInterfaceState
virtualInterfaceState :: Prelude.Maybe VirtualInterfaceState,
    -- | The response's http status code.
    ConfirmPrivateVirtualInterfaceResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ConfirmPrivateVirtualInterfaceResponse
-> ConfirmPrivateVirtualInterfaceResponse -> Bool
(ConfirmPrivateVirtualInterfaceResponse
 -> ConfirmPrivateVirtualInterfaceResponse -> Bool)
-> (ConfirmPrivateVirtualInterfaceResponse
    -> ConfirmPrivateVirtualInterfaceResponse -> Bool)
-> Eq ConfirmPrivateVirtualInterfaceResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConfirmPrivateVirtualInterfaceResponse
-> ConfirmPrivateVirtualInterfaceResponse -> Bool
$c/= :: ConfirmPrivateVirtualInterfaceResponse
-> ConfirmPrivateVirtualInterfaceResponse -> Bool
== :: ConfirmPrivateVirtualInterfaceResponse
-> ConfirmPrivateVirtualInterfaceResponse -> Bool
$c== :: ConfirmPrivateVirtualInterfaceResponse
-> ConfirmPrivateVirtualInterfaceResponse -> Bool
Prelude.Eq, ReadPrec [ConfirmPrivateVirtualInterfaceResponse]
ReadPrec ConfirmPrivateVirtualInterfaceResponse
Int -> ReadS ConfirmPrivateVirtualInterfaceResponse
ReadS [ConfirmPrivateVirtualInterfaceResponse]
(Int -> ReadS ConfirmPrivateVirtualInterfaceResponse)
-> ReadS [ConfirmPrivateVirtualInterfaceResponse]
-> ReadPrec ConfirmPrivateVirtualInterfaceResponse
-> ReadPrec [ConfirmPrivateVirtualInterfaceResponse]
-> Read ConfirmPrivateVirtualInterfaceResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ConfirmPrivateVirtualInterfaceResponse]
$creadListPrec :: ReadPrec [ConfirmPrivateVirtualInterfaceResponse]
readPrec :: ReadPrec ConfirmPrivateVirtualInterfaceResponse
$creadPrec :: ReadPrec ConfirmPrivateVirtualInterfaceResponse
readList :: ReadS [ConfirmPrivateVirtualInterfaceResponse]
$creadList :: ReadS [ConfirmPrivateVirtualInterfaceResponse]
readsPrec :: Int -> ReadS ConfirmPrivateVirtualInterfaceResponse
$creadsPrec :: Int -> ReadS ConfirmPrivateVirtualInterfaceResponse
Prelude.Read, Int -> ConfirmPrivateVirtualInterfaceResponse -> ShowS
[ConfirmPrivateVirtualInterfaceResponse] -> ShowS
ConfirmPrivateVirtualInterfaceResponse -> String
(Int -> ConfirmPrivateVirtualInterfaceResponse -> ShowS)
-> (ConfirmPrivateVirtualInterfaceResponse -> String)
-> ([ConfirmPrivateVirtualInterfaceResponse] -> ShowS)
-> Show ConfirmPrivateVirtualInterfaceResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConfirmPrivateVirtualInterfaceResponse] -> ShowS
$cshowList :: [ConfirmPrivateVirtualInterfaceResponse] -> ShowS
show :: ConfirmPrivateVirtualInterfaceResponse -> String
$cshow :: ConfirmPrivateVirtualInterfaceResponse -> String
showsPrec :: Int -> ConfirmPrivateVirtualInterfaceResponse -> ShowS
$cshowsPrec :: Int -> ConfirmPrivateVirtualInterfaceResponse -> ShowS
Prelude.Show, (forall x.
 ConfirmPrivateVirtualInterfaceResponse
 -> Rep ConfirmPrivateVirtualInterfaceResponse x)
-> (forall x.
    Rep ConfirmPrivateVirtualInterfaceResponse x
    -> ConfirmPrivateVirtualInterfaceResponse)
-> Generic ConfirmPrivateVirtualInterfaceResponse
forall x.
Rep ConfirmPrivateVirtualInterfaceResponse x
-> ConfirmPrivateVirtualInterfaceResponse
forall x.
ConfirmPrivateVirtualInterfaceResponse
-> Rep ConfirmPrivateVirtualInterfaceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ConfirmPrivateVirtualInterfaceResponse x
-> ConfirmPrivateVirtualInterfaceResponse
$cfrom :: forall x.
ConfirmPrivateVirtualInterfaceResponse
-> Rep ConfirmPrivateVirtualInterfaceResponse x
Prelude.Generic)

-- |
-- Create a value of 'ConfirmPrivateVirtualInterfaceResponse' 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:
--
-- 'virtualInterfaceState', 'confirmPrivateVirtualInterfaceResponse_virtualInterfaceState' - The state of the virtual interface. The following are the possible
-- values:
--
-- -   @confirming@: The creation of the virtual interface is pending
--     confirmation from the virtual interface owner. If the owner of the
--     virtual interface is different from the owner of the connection on
--     which it is provisioned, then the virtual interface will remain in
--     this state until it is confirmed by the virtual interface owner.
--
-- -   @verifying@: This state only applies to public virtual interfaces.
--     Each public virtual interface needs validation before the virtual
--     interface can be created.
--
-- -   @pending@: A virtual interface is in this state from the time that
--     it is created until the virtual interface is ready to forward
--     traffic.
--
-- -   @available@: A virtual interface that is able to forward traffic.
--
-- -   @down@: A virtual interface that is BGP down.
--
-- -   @deleting@: A virtual interface is in this state immediately after
--     calling DeleteVirtualInterface until it can no longer forward
--     traffic.
--
-- -   @deleted@: A virtual interface that cannot forward traffic.
--
-- -   @rejected@: The virtual interface owner has declined creation of the
--     virtual interface. If a virtual interface in the @Confirming@ state
--     is deleted by the virtual interface owner, the virtual interface
--     enters the @Rejected@ state.
--
-- -   @unknown@: The state of the virtual interface is not available.
--
-- 'httpStatus', 'confirmPrivateVirtualInterfaceResponse_httpStatus' - The response's http status code.
newConfirmPrivateVirtualInterfaceResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ConfirmPrivateVirtualInterfaceResponse
newConfirmPrivateVirtualInterfaceResponse :: Int -> ConfirmPrivateVirtualInterfaceResponse
newConfirmPrivateVirtualInterfaceResponse
  Int
pHttpStatus_ =
    ConfirmPrivateVirtualInterfaceResponse' :: Maybe VirtualInterfaceState
-> Int -> ConfirmPrivateVirtualInterfaceResponse
ConfirmPrivateVirtualInterfaceResponse'
      { $sel:virtualInterfaceState:ConfirmPrivateVirtualInterfaceResponse' :: Maybe VirtualInterfaceState
virtualInterfaceState =
          Maybe VirtualInterfaceState
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:ConfirmPrivateVirtualInterfaceResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | The state of the virtual interface. The following are the possible
-- values:
--
-- -   @confirming@: The creation of the virtual interface is pending
--     confirmation from the virtual interface owner. If the owner of the
--     virtual interface is different from the owner of the connection on
--     which it is provisioned, then the virtual interface will remain in
--     this state until it is confirmed by the virtual interface owner.
--
-- -   @verifying@: This state only applies to public virtual interfaces.
--     Each public virtual interface needs validation before the virtual
--     interface can be created.
--
-- -   @pending@: A virtual interface is in this state from the time that
--     it is created until the virtual interface is ready to forward
--     traffic.
--
-- -   @available@: A virtual interface that is able to forward traffic.
--
-- -   @down@: A virtual interface that is BGP down.
--
-- -   @deleting@: A virtual interface is in this state immediately after
--     calling DeleteVirtualInterface until it can no longer forward
--     traffic.
--
-- -   @deleted@: A virtual interface that cannot forward traffic.
--
-- -   @rejected@: The virtual interface owner has declined creation of the
--     virtual interface. If a virtual interface in the @Confirming@ state
--     is deleted by the virtual interface owner, the virtual interface
--     enters the @Rejected@ state.
--
-- -   @unknown@: The state of the virtual interface is not available.
confirmPrivateVirtualInterfaceResponse_virtualInterfaceState :: Lens.Lens' ConfirmPrivateVirtualInterfaceResponse (Prelude.Maybe VirtualInterfaceState)
confirmPrivateVirtualInterfaceResponse_virtualInterfaceState :: (Maybe VirtualInterfaceState -> f (Maybe VirtualInterfaceState))
-> ConfirmPrivateVirtualInterfaceResponse
-> f ConfirmPrivateVirtualInterfaceResponse
confirmPrivateVirtualInterfaceResponse_virtualInterfaceState = (ConfirmPrivateVirtualInterfaceResponse
 -> Maybe VirtualInterfaceState)
-> (ConfirmPrivateVirtualInterfaceResponse
    -> Maybe VirtualInterfaceState
    -> ConfirmPrivateVirtualInterfaceResponse)
-> Lens
     ConfirmPrivateVirtualInterfaceResponse
     ConfirmPrivateVirtualInterfaceResponse
     (Maybe VirtualInterfaceState)
     (Maybe VirtualInterfaceState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfirmPrivateVirtualInterfaceResponse' {Maybe VirtualInterfaceState
virtualInterfaceState :: Maybe VirtualInterfaceState
$sel:virtualInterfaceState:ConfirmPrivateVirtualInterfaceResponse' :: ConfirmPrivateVirtualInterfaceResponse
-> Maybe VirtualInterfaceState
virtualInterfaceState} -> Maybe VirtualInterfaceState
virtualInterfaceState) (\s :: ConfirmPrivateVirtualInterfaceResponse
s@ConfirmPrivateVirtualInterfaceResponse' {} Maybe VirtualInterfaceState
a -> ConfirmPrivateVirtualInterfaceResponse
s {$sel:virtualInterfaceState:ConfirmPrivateVirtualInterfaceResponse' :: Maybe VirtualInterfaceState
virtualInterfaceState = Maybe VirtualInterfaceState
a} :: ConfirmPrivateVirtualInterfaceResponse)

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

instance
  Prelude.NFData
    ConfirmPrivateVirtualInterfaceResponse