diff --git a/sdk/keyvault/mgmt-v2015_06_01/pom.xml b/sdk/keyvault/mgmt-v2015_06_01/pom.xml index a7b512134a926..cd108aecbd91d 100644 --- a/sdk/keyvault/mgmt-v2015_06_01/pom.xml +++ b/sdk/keyvault/mgmt-v2015_06_01/pom.xml @@ -7,19 +7,13 @@ --> 4.0.0 - com.microsoft.azure.keyvault.v2015_06_01 - - com.microsoft.azure - azure-arm-parent - 1.2.0 - ../../parents/azure-arm-parent - - azure-mgmt-keyvault - 1.0.0-beta + com.microsoft.azure + azure-keyvault + 1.7.1-SNAPSHOT jar - Microsoft Azure SDK for KeyVault Management - This package contains Microsoft KeyVault Management SDK. - https://github.com/Azure/azure-libraries-for-java + Microsoft Azure SDK for KeyVault + This package contains Microsoft KeyVault SDK. + https://github.com/Azure/azure-sdk-for-java The MIT License (MIT) @@ -28,8 +22,8 @@ - scm:git:https://github.com/Azure/azure-libraries-for-java - scm:git:git@github.com:Azure/azure-libraries-for-java.git + scm:git:https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git HEAD @@ -46,30 +40,18 @@ com.microsoft.azure azure-client-runtime - - - com.microsoft.azure - azure-arm-client-runtime + 1.5.3 junit junit + 4.12 test com.microsoft.azure azure-client-authentication - test - - - com.microsoft.azure - azure-mgmt-resources - test - - - com.microsoft.azure - azure-arm-client-runtime - test-jar + 1.5.3 test diff --git a/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/KeyVaultManagementClient.java b/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/KeyVaultManagementClient.java new file mode 100644 index 0000000000000..c094518e587a8 --- /dev/null +++ b/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/KeyVaultManagementClient.java @@ -0,0 +1,111 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.keyvault.v2015_06_01; + +import com.microsoft.azure.AzureClient; +import com.microsoft.rest.RestClient; + +/** + * The interface for KeyVaultManagementClient class. + */ +public interface KeyVaultManagementClient { + /** + * Gets the REST client. + * + * @return the {@link RestClient} object. + */ + RestClient restClient(); + + /** + * Gets the {@link AzureClient} used for long running operations. + * @return the azure client; + */ + AzureClient getAzureClient(); + + /** + * Gets the User-Agent header for the client. + * + * @return the user agent string. + */ + String userAgent(); + + /** + * Gets Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.. + * + * @return the subscriptionId value. + */ + String subscriptionId(); + + /** + * Sets Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.. + * + * @param subscriptionId the subscriptionId value. + * @return the service client itself + */ + KeyVaultManagementClient withSubscriptionId(String subscriptionId); + + /** + * Gets Client Api Version.. + * + * @return the apiVersion value. + */ + String apiVersion(); + + /** + * Gets The preferred language for the response.. + * + * @return the acceptLanguage value. + */ + String acceptLanguage(); + + /** + * Sets The preferred language for the response.. + * + * @param acceptLanguage the acceptLanguage value. + * @return the service client itself + */ + KeyVaultManagementClient withAcceptLanguage(String acceptLanguage); + + /** + * Gets The retry timeout in seconds for Long Running Operations. Default value is 30.. + * + * @return the longRunningOperationRetryTimeout value. + */ + int longRunningOperationRetryTimeout(); + + /** + * Sets The retry timeout in seconds for Long Running Operations. Default value is 30.. + * + * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. + * @return the service client itself + */ + KeyVaultManagementClient withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout); + + /** + * Gets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.. + * + * @return the generateClientRequestId value. + */ + boolean generateClientRequestId(); + + /** + * Sets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.. + * + * @param generateClientRequestId the generateClientRequestId value. + * @return the service client itself + */ + KeyVaultManagementClient withGenerateClientRequestId(boolean generateClientRequestId); + + /** + * Gets the Vaults object to access its operations. + * @return the Vaults object. + */ + Vaults vaults(); + +} diff --git a/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/Vaults.java b/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/Vaults.java new file mode 100644 index 0000000000000..06fdf6885fc10 --- /dev/null +++ b/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/Vaults.java @@ -0,0 +1,396 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.keyvault.v2015_06_01; + +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.keyvault.v20150601.models.Vault; +import com.microsoft.azure.management.keyvault.v20150601.models.VaultCreateOrUpdateParameters; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.azure.Resource; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Vaults. + */ +public interface Vaults { + /** + * Create or update a key vault in the specified subscription. + * + * @param resourceGroupName The name of the Resource Group to which the server belongs. + * @param vaultName Name of the vault + * @param parameters Parameters to create or update the vault + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the Vault object if successful. + */ + Vault createOrUpdate(String resourceGroupName, String vaultName, VaultCreateOrUpdateParameters parameters); + + /** + * Create or update a key vault in the specified subscription. + * + * @param resourceGroupName The name of the Resource Group to which the server belongs. + * @param vaultName Name of the vault + * @param parameters Parameters to create or update the vault + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture createOrUpdateAsync(String resourceGroupName, String vaultName, VaultCreateOrUpdateParameters parameters, final ServiceCallback serviceCallback); + + /** + * Create or update a key vault in the specified subscription. + * + * @param resourceGroupName The name of the Resource Group to which the server belongs. + * @param vaultName Name of the vault + * @param parameters Parameters to create or update the vault + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Vault object + */ + Observable createOrUpdateAsync(String resourceGroupName, String vaultName, VaultCreateOrUpdateParameters parameters); + + /** + * Create or update a key vault in the specified subscription. + * + * @param resourceGroupName The name of the Resource Group to which the server belongs. + * @param vaultName Name of the vault + * @param parameters Parameters to create or update the vault + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Vault object + */ + Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String vaultName, VaultCreateOrUpdateParameters parameters); + + /** + * Deletes the specified Azure key vault. + * + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @param vaultName The name of the vault to delete + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + void delete(String resourceGroupName, String vaultName); + + /** + * Deletes the specified Azure key vault. + * + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @param vaultName The name of the vault to delete + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture deleteAsync(String resourceGroupName, String vaultName, final ServiceCallback serviceCallback); + + /** + * Deletes the specified Azure key vault. + * + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @param vaultName The name of the vault to delete + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable deleteAsync(String resourceGroupName, String vaultName); + + /** + * Deletes the specified Azure key vault. + * + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @param vaultName The name of the vault to delete + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable> deleteWithServiceResponseAsync(String resourceGroupName, String vaultName); + + /** + * Gets the specified Azure key vault. + * + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @param vaultName The name of the vault. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the Vault object if successful. + */ + Vault get(String resourceGroupName, String vaultName); + + /** + * Gets the specified Azure key vault. + * + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @param vaultName The name of the vault. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture getAsync(String resourceGroupName, String vaultName, final ServiceCallback serviceCallback); + + /** + * Gets the specified Azure key vault. + * + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @param vaultName The name of the vault. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Vault object + */ + Observable getAsync(String resourceGroupName, String vaultName); + + /** + * Gets the specified Azure key vault. + * + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @param vaultName The name of the vault. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Vault object + */ + Observable> getWithServiceResponseAsync(String resourceGroupName, String vaultName); + + /** + * The List operation gets information about the vaults associated with the subscription and within the specified resource group. + * + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<Vault> object if successful. + */ + PagedList listByResourceGroup(final String resourceGroupName); + + /** + * The List operation gets information about the vaults associated with the subscription and within the specified resource group. + * + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback); + + /** + * The List operation gets information about the vaults associated with the subscription and within the specified resource group. + * + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<Vault> object + */ + Observable> listByResourceGroupAsync(final String resourceGroupName); + + /** + * The List operation gets information about the vaults associated with the subscription and within the specified resource group. + * + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<Vault> object + */ + Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName); + /** + * The List operation gets information about the vaults associated with the subscription and within the specified resource group. + * + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @param top Maximum number of results to return. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<Vault> object if successful. + */ + PagedList listByResourceGroup(final String resourceGroupName, final Integer top); + + /** + * The List operation gets information about the vaults associated with the subscription and within the specified resource group. + * + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @param top Maximum number of results to return. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final Integer top, final ListOperationCallback serviceCallback); + + /** + * The List operation gets information about the vaults associated with the subscription and within the specified resource group. + * + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @param top Maximum number of results to return. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<Vault> object + */ + Observable> listByResourceGroupAsync(final String resourceGroupName, final Integer top); + + /** + * The List operation gets information about the vaults associated with the subscription and within the specified resource group. + * + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @param top Maximum number of results to return. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<Vault> object + */ + Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName, final Integer top); + + /** + * The List operation gets information about the vaults associated with the subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<Resource> object if successful. + */ + PagedList list(); + + /** + * The List operation gets information about the vaults associated with the subscription. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listAsync(final ListOperationCallback serviceCallback); + + /** + * The List operation gets information about the vaults associated with the subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<Resource> object + */ + Observable> listAsync(); + + /** + * The List operation gets information about the vaults associated with the subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<Resource> object + */ + Observable>> listWithServiceResponseAsync(); + /** + * The List operation gets information about the vaults associated with the subscription. + * + * @param top Maximum number of results to return. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<Resource> object if successful. + */ + PagedList list(final Integer top); + + /** + * The List operation gets information about the vaults associated with the subscription. + * + * @param top Maximum number of results to return. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listAsync(final Integer top, final ListOperationCallback serviceCallback); + + /** + * The List operation gets information about the vaults associated with the subscription. + * + * @param top Maximum number of results to return. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<Resource> object + */ + Observable> listAsync(final Integer top); + + /** + * The List operation gets information about the vaults associated with the subscription. + * + * @param top Maximum number of results to return. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<Resource> object + */ + Observable>> listWithServiceResponseAsync(final Integer top); + + /** + * The List operation gets information about the vaults associated with the subscription and within the specified resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<Vault> object if successful. + */ + PagedList listByResourceGroupNext(final String nextPageLink); + + /** + * The List operation gets information about the vaults associated with the subscription and within the specified resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback); + + /** + * The List operation gets information about the vaults associated with the subscription and within the specified resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<Vault> object + */ + Observable> listByResourceGroupNextAsync(final String nextPageLink); + + /** + * The List operation gets information about the vaults associated with the subscription and within the specified resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<Vault> object + */ + Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink); + + /** + * The List operation gets information about the vaults associated with the subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<Resource> object if successful. + */ + PagedList listNext(final String nextPageLink); + + /** + * The List operation gets information about the vaults associated with the subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback); + + /** + * The List operation gets information about the vaults associated with the subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<Resource> object + */ + Observable> listNextAsync(final String nextPageLink); + + /** + * The List operation gets information about the vaults associated with the subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<Resource> object + */ + Observable>> listNextWithServiceResponseAsync(final String nextPageLink); + +} diff --git a/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/implementation/KeyVaultManagementClientImpl.java b/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/implementation/KeyVaultManagementClientImpl.java new file mode 100644 index 0000000000000..14ca118a02ff4 --- /dev/null +++ b/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/implementation/KeyVaultManagementClientImpl.java @@ -0,0 +1,198 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.keyvault.v2015_06_01.implementation; + +import com.microsoft.azure.AzureClient; +import com.microsoft.azure.AzureServiceClient; +import com.microsoft.azure.management.keyvault.v20150601.KeyVaultManagementClient; +import com.microsoft.azure.management.keyvault.v20150601.Vaults; +import com.microsoft.rest.credentials.ServiceClientCredentials; +import com.microsoft.rest.RestClient; + +/** + * Initializes a new instance of the KeyVaultManagementClientImpl class. + */ +public class KeyVaultManagementClientImpl extends AzureServiceClient implements KeyVaultManagementClient { + /** the {@link AzureClient} used for long running operations. */ + private AzureClient azureClient; + + /** + * Gets the {@link AzureClient} used for long running operations. + * @return the azure client; + */ + public AzureClient getAzureClient() { + return this.azureClient; + } + + /** Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. */ + private String subscriptionId; + + /** + * Gets Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + * + * @return the subscriptionId value. + */ + public String subscriptionId() { + return this.subscriptionId; + } + + /** + * Sets Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + * + * @param subscriptionId the subscriptionId value. + * @return the service client itself + */ + public KeyVaultManagementClientImpl withSubscriptionId(String subscriptionId) { + this.subscriptionId = subscriptionId; + return this; + } + + /** Client Api Version. */ + private String apiVersion; + + /** + * Gets Client Api Version. + * + * @return the apiVersion value. + */ + public String apiVersion() { + return this.apiVersion; + } + + /** The preferred language for the response. */ + private String acceptLanguage; + + /** + * Gets The preferred language for the response. + * + * @return the acceptLanguage value. + */ + public String acceptLanguage() { + return this.acceptLanguage; + } + + /** + * Sets The preferred language for the response. + * + * @param acceptLanguage the acceptLanguage value. + * @return the service client itself + */ + public KeyVaultManagementClientImpl withAcceptLanguage(String acceptLanguage) { + this.acceptLanguage = acceptLanguage; + return this; + } + + /** The retry timeout in seconds for Long Running Operations. Default value is 30. */ + private int longRunningOperationRetryTimeout; + + /** + * Gets The retry timeout in seconds for Long Running Operations. Default value is 30. + * + * @return the longRunningOperationRetryTimeout value. + */ + public int longRunningOperationRetryTimeout() { + return this.longRunningOperationRetryTimeout; + } + + /** + * Sets The retry timeout in seconds for Long Running Operations. Default value is 30. + * + * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value. + * @return the service client itself + */ + public KeyVaultManagementClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) { + this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout; + return this; + } + + /** Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */ + private boolean generateClientRequestId; + + /** + * Gets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * + * @return the generateClientRequestId value. + */ + public boolean generateClientRequestId() { + return this.generateClientRequestId; + } + + /** + * Sets Whether a unique x-ms-client-request-id should be generated. When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. + * + * @param generateClientRequestId the generateClientRequestId value. + * @return the service client itself + */ + public KeyVaultManagementClientImpl withGenerateClientRequestId(boolean generateClientRequestId) { + this.generateClientRequestId = generateClientRequestId; + return this; + } + + /** + * The Vaults object to access its operations. + */ + private Vaults vaults; + + /** + * Gets the Vaults object to access its operations. + * @return the Vaults object. + */ + public Vaults vaults() { + return this.vaults; + } + + /** + * Initializes an instance of KeyVaultManagementClient client. + * + * @param credentials the management credentials for Azure + */ + public KeyVaultManagementClientImpl(ServiceClientCredentials credentials) { + this("https://management.azure.com", credentials); + } + + /** + * Initializes an instance of KeyVaultManagementClient client. + * + * @param baseUrl the base URL of the host + * @param credentials the management credentials for Azure + */ + public KeyVaultManagementClientImpl(String baseUrl, ServiceClientCredentials credentials) { + super(baseUrl, credentials); + initialize(); + } + + /** + * Initializes an instance of KeyVaultManagementClient client. + * + * @param restClient the REST client to connect to Azure. + */ + public KeyVaultManagementClientImpl(RestClient restClient) { + super(restClient); + initialize(); + } + + protected void initialize() { + this.apiVersion = "2015-06-01"; + this.acceptLanguage = "en-US"; + this.longRunningOperationRetryTimeout = 30; + this.generateClientRequestId = true; + this.vaults = new VaultsImpl(restClient().retrofit(), this); + this.azureClient = new AzureClient(this); + } + + /** + * Gets the User-Agent header for the client. + * + * @return the user agent string. + */ + @Override + public String userAgent() { + return String.format("%s (%s, %s)", super.userAgent(), "KeyVaultManagementClient", "2015-06-01"); + } +} diff --git a/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/implementation/VaultsImpl.java b/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/implementation/VaultsImpl.java new file mode 100644 index 0000000000000..338b5b90528f5 --- /dev/null +++ b/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/implementation/VaultsImpl.java @@ -0,0 +1,1028 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.keyvault.v2015_06_01.implementation; + +import retrofit2.Retrofit; +import com.microsoft.azure.management.keyvault.v20150601.Vaults; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.keyvault.v20150601.models.PageImpl; +import com.microsoft.azure.management.keyvault.v20150601.models.Vault; +import com.microsoft.azure.management.keyvault.v20150601.models.VaultCreateOrUpdateParameters; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.azure.Resource; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.HTTP; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in Vaults. + */ +public class VaultsImpl implements Vaults { + /** The Retrofit service to perform REST calls. */ + private VaultsService service; + /** The service client containing this operation class. */ + private KeyVaultManagementClientImpl client; + + /** + * Initializes an instance of VaultsImpl. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public VaultsImpl(Retrofit retrofit, KeyVaultManagementClientImpl client) { + this.service = retrofit.create(VaultsService.class); + this.client = client; + } + + /** + * The interface defining all the services for Vaults to be + * used by Retrofit to perform actually REST calls. + */ + interface VaultsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.keyvault.v20150601.Vaults createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}") + Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("vaultName") String vaultName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Body VaultCreateOrUpdateParameters parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.keyvault.v20150601.Vaults delete" }) + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}", method = "DELETE", hasBody = true) + Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("vaultName") String vaultName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.keyvault.v20150601.Vaults get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}") + Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("vaultName") String vaultName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.keyvault.v20150601.Vaults listByResourceGroup" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults") + Observable> listByResourceGroup(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("$top") Integer top, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.keyvault.v20150601.Vaults list" }) + @GET("subscriptions/{subscriptionId}/resources") + Observable> list(@Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("$top") Integer top, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.keyvault.v20150601.Vaults listByResourceGroupNext" }) + @GET + Observable> listByResourceGroupNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.keyvault.v20150601.Vaults listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Create or update a key vault in the specified subscription. + * + * @param resourceGroupName The name of the Resource Group to which the server belongs. + * @param vaultName Name of the vault + * @param parameters Parameters to create or update the vault + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the Vault object if successful. + */ + public Vault createOrUpdate(String resourceGroupName, String vaultName, VaultCreateOrUpdateParameters parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, vaultName, parameters).toBlocking().single().body(); + } + + /** + * Create or update a key vault in the specified subscription. + * + * @param resourceGroupName The name of the Resource Group to which the server belongs. + * @param vaultName Name of the vault + * @param parameters Parameters to create or update the vault + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String vaultName, VaultCreateOrUpdateParameters parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, vaultName, parameters), serviceCallback); + } + + /** + * Create or update a key vault in the specified subscription. + * + * @param resourceGroupName The name of the Resource Group to which the server belongs. + * @param vaultName Name of the vault + * @param parameters Parameters to create or update the vault + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Vault object + */ + public Observable createOrUpdateAsync(String resourceGroupName, String vaultName, VaultCreateOrUpdateParameters parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, vaultName, parameters).map(new Func1, Vault>() { + @Override + public Vault call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Create or update a key vault in the specified subscription. + * + * @param resourceGroupName The name of the Resource Group to which the server belongs. + * @param vaultName Name of the vault + * @param parameters Parameters to create or update the vault + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Vault object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String vaultName, VaultCreateOrUpdateParameters parameters) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vaultName == null) { + throw new IllegalArgumentException("Parameter vaultName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + return service.createOrUpdate(resourceGroupName, vaultName, this.client.subscriptionId(), this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Deletes the specified Azure key vault. + * + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @param vaultName The name of the vault to delete + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void delete(String resourceGroupName, String vaultName) { + deleteWithServiceResponseAsync(resourceGroupName, vaultName).toBlocking().single().body(); + } + + /** + * Deletes the specified Azure key vault. + * + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @param vaultName The name of the vault to delete + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture deleteAsync(String resourceGroupName, String vaultName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, vaultName), serviceCallback); + } + + /** + * Deletes the specified Azure key vault. + * + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @param vaultName The name of the vault to delete + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable deleteAsync(String resourceGroupName, String vaultName) { + return deleteWithServiceResponseAsync(resourceGroupName, vaultName).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Deletes the specified Azure key vault. + * + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @param vaultName The name of the vault to delete + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String vaultName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vaultName == null) { + throw new IllegalArgumentException("Parameter vaultName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.delete(resourceGroupName, vaultName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = deleteDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(204, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets the specified Azure key vault. + * + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @param vaultName The name of the vault. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the Vault object if successful. + */ + public Vault get(String resourceGroupName, String vaultName) { + return getWithServiceResponseAsync(resourceGroupName, vaultName).toBlocking().single().body(); + } + + /** + * Gets the specified Azure key vault. + * + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @param vaultName The name of the vault. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String vaultName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, vaultName), serviceCallback); + } + + /** + * Gets the specified Azure key vault. + * + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @param vaultName The name of the vault. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Vault object + */ + public Observable getAsync(String resourceGroupName, String vaultName) { + return getWithServiceResponseAsync(resourceGroupName, vaultName).map(new Func1, Vault>() { + @Override + public Vault call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the specified Azure key vault. + * + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @param vaultName The name of the vault. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Vault object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String vaultName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vaultName == null) { + throw new IllegalArgumentException("Parameter vaultName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(resourceGroupName, vaultName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * The List operation gets information about the vaults associated with the subscription and within the specified resource group. + * + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<Vault> object if successful. + */ + public PagedList listByResourceGroup(final String resourceGroupName) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * The List operation gets information about the vaults associated with the subscription and within the specified resource group. + * + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupSinglePageAsync(resourceGroupName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * The List operation gets information about the vaults associated with the subscription and within the specified resource group. + * + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<Vault> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * The List operation gets information about the vaults associated with the subscription and within the specified resource group. + * + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<Vault> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { + return listByResourceGroupSinglePageAsync(resourceGroupName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * The List operation gets information about the vaults associated with the subscription and within the specified resource group. + * + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<Vault> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final Integer top = null; + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), top, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * The List operation gets information about the vaults associated with the subscription and within the specified resource group. + * + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @param top Maximum number of results to return. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<Vault> object if successful. + */ + public PagedList listByResourceGroup(final String resourceGroupName, final Integer top) { + ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName, top).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * The List operation gets information about the vaults associated with the subscription and within the specified resource group. + * + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @param top Maximum number of results to return. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final Integer top, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupSinglePageAsync(resourceGroupName, top), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * The List operation gets information about the vaults associated with the subscription and within the specified resource group. + * + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @param top Maximum number of results to return. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<Vault> object + */ + public Observable> listByResourceGroupAsync(final String resourceGroupName, final Integer top) { + return listByResourceGroupWithServiceResponseAsync(resourceGroupName, top) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * The List operation gets information about the vaults associated with the subscription and within the specified resource group. + * + * @param resourceGroupName The name of the Resource Group to which the vault belongs. + * @param top Maximum number of results to return. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<Vault> object + */ + public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName, final Integer top) { + return listByResourceGroupSinglePageAsync(resourceGroupName, top) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * The List operation gets information about the vaults associated with the subscription and within the specified resource group. + * + ServiceResponse> * @param resourceGroupName The name of the Resource Group to which the vault belongs. + ServiceResponse> * @param top Maximum number of results to return. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<Vault> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName, final Integer top) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), top, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * The List operation gets information about the vaults associated with the subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<Resource> object if successful. + */ + public PagedList list() { + ServiceResponse> response = listSinglePageAsync().toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * The List operation gets information about the vaults associated with the subscription. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * The List operation gets information about the vaults associated with the subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<Resource> object + */ + public Observable> listAsync() { + return listWithServiceResponseAsync() + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * The List operation gets information about the vaults associated with the subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<Resource> object + */ + public Observable>> listWithServiceResponseAsync() { + return listSinglePageAsync() + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * The List operation gets information about the vaults associated with the subscription. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<Resource> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync() { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String filter = "resourceType eq 'Microsoft.KeyVault/vaults'"; + final String apiVersion = "2015-11-01"; + final Integer top = null; + return service.list(this.client.subscriptionId(), filter, top, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * The List operation gets information about the vaults associated with the subscription. + * + * @param top Maximum number of results to return. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<Resource> object if successful. + */ + public PagedList list(final Integer top) { + ServiceResponse> response = listSinglePageAsync(top).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * The List operation gets information about the vaults associated with the subscription. + * + * @param top Maximum number of results to return. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final Integer top, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(top), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * The List operation gets information about the vaults associated with the subscription. + * + * @param top Maximum number of results to return. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<Resource> object + */ + public Observable> listAsync(final Integer top) { + return listWithServiceResponseAsync(top) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * The List operation gets information about the vaults associated with the subscription. + * + * @param top Maximum number of results to return. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<Resource> object + */ + public Observable>> listWithServiceResponseAsync(final Integer top) { + return listSinglePageAsync(top) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * The List operation gets information about the vaults associated with the subscription. + * + ServiceResponse> * @param top Maximum number of results to return. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<Resource> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final Integer top) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String filter = "resourceType eq 'Microsoft.KeyVault/vaults'"; + final String apiVersion = "2015-11-01"; + return service.list(this.client.subscriptionId(), filter, top, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * The List operation gets information about the vaults associated with the subscription and within the specified resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<Vault> object if successful. + */ + public PagedList listByResourceGroupNext(final String nextPageLink) { + ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * The List operation gets information about the vaults associated with the subscription and within the specified resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listByResourceGroupNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listByResourceGroupNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * The List operation gets information about the vaults associated with the subscription and within the specified resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<Vault> object + */ + public Observable> listByResourceGroupNextAsync(final String nextPageLink) { + return listByResourceGroupNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * The List operation gets information about the vaults associated with the subscription and within the specified resource group. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<Vault> object + */ + public Observable>> listByResourceGroupNextWithServiceResponseAsync(final String nextPageLink) { + return listByResourceGroupNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listByResourceGroupNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * The List operation gets information about the vaults associated with the subscription and within the specified resource group. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<Vault> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listByResourceGroupNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listByResourceGroupNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listByResourceGroupNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listByResourceGroupNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * The List operation gets information about the vaults associated with the subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<Resource> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * The List operation gets information about the vaults associated with the subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * The List operation gets information about the vaults associated with the subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<Resource> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * The List operation gets information about the vaults associated with the subscription. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<Resource> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * The List operation gets information about the vaults associated with the subscription. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<Resource> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/implementation/package-info.java b/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/implementation/package-info.java new file mode 100644 index 0000000000000..1d9ff16b0582b --- /dev/null +++ b/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/implementation/package-info.java @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * This package contains the implementation classes for KeyVaultManagementClient. + * The Azure management API provides a RESTful set of web services that interact with Azure Key Vault. + */ +package com.microsoft.azure.management.keyvault.v2015_06_01.implementation; diff --git a/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/models/AccessPolicyEntry.java b/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/models/AccessPolicyEntry.java new file mode 100644 index 0000000000000..ac9d5318df52e --- /dev/null +++ b/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/models/AccessPolicyEntry.java @@ -0,0 +1,126 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.keyvault.v2015_06_01.models; + +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * An identity that have access to the key vault. All identities in the array + * must use the same tenant ID as the key vault's tenant ID. + */ +public class AccessPolicyEntry { + /** + * The Azure Active Directory tenant ID that should be used for + * authenticating requests to the key vault. + */ + @JsonProperty(value = "tenantId", required = true) + private UUID tenantId; + + /** + * The object ID of a user, service principal or security group in the + * Azure Active Directory tenant for the vault. The object ID must be + * unique for the list of access policies. + */ + @JsonProperty(value = "objectId", required = true) + private String objectId; + + /** + * Application ID of the client making request on behalf of a principal. + */ + @JsonProperty(value = "applicationId") + private UUID applicationId; + + /** + * Permissions the identity has for keys, secrets and certificates. + */ + @JsonProperty(value = "permissions", required = true) + private Permissions permissions; + + /** + * Get the Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. + * + * @return the tenantId value + */ + public UUID tenantId() { + return this.tenantId; + } + + /** + * Set the Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. + * + * @param tenantId the tenantId value to set + * @return the AccessPolicyEntry object itself. + */ + public AccessPolicyEntry withTenantId(UUID tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Get the object ID of a user, service principal or security group in the Azure Active Directory tenant for the vault. The object ID must be unique for the list of access policies. + * + * @return the objectId value + */ + public String objectId() { + return this.objectId; + } + + /** + * Set the object ID of a user, service principal or security group in the Azure Active Directory tenant for the vault. The object ID must be unique for the list of access policies. + * + * @param objectId the objectId value to set + * @return the AccessPolicyEntry object itself. + */ + public AccessPolicyEntry withObjectId(String objectId) { + this.objectId = objectId; + return this; + } + + /** + * Get application ID of the client making request on behalf of a principal. + * + * @return the applicationId value + */ + public UUID applicationId() { + return this.applicationId; + } + + /** + * Set application ID of the client making request on behalf of a principal. + * + * @param applicationId the applicationId value to set + * @return the AccessPolicyEntry object itself. + */ + public AccessPolicyEntry withApplicationId(UUID applicationId) { + this.applicationId = applicationId; + return this; + } + + /** + * Get permissions the identity has for keys, secrets and certificates. + * + * @return the permissions value + */ + public Permissions permissions() { + return this.permissions; + } + + /** + * Set permissions the identity has for keys, secrets and certificates. + * + * @param permissions the permissions value to set + * @return the AccessPolicyEntry object itself. + */ + public AccessPolicyEntry withPermissions(Permissions permissions) { + this.permissions = permissions; + return this; + } + +} diff --git a/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/models/CertificatePermissions.java b/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/models/CertificatePermissions.java new file mode 100644 index 0000000000000..305b79d2db722 --- /dev/null +++ b/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/models/CertificatePermissions.java @@ -0,0 +1,80 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.keyvault.v2015_06_01.models; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for CertificatePermissions. + */ +public final class CertificatePermissions extends ExpandableStringEnum { + /** Static value all for CertificatePermissions. */ + public static final CertificatePermissions ALL = fromString("all"); + + /** Static value get for CertificatePermissions. */ + public static final CertificatePermissions GET = fromString("get"); + + /** Static value list for CertificatePermissions. */ + public static final CertificatePermissions LIST = fromString("list"); + + /** Static value delete for CertificatePermissions. */ + public static final CertificatePermissions DELETE = fromString("delete"); + + /** Static value create for CertificatePermissions. */ + public static final CertificatePermissions CREATE = fromString("create"); + + /** Static value import for CertificatePermissions. */ + public static final CertificatePermissions IMPORT = fromString("import"); + + /** Static value update for CertificatePermissions. */ + public static final CertificatePermissions UPDATE = fromString("update"); + + /** Static value managecontacts for CertificatePermissions. */ + public static final CertificatePermissions MANAGECONTACTS = fromString("managecontacts"); + + /** Static value getissuers for CertificatePermissions. */ + public static final CertificatePermissions GETISSUERS = fromString("getissuers"); + + /** Static value listissuers for CertificatePermissions. */ + public static final CertificatePermissions LISTISSUERS = fromString("listissuers"); + + /** Static value setissuers for CertificatePermissions. */ + public static final CertificatePermissions SETISSUERS = fromString("setissuers"); + + /** Static value deleteissuers for CertificatePermissions. */ + public static final CertificatePermissions DELETEISSUERS = fromString("deleteissuers"); + + /** Static value manageissuers for CertificatePermissions. */ + public static final CertificatePermissions MANAGEISSUERS = fromString("manageissuers"); + + /** Static value recover for CertificatePermissions. */ + public static final CertificatePermissions RECOVER = fromString("recover"); + + /** Static value purge for CertificatePermissions. */ + public static final CertificatePermissions PURGE = fromString("purge"); + + /** + * Creates or finds a CertificatePermissions from its string representation. + * @param name a name to look for + * @return the corresponding CertificatePermissions + */ + @JsonCreator + public static CertificatePermissions fromString(String name) { + return fromString(name, CertificatePermissions.class); + } + + /** + * @return known CertificatePermissions values + */ + public static Collection values() { + return values(CertificatePermissions.class); + } +} diff --git a/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/models/KeyPermissions.java b/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/models/KeyPermissions.java new file mode 100644 index 0000000000000..ae2cf9845e272 --- /dev/null +++ b/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/models/KeyPermissions.java @@ -0,0 +1,86 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.keyvault.v2015_06_01.models; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for KeyPermissions. + */ +public final class KeyPermissions extends ExpandableStringEnum { + /** Static value all for KeyPermissions. */ + public static final KeyPermissions ALL = fromString("all"); + + /** Static value encrypt for KeyPermissions. */ + public static final KeyPermissions ENCRYPT = fromString("encrypt"); + + /** Static value decrypt for KeyPermissions. */ + public static final KeyPermissions DECRYPT = fromString("decrypt"); + + /** Static value wrapKey for KeyPermissions. */ + public static final KeyPermissions WRAP_KEY = fromString("wrapKey"); + + /** Static value unwrapKey for KeyPermissions. */ + public static final KeyPermissions UNWRAP_KEY = fromString("unwrapKey"); + + /** Static value sign for KeyPermissions. */ + public static final KeyPermissions SIGN = fromString("sign"); + + /** Static value verify for KeyPermissions. */ + public static final KeyPermissions VERIFY = fromString("verify"); + + /** Static value get for KeyPermissions. */ + public static final KeyPermissions GET = fromString("get"); + + /** Static value list for KeyPermissions. */ + public static final KeyPermissions LIST = fromString("list"); + + /** Static value create for KeyPermissions. */ + public static final KeyPermissions CREATE = fromString("create"); + + /** Static value update for KeyPermissions. */ + public static final KeyPermissions UPDATE = fromString("update"); + + /** Static value import for KeyPermissions. */ + public static final KeyPermissions IMPORT = fromString("import"); + + /** Static value delete for KeyPermissions. */ + public static final KeyPermissions DELETE = fromString("delete"); + + /** Static value backup for KeyPermissions. */ + public static final KeyPermissions BACKUP = fromString("backup"); + + /** Static value restore for KeyPermissions. */ + public static final KeyPermissions RESTORE = fromString("restore"); + + /** Static value recover for KeyPermissions. */ + public static final KeyPermissions RECOVER = fromString("recover"); + + /** Static value purge for KeyPermissions. */ + public static final KeyPermissions PURGE = fromString("purge"); + + /** + * Creates or finds a KeyPermissions from its string representation. + * @param name a name to look for + * @return the corresponding KeyPermissions + */ + @JsonCreator + public static KeyPermissions fromString(String name) { + return fromString(name, KeyPermissions.class); + } + + /** + * @return known KeyPermissions values + */ + public static Collection values() { + return values(KeyPermissions.class); + } +} diff --git a/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/models/PageImpl.java b/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/models/PageImpl.java new file mode 100644 index 0000000000000..3f4373a770451 --- /dev/null +++ b/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/models/PageImpl.java @@ -0,0 +1,75 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.keyvault.v2015_06_01.models; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.Page; +import java.util.List; + +/** + * An instance of this class defines a page of Azure resources and a link to + * get the next page of resources, if any. + * + * @param type of Azure resource + */ +public class PageImpl implements Page { + /** + * The link to the next page. + */ + @JsonProperty("nextLink") + private String nextPageLink; + + /** + * The list of items. + */ + @JsonProperty("value") + private List items; + + /** + * Gets the link to the next page. + * + * @return the link to the next page. + */ + @Override + public String nextPageLink() { + return this.nextPageLink; + } + + /** + * Gets the list of items. + * + * @return the list of items in {@link List}. + */ + @Override + public List items() { + return items; + } + + /** + * Sets the link to the next page. + * + * @param nextPageLink the link to the next page. + * @return this Page object itself. + */ + public PageImpl setNextPageLink(String nextPageLink) { + this.nextPageLink = nextPageLink; + return this; + } + + /** + * Sets the list of items. + * + * @param items the list of items in {@link List}. + * @return this Page object itself. + */ + public PageImpl setItems(List items) { + this.items = items; + return this; + } +} diff --git a/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/models/Permissions.java b/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/models/Permissions.java new file mode 100644 index 0000000000000..1e846e07a808e --- /dev/null +++ b/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/models/Permissions.java @@ -0,0 +1,96 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.keyvault.v2015_06_01.models; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Permissions the identity has for keys, secrets and certificates. + */ +public class Permissions { + /** + * Permissions to keys. + */ + @JsonProperty(value = "keys") + private List keys; + + /** + * Permissions to secrets. + */ + @JsonProperty(value = "secrets") + private List secrets; + + /** + * Permissions to certificates. + */ + @JsonProperty(value = "certificates") + private List certificates; + + /** + * Get permissions to keys. + * + * @return the keys value + */ + public List keys() { + return this.keys; + } + + /** + * Set permissions to keys. + * + * @param keys the keys value to set + * @return the Permissions object itself. + */ + public Permissions withKeys(List keys) { + this.keys = keys; + return this; + } + + /** + * Get permissions to secrets. + * + * @return the secrets value + */ + public List secrets() { + return this.secrets; + } + + /** + * Set permissions to secrets. + * + * @param secrets the secrets value to set + * @return the Permissions object itself. + */ + public Permissions withSecrets(List secrets) { + this.secrets = secrets; + return this; + } + + /** + * Get permissions to certificates. + * + * @return the certificates value + */ + public List certificates() { + return this.certificates; + } + + /** + * Set permissions to certificates. + * + * @param certificates the certificates value to set + * @return the Permissions object itself. + */ + public Permissions withCertificates(List certificates) { + this.certificates = certificates; + return this; + } + +} diff --git a/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/models/SecretPermissions.java b/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/models/SecretPermissions.java new file mode 100644 index 0000000000000..712a7dfe9cd94 --- /dev/null +++ b/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/models/SecretPermissions.java @@ -0,0 +1,62 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.keyvault.v2015_06_01.models; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for SecretPermissions. + */ +public final class SecretPermissions extends ExpandableStringEnum { + /** Static value all for SecretPermissions. */ + public static final SecretPermissions ALL = fromString("all"); + + /** Static value get for SecretPermissions. */ + public static final SecretPermissions GET = fromString("get"); + + /** Static value list for SecretPermissions. */ + public static final SecretPermissions LIST = fromString("list"); + + /** Static value set for SecretPermissions. */ + public static final SecretPermissions SET = fromString("set"); + + /** Static value delete for SecretPermissions. */ + public static final SecretPermissions DELETE = fromString("delete"); + + /** Static value backup for SecretPermissions. */ + public static final SecretPermissions BACKUP = fromString("backup"); + + /** Static value restore for SecretPermissions. */ + public static final SecretPermissions RESTORE = fromString("restore"); + + /** Static value recover for SecretPermissions. */ + public static final SecretPermissions RECOVER = fromString("recover"); + + /** Static value purge for SecretPermissions. */ + public static final SecretPermissions PURGE = fromString("purge"); + + /** + * Creates or finds a SecretPermissions from its string representation. + * @param name a name to look for + * @return the corresponding SecretPermissions + */ + @JsonCreator + public static SecretPermissions fromString(String name) { + return fromString(name, SecretPermissions.class); + } + + /** + * @return known SecretPermissions values + */ + public static Collection values() { + return values(SecretPermissions.class); + } +} diff --git a/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/models/Sku.java b/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/models/Sku.java new file mode 100644 index 0000000000000..354415317e6e7 --- /dev/null +++ b/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/models/Sku.java @@ -0,0 +1,78 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.keyvault.v2015_06_01.models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * SKU details. + */ +public class Sku { + /** + * SKU family name. + */ + @JsonProperty(value = "family", required = true) + private String family; + + /** + * SKU name to specify whether the key vault is a standard vault or a + * premium vault. Possible values include: 'standard', 'premium'. + */ + @JsonProperty(value = "name", required = true) + private SkuName name; + + /** + * Creates an instance of Sku class. + * @param name sKU name to specify whether the key vault is a standard vault or a premium vault. Possible values include: 'standard', 'premium'. + */ + public Sku() { + family = "A"; + } + + /** + * Get sKU family name. + * + * @return the family value + */ + public String family() { + return this.family; + } + + /** + * Set sKU family name. + * + * @param family the family value to set + * @return the Sku object itself. + */ + public Sku withFamily(String family) { + this.family = family; + return this; + } + + /** + * Get sKU name to specify whether the key vault is a standard vault or a premium vault. Possible values include: 'standard', 'premium'. + * + * @return the name value + */ + public SkuName name() { + return this.name; + } + + /** + * Set sKU name to specify whether the key vault is a standard vault or a premium vault. Possible values include: 'standard', 'premium'. + * + * @param name the name value to set + * @return the Sku object itself. + */ + public Sku withName(SkuName name) { + this.name = name; + return this; + } + +} diff --git a/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/models/SkuName.java b/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/models/SkuName.java new file mode 100644 index 0000000000000..3567128f1eecc --- /dev/null +++ b/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/models/SkuName.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.keyvault.v2015_06_01.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for SkuName. + */ +public enum SkuName { + /** Enum value standard. */ + STANDARD("standard"), + + /** Enum value premium. */ + PREMIUM("premium"); + + /** The actual serialized value for a SkuName instance. */ + private String value; + + SkuName(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a SkuName instance. + * + * @param value the serialized value to parse. + * @return the parsed SkuName object, or null if unable to parse. + */ + @JsonCreator + public static SkuName fromString(String value) { + SkuName[] items = SkuName.values(); + for (SkuName item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/models/Vault.java b/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/models/Vault.java new file mode 100644 index 0000000000000..5cce6f86ee906 --- /dev/null +++ b/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/models/Vault.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.keyvault.v2015_06_01.models; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.Resource; + +/** + * Resource information with extended details. + */ +public class Vault extends Resource { + /** + * Properties of the vault. + */ + @JsonProperty(value = "properties", required = true) + private VaultProperties properties; + + /** + * The name of the key vault. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /** + * Get properties of the vault. + * + * @return the properties value + */ + public VaultProperties properties() { + return this.properties; + } + + /** + * Set properties of the vault. + * + * @param properties the properties value to set + * @return the Vault object itself. + */ + public Vault withProperties(VaultProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the name of the key vault. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set the name of the key vault. + * + * @param name the name value to set + * @return the Vault object itself. + */ + public Vault withName(String name) { + this.name = name; + return this; + } + +} diff --git a/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/models/VaultCreateOrUpdateParameters.java b/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/models/VaultCreateOrUpdateParameters.java new file mode 100644 index 0000000000000..5fc1a977d14a3 --- /dev/null +++ b/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/models/VaultCreateOrUpdateParameters.java @@ -0,0 +1,96 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.keyvault.v2015_06_01.models; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Parameters for creating or updating a vault. + */ +public class VaultCreateOrUpdateParameters { + /** + * The supported Azure location where the key vault should be created. + */ + @JsonProperty(value = "location", required = true) + private String location; + + /** + * The tags that will be assigned to the key vault. + */ + @JsonProperty(value = "tags") + private Map tags; + + /** + * Properties of the vault. + */ + @JsonProperty(value = "properties", required = true) + private VaultProperties properties; + + /** + * Get the supported Azure location where the key vault should be created. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Set the supported Azure location where the key vault should be created. + * + * @param location the location value to set + * @return the VaultCreateOrUpdateParameters object itself. + */ + public VaultCreateOrUpdateParameters withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the tags that will be assigned to the key vault. + * + * @return the tags value + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags that will be assigned to the key vault. + * + * @param tags the tags value to set + * @return the VaultCreateOrUpdateParameters object itself. + */ + public VaultCreateOrUpdateParameters withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get properties of the vault. + * + * @return the properties value + */ + public VaultProperties properties() { + return this.properties; + } + + /** + * Set properties of the vault. + * + * @param properties the properties value to set + * @return the VaultCreateOrUpdateParameters object itself. + */ + public VaultCreateOrUpdateParameters withProperties(VaultProperties properties) { + this.properties = properties; + return this; + } + +} diff --git a/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/models/VaultProperties.java b/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/models/VaultProperties.java new file mode 100644 index 0000000000000..9e8145245cc80 --- /dev/null +++ b/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/models/VaultProperties.java @@ -0,0 +1,234 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.keyvault.v2015_06_01.models; + +import java.util.UUID; +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Properties of the vault. + */ +public class VaultProperties { + /** + * The URI of the vault for performing operations on keys and secrets. + */ + @JsonProperty(value = "vaultUri") + private String vaultUri; + + /** + * The Azure Active Directory tenant ID that should be used for + * authenticating requests to the key vault. + */ + @JsonProperty(value = "tenantId", required = true) + private UUID tenantId; + + /** + * SKU details. + */ + @JsonProperty(value = "sku", required = true) + private Sku sku; + + /** + * An array of 0 to 16 identities that have access to the key vault. All + * identities in the array must use the same tenant ID as the key vault's + * tenant ID. + */ + @JsonProperty(value = "accessPolicies", required = true) + private List accessPolicies; + + /** + * Property to specify whether Azure Virtual Machines are permitted to + * retrieve certificates stored as secrets from the key vault. + */ + @JsonProperty(value = "enabledForDeployment") + private Boolean enabledForDeployment; + + /** + * Property to specify whether Azure Disk Encryption is permitted to + * retrieve secrets from the vault and unwrap keys. + */ + @JsonProperty(value = "enabledForDiskEncryption") + private Boolean enabledForDiskEncryption; + + /** + * Property to specify whether Azure Resource Manager is permitted to + * retrieve secrets from the key vault. + */ + @JsonProperty(value = "enabledForTemplateDeployment") + private Boolean enabledForTemplateDeployment; + + /** + * Property to specify whether the 'soft delete' functionality is enabled + * for this key vault. + */ + @JsonProperty(value = "enableSoftDelete") + private Boolean enableSoftDelete; + + /** + * Get the URI of the vault for performing operations on keys and secrets. + * + * @return the vaultUri value + */ + public String vaultUri() { + return this.vaultUri; + } + + /** + * Set the URI of the vault for performing operations on keys and secrets. + * + * @param vaultUri the vaultUri value to set + * @return the VaultProperties object itself. + */ + public VaultProperties withVaultUri(String vaultUri) { + this.vaultUri = vaultUri; + return this; + } + + /** + * Get the Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. + * + * @return the tenantId value + */ + public UUID tenantId() { + return this.tenantId; + } + + /** + * Set the Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. + * + * @param tenantId the tenantId value to set + * @return the VaultProperties object itself. + */ + public VaultProperties withTenantId(UUID tenantId) { + this.tenantId = tenantId; + return this; + } + + /** + * Get sKU details. + * + * @return the sku value + */ + public Sku sku() { + return this.sku; + } + + /** + * Set sKU details. + * + * @param sku the sku value to set + * @return the VaultProperties object itself. + */ + public VaultProperties withSku(Sku sku) { + this.sku = sku; + return this; + } + + /** + * Get an array of 0 to 16 identities that have access to the key vault. All identities in the array must use the same tenant ID as the key vault's tenant ID. + * + * @return the accessPolicies value + */ + public List accessPolicies() { + return this.accessPolicies; + } + + /** + * Set an array of 0 to 16 identities that have access to the key vault. All identities in the array must use the same tenant ID as the key vault's tenant ID. + * + * @param accessPolicies the accessPolicies value to set + * @return the VaultProperties object itself. + */ + public VaultProperties withAccessPolicies(List accessPolicies) { + this.accessPolicies = accessPolicies; + return this; + } + + /** + * Get property to specify whether Azure Virtual Machines are permitted to retrieve certificates stored as secrets from the key vault. + * + * @return the enabledForDeployment value + */ + public Boolean enabledForDeployment() { + return this.enabledForDeployment; + } + + /** + * Set property to specify whether Azure Virtual Machines are permitted to retrieve certificates stored as secrets from the key vault. + * + * @param enabledForDeployment the enabledForDeployment value to set + * @return the VaultProperties object itself. + */ + public VaultProperties withEnabledForDeployment(Boolean enabledForDeployment) { + this.enabledForDeployment = enabledForDeployment; + return this; + } + + /** + * Get property to specify whether Azure Disk Encryption is permitted to retrieve secrets from the vault and unwrap keys. + * + * @return the enabledForDiskEncryption value + */ + public Boolean enabledForDiskEncryption() { + return this.enabledForDiskEncryption; + } + + /** + * Set property to specify whether Azure Disk Encryption is permitted to retrieve secrets from the vault and unwrap keys. + * + * @param enabledForDiskEncryption the enabledForDiskEncryption value to set + * @return the VaultProperties object itself. + */ + public VaultProperties withEnabledForDiskEncryption(Boolean enabledForDiskEncryption) { + this.enabledForDiskEncryption = enabledForDiskEncryption; + return this; + } + + /** + * Get property to specify whether Azure Resource Manager is permitted to retrieve secrets from the key vault. + * + * @return the enabledForTemplateDeployment value + */ + public Boolean enabledForTemplateDeployment() { + return this.enabledForTemplateDeployment; + } + + /** + * Set property to specify whether Azure Resource Manager is permitted to retrieve secrets from the key vault. + * + * @param enabledForTemplateDeployment the enabledForTemplateDeployment value to set + * @return the VaultProperties object itself. + */ + public VaultProperties withEnabledForTemplateDeployment(Boolean enabledForTemplateDeployment) { + this.enabledForTemplateDeployment = enabledForTemplateDeployment; + return this; + } + + /** + * Get property to specify whether the 'soft delete' functionality is enabled for this key vault. + * + * @return the enableSoftDelete value + */ + public Boolean enableSoftDelete() { + return this.enableSoftDelete; + } + + /** + * Set property to specify whether the 'soft delete' functionality is enabled for this key vault. + * + * @param enableSoftDelete the enableSoftDelete value to set + * @return the VaultProperties object itself. + */ + public VaultProperties withEnableSoftDelete(Boolean enableSoftDelete) { + this.enableSoftDelete = enableSoftDelete; + return this; + } + +} diff --git a/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/models/package-info.java b/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/models/package-info.java new file mode 100644 index 0000000000000..330de6316b6ee --- /dev/null +++ b/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/models/package-info.java @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * This package contains the models classes for KeyVaultManagementClient. + * The Azure management API provides a RESTful set of web services that interact with Azure Key Vault. + */ +package com.microsoft.azure.management.keyvault.v2015_06_01.models; diff --git a/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/package-info.java b/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/package-info.java new file mode 100644 index 0000000000000..3e37e98a74adf --- /dev/null +++ b/sdk/keyvault/mgmt-v2015_06_01/src/main/java/com/microsoft/azure/management/keyvault/v20150601/package-info.java @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. + +/** + * This package contains the classes for KeyVaultManagementClient. + * The Azure management API provides a RESTful set of web services that interact with Azure Key Vault. + */ +package com.microsoft.azure.management.keyvault.v2015_06_01;