Class CfnSourceCredentialProps.Builder
java.lang.Object
software.amazon.awscdk.services.codebuild.CfnSourceCredentialProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnSourceCredentialProps>
- Enclosing interface:
- CfnSourceCredentialProps
@Stability(Stable)
public static final class CfnSourceCredentialProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnSourceCredentialProps>
A builder for
CfnSourceCredentialProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the value ofCfnSourceCredentialProps.getAuthType()build()Builds the configured instance.serverType(String serverType) Sets the value ofCfnSourceCredentialProps.getServerType()Sets the value ofCfnSourceCredentialProps.getToken()Sets the value ofCfnSourceCredentialProps.getUsername()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
authType
Sets the value ofCfnSourceCredentialProps.getAuthType()- Parameters:
authType- The type of authentication used by the credentials. This parameter is required. Valid options are OAUTH, BASIC_AUTH, or PERSONAL_ACCESS_TOKEN.- Returns:
this
-
serverType
Sets the value ofCfnSourceCredentialProps.getServerType()- Parameters:
serverType- The type of source provider. This parameter is required. The valid options are GITHUB, GITHUB_ENTERPRISE, or BITBUCKET.- Returns:
this
-
token
Sets the value ofCfnSourceCredentialProps.getToken()- Parameters:
token- For GitHub or GitHub Enterprise, this is the personal access token. This parameter is required. For Bitbucket, this is the app password.- Returns:
this
-
username
Sets the value ofCfnSourceCredentialProps.getUsername()- Parameters:
username- The Bitbucket username when theauthTypeis BASIC_AUTH. This parameter is not valid for other types of source providers or connections.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnSourceCredentialProps>- Returns:
- a new instance of
CfnSourceCredentialProps - Throws:
NullPointerException- if any required attribute was not provided
-