{-# 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.OpsWorks.DescribeElasticIps
-- 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)
--
-- Describes
-- <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html Elastic IP addresses>.
--
-- This call accepts only one resource-identifying parameter.
--
-- __Required Permissions__: To use this action, an IAM user must have a
-- Show, Deploy, or Manage permissions level for the stack, or an attached
-- policy that explicitly grants permissions. For more information about
-- user permissions, see
-- <https://docs.aws.amazon.com/opsworks/latest/userguide/opsworks-security-users.html Managing User Permissions>.
module Amazonka.OpsWorks.DescribeElasticIps
  ( -- * Creating a Request
    DescribeElasticIps (..),
    newDescribeElasticIps,

    -- * Request Lenses
    describeElasticIps_instanceId,
    describeElasticIps_ips,
    describeElasticIps_stackId,

    -- * Destructuring the Response
    DescribeElasticIpsResponse (..),
    newDescribeElasticIpsResponse,

    -- * Response Lenses
    describeElasticIpsResponse_elasticIps,
    describeElasticIpsResponse_httpStatus,
  )
where

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

-- | /See:/ 'newDescribeElasticIps' smart constructor.
data DescribeElasticIps = DescribeElasticIps'
  { -- | The instance ID. If you include this parameter, @DescribeElasticIps@
    -- returns a description of the Elastic IP addresses associated with the
    -- specified instance.
    DescribeElasticIps -> Maybe Text
instanceId :: Prelude.Maybe Prelude.Text,
    -- | An array of Elastic IP addresses to be described. If you include this
    -- parameter, @DescribeElasticIps@ returns a description of the specified
    -- Elastic IP addresses. Otherwise, it returns a description of every
    -- Elastic IP address.
    DescribeElasticIps -> Maybe [Text]
ips :: Prelude.Maybe [Prelude.Text],
    -- | A stack ID. If you include this parameter, @DescribeElasticIps@ returns
    -- a description of the Elastic IP addresses that are registered with the
    -- specified stack.
    DescribeElasticIps -> Maybe Text
stackId :: Prelude.Maybe Prelude.Text
  }
  deriving (DescribeElasticIps -> DescribeElasticIps -> Bool
(DescribeElasticIps -> DescribeElasticIps -> Bool)
-> (DescribeElasticIps -> DescribeElasticIps -> Bool)
-> Eq DescribeElasticIps
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeElasticIps -> DescribeElasticIps -> Bool
$c/= :: DescribeElasticIps -> DescribeElasticIps -> Bool
== :: DescribeElasticIps -> DescribeElasticIps -> Bool
$c== :: DescribeElasticIps -> DescribeElasticIps -> Bool
Prelude.Eq, ReadPrec [DescribeElasticIps]
ReadPrec DescribeElasticIps
Int -> ReadS DescribeElasticIps
ReadS [DescribeElasticIps]
(Int -> ReadS DescribeElasticIps)
-> ReadS [DescribeElasticIps]
-> ReadPrec DescribeElasticIps
-> ReadPrec [DescribeElasticIps]
-> Read DescribeElasticIps
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeElasticIps]
$creadListPrec :: ReadPrec [DescribeElasticIps]
readPrec :: ReadPrec DescribeElasticIps
$creadPrec :: ReadPrec DescribeElasticIps
readList :: ReadS [DescribeElasticIps]
$creadList :: ReadS [DescribeElasticIps]
readsPrec :: Int -> ReadS DescribeElasticIps
$creadsPrec :: Int -> ReadS DescribeElasticIps
Prelude.Read, Int -> DescribeElasticIps -> ShowS
[DescribeElasticIps] -> ShowS
DescribeElasticIps -> String
(Int -> DescribeElasticIps -> ShowS)
-> (DescribeElasticIps -> String)
-> ([DescribeElasticIps] -> ShowS)
-> Show DescribeElasticIps
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeElasticIps] -> ShowS
$cshowList :: [DescribeElasticIps] -> ShowS
show :: DescribeElasticIps -> String
$cshow :: DescribeElasticIps -> String
showsPrec :: Int -> DescribeElasticIps -> ShowS
$cshowsPrec :: Int -> DescribeElasticIps -> ShowS
Prelude.Show, (forall x. DescribeElasticIps -> Rep DescribeElasticIps x)
-> (forall x. Rep DescribeElasticIps x -> DescribeElasticIps)
-> Generic DescribeElasticIps
forall x. Rep DescribeElasticIps x -> DescribeElasticIps
forall x. DescribeElasticIps -> Rep DescribeElasticIps x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribeElasticIps x -> DescribeElasticIps
$cfrom :: forall x. DescribeElasticIps -> Rep DescribeElasticIps x
Prelude.Generic)

-- |
-- Create a value of 'DescribeElasticIps' 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:
--
-- 'instanceId', 'describeElasticIps_instanceId' - The instance ID. If you include this parameter, @DescribeElasticIps@
-- returns a description of the Elastic IP addresses associated with the
-- specified instance.
--
-- 'ips', 'describeElasticIps_ips' - An array of Elastic IP addresses to be described. If you include this
-- parameter, @DescribeElasticIps@ returns a description of the specified
-- Elastic IP addresses. Otherwise, it returns a description of every
-- Elastic IP address.
--
-- 'stackId', 'describeElasticIps_stackId' - A stack ID. If you include this parameter, @DescribeElasticIps@ returns
-- a description of the Elastic IP addresses that are registered with the
-- specified stack.
newDescribeElasticIps ::
  DescribeElasticIps
newDescribeElasticIps :: DescribeElasticIps
newDescribeElasticIps =
  DescribeElasticIps' :: Maybe Text -> Maybe [Text] -> Maybe Text -> DescribeElasticIps
DescribeElasticIps'
    { $sel:instanceId:DescribeElasticIps' :: Maybe Text
instanceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:ips:DescribeElasticIps' :: Maybe [Text]
ips = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:stackId:DescribeElasticIps' :: Maybe Text
stackId = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The instance ID. If you include this parameter, @DescribeElasticIps@
-- returns a description of the Elastic IP addresses associated with the
-- specified instance.
describeElasticIps_instanceId :: Lens.Lens' DescribeElasticIps (Prelude.Maybe Prelude.Text)
describeElasticIps_instanceId :: (Maybe Text -> f (Maybe Text))
-> DescribeElasticIps -> f DescribeElasticIps
describeElasticIps_instanceId = (DescribeElasticIps -> Maybe Text)
-> (DescribeElasticIps -> Maybe Text -> DescribeElasticIps)
-> Lens
     DescribeElasticIps DescribeElasticIps (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeElasticIps' {Maybe Text
instanceId :: Maybe Text
$sel:instanceId:DescribeElasticIps' :: DescribeElasticIps -> Maybe Text
instanceId} -> Maybe Text
instanceId) (\s :: DescribeElasticIps
s@DescribeElasticIps' {} Maybe Text
a -> DescribeElasticIps
s {$sel:instanceId:DescribeElasticIps' :: Maybe Text
instanceId = Maybe Text
a} :: DescribeElasticIps)

-- | An array of Elastic IP addresses to be described. If you include this
-- parameter, @DescribeElasticIps@ returns a description of the specified
-- Elastic IP addresses. Otherwise, it returns a description of every
-- Elastic IP address.
describeElasticIps_ips :: Lens.Lens' DescribeElasticIps (Prelude.Maybe [Prelude.Text])
describeElasticIps_ips :: (Maybe [Text] -> f (Maybe [Text]))
-> DescribeElasticIps -> f DescribeElasticIps
describeElasticIps_ips = (DescribeElasticIps -> Maybe [Text])
-> (DescribeElasticIps -> Maybe [Text] -> DescribeElasticIps)
-> Lens
     DescribeElasticIps DescribeElasticIps (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeElasticIps' {Maybe [Text]
ips :: Maybe [Text]
$sel:ips:DescribeElasticIps' :: DescribeElasticIps -> Maybe [Text]
ips} -> Maybe [Text]
ips) (\s :: DescribeElasticIps
s@DescribeElasticIps' {} Maybe [Text]
a -> DescribeElasticIps
s {$sel:ips:DescribeElasticIps' :: Maybe [Text]
ips = Maybe [Text]
a} :: DescribeElasticIps) ((Maybe [Text] -> f (Maybe [Text]))
 -> DescribeElasticIps -> f DescribeElasticIps)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> DescribeElasticIps
-> f DescribeElasticIps
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A stack ID. If you include this parameter, @DescribeElasticIps@ returns
-- a description of the Elastic IP addresses that are registered with the
-- specified stack.
describeElasticIps_stackId :: Lens.Lens' DescribeElasticIps (Prelude.Maybe Prelude.Text)
describeElasticIps_stackId :: (Maybe Text -> f (Maybe Text))
-> DescribeElasticIps -> f DescribeElasticIps
describeElasticIps_stackId = (DescribeElasticIps -> Maybe Text)
-> (DescribeElasticIps -> Maybe Text -> DescribeElasticIps)
-> Lens
     DescribeElasticIps DescribeElasticIps (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeElasticIps' {Maybe Text
stackId :: Maybe Text
$sel:stackId:DescribeElasticIps' :: DescribeElasticIps -> Maybe Text
stackId} -> Maybe Text
stackId) (\s :: DescribeElasticIps
s@DescribeElasticIps' {} Maybe Text
a -> DescribeElasticIps
s {$sel:stackId:DescribeElasticIps' :: Maybe Text
stackId = Maybe Text
a} :: DescribeElasticIps)

instance Core.AWSRequest DescribeElasticIps where
  type
    AWSResponse DescribeElasticIps =
      DescribeElasticIpsResponse
  request :: DescribeElasticIps -> Request DescribeElasticIps
request = Service -> DescribeElasticIps -> Request DescribeElasticIps
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DescribeElasticIps
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeElasticIps)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse DescribeElasticIps))
-> Logger
-> Service
-> Proxy DescribeElasticIps
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribeElasticIps)))
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 [ElasticIp] -> Int -> DescribeElasticIpsResponse
DescribeElasticIpsResponse'
            (Maybe [ElasticIp] -> Int -> DescribeElasticIpsResponse)
-> Either String (Maybe [ElasticIp])
-> Either String (Int -> DescribeElasticIpsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [ElasticIp]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ElasticIps" Either String (Maybe (Maybe [ElasticIp]))
-> Maybe [ElasticIp] -> Either String (Maybe [ElasticIp])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [ElasticIp]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> DescribeElasticIpsResponse)
-> Either String Int -> Either String DescribeElasticIpsResponse
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 DescribeElasticIps

instance Prelude.NFData DescribeElasticIps

instance Core.ToHeaders DescribeElasticIps where
  toHeaders :: DescribeElasticIps -> ResponseHeaders
toHeaders =
    ResponseHeaders -> DescribeElasticIps -> 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
"OpsWorks_20130218.DescribeElasticIps" ::
                          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 DescribeElasticIps where
  toJSON :: DescribeElasticIps -> Value
toJSON DescribeElasticIps' {Maybe [Text]
Maybe Text
stackId :: Maybe Text
ips :: Maybe [Text]
instanceId :: Maybe Text
$sel:stackId:DescribeElasticIps' :: DescribeElasticIps -> Maybe Text
$sel:ips:DescribeElasticIps' :: DescribeElasticIps -> Maybe [Text]
$sel:instanceId:DescribeElasticIps' :: DescribeElasticIps -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"InstanceId" 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
instanceId,
            (Text
"Ips" 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]
ips,
            (Text
"StackId" 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
stackId
          ]
      )

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

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

-- | Contains the response to a @DescribeElasticIps@ request.
--
-- /See:/ 'newDescribeElasticIpsResponse' smart constructor.
data DescribeElasticIpsResponse = DescribeElasticIpsResponse'
  { -- | An @ElasticIps@ object that describes the specified Elastic IP
    -- addresses.
    DescribeElasticIpsResponse -> Maybe [ElasticIp]
elasticIps :: Prelude.Maybe [ElasticIp],
    -- | The response's http status code.
    DescribeElasticIpsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribeElasticIpsResponse -> DescribeElasticIpsResponse -> Bool
(DescribeElasticIpsResponse -> DescribeElasticIpsResponse -> Bool)
-> (DescribeElasticIpsResponse
    -> DescribeElasticIpsResponse -> Bool)
-> Eq DescribeElasticIpsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribeElasticIpsResponse -> DescribeElasticIpsResponse -> Bool
$c/= :: DescribeElasticIpsResponse -> DescribeElasticIpsResponse -> Bool
== :: DescribeElasticIpsResponse -> DescribeElasticIpsResponse -> Bool
$c== :: DescribeElasticIpsResponse -> DescribeElasticIpsResponse -> Bool
Prelude.Eq, ReadPrec [DescribeElasticIpsResponse]
ReadPrec DescribeElasticIpsResponse
Int -> ReadS DescribeElasticIpsResponse
ReadS [DescribeElasticIpsResponse]
(Int -> ReadS DescribeElasticIpsResponse)
-> ReadS [DescribeElasticIpsResponse]
-> ReadPrec DescribeElasticIpsResponse
-> ReadPrec [DescribeElasticIpsResponse]
-> Read DescribeElasticIpsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribeElasticIpsResponse]
$creadListPrec :: ReadPrec [DescribeElasticIpsResponse]
readPrec :: ReadPrec DescribeElasticIpsResponse
$creadPrec :: ReadPrec DescribeElasticIpsResponse
readList :: ReadS [DescribeElasticIpsResponse]
$creadList :: ReadS [DescribeElasticIpsResponse]
readsPrec :: Int -> ReadS DescribeElasticIpsResponse
$creadsPrec :: Int -> ReadS DescribeElasticIpsResponse
Prelude.Read, Int -> DescribeElasticIpsResponse -> ShowS
[DescribeElasticIpsResponse] -> ShowS
DescribeElasticIpsResponse -> String
(Int -> DescribeElasticIpsResponse -> ShowS)
-> (DescribeElasticIpsResponse -> String)
-> ([DescribeElasticIpsResponse] -> ShowS)
-> Show DescribeElasticIpsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribeElasticIpsResponse] -> ShowS
$cshowList :: [DescribeElasticIpsResponse] -> ShowS
show :: DescribeElasticIpsResponse -> String
$cshow :: DescribeElasticIpsResponse -> String
showsPrec :: Int -> DescribeElasticIpsResponse -> ShowS
$cshowsPrec :: Int -> DescribeElasticIpsResponse -> ShowS
Prelude.Show, (forall x.
 DescribeElasticIpsResponse -> Rep DescribeElasticIpsResponse x)
-> (forall x.
    Rep DescribeElasticIpsResponse x -> DescribeElasticIpsResponse)
-> Generic DescribeElasticIpsResponse
forall x.
Rep DescribeElasticIpsResponse x -> DescribeElasticIpsResponse
forall x.
DescribeElasticIpsResponse -> Rep DescribeElasticIpsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribeElasticIpsResponse x -> DescribeElasticIpsResponse
$cfrom :: forall x.
DescribeElasticIpsResponse -> Rep DescribeElasticIpsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribeElasticIpsResponse' 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:
--
-- 'elasticIps', 'describeElasticIpsResponse_elasticIps' - An @ElasticIps@ object that describes the specified Elastic IP
-- addresses.
--
-- 'httpStatus', 'describeElasticIpsResponse_httpStatus' - The response's http status code.
newDescribeElasticIpsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribeElasticIpsResponse
newDescribeElasticIpsResponse :: Int -> DescribeElasticIpsResponse
newDescribeElasticIpsResponse Int
pHttpStatus_ =
  DescribeElasticIpsResponse' :: Maybe [ElasticIp] -> Int -> DescribeElasticIpsResponse
DescribeElasticIpsResponse'
    { $sel:elasticIps:DescribeElasticIpsResponse' :: Maybe [ElasticIp]
elasticIps =
        Maybe [ElasticIp]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribeElasticIpsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An @ElasticIps@ object that describes the specified Elastic IP
-- addresses.
describeElasticIpsResponse_elasticIps :: Lens.Lens' DescribeElasticIpsResponse (Prelude.Maybe [ElasticIp])
describeElasticIpsResponse_elasticIps :: (Maybe [ElasticIp] -> f (Maybe [ElasticIp]))
-> DescribeElasticIpsResponse -> f DescribeElasticIpsResponse
describeElasticIpsResponse_elasticIps = (DescribeElasticIpsResponse -> Maybe [ElasticIp])
-> (DescribeElasticIpsResponse
    -> Maybe [ElasticIp] -> DescribeElasticIpsResponse)
-> Lens
     DescribeElasticIpsResponse
     DescribeElasticIpsResponse
     (Maybe [ElasticIp])
     (Maybe [ElasticIp])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribeElasticIpsResponse' {Maybe [ElasticIp]
elasticIps :: Maybe [ElasticIp]
$sel:elasticIps:DescribeElasticIpsResponse' :: DescribeElasticIpsResponse -> Maybe [ElasticIp]
elasticIps} -> Maybe [ElasticIp]
elasticIps) (\s :: DescribeElasticIpsResponse
s@DescribeElasticIpsResponse' {} Maybe [ElasticIp]
a -> DescribeElasticIpsResponse
s {$sel:elasticIps:DescribeElasticIpsResponse' :: Maybe [ElasticIp]
elasticIps = Maybe [ElasticIp]
a} :: DescribeElasticIpsResponse) ((Maybe [ElasticIp] -> f (Maybe [ElasticIp]))
 -> DescribeElasticIpsResponse -> f DescribeElasticIpsResponse)
-> ((Maybe [ElasticIp] -> f (Maybe [ElasticIp]))
    -> Maybe [ElasticIp] -> f (Maybe [ElasticIp]))
-> (Maybe [ElasticIp] -> f (Maybe [ElasticIp]))
-> DescribeElasticIpsResponse
-> f DescribeElasticIpsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [ElasticIp] [ElasticIp] [ElasticIp] [ElasticIp]
-> Iso
     (Maybe [ElasticIp])
     (Maybe [ElasticIp])
     (Maybe [ElasticIp])
     (Maybe [ElasticIp])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [ElasticIp] [ElasticIp] [ElasticIp] [ElasticIp]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData DescribeElasticIpsResponse