// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.recoveryservicesbackup.models;

import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;

/** The BackupResourceEncryptionConfigExtended model. */
@Fluent
public final class BackupResourceEncryptionConfigExtended extends BackupResourceEncryptionConfig {
    /*
     * User Assigned Identity Id
     */
    @JsonProperty(value = "userAssignedIdentity")
    private String userAssignedIdentity;

    /*
     * bool to indicate whether to use system Assigned Identity or not
     */
    @JsonProperty(value = "useSystemAssignedIdentity")
    private Boolean useSystemAssignedIdentity;

    /** Creates an instance of BackupResourceEncryptionConfigExtended class. */
    public BackupResourceEncryptionConfigExtended() {
    }

    /**
     * Get the userAssignedIdentity property: User Assigned Identity Id.
     *
     * @return the userAssignedIdentity value.
     */
    public String userAssignedIdentity() {
        return this.userAssignedIdentity;
    }

    /**
     * Set the userAssignedIdentity property: User Assigned Identity Id.
     *
     * @param userAssignedIdentity the userAssignedIdentity value to set.
     * @return the BackupResourceEncryptionConfigExtended object itself.
     */
    public BackupResourceEncryptionConfigExtended withUserAssignedIdentity(String userAssignedIdentity) {
        this.userAssignedIdentity = userAssignedIdentity;
        return this;
    }

    /**
     * Get the useSystemAssignedIdentity property: bool to indicate whether to use system Assigned Identity or not.
     *
     * @return the useSystemAssignedIdentity value.
     */
    public Boolean useSystemAssignedIdentity() {
        return this.useSystemAssignedIdentity;
    }

    /**
     * Set the useSystemAssignedIdentity property: bool to indicate whether to use system Assigned Identity or not.
     *
     * @param useSystemAssignedIdentity the useSystemAssignedIdentity value to set.
     * @return the BackupResourceEncryptionConfigExtended object itself.
     */
    public BackupResourceEncryptionConfigExtended withUseSystemAssignedIdentity(Boolean useSystemAssignedIdentity) {
        this.useSystemAssignedIdentity = useSystemAssignedIdentity;
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public BackupResourceEncryptionConfigExtended withEncryptionAtRestType(EncryptionAtRestType encryptionAtRestType) {
        super.withEncryptionAtRestType(encryptionAtRestType);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public BackupResourceEncryptionConfigExtended withKeyUri(String keyUri) {
        super.withKeyUri(keyUri);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public BackupResourceEncryptionConfigExtended withSubscriptionId(String subscriptionId) {
        super.withSubscriptionId(subscriptionId);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public BackupResourceEncryptionConfigExtended withLastUpdateStatus(LastUpdateStatus lastUpdateStatus) {
        super.withLastUpdateStatus(lastUpdateStatus);
        return this;
    }

    /** {@inheritDoc} */
    @Override
    public BackupResourceEncryptionConfigExtended withInfrastructureEncryptionState(
        InfrastructureEncryptionState infrastructureEncryptionState) {
        super.withInfrastructureEncryptionState(infrastructureEncryptionState);
        return this;
    }

    /**
     * Validates the instance.
     *
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    @Override
    public void validate() {
        super.validate();
    }
}
