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

import com.pulumi.aws.cloudtrail.outputs.TrailAdvancedEventSelectorFieldSelector;
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 TrailAdvancedEventSelector {
    /**
     * @return Specifies the selector statements in an advanced event selector. Fields documented below.
     * 
     */
    private List<TrailAdvancedEventSelectorFieldSelector> fieldSelectors;
    /**
     * @return Name of the trail.
     * 
     */
    private @Nullable String name;

    private TrailAdvancedEventSelector() {}
    /**
     * @return Specifies the selector statements in an advanced event selector. Fields documented below.
     * 
     */
    public List<TrailAdvancedEventSelectorFieldSelector> fieldSelectors() {
        return this.fieldSelectors;
    }
    /**
     * @return Name of the trail.
     * 
     */
    public Optional<String> name() {
        return Optional.ofNullable(this.name);
    }

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

    public static Builder builder(TrailAdvancedEventSelector defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private List<TrailAdvancedEventSelectorFieldSelector> fieldSelectors;
        private @Nullable String name;
        public Builder() {}
        public Builder(TrailAdvancedEventSelector defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.fieldSelectors = defaults.fieldSelectors;
    	      this.name = defaults.name;
        }

        @CustomType.Setter
        public Builder fieldSelectors(List<TrailAdvancedEventSelectorFieldSelector> fieldSelectors) {
            this.fieldSelectors = Objects.requireNonNull(fieldSelectors);
            return this;
        }
        public Builder fieldSelectors(TrailAdvancedEventSelectorFieldSelector... fieldSelectors) {
            return fieldSelectors(List.of(fieldSelectors));
        }
        @CustomType.Setter
        public Builder name(@Nullable String name) {
            this.name = name;
            return this;
        }
        public TrailAdvancedEventSelector build() {
            final var o = new TrailAdvancedEventSelector();
            o.fieldSelectors = fieldSelectors;
            o.name = name;
            return o;
        }
    }
}
