{-# 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.MigrationHub.PutResourceAttributes
-- 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)
--
-- Provides identifying details of the resource being migrated so that it
-- can be associated in the Application Discovery Service repository. This
-- association occurs asynchronously after @PutResourceAttributes@ returns.
--
-- -   Keep in mind that subsequent calls to PutResourceAttributes will
--     override previously stored attributes. For example, if it is first
--     called with a MAC address, but later, it is desired to /add/ an IP
--     address, it will then be required to call it with /both/ the IP and
--     MAC addresses to prevent overriding the MAC address.
--
-- -   Note the instructions regarding the special use case of the
--     <https://docs.aws.amazon.com/migrationhub/latest/ug/API_PutResourceAttributes.html#migrationhub-PutResourceAttributes-request-ResourceAttributeList ResourceAttributeList>
--     parameter when specifying any \"VM\" related value.
--
-- Because this is an asynchronous call, it will always return 200, whether
-- an association occurs or not. To confirm if an association was found
-- based on the provided details, call @ListDiscoveredResources@.
module Amazonka.MigrationHub.PutResourceAttributes
  ( -- * Creating a Request
    PutResourceAttributes (..),
    newPutResourceAttributes,

    -- * Request Lenses
    putResourceAttributes_dryRun,
    putResourceAttributes_progressUpdateStream,
    putResourceAttributes_migrationTaskName,
    putResourceAttributes_resourceAttributeList,

    -- * Destructuring the Response
    PutResourceAttributesResponse (..),
    newPutResourceAttributesResponse,

    -- * Response Lenses
    putResourceAttributesResponse_httpStatus,
  )
where

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

-- | /See:/ 'newPutResourceAttributes' smart constructor.
data PutResourceAttributes = PutResourceAttributes'
  { -- | Optional boolean flag to indicate whether any effect should take place.
    -- Used to test if the caller has permission to make the call.
    PutResourceAttributes -> Maybe Bool
dryRun :: Prelude.Maybe Prelude.Bool,
    -- | The name of the ProgressUpdateStream.
    PutResourceAttributes -> Text
progressUpdateStream :: Prelude.Text,
    -- | Unique identifier that references the migration task. /Do not store
    -- personal data in this field./
    PutResourceAttributes -> Text
migrationTaskName :: Prelude.Text,
    -- | Information about the resource that is being migrated. This data will be
    -- used to map the task to a resource in the Application Discovery Service
    -- repository.
    --
    -- Takes the object array of @ResourceAttribute@ where the @Type@ field is
    -- reserved for the following values:
    -- @IPV4_ADDRESS | IPV6_ADDRESS | MAC_ADDRESS | FQDN | VM_MANAGER_ID | VM_MANAGED_OBJECT_REFERENCE | VM_NAME | VM_PATH | BIOS_ID | MOTHERBOARD_SERIAL_NUMBER@
    -- where the identifying value can be a string up to 256 characters.
    --
    -- -   If any \"VM\" related value is set for a @ResourceAttribute@ object,
    --     it is required that @VM_MANAGER_ID@, as a minimum, is always set. If
    --     @VM_MANAGER_ID@ is not set, then all \"VM\" fields will be discarded
    --     and \"VM\" fields will not be used for matching the migration task
    --     to a server in Application Discovery Service repository. See the
    --     <https://docs.aws.amazon.com/migrationhub/latest/ug/API_PutResourceAttributes.html#API_PutResourceAttributes_Examples Example>
    --     section below for a use case of specifying \"VM\" related values.
    --
    -- -   If a server you are trying to match has multiple IP or MAC
    --     addresses, you should provide as many as you know in separate
    --     type\/value pairs passed to the @ResourceAttributeList@ parameter to
    --     maximize the chances of matching.
    PutResourceAttributes -> NonEmpty ResourceAttribute
resourceAttributeList :: Prelude.NonEmpty ResourceAttribute
  }
  deriving (PutResourceAttributes -> PutResourceAttributes -> Bool
(PutResourceAttributes -> PutResourceAttributes -> Bool)
-> (PutResourceAttributes -> PutResourceAttributes -> Bool)
-> Eq PutResourceAttributes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PutResourceAttributes -> PutResourceAttributes -> Bool
$c/= :: PutResourceAttributes -> PutResourceAttributes -> Bool
== :: PutResourceAttributes -> PutResourceAttributes -> Bool
$c== :: PutResourceAttributes -> PutResourceAttributes -> Bool
Prelude.Eq, ReadPrec [PutResourceAttributes]
ReadPrec PutResourceAttributes
Int -> ReadS PutResourceAttributes
ReadS [PutResourceAttributes]
(Int -> ReadS PutResourceAttributes)
-> ReadS [PutResourceAttributes]
-> ReadPrec PutResourceAttributes
-> ReadPrec [PutResourceAttributes]
-> Read PutResourceAttributes
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PutResourceAttributes]
$creadListPrec :: ReadPrec [PutResourceAttributes]
readPrec :: ReadPrec PutResourceAttributes
$creadPrec :: ReadPrec PutResourceAttributes
readList :: ReadS [PutResourceAttributes]
$creadList :: ReadS [PutResourceAttributes]
readsPrec :: Int -> ReadS PutResourceAttributes
$creadsPrec :: Int -> ReadS PutResourceAttributes
Prelude.Read, Int -> PutResourceAttributes -> ShowS
[PutResourceAttributes] -> ShowS
PutResourceAttributes -> String
(Int -> PutResourceAttributes -> ShowS)
-> (PutResourceAttributes -> String)
-> ([PutResourceAttributes] -> ShowS)
-> Show PutResourceAttributes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PutResourceAttributes] -> ShowS
$cshowList :: [PutResourceAttributes] -> ShowS
show :: PutResourceAttributes -> String
$cshow :: PutResourceAttributes -> String
showsPrec :: Int -> PutResourceAttributes -> ShowS
$cshowsPrec :: Int -> PutResourceAttributes -> ShowS
Prelude.Show, (forall x. PutResourceAttributes -> Rep PutResourceAttributes x)
-> (forall x. Rep PutResourceAttributes x -> PutResourceAttributes)
-> Generic PutResourceAttributes
forall x. Rep PutResourceAttributes x -> PutResourceAttributes
forall x. PutResourceAttributes -> Rep PutResourceAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PutResourceAttributes x -> PutResourceAttributes
$cfrom :: forall x. PutResourceAttributes -> Rep PutResourceAttributes x
Prelude.Generic)

-- |
-- Create a value of 'PutResourceAttributes' 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:
--
-- 'dryRun', 'putResourceAttributes_dryRun' - Optional boolean flag to indicate whether any effect should take place.
-- Used to test if the caller has permission to make the call.
--
-- 'progressUpdateStream', 'putResourceAttributes_progressUpdateStream' - The name of the ProgressUpdateStream.
--
-- 'migrationTaskName', 'putResourceAttributes_migrationTaskName' - Unique identifier that references the migration task. /Do not store
-- personal data in this field./
--
-- 'resourceAttributeList', 'putResourceAttributes_resourceAttributeList' - Information about the resource that is being migrated. This data will be
-- used to map the task to a resource in the Application Discovery Service
-- repository.
--
-- Takes the object array of @ResourceAttribute@ where the @Type@ field is
-- reserved for the following values:
-- @IPV4_ADDRESS | IPV6_ADDRESS | MAC_ADDRESS | FQDN | VM_MANAGER_ID | VM_MANAGED_OBJECT_REFERENCE | VM_NAME | VM_PATH | BIOS_ID | MOTHERBOARD_SERIAL_NUMBER@
-- where the identifying value can be a string up to 256 characters.
--
-- -   If any \"VM\" related value is set for a @ResourceAttribute@ object,
--     it is required that @VM_MANAGER_ID@, as a minimum, is always set. If
--     @VM_MANAGER_ID@ is not set, then all \"VM\" fields will be discarded
--     and \"VM\" fields will not be used for matching the migration task
--     to a server in Application Discovery Service repository. See the
--     <https://docs.aws.amazon.com/migrationhub/latest/ug/API_PutResourceAttributes.html#API_PutResourceAttributes_Examples Example>
--     section below for a use case of specifying \"VM\" related values.
--
-- -   If a server you are trying to match has multiple IP or MAC
--     addresses, you should provide as many as you know in separate
--     type\/value pairs passed to the @ResourceAttributeList@ parameter to
--     maximize the chances of matching.
newPutResourceAttributes ::
  -- | 'progressUpdateStream'
  Prelude.Text ->
  -- | 'migrationTaskName'
  Prelude.Text ->
  -- | 'resourceAttributeList'
  Prelude.NonEmpty ResourceAttribute ->
  PutResourceAttributes
newPutResourceAttributes :: Text -> Text -> NonEmpty ResourceAttribute -> PutResourceAttributes
newPutResourceAttributes
  Text
pProgressUpdateStream_
  Text
pMigrationTaskName_
  NonEmpty ResourceAttribute
pResourceAttributeList_ =
    PutResourceAttributes' :: Maybe Bool
-> Text
-> Text
-> NonEmpty ResourceAttribute
-> PutResourceAttributes
PutResourceAttributes'
      { $sel:dryRun:PutResourceAttributes' :: Maybe Bool
dryRun = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
        $sel:progressUpdateStream:PutResourceAttributes' :: Text
progressUpdateStream = Text
pProgressUpdateStream_,
        $sel:migrationTaskName:PutResourceAttributes' :: Text
migrationTaskName = Text
pMigrationTaskName_,
        $sel:resourceAttributeList:PutResourceAttributes' :: NonEmpty ResourceAttribute
resourceAttributeList =
          Tagged
  (NonEmpty ResourceAttribute)
  (Identity (NonEmpty ResourceAttribute))
-> Tagged
     (NonEmpty ResourceAttribute)
     (Identity (NonEmpty ResourceAttribute))
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced (Tagged
   (NonEmpty ResourceAttribute)
   (Identity (NonEmpty ResourceAttribute))
 -> Tagged
      (NonEmpty ResourceAttribute)
      (Identity (NonEmpty ResourceAttribute)))
-> NonEmpty ResourceAttribute -> NonEmpty ResourceAttribute
forall t b. AReview t b -> b -> t
Lens.# NonEmpty ResourceAttribute
pResourceAttributeList_
      }

-- | Optional boolean flag to indicate whether any effect should take place.
-- Used to test if the caller has permission to make the call.
putResourceAttributes_dryRun :: Lens.Lens' PutResourceAttributes (Prelude.Maybe Prelude.Bool)
putResourceAttributes_dryRun :: (Maybe Bool -> f (Maybe Bool))
-> PutResourceAttributes -> f PutResourceAttributes
putResourceAttributes_dryRun = (PutResourceAttributes -> Maybe Bool)
-> (PutResourceAttributes -> Maybe Bool -> PutResourceAttributes)
-> Lens
     PutResourceAttributes
     PutResourceAttributes
     (Maybe Bool)
     (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutResourceAttributes' {Maybe Bool
dryRun :: Maybe Bool
$sel:dryRun:PutResourceAttributes' :: PutResourceAttributes -> Maybe Bool
dryRun} -> Maybe Bool
dryRun) (\s :: PutResourceAttributes
s@PutResourceAttributes' {} Maybe Bool
a -> PutResourceAttributes
s {$sel:dryRun:PutResourceAttributes' :: Maybe Bool
dryRun = Maybe Bool
a} :: PutResourceAttributes)

-- | The name of the ProgressUpdateStream.
putResourceAttributes_progressUpdateStream :: Lens.Lens' PutResourceAttributes Prelude.Text
putResourceAttributes_progressUpdateStream :: (Text -> f Text)
-> PutResourceAttributes -> f PutResourceAttributes
putResourceAttributes_progressUpdateStream = (PutResourceAttributes -> Text)
-> (PutResourceAttributes -> Text -> PutResourceAttributes)
-> Lens PutResourceAttributes PutResourceAttributes Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutResourceAttributes' {Text
progressUpdateStream :: Text
$sel:progressUpdateStream:PutResourceAttributes' :: PutResourceAttributes -> Text
progressUpdateStream} -> Text
progressUpdateStream) (\s :: PutResourceAttributes
s@PutResourceAttributes' {} Text
a -> PutResourceAttributes
s {$sel:progressUpdateStream:PutResourceAttributes' :: Text
progressUpdateStream = Text
a} :: PutResourceAttributes)

-- | Unique identifier that references the migration task. /Do not store
-- personal data in this field./
putResourceAttributes_migrationTaskName :: Lens.Lens' PutResourceAttributes Prelude.Text
putResourceAttributes_migrationTaskName :: (Text -> f Text)
-> PutResourceAttributes -> f PutResourceAttributes
putResourceAttributes_migrationTaskName = (PutResourceAttributes -> Text)
-> (PutResourceAttributes -> Text -> PutResourceAttributes)
-> Lens PutResourceAttributes PutResourceAttributes Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutResourceAttributes' {Text
migrationTaskName :: Text
$sel:migrationTaskName:PutResourceAttributes' :: PutResourceAttributes -> Text
migrationTaskName} -> Text
migrationTaskName) (\s :: PutResourceAttributes
s@PutResourceAttributes' {} Text
a -> PutResourceAttributes
s {$sel:migrationTaskName:PutResourceAttributes' :: Text
migrationTaskName = Text
a} :: PutResourceAttributes)

-- | Information about the resource that is being migrated. This data will be
-- used to map the task to a resource in the Application Discovery Service
-- repository.
--
-- Takes the object array of @ResourceAttribute@ where the @Type@ field is
-- reserved for the following values:
-- @IPV4_ADDRESS | IPV6_ADDRESS | MAC_ADDRESS | FQDN | VM_MANAGER_ID | VM_MANAGED_OBJECT_REFERENCE | VM_NAME | VM_PATH | BIOS_ID | MOTHERBOARD_SERIAL_NUMBER@
-- where the identifying value can be a string up to 256 characters.
--
-- -   If any \"VM\" related value is set for a @ResourceAttribute@ object,
--     it is required that @VM_MANAGER_ID@, as a minimum, is always set. If
--     @VM_MANAGER_ID@ is not set, then all \"VM\" fields will be discarded
--     and \"VM\" fields will not be used for matching the migration task
--     to a server in Application Discovery Service repository. See the
--     <https://docs.aws.amazon.com/migrationhub/latest/ug/API_PutResourceAttributes.html#API_PutResourceAttributes_Examples Example>
--     section below for a use case of specifying \"VM\" related values.
--
-- -   If a server you are trying to match has multiple IP or MAC
--     addresses, you should provide as many as you know in separate
--     type\/value pairs passed to the @ResourceAttributeList@ parameter to
--     maximize the chances of matching.
putResourceAttributes_resourceAttributeList :: Lens.Lens' PutResourceAttributes (Prelude.NonEmpty ResourceAttribute)
putResourceAttributes_resourceAttributeList :: (NonEmpty ResourceAttribute -> f (NonEmpty ResourceAttribute))
-> PutResourceAttributes -> f PutResourceAttributes
putResourceAttributes_resourceAttributeList = (PutResourceAttributes -> NonEmpty ResourceAttribute)
-> (PutResourceAttributes
    -> NonEmpty ResourceAttribute -> PutResourceAttributes)
-> Lens
     PutResourceAttributes
     PutResourceAttributes
     (NonEmpty ResourceAttribute)
     (NonEmpty ResourceAttribute)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PutResourceAttributes' {NonEmpty ResourceAttribute
resourceAttributeList :: NonEmpty ResourceAttribute
$sel:resourceAttributeList:PutResourceAttributes' :: PutResourceAttributes -> NonEmpty ResourceAttribute
resourceAttributeList} -> NonEmpty ResourceAttribute
resourceAttributeList) (\s :: PutResourceAttributes
s@PutResourceAttributes' {} NonEmpty ResourceAttribute
a -> PutResourceAttributes
s {$sel:resourceAttributeList:PutResourceAttributes' :: NonEmpty ResourceAttribute
resourceAttributeList = NonEmpty ResourceAttribute
a} :: PutResourceAttributes) ((NonEmpty ResourceAttribute -> f (NonEmpty ResourceAttribute))
 -> PutResourceAttributes -> f PutResourceAttributes)
-> ((NonEmpty ResourceAttribute -> f (NonEmpty ResourceAttribute))
    -> NonEmpty ResourceAttribute -> f (NonEmpty ResourceAttribute))
-> (NonEmpty ResourceAttribute -> f (NonEmpty ResourceAttribute))
-> PutResourceAttributes
-> f PutResourceAttributes
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (NonEmpty ResourceAttribute -> f (NonEmpty ResourceAttribute))
-> NonEmpty ResourceAttribute -> f (NonEmpty ResourceAttribute)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData PutResourceAttributes

instance Core.ToHeaders PutResourceAttributes where
  toHeaders :: PutResourceAttributes -> ResponseHeaders
toHeaders =
    ResponseHeaders -> PutResourceAttributes -> 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
"AWSMigrationHub.PutResourceAttributes" ::
                          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 PutResourceAttributes where
  toJSON :: PutResourceAttributes -> Value
toJSON PutResourceAttributes' {Maybe Bool
NonEmpty ResourceAttribute
Text
resourceAttributeList :: NonEmpty ResourceAttribute
migrationTaskName :: Text
progressUpdateStream :: Text
dryRun :: Maybe Bool
$sel:resourceAttributeList:PutResourceAttributes' :: PutResourceAttributes -> NonEmpty ResourceAttribute
$sel:migrationTaskName:PutResourceAttributes' :: PutResourceAttributes -> Text
$sel:progressUpdateStream:PutResourceAttributes' :: PutResourceAttributes -> Text
$sel:dryRun:PutResourceAttributes' :: PutResourceAttributes -> Maybe Bool
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"DryRun" 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
dryRun,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"ProgressUpdateStream"
                  Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
progressUpdateStream
              ),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"MigrationTaskName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
migrationTaskName),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"ResourceAttributeList"
                  Text -> NonEmpty ResourceAttribute -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= NonEmpty ResourceAttribute
resourceAttributeList
              )
          ]
      )

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

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

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

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

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

instance Prelude.NFData PutResourceAttributesResponse