
com.pulumi.digitalocean.outputs.AppSpecIngressRule Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of digitalocean Show documentation
Show all versions of digitalocean Show documentation
A Pulumi package for creating and managing DigitalOcean 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.digitalocean.outputs;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.digitalocean.outputs.AppSpecIngressRuleComponent;
import com.pulumi.digitalocean.outputs.AppSpecIngressRuleCors;
import com.pulumi.digitalocean.outputs.AppSpecIngressRuleMatch;
import com.pulumi.digitalocean.outputs.AppSpecIngressRuleRedirect;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class AppSpecIngressRule {
/**
* @return The component to route to. Only one of `component` or `redirect` may be set.
*
*/
private @Nullable AppSpecIngressRuleComponent component;
/**
* @return The [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) policies of the app.
*
*/
private @Nullable AppSpecIngressRuleCors cors;
/**
* @return The match configuration for the rule
*
*/
private @Nullable AppSpecIngressRuleMatch match;
/**
* @return The redirect configuration for the rule. Only one of `component` or `redirect` may be set.
*
*/
private @Nullable AppSpecIngressRuleRedirect redirect;
private AppSpecIngressRule() {}
/**
* @return The component to route to. Only one of `component` or `redirect` may be set.
*
*/
public Optional component() {
return Optional.ofNullable(this.component);
}
/**
* @return The [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) policies of the app.
*
*/
public Optional cors() {
return Optional.ofNullable(this.cors);
}
/**
* @return The match configuration for the rule
*
*/
public Optional match() {
return Optional.ofNullable(this.match);
}
/**
* @return The redirect configuration for the rule. Only one of `component` or `redirect` may be set.
*
*/
public Optional redirect() {
return Optional.ofNullable(this.redirect);
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(AppSpecIngressRule defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable AppSpecIngressRuleComponent component;
private @Nullable AppSpecIngressRuleCors cors;
private @Nullable AppSpecIngressRuleMatch match;
private @Nullable AppSpecIngressRuleRedirect redirect;
public Builder() {}
public Builder(AppSpecIngressRule defaults) {
Objects.requireNonNull(defaults);
this.component = defaults.component;
this.cors = defaults.cors;
this.match = defaults.match;
this.redirect = defaults.redirect;
}
@CustomType.Setter
public Builder component(@Nullable AppSpecIngressRuleComponent component) {
this.component = component;
return this;
}
@CustomType.Setter
public Builder cors(@Nullable AppSpecIngressRuleCors cors) {
this.cors = cors;
return this;
}
@CustomType.Setter
public Builder match(@Nullable AppSpecIngressRuleMatch match) {
this.match = match;
return this;
}
@CustomType.Setter
public Builder redirect(@Nullable AppSpecIngressRuleRedirect redirect) {
this.redirect = redirect;
return this;
}
public AppSpecIngressRule build() {
final var _resultValue = new AppSpecIngressRule();
_resultValue.component = component;
_resultValue.cors = cors;
_resultValue.match = match;
_resultValue.redirect = redirect;
return _resultValue;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy