com.pulumi.kubernetes.discovery.v1beta1.outputs.EndpointPatch Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kubernetes Show documentation
Show all versions of kubernetes Show documentation
A Pulumi package for creating and managing Kubernetes resources.
// *** 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.outputs;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.kubernetes.core.v1.outputs.ObjectReferencePatch;
import com.pulumi.kubernetes.discovery.v1beta1.outputs.EndpointConditionsPatch;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class EndpointPatch {
/**
* @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.
*
*/
private @Nullable List addresses;
/**
* @return conditions contains information about the current status of the endpoint.
*
*/
private @Nullable EndpointConditionsPatch conditions;
/**
* @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.
*
*/
private @Nullable String hostname;
/**
* @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.
*
*/
private @Nullable String nodeName;
/**
* @return targetRef is a reference to a Kubernetes object that represents this endpoint.
*
*/
private @Nullable ObjectReferencePatch targetRef;
/**
* @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.
*
*/
private @Nullable Map topology;
private EndpointPatch() {}
/**
* @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 List addresses() {
return this.addresses == null ? List.of() : this.addresses;
}
/**
* @return conditions contains information about the current status of the endpoint.
*
*/
public Optional conditions() {
return Optional.ofNullable(this.conditions);
}
/**
* @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);
}
/**
* @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);
}
/**
* @return targetRef is a reference to a Kubernetes object that represents this endpoint.
*
*/
public Optional targetRef() {
return Optional.ofNullable(this.targetRef);
}
/**
* @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 Map topology() {
return this.topology == null ? Map.of() : this.topology;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(EndpointPatch defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable List addresses;
private @Nullable EndpointConditionsPatch conditions;
private @Nullable String hostname;
private @Nullable String nodeName;
private @Nullable ObjectReferencePatch targetRef;
private @Nullable Map topology;
public Builder() {}
public Builder(EndpointPatch defaults) {
Objects.requireNonNull(defaults);
this.addresses = defaults.addresses;
this.conditions = defaults.conditions;
this.hostname = defaults.hostname;
this.nodeName = defaults.nodeName;
this.targetRef = defaults.targetRef;
this.topology = defaults.topology;
}
@CustomType.Setter
public Builder addresses(@Nullable List addresses) {
this.addresses = addresses;
return this;
}
public Builder addresses(String... addresses) {
return addresses(List.of(addresses));
}
@CustomType.Setter
public Builder conditions(@Nullable EndpointConditionsPatch conditions) {
this.conditions = conditions;
return this;
}
@CustomType.Setter
public Builder hostname(@Nullable String hostname) {
this.hostname = hostname;
return this;
}
@CustomType.Setter
public Builder nodeName(@Nullable String nodeName) {
this.nodeName = nodeName;
return this;
}
@CustomType.Setter
public Builder targetRef(@Nullable ObjectReferencePatch targetRef) {
this.targetRef = targetRef;
return this;
}
@CustomType.Setter
public Builder topology(@Nullable Map topology) {
this.topology = topology;
return this;
}
public EndpointPatch build() {
final var _resultValue = new EndpointPatch();
_resultValue.addresses = addresses;
_resultValue.conditions = conditions;
_resultValue.hostname = hostname;
_resultValue.nodeName = nodeName;
_resultValue.targetRef = targetRef;
_resultValue.topology = topology;
return _resultValue;
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy