{-# 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.GlobalAccelerator.UpdateAcceleratorAttributes
-- 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)
--
-- Update the attributes for an accelerator.
module Amazonka.GlobalAccelerator.UpdateAcceleratorAttributes
  ( -- * Creating a Request
    UpdateAcceleratorAttributes (..),
    newUpdateAcceleratorAttributes,

    -- * Request Lenses
    updateAcceleratorAttributes_flowLogsS3Prefix,
    updateAcceleratorAttributes_flowLogsEnabled,
    updateAcceleratorAttributes_flowLogsS3Bucket,
    updateAcceleratorAttributes_acceleratorArn,

    -- * Destructuring the Response
    UpdateAcceleratorAttributesResponse (..),
    newUpdateAcceleratorAttributesResponse,

    -- * Response Lenses
    updateAcceleratorAttributesResponse_acceleratorAttributes,
    updateAcceleratorAttributesResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.GlobalAccelerator.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:/ 'newUpdateAcceleratorAttributes' smart constructor.
data UpdateAcceleratorAttributes = UpdateAcceleratorAttributes'
  { -- | Update the prefix for the location in the Amazon S3 bucket for the flow
    -- logs. Attribute is required if @FlowLogsEnabled@ is @true@.
    --
    -- If you don’t specify a prefix, the flow logs are stored in the root of
    -- the bucket. If you specify slash (\/) for the S3 bucket prefix, the log
    -- file bucket folder structure will include a double slash (\/\/), like
    -- the following:
    --
    -- s3-bucket_name\/\/AWSLogs\/aws_account_id
    UpdateAcceleratorAttributes -> Maybe Text
flowLogsS3Prefix :: Prelude.Maybe Prelude.Text,
    -- | Update whether flow logs are enabled. The default value is false. If the
    -- value is true, @FlowLogsS3Bucket@ and @FlowLogsS3Prefix@ must be
    -- specified.
    --
    -- For more information, see
    -- <https://docs.aws.amazon.com/global-accelerator/latest/dg/monitoring-global-accelerator.flow-logs.html Flow Logs>
    -- in the /AWS Global Accelerator Developer Guide/.
    UpdateAcceleratorAttributes -> Maybe Bool
flowLogsEnabled :: Prelude.Maybe Prelude.Bool,
    -- | The name of the Amazon S3 bucket for the flow logs. Attribute is
    -- required if @FlowLogsEnabled@ is @true@. The bucket must exist and have
    -- a bucket policy that grants AWS Global Accelerator permission to write
    -- to the bucket.
    UpdateAcceleratorAttributes -> Maybe Text
flowLogsS3Bucket :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the accelerator that you want to
    -- update.
    UpdateAcceleratorAttributes -> Text
acceleratorArn :: Prelude.Text
  }
  deriving (UpdateAcceleratorAttributes -> UpdateAcceleratorAttributes -> Bool
(UpdateAcceleratorAttributes
 -> UpdateAcceleratorAttributes -> Bool)
-> (UpdateAcceleratorAttributes
    -> UpdateAcceleratorAttributes -> Bool)
-> Eq UpdateAcceleratorAttributes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateAcceleratorAttributes -> UpdateAcceleratorAttributes -> Bool
$c/= :: UpdateAcceleratorAttributes -> UpdateAcceleratorAttributes -> Bool
== :: UpdateAcceleratorAttributes -> UpdateAcceleratorAttributes -> Bool
$c== :: UpdateAcceleratorAttributes -> UpdateAcceleratorAttributes -> Bool
Prelude.Eq, ReadPrec [UpdateAcceleratorAttributes]
ReadPrec UpdateAcceleratorAttributes
Int -> ReadS UpdateAcceleratorAttributes
ReadS [UpdateAcceleratorAttributes]
(Int -> ReadS UpdateAcceleratorAttributes)
-> ReadS [UpdateAcceleratorAttributes]
-> ReadPrec UpdateAcceleratorAttributes
-> ReadPrec [UpdateAcceleratorAttributes]
-> Read UpdateAcceleratorAttributes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateAcceleratorAttributes]
$creadListPrec :: ReadPrec [UpdateAcceleratorAttributes]
readPrec :: ReadPrec UpdateAcceleratorAttributes
$creadPrec :: ReadPrec UpdateAcceleratorAttributes
readList :: ReadS [UpdateAcceleratorAttributes]
$creadList :: ReadS [UpdateAcceleratorAttributes]
readsPrec :: Int -> ReadS UpdateAcceleratorAttributes
$creadsPrec :: Int -> ReadS UpdateAcceleratorAttributes
Prelude.Read, Int -> UpdateAcceleratorAttributes -> ShowS
[UpdateAcceleratorAttributes] -> ShowS
UpdateAcceleratorAttributes -> String
(Int -> UpdateAcceleratorAttributes -> ShowS)
-> (UpdateAcceleratorAttributes -> String)
-> ([UpdateAcceleratorAttributes] -> ShowS)
-> Show UpdateAcceleratorAttributes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateAcceleratorAttributes] -> ShowS
$cshowList :: [UpdateAcceleratorAttributes] -> ShowS
show :: UpdateAcceleratorAttributes -> String
$cshow :: UpdateAcceleratorAttributes -> String
showsPrec :: Int -> UpdateAcceleratorAttributes -> ShowS
$cshowsPrec :: Int -> UpdateAcceleratorAttributes -> ShowS
Prelude.Show, (forall x.
 UpdateAcceleratorAttributes -> Rep UpdateAcceleratorAttributes x)
-> (forall x.
    Rep UpdateAcceleratorAttributes x -> UpdateAcceleratorAttributes)
-> Generic UpdateAcceleratorAttributes
forall x.
Rep UpdateAcceleratorAttributes x -> UpdateAcceleratorAttributes
forall x.
UpdateAcceleratorAttributes -> Rep UpdateAcceleratorAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateAcceleratorAttributes x -> UpdateAcceleratorAttributes
$cfrom :: forall x.
UpdateAcceleratorAttributes -> Rep UpdateAcceleratorAttributes x
Prelude.Generic)

-- |
-- Create a value of 'UpdateAcceleratorAttributes' 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:
--
-- 'flowLogsS3Prefix', 'updateAcceleratorAttributes_flowLogsS3Prefix' - Update the prefix for the location in the Amazon S3 bucket for the flow
-- logs. Attribute is required if @FlowLogsEnabled@ is @true@.
--
-- If you don’t specify a prefix, the flow logs are stored in the root of
-- the bucket. If you specify slash (\/) for the S3 bucket prefix, the log
-- file bucket folder structure will include a double slash (\/\/), like
-- the following:
--
-- s3-bucket_name\/\/AWSLogs\/aws_account_id
--
-- 'flowLogsEnabled', 'updateAcceleratorAttributes_flowLogsEnabled' - Update whether flow logs are enabled. The default value is false. If the
-- value is true, @FlowLogsS3Bucket@ and @FlowLogsS3Prefix@ must be
-- specified.
--
-- For more information, see
-- <https://docs.aws.amazon.com/global-accelerator/latest/dg/monitoring-global-accelerator.flow-logs.html Flow Logs>
-- in the /AWS Global Accelerator Developer Guide/.
--
-- 'flowLogsS3Bucket', 'updateAcceleratorAttributes_flowLogsS3Bucket' - The name of the Amazon S3 bucket for the flow logs. Attribute is
-- required if @FlowLogsEnabled@ is @true@. The bucket must exist and have
-- a bucket policy that grants AWS Global Accelerator permission to write
-- to the bucket.
--
-- 'acceleratorArn', 'updateAcceleratorAttributes_acceleratorArn' - The Amazon Resource Name (ARN) of the accelerator that you want to
-- update.
newUpdateAcceleratorAttributes ::
  -- | 'acceleratorArn'
  Prelude.Text ->
  UpdateAcceleratorAttributes
newUpdateAcceleratorAttributes :: Text -> UpdateAcceleratorAttributes
newUpdateAcceleratorAttributes Text
pAcceleratorArn_ =
  UpdateAcceleratorAttributes' :: Maybe Text
-> Maybe Bool -> Maybe Text -> Text -> UpdateAcceleratorAttributes
UpdateAcceleratorAttributes'
    { $sel:flowLogsS3Prefix:UpdateAcceleratorAttributes' :: Maybe Text
flowLogsS3Prefix =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:flowLogsEnabled:UpdateAcceleratorAttributes' :: Maybe Bool
flowLogsEnabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:flowLogsS3Bucket:UpdateAcceleratorAttributes' :: Maybe Text
flowLogsS3Bucket = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:acceleratorArn:UpdateAcceleratorAttributes' :: Text
acceleratorArn = Text
pAcceleratorArn_
    }

-- | Update the prefix for the location in the Amazon S3 bucket for the flow
-- logs. Attribute is required if @FlowLogsEnabled@ is @true@.
--
-- If you don’t specify a prefix, the flow logs are stored in the root of
-- the bucket. If you specify slash (\/) for the S3 bucket prefix, the log
-- file bucket folder structure will include a double slash (\/\/), like
-- the following:
--
-- s3-bucket_name\/\/AWSLogs\/aws_account_id
updateAcceleratorAttributes_flowLogsS3Prefix :: Lens.Lens' UpdateAcceleratorAttributes (Prelude.Maybe Prelude.Text)
updateAcceleratorAttributes_flowLogsS3Prefix :: (Maybe Text -> f (Maybe Text))
-> UpdateAcceleratorAttributes -> f UpdateAcceleratorAttributes
updateAcceleratorAttributes_flowLogsS3Prefix = (UpdateAcceleratorAttributes -> Maybe Text)
-> (UpdateAcceleratorAttributes
    -> Maybe Text -> UpdateAcceleratorAttributes)
-> Lens
     UpdateAcceleratorAttributes
     UpdateAcceleratorAttributes
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAcceleratorAttributes' {Maybe Text
flowLogsS3Prefix :: Maybe Text
$sel:flowLogsS3Prefix:UpdateAcceleratorAttributes' :: UpdateAcceleratorAttributes -> Maybe Text
flowLogsS3Prefix} -> Maybe Text
flowLogsS3Prefix) (\s :: UpdateAcceleratorAttributes
s@UpdateAcceleratorAttributes' {} Maybe Text
a -> UpdateAcceleratorAttributes
s {$sel:flowLogsS3Prefix:UpdateAcceleratorAttributes' :: Maybe Text
flowLogsS3Prefix = Maybe Text
a} :: UpdateAcceleratorAttributes)

-- | Update whether flow logs are enabled. The default value is false. If the
-- value is true, @FlowLogsS3Bucket@ and @FlowLogsS3Prefix@ must be
-- specified.
--
-- For more information, see
-- <https://docs.aws.amazon.com/global-accelerator/latest/dg/monitoring-global-accelerator.flow-logs.html Flow Logs>
-- in the /AWS Global Accelerator Developer Guide/.
updateAcceleratorAttributes_flowLogsEnabled :: Lens.Lens' UpdateAcceleratorAttributes (Prelude.Maybe Prelude.Bool)
updateAcceleratorAttributes_flowLogsEnabled :: (Maybe Bool -> f (Maybe Bool))
-> UpdateAcceleratorAttributes -> f UpdateAcceleratorAttributes
updateAcceleratorAttributes_flowLogsEnabled = (UpdateAcceleratorAttributes -> Maybe Bool)
-> (UpdateAcceleratorAttributes
    -> Maybe Bool -> UpdateAcceleratorAttributes)
-> Lens
     UpdateAcceleratorAttributes
     UpdateAcceleratorAttributes
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAcceleratorAttributes' {Maybe Bool
flowLogsEnabled :: Maybe Bool
$sel:flowLogsEnabled:UpdateAcceleratorAttributes' :: UpdateAcceleratorAttributes -> Maybe Bool
flowLogsEnabled} -> Maybe Bool
flowLogsEnabled) (\s :: UpdateAcceleratorAttributes
s@UpdateAcceleratorAttributes' {} Maybe Bool
a -> UpdateAcceleratorAttributes
s {$sel:flowLogsEnabled:UpdateAcceleratorAttributes' :: Maybe Bool
flowLogsEnabled = Maybe Bool
a} :: UpdateAcceleratorAttributes)

-- | The name of the Amazon S3 bucket for the flow logs. Attribute is
-- required if @FlowLogsEnabled@ is @true@. The bucket must exist and have
-- a bucket policy that grants AWS Global Accelerator permission to write
-- to the bucket.
updateAcceleratorAttributes_flowLogsS3Bucket :: Lens.Lens' UpdateAcceleratorAttributes (Prelude.Maybe Prelude.Text)
updateAcceleratorAttributes_flowLogsS3Bucket :: (Maybe Text -> f (Maybe Text))
-> UpdateAcceleratorAttributes -> f UpdateAcceleratorAttributes
updateAcceleratorAttributes_flowLogsS3Bucket = (UpdateAcceleratorAttributes -> Maybe Text)
-> (UpdateAcceleratorAttributes
    -> Maybe Text -> UpdateAcceleratorAttributes)
-> Lens
     UpdateAcceleratorAttributes
     UpdateAcceleratorAttributes
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAcceleratorAttributes' {Maybe Text
flowLogsS3Bucket :: Maybe Text
$sel:flowLogsS3Bucket:UpdateAcceleratorAttributes' :: UpdateAcceleratorAttributes -> Maybe Text
flowLogsS3Bucket} -> Maybe Text
flowLogsS3Bucket) (\s :: UpdateAcceleratorAttributes
s@UpdateAcceleratorAttributes' {} Maybe Text
a -> UpdateAcceleratorAttributes
s {$sel:flowLogsS3Bucket:UpdateAcceleratorAttributes' :: Maybe Text
flowLogsS3Bucket = Maybe Text
a} :: UpdateAcceleratorAttributes)

-- | The Amazon Resource Name (ARN) of the accelerator that you want to
-- update.
updateAcceleratorAttributes_acceleratorArn :: Lens.Lens' UpdateAcceleratorAttributes Prelude.Text
updateAcceleratorAttributes_acceleratorArn :: (Text -> f Text)
-> UpdateAcceleratorAttributes -> f UpdateAcceleratorAttributes
updateAcceleratorAttributes_acceleratorArn = (UpdateAcceleratorAttributes -> Text)
-> (UpdateAcceleratorAttributes
    -> Text -> UpdateAcceleratorAttributes)
-> Lens
     UpdateAcceleratorAttributes UpdateAcceleratorAttributes Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAcceleratorAttributes' {Text
acceleratorArn :: Text
$sel:acceleratorArn:UpdateAcceleratorAttributes' :: UpdateAcceleratorAttributes -> Text
acceleratorArn} -> Text
acceleratorArn) (\s :: UpdateAcceleratorAttributes
s@UpdateAcceleratorAttributes' {} Text
a -> UpdateAcceleratorAttributes
s {$sel:acceleratorArn:UpdateAcceleratorAttributes' :: Text
acceleratorArn = Text
a} :: UpdateAcceleratorAttributes)

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

instance Prelude.NFData UpdateAcceleratorAttributes

instance Core.ToHeaders UpdateAcceleratorAttributes where
  toHeaders :: UpdateAcceleratorAttributes -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateAcceleratorAttributes -> 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
"GlobalAccelerator_V20180706.UpdateAcceleratorAttributes" ::
                          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 UpdateAcceleratorAttributes where
  toJSON :: UpdateAcceleratorAttributes -> Value
toJSON UpdateAcceleratorAttributes' {Maybe Bool
Maybe Text
Text
acceleratorArn :: Text
flowLogsS3Bucket :: Maybe Text
flowLogsEnabled :: Maybe Bool
flowLogsS3Prefix :: Maybe Text
$sel:acceleratorArn:UpdateAcceleratorAttributes' :: UpdateAcceleratorAttributes -> Text
$sel:flowLogsS3Bucket:UpdateAcceleratorAttributes' :: UpdateAcceleratorAttributes -> Maybe Text
$sel:flowLogsEnabled:UpdateAcceleratorAttributes' :: UpdateAcceleratorAttributes -> Maybe Bool
$sel:flowLogsS3Prefix:UpdateAcceleratorAttributes' :: UpdateAcceleratorAttributes -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"FlowLogsS3Prefix" 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
flowLogsS3Prefix,
            (Text
"FlowLogsEnabled" 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
flowLogsEnabled,
            (Text
"FlowLogsS3Bucket" 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
flowLogsS3Bucket,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"AcceleratorArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
acceleratorArn)
          ]
      )

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

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

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

-- |
-- Create a value of 'UpdateAcceleratorAttributesResponse' 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:
--
-- 'acceleratorAttributes', 'updateAcceleratorAttributesResponse_acceleratorAttributes' - Updated attributes for the accelerator.
--
-- 'httpStatus', 'updateAcceleratorAttributesResponse_httpStatus' - The response's http status code.
newUpdateAcceleratorAttributesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateAcceleratorAttributesResponse
newUpdateAcceleratorAttributesResponse :: Int -> UpdateAcceleratorAttributesResponse
newUpdateAcceleratorAttributesResponse Int
pHttpStatus_ =
  UpdateAcceleratorAttributesResponse' :: Maybe AcceleratorAttributes
-> Int -> UpdateAcceleratorAttributesResponse
UpdateAcceleratorAttributesResponse'
    { $sel:acceleratorAttributes:UpdateAcceleratorAttributesResponse' :: Maybe AcceleratorAttributes
acceleratorAttributes =
        Maybe AcceleratorAttributes
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateAcceleratorAttributesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Updated attributes for the accelerator.
updateAcceleratorAttributesResponse_acceleratorAttributes :: Lens.Lens' UpdateAcceleratorAttributesResponse (Prelude.Maybe AcceleratorAttributes)
updateAcceleratorAttributesResponse_acceleratorAttributes :: (Maybe AcceleratorAttributes -> f (Maybe AcceleratorAttributes))
-> UpdateAcceleratorAttributesResponse
-> f UpdateAcceleratorAttributesResponse
updateAcceleratorAttributesResponse_acceleratorAttributes = (UpdateAcceleratorAttributesResponse
 -> Maybe AcceleratorAttributes)
-> (UpdateAcceleratorAttributesResponse
    -> Maybe AcceleratorAttributes
    -> UpdateAcceleratorAttributesResponse)
-> Lens
     UpdateAcceleratorAttributesResponse
     UpdateAcceleratorAttributesResponse
     (Maybe AcceleratorAttributes)
     (Maybe AcceleratorAttributes)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateAcceleratorAttributesResponse' {Maybe AcceleratorAttributes
acceleratorAttributes :: Maybe AcceleratorAttributes
$sel:acceleratorAttributes:UpdateAcceleratorAttributesResponse' :: UpdateAcceleratorAttributesResponse -> Maybe AcceleratorAttributes
acceleratorAttributes} -> Maybe AcceleratorAttributes
acceleratorAttributes) (\s :: UpdateAcceleratorAttributesResponse
s@UpdateAcceleratorAttributesResponse' {} Maybe AcceleratorAttributes
a -> UpdateAcceleratorAttributesResponse
s {$sel:acceleratorAttributes:UpdateAcceleratorAttributesResponse' :: Maybe AcceleratorAttributes
acceleratorAttributes = Maybe AcceleratorAttributes
a} :: UpdateAcceleratorAttributesResponse)

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

instance
  Prelude.NFData
    UpdateAcceleratorAttributesResponse