/* * 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.securityhub.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Information about the build input source code for this build project. *
* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AwsCodeBuildProjectSource implements Serializable, Cloneable, StructuredPojo { /** ** The type of repository that contains the source code to be built. Valid values are: *
*
* BITBUCKET
- The source code is in a Bitbucket repository.
*
* CODECOMMIT
- The source code is in an CodeCommit repository.
*
* CODEPIPELINE
- The source code settings are specified in the source action of a pipeline in
* CodePipeline.
*
* GITHUB
- The source code is in a GitHub repository.
*
* GITHUB_ENTERPRISE
- The source code is in a GitHub Enterprise repository.
*
* NO_SOURCE
- The project does not have input source code.
*
* S3
- The source code is in an S3 input bucket.
*
* Information about the location of the source code to be built. *
** Valid values include: *
** For source code settings that are specified in the source action of a pipeline in CodePipeline, location should * not be specified. If it is specified, CodePipeline ignores it. This is because CodePipeline uses the settings in * a pipeline's source action instead of this value. *
*
* For source code in an CodeCommit repository, the HTTPS clone URL to the repository that contains the source code
* and the build spec file (for example,
* https://git-codecommit.region-ID.amazonaws.com/v1/repos/repo-name
).
*
* For source code in an S3 input bucket, one of the following. *
*
* The path to the ZIP file that contains the source code (for example,
* bucket-name/path/to/object-name.zip
).
*
* The path to the folder that contains the source code (for example,
* bucket-name/path/to/source-code/folder/
).
*
* For source code in a GitHub repository, the HTTPS clone URL to the repository that contains the source and the * build spec file. *
** For source code in a Bitbucket repository, the HTTPS clone URL to the repository that contains the source and the * build spec file. *
** Information about the Git clone depth for the build project. *
*/ private Integer gitCloneDepth; /** ** Whether to ignore SSL warnings while connecting to the project source code. *
*/ private Boolean insecureSsl; /** ** The type of repository that contains the source code to be built. Valid values are: *
*
* BITBUCKET
- The source code is in a Bitbucket repository.
*
* CODECOMMIT
- The source code is in an CodeCommit repository.
*
* CODEPIPELINE
- The source code settings are specified in the source action of a pipeline in
* CodePipeline.
*
* GITHUB
- The source code is in a GitHub repository.
*
* GITHUB_ENTERPRISE
- The source code is in a GitHub Enterprise repository.
*
* NO_SOURCE
- The project does not have input source code.
*
* S3
- The source code is in an S3 input bucket.
*
* BITBUCKET
- The source code is in a Bitbucket repository.
*
* CODECOMMIT
- The source code is in an CodeCommit repository.
*
* CODEPIPELINE
- The source code settings are specified in the source action of a pipeline in
* CodePipeline.
*
* GITHUB
- The source code is in a GitHub repository.
*
* GITHUB_ENTERPRISE
- The source code is in a GitHub Enterprise repository.
*
* NO_SOURCE
- The project does not have input source code.
*
* S3
- The source code is in an S3 input bucket.
*
* The type of repository that contains the source code to be built. Valid values are: *
*
* BITBUCKET
- The source code is in a Bitbucket repository.
*
* CODECOMMIT
- The source code is in an CodeCommit repository.
*
* CODEPIPELINE
- The source code settings are specified in the source action of a pipeline in
* CodePipeline.
*
* GITHUB
- The source code is in a GitHub repository.
*
* GITHUB_ENTERPRISE
- The source code is in a GitHub Enterprise repository.
*
* NO_SOURCE
- The project does not have input source code.
*
* S3
- The source code is in an S3 input bucket.
*
* BITBUCKET
- The source code is in a Bitbucket repository.
*
* CODECOMMIT
- The source code is in an CodeCommit repository.
*
* CODEPIPELINE
- The source code settings are specified in the source action of a pipeline in
* CodePipeline.
*
* GITHUB
- The source code is in a GitHub repository.
*
* GITHUB_ENTERPRISE
- The source code is in a GitHub Enterprise repository.
*
* NO_SOURCE
- The project does not have input source code.
*
* S3
- The source code is in an S3 input bucket.
*
* The type of repository that contains the source code to be built. Valid values are: *
*
* BITBUCKET
- The source code is in a Bitbucket repository.
*
* CODECOMMIT
- The source code is in an CodeCommit repository.
*
* CODEPIPELINE
- The source code settings are specified in the source action of a pipeline in
* CodePipeline.
*
* GITHUB
- The source code is in a GitHub repository.
*
* GITHUB_ENTERPRISE
- The source code is in a GitHub Enterprise repository.
*
* NO_SOURCE
- The project does not have input source code.
*
* S3
- The source code is in an S3 input bucket.
*
* BITBUCKET
- The source code is in a Bitbucket repository.
*
* CODECOMMIT
- The source code is in an CodeCommit repository.
*
* CODEPIPELINE
- The source code settings are specified in the source action of a pipeline in
* CodePipeline.
*
* GITHUB
- The source code is in a GitHub repository.
*
* GITHUB_ENTERPRISE
- The source code is in a GitHub Enterprise repository.
*
* NO_SOURCE
- The project does not have input source code.
*
* S3
- The source code is in an S3 input bucket.
*
* Information about the location of the source code to be built. *
** Valid values include: *
** For source code settings that are specified in the source action of a pipeline in CodePipeline, location should * not be specified. If it is specified, CodePipeline ignores it. This is because CodePipeline uses the settings in * a pipeline's source action instead of this value. *
*
* For source code in an CodeCommit repository, the HTTPS clone URL to the repository that contains the source code
* and the build spec file (for example,
* https://git-codecommit.region-ID.amazonaws.com/v1/repos/repo-name
).
*
* For source code in an S3 input bucket, one of the following. *
*
* The path to the ZIP file that contains the source code (for example,
* bucket-name/path/to/object-name.zip
).
*
* The path to the folder that contains the source code (for example,
* bucket-name/path/to/source-code/folder/
).
*
* For source code in a GitHub repository, the HTTPS clone URL to the repository that contains the source and the * build spec file. *
** For source code in a Bitbucket repository, the HTTPS clone URL to the repository that contains the source and the * build spec file. *
** Valid values include: *
** For source code settings that are specified in the source action of a pipeline in CodePipeline, location * should not be specified. If it is specified, CodePipeline ignores it. This is because CodePipeline uses * the settings in a pipeline's source action instead of this value. *
*
* For source code in an CodeCommit repository, the HTTPS clone URL to the repository that contains the
* source code and the build spec file (for example,
* https://git-codecommit.region-ID.amazonaws.com/v1/repos/repo-name
).
*
* For source code in an S3 input bucket, one of the following. *
*
* The path to the ZIP file that contains the source code (for example,
* bucket-name/path/to/object-name.zip
).
*
* The path to the folder that contains the source code (for example,
* bucket-name/path/to/source-code/folder/
).
*
* For source code in a GitHub repository, the HTTPS clone URL to the repository that contains the source and * the build spec file. *
** For source code in a Bitbucket repository, the HTTPS clone URL to the repository that contains the source * and the build spec file. *
** Information about the location of the source code to be built. *
** Valid values include: *
** For source code settings that are specified in the source action of a pipeline in CodePipeline, location should * not be specified. If it is specified, CodePipeline ignores it. This is because CodePipeline uses the settings in * a pipeline's source action instead of this value. *
*
* For source code in an CodeCommit repository, the HTTPS clone URL to the repository that contains the source code
* and the build spec file (for example,
* https://git-codecommit.region-ID.amazonaws.com/v1/repos/repo-name
).
*
* For source code in an S3 input bucket, one of the following. *
*
* The path to the ZIP file that contains the source code (for example,
* bucket-name/path/to/object-name.zip
).
*
* The path to the folder that contains the source code (for example,
* bucket-name/path/to/source-code/folder/
).
*
* For source code in a GitHub repository, the HTTPS clone URL to the repository that contains the source and the * build spec file. *
** For source code in a Bitbucket repository, the HTTPS clone URL to the repository that contains the source and the * build spec file. *
** Valid values include: *
** For source code settings that are specified in the source action of a pipeline in CodePipeline, location * should not be specified. If it is specified, CodePipeline ignores it. This is because CodePipeline uses * the settings in a pipeline's source action instead of this value. *
*
* For source code in an CodeCommit repository, the HTTPS clone URL to the repository that contains the
* source code and the build spec file (for example,
* https://git-codecommit.region-ID.amazonaws.com/v1/repos/repo-name
).
*
* For source code in an S3 input bucket, one of the following. *
*
* The path to the ZIP file that contains the source code (for example,
* bucket-name/path/to/object-name.zip
).
*
* The path to the folder that contains the source code (for example,
* bucket-name/path/to/source-code/folder/
).
*
* For source code in a GitHub repository, the HTTPS clone URL to the repository that contains the source * and the build spec file. *
** For source code in a Bitbucket repository, the HTTPS clone URL to the repository that contains the source * and the build spec file. *
** Information about the location of the source code to be built. *
** Valid values include: *
** For source code settings that are specified in the source action of a pipeline in CodePipeline, location should * not be specified. If it is specified, CodePipeline ignores it. This is because CodePipeline uses the settings in * a pipeline's source action instead of this value. *
*
* For source code in an CodeCommit repository, the HTTPS clone URL to the repository that contains the source code
* and the build spec file (for example,
* https://git-codecommit.region-ID.amazonaws.com/v1/repos/repo-name
).
*
* For source code in an S3 input bucket, one of the following. *
*
* The path to the ZIP file that contains the source code (for example,
* bucket-name/path/to/object-name.zip
).
*
* The path to the folder that contains the source code (for example,
* bucket-name/path/to/source-code/folder/
).
*
* For source code in a GitHub repository, the HTTPS clone URL to the repository that contains the source and the * build spec file. *
** For source code in a Bitbucket repository, the HTTPS clone URL to the repository that contains the source and the * build spec file. *
** Valid values include: *
** For source code settings that are specified in the source action of a pipeline in CodePipeline, location * should not be specified. If it is specified, CodePipeline ignores it. This is because CodePipeline uses * the settings in a pipeline's source action instead of this value. *
*
* For source code in an CodeCommit repository, the HTTPS clone URL to the repository that contains the
* source code and the build spec file (for example,
* https://git-codecommit.region-ID.amazonaws.com/v1/repos/repo-name
).
*
* For source code in an S3 input bucket, one of the following. *
*
* The path to the ZIP file that contains the source code (for example,
* bucket-name/path/to/object-name.zip
).
*
* The path to the folder that contains the source code (for example,
* bucket-name/path/to/source-code/folder/
).
*
* For source code in a GitHub repository, the HTTPS clone URL to the repository that contains the source and * the build spec file. *
** For source code in a Bitbucket repository, the HTTPS clone URL to the repository that contains the source * and the build spec file. *
** Information about the Git clone depth for the build project. *
* * @param gitCloneDepth * Information about the Git clone depth for the build project. */ public void setGitCloneDepth(Integer gitCloneDepth) { this.gitCloneDepth = gitCloneDepth; } /** ** Information about the Git clone depth for the build project. *
* * @return Information about the Git clone depth for the build project. */ public Integer getGitCloneDepth() { return this.gitCloneDepth; } /** ** Information about the Git clone depth for the build project. *
* * @param gitCloneDepth * Information about the Git clone depth for the build project. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsCodeBuildProjectSource withGitCloneDepth(Integer gitCloneDepth) { setGitCloneDepth(gitCloneDepth); return this; } /** ** Whether to ignore SSL warnings while connecting to the project source code. *
* * @param insecureSsl * Whether to ignore SSL warnings while connecting to the project source code. */ public void setInsecureSsl(Boolean insecureSsl) { this.insecureSsl = insecureSsl; } /** ** Whether to ignore SSL warnings while connecting to the project source code. *
* * @return Whether to ignore SSL warnings while connecting to the project source code. */ public Boolean getInsecureSsl() { return this.insecureSsl; } /** ** Whether to ignore SSL warnings while connecting to the project source code. *
* * @param insecureSsl * Whether to ignore SSL warnings while connecting to the project source code. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsCodeBuildProjectSource withInsecureSsl(Boolean insecureSsl) { setInsecureSsl(insecureSsl); return this; } /** ** Whether to ignore SSL warnings while connecting to the project source code. *
* * @return Whether to ignore SSL warnings while connecting to the project source code. */ public Boolean isInsecureSsl() { return this.insecureSsl; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getType() != null) sb.append("Type: ").append(getType()).append(","); if (getLocation() != null) sb.append("Location: ").append(getLocation()).append(","); if (getGitCloneDepth() != null) sb.append("GitCloneDepth: ").append(getGitCloneDepth()).append(","); if (getInsecureSsl() != null) sb.append("InsecureSsl: ").append(getInsecureSsl()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof AwsCodeBuildProjectSource == false) return false; AwsCodeBuildProjectSource other = (AwsCodeBuildProjectSource) obj; if (other.getType() == null ^ this.getType() == null) return false; if (other.getType() != null && other.getType().equals(this.getType()) == false) return false; if (other.getLocation() == null ^ this.getLocation() == null) return false; if (other.getLocation() != null && other.getLocation().equals(this.getLocation()) == false) return false; if (other.getGitCloneDepth() == null ^ this.getGitCloneDepth() == null) return false; if (other.getGitCloneDepth() != null && other.getGitCloneDepth().equals(this.getGitCloneDepth()) == false) return false; if (other.getInsecureSsl() == null ^ this.getInsecureSsl() == null) return false; if (other.getInsecureSsl() != null && other.getInsecureSsl().equals(this.getInsecureSsl()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); hashCode = prime * hashCode + ((getLocation() == null) ? 0 : getLocation().hashCode()); hashCode = prime * hashCode + ((getGitCloneDepth() == null) ? 0 : getGitCloneDepth().hashCode()); hashCode = prime * hashCode + ((getInsecureSsl() == null) ? 0 : getInsecureSsl().hashCode()); return hashCode; } @Override public AwsCodeBuildProjectSource clone() { try { return (AwsCodeBuildProjectSource) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.securityhub.model.transform.AwsCodeBuildProjectSourceMarshaller.getInstance().marshall(this, protocolMarshaller); } }