com.pulumi.kubernetes.discovery.v1.outputs.EndpointPort 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.v1.outputs;
import com.pulumi.core.annotations.CustomType;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class EndpointPort {
/**
* @return The application protocol for this port. This is used as a hint for implementations to offer richer behavior for protocols that they understand. This field follows standard Kubernetes label syntax. Valid values are either:
*
* * Un-prefixed protocol names - reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names).
*
* * Kubernetes-defined prefixed names:
* * 'kubernetes.io/h2c' - HTTP/2 prior knowledge over cleartext as described in https://www.rfc-editor.org/rfc/rfc9113.html#name-starting-http-2-with-prior-
* * 'kubernetes.io/ws' - WebSocket over cleartext as described in https://www.rfc-editor.org/rfc/rfc6455
* * 'kubernetes.io/wss' - WebSocket over TLS as described in https://www.rfc-editor.org/rfc/rfc6455
*
* * Other protocols should use implementation-defined prefixed names such as mycompany.com/my-custom-protocol.
*
*/
private @Nullable String appProtocol;
/**
* @return name represents the name of this port. All ports in an EndpointSlice must have a unique name. If the EndpointSlice is derived from a Kubernetes service, this corresponds to the Service.ports[].name. Name must either be an empty string or pass DNS_LABEL validation: * must be no more than 63 characters long. * must consist of lower case alphanumeric characters or '-'. * must start and end with an alphanumeric character. Default is empty string.
*
*/
private @Nullable String name;
/**
* @return port represents the port number of the endpoint. If this is not specified, ports are not restricted and must be interpreted in the context of the specific consumer.
*
*/
private @Nullable Integer port;
/**
* @return protocol represents the IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP.
*
*/
private @Nullable String protocol;
private EndpointPort() {}
/**
* @return The application protocol for this port. This is used as a hint for implementations to offer richer behavior for protocols that they understand. This field follows standard Kubernetes label syntax. Valid values are either:
*
* * Un-prefixed protocol names - reserved for IANA standard service names (as per RFC-6335 and https://www.iana.org/assignments/service-names).
*
* * Kubernetes-defined prefixed names:
* * 'kubernetes.io/h2c' - HTTP/2 prior knowledge over cleartext as described in https://www.rfc-editor.org/rfc/rfc9113.html#name-starting-http-2-with-prior-
* * 'kubernetes.io/ws' - WebSocket over cleartext as described in https://www.rfc-editor.org/rfc/rfc6455
* * 'kubernetes.io/wss' - WebSocket over TLS as described in https://www.rfc-editor.org/rfc/rfc6455
*
* * Other protocols should use implementation-defined prefixed names such as mycompany.com/my-custom-protocol.
*
*/
public Optional appProtocol() {
return Optional.ofNullable(this.appProtocol);
}
/**
* @return name represents the name of this port. All ports in an EndpointSlice must have a unique name. If the EndpointSlice is derived from a Kubernetes service, this corresponds to the Service.ports[].name. Name must either be an empty string or pass DNS_LABEL validation: * must be no more than 63 characters long. * must consist of lower case alphanumeric characters or '-'. * must start and end with an alphanumeric character. Default is empty string.
*
*/
public Optional name() {
return Optional.ofNullable(this.name);
}
/**
* @return port represents the port number of the endpoint. If this is not specified, ports are not restricted and must be interpreted in the context of the specific consumer.
*
*/
public Optional port() {
return Optional.ofNullable(this.port);
}
/**
* @return protocol represents the IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP.
*
*/
public Optional protocol() {
return Optional.ofNullable(this.protocol);
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(EndpointPort defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private @Nullable String appProtocol;
private @Nullable String name;
private @Nullable Integer port;
private @Nullable String protocol;
public Builder() {}
public Builder(EndpointPort defaults) {
Objects.requireNonNull(defaults);
this.appProtocol = defaults.appProtocol;
this.name = defaults.name;
this.port = defaults.port;
this.protocol = defaults.protocol;
}
@CustomType.Setter
public Builder appProtocol(@Nullable String appProtocol) {
this.appProtocol = appProtocol;
return this;
}
@CustomType.Setter
public Builder name(@Nullable String name) {
this.name = name;
return this;
}
@CustomType.Setter
public Builder port(@Nullable Integer port) {
this.port = port;
return this;
}
@CustomType.Setter
public Builder protocol(@Nullable String protocol) {
this.protocol = protocol;
return this;
}
public EndpointPort build() {
final var _resultValue = new EndpointPort();
_resultValue.appProtocol = appProtocol;
_resultValue.name = name;
_resultValue.port = port;
_resultValue.protocol = protocol;
return _resultValue;
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy