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

import com.pulumi.core.annotations.CustomType;
import java.lang.Boolean;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class RepositoryMavenConfig {
    /**
     * @return The repository with this flag will allow publishing the same
     * snapshot versions.
     * 
     */
    private @Nullable Boolean allowSnapshotOverwrites;
    /**
     * @return Version policy defines the versions that the registry will accept.
     * Default value is `VERSION_POLICY_UNSPECIFIED`.
     * Possible values are: `VERSION_POLICY_UNSPECIFIED`, `RELEASE`, `SNAPSHOT`.
     * 
     */
    private @Nullable String versionPolicy;

    private RepositoryMavenConfig() {}
    /**
     * @return The repository with this flag will allow publishing the same
     * snapshot versions.
     * 
     */
    public Optional<Boolean> allowSnapshotOverwrites() {
        return Optional.ofNullable(this.allowSnapshotOverwrites);
    }
    /**
     * @return Version policy defines the versions that the registry will accept.
     * Default value is `VERSION_POLICY_UNSPECIFIED`.
     * Possible values are: `VERSION_POLICY_UNSPECIFIED`, `RELEASE`, `SNAPSHOT`.
     * 
     */
    public Optional<String> versionPolicy() {
        return Optional.ofNullable(this.versionPolicy);
    }

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

    public static Builder builder(RepositoryMavenConfig defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable Boolean allowSnapshotOverwrites;
        private @Nullable String versionPolicy;
        public Builder() {}
        public Builder(RepositoryMavenConfig defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.allowSnapshotOverwrites = defaults.allowSnapshotOverwrites;
    	      this.versionPolicy = defaults.versionPolicy;
        }

        @CustomType.Setter
        public Builder allowSnapshotOverwrites(@Nullable Boolean allowSnapshotOverwrites) {
            this.allowSnapshotOverwrites = allowSnapshotOverwrites;
            return this;
        }
        @CustomType.Setter
        public Builder versionPolicy(@Nullable String versionPolicy) {
            this.versionPolicy = versionPolicy;
            return this;
        }
        public RepositoryMavenConfig build() {
            final var o = new RepositoryMavenConfig();
            o.allowSnapshotOverwrites = allowSnapshotOverwrites;
            o.versionPolicy = versionPolicy;
            return o;
        }
    }
}
