{-# 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.Connect.AssociateInstanceStorageConfig
-- 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)
--
-- This API is in preview release for Amazon Connect and is subject to
-- change.
--
-- Associates a storage resource type for the first time. You can only
-- associate one type of storage configuration in a single call. This
-- means, for example, that you can\'t define an instance with multiple S3
-- buckets for storing chat transcripts.
--
-- This API does not create a resource that doesn\'t exist. It only
-- associates it to the instance. Ensure that the resource being specified
-- in the storage configuration, like an S3 bucket, exists when being used
-- for association.
module Amazonka.Connect.AssociateInstanceStorageConfig
  ( -- * Creating a Request
    AssociateInstanceStorageConfig (..),
    newAssociateInstanceStorageConfig,

    -- * Request Lenses
    associateInstanceStorageConfig_instanceId,
    associateInstanceStorageConfig_resourceType,
    associateInstanceStorageConfig_storageConfig,

    -- * Destructuring the Response
    AssociateInstanceStorageConfigResponse (..),
    newAssociateInstanceStorageConfigResponse,

    -- * Response Lenses
    associateInstanceStorageConfigResponse_associationId,
    associateInstanceStorageConfigResponse_httpStatus,
  )
where

import Amazonka.Connect.Types
import qualified Amazonka.Core as Core
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:/ 'newAssociateInstanceStorageConfig' smart constructor.
data AssociateInstanceStorageConfig = AssociateInstanceStorageConfig'
  { -- | The identifier of the Amazon Connect instance. You can find the
    -- instanceId in the ARN of the instance.
    AssociateInstanceStorageConfig -> Text
instanceId :: Prelude.Text,
    -- | A valid resource type.
    AssociateInstanceStorageConfig -> InstanceStorageResourceType
resourceType :: InstanceStorageResourceType,
    -- | A valid storage type.
    AssociateInstanceStorageConfig -> InstanceStorageConfig
storageConfig :: InstanceStorageConfig
  }
  deriving (AssociateInstanceStorageConfig
-> AssociateInstanceStorageConfig -> Bool
(AssociateInstanceStorageConfig
 -> AssociateInstanceStorageConfig -> Bool)
-> (AssociateInstanceStorageConfig
    -> AssociateInstanceStorageConfig -> Bool)
-> Eq AssociateInstanceStorageConfig
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssociateInstanceStorageConfig
-> AssociateInstanceStorageConfig -> Bool
$c/= :: AssociateInstanceStorageConfig
-> AssociateInstanceStorageConfig -> Bool
== :: AssociateInstanceStorageConfig
-> AssociateInstanceStorageConfig -> Bool
$c== :: AssociateInstanceStorageConfig
-> AssociateInstanceStorageConfig -> Bool
Prelude.Eq, ReadPrec [AssociateInstanceStorageConfig]
ReadPrec AssociateInstanceStorageConfig
Int -> ReadS AssociateInstanceStorageConfig
ReadS [AssociateInstanceStorageConfig]
(Int -> ReadS AssociateInstanceStorageConfig)
-> ReadS [AssociateInstanceStorageConfig]
-> ReadPrec AssociateInstanceStorageConfig
-> ReadPrec [AssociateInstanceStorageConfig]
-> Read AssociateInstanceStorageConfig
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssociateInstanceStorageConfig]
$creadListPrec :: ReadPrec [AssociateInstanceStorageConfig]
readPrec :: ReadPrec AssociateInstanceStorageConfig
$creadPrec :: ReadPrec AssociateInstanceStorageConfig
readList :: ReadS [AssociateInstanceStorageConfig]
$creadList :: ReadS [AssociateInstanceStorageConfig]
readsPrec :: Int -> ReadS AssociateInstanceStorageConfig
$creadsPrec :: Int -> ReadS AssociateInstanceStorageConfig
Prelude.Read, Int -> AssociateInstanceStorageConfig -> ShowS
[AssociateInstanceStorageConfig] -> ShowS
AssociateInstanceStorageConfig -> String
(Int -> AssociateInstanceStorageConfig -> ShowS)
-> (AssociateInstanceStorageConfig -> String)
-> ([AssociateInstanceStorageConfig] -> ShowS)
-> Show AssociateInstanceStorageConfig
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssociateInstanceStorageConfig] -> ShowS
$cshowList :: [AssociateInstanceStorageConfig] -> ShowS
show :: AssociateInstanceStorageConfig -> String
$cshow :: AssociateInstanceStorageConfig -> String
showsPrec :: Int -> AssociateInstanceStorageConfig -> ShowS
$cshowsPrec :: Int -> AssociateInstanceStorageConfig -> ShowS
Prelude.Show, (forall x.
 AssociateInstanceStorageConfig
 -> Rep AssociateInstanceStorageConfig x)
-> (forall x.
    Rep AssociateInstanceStorageConfig x
    -> AssociateInstanceStorageConfig)
-> Generic AssociateInstanceStorageConfig
forall x.
Rep AssociateInstanceStorageConfig x
-> AssociateInstanceStorageConfig
forall x.
AssociateInstanceStorageConfig
-> Rep AssociateInstanceStorageConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AssociateInstanceStorageConfig x
-> AssociateInstanceStorageConfig
$cfrom :: forall x.
AssociateInstanceStorageConfig
-> Rep AssociateInstanceStorageConfig x
Prelude.Generic)

-- |
-- Create a value of 'AssociateInstanceStorageConfig' 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', 'associateInstanceStorageConfig_instanceId' - The identifier of the Amazon Connect instance. You can find the
-- instanceId in the ARN of the instance.
--
-- 'resourceType', 'associateInstanceStorageConfig_resourceType' - A valid resource type.
--
-- 'storageConfig', 'associateInstanceStorageConfig_storageConfig' - A valid storage type.
newAssociateInstanceStorageConfig ::
  -- | 'instanceId'
  Prelude.Text ->
  -- | 'resourceType'
  InstanceStorageResourceType ->
  -- | 'storageConfig'
  InstanceStorageConfig ->
  AssociateInstanceStorageConfig
newAssociateInstanceStorageConfig :: Text
-> InstanceStorageResourceType
-> InstanceStorageConfig
-> AssociateInstanceStorageConfig
newAssociateInstanceStorageConfig
  Text
pInstanceId_
  InstanceStorageResourceType
pResourceType_
  InstanceStorageConfig
pStorageConfig_ =
    AssociateInstanceStorageConfig' :: Text
-> InstanceStorageResourceType
-> InstanceStorageConfig
-> AssociateInstanceStorageConfig
AssociateInstanceStorageConfig'
      { $sel:instanceId:AssociateInstanceStorageConfig' :: Text
instanceId =
          Text
pInstanceId_,
        $sel:resourceType:AssociateInstanceStorageConfig' :: InstanceStorageResourceType
resourceType = InstanceStorageResourceType
pResourceType_,
        $sel:storageConfig:AssociateInstanceStorageConfig' :: InstanceStorageConfig
storageConfig = InstanceStorageConfig
pStorageConfig_
      }

-- | The identifier of the Amazon Connect instance. You can find the
-- instanceId in the ARN of the instance.
associateInstanceStorageConfig_instanceId :: Lens.Lens' AssociateInstanceStorageConfig Prelude.Text
associateInstanceStorageConfig_instanceId :: (Text -> f Text)
-> AssociateInstanceStorageConfig
-> f AssociateInstanceStorageConfig
associateInstanceStorageConfig_instanceId = (AssociateInstanceStorageConfig -> Text)
-> (AssociateInstanceStorageConfig
    -> Text -> AssociateInstanceStorageConfig)
-> Lens
     AssociateInstanceStorageConfig
     AssociateInstanceStorageConfig
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateInstanceStorageConfig' {Text
instanceId :: Text
$sel:instanceId:AssociateInstanceStorageConfig' :: AssociateInstanceStorageConfig -> Text
instanceId} -> Text
instanceId) (\s :: AssociateInstanceStorageConfig
s@AssociateInstanceStorageConfig' {} Text
a -> AssociateInstanceStorageConfig
s {$sel:instanceId:AssociateInstanceStorageConfig' :: Text
instanceId = Text
a} :: AssociateInstanceStorageConfig)

-- | A valid resource type.
associateInstanceStorageConfig_resourceType :: Lens.Lens' AssociateInstanceStorageConfig InstanceStorageResourceType
associateInstanceStorageConfig_resourceType :: (InstanceStorageResourceType -> f InstanceStorageResourceType)
-> AssociateInstanceStorageConfig
-> f AssociateInstanceStorageConfig
associateInstanceStorageConfig_resourceType = (AssociateInstanceStorageConfig -> InstanceStorageResourceType)
-> (AssociateInstanceStorageConfig
    -> InstanceStorageResourceType -> AssociateInstanceStorageConfig)
-> Lens
     AssociateInstanceStorageConfig
     AssociateInstanceStorageConfig
     InstanceStorageResourceType
     InstanceStorageResourceType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateInstanceStorageConfig' {InstanceStorageResourceType
resourceType :: InstanceStorageResourceType
$sel:resourceType:AssociateInstanceStorageConfig' :: AssociateInstanceStorageConfig -> InstanceStorageResourceType
resourceType} -> InstanceStorageResourceType
resourceType) (\s :: AssociateInstanceStorageConfig
s@AssociateInstanceStorageConfig' {} InstanceStorageResourceType
a -> AssociateInstanceStorageConfig
s {$sel:resourceType:AssociateInstanceStorageConfig' :: InstanceStorageResourceType
resourceType = InstanceStorageResourceType
a} :: AssociateInstanceStorageConfig)

-- | A valid storage type.
associateInstanceStorageConfig_storageConfig :: Lens.Lens' AssociateInstanceStorageConfig InstanceStorageConfig
associateInstanceStorageConfig_storageConfig :: (InstanceStorageConfig -> f InstanceStorageConfig)
-> AssociateInstanceStorageConfig
-> f AssociateInstanceStorageConfig
associateInstanceStorageConfig_storageConfig = (AssociateInstanceStorageConfig -> InstanceStorageConfig)
-> (AssociateInstanceStorageConfig
    -> InstanceStorageConfig -> AssociateInstanceStorageConfig)
-> Lens
     AssociateInstanceStorageConfig
     AssociateInstanceStorageConfig
     InstanceStorageConfig
     InstanceStorageConfig
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateInstanceStorageConfig' {InstanceStorageConfig
storageConfig :: InstanceStorageConfig
$sel:storageConfig:AssociateInstanceStorageConfig' :: AssociateInstanceStorageConfig -> InstanceStorageConfig
storageConfig} -> InstanceStorageConfig
storageConfig) (\s :: AssociateInstanceStorageConfig
s@AssociateInstanceStorageConfig' {} InstanceStorageConfig
a -> AssociateInstanceStorageConfig
s {$sel:storageConfig:AssociateInstanceStorageConfig' :: InstanceStorageConfig
storageConfig = InstanceStorageConfig
a} :: AssociateInstanceStorageConfig)

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

instance
  Prelude.NFData
    AssociateInstanceStorageConfig

instance
  Core.ToHeaders
    AssociateInstanceStorageConfig
  where
  toHeaders :: AssociateInstanceStorageConfig -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> AssociateInstanceStorageConfig -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ 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 AssociateInstanceStorageConfig where
  toJSON :: AssociateInstanceStorageConfig -> Value
toJSON AssociateInstanceStorageConfig' {Text
InstanceStorageResourceType
InstanceStorageConfig
storageConfig :: InstanceStorageConfig
resourceType :: InstanceStorageResourceType
instanceId :: Text
$sel:storageConfig:AssociateInstanceStorageConfig' :: AssociateInstanceStorageConfig -> InstanceStorageConfig
$sel:resourceType:AssociateInstanceStorageConfig' :: AssociateInstanceStorageConfig -> InstanceStorageResourceType
$sel:instanceId:AssociateInstanceStorageConfig' :: AssociateInstanceStorageConfig -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ResourceType" Text -> InstanceStorageResourceType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= InstanceStorageResourceType
resourceType),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"StorageConfig" Text -> InstanceStorageConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= InstanceStorageConfig
storageConfig)
          ]
      )

instance Core.ToPath AssociateInstanceStorageConfig where
  toPath :: AssociateInstanceStorageConfig -> ByteString
toPath AssociateInstanceStorageConfig' {Text
InstanceStorageResourceType
InstanceStorageConfig
storageConfig :: InstanceStorageConfig
resourceType :: InstanceStorageResourceType
instanceId :: Text
$sel:storageConfig:AssociateInstanceStorageConfig' :: AssociateInstanceStorageConfig -> InstanceStorageConfig
$sel:resourceType:AssociateInstanceStorageConfig' :: AssociateInstanceStorageConfig -> InstanceStorageResourceType
$sel:instanceId:AssociateInstanceStorageConfig' :: AssociateInstanceStorageConfig -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/instance/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
instanceId,
        ByteString
"/storage-config"
      ]

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

-- | /See:/ 'newAssociateInstanceStorageConfigResponse' smart constructor.
data AssociateInstanceStorageConfigResponse = AssociateInstanceStorageConfigResponse'
  { -- | The existing association identifier that uniquely identifies the
    -- resource type and storage config for the given instance ID.
    AssociateInstanceStorageConfigResponse -> Maybe Text
associationId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    AssociateInstanceStorageConfigResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (AssociateInstanceStorageConfigResponse
-> AssociateInstanceStorageConfigResponse -> Bool
(AssociateInstanceStorageConfigResponse
 -> AssociateInstanceStorageConfigResponse -> Bool)
-> (AssociateInstanceStorageConfigResponse
    -> AssociateInstanceStorageConfigResponse -> Bool)
-> Eq AssociateInstanceStorageConfigResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssociateInstanceStorageConfigResponse
-> AssociateInstanceStorageConfigResponse -> Bool
$c/= :: AssociateInstanceStorageConfigResponse
-> AssociateInstanceStorageConfigResponse -> Bool
== :: AssociateInstanceStorageConfigResponse
-> AssociateInstanceStorageConfigResponse -> Bool
$c== :: AssociateInstanceStorageConfigResponse
-> AssociateInstanceStorageConfigResponse -> Bool
Prelude.Eq, ReadPrec [AssociateInstanceStorageConfigResponse]
ReadPrec AssociateInstanceStorageConfigResponse
Int -> ReadS AssociateInstanceStorageConfigResponse
ReadS [AssociateInstanceStorageConfigResponse]
(Int -> ReadS AssociateInstanceStorageConfigResponse)
-> ReadS [AssociateInstanceStorageConfigResponse]
-> ReadPrec AssociateInstanceStorageConfigResponse
-> ReadPrec [AssociateInstanceStorageConfigResponse]
-> Read AssociateInstanceStorageConfigResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssociateInstanceStorageConfigResponse]
$creadListPrec :: ReadPrec [AssociateInstanceStorageConfigResponse]
readPrec :: ReadPrec AssociateInstanceStorageConfigResponse
$creadPrec :: ReadPrec AssociateInstanceStorageConfigResponse
readList :: ReadS [AssociateInstanceStorageConfigResponse]
$creadList :: ReadS [AssociateInstanceStorageConfigResponse]
readsPrec :: Int -> ReadS AssociateInstanceStorageConfigResponse
$creadsPrec :: Int -> ReadS AssociateInstanceStorageConfigResponse
Prelude.Read, Int -> AssociateInstanceStorageConfigResponse -> ShowS
[AssociateInstanceStorageConfigResponse] -> ShowS
AssociateInstanceStorageConfigResponse -> String
(Int -> AssociateInstanceStorageConfigResponse -> ShowS)
-> (AssociateInstanceStorageConfigResponse -> String)
-> ([AssociateInstanceStorageConfigResponse] -> ShowS)
-> Show AssociateInstanceStorageConfigResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssociateInstanceStorageConfigResponse] -> ShowS
$cshowList :: [AssociateInstanceStorageConfigResponse] -> ShowS
show :: AssociateInstanceStorageConfigResponse -> String
$cshow :: AssociateInstanceStorageConfigResponse -> String
showsPrec :: Int -> AssociateInstanceStorageConfigResponse -> ShowS
$cshowsPrec :: Int -> AssociateInstanceStorageConfigResponse -> ShowS
Prelude.Show, (forall x.
 AssociateInstanceStorageConfigResponse
 -> Rep AssociateInstanceStorageConfigResponse x)
-> (forall x.
    Rep AssociateInstanceStorageConfigResponse x
    -> AssociateInstanceStorageConfigResponse)
-> Generic AssociateInstanceStorageConfigResponse
forall x.
Rep AssociateInstanceStorageConfigResponse x
-> AssociateInstanceStorageConfigResponse
forall x.
AssociateInstanceStorageConfigResponse
-> Rep AssociateInstanceStorageConfigResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AssociateInstanceStorageConfigResponse x
-> AssociateInstanceStorageConfigResponse
$cfrom :: forall x.
AssociateInstanceStorageConfigResponse
-> Rep AssociateInstanceStorageConfigResponse x
Prelude.Generic)

-- |
-- Create a value of 'AssociateInstanceStorageConfigResponse' 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:
--
-- 'associationId', 'associateInstanceStorageConfigResponse_associationId' - The existing association identifier that uniquely identifies the
-- resource type and storage config for the given instance ID.
--
-- 'httpStatus', 'associateInstanceStorageConfigResponse_httpStatus' - The response's http status code.
newAssociateInstanceStorageConfigResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  AssociateInstanceStorageConfigResponse
newAssociateInstanceStorageConfigResponse :: Int -> AssociateInstanceStorageConfigResponse
newAssociateInstanceStorageConfigResponse
  Int
pHttpStatus_ =
    AssociateInstanceStorageConfigResponse' :: Maybe Text -> Int -> AssociateInstanceStorageConfigResponse
AssociateInstanceStorageConfigResponse'
      { $sel:associationId:AssociateInstanceStorageConfigResponse' :: Maybe Text
associationId =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:AssociateInstanceStorageConfigResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | The existing association identifier that uniquely identifies the
-- resource type and storage config for the given instance ID.
associateInstanceStorageConfigResponse_associationId :: Lens.Lens' AssociateInstanceStorageConfigResponse (Prelude.Maybe Prelude.Text)
associateInstanceStorageConfigResponse_associationId :: (Maybe Text -> f (Maybe Text))
-> AssociateInstanceStorageConfigResponse
-> f AssociateInstanceStorageConfigResponse
associateInstanceStorageConfigResponse_associationId = (AssociateInstanceStorageConfigResponse -> Maybe Text)
-> (AssociateInstanceStorageConfigResponse
    -> Maybe Text -> AssociateInstanceStorageConfigResponse)
-> Lens
     AssociateInstanceStorageConfigResponse
     AssociateInstanceStorageConfigResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateInstanceStorageConfigResponse' {Maybe Text
associationId :: Maybe Text
$sel:associationId:AssociateInstanceStorageConfigResponse' :: AssociateInstanceStorageConfigResponse -> Maybe Text
associationId} -> Maybe Text
associationId) (\s :: AssociateInstanceStorageConfigResponse
s@AssociateInstanceStorageConfigResponse' {} Maybe Text
a -> AssociateInstanceStorageConfigResponse
s {$sel:associationId:AssociateInstanceStorageConfigResponse' :: Maybe Text
associationId = Maybe Text
a} :: AssociateInstanceStorageConfigResponse)

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

instance
  Prelude.NFData
    AssociateInstanceStorageConfigResponse