com.pulumi.kubernetes.networking.v1.outputs.IngressServiceBackend 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.networking.v1.outputs;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import com.pulumi.kubernetes.networking.v1.outputs.ServiceBackendPort;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;
@CustomType
public final class IngressServiceBackend {
/**
* @return name is the referenced service. The service must exist in the same namespace as the Ingress object.
*
*/
private String name;
/**
* @return port of the referenced service. A port name or port number is required for a IngressServiceBackend.
*
*/
private @Nullable ServiceBackendPort port;
private IngressServiceBackend() {}
/**
* @return name is the referenced service. The service must exist in the same namespace as the Ingress object.
*
*/
public String name() {
return this.name;
}
/**
* @return port of the referenced service. A port name or port number is required for a IngressServiceBackend.
*
*/
public Optional port() {
return Optional.ofNullable(this.port);
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(IngressServiceBackend defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private String name;
private @Nullable ServiceBackendPort port;
public Builder() {}
public Builder(IngressServiceBackend defaults) {
Objects.requireNonNull(defaults);
this.name = defaults.name;
this.port = defaults.port;
}
@CustomType.Setter
public Builder name(String name) {
if (name == null) {
throw new MissingRequiredPropertyException("IngressServiceBackend", "name");
}
this.name = name;
return this;
}
@CustomType.Setter
public Builder port(@Nullable ServiceBackendPort port) {
this.port = port;
return this;
}
public IngressServiceBackend build() {
final var _resultValue = new IngressServiceBackend();
_resultValue.name = name;
_resultValue.port = port;
return _resultValue;
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy