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

com.azure.resourcemanager.netapp.models.AccountEncryption Maven / Gradle / Ivy

Go to download

This package contains Microsoft Azure SDK for NetAppFiles Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Microsoft NetApp Files Azure Resource Provider specification. Package tag package-preview-2024-07-01-preview.

There is a newer version: 1.6.0-beta.1
Show newest version
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.netapp.models;

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

/**
 * Encryption settings.
 */
@Fluent
public final class AccountEncryption {
    /*
     * The encryption keySource (provider). Possible values (case-insensitive): Microsoft.NetApp, Microsoft.KeyVault
     */
    @JsonProperty(value = "keySource")
    private KeySource keySource;

    /*
     * Properties provided by KeVault. Applicable if keySource is 'Microsoft.KeyVault'.
     */
    @JsonProperty(value = "keyVaultProperties")
    private KeyVaultProperties keyVaultProperties;

    /*
     * Identity used to authenticate to KeyVault. Applicable if keySource is 'Microsoft.KeyVault'.
     */
    @JsonProperty(value = "identity")
    private EncryptionIdentity identity;

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

    /**
     * Get the keySource property: The encryption keySource (provider). Possible values (case-insensitive):
     * Microsoft.NetApp, Microsoft.KeyVault.
     * 
     * @return the keySource value.
     */
    public KeySource keySource() {
        return this.keySource;
    }

    /**
     * Set the keySource property: The encryption keySource (provider). Possible values (case-insensitive):
     * Microsoft.NetApp, Microsoft.KeyVault.
     * 
     * @param keySource the keySource value to set.
     * @return the AccountEncryption object itself.
     */
    public AccountEncryption withKeySource(KeySource keySource) {
        this.keySource = keySource;
        return this;
    }

    /**
     * Get the keyVaultProperties property: Properties provided by KeVault. Applicable if keySource is
     * 'Microsoft.KeyVault'.
     * 
     * @return the keyVaultProperties value.
     */
    public KeyVaultProperties keyVaultProperties() {
        return this.keyVaultProperties;
    }

    /**
     * Set the keyVaultProperties property: Properties provided by KeVault. Applicable if keySource is
     * 'Microsoft.KeyVault'.
     * 
     * @param keyVaultProperties the keyVaultProperties value to set.
     * @return the AccountEncryption object itself.
     */
    public AccountEncryption withKeyVaultProperties(KeyVaultProperties keyVaultProperties) {
        this.keyVaultProperties = keyVaultProperties;
        return this;
    }

    /**
     * Get the identity property: Identity used to authenticate to KeyVault. Applicable if keySource is
     * 'Microsoft.KeyVault'.
     * 
     * @return the identity value.
     */
    public EncryptionIdentity identity() {
        return this.identity;
    }

    /**
     * Set the identity property: Identity used to authenticate to KeyVault. Applicable if keySource is
     * 'Microsoft.KeyVault'.
     * 
     * @param identity the identity value to set.
     * @return the AccountEncryption object itself.
     */
    public AccountEncryption withIdentity(EncryptionIdentity identity) {
        this.identity = identity;
        return this;
    }

    /**
     * Validates the instance.
     * 
     * @throws IllegalArgumentException thrown if the instance is not valid.
     */
    public void validate() {
        if (keyVaultProperties() != null) {
            keyVaultProperties().validate();
        }
        if (identity() != null) {
            identity().validate();
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy