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

import com.pulumi.core.annotations.CustomType;
import com.pulumi.gcp.datastream.outputs.StreamDestinationConfigGcsDestinationConfigAvroFileFormat;
import com.pulumi.gcp.datastream.outputs.StreamDestinationConfigGcsDestinationConfigJsonFileFormat;
import java.lang.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class StreamDestinationConfigGcsDestinationConfig {
    /**
     * @return AVRO file format configuration.
     * 
     */
    private @Nullable StreamDestinationConfigGcsDestinationConfigAvroFileFormat avroFileFormat;
    /**
     * @return The maximum duration for which new events are added before a file is closed and a new file is created.
     * A duration in seconds with up to nine fractional digits, terminated by &#39;s&#39;. Example: &#34;3.5s&#34;. Defaults to 900s.
     * 
     */
    private @Nullable String fileRotationInterval;
    /**
     * @return The maximum file size to be saved in the bucket.
     * 
     */
    private @Nullable Integer fileRotationMb;
    /**
     * @return JSON file format configuration.
     * Structure is documented below.
     * 
     */
    private @Nullable StreamDestinationConfigGcsDestinationConfigJsonFileFormat jsonFileFormat;
    /**
     * @return Path inside the Cloud Storage bucket to write data to.
     * 
     */
    private @Nullable String path;

    private StreamDestinationConfigGcsDestinationConfig() {}
    /**
     * @return AVRO file format configuration.
     * 
     */
    public Optional<StreamDestinationConfigGcsDestinationConfigAvroFileFormat> avroFileFormat() {
        return Optional.ofNullable(this.avroFileFormat);
    }
    /**
     * @return The maximum duration for which new events are added before a file is closed and a new file is created.
     * A duration in seconds with up to nine fractional digits, terminated by &#39;s&#39;. Example: &#34;3.5s&#34;. Defaults to 900s.
     * 
     */
    public Optional<String> fileRotationInterval() {
        return Optional.ofNullable(this.fileRotationInterval);
    }
    /**
     * @return The maximum file size to be saved in the bucket.
     * 
     */
    public Optional<Integer> fileRotationMb() {
        return Optional.ofNullable(this.fileRotationMb);
    }
    /**
     * @return JSON file format configuration.
     * Structure is documented below.
     * 
     */
    public Optional<StreamDestinationConfigGcsDestinationConfigJsonFileFormat> jsonFileFormat() {
        return Optional.ofNullable(this.jsonFileFormat);
    }
    /**
     * @return Path inside the Cloud Storage bucket to write data to.
     * 
     */
    public Optional<String> path() {
        return Optional.ofNullable(this.path);
    }

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

    public static Builder builder(StreamDestinationConfigGcsDestinationConfig defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable StreamDestinationConfigGcsDestinationConfigAvroFileFormat avroFileFormat;
        private @Nullable String fileRotationInterval;
        private @Nullable Integer fileRotationMb;
        private @Nullable StreamDestinationConfigGcsDestinationConfigJsonFileFormat jsonFileFormat;
        private @Nullable String path;
        public Builder() {}
        public Builder(StreamDestinationConfigGcsDestinationConfig defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.avroFileFormat = defaults.avroFileFormat;
    	      this.fileRotationInterval = defaults.fileRotationInterval;
    	      this.fileRotationMb = defaults.fileRotationMb;
    	      this.jsonFileFormat = defaults.jsonFileFormat;
    	      this.path = defaults.path;
        }

        @CustomType.Setter
        public Builder avroFileFormat(@Nullable StreamDestinationConfigGcsDestinationConfigAvroFileFormat avroFileFormat) {
            this.avroFileFormat = avroFileFormat;
            return this;
        }
        @CustomType.Setter
        public Builder fileRotationInterval(@Nullable String fileRotationInterval) {
            this.fileRotationInterval = fileRotationInterval;
            return this;
        }
        @CustomType.Setter
        public Builder fileRotationMb(@Nullable Integer fileRotationMb) {
            this.fileRotationMb = fileRotationMb;
            return this;
        }
        @CustomType.Setter
        public Builder jsonFileFormat(@Nullable StreamDestinationConfigGcsDestinationConfigJsonFileFormat jsonFileFormat) {
            this.jsonFileFormat = jsonFileFormat;
            return this;
        }
        @CustomType.Setter
        public Builder path(@Nullable String path) {
            this.path = path;
            return this;
        }
        public StreamDestinationConfigGcsDestinationConfig build() {
            final var o = new StreamDestinationConfigGcsDestinationConfig();
            o.avroFileFormat = avroFileFormat;
            o.fileRotationInterval = fileRotationInterval;
            o.fileRotationMb = fileRotationMb;
            o.jsonFileFormat = jsonFileFormat;
            o.path = path;
            return o;
        }
    }
}
