{-# 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.APIGateway.GetSdk
-- 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)
--
-- Generates a client SDK for a RestApi and Stage.
module Amazonka.APIGateway.GetSdk
  ( -- * Creating a Request
    GetSdk (..),
    newGetSdk,

    -- * Request Lenses
    getSdk_parameters,
    getSdk_restApiId,
    getSdk_stageName,
    getSdk_sdkType,

    -- * Destructuring the Response
    GetSdkResponse (..),
    newGetSdkResponse,

    -- * Response Lenses
    getSdkResponse_body,
    getSdkResponse_contentDisposition,
    getSdkResponse_contentType,
    getSdkResponse_httpStatus,
  )
where

import Amazonka.APIGateway.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

-- | Request a new generated client SDK for a RestApi and Stage.
--
-- /See:/ 'newGetSdk' smart constructor.
data GetSdk = GetSdk'
  { -- | A string-to-string key-value map of query parameters @sdkType@-dependent
    -- properties of the SDK. For @sdkType@ of @objectivec@ or @swift@, a
    -- parameter named @classPrefix@ is required. For @sdkType@ of @android@,
    -- parameters named @groupId@, @artifactId@, @artifactVersion@, and
    -- @invokerPackage@ are required. For @sdkType@ of @java@, parameters named
    -- @serviceName@ and @javaPackageName@ are required.
    GetSdk -> Maybe (HashMap Text Text)
parameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | [Required] The string identifier of the associated RestApi.
    GetSdk -> Text
restApiId :: Prelude.Text,
    -- | [Required] The name of the Stage that the SDK will use.
    GetSdk -> Text
stageName :: Prelude.Text,
    -- | [Required] The language for the generated SDK. Currently @java@,
    -- @javascript@, @android@, @objectivec@ (for iOS), @swift@ (for iOS), and
    -- @ruby@ are supported.
    GetSdk -> Text
sdkType :: Prelude.Text
  }
  deriving (GetSdk -> GetSdk -> Bool
(GetSdk -> GetSdk -> Bool)
-> (GetSdk -> GetSdk -> Bool) -> Eq GetSdk
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetSdk -> GetSdk -> Bool
$c/= :: GetSdk -> GetSdk -> Bool
== :: GetSdk -> GetSdk -> Bool
$c== :: GetSdk -> GetSdk -> Bool
Prelude.Eq, ReadPrec [GetSdk]
ReadPrec GetSdk
Int -> ReadS GetSdk
ReadS [GetSdk]
(Int -> ReadS GetSdk)
-> ReadS [GetSdk]
-> ReadPrec GetSdk
-> ReadPrec [GetSdk]
-> Read GetSdk
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetSdk]
$creadListPrec :: ReadPrec [GetSdk]
readPrec :: ReadPrec GetSdk
$creadPrec :: ReadPrec GetSdk
readList :: ReadS [GetSdk]
$creadList :: ReadS [GetSdk]
readsPrec :: Int -> ReadS GetSdk
$creadsPrec :: Int -> ReadS GetSdk
Prelude.Read, Int -> GetSdk -> ShowS
[GetSdk] -> ShowS
GetSdk -> String
(Int -> GetSdk -> ShowS)
-> (GetSdk -> String) -> ([GetSdk] -> ShowS) -> Show GetSdk
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetSdk] -> ShowS
$cshowList :: [GetSdk] -> ShowS
show :: GetSdk -> String
$cshow :: GetSdk -> String
showsPrec :: Int -> GetSdk -> ShowS
$cshowsPrec :: Int -> GetSdk -> ShowS
Prelude.Show, (forall x. GetSdk -> Rep GetSdk x)
-> (forall x. Rep GetSdk x -> GetSdk) -> Generic GetSdk
forall x. Rep GetSdk x -> GetSdk
forall x. GetSdk -> Rep GetSdk x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetSdk x -> GetSdk
$cfrom :: forall x. GetSdk -> Rep GetSdk x
Prelude.Generic)

-- |
-- Create a value of 'GetSdk' 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:
--
-- 'parameters', 'getSdk_parameters' - A string-to-string key-value map of query parameters @sdkType@-dependent
-- properties of the SDK. For @sdkType@ of @objectivec@ or @swift@, a
-- parameter named @classPrefix@ is required. For @sdkType@ of @android@,
-- parameters named @groupId@, @artifactId@, @artifactVersion@, and
-- @invokerPackage@ are required. For @sdkType@ of @java@, parameters named
-- @serviceName@ and @javaPackageName@ are required.
--
-- 'restApiId', 'getSdk_restApiId' - [Required] The string identifier of the associated RestApi.
--
-- 'stageName', 'getSdk_stageName' - [Required] The name of the Stage that the SDK will use.
--
-- 'sdkType', 'getSdk_sdkType' - [Required] The language for the generated SDK. Currently @java@,
-- @javascript@, @android@, @objectivec@ (for iOS), @swift@ (for iOS), and
-- @ruby@ are supported.
newGetSdk ::
  -- | 'restApiId'
  Prelude.Text ->
  -- | 'stageName'
  Prelude.Text ->
  -- | 'sdkType'
  Prelude.Text ->
  GetSdk
newGetSdk :: Text -> Text -> Text -> GetSdk
newGetSdk Text
pRestApiId_ Text
pStageName_ Text
pSdkType_ =
  GetSdk' :: Maybe (HashMap Text Text) -> Text -> Text -> Text -> GetSdk
GetSdk'
    { $sel:parameters:GetSdk' :: Maybe (HashMap Text Text)
parameters = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:restApiId:GetSdk' :: Text
restApiId = Text
pRestApiId_,
      $sel:stageName:GetSdk' :: Text
stageName = Text
pStageName_,
      $sel:sdkType:GetSdk' :: Text
sdkType = Text
pSdkType_
    }

-- | A string-to-string key-value map of query parameters @sdkType@-dependent
-- properties of the SDK. For @sdkType@ of @objectivec@ or @swift@, a
-- parameter named @classPrefix@ is required. For @sdkType@ of @android@,
-- parameters named @groupId@, @artifactId@, @artifactVersion@, and
-- @invokerPackage@ are required. For @sdkType@ of @java@, parameters named
-- @serviceName@ and @javaPackageName@ are required.
getSdk_parameters :: Lens.Lens' GetSdk (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
getSdk_parameters :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> GetSdk -> f GetSdk
getSdk_parameters = (GetSdk -> Maybe (HashMap Text Text))
-> (GetSdk -> Maybe (HashMap Text Text) -> GetSdk)
-> Lens
     GetSdk
     GetSdk
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSdk' {Maybe (HashMap Text Text)
parameters :: Maybe (HashMap Text Text)
$sel:parameters:GetSdk' :: GetSdk -> Maybe (HashMap Text Text)
parameters} -> Maybe (HashMap Text Text)
parameters) (\s :: GetSdk
s@GetSdk' {} Maybe (HashMap Text Text)
a -> GetSdk
s {$sel:parameters:GetSdk' :: Maybe (HashMap Text Text)
parameters = Maybe (HashMap Text Text)
a} :: GetSdk) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> GetSdk -> f GetSdk)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> GetSdk
-> f GetSdk
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | [Required] The string identifier of the associated RestApi.
getSdk_restApiId :: Lens.Lens' GetSdk Prelude.Text
getSdk_restApiId :: (Text -> f Text) -> GetSdk -> f GetSdk
getSdk_restApiId = (GetSdk -> Text)
-> (GetSdk -> Text -> GetSdk) -> Lens GetSdk GetSdk Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSdk' {Text
restApiId :: Text
$sel:restApiId:GetSdk' :: GetSdk -> Text
restApiId} -> Text
restApiId) (\s :: GetSdk
s@GetSdk' {} Text
a -> GetSdk
s {$sel:restApiId:GetSdk' :: Text
restApiId = Text
a} :: GetSdk)

-- | [Required] The name of the Stage that the SDK will use.
getSdk_stageName :: Lens.Lens' GetSdk Prelude.Text
getSdk_stageName :: (Text -> f Text) -> GetSdk -> f GetSdk
getSdk_stageName = (GetSdk -> Text)
-> (GetSdk -> Text -> GetSdk) -> Lens GetSdk GetSdk Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSdk' {Text
stageName :: Text
$sel:stageName:GetSdk' :: GetSdk -> Text
stageName} -> Text
stageName) (\s :: GetSdk
s@GetSdk' {} Text
a -> GetSdk
s {$sel:stageName:GetSdk' :: Text
stageName = Text
a} :: GetSdk)

-- | [Required] The language for the generated SDK. Currently @java@,
-- @javascript@, @android@, @objectivec@ (for iOS), @swift@ (for iOS), and
-- @ruby@ are supported.
getSdk_sdkType :: Lens.Lens' GetSdk Prelude.Text
getSdk_sdkType :: (Text -> f Text) -> GetSdk -> f GetSdk
getSdk_sdkType = (GetSdk -> Text)
-> (GetSdk -> Text -> GetSdk) -> Lens GetSdk GetSdk Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSdk' {Text
sdkType :: Text
$sel:sdkType:GetSdk' :: GetSdk -> Text
sdkType} -> Text
sdkType) (\s :: GetSdk
s@GetSdk' {} Text
a -> GetSdk
s {$sel:sdkType:GetSdk' :: Text
sdkType = Text
a} :: GetSdk)

instance Core.AWSRequest GetSdk where
  type AWSResponse GetSdk = GetSdkResponse
  request :: GetSdk -> Request GetSdk
request = Service -> GetSdk -> Request GetSdk
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy GetSdk
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetSdk)))
response =
    (Int
 -> ResponseHeaders
 -> ByteString
 -> Either String (AWSResponse GetSdk))
-> Logger
-> Service
-> Proxy GetSdk
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse GetSdk)))
forall (m :: * -> *) a.
MonadResource m =>
(Int
 -> ResponseHeaders -> ByteString -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveBytes
      ( \Int
s ResponseHeaders
h ByteString
x ->
          Maybe ByteString
-> Maybe Text -> Maybe Text -> Int -> GetSdkResponse
GetSdkResponse'
            (Maybe ByteString
 -> Maybe Text -> Maybe Text -> Int -> GetSdkResponse)
-> Either String (Maybe ByteString)
-> Either
     String (Maybe Text -> Maybe Text -> Int -> GetSdkResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Maybe ByteString -> Either String (Maybe ByteString)
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (ByteString -> Maybe ByteString
forall a. a -> Maybe a
Prelude.Just (ByteString -> ByteString
Prelude.coerce ByteString
x)))
            Either String (Maybe Text -> Maybe Text -> Int -> GetSdkResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Int -> GetSdkResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h ResponseHeaders -> HeaderName -> Either String (Maybe Text)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"Content-Disposition")
            Either String (Maybe Text -> Int -> GetSdkResponse)
-> Either String (Maybe Text)
-> Either String (Int -> GetSdkResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (ResponseHeaders
h ResponseHeaders -> HeaderName -> Either String (Maybe Text)
forall a.
FromText a =>
ResponseHeaders -> HeaderName -> Either String (Maybe a)
Core..#? HeaderName
"Content-Type")
            Either String (Int -> GetSdkResponse)
-> Either String Int -> Either String GetSdkResponse
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 GetSdk

instance Prelude.NFData GetSdk

instance Core.ToHeaders GetSdk where
  toHeaders :: GetSdk -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetSdk -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Accept"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# (ByteString
"application/json" :: Prelude.ByteString)
          ]
      )

instance Core.ToPath GetSdk where
  toPath :: GetSdk -> ByteString
toPath GetSdk' {Maybe (HashMap Text Text)
Text
sdkType :: Text
stageName :: Text
restApiId :: Text
parameters :: Maybe (HashMap Text Text)
$sel:sdkType:GetSdk' :: GetSdk -> Text
$sel:stageName:GetSdk' :: GetSdk -> Text
$sel:restApiId:GetSdk' :: GetSdk -> Text
$sel:parameters:GetSdk' :: GetSdk -> Maybe (HashMap Text Text)
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/restapis/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
restApiId,
        ByteString
"/stages/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
stageName,
        ByteString
"/sdks/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
sdkType
      ]

instance Core.ToQuery GetSdk where
  toQuery :: GetSdk -> QueryString
toQuery GetSdk' {Maybe (HashMap Text Text)
Text
sdkType :: Text
stageName :: Text
restApiId :: Text
parameters :: Maybe (HashMap Text Text)
$sel:sdkType:GetSdk' :: GetSdk -> Text
$sel:stageName:GetSdk' :: GetSdk -> Text
$sel:restApiId:GetSdk' :: GetSdk -> Text
$sel:parameters:GetSdk' :: GetSdk -> Maybe (HashMap Text Text)
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"parameters"
          ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe QueryString -> QueryString
forall a. ToQuery a => a -> QueryString
Core.toQuery
            ( ByteString
-> ByteString -> ByteString -> HashMap Text Text -> QueryString
forall k v.
(ToQuery k, ToQuery v) =>
ByteString
-> ByteString -> ByteString -> HashMap k v -> QueryString
Core.toQueryMap ByteString
"entry" ByteString
"key" ByteString
"value"
                (HashMap Text Text -> QueryString)
-> Maybe (HashMap Text Text) -> Maybe QueryString
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
parameters
            )
      ]

-- | The binary blob response to GetSdk, which contains the generated SDK.
--
-- /See:/ 'newGetSdkResponse' smart constructor.
data GetSdkResponse = GetSdkResponse'
  { -- | The binary blob response to GetSdk, which contains the generated SDK.
    GetSdkResponse -> Maybe ByteString
body :: Prelude.Maybe Prelude.ByteString,
    -- | The content-disposition header value in the HTTP response.
    GetSdkResponse -> Maybe Text
contentDisposition :: Prelude.Maybe Prelude.Text,
    -- | The content-type header value in the HTTP response.
    GetSdkResponse -> Maybe Text
contentType :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    GetSdkResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetSdkResponse -> GetSdkResponse -> Bool
(GetSdkResponse -> GetSdkResponse -> Bool)
-> (GetSdkResponse -> GetSdkResponse -> Bool) -> Eq GetSdkResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetSdkResponse -> GetSdkResponse -> Bool
$c/= :: GetSdkResponse -> GetSdkResponse -> Bool
== :: GetSdkResponse -> GetSdkResponse -> Bool
$c== :: GetSdkResponse -> GetSdkResponse -> Bool
Prelude.Eq, Int -> GetSdkResponse -> ShowS
[GetSdkResponse] -> ShowS
GetSdkResponse -> String
(Int -> GetSdkResponse -> ShowS)
-> (GetSdkResponse -> String)
-> ([GetSdkResponse] -> ShowS)
-> Show GetSdkResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetSdkResponse] -> ShowS
$cshowList :: [GetSdkResponse] -> ShowS
show :: GetSdkResponse -> String
$cshow :: GetSdkResponse -> String
showsPrec :: Int -> GetSdkResponse -> ShowS
$cshowsPrec :: Int -> GetSdkResponse -> ShowS
Prelude.Show, (forall x. GetSdkResponse -> Rep GetSdkResponse x)
-> (forall x. Rep GetSdkResponse x -> GetSdkResponse)
-> Generic GetSdkResponse
forall x. Rep GetSdkResponse x -> GetSdkResponse
forall x. GetSdkResponse -> Rep GetSdkResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetSdkResponse x -> GetSdkResponse
$cfrom :: forall x. GetSdkResponse -> Rep GetSdkResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetSdkResponse' 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:
--
-- 'body', 'getSdkResponse_body' - The binary blob response to GetSdk, which contains the generated SDK.
--
-- 'contentDisposition', 'getSdkResponse_contentDisposition' - The content-disposition header value in the HTTP response.
--
-- 'contentType', 'getSdkResponse_contentType' - The content-type header value in the HTTP response.
--
-- 'httpStatus', 'getSdkResponse_httpStatus' - The response's http status code.
newGetSdkResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetSdkResponse
newGetSdkResponse :: Int -> GetSdkResponse
newGetSdkResponse Int
pHttpStatus_ =
  GetSdkResponse' :: Maybe ByteString
-> Maybe Text -> Maybe Text -> Int -> GetSdkResponse
GetSdkResponse'
    { $sel:body:GetSdkResponse' :: Maybe ByteString
body = Maybe ByteString
forall a. Maybe a
Prelude.Nothing,
      $sel:contentDisposition:GetSdkResponse' :: Maybe Text
contentDisposition = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:contentType:GetSdkResponse' :: Maybe Text
contentType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetSdkResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The binary blob response to GetSdk, which contains the generated SDK.
getSdkResponse_body :: Lens.Lens' GetSdkResponse (Prelude.Maybe Prelude.ByteString)
getSdkResponse_body :: (Maybe ByteString -> f (Maybe ByteString))
-> GetSdkResponse -> f GetSdkResponse
getSdkResponse_body = (GetSdkResponse -> Maybe ByteString)
-> (GetSdkResponse -> Maybe ByteString -> GetSdkResponse)
-> Lens
     GetSdkResponse GetSdkResponse (Maybe ByteString) (Maybe ByteString)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSdkResponse' {Maybe ByteString
body :: Maybe ByteString
$sel:body:GetSdkResponse' :: GetSdkResponse -> Maybe ByteString
body} -> Maybe ByteString
body) (\s :: GetSdkResponse
s@GetSdkResponse' {} Maybe ByteString
a -> GetSdkResponse
s {$sel:body:GetSdkResponse' :: Maybe ByteString
body = Maybe ByteString
a} :: GetSdkResponse)

-- | The content-disposition header value in the HTTP response.
getSdkResponse_contentDisposition :: Lens.Lens' GetSdkResponse (Prelude.Maybe Prelude.Text)
getSdkResponse_contentDisposition :: (Maybe Text -> f (Maybe Text))
-> GetSdkResponse -> f GetSdkResponse
getSdkResponse_contentDisposition = (GetSdkResponse -> Maybe Text)
-> (GetSdkResponse -> Maybe Text -> GetSdkResponse)
-> Lens GetSdkResponse GetSdkResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSdkResponse' {Maybe Text
contentDisposition :: Maybe Text
$sel:contentDisposition:GetSdkResponse' :: GetSdkResponse -> Maybe Text
contentDisposition} -> Maybe Text
contentDisposition) (\s :: GetSdkResponse
s@GetSdkResponse' {} Maybe Text
a -> GetSdkResponse
s {$sel:contentDisposition:GetSdkResponse' :: Maybe Text
contentDisposition = Maybe Text
a} :: GetSdkResponse)

-- | The content-type header value in the HTTP response.
getSdkResponse_contentType :: Lens.Lens' GetSdkResponse (Prelude.Maybe Prelude.Text)
getSdkResponse_contentType :: (Maybe Text -> f (Maybe Text))
-> GetSdkResponse -> f GetSdkResponse
getSdkResponse_contentType = (GetSdkResponse -> Maybe Text)
-> (GetSdkResponse -> Maybe Text -> GetSdkResponse)
-> Lens GetSdkResponse GetSdkResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetSdkResponse' {Maybe Text
contentType :: Maybe Text
$sel:contentType:GetSdkResponse' :: GetSdkResponse -> Maybe Text
contentType} -> Maybe Text
contentType) (\s :: GetSdkResponse
s@GetSdkResponse' {} Maybe Text
a -> GetSdkResponse
s {$sel:contentType:GetSdkResponse' :: Maybe Text
contentType = Maybe Text
a} :: GetSdkResponse)

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

instance Prelude.NFData GetSdkResponse