{-# 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.ServiceCatalogAppRegistry.Types.ResourceIntegrations
-- 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.ServiceCatalogAppRegistry.Types.ResourceIntegrations where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.ServiceCatalogAppRegistry.Types.ResourceGroup

-- | The service integration information about the resource.
--
-- /See:/ 'newResourceIntegrations' smart constructor.
data ResourceIntegrations = ResourceIntegrations'
  { -- | The information about the integration of Resource Groups.
    ResourceIntegrations -> Maybe ResourceGroup
resourceGroup :: Prelude.Maybe ResourceGroup
  }
  deriving (ResourceIntegrations -> ResourceIntegrations -> Bool
(ResourceIntegrations -> ResourceIntegrations -> Bool)
-> (ResourceIntegrations -> ResourceIntegrations -> Bool)
-> Eq ResourceIntegrations
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResourceIntegrations -> ResourceIntegrations -> Bool
$c/= :: ResourceIntegrations -> ResourceIntegrations -> Bool
== :: ResourceIntegrations -> ResourceIntegrations -> Bool
$c== :: ResourceIntegrations -> ResourceIntegrations -> Bool
Prelude.Eq, ReadPrec [ResourceIntegrations]
ReadPrec ResourceIntegrations
Int -> ReadS ResourceIntegrations
ReadS [ResourceIntegrations]
(Int -> ReadS ResourceIntegrations)
-> ReadS [ResourceIntegrations]
-> ReadPrec ResourceIntegrations
-> ReadPrec [ResourceIntegrations]
-> Read ResourceIntegrations
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ResourceIntegrations]
$creadListPrec :: ReadPrec [ResourceIntegrations]
readPrec :: ReadPrec ResourceIntegrations
$creadPrec :: ReadPrec ResourceIntegrations
readList :: ReadS [ResourceIntegrations]
$creadList :: ReadS [ResourceIntegrations]
readsPrec :: Int -> ReadS ResourceIntegrations
$creadsPrec :: Int -> ReadS ResourceIntegrations
Prelude.Read, Int -> ResourceIntegrations -> ShowS
[ResourceIntegrations] -> ShowS
ResourceIntegrations -> String
(Int -> ResourceIntegrations -> ShowS)
-> (ResourceIntegrations -> String)
-> ([ResourceIntegrations] -> ShowS)
-> Show ResourceIntegrations
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ResourceIntegrations] -> ShowS
$cshowList :: [ResourceIntegrations] -> ShowS
show :: ResourceIntegrations -> String
$cshow :: ResourceIntegrations -> String
showsPrec :: Int -> ResourceIntegrations -> ShowS
$cshowsPrec :: Int -> ResourceIntegrations -> ShowS
Prelude.Show, (forall x. ResourceIntegrations -> Rep ResourceIntegrations x)
-> (forall x. Rep ResourceIntegrations x -> ResourceIntegrations)
-> Generic ResourceIntegrations
forall x. Rep ResourceIntegrations x -> ResourceIntegrations
forall x. ResourceIntegrations -> Rep ResourceIntegrations x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ResourceIntegrations x -> ResourceIntegrations
$cfrom :: forall x. ResourceIntegrations -> Rep ResourceIntegrations x
Prelude.Generic)

-- |
-- Create a value of 'ResourceIntegrations' 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:
--
-- 'resourceGroup', 'resourceIntegrations_resourceGroup' - The information about the integration of Resource Groups.
newResourceIntegrations ::
  ResourceIntegrations
newResourceIntegrations :: ResourceIntegrations
newResourceIntegrations =
  ResourceIntegrations' :: Maybe ResourceGroup -> ResourceIntegrations
ResourceIntegrations'
    { $sel:resourceGroup:ResourceIntegrations' :: Maybe ResourceGroup
resourceGroup =
        Maybe ResourceGroup
forall a. Maybe a
Prelude.Nothing
    }

-- | The information about the integration of Resource Groups.
resourceIntegrations_resourceGroup :: Lens.Lens' ResourceIntegrations (Prelude.Maybe ResourceGroup)
resourceIntegrations_resourceGroup :: (Maybe ResourceGroup -> f (Maybe ResourceGroup))
-> ResourceIntegrations -> f ResourceIntegrations
resourceIntegrations_resourceGroup = (ResourceIntegrations -> Maybe ResourceGroup)
-> (ResourceIntegrations
    -> Maybe ResourceGroup -> ResourceIntegrations)
-> Lens
     ResourceIntegrations
     ResourceIntegrations
     (Maybe ResourceGroup)
     (Maybe ResourceGroup)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceIntegrations' {Maybe ResourceGroup
resourceGroup :: Maybe ResourceGroup
$sel:resourceGroup:ResourceIntegrations' :: ResourceIntegrations -> Maybe ResourceGroup
resourceGroup} -> Maybe ResourceGroup
resourceGroup) (\s :: ResourceIntegrations
s@ResourceIntegrations' {} Maybe ResourceGroup
a -> ResourceIntegrations
s {$sel:resourceGroup:ResourceIntegrations' :: Maybe ResourceGroup
resourceGroup = Maybe ResourceGroup
a} :: ResourceIntegrations)

instance Core.FromJSON ResourceIntegrations where
  parseJSON :: Value -> Parser ResourceIntegrations
parseJSON =
    String
-> (Object -> Parser ResourceIntegrations)
-> Value
-> Parser ResourceIntegrations
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"ResourceIntegrations"
      ( \Object
x ->
          Maybe ResourceGroup -> ResourceIntegrations
ResourceIntegrations'
            (Maybe ResourceGroup -> ResourceIntegrations)
-> Parser (Maybe ResourceGroup) -> Parser ResourceIntegrations
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ResourceGroup)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"resourceGroup")
      )

instance Prelude.Hashable ResourceIntegrations

instance Prelude.NFData ResourceIntegrations