// *** 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.Integer;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class RepositoryVirtualRepositoryConfigUpstreamPolicy {
    /**
     * @return The user-provided ID of the upstream policy.
     * 
     */
    private @Nullable String id;
    /**
     * @return Entries with a greater priority value take precedence in the pull order.
     * 
     */
    private @Nullable Integer priority;
    /**
     * @return A reference to the repository resource, for example:
     * &#34;projects/p1/locations/us-central1/repository/repo1&#34;.
     * 
     */
    private @Nullable String repository;

    private RepositoryVirtualRepositoryConfigUpstreamPolicy() {}
    /**
     * @return The user-provided ID of the upstream policy.
     * 
     */
    public Optional<String> id() {
        return Optional.ofNullable(this.id);
    }
    /**
     * @return Entries with a greater priority value take precedence in the pull order.
     * 
     */
    public Optional<Integer> priority() {
        return Optional.ofNullable(this.priority);
    }
    /**
     * @return A reference to the repository resource, for example:
     * &#34;projects/p1/locations/us-central1/repository/repo1&#34;.
     * 
     */
    public Optional<String> repository() {
        return Optional.ofNullable(this.repository);
    }

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

    public static Builder builder(RepositoryVirtualRepositoryConfigUpstreamPolicy defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable String id;
        private @Nullable Integer priority;
        private @Nullable String repository;
        public Builder() {}
        public Builder(RepositoryVirtualRepositoryConfigUpstreamPolicy defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.id = defaults.id;
    	      this.priority = defaults.priority;
    	      this.repository = defaults.repository;
        }

        @CustomType.Setter
        public Builder id(@Nullable String id) {
            this.id = id;
            return this;
        }
        @CustomType.Setter
        public Builder priority(@Nullable Integer priority) {
            this.priority = priority;
            return this;
        }
        @CustomType.Setter
        public Builder repository(@Nullable String repository) {
            this.repository = repository;
            return this;
        }
        public RepositoryVirtualRepositoryConfigUpstreamPolicy build() {
            final var o = new RepositoryVirtualRepositoryConfigUpstreamPolicy();
            o.id = id;
            o.priority = priority;
            o.repository = repository;
            return o;
        }
    }
}
