{-# 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.CodeGuruReviewer.Types.RepositoryAssociationSummary
-- 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.CodeGuruReviewer.Types.RepositoryAssociationSummary where

import Amazonka.CodeGuruReviewer.Types.ProviderType
import Amazonka.CodeGuruReviewer.Types.RepositoryAssociationState
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Summary information about a repository association. The
-- <https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_ListRepositoryAssociations.html ListRepositoryAssociations>
-- operation returns a list of @RepositoryAssociationSummary@ objects.
--
-- /See:/ 'newRepositoryAssociationSummary' smart constructor.
data RepositoryAssociationSummary = RepositoryAssociationSummary'
  { -- | The Amazon Resource Name (ARN) of the
    -- <https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html RepositoryAssociation>
    -- object. You can retrieve this ARN by calling
    -- <https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_ListRepositoryAssociations.html ListRepositoryAssociations>
    -- .
    RepositoryAssociationSummary -> Maybe Text
associationArn :: Prelude.Maybe Prelude.Text,
    -- | The repository association ID.
    RepositoryAssociationSummary -> Maybe Text
associationId :: Prelude.Maybe Prelude.Text,
    -- | The state of the repository association.
    --
    -- The valid repository association states are:
    --
    -- -   __Associated__: The repository association is complete.
    --
    -- -   __Associating__: CodeGuru Reviewer is:
    --
    --     -   Setting up pull request notifications. This is required for pull
    --         requests to trigger a CodeGuru Reviewer review.
    --
    --         If your repository @ProviderType@ is @GitHub@,
    --         @GitHub Enterprise Server@, or @Bitbucket@, CodeGuru Reviewer
    --         creates webhooks in your repository to trigger CodeGuru Reviewer
    --         reviews. If you delete these webhooks, reviews of code in your
    --         repository cannot be triggered.
    --
    --     -   Setting up source code access. This is required for CodeGuru
    --         Reviewer to securely clone code in your repository.
    --
    -- -   __Failed__: The repository failed to associate or disassociate.
    --
    -- -   __Disassociating__: CodeGuru Reviewer is removing the repository\'s
    --     pull request notifications and source code access.
    --
    -- -   __Disassociated__: CodeGuru Reviewer successfully disassociated the
    --     repository. You can create a new association with this repository if
    --     you want to review source code in it later. You can control access
    --     to code reviews created in an associated repository with tags after
    --     it has been disassociated. For more information, see
    --     <https://docs.aws.amazon.com/codeguru/latest/reviewer-ug/auth-and-access-control-using-tags.html Using tags to control access to associated repositories>
    --     in the /Amazon CodeGuru Reviewer User Guide/.
    RepositoryAssociationSummary -> Maybe RepositoryAssociationState
state :: Prelude.Maybe RepositoryAssociationState,
    -- | The provider type of the repository association.
    RepositoryAssociationSummary -> Maybe ProviderType
providerType :: Prelude.Maybe ProviderType,
    -- | The owner of the repository. For an Amazon Web Services CodeCommit
    -- repository, this is the Amazon Web Services account ID of the account
    -- that owns the repository. For a GitHub, GitHub Enterprise Server, or
    -- Bitbucket repository, this is the username for the account that owns the
    -- repository. For an S3 repository, it can be the username or Amazon Web
    -- Services account ID.
    RepositoryAssociationSummary -> Maybe Text
owner :: Prelude.Maybe Prelude.Text,
    -- | The name of the repository association.
    RepositoryAssociationSummary -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Resource Name (ARN) of an Amazon Web Services CodeStar
    -- Connections connection. Its format is
    -- @arn:aws:codestar-connections:region-id:aws-account_id:connection\/connection-id@.
    -- For more information, see
    -- <https://docs.aws.amazon.com/codestar-connections/latest/APIReference/API_Connection.html Connection>
    -- in the /Amazon Web Services CodeStar Connections API Reference/.
    RepositoryAssociationSummary -> Maybe Text
connectionArn :: Prelude.Maybe Prelude.Text,
    -- | The time, in milliseconds since the epoch, since the repository
    -- association was last updated.
    RepositoryAssociationSummary -> Maybe POSIX
lastUpdatedTimeStamp :: Prelude.Maybe Core.POSIX
  }
  deriving (RepositoryAssociationSummary
-> RepositoryAssociationSummary -> Bool
(RepositoryAssociationSummary
 -> RepositoryAssociationSummary -> Bool)
-> (RepositoryAssociationSummary
    -> RepositoryAssociationSummary -> Bool)
-> Eq RepositoryAssociationSummary
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RepositoryAssociationSummary
-> RepositoryAssociationSummary -> Bool
$c/= :: RepositoryAssociationSummary
-> RepositoryAssociationSummary -> Bool
== :: RepositoryAssociationSummary
-> RepositoryAssociationSummary -> Bool
$c== :: RepositoryAssociationSummary
-> RepositoryAssociationSummary -> Bool
Prelude.Eq, ReadPrec [RepositoryAssociationSummary]
ReadPrec RepositoryAssociationSummary
Int -> ReadS RepositoryAssociationSummary
ReadS [RepositoryAssociationSummary]
(Int -> ReadS RepositoryAssociationSummary)
-> ReadS [RepositoryAssociationSummary]
-> ReadPrec RepositoryAssociationSummary
-> ReadPrec [RepositoryAssociationSummary]
-> Read RepositoryAssociationSummary
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RepositoryAssociationSummary]
$creadListPrec :: ReadPrec [RepositoryAssociationSummary]
readPrec :: ReadPrec RepositoryAssociationSummary
$creadPrec :: ReadPrec RepositoryAssociationSummary
readList :: ReadS [RepositoryAssociationSummary]
$creadList :: ReadS [RepositoryAssociationSummary]
readsPrec :: Int -> ReadS RepositoryAssociationSummary
$creadsPrec :: Int -> ReadS RepositoryAssociationSummary
Prelude.Read, Int -> RepositoryAssociationSummary -> ShowS
[RepositoryAssociationSummary] -> ShowS
RepositoryAssociationSummary -> String
(Int -> RepositoryAssociationSummary -> ShowS)
-> (RepositoryAssociationSummary -> String)
-> ([RepositoryAssociationSummary] -> ShowS)
-> Show RepositoryAssociationSummary
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RepositoryAssociationSummary] -> ShowS
$cshowList :: [RepositoryAssociationSummary] -> ShowS
show :: RepositoryAssociationSummary -> String
$cshow :: RepositoryAssociationSummary -> String
showsPrec :: Int -> RepositoryAssociationSummary -> ShowS
$cshowsPrec :: Int -> RepositoryAssociationSummary -> ShowS
Prelude.Show, (forall x.
 RepositoryAssociationSummary -> Rep RepositoryAssociationSummary x)
-> (forall x.
    Rep RepositoryAssociationSummary x -> RepositoryAssociationSummary)
-> Generic RepositoryAssociationSummary
forall x.
Rep RepositoryAssociationSummary x -> RepositoryAssociationSummary
forall x.
RepositoryAssociationSummary -> Rep RepositoryAssociationSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RepositoryAssociationSummary x -> RepositoryAssociationSummary
$cfrom :: forall x.
RepositoryAssociationSummary -> Rep RepositoryAssociationSummary x
Prelude.Generic)

-- |
-- Create a value of 'RepositoryAssociationSummary' 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:
--
-- 'associationArn', 'repositoryAssociationSummary_associationArn' - The Amazon Resource Name (ARN) of the
-- <https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html RepositoryAssociation>
-- object. You can retrieve this ARN by calling
-- <https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_ListRepositoryAssociations.html ListRepositoryAssociations>
-- .
--
-- 'associationId', 'repositoryAssociationSummary_associationId' - The repository association ID.
--
-- 'state', 'repositoryAssociationSummary_state' - The state of the repository association.
--
-- The valid repository association states are:
--
-- -   __Associated__: The repository association is complete.
--
-- -   __Associating__: CodeGuru Reviewer is:
--
--     -   Setting up pull request notifications. This is required for pull
--         requests to trigger a CodeGuru Reviewer review.
--
--         If your repository @ProviderType@ is @GitHub@,
--         @GitHub Enterprise Server@, or @Bitbucket@, CodeGuru Reviewer
--         creates webhooks in your repository to trigger CodeGuru Reviewer
--         reviews. If you delete these webhooks, reviews of code in your
--         repository cannot be triggered.
--
--     -   Setting up source code access. This is required for CodeGuru
--         Reviewer to securely clone code in your repository.
--
-- -   __Failed__: The repository failed to associate or disassociate.
--
-- -   __Disassociating__: CodeGuru Reviewer is removing the repository\'s
--     pull request notifications and source code access.
--
-- -   __Disassociated__: CodeGuru Reviewer successfully disassociated the
--     repository. You can create a new association with this repository if
--     you want to review source code in it later. You can control access
--     to code reviews created in an associated repository with tags after
--     it has been disassociated. For more information, see
--     <https://docs.aws.amazon.com/codeguru/latest/reviewer-ug/auth-and-access-control-using-tags.html Using tags to control access to associated repositories>
--     in the /Amazon CodeGuru Reviewer User Guide/.
--
-- 'providerType', 'repositoryAssociationSummary_providerType' - The provider type of the repository association.
--
-- 'owner', 'repositoryAssociationSummary_owner' - The owner of the repository. For an Amazon Web Services CodeCommit
-- repository, this is the Amazon Web Services account ID of the account
-- that owns the repository. For a GitHub, GitHub Enterprise Server, or
-- Bitbucket repository, this is the username for the account that owns the
-- repository. For an S3 repository, it can be the username or Amazon Web
-- Services account ID.
--
-- 'name', 'repositoryAssociationSummary_name' - The name of the repository association.
--
-- 'connectionArn', 'repositoryAssociationSummary_connectionArn' - The Amazon Resource Name (ARN) of an Amazon Web Services CodeStar
-- Connections connection. Its format is
-- @arn:aws:codestar-connections:region-id:aws-account_id:connection\/connection-id@.
-- For more information, see
-- <https://docs.aws.amazon.com/codestar-connections/latest/APIReference/API_Connection.html Connection>
-- in the /Amazon Web Services CodeStar Connections API Reference/.
--
-- 'lastUpdatedTimeStamp', 'repositoryAssociationSummary_lastUpdatedTimeStamp' - The time, in milliseconds since the epoch, since the repository
-- association was last updated.
newRepositoryAssociationSummary ::
  RepositoryAssociationSummary
newRepositoryAssociationSummary :: RepositoryAssociationSummary
newRepositoryAssociationSummary =
  RepositoryAssociationSummary' :: Maybe Text
-> Maybe Text
-> Maybe RepositoryAssociationState
-> Maybe ProviderType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> RepositoryAssociationSummary
RepositoryAssociationSummary'
    { $sel:associationArn:RepositoryAssociationSummary' :: Maybe Text
associationArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:associationId:RepositoryAssociationSummary' :: Maybe Text
associationId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:state:RepositoryAssociationSummary' :: Maybe RepositoryAssociationState
state = Maybe RepositoryAssociationState
forall a. Maybe a
Prelude.Nothing,
      $sel:providerType:RepositoryAssociationSummary' :: Maybe ProviderType
providerType = Maybe ProviderType
forall a. Maybe a
Prelude.Nothing,
      $sel:owner:RepositoryAssociationSummary' :: Maybe Text
owner = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:RepositoryAssociationSummary' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:connectionArn:RepositoryAssociationSummary' :: Maybe Text
connectionArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:lastUpdatedTimeStamp:RepositoryAssociationSummary' :: Maybe POSIX
lastUpdatedTimeStamp = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
    }

-- | The Amazon Resource Name (ARN) of the
-- <https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html RepositoryAssociation>
-- object. You can retrieve this ARN by calling
-- <https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_ListRepositoryAssociations.html ListRepositoryAssociations>
-- .
repositoryAssociationSummary_associationArn :: Lens.Lens' RepositoryAssociationSummary (Prelude.Maybe Prelude.Text)
repositoryAssociationSummary_associationArn :: (Maybe Text -> f (Maybe Text))
-> RepositoryAssociationSummary -> f RepositoryAssociationSummary
repositoryAssociationSummary_associationArn = (RepositoryAssociationSummary -> Maybe Text)
-> (RepositoryAssociationSummary
    -> Maybe Text -> RepositoryAssociationSummary)
-> Lens
     RepositoryAssociationSummary
     RepositoryAssociationSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RepositoryAssociationSummary' {Maybe Text
associationArn :: Maybe Text
$sel:associationArn:RepositoryAssociationSummary' :: RepositoryAssociationSummary -> Maybe Text
associationArn} -> Maybe Text
associationArn) (\s :: RepositoryAssociationSummary
s@RepositoryAssociationSummary' {} Maybe Text
a -> RepositoryAssociationSummary
s {$sel:associationArn:RepositoryAssociationSummary' :: Maybe Text
associationArn = Maybe Text
a} :: RepositoryAssociationSummary)

-- | The repository association ID.
repositoryAssociationSummary_associationId :: Lens.Lens' RepositoryAssociationSummary (Prelude.Maybe Prelude.Text)
repositoryAssociationSummary_associationId :: (Maybe Text -> f (Maybe Text))
-> RepositoryAssociationSummary -> f RepositoryAssociationSummary
repositoryAssociationSummary_associationId = (RepositoryAssociationSummary -> Maybe Text)
-> (RepositoryAssociationSummary
    -> Maybe Text -> RepositoryAssociationSummary)
-> Lens
     RepositoryAssociationSummary
     RepositoryAssociationSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RepositoryAssociationSummary' {Maybe Text
associationId :: Maybe Text
$sel:associationId:RepositoryAssociationSummary' :: RepositoryAssociationSummary -> Maybe Text
associationId} -> Maybe Text
associationId) (\s :: RepositoryAssociationSummary
s@RepositoryAssociationSummary' {} Maybe Text
a -> RepositoryAssociationSummary
s {$sel:associationId:RepositoryAssociationSummary' :: Maybe Text
associationId = Maybe Text
a} :: RepositoryAssociationSummary)

-- | The state of the repository association.
--
-- The valid repository association states are:
--
-- -   __Associated__: The repository association is complete.
--
-- -   __Associating__: CodeGuru Reviewer is:
--
--     -   Setting up pull request notifications. This is required for pull
--         requests to trigger a CodeGuru Reviewer review.
--
--         If your repository @ProviderType@ is @GitHub@,
--         @GitHub Enterprise Server@, or @Bitbucket@, CodeGuru Reviewer
--         creates webhooks in your repository to trigger CodeGuru Reviewer
--         reviews. If you delete these webhooks, reviews of code in your
--         repository cannot be triggered.
--
--     -   Setting up source code access. This is required for CodeGuru
--         Reviewer to securely clone code in your repository.
--
-- -   __Failed__: The repository failed to associate or disassociate.
--
-- -   __Disassociating__: CodeGuru Reviewer is removing the repository\'s
--     pull request notifications and source code access.
--
-- -   __Disassociated__: CodeGuru Reviewer successfully disassociated the
--     repository. You can create a new association with this repository if
--     you want to review source code in it later. You can control access
--     to code reviews created in an associated repository with tags after
--     it has been disassociated. For more information, see
--     <https://docs.aws.amazon.com/codeguru/latest/reviewer-ug/auth-and-access-control-using-tags.html Using tags to control access to associated repositories>
--     in the /Amazon CodeGuru Reviewer User Guide/.
repositoryAssociationSummary_state :: Lens.Lens' RepositoryAssociationSummary (Prelude.Maybe RepositoryAssociationState)
repositoryAssociationSummary_state :: (Maybe RepositoryAssociationState
 -> f (Maybe RepositoryAssociationState))
-> RepositoryAssociationSummary -> f RepositoryAssociationSummary
repositoryAssociationSummary_state = (RepositoryAssociationSummary -> Maybe RepositoryAssociationState)
-> (RepositoryAssociationSummary
    -> Maybe RepositoryAssociationState
    -> RepositoryAssociationSummary)
-> Lens
     RepositoryAssociationSummary
     RepositoryAssociationSummary
     (Maybe RepositoryAssociationState)
     (Maybe RepositoryAssociationState)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RepositoryAssociationSummary' {Maybe RepositoryAssociationState
state :: Maybe RepositoryAssociationState
$sel:state:RepositoryAssociationSummary' :: RepositoryAssociationSummary -> Maybe RepositoryAssociationState
state} -> Maybe RepositoryAssociationState
state) (\s :: RepositoryAssociationSummary
s@RepositoryAssociationSummary' {} Maybe RepositoryAssociationState
a -> RepositoryAssociationSummary
s {$sel:state:RepositoryAssociationSummary' :: Maybe RepositoryAssociationState
state = Maybe RepositoryAssociationState
a} :: RepositoryAssociationSummary)

-- | The provider type of the repository association.
repositoryAssociationSummary_providerType :: Lens.Lens' RepositoryAssociationSummary (Prelude.Maybe ProviderType)
repositoryAssociationSummary_providerType :: (Maybe ProviderType -> f (Maybe ProviderType))
-> RepositoryAssociationSummary -> f RepositoryAssociationSummary
repositoryAssociationSummary_providerType = (RepositoryAssociationSummary -> Maybe ProviderType)
-> (RepositoryAssociationSummary
    -> Maybe ProviderType -> RepositoryAssociationSummary)
-> Lens
     RepositoryAssociationSummary
     RepositoryAssociationSummary
     (Maybe ProviderType)
     (Maybe ProviderType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RepositoryAssociationSummary' {Maybe ProviderType
providerType :: Maybe ProviderType
$sel:providerType:RepositoryAssociationSummary' :: RepositoryAssociationSummary -> Maybe ProviderType
providerType} -> Maybe ProviderType
providerType) (\s :: RepositoryAssociationSummary
s@RepositoryAssociationSummary' {} Maybe ProviderType
a -> RepositoryAssociationSummary
s {$sel:providerType:RepositoryAssociationSummary' :: Maybe ProviderType
providerType = Maybe ProviderType
a} :: RepositoryAssociationSummary)

-- | The owner of the repository. For an Amazon Web Services CodeCommit
-- repository, this is the Amazon Web Services account ID of the account
-- that owns the repository. For a GitHub, GitHub Enterprise Server, or
-- Bitbucket repository, this is the username for the account that owns the
-- repository. For an S3 repository, it can be the username or Amazon Web
-- Services account ID.
repositoryAssociationSummary_owner :: Lens.Lens' RepositoryAssociationSummary (Prelude.Maybe Prelude.Text)
repositoryAssociationSummary_owner :: (Maybe Text -> f (Maybe Text))
-> RepositoryAssociationSummary -> f RepositoryAssociationSummary
repositoryAssociationSummary_owner = (RepositoryAssociationSummary -> Maybe Text)
-> (RepositoryAssociationSummary
    -> Maybe Text -> RepositoryAssociationSummary)
-> Lens
     RepositoryAssociationSummary
     RepositoryAssociationSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RepositoryAssociationSummary' {Maybe Text
owner :: Maybe Text
$sel:owner:RepositoryAssociationSummary' :: RepositoryAssociationSummary -> Maybe Text
owner} -> Maybe Text
owner) (\s :: RepositoryAssociationSummary
s@RepositoryAssociationSummary' {} Maybe Text
a -> RepositoryAssociationSummary
s {$sel:owner:RepositoryAssociationSummary' :: Maybe Text
owner = Maybe Text
a} :: RepositoryAssociationSummary)

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

-- | The Amazon Resource Name (ARN) of an Amazon Web Services CodeStar
-- Connections connection. Its format is
-- @arn:aws:codestar-connections:region-id:aws-account_id:connection\/connection-id@.
-- For more information, see
-- <https://docs.aws.amazon.com/codestar-connections/latest/APIReference/API_Connection.html Connection>
-- in the /Amazon Web Services CodeStar Connections API Reference/.
repositoryAssociationSummary_connectionArn :: Lens.Lens' RepositoryAssociationSummary (Prelude.Maybe Prelude.Text)
repositoryAssociationSummary_connectionArn :: (Maybe Text -> f (Maybe Text))
-> RepositoryAssociationSummary -> f RepositoryAssociationSummary
repositoryAssociationSummary_connectionArn = (RepositoryAssociationSummary -> Maybe Text)
-> (RepositoryAssociationSummary
    -> Maybe Text -> RepositoryAssociationSummary)
-> Lens
     RepositoryAssociationSummary
     RepositoryAssociationSummary
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RepositoryAssociationSummary' {Maybe Text
connectionArn :: Maybe Text
$sel:connectionArn:RepositoryAssociationSummary' :: RepositoryAssociationSummary -> Maybe Text
connectionArn} -> Maybe Text
connectionArn) (\s :: RepositoryAssociationSummary
s@RepositoryAssociationSummary' {} Maybe Text
a -> RepositoryAssociationSummary
s {$sel:connectionArn:RepositoryAssociationSummary' :: Maybe Text
connectionArn = Maybe Text
a} :: RepositoryAssociationSummary)

-- | The time, in milliseconds since the epoch, since the repository
-- association was last updated.
repositoryAssociationSummary_lastUpdatedTimeStamp :: Lens.Lens' RepositoryAssociationSummary (Prelude.Maybe Prelude.UTCTime)
repositoryAssociationSummary_lastUpdatedTimeStamp :: (Maybe UTCTime -> f (Maybe UTCTime))
-> RepositoryAssociationSummary -> f RepositoryAssociationSummary
repositoryAssociationSummary_lastUpdatedTimeStamp = (RepositoryAssociationSummary -> Maybe POSIX)
-> (RepositoryAssociationSummary
    -> Maybe POSIX -> RepositoryAssociationSummary)
-> Lens
     RepositoryAssociationSummary
     RepositoryAssociationSummary
     (Maybe POSIX)
     (Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RepositoryAssociationSummary' {Maybe POSIX
lastUpdatedTimeStamp :: Maybe POSIX
$sel:lastUpdatedTimeStamp:RepositoryAssociationSummary' :: RepositoryAssociationSummary -> Maybe POSIX
lastUpdatedTimeStamp} -> Maybe POSIX
lastUpdatedTimeStamp) (\s :: RepositoryAssociationSummary
s@RepositoryAssociationSummary' {} Maybe POSIX
a -> RepositoryAssociationSummary
s {$sel:lastUpdatedTimeStamp:RepositoryAssociationSummary' :: Maybe POSIX
lastUpdatedTimeStamp = Maybe POSIX
a} :: RepositoryAssociationSummary) ((Maybe POSIX -> f (Maybe POSIX))
 -> RepositoryAssociationSummary -> f RepositoryAssociationSummary)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
    -> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> RepositoryAssociationSummary
-> f RepositoryAssociationSummary
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time

instance Core.FromJSON RepositoryAssociationSummary where
  parseJSON :: Value -> Parser RepositoryAssociationSummary
parseJSON =
    String
-> (Object -> Parser RepositoryAssociationSummary)
-> Value
-> Parser RepositoryAssociationSummary
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"RepositoryAssociationSummary"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe RepositoryAssociationState
-> Maybe ProviderType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> RepositoryAssociationSummary
RepositoryAssociationSummary'
            (Maybe Text
 -> Maybe Text
 -> Maybe RepositoryAssociationState
 -> Maybe ProviderType
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe POSIX
 -> RepositoryAssociationSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe RepositoryAssociationState
      -> Maybe ProviderType
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> RepositoryAssociationSummary)
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
"AssociationArn")
            Parser
  (Maybe Text
   -> Maybe RepositoryAssociationState
   -> Maybe ProviderType
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> RepositoryAssociationSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe RepositoryAssociationState
      -> Maybe ProviderType
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> RepositoryAssociationSummary)
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
"AssociationId")
            Parser
  (Maybe RepositoryAssociationState
   -> Maybe ProviderType
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> RepositoryAssociationSummary)
-> Parser (Maybe RepositoryAssociationState)
-> Parser
     (Maybe ProviderType
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> RepositoryAssociationSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe RepositoryAssociationState)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"State")
            Parser
  (Maybe ProviderType
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> RepositoryAssociationSummary)
-> Parser (Maybe ProviderType)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> Maybe POSIX
      -> RepositoryAssociationSummary)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ProviderType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ProviderType")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> Maybe POSIX
   -> RepositoryAssociationSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text -> Maybe POSIX -> RepositoryAssociationSummary)
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
"Owner")
            Parser
  (Maybe Text
   -> Maybe Text -> Maybe POSIX -> RepositoryAssociationSummary)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text -> Maybe POSIX -> RepositoryAssociationSummary)
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 POSIX -> RepositoryAssociationSummary)
-> Parser (Maybe Text)
-> Parser (Maybe POSIX -> RepositoryAssociationSummary)
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
"ConnectionArn")
            Parser (Maybe POSIX -> RepositoryAssociationSummary)
-> Parser (Maybe POSIX) -> Parser RepositoryAssociationSummary
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LastUpdatedTimeStamp")
      )

instance
  Prelude.Hashable
    RepositoryAssociationSummary

instance Prelude.NFData RepositoryAssociationSummary