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

import com.pulumi.core.annotations.CustomType;
import com.pulumi.gcp.compute.outputs.ResourcePolicySnapshotSchedulePolicyRetentionPolicy;
import com.pulumi.gcp.compute.outputs.ResourcePolicySnapshotSchedulePolicySchedule;
import com.pulumi.gcp.compute.outputs.ResourcePolicySnapshotSchedulePolicySnapshotProperties;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class ResourcePolicySnapshotSchedulePolicy {
    /**
     * @return Retention policy applied to snapshots created by this resource policy.
     * Structure is documented below.
     * 
     */
    private @Nullable ResourcePolicySnapshotSchedulePolicyRetentionPolicy retentionPolicy;
    /**
     * @return Contains one of an `hourlySchedule`, `dailySchedule`, or `weeklySchedule`.
     * Structure is documented below.
     * 
     */
    private ResourcePolicySnapshotSchedulePolicySchedule schedule;
    /**
     * @return Properties with which the snapshots are created, such as labels.
     * Structure is documented below.
     * 
     */
    private @Nullable ResourcePolicySnapshotSchedulePolicySnapshotProperties snapshotProperties;

    private ResourcePolicySnapshotSchedulePolicy() {}
    /**
     * @return Retention policy applied to snapshots created by this resource policy.
     * Structure is documented below.
     * 
     */
    public Optional<ResourcePolicySnapshotSchedulePolicyRetentionPolicy> retentionPolicy() {
        return Optional.ofNullable(this.retentionPolicy);
    }
    /**
     * @return Contains one of an `hourlySchedule`, `dailySchedule`, or `weeklySchedule`.
     * Structure is documented below.
     * 
     */
    public ResourcePolicySnapshotSchedulePolicySchedule schedule() {
        return this.schedule;
    }
    /**
     * @return Properties with which the snapshots are created, such as labels.
     * Structure is documented below.
     * 
     */
    public Optional<ResourcePolicySnapshotSchedulePolicySnapshotProperties> snapshotProperties() {
        return Optional.ofNullable(this.snapshotProperties);
    }

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

    public static Builder builder(ResourcePolicySnapshotSchedulePolicy defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable ResourcePolicySnapshotSchedulePolicyRetentionPolicy retentionPolicy;
        private ResourcePolicySnapshotSchedulePolicySchedule schedule;
        private @Nullable ResourcePolicySnapshotSchedulePolicySnapshotProperties snapshotProperties;
        public Builder() {}
        public Builder(ResourcePolicySnapshotSchedulePolicy defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.retentionPolicy = defaults.retentionPolicy;
    	      this.schedule = defaults.schedule;
    	      this.snapshotProperties = defaults.snapshotProperties;
        }

        @CustomType.Setter
        public Builder retentionPolicy(@Nullable ResourcePolicySnapshotSchedulePolicyRetentionPolicy retentionPolicy) {
            this.retentionPolicy = retentionPolicy;
            return this;
        }
        @CustomType.Setter
        public Builder schedule(ResourcePolicySnapshotSchedulePolicySchedule schedule) {
            this.schedule = Objects.requireNonNull(schedule);
            return this;
        }
        @CustomType.Setter
        public Builder snapshotProperties(@Nullable ResourcePolicySnapshotSchedulePolicySnapshotProperties snapshotProperties) {
            this.snapshotProperties = snapshotProperties;
            return this;
        }
        public ResourcePolicySnapshotSchedulePolicy build() {
            final var o = new ResourcePolicySnapshotSchedulePolicy();
            o.retentionPolicy = retentionPolicy;
            o.schedule = schedule;
            o.snapshotProperties = snapshotProperties;
            return o;
        }
    }
}
