{-# 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.CodeArtifact.Types.RepositoryDescription
-- 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.CodeArtifact.Types.RepositoryDescription where

import Amazonka.CodeArtifact.Types.RepositoryExternalConnectionInfo
import Amazonka.CodeArtifact.Types.UpstreamRepositoryInfo
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | The details of a repository stored in AWS CodeArtifact. A CodeArtifact
-- repository contains a set of package versions, each of which maps to a
-- set of assets. Repositories are polyglot—a single repository can contain
-- packages of any supported type. Each repository exposes endpoints for
-- fetching and publishing packages using tools like the @npm@ CLI, the
-- Maven CLI (@mvn@), and @pip@. You can create up to 100 repositories per
-- AWS account.
--
-- /See:/ 'newRepositoryDescription' smart constructor.
data RepositoryDescription = RepositoryDescription'
  { -- | A list of upstream repositories to associate with the repository. The
    -- order of the upstream repositories in the list determines their priority
    -- order when AWS CodeArtifact looks for a requested package version. For
    -- more information, see
    -- <https://docs.aws.amazon.com/codeartifact/latest/ug/repos-upstream.html Working with upstream repositories>.
    RepositoryDescription -> Maybe [UpstreamRepositoryInfo]
upstreams :: Prelude.Maybe [UpstreamRepositoryInfo],
    -- | The Amazon Resource Name (ARN) of the repository.
    RepositoryDescription -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The 12-digit account number of the AWS account that owns the domain that
    -- contains the repository. It does not include dashes or spaces.
    RepositoryDescription -> Maybe Text
domainOwner :: Prelude.Maybe Prelude.Text,
    -- | The name of the domain that contains the repository.
    RepositoryDescription -> Maybe Text
domainName :: Prelude.Maybe Prelude.Text,
    -- | The name of the repository.
    RepositoryDescription -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The 12-digit account number of the AWS account that manages the
    -- repository.
    RepositoryDescription -> Maybe Text
administratorAccount :: Prelude.Maybe Prelude.Text,
    -- | An array of external connections associated with the repository.
    RepositoryDescription -> Maybe [RepositoryExternalConnectionInfo]
externalConnections :: Prelude.Maybe [RepositoryExternalConnectionInfo],
    -- | A text description of the repository.
    RepositoryDescription -> Maybe Text
description :: Prelude.Maybe Prelude.Text
  }
  deriving (RepositoryDescription -> RepositoryDescription -> Bool
(RepositoryDescription -> RepositoryDescription -> Bool)
-> (RepositoryDescription -> RepositoryDescription -> Bool)
-> Eq RepositoryDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RepositoryDescription -> RepositoryDescription -> Bool
$c/= :: RepositoryDescription -> RepositoryDescription -> Bool
== :: RepositoryDescription -> RepositoryDescription -> Bool
$c== :: RepositoryDescription -> RepositoryDescription -> Bool
Prelude.Eq, ReadPrec [RepositoryDescription]
ReadPrec RepositoryDescription
Int -> ReadS RepositoryDescription
ReadS [RepositoryDescription]
(Int -> ReadS RepositoryDescription)
-> ReadS [RepositoryDescription]
-> ReadPrec RepositoryDescription
-> ReadPrec [RepositoryDescription]
-> Read RepositoryDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RepositoryDescription]
$creadListPrec :: ReadPrec [RepositoryDescription]
readPrec :: ReadPrec RepositoryDescription
$creadPrec :: ReadPrec RepositoryDescription
readList :: ReadS [RepositoryDescription]
$creadList :: ReadS [RepositoryDescription]
readsPrec :: Int -> ReadS RepositoryDescription
$creadsPrec :: Int -> ReadS RepositoryDescription
Prelude.Read, Int -> RepositoryDescription -> ShowS
[RepositoryDescription] -> ShowS
RepositoryDescription -> String
(Int -> RepositoryDescription -> ShowS)
-> (RepositoryDescription -> String)
-> ([RepositoryDescription] -> ShowS)
-> Show RepositoryDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RepositoryDescription] -> ShowS
$cshowList :: [RepositoryDescription] -> ShowS
show :: RepositoryDescription -> String
$cshow :: RepositoryDescription -> String
showsPrec :: Int -> RepositoryDescription -> ShowS
$cshowsPrec :: Int -> RepositoryDescription -> ShowS
Prelude.Show, (forall x. RepositoryDescription -> Rep RepositoryDescription x)
-> (forall x. Rep RepositoryDescription x -> RepositoryDescription)
-> Generic RepositoryDescription
forall x. Rep RepositoryDescription x -> RepositoryDescription
forall x. RepositoryDescription -> Rep RepositoryDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RepositoryDescription x -> RepositoryDescription
$cfrom :: forall x. RepositoryDescription -> Rep RepositoryDescription x
Prelude.Generic)

-- |
-- Create a value of 'RepositoryDescription' 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:
--
-- 'upstreams', 'repositoryDescription_upstreams' - A list of upstream repositories to associate with the repository. The
-- order of the upstream repositories in the list determines their priority
-- order when AWS CodeArtifact looks for a requested package version. For
-- more information, see
-- <https://docs.aws.amazon.com/codeartifact/latest/ug/repos-upstream.html Working with upstream repositories>.
--
-- 'arn', 'repositoryDescription_arn' - The Amazon Resource Name (ARN) of the repository.
--
-- 'domainOwner', 'repositoryDescription_domainOwner' - The 12-digit account number of the AWS account that owns the domain that
-- contains the repository. It does not include dashes or spaces.
--
-- 'domainName', 'repositoryDescription_domainName' - The name of the domain that contains the repository.
--
-- 'name', 'repositoryDescription_name' - The name of the repository.
--
-- 'administratorAccount', 'repositoryDescription_administratorAccount' - The 12-digit account number of the AWS account that manages the
-- repository.
--
-- 'externalConnections', 'repositoryDescription_externalConnections' - An array of external connections associated with the repository.
--
-- 'description', 'repositoryDescription_description' - A text description of the repository.
newRepositoryDescription ::
  RepositoryDescription
newRepositoryDescription :: RepositoryDescription
newRepositoryDescription =
  RepositoryDescription' :: Maybe [UpstreamRepositoryInfo]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [RepositoryExternalConnectionInfo]
-> Maybe Text
-> RepositoryDescription
RepositoryDescription'
    { $sel:upstreams:RepositoryDescription' :: Maybe [UpstreamRepositoryInfo]
upstreams = Maybe [UpstreamRepositoryInfo]
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:RepositoryDescription' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:domainOwner:RepositoryDescription' :: Maybe Text
domainOwner = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:domainName:RepositoryDescription' :: Maybe Text
domainName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:RepositoryDescription' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:administratorAccount:RepositoryDescription' :: Maybe Text
administratorAccount = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:externalConnections:RepositoryDescription' :: Maybe [RepositoryExternalConnectionInfo]
externalConnections = Maybe [RepositoryExternalConnectionInfo]
forall a. Maybe a
Prelude.Nothing,
      $sel:description:RepositoryDescription' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | A list of upstream repositories to associate with the repository. The
-- order of the upstream repositories in the list determines their priority
-- order when AWS CodeArtifact looks for a requested package version. For
-- more information, see
-- <https://docs.aws.amazon.com/codeartifact/latest/ug/repos-upstream.html Working with upstream repositories>.
repositoryDescription_upstreams :: Lens.Lens' RepositoryDescription (Prelude.Maybe [UpstreamRepositoryInfo])
repositoryDescription_upstreams :: (Maybe [UpstreamRepositoryInfo]
 -> f (Maybe [UpstreamRepositoryInfo]))
-> RepositoryDescription -> f RepositoryDescription
repositoryDescription_upstreams = (RepositoryDescription -> Maybe [UpstreamRepositoryInfo])
-> (RepositoryDescription
    -> Maybe [UpstreamRepositoryInfo] -> RepositoryDescription)
-> Lens
     RepositoryDescription
     RepositoryDescription
     (Maybe [UpstreamRepositoryInfo])
     (Maybe [UpstreamRepositoryInfo])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RepositoryDescription' {Maybe [UpstreamRepositoryInfo]
upstreams :: Maybe [UpstreamRepositoryInfo]
$sel:upstreams:RepositoryDescription' :: RepositoryDescription -> Maybe [UpstreamRepositoryInfo]
upstreams} -> Maybe [UpstreamRepositoryInfo]
upstreams) (\s :: RepositoryDescription
s@RepositoryDescription' {} Maybe [UpstreamRepositoryInfo]
a -> RepositoryDescription
s {$sel:upstreams:RepositoryDescription' :: Maybe [UpstreamRepositoryInfo]
upstreams = Maybe [UpstreamRepositoryInfo]
a} :: RepositoryDescription) ((Maybe [UpstreamRepositoryInfo]
  -> f (Maybe [UpstreamRepositoryInfo]))
 -> RepositoryDescription -> f RepositoryDescription)
-> ((Maybe [UpstreamRepositoryInfo]
     -> f (Maybe [UpstreamRepositoryInfo]))
    -> Maybe [UpstreamRepositoryInfo]
    -> f (Maybe [UpstreamRepositoryInfo]))
-> (Maybe [UpstreamRepositoryInfo]
    -> f (Maybe [UpstreamRepositoryInfo]))
-> RepositoryDescription
-> f RepositoryDescription
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [UpstreamRepositoryInfo]
  [UpstreamRepositoryInfo]
  [UpstreamRepositoryInfo]
  [UpstreamRepositoryInfo]
-> Iso
     (Maybe [UpstreamRepositoryInfo])
     (Maybe [UpstreamRepositoryInfo])
     (Maybe [UpstreamRepositoryInfo])
     (Maybe [UpstreamRepositoryInfo])
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 AnIso
  [UpstreamRepositoryInfo]
  [UpstreamRepositoryInfo]
  [UpstreamRepositoryInfo]
  [UpstreamRepositoryInfo]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The Amazon Resource Name (ARN) of the repository.
repositoryDescription_arn :: Lens.Lens' RepositoryDescription (Prelude.Maybe Prelude.Text)
repositoryDescription_arn :: (Maybe Text -> f (Maybe Text))
-> RepositoryDescription -> f RepositoryDescription
repositoryDescription_arn = (RepositoryDescription -> Maybe Text)
-> (RepositoryDescription -> Maybe Text -> RepositoryDescription)
-> Lens
     RepositoryDescription
     RepositoryDescription
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RepositoryDescription' {Maybe Text
arn :: Maybe Text
$sel:arn:RepositoryDescription' :: RepositoryDescription -> Maybe Text
arn} -> Maybe Text
arn) (\s :: RepositoryDescription
s@RepositoryDescription' {} Maybe Text
a -> RepositoryDescription
s {$sel:arn:RepositoryDescription' :: Maybe Text
arn = Maybe Text
a} :: RepositoryDescription)

-- | The 12-digit account number of the AWS account that owns the domain that
-- contains the repository. It does not include dashes or spaces.
repositoryDescription_domainOwner :: Lens.Lens' RepositoryDescription (Prelude.Maybe Prelude.Text)
repositoryDescription_domainOwner :: (Maybe Text -> f (Maybe Text))
-> RepositoryDescription -> f RepositoryDescription
repositoryDescription_domainOwner = (RepositoryDescription -> Maybe Text)
-> (RepositoryDescription -> Maybe Text -> RepositoryDescription)
-> Lens
     RepositoryDescription
     RepositoryDescription
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RepositoryDescription' {Maybe Text
domainOwner :: Maybe Text
$sel:domainOwner:RepositoryDescription' :: RepositoryDescription -> Maybe Text
domainOwner} -> Maybe Text
domainOwner) (\s :: RepositoryDescription
s@RepositoryDescription' {} Maybe Text
a -> RepositoryDescription
s {$sel:domainOwner:RepositoryDescription' :: Maybe Text
domainOwner = Maybe Text
a} :: RepositoryDescription)

-- | The name of the domain that contains the repository.
repositoryDescription_domainName :: Lens.Lens' RepositoryDescription (Prelude.Maybe Prelude.Text)
repositoryDescription_domainName :: (Maybe Text -> f (Maybe Text))
-> RepositoryDescription -> f RepositoryDescription
repositoryDescription_domainName = (RepositoryDescription -> Maybe Text)
-> (RepositoryDescription -> Maybe Text -> RepositoryDescription)
-> Lens
     RepositoryDescription
     RepositoryDescription
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RepositoryDescription' {Maybe Text
domainName :: Maybe Text
$sel:domainName:RepositoryDescription' :: RepositoryDescription -> Maybe Text
domainName} -> Maybe Text
domainName) (\s :: RepositoryDescription
s@RepositoryDescription' {} Maybe Text
a -> RepositoryDescription
s {$sel:domainName:RepositoryDescription' :: Maybe Text
domainName = Maybe Text
a} :: RepositoryDescription)

-- | The name of the repository.
repositoryDescription_name :: Lens.Lens' RepositoryDescription (Prelude.Maybe Prelude.Text)
repositoryDescription_name :: (Maybe Text -> f (Maybe Text))
-> RepositoryDescription -> f RepositoryDescription
repositoryDescription_name = (RepositoryDescription -> Maybe Text)
-> (RepositoryDescription -> Maybe Text -> RepositoryDescription)
-> Lens
     RepositoryDescription
     RepositoryDescription
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RepositoryDescription' {Maybe Text
name :: Maybe Text
$sel:name:RepositoryDescription' :: RepositoryDescription -> Maybe Text
name} -> Maybe Text
name) (\s :: RepositoryDescription
s@RepositoryDescription' {} Maybe Text
a -> RepositoryDescription
s {$sel:name:RepositoryDescription' :: Maybe Text
name = Maybe Text
a} :: RepositoryDescription)

-- | The 12-digit account number of the AWS account that manages the
-- repository.
repositoryDescription_administratorAccount :: Lens.Lens' RepositoryDescription (Prelude.Maybe Prelude.Text)
repositoryDescription_administratorAccount :: (Maybe Text -> f (Maybe Text))
-> RepositoryDescription -> f RepositoryDescription
repositoryDescription_administratorAccount = (RepositoryDescription -> Maybe Text)
-> (RepositoryDescription -> Maybe Text -> RepositoryDescription)
-> Lens
     RepositoryDescription
     RepositoryDescription
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RepositoryDescription' {Maybe Text
administratorAccount :: Maybe Text
$sel:administratorAccount:RepositoryDescription' :: RepositoryDescription -> Maybe Text
administratorAccount} -> Maybe Text
administratorAccount) (\s :: RepositoryDescription
s@RepositoryDescription' {} Maybe Text
a -> RepositoryDescription
s {$sel:administratorAccount:RepositoryDescription' :: Maybe Text
administratorAccount = Maybe Text
a} :: RepositoryDescription)

-- | An array of external connections associated with the repository.
repositoryDescription_externalConnections :: Lens.Lens' RepositoryDescription (Prelude.Maybe [RepositoryExternalConnectionInfo])
repositoryDescription_externalConnections :: (Maybe [RepositoryExternalConnectionInfo]
 -> f (Maybe [RepositoryExternalConnectionInfo]))
-> RepositoryDescription -> f RepositoryDescription
repositoryDescription_externalConnections = (RepositoryDescription -> Maybe [RepositoryExternalConnectionInfo])
-> (RepositoryDescription
    -> Maybe [RepositoryExternalConnectionInfo]
    -> RepositoryDescription)
-> Lens
     RepositoryDescription
     RepositoryDescription
     (Maybe [RepositoryExternalConnectionInfo])
     (Maybe [RepositoryExternalConnectionInfo])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RepositoryDescription' {Maybe [RepositoryExternalConnectionInfo]
externalConnections :: Maybe [RepositoryExternalConnectionInfo]
$sel:externalConnections:RepositoryDescription' :: RepositoryDescription -> Maybe [RepositoryExternalConnectionInfo]
externalConnections} -> Maybe [RepositoryExternalConnectionInfo]
externalConnections) (\s :: RepositoryDescription
s@RepositoryDescription' {} Maybe [RepositoryExternalConnectionInfo]
a -> RepositoryDescription
s {$sel:externalConnections:RepositoryDescription' :: Maybe [RepositoryExternalConnectionInfo]
externalConnections = Maybe [RepositoryExternalConnectionInfo]
a} :: RepositoryDescription) ((Maybe [RepositoryExternalConnectionInfo]
  -> f (Maybe [RepositoryExternalConnectionInfo]))
 -> RepositoryDescription -> f RepositoryDescription)
-> ((Maybe [RepositoryExternalConnectionInfo]
     -> f (Maybe [RepositoryExternalConnectionInfo]))
    -> Maybe [RepositoryExternalConnectionInfo]
    -> f (Maybe [RepositoryExternalConnectionInfo]))
-> (Maybe [RepositoryExternalConnectionInfo]
    -> f (Maybe [RepositoryExternalConnectionInfo]))
-> RepositoryDescription
-> f RepositoryDescription
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [RepositoryExternalConnectionInfo]
  [RepositoryExternalConnectionInfo]
  [RepositoryExternalConnectionInfo]
  [RepositoryExternalConnectionInfo]
-> Iso
     (Maybe [RepositoryExternalConnectionInfo])
     (Maybe [RepositoryExternalConnectionInfo])
     (Maybe [RepositoryExternalConnectionInfo])
     (Maybe [RepositoryExternalConnectionInfo])
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 AnIso
  [RepositoryExternalConnectionInfo]
  [RepositoryExternalConnectionInfo]
  [RepositoryExternalConnectionInfo]
  [RepositoryExternalConnectionInfo]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A text description of the repository.
repositoryDescription_description :: Lens.Lens' RepositoryDescription (Prelude.Maybe Prelude.Text)
repositoryDescription_description :: (Maybe Text -> f (Maybe Text))
-> RepositoryDescription -> f RepositoryDescription
repositoryDescription_description = (RepositoryDescription -> Maybe Text)
-> (RepositoryDescription -> Maybe Text -> RepositoryDescription)
-> Lens
     RepositoryDescription
     RepositoryDescription
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RepositoryDescription' {Maybe Text
description :: Maybe Text
$sel:description:RepositoryDescription' :: RepositoryDescription -> Maybe Text
description} -> Maybe Text
description) (\s :: RepositoryDescription
s@RepositoryDescription' {} Maybe Text
a -> RepositoryDescription
s {$sel:description:RepositoryDescription' :: Maybe Text
description = Maybe Text
a} :: RepositoryDescription)

instance Core.FromJSON RepositoryDescription where
  parseJSON :: Value -> Parser RepositoryDescription
parseJSON =
    String
-> (Object -> Parser RepositoryDescription)
-> Value
-> Parser RepositoryDescription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"RepositoryDescription"
      ( \Object
x ->
          Maybe [UpstreamRepositoryInfo]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [RepositoryExternalConnectionInfo]
-> Maybe Text
-> RepositoryDescription
RepositoryDescription'
            (Maybe [UpstreamRepositoryInfo]
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe [RepositoryExternalConnectionInfo]
 -> Maybe Text
 -> RepositoryDescription)
-> Parser (Maybe [UpstreamRepositoryInfo])
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [RepositoryExternalConnectionInfo]
      -> Maybe Text
      -> RepositoryDescription)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe (Maybe [UpstreamRepositoryInfo]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"upstreams" Parser (Maybe (Maybe [UpstreamRepositoryInfo]))
-> Maybe [UpstreamRepositoryInfo]
-> Parser (Maybe [UpstreamRepositoryInfo])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [UpstreamRepositoryInfo]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [RepositoryExternalConnectionInfo]
   -> Maybe Text
   -> RepositoryDescription)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [RepositoryExternalConnectionInfo]
      -> Maybe Text
      -> RepositoryDescription)
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
"arn")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [RepositoryExternalConnectionInfo]
   -> Maybe Text
   -> RepositoryDescription)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe [RepositoryExternalConnectionInfo]
      -> Maybe Text
      -> RepositoryDescription)
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
"domainOwner")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe [RepositoryExternalConnectionInfo]
   -> Maybe Text
   -> RepositoryDescription)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe [RepositoryExternalConnectionInfo]
      -> Maybe Text
      -> RepositoryDescription)
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
"domainName")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe [RepositoryExternalConnectionInfo]
   -> Maybe Text
   -> RepositoryDescription)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe [RepositoryExternalConnectionInfo]
      -> Maybe Text
      -> RepositoryDescription)
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
"name")
            Parser
  (Maybe Text
   -> Maybe [RepositoryExternalConnectionInfo]
   -> Maybe Text
   -> RepositoryDescription)
-> Parser (Maybe Text)
-> Parser
     (Maybe [RepositoryExternalConnectionInfo]
      -> Maybe Text -> RepositoryDescription)
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
"administratorAccount")
            Parser
  (Maybe [RepositoryExternalConnectionInfo]
   -> Maybe Text -> RepositoryDescription)
-> Parser (Maybe [RepositoryExternalConnectionInfo])
-> Parser (Maybe Text -> RepositoryDescription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text
-> Parser (Maybe (Maybe [RepositoryExternalConnectionInfo]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"externalConnections"
                            Parser (Maybe (Maybe [RepositoryExternalConnectionInfo]))
-> Maybe [RepositoryExternalConnectionInfo]
-> Parser (Maybe [RepositoryExternalConnectionInfo])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [RepositoryExternalConnectionInfo]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser (Maybe Text -> RepositoryDescription)
-> Parser (Maybe Text) -> Parser RepositoryDescription
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
"description")
      )

instance Prelude.Hashable RepositoryDescription

instance Prelude.NFData RepositoryDescription