
com.pulumi.consul.outputs.ConfigEntryServiceIntentionsSource Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of consul Show documentation
Show all versions of consul Show documentation
A Pulumi package for creating and managing consul 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.consul.outputs;
import com.pulumi.consul.outputs.ConfigEntryServiceIntentionsSourcePermission;
import com.pulumi.core.annotations.CustomType;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class ConfigEntryServiceIntentionsSource {
/**
* @return Specifies the action to take when the source sends traffic to the destination service.
*
*/
private @Nullable String action;
/**
* @return Specifies a description of the intention.
*
*/
private @Nullable String description;
/**
* @return Specifies the name of the source that the intention allows or denies traffic from.
*
*/
private @Nullable String name;
/**
* @return Specifies the traffic source namespace that the intention allows or denies traffic from.
*
*/
private @Nullable String namespace;
/**
* @return Specifies the name of an admin partition that the intention allows or denies traffic from.
*
*/
private @Nullable String partition;
/**
* @return Specifies the name of a peered Consul cluster that the intention allows or denies traffic from
*
*/
private @Nullable String peer;
/**
* @return Specifies a list of permissions for L7 traffic sources. The list contains one or more actions and a set of match criteria for each action.
*
*/
private @Nullable List permissions;
/**
* @return The Precedence field contains a read-only integer. Consul generates the value based on name configurations for the source and destination services.
*
*/
private @Nullable Integer precedence;
/**
* @return Specifies the name of a sameness group that the intention allows or denies traffic from.
*
*/
private @Nullable String samenessGroup;
/**
* @return Specifies the type of destination service that the configuration entry applies to.
*
*/
private @Nullable String type;
private ConfigEntryServiceIntentionsSource() {}
/**
* @return Specifies the action to take when the source sends traffic to the destination service.
*
*/
public Optional action() {
return Optional.ofNullable(this.action);
}
/**
* @return Specifies a description of the intention.
*
*/
public Optional description() {
return Optional.ofNullable(this.description);
}
/**
* @return Specifies the name of the source that the intention allows or denies traffic from.
*
*/
public Optional name() {
return Optional.ofNullable(this.name);
}
/**
* @return Specifies the traffic source namespace that the intention allows or denies traffic from.
*
*/
public Optional namespace() {
return Optional.ofNullable(this.namespace);
}
/**
* @return Specifies the name of an admin partition that the intention allows or denies traffic from.
*
*/
public Optional partition() {
return Optional.ofNullable(this.partition);
}
/**
* @return Specifies the name of a peered Consul cluster that the intention allows or denies traffic from
*
*/
public Optional peer() {
return Optional.ofNullable(this.peer);
}
/**
* @return Specifies a list of permissions for L7 traffic sources. The list contains one or more actions and a set of match criteria for each action.
*
*/
public List permissions() {
return this.permissions == null ? List.of() : this.permissions;
}
/**
* @return The Precedence field contains a read-only integer. Consul generates the value based on name configurations for the source and destination services.
*
*/
public Optional precedence() {
return Optional.ofNullable(this.precedence);
}
/**
* @return Specifies the name of a sameness group that the intention allows or denies traffic from.
*
*/
public Optional samenessGroup() {
return Optional.ofNullable(this.samenessGroup);
}
/**
* @return Specifies the type of destination service that the configuration entry applies to.
*
*/
public Optional type() {
return Optional.ofNullable(this.type);
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(ConfigEntryServiceIntentionsSource defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable String action;
private @Nullable String description;
private @Nullable String name;
private @Nullable String namespace;
private @Nullable String partition;
private @Nullable String peer;
private @Nullable List permissions;
private @Nullable Integer precedence;
private @Nullable String samenessGroup;
private @Nullable String type;
public Builder() {}
public Builder(ConfigEntryServiceIntentionsSource defaults) {
Objects.requireNonNull(defaults);
this.action = defaults.action;
this.description = defaults.description;
this.name = defaults.name;
this.namespace = defaults.namespace;
this.partition = defaults.partition;
this.peer = defaults.peer;
this.permissions = defaults.permissions;
this.precedence = defaults.precedence;
this.samenessGroup = defaults.samenessGroup;
this.type = defaults.type;
}
@CustomType.Setter
public Builder action(@Nullable String action) {
this.action = action;
return this;
}
@CustomType.Setter
public Builder description(@Nullable String description) {
this.description = description;
return this;
}
@CustomType.Setter
public Builder name(@Nullable String name) {
this.name = name;
return this;
}
@CustomType.Setter
public Builder namespace(@Nullable String namespace) {
this.namespace = namespace;
return this;
}
@CustomType.Setter
public Builder partition(@Nullable String partition) {
this.partition = partition;
return this;
}
@CustomType.Setter
public Builder peer(@Nullable String peer) {
this.peer = peer;
return this;
}
@CustomType.Setter
public Builder permissions(@Nullable List permissions) {
this.permissions = permissions;
return this;
}
public Builder permissions(ConfigEntryServiceIntentionsSourcePermission... permissions) {
return permissions(List.of(permissions));
}
@CustomType.Setter
public Builder precedence(@Nullable Integer precedence) {
this.precedence = precedence;
return this;
}
@CustomType.Setter
public Builder samenessGroup(@Nullable String samenessGroup) {
this.samenessGroup = samenessGroup;
return this;
}
@CustomType.Setter
public Builder type(@Nullable String type) {
this.type = type;
return this;
}
public ConfigEntryServiceIntentionsSource build() {
final var _resultValue = new ConfigEntryServiceIntentionsSource();
_resultValue.action = action;
_resultValue.description = description;
_resultValue.name = name;
_resultValue.namespace = namespace;
_resultValue.partition = partition;
_resultValue.peer = peer;
_resultValue.permissions = permissions;
_resultValue.precedence = precedence;
_resultValue.samenessGroup = samenessGroup;
_resultValue.type = type;
return _resultValue;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy