{-# 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.DirectoryService.AddIpRoutes
-- 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)
--
-- If the DNS server for your self-managed domain uses a publicly
-- addressable IP address, you must add a CIDR address block to correctly
-- route traffic to and from your Microsoft AD on Amazon Web Services.
-- /AddIpRoutes/ adds this address block. You can also use /AddIpRoutes/ to
-- facilitate routing traffic that uses public IP ranges from your
-- Microsoft AD on Amazon Web Services to a peer VPC.
--
-- Before you call /AddIpRoutes/, ensure that all of the required
-- permissions have been explicitly granted through a policy. For details
-- about what permissions are required to run the /AddIpRoutes/ operation,
-- see
-- <http://docs.aws.amazon.com/directoryservice/latest/admin-guide/UsingWithDS_IAM_ResourcePermissions.html Directory Service API Permissions: Actions, Resources, and Conditions Reference>.
module Amazonka.DirectoryService.AddIpRoutes
  ( -- * Creating a Request
    AddIpRoutes (..),
    newAddIpRoutes,

    -- * Request Lenses
    addIpRoutes_updateSecurityGroupForDirectoryControllers,
    addIpRoutes_directoryId,
    addIpRoutes_ipRoutes,

    -- * Destructuring the Response
    AddIpRoutesResponse (..),
    newAddIpRoutesResponse,

    -- * Response Lenses
    addIpRoutesResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.DirectoryService.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:/ 'newAddIpRoutes' smart constructor.
data AddIpRoutes = AddIpRoutes'
  { -- | If set to true, updates the inbound and outbound rules of the security
    -- group that has the description: \"Amazon Web Services created security
    -- group for /directory ID/ directory controllers.\" Following are the new
    -- rules:
    --
    -- Inbound:
    --
    -- -   Type: Custom UDP Rule, Protocol: UDP, Range: 88, Source: 0.0.0.0\/0
    --
    -- -   Type: Custom UDP Rule, Protocol: UDP, Range: 123, Source: 0.0.0.0\/0
    --
    -- -   Type: Custom UDP Rule, Protocol: UDP, Range: 138, Source: 0.0.0.0\/0
    --
    -- -   Type: Custom UDP Rule, Protocol: UDP, Range: 389, Source: 0.0.0.0\/0
    --
    -- -   Type: Custom UDP Rule, Protocol: UDP, Range: 464, Source: 0.0.0.0\/0
    --
    -- -   Type: Custom UDP Rule, Protocol: UDP, Range: 445, Source: 0.0.0.0\/0
    --
    -- -   Type: Custom TCP Rule, Protocol: TCP, Range: 88, Source: 0.0.0.0\/0
    --
    -- -   Type: Custom TCP Rule, Protocol: TCP, Range: 135, Source: 0.0.0.0\/0
    --
    -- -   Type: Custom TCP Rule, Protocol: TCP, Range: 445, Source: 0.0.0.0\/0
    --
    -- -   Type: Custom TCP Rule, Protocol: TCP, Range: 464, Source: 0.0.0.0\/0
    --
    -- -   Type: Custom TCP Rule, Protocol: TCP, Range: 636, Source: 0.0.0.0\/0
    --
    -- -   Type: Custom TCP Rule, Protocol: TCP, Range: 1024-65535, Source:
    --     0.0.0.0\/0
    --
    -- -   Type: Custom TCP Rule, Protocol: TCP, Range: 3268-33269, Source:
    --     0.0.0.0\/0
    --
    -- -   Type: DNS (UDP), Protocol: UDP, Range: 53, Source: 0.0.0.0\/0
    --
    -- -   Type: DNS (TCP), Protocol: TCP, Range: 53, Source: 0.0.0.0\/0
    --
    -- -   Type: LDAP, Protocol: TCP, Range: 389, Source: 0.0.0.0\/0
    --
    -- -   Type: All ICMP, Protocol: All, Range: N\/A, Source: 0.0.0.0\/0
    --
    -- Outbound:
    --
    -- -   Type: All traffic, Protocol: All, Range: All, Destination:
    --     0.0.0.0\/0
    --
    -- These security rules impact an internal network interface that is not
    -- exposed publicly.
    AddIpRoutes -> Maybe Bool
updateSecurityGroupForDirectoryControllers :: Prelude.Maybe Prelude.Bool,
    -- | Identifier (ID) of the directory to which to add the address block.
    AddIpRoutes -> Text
directoryId :: Prelude.Text,
    -- | IP address blocks, using CIDR format, of the traffic to route. This is
    -- often the IP address block of the DNS server used for your self-managed
    -- domain.
    AddIpRoutes -> [IpRoute]
ipRoutes :: [IpRoute]
  }
  deriving (AddIpRoutes -> AddIpRoutes -> Bool
(AddIpRoutes -> AddIpRoutes -> Bool)
-> (AddIpRoutes -> AddIpRoutes -> Bool) -> Eq AddIpRoutes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AddIpRoutes -> AddIpRoutes -> Bool
$c/= :: AddIpRoutes -> AddIpRoutes -> Bool
== :: AddIpRoutes -> AddIpRoutes -> Bool
$c== :: AddIpRoutes -> AddIpRoutes -> Bool
Prelude.Eq, ReadPrec [AddIpRoutes]
ReadPrec AddIpRoutes
Int -> ReadS AddIpRoutes
ReadS [AddIpRoutes]
(Int -> ReadS AddIpRoutes)
-> ReadS [AddIpRoutes]
-> ReadPrec AddIpRoutes
-> ReadPrec [AddIpRoutes]
-> Read AddIpRoutes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AddIpRoutes]
$creadListPrec :: ReadPrec [AddIpRoutes]
readPrec :: ReadPrec AddIpRoutes
$creadPrec :: ReadPrec AddIpRoutes
readList :: ReadS [AddIpRoutes]
$creadList :: ReadS [AddIpRoutes]
readsPrec :: Int -> ReadS AddIpRoutes
$creadsPrec :: Int -> ReadS AddIpRoutes
Prelude.Read, Int -> AddIpRoutes -> ShowS
[AddIpRoutes] -> ShowS
AddIpRoutes -> String
(Int -> AddIpRoutes -> ShowS)
-> (AddIpRoutes -> String)
-> ([AddIpRoutes] -> ShowS)
-> Show AddIpRoutes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AddIpRoutes] -> ShowS
$cshowList :: [AddIpRoutes] -> ShowS
show :: AddIpRoutes -> String
$cshow :: AddIpRoutes -> String
showsPrec :: Int -> AddIpRoutes -> ShowS
$cshowsPrec :: Int -> AddIpRoutes -> ShowS
Prelude.Show, (forall x. AddIpRoutes -> Rep AddIpRoutes x)
-> (forall x. Rep AddIpRoutes x -> AddIpRoutes)
-> Generic AddIpRoutes
forall x. Rep AddIpRoutes x -> AddIpRoutes
forall x. AddIpRoutes -> Rep AddIpRoutes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AddIpRoutes x -> AddIpRoutes
$cfrom :: forall x. AddIpRoutes -> Rep AddIpRoutes x
Prelude.Generic)

-- |
-- Create a value of 'AddIpRoutes' 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:
--
-- 'updateSecurityGroupForDirectoryControllers', 'addIpRoutes_updateSecurityGroupForDirectoryControllers' - If set to true, updates the inbound and outbound rules of the security
-- group that has the description: \"Amazon Web Services created security
-- group for /directory ID/ directory controllers.\" Following are the new
-- rules:
--
-- Inbound:
--
-- -   Type: Custom UDP Rule, Protocol: UDP, Range: 88, Source: 0.0.0.0\/0
--
-- -   Type: Custom UDP Rule, Protocol: UDP, Range: 123, Source: 0.0.0.0\/0
--
-- -   Type: Custom UDP Rule, Protocol: UDP, Range: 138, Source: 0.0.0.0\/0
--
-- -   Type: Custom UDP Rule, Protocol: UDP, Range: 389, Source: 0.0.0.0\/0
--
-- -   Type: Custom UDP Rule, Protocol: UDP, Range: 464, Source: 0.0.0.0\/0
--
-- -   Type: Custom UDP Rule, Protocol: UDP, Range: 445, Source: 0.0.0.0\/0
--
-- -   Type: Custom TCP Rule, Protocol: TCP, Range: 88, Source: 0.0.0.0\/0
--
-- -   Type: Custom TCP Rule, Protocol: TCP, Range: 135, Source: 0.0.0.0\/0
--
-- -   Type: Custom TCP Rule, Protocol: TCP, Range: 445, Source: 0.0.0.0\/0
--
-- -   Type: Custom TCP Rule, Protocol: TCP, Range: 464, Source: 0.0.0.0\/0
--
-- -   Type: Custom TCP Rule, Protocol: TCP, Range: 636, Source: 0.0.0.0\/0
--
-- -   Type: Custom TCP Rule, Protocol: TCP, Range: 1024-65535, Source:
--     0.0.0.0\/0
--
-- -   Type: Custom TCP Rule, Protocol: TCP, Range: 3268-33269, Source:
--     0.0.0.0\/0
--
-- -   Type: DNS (UDP), Protocol: UDP, Range: 53, Source: 0.0.0.0\/0
--
-- -   Type: DNS (TCP), Protocol: TCP, Range: 53, Source: 0.0.0.0\/0
--
-- -   Type: LDAP, Protocol: TCP, Range: 389, Source: 0.0.0.0\/0
--
-- -   Type: All ICMP, Protocol: All, Range: N\/A, Source: 0.0.0.0\/0
--
-- Outbound:
--
-- -   Type: All traffic, Protocol: All, Range: All, Destination:
--     0.0.0.0\/0
--
-- These security rules impact an internal network interface that is not
-- exposed publicly.
--
-- 'directoryId', 'addIpRoutes_directoryId' - Identifier (ID) of the directory to which to add the address block.
--
-- 'ipRoutes', 'addIpRoutes_ipRoutes' - IP address blocks, using CIDR format, of the traffic to route. This is
-- often the IP address block of the DNS server used for your self-managed
-- domain.
newAddIpRoutes ::
  -- | 'directoryId'
  Prelude.Text ->
  AddIpRoutes
newAddIpRoutes :: Text -> AddIpRoutes
newAddIpRoutes Text
pDirectoryId_ =
  AddIpRoutes' :: Maybe Bool -> Text -> [IpRoute] -> AddIpRoutes
AddIpRoutes'
    { $sel:updateSecurityGroupForDirectoryControllers:AddIpRoutes' :: Maybe Bool
updateSecurityGroupForDirectoryControllers =
        Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:directoryId:AddIpRoutes' :: Text
directoryId = Text
pDirectoryId_,
      $sel:ipRoutes:AddIpRoutes' :: [IpRoute]
ipRoutes = [IpRoute]
forall a. Monoid a => a
Prelude.mempty
    }

-- | If set to true, updates the inbound and outbound rules of the security
-- group that has the description: \"Amazon Web Services created security
-- group for /directory ID/ directory controllers.\" Following are the new
-- rules:
--
-- Inbound:
--
-- -   Type: Custom UDP Rule, Protocol: UDP, Range: 88, Source: 0.0.0.0\/0
--
-- -   Type: Custom UDP Rule, Protocol: UDP, Range: 123, Source: 0.0.0.0\/0
--
-- -   Type: Custom UDP Rule, Protocol: UDP, Range: 138, Source: 0.0.0.0\/0
--
-- -   Type: Custom UDP Rule, Protocol: UDP, Range: 389, Source: 0.0.0.0\/0
--
-- -   Type: Custom UDP Rule, Protocol: UDP, Range: 464, Source: 0.0.0.0\/0
--
-- -   Type: Custom UDP Rule, Protocol: UDP, Range: 445, Source: 0.0.0.0\/0
--
-- -   Type: Custom TCP Rule, Protocol: TCP, Range: 88, Source: 0.0.0.0\/0
--
-- -   Type: Custom TCP Rule, Protocol: TCP, Range: 135, Source: 0.0.0.0\/0
--
-- -   Type: Custom TCP Rule, Protocol: TCP, Range: 445, Source: 0.0.0.0\/0
--
-- -   Type: Custom TCP Rule, Protocol: TCP, Range: 464, Source: 0.0.0.0\/0
--
-- -   Type: Custom TCP Rule, Protocol: TCP, Range: 636, Source: 0.0.0.0\/0
--
-- -   Type: Custom TCP Rule, Protocol: TCP, Range: 1024-65535, Source:
--     0.0.0.0\/0
--
-- -   Type: Custom TCP Rule, Protocol: TCP, Range: 3268-33269, Source:
--     0.0.0.0\/0
--
-- -   Type: DNS (UDP), Protocol: UDP, Range: 53, Source: 0.0.0.0\/0
--
-- -   Type: DNS (TCP), Protocol: TCP, Range: 53, Source: 0.0.0.0\/0
--
-- -   Type: LDAP, Protocol: TCP, Range: 389, Source: 0.0.0.0\/0
--
-- -   Type: All ICMP, Protocol: All, Range: N\/A, Source: 0.0.0.0\/0
--
-- Outbound:
--
-- -   Type: All traffic, Protocol: All, Range: All, Destination:
--     0.0.0.0\/0
--
-- These security rules impact an internal network interface that is not
-- exposed publicly.
addIpRoutes_updateSecurityGroupForDirectoryControllers :: Lens.Lens' AddIpRoutes (Prelude.Maybe Prelude.Bool)
addIpRoutes_updateSecurityGroupForDirectoryControllers :: (Maybe Bool -> f (Maybe Bool)) -> AddIpRoutes -> f AddIpRoutes
addIpRoutes_updateSecurityGroupForDirectoryControllers = (AddIpRoutes -> Maybe Bool)
-> (AddIpRoutes -> Maybe Bool -> AddIpRoutes)
-> Lens AddIpRoutes AddIpRoutes (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddIpRoutes' {Maybe Bool
updateSecurityGroupForDirectoryControllers :: Maybe Bool
$sel:updateSecurityGroupForDirectoryControllers:AddIpRoutes' :: AddIpRoutes -> Maybe Bool
updateSecurityGroupForDirectoryControllers} -> Maybe Bool
updateSecurityGroupForDirectoryControllers) (\s :: AddIpRoutes
s@AddIpRoutes' {} Maybe Bool
a -> AddIpRoutes
s {$sel:updateSecurityGroupForDirectoryControllers:AddIpRoutes' :: Maybe Bool
updateSecurityGroupForDirectoryControllers = Maybe Bool
a} :: AddIpRoutes)

-- | Identifier (ID) of the directory to which to add the address block.
addIpRoutes_directoryId :: Lens.Lens' AddIpRoutes Prelude.Text
addIpRoutes_directoryId :: (Text -> f Text) -> AddIpRoutes -> f AddIpRoutes
addIpRoutes_directoryId = (AddIpRoutes -> Text)
-> (AddIpRoutes -> Text -> AddIpRoutes)
-> Lens AddIpRoutes AddIpRoutes Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddIpRoutes' {Text
directoryId :: Text
$sel:directoryId:AddIpRoutes' :: AddIpRoutes -> Text
directoryId} -> Text
directoryId) (\s :: AddIpRoutes
s@AddIpRoutes' {} Text
a -> AddIpRoutes
s {$sel:directoryId:AddIpRoutes' :: Text
directoryId = Text
a} :: AddIpRoutes)

-- | IP address blocks, using CIDR format, of the traffic to route. This is
-- often the IP address block of the DNS server used for your self-managed
-- domain.
addIpRoutes_ipRoutes :: Lens.Lens' AddIpRoutes [IpRoute]
addIpRoutes_ipRoutes :: ([IpRoute] -> f [IpRoute]) -> AddIpRoutes -> f AddIpRoutes
addIpRoutes_ipRoutes = (AddIpRoutes -> [IpRoute])
-> (AddIpRoutes -> [IpRoute] -> AddIpRoutes)
-> Lens AddIpRoutes AddIpRoutes [IpRoute] [IpRoute]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddIpRoutes' {[IpRoute]
ipRoutes :: [IpRoute]
$sel:ipRoutes:AddIpRoutes' :: AddIpRoutes -> [IpRoute]
ipRoutes} -> [IpRoute]
ipRoutes) (\s :: AddIpRoutes
s@AddIpRoutes' {} [IpRoute]
a -> AddIpRoutes
s {$sel:ipRoutes:AddIpRoutes' :: [IpRoute]
ipRoutes = [IpRoute]
a} :: AddIpRoutes) (([IpRoute] -> f [IpRoute]) -> AddIpRoutes -> f AddIpRoutes)
-> (([IpRoute] -> f [IpRoute]) -> [IpRoute] -> f [IpRoute])
-> ([IpRoute] -> f [IpRoute])
-> AddIpRoutes
-> f AddIpRoutes
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([IpRoute] -> f [IpRoute]) -> [IpRoute] -> f [IpRoute]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.AWSRequest AddIpRoutes where
  type AWSResponse AddIpRoutes = AddIpRoutesResponse
  request :: AddIpRoutes -> Request AddIpRoutes
request = Service -> AddIpRoutes -> Request AddIpRoutes
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy AddIpRoutes
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse AddIpRoutes)))
response =
    (Int
 -> ResponseHeaders
 -> ()
 -> Either String (AWSResponse AddIpRoutes))
-> Logger
-> Service
-> Proxy AddIpRoutes
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse AddIpRoutes)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
      ( \Int
s ResponseHeaders
h ()
x ->
          Int -> AddIpRoutesResponse
AddIpRoutesResponse'
            (Int -> AddIpRoutesResponse)
-> Either String Int -> Either String AddIpRoutesResponse
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))
      )

instance Prelude.Hashable AddIpRoutes

instance Prelude.NFData AddIpRoutes

instance Core.ToHeaders AddIpRoutes where
  toHeaders :: AddIpRoutes -> ResponseHeaders
toHeaders =
    ResponseHeaders -> AddIpRoutes -> 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
"DirectoryService_20150416.AddIpRoutes" ::
                          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 AddIpRoutes where
  toJSON :: AddIpRoutes -> Value
toJSON AddIpRoutes' {[IpRoute]
Maybe Bool
Text
ipRoutes :: [IpRoute]
directoryId :: Text
updateSecurityGroupForDirectoryControllers :: Maybe Bool
$sel:ipRoutes:AddIpRoutes' :: AddIpRoutes -> [IpRoute]
$sel:directoryId:AddIpRoutes' :: AddIpRoutes -> Text
$sel:updateSecurityGroupForDirectoryControllers:AddIpRoutes' :: AddIpRoutes -> Maybe Bool
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ ( Text
"UpdateSecurityGroupForDirectoryControllers"
                Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=
            )
              (Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
updateSecurityGroupForDirectoryControllers,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"DirectoryId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
directoryId),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"IpRoutes" Text -> [IpRoute] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [IpRoute]
ipRoutes)
          ]
      )

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

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

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

-- |
-- Create a value of 'AddIpRoutesResponse' 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', 'addIpRoutesResponse_httpStatus' - The response's http status code.
newAddIpRoutesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  AddIpRoutesResponse
newAddIpRoutesResponse :: Int -> AddIpRoutesResponse
newAddIpRoutesResponse Int
pHttpStatus_ =
  AddIpRoutesResponse' :: Int -> AddIpRoutesResponse
AddIpRoutesResponse' {$sel:httpStatus:AddIpRoutesResponse' :: Int
httpStatus = Int
pHttpStatus_}

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

instance Prelude.NFData AddIpRoutesResponse