// *** 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.gcp.storage.outputs;

import com.pulumi.core.annotations.CustomType;
import com.pulumi.gcp.storage.outputs.TransferJobTransferSpecAwsS3DataSourceAwsAccessKey;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class TransferJobTransferSpecAwsS3DataSource {
    /**
     * @return AWS credentials block.
     * 
     */
    private @Nullable TransferJobTransferSpecAwsS3DataSourceAwsAccessKey awsAccessKey;
    /**
     * @return Google Cloud Storage bucket name.
     * 
     */
    private String bucketName;
    /**
     * @return Root path to transfer objects. Must be an empty string or full path name that ends with a &#39;/&#39;. This field is treated as an object prefix. As such, it should generally not begin with a &#39;/&#39;.
     * 
     */
    private @Nullable String path;
    /**
     * @return The Amazon Resource Name (ARN) of the role to support temporary credentials via &#39;AssumeRoleWithWebIdentity&#39;. For more information about ARNs, see [IAM ARNs](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-arns). When a role ARN is provided, Transfer Service fetches temporary credentials for the session using a &#39;AssumeRoleWithWebIdentity&#39; call for the provided role using the [GoogleServiceAccount][] for this project.
     * 
     */
    private @Nullable String roleArn;

    private TransferJobTransferSpecAwsS3DataSource() {}
    /**
     * @return AWS credentials block.
     * 
     */
    public Optional<TransferJobTransferSpecAwsS3DataSourceAwsAccessKey> awsAccessKey() {
        return Optional.ofNullable(this.awsAccessKey);
    }
    /**
     * @return Google Cloud Storage bucket name.
     * 
     */
    public String bucketName() {
        return this.bucketName;
    }
    /**
     * @return Root path to transfer objects. Must be an empty string or full path name that ends with a &#39;/&#39;. This field is treated as an object prefix. As such, it should generally not begin with a &#39;/&#39;.
     * 
     */
    public Optional<String> path() {
        return Optional.ofNullable(this.path);
    }
    /**
     * @return The Amazon Resource Name (ARN) of the role to support temporary credentials via &#39;AssumeRoleWithWebIdentity&#39;. For more information about ARNs, see [IAM ARNs](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-arns). When a role ARN is provided, Transfer Service fetches temporary credentials for the session using a &#39;AssumeRoleWithWebIdentity&#39; call for the provided role using the [GoogleServiceAccount][] for this project.
     * 
     */
    public Optional<String> roleArn() {
        return Optional.ofNullable(this.roleArn);
    }

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

    public static Builder builder(TransferJobTransferSpecAwsS3DataSource defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable TransferJobTransferSpecAwsS3DataSourceAwsAccessKey awsAccessKey;
        private String bucketName;
        private @Nullable String path;
        private @Nullable String roleArn;
        public Builder() {}
        public Builder(TransferJobTransferSpecAwsS3DataSource defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.awsAccessKey = defaults.awsAccessKey;
    	      this.bucketName = defaults.bucketName;
    	      this.path = defaults.path;
    	      this.roleArn = defaults.roleArn;
        }

        @CustomType.Setter
        public Builder awsAccessKey(@Nullable TransferJobTransferSpecAwsS3DataSourceAwsAccessKey awsAccessKey) {
            this.awsAccessKey = awsAccessKey;
            return this;
        }
        @CustomType.Setter
        public Builder bucketName(String bucketName) {
            this.bucketName = Objects.requireNonNull(bucketName);
            return this;
        }
        @CustomType.Setter
        public Builder path(@Nullable String path) {
            this.path = path;
            return this;
        }
        @CustomType.Setter
        public Builder roleArn(@Nullable String roleArn) {
            this.roleArn = roleArn;
            return this;
        }
        public TransferJobTransferSpecAwsS3DataSource build() {
            final var o = new TransferJobTransferSpecAwsS3DataSource();
            o.awsAccessKey = awsAccessKey;
            o.bucketName = bucketName;
            o.path = path;
            o.roleArn = roleArn;
            return o;
        }
    }
}
