com.pulumi.postgresql.outputs.GetSchemasResult Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of postgresql Show documentation
Show all versions of postgresql Show documentation
A Pulumi package for creating and managing postgresql cloud resources.
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.postgresql.outputs;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class GetSchemasResult {
private String database;
/**
* @return The provider-assigned unique ID for this managed resource.
*
*/
private String id;
private @Nullable Boolean includeSystemSchemas;
private @Nullable List likeAllPatterns;
private @Nullable List likeAnyPatterns;
private @Nullable List notLikeAllPatterns;
private @Nullable String regexPattern;
/**
* @return A list of full names of found schemas.
*
*/
private List schemas;
private GetSchemasResult() {}
public String database() {
return this.database;
}
/**
* @return The provider-assigned unique ID for this managed resource.
*
*/
public String id() {
return this.id;
}
public Optional includeSystemSchemas() {
return Optional.ofNullable(this.includeSystemSchemas);
}
public List likeAllPatterns() {
return this.likeAllPatterns == null ? List.of() : this.likeAllPatterns;
}
public List likeAnyPatterns() {
return this.likeAnyPatterns == null ? List.of() : this.likeAnyPatterns;
}
public List notLikeAllPatterns() {
return this.notLikeAllPatterns == null ? List.of() : this.notLikeAllPatterns;
}
public Optional regexPattern() {
return Optional.ofNullable(this.regexPattern);
}
/**
* @return A list of full names of found schemas.
*
*/
public List schemas() {
return this.schemas;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(GetSchemasResult defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private String database;
private String id;
private @Nullable Boolean includeSystemSchemas;
private @Nullable List likeAllPatterns;
private @Nullable List likeAnyPatterns;
private @Nullable List notLikeAllPatterns;
private @Nullable String regexPattern;
private List schemas;
public Builder() {}
public Builder(GetSchemasResult defaults) {
Objects.requireNonNull(defaults);
this.database = defaults.database;
this.id = defaults.id;
this.includeSystemSchemas = defaults.includeSystemSchemas;
this.likeAllPatterns = defaults.likeAllPatterns;
this.likeAnyPatterns = defaults.likeAnyPatterns;
this.notLikeAllPatterns = defaults.notLikeAllPatterns;
this.regexPattern = defaults.regexPattern;
this.schemas = defaults.schemas;
}
@CustomType.Setter
public Builder database(String database) {
if (database == null) {
throw new MissingRequiredPropertyException("GetSchemasResult", "database");
}
this.database = database;
return this;
}
@CustomType.Setter
public Builder id(String id) {
if (id == null) {
throw new MissingRequiredPropertyException("GetSchemasResult", "id");
}
this.id = id;
return this;
}
@CustomType.Setter
public Builder includeSystemSchemas(@Nullable Boolean includeSystemSchemas) {
this.includeSystemSchemas = includeSystemSchemas;
return this;
}
@CustomType.Setter
public Builder likeAllPatterns(@Nullable List likeAllPatterns) {
this.likeAllPatterns = likeAllPatterns;
return this;
}
public Builder likeAllPatterns(String... likeAllPatterns) {
return likeAllPatterns(List.of(likeAllPatterns));
}
@CustomType.Setter
public Builder likeAnyPatterns(@Nullable List likeAnyPatterns) {
this.likeAnyPatterns = likeAnyPatterns;
return this;
}
public Builder likeAnyPatterns(String... likeAnyPatterns) {
return likeAnyPatterns(List.of(likeAnyPatterns));
}
@CustomType.Setter
public Builder notLikeAllPatterns(@Nullable List notLikeAllPatterns) {
this.notLikeAllPatterns = notLikeAllPatterns;
return this;
}
public Builder notLikeAllPatterns(String... notLikeAllPatterns) {
return notLikeAllPatterns(List.of(notLikeAllPatterns));
}
@CustomType.Setter
public Builder regexPattern(@Nullable String regexPattern) {
this.regexPattern = regexPattern;
return this;
}
@CustomType.Setter
public Builder schemas(List schemas) {
if (schemas == null) {
throw new MissingRequiredPropertyException("GetSchemasResult", "schemas");
}
this.schemas = schemas;
return this;
}
public Builder schemas(String... schemas) {
return schemas(List.of(schemas));
}
public GetSchemasResult build() {
final var _resultValue = new GetSchemasResult();
_resultValue.database = database;
_resultValue.id = id;
_resultValue.includeSystemSchemas = includeSystemSchemas;
_resultValue.likeAllPatterns = likeAllPatterns;
_resultValue.likeAnyPatterns = likeAnyPatterns;
_resultValue.notLikeAllPatterns = notLikeAllPatterns;
_resultValue.regexPattern = regexPattern;
_resultValue.schemas = schemas;
return _resultValue;
}
}
}