// *** 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.aws.ec2.outputs;

import com.pulumi.aws.ec2.outputs.NetworkInsightsAnalysisReturnPathComponentOutboundHeaderDestinationPortRange;
import com.pulumi.aws.ec2.outputs.NetworkInsightsAnalysisReturnPathComponentOutboundHeaderSourcePortRange;
import com.pulumi.core.annotations.CustomType;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class NetworkInsightsAnalysisReturnPathComponentOutboundHeader {
    private @Nullable List<String> destinationAddresses;
    private @Nullable List<NetworkInsightsAnalysisReturnPathComponentOutboundHeaderDestinationPortRange> destinationPortRanges;
    private @Nullable String protocol;
    private @Nullable List<String> sourceAddresses;
    private @Nullable List<NetworkInsightsAnalysisReturnPathComponentOutboundHeaderSourcePortRange> sourcePortRanges;

    private NetworkInsightsAnalysisReturnPathComponentOutboundHeader() {}
    public List<String> destinationAddresses() {
        return this.destinationAddresses == null ? List.of() : this.destinationAddresses;
    }
    public List<NetworkInsightsAnalysisReturnPathComponentOutboundHeaderDestinationPortRange> destinationPortRanges() {
        return this.destinationPortRanges == null ? List.of() : this.destinationPortRanges;
    }
    public Optional<String> protocol() {
        return Optional.ofNullable(this.protocol);
    }
    public List<String> sourceAddresses() {
        return this.sourceAddresses == null ? List.of() : this.sourceAddresses;
    }
    public List<NetworkInsightsAnalysisReturnPathComponentOutboundHeaderSourcePortRange> sourcePortRanges() {
        return this.sourcePortRanges == null ? List.of() : this.sourcePortRanges;
    }

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

    public static Builder builder(NetworkInsightsAnalysisReturnPathComponentOutboundHeader defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable List<String> destinationAddresses;
        private @Nullable List<NetworkInsightsAnalysisReturnPathComponentOutboundHeaderDestinationPortRange> destinationPortRanges;
        private @Nullable String protocol;
        private @Nullable List<String> sourceAddresses;
        private @Nullable List<NetworkInsightsAnalysisReturnPathComponentOutboundHeaderSourcePortRange> sourcePortRanges;
        public Builder() {}
        public Builder(NetworkInsightsAnalysisReturnPathComponentOutboundHeader defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.destinationAddresses = defaults.destinationAddresses;
    	      this.destinationPortRanges = defaults.destinationPortRanges;
    	      this.protocol = defaults.protocol;
    	      this.sourceAddresses = defaults.sourceAddresses;
    	      this.sourcePortRanges = defaults.sourcePortRanges;
        }

        @CustomType.Setter
        public Builder destinationAddresses(@Nullable List<String> destinationAddresses) {
            this.destinationAddresses = destinationAddresses;
            return this;
        }
        public Builder destinationAddresses(String... destinationAddresses) {
            return destinationAddresses(List.of(destinationAddresses));
        }
        @CustomType.Setter
        public Builder destinationPortRanges(@Nullable List<NetworkInsightsAnalysisReturnPathComponentOutboundHeaderDestinationPortRange> destinationPortRanges) {
            this.destinationPortRanges = destinationPortRanges;
            return this;
        }
        public Builder destinationPortRanges(NetworkInsightsAnalysisReturnPathComponentOutboundHeaderDestinationPortRange... destinationPortRanges) {
            return destinationPortRanges(List.of(destinationPortRanges));
        }
        @CustomType.Setter
        public Builder protocol(@Nullable String protocol) {
            this.protocol = protocol;
            return this;
        }
        @CustomType.Setter
        public Builder sourceAddresses(@Nullable List<String> sourceAddresses) {
            this.sourceAddresses = sourceAddresses;
            return this;
        }
        public Builder sourceAddresses(String... sourceAddresses) {
            return sourceAddresses(List.of(sourceAddresses));
        }
        @CustomType.Setter
        public Builder sourcePortRanges(@Nullable List<NetworkInsightsAnalysisReturnPathComponentOutboundHeaderSourcePortRange> sourcePortRanges) {
            this.sourcePortRanges = sourcePortRanges;
            return this;
        }
        public Builder sourcePortRanges(NetworkInsightsAnalysisReturnPathComponentOutboundHeaderSourcePortRange... sourcePortRanges) {
            return sourcePortRanges(List.of(sourcePortRanges));
        }
        public NetworkInsightsAnalysisReturnPathComponentOutboundHeader build() {
            final var o = new NetworkInsightsAnalysisReturnPathComponentOutboundHeader();
            o.destinationAddresses = destinationAddresses;
            o.destinationPortRanges = destinationPortRanges;
            o.protocol = protocol;
            o.sourceAddresses = sourceAddresses;
            o.sourcePortRanges = sourcePortRanges;
            return o;
        }
    }
}
