All Downloads are FREE. Search and download functionalities are using the official Maven repository.

software.amazon.awscdk.services.codebuild.CfnSourceCredentialProps Maven / Gradle / Ivy

There is a newer version: 1.204.0
Show newest version
package software.amazon.awscdk.services.codebuild;

/**
 * Properties for defining a `AWS::CodeBuild::SourceCredential`.
 * 

* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-sourcecredential.html */ @javax.annotation.Generated(value = "jsii-pacmak/0.22.0 (build 14afdde)", date = "2020-03-18T10:30:24.080Z") @software.amazon.jsii.Jsii(module = software.amazon.awscdk.services.codebuild.$Module.class, fqn = "@aws-cdk/aws-codebuild.CfnSourceCredentialProps") @software.amazon.jsii.Jsii.Proxy(CfnSourceCredentialProps.Jsii$Proxy.class) @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External) public interface CfnSourceCredentialProps extends software.amazon.jsii.JsiiSerializable { /** * `AWS::CodeBuild::SourceCredential.AuthType`. *

* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-sourcecredential.html#cfn-codebuild-sourcecredential-authtype */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External) java.lang.String getAuthType(); /** * `AWS::CodeBuild::SourceCredential.ServerType`. *

* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-sourcecredential.html#cfn-codebuild-sourcecredential-servertype */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External) java.lang.String getServerType(); /** * `AWS::CodeBuild::SourceCredential.Token`. *

* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-sourcecredential.html#cfn-codebuild-sourcecredential-token */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External) java.lang.String getToken(); /** * `AWS::CodeBuild::SourceCredential.Username`. *

* @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-sourcecredential.html#cfn-codebuild-sourcecredential-username */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External) default java.lang.String getUsername() { return null; } /** * @return a {@link Builder} of {@link CfnSourceCredentialProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External) static Builder builder() { return new Builder(); } /** * A builder for {@link CfnSourceCredentialProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External) public static final class Builder { private java.lang.String authType; private java.lang.String serverType; private java.lang.String token; private java.lang.String username; /** * Sets the value of {@link CfnSourceCredentialProps#getAuthType} * @param authType `AWS::CodeBuild::SourceCredential.AuthType`. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External) public Builder authType(java.lang.String authType) { this.authType = authType; return this; } /** * Sets the value of {@link CfnSourceCredentialProps#getServerType} * @param serverType `AWS::CodeBuild::SourceCredential.ServerType`. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External) public Builder serverType(java.lang.String serverType) { this.serverType = serverType; return this; } /** * Sets the value of {@link CfnSourceCredentialProps#getToken} * @param token `AWS::CodeBuild::SourceCredential.Token`. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External) public Builder token(java.lang.String token) { this.token = token; return this; } /** * Sets the value of {@link CfnSourceCredentialProps#getUsername} * @param username `AWS::CodeBuild::SourceCredential.Username`. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External) public Builder username(java.lang.String username) { this.username = username; return this; } /** * Builds the configured instance. * @return a new instance of {@link CfnSourceCredentialProps} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External) public CfnSourceCredentialProps build() { return new Jsii$Proxy(authType, serverType, token, username); } } /** * An implementation for {@link CfnSourceCredentialProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.External) final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements CfnSourceCredentialProps { private final java.lang.String authType; private final java.lang.String serverType; private final java.lang.String token; private final java.lang.String username; /** * Constructor that initializes the object based on values retrieved from the JsiiObject. * @param objRef Reference to the JSII managed object. */ protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) { super(objRef); this.authType = this.jsiiGet("authType", java.lang.String.class); this.serverType = this.jsiiGet("serverType", java.lang.String.class); this.token = this.jsiiGet("token", java.lang.String.class); this.username = this.jsiiGet("username", java.lang.String.class); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ private Jsii$Proxy(final java.lang.String authType, final java.lang.String serverType, final java.lang.String token, final java.lang.String username) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.authType = java.util.Objects.requireNonNull(authType, "authType is required"); this.serverType = java.util.Objects.requireNonNull(serverType, "serverType is required"); this.token = java.util.Objects.requireNonNull(token, "token is required"); this.username = username; } @Override public java.lang.String getAuthType() { return this.authType; } @Override public java.lang.String getServerType() { return this.serverType; } @Override public java.lang.String getToken() { return this.token; } @Override public java.lang.String getUsername() { return this.username; } @Override public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() { final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE; final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); data.set("authType", om.valueToTree(this.getAuthType())); data.set("serverType", om.valueToTree(this.getServerType())); data.set("token", om.valueToTree(this.getToken())); if (this.getUsername() != null) { data.set("username", om.valueToTree(this.getUsername())); } final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); struct.set("fqn", om.valueToTree("@aws-cdk/aws-codebuild.CfnSourceCredentialProps")); struct.set("data", data); final com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); obj.set("$jsii.struct", struct); return obj; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; CfnSourceCredentialProps.Jsii$Proxy that = (CfnSourceCredentialProps.Jsii$Proxy) o; if (!authType.equals(that.authType)) return false; if (!serverType.equals(that.serverType)) return false; if (!token.equals(that.token)) return false; return this.username != null ? this.username.equals(that.username) : that.username == null; } @Override public int hashCode() { int result = this.authType.hashCode(); result = 31 * result + (this.serverType.hashCode()); result = 31 * result + (this.token.hashCode()); result = 31 * result + (this.username != null ? this.username.hashCode() : 0); return result; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy