{-# 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.Lightsail.CreateDisk
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates a block storage disk that can be attached to an Amazon Lightsail
-- instance in the same Availability Zone (e.g., @us-east-2a@).
--
-- The @create disk@ operation supports tag-based access control via
-- request tags. For more information, see the
-- <https://lightsail.aws.amazon.com/ls/docs/en_us/articles/amazon-lightsail-controlling-access-using-tags Amazon Lightsail Developer Guide>.
module Amazonka.Lightsail.CreateDisk
  ( -- * Creating a Request
    CreateDisk (..),
    newCreateDisk,

    -- * Request Lenses
    createDisk_addOns,
    createDisk_tags,
    createDisk_diskName,
    createDisk_availabilityZone,
    createDisk_sizeInGb,

    -- * Destructuring the Response
    CreateDiskResponse (..),
    newCreateDiskResponse,

    -- * Response Lenses
    createDiskResponse_operations,
    createDiskResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Lightsail.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newCreateDisk' smart constructor.
data CreateDisk = CreateDisk'
  { -- | An array of objects that represent the add-ons to enable for the new
    -- disk.
    CreateDisk -> Maybe [AddOnRequest]
addOns :: Prelude.Maybe [AddOnRequest],
    -- | The tag keys and optional values to add to the resource during create.
    --
    -- Use the @TagResource@ action to tag a resource after it\'s created.
    CreateDisk -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
    -- | The unique Lightsail disk name (e.g., @my-disk@).
    CreateDisk -> Text
diskName :: Prelude.Text,
    -- | The Availability Zone where you want to create the disk (e.g.,
    -- @us-east-2a@). Use the same Availability Zone as the Lightsail instance
    -- to which you want to attach the disk.
    --
    -- Use the @get regions@ operation to list the Availability Zones where
    -- Lightsail is currently available.
    CreateDisk -> Text
availabilityZone :: Prelude.Text,
    -- | The size of the disk in GB (e.g., @32@).
    CreateDisk -> Int
sizeInGb :: Prelude.Int
  }
  deriving (CreateDisk -> CreateDisk -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateDisk -> CreateDisk -> Bool
$c/= :: CreateDisk -> CreateDisk -> Bool
== :: CreateDisk -> CreateDisk -> Bool
$c== :: CreateDisk -> CreateDisk -> Bool
Prelude.Eq, ReadPrec [CreateDisk]
ReadPrec CreateDisk
Int -> ReadS CreateDisk
ReadS [CreateDisk]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateDisk]
$creadListPrec :: ReadPrec [CreateDisk]
readPrec :: ReadPrec CreateDisk
$creadPrec :: ReadPrec CreateDisk
readList :: ReadS [CreateDisk]
$creadList :: ReadS [CreateDisk]
readsPrec :: Int -> ReadS CreateDisk
$creadsPrec :: Int -> ReadS CreateDisk
Prelude.Read, Int -> CreateDisk -> ShowS
[CreateDisk] -> ShowS
CreateDisk -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateDisk] -> ShowS
$cshowList :: [CreateDisk] -> ShowS
show :: CreateDisk -> String
$cshow :: CreateDisk -> String
showsPrec :: Int -> CreateDisk -> ShowS
$cshowsPrec :: Int -> CreateDisk -> ShowS
Prelude.Show, forall x. Rep CreateDisk x -> CreateDisk
forall x. CreateDisk -> Rep CreateDisk x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateDisk x -> CreateDisk
$cfrom :: forall x. CreateDisk -> Rep CreateDisk x
Prelude.Generic)

-- |
-- Create a value of 'CreateDisk' 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:
--
-- 'addOns', 'createDisk_addOns' - An array of objects that represent the add-ons to enable for the new
-- disk.
--
-- 'tags', 'createDisk_tags' - The tag keys and optional values to add to the resource during create.
--
-- Use the @TagResource@ action to tag a resource after it\'s created.
--
-- 'diskName', 'createDisk_diskName' - The unique Lightsail disk name (e.g., @my-disk@).
--
-- 'availabilityZone', 'createDisk_availabilityZone' - The Availability Zone where you want to create the disk (e.g.,
-- @us-east-2a@). Use the same Availability Zone as the Lightsail instance
-- to which you want to attach the disk.
--
-- Use the @get regions@ operation to list the Availability Zones where
-- Lightsail is currently available.
--
-- 'sizeInGb', 'createDisk_sizeInGb' - The size of the disk in GB (e.g., @32@).
newCreateDisk ::
  -- | 'diskName'
  Prelude.Text ->
  -- | 'availabilityZone'
  Prelude.Text ->
  -- | 'sizeInGb'
  Prelude.Int ->
  CreateDisk
newCreateDisk :: Text -> Text -> Int -> CreateDisk
newCreateDisk
  Text
pDiskName_
  Text
pAvailabilityZone_
  Int
pSizeInGb_ =
    CreateDisk'
      { $sel:addOns:CreateDisk' :: Maybe [AddOnRequest]
addOns = forall a. Maybe a
Prelude.Nothing,
        $sel:tags:CreateDisk' :: Maybe [Tag]
tags = forall a. Maybe a
Prelude.Nothing,
        $sel:diskName:CreateDisk' :: Text
diskName = Text
pDiskName_,
        $sel:availabilityZone:CreateDisk' :: Text
availabilityZone = Text
pAvailabilityZone_,
        $sel:sizeInGb:CreateDisk' :: Int
sizeInGb = Int
pSizeInGb_
      }

-- | An array of objects that represent the add-ons to enable for the new
-- disk.
createDisk_addOns :: Lens.Lens' CreateDisk (Prelude.Maybe [AddOnRequest])
createDisk_addOns :: Lens' CreateDisk (Maybe [AddOnRequest])
createDisk_addOns = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDisk' {Maybe [AddOnRequest]
addOns :: Maybe [AddOnRequest]
$sel:addOns:CreateDisk' :: CreateDisk -> Maybe [AddOnRequest]
addOns} -> Maybe [AddOnRequest]
addOns) (\s :: CreateDisk
s@CreateDisk' {} Maybe [AddOnRequest]
a -> CreateDisk
s {$sel:addOns:CreateDisk' :: Maybe [AddOnRequest]
addOns = Maybe [AddOnRequest]
a} :: CreateDisk) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The tag keys and optional values to add to the resource during create.
--
-- Use the @TagResource@ action to tag a resource after it\'s created.
createDisk_tags :: Lens.Lens' CreateDisk (Prelude.Maybe [Tag])
createDisk_tags :: Lens' CreateDisk (Maybe [Tag])
createDisk_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDisk' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateDisk' :: CreateDisk -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateDisk
s@CreateDisk' {} Maybe [Tag]
a -> CreateDisk
s {$sel:tags:CreateDisk' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateDisk) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The unique Lightsail disk name (e.g., @my-disk@).
createDisk_diskName :: Lens.Lens' CreateDisk Prelude.Text
createDisk_diskName :: Lens' CreateDisk Text
createDisk_diskName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDisk' {Text
diskName :: Text
$sel:diskName:CreateDisk' :: CreateDisk -> Text
diskName} -> Text
diskName) (\s :: CreateDisk
s@CreateDisk' {} Text
a -> CreateDisk
s {$sel:diskName:CreateDisk' :: Text
diskName = Text
a} :: CreateDisk)

-- | The Availability Zone where you want to create the disk (e.g.,
-- @us-east-2a@). Use the same Availability Zone as the Lightsail instance
-- to which you want to attach the disk.
--
-- Use the @get regions@ operation to list the Availability Zones where
-- Lightsail is currently available.
createDisk_availabilityZone :: Lens.Lens' CreateDisk Prelude.Text
createDisk_availabilityZone :: Lens' CreateDisk Text
createDisk_availabilityZone = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDisk' {Text
availabilityZone :: Text
$sel:availabilityZone:CreateDisk' :: CreateDisk -> Text
availabilityZone} -> Text
availabilityZone) (\s :: CreateDisk
s@CreateDisk' {} Text
a -> CreateDisk
s {$sel:availabilityZone:CreateDisk' :: Text
availabilityZone = Text
a} :: CreateDisk)

-- | The size of the disk in GB (e.g., @32@).
createDisk_sizeInGb :: Lens.Lens' CreateDisk Prelude.Int
createDisk_sizeInGb :: Lens' CreateDisk Int
createDisk_sizeInGb = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDisk' {Int
sizeInGb :: Int
$sel:sizeInGb:CreateDisk' :: CreateDisk -> Int
sizeInGb} -> Int
sizeInGb) (\s :: CreateDisk
s@CreateDisk' {} Int
a -> CreateDisk
s {$sel:sizeInGb:CreateDisk' :: Int
sizeInGb = Int
a} :: CreateDisk)

instance Core.AWSRequest CreateDisk where
  type AWSResponse CreateDisk = CreateDiskResponse
  request :: (Service -> Service) -> CreateDisk -> Request CreateDisk
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateDisk
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateDisk)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe [Operation] -> Int -> CreateDiskResponse
CreateDiskResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"operations" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable CreateDisk where
  hashWithSalt :: Int -> CreateDisk -> Int
hashWithSalt Int
_salt CreateDisk' {Int
Maybe [AddOnRequest]
Maybe [Tag]
Text
sizeInGb :: Int
availabilityZone :: Text
diskName :: Text
tags :: Maybe [Tag]
addOns :: Maybe [AddOnRequest]
$sel:sizeInGb:CreateDisk' :: CreateDisk -> Int
$sel:availabilityZone:CreateDisk' :: CreateDisk -> Text
$sel:diskName:CreateDisk' :: CreateDisk -> Text
$sel:tags:CreateDisk' :: CreateDisk -> Maybe [Tag]
$sel:addOns:CreateDisk' :: CreateDisk -> Maybe [AddOnRequest]
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [AddOnRequest]
addOns
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Tag]
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
diskName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
availabilityZone
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Int
sizeInGb

instance Prelude.NFData CreateDisk where
  rnf :: CreateDisk -> ()
rnf CreateDisk' {Int
Maybe [AddOnRequest]
Maybe [Tag]
Text
sizeInGb :: Int
availabilityZone :: Text
diskName :: Text
tags :: Maybe [Tag]
addOns :: Maybe [AddOnRequest]
$sel:sizeInGb:CreateDisk' :: CreateDisk -> Int
$sel:availabilityZone:CreateDisk' :: CreateDisk -> Text
$sel:diskName:CreateDisk' :: CreateDisk -> Text
$sel:tags:CreateDisk' :: CreateDisk -> Maybe [Tag]
$sel:addOns:CreateDisk' :: CreateDisk -> Maybe [AddOnRequest]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [AddOnRequest]
addOns
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Tag]
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
diskName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
availabilityZone
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
sizeInGb

instance Data.ToHeaders CreateDisk where
  toHeaders :: CreateDisk -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"Lightsail_20161128.CreateDisk" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON CreateDisk where
  toJSON :: CreateDisk -> Value
toJSON CreateDisk' {Int
Maybe [AddOnRequest]
Maybe [Tag]
Text
sizeInGb :: Int
availabilityZone :: Text
diskName :: Text
tags :: Maybe [Tag]
addOns :: Maybe [AddOnRequest]
$sel:sizeInGb:CreateDisk' :: CreateDisk -> Int
$sel:availabilityZone:CreateDisk' :: CreateDisk -> Text
$sel:diskName:CreateDisk' :: CreateDisk -> Text
$sel:tags:CreateDisk' :: CreateDisk -> Maybe [Tag]
$sel:addOns:CreateDisk' :: CreateDisk -> Maybe [AddOnRequest]
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"addOns" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [AddOnRequest]
addOns,
            (Key
"tags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
            forall a. a -> Maybe a
Prelude.Just (Key
"diskName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
diskName),
            forall a. a -> Maybe a
Prelude.Just
              (Key
"availabilityZone" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
availabilityZone),
            forall a. a -> Maybe a
Prelude.Just (Key
"sizeInGb" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Int
sizeInGb)
          ]
      )

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

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

-- | /See:/ 'newCreateDiskResponse' smart constructor.
data CreateDiskResponse = CreateDiskResponse'
  { -- | An array of objects that describe the result of the action, such as the
    -- status of the request, the timestamp of the request, and the resources
    -- affected by the request.
    CreateDiskResponse -> Maybe [Operation]
operations :: Prelude.Maybe [Operation],
    -- | The response's http status code.
    CreateDiskResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateDiskResponse -> CreateDiskResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateDiskResponse -> CreateDiskResponse -> Bool
$c/= :: CreateDiskResponse -> CreateDiskResponse -> Bool
== :: CreateDiskResponse -> CreateDiskResponse -> Bool
$c== :: CreateDiskResponse -> CreateDiskResponse -> Bool
Prelude.Eq, ReadPrec [CreateDiskResponse]
ReadPrec CreateDiskResponse
Int -> ReadS CreateDiskResponse
ReadS [CreateDiskResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateDiskResponse]
$creadListPrec :: ReadPrec [CreateDiskResponse]
readPrec :: ReadPrec CreateDiskResponse
$creadPrec :: ReadPrec CreateDiskResponse
readList :: ReadS [CreateDiskResponse]
$creadList :: ReadS [CreateDiskResponse]
readsPrec :: Int -> ReadS CreateDiskResponse
$creadsPrec :: Int -> ReadS CreateDiskResponse
Prelude.Read, Int -> CreateDiskResponse -> ShowS
[CreateDiskResponse] -> ShowS
CreateDiskResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateDiskResponse] -> ShowS
$cshowList :: [CreateDiskResponse] -> ShowS
show :: CreateDiskResponse -> String
$cshow :: CreateDiskResponse -> String
showsPrec :: Int -> CreateDiskResponse -> ShowS
$cshowsPrec :: Int -> CreateDiskResponse -> ShowS
Prelude.Show, forall x. Rep CreateDiskResponse x -> CreateDiskResponse
forall x. CreateDiskResponse -> Rep CreateDiskResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateDiskResponse x -> CreateDiskResponse
$cfrom :: forall x. CreateDiskResponse -> Rep CreateDiskResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateDiskResponse' 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:
--
-- 'operations', 'createDiskResponse_operations' - An array of objects that describe the result of the action, such as the
-- status of the request, the timestamp of the request, and the resources
-- affected by the request.
--
-- 'httpStatus', 'createDiskResponse_httpStatus' - The response's http status code.
newCreateDiskResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateDiskResponse
newCreateDiskResponse :: Int -> CreateDiskResponse
newCreateDiskResponse Int
pHttpStatus_ =
  CreateDiskResponse'
    { $sel:operations:CreateDiskResponse' :: Maybe [Operation]
operations = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateDiskResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | An array of objects that describe the result of the action, such as the
-- status of the request, the timestamp of the request, and the resources
-- affected by the request.
createDiskResponse_operations :: Lens.Lens' CreateDiskResponse (Prelude.Maybe [Operation])
createDiskResponse_operations :: Lens' CreateDiskResponse (Maybe [Operation])
createDiskResponse_operations = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateDiskResponse' {Maybe [Operation]
operations :: Maybe [Operation]
$sel:operations:CreateDiskResponse' :: CreateDiskResponse -> Maybe [Operation]
operations} -> Maybe [Operation]
operations) (\s :: CreateDiskResponse
s@CreateDiskResponse' {} Maybe [Operation]
a -> CreateDiskResponse
s {$sel:operations:CreateDiskResponse' :: Maybe [Operation]
operations = Maybe [Operation]
a} :: CreateDiskResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData CreateDiskResponse where
  rnf :: CreateDiskResponse -> ()
rnf CreateDiskResponse' {Int
Maybe [Operation]
httpStatus :: Int
operations :: Maybe [Operation]
$sel:httpStatus:CreateDiskResponse' :: CreateDiskResponse -> Int
$sel:operations:CreateDiskResponse' :: CreateDiskResponse -> Maybe [Operation]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [Operation]
operations
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus