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

com.pulumi.kubernetes.flowcontrol.v1beta1.inputs.SubjectArgs 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.flowcontrol.v1beta1.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import com.pulumi.kubernetes.flowcontrol.v1beta1.inputs.GroupSubjectArgs;
import com.pulumi.kubernetes.flowcontrol.v1beta1.inputs.ServiceAccountSubjectArgs;
import com.pulumi.kubernetes.flowcontrol.v1beta1.inputs.UserSubjectArgs;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * Subject matches the originator of a request, as identified by the request authentication system. There are three ways of matching an originator; by user, group, or service account.
 * 
 */
public final class SubjectArgs extends com.pulumi.resources.ResourceArgs {

    public static final SubjectArgs Empty = new SubjectArgs();

    @Import(name="group")
    private @Nullable Output group;

    public Optional> group() {
        return Optional.ofNullable(this.group);
    }

    /**
     * Required
     * 
     */
    @Import(name="kind", required=true)
    private Output kind;

    /**
     * @return Required
     * 
     */
    public Output kind() {
        return this.kind;
    }

    @Import(name="serviceAccount")
    private @Nullable Output serviceAccount;

    public Optional> serviceAccount() {
        return Optional.ofNullable(this.serviceAccount);
    }

    @Import(name="user")
    private @Nullable Output user;

    public Optional> user() {
        return Optional.ofNullable(this.user);
    }

    private SubjectArgs() {}

    private SubjectArgs(SubjectArgs $) {
        this.group = $.group;
        this.kind = $.kind;
        this.serviceAccount = $.serviceAccount;
        this.user = $.user;
    }

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

    public static final class Builder {
        private SubjectArgs $;

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

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

        public Builder group(@Nullable Output group) {
            $.group = group;
            return this;
        }

        public Builder group(GroupSubjectArgs group) {
            return group(Output.of(group));
        }

        /**
         * @param kind Required
         * 
         * @return builder
         * 
         */
        public Builder kind(Output kind) {
            $.kind = kind;
            return this;
        }

        /**
         * @param kind Required
         * 
         * @return builder
         * 
         */
        public Builder kind(String kind) {
            return kind(Output.of(kind));
        }

        public Builder serviceAccount(@Nullable Output serviceAccount) {
            $.serviceAccount = serviceAccount;
            return this;
        }

        public Builder serviceAccount(ServiceAccountSubjectArgs serviceAccount) {
            return serviceAccount(Output.of(serviceAccount));
        }

        public Builder user(@Nullable Output user) {
            $.user = user;
            return this;
        }

        public Builder user(UserSubjectArgs user) {
            return user(Output.of(user));
        }

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy