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

com.pulumi.azurenative.network.outputs.NatRuleResponse Maven / Gradle / Ivy

There is a newer version: 2.78.0
Show newest version
// *** 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.network.outputs;

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

@CustomType
public final class NatRuleResponse {
    /**
     * @return Description of the rule.
     * 
     */
    private @Nullable String description;
    /**
     * @return List of destination IP addresses or Service Tags.
     * 
     */
    private @Nullable List destinationAddresses;
    /**
     * @return List of destination ports.
     * 
     */
    private @Nullable List destinationPorts;
    /**
     * @return Array of FirewallPolicyRuleNetworkProtocols.
     * 
     */
    private @Nullable List ipProtocols;
    /**
     * @return Name of the rule.
     * 
     */
    private @Nullable String name;
    /**
     * @return Rule Type.
     * Expected value is 'NatRule'.
     * 
     */
    private String ruleType;
    /**
     * @return List of source IP addresses for this rule.
     * 
     */
    private @Nullable List sourceAddresses;
    /**
     * @return List of source IpGroups for this rule.
     * 
     */
    private @Nullable List sourceIpGroups;
    /**
     * @return The translated address for this NAT rule.
     * 
     */
    private @Nullable String translatedAddress;
    /**
     * @return The translated FQDN for this NAT rule.
     * 
     */
    private @Nullable String translatedFqdn;
    /**
     * @return The translated port for this NAT rule.
     * 
     */
    private @Nullable String translatedPort;

    private NatRuleResponse() {}
    /**
     * @return Description of the rule.
     * 
     */
    public Optional description() {
        return Optional.ofNullable(this.description);
    }
    /**
     * @return List of destination IP addresses or Service Tags.
     * 
     */
    public List destinationAddresses() {
        return this.destinationAddresses == null ? List.of() : this.destinationAddresses;
    }
    /**
     * @return List of destination ports.
     * 
     */
    public List destinationPorts() {
        return this.destinationPorts == null ? List.of() : this.destinationPorts;
    }
    /**
     * @return Array of FirewallPolicyRuleNetworkProtocols.
     * 
     */
    public List ipProtocols() {
        return this.ipProtocols == null ? List.of() : this.ipProtocols;
    }
    /**
     * @return Name of the rule.
     * 
     */
    public Optional name() {
        return Optional.ofNullable(this.name);
    }
    /**
     * @return Rule Type.
     * Expected value is 'NatRule'.
     * 
     */
    public String ruleType() {
        return this.ruleType;
    }
    /**
     * @return List of source IP addresses for this rule.
     * 
     */
    public List sourceAddresses() {
        return this.sourceAddresses == null ? List.of() : this.sourceAddresses;
    }
    /**
     * @return List of source IpGroups for this rule.
     * 
     */
    public List sourceIpGroups() {
        return this.sourceIpGroups == null ? List.of() : this.sourceIpGroups;
    }
    /**
     * @return The translated address for this NAT rule.
     * 
     */
    public Optional translatedAddress() {
        return Optional.ofNullable(this.translatedAddress);
    }
    /**
     * @return The translated FQDN for this NAT rule.
     * 
     */
    public Optional translatedFqdn() {
        return Optional.ofNullable(this.translatedFqdn);
    }
    /**
     * @return The translated port for this NAT rule.
     * 
     */
    public Optional translatedPort() {
        return Optional.ofNullable(this.translatedPort);
    }

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

    public static Builder builder(NatRuleResponse defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable String description;
        private @Nullable List destinationAddresses;
        private @Nullable List destinationPorts;
        private @Nullable List ipProtocols;
        private @Nullable String name;
        private String ruleType;
        private @Nullable List sourceAddresses;
        private @Nullable List sourceIpGroups;
        private @Nullable String translatedAddress;
        private @Nullable String translatedFqdn;
        private @Nullable String translatedPort;
        public Builder() {}
        public Builder(NatRuleResponse defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.description = defaults.description;
    	      this.destinationAddresses = defaults.destinationAddresses;
    	      this.destinationPorts = defaults.destinationPorts;
    	      this.ipProtocols = defaults.ipProtocols;
    	      this.name = defaults.name;
    	      this.ruleType = defaults.ruleType;
    	      this.sourceAddresses = defaults.sourceAddresses;
    	      this.sourceIpGroups = defaults.sourceIpGroups;
    	      this.translatedAddress = defaults.translatedAddress;
    	      this.translatedFqdn = defaults.translatedFqdn;
    	      this.translatedPort = defaults.translatedPort;
        }

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

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

            this.destinationAddresses = destinationAddresses;
            return this;
        }
        public Builder destinationAddresses(String... destinationAddresses) {
            return destinationAddresses(List.of(destinationAddresses));
        }
        @CustomType.Setter
        public Builder destinationPorts(@Nullable List destinationPorts) {

            this.destinationPorts = destinationPorts;
            return this;
        }
        public Builder destinationPorts(String... destinationPorts) {
            return destinationPorts(List.of(destinationPorts));
        }
        @CustomType.Setter
        public Builder ipProtocols(@Nullable List ipProtocols) {

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

            this.name = name;
            return this;
        }
        @CustomType.Setter
        public Builder ruleType(String ruleType) {
            if (ruleType == null) {
              throw new MissingRequiredPropertyException("NatRuleResponse", "ruleType");
            }
            this.ruleType = ruleType;
            return this;
        }
        @CustomType.Setter
        public Builder sourceAddresses(@Nullable List sourceAddresses) {

            this.sourceAddresses = sourceAddresses;
            return this;
        }
        public Builder sourceAddresses(String... sourceAddresses) {
            return sourceAddresses(List.of(sourceAddresses));
        }
        @CustomType.Setter
        public Builder sourceIpGroups(@Nullable List sourceIpGroups) {

            this.sourceIpGroups = sourceIpGroups;
            return this;
        }
        public Builder sourceIpGroups(String... sourceIpGroups) {
            return sourceIpGroups(List.of(sourceIpGroups));
        }
        @CustomType.Setter
        public Builder translatedAddress(@Nullable String translatedAddress) {

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

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

            this.translatedPort = translatedPort;
            return this;
        }
        public NatRuleResponse build() {
            final var _resultValue = new NatRuleResponse();
            _resultValue.description = description;
            _resultValue.destinationAddresses = destinationAddresses;
            _resultValue.destinationPorts = destinationPorts;
            _resultValue.ipProtocols = ipProtocols;
            _resultValue.name = name;
            _resultValue.ruleType = ruleType;
            _resultValue.sourceAddresses = sourceAddresses;
            _resultValue.sourceIpGroups = sourceIpGroups;
            _resultValue.translatedAddress = translatedAddress;
            _resultValue.translatedFqdn = translatedFqdn;
            _resultValue.translatedPort = translatedPort;
            return _resultValue;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy