// *** 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.azure.siterecovery.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 ProtectionContainerMappingAutomaticUpdate {
    /**
     * @return The authentication type used for automation account. Possible values are `RunAsAccount` and `SystemAssignedIdentity`.
     * 
     * &gt; **Note:** `RunAsAccount` of `authentication_type` is deprecated and will retire on September 30, 2023. Details could be found [here](https://learn.microsoft.com/en-us/azure/automation/whats-new#support-for-run-as-accounts).
     * 
     * &gt; **Note:**: `authentication_type` will default to `SystemAssignedIdentity` in version 4.0.
     * 
     */
    private @Nullable String authenticationType;
    /**
     * @return The automation account ID which holds the automatic update runbook and authenticates to Azure resources.
     * 
     * &gt; **Note:** `automation_account_id` is required when `enabled` is specified.
     * 
     */
    private @Nullable String automationAccountId;
    /**
     * @return Should the Mobility service installed on Azure virtual machines be automatically updated. Defaults to `false`.
     * 
     * &gt; **Note:** The setting applies to all Azure VMs protected in the same container. For more details see [this document](https://learn.microsoft.com/en-us/azure/site-recovery/azure-to-azure-autoupdate#enable-automatic-updates)
     * 
     */
    private @Nullable Boolean enabled;

    private ProtectionContainerMappingAutomaticUpdate() {}
    /**
     * @return The authentication type used for automation account. Possible values are `RunAsAccount` and `SystemAssignedIdentity`.
     * 
     * &gt; **Note:** `RunAsAccount` of `authentication_type` is deprecated and will retire on September 30, 2023. Details could be found [here](https://learn.microsoft.com/en-us/azure/automation/whats-new#support-for-run-as-accounts).
     * 
     * &gt; **Note:**: `authentication_type` will default to `SystemAssignedIdentity` in version 4.0.
     * 
     */
    public Optional<String> authenticationType() {
        return Optional.ofNullable(this.authenticationType);
    }
    /**
     * @return The automation account ID which holds the automatic update runbook and authenticates to Azure resources.
     * 
     * &gt; **Note:** `automation_account_id` is required when `enabled` is specified.
     * 
     */
    public Optional<String> automationAccountId() {
        return Optional.ofNullable(this.automationAccountId);
    }
    /**
     * @return Should the Mobility service installed on Azure virtual machines be automatically updated. Defaults to `false`.
     * 
     * &gt; **Note:** The setting applies to all Azure VMs protected in the same container. For more details see [this document](https://learn.microsoft.com/en-us/azure/site-recovery/azure-to-azure-autoupdate#enable-automatic-updates)
     * 
     */
    public Optional<Boolean> enabled() {
        return Optional.ofNullable(this.enabled);
    }

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

    public static Builder builder(ProtectionContainerMappingAutomaticUpdate defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable String authenticationType;
        private @Nullable String automationAccountId;
        private @Nullable Boolean enabled;
        public Builder() {}
        public Builder(ProtectionContainerMappingAutomaticUpdate defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.authenticationType = defaults.authenticationType;
    	      this.automationAccountId = defaults.automationAccountId;
    	      this.enabled = defaults.enabled;
        }

        @CustomType.Setter
        public Builder authenticationType(@Nullable String authenticationType) {
            this.authenticationType = authenticationType;
            return this;
        }
        @CustomType.Setter
        public Builder automationAccountId(@Nullable String automationAccountId) {
            this.automationAccountId = automationAccountId;
            return this;
        }
        @CustomType.Setter
        public Builder enabled(@Nullable Boolean enabled) {
            this.enabled = enabled;
            return this;
        }
        public ProtectionContainerMappingAutomaticUpdate build() {
            final var o = new ProtectionContainerMappingAutomaticUpdate();
            o.authenticationType = authenticationType;
            o.automationAccountId = automationAccountId;
            o.enabled = enabled;
            return o;
        }
    }
}
