software.amazon.awscdk.services.codebuild.GitHubEnterpriseSourceCredentials Maven / Gradle / Ivy
Show all versions of codebuild Show documentation
package software.amazon.awscdk.services.codebuild;
/**
* The source credentials used when contacting the GitHub Enterprise API.
*
* Note: CodeBuild only allows a single credential for GitHub Enterprise
* to be saved in a given AWS account in a given region -
* any attempt to add more than one will result in an error.
*/
@javax.annotation.Generated(value = "jsii-pacmak/0.22.0 (build 14afdde)", date = "2020-03-18T10:30:24.480Z")
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
@software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.codebuild.$Module.class, fqn = "@aws-cdk/aws-codebuild.GitHubEnterpriseSourceCredentials")
public class GitHubEnterpriseSourceCredentials extends software.amazon.awscdk.core.Resource {
protected GitHubEnterpriseSourceCredentials(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
}
protected GitHubEnterpriseSourceCredentials(final software.amazon.jsii.JsiiObject.InitializationMode initializationMode) {
super(initializationMode);
}
/**
* @param scope This parameter is required.
* @param id This parameter is required.
* @param props This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public GitHubEnterpriseSourceCredentials(final @org.jetbrains.annotations.NotNull software.amazon.awscdk.core.Construct scope, final @org.jetbrains.annotations.NotNull java.lang.String id, final @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.codebuild.GitHubEnterpriseSourceCredentialsProps props) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
software.amazon.jsii.JsiiEngine.getInstance().createNewObject(this, new Object[] { java.util.Objects.requireNonNull(scope, "scope is required"), java.util.Objects.requireNonNull(id, "id is required"), java.util.Objects.requireNonNull(props, "props is required") });
}
/**
* A fluent builder for {@link software.amazon.awscdk.services.codebuild.GitHubEnterpriseSourceCredentials}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static final class Builder {
/**
* @return a new instance of {@link Builder}.
* @param scope This parameter is required.
* @param id This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public static Builder create(final software.amazon.awscdk.core.Construct scope, final java.lang.String id) {
return new Builder(scope, id);
}
private final software.amazon.awscdk.core.Construct scope;
private final java.lang.String id;
private final software.amazon.awscdk.services.codebuild.GitHubEnterpriseSourceCredentialsProps.Builder props;
private Builder(final software.amazon.awscdk.core.Construct scope, final java.lang.String id) {
this.scope = scope;
this.id = id;
this.props = new software.amazon.awscdk.services.codebuild.GitHubEnterpriseSourceCredentialsProps.Builder();
}
/**
* The personal access token to use when contacting the instance of the GitHub Enterprise API.
*
* @return {@code this}
* @param accessToken The personal access token to use when contacting the instance of the GitHub Enterprise API. This parameter is required.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public Builder accessToken(final software.amazon.awscdk.core.SecretValue accessToken) {
this.props.accessToken(accessToken);
return this;
}
/**
* @returns a newly built instance of {@link software.amazon.awscdk.services.codebuild.GitHubEnterpriseSourceCredentials}.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public software.amazon.awscdk.services.codebuild.GitHubEnterpriseSourceCredentials build() {
return new software.amazon.awscdk.services.codebuild.GitHubEnterpriseSourceCredentials(
this.scope,
this.id,
this.props.build()
);
}
}
}