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

com.pulumi.kubernetes.networking.v1.inputs.IngressBackendArgs Maven / Gradle / Ivy

There is a newer version: 4.19.0-alpha.1730750641
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.networking.v1.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.kubernetes.core.v1.inputs.TypedLocalObjectReferenceArgs;
import com.pulumi.kubernetes.networking.v1.inputs.IngressServiceBackendArgs;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * IngressBackend describes all endpoints for a given service and port.
 * 
 */
public final class IngressBackendArgs extends com.pulumi.resources.ResourceArgs {

    public static final IngressBackendArgs Empty = new IngressBackendArgs();

    /**
     * resource is an ObjectRef to another Kubernetes resource in the namespace of the Ingress object. If resource is specified, a service.Name and service.Port must not be specified. This is a mutually exclusive setting with "Service".
     * 
     */
    @Import(name="resource")
    private @Nullable Output resource;

    /**
     * @return resource is an ObjectRef to another Kubernetes resource in the namespace of the Ingress object. If resource is specified, a service.Name and service.Port must not be specified. This is a mutually exclusive setting with "Service".
     * 
     */
    public Optional> resource() {
        return Optional.ofNullable(this.resource);
    }

    /**
     * service references a service as a backend. This is a mutually exclusive setting with "Resource".
     * 
     */
    @Import(name="service")
    private @Nullable Output service;

    /**
     * @return service references a service as a backend. This is a mutually exclusive setting with "Resource".
     * 
     */
    public Optional> service() {
        return Optional.ofNullable(this.service);
    }

    private IngressBackendArgs() {}

    private IngressBackendArgs(IngressBackendArgs $) {
        this.resource = $.resource;
        this.service = $.service;
    }

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

    public static final class Builder {
        private IngressBackendArgs $;

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

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

        /**
         * @param resource resource is an ObjectRef to another Kubernetes resource in the namespace of the Ingress object. If resource is specified, a service.Name and service.Port must not be specified. This is a mutually exclusive setting with "Service".
         * 
         * @return builder
         * 
         */
        public Builder resource(@Nullable Output resource) {
            $.resource = resource;
            return this;
        }

        /**
         * @param resource resource is an ObjectRef to another Kubernetes resource in the namespace of the Ingress object. If resource is specified, a service.Name and service.Port must not be specified. This is a mutually exclusive setting with "Service".
         * 
         * @return builder
         * 
         */
        public Builder resource(TypedLocalObjectReferenceArgs resource) {
            return resource(Output.of(resource));
        }

        /**
         * @param service service references a service as a backend. This is a mutually exclusive setting with "Resource".
         * 
         * @return builder
         * 
         */
        public Builder service(@Nullable Output service) {
            $.service = service;
            return this;
        }

        /**
         * @param service service references a service as a backend. This is a mutually exclusive setting with "Resource".
         * 
         * @return builder
         * 
         */
        public Builder service(IngressServiceBackendArgs service) {
            return service(Output.of(service));
        }

        public IngressBackendArgs build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy