{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# 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.Types.ImageBuilder
-- 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)
module Amazonka.AppStream.Types.ImageBuilder where

import Amazonka.AppStream.Types.AccessEndpoint
import Amazonka.AppStream.Types.DomainJoinInfo
import Amazonka.AppStream.Types.ImageBuilderState
import Amazonka.AppStream.Types.ImageBuilderStateChangeReason
import Amazonka.AppStream.Types.NetworkAccessConfiguration
import Amazonka.AppStream.Types.PlatformType
import Amazonka.AppStream.Types.ResourceError
import Amazonka.AppStream.Types.VpcConfig
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Describes a virtual machine that is used to create an image.
--
-- /See:/ 'newImageBuilder' smart constructor.
data ImageBuilder = ImageBuilder'
  { -- | The name of the directory and organizational unit (OU) to use to join
    -- the image builder to a Microsoft Active Directory domain.
    ImageBuilder -> Maybe DomainJoinInfo
domainJoinInfo :: Prelude.Maybe DomainJoinInfo,
    -- | The ARN of the IAM role that is applied 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/.
    ImageBuilder -> Maybe Text
iamRoleArn :: Prelude.Maybe Prelude.Text,
    -- | The state of the image builder.
    ImageBuilder -> Maybe ImageBuilderState
state :: Prelude.Maybe ImageBuilderState,
    -- | The operating system platform of the image builder.
    ImageBuilder -> Maybe PlatformType
platform :: Prelude.Maybe PlatformType,
    ImageBuilder -> Maybe NetworkAccessConfiguration
networkAccessConfiguration :: Prelude.Maybe NetworkAccessConfiguration,
    -- | The reason why the last state change occurred.
    ImageBuilder -> Maybe ImageBuilderStateChangeReason
stateChangeReason :: Prelude.Maybe ImageBuilderStateChangeReason,
    -- | The ARN for the image builder.
    ImageBuilder -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The time stamp when the image builder was created.
    ImageBuilder -> Maybe POSIX
createdTime :: Prelude.Maybe Core.POSIX,
    -- | The image builder errors.
    ImageBuilder -> Maybe [ResourceError]
imageBuilderErrors :: Prelude.Maybe [ResourceError],
    -- | The instance type for 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
    ImageBuilder -> Maybe Text
instanceType :: Prelude.Maybe Prelude.Text,
    -- | The list of virtual private cloud (VPC) interface endpoint objects.
    -- Administrators can connect to the image builder only through the
    -- specified endpoints.
    ImageBuilder -> Maybe (NonEmpty AccessEndpoint)
accessEndpoints :: Prelude.Maybe (Prelude.NonEmpty AccessEndpoint),
    -- | The VPC configuration of the image builder.
    ImageBuilder -> Maybe VpcConfig
vpcConfig :: Prelude.Maybe VpcConfig,
    -- | The ARN of the image from which this builder was created.
    ImageBuilder -> Maybe Text
imageArn :: Prelude.Maybe Prelude.Text,
    -- | The image builder name to display.
    ImageBuilder -> Maybe Text
displayName :: Prelude.Maybe Prelude.Text,
    -- | Enables or disables default internet access for the image builder.
    ImageBuilder -> Maybe Bool
enableDefaultInternetAccess :: Prelude.Maybe Prelude.Bool,
    -- | The description to display.
    ImageBuilder -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The version of the AppStream 2.0 agent that is currently being used by
    -- the image builder.
    ImageBuilder -> Maybe Text
appstreamAgentVersion :: Prelude.Maybe Prelude.Text,
    -- | The name of the image builder.
    ImageBuilder -> Text
name :: Prelude.Text
  }
  deriving (ImageBuilder -> ImageBuilder -> Bool
(ImageBuilder -> ImageBuilder -> Bool)
-> (ImageBuilder -> ImageBuilder -> Bool) -> Eq ImageBuilder
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ImageBuilder -> ImageBuilder -> Bool
$c/= :: ImageBuilder -> ImageBuilder -> Bool
== :: ImageBuilder -> ImageBuilder -> Bool
$c== :: ImageBuilder -> ImageBuilder -> Bool
Prelude.Eq, ReadPrec [ImageBuilder]
ReadPrec ImageBuilder
Int -> ReadS ImageBuilder
ReadS [ImageBuilder]
(Int -> ReadS ImageBuilder)
-> ReadS [ImageBuilder]
-> ReadPrec ImageBuilder
-> ReadPrec [ImageBuilder]
-> Read ImageBuilder
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ImageBuilder]
$creadListPrec :: ReadPrec [ImageBuilder]
readPrec :: ReadPrec ImageBuilder
$creadPrec :: ReadPrec ImageBuilder
readList :: ReadS [ImageBuilder]
$creadList :: ReadS [ImageBuilder]
readsPrec :: Int -> ReadS ImageBuilder
$creadsPrec :: Int -> ReadS ImageBuilder
Prelude.Read, Int -> ImageBuilder -> ShowS
[ImageBuilder] -> ShowS
ImageBuilder -> String
(Int -> ImageBuilder -> ShowS)
-> (ImageBuilder -> String)
-> ([ImageBuilder] -> ShowS)
-> Show ImageBuilder
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ImageBuilder] -> ShowS
$cshowList :: [ImageBuilder] -> ShowS
show :: ImageBuilder -> String
$cshow :: ImageBuilder -> String
showsPrec :: Int -> ImageBuilder -> ShowS
$cshowsPrec :: Int -> ImageBuilder -> ShowS
Prelude.Show, (forall x. ImageBuilder -> Rep ImageBuilder x)
-> (forall x. Rep ImageBuilder x -> ImageBuilder)
-> Generic ImageBuilder
forall x. Rep ImageBuilder x -> ImageBuilder
forall x. ImageBuilder -> Rep ImageBuilder x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ImageBuilder x -> ImageBuilder
$cfrom :: forall x. ImageBuilder -> Rep ImageBuilder x
Prelude.Generic)

-- |
-- Create a value of 'ImageBuilder' 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', 'imageBuilder_domainJoinInfo' - The name of the directory and organizational unit (OU) to use to join
-- the image builder to a Microsoft Active Directory domain.
--
-- 'iamRoleArn', 'imageBuilder_iamRoleArn' - The ARN of the IAM role that is applied 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/.
--
-- 'state', 'imageBuilder_state' - The state of the image builder.
--
-- 'platform', 'imageBuilder_platform' - The operating system platform of the image builder.
--
-- 'networkAccessConfiguration', 'imageBuilder_networkAccessConfiguration' - Undocumented member.
--
-- 'stateChangeReason', 'imageBuilder_stateChangeReason' - The reason why the last state change occurred.
--
-- 'arn', 'imageBuilder_arn' - The ARN for the image builder.
--
-- 'createdTime', 'imageBuilder_createdTime' - The time stamp when the image builder was created.
--
-- 'imageBuilderErrors', 'imageBuilder_imageBuilderErrors' - The image builder errors.
--
-- 'instanceType', 'imageBuilder_instanceType' - The instance type for 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
--
-- 'accessEndpoints', 'imageBuilder_accessEndpoints' - The list of virtual private cloud (VPC) interface endpoint objects.
-- Administrators can connect to the image builder only through the
-- specified endpoints.
--
-- 'vpcConfig', 'imageBuilder_vpcConfig' - The VPC configuration of the image builder.
--
-- 'imageArn', 'imageBuilder_imageArn' - The ARN of the image from which this builder was created.
--
-- 'displayName', 'imageBuilder_displayName' - The image builder name to display.
--
-- 'enableDefaultInternetAccess', 'imageBuilder_enableDefaultInternetAccess' - Enables or disables default internet access for the image builder.
--
-- 'description', 'imageBuilder_description' - The description to display.
--
-- 'appstreamAgentVersion', 'imageBuilder_appstreamAgentVersion' - The version of the AppStream 2.0 agent that is currently being used by
-- the image builder.
--
-- 'name', 'imageBuilder_name' - The name of the image builder.
newImageBuilder ::
  -- | 'name'
  Prelude.Text ->
  ImageBuilder
newImageBuilder :: Text -> ImageBuilder
newImageBuilder Text
pName_ =
  ImageBuilder' :: Maybe DomainJoinInfo
-> Maybe Text
-> Maybe ImageBuilderState
-> Maybe PlatformType
-> Maybe NetworkAccessConfiguration
-> Maybe ImageBuilderStateChangeReason
-> Maybe Text
-> Maybe POSIX
-> Maybe [ResourceError]
-> Maybe Text
-> Maybe (NonEmpty AccessEndpoint)
-> Maybe VpcConfig
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Text
-> ImageBuilder
ImageBuilder'
    { $sel:domainJoinInfo:ImageBuilder' :: Maybe DomainJoinInfo
domainJoinInfo = Maybe DomainJoinInfo
forall a. Maybe a
Prelude.Nothing,
      $sel:iamRoleArn:ImageBuilder' :: Maybe Text
iamRoleArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:state:ImageBuilder' :: Maybe ImageBuilderState
state = Maybe ImageBuilderState
forall a. Maybe a
Prelude.Nothing,
      $sel:platform:ImageBuilder' :: Maybe PlatformType
platform = Maybe PlatformType
forall a. Maybe a
Prelude.Nothing,
      $sel:networkAccessConfiguration:ImageBuilder' :: Maybe NetworkAccessConfiguration
networkAccessConfiguration = Maybe NetworkAccessConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:stateChangeReason:ImageBuilder' :: Maybe ImageBuilderStateChangeReason
stateChangeReason = Maybe ImageBuilderStateChangeReason
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:ImageBuilder' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:createdTime:ImageBuilder' :: Maybe POSIX
createdTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
      $sel:imageBuilderErrors:ImageBuilder' :: Maybe [ResourceError]
imageBuilderErrors = Maybe [ResourceError]
forall a. Maybe a
Prelude.Nothing,
      $sel:instanceType:ImageBuilder' :: Maybe Text
instanceType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:accessEndpoints:ImageBuilder' :: Maybe (NonEmpty AccessEndpoint)
accessEndpoints = Maybe (NonEmpty AccessEndpoint)
forall a. Maybe a
Prelude.Nothing,
      $sel:vpcConfig:ImageBuilder' :: Maybe VpcConfig
vpcConfig = Maybe VpcConfig
forall a. Maybe a
Prelude.Nothing,
      $sel:imageArn:ImageBuilder' :: Maybe Text
imageArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:displayName:ImageBuilder' :: Maybe Text
displayName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:enableDefaultInternetAccess:ImageBuilder' :: Maybe Bool
enableDefaultInternetAccess = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:description:ImageBuilder' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:appstreamAgentVersion:ImageBuilder' :: Maybe Text
appstreamAgentVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:ImageBuilder' :: Text
name = Text
pName_
    }

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

-- | The ARN of the IAM role that is applied 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/.
imageBuilder_iamRoleArn :: Lens.Lens' ImageBuilder (Prelude.Maybe Prelude.Text)
imageBuilder_iamRoleArn :: (Maybe Text -> f (Maybe Text)) -> ImageBuilder -> f ImageBuilder
imageBuilder_iamRoleArn = (ImageBuilder -> Maybe Text)
-> (ImageBuilder -> Maybe Text -> ImageBuilder)
-> Lens ImageBuilder ImageBuilder (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImageBuilder' {Maybe Text
iamRoleArn :: Maybe Text
$sel:iamRoleArn:ImageBuilder' :: ImageBuilder -> Maybe Text
iamRoleArn} -> Maybe Text
iamRoleArn) (\s :: ImageBuilder
s@ImageBuilder' {} Maybe Text
a -> ImageBuilder
s {$sel:iamRoleArn:ImageBuilder' :: Maybe Text
iamRoleArn = Maybe Text
a} :: ImageBuilder)

-- | The state of the image builder.
imageBuilder_state :: Lens.Lens' ImageBuilder (Prelude.Maybe ImageBuilderState)
imageBuilder_state :: (Maybe ImageBuilderState -> f (Maybe ImageBuilderState))
-> ImageBuilder -> f ImageBuilder
imageBuilder_state = (ImageBuilder -> Maybe ImageBuilderState)
-> (ImageBuilder -> Maybe ImageBuilderState -> ImageBuilder)
-> Lens
     ImageBuilder
     ImageBuilder
     (Maybe ImageBuilderState)
     (Maybe ImageBuilderState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImageBuilder' {Maybe ImageBuilderState
state :: Maybe ImageBuilderState
$sel:state:ImageBuilder' :: ImageBuilder -> Maybe ImageBuilderState
state} -> Maybe ImageBuilderState
state) (\s :: ImageBuilder
s@ImageBuilder' {} Maybe ImageBuilderState
a -> ImageBuilder
s {$sel:state:ImageBuilder' :: Maybe ImageBuilderState
state = Maybe ImageBuilderState
a} :: ImageBuilder)

-- | The operating system platform of the image builder.
imageBuilder_platform :: Lens.Lens' ImageBuilder (Prelude.Maybe PlatformType)
imageBuilder_platform :: (Maybe PlatformType -> f (Maybe PlatformType))
-> ImageBuilder -> f ImageBuilder
imageBuilder_platform = (ImageBuilder -> Maybe PlatformType)
-> (ImageBuilder -> Maybe PlatformType -> ImageBuilder)
-> Lens
     ImageBuilder ImageBuilder (Maybe PlatformType) (Maybe PlatformType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImageBuilder' {Maybe PlatformType
platform :: Maybe PlatformType
$sel:platform:ImageBuilder' :: ImageBuilder -> Maybe PlatformType
platform} -> Maybe PlatformType
platform) (\s :: ImageBuilder
s@ImageBuilder' {} Maybe PlatformType
a -> ImageBuilder
s {$sel:platform:ImageBuilder' :: Maybe PlatformType
platform = Maybe PlatformType
a} :: ImageBuilder)

-- | Undocumented member.
imageBuilder_networkAccessConfiguration :: Lens.Lens' ImageBuilder (Prelude.Maybe NetworkAccessConfiguration)
imageBuilder_networkAccessConfiguration :: (Maybe NetworkAccessConfiguration
 -> f (Maybe NetworkAccessConfiguration))
-> ImageBuilder -> f ImageBuilder
imageBuilder_networkAccessConfiguration = (ImageBuilder -> Maybe NetworkAccessConfiguration)
-> (ImageBuilder
    -> Maybe NetworkAccessConfiguration -> ImageBuilder)
-> Lens
     ImageBuilder
     ImageBuilder
     (Maybe NetworkAccessConfiguration)
     (Maybe NetworkAccessConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImageBuilder' {Maybe NetworkAccessConfiguration
networkAccessConfiguration :: Maybe NetworkAccessConfiguration
$sel:networkAccessConfiguration:ImageBuilder' :: ImageBuilder -> Maybe NetworkAccessConfiguration
networkAccessConfiguration} -> Maybe NetworkAccessConfiguration
networkAccessConfiguration) (\s :: ImageBuilder
s@ImageBuilder' {} Maybe NetworkAccessConfiguration
a -> ImageBuilder
s {$sel:networkAccessConfiguration:ImageBuilder' :: Maybe NetworkAccessConfiguration
networkAccessConfiguration = Maybe NetworkAccessConfiguration
a} :: ImageBuilder)

-- | The reason why the last state change occurred.
imageBuilder_stateChangeReason :: Lens.Lens' ImageBuilder (Prelude.Maybe ImageBuilderStateChangeReason)
imageBuilder_stateChangeReason :: (Maybe ImageBuilderStateChangeReason
 -> f (Maybe ImageBuilderStateChangeReason))
-> ImageBuilder -> f ImageBuilder
imageBuilder_stateChangeReason = (ImageBuilder -> Maybe ImageBuilderStateChangeReason)
-> (ImageBuilder
    -> Maybe ImageBuilderStateChangeReason -> ImageBuilder)
-> Lens
     ImageBuilder
     ImageBuilder
     (Maybe ImageBuilderStateChangeReason)
     (Maybe ImageBuilderStateChangeReason)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImageBuilder' {Maybe ImageBuilderStateChangeReason
stateChangeReason :: Maybe ImageBuilderStateChangeReason
$sel:stateChangeReason:ImageBuilder' :: ImageBuilder -> Maybe ImageBuilderStateChangeReason
stateChangeReason} -> Maybe ImageBuilderStateChangeReason
stateChangeReason) (\s :: ImageBuilder
s@ImageBuilder' {} Maybe ImageBuilderStateChangeReason
a -> ImageBuilder
s {$sel:stateChangeReason:ImageBuilder' :: Maybe ImageBuilderStateChangeReason
stateChangeReason = Maybe ImageBuilderStateChangeReason
a} :: ImageBuilder)

-- | The ARN for the image builder.
imageBuilder_arn :: Lens.Lens' ImageBuilder (Prelude.Maybe Prelude.Text)
imageBuilder_arn :: (Maybe Text -> f (Maybe Text)) -> ImageBuilder -> f ImageBuilder
imageBuilder_arn = (ImageBuilder -> Maybe Text)
-> (ImageBuilder -> Maybe Text -> ImageBuilder)
-> Lens ImageBuilder ImageBuilder (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImageBuilder' {Maybe Text
arn :: Maybe Text
$sel:arn:ImageBuilder' :: ImageBuilder -> Maybe Text
arn} -> Maybe Text
arn) (\s :: ImageBuilder
s@ImageBuilder' {} Maybe Text
a -> ImageBuilder
s {$sel:arn:ImageBuilder' :: Maybe Text
arn = Maybe Text
a} :: ImageBuilder)

-- | The time stamp when the image builder was created.
imageBuilder_createdTime :: Lens.Lens' ImageBuilder (Prelude.Maybe Prelude.UTCTime)
imageBuilder_createdTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ImageBuilder -> f ImageBuilder
imageBuilder_createdTime = (ImageBuilder -> Maybe POSIX)
-> (ImageBuilder -> Maybe POSIX -> ImageBuilder)
-> Lens ImageBuilder ImageBuilder (Maybe POSIX) (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImageBuilder' {Maybe POSIX
createdTime :: Maybe POSIX
$sel:createdTime:ImageBuilder' :: ImageBuilder -> Maybe POSIX
createdTime} -> Maybe POSIX
createdTime) (\s :: ImageBuilder
s@ImageBuilder' {} Maybe POSIX
a -> ImageBuilder
s {$sel:createdTime:ImageBuilder' :: Maybe POSIX
createdTime = Maybe POSIX
a} :: ImageBuilder) ((Maybe POSIX -> f (Maybe POSIX))
 -> ImageBuilder -> f ImageBuilder)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ImageBuilder
-> f ImageBuilder
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

-- | The image builder errors.
imageBuilder_imageBuilderErrors :: Lens.Lens' ImageBuilder (Prelude.Maybe [ResourceError])
imageBuilder_imageBuilderErrors :: (Maybe [ResourceError] -> f (Maybe [ResourceError]))
-> ImageBuilder -> f ImageBuilder
imageBuilder_imageBuilderErrors = (ImageBuilder -> Maybe [ResourceError])
-> (ImageBuilder -> Maybe [ResourceError] -> ImageBuilder)
-> Lens
     ImageBuilder
     ImageBuilder
     (Maybe [ResourceError])
     (Maybe [ResourceError])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImageBuilder' {Maybe [ResourceError]
imageBuilderErrors :: Maybe [ResourceError]
$sel:imageBuilderErrors:ImageBuilder' :: ImageBuilder -> Maybe [ResourceError]
imageBuilderErrors} -> Maybe [ResourceError]
imageBuilderErrors) (\s :: ImageBuilder
s@ImageBuilder' {} Maybe [ResourceError]
a -> ImageBuilder
s {$sel:imageBuilderErrors:ImageBuilder' :: Maybe [ResourceError]
imageBuilderErrors = Maybe [ResourceError]
a} :: ImageBuilder) ((Maybe [ResourceError] -> f (Maybe [ResourceError]))
 -> ImageBuilder -> f ImageBuilder)
-> ((Maybe [ResourceError] -> f (Maybe [ResourceError]))
    -> Maybe [ResourceError] -> f (Maybe [ResourceError]))
-> (Maybe [ResourceError] -> f (Maybe [ResourceError]))
-> ImageBuilder
-> f ImageBuilder
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ResourceError] [ResourceError] [ResourceError] [ResourceError]
-> Iso
     (Maybe [ResourceError])
     (Maybe [ResourceError])
     (Maybe [ResourceError])
     (Maybe [ResourceError])
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
  [ResourceError] [ResourceError] [ResourceError] [ResourceError]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The instance type for 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
imageBuilder_instanceType :: Lens.Lens' ImageBuilder (Prelude.Maybe Prelude.Text)
imageBuilder_instanceType :: (Maybe Text -> f (Maybe Text)) -> ImageBuilder -> f ImageBuilder
imageBuilder_instanceType = (ImageBuilder -> Maybe Text)
-> (ImageBuilder -> Maybe Text -> ImageBuilder)
-> Lens ImageBuilder ImageBuilder (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImageBuilder' {Maybe Text
instanceType :: Maybe Text
$sel:instanceType:ImageBuilder' :: ImageBuilder -> Maybe Text
instanceType} -> Maybe Text
instanceType) (\s :: ImageBuilder
s@ImageBuilder' {} Maybe Text
a -> ImageBuilder
s {$sel:instanceType:ImageBuilder' :: Maybe Text
instanceType = Maybe Text
a} :: ImageBuilder)

-- | The list of virtual private cloud (VPC) interface endpoint objects.
-- Administrators can connect to the image builder only through the
-- specified endpoints.
imageBuilder_accessEndpoints :: Lens.Lens' ImageBuilder (Prelude.Maybe (Prelude.NonEmpty AccessEndpoint))
imageBuilder_accessEndpoints :: (Maybe (NonEmpty AccessEndpoint)
 -> f (Maybe (NonEmpty AccessEndpoint)))
-> ImageBuilder -> f ImageBuilder
imageBuilder_accessEndpoints = (ImageBuilder -> Maybe (NonEmpty AccessEndpoint))
-> (ImageBuilder
    -> Maybe (NonEmpty AccessEndpoint) -> ImageBuilder)
-> Lens
     ImageBuilder
     ImageBuilder
     (Maybe (NonEmpty AccessEndpoint))
     (Maybe (NonEmpty AccessEndpoint))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImageBuilder' {Maybe (NonEmpty AccessEndpoint)
accessEndpoints :: Maybe (NonEmpty AccessEndpoint)
$sel:accessEndpoints:ImageBuilder' :: ImageBuilder -> Maybe (NonEmpty AccessEndpoint)
accessEndpoints} -> Maybe (NonEmpty AccessEndpoint)
accessEndpoints) (\s :: ImageBuilder
s@ImageBuilder' {} Maybe (NonEmpty AccessEndpoint)
a -> ImageBuilder
s {$sel:accessEndpoints:ImageBuilder' :: Maybe (NonEmpty AccessEndpoint)
accessEndpoints = Maybe (NonEmpty AccessEndpoint)
a} :: ImageBuilder) ((Maybe (NonEmpty AccessEndpoint)
  -> f (Maybe (NonEmpty AccessEndpoint)))
 -> ImageBuilder -> f ImageBuilder)
-> ((Maybe (NonEmpty AccessEndpoint)
     -> f (Maybe (NonEmpty AccessEndpoint)))
    -> Maybe (NonEmpty AccessEndpoint)
    -> f (Maybe (NonEmpty AccessEndpoint)))
-> (Maybe (NonEmpty AccessEndpoint)
    -> f (Maybe (NonEmpty AccessEndpoint)))
-> ImageBuilder
-> f ImageBuilder
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 of the image builder.
imageBuilder_vpcConfig :: Lens.Lens' ImageBuilder (Prelude.Maybe VpcConfig)
imageBuilder_vpcConfig :: (Maybe VpcConfig -> f (Maybe VpcConfig))
-> ImageBuilder -> f ImageBuilder
imageBuilder_vpcConfig = (ImageBuilder -> Maybe VpcConfig)
-> (ImageBuilder -> Maybe VpcConfig -> ImageBuilder)
-> Lens
     ImageBuilder ImageBuilder (Maybe VpcConfig) (Maybe VpcConfig)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImageBuilder' {Maybe VpcConfig
vpcConfig :: Maybe VpcConfig
$sel:vpcConfig:ImageBuilder' :: ImageBuilder -> Maybe VpcConfig
vpcConfig} -> Maybe VpcConfig
vpcConfig) (\s :: ImageBuilder
s@ImageBuilder' {} Maybe VpcConfig
a -> ImageBuilder
s {$sel:vpcConfig:ImageBuilder' :: Maybe VpcConfig
vpcConfig = Maybe VpcConfig
a} :: ImageBuilder)

-- | The ARN of the image from which this builder was created.
imageBuilder_imageArn :: Lens.Lens' ImageBuilder (Prelude.Maybe Prelude.Text)
imageBuilder_imageArn :: (Maybe Text -> f (Maybe Text)) -> ImageBuilder -> f ImageBuilder
imageBuilder_imageArn = (ImageBuilder -> Maybe Text)
-> (ImageBuilder -> Maybe Text -> ImageBuilder)
-> Lens ImageBuilder ImageBuilder (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImageBuilder' {Maybe Text
imageArn :: Maybe Text
$sel:imageArn:ImageBuilder' :: ImageBuilder -> Maybe Text
imageArn} -> Maybe Text
imageArn) (\s :: ImageBuilder
s@ImageBuilder' {} Maybe Text
a -> ImageBuilder
s {$sel:imageArn:ImageBuilder' :: Maybe Text
imageArn = Maybe Text
a} :: ImageBuilder)

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

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

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

-- | The version of the AppStream 2.0 agent that is currently being used by
-- the image builder.
imageBuilder_appstreamAgentVersion :: Lens.Lens' ImageBuilder (Prelude.Maybe Prelude.Text)
imageBuilder_appstreamAgentVersion :: (Maybe Text -> f (Maybe Text)) -> ImageBuilder -> f ImageBuilder
imageBuilder_appstreamAgentVersion = (ImageBuilder -> Maybe Text)
-> (ImageBuilder -> Maybe Text -> ImageBuilder)
-> Lens ImageBuilder ImageBuilder (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImageBuilder' {Maybe Text
appstreamAgentVersion :: Maybe Text
$sel:appstreamAgentVersion:ImageBuilder' :: ImageBuilder -> Maybe Text
appstreamAgentVersion} -> Maybe Text
appstreamAgentVersion) (\s :: ImageBuilder
s@ImageBuilder' {} Maybe Text
a -> ImageBuilder
s {$sel:appstreamAgentVersion:ImageBuilder' :: Maybe Text
appstreamAgentVersion = Maybe Text
a} :: ImageBuilder)

-- | The name of the image builder.
imageBuilder_name :: Lens.Lens' ImageBuilder Prelude.Text
imageBuilder_name :: (Text -> f Text) -> ImageBuilder -> f ImageBuilder
imageBuilder_name = (ImageBuilder -> Text)
-> (ImageBuilder -> Text -> ImageBuilder)
-> Lens ImageBuilder ImageBuilder Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImageBuilder' {Text
name :: Text
$sel:name:ImageBuilder' :: ImageBuilder -> Text
name} -> Text
name) (\s :: ImageBuilder
s@ImageBuilder' {} Text
a -> ImageBuilder
s {$sel:name:ImageBuilder' :: Text
name = Text
a} :: ImageBuilder)

instance Core.FromJSON ImageBuilder where
  parseJSON :: Value -> Parser ImageBuilder
parseJSON =
    String
-> (Object -> Parser ImageBuilder) -> Value -> Parser ImageBuilder
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ImageBuilder"
      ( \Object
x ->
          Maybe DomainJoinInfo
-> Maybe Text
-> Maybe ImageBuilderState
-> Maybe PlatformType
-> Maybe NetworkAccessConfiguration
-> Maybe ImageBuilderStateChangeReason
-> Maybe Text
-> Maybe POSIX
-> Maybe [ResourceError]
-> Maybe Text
-> Maybe (NonEmpty AccessEndpoint)
-> Maybe VpcConfig
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Text
-> ImageBuilder
ImageBuilder'
            (Maybe DomainJoinInfo
 -> Maybe Text
 -> Maybe ImageBuilderState
 -> Maybe PlatformType
 -> Maybe NetworkAccessConfiguration
 -> Maybe ImageBuilderStateChangeReason
 -> Maybe Text
 -> Maybe POSIX
 -> Maybe [ResourceError]
 -> Maybe Text
 -> Maybe (NonEmpty AccessEndpoint)
 -> Maybe VpcConfig
 -> Maybe Text
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Text
 -> Maybe Text
 -> Text
 -> ImageBuilder)
-> Parser (Maybe DomainJoinInfo)
-> Parser
     (Maybe Text
      -> Maybe ImageBuilderState
      -> Maybe PlatformType
      -> Maybe NetworkAccessConfiguration
      -> Maybe ImageBuilderStateChangeReason
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [ResourceError]
      -> Maybe Text
      -> Maybe (NonEmpty AccessEndpoint)
      -> Maybe VpcConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> ImageBuilder)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe DomainJoinInfo)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DomainJoinInfo")
            Parser
  (Maybe Text
   -> Maybe ImageBuilderState
   -> Maybe PlatformType
   -> Maybe NetworkAccessConfiguration
   -> Maybe ImageBuilderStateChangeReason
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [ResourceError]
   -> Maybe Text
   -> Maybe (NonEmpty AccessEndpoint)
   -> Maybe VpcConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> ImageBuilder)
-> Parser (Maybe Text)
-> Parser
     (Maybe ImageBuilderState
      -> Maybe PlatformType
      -> Maybe NetworkAccessConfiguration
      -> Maybe ImageBuilderStateChangeReason
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [ResourceError]
      -> Maybe Text
      -> Maybe (NonEmpty AccessEndpoint)
      -> Maybe VpcConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> ImageBuilder)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IamRoleArn")
            Parser
  (Maybe ImageBuilderState
   -> Maybe PlatformType
   -> Maybe NetworkAccessConfiguration
   -> Maybe ImageBuilderStateChangeReason
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [ResourceError]
   -> Maybe Text
   -> Maybe (NonEmpty AccessEndpoint)
   -> Maybe VpcConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> ImageBuilder)
-> Parser (Maybe ImageBuilderState)
-> Parser
     (Maybe PlatformType
      -> Maybe NetworkAccessConfiguration
      -> Maybe ImageBuilderStateChangeReason
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [ResourceError]
      -> Maybe Text
      -> Maybe (NonEmpty AccessEndpoint)
      -> Maybe VpcConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> ImageBuilder)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ImageBuilderState)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"State")
            Parser
  (Maybe PlatformType
   -> Maybe NetworkAccessConfiguration
   -> Maybe ImageBuilderStateChangeReason
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [ResourceError]
   -> Maybe Text
   -> Maybe (NonEmpty AccessEndpoint)
   -> Maybe VpcConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> ImageBuilder)
-> Parser (Maybe PlatformType)
-> Parser
     (Maybe NetworkAccessConfiguration
      -> Maybe ImageBuilderStateChangeReason
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [ResourceError]
      -> Maybe Text
      -> Maybe (NonEmpty AccessEndpoint)
      -> Maybe VpcConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> ImageBuilder)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe PlatformType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Platform")
            Parser
  (Maybe NetworkAccessConfiguration
   -> Maybe ImageBuilderStateChangeReason
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [ResourceError]
   -> Maybe Text
   -> Maybe (NonEmpty AccessEndpoint)
   -> Maybe VpcConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> ImageBuilder)
-> Parser (Maybe NetworkAccessConfiguration)
-> Parser
     (Maybe ImageBuilderStateChangeReason
      -> Maybe Text
      -> Maybe POSIX
      -> Maybe [ResourceError]
      -> Maybe Text
      -> Maybe (NonEmpty AccessEndpoint)
      -> Maybe VpcConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> ImageBuilder)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe NetworkAccessConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"NetworkAccessConfiguration")
            Parser
  (Maybe ImageBuilderStateChangeReason
   -> Maybe Text
   -> Maybe POSIX
   -> Maybe [ResourceError]
   -> Maybe Text
   -> Maybe (NonEmpty AccessEndpoint)
   -> Maybe VpcConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> ImageBuilder)
-> Parser (Maybe ImageBuilderStateChangeReason)
-> Parser
     (Maybe Text
      -> Maybe POSIX
      -> Maybe [ResourceError]
      -> Maybe Text
      -> Maybe (NonEmpty AccessEndpoint)
      -> Maybe VpcConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> ImageBuilder)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ImageBuilderStateChangeReason)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StateChangeReason")
            Parser
  (Maybe Text
   -> Maybe POSIX
   -> Maybe [ResourceError]
   -> Maybe Text
   -> Maybe (NonEmpty AccessEndpoint)
   -> Maybe VpcConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> ImageBuilder)
-> Parser (Maybe Text)
-> Parser
     (Maybe POSIX
      -> Maybe [ResourceError]
      -> Maybe Text
      -> Maybe (NonEmpty AccessEndpoint)
      -> Maybe VpcConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> ImageBuilder)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Arn")
            Parser
  (Maybe POSIX
   -> Maybe [ResourceError]
   -> Maybe Text
   -> Maybe (NonEmpty AccessEndpoint)
   -> Maybe VpcConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> ImageBuilder)
-> Parser (Maybe POSIX)
-> Parser
     (Maybe [ResourceError]
      -> Maybe Text
      -> Maybe (NonEmpty AccessEndpoint)
      -> Maybe VpcConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> ImageBuilder)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"CreatedTime")
            Parser
  (Maybe [ResourceError]
   -> Maybe Text
   -> Maybe (NonEmpty AccessEndpoint)
   -> Maybe VpcConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> ImageBuilder)
-> Parser (Maybe [ResourceError])
-> Parser
     (Maybe Text
      -> Maybe (NonEmpty AccessEndpoint)
      -> Maybe VpcConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> ImageBuilder)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [ResourceError]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ImageBuilderErrors"
                            Parser (Maybe (Maybe [ResourceError]))
-> Maybe [ResourceError] -> Parser (Maybe [ResourceError])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [ResourceError]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe Text
   -> Maybe (NonEmpty AccessEndpoint)
   -> Maybe VpcConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> ImageBuilder)
-> Parser (Maybe Text)
-> Parser
     (Maybe (NonEmpty AccessEndpoint)
      -> Maybe VpcConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> ImageBuilder)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"InstanceType")
            Parser
  (Maybe (NonEmpty AccessEndpoint)
   -> Maybe VpcConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> ImageBuilder)
-> Parser (Maybe (NonEmpty AccessEndpoint))
-> Parser
     (Maybe VpcConfig
      -> Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> ImageBuilder)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (NonEmpty AccessEndpoint))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AccessEndpoints")
            Parser
  (Maybe VpcConfig
   -> Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> ImageBuilder)
-> Parser (Maybe VpcConfig)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Text
      -> Maybe Text
      -> Text
      -> ImageBuilder)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe VpcConfig)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"VpcConfig")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Text
   -> Maybe Text
   -> Text
   -> ImageBuilder)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Bool -> Maybe Text -> Maybe Text -> Text -> ImageBuilder)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ImageArn")
            Parser
  (Maybe Text
   -> Maybe Bool -> Maybe Text -> Maybe Text -> Text -> ImageBuilder)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool -> Maybe Text -> Maybe Text -> Text -> ImageBuilder)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DisplayName")
            Parser
  (Maybe Bool -> Maybe Text -> Maybe Text -> Text -> ImageBuilder)
-> Parser (Maybe Bool)
-> Parser (Maybe Text -> Maybe Text -> Text -> ImageBuilder)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"EnableDefaultInternetAccess")
            Parser (Maybe Text -> Maybe Text -> Text -> ImageBuilder)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Text -> ImageBuilder)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Description")
            Parser (Maybe Text -> Text -> ImageBuilder)
-> Parser (Maybe Text) -> Parser (Text -> ImageBuilder)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AppstreamAgentVersion")
            Parser (Text -> ImageBuilder) -> Parser Text -> Parser ImageBuilder
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Name")
      )

instance Prelude.Hashable ImageBuilder

instance Prelude.NFData ImageBuilder