/* * Copyright 2018-2023 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. */ package com.amazonaws.services.codegurureviewer.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *

* Information about a code review. A code review belongs to the associated repository that contains the reviewed code. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CodeReview implements Serializable, Cloneable, StructuredPojo { /** *

* The name of the code review. *

*/ private String name; /** *

* The Amazon Resource Name (ARN) of the CodeReview object. *

*/ private String codeReviewArn; /** *

* The name of the repository. *

*/ private String repositoryName; /** *

* 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. *

*/ private String owner; /** *

* The type of repository that contains the reviewed code (for example, GitHub or Bitbucket). *

*/ private String providerType; /** *

* The valid code review states are: *

* */ private String state; /** *

* The reason for the state of the code review. *

*/ private String stateReason; /** *

* The time, in milliseconds since the epoch, when the code review was created. *

*/ private java.util.Date createdTimeStamp; /** *

* The time, in milliseconds since the epoch, when the code review was last updated. *

*/ private java.util.Date lastUpdatedTimeStamp; /** *

* The type of code review. *

*/ private String type; /** *

* The pull request ID for the code review. *

*/ private String pullRequestId; /** *

* The type of the source code for the code review. *

*/ private SourceCodeType sourceCodeType; /** *

* The Amazon Resource Name (ARN) of the RepositoryAssociation that contains the reviewed source code. You can retrieve associated repository ARNs by * calling * ListRepositoryAssociations. *

*/ private String associationArn; /** *

* The statistics from the code review. *

*/ private Metrics metrics; /** *

* The types of analysis performed during a repository analysis or a pull request review. You can specify either * Security, CodeQuality, or both. *

*/ private java.util.List analysisTypes; /** *

* The state of the aws-codeguru-reviewer.yml configuration file that allows the configuration of the * CodeGuru Reviewer analysis. The file either exists, doesn't exist, or exists with errors at the root directory of * your repository. *

*/ private String configFileState; /** *

* The name of the code review. *

* * @param name * The name of the code review. */ public void setName(String name) { this.name = name; } /** *

* The name of the code review. *

* * @return The name of the code review. */ public String getName() { return this.name; } /** *

* The name of the code review. *

* * @param name * The name of the code review. * @return Returns a reference to this object so that method calls can be chained together. */ public CodeReview withName(String name) { setName(name); return this; } /** *

* The Amazon Resource Name (ARN) of the CodeReview object. *

* * @param codeReviewArn * The Amazon Resource Name (ARN) of the CodeReview object. */ public void setCodeReviewArn(String codeReviewArn) { this.codeReviewArn = codeReviewArn; } /** *

* The Amazon Resource Name (ARN) of the CodeReview object. *

* * @return The Amazon Resource Name (ARN) of the CodeReview * object. */ public String getCodeReviewArn() { return this.codeReviewArn; } /** *

* The Amazon Resource Name (ARN) of the CodeReview object. *

* * @param codeReviewArn * The Amazon Resource Name (ARN) of the CodeReview object. * @return Returns a reference to this object so that method calls can be chained together. */ public CodeReview withCodeReviewArn(String codeReviewArn) { setCodeReviewArn(codeReviewArn); return this; } /** *

* The name of the repository. *

* * @param repositoryName * The name of the repository. */ public void setRepositoryName(String repositoryName) { this.repositoryName = repositoryName; } /** *

* The name of the repository. *

* * @return The name of the repository. */ public String getRepositoryName() { return this.repositoryName; } /** *

* The name of the repository. *

* * @param repositoryName * The name of the repository. * @return Returns a reference to this object so that method calls can be chained together. */ public CodeReview withRepositoryName(String repositoryName) { setRepositoryName(repositoryName); return this; } /** *

* 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. *

* * @param 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. */ public void setOwner(String owner) { this.owner = 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. *

* * @return 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. */ public String getOwner() { return this.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. *

* * @param 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. * @return Returns a reference to this object so that method calls can be chained together. */ public CodeReview withOwner(String owner) { setOwner(owner); return this; } /** *

* The type of repository that contains the reviewed code (for example, GitHub or Bitbucket). *

* * @param providerType * The type of repository that contains the reviewed code (for example, GitHub or Bitbucket). * @see ProviderType */ public void setProviderType(String providerType) { this.providerType = providerType; } /** *

* The type of repository that contains the reviewed code (for example, GitHub or Bitbucket). *

* * @return The type of repository that contains the reviewed code (for example, GitHub or Bitbucket). * @see ProviderType */ public String getProviderType() { return this.providerType; } /** *

* The type of repository that contains the reviewed code (for example, GitHub or Bitbucket). *

* * @param providerType * The type of repository that contains the reviewed code (for example, GitHub or Bitbucket). * @return Returns a reference to this object so that method calls can be chained together. * @see ProviderType */ public CodeReview withProviderType(String providerType) { setProviderType(providerType); return this; } /** *

* The type of repository that contains the reviewed code (for example, GitHub or Bitbucket). *

* * @param providerType * The type of repository that contains the reviewed code (for example, GitHub or Bitbucket). * @return Returns a reference to this object so that method calls can be chained together. * @see ProviderType */ public CodeReview withProviderType(ProviderType providerType) { this.providerType = providerType.toString(); return this; } /** *

* The valid code review states are: *

* * * @param state * The valid code review states are:

*