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

com.pulumi.googlenative.networksecurity.v1.RuleArgs Maven / Gradle / Ivy

// *** 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.googlenative.networksecurity.v1;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.googlenative.networksecurity.v1.enums.RuleBasicProfile;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class RuleArgs extends com.pulumi.resources.ResourceArgs {

    public static final RuleArgs Empty = new RuleArgs();

    /**
     * Optional. CEL expression for matching on L7/application level criteria.
     * 
     */
    @Import(name="applicationMatcher")
    private @Nullable Output applicationMatcher;

    /**
     * @return Optional. CEL expression for matching on L7/application level criteria.
     * 
     */
    public Optional> applicationMatcher() {
        return Optional.ofNullable(this.applicationMatcher);
    }

    /**
     * Profile which tells what the primitive action should be.
     * 
     */
    @Import(name="basicProfile", required=true)
    private Output basicProfile;

    /**
     * @return Profile which tells what the primitive action should be.
     * 
     */
    public Output basicProfile() {
        return this.basicProfile;
    }

    /**
     * Optional. Free-text description of the resource.
     * 
     */
    @Import(name="description")
    private @Nullable Output description;

    /**
     * @return Optional. Free-text description of the resource.
     * 
     */
    public Optional> description() {
        return Optional.ofNullable(this.description);
    }

    /**
     * Whether the rule is enforced.
     * 
     */
    @Import(name="enabled", required=true)
    private Output enabled;

    /**
     * @return Whether the rule is enforced.
     * 
     */
    public Output enabled() {
        return this.enabled;
    }

    @Import(name="gatewaySecurityPolicyId", required=true)
    private Output gatewaySecurityPolicyId;

    public Output gatewaySecurityPolicyId() {
        return this.gatewaySecurityPolicyId;
    }

    /**
     * The ID to use for the rule, which will become the final component of the rule's resource name. This value should be 4-63 characters, and valid characters are /a-z-/.
     * 
     */
    @Import(name="gatewaySecurityPolicyRuleId")
    private @Nullable Output gatewaySecurityPolicyRuleId;

    /**
     * @return The ID to use for the rule, which will become the final component of the rule's resource name. This value should be 4-63 characters, and valid characters are /a-z-/.
     * 
     */
    public Optional> gatewaySecurityPolicyRuleId() {
        return Optional.ofNullable(this.gatewaySecurityPolicyRuleId);
    }

    @Import(name="location")
    private @Nullable Output location;

    public Optional> location() {
        return Optional.ofNullable(this.location);
    }

    /**
     * Immutable. Name of the resource. ame is the full resource name so projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}/rules/{rule} rule should match the pattern: (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).
     * 
     */
    @Import(name="name", required=true)
    private Output name;

    /**
     * @return Immutable. Name of the resource. ame is the full resource name so projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}/rules/{rule} rule should match the pattern: (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).
     * 
     */
    public Output name() {
        return this.name;
    }

    /**
     * Priority of the rule. Lower number corresponds to higher precedence.
     * 
     */
    @Import(name="priority", required=true)
    private Output priority;

    /**
     * @return Priority of the rule. Lower number corresponds to higher precedence.
     * 
     */
    public Output priority() {
        return this.priority;
    }

    @Import(name="project")
    private @Nullable Output project;

    public Optional> project() {
        return Optional.ofNullable(this.project);
    }

    /**
     * CEL expression for matching on session criteria.
     * 
     */
    @Import(name="sessionMatcher", required=true)
    private Output sessionMatcher;

    /**
     * @return CEL expression for matching on session criteria.
     * 
     */
    public Output sessionMatcher() {
        return this.sessionMatcher;
    }

    /**
     * Optional. Flag to enable TLS inspection of traffic matching on , can only be true if the parent GatewaySecurityPolicy references a TLSInspectionConfig.
     * 
     */
    @Import(name="tlsInspectionEnabled")
    private @Nullable Output tlsInspectionEnabled;

    /**
     * @return Optional. Flag to enable TLS inspection of traffic matching on , can only be true if the parent GatewaySecurityPolicy references a TLSInspectionConfig.
     * 
     */
    public Optional> tlsInspectionEnabled() {
        return Optional.ofNullable(this.tlsInspectionEnabled);
    }

    private RuleArgs() {}

    private RuleArgs(RuleArgs $) {
        this.applicationMatcher = $.applicationMatcher;
        this.basicProfile = $.basicProfile;
        this.description = $.description;
        this.enabled = $.enabled;
        this.gatewaySecurityPolicyId = $.gatewaySecurityPolicyId;
        this.gatewaySecurityPolicyRuleId = $.gatewaySecurityPolicyRuleId;
        this.location = $.location;
        this.name = $.name;
        this.priority = $.priority;
        this.project = $.project;
        this.sessionMatcher = $.sessionMatcher;
        this.tlsInspectionEnabled = $.tlsInspectionEnabled;
    }

    public static Builder builder() {
        return new Builder();
    }
    public static Builder builder(RuleArgs defaults) {
        return new Builder(defaults);
    }

    public static final class Builder {
        private RuleArgs $;

        public Builder() {
            $ = new RuleArgs();
        }

        public Builder(RuleArgs defaults) {
            $ = new RuleArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param applicationMatcher Optional. CEL expression for matching on L7/application level criteria.
         * 
         * @return builder
         * 
         */
        public Builder applicationMatcher(@Nullable Output applicationMatcher) {
            $.applicationMatcher = applicationMatcher;
            return this;
        }

        /**
         * @param applicationMatcher Optional. CEL expression for matching on L7/application level criteria.
         * 
         * @return builder
         * 
         */
        public Builder applicationMatcher(String applicationMatcher) {
            return applicationMatcher(Output.of(applicationMatcher));
        }

        /**
         * @param basicProfile Profile which tells what the primitive action should be.
         * 
         * @return builder
         * 
         */
        public Builder basicProfile(Output basicProfile) {
            $.basicProfile = basicProfile;
            return this;
        }

        /**
         * @param basicProfile Profile which tells what the primitive action should be.
         * 
         * @return builder
         * 
         */
        public Builder basicProfile(RuleBasicProfile basicProfile) {
            return basicProfile(Output.of(basicProfile));
        }

        /**
         * @param description Optional. Free-text description of the resource.
         * 
         * @return builder
         * 
         */
        public Builder description(@Nullable Output description) {
            $.description = description;
            return this;
        }

        /**
         * @param description Optional. Free-text description of the resource.
         * 
         * @return builder
         * 
         */
        public Builder description(String description) {
            return description(Output.of(description));
        }

        /**
         * @param enabled Whether the rule is enforced.
         * 
         * @return builder
         * 
         */
        public Builder enabled(Output enabled) {
            $.enabled = enabled;
            return this;
        }

        /**
         * @param enabled Whether the rule is enforced.
         * 
         * @return builder
         * 
         */
        public Builder enabled(Boolean enabled) {
            return enabled(Output.of(enabled));
        }

        public Builder gatewaySecurityPolicyId(Output gatewaySecurityPolicyId) {
            $.gatewaySecurityPolicyId = gatewaySecurityPolicyId;
            return this;
        }

        public Builder gatewaySecurityPolicyId(String gatewaySecurityPolicyId) {
            return gatewaySecurityPolicyId(Output.of(gatewaySecurityPolicyId));
        }

        /**
         * @param gatewaySecurityPolicyRuleId The ID to use for the rule, which will become the final component of the rule's resource name. This value should be 4-63 characters, and valid characters are /a-z-/.
         * 
         * @return builder
         * 
         */
        public Builder gatewaySecurityPolicyRuleId(@Nullable Output gatewaySecurityPolicyRuleId) {
            $.gatewaySecurityPolicyRuleId = gatewaySecurityPolicyRuleId;
            return this;
        }

        /**
         * @param gatewaySecurityPolicyRuleId The ID to use for the rule, which will become the final component of the rule's resource name. This value should be 4-63 characters, and valid characters are /a-z-/.
         * 
         * @return builder
         * 
         */
        public Builder gatewaySecurityPolicyRuleId(String gatewaySecurityPolicyRuleId) {
            return gatewaySecurityPolicyRuleId(Output.of(gatewaySecurityPolicyRuleId));
        }

        public Builder location(@Nullable Output location) {
            $.location = location;
            return this;
        }

        public Builder location(String location) {
            return location(Output.of(location));
        }

        /**
         * @param name Immutable. Name of the resource. ame is the full resource name so projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}/rules/{rule} rule should match the pattern: (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).
         * 
         * @return builder
         * 
         */
        public Builder name(Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name Immutable. Name of the resource. ame is the full resource name so projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}/rules/{rule} rule should match the pattern: (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param priority Priority of the rule. Lower number corresponds to higher precedence.
         * 
         * @return builder
         * 
         */
        public Builder priority(Output priority) {
            $.priority = priority;
            return this;
        }

        /**
         * @param priority Priority of the rule. Lower number corresponds to higher precedence.
         * 
         * @return builder
         * 
         */
        public Builder priority(Integer priority) {
            return priority(Output.of(priority));
        }

        public Builder project(@Nullable Output project) {
            $.project = project;
            return this;
        }

        public Builder project(String project) {
            return project(Output.of(project));
        }

        /**
         * @param sessionMatcher CEL expression for matching on session criteria.
         * 
         * @return builder
         * 
         */
        public Builder sessionMatcher(Output sessionMatcher) {
            $.sessionMatcher = sessionMatcher;
            return this;
        }

        /**
         * @param sessionMatcher CEL expression for matching on session criteria.
         * 
         * @return builder
         * 
         */
        public Builder sessionMatcher(String sessionMatcher) {
            return sessionMatcher(Output.of(sessionMatcher));
        }

        /**
         * @param tlsInspectionEnabled Optional. Flag to enable TLS inspection of traffic matching on , can only be true if the parent GatewaySecurityPolicy references a TLSInspectionConfig.
         * 
         * @return builder
         * 
         */
        public Builder tlsInspectionEnabled(@Nullable Output tlsInspectionEnabled) {
            $.tlsInspectionEnabled = tlsInspectionEnabled;
            return this;
        }

        /**
         * @param tlsInspectionEnabled Optional. Flag to enable TLS inspection of traffic matching on , can only be true if the parent GatewaySecurityPolicy references a TLSInspectionConfig.
         * 
         * @return builder
         * 
         */
        public Builder tlsInspectionEnabled(Boolean tlsInspectionEnabled) {
            return tlsInspectionEnabled(Output.of(tlsInspectionEnabled));
        }

        public RuleArgs build() {
            $.basicProfile = Objects.requireNonNull($.basicProfile, "expected parameter 'basicProfile' to be non-null");
            $.enabled = Objects.requireNonNull($.enabled, "expected parameter 'enabled' to be non-null");
            $.gatewaySecurityPolicyId = Objects.requireNonNull($.gatewaySecurityPolicyId, "expected parameter 'gatewaySecurityPolicyId' to be non-null");
            $.name = Objects.requireNonNull($.name, "expected parameter 'name' to be non-null");
            $.priority = Objects.requireNonNull($.priority, "expected parameter 'priority' to be non-null");
            $.sessionMatcher = Objects.requireNonNull($.sessionMatcher, "expected parameter 'sessionMatcher' to be non-null");
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy