All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azurenative.dataprotection.inputs.AzureBackupRuleArgs Maven / Gradle / Ivy

There is a newer version: 2.72.0
Show newest version
// *** 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.azurenative.dataprotection.inputs;

import com.pulumi.azurenative.dataprotection.inputs.AdhocBasedTriggerContextArgs;
import com.pulumi.azurenative.dataprotection.inputs.AzureBackupParamsArgs;
import com.pulumi.azurenative.dataprotection.inputs.DataStoreInfoBaseArgs;
import com.pulumi.azurenative.dataprotection.inputs.ScheduleBasedTriggerContextArgs;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.core.internal.Codegen;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.String;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * Azure backup rule
 * 
 */
public final class AzureBackupRuleArgs extends com.pulumi.resources.ResourceArgs {

    public static final AzureBackupRuleArgs Empty = new AzureBackupRuleArgs();

    /**
     * BackupParameters base
     * 
     */
    @Import(name="backupParameters")
    private @Nullable Output backupParameters;

    /**
     * @return BackupParameters base
     * 
     */
    public Optional> backupParameters() {
        return Optional.ofNullable(this.backupParameters);
    }

    /**
     * DataStoreInfo base
     * 
     */
    @Import(name="dataStore", required=true)
    private Output dataStore;

    /**
     * @return DataStoreInfo base
     * 
     */
    public Output dataStore() {
        return this.dataStore;
    }

    @Import(name="name", required=true)
    private Output name;

    public Output name() {
        return this.name;
    }

    /**
     * Expected value is 'AzureBackupRule'.
     * 
     */
    @Import(name="objectType", required=true)
    private Output objectType;

    /**
     * @return
     * Expected value is 'AzureBackupRule'.
     * 
     */
    public Output objectType() {
        return this.objectType;
    }

    /**
     * Trigger context
     * 
     */
    @Import(name="trigger", required=true)
    private Output> trigger;

    /**
     * @return Trigger context
     * 
     */
    public Output> trigger() {
        return this.trigger;
    }

    private AzureBackupRuleArgs() {}

    private AzureBackupRuleArgs(AzureBackupRuleArgs $) {
        this.backupParameters = $.backupParameters;
        this.dataStore = $.dataStore;
        this.name = $.name;
        this.objectType = $.objectType;
        this.trigger = $.trigger;
    }

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

    public static final class Builder {
        private AzureBackupRuleArgs $;

        public Builder() {
            $ = new AzureBackupRuleArgs();
        }

        public Builder(AzureBackupRuleArgs defaults) {
            $ = new AzureBackupRuleArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param backupParameters BackupParameters base
         * 
         * @return builder
         * 
         */
        public Builder backupParameters(@Nullable Output backupParameters) {
            $.backupParameters = backupParameters;
            return this;
        }

        /**
         * @param backupParameters BackupParameters base
         * 
         * @return builder
         * 
         */
        public Builder backupParameters(AzureBackupParamsArgs backupParameters) {
            return backupParameters(Output.of(backupParameters));
        }

        /**
         * @param dataStore DataStoreInfo base
         * 
         * @return builder
         * 
         */
        public Builder dataStore(Output dataStore) {
            $.dataStore = dataStore;
            return this;
        }

        /**
         * @param dataStore DataStoreInfo base
         * 
         * @return builder
         * 
         */
        public Builder dataStore(DataStoreInfoBaseArgs dataStore) {
            return dataStore(Output.of(dataStore));
        }

        public Builder name(Output name) {
            $.name = name;
            return this;
        }

        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param objectType
         * Expected value is 'AzureBackupRule'.
         * 
         * @return builder
         * 
         */
        public Builder objectType(Output objectType) {
            $.objectType = objectType;
            return this;
        }

        /**
         * @param objectType
         * Expected value is 'AzureBackupRule'.
         * 
         * @return builder
         * 
         */
        public Builder objectType(String objectType) {
            return objectType(Output.of(objectType));
        }

        /**
         * @param trigger Trigger context
         * 
         * @return builder
         * 
         */
        public Builder trigger(Output> trigger) {
            $.trigger = trigger;
            return this;
        }

        /**
         * @param trigger Trigger context
         * 
         * @return builder
         * 
         */
        public Builder trigger(Either trigger) {
            return trigger(Output.of(trigger));
        }

        /**
         * @param trigger Trigger context
         * 
         * @return builder
         * 
         */
        public Builder trigger(AdhocBasedTriggerContextArgs trigger) {
            return trigger(Either.ofLeft(trigger));
        }

        /**
         * @param trigger Trigger context
         * 
         * @return builder
         * 
         */
        public Builder trigger(ScheduleBasedTriggerContextArgs trigger) {
            return trigger(Either.ofRight(trigger));
        }

        public AzureBackupRuleArgs build() {
            if ($.dataStore == null) {
                throw new MissingRequiredPropertyException("AzureBackupRuleArgs", "dataStore");
            }
            if ($.name == null) {
                throw new MissingRequiredPropertyException("AzureBackupRuleArgs", "name");
            }
            $.objectType = Codegen.stringProp("objectType").output().arg($.objectType).require();
            if ($.trigger == null) {
                throw new MissingRequiredPropertyException("AzureBackupRuleArgs", "trigger");
            }
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy