{-# 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.AppStream.CreateImageBuilder
-- 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)
--
-- Creates an image builder. An image builder is a virtual machine that is
-- used to create an image.
--
-- The initial state of the builder is @PENDING@. When it is ready, the
-- state is @RUNNING@.
module Amazonka.AppStream.CreateImageBuilder
  ( -- * Creating a Request
    CreateImageBuilder (..),
    newCreateImageBuilder,

    -- * Request Lenses
    createImageBuilder_domainJoinInfo,
    createImageBuilder_iamRoleArn,
    createImageBuilder_accessEndpoints,
    createImageBuilder_vpcConfig,
    createImageBuilder_imageArn,
    createImageBuilder_displayName,
    createImageBuilder_enableDefaultInternetAccess,
    createImageBuilder_imageName,
    createImageBuilder_description,
    createImageBuilder_appstreamAgentVersion,
    createImageBuilder_tags,
    createImageBuilder_name,
    createImageBuilder_instanceType,

    -- * Destructuring the Response
    CreateImageBuilderResponse (..),
    newCreateImageBuilderResponse,

    -- * Response Lenses
    createImageBuilderResponse_imageBuilder,
    createImageBuilderResponse_httpStatus,
  )
where

import Amazonka.AppStream.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:/ 'newCreateImageBuilder' smart constructor.
data CreateImageBuilder = CreateImageBuilder'
  { -- | The name of the directory and organizational unit (OU) to use to join
    -- the image builder to a Microsoft Active Directory domain.
    CreateImageBuilder -> Maybe DomainJoinInfo
domainJoinInfo :: Prelude.Maybe DomainJoinInfo,
    -- | The Amazon Resource Name (ARN) of the IAM role to apply to the image
    -- builder. To assume a role, the image builder calls the AWS Security
    -- Token Service (STS) @AssumeRole@ API operation and passes the ARN of the
    -- role to use. The operation creates a new session with temporary
    -- credentials. AppStream 2.0 retrieves the temporary credentials and
    -- creates the __appstream_machine_role__ credential profile on the
    -- instance.
    --
    -- For more information, see
    -- <https://docs.aws.amazon.com/appstream2/latest/developerguide/using-iam-roles-to-grant-permissions-to-applications-scripts-streaming-instances.html Using an IAM Role to Grant Permissions to Applications and Scripts Running on AppStream 2.0 Streaming Instances>
    -- in the /Amazon AppStream 2.0 Administration Guide/.
    CreateImageBuilder -> Maybe Text
iamRoleArn :: Prelude.Maybe Prelude.Text,
    -- | The list of interface VPC endpoint (interface endpoint) objects.
    -- Administrators can connect to the image builder only through the
    -- specified endpoints.
    CreateImageBuilder -> Maybe (NonEmpty AccessEndpoint)
accessEndpoints :: Prelude.Maybe (Prelude.NonEmpty AccessEndpoint),
    -- | The VPC configuration for the image builder. You can specify only one
    -- subnet.
    CreateImageBuilder -> Maybe VpcConfig
vpcConfig :: Prelude.Maybe VpcConfig,
    -- | The ARN of the public, private, or shared image to use.
    CreateImageBuilder -> Maybe Text
imageArn :: Prelude.Maybe Prelude.Text,
    -- | The image builder name to display.
    CreateImageBuilder -> Maybe Text
displayName :: Prelude.Maybe Prelude.Text,
    -- | Enables or disables default internet access for the image builder.
    CreateImageBuilder -> Maybe Bool
enableDefaultInternetAccess :: Prelude.Maybe Prelude.Bool,
    -- | The name of the image used to create the image builder.
    CreateImageBuilder -> Maybe Text
imageName :: Prelude.Maybe Prelude.Text,
    -- | The description to display.
    CreateImageBuilder -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The version of the AppStream 2.0 agent to use for this image builder. To
    -- use the latest version of the AppStream 2.0 agent, specify [LATEST].
    CreateImageBuilder -> Maybe Text
appstreamAgentVersion :: Prelude.Maybe Prelude.Text,
    -- | The tags to associate with the image builder. A tag is a key-value pair,
    -- and the value is optional. For example, Environment=Test. If you do not
    -- specify a value, Environment=.
    --
    -- Generally allowed characters are: letters, numbers, and spaces
    -- representable in UTF-8, and the following special characters:
    --
    -- _ . : \/ = + \\ - \@
    --
    -- If you do not specify a value, the value is set to an empty string.
    --
    -- For more information about tags, see
    -- <https://docs.aws.amazon.com/appstream2/latest/developerguide/tagging-basic.html Tagging Your Resources>
    -- in the /Amazon AppStream 2.0 Administration Guide/.
    CreateImageBuilder -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | A unique name for the image builder.
    CreateImageBuilder -> Text
name :: Prelude.Text,
    -- | The instance type to use when launching the image builder. The following
    -- instance types are available:
    --
    -- -   stream.standard.small
    --
    -- -   stream.standard.medium
    --
    -- -   stream.standard.large
    --
    -- -   stream.compute.large
    --
    -- -   stream.compute.xlarge
    --
    -- -   stream.compute.2xlarge
    --
    -- -   stream.compute.4xlarge
    --
    -- -   stream.compute.8xlarge
    --
    -- -   stream.memory.large
    --
    -- -   stream.memory.xlarge
    --
    -- -   stream.memory.2xlarge
    --
    -- -   stream.memory.4xlarge
    --
    -- -   stream.memory.8xlarge
    --
    -- -   stream.memory.z1d.large
    --
    -- -   stream.memory.z1d.xlarge
    --
    -- -   stream.memory.z1d.2xlarge
    --
    -- -   stream.memory.z1d.3xlarge
    --
    -- -   stream.memory.z1d.6xlarge
    --
    -- -   stream.memory.z1d.12xlarge
    --
    -- -   stream.graphics-design.large
    --
    -- -   stream.graphics-design.xlarge
    --
    -- -   stream.graphics-design.2xlarge
    --
    -- -   stream.graphics-design.4xlarge
    --
    -- -   stream.graphics-desktop.2xlarge
    --
    -- -   stream.graphics.g4dn.xlarge
    --
    -- -   stream.graphics.g4dn.2xlarge
    --
    -- -   stream.graphics.g4dn.4xlarge
    --
    -- -   stream.graphics.g4dn.8xlarge
    --
    -- -   stream.graphics.g4dn.12xlarge
    --
    -- -   stream.graphics.g4dn.16xlarge
    --
    -- -   stream.graphics-pro.4xlarge
    --
    -- -   stream.graphics-pro.8xlarge
    --
    -- -   stream.graphics-pro.16xlarge
    CreateImageBuilder -> Text
instanceType :: Prelude.Text
  }
  deriving (CreateImageBuilder -> CreateImageBuilder -> Bool
(CreateImageBuilder -> CreateImageBuilder -> Bool)
-> (CreateImageBuilder -> CreateImageBuilder -> Bool)
-> Eq CreateImageBuilder
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateImageBuilder -> CreateImageBuilder -> Bool
$c/= :: CreateImageBuilder -> CreateImageBuilder -> Bool
== :: CreateImageBuilder -> CreateImageBuilder -> Bool
$c== :: CreateImageBuilder -> CreateImageBuilder -> Bool
Prelude.Eq, ReadPrec [CreateImageBuilder]
ReadPrec CreateImageBuilder
Int -> ReadS CreateImageBuilder
ReadS [CreateImageBuilder]
(Int -> ReadS CreateImageBuilder)
-> ReadS [CreateImageBuilder]
-> ReadPrec CreateImageBuilder
-> ReadPrec [CreateImageBuilder]
-> Read CreateImageBuilder
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateImageBuilder]
$creadListPrec :: ReadPrec [CreateImageBuilder]
readPrec :: ReadPrec CreateImageBuilder
$creadPrec :: ReadPrec CreateImageBuilder
readList :: ReadS [CreateImageBuilder]
$creadList :: ReadS [CreateImageBuilder]
readsPrec :: Int -> ReadS CreateImageBuilder
$creadsPrec :: Int -> ReadS CreateImageBuilder
Prelude.Read, Int -> CreateImageBuilder -> ShowS
[CreateImageBuilder] -> ShowS
CreateImageBuilder -> String
(Int -> CreateImageBuilder -> ShowS)
-> (CreateImageBuilder -> String)
-> ([CreateImageBuilder] -> ShowS)
-> Show CreateImageBuilder
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateImageBuilder] -> ShowS
$cshowList :: [CreateImageBuilder] -> ShowS
show :: CreateImageBuilder -> String
$cshow :: CreateImageBuilder -> String
showsPrec :: Int -> CreateImageBuilder -> ShowS
$cshowsPrec :: Int -> CreateImageBuilder -> ShowS
Prelude.Show, (forall x. CreateImageBuilder -> Rep CreateImageBuilder x)
-> (forall x. Rep CreateImageBuilder x -> CreateImageBuilder)
-> Generic CreateImageBuilder
forall x. Rep CreateImageBuilder x -> CreateImageBuilder
forall x. CreateImageBuilder -> Rep CreateImageBuilder x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateImageBuilder x -> CreateImageBuilder
$cfrom :: forall x. CreateImageBuilder -> Rep CreateImageBuilder x
Prelude.Generic)

-- |
-- Create a value of 'CreateImageBuilder' 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:
--
-- 'domainJoinInfo', 'createImageBuilder_domainJoinInfo' - The name of the directory and organizational unit (OU) to use to join
-- the image builder to a Microsoft Active Directory domain.
--
-- 'iamRoleArn', 'createImageBuilder_iamRoleArn' - The Amazon Resource Name (ARN) of the IAM role to apply to the image
-- builder. To assume a role, the image builder calls the AWS Security
-- Token Service (STS) @AssumeRole@ API operation and passes the ARN of the
-- role to use. The operation creates a new session with temporary
-- credentials. AppStream 2.0 retrieves the temporary credentials and
-- creates the __appstream_machine_role__ credential profile on the
-- instance.
--
-- For more information, see
-- <https://docs.aws.amazon.com/appstream2/latest/developerguide/using-iam-roles-to-grant-permissions-to-applications-scripts-streaming-instances.html Using an IAM Role to Grant Permissions to Applications and Scripts Running on AppStream 2.0 Streaming Instances>
-- in the /Amazon AppStream 2.0 Administration Guide/.
--
-- 'accessEndpoints', 'createImageBuilder_accessEndpoints' - The list of interface VPC endpoint (interface endpoint) objects.
-- Administrators can connect to the image builder only through the
-- specified endpoints.
--
-- 'vpcConfig', 'createImageBuilder_vpcConfig' - The VPC configuration for the image builder. You can specify only one
-- subnet.
--
-- 'imageArn', 'createImageBuilder_imageArn' - The ARN of the public, private, or shared image to use.
--
-- 'displayName', 'createImageBuilder_displayName' - The image builder name to display.
--
-- 'enableDefaultInternetAccess', 'createImageBuilder_enableDefaultInternetAccess' - Enables or disables default internet access for the image builder.
--
-- 'imageName', 'createImageBuilder_imageName' - The name of the image used to create the image builder.
--
-- 'description', 'createImageBuilder_description' - The description to display.
--
-- 'appstreamAgentVersion', 'createImageBuilder_appstreamAgentVersion' - The version of the AppStream 2.0 agent to use for this image builder. To
-- use the latest version of the AppStream 2.0 agent, specify [LATEST].
--
-- 'tags', 'createImageBuilder_tags' - The tags to associate with the image builder. A tag is a key-value pair,
-- and the value is optional. For example, Environment=Test. If you do not
-- specify a value, Environment=.
--
-- Generally allowed characters are: letters, numbers, and spaces
-- representable in UTF-8, and the following special characters:
--
-- _ . : \/ = + \\ - \@
--
-- If you do not specify a value, the value is set to an empty string.
--
-- For more information about tags, see
-- <https://docs.aws.amazon.com/appstream2/latest/developerguide/tagging-basic.html Tagging Your Resources>
-- in the /Amazon AppStream 2.0 Administration Guide/.
--
-- 'name', 'createImageBuilder_name' - A unique name for the image builder.
--
-- 'instanceType', 'createImageBuilder_instanceType' - The instance type to use when launching the image builder. The following
-- instance types are available:
--
-- -   stream.standard.small
--
-- -   stream.standard.medium
--
-- -   stream.standard.large
--
-- -   stream.compute.large
--
-- -   stream.compute.xlarge
--
-- -   stream.compute.2xlarge
--
-- -   stream.compute.4xlarge
--
-- -   stream.compute.8xlarge
--
-- -   stream.memory.large
--
-- -   stream.memory.xlarge
--
-- -   stream.memory.2xlarge
--
-- -   stream.memory.4xlarge
--
-- -   stream.memory.8xlarge
--
-- -   stream.memory.z1d.large
--
-- -   stream.memory.z1d.xlarge
--
-- -   stream.memory.z1d.2xlarge
--
-- -   stream.memory.z1d.3xlarge
--
-- -   stream.memory.z1d.6xlarge
--
-- -   stream.memory.z1d.12xlarge
--
-- -   stream.graphics-design.large
--
-- -   stream.graphics-design.xlarge
--
-- -   stream.graphics-design.2xlarge
--
-- -   stream.graphics-design.4xlarge
--
-- -   stream.graphics-desktop.2xlarge
--
-- -   stream.graphics.g4dn.xlarge
--
-- -   stream.graphics.g4dn.2xlarge
--
-- -   stream.graphics.g4dn.4xlarge
--
-- -   stream.graphics.g4dn.8xlarge
--
-- -   stream.graphics.g4dn.12xlarge
--
-- -   stream.graphics.g4dn.16xlarge
--
-- -   stream.graphics-pro.4xlarge
--
-- -   stream.graphics-pro.8xlarge
--
-- -   stream.graphics-pro.16xlarge
newCreateImageBuilder ::
  -- | 'name'
  Prelude.Text ->
  -- | 'instanceType'
  Prelude.Text ->
  CreateImageBuilder
newCreateImageBuilder :: Text -> Text -> CreateImageBuilder
newCreateImageBuilder Text
pName_ Text
pInstanceType_ =
  CreateImageBuilder' :: Maybe DomainJoinInfo
-> Maybe Text
-> Maybe (NonEmpty AccessEndpoint)
-> Maybe VpcConfig
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> CreateImageBuilder
CreateImageBuilder'
    { $sel:domainJoinInfo:CreateImageBuilder' :: Maybe DomainJoinInfo
domainJoinInfo =
        Maybe DomainJoinInfo
forall a. Maybe a
Prelude.Nothing,
      $sel:iamRoleArn:CreateImageBuilder' :: Maybe Text
iamRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:accessEndpoints:CreateImageBuilder' :: Maybe (NonEmpty AccessEndpoint)
accessEndpoints = Maybe (NonEmpty AccessEndpoint)
forall a. Maybe a
Prelude.Nothing,
      $sel:vpcConfig:CreateImageBuilder' :: Maybe VpcConfig
vpcConfig = Maybe VpcConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:imageArn:CreateImageBuilder' :: Maybe Text
imageArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:displayName:CreateImageBuilder' :: Maybe Text
displayName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:enableDefaultInternetAccess:CreateImageBuilder' :: Maybe Bool
enableDefaultInternetAccess = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:imageName:CreateImageBuilder' :: Maybe Text
imageName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:description:CreateImageBuilder' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:appstreamAgentVersion:CreateImageBuilder' :: Maybe Text
appstreamAgentVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreateImageBuilder' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
      $sel:name:CreateImageBuilder' :: Text
name = Text
pName_,
      $sel:instanceType:CreateImageBuilder' :: Text
instanceType = Text
pInstanceType_
    }

-- | The name of the directory and organizational unit (OU) to use to join
-- the image builder to a Microsoft Active Directory domain.
createImageBuilder_domainJoinInfo :: Lens.Lens' CreateImageBuilder (Prelude.Maybe DomainJoinInfo)
createImageBuilder_domainJoinInfo :: (Maybe DomainJoinInfo -> f (Maybe DomainJoinInfo))
-> CreateImageBuilder -> f CreateImageBuilder
createImageBuilder_domainJoinInfo = (CreateImageBuilder -> Maybe DomainJoinInfo)
-> (CreateImageBuilder
    -> Maybe DomainJoinInfo -> CreateImageBuilder)
-> Lens
     CreateImageBuilder
     CreateImageBuilder
     (Maybe DomainJoinInfo)
     (Maybe DomainJoinInfo)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateImageBuilder' {Maybe DomainJoinInfo
domainJoinInfo :: Maybe DomainJoinInfo
$sel:domainJoinInfo:CreateImageBuilder' :: CreateImageBuilder -> Maybe DomainJoinInfo
domainJoinInfo} -> Maybe DomainJoinInfo
domainJoinInfo) (\s :: CreateImageBuilder
s@CreateImageBuilder' {} Maybe DomainJoinInfo
a -> CreateImageBuilder
s {$sel:domainJoinInfo:CreateImageBuilder' :: Maybe DomainJoinInfo
domainJoinInfo = Maybe DomainJoinInfo
a} :: CreateImageBuilder)

-- | The Amazon Resource Name (ARN) of the IAM role to apply to the image
-- builder. To assume a role, the image builder calls the AWS Security
-- Token Service (STS) @AssumeRole@ API operation and passes the ARN of the
-- role to use. The operation creates a new session with temporary
-- credentials. AppStream 2.0 retrieves the temporary credentials and
-- creates the __appstream_machine_role__ credential profile on the
-- instance.
--
-- For more information, see
-- <https://docs.aws.amazon.com/appstream2/latest/developerguide/using-iam-roles-to-grant-permissions-to-applications-scripts-streaming-instances.html Using an IAM Role to Grant Permissions to Applications and Scripts Running on AppStream 2.0 Streaming Instances>
-- in the /Amazon AppStream 2.0 Administration Guide/.
createImageBuilder_iamRoleArn :: Lens.Lens' CreateImageBuilder (Prelude.Maybe Prelude.Text)
createImageBuilder_iamRoleArn :: (Maybe Text -> f (Maybe Text))
-> CreateImageBuilder -> f CreateImageBuilder
createImageBuilder_iamRoleArn = (CreateImageBuilder -> Maybe Text)
-> (CreateImageBuilder -> Maybe Text -> CreateImageBuilder)
-> Lens
     CreateImageBuilder CreateImageBuilder (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateImageBuilder' {Maybe Text
iamRoleArn :: Maybe Text
$sel:iamRoleArn:CreateImageBuilder' :: CreateImageBuilder -> Maybe Text
iamRoleArn} -> Maybe Text
iamRoleArn) (\s :: CreateImageBuilder
s@CreateImageBuilder' {} Maybe Text
a -> CreateImageBuilder
s {$sel:iamRoleArn:CreateImageBuilder' :: Maybe Text
iamRoleArn = Maybe Text
a} :: CreateImageBuilder)

-- | The list of interface VPC endpoint (interface endpoint) objects.
-- Administrators can connect to the image builder only through the
-- specified endpoints.
createImageBuilder_accessEndpoints :: Lens.Lens' CreateImageBuilder (Prelude.Maybe (Prelude.NonEmpty AccessEndpoint))
createImageBuilder_accessEndpoints :: (Maybe (NonEmpty AccessEndpoint)
 -> f (Maybe (NonEmpty AccessEndpoint)))
-> CreateImageBuilder -> f CreateImageBuilder
createImageBuilder_accessEndpoints = (CreateImageBuilder -> Maybe (NonEmpty AccessEndpoint))
-> (CreateImageBuilder
    -> Maybe (NonEmpty AccessEndpoint) -> CreateImageBuilder)
-> Lens
     CreateImageBuilder
     CreateImageBuilder
     (Maybe (NonEmpty AccessEndpoint))
     (Maybe (NonEmpty AccessEndpoint))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateImageBuilder' {Maybe (NonEmpty AccessEndpoint)
accessEndpoints :: Maybe (NonEmpty AccessEndpoint)
$sel:accessEndpoints:CreateImageBuilder' :: CreateImageBuilder -> Maybe (NonEmpty AccessEndpoint)
accessEndpoints} -> Maybe (NonEmpty AccessEndpoint)
accessEndpoints) (\s :: CreateImageBuilder
s@CreateImageBuilder' {} Maybe (NonEmpty AccessEndpoint)
a -> CreateImageBuilder
s {$sel:accessEndpoints:CreateImageBuilder' :: Maybe (NonEmpty AccessEndpoint)
accessEndpoints = Maybe (NonEmpty AccessEndpoint)
a} :: CreateImageBuilder) ((Maybe (NonEmpty AccessEndpoint)
  -> f (Maybe (NonEmpty AccessEndpoint)))
 -> CreateImageBuilder -> f CreateImageBuilder)
-> ((Maybe (NonEmpty AccessEndpoint)
     -> f (Maybe (NonEmpty AccessEndpoint)))
    -> Maybe (NonEmpty AccessEndpoint)
    -> f (Maybe (NonEmpty AccessEndpoint)))
-> (Maybe (NonEmpty AccessEndpoint)
    -> f (Maybe (NonEmpty AccessEndpoint)))
-> CreateImageBuilder
-> f CreateImageBuilder
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (NonEmpty AccessEndpoint)
  (NonEmpty AccessEndpoint)
  (NonEmpty AccessEndpoint)
  (NonEmpty AccessEndpoint)
-> Iso
     (Maybe (NonEmpty AccessEndpoint))
     (Maybe (NonEmpty AccessEndpoint))
     (Maybe (NonEmpty AccessEndpoint))
     (Maybe (NonEmpty AccessEndpoint))
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
  (NonEmpty AccessEndpoint)
  (NonEmpty AccessEndpoint)
  (NonEmpty AccessEndpoint)
  (NonEmpty AccessEndpoint)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The VPC configuration for the image builder. You can specify only one
-- subnet.
createImageBuilder_vpcConfig :: Lens.Lens' CreateImageBuilder (Prelude.Maybe VpcConfig)
createImageBuilder_vpcConfig :: (Maybe VpcConfig -> f (Maybe VpcConfig))
-> CreateImageBuilder -> f CreateImageBuilder
createImageBuilder_vpcConfig = (CreateImageBuilder -> Maybe VpcConfig)
-> (CreateImageBuilder -> Maybe VpcConfig -> CreateImageBuilder)
-> Lens
     CreateImageBuilder
     CreateImageBuilder
     (Maybe VpcConfig)
     (Maybe VpcConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateImageBuilder' {Maybe VpcConfig
vpcConfig :: Maybe VpcConfig
$sel:vpcConfig:CreateImageBuilder' :: CreateImageBuilder -> Maybe VpcConfig
vpcConfig} -> Maybe VpcConfig
vpcConfig) (\s :: CreateImageBuilder
s@CreateImageBuilder' {} Maybe VpcConfig
a -> CreateImageBuilder
s {$sel:vpcConfig:CreateImageBuilder' :: Maybe VpcConfig
vpcConfig = Maybe VpcConfig
a} :: CreateImageBuilder)

-- | The ARN of the public, private, or shared image to use.
createImageBuilder_imageArn :: Lens.Lens' CreateImageBuilder (Prelude.Maybe Prelude.Text)
createImageBuilder_imageArn :: (Maybe Text -> f (Maybe Text))
-> CreateImageBuilder -> f CreateImageBuilder
createImageBuilder_imageArn = (CreateImageBuilder -> Maybe Text)
-> (CreateImageBuilder -> Maybe Text -> CreateImageBuilder)
-> Lens
     CreateImageBuilder CreateImageBuilder (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateImageBuilder' {Maybe Text
imageArn :: Maybe Text
$sel:imageArn:CreateImageBuilder' :: CreateImageBuilder -> Maybe Text
imageArn} -> Maybe Text
imageArn) (\s :: CreateImageBuilder
s@CreateImageBuilder' {} Maybe Text
a -> CreateImageBuilder
s {$sel:imageArn:CreateImageBuilder' :: Maybe Text
imageArn = Maybe Text
a} :: CreateImageBuilder)

-- | The image builder name to display.
createImageBuilder_displayName :: Lens.Lens' CreateImageBuilder (Prelude.Maybe Prelude.Text)
createImageBuilder_displayName :: (Maybe Text -> f (Maybe Text))
-> CreateImageBuilder -> f CreateImageBuilder
createImageBuilder_displayName = (CreateImageBuilder -> Maybe Text)
-> (CreateImageBuilder -> Maybe Text -> CreateImageBuilder)
-> Lens
     CreateImageBuilder CreateImageBuilder (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateImageBuilder' {Maybe Text
displayName :: Maybe Text
$sel:displayName:CreateImageBuilder' :: CreateImageBuilder -> Maybe Text
displayName} -> Maybe Text
displayName) (\s :: CreateImageBuilder
s@CreateImageBuilder' {} Maybe Text
a -> CreateImageBuilder
s {$sel:displayName:CreateImageBuilder' :: Maybe Text
displayName = Maybe Text
a} :: CreateImageBuilder)

-- | Enables or disables default internet access for the image builder.
createImageBuilder_enableDefaultInternetAccess :: Lens.Lens' CreateImageBuilder (Prelude.Maybe Prelude.Bool)
createImageBuilder_enableDefaultInternetAccess :: (Maybe Bool -> f (Maybe Bool))
-> CreateImageBuilder -> f CreateImageBuilder
createImageBuilder_enableDefaultInternetAccess = (CreateImageBuilder -> Maybe Bool)
-> (CreateImageBuilder -> Maybe Bool -> CreateImageBuilder)
-> Lens
     CreateImageBuilder CreateImageBuilder (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateImageBuilder' {Maybe Bool
enableDefaultInternetAccess :: Maybe Bool
$sel:enableDefaultInternetAccess:CreateImageBuilder' :: CreateImageBuilder -> Maybe Bool
enableDefaultInternetAccess} -> Maybe Bool
enableDefaultInternetAccess) (\s :: CreateImageBuilder
s@CreateImageBuilder' {} Maybe Bool
a -> CreateImageBuilder
s {$sel:enableDefaultInternetAccess:CreateImageBuilder' :: Maybe Bool
enableDefaultInternetAccess = Maybe Bool
a} :: CreateImageBuilder)

-- | The name of the image used to create the image builder.
createImageBuilder_imageName :: Lens.Lens' CreateImageBuilder (Prelude.Maybe Prelude.Text)
createImageBuilder_imageName :: (Maybe Text -> f (Maybe Text))
-> CreateImageBuilder -> f CreateImageBuilder
createImageBuilder_imageName = (CreateImageBuilder -> Maybe Text)
-> (CreateImageBuilder -> Maybe Text -> CreateImageBuilder)
-> Lens
     CreateImageBuilder CreateImageBuilder (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateImageBuilder' {Maybe Text
imageName :: Maybe Text
$sel:imageName:CreateImageBuilder' :: CreateImageBuilder -> Maybe Text
imageName} -> Maybe Text
imageName) (\s :: CreateImageBuilder
s@CreateImageBuilder' {} Maybe Text
a -> CreateImageBuilder
s {$sel:imageName:CreateImageBuilder' :: Maybe Text
imageName = Maybe Text
a} :: CreateImageBuilder)

-- | The description to display.
createImageBuilder_description :: Lens.Lens' CreateImageBuilder (Prelude.Maybe Prelude.Text)
createImageBuilder_description :: (Maybe Text -> f (Maybe Text))
-> CreateImageBuilder -> f CreateImageBuilder
createImageBuilder_description = (CreateImageBuilder -> Maybe Text)
-> (CreateImageBuilder -> Maybe Text -> CreateImageBuilder)
-> Lens
     CreateImageBuilder CreateImageBuilder (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateImageBuilder' {Maybe Text
description :: Maybe Text
$sel:description:CreateImageBuilder' :: CreateImageBuilder -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateImageBuilder
s@CreateImageBuilder' {} Maybe Text
a -> CreateImageBuilder
s {$sel:description:CreateImageBuilder' :: Maybe Text
description = Maybe Text
a} :: CreateImageBuilder)

-- | The version of the AppStream 2.0 agent to use for this image builder. To
-- use the latest version of the AppStream 2.0 agent, specify [LATEST].
createImageBuilder_appstreamAgentVersion :: Lens.Lens' CreateImageBuilder (Prelude.Maybe Prelude.Text)
createImageBuilder_appstreamAgentVersion :: (Maybe Text -> f (Maybe Text))
-> CreateImageBuilder -> f CreateImageBuilder
createImageBuilder_appstreamAgentVersion = (CreateImageBuilder -> Maybe Text)
-> (CreateImageBuilder -> Maybe Text -> CreateImageBuilder)
-> Lens
     CreateImageBuilder CreateImageBuilder (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateImageBuilder' {Maybe Text
appstreamAgentVersion :: Maybe Text
$sel:appstreamAgentVersion:CreateImageBuilder' :: CreateImageBuilder -> Maybe Text
appstreamAgentVersion} -> Maybe Text
appstreamAgentVersion) (\s :: CreateImageBuilder
s@CreateImageBuilder' {} Maybe Text
a -> CreateImageBuilder
s {$sel:appstreamAgentVersion:CreateImageBuilder' :: Maybe Text
appstreamAgentVersion = Maybe Text
a} :: CreateImageBuilder)

-- | The tags to associate with the image builder. A tag is a key-value pair,
-- and the value is optional. For example, Environment=Test. If you do not
-- specify a value, Environment=.
--
-- Generally allowed characters are: letters, numbers, and spaces
-- representable in UTF-8, and the following special characters:
--
-- _ . : \/ = + \\ - \@
--
-- If you do not specify a value, the value is set to an empty string.
--
-- For more information about tags, see
-- <https://docs.aws.amazon.com/appstream2/latest/developerguide/tagging-basic.html Tagging Your Resources>
-- in the /Amazon AppStream 2.0 Administration Guide/.
createImageBuilder_tags :: Lens.Lens' CreateImageBuilder (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createImageBuilder_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateImageBuilder -> f CreateImageBuilder
createImageBuilder_tags = (CreateImageBuilder -> Maybe (HashMap Text Text))
-> (CreateImageBuilder
    -> Maybe (HashMap Text Text) -> CreateImageBuilder)
-> Lens
     CreateImageBuilder
     CreateImageBuilder
     (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 (\CreateImageBuilder' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateImageBuilder' :: CreateImageBuilder -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateImageBuilder
s@CreateImageBuilder' {} Maybe (HashMap Text Text)
a -> CreateImageBuilder
s {$sel:tags:CreateImageBuilder' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateImageBuilder) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> CreateImageBuilder -> f CreateImageBuilder)
-> ((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)))
-> CreateImageBuilder
-> f CreateImageBuilder
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

-- | A unique name for the image builder.
createImageBuilder_name :: Lens.Lens' CreateImageBuilder Prelude.Text
createImageBuilder_name :: (Text -> f Text) -> CreateImageBuilder -> f CreateImageBuilder
createImageBuilder_name = (CreateImageBuilder -> Text)
-> (CreateImageBuilder -> Text -> CreateImageBuilder)
-> Lens CreateImageBuilder CreateImageBuilder Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateImageBuilder' {Text
name :: Text
$sel:name:CreateImageBuilder' :: CreateImageBuilder -> Text
name} -> Text
name) (\s :: CreateImageBuilder
s@CreateImageBuilder' {} Text
a -> CreateImageBuilder
s {$sel:name:CreateImageBuilder' :: Text
name = Text
a} :: CreateImageBuilder)

-- | The instance type to use when launching the image builder. The following
-- instance types are available:
--
-- -   stream.standard.small
--
-- -   stream.standard.medium
--
-- -   stream.standard.large
--
-- -   stream.compute.large
--
-- -   stream.compute.xlarge
--
-- -   stream.compute.2xlarge
--
-- -   stream.compute.4xlarge
--
-- -   stream.compute.8xlarge
--
-- -   stream.memory.large
--
-- -   stream.memory.xlarge
--
-- -   stream.memory.2xlarge
--
-- -   stream.memory.4xlarge
--
-- -   stream.memory.8xlarge
--
-- -   stream.memory.z1d.large
--
-- -   stream.memory.z1d.xlarge
--
-- -   stream.memory.z1d.2xlarge
--
-- -   stream.memory.z1d.3xlarge
--
-- -   stream.memory.z1d.6xlarge
--
-- -   stream.memory.z1d.12xlarge
--
-- -   stream.graphics-design.large
--
-- -   stream.graphics-design.xlarge
--
-- -   stream.graphics-design.2xlarge
--
-- -   stream.graphics-design.4xlarge
--
-- -   stream.graphics-desktop.2xlarge
--
-- -   stream.graphics.g4dn.xlarge
--
-- -   stream.graphics.g4dn.2xlarge
--
-- -   stream.graphics.g4dn.4xlarge
--
-- -   stream.graphics.g4dn.8xlarge
--
-- -   stream.graphics.g4dn.12xlarge
--
-- -   stream.graphics.g4dn.16xlarge
--
-- -   stream.graphics-pro.4xlarge
--
-- -   stream.graphics-pro.8xlarge
--
-- -   stream.graphics-pro.16xlarge
createImageBuilder_instanceType :: Lens.Lens' CreateImageBuilder Prelude.Text
createImageBuilder_instanceType :: (Text -> f Text) -> CreateImageBuilder -> f CreateImageBuilder
createImageBuilder_instanceType = (CreateImageBuilder -> Text)
-> (CreateImageBuilder -> Text -> CreateImageBuilder)
-> Lens CreateImageBuilder CreateImageBuilder Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateImageBuilder' {Text
instanceType :: Text
$sel:instanceType:CreateImageBuilder' :: CreateImageBuilder -> Text
instanceType} -> Text
instanceType) (\s :: CreateImageBuilder
s@CreateImageBuilder' {} Text
a -> CreateImageBuilder
s {$sel:instanceType:CreateImageBuilder' :: Text
instanceType = Text
a} :: CreateImageBuilder)

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

instance Prelude.NFData CreateImageBuilder

instance Core.ToHeaders CreateImageBuilder where
  toHeaders :: CreateImageBuilder -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateImageBuilder -> 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
"PhotonAdminProxyService.CreateImageBuilder" ::
                          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 CreateImageBuilder where
  toJSON :: CreateImageBuilder -> Value
toJSON CreateImageBuilder' {Maybe Bool
Maybe (NonEmpty AccessEndpoint)
Maybe Text
Maybe (HashMap Text Text)
Maybe DomainJoinInfo
Maybe VpcConfig
Text
instanceType :: Text
name :: Text
tags :: Maybe (HashMap Text Text)
appstreamAgentVersion :: Maybe Text
description :: Maybe Text
imageName :: Maybe Text
enableDefaultInternetAccess :: Maybe Bool
displayName :: Maybe Text
imageArn :: Maybe Text
vpcConfig :: Maybe VpcConfig
accessEndpoints :: Maybe (NonEmpty AccessEndpoint)
iamRoleArn :: Maybe Text
domainJoinInfo :: Maybe DomainJoinInfo
$sel:instanceType:CreateImageBuilder' :: CreateImageBuilder -> Text
$sel:name:CreateImageBuilder' :: CreateImageBuilder -> Text
$sel:tags:CreateImageBuilder' :: CreateImageBuilder -> Maybe (HashMap Text Text)
$sel:appstreamAgentVersion:CreateImageBuilder' :: CreateImageBuilder -> Maybe Text
$sel:description:CreateImageBuilder' :: CreateImageBuilder -> Maybe Text
$sel:imageName:CreateImageBuilder' :: CreateImageBuilder -> Maybe Text
$sel:enableDefaultInternetAccess:CreateImageBuilder' :: CreateImageBuilder -> Maybe Bool
$sel:displayName:CreateImageBuilder' :: CreateImageBuilder -> Maybe Text
$sel:imageArn:CreateImageBuilder' :: CreateImageBuilder -> Maybe Text
$sel:vpcConfig:CreateImageBuilder' :: CreateImageBuilder -> Maybe VpcConfig
$sel:accessEndpoints:CreateImageBuilder' :: CreateImageBuilder -> Maybe (NonEmpty AccessEndpoint)
$sel:iamRoleArn:CreateImageBuilder' :: CreateImageBuilder -> Maybe Text
$sel:domainJoinInfo:CreateImageBuilder' :: CreateImageBuilder -> Maybe DomainJoinInfo
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"DomainJoinInfo" Text -> DomainJoinInfo -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (DomainJoinInfo -> Pair) -> Maybe DomainJoinInfo -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe DomainJoinInfo
domainJoinInfo,
            (Text
"IamRoleArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
iamRoleArn,
            (Text
"AccessEndpoints" Text -> NonEmpty AccessEndpoint -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (NonEmpty AccessEndpoint -> Pair)
-> Maybe (NonEmpty AccessEndpoint) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty AccessEndpoint)
accessEndpoints,
            (Text
"VpcConfig" Text -> VpcConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (VpcConfig -> Pair) -> Maybe VpcConfig -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe VpcConfig
vpcConfig,
            (Text
"ImageArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
imageArn,
            (Text
"DisplayName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
displayName,
            (Text
"EnableDefaultInternetAccess" 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
enableDefaultInternetAccess,
            (Text
"ImageName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
imageName,
            (Text
"Description" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description,
            (Text
"AppstreamAgentVersion" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
appstreamAgentVersion,
            (Text
"Tags" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"InstanceType" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
instanceType)
          ]
      )

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

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

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

-- |
-- Create a value of 'CreateImageBuilderResponse' 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:
--
-- 'imageBuilder', 'createImageBuilderResponse_imageBuilder' - Information about the image builder.
--
-- 'httpStatus', 'createImageBuilderResponse_httpStatus' - The response's http status code.
newCreateImageBuilderResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateImageBuilderResponse
newCreateImageBuilderResponse :: Int -> CreateImageBuilderResponse
newCreateImageBuilderResponse Int
pHttpStatus_ =
  CreateImageBuilderResponse' :: Maybe ImageBuilder -> Int -> CreateImageBuilderResponse
CreateImageBuilderResponse'
    { $sel:imageBuilder:CreateImageBuilderResponse' :: Maybe ImageBuilder
imageBuilder =
        Maybe ImageBuilder
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateImageBuilderResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Information about the image builder.
createImageBuilderResponse_imageBuilder :: Lens.Lens' CreateImageBuilderResponse (Prelude.Maybe ImageBuilder)
createImageBuilderResponse_imageBuilder :: (Maybe ImageBuilder -> f (Maybe ImageBuilder))
-> CreateImageBuilderResponse -> f CreateImageBuilderResponse
createImageBuilderResponse_imageBuilder = (CreateImageBuilderResponse -> Maybe ImageBuilder)
-> (CreateImageBuilderResponse
    -> Maybe ImageBuilder -> CreateImageBuilderResponse)
-> Lens
     CreateImageBuilderResponse
     CreateImageBuilderResponse
     (Maybe ImageBuilder)
     (Maybe ImageBuilder)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateImageBuilderResponse' {Maybe ImageBuilder
imageBuilder :: Maybe ImageBuilder
$sel:imageBuilder:CreateImageBuilderResponse' :: CreateImageBuilderResponse -> Maybe ImageBuilder
imageBuilder} -> Maybe ImageBuilder
imageBuilder) (\s :: CreateImageBuilderResponse
s@CreateImageBuilderResponse' {} Maybe ImageBuilder
a -> CreateImageBuilderResponse
s {$sel:imageBuilder:CreateImageBuilderResponse' :: Maybe ImageBuilder
imageBuilder = Maybe ImageBuilder
a} :: CreateImageBuilderResponse)

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

instance Prelude.NFData CreateImageBuilderResponse