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

com.pulumi.consul.inputs.GetCatalogServiceArgs Maven / Gradle / Ivy

There is a newer version: 3.13.0-alpha.1732771629
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.consul.inputs;

import com.pulumi.consul.inputs.GetCatalogServiceQueryOptionArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
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;


public final class GetCatalogServiceArgs extends com.pulumi.resources.InvokeArgs {

    public static final GetCatalogServiceArgs Empty = new GetCatalogServiceArgs();

    /**
     * The Consul datacenter to query.  Defaults to the
     * same value found in `query_options` parameter specified below, or if that is
     * empty, the `datacenter` value found in the Consul agent that this provider is
     * configured to talk to.
     * 
     */
    @Import(name="datacenter")
    private @Nullable Output datacenter;

    /**
     * @return The Consul datacenter to query.  Defaults to the
     * same value found in `query_options` parameter specified below, or if that is
     * empty, the `datacenter` value found in the Consul agent that this provider is
     * configured to talk to.
     * 
     */
    public Optional> datacenter() {
        return Optional.ofNullable(this.datacenter);
    }

    @Import(name="filter")
    private @Nullable Output filter;

    public Optional> filter() {
        return Optional.ofNullable(this.filter);
    }

    /**
     * The service name to select.
     * 
     */
    @Import(name="name", required=true)
    private Output name;

    /**
     * @return The service name to select.
     * 
     */
    public Output name() {
        return this.name;
    }

    /**
     * See below.
     * 
     */
    @Import(name="queryOptions")
    private @Nullable Output> queryOptions;

    /**
     * @return See below.
     * 
     */
    public Optional>> queryOptions() {
        return Optional.ofNullable(this.queryOptions);
    }

    /**
     * A single tag that can be used to filter the list of nodes
     * to return based on a single matching tag..
     * 
     */
    @Import(name="tag")
    private @Nullable Output tag;

    /**
     * @return A single tag that can be used to filter the list of nodes
     * to return based on a single matching tag..
     * 
     */
    public Optional> tag() {
        return Optional.ofNullable(this.tag);
    }

    private GetCatalogServiceArgs() {}

    private GetCatalogServiceArgs(GetCatalogServiceArgs $) {
        this.datacenter = $.datacenter;
        this.filter = $.filter;
        this.name = $.name;
        this.queryOptions = $.queryOptions;
        this.tag = $.tag;
    }

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

    public static final class Builder {
        private GetCatalogServiceArgs $;

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

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

        /**
         * @param datacenter The Consul datacenter to query.  Defaults to the
         * same value found in `query_options` parameter specified below, or if that is
         * empty, the `datacenter` value found in the Consul agent that this provider is
         * configured to talk to.
         * 
         * @return builder
         * 
         */
        public Builder datacenter(@Nullable Output datacenter) {
            $.datacenter = datacenter;
            return this;
        }

        /**
         * @param datacenter The Consul datacenter to query.  Defaults to the
         * same value found in `query_options` parameter specified below, or if that is
         * empty, the `datacenter` value found in the Consul agent that this provider is
         * configured to talk to.
         * 
         * @return builder
         * 
         */
        public Builder datacenter(String datacenter) {
            return datacenter(Output.of(datacenter));
        }

        public Builder filter(@Nullable Output filter) {
            $.filter = filter;
            return this;
        }

        public Builder filter(String filter) {
            return filter(Output.of(filter));
        }

        /**
         * @param name The service name to select.
         * 
         * @return builder
         * 
         */
        public Builder name(Output name) {
            $.name = name;
            return this;
        }

        /**
         * @param name The service name to select.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param queryOptions See below.
         * 
         * @return builder
         * 
         */
        public Builder queryOptions(@Nullable Output> queryOptions) {
            $.queryOptions = queryOptions;
            return this;
        }

        /**
         * @param queryOptions See below.
         * 
         * @return builder
         * 
         */
        public Builder queryOptions(List queryOptions) {
            return queryOptions(Output.of(queryOptions));
        }

        /**
         * @param queryOptions See below.
         * 
         * @return builder
         * 
         */
        public Builder queryOptions(GetCatalogServiceQueryOptionArgs... queryOptions) {
            return queryOptions(List.of(queryOptions));
        }

        /**
         * @param tag A single tag that can be used to filter the list of nodes
         * to return based on a single matching tag..
         * 
         * @return builder
         * 
         */
        public Builder tag(@Nullable Output tag) {
            $.tag = tag;
            return this;
        }

        /**
         * @param tag A single tag that can be used to filter the list of nodes
         * to return based on a single matching tag..
         * 
         * @return builder
         * 
         */
        public Builder tag(String tag) {
            return tag(Output.of(tag));
        }

        public GetCatalogServiceArgs build() {
            if ($.name == null) {
                throw new MissingRequiredPropertyException("GetCatalogServiceArgs", "name");
            }
            return $;
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy