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

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

@CustomType
public final class GuestPoliciesPackage {
    /**
     * @return The desiredState the agent should maintain for this package. The default is to ensure the package is installed.
     * Possible values are: `INSTALLED`, `UPDATED`, `REMOVED`.
     * 
     */
    private @Nullable String desiredState;
    /**
     * @return Type of package manager that can be used to install this package. If a system does not have the package manager,
     * the package is not installed or removed no error message is returned. By default, or if you specify ANY,
     * the agent attempts to install and remove this package using the default package manager.
     * This is useful when creating a policy that applies to different types of systems.
     * The default behavior is ANY.
     * Default value is `ANY`.
     * Possible values are: `ANY`, `APT`, `YUM`, `ZYPPER`, `GOO`.
     * 
     */
    private @Nullable String manager;
    /**
     * @return The name of the package. A package is uniquely identified for conflict validation
     * by checking the package name and the manager(s) that the package targets.
     * 
     */
    private String name;

    private GuestPoliciesPackage() {}
    /**
     * @return The desiredState the agent should maintain for this package. The default is to ensure the package is installed.
     * Possible values are: `INSTALLED`, `UPDATED`, `REMOVED`.
     * 
     */
    public Optional<String> desiredState() {
        return Optional.ofNullable(this.desiredState);
    }
    /**
     * @return Type of package manager that can be used to install this package. If a system does not have the package manager,
     * the package is not installed or removed no error message is returned. By default, or if you specify ANY,
     * the agent attempts to install and remove this package using the default package manager.
     * This is useful when creating a policy that applies to different types of systems.
     * The default behavior is ANY.
     * Default value is `ANY`.
     * Possible values are: `ANY`, `APT`, `YUM`, `ZYPPER`, `GOO`.
     * 
     */
    public Optional<String> manager() {
        return Optional.ofNullable(this.manager);
    }
    /**
     * @return The name of the package. A package is uniquely identified for conflict validation
     * by checking the package name and the manager(s) that the package targets.
     * 
     */
    public String name() {
        return this.name;
    }

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

    public static Builder builder(GuestPoliciesPackage defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable String desiredState;
        private @Nullable String manager;
        private String name;
        public Builder() {}
        public Builder(GuestPoliciesPackage defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.desiredState = defaults.desiredState;
    	      this.manager = defaults.manager;
    	      this.name = defaults.name;
        }

        @CustomType.Setter
        public Builder desiredState(@Nullable String desiredState) {
            this.desiredState = desiredState;
            return this;
        }
        @CustomType.Setter
        public Builder manager(@Nullable String manager) {
            this.manager = manager;
            return this;
        }
        @CustomType.Setter
        public Builder name(String name) {
            this.name = Objects.requireNonNull(name);
            return this;
        }
        public GuestPoliciesPackage build() {
            final var o = new GuestPoliciesPackage();
            o.desiredState = desiredState;
            o.manager = manager;
            o.name = name;
            return o;
        }
    }
}
