{-# 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.SageMaker.Types.SubscribedWorkteam
-- 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.SageMaker.Types.SubscribedWorkteam where

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

-- | Describes a work team of a vendor that does the a labelling job.
--
-- /See:/ 'newSubscribedWorkteam' smart constructor.
data SubscribedWorkteam = SubscribedWorkteam'
  { -- | The title of the service provided by the vendor in the Amazon
    -- Marketplace.
    SubscribedWorkteam -> Maybe Text
marketplaceTitle :: Prelude.Maybe Prelude.Text,
    -- | The name of the vendor in the Amazon Marketplace.
    SubscribedWorkteam -> Maybe Text
sellerName :: Prelude.Maybe Prelude.Text,
    -- | Marketplace product listing ID.
    SubscribedWorkteam -> Maybe Text
listingId :: Prelude.Maybe Prelude.Text,
    -- | The description of the vendor from the Amazon Marketplace.
    SubscribedWorkteam -> Maybe Text
marketplaceDescription :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of the vendor that you have subscribed.
    SubscribedWorkteam -> Text
workteamArn :: Prelude.Text
  }
  deriving (SubscribedWorkteam -> SubscribedWorkteam -> Bool
(SubscribedWorkteam -> SubscribedWorkteam -> Bool)
-> (SubscribedWorkteam -> SubscribedWorkteam -> Bool)
-> Eq SubscribedWorkteam
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SubscribedWorkteam -> SubscribedWorkteam -> Bool
$c/= :: SubscribedWorkteam -> SubscribedWorkteam -> Bool
== :: SubscribedWorkteam -> SubscribedWorkteam -> Bool
$c== :: SubscribedWorkteam -> SubscribedWorkteam -> Bool
Prelude.Eq, ReadPrec [SubscribedWorkteam]
ReadPrec SubscribedWorkteam
Int -> ReadS SubscribedWorkteam
ReadS [SubscribedWorkteam]
(Int -> ReadS SubscribedWorkteam)
-> ReadS [SubscribedWorkteam]
-> ReadPrec SubscribedWorkteam
-> ReadPrec [SubscribedWorkteam]
-> Read SubscribedWorkteam
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SubscribedWorkteam]
$creadListPrec :: ReadPrec [SubscribedWorkteam]
readPrec :: ReadPrec SubscribedWorkteam
$creadPrec :: ReadPrec SubscribedWorkteam
readList :: ReadS [SubscribedWorkteam]
$creadList :: ReadS [SubscribedWorkteam]
readsPrec :: Int -> ReadS SubscribedWorkteam
$creadsPrec :: Int -> ReadS SubscribedWorkteam
Prelude.Read, Int -> SubscribedWorkteam -> ShowS
[SubscribedWorkteam] -> ShowS
SubscribedWorkteam -> String
(Int -> SubscribedWorkteam -> ShowS)
-> (SubscribedWorkteam -> String)
-> ([SubscribedWorkteam] -> ShowS)
-> Show SubscribedWorkteam
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SubscribedWorkteam] -> ShowS
$cshowList :: [SubscribedWorkteam] -> ShowS
show :: SubscribedWorkteam -> String
$cshow :: SubscribedWorkteam -> String
showsPrec :: Int -> SubscribedWorkteam -> ShowS
$cshowsPrec :: Int -> SubscribedWorkteam -> ShowS
Prelude.Show, (forall x. SubscribedWorkteam -> Rep SubscribedWorkteam x)
-> (forall x. Rep SubscribedWorkteam x -> SubscribedWorkteam)
-> Generic SubscribedWorkteam
forall x. Rep SubscribedWorkteam x -> SubscribedWorkteam
forall x. SubscribedWorkteam -> Rep SubscribedWorkteam x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SubscribedWorkteam x -> SubscribedWorkteam
$cfrom :: forall x. SubscribedWorkteam -> Rep SubscribedWorkteam x
Prelude.Generic)

-- |
-- Create a value of 'SubscribedWorkteam' 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:
--
-- 'marketplaceTitle', 'subscribedWorkteam_marketplaceTitle' - The title of the service provided by the vendor in the Amazon
-- Marketplace.
--
-- 'sellerName', 'subscribedWorkteam_sellerName' - The name of the vendor in the Amazon Marketplace.
--
-- 'listingId', 'subscribedWorkteam_listingId' - Marketplace product listing ID.
--
-- 'marketplaceDescription', 'subscribedWorkteam_marketplaceDescription' - The description of the vendor from the Amazon Marketplace.
--
-- 'workteamArn', 'subscribedWorkteam_workteamArn' - The Amazon Resource Name (ARN) of the vendor that you have subscribed.
newSubscribedWorkteam ::
  -- | 'workteamArn'
  Prelude.Text ->
  SubscribedWorkteam
newSubscribedWorkteam :: Text -> SubscribedWorkteam
newSubscribedWorkteam Text
pWorkteamArn_ =
  SubscribedWorkteam' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> SubscribedWorkteam
SubscribedWorkteam'
    { $sel:marketplaceTitle:SubscribedWorkteam' :: Maybe Text
marketplaceTitle =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:sellerName:SubscribedWorkteam' :: Maybe Text
sellerName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:listingId:SubscribedWorkteam' :: Maybe Text
listingId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:marketplaceDescription:SubscribedWorkteam' :: Maybe Text
marketplaceDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:workteamArn:SubscribedWorkteam' :: Text
workteamArn = Text
pWorkteamArn_
    }

-- | The title of the service provided by the vendor in the Amazon
-- Marketplace.
subscribedWorkteam_marketplaceTitle :: Lens.Lens' SubscribedWorkteam (Prelude.Maybe Prelude.Text)
subscribedWorkteam_marketplaceTitle :: (Maybe Text -> f (Maybe Text))
-> SubscribedWorkteam -> f SubscribedWorkteam
subscribedWorkteam_marketplaceTitle = (SubscribedWorkteam -> Maybe Text)
-> (SubscribedWorkteam -> Maybe Text -> SubscribedWorkteam)
-> Lens
     SubscribedWorkteam SubscribedWorkteam (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SubscribedWorkteam' {Maybe Text
marketplaceTitle :: Maybe Text
$sel:marketplaceTitle:SubscribedWorkteam' :: SubscribedWorkteam -> Maybe Text
marketplaceTitle} -> Maybe Text
marketplaceTitle) (\s :: SubscribedWorkteam
s@SubscribedWorkteam' {} Maybe Text
a -> SubscribedWorkteam
s {$sel:marketplaceTitle:SubscribedWorkteam' :: Maybe Text
marketplaceTitle = Maybe Text
a} :: SubscribedWorkteam)

-- | The name of the vendor in the Amazon Marketplace.
subscribedWorkteam_sellerName :: Lens.Lens' SubscribedWorkteam (Prelude.Maybe Prelude.Text)
subscribedWorkteam_sellerName :: (Maybe Text -> f (Maybe Text))
-> SubscribedWorkteam -> f SubscribedWorkteam
subscribedWorkteam_sellerName = (SubscribedWorkteam -> Maybe Text)
-> (SubscribedWorkteam -> Maybe Text -> SubscribedWorkteam)
-> Lens
     SubscribedWorkteam SubscribedWorkteam (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SubscribedWorkteam' {Maybe Text
sellerName :: Maybe Text
$sel:sellerName:SubscribedWorkteam' :: SubscribedWorkteam -> Maybe Text
sellerName} -> Maybe Text
sellerName) (\s :: SubscribedWorkteam
s@SubscribedWorkteam' {} Maybe Text
a -> SubscribedWorkteam
s {$sel:sellerName:SubscribedWorkteam' :: Maybe Text
sellerName = Maybe Text
a} :: SubscribedWorkteam)

-- | Marketplace product listing ID.
subscribedWorkteam_listingId :: Lens.Lens' SubscribedWorkteam (Prelude.Maybe Prelude.Text)
subscribedWorkteam_listingId :: (Maybe Text -> f (Maybe Text))
-> SubscribedWorkteam -> f SubscribedWorkteam
subscribedWorkteam_listingId = (SubscribedWorkteam -> Maybe Text)
-> (SubscribedWorkteam -> Maybe Text -> SubscribedWorkteam)
-> Lens
     SubscribedWorkteam SubscribedWorkteam (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SubscribedWorkteam' {Maybe Text
listingId :: Maybe Text
$sel:listingId:SubscribedWorkteam' :: SubscribedWorkteam -> Maybe Text
listingId} -> Maybe Text
listingId) (\s :: SubscribedWorkteam
s@SubscribedWorkteam' {} Maybe Text
a -> SubscribedWorkteam
s {$sel:listingId:SubscribedWorkteam' :: Maybe Text
listingId = Maybe Text
a} :: SubscribedWorkteam)

-- | The description of the vendor from the Amazon Marketplace.
subscribedWorkteam_marketplaceDescription :: Lens.Lens' SubscribedWorkteam (Prelude.Maybe Prelude.Text)
subscribedWorkteam_marketplaceDescription :: (Maybe Text -> f (Maybe Text))
-> SubscribedWorkteam -> f SubscribedWorkteam
subscribedWorkteam_marketplaceDescription = (SubscribedWorkteam -> Maybe Text)
-> (SubscribedWorkteam -> Maybe Text -> SubscribedWorkteam)
-> Lens
     SubscribedWorkteam SubscribedWorkteam (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SubscribedWorkteam' {Maybe Text
marketplaceDescription :: Maybe Text
$sel:marketplaceDescription:SubscribedWorkteam' :: SubscribedWorkteam -> Maybe Text
marketplaceDescription} -> Maybe Text
marketplaceDescription) (\s :: SubscribedWorkteam
s@SubscribedWorkteam' {} Maybe Text
a -> SubscribedWorkteam
s {$sel:marketplaceDescription:SubscribedWorkteam' :: Maybe Text
marketplaceDescription = Maybe Text
a} :: SubscribedWorkteam)

-- | The Amazon Resource Name (ARN) of the vendor that you have subscribed.
subscribedWorkteam_workteamArn :: Lens.Lens' SubscribedWorkteam Prelude.Text
subscribedWorkteam_workteamArn :: (Text -> f Text) -> SubscribedWorkteam -> f SubscribedWorkteam
subscribedWorkteam_workteamArn = (SubscribedWorkteam -> Text)
-> (SubscribedWorkteam -> Text -> SubscribedWorkteam)
-> Lens SubscribedWorkteam SubscribedWorkteam Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SubscribedWorkteam' {Text
workteamArn :: Text
$sel:workteamArn:SubscribedWorkteam' :: SubscribedWorkteam -> Text
workteamArn} -> Text
workteamArn) (\s :: SubscribedWorkteam
s@SubscribedWorkteam' {} Text
a -> SubscribedWorkteam
s {$sel:workteamArn:SubscribedWorkteam' :: Text
workteamArn = Text
a} :: SubscribedWorkteam)

instance Core.FromJSON SubscribedWorkteam where
  parseJSON :: Value -> Parser SubscribedWorkteam
parseJSON =
    String
-> (Object -> Parser SubscribedWorkteam)
-> Value
-> Parser SubscribedWorkteam
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"SubscribedWorkteam"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Text
-> SubscribedWorkteam
SubscribedWorkteam'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Text
 -> SubscribedWorkteam)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe Text -> Text -> SubscribedWorkteam)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MarketplaceTitle")
            Parser
  (Maybe Text
   -> Maybe Text -> Maybe Text -> Text -> SubscribedWorkteam)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> Text -> SubscribedWorkteam)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"SellerName")
            Parser (Maybe Text -> Maybe Text -> Text -> SubscribedWorkteam)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Text -> SubscribedWorkteam)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ListingId")
            Parser (Maybe Text -> Text -> SubscribedWorkteam)
-> Parser (Maybe Text) -> Parser (Text -> SubscribedWorkteam)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MarketplaceDescription")
            Parser (Text -> SubscribedWorkteam)
-> Parser Text -> Parser SubscribedWorkteam
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"WorkteamArn")
      )

instance Prelude.Hashable SubscribedWorkteam

instance Prelude.NFData SubscribedWorkteam