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

com.pulumi.consul.outputs.GetServicesResult 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.outputs;

import com.pulumi.consul.outputs.GetServicesQueryOption;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import javax.annotation.Nullable;

@CustomType
public final class GetServicesResult {
    /**
     * @return The datacenter the keys are being read from to.
     * 
     */
    private String datacenter;
    /**
     * @return The provider-assigned unique ID for this managed resource.
     * 
     */
    private String id;
    private List names;
    private @Nullable List queryOptions;
    private Map services;
    /**
     * @return A map of the tags found for each service.  If more than one service
     * shares the same tag, unique service names will be joined by whitespace (this
     * is the inverse of `services` and can be used to lookup the services that match
     * a single tag).
     * 
     */
    private Map tags;

    private GetServicesResult() {}
    /**
     * @return The datacenter the keys are being read from to.
     * 
     */
    public String datacenter() {
        return this.datacenter;
    }
    /**
     * @return The provider-assigned unique ID for this managed resource.
     * 
     */
    public String id() {
        return this.id;
    }
    public List names() {
        return this.names;
    }
    public List queryOptions() {
        return this.queryOptions == null ? List.of() : this.queryOptions;
    }
    public Map services() {
        return this.services;
    }
    /**
     * @return A map of the tags found for each service.  If more than one service
     * shares the same tag, unique service names will be joined by whitespace (this
     * is the inverse of `services` and can be used to lookup the services that match
     * a single tag).
     * 
     */
    public Map tags() {
        return this.tags;
    }

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

    public static Builder builder(GetServicesResult defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private String datacenter;
        private String id;
        private List names;
        private @Nullable List queryOptions;
        private Map services;
        private Map tags;
        public Builder() {}
        public Builder(GetServicesResult defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.datacenter = defaults.datacenter;
    	      this.id = defaults.id;
    	      this.names = defaults.names;
    	      this.queryOptions = defaults.queryOptions;
    	      this.services = defaults.services;
    	      this.tags = defaults.tags;
        }

        @CustomType.Setter
        public Builder datacenter(String datacenter) {
            if (datacenter == null) {
              throw new MissingRequiredPropertyException("GetServicesResult", "datacenter");
            }
            this.datacenter = datacenter;
            return this;
        }
        @CustomType.Setter
        public Builder id(String id) {
            if (id == null) {
              throw new MissingRequiredPropertyException("GetServicesResult", "id");
            }
            this.id = id;
            return this;
        }
        @CustomType.Setter
        public Builder names(List names) {
            if (names == null) {
              throw new MissingRequiredPropertyException("GetServicesResult", "names");
            }
            this.names = names;
            return this;
        }
        public Builder names(String... names) {
            return names(List.of(names));
        }
        @CustomType.Setter
        public Builder queryOptions(@Nullable List queryOptions) {

            this.queryOptions = queryOptions;
            return this;
        }
        public Builder queryOptions(GetServicesQueryOption... queryOptions) {
            return queryOptions(List.of(queryOptions));
        }
        @CustomType.Setter
        public Builder services(Map services) {
            if (services == null) {
              throw new MissingRequiredPropertyException("GetServicesResult", "services");
            }
            this.services = services;
            return this;
        }
        @CustomType.Setter
        public Builder tags(Map tags) {
            if (tags == null) {
              throw new MissingRequiredPropertyException("GetServicesResult", "tags");
            }
            this.tags = tags;
            return this;
        }
        public GetServicesResult build() {
            final var _resultValue = new GetServicesResult();
            _resultValue.datacenter = datacenter;
            _resultValue.id = id;
            _resultValue.names = names;
            _resultValue.queryOptions = queryOptions;
            _resultValue.services = services;
            _resultValue.tags = tags;
            return _resultValue;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy