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

com.pulumi.kubernetes.discovery.v1beta1.inputs.EndpointArgs Maven / Gradle / Ivy

There is a newer version: 4.19.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.kubernetes.discovery.v1beta1.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import com.pulumi.kubernetes.core.v1.inputs.ObjectReferenceArgs;
import com.pulumi.kubernetes.discovery.v1beta1.inputs.EndpointConditionsArgs;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * Endpoint represents a single logical "backend" implementing a service.
 * 
 */
public final class EndpointArgs extends com.pulumi.resources.ResourceArgs {

    public static final EndpointArgs Empty = new EndpointArgs();

    /**
     * addresses of this endpoint. The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. Consumers must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100.
     * 
     */
    @Import(name="addresses", required=true)
    private Output> addresses;

    /**
     * @return addresses of this endpoint. The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. Consumers must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100.
     * 
     */
    public Output> addresses() {
        return this.addresses;
    }

    /**
     * conditions contains information about the current status of the endpoint.
     * 
     */
    @Import(name="conditions")
    private @Nullable Output conditions;

    /**
     * @return conditions contains information about the current status of the endpoint.
     * 
     */
    public Optional> conditions() {
        return Optional.ofNullable(this.conditions);
    }

    /**
     * hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must pass DNS Label (RFC 1123) validation.
     * 
     */
    @Import(name="hostname")
    private @Nullable Output hostname;

    /**
     * @return hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must pass DNS Label (RFC 1123) validation.
     * 
     */
    public Optional> hostname() {
        return Optional.ofNullable(this.hostname);
    }

    /**
     * nodeName represents the name of the Node hosting this endpoint. This can be used to determine endpoints local to a Node. This field can be enabled with the EndpointSliceNodeName feature gate.
     * 
     */
    @Import(name="nodeName")
    private @Nullable Output nodeName;

    /**
     * @return nodeName represents the name of the Node hosting this endpoint. This can be used to determine endpoints local to a Node. This field can be enabled with the EndpointSliceNodeName feature gate.
     * 
     */
    public Optional> nodeName() {
        return Optional.ofNullable(this.nodeName);
    }

    /**
     * targetRef is a reference to a Kubernetes object that represents this endpoint.
     * 
     */
    @Import(name="targetRef")
    private @Nullable Output targetRef;

    /**
     * @return targetRef is a reference to a Kubernetes object that represents this endpoint.
     * 
     */
    public Optional> targetRef() {
        return Optional.ofNullable(this.targetRef);
    }

    /**
     * topology contains arbitrary topology information associated with the endpoint. These key/value pairs must conform with the label format. https://kubernetes.io/docs/concepts/overview/working-with-objects/labels Topology may include a maximum of 16 key/value pairs. This includes, but is not limited to the following well known keys: * kubernetes.io/hostname: the value indicates the hostname of the node
     *   where the endpoint is located. This should match the corresponding
     *   node label.
     * * topology.kubernetes.io/zone: the value indicates the zone where the
     *   endpoint is located. This should match the corresponding node label.
     * * topology.kubernetes.io/region: the value indicates the region where the
     *   endpoint is located. This should match the corresponding node label.
     * 
     */
    @Import(name="topology")
    private @Nullable Output> topology;

    /**
     * @return topology contains arbitrary topology information associated with the endpoint. These key/value pairs must conform with the label format. https://kubernetes.io/docs/concepts/overview/working-with-objects/labels Topology may include a maximum of 16 key/value pairs. This includes, but is not limited to the following well known keys: * kubernetes.io/hostname: the value indicates the hostname of the node
     *   where the endpoint is located. This should match the corresponding
     *   node label.
     * * topology.kubernetes.io/zone: the value indicates the zone where the
     *   endpoint is located. This should match the corresponding node label.
     * * topology.kubernetes.io/region: the value indicates the region where the
     *   endpoint is located. This should match the corresponding node label.
     * 
     */
    public Optional>> topology() {
        return Optional.ofNullable(this.topology);
    }

    private EndpointArgs() {}

    private EndpointArgs(EndpointArgs $) {
        this.addresses = $.addresses;
        this.conditions = $.conditions;
        this.hostname = $.hostname;
        this.nodeName = $.nodeName;
        this.targetRef = $.targetRef;
        this.topology = $.topology;
    }

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

    public static final class Builder {
        private EndpointArgs $;

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

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

        /**
         * @param addresses addresses of this endpoint. The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. Consumers must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100.
         * 
         * @return builder
         * 
         */
        public Builder addresses(Output> addresses) {
            $.addresses = addresses;
            return this;
        }

        /**
         * @param addresses addresses of this endpoint. The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. Consumers must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100.
         * 
         * @return builder
         * 
         */
        public Builder addresses(List addresses) {
            return addresses(Output.of(addresses));
        }

        /**
         * @param addresses addresses of this endpoint. The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. Consumers must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100.
         * 
         * @return builder
         * 
         */
        public Builder addresses(String... addresses) {
            return addresses(List.of(addresses));
        }

        /**
         * @param conditions conditions contains information about the current status of the endpoint.
         * 
         * @return builder
         * 
         */
        public Builder conditions(@Nullable Output conditions) {
            $.conditions = conditions;
            return this;
        }

        /**
         * @param conditions conditions contains information about the current status of the endpoint.
         * 
         * @return builder
         * 
         */
        public Builder conditions(EndpointConditionsArgs conditions) {
            return conditions(Output.of(conditions));
        }

        /**
         * @param hostname hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must pass DNS Label (RFC 1123) validation.
         * 
         * @return builder
         * 
         */
        public Builder hostname(@Nullable Output hostname) {
            $.hostname = hostname;
            return this;
        }

        /**
         * @param hostname hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must pass DNS Label (RFC 1123) validation.
         * 
         * @return builder
         * 
         */
        public Builder hostname(String hostname) {
            return hostname(Output.of(hostname));
        }

        /**
         * @param nodeName nodeName represents the name of the Node hosting this endpoint. This can be used to determine endpoints local to a Node. This field can be enabled with the EndpointSliceNodeName feature gate.
         * 
         * @return builder
         * 
         */
        public Builder nodeName(@Nullable Output nodeName) {
            $.nodeName = nodeName;
            return this;
        }

        /**
         * @param nodeName nodeName represents the name of the Node hosting this endpoint. This can be used to determine endpoints local to a Node. This field can be enabled with the EndpointSliceNodeName feature gate.
         * 
         * @return builder
         * 
         */
        public Builder nodeName(String nodeName) {
            return nodeName(Output.of(nodeName));
        }

        /**
         * @param targetRef targetRef is a reference to a Kubernetes object that represents this endpoint.
         * 
         * @return builder
         * 
         */
        public Builder targetRef(@Nullable Output targetRef) {
            $.targetRef = targetRef;
            return this;
        }

        /**
         * @param targetRef targetRef is a reference to a Kubernetes object that represents this endpoint.
         * 
         * @return builder
         * 
         */
        public Builder targetRef(ObjectReferenceArgs targetRef) {
            return targetRef(Output.of(targetRef));
        }

        /**
         * @param topology topology contains arbitrary topology information associated with the endpoint. These key/value pairs must conform with the label format. https://kubernetes.io/docs/concepts/overview/working-with-objects/labels Topology may include a maximum of 16 key/value pairs. This includes, but is not limited to the following well known keys: * kubernetes.io/hostname: the value indicates the hostname of the node
         *   where the endpoint is located. This should match the corresponding
         *   node label.
         * * topology.kubernetes.io/zone: the value indicates the zone where the
         *   endpoint is located. This should match the corresponding node label.
         * * topology.kubernetes.io/region: the value indicates the region where the
         *   endpoint is located. This should match the corresponding node label.
         * 
         * @return builder
         * 
         */
        public Builder topology(@Nullable Output> topology) {
            $.topology = topology;
            return this;
        }

        /**
         * @param topology topology contains arbitrary topology information associated with the endpoint. These key/value pairs must conform with the label format. https://kubernetes.io/docs/concepts/overview/working-with-objects/labels Topology may include a maximum of 16 key/value pairs. This includes, but is not limited to the following well known keys: * kubernetes.io/hostname: the value indicates the hostname of the node
         *   where the endpoint is located. This should match the corresponding
         *   node label.
         * * topology.kubernetes.io/zone: the value indicates the zone where the
         *   endpoint is located. This should match the corresponding node label.
         * * topology.kubernetes.io/region: the value indicates the region where the
         *   endpoint is located. This should match the corresponding node label.
         * 
         * @return builder
         * 
         */
        public Builder topology(Map topology) {
            return topology(Output.of(topology));
        }

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

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy