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

com.pulumi.azurenative.chaos.inputs.TargetReferenceArgs Maven / Gradle / Ivy

There is a newer version: 2.72.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.enums.TargetReferenceType;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.Objects;


/**
 * Model that represents a reference to a Target in the selector.
 * 
 */
public final class TargetReferenceArgs extends com.pulumi.resources.ResourceArgs {

    public static final TargetReferenceArgs Empty = new TargetReferenceArgs();

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

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

    /**
     * Enum of the Target reference type.
     * 
     */
    @Import(name="type", required=true)
    private Output> type;

    /**
     * @return Enum of the Target reference type.
     * 
     */
    public Output> type() {
        return this.type;
    }

    private TargetReferenceArgs() {}

    private TargetReferenceArgs(TargetReferenceArgs $) {
        this.id = $.id;
        this.type = $.type;
    }

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

    public static final class Builder {
        private TargetReferenceArgs $;

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

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

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

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

        /**
         * @param type Enum of the Target reference type.
         * 
         * @return builder
         * 
         */
        public Builder type(Output> type) {
            $.type = type;
            return this;
        }

        /**
         * @param type Enum of the Target reference type.
         * 
         * @return builder
         * 
         */
        public Builder type(Either type) {
            return type(Output.of(type));
        }

        /**
         * @param type Enum of the Target reference type.
         * 
         * @return builder
         * 
         */
        public Builder type(String type) {
            return type(Either.ofLeft(type));
        }

        /**
         * @param type Enum of the Target reference type.
         * 
         * @return builder
         * 
         */
        public Builder type(TargetReferenceType type) {
            return type(Either.ofRight(type));
        }

        public TargetReferenceArgs build() {
            if ($.id == null) {
                throw new MissingRequiredPropertyException("TargetReferenceArgs", "id");
            }
            if ($.type == null) {
                throw new MissingRequiredPropertyException("TargetReferenceArgs", "type");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy