{-# 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.Nimble.Types.LaunchProfile
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Nimble.Types.LaunchProfile where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Nimble.Types.LaunchProfileState
import Amazonka.Nimble.Types.LaunchProfileStatusCode
import Amazonka.Nimble.Types.StreamConfiguration
import Amazonka.Nimble.Types.ValidationResult
import qualified Amazonka.Prelude as Prelude

-- | A launch profile controls your artist workforce’s access to studio
-- components, like compute farms, shared file systems, managed file
-- systems, and license server configurations, as well as instance types
-- and Amazon Machine Images (AMIs).
--
-- Studio administrators create launch profiles in the Nimble Studio
-- console. Artists can use their launch profiles to launch an instance
-- from the Nimble Studio portal. Each user’s launch profile defines how
-- they can launch a streaming session. By default, studio admins can use
-- all launch profiles.
--
-- /See:/ 'newLaunchProfile' smart constructor.
data LaunchProfile = LaunchProfile'
  { -- | The Amazon Resource Name (ARN) that is assigned to a studio resource and
    -- uniquely identifies it. ARNs are unique across all Regions.
    LaunchProfile -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The ISO timestamp in seconds for when the resource was created.
    LaunchProfile -> Maybe ISO8601
createdAt :: Prelude.Maybe Data.ISO8601,
    -- | The user ID of the user that created the launch profile.
    LaunchProfile -> Maybe Text
createdBy :: Prelude.Maybe Prelude.Text,
    -- | A human-readable description of the launch profile.
    LaunchProfile -> Maybe (Sensitive Text)
description :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | Unique identifiers for a collection of EC2 subnets.
    LaunchProfile -> Maybe [Text]
ec2SubnetIds :: Prelude.Maybe [Prelude.Text],
    -- | The ID of the launch profile used to control access from the streaming
    -- session.
    LaunchProfile -> Maybe Text
launchProfileId :: Prelude.Maybe Prelude.Text,
    -- | The version number of the protocol that is used by the launch profile.
    -- The only valid version is \"2021-03-31\".
    LaunchProfile -> Maybe [Text]
launchProfileProtocolVersions :: Prelude.Maybe [Prelude.Text],
    -- | A friendly name for the launch profile.
    LaunchProfile -> Maybe (Sensitive Text)
name :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | The current state.
    LaunchProfile -> Maybe LaunchProfileState
state :: Prelude.Maybe LaunchProfileState,
    -- | The status code.
    LaunchProfile -> Maybe LaunchProfileStatusCode
statusCode :: Prelude.Maybe LaunchProfileStatusCode,
    -- | The status message for the launch profile.
    LaunchProfile -> Maybe Text
statusMessage :: Prelude.Maybe Prelude.Text,
    -- | A configuration for a streaming session.
    LaunchProfile -> Maybe StreamConfiguration
streamConfiguration :: Prelude.Maybe StreamConfiguration,
    -- | Unique identifiers for a collection of studio components that can be
    -- used with this launch profile.
    LaunchProfile -> Maybe (NonEmpty Text)
studioComponentIds :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
    -- | A collection of labels, in the form of key-value pairs, that apply to
    -- this resource.
    LaunchProfile -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The ISO timestamp in seconds for when the resource was updated.
    LaunchProfile -> Maybe ISO8601
updatedAt :: Prelude.Maybe Data.ISO8601,
    -- | The user ID of the user that most recently updated the resource.
    LaunchProfile -> Maybe Text
updatedBy :: Prelude.Maybe Prelude.Text,
    -- | The list of the latest validation results.
    LaunchProfile -> Maybe [ValidationResult]
validationResults :: Prelude.Maybe [ValidationResult]
  }
  deriving (LaunchProfile -> LaunchProfile -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LaunchProfile -> LaunchProfile -> Bool
$c/= :: LaunchProfile -> LaunchProfile -> Bool
== :: LaunchProfile -> LaunchProfile -> Bool
$c== :: LaunchProfile -> LaunchProfile -> Bool
Prelude.Eq, Int -> LaunchProfile -> ShowS
[LaunchProfile] -> ShowS
LaunchProfile -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LaunchProfile] -> ShowS
$cshowList :: [LaunchProfile] -> ShowS
show :: LaunchProfile -> String
$cshow :: LaunchProfile -> String
showsPrec :: Int -> LaunchProfile -> ShowS
$cshowsPrec :: Int -> LaunchProfile -> ShowS
Prelude.Show, forall x. Rep LaunchProfile x -> LaunchProfile
forall x. LaunchProfile -> Rep LaunchProfile x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LaunchProfile x -> LaunchProfile
$cfrom :: forall x. LaunchProfile -> Rep LaunchProfile x
Prelude.Generic)

-- |
-- Create a value of 'LaunchProfile' 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:
--
-- 'arn', 'launchProfile_arn' - The Amazon Resource Name (ARN) that is assigned to a studio resource and
-- uniquely identifies it. ARNs are unique across all Regions.
--
-- 'createdAt', 'launchProfile_createdAt' - The ISO timestamp in seconds for when the resource was created.
--
-- 'createdBy', 'launchProfile_createdBy' - The user ID of the user that created the launch profile.
--
-- 'description', 'launchProfile_description' - A human-readable description of the launch profile.
--
-- 'ec2SubnetIds', 'launchProfile_ec2SubnetIds' - Unique identifiers for a collection of EC2 subnets.
--
-- 'launchProfileId', 'launchProfile_launchProfileId' - The ID of the launch profile used to control access from the streaming
-- session.
--
-- 'launchProfileProtocolVersions', 'launchProfile_launchProfileProtocolVersions' - The version number of the protocol that is used by the launch profile.
-- The only valid version is \"2021-03-31\".
--
-- 'name', 'launchProfile_name' - A friendly name for the launch profile.
--
-- 'state', 'launchProfile_state' - The current state.
--
-- 'statusCode', 'launchProfile_statusCode' - The status code.
--
-- 'statusMessage', 'launchProfile_statusMessage' - The status message for the launch profile.
--
-- 'streamConfiguration', 'launchProfile_streamConfiguration' - A configuration for a streaming session.
--
-- 'studioComponentIds', 'launchProfile_studioComponentIds' - Unique identifiers for a collection of studio components that can be
-- used with this launch profile.
--
-- 'tags', 'launchProfile_tags' - A collection of labels, in the form of key-value pairs, that apply to
-- this resource.
--
-- 'updatedAt', 'launchProfile_updatedAt' - The ISO timestamp in seconds for when the resource was updated.
--
-- 'updatedBy', 'launchProfile_updatedBy' - The user ID of the user that most recently updated the resource.
--
-- 'validationResults', 'launchProfile_validationResults' - The list of the latest validation results.
newLaunchProfile ::
  LaunchProfile
newLaunchProfile :: LaunchProfile
newLaunchProfile =
  LaunchProfile'
    { $sel:arn:LaunchProfile' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
      $sel:createdAt:LaunchProfile' :: Maybe ISO8601
createdAt = forall a. Maybe a
Prelude.Nothing,
      $sel:createdBy:LaunchProfile' :: Maybe Text
createdBy = forall a. Maybe a
Prelude.Nothing,
      $sel:description:LaunchProfile' :: Maybe (Sensitive Text)
description = forall a. Maybe a
Prelude.Nothing,
      $sel:ec2SubnetIds:LaunchProfile' :: Maybe [Text]
ec2SubnetIds = forall a. Maybe a
Prelude.Nothing,
      $sel:launchProfileId:LaunchProfile' :: Maybe Text
launchProfileId = forall a. Maybe a
Prelude.Nothing,
      $sel:launchProfileProtocolVersions:LaunchProfile' :: Maybe [Text]
launchProfileProtocolVersions = forall a. Maybe a
Prelude.Nothing,
      $sel:name:LaunchProfile' :: Maybe (Sensitive Text)
name = forall a. Maybe a
Prelude.Nothing,
      $sel:state:LaunchProfile' :: Maybe LaunchProfileState
state = forall a. Maybe a
Prelude.Nothing,
      $sel:statusCode:LaunchProfile' :: Maybe LaunchProfileStatusCode
statusCode = forall a. Maybe a
Prelude.Nothing,
      $sel:statusMessage:LaunchProfile' :: Maybe Text
statusMessage = forall a. Maybe a
Prelude.Nothing,
      $sel:streamConfiguration:LaunchProfile' :: Maybe StreamConfiguration
streamConfiguration = forall a. Maybe a
Prelude.Nothing,
      $sel:studioComponentIds:LaunchProfile' :: Maybe (NonEmpty Text)
studioComponentIds = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:LaunchProfile' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
      $sel:updatedAt:LaunchProfile' :: Maybe ISO8601
updatedAt = forall a. Maybe a
Prelude.Nothing,
      $sel:updatedBy:LaunchProfile' :: Maybe Text
updatedBy = forall a. Maybe a
Prelude.Nothing,
      $sel:validationResults:LaunchProfile' :: Maybe [ValidationResult]
validationResults = forall a. Maybe a
Prelude.Nothing
    }

-- | The Amazon Resource Name (ARN) that is assigned to a studio resource and
-- uniquely identifies it. ARNs are unique across all Regions.
launchProfile_arn :: Lens.Lens' LaunchProfile (Prelude.Maybe Prelude.Text)
launchProfile_arn :: Lens' LaunchProfile (Maybe Text)
launchProfile_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchProfile' {Maybe Text
arn :: Maybe Text
$sel:arn:LaunchProfile' :: LaunchProfile -> Maybe Text
arn} -> Maybe Text
arn) (\s :: LaunchProfile
s@LaunchProfile' {} Maybe Text
a -> LaunchProfile
s {$sel:arn:LaunchProfile' :: Maybe Text
arn = Maybe Text
a} :: LaunchProfile)

-- | The ISO timestamp in seconds for when the resource was created.
launchProfile_createdAt :: Lens.Lens' LaunchProfile (Prelude.Maybe Prelude.UTCTime)
launchProfile_createdAt :: Lens' LaunchProfile (Maybe UTCTime)
launchProfile_createdAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchProfile' {Maybe ISO8601
createdAt :: Maybe ISO8601
$sel:createdAt:LaunchProfile' :: LaunchProfile -> Maybe ISO8601
createdAt} -> Maybe ISO8601
createdAt) (\s :: LaunchProfile
s@LaunchProfile' {} Maybe ISO8601
a -> LaunchProfile
s {$sel:createdAt:LaunchProfile' :: Maybe ISO8601
createdAt = Maybe ISO8601
a} :: LaunchProfile) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The user ID of the user that created the launch profile.
launchProfile_createdBy :: Lens.Lens' LaunchProfile (Prelude.Maybe Prelude.Text)
launchProfile_createdBy :: Lens' LaunchProfile (Maybe Text)
launchProfile_createdBy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchProfile' {Maybe Text
createdBy :: Maybe Text
$sel:createdBy:LaunchProfile' :: LaunchProfile -> Maybe Text
createdBy} -> Maybe Text
createdBy) (\s :: LaunchProfile
s@LaunchProfile' {} Maybe Text
a -> LaunchProfile
s {$sel:createdBy:LaunchProfile' :: Maybe Text
createdBy = Maybe Text
a} :: LaunchProfile)

-- | A human-readable description of the launch profile.
launchProfile_description :: Lens.Lens' LaunchProfile (Prelude.Maybe Prelude.Text)
launchProfile_description :: Lens' LaunchProfile (Maybe Text)
launchProfile_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchProfile' {Maybe (Sensitive Text)
description :: Maybe (Sensitive Text)
$sel:description:LaunchProfile' :: LaunchProfile -> Maybe (Sensitive Text)
description} -> Maybe (Sensitive Text)
description) (\s :: LaunchProfile
s@LaunchProfile' {} Maybe (Sensitive Text)
a -> LaunchProfile
s {$sel:description:LaunchProfile' :: Maybe (Sensitive Text)
description = Maybe (Sensitive Text)
a} :: LaunchProfile) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall a. Iso' (Sensitive a) a
Data._Sensitive

-- | Unique identifiers for a collection of EC2 subnets.
launchProfile_ec2SubnetIds :: Lens.Lens' LaunchProfile (Prelude.Maybe [Prelude.Text])
launchProfile_ec2SubnetIds :: Lens' LaunchProfile (Maybe [Text])
launchProfile_ec2SubnetIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchProfile' {Maybe [Text]
ec2SubnetIds :: Maybe [Text]
$sel:ec2SubnetIds:LaunchProfile' :: LaunchProfile -> Maybe [Text]
ec2SubnetIds} -> Maybe [Text]
ec2SubnetIds) (\s :: LaunchProfile
s@LaunchProfile' {} Maybe [Text]
a -> LaunchProfile
s {$sel:ec2SubnetIds:LaunchProfile' :: Maybe [Text]
ec2SubnetIds = Maybe [Text]
a} :: LaunchProfile) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The ID of the launch profile used to control access from the streaming
-- session.
launchProfile_launchProfileId :: Lens.Lens' LaunchProfile (Prelude.Maybe Prelude.Text)
launchProfile_launchProfileId :: Lens' LaunchProfile (Maybe Text)
launchProfile_launchProfileId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchProfile' {Maybe Text
launchProfileId :: Maybe Text
$sel:launchProfileId:LaunchProfile' :: LaunchProfile -> Maybe Text
launchProfileId} -> Maybe Text
launchProfileId) (\s :: LaunchProfile
s@LaunchProfile' {} Maybe Text
a -> LaunchProfile
s {$sel:launchProfileId:LaunchProfile' :: Maybe Text
launchProfileId = Maybe Text
a} :: LaunchProfile)

-- | The version number of the protocol that is used by the launch profile.
-- The only valid version is \"2021-03-31\".
launchProfile_launchProfileProtocolVersions :: Lens.Lens' LaunchProfile (Prelude.Maybe [Prelude.Text])
launchProfile_launchProfileProtocolVersions :: Lens' LaunchProfile (Maybe [Text])
launchProfile_launchProfileProtocolVersions = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchProfile' {Maybe [Text]
launchProfileProtocolVersions :: Maybe [Text]
$sel:launchProfileProtocolVersions:LaunchProfile' :: LaunchProfile -> Maybe [Text]
launchProfileProtocolVersions} -> Maybe [Text]
launchProfileProtocolVersions) (\s :: LaunchProfile
s@LaunchProfile' {} Maybe [Text]
a -> LaunchProfile
s {$sel:launchProfileProtocolVersions:LaunchProfile' :: Maybe [Text]
launchProfileProtocolVersions = Maybe [Text]
a} :: LaunchProfile) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A friendly name for the launch profile.
launchProfile_name :: Lens.Lens' LaunchProfile (Prelude.Maybe Prelude.Text)
launchProfile_name :: Lens' LaunchProfile (Maybe Text)
launchProfile_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchProfile' {Maybe (Sensitive Text)
name :: Maybe (Sensitive Text)
$sel:name:LaunchProfile' :: LaunchProfile -> Maybe (Sensitive Text)
name} -> Maybe (Sensitive Text)
name) (\s :: LaunchProfile
s@LaunchProfile' {} Maybe (Sensitive Text)
a -> LaunchProfile
s {$sel:name:LaunchProfile' :: Maybe (Sensitive Text)
name = Maybe (Sensitive Text)
a} :: LaunchProfile) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall a. Iso' (Sensitive a) a
Data._Sensitive

-- | The current state.
launchProfile_state :: Lens.Lens' LaunchProfile (Prelude.Maybe LaunchProfileState)
launchProfile_state :: Lens' LaunchProfile (Maybe LaunchProfileState)
launchProfile_state = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchProfile' {Maybe LaunchProfileState
state :: Maybe LaunchProfileState
$sel:state:LaunchProfile' :: LaunchProfile -> Maybe LaunchProfileState
state} -> Maybe LaunchProfileState
state) (\s :: LaunchProfile
s@LaunchProfile' {} Maybe LaunchProfileState
a -> LaunchProfile
s {$sel:state:LaunchProfile' :: Maybe LaunchProfileState
state = Maybe LaunchProfileState
a} :: LaunchProfile)

-- | The status code.
launchProfile_statusCode :: Lens.Lens' LaunchProfile (Prelude.Maybe LaunchProfileStatusCode)
launchProfile_statusCode :: Lens' LaunchProfile (Maybe LaunchProfileStatusCode)
launchProfile_statusCode = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchProfile' {Maybe LaunchProfileStatusCode
statusCode :: Maybe LaunchProfileStatusCode
$sel:statusCode:LaunchProfile' :: LaunchProfile -> Maybe LaunchProfileStatusCode
statusCode} -> Maybe LaunchProfileStatusCode
statusCode) (\s :: LaunchProfile
s@LaunchProfile' {} Maybe LaunchProfileStatusCode
a -> LaunchProfile
s {$sel:statusCode:LaunchProfile' :: Maybe LaunchProfileStatusCode
statusCode = Maybe LaunchProfileStatusCode
a} :: LaunchProfile)

-- | The status message for the launch profile.
launchProfile_statusMessage :: Lens.Lens' LaunchProfile (Prelude.Maybe Prelude.Text)
launchProfile_statusMessage :: Lens' LaunchProfile (Maybe Text)
launchProfile_statusMessage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchProfile' {Maybe Text
statusMessage :: Maybe Text
$sel:statusMessage:LaunchProfile' :: LaunchProfile -> Maybe Text
statusMessage} -> Maybe Text
statusMessage) (\s :: LaunchProfile
s@LaunchProfile' {} Maybe Text
a -> LaunchProfile
s {$sel:statusMessage:LaunchProfile' :: Maybe Text
statusMessage = Maybe Text
a} :: LaunchProfile)

-- | A configuration for a streaming session.
launchProfile_streamConfiguration :: Lens.Lens' LaunchProfile (Prelude.Maybe StreamConfiguration)
launchProfile_streamConfiguration :: Lens' LaunchProfile (Maybe StreamConfiguration)
launchProfile_streamConfiguration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchProfile' {Maybe StreamConfiguration
streamConfiguration :: Maybe StreamConfiguration
$sel:streamConfiguration:LaunchProfile' :: LaunchProfile -> Maybe StreamConfiguration
streamConfiguration} -> Maybe StreamConfiguration
streamConfiguration) (\s :: LaunchProfile
s@LaunchProfile' {} Maybe StreamConfiguration
a -> LaunchProfile
s {$sel:streamConfiguration:LaunchProfile' :: Maybe StreamConfiguration
streamConfiguration = Maybe StreamConfiguration
a} :: LaunchProfile)

-- | Unique identifiers for a collection of studio components that can be
-- used with this launch profile.
launchProfile_studioComponentIds :: Lens.Lens' LaunchProfile (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
launchProfile_studioComponentIds :: Lens' LaunchProfile (Maybe (NonEmpty Text))
launchProfile_studioComponentIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchProfile' {Maybe (NonEmpty Text)
studioComponentIds :: Maybe (NonEmpty Text)
$sel:studioComponentIds:LaunchProfile' :: LaunchProfile -> Maybe (NonEmpty Text)
studioComponentIds} -> Maybe (NonEmpty Text)
studioComponentIds) (\s :: LaunchProfile
s@LaunchProfile' {} Maybe (NonEmpty Text)
a -> LaunchProfile
s {$sel:studioComponentIds:LaunchProfile' :: Maybe (NonEmpty Text)
studioComponentIds = Maybe (NonEmpty Text)
a} :: LaunchProfile) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A collection of labels, in the form of key-value pairs, that apply to
-- this resource.
launchProfile_tags :: Lens.Lens' LaunchProfile (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
launchProfile_tags :: Lens' LaunchProfile (Maybe (HashMap Text Text))
launchProfile_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchProfile' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:LaunchProfile' :: LaunchProfile -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: LaunchProfile
s@LaunchProfile' {} Maybe (HashMap Text Text)
a -> LaunchProfile
s {$sel:tags:LaunchProfile' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: LaunchProfile) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The ISO timestamp in seconds for when the resource was updated.
launchProfile_updatedAt :: Lens.Lens' LaunchProfile (Prelude.Maybe Prelude.UTCTime)
launchProfile_updatedAt :: Lens' LaunchProfile (Maybe UTCTime)
launchProfile_updatedAt = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchProfile' {Maybe ISO8601
updatedAt :: Maybe ISO8601
$sel:updatedAt:LaunchProfile' :: LaunchProfile -> Maybe ISO8601
updatedAt} -> Maybe ISO8601
updatedAt) (\s :: LaunchProfile
s@LaunchProfile' {} Maybe ISO8601
a -> LaunchProfile
s {$sel:updatedAt:LaunchProfile' :: Maybe ISO8601
updatedAt = Maybe ISO8601
a} :: LaunchProfile) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time

-- | The user ID of the user that most recently updated the resource.
launchProfile_updatedBy :: Lens.Lens' LaunchProfile (Prelude.Maybe Prelude.Text)
launchProfile_updatedBy :: Lens' LaunchProfile (Maybe Text)
launchProfile_updatedBy = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchProfile' {Maybe Text
updatedBy :: Maybe Text
$sel:updatedBy:LaunchProfile' :: LaunchProfile -> Maybe Text
updatedBy} -> Maybe Text
updatedBy) (\s :: LaunchProfile
s@LaunchProfile' {} Maybe Text
a -> LaunchProfile
s {$sel:updatedBy:LaunchProfile' :: Maybe Text
updatedBy = Maybe Text
a} :: LaunchProfile)

-- | The list of the latest validation results.
launchProfile_validationResults :: Lens.Lens' LaunchProfile (Prelude.Maybe [ValidationResult])
launchProfile_validationResults :: Lens' LaunchProfile (Maybe [ValidationResult])
launchProfile_validationResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LaunchProfile' {Maybe [ValidationResult]
validationResults :: Maybe [ValidationResult]
$sel:validationResults:LaunchProfile' :: LaunchProfile -> Maybe [ValidationResult]
validationResults} -> Maybe [ValidationResult]
validationResults) (\s :: LaunchProfile
s@LaunchProfile' {} Maybe [ValidationResult]
a -> LaunchProfile
s {$sel:validationResults:LaunchProfile' :: Maybe [ValidationResult]
validationResults = Maybe [ValidationResult]
a} :: LaunchProfile) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Data.FromJSON LaunchProfile where
  parseJSON :: Value -> Parser LaunchProfile
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"LaunchProfile"
      ( \Object
x ->
          Maybe Text
-> Maybe ISO8601
-> Maybe Text
-> Maybe (Sensitive Text)
-> Maybe [Text]
-> Maybe Text
-> Maybe [Text]
-> Maybe (Sensitive Text)
-> Maybe LaunchProfileState
-> Maybe LaunchProfileStatusCode
-> Maybe Text
-> Maybe StreamConfiguration
-> Maybe (NonEmpty Text)
-> Maybe (HashMap Text Text)
-> Maybe ISO8601
-> Maybe Text
-> Maybe [ValidationResult]
-> LaunchProfile
LaunchProfile'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"arn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"createdAt")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"createdBy")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"description")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ec2SubnetIds" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"launchProfileId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"launchProfileProtocolVersions"
                            forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"name")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"state")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"statusCode")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"statusMessage")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"streamConfiguration")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"studioComponentIds")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"tags" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"updatedAt")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"updatedBy")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"validationResults"
                            forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
                        )
      )

instance Prelude.Hashable LaunchProfile where
  hashWithSalt :: Int -> LaunchProfile -> Int
hashWithSalt Int
_salt LaunchProfile' {Maybe [Text]
Maybe [ValidationResult]
Maybe (NonEmpty Text)
Maybe Text
Maybe (HashMap Text Text)
Maybe (Sensitive Text)
Maybe ISO8601
Maybe LaunchProfileState
Maybe LaunchProfileStatusCode
Maybe StreamConfiguration
validationResults :: Maybe [ValidationResult]
updatedBy :: Maybe Text
updatedAt :: Maybe ISO8601
tags :: Maybe (HashMap Text Text)
studioComponentIds :: Maybe (NonEmpty Text)
streamConfiguration :: Maybe StreamConfiguration
statusMessage :: Maybe Text
statusCode :: Maybe LaunchProfileStatusCode
state :: Maybe LaunchProfileState
name :: Maybe (Sensitive Text)
launchProfileProtocolVersions :: Maybe [Text]
launchProfileId :: Maybe Text
ec2SubnetIds :: Maybe [Text]
description :: Maybe (Sensitive Text)
createdBy :: Maybe Text
createdAt :: Maybe ISO8601
arn :: Maybe Text
$sel:validationResults:LaunchProfile' :: LaunchProfile -> Maybe [ValidationResult]
$sel:updatedBy:LaunchProfile' :: LaunchProfile -> Maybe Text
$sel:updatedAt:LaunchProfile' :: LaunchProfile -> Maybe ISO8601
$sel:tags:LaunchProfile' :: LaunchProfile -> Maybe (HashMap Text Text)
$sel:studioComponentIds:LaunchProfile' :: LaunchProfile -> Maybe (NonEmpty Text)
$sel:streamConfiguration:LaunchProfile' :: LaunchProfile -> Maybe StreamConfiguration
$sel:statusMessage:LaunchProfile' :: LaunchProfile -> Maybe Text
$sel:statusCode:LaunchProfile' :: LaunchProfile -> Maybe LaunchProfileStatusCode
$sel:state:LaunchProfile' :: LaunchProfile -> Maybe LaunchProfileState
$sel:name:LaunchProfile' :: LaunchProfile -> Maybe (Sensitive Text)
$sel:launchProfileProtocolVersions:LaunchProfile' :: LaunchProfile -> Maybe [Text]
$sel:launchProfileId:LaunchProfile' :: LaunchProfile -> Maybe Text
$sel:ec2SubnetIds:LaunchProfile' :: LaunchProfile -> Maybe [Text]
$sel:description:LaunchProfile' :: LaunchProfile -> Maybe (Sensitive Text)
$sel:createdBy:LaunchProfile' :: LaunchProfile -> Maybe Text
$sel:createdAt:LaunchProfile' :: LaunchProfile -> Maybe ISO8601
$sel:arn:LaunchProfile' :: LaunchProfile -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
createdAt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
createdBy
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
description
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
ec2SubnetIds
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
launchProfileId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
launchProfileProtocolVersions
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe LaunchProfileState
state
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe LaunchProfileStatusCode
statusCode
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
statusMessage
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe StreamConfiguration
streamConfiguration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty Text)
studioComponentIds
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ISO8601
updatedAt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
updatedBy
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [ValidationResult]
validationResults

instance Prelude.NFData LaunchProfile where
  rnf :: LaunchProfile -> ()
rnf LaunchProfile' {Maybe [Text]
Maybe [ValidationResult]
Maybe (NonEmpty Text)
Maybe Text
Maybe (HashMap Text Text)
Maybe (Sensitive Text)
Maybe ISO8601
Maybe LaunchProfileState
Maybe LaunchProfileStatusCode
Maybe StreamConfiguration
validationResults :: Maybe [ValidationResult]
updatedBy :: Maybe Text
updatedAt :: Maybe ISO8601
tags :: Maybe (HashMap Text Text)
studioComponentIds :: Maybe (NonEmpty Text)
streamConfiguration :: Maybe StreamConfiguration
statusMessage :: Maybe Text
statusCode :: Maybe LaunchProfileStatusCode
state :: Maybe LaunchProfileState
name :: Maybe (Sensitive Text)
launchProfileProtocolVersions :: Maybe [Text]
launchProfileId :: Maybe Text
ec2SubnetIds :: Maybe [Text]
description :: Maybe (Sensitive Text)
createdBy :: Maybe Text
createdAt :: Maybe ISO8601
arn :: Maybe Text
$sel:validationResults:LaunchProfile' :: LaunchProfile -> Maybe [ValidationResult]
$sel:updatedBy:LaunchProfile' :: LaunchProfile -> Maybe Text
$sel:updatedAt:LaunchProfile' :: LaunchProfile -> Maybe ISO8601
$sel:tags:LaunchProfile' :: LaunchProfile -> Maybe (HashMap Text Text)
$sel:studioComponentIds:LaunchProfile' :: LaunchProfile -> Maybe (NonEmpty Text)
$sel:streamConfiguration:LaunchProfile' :: LaunchProfile -> Maybe StreamConfiguration
$sel:statusMessage:LaunchProfile' :: LaunchProfile -> Maybe Text
$sel:statusCode:LaunchProfile' :: LaunchProfile -> Maybe LaunchProfileStatusCode
$sel:state:LaunchProfile' :: LaunchProfile -> Maybe LaunchProfileState
$sel:name:LaunchProfile' :: LaunchProfile -> Maybe (Sensitive Text)
$sel:launchProfileProtocolVersions:LaunchProfile' :: LaunchProfile -> Maybe [Text]
$sel:launchProfileId:LaunchProfile' :: LaunchProfile -> Maybe Text
$sel:ec2SubnetIds:LaunchProfile' :: LaunchProfile -> Maybe [Text]
$sel:description:LaunchProfile' :: LaunchProfile -> Maybe (Sensitive Text)
$sel:createdBy:LaunchProfile' :: LaunchProfile -> Maybe Text
$sel:createdAt:LaunchProfile' :: LaunchProfile -> Maybe ISO8601
$sel:arn:LaunchProfile' :: LaunchProfile -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
createdAt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
createdBy
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
description
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
ec2SubnetIds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
launchProfileId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
launchProfileProtocolVersions
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe LaunchProfileState
state
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe LaunchProfileStatusCode
statusCode
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
statusMessage
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe StreamConfiguration
streamConfiguration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty Text)
studioComponentIds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ISO8601
updatedAt
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
updatedBy
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [ValidationResult]
validationResults