// *** 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.media.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 ServiceAccountEncryptionManagedIdentity {
    /**
     * @return Whether to use System Assigned Identity. Possible Values are `true` and `false`.
     * 
     */
    private @Nullable Boolean useSystemAssignedIdentity;
    /**
     * @return The ID of the User Assigned Identity. This value can only be set when `use_system_assigned_identity` is `false`
     * 
     */
    private @Nullable String userAssignedIdentityId;

    private ServiceAccountEncryptionManagedIdentity() {}
    /**
     * @return Whether to use System Assigned Identity. Possible Values are `true` and `false`.
     * 
     */
    public Optional<Boolean> useSystemAssignedIdentity() {
        return Optional.ofNullable(this.useSystemAssignedIdentity);
    }
    /**
     * @return The ID of the User Assigned Identity. This value can only be set when `use_system_assigned_identity` is `false`
     * 
     */
    public Optional<String> userAssignedIdentityId() {
        return Optional.ofNullable(this.userAssignedIdentityId);
    }

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

    public static Builder builder(ServiceAccountEncryptionManagedIdentity defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable Boolean useSystemAssignedIdentity;
        private @Nullable String userAssignedIdentityId;
        public Builder() {}
        public Builder(ServiceAccountEncryptionManagedIdentity defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.useSystemAssignedIdentity = defaults.useSystemAssignedIdentity;
    	      this.userAssignedIdentityId = defaults.userAssignedIdentityId;
        }

        @CustomType.Setter
        public Builder useSystemAssignedIdentity(@Nullable Boolean useSystemAssignedIdentity) {
            this.useSystemAssignedIdentity = useSystemAssignedIdentity;
            return this;
        }
        @CustomType.Setter
        public Builder userAssignedIdentityId(@Nullable String userAssignedIdentityId) {
            this.userAssignedIdentityId = userAssignedIdentityId;
            return this;
        }
        public ServiceAccountEncryptionManagedIdentity build() {
            final var o = new ServiceAccountEncryptionManagedIdentity();
            o.useSystemAssignedIdentity = useSystemAssignedIdentity;
            o.userAssignedIdentityId = userAssignedIdentityId;
            return o;
        }
    }
}
