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

com.pulumi.azurenative.migrate.outputs.NsgSecurityRuleResponse 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.azurenative.migrate.outputs;

import com.pulumi.core.annotations.CustomType;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class NsgSecurityRuleResponse {
    /**
     * @return Gets or sets whether network traffic is allowed or denied.
     * Possible values are “Allow” and “Deny”.
     * 
     */
    private @Nullable String access;
    /**
     * @return Gets or sets a description for this rule. Restricted to 140 chars.
     * 
     */
    private @Nullable String description;
    /**
     * @return Gets or sets destination address prefix. CIDR or source IP range.
     *  A “*” can also be used to match all source IPs. Default tags such
     * as ‘VirtualNetwork’, ‘AzureLoadBalancer’ and ‘Internet’ can also be used.
     * 
     */
    private @Nullable String destinationAddressPrefix;
    /**
     * @return Gets or sets Destination Port or Range. Integer or range between
     * 0 and 65535. A “*” can also be used to match all ports.
     * 
     */
    private @Nullable String destinationPortRange;
    /**
     * @return Gets or sets the direction of the rule.InBound or Outbound. The
     * direction specifies if rule will be evaluated on incoming or outgoing traffic.
     * 
     */
    private @Nullable String direction;
    /**
     * @return Gets or sets the Security rule name.
     * 
     */
    private @Nullable String name;
    /**
     * @return Gets or sets the priority of the rule. The value can be between
     * 100 and 4096. The priority number must be unique for each rule in the collection.
     * The lower the priority number, the higher the priority of the rule.
     * 
     */
    private @Nullable Integer priority;
    /**
     * @return Gets or sets Network protocol this rule applies to. Can be Tcp, Udp or All(*).
     * 
     */
    private @Nullable String protocol;
    /**
     * @return Gets or sets source address prefix. CIDR or source IP range. A
     * “*” can also be used to match all source IPs.  Default tags such as ‘VirtualNetwork’,
     * ‘AzureLoadBalancer’ and ‘Internet’ can also be used. If this is an ingress
     * rule, specifies where network traffic originates from.
     * 
     */
    private @Nullable String sourceAddressPrefix;
    /**
     * @return Gets or sets Source Port or Range. Integer or range between 0 and
     * 65535. A “*” can also be used to match all ports.
     * 
     */
    private @Nullable String sourcePortRange;

    private NsgSecurityRuleResponse() {}
    /**
     * @return Gets or sets whether network traffic is allowed or denied.
     * Possible values are “Allow” and “Deny”.
     * 
     */
    public Optional access() {
        return Optional.ofNullable(this.access);
    }
    /**
     * @return Gets or sets a description for this rule. Restricted to 140 chars.
     * 
     */
    public Optional description() {
        return Optional.ofNullable(this.description);
    }
    /**
     * @return Gets or sets destination address prefix. CIDR or source IP range.
     *  A “*” can also be used to match all source IPs. Default tags such
     * as ‘VirtualNetwork’, ‘AzureLoadBalancer’ and ‘Internet’ can also be used.
     * 
     */
    public Optional destinationAddressPrefix() {
        return Optional.ofNullable(this.destinationAddressPrefix);
    }
    /**
     * @return Gets or sets Destination Port or Range. Integer or range between
     * 0 and 65535. A “*” can also be used to match all ports.
     * 
     */
    public Optional destinationPortRange() {
        return Optional.ofNullable(this.destinationPortRange);
    }
    /**
     * @return Gets or sets the direction of the rule.InBound or Outbound. The
     * direction specifies if rule will be evaluated on incoming or outgoing traffic.
     * 
     */
    public Optional direction() {
        return Optional.ofNullable(this.direction);
    }
    /**
     * @return Gets or sets the Security rule name.
     * 
     */
    public Optional name() {
        return Optional.ofNullable(this.name);
    }
    /**
     * @return Gets or sets the priority of the rule. The value can be between
     * 100 and 4096. The priority number must be unique for each rule in the collection.
     * The lower the priority number, the higher the priority of the rule.
     * 
     */
    public Optional priority() {
        return Optional.ofNullable(this.priority);
    }
    /**
     * @return Gets or sets Network protocol this rule applies to. Can be Tcp, Udp or All(*).
     * 
     */
    public Optional protocol() {
        return Optional.ofNullable(this.protocol);
    }
    /**
     * @return Gets or sets source address prefix. CIDR or source IP range. A
     * “*” can also be used to match all source IPs.  Default tags such as ‘VirtualNetwork’,
     * ‘AzureLoadBalancer’ and ‘Internet’ can also be used. If this is an ingress
     * rule, specifies where network traffic originates from.
     * 
     */
    public Optional sourceAddressPrefix() {
        return Optional.ofNullable(this.sourceAddressPrefix);
    }
    /**
     * @return Gets or sets Source Port or Range. Integer or range between 0 and
     * 65535. A “*” can also be used to match all ports.
     * 
     */
    public Optional sourcePortRange() {
        return Optional.ofNullable(this.sourcePortRange);
    }

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

    public static Builder builder(NsgSecurityRuleResponse defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable String access;
        private @Nullable String description;
        private @Nullable String destinationAddressPrefix;
        private @Nullable String destinationPortRange;
        private @Nullable String direction;
        private @Nullable String name;
        private @Nullable Integer priority;
        private @Nullable String protocol;
        private @Nullable String sourceAddressPrefix;
        private @Nullable String sourcePortRange;
        public Builder() {}
        public Builder(NsgSecurityRuleResponse defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.access = defaults.access;
    	      this.description = defaults.description;
    	      this.destinationAddressPrefix = defaults.destinationAddressPrefix;
    	      this.destinationPortRange = defaults.destinationPortRange;
    	      this.direction = defaults.direction;
    	      this.name = defaults.name;
    	      this.priority = defaults.priority;
    	      this.protocol = defaults.protocol;
    	      this.sourceAddressPrefix = defaults.sourceAddressPrefix;
    	      this.sourcePortRange = defaults.sourcePortRange;
        }

        @CustomType.Setter
        public Builder access(@Nullable String access) {

            this.access = access;
            return this;
        }
        @CustomType.Setter
        public Builder description(@Nullable String description) {

            this.description = description;
            return this;
        }
        @CustomType.Setter
        public Builder destinationAddressPrefix(@Nullable String destinationAddressPrefix) {

            this.destinationAddressPrefix = destinationAddressPrefix;
            return this;
        }
        @CustomType.Setter
        public Builder destinationPortRange(@Nullable String destinationPortRange) {

            this.destinationPortRange = destinationPortRange;
            return this;
        }
        @CustomType.Setter
        public Builder direction(@Nullable String direction) {

            this.direction = direction;
            return this;
        }
        @CustomType.Setter
        public Builder name(@Nullable String name) {

            this.name = name;
            return this;
        }
        @CustomType.Setter
        public Builder priority(@Nullable Integer priority) {

            this.priority = priority;
            return this;
        }
        @CustomType.Setter
        public Builder protocol(@Nullable String protocol) {

            this.protocol = protocol;
            return this;
        }
        @CustomType.Setter
        public Builder sourceAddressPrefix(@Nullable String sourceAddressPrefix) {

            this.sourceAddressPrefix = sourceAddressPrefix;
            return this;
        }
        @CustomType.Setter
        public Builder sourcePortRange(@Nullable String sourcePortRange) {

            this.sourcePortRange = sourcePortRange;
            return this;
        }
        public NsgSecurityRuleResponse build() {
            final var _resultValue = new NsgSecurityRuleResponse();
            _resultValue.access = access;
            _resultValue.description = description;
            _resultValue.destinationAddressPrefix = destinationAddressPrefix;
            _resultValue.destinationPortRange = destinationPortRange;
            _resultValue.direction = direction;
            _resultValue.name = name;
            _resultValue.priority = priority;
            _resultValue.protocol = protocol;
            _resultValue.sourceAddressPrefix = sourceAddressPrefix;
            _resultValue.sourcePortRange = sourcePortRange;
            return _resultValue;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy