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

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.WorkSpaces.Types.AccessPropertyValue

-- | The device types and operating systems that can be used to access a
-- WorkSpace. For more information, see
-- <https://docs.aws.amazon.com/workspaces/latest/adminguide/workspaces-network-requirements.html Amazon WorkSpaces Client Network Requirements>.
--
-- /See:/ 'newWorkspaceAccessProperties' smart constructor.
data WorkspaceAccessProperties = WorkspaceAccessProperties'
  { -- | Indicates whether users can use Windows clients to access their
    -- WorkSpaces.
    WorkspaceAccessProperties -> Maybe AccessPropertyValue
deviceTypeWindows :: Prelude.Maybe AccessPropertyValue,
    -- | Indicates whether users can access their WorkSpaces through a web
    -- browser.
    WorkspaceAccessProperties -> Maybe AccessPropertyValue
deviceTypeWeb :: Prelude.Maybe AccessPropertyValue,
    -- | Indicates whether users can use Android and Android-compatible Chrome OS
    -- devices to access their WorkSpaces.
    WorkspaceAccessProperties -> Maybe AccessPropertyValue
deviceTypeAndroid :: Prelude.Maybe AccessPropertyValue,
    -- | Indicates whether users can use Linux clients to access their
    -- WorkSpaces.
    WorkspaceAccessProperties -> Maybe AccessPropertyValue
deviceTypeLinux :: Prelude.Maybe AccessPropertyValue,
    -- | Indicates whether users can use macOS clients to access their
    -- WorkSpaces.
    WorkspaceAccessProperties -> Maybe AccessPropertyValue
deviceTypeOsx :: Prelude.Maybe AccessPropertyValue,
    -- | Indicates whether users can use Chromebooks to access their WorkSpaces.
    WorkspaceAccessProperties -> Maybe AccessPropertyValue
deviceTypeChromeOs :: Prelude.Maybe AccessPropertyValue,
    -- | Indicates whether users can use iOS devices to access their WorkSpaces.
    WorkspaceAccessProperties -> Maybe AccessPropertyValue
deviceTypeIos :: Prelude.Maybe AccessPropertyValue,
    -- | Indicates whether users can use zero client devices to access their
    -- WorkSpaces.
    WorkspaceAccessProperties -> Maybe AccessPropertyValue
deviceTypeZeroClient :: Prelude.Maybe AccessPropertyValue
  }
  deriving (WorkspaceAccessProperties -> WorkspaceAccessProperties -> Bool
(WorkspaceAccessProperties -> WorkspaceAccessProperties -> Bool)
-> (WorkspaceAccessProperties -> WorkspaceAccessProperties -> Bool)
-> Eq WorkspaceAccessProperties
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: WorkspaceAccessProperties -> WorkspaceAccessProperties -> Bool
$c/= :: WorkspaceAccessProperties -> WorkspaceAccessProperties -> Bool
== :: WorkspaceAccessProperties -> WorkspaceAccessProperties -> Bool
$c== :: WorkspaceAccessProperties -> WorkspaceAccessProperties -> Bool
Prelude.Eq, ReadPrec [WorkspaceAccessProperties]
ReadPrec WorkspaceAccessProperties
Int -> ReadS WorkspaceAccessProperties
ReadS [WorkspaceAccessProperties]
(Int -> ReadS WorkspaceAccessProperties)
-> ReadS [WorkspaceAccessProperties]
-> ReadPrec WorkspaceAccessProperties
-> ReadPrec [WorkspaceAccessProperties]
-> Read WorkspaceAccessProperties
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [WorkspaceAccessProperties]
$creadListPrec :: ReadPrec [WorkspaceAccessProperties]
readPrec :: ReadPrec WorkspaceAccessProperties
$creadPrec :: ReadPrec WorkspaceAccessProperties
readList :: ReadS [WorkspaceAccessProperties]
$creadList :: ReadS [WorkspaceAccessProperties]
readsPrec :: Int -> ReadS WorkspaceAccessProperties
$creadsPrec :: Int -> ReadS WorkspaceAccessProperties
Prelude.Read, Int -> WorkspaceAccessProperties -> ShowS
[WorkspaceAccessProperties] -> ShowS
WorkspaceAccessProperties -> String
(Int -> WorkspaceAccessProperties -> ShowS)
-> (WorkspaceAccessProperties -> String)
-> ([WorkspaceAccessProperties] -> ShowS)
-> Show WorkspaceAccessProperties
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [WorkspaceAccessProperties] -> ShowS
$cshowList :: [WorkspaceAccessProperties] -> ShowS
show :: WorkspaceAccessProperties -> String
$cshow :: WorkspaceAccessProperties -> String
showsPrec :: Int -> WorkspaceAccessProperties -> ShowS
$cshowsPrec :: Int -> WorkspaceAccessProperties -> ShowS
Prelude.Show, (forall x.
 WorkspaceAccessProperties -> Rep WorkspaceAccessProperties x)
-> (forall x.
    Rep WorkspaceAccessProperties x -> WorkspaceAccessProperties)
-> Generic WorkspaceAccessProperties
forall x.
Rep WorkspaceAccessProperties x -> WorkspaceAccessProperties
forall x.
WorkspaceAccessProperties -> Rep WorkspaceAccessProperties x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep WorkspaceAccessProperties x -> WorkspaceAccessProperties
$cfrom :: forall x.
WorkspaceAccessProperties -> Rep WorkspaceAccessProperties x
Prelude.Generic)

-- |
-- Create a value of 'WorkspaceAccessProperties' 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:
--
-- 'deviceTypeWindows', 'workspaceAccessProperties_deviceTypeWindows' - Indicates whether users can use Windows clients to access their
-- WorkSpaces.
--
-- 'deviceTypeWeb', 'workspaceAccessProperties_deviceTypeWeb' - Indicates whether users can access their WorkSpaces through a web
-- browser.
--
-- 'deviceTypeAndroid', 'workspaceAccessProperties_deviceTypeAndroid' - Indicates whether users can use Android and Android-compatible Chrome OS
-- devices to access their WorkSpaces.
--
-- 'deviceTypeLinux', 'workspaceAccessProperties_deviceTypeLinux' - Indicates whether users can use Linux clients to access their
-- WorkSpaces.
--
-- 'deviceTypeOsx', 'workspaceAccessProperties_deviceTypeOsx' - Indicates whether users can use macOS clients to access their
-- WorkSpaces.
--
-- 'deviceTypeChromeOs', 'workspaceAccessProperties_deviceTypeChromeOs' - Indicates whether users can use Chromebooks to access their WorkSpaces.
--
-- 'deviceTypeIos', 'workspaceAccessProperties_deviceTypeIos' - Indicates whether users can use iOS devices to access their WorkSpaces.
--
-- 'deviceTypeZeroClient', 'workspaceAccessProperties_deviceTypeZeroClient' - Indicates whether users can use zero client devices to access their
-- WorkSpaces.
newWorkspaceAccessProperties ::
  WorkspaceAccessProperties
newWorkspaceAccessProperties :: WorkspaceAccessProperties
newWorkspaceAccessProperties =
  WorkspaceAccessProperties' :: Maybe AccessPropertyValue
-> Maybe AccessPropertyValue
-> Maybe AccessPropertyValue
-> Maybe AccessPropertyValue
-> Maybe AccessPropertyValue
-> Maybe AccessPropertyValue
-> Maybe AccessPropertyValue
-> Maybe AccessPropertyValue
-> WorkspaceAccessProperties
WorkspaceAccessProperties'
    { $sel:deviceTypeWindows:WorkspaceAccessProperties' :: Maybe AccessPropertyValue
deviceTypeWindows =
        Maybe AccessPropertyValue
forall a. Maybe a
Prelude.Nothing,
      $sel:deviceTypeWeb:WorkspaceAccessProperties' :: Maybe AccessPropertyValue
deviceTypeWeb = Maybe AccessPropertyValue
forall a. Maybe a
Prelude.Nothing,
      $sel:deviceTypeAndroid:WorkspaceAccessProperties' :: Maybe AccessPropertyValue
deviceTypeAndroid = Maybe AccessPropertyValue
forall a. Maybe a
Prelude.Nothing,
      $sel:deviceTypeLinux:WorkspaceAccessProperties' :: Maybe AccessPropertyValue
deviceTypeLinux = Maybe AccessPropertyValue
forall a. Maybe a
Prelude.Nothing,
      $sel:deviceTypeOsx:WorkspaceAccessProperties' :: Maybe AccessPropertyValue
deviceTypeOsx = Maybe AccessPropertyValue
forall a. Maybe a
Prelude.Nothing,
      $sel:deviceTypeChromeOs:WorkspaceAccessProperties' :: Maybe AccessPropertyValue
deviceTypeChromeOs = Maybe AccessPropertyValue
forall a. Maybe a
Prelude.Nothing,
      $sel:deviceTypeIos:WorkspaceAccessProperties' :: Maybe AccessPropertyValue
deviceTypeIos = Maybe AccessPropertyValue
forall a. Maybe a
Prelude.Nothing,
      $sel:deviceTypeZeroClient:WorkspaceAccessProperties' :: Maybe AccessPropertyValue
deviceTypeZeroClient = Maybe AccessPropertyValue
forall a. Maybe a
Prelude.Nothing
    }

-- | Indicates whether users can use Windows clients to access their
-- WorkSpaces.
workspaceAccessProperties_deviceTypeWindows :: Lens.Lens' WorkspaceAccessProperties (Prelude.Maybe AccessPropertyValue)
workspaceAccessProperties_deviceTypeWindows :: (Maybe AccessPropertyValue -> f (Maybe AccessPropertyValue))
-> WorkspaceAccessProperties -> f WorkspaceAccessProperties
workspaceAccessProperties_deviceTypeWindows = (WorkspaceAccessProperties -> Maybe AccessPropertyValue)
-> (WorkspaceAccessProperties
    -> Maybe AccessPropertyValue -> WorkspaceAccessProperties)
-> Lens
     WorkspaceAccessProperties
     WorkspaceAccessProperties
     (Maybe AccessPropertyValue)
     (Maybe AccessPropertyValue)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceAccessProperties' {Maybe AccessPropertyValue
deviceTypeWindows :: Maybe AccessPropertyValue
$sel:deviceTypeWindows:WorkspaceAccessProperties' :: WorkspaceAccessProperties -> Maybe AccessPropertyValue
deviceTypeWindows} -> Maybe AccessPropertyValue
deviceTypeWindows) (\s :: WorkspaceAccessProperties
s@WorkspaceAccessProperties' {} Maybe AccessPropertyValue
a -> WorkspaceAccessProperties
s {$sel:deviceTypeWindows:WorkspaceAccessProperties' :: Maybe AccessPropertyValue
deviceTypeWindows = Maybe AccessPropertyValue
a} :: WorkspaceAccessProperties)

-- | Indicates whether users can access their WorkSpaces through a web
-- browser.
workspaceAccessProperties_deviceTypeWeb :: Lens.Lens' WorkspaceAccessProperties (Prelude.Maybe AccessPropertyValue)
workspaceAccessProperties_deviceTypeWeb :: (Maybe AccessPropertyValue -> f (Maybe AccessPropertyValue))
-> WorkspaceAccessProperties -> f WorkspaceAccessProperties
workspaceAccessProperties_deviceTypeWeb = (WorkspaceAccessProperties -> Maybe AccessPropertyValue)
-> (WorkspaceAccessProperties
    -> Maybe AccessPropertyValue -> WorkspaceAccessProperties)
-> Lens
     WorkspaceAccessProperties
     WorkspaceAccessProperties
     (Maybe AccessPropertyValue)
     (Maybe AccessPropertyValue)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceAccessProperties' {Maybe AccessPropertyValue
deviceTypeWeb :: Maybe AccessPropertyValue
$sel:deviceTypeWeb:WorkspaceAccessProperties' :: WorkspaceAccessProperties -> Maybe AccessPropertyValue
deviceTypeWeb} -> Maybe AccessPropertyValue
deviceTypeWeb) (\s :: WorkspaceAccessProperties
s@WorkspaceAccessProperties' {} Maybe AccessPropertyValue
a -> WorkspaceAccessProperties
s {$sel:deviceTypeWeb:WorkspaceAccessProperties' :: Maybe AccessPropertyValue
deviceTypeWeb = Maybe AccessPropertyValue
a} :: WorkspaceAccessProperties)

-- | Indicates whether users can use Android and Android-compatible Chrome OS
-- devices to access their WorkSpaces.
workspaceAccessProperties_deviceTypeAndroid :: Lens.Lens' WorkspaceAccessProperties (Prelude.Maybe AccessPropertyValue)
workspaceAccessProperties_deviceTypeAndroid :: (Maybe AccessPropertyValue -> f (Maybe AccessPropertyValue))
-> WorkspaceAccessProperties -> f WorkspaceAccessProperties
workspaceAccessProperties_deviceTypeAndroid = (WorkspaceAccessProperties -> Maybe AccessPropertyValue)
-> (WorkspaceAccessProperties
    -> Maybe AccessPropertyValue -> WorkspaceAccessProperties)
-> Lens
     WorkspaceAccessProperties
     WorkspaceAccessProperties
     (Maybe AccessPropertyValue)
     (Maybe AccessPropertyValue)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceAccessProperties' {Maybe AccessPropertyValue
deviceTypeAndroid :: Maybe AccessPropertyValue
$sel:deviceTypeAndroid:WorkspaceAccessProperties' :: WorkspaceAccessProperties -> Maybe AccessPropertyValue
deviceTypeAndroid} -> Maybe AccessPropertyValue
deviceTypeAndroid) (\s :: WorkspaceAccessProperties
s@WorkspaceAccessProperties' {} Maybe AccessPropertyValue
a -> WorkspaceAccessProperties
s {$sel:deviceTypeAndroid:WorkspaceAccessProperties' :: Maybe AccessPropertyValue
deviceTypeAndroid = Maybe AccessPropertyValue
a} :: WorkspaceAccessProperties)

-- | Indicates whether users can use Linux clients to access their
-- WorkSpaces.
workspaceAccessProperties_deviceTypeLinux :: Lens.Lens' WorkspaceAccessProperties (Prelude.Maybe AccessPropertyValue)
workspaceAccessProperties_deviceTypeLinux :: (Maybe AccessPropertyValue -> f (Maybe AccessPropertyValue))
-> WorkspaceAccessProperties -> f WorkspaceAccessProperties
workspaceAccessProperties_deviceTypeLinux = (WorkspaceAccessProperties -> Maybe AccessPropertyValue)
-> (WorkspaceAccessProperties
    -> Maybe AccessPropertyValue -> WorkspaceAccessProperties)
-> Lens
     WorkspaceAccessProperties
     WorkspaceAccessProperties
     (Maybe AccessPropertyValue)
     (Maybe AccessPropertyValue)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceAccessProperties' {Maybe AccessPropertyValue
deviceTypeLinux :: Maybe AccessPropertyValue
$sel:deviceTypeLinux:WorkspaceAccessProperties' :: WorkspaceAccessProperties -> Maybe AccessPropertyValue
deviceTypeLinux} -> Maybe AccessPropertyValue
deviceTypeLinux) (\s :: WorkspaceAccessProperties
s@WorkspaceAccessProperties' {} Maybe AccessPropertyValue
a -> WorkspaceAccessProperties
s {$sel:deviceTypeLinux:WorkspaceAccessProperties' :: Maybe AccessPropertyValue
deviceTypeLinux = Maybe AccessPropertyValue
a} :: WorkspaceAccessProperties)

-- | Indicates whether users can use macOS clients to access their
-- WorkSpaces.
workspaceAccessProperties_deviceTypeOsx :: Lens.Lens' WorkspaceAccessProperties (Prelude.Maybe AccessPropertyValue)
workspaceAccessProperties_deviceTypeOsx :: (Maybe AccessPropertyValue -> f (Maybe AccessPropertyValue))
-> WorkspaceAccessProperties -> f WorkspaceAccessProperties
workspaceAccessProperties_deviceTypeOsx = (WorkspaceAccessProperties -> Maybe AccessPropertyValue)
-> (WorkspaceAccessProperties
    -> Maybe AccessPropertyValue -> WorkspaceAccessProperties)
-> Lens
     WorkspaceAccessProperties
     WorkspaceAccessProperties
     (Maybe AccessPropertyValue)
     (Maybe AccessPropertyValue)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceAccessProperties' {Maybe AccessPropertyValue
deviceTypeOsx :: Maybe AccessPropertyValue
$sel:deviceTypeOsx:WorkspaceAccessProperties' :: WorkspaceAccessProperties -> Maybe AccessPropertyValue
deviceTypeOsx} -> Maybe AccessPropertyValue
deviceTypeOsx) (\s :: WorkspaceAccessProperties
s@WorkspaceAccessProperties' {} Maybe AccessPropertyValue
a -> WorkspaceAccessProperties
s {$sel:deviceTypeOsx:WorkspaceAccessProperties' :: Maybe AccessPropertyValue
deviceTypeOsx = Maybe AccessPropertyValue
a} :: WorkspaceAccessProperties)

-- | Indicates whether users can use Chromebooks to access their WorkSpaces.
workspaceAccessProperties_deviceTypeChromeOs :: Lens.Lens' WorkspaceAccessProperties (Prelude.Maybe AccessPropertyValue)
workspaceAccessProperties_deviceTypeChromeOs :: (Maybe AccessPropertyValue -> f (Maybe AccessPropertyValue))
-> WorkspaceAccessProperties -> f WorkspaceAccessProperties
workspaceAccessProperties_deviceTypeChromeOs = (WorkspaceAccessProperties -> Maybe AccessPropertyValue)
-> (WorkspaceAccessProperties
    -> Maybe AccessPropertyValue -> WorkspaceAccessProperties)
-> Lens
     WorkspaceAccessProperties
     WorkspaceAccessProperties
     (Maybe AccessPropertyValue)
     (Maybe AccessPropertyValue)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceAccessProperties' {Maybe AccessPropertyValue
deviceTypeChromeOs :: Maybe AccessPropertyValue
$sel:deviceTypeChromeOs:WorkspaceAccessProperties' :: WorkspaceAccessProperties -> Maybe AccessPropertyValue
deviceTypeChromeOs} -> Maybe AccessPropertyValue
deviceTypeChromeOs) (\s :: WorkspaceAccessProperties
s@WorkspaceAccessProperties' {} Maybe AccessPropertyValue
a -> WorkspaceAccessProperties
s {$sel:deviceTypeChromeOs:WorkspaceAccessProperties' :: Maybe AccessPropertyValue
deviceTypeChromeOs = Maybe AccessPropertyValue
a} :: WorkspaceAccessProperties)

-- | Indicates whether users can use iOS devices to access their WorkSpaces.
workspaceAccessProperties_deviceTypeIos :: Lens.Lens' WorkspaceAccessProperties (Prelude.Maybe AccessPropertyValue)
workspaceAccessProperties_deviceTypeIos :: (Maybe AccessPropertyValue -> f (Maybe AccessPropertyValue))
-> WorkspaceAccessProperties -> f WorkspaceAccessProperties
workspaceAccessProperties_deviceTypeIos = (WorkspaceAccessProperties -> Maybe AccessPropertyValue)
-> (WorkspaceAccessProperties
    -> Maybe AccessPropertyValue -> WorkspaceAccessProperties)
-> Lens
     WorkspaceAccessProperties
     WorkspaceAccessProperties
     (Maybe AccessPropertyValue)
     (Maybe AccessPropertyValue)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceAccessProperties' {Maybe AccessPropertyValue
deviceTypeIos :: Maybe AccessPropertyValue
$sel:deviceTypeIos:WorkspaceAccessProperties' :: WorkspaceAccessProperties -> Maybe AccessPropertyValue
deviceTypeIos} -> Maybe AccessPropertyValue
deviceTypeIos) (\s :: WorkspaceAccessProperties
s@WorkspaceAccessProperties' {} Maybe AccessPropertyValue
a -> WorkspaceAccessProperties
s {$sel:deviceTypeIos:WorkspaceAccessProperties' :: Maybe AccessPropertyValue
deviceTypeIos = Maybe AccessPropertyValue
a} :: WorkspaceAccessProperties)

-- | Indicates whether users can use zero client devices to access their
-- WorkSpaces.
workspaceAccessProperties_deviceTypeZeroClient :: Lens.Lens' WorkspaceAccessProperties (Prelude.Maybe AccessPropertyValue)
workspaceAccessProperties_deviceTypeZeroClient :: (Maybe AccessPropertyValue -> f (Maybe AccessPropertyValue))
-> WorkspaceAccessProperties -> f WorkspaceAccessProperties
workspaceAccessProperties_deviceTypeZeroClient = (WorkspaceAccessProperties -> Maybe AccessPropertyValue)
-> (WorkspaceAccessProperties
    -> Maybe AccessPropertyValue -> WorkspaceAccessProperties)
-> Lens
     WorkspaceAccessProperties
     WorkspaceAccessProperties
     (Maybe AccessPropertyValue)
     (Maybe AccessPropertyValue)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\WorkspaceAccessProperties' {Maybe AccessPropertyValue
deviceTypeZeroClient :: Maybe AccessPropertyValue
$sel:deviceTypeZeroClient:WorkspaceAccessProperties' :: WorkspaceAccessProperties -> Maybe AccessPropertyValue
deviceTypeZeroClient} -> Maybe AccessPropertyValue
deviceTypeZeroClient) (\s :: WorkspaceAccessProperties
s@WorkspaceAccessProperties' {} Maybe AccessPropertyValue
a -> WorkspaceAccessProperties
s {$sel:deviceTypeZeroClient:WorkspaceAccessProperties' :: Maybe AccessPropertyValue
deviceTypeZeroClient = Maybe AccessPropertyValue
a} :: WorkspaceAccessProperties)

instance Core.FromJSON WorkspaceAccessProperties where
  parseJSON :: Value -> Parser WorkspaceAccessProperties
parseJSON =
    String
-> (Object -> Parser WorkspaceAccessProperties)
-> Value
-> Parser WorkspaceAccessProperties
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"WorkspaceAccessProperties"
      ( \Object
x ->
          Maybe AccessPropertyValue
-> Maybe AccessPropertyValue
-> Maybe AccessPropertyValue
-> Maybe AccessPropertyValue
-> Maybe AccessPropertyValue
-> Maybe AccessPropertyValue
-> Maybe AccessPropertyValue
-> Maybe AccessPropertyValue
-> WorkspaceAccessProperties
WorkspaceAccessProperties'
            (Maybe AccessPropertyValue
 -> Maybe AccessPropertyValue
 -> Maybe AccessPropertyValue
 -> Maybe AccessPropertyValue
 -> Maybe AccessPropertyValue
 -> Maybe AccessPropertyValue
 -> Maybe AccessPropertyValue
 -> Maybe AccessPropertyValue
 -> WorkspaceAccessProperties)
-> Parser (Maybe AccessPropertyValue)
-> Parser
     (Maybe AccessPropertyValue
      -> Maybe AccessPropertyValue
      -> Maybe AccessPropertyValue
      -> Maybe AccessPropertyValue
      -> Maybe AccessPropertyValue
      -> Maybe AccessPropertyValue
      -> Maybe AccessPropertyValue
      -> WorkspaceAccessProperties)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe AccessPropertyValue)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DeviceTypeWindows")
            Parser
  (Maybe AccessPropertyValue
   -> Maybe AccessPropertyValue
   -> Maybe AccessPropertyValue
   -> Maybe AccessPropertyValue
   -> Maybe AccessPropertyValue
   -> Maybe AccessPropertyValue
   -> Maybe AccessPropertyValue
   -> WorkspaceAccessProperties)
-> Parser (Maybe AccessPropertyValue)
-> Parser
     (Maybe AccessPropertyValue
      -> Maybe AccessPropertyValue
      -> Maybe AccessPropertyValue
      -> Maybe AccessPropertyValue
      -> Maybe AccessPropertyValue
      -> Maybe AccessPropertyValue
      -> WorkspaceAccessProperties)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AccessPropertyValue)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DeviceTypeWeb")
            Parser
  (Maybe AccessPropertyValue
   -> Maybe AccessPropertyValue
   -> Maybe AccessPropertyValue
   -> Maybe AccessPropertyValue
   -> Maybe AccessPropertyValue
   -> Maybe AccessPropertyValue
   -> WorkspaceAccessProperties)
-> Parser (Maybe AccessPropertyValue)
-> Parser
     (Maybe AccessPropertyValue
      -> Maybe AccessPropertyValue
      -> Maybe AccessPropertyValue
      -> Maybe AccessPropertyValue
      -> Maybe AccessPropertyValue
      -> WorkspaceAccessProperties)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AccessPropertyValue)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DeviceTypeAndroid")
            Parser
  (Maybe AccessPropertyValue
   -> Maybe AccessPropertyValue
   -> Maybe AccessPropertyValue
   -> Maybe AccessPropertyValue
   -> Maybe AccessPropertyValue
   -> WorkspaceAccessProperties)
-> Parser (Maybe AccessPropertyValue)
-> Parser
     (Maybe AccessPropertyValue
      -> Maybe AccessPropertyValue
      -> Maybe AccessPropertyValue
      -> Maybe AccessPropertyValue
      -> WorkspaceAccessProperties)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AccessPropertyValue)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DeviceTypeLinux")
            Parser
  (Maybe AccessPropertyValue
   -> Maybe AccessPropertyValue
   -> Maybe AccessPropertyValue
   -> Maybe AccessPropertyValue
   -> WorkspaceAccessProperties)
-> Parser (Maybe AccessPropertyValue)
-> Parser
     (Maybe AccessPropertyValue
      -> Maybe AccessPropertyValue
      -> Maybe AccessPropertyValue
      -> WorkspaceAccessProperties)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AccessPropertyValue)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DeviceTypeOsx")
            Parser
  (Maybe AccessPropertyValue
   -> Maybe AccessPropertyValue
   -> Maybe AccessPropertyValue
   -> WorkspaceAccessProperties)
-> Parser (Maybe AccessPropertyValue)
-> Parser
     (Maybe AccessPropertyValue
      -> Maybe AccessPropertyValue -> WorkspaceAccessProperties)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AccessPropertyValue)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DeviceTypeChromeOs")
            Parser
  (Maybe AccessPropertyValue
   -> Maybe AccessPropertyValue -> WorkspaceAccessProperties)
-> Parser (Maybe AccessPropertyValue)
-> Parser (Maybe AccessPropertyValue -> WorkspaceAccessProperties)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AccessPropertyValue)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DeviceTypeIos")
            Parser (Maybe AccessPropertyValue -> WorkspaceAccessProperties)
-> Parser (Maybe AccessPropertyValue)
-> Parser WorkspaceAccessProperties
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AccessPropertyValue)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DeviceTypeZeroClient")
      )

instance Prelude.Hashable WorkspaceAccessProperties

instance Prelude.NFData WorkspaceAccessProperties

instance Core.ToJSON WorkspaceAccessProperties where
  toJSON :: WorkspaceAccessProperties -> Value
toJSON WorkspaceAccessProperties' {Maybe AccessPropertyValue
deviceTypeZeroClient :: Maybe AccessPropertyValue
deviceTypeIos :: Maybe AccessPropertyValue
deviceTypeChromeOs :: Maybe AccessPropertyValue
deviceTypeOsx :: Maybe AccessPropertyValue
deviceTypeLinux :: Maybe AccessPropertyValue
deviceTypeAndroid :: Maybe AccessPropertyValue
deviceTypeWeb :: Maybe AccessPropertyValue
deviceTypeWindows :: Maybe AccessPropertyValue
$sel:deviceTypeZeroClient:WorkspaceAccessProperties' :: WorkspaceAccessProperties -> Maybe AccessPropertyValue
$sel:deviceTypeIos:WorkspaceAccessProperties' :: WorkspaceAccessProperties -> Maybe AccessPropertyValue
$sel:deviceTypeChromeOs:WorkspaceAccessProperties' :: WorkspaceAccessProperties -> Maybe AccessPropertyValue
$sel:deviceTypeOsx:WorkspaceAccessProperties' :: WorkspaceAccessProperties -> Maybe AccessPropertyValue
$sel:deviceTypeLinux:WorkspaceAccessProperties' :: WorkspaceAccessProperties -> Maybe AccessPropertyValue
$sel:deviceTypeAndroid:WorkspaceAccessProperties' :: WorkspaceAccessProperties -> Maybe AccessPropertyValue
$sel:deviceTypeWeb:WorkspaceAccessProperties' :: WorkspaceAccessProperties -> Maybe AccessPropertyValue
$sel:deviceTypeWindows:WorkspaceAccessProperties' :: WorkspaceAccessProperties -> Maybe AccessPropertyValue
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"DeviceTypeWindows" Text -> AccessPropertyValue -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (AccessPropertyValue -> Pair)
-> Maybe AccessPropertyValue -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AccessPropertyValue
deviceTypeWindows,
            (Text
"DeviceTypeWeb" Text -> AccessPropertyValue -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (AccessPropertyValue -> Pair)
-> Maybe AccessPropertyValue -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AccessPropertyValue
deviceTypeWeb,
            (Text
"DeviceTypeAndroid" Text -> AccessPropertyValue -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (AccessPropertyValue -> Pair)
-> Maybe AccessPropertyValue -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AccessPropertyValue
deviceTypeAndroid,
            (Text
"DeviceTypeLinux" Text -> AccessPropertyValue -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (AccessPropertyValue -> Pair)
-> Maybe AccessPropertyValue -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AccessPropertyValue
deviceTypeLinux,
            (Text
"DeviceTypeOsx" Text -> AccessPropertyValue -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (AccessPropertyValue -> Pair)
-> Maybe AccessPropertyValue -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AccessPropertyValue
deviceTypeOsx,
            (Text
"DeviceTypeChromeOs" Text -> AccessPropertyValue -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (AccessPropertyValue -> Pair)
-> Maybe AccessPropertyValue -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AccessPropertyValue
deviceTypeChromeOs,
            (Text
"DeviceTypeIos" Text -> AccessPropertyValue -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (AccessPropertyValue -> Pair)
-> Maybe AccessPropertyValue -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AccessPropertyValue
deviceTypeIos,
            (Text
"DeviceTypeZeroClient" Text -> AccessPropertyValue -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (AccessPropertyValue -> Pair)
-> Maybe AccessPropertyValue -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AccessPropertyValue
deviceTypeZeroClient
          ]
      )