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

com.pulumi.azurenative.chaos.inputs.ListSelectorArgs 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.chaos.inputs;

import com.pulumi.azurenative.chaos.inputs.SimpleFilterArgs;
import com.pulumi.azurenative.chaos.inputs.TargetReferenceArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.core.internal.Codegen;
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;


/**
 * Model that represents a list selector.
 * 
 */
public final class ListSelectorArgs extends com.pulumi.resources.ResourceArgs {

    public static final ListSelectorArgs Empty = new ListSelectorArgs();

    /**
     * Model that represents available filter types that can be applied to a targets list.
     * 
     */
    @Import(name="filter")
    private @Nullable Output filter;

    /**
     * @return Model that represents available filter types that can be applied to a targets list.
     * 
     */
    public Optional> filter() {
        return Optional.ofNullable(this.filter);
    }

    /**
     * String of the selector ID.
     * 
     */
    @Import(name="id", required=true)
    private Output id;

    /**
     * @return String of the selector ID.
     * 
     */
    public Output id() {
        return this.id;
    }

    /**
     * List of Target references.
     * 
     */
    @Import(name="targets", required=true)
    private Output> targets;

    /**
     * @return List of Target references.
     * 
     */
    public Output> targets() {
        return this.targets;
    }

    /**
     * Enum of the selector type.
     * Expected value is 'List'.
     * 
     */
    @Import(name="type", required=true)
    private Output type;

    /**
     * @return Enum of the selector type.
     * Expected value is 'List'.
     * 
     */
    public Output type() {
        return this.type;
    }

    private ListSelectorArgs() {}

    private ListSelectorArgs(ListSelectorArgs $) {
        this.filter = $.filter;
        this.id = $.id;
        this.targets = $.targets;
        this.type = $.type;
    }

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

    public static final class Builder {
        private ListSelectorArgs $;

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

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

        /**
         * @param filter Model that represents available filter types that can be applied to a targets list.
         * 
         * @return builder
         * 
         */
        public Builder filter(@Nullable Output filter) {
            $.filter = filter;
            return this;
        }

        /**
         * @param filter Model that represents available filter types that can be applied to a targets list.
         * 
         * @return builder
         * 
         */
        public Builder filter(SimpleFilterArgs filter) {
            return filter(Output.of(filter));
        }

        /**
         * @param id String of the selector ID.
         * 
         * @return builder
         * 
         */
        public Builder id(Output id) {
            $.id = id;
            return this;
        }

        /**
         * @param id String of the selector ID.
         * 
         * @return builder
         * 
         */
        public Builder id(String id) {
            return id(Output.of(id));
        }

        /**
         * @param targets List of Target references.
         * 
         * @return builder
         * 
         */
        public Builder targets(Output> targets) {
            $.targets = targets;
            return this;
        }

        /**
         * @param targets List of Target references.
         * 
         * @return builder
         * 
         */
        public Builder targets(List targets) {
            return targets(Output.of(targets));
        }

        /**
         * @param targets List of Target references.
         * 
         * @return builder
         * 
         */
        public Builder targets(TargetReferenceArgs... targets) {
            return targets(List.of(targets));
        }

        /**
         * @param type Enum of the selector type.
         * Expected value is 'List'.
         * 
         * @return builder
         * 
         */
        public Builder type(Output type) {
            $.type = type;
            return this;
        }

        /**
         * @param type Enum of the selector type.
         * Expected value is 'List'.
         * 
         * @return builder
         * 
         */
        public Builder type(String type) {
            return type(Output.of(type));
        }

        public ListSelectorArgs build() {
            if ($.id == null) {
                throw new MissingRequiredPropertyException("ListSelectorArgs", "id");
            }
            if ($.targets == null) {
                throw new MissingRequiredPropertyException("ListSelectorArgs", "targets");
            }
            $.type = Codegen.stringProp("type").output().arg($.type).require();
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy