/*
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License").
 * You may not use this file except in compliance with the License.
 * A copy of the License is located at
 * 
 *  http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed
 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
 * express or implied. See the License for the specific language governing
 * permissions and limitations under the License.
 */
/*
 * Do not modify this file. This file is generated from the codeguru-reviewer-2019-09-19.normal.json service model.
 */
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.CodeGuruReviewer.Model
{
    /// 
    /// Information about a repository association. The DescribeRepositoryAssociation
    /// operation returns a RepositoryAssociation object.
    /// 
    public partial class RepositoryAssociation
    {
        private string _associationArn;
        private string _associationId;
        private string _connectionArn;
        private DateTime? _createdTimeStamp;
        private KMSKeyDetails _kmsKeyDetails;
        private DateTime? _lastUpdatedTimeStamp;
        private string _name;
        private string _owner;
        private ProviderType _providerType;
        private S3RepositoryDetails _s3RepositoryDetails;
        private RepositoryAssociationState _state;
        private string _stateReason;
        /// 
        /// Gets and sets the property AssociationArn. 
        /// 
        /// The Amazon Resource Name (ARN) identifying the repository association.
        /// 
        /// 
        [AWSProperty(Min=1, Max=1600)]
        public string AssociationArn
        {
            get { return this._associationArn; }
            set { this._associationArn = value; }
        }
        // Check to see if AssociationArn property is set
        internal bool IsSetAssociationArn()
        {
            return this._associationArn != null;
        }
        /// 
        /// Gets and sets the property AssociationId. 
        /// 
        /// The ID of the repository association.
        /// 
        /// 
        [AWSProperty(Min=1, Max=64)]
        public string AssociationId
        {
            get { return this._associationId; }
            set { this._associationId = value; }
        }
        // Check to see if AssociationId property is set
        internal bool IsSetAssociationId()
        {
            return this._associationId != null;
        }
        /// 
        /// Gets and sets the property 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 Connection
        /// in the Amazon Web Services CodeStar Connections API Reference.
        /// 
        /// 
        [AWSProperty(Min=0, Max=256)]
        public string ConnectionArn
        {
            get { return this._connectionArn; }
            set { this._connectionArn = value; }
        }
        // Check to see if ConnectionArn property is set
        internal bool IsSetConnectionArn()
        {
            return this._connectionArn != null;
        }
        /// 
        /// Gets and sets the property CreatedTimeStamp. 
        /// 
        /// The time, in milliseconds since the epoch, when the repository association was created.
        /// 
        /// 
        public DateTime CreatedTimeStamp
        {
            get { return this._createdTimeStamp.GetValueOrDefault(); }
            set { this._createdTimeStamp = value; }
        }
        // Check to see if CreatedTimeStamp property is set
        internal bool IsSetCreatedTimeStamp()
        {
            return this._createdTimeStamp.HasValue; 
        }
        /// 
        /// Gets and sets the property KMSKeyDetails. 
        /// 
        /// A KMSKeyDetails object that contains:
        /// 
        ///   -  
        /// 
        /// The encryption option for this repository association. It is either owned by Amazon
        /// Web Services Key Management Service (KMS) (AWS_OWNED_CMK) or customer
        /// managed (CUSTOMER_MANAGED_CMK).
        /// 
        ///
-  
        /// 
        /// The ID of the Amazon Web Services KMS key that is associated with this repository
        /// association.
        /// 
        ///  
/// 
        public KMSKeyDetails KMSKeyDetails
        {
            get { return this._kmsKeyDetails; }
            set { this._kmsKeyDetails = value; }
        }
        // Check to see if KMSKeyDetails property is set
        internal bool IsSetKMSKeyDetails()
        {
            return this._kmsKeyDetails != null;
        }
        /// 
        /// Gets and sets the property LastUpdatedTimeStamp. 
        /// 
        /// The time, in milliseconds since the epoch, when the repository association was last
        /// updated.
        /// 
        /// 
        public DateTime LastUpdatedTimeStamp
        {
            get { return this._lastUpdatedTimeStamp.GetValueOrDefault(); }
            set { this._lastUpdatedTimeStamp = value; }
        }
        // Check to see if LastUpdatedTimeStamp property is set
        internal bool IsSetLastUpdatedTimeStamp()
        {
            return this._lastUpdatedTimeStamp.HasValue; 
        }
        /// 
        /// Gets and sets the property Name. 
        /// 
        /// The name of the repository.
        /// 
        /// 
        [AWSProperty(Min=1, Max=100)]
        public string Name
        {
            get { return this._name; }
            set { this._name = value; }
        }
        // Check to see if Name property is set
        internal bool IsSetName()
        {
            return this._name != null;
        }
        /// 
        /// Gets and sets the property 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.
        /// 
        /// 
        [AWSProperty(Min=1, Max=100)]
        public string Owner
        {
            get { return this._owner; }
            set { this._owner = value; }
        }
        // Check to see if Owner property is set
        internal bool IsSetOwner()
        {
            return this._owner != null;
        }
        /// 
        /// Gets and sets the property ProviderType. 
        /// 
        /// The provider type of the repository association.
        /// 
        /// 
        public ProviderType ProviderType
        {
            get { return this._providerType; }
            set { this._providerType = value; }
        }
        // Check to see if ProviderType property is set
        internal bool IsSetProviderType()
        {
            return this._providerType != null;
        }
        /// 
        /// Gets and sets the property S3RepositoryDetails.
        /// 
        public S3RepositoryDetails S3RepositoryDetails
        {
            get { return this._s3RepositoryDetails; }
            set { this._s3RepositoryDetails = value; }
        }
        // Check to see if S3RepositoryDetails property is set
        internal bool IsSetS3RepositoryDetails()
        {
            return this._s3RepositoryDetails != null;
        }
        /// 
        /// Gets and sets the property 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 ProviderTypeisGitHub,GitHub
        /// Enterprise Server, orBitbucket, 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 anassociated repository
        /// with tags after it has been disassociated. For more information, see Using
        /// tags to control access to associated repositories in the Amazon CodeGuru Reviewer
        /// User Guide.
        /// 
        ///  
/// 
        public RepositoryAssociationState State
        {
            get { return this._state; }
            set { this._state = value; }
        }
        // Check to see if State property is set
        internal bool IsSetState()
        {
            return this._state != null;
        }
        /// 
        /// Gets and sets the property StateReason. 
        /// 
        /// A description of why the repository association is in the current state.
        /// 
        /// 
        [AWSProperty(Min=0, Max=256)]
        public string StateReason
        {
            get { return this._stateReason; }
            set { this._stateReason = value; }
        }
        // Check to see if StateReason property is set
        internal bool IsSetStateReason()
        {
            return this._stateReason != null;
        }
    }
}