{-# 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.ConfirmTransitVirtualInterface
-- 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 transit virtual interface created by another
-- Amazon Web Services account.
--
-- After the owner of the transit virtual interface makes this call, the
-- specified transit virtual interface is created and made available to
-- handle traffic.
module Amazonka.DirectConnect.ConfirmTransitVirtualInterface
  ( -- * Creating a Request
    ConfirmTransitVirtualInterface (..),
    newConfirmTransitVirtualInterface,

    -- * Request Lenses
    confirmTransitVirtualInterface_virtualInterfaceId,
    confirmTransitVirtualInterface_directConnectGatewayId,

    -- * Destructuring the Response
    ConfirmTransitVirtualInterfaceResponse (..),
    newConfirmTransitVirtualInterfaceResponse,

    -- * Response Lenses
    confirmTransitVirtualInterfaceResponse_virtualInterfaceState,
    confirmTransitVirtualInterfaceResponse_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:/ 'newConfirmTransitVirtualInterface' smart constructor.
data ConfirmTransitVirtualInterface = ConfirmTransitVirtualInterface'
  { -- | The ID of the virtual interface.
    ConfirmTransitVirtualInterface -> Text
virtualInterfaceId :: Prelude.Text,
    -- | The ID of the Direct Connect gateway.
    ConfirmTransitVirtualInterface -> Text
directConnectGatewayId :: Prelude.Text
  }
  deriving (ConfirmTransitVirtualInterface
-> ConfirmTransitVirtualInterface -> Bool
(ConfirmTransitVirtualInterface
 -> ConfirmTransitVirtualInterface -> Bool)
-> (ConfirmTransitVirtualInterface
    -> ConfirmTransitVirtualInterface -> Bool)
-> Eq ConfirmTransitVirtualInterface
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConfirmTransitVirtualInterface
-> ConfirmTransitVirtualInterface -> Bool
$c/= :: ConfirmTransitVirtualInterface
-> ConfirmTransitVirtualInterface -> Bool
== :: ConfirmTransitVirtualInterface
-> ConfirmTransitVirtualInterface -> Bool
$c== :: ConfirmTransitVirtualInterface
-> ConfirmTransitVirtualInterface -> Bool
Prelude.Eq, ReadPrec [ConfirmTransitVirtualInterface]
ReadPrec ConfirmTransitVirtualInterface
Int -> ReadS ConfirmTransitVirtualInterface
ReadS [ConfirmTransitVirtualInterface]
(Int -> ReadS ConfirmTransitVirtualInterface)
-> ReadS [ConfirmTransitVirtualInterface]
-> ReadPrec ConfirmTransitVirtualInterface
-> ReadPrec [ConfirmTransitVirtualInterface]
-> Read ConfirmTransitVirtualInterface
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ConfirmTransitVirtualInterface]
$creadListPrec :: ReadPrec [ConfirmTransitVirtualInterface]
readPrec :: ReadPrec ConfirmTransitVirtualInterface
$creadPrec :: ReadPrec ConfirmTransitVirtualInterface
readList :: ReadS [ConfirmTransitVirtualInterface]
$creadList :: ReadS [ConfirmTransitVirtualInterface]
readsPrec :: Int -> ReadS ConfirmTransitVirtualInterface
$creadsPrec :: Int -> ReadS ConfirmTransitVirtualInterface
Prelude.Read, Int -> ConfirmTransitVirtualInterface -> ShowS
[ConfirmTransitVirtualInterface] -> ShowS
ConfirmTransitVirtualInterface -> String
(Int -> ConfirmTransitVirtualInterface -> ShowS)
-> (ConfirmTransitVirtualInterface -> String)
-> ([ConfirmTransitVirtualInterface] -> ShowS)
-> Show ConfirmTransitVirtualInterface
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConfirmTransitVirtualInterface] -> ShowS
$cshowList :: [ConfirmTransitVirtualInterface] -> ShowS
show :: ConfirmTransitVirtualInterface -> String
$cshow :: ConfirmTransitVirtualInterface -> String
showsPrec :: Int -> ConfirmTransitVirtualInterface -> ShowS
$cshowsPrec :: Int -> ConfirmTransitVirtualInterface -> ShowS
Prelude.Show, (forall x.
 ConfirmTransitVirtualInterface
 -> Rep ConfirmTransitVirtualInterface x)
-> (forall x.
    Rep ConfirmTransitVirtualInterface x
    -> ConfirmTransitVirtualInterface)
-> Generic ConfirmTransitVirtualInterface
forall x.
Rep ConfirmTransitVirtualInterface x
-> ConfirmTransitVirtualInterface
forall x.
ConfirmTransitVirtualInterface
-> Rep ConfirmTransitVirtualInterface x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ConfirmTransitVirtualInterface x
-> ConfirmTransitVirtualInterface
$cfrom :: forall x.
ConfirmTransitVirtualInterface
-> Rep ConfirmTransitVirtualInterface x
Prelude.Generic)

-- |
-- Create a value of 'ConfirmTransitVirtualInterface' 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:
--
-- 'virtualInterfaceId', 'confirmTransitVirtualInterface_virtualInterfaceId' - The ID of the virtual interface.
--
-- 'directConnectGatewayId', 'confirmTransitVirtualInterface_directConnectGatewayId' - The ID of the Direct Connect gateway.
newConfirmTransitVirtualInterface ::
  -- | 'virtualInterfaceId'
  Prelude.Text ->
  -- | 'directConnectGatewayId'
  Prelude.Text ->
  ConfirmTransitVirtualInterface
newConfirmTransitVirtualInterface :: Text -> Text -> ConfirmTransitVirtualInterface
newConfirmTransitVirtualInterface
  Text
pVirtualInterfaceId_
  Text
pDirectConnectGatewayId_ =
    ConfirmTransitVirtualInterface' :: Text -> Text -> ConfirmTransitVirtualInterface
ConfirmTransitVirtualInterface'
      { $sel:virtualInterfaceId:ConfirmTransitVirtualInterface' :: Text
virtualInterfaceId =
          Text
pVirtualInterfaceId_,
        $sel:directConnectGatewayId:ConfirmTransitVirtualInterface' :: Text
directConnectGatewayId =
          Text
pDirectConnectGatewayId_
      }

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

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

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

instance
  Prelude.NFData
    ConfirmTransitVirtualInterface

instance
  Core.ToHeaders
    ConfirmTransitVirtualInterface
  where
  toHeaders :: ConfirmTransitVirtualInterface -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> ConfirmTransitVirtualInterface -> 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.ConfirmTransitVirtualInterface" ::
                          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 ConfirmTransitVirtualInterface where
  toJSON :: ConfirmTransitVirtualInterface -> Value
toJSON ConfirmTransitVirtualInterface' {Text
directConnectGatewayId :: Text
virtualInterfaceId :: Text
$sel:directConnectGatewayId:ConfirmTransitVirtualInterface' :: ConfirmTransitVirtualInterface -> Text
$sel:virtualInterfaceId:ConfirmTransitVirtualInterface' :: ConfirmTransitVirtualInterface -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ 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),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"directConnectGatewayId"
                  Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
directConnectGatewayId
              )
          ]
      )

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

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

-- | /See:/ 'newConfirmTransitVirtualInterfaceResponse' smart constructor.
data ConfirmTransitVirtualInterfaceResponse = ConfirmTransitVirtualInterfaceResponse'
  { -- | 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.
    ConfirmTransitVirtualInterfaceResponse
-> Maybe VirtualInterfaceState
virtualInterfaceState :: Prelude.Maybe VirtualInterfaceState,
    -- | The response's http status code.
    ConfirmTransitVirtualInterfaceResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ConfirmTransitVirtualInterfaceResponse
-> ConfirmTransitVirtualInterfaceResponse -> Bool
(ConfirmTransitVirtualInterfaceResponse
 -> ConfirmTransitVirtualInterfaceResponse -> Bool)
-> (ConfirmTransitVirtualInterfaceResponse
    -> ConfirmTransitVirtualInterfaceResponse -> Bool)
-> Eq ConfirmTransitVirtualInterfaceResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ConfirmTransitVirtualInterfaceResponse
-> ConfirmTransitVirtualInterfaceResponse -> Bool
$c/= :: ConfirmTransitVirtualInterfaceResponse
-> ConfirmTransitVirtualInterfaceResponse -> Bool
== :: ConfirmTransitVirtualInterfaceResponse
-> ConfirmTransitVirtualInterfaceResponse -> Bool
$c== :: ConfirmTransitVirtualInterfaceResponse
-> ConfirmTransitVirtualInterfaceResponse -> Bool
Prelude.Eq, ReadPrec [ConfirmTransitVirtualInterfaceResponse]
ReadPrec ConfirmTransitVirtualInterfaceResponse
Int -> ReadS ConfirmTransitVirtualInterfaceResponse
ReadS [ConfirmTransitVirtualInterfaceResponse]
(Int -> ReadS ConfirmTransitVirtualInterfaceResponse)
-> ReadS [ConfirmTransitVirtualInterfaceResponse]
-> ReadPrec ConfirmTransitVirtualInterfaceResponse
-> ReadPrec [ConfirmTransitVirtualInterfaceResponse]
-> Read ConfirmTransitVirtualInterfaceResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ConfirmTransitVirtualInterfaceResponse]
$creadListPrec :: ReadPrec [ConfirmTransitVirtualInterfaceResponse]
readPrec :: ReadPrec ConfirmTransitVirtualInterfaceResponse
$creadPrec :: ReadPrec ConfirmTransitVirtualInterfaceResponse
readList :: ReadS [ConfirmTransitVirtualInterfaceResponse]
$creadList :: ReadS [ConfirmTransitVirtualInterfaceResponse]
readsPrec :: Int -> ReadS ConfirmTransitVirtualInterfaceResponse
$creadsPrec :: Int -> ReadS ConfirmTransitVirtualInterfaceResponse
Prelude.Read, Int -> ConfirmTransitVirtualInterfaceResponse -> ShowS
[ConfirmTransitVirtualInterfaceResponse] -> ShowS
ConfirmTransitVirtualInterfaceResponse -> String
(Int -> ConfirmTransitVirtualInterfaceResponse -> ShowS)
-> (ConfirmTransitVirtualInterfaceResponse -> String)
-> ([ConfirmTransitVirtualInterfaceResponse] -> ShowS)
-> Show ConfirmTransitVirtualInterfaceResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ConfirmTransitVirtualInterfaceResponse] -> ShowS
$cshowList :: [ConfirmTransitVirtualInterfaceResponse] -> ShowS
show :: ConfirmTransitVirtualInterfaceResponse -> String
$cshow :: ConfirmTransitVirtualInterfaceResponse -> String
showsPrec :: Int -> ConfirmTransitVirtualInterfaceResponse -> ShowS
$cshowsPrec :: Int -> ConfirmTransitVirtualInterfaceResponse -> ShowS
Prelude.Show, (forall x.
 ConfirmTransitVirtualInterfaceResponse
 -> Rep ConfirmTransitVirtualInterfaceResponse x)
-> (forall x.
    Rep ConfirmTransitVirtualInterfaceResponse x
    -> ConfirmTransitVirtualInterfaceResponse)
-> Generic ConfirmTransitVirtualInterfaceResponse
forall x.
Rep ConfirmTransitVirtualInterfaceResponse x
-> ConfirmTransitVirtualInterfaceResponse
forall x.
ConfirmTransitVirtualInterfaceResponse
-> Rep ConfirmTransitVirtualInterfaceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ConfirmTransitVirtualInterfaceResponse x
-> ConfirmTransitVirtualInterfaceResponse
$cfrom :: forall x.
ConfirmTransitVirtualInterfaceResponse
-> Rep ConfirmTransitVirtualInterfaceResponse x
Prelude.Generic)

-- |
-- Create a value of 'ConfirmTransitVirtualInterfaceResponse' 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', 'confirmTransitVirtualInterfaceResponse_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', 'confirmTransitVirtualInterfaceResponse_httpStatus' - The response's http status code.
newConfirmTransitVirtualInterfaceResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ConfirmTransitVirtualInterfaceResponse
newConfirmTransitVirtualInterfaceResponse :: Int -> ConfirmTransitVirtualInterfaceResponse
newConfirmTransitVirtualInterfaceResponse
  Int
pHttpStatus_ =
    ConfirmTransitVirtualInterfaceResponse' :: Maybe VirtualInterfaceState
-> Int -> ConfirmTransitVirtualInterfaceResponse
ConfirmTransitVirtualInterfaceResponse'
      { $sel:virtualInterfaceState:ConfirmTransitVirtualInterfaceResponse' :: Maybe VirtualInterfaceState
virtualInterfaceState =
          Maybe VirtualInterfaceState
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:ConfirmTransitVirtualInterfaceResponse' :: 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.
confirmTransitVirtualInterfaceResponse_virtualInterfaceState :: Lens.Lens' ConfirmTransitVirtualInterfaceResponse (Prelude.Maybe VirtualInterfaceState)
confirmTransitVirtualInterfaceResponse_virtualInterfaceState :: (Maybe VirtualInterfaceState -> f (Maybe VirtualInterfaceState))
-> ConfirmTransitVirtualInterfaceResponse
-> f ConfirmTransitVirtualInterfaceResponse
confirmTransitVirtualInterfaceResponse_virtualInterfaceState = (ConfirmTransitVirtualInterfaceResponse
 -> Maybe VirtualInterfaceState)
-> (ConfirmTransitVirtualInterfaceResponse
    -> Maybe VirtualInterfaceState
    -> ConfirmTransitVirtualInterfaceResponse)
-> Lens
     ConfirmTransitVirtualInterfaceResponse
     ConfirmTransitVirtualInterfaceResponse
     (Maybe VirtualInterfaceState)
     (Maybe VirtualInterfaceState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ConfirmTransitVirtualInterfaceResponse' {Maybe VirtualInterfaceState
virtualInterfaceState :: Maybe VirtualInterfaceState
$sel:virtualInterfaceState:ConfirmTransitVirtualInterfaceResponse' :: ConfirmTransitVirtualInterfaceResponse
-> Maybe VirtualInterfaceState
virtualInterfaceState} -> Maybe VirtualInterfaceState
virtualInterfaceState) (\s :: ConfirmTransitVirtualInterfaceResponse
s@ConfirmTransitVirtualInterfaceResponse' {} Maybe VirtualInterfaceState
a -> ConfirmTransitVirtualInterfaceResponse
s {$sel:virtualInterfaceState:ConfirmTransitVirtualInterfaceResponse' :: Maybe VirtualInterfaceState
virtualInterfaceState = Maybe VirtualInterfaceState
a} :: ConfirmTransitVirtualInterfaceResponse)

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

instance
  Prelude.NFData
    ConfirmTransitVirtualInterfaceResponse