{-# 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.WorkSpaces.Types.DefaultImportClientBrandingAttributes
-- 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.WorkSpaces.Types.DefaultImportClientBrandingAttributes where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude

-- | The default client branding attributes to be imported. These attributes
-- display on the client login screen.
--
-- Client branding attributes are public facing. Ensure that you do not
-- include sensitive information.
--
-- /See:/ 'newDefaultImportClientBrandingAttributes' smart constructor.
data DefaultImportClientBrandingAttributes = DefaultImportClientBrandingAttributes'
  { -- | The forgotten password link. This is the web address that users can go
    -- to if they forget the password for their WorkSpace.
    DefaultImportClientBrandingAttributes -> Maybe Text
forgotPasswordLink :: Prelude.Maybe Prelude.Text,
    -- | The login message. Specified as a key value pair, in which the key is a
    -- locale and the value is the localized message for that locale. The only
    -- key supported is @en_US@. The HTML tags supported include the following:
    -- @a, b, blockquote, br, cite, code, dd, dl, dt, div, em, i, li, ol, p, pre, q, small, span, strike, strong, sub, sup, u, ul@.
    DefaultImportClientBrandingAttributes -> Maybe (HashMap Text Text)
loginMessage :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The logo. The only image format accepted is a binary data object that is
    -- converted from a @.png@ file.
    DefaultImportClientBrandingAttributes -> Maybe Base64
logo :: Prelude.Maybe Data.Base64,
    -- | The support email. The company\'s customer support email address.
    --
    -- -   In each platform type, the @SupportEmail@ and @SupportLink@
    --     parameters are mutually exclusive. You can specify one parameter for
    --     each platform type, but not both.
    --
    -- -   The default email is @workspaces-feedback\@amazon.com@.
    DefaultImportClientBrandingAttributes -> Maybe Text
supportEmail :: Prelude.Maybe Prelude.Text,
    -- | The support link. The link for the company\'s customer support page for
    -- their WorkSpace.
    --
    -- -   In each platform type, the @SupportEmail@ and @SupportLink@
    --     parameters are mutually exclusive. You can specify one parameter for
    --     each platform type, but not both.
    --
    -- -   The default support link is @workspaces-feedback\@amazon.com@.
    DefaultImportClientBrandingAttributes -> Maybe Text
supportLink :: Prelude.Maybe Prelude.Text
  }
  deriving (DefaultImportClientBrandingAttributes
-> DefaultImportClientBrandingAttributes -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DefaultImportClientBrandingAttributes
-> DefaultImportClientBrandingAttributes -> Bool
$c/= :: DefaultImportClientBrandingAttributes
-> DefaultImportClientBrandingAttributes -> Bool
== :: DefaultImportClientBrandingAttributes
-> DefaultImportClientBrandingAttributes -> Bool
$c== :: DefaultImportClientBrandingAttributes
-> DefaultImportClientBrandingAttributes -> Bool
Prelude.Eq, ReadPrec [DefaultImportClientBrandingAttributes]
ReadPrec DefaultImportClientBrandingAttributes
Int -> ReadS DefaultImportClientBrandingAttributes
ReadS [DefaultImportClientBrandingAttributes]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DefaultImportClientBrandingAttributes]
$creadListPrec :: ReadPrec [DefaultImportClientBrandingAttributes]
readPrec :: ReadPrec DefaultImportClientBrandingAttributes
$creadPrec :: ReadPrec DefaultImportClientBrandingAttributes
readList :: ReadS [DefaultImportClientBrandingAttributes]
$creadList :: ReadS [DefaultImportClientBrandingAttributes]
readsPrec :: Int -> ReadS DefaultImportClientBrandingAttributes
$creadsPrec :: Int -> ReadS DefaultImportClientBrandingAttributes
Prelude.Read, Int -> DefaultImportClientBrandingAttributes -> ShowS
[DefaultImportClientBrandingAttributes] -> ShowS
DefaultImportClientBrandingAttributes -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DefaultImportClientBrandingAttributes] -> ShowS
$cshowList :: [DefaultImportClientBrandingAttributes] -> ShowS
show :: DefaultImportClientBrandingAttributes -> String
$cshow :: DefaultImportClientBrandingAttributes -> String
showsPrec :: Int -> DefaultImportClientBrandingAttributes -> ShowS
$cshowsPrec :: Int -> DefaultImportClientBrandingAttributes -> ShowS
Prelude.Show, forall x.
Rep DefaultImportClientBrandingAttributes x
-> DefaultImportClientBrandingAttributes
forall x.
DefaultImportClientBrandingAttributes
-> Rep DefaultImportClientBrandingAttributes x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DefaultImportClientBrandingAttributes x
-> DefaultImportClientBrandingAttributes
$cfrom :: forall x.
DefaultImportClientBrandingAttributes
-> Rep DefaultImportClientBrandingAttributes x
Prelude.Generic)

-- |
-- Create a value of 'DefaultImportClientBrandingAttributes' 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:
--
-- 'forgotPasswordLink', 'defaultImportClientBrandingAttributes_forgotPasswordLink' - The forgotten password link. This is the web address that users can go
-- to if they forget the password for their WorkSpace.
--
-- 'loginMessage', 'defaultImportClientBrandingAttributes_loginMessage' - The login message. Specified as a key value pair, in which the key is a
-- locale and the value is the localized message for that locale. The only
-- key supported is @en_US@. The HTML tags supported include the following:
-- @a, b, blockquote, br, cite, code, dd, dl, dt, div, em, i, li, ol, p, pre, q, small, span, strike, strong, sub, sup, u, ul@.
--
-- 'logo', 'defaultImportClientBrandingAttributes_logo' - The logo. The only image format accepted is a binary data object that is
-- converted from a @.png@ file.--
-- -- /Note:/ This 'Lens' automatically encodes and decodes Base64 data.
-- -- The underlying isomorphism will encode to Base64 representation during
-- -- serialisation, and decode from Base64 representation during deserialisation.
-- -- This 'Lens' accepts and returns only raw unencoded data.
--
-- 'supportEmail', 'defaultImportClientBrandingAttributes_supportEmail' - The support email. The company\'s customer support email address.
--
-- -   In each platform type, the @SupportEmail@ and @SupportLink@
--     parameters are mutually exclusive. You can specify one parameter for
--     each platform type, but not both.
--
-- -   The default email is @workspaces-feedback\@amazon.com@.
--
-- 'supportLink', 'defaultImportClientBrandingAttributes_supportLink' - The support link. The link for the company\'s customer support page for
-- their WorkSpace.
--
-- -   In each platform type, the @SupportEmail@ and @SupportLink@
--     parameters are mutually exclusive. You can specify one parameter for
--     each platform type, but not both.
--
-- -   The default support link is @workspaces-feedback\@amazon.com@.
newDefaultImportClientBrandingAttributes ::
  DefaultImportClientBrandingAttributes
newDefaultImportClientBrandingAttributes :: DefaultImportClientBrandingAttributes
newDefaultImportClientBrandingAttributes =
  DefaultImportClientBrandingAttributes'
    { $sel:forgotPasswordLink:DefaultImportClientBrandingAttributes' :: Maybe Text
forgotPasswordLink =
        forall a. Maybe a
Prelude.Nothing,
      $sel:loginMessage:DefaultImportClientBrandingAttributes' :: Maybe (HashMap Text Text)
loginMessage = forall a. Maybe a
Prelude.Nothing,
      $sel:logo:DefaultImportClientBrandingAttributes' :: Maybe Base64
logo = forall a. Maybe a
Prelude.Nothing,
      $sel:supportEmail:DefaultImportClientBrandingAttributes' :: Maybe Text
supportEmail = forall a. Maybe a
Prelude.Nothing,
      $sel:supportLink:DefaultImportClientBrandingAttributes' :: Maybe Text
supportLink = forall a. Maybe a
Prelude.Nothing
    }

-- | The forgotten password link. This is the web address that users can go
-- to if they forget the password for their WorkSpace.
defaultImportClientBrandingAttributes_forgotPasswordLink :: Lens.Lens' DefaultImportClientBrandingAttributes (Prelude.Maybe Prelude.Text)
defaultImportClientBrandingAttributes_forgotPasswordLink :: Lens' DefaultImportClientBrandingAttributes (Maybe Text)
defaultImportClientBrandingAttributes_forgotPasswordLink = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DefaultImportClientBrandingAttributes' {Maybe Text
forgotPasswordLink :: Maybe Text
$sel:forgotPasswordLink:DefaultImportClientBrandingAttributes' :: DefaultImportClientBrandingAttributes -> Maybe Text
forgotPasswordLink} -> Maybe Text
forgotPasswordLink) (\s :: DefaultImportClientBrandingAttributes
s@DefaultImportClientBrandingAttributes' {} Maybe Text
a -> DefaultImportClientBrandingAttributes
s {$sel:forgotPasswordLink:DefaultImportClientBrandingAttributes' :: Maybe Text
forgotPasswordLink = Maybe Text
a} :: DefaultImportClientBrandingAttributes)

-- | The login message. Specified as a key value pair, in which the key is a
-- locale and the value is the localized message for that locale. The only
-- key supported is @en_US@. The HTML tags supported include the following:
-- @a, b, blockquote, br, cite, code, dd, dl, dt, div, em, i, li, ol, p, pre, q, small, span, strike, strong, sub, sup, u, ul@.
defaultImportClientBrandingAttributes_loginMessage :: Lens.Lens' DefaultImportClientBrandingAttributes (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
defaultImportClientBrandingAttributes_loginMessage :: Lens'
  DefaultImportClientBrandingAttributes (Maybe (HashMap Text Text))
defaultImportClientBrandingAttributes_loginMessage = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DefaultImportClientBrandingAttributes' {Maybe (HashMap Text Text)
loginMessage :: Maybe (HashMap Text Text)
$sel:loginMessage:DefaultImportClientBrandingAttributes' :: DefaultImportClientBrandingAttributes -> Maybe (HashMap Text Text)
loginMessage} -> Maybe (HashMap Text Text)
loginMessage) (\s :: DefaultImportClientBrandingAttributes
s@DefaultImportClientBrandingAttributes' {} Maybe (HashMap Text Text)
a -> DefaultImportClientBrandingAttributes
s {$sel:loginMessage:DefaultImportClientBrandingAttributes' :: Maybe (HashMap Text Text)
loginMessage = Maybe (HashMap Text Text)
a} :: DefaultImportClientBrandingAttributes) 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 logo. The only image format accepted is a binary data object that is
-- converted from a @.png@ file.--
-- -- /Note:/ This 'Lens' automatically encodes and decodes Base64 data.
-- -- The underlying isomorphism will encode to Base64 representation during
-- -- serialisation, and decode from Base64 representation during deserialisation.
-- -- This 'Lens' accepts and returns only raw unencoded data.
defaultImportClientBrandingAttributes_logo :: Lens.Lens' DefaultImportClientBrandingAttributes (Prelude.Maybe Prelude.ByteString)
 = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DefaultImportClientBrandingAttributes' {Maybe Base64
logo :: Maybe Base64
$sel:logo:DefaultImportClientBrandingAttributes' :: DefaultImportClientBrandingAttributes -> Maybe Base64
logo} -> Maybe Base64
logo) (\s :: DefaultImportClientBrandingAttributes
s@DefaultImportClientBrandingAttributes' {} Maybe Base64
a -> DefaultImportClientBrandingAttributes
s {$sel:logo:DefaultImportClientBrandingAttributes' :: Maybe Base64
logo = Maybe Base64
a} :: DefaultImportClientBrandingAttributes) 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 Iso' Base64 ByteString
Data._Base64

-- | The support email. The company\'s customer support email address.
--
-- -   In each platform type, the @SupportEmail@ and @SupportLink@
--     parameters are mutually exclusive. You can specify one parameter for
--     each platform type, but not both.
--
-- -   The default email is @workspaces-feedback\@amazon.com@.
defaultImportClientBrandingAttributes_supportEmail :: Lens.Lens' DefaultImportClientBrandingAttributes (Prelude.Maybe Prelude.Text)
defaultImportClientBrandingAttributes_supportEmail :: Lens' DefaultImportClientBrandingAttributes (Maybe Text)
defaultImportClientBrandingAttributes_supportEmail = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DefaultImportClientBrandingAttributes' {Maybe Text
supportEmail :: Maybe Text
$sel:supportEmail:DefaultImportClientBrandingAttributes' :: DefaultImportClientBrandingAttributes -> Maybe Text
supportEmail} -> Maybe Text
supportEmail) (\s :: DefaultImportClientBrandingAttributes
s@DefaultImportClientBrandingAttributes' {} Maybe Text
a -> DefaultImportClientBrandingAttributes
s {$sel:supportEmail:DefaultImportClientBrandingAttributes' :: Maybe Text
supportEmail = Maybe Text
a} :: DefaultImportClientBrandingAttributes)

-- | The support link. The link for the company\'s customer support page for
-- their WorkSpace.
--
-- -   In each platform type, the @SupportEmail@ and @SupportLink@
--     parameters are mutually exclusive. You can specify one parameter for
--     each platform type, but not both.
--
-- -   The default support link is @workspaces-feedback\@amazon.com@.
defaultImportClientBrandingAttributes_supportLink :: Lens.Lens' DefaultImportClientBrandingAttributes (Prelude.Maybe Prelude.Text)
defaultImportClientBrandingAttributes_supportLink :: Lens' DefaultImportClientBrandingAttributes (Maybe Text)
defaultImportClientBrandingAttributes_supportLink = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DefaultImportClientBrandingAttributes' {Maybe Text
supportLink :: Maybe Text
$sel:supportLink:DefaultImportClientBrandingAttributes' :: DefaultImportClientBrandingAttributes -> Maybe Text
supportLink} -> Maybe Text
supportLink) (\s :: DefaultImportClientBrandingAttributes
s@DefaultImportClientBrandingAttributes' {} Maybe Text
a -> DefaultImportClientBrandingAttributes
s {$sel:supportLink:DefaultImportClientBrandingAttributes' :: Maybe Text
supportLink = Maybe Text
a} :: DefaultImportClientBrandingAttributes)

instance
  Prelude.Hashable
    DefaultImportClientBrandingAttributes
  where
  hashWithSalt :: Int -> DefaultImportClientBrandingAttributes -> Int
hashWithSalt
    Int
_salt
    DefaultImportClientBrandingAttributes' {Maybe Text
Maybe (HashMap Text Text)
Maybe Base64
supportLink :: Maybe Text
supportEmail :: Maybe Text
logo :: Maybe Base64
loginMessage :: Maybe (HashMap Text Text)
forgotPasswordLink :: Maybe Text
$sel:supportLink:DefaultImportClientBrandingAttributes' :: DefaultImportClientBrandingAttributes -> Maybe Text
$sel:supportEmail:DefaultImportClientBrandingAttributes' :: DefaultImportClientBrandingAttributes -> Maybe Text
$sel:logo:DefaultImportClientBrandingAttributes' :: DefaultImportClientBrandingAttributes -> Maybe Base64
$sel:loginMessage:DefaultImportClientBrandingAttributes' :: DefaultImportClientBrandingAttributes -> Maybe (HashMap Text Text)
$sel:forgotPasswordLink:DefaultImportClientBrandingAttributes' :: DefaultImportClientBrandingAttributes -> Maybe Text
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
forgotPasswordLink
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
loginMessage
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Base64
logo
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
supportEmail
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
supportLink

instance
  Prelude.NFData
    DefaultImportClientBrandingAttributes
  where
  rnf :: DefaultImportClientBrandingAttributes -> ()
rnf DefaultImportClientBrandingAttributes' {Maybe Text
Maybe (HashMap Text Text)
Maybe Base64
supportLink :: Maybe Text
supportEmail :: Maybe Text
logo :: Maybe Base64
loginMessage :: Maybe (HashMap Text Text)
forgotPasswordLink :: Maybe Text
$sel:supportLink:DefaultImportClientBrandingAttributes' :: DefaultImportClientBrandingAttributes -> Maybe Text
$sel:supportEmail:DefaultImportClientBrandingAttributes' :: DefaultImportClientBrandingAttributes -> Maybe Text
$sel:logo:DefaultImportClientBrandingAttributes' :: DefaultImportClientBrandingAttributes -> Maybe Base64
$sel:loginMessage:DefaultImportClientBrandingAttributes' :: DefaultImportClientBrandingAttributes -> Maybe (HashMap Text Text)
$sel:forgotPasswordLink:DefaultImportClientBrandingAttributes' :: DefaultImportClientBrandingAttributes -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
forgotPasswordLink
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
loginMessage
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Base64
logo
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
supportEmail
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
supportLink

instance
  Data.ToJSON
    DefaultImportClientBrandingAttributes
  where
  toJSON :: DefaultImportClientBrandingAttributes -> Value
toJSON DefaultImportClientBrandingAttributes' {Maybe Text
Maybe (HashMap Text Text)
Maybe Base64
supportLink :: Maybe Text
supportEmail :: Maybe Text
logo :: Maybe Base64
loginMessage :: Maybe (HashMap Text Text)
forgotPasswordLink :: Maybe Text
$sel:supportLink:DefaultImportClientBrandingAttributes' :: DefaultImportClientBrandingAttributes -> Maybe Text
$sel:supportEmail:DefaultImportClientBrandingAttributes' :: DefaultImportClientBrandingAttributes -> Maybe Text
$sel:logo:DefaultImportClientBrandingAttributes' :: DefaultImportClientBrandingAttributes -> Maybe Base64
$sel:loginMessage:DefaultImportClientBrandingAttributes' :: DefaultImportClientBrandingAttributes -> Maybe (HashMap Text Text)
$sel:forgotPasswordLink:DefaultImportClientBrandingAttributes' :: DefaultImportClientBrandingAttributes -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"ForgotPasswordLink" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
forgotPasswordLink,
            (Key
"LoginMessage" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
loginMessage,
            (Key
"Logo" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Base64
logo,
            (Key
"SupportEmail" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
supportEmail,
            (Key
"SupportLink" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
supportLink
          ]
      )