// *** 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.core.v1.outputs;

import com.pulumi.core.annotations.CustomType;
import com.pulumi.kubernetes.core.v1.outputs.ConfigMapProjection;
import com.pulumi.kubernetes.core.v1.outputs.DownwardAPIProjection;
import com.pulumi.kubernetes.core.v1.outputs.SecretProjection;
import com.pulumi.kubernetes.core.v1.outputs.ServiceAccountTokenProjection;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class VolumeProjection {
    /**
     * @return configMap information about the configMap data to project
     * 
     */
    private @Nullable ConfigMapProjection configMap;
    /**
     * @return downwardAPI information about the downwardAPI data to project
     * 
     */
    private @Nullable DownwardAPIProjection downwardAPI;
    /**
     * @return secret information about the secret data to project
     * 
     */
    private @Nullable SecretProjection secret;
    /**
     * @return serviceAccountToken is information about the serviceAccountToken data to project
     * 
     */
    private @Nullable ServiceAccountTokenProjection serviceAccountToken;

    private VolumeProjection() {}
    /**
     * @return configMap information about the configMap data to project
     * 
     */
    public Optional<ConfigMapProjection> configMap() {
        return Optional.ofNullable(this.configMap);
    }
    /**
     * @return downwardAPI information about the downwardAPI data to project
     * 
     */
    public Optional<DownwardAPIProjection> downwardAPI() {
        return Optional.ofNullable(this.downwardAPI);
    }
    /**
     * @return secret information about the secret data to project
     * 
     */
    public Optional<SecretProjection> secret() {
        return Optional.ofNullable(this.secret);
    }
    /**
     * @return serviceAccountToken is information about the serviceAccountToken data to project
     * 
     */
    public Optional<ServiceAccountTokenProjection> serviceAccountToken() {
        return Optional.ofNullable(this.serviceAccountToken);
    }

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

    public static Builder builder(VolumeProjection defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable ConfigMapProjection configMap;
        private @Nullable DownwardAPIProjection downwardAPI;
        private @Nullable SecretProjection secret;
        private @Nullable ServiceAccountTokenProjection serviceAccountToken;
        public Builder() {}
        public Builder(VolumeProjection defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.configMap = defaults.configMap;
    	      this.downwardAPI = defaults.downwardAPI;
    	      this.secret = defaults.secret;
    	      this.serviceAccountToken = defaults.serviceAccountToken;
        }

        @CustomType.Setter
        public Builder configMap(@Nullable ConfigMapProjection configMap) {
            this.configMap = configMap;
            return this;
        }
        @CustomType.Setter
        public Builder downwardAPI(@Nullable DownwardAPIProjection downwardAPI) {
            this.downwardAPI = downwardAPI;
            return this;
        }
        @CustomType.Setter
        public Builder secret(@Nullable SecretProjection secret) {
            this.secret = secret;
            return this;
        }
        @CustomType.Setter
        public Builder serviceAccountToken(@Nullable ServiceAccountTokenProjection serviceAccountToken) {
            this.serviceAccountToken = serviceAccountToken;
            return this;
        }
        public VolumeProjection build() {
            final var o = new VolumeProjection();
            o.configMap = configMap;
            o.downwardAPI = downwardAPI;
            o.secret = secret;
            o.serviceAccountToken = serviceAccountToken;
            return o;
        }
    }
}
