{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.DeviceFarm.GetDevicePoolCompatibility
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Gets information about compatibility with a device pool.
module Amazonka.DeviceFarm.GetDevicePoolCompatibility
  ( -- * Creating a Request
    GetDevicePoolCompatibility (..),
    newGetDevicePoolCompatibility,

    -- * Request Lenses
    getDevicePoolCompatibility_appArn,
    getDevicePoolCompatibility_configuration,
    getDevicePoolCompatibility_test,
    getDevicePoolCompatibility_testType,
    getDevicePoolCompatibility_devicePoolArn,

    -- * Destructuring the Response
    GetDevicePoolCompatibilityResponse (..),
    newGetDevicePoolCompatibilityResponse,

    -- * Response Lenses
    getDevicePoolCompatibilityResponse_compatibleDevices,
    getDevicePoolCompatibilityResponse_incompatibleDevices,
    getDevicePoolCompatibilityResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.DeviceFarm.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | Represents a request to the get device pool compatibility operation.
--
-- /See:/ 'newGetDevicePoolCompatibility' smart constructor.
data GetDevicePoolCompatibility = GetDevicePoolCompatibility'
  { -- | The ARN of the app that is associated with the specified device pool.
    GetDevicePoolCompatibility -> Maybe Text
appArn :: Prelude.Maybe Prelude.Text,
    -- | An object that contains information about the settings for a run.
    GetDevicePoolCompatibility -> Maybe ScheduleRunConfiguration
configuration :: Prelude.Maybe ScheduleRunConfiguration,
    -- | Information about the uploaded test to be run against the device pool.
    GetDevicePoolCompatibility -> Maybe ScheduleRunTest
test :: Prelude.Maybe ScheduleRunTest,
    -- | The test type for the specified device pool.
    --
    -- Allowed values include the following:
    --
    -- -   BUILTIN_FUZZ.
    --
    -- -   BUILTIN_EXPLORER. For Android, an app explorer that traverses an
    --     Android app, interacting with it and capturing screenshots at the
    --     same time.
    --
    -- -   APPIUM_JAVA_JUNIT.
    --
    -- -   APPIUM_JAVA_TESTNG.
    --
    -- -   APPIUM_PYTHON.
    --
    -- -   APPIUM_NODE.
    --
    -- -   APPIUM_RUBY.
    --
    -- -   APPIUM_WEB_JAVA_JUNIT.
    --
    -- -   APPIUM_WEB_JAVA_TESTNG.
    --
    -- -   APPIUM_WEB_PYTHON.
    --
    -- -   APPIUM_WEB_NODE.
    --
    -- -   APPIUM_WEB_RUBY.
    --
    -- -   CALABASH.
    --
    -- -   INSTRUMENTATION.
    --
    -- -   UIAUTOMATION.
    --
    -- -   UIAUTOMATOR.
    --
    -- -   XCTEST.
    --
    -- -   XCTEST_UI.
    GetDevicePoolCompatibility -> Maybe TestType
testType :: Prelude.Maybe TestType,
    -- | The device pool\'s ARN.
    GetDevicePoolCompatibility -> Text
devicePoolArn :: Prelude.Text
  }
  deriving (GetDevicePoolCompatibility -> GetDevicePoolCompatibility -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetDevicePoolCompatibility -> GetDevicePoolCompatibility -> Bool
$c/= :: GetDevicePoolCompatibility -> GetDevicePoolCompatibility -> Bool
== :: GetDevicePoolCompatibility -> GetDevicePoolCompatibility -> Bool
$c== :: GetDevicePoolCompatibility -> GetDevicePoolCompatibility -> Bool
Prelude.Eq, ReadPrec [GetDevicePoolCompatibility]
ReadPrec GetDevicePoolCompatibility
Int -> ReadS GetDevicePoolCompatibility
ReadS [GetDevicePoolCompatibility]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetDevicePoolCompatibility]
$creadListPrec :: ReadPrec [GetDevicePoolCompatibility]
readPrec :: ReadPrec GetDevicePoolCompatibility
$creadPrec :: ReadPrec GetDevicePoolCompatibility
readList :: ReadS [GetDevicePoolCompatibility]
$creadList :: ReadS [GetDevicePoolCompatibility]
readsPrec :: Int -> ReadS GetDevicePoolCompatibility
$creadsPrec :: Int -> ReadS GetDevicePoolCompatibility
Prelude.Read, Int -> GetDevicePoolCompatibility -> ShowS
[GetDevicePoolCompatibility] -> ShowS
GetDevicePoolCompatibility -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetDevicePoolCompatibility] -> ShowS
$cshowList :: [GetDevicePoolCompatibility] -> ShowS
show :: GetDevicePoolCompatibility -> String
$cshow :: GetDevicePoolCompatibility -> String
showsPrec :: Int -> GetDevicePoolCompatibility -> ShowS
$cshowsPrec :: Int -> GetDevicePoolCompatibility -> ShowS
Prelude.Show, forall x.
Rep GetDevicePoolCompatibility x -> GetDevicePoolCompatibility
forall x.
GetDevicePoolCompatibility -> Rep GetDevicePoolCompatibility x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetDevicePoolCompatibility x -> GetDevicePoolCompatibility
$cfrom :: forall x.
GetDevicePoolCompatibility -> Rep GetDevicePoolCompatibility x
Prelude.Generic)

-- |
-- Create a value of 'GetDevicePoolCompatibility' 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:
--
-- 'appArn', 'getDevicePoolCompatibility_appArn' - The ARN of the app that is associated with the specified device pool.
--
-- 'configuration', 'getDevicePoolCompatibility_configuration' - An object that contains information about the settings for a run.
--
-- 'test', 'getDevicePoolCompatibility_test' - Information about the uploaded test to be run against the device pool.
--
-- 'testType', 'getDevicePoolCompatibility_testType' - The test type for the specified device pool.
--
-- Allowed values include the following:
--
-- -   BUILTIN_FUZZ.
--
-- -   BUILTIN_EXPLORER. For Android, an app explorer that traverses an
--     Android app, interacting with it and capturing screenshots at the
--     same time.
--
-- -   APPIUM_JAVA_JUNIT.
--
-- -   APPIUM_JAVA_TESTNG.
--
-- -   APPIUM_PYTHON.
--
-- -   APPIUM_NODE.
--
-- -   APPIUM_RUBY.
--
-- -   APPIUM_WEB_JAVA_JUNIT.
--
-- -   APPIUM_WEB_JAVA_TESTNG.
--
-- -   APPIUM_WEB_PYTHON.
--
-- -   APPIUM_WEB_NODE.
--
-- -   APPIUM_WEB_RUBY.
--
-- -   CALABASH.
--
-- -   INSTRUMENTATION.
--
-- -   UIAUTOMATION.
--
-- -   UIAUTOMATOR.
--
-- -   XCTEST.
--
-- -   XCTEST_UI.
--
-- 'devicePoolArn', 'getDevicePoolCompatibility_devicePoolArn' - The device pool\'s ARN.
newGetDevicePoolCompatibility ::
  -- | 'devicePoolArn'
  Prelude.Text ->
  GetDevicePoolCompatibility
newGetDevicePoolCompatibility :: Text -> GetDevicePoolCompatibility
newGetDevicePoolCompatibility Text
pDevicePoolArn_ =
  GetDevicePoolCompatibility'
    { $sel:appArn:GetDevicePoolCompatibility' :: Maybe Text
appArn =
        forall a. Maybe a
Prelude.Nothing,
      $sel:configuration:GetDevicePoolCompatibility' :: Maybe ScheduleRunConfiguration
configuration = forall a. Maybe a
Prelude.Nothing,
      $sel:test:GetDevicePoolCompatibility' :: Maybe ScheduleRunTest
test = forall a. Maybe a
Prelude.Nothing,
      $sel:testType:GetDevicePoolCompatibility' :: Maybe TestType
testType = forall a. Maybe a
Prelude.Nothing,
      $sel:devicePoolArn:GetDevicePoolCompatibility' :: Text
devicePoolArn = Text
pDevicePoolArn_
    }

-- | The ARN of the app that is associated with the specified device pool.
getDevicePoolCompatibility_appArn :: Lens.Lens' GetDevicePoolCompatibility (Prelude.Maybe Prelude.Text)
getDevicePoolCompatibility_appArn :: Lens' GetDevicePoolCompatibility (Maybe Text)
getDevicePoolCompatibility_appArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDevicePoolCompatibility' {Maybe Text
appArn :: Maybe Text
$sel:appArn:GetDevicePoolCompatibility' :: GetDevicePoolCompatibility -> Maybe Text
appArn} -> Maybe Text
appArn) (\s :: GetDevicePoolCompatibility
s@GetDevicePoolCompatibility' {} Maybe Text
a -> GetDevicePoolCompatibility
s {$sel:appArn:GetDevicePoolCompatibility' :: Maybe Text
appArn = Maybe Text
a} :: GetDevicePoolCompatibility)

-- | An object that contains information about the settings for a run.
getDevicePoolCompatibility_configuration :: Lens.Lens' GetDevicePoolCompatibility (Prelude.Maybe ScheduleRunConfiguration)
getDevicePoolCompatibility_configuration :: Lens' GetDevicePoolCompatibility (Maybe ScheduleRunConfiguration)
getDevicePoolCompatibility_configuration = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDevicePoolCompatibility' {Maybe ScheduleRunConfiguration
configuration :: Maybe ScheduleRunConfiguration
$sel:configuration:GetDevicePoolCompatibility' :: GetDevicePoolCompatibility -> Maybe ScheduleRunConfiguration
configuration} -> Maybe ScheduleRunConfiguration
configuration) (\s :: GetDevicePoolCompatibility
s@GetDevicePoolCompatibility' {} Maybe ScheduleRunConfiguration
a -> GetDevicePoolCompatibility
s {$sel:configuration:GetDevicePoolCompatibility' :: Maybe ScheduleRunConfiguration
configuration = Maybe ScheduleRunConfiguration
a} :: GetDevicePoolCompatibility)

-- | Information about the uploaded test to be run against the device pool.
getDevicePoolCompatibility_test :: Lens.Lens' GetDevicePoolCompatibility (Prelude.Maybe ScheduleRunTest)
getDevicePoolCompatibility_test :: Lens' GetDevicePoolCompatibility (Maybe ScheduleRunTest)
getDevicePoolCompatibility_test = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDevicePoolCompatibility' {Maybe ScheduleRunTest
test :: Maybe ScheduleRunTest
$sel:test:GetDevicePoolCompatibility' :: GetDevicePoolCompatibility -> Maybe ScheduleRunTest
test} -> Maybe ScheduleRunTest
test) (\s :: GetDevicePoolCompatibility
s@GetDevicePoolCompatibility' {} Maybe ScheduleRunTest
a -> GetDevicePoolCompatibility
s {$sel:test:GetDevicePoolCompatibility' :: Maybe ScheduleRunTest
test = Maybe ScheduleRunTest
a} :: GetDevicePoolCompatibility)

-- | The test type for the specified device pool.
--
-- Allowed values include the following:
--
-- -   BUILTIN_FUZZ.
--
-- -   BUILTIN_EXPLORER. For Android, an app explorer that traverses an
--     Android app, interacting with it and capturing screenshots at the
--     same time.
--
-- -   APPIUM_JAVA_JUNIT.
--
-- -   APPIUM_JAVA_TESTNG.
--
-- -   APPIUM_PYTHON.
--
-- -   APPIUM_NODE.
--
-- -   APPIUM_RUBY.
--
-- -   APPIUM_WEB_JAVA_JUNIT.
--
-- -   APPIUM_WEB_JAVA_TESTNG.
--
-- -   APPIUM_WEB_PYTHON.
--
-- -   APPIUM_WEB_NODE.
--
-- -   APPIUM_WEB_RUBY.
--
-- -   CALABASH.
--
-- -   INSTRUMENTATION.
--
-- -   UIAUTOMATION.
--
-- -   UIAUTOMATOR.
--
-- -   XCTEST.
--
-- -   XCTEST_UI.
getDevicePoolCompatibility_testType :: Lens.Lens' GetDevicePoolCompatibility (Prelude.Maybe TestType)
getDevicePoolCompatibility_testType :: Lens' GetDevicePoolCompatibility (Maybe TestType)
getDevicePoolCompatibility_testType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDevicePoolCompatibility' {Maybe TestType
testType :: Maybe TestType
$sel:testType:GetDevicePoolCompatibility' :: GetDevicePoolCompatibility -> Maybe TestType
testType} -> Maybe TestType
testType) (\s :: GetDevicePoolCompatibility
s@GetDevicePoolCompatibility' {} Maybe TestType
a -> GetDevicePoolCompatibility
s {$sel:testType:GetDevicePoolCompatibility' :: Maybe TestType
testType = Maybe TestType
a} :: GetDevicePoolCompatibility)

-- | The device pool\'s ARN.
getDevicePoolCompatibility_devicePoolArn :: Lens.Lens' GetDevicePoolCompatibility Prelude.Text
getDevicePoolCompatibility_devicePoolArn :: Lens' GetDevicePoolCompatibility Text
getDevicePoolCompatibility_devicePoolArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDevicePoolCompatibility' {Text
devicePoolArn :: Text
$sel:devicePoolArn:GetDevicePoolCompatibility' :: GetDevicePoolCompatibility -> Text
devicePoolArn} -> Text
devicePoolArn) (\s :: GetDevicePoolCompatibility
s@GetDevicePoolCompatibility' {} Text
a -> GetDevicePoolCompatibility
s {$sel:devicePoolArn:GetDevicePoolCompatibility' :: Text
devicePoolArn = Text
a} :: GetDevicePoolCompatibility)

instance Core.AWSRequest GetDevicePoolCompatibility where
  type
    AWSResponse GetDevicePoolCompatibility =
      GetDevicePoolCompatibilityResponse
  request :: (Service -> Service)
-> GetDevicePoolCompatibility -> Request GetDevicePoolCompatibility
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetDevicePoolCompatibility
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetDevicePoolCompatibility)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe [DevicePoolCompatibilityResult]
-> Maybe [DevicePoolCompatibilityResult]
-> Int
-> GetDevicePoolCompatibilityResponse
GetDevicePoolCompatibilityResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x
                            forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"compatibleDevices"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ 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 -> Either String (Maybe a)
Data..?> Key
"incompatibleDevices"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable GetDevicePoolCompatibility where
  hashWithSalt :: Int -> GetDevicePoolCompatibility -> Int
hashWithSalt Int
_salt GetDevicePoolCompatibility' {Maybe Text
Maybe ScheduleRunConfiguration
Maybe TestType
Maybe ScheduleRunTest
Text
devicePoolArn :: Text
testType :: Maybe TestType
test :: Maybe ScheduleRunTest
configuration :: Maybe ScheduleRunConfiguration
appArn :: Maybe Text
$sel:devicePoolArn:GetDevicePoolCompatibility' :: GetDevicePoolCompatibility -> Text
$sel:testType:GetDevicePoolCompatibility' :: GetDevicePoolCompatibility -> Maybe TestType
$sel:test:GetDevicePoolCompatibility' :: GetDevicePoolCompatibility -> Maybe ScheduleRunTest
$sel:configuration:GetDevicePoolCompatibility' :: GetDevicePoolCompatibility -> Maybe ScheduleRunConfiguration
$sel:appArn:GetDevicePoolCompatibility' :: GetDevicePoolCompatibility -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
appArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ScheduleRunConfiguration
configuration
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ScheduleRunTest
test
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe TestType
testType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
devicePoolArn

instance Prelude.NFData GetDevicePoolCompatibility where
  rnf :: GetDevicePoolCompatibility -> ()
rnf GetDevicePoolCompatibility' {Maybe Text
Maybe ScheduleRunConfiguration
Maybe TestType
Maybe ScheduleRunTest
Text
devicePoolArn :: Text
testType :: Maybe TestType
test :: Maybe ScheduleRunTest
configuration :: Maybe ScheduleRunConfiguration
appArn :: Maybe Text
$sel:devicePoolArn:GetDevicePoolCompatibility' :: GetDevicePoolCompatibility -> Text
$sel:testType:GetDevicePoolCompatibility' :: GetDevicePoolCompatibility -> Maybe TestType
$sel:test:GetDevicePoolCompatibility' :: GetDevicePoolCompatibility -> Maybe ScheduleRunTest
$sel:configuration:GetDevicePoolCompatibility' :: GetDevicePoolCompatibility -> Maybe ScheduleRunConfiguration
$sel:appArn:GetDevicePoolCompatibility' :: GetDevicePoolCompatibility -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
appArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ScheduleRunConfiguration
configuration
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ScheduleRunTest
test
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe TestType
testType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
devicePoolArn

instance Data.ToHeaders GetDevicePoolCompatibility where
  toHeaders :: GetDevicePoolCompatibility -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"DeviceFarm_20150623.GetDevicePoolCompatibility" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON GetDevicePoolCompatibility where
  toJSON :: GetDevicePoolCompatibility -> Value
toJSON GetDevicePoolCompatibility' {Maybe Text
Maybe ScheduleRunConfiguration
Maybe TestType
Maybe ScheduleRunTest
Text
devicePoolArn :: Text
testType :: Maybe TestType
test :: Maybe ScheduleRunTest
configuration :: Maybe ScheduleRunConfiguration
appArn :: Maybe Text
$sel:devicePoolArn:GetDevicePoolCompatibility' :: GetDevicePoolCompatibility -> Text
$sel:testType:GetDevicePoolCompatibility' :: GetDevicePoolCompatibility -> Maybe TestType
$sel:test:GetDevicePoolCompatibility' :: GetDevicePoolCompatibility -> Maybe ScheduleRunTest
$sel:configuration:GetDevicePoolCompatibility' :: GetDevicePoolCompatibility -> Maybe ScheduleRunConfiguration
$sel:appArn:GetDevicePoolCompatibility' :: GetDevicePoolCompatibility -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"appArn" 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
appArn,
            (Key
"configuration" 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 ScheduleRunConfiguration
configuration,
            (Key
"test" 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 ScheduleRunTest
test,
            (Key
"testType" 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 TestType
testType,
            forall a. a -> Maybe a
Prelude.Just
              (Key
"devicePoolArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
devicePoolArn)
          ]
      )

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

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

-- | Represents the result of describe device pool compatibility request.
--
-- /See:/ 'newGetDevicePoolCompatibilityResponse' smart constructor.
data GetDevicePoolCompatibilityResponse = GetDevicePoolCompatibilityResponse'
  { -- | Information about compatible devices.
    GetDevicePoolCompatibilityResponse
-> Maybe [DevicePoolCompatibilityResult]
compatibleDevices :: Prelude.Maybe [DevicePoolCompatibilityResult],
    -- | Information about incompatible devices.
    GetDevicePoolCompatibilityResponse
-> Maybe [DevicePoolCompatibilityResult]
incompatibleDevices :: Prelude.Maybe [DevicePoolCompatibilityResult],
    -- | The response's http status code.
    GetDevicePoolCompatibilityResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetDevicePoolCompatibilityResponse
-> GetDevicePoolCompatibilityResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetDevicePoolCompatibilityResponse
-> GetDevicePoolCompatibilityResponse -> Bool
$c/= :: GetDevicePoolCompatibilityResponse
-> GetDevicePoolCompatibilityResponse -> Bool
== :: GetDevicePoolCompatibilityResponse
-> GetDevicePoolCompatibilityResponse -> Bool
$c== :: GetDevicePoolCompatibilityResponse
-> GetDevicePoolCompatibilityResponse -> Bool
Prelude.Eq, ReadPrec [GetDevicePoolCompatibilityResponse]
ReadPrec GetDevicePoolCompatibilityResponse
Int -> ReadS GetDevicePoolCompatibilityResponse
ReadS [GetDevicePoolCompatibilityResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetDevicePoolCompatibilityResponse]
$creadListPrec :: ReadPrec [GetDevicePoolCompatibilityResponse]
readPrec :: ReadPrec GetDevicePoolCompatibilityResponse
$creadPrec :: ReadPrec GetDevicePoolCompatibilityResponse
readList :: ReadS [GetDevicePoolCompatibilityResponse]
$creadList :: ReadS [GetDevicePoolCompatibilityResponse]
readsPrec :: Int -> ReadS GetDevicePoolCompatibilityResponse
$creadsPrec :: Int -> ReadS GetDevicePoolCompatibilityResponse
Prelude.Read, Int -> GetDevicePoolCompatibilityResponse -> ShowS
[GetDevicePoolCompatibilityResponse] -> ShowS
GetDevicePoolCompatibilityResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetDevicePoolCompatibilityResponse] -> ShowS
$cshowList :: [GetDevicePoolCompatibilityResponse] -> ShowS
show :: GetDevicePoolCompatibilityResponse -> String
$cshow :: GetDevicePoolCompatibilityResponse -> String
showsPrec :: Int -> GetDevicePoolCompatibilityResponse -> ShowS
$cshowsPrec :: Int -> GetDevicePoolCompatibilityResponse -> ShowS
Prelude.Show, forall x.
Rep GetDevicePoolCompatibilityResponse x
-> GetDevicePoolCompatibilityResponse
forall x.
GetDevicePoolCompatibilityResponse
-> Rep GetDevicePoolCompatibilityResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetDevicePoolCompatibilityResponse x
-> GetDevicePoolCompatibilityResponse
$cfrom :: forall x.
GetDevicePoolCompatibilityResponse
-> Rep GetDevicePoolCompatibilityResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetDevicePoolCompatibilityResponse' 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:
--
-- 'compatibleDevices', 'getDevicePoolCompatibilityResponse_compatibleDevices' - Information about compatible devices.
--
-- 'incompatibleDevices', 'getDevicePoolCompatibilityResponse_incompatibleDevices' - Information about incompatible devices.
--
-- 'httpStatus', 'getDevicePoolCompatibilityResponse_httpStatus' - The response's http status code.
newGetDevicePoolCompatibilityResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetDevicePoolCompatibilityResponse
newGetDevicePoolCompatibilityResponse :: Int -> GetDevicePoolCompatibilityResponse
newGetDevicePoolCompatibilityResponse Int
pHttpStatus_ =
  GetDevicePoolCompatibilityResponse'
    { $sel:compatibleDevices:GetDevicePoolCompatibilityResponse' :: Maybe [DevicePoolCompatibilityResult]
compatibleDevices =
        forall a. Maybe a
Prelude.Nothing,
      $sel:incompatibleDevices:GetDevicePoolCompatibilityResponse' :: Maybe [DevicePoolCompatibilityResult]
incompatibleDevices = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetDevicePoolCompatibilityResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Information about compatible devices.
getDevicePoolCompatibilityResponse_compatibleDevices :: Lens.Lens' GetDevicePoolCompatibilityResponse (Prelude.Maybe [DevicePoolCompatibilityResult])
getDevicePoolCompatibilityResponse_compatibleDevices :: Lens'
  GetDevicePoolCompatibilityResponse
  (Maybe [DevicePoolCompatibilityResult])
getDevicePoolCompatibilityResponse_compatibleDevices = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDevicePoolCompatibilityResponse' {Maybe [DevicePoolCompatibilityResult]
compatibleDevices :: Maybe [DevicePoolCompatibilityResult]
$sel:compatibleDevices:GetDevicePoolCompatibilityResponse' :: GetDevicePoolCompatibilityResponse
-> Maybe [DevicePoolCompatibilityResult]
compatibleDevices} -> Maybe [DevicePoolCompatibilityResult]
compatibleDevices) (\s :: GetDevicePoolCompatibilityResponse
s@GetDevicePoolCompatibilityResponse' {} Maybe [DevicePoolCompatibilityResult]
a -> GetDevicePoolCompatibilityResponse
s {$sel:compatibleDevices:GetDevicePoolCompatibilityResponse' :: Maybe [DevicePoolCompatibilityResult]
compatibleDevices = Maybe [DevicePoolCompatibilityResult]
a} :: GetDevicePoolCompatibilityResponse) 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

-- | Information about incompatible devices.
getDevicePoolCompatibilityResponse_incompatibleDevices :: Lens.Lens' GetDevicePoolCompatibilityResponse (Prelude.Maybe [DevicePoolCompatibilityResult])
getDevicePoolCompatibilityResponse_incompatibleDevices :: Lens'
  GetDevicePoolCompatibilityResponse
  (Maybe [DevicePoolCompatibilityResult])
getDevicePoolCompatibilityResponse_incompatibleDevices = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDevicePoolCompatibilityResponse' {Maybe [DevicePoolCompatibilityResult]
incompatibleDevices :: Maybe [DevicePoolCompatibilityResult]
$sel:incompatibleDevices:GetDevicePoolCompatibilityResponse' :: GetDevicePoolCompatibilityResponse
-> Maybe [DevicePoolCompatibilityResult]
incompatibleDevices} -> Maybe [DevicePoolCompatibilityResult]
incompatibleDevices) (\s :: GetDevicePoolCompatibilityResponse
s@GetDevicePoolCompatibilityResponse' {} Maybe [DevicePoolCompatibilityResult]
a -> GetDevicePoolCompatibilityResponse
s {$sel:incompatibleDevices:GetDevicePoolCompatibilityResponse' :: Maybe [DevicePoolCompatibilityResult]
incompatibleDevices = Maybe [DevicePoolCompatibilityResult]
a} :: GetDevicePoolCompatibilityResponse) 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 response's http status code.
getDevicePoolCompatibilityResponse_httpStatus :: Lens.Lens' GetDevicePoolCompatibilityResponse Prelude.Int
getDevicePoolCompatibilityResponse_httpStatus :: Lens' GetDevicePoolCompatibilityResponse Int
getDevicePoolCompatibilityResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetDevicePoolCompatibilityResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetDevicePoolCompatibilityResponse' :: GetDevicePoolCompatibilityResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetDevicePoolCompatibilityResponse
s@GetDevicePoolCompatibilityResponse' {} Int
a -> GetDevicePoolCompatibilityResponse
s {$sel:httpStatus:GetDevicePoolCompatibilityResponse' :: Int
httpStatus = Int
a} :: GetDevicePoolCompatibilityResponse)

instance
  Prelude.NFData
    GetDevicePoolCompatibilityResponse
  where
  rnf :: GetDevicePoolCompatibilityResponse -> ()
rnf GetDevicePoolCompatibilityResponse' {Int
Maybe [DevicePoolCompatibilityResult]
httpStatus :: Int
incompatibleDevices :: Maybe [DevicePoolCompatibilityResult]
compatibleDevices :: Maybe [DevicePoolCompatibilityResult]
$sel:httpStatus:GetDevicePoolCompatibilityResponse' :: GetDevicePoolCompatibilityResponse -> Int
$sel:incompatibleDevices:GetDevicePoolCompatibilityResponse' :: GetDevicePoolCompatibilityResponse
-> Maybe [DevicePoolCompatibilityResult]
$sel:compatibleDevices:GetDevicePoolCompatibilityResponse' :: GetDevicePoolCompatibilityResponse
-> Maybe [DevicePoolCompatibilityResult]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [DevicePoolCompatibilityResult]
compatibleDevices
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [DevicePoolCompatibilityResult]
incompatibleDevices
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus