// *** 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.aws.ecs.outputs;

import com.pulumi.aws.ecs.outputs.TaskDefinitionVolumeEfsVolumeConfigurationAuthorizationConfig;
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 TaskDefinitionVolumeEfsVolumeConfiguration {
    /**
     * @return Configuration block for authorization for the Amazon EFS file system. Detailed below.
     * 
     */
    private @Nullable TaskDefinitionVolumeEfsVolumeConfigurationAuthorizationConfig authorizationConfig;
    /**
     * @return ID of the EFS File System.
     * 
     */
    private String fileSystemId;
    /**
     * @return Directory within the Amazon EFS file system to mount as the root directory inside the host. If this parameter is omitted, the root of the Amazon EFS volume will be used. Specifying / will have the same effect as omitting this parameter. This argument is ignored when using `authorization_config`.
     * 
     */
    private @Nullable String rootDirectory;
    /**
     * @return Whether or not to enable encryption for Amazon EFS data in transit between the Amazon ECS host and the Amazon EFS server. Transit encryption must be enabled if Amazon EFS IAM authorization is used. Valid values: `ENABLED`, `DISABLED`. If this parameter is omitted, the default value of `DISABLED` is used.
     * 
     */
    private @Nullable String transitEncryption;
    /**
     * @return Port to use for transit encryption. If you do not specify a transit encryption port, it will use the port selection strategy that the Amazon EFS mount helper uses.
     * 
     */
    private @Nullable Integer transitEncryptionPort;

    private TaskDefinitionVolumeEfsVolumeConfiguration() {}
    /**
     * @return Configuration block for authorization for the Amazon EFS file system. Detailed below.
     * 
     */
    public Optional<TaskDefinitionVolumeEfsVolumeConfigurationAuthorizationConfig> authorizationConfig() {
        return Optional.ofNullable(this.authorizationConfig);
    }
    /**
     * @return ID of the EFS File System.
     * 
     */
    public String fileSystemId() {
        return this.fileSystemId;
    }
    /**
     * @return Directory within the Amazon EFS file system to mount as the root directory inside the host. If this parameter is omitted, the root of the Amazon EFS volume will be used. Specifying / will have the same effect as omitting this parameter. This argument is ignored when using `authorization_config`.
     * 
     */
    public Optional<String> rootDirectory() {
        return Optional.ofNullable(this.rootDirectory);
    }
    /**
     * @return Whether or not to enable encryption for Amazon EFS data in transit between the Amazon ECS host and the Amazon EFS server. Transit encryption must be enabled if Amazon EFS IAM authorization is used. Valid values: `ENABLED`, `DISABLED`. If this parameter is omitted, the default value of `DISABLED` is used.
     * 
     */
    public Optional<String> transitEncryption() {
        return Optional.ofNullable(this.transitEncryption);
    }
    /**
     * @return Port to use for transit encryption. If you do not specify a transit encryption port, it will use the port selection strategy that the Amazon EFS mount helper uses.
     * 
     */
    public Optional<Integer> transitEncryptionPort() {
        return Optional.ofNullable(this.transitEncryptionPort);
    }

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

    public static Builder builder(TaskDefinitionVolumeEfsVolumeConfiguration defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable TaskDefinitionVolumeEfsVolumeConfigurationAuthorizationConfig authorizationConfig;
        private String fileSystemId;
        private @Nullable String rootDirectory;
        private @Nullable String transitEncryption;
        private @Nullable Integer transitEncryptionPort;
        public Builder() {}
        public Builder(TaskDefinitionVolumeEfsVolumeConfiguration defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.authorizationConfig = defaults.authorizationConfig;
    	      this.fileSystemId = defaults.fileSystemId;
    	      this.rootDirectory = defaults.rootDirectory;
    	      this.transitEncryption = defaults.transitEncryption;
    	      this.transitEncryptionPort = defaults.transitEncryptionPort;
        }

        @CustomType.Setter
        public Builder authorizationConfig(@Nullable TaskDefinitionVolumeEfsVolumeConfigurationAuthorizationConfig authorizationConfig) {
            this.authorizationConfig = authorizationConfig;
            return this;
        }
        @CustomType.Setter
        public Builder fileSystemId(String fileSystemId) {
            this.fileSystemId = Objects.requireNonNull(fileSystemId);
            return this;
        }
        @CustomType.Setter
        public Builder rootDirectory(@Nullable String rootDirectory) {
            this.rootDirectory = rootDirectory;
            return this;
        }
        @CustomType.Setter
        public Builder transitEncryption(@Nullable String transitEncryption) {
            this.transitEncryption = transitEncryption;
            return this;
        }
        @CustomType.Setter
        public Builder transitEncryptionPort(@Nullable Integer transitEncryptionPort) {
            this.transitEncryptionPort = transitEncryptionPort;
            return this;
        }
        public TaskDefinitionVolumeEfsVolumeConfiguration build() {
            final var o = new TaskDefinitionVolumeEfsVolumeConfiguration();
            o.authorizationConfig = authorizationConfig;
            o.fileSystemId = fileSystemId;
            o.rootDirectory = rootDirectory;
            o.transitEncryption = transitEncryption;
            o.transitEncryptionPort = transitEncryptionPort;
            return o;
        }
    }
}
