Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generated from 4fc66143dc4cc3dfdbe68043634950b31377f2ae
Browse files Browse the repository at this point in the history
Merge branch 'master' of https://github.com/Azure/azure-rest-api-specs into keyvault_multiapi_readme

* 'master' of https://github.com/Azure/azure-rest-api-specs: (101 commits)
  add cli.md for automation (Azure#8411)
  adjust assignment (Azure#8782)
  Remove Microsoft.Backup.Admin 2016-05-01 API version (Azure#8588)
  Updating global setting in PostgreSQL/MySQL readme file (Azure#8777)
  update package name and output folder in readme.typescript.md (Azure#8764)
  add package-2019-12 python define (Azure#8769)
  Fix Parameter Description for validate resource move (Azure#8524)
  Edit pass for GA swagger (Azure#8759)
  Update proxy.json (Azure#8596)
  Model enums that may change in the future as strings (Azure#8760)
  Add api-version 2019-11-01 for resources/subscriptions (Azure#8728)
  regenerated all-api-versions
  PrivateLinkResources for Microsoft.Automation (Azure#8369)
  add cli.md for serialconsole (Azure#8401)
  add cli.md for mariadb (Azure#8466)
  [Computer Vision] Create CV API v3.0-preview (Azure#7402)
  Publish Microsoft.ContainerService api-version 2020-03-01 (Azure#8756)
  Update swagger based on auto-gen process change. (Azure#8766)
  add assignment-bot config (Azure#8716)
  add tag package-2019-12 to batch (Azure#8751)
  ...
SDK Automation committed Mar 24, 2020
1 parent 366ee36 commit 96de7e3
Showing 37 changed files with 6,249 additions and 30 deletions.
41 changes: 11 additions & 30 deletions sdk/keyvault/mgmt-v2016_10_01/pom.xml
Original file line number Diff line number Diff line change
@@ -7,19 +7,13 @@
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.microsoft.azure.keyvault.v2016_10_01</groupId>
<parent>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-arm-parent</artifactId>
<version>1.3.0</version>
<relativePath>../../../pom.management.xml</relativePath>
</parent>
<artifactId>azure-mgmt-keyvault</artifactId>
<version>1.0.0-beta-2</version>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-keyvault</artifactId>
<version>1.7.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Microsoft Azure SDK for KeyVault Management</name>
<description>This package contains Microsoft KeyVault Management SDK.</description>
<url>https://github.com/Azure/azure-libraries-for-java</url>
<name>Microsoft Azure SDK for KeyVault</name>
<description>This package contains Microsoft KeyVault SDK.</description>
<url>https://github.com/Azure/azure-sdk-for-java</url>
<licenses>
<license>
<name>The MIT License (MIT)</name>
@@ -28,8 +22,8 @@
</license>
</licenses>
<scm>
<url>scm:git:https://github.com/Azure/azure-libraries-for-java</url>
<connection>scm:git:[email protected]:Azure/azure-libraries-for-java.git</connection>
<url>scm:git:https://github.com/Azure/azure-sdk-for-java</url>
<connection>scm:git:[email protected]:Azure/azure-sdk-for-java.git</connection>
<tag>HEAD</tag>
</scm>
<properties>
@@ -46,33 +40,20 @@
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-client-runtime</artifactId>
</dependency>
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-arm-client-runtime</artifactId>
<version>1.5.3</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-client-authentication</artifactId>
<version>1.5.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-mgmt-resources</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-arm-client-runtime</artifactId>
<type>test-jar</type>
<scope>test</scope>
<version>1.6.5</version>
</dependency>
</dependencies>
<build>
<plugins>
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
/**
* 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.v2016_10_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 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 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();

/**
* Gets the Operations object to access its operations.
* @return the Operations object.
*/
Operations operations();

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
/**
* 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.v2016_10_01;

import com.microsoft.azure.CloudException;
import com.microsoft.azure.ListOperationCallback;
import com.microsoft.azure.management.keyvault.v20161001.models.Operation;
import com.microsoft.azure.Page;
import com.microsoft.azure.PagedList;
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 Operations.
*/
public interface Operations {
/**
* Lists all of the available Key Vault Rest API operations.
*
* @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&lt;Operation&gt; object if successful.
*/
PagedList<Operation> list();

/**
* Lists all of the available Key Vault Rest API operations.
*
* @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<List<Operation>> listAsync(final ListOperationCallback<Operation> serviceCallback);

/**
* Lists all of the available Key Vault Rest API operations.
*
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList&lt;Operation&gt; object
*/
Observable<Page<Operation>> listAsync();

/**
* Lists all of the available Key Vault Rest API operations.
*
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList&lt;Operation&gt; object
*/
Observable<ServiceResponse<Page<Operation>>> listWithServiceResponseAsync();

/**
* Lists all of the available Key Vault Rest API operations.
*
* @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&lt;Operation&gt; object if successful.
*/
PagedList<Operation> listNext(final String nextPageLink);

/**
* Lists all of the available Key Vault Rest API operations.
*
* @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<List<Operation>> listNextAsync(final String nextPageLink, final ServiceFuture<List<Operation>> serviceFuture, final ListOperationCallback<Operation> serviceCallback);

/**
* Lists all of the available Key Vault Rest API operations.
*
* @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&lt;Operation&gt; object
*/
Observable<Page<Operation>> listNextAsync(final String nextPageLink);

/**
* Lists all of the available Key Vault Rest API operations.
*
* @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&lt;Operation&gt; object
*/
Observable<ServiceResponse<Page<Operation>>> listNextWithServiceResponseAsync(final String nextPageLink);

}

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,213 @@
/**
* 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.v2016_10_01.implementation;

import com.microsoft.azure.AzureClient;
import com.microsoft.azure.AzureServiceClient;
import com.microsoft.azure.management.keyvault.v20161001.KeyVaultManagementClient;
import com.microsoft.azure.management.keyvault.v20161001.Operations;
import com.microsoft.azure.management.keyvault.v20161001.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;
}

/** Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. */
private String subscriptionId;

/**
* 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 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;
}

/**
* The Operations object to access its operations.
*/
private Operations operations;

/**
* Gets the Operations object to access its operations.
* @return the Operations object.
*/
public Operations operations() {
return this.operations;
}

/**
* 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 = "2016-10-01";
this.acceptLanguage = "en-US";
this.longRunningOperationRetryTimeout = 30;
this.generateClientRequestId = true;
this.vaults = new VaultsImpl(restClient().retrofit(), this);
this.operations = new OperationsImpl(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", "2016-10-01");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,286 @@
/**
* 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.v2016_10_01.implementation;

import retrofit2.Retrofit;
import com.microsoft.azure.management.keyvault.v20161001.Operations;
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.v20161001.models.Operation;
import com.microsoft.azure.management.keyvault.v20161001.models.PageImpl;
import com.microsoft.azure.Page;
import com.microsoft.azure.PagedList;
import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.ServiceResponse;
import java.io.IOException;
import java.util.List;
import okhttp3.ResponseBody;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.Headers;
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 Operations.
*/
public class OperationsImpl implements Operations {
/** The Retrofit service to perform REST calls. */
private OperationsService service;
/** The service client containing this operation class. */
private KeyVaultManagementClientImpl client;

/**
* Initializes an instance of OperationsImpl.
*
* @param retrofit the Retrofit instance built from a Retrofit Builder.
* @param client the instance of the service client containing this operation class.
*/
public OperationsImpl(Retrofit retrofit, KeyVaultManagementClientImpl client) {
this.service = retrofit.create(OperationsService.class);
this.client = client;
}

/**
* The interface defining all the services for Operations to be
* used by Retrofit to perform actually REST calls.
*/
interface OperationsService {
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.keyvault.v20161001.Operations list" })
@GET("providers/Microsoft.KeyVault/operations")
Observable<Response<ResponseBody>> list(@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.v20161001.Operations listNext" })
@GET
Observable<Response<ResponseBody>> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);

}

/**
* Lists all of the available Key Vault Rest API operations.
*
* @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&lt;Operation&gt; object if successful.
*/
public PagedList<Operation> list() {
ServiceResponse<Page<Operation>> response = listSinglePageAsync().toBlocking().single();
return new PagedList<Operation>(response.body()) {
@Override
public Page<Operation> nextPage(String nextPageLink) {
return listNextSinglePageAsync(nextPageLink).toBlocking().single().body();
}
};
}

/**
* Lists all of the available Key Vault Rest API operations.
*
* @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<List<Operation>> listAsync(final ListOperationCallback<Operation> serviceCallback) {
return AzureServiceFuture.fromPageResponse(
listSinglePageAsync(),
new Func1<String, Observable<ServiceResponse<Page<Operation>>>>() {
@Override
public Observable<ServiceResponse<Page<Operation>>> call(String nextPageLink) {
return listNextSinglePageAsync(nextPageLink);
}
},
serviceCallback);
}

/**
* Lists all of the available Key Vault Rest API operations.
*
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList&lt;Operation&gt; object
*/
public Observable<Page<Operation>> listAsync() {
return listWithServiceResponseAsync()
.map(new Func1<ServiceResponse<Page<Operation>>, Page<Operation>>() {
@Override
public Page<Operation> call(ServiceResponse<Page<Operation>> response) {
return response.body();
}
});
}

/**
* Lists all of the available Key Vault Rest API operations.
*
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList&lt;Operation&gt; object
*/
public Observable<ServiceResponse<Page<Operation>>> listWithServiceResponseAsync() {
return listSinglePageAsync()
.concatMap(new Func1<ServiceResponse<Page<Operation>>, Observable<ServiceResponse<Page<Operation>>>>() {
@Override
public Observable<ServiceResponse<Page<Operation>>> call(ServiceResponse<Page<Operation>> page) {
String nextPageLink = page.body().nextPageLink();
if (nextPageLink == null) {
return Observable.just(page);
}
return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink));
}
});
}

/**
* Lists all of the available Key Vault Rest API operations.
*
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the PagedList&lt;Operation&gt; object wrapped in {@link ServiceResponse} if successful.
*/
public Observable<ServiceResponse<Page<Operation>>> listSinglePageAsync() {
if (this.client.apiVersion() == null) {
throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
}
return service.list(this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<Operation>>>>() {
@Override
public Observable<ServiceResponse<Page<Operation>>> call(Response<ResponseBody> response) {
try {
ServiceResponse<PageImpl<Operation>> result = listDelegate(response);
return Observable.just(new ServiceResponse<Page<Operation>>(result.body(), result.response()));
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}

private ServiceResponse<PageImpl<Operation>> listDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<PageImpl<Operation>, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<PageImpl<Operation>>() { }.getType())
.registerError(CloudException.class)
.build(response);
}

/**
* Lists all of the available Key Vault Rest API operations.
*
* @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&lt;Operation&gt; object if successful.
*/
public PagedList<Operation> listNext(final String nextPageLink) {
ServiceResponse<Page<Operation>> response = listNextSinglePageAsync(nextPageLink).toBlocking().single();
return new PagedList<Operation>(response.body()) {
@Override
public Page<Operation> nextPage(String nextPageLink) {
return listNextSinglePageAsync(nextPageLink).toBlocking().single().body();
}
};
}

/**
* Lists all of the available Key Vault Rest API operations.
*
* @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<List<Operation>> listNextAsync(final String nextPageLink, final ServiceFuture<List<Operation>> serviceFuture, final ListOperationCallback<Operation> serviceCallback) {
return AzureServiceFuture.fromPageResponse(
listNextSinglePageAsync(nextPageLink),
new Func1<String, Observable<ServiceResponse<Page<Operation>>>>() {
@Override
public Observable<ServiceResponse<Page<Operation>>> call(String nextPageLink) {
return listNextSinglePageAsync(nextPageLink);
}
},
serviceCallback);
}

/**
* Lists all of the available Key Vault Rest API operations.
*
* @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&lt;Operation&gt; object
*/
public Observable<Page<Operation>> listNextAsync(final String nextPageLink) {
return listNextWithServiceResponseAsync(nextPageLink)
.map(new Func1<ServiceResponse<Page<Operation>>, Page<Operation>>() {
@Override
public Page<Operation> call(ServiceResponse<Page<Operation>> response) {
return response.body();
}
});
}

/**
* Lists all of the available Key Vault Rest API operations.
*
* @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&lt;Operation&gt; object
*/
public Observable<ServiceResponse<Page<Operation>>> listNextWithServiceResponseAsync(final String nextPageLink) {
return listNextSinglePageAsync(nextPageLink)
.concatMap(new Func1<ServiceResponse<Page<Operation>>, Observable<ServiceResponse<Page<Operation>>>>() {
@Override
public Observable<ServiceResponse<Page<Operation>>> call(ServiceResponse<Page<Operation>> page) {
String nextPageLink = page.body().nextPageLink();
if (nextPageLink == null) {
return Observable.just(page);
}
return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink));
}
});
}

/**
* Lists all of the available Key Vault Rest API operations.
*
ServiceResponse<PageImpl<Operation>> * @param nextPageLink The NextLink from the previous successful call to List operation.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the PagedList&lt;Operation&gt; object wrapped in {@link ServiceResponse} if successful.
*/
public Observable<ServiceResponse<Page<Operation>>> 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<Response<ResponseBody>, Observable<ServiceResponse<Page<Operation>>>>() {
@Override
public Observable<ServiceResponse<Page<Operation>>> call(Response<ResponseBody> response) {
try {
ServiceResponse<PageImpl<Operation>> result = listNextDelegate(response);
return Observable.just(new ServiceResponse<Page<Operation>>(result.body(), result.response()));
} catch (Throwable t) {
return Observable.error(t);
}
}
});
}

private ServiceResponse<PageImpl<Operation>> listNextDelegate(Response<ResponseBody> response) throws CloudException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().<PageImpl<Operation>, CloudException>newInstance(this.client.serializerAdapter())
.register(200, new TypeToken<PageImpl<Operation>>() { }.getType())
.registerError(CloudException.class)
.build(response);
}

}

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -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.v2016_10_01.implementation;
Original file line number Diff line number Diff line change
@@ -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.v2016_10_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;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/**
* 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.v2016_10_01.models;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;

/**
* Defines values for AccessPolicyUpdateKind.
*/
public enum AccessPolicyUpdateKind {
/** Enum value add. */
ADD("add"),

/** Enum value replace. */
REPLACE("replace"),

/** Enum value remove. */
REMOVE("remove");

/** The actual serialized value for a AccessPolicyUpdateKind instance. */
private String value;

AccessPolicyUpdateKind(String value) {
this.value = value;
}

/**
* Parses a serialized value to a AccessPolicyUpdateKind instance.
*
* @param value the serialized value to parse.
* @return the parsed AccessPolicyUpdateKind object, or null if unable to parse.
*/
@JsonCreator
public static AccessPolicyUpdateKind fromString(String value) {
AccessPolicyUpdateKind[] items = AccessPolicyUpdateKind.values();
for (AccessPolicyUpdateKind item : items) {
if (item.toString().equalsIgnoreCase(value)) {
return item;
}
}
return null;
}

@JsonValue
@Override
public String toString() {
return this.value;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
/**
* 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.v2016_10_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<CertificatePermissions> {
/** 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<CertificatePermissions> values() {
return values(CertificatePermissions.class);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
/**
* 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.v2016_10_01.models;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* The CheckNameAvailability operation response.
*/
public class CheckNameAvailabilityResult {
/**
* A boolean value that indicates whether the name is available for you to
* use. If true, the name is available. If false, the name has already been
* taken or is invalid and cannot be used.
*/
@JsonProperty(value = "nameAvailable", access = JsonProperty.Access.WRITE_ONLY)
private Boolean nameAvailable;

/**
* The reason that a vault name could not be used. The Reason element is
* only returned if NameAvailable is false. Possible values include:
* 'AccountNameInvalid', 'AlreadyExists'.
*/
@JsonProperty(value = "reason", access = JsonProperty.Access.WRITE_ONLY)
private Reason reason;

/**
* An error message explaining the Reason value in more detail.
*/
@JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY)
private String message;

/**
* Get a boolean value that indicates whether the name is available for you to use. If true, the name is available. If false, the name has already been taken or is invalid and cannot be used.
*
* @return the nameAvailable value
*/
public Boolean nameAvailable() {
return this.nameAvailable;
}

/**
* Get the reason that a vault name could not be used. The Reason element is only returned if NameAvailable is false. Possible values include: 'AccountNameInvalid', 'AlreadyExists'.
*
* @return the reason value
*/
public Reason reason() {
return this.reason;
}

/**
* Get an error message explaining the Reason value in more detail.
*
* @return the message value
*/
public String message() {
return this.message;
}

}
Original file line number Diff line number Diff line change
@@ -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.v2016_10_01.models;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;

/**
* Defines values for CreateMode.
*/
public enum CreateMode {
/** Enum value recover. */
RECOVER("recover"),

/** Enum value default. */
DEFAULT("default");

/** The actual serialized value for a CreateMode instance. */
private String value;

CreateMode(String value) {
this.value = value;
}

/**
* Parses a serialized value to a CreateMode instance.
*
* @param value the serialized value to parse.
* @return the parsed CreateMode object, or null if unable to parse.
*/
@JsonCreator
public static CreateMode fromString(String value) {
CreateMode[] items = CreateMode.values();
for (CreateMode item : items) {
if (item.toString().equalsIgnoreCase(value)) {
return item;
}
}
return null;
}

@JsonValue
@Override
public String toString() {
return this.value;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
/**
* 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.v2016_10_01.models;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* Deleted vault information with extended details.
*/
public class DeletedVault {
/**
* The resource ID for the deleted key vault.
*/
@JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY)
private String id;

/**
* The name of the key vault.
*/
@JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
private String name;

/**
* The resource type of the key vault.
*/
@JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY)
private String type;

/**
* Properties of the vault.
*/
@JsonProperty(value = "properties")
private DeletedVaultProperties properties;

/**
* Get the resource ID for the deleted key vault.
*
* @return the id value
*/
public String id() {
return this.id;
}

/**
* Get the name of the key vault.
*
* @return the name value
*/
public String name() {
return this.name;
}

/**
* Get the resource type of the key vault.
*
* @return the type value
*/
public String type() {
return this.type;
}

/**
* Get properties of the vault.
*
* @return the properties value
*/
public DeletedVaultProperties properties() {
return this.properties;
}

/**
* Set properties of the vault.
*
* @param properties the properties value to set
* @return the DeletedVault object itself.
*/
public DeletedVault withProperties(DeletedVaultProperties properties) {
this.properties = properties;
return this;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
/**
* 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.v2016_10_01.models;

import org.joda.time.DateTime;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* Properties of the deleted vault.
*/
public class DeletedVaultProperties {
/**
* The resource id of the original vault.
*/
@JsonProperty(value = "vaultId", access = JsonProperty.Access.WRITE_ONLY)
private String vaultId;

/**
* The location of the original vault.
*/
@JsonProperty(value = "location", access = JsonProperty.Access.WRITE_ONLY)
private String location;

/**
* The deleted date.
*/
@JsonProperty(value = "deletionDate", access = JsonProperty.Access.WRITE_ONLY)
private DateTime deletionDate;

/**
* The scheduled purged date.
*/
@JsonProperty(value = "scheduledPurgeDate", access = JsonProperty.Access.WRITE_ONLY)
private DateTime scheduledPurgeDate;

/**
* Tags of the original vault.
*/
@JsonProperty(value = "tags", access = JsonProperty.Access.WRITE_ONLY)
private Map<String, String> tags;

/**
* Get the resource id of the original vault.
*
* @return the vaultId value
*/
public String vaultId() {
return this.vaultId;
}

/**
* Get the location of the original vault.
*
* @return the location value
*/
public String location() {
return this.location;
}

/**
* Get the deleted date.
*
* @return the deletionDate value
*/
public DateTime deletionDate() {
return this.deletionDate;
}

/**
* Get the scheduled purged date.
*
* @return the scheduledPurgeDate value
*/
public DateTime scheduledPurgeDate() {
return this.scheduledPurgeDate;
}

/**
* Get tags of the original vault.
*
* @return the tags value
*/
public Map<String, String> tags() {
return this.tags;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
/**
* 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.v2016_10_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<KeyPermissions> {
/** 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<KeyPermissions> values() {
return values(KeyPermissions.class);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
/**
* 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.v2016_10_01.models;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* Log specification of operation.
*/
public class LogSpecification {
/**
* Name of log specification.
*/
@JsonProperty(value = "name")
private String name;

/**
* Display name of log specification.
*/
@JsonProperty(value = "displayName")
private String displayName;

/**
* Blob duration of specification.
*/
@JsonProperty(value = "blobDuration")
private String blobDuration;

/**
* Get name of log specification.
*
* @return the name value
*/
public String name() {
return this.name;
}

/**
* Set name of log specification.
*
* @param name the name value to set
* @return the LogSpecification object itself.
*/
public LogSpecification withName(String name) {
this.name = name;
return this;
}

/**
* Get display name of log specification.
*
* @return the displayName value
*/
public String displayName() {
return this.displayName;
}

/**
* Set display name of log specification.
*
* @param displayName the displayName value to set
* @return the LogSpecification object itself.
*/
public LogSpecification withDisplayName(String displayName) {
this.displayName = displayName;
return this;
}

/**
* Get blob duration of specification.
*
* @return the blobDuration value
*/
public String blobDuration() {
return this.blobDuration;
}

/**
* Set blob duration of specification.
*
* @param blobDuration the blobDuration value to set
* @return the LogSpecification object itself.
*/
public LogSpecification withBlobDuration(String blobDuration) {
this.blobDuration = blobDuration;
return this;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
/**
* 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.v2016_10_01.models;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.microsoft.rest.serializer.JsonFlatten;

/**
* Key Vault REST API operation definition.
*/
@JsonFlatten
public class Operation {
/**
* Operation name: {provider}/{resource}/{operation}.
*/
@JsonProperty(value = "name")
private String name;

/**
* Display metadata associated with the operation.
*/
@JsonProperty(value = "display")
private OperationDisplay display;

/**
* The origin of operations.
*/
@JsonProperty(value = "origin")
private String origin;

/**
* One property of operation, include metric specifications.
*/
@JsonProperty(value = "properties.serviceSpecification")
private ServiceSpecification serviceSpecification;

/**
* Get operation name: {provider}/{resource}/{operation}.
*
* @return the name value
*/
public String name() {
return this.name;
}

/**
* Set operation name: {provider}/{resource}/{operation}.
*
* @param name the name value to set
* @return the Operation object itself.
*/
public Operation withName(String name) {
this.name = name;
return this;
}

/**
* Get display metadata associated with the operation.
*
* @return the display value
*/
public OperationDisplay display() {
return this.display;
}

/**
* Set display metadata associated with the operation.
*
* @param display the display value to set
* @return the Operation object itself.
*/
public Operation withDisplay(OperationDisplay display) {
this.display = display;
return this;
}

/**
* Get the origin of operations.
*
* @return the origin value
*/
public String origin() {
return this.origin;
}

/**
* Set the origin of operations.
*
* @param origin the origin value to set
* @return the Operation object itself.
*/
public Operation withOrigin(String origin) {
this.origin = origin;
return this;
}

/**
* Get one property of operation, include metric specifications.
*
* @return the serviceSpecification value
*/
public ServiceSpecification serviceSpecification() {
return this.serviceSpecification;
}

/**
* Set one property of operation, include metric specifications.
*
* @param serviceSpecification the serviceSpecification value to set
* @return the Operation object itself.
*/
public Operation withServiceSpecification(ServiceSpecification serviceSpecification) {
this.serviceSpecification = serviceSpecification;
return this;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
/**
* 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.v2016_10_01.models;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* Display metadata associated with the operation.
*/
public class OperationDisplay {
/**
* Service provider: Microsoft Key Vault.
*/
@JsonProperty(value = "provider")
private String provider;

/**
* Resource on which the operation is performed etc.
*/
@JsonProperty(value = "resource")
private String resource;

/**
* Type of operation: get, read, delete, etc.
*/
@JsonProperty(value = "operation")
private String operation;

/**
* Description of operation.
*/
@JsonProperty(value = "description")
private String description;

/**
* Get service provider: Microsoft Key Vault.
*
* @return the provider value
*/
public String provider() {
return this.provider;
}

/**
* Set service provider: Microsoft Key Vault.
*
* @param provider the provider value to set
* @return the OperationDisplay object itself.
*/
public OperationDisplay withProvider(String provider) {
this.provider = provider;
return this;
}

/**
* Get resource on which the operation is performed etc.
*
* @return the resource value
*/
public String resource() {
return this.resource;
}

/**
* Set resource on which the operation is performed etc.
*
* @param resource the resource value to set
* @return the OperationDisplay object itself.
*/
public OperationDisplay withResource(String resource) {
this.resource = resource;
return this;
}

/**
* Get type of operation: get, read, delete, etc.
*
* @return the operation value
*/
public String operation() {
return this.operation;
}

/**
* Set type of operation: get, read, delete, etc.
*
* @param operation the operation value to set
* @return the OperationDisplay object itself.
*/
public OperationDisplay withOperation(String operation) {
this.operation = operation;
return this;
}

/**
* Get description of operation.
*
* @return the description value
*/
public String description() {
return this.description;
}

/**
* Set description of operation.
*
* @param description the description value to set
* @return the OperationDisplay object itself.
*/
public OperationDisplay withDescription(String description) {
this.description = description;
return this;
}

}
Original file line number Diff line number Diff line change
@@ -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.v2016_10_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 <T> type of Azure resource
*/
public class PageImpl<T> implements Page<T> {
/**
* The link to the next page.
*/
@JsonProperty("nextLink")
private String nextPageLink;

/**
* The list of items.
*/
@JsonProperty("value")
private List<T> 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<T> 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<T> 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<T> setItems(List<T> items) {
this.items = items;
return this;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
/**
* 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.v2016_10_01.models;

import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* Permissions the identity has for keys, secrets, certificates and storage.
*/
public class Permissions {
/**
* Permissions to keys.
*/
@JsonProperty(value = "keys")
private List<KeyPermissions> keys;

/**
* Permissions to secrets.
*/
@JsonProperty(value = "secrets")
private List<SecretPermissions> secrets;

/**
* Permissions to certificates.
*/
@JsonProperty(value = "certificates")
private List<CertificatePermissions> certificates;

/**
* Permissions to storage accounts.
*/
@JsonProperty(value = "storage")
private List<StoragePermissions> storage;

/**
* Get permissions to keys.
*
* @return the keys value
*/
public List<KeyPermissions> keys() {
return this.keys;
}

/**
* Set permissions to keys.
*
* @param keys the keys value to set
* @return the Permissions object itself.
*/
public Permissions withKeys(List<KeyPermissions> keys) {
this.keys = keys;
return this;
}

/**
* Get permissions to secrets.
*
* @return the secrets value
*/
public List<SecretPermissions> secrets() {
return this.secrets;
}

/**
* Set permissions to secrets.
*
* @param secrets the secrets value to set
* @return the Permissions object itself.
*/
public Permissions withSecrets(List<SecretPermissions> secrets) {
this.secrets = secrets;
return this;
}

/**
* Get permissions to certificates.
*
* @return the certificates value
*/
public List<CertificatePermissions> certificates() {
return this.certificates;
}

/**
* Set permissions to certificates.
*
* @param certificates the certificates value to set
* @return the Permissions object itself.
*/
public Permissions withCertificates(List<CertificatePermissions> certificates) {
this.certificates = certificates;
return this;
}

/**
* Get permissions to storage accounts.
*
* @return the storage value
*/
public List<StoragePermissions> storage() {
return this.storage;
}

/**
* Set permissions to storage accounts.
*
* @param storage the storage value to set
* @return the Permissions object itself.
*/
public Permissions withStorage(List<StoragePermissions> storage) {
this.storage = storage;
return this;
}

}
Original file line number Diff line number Diff line change
@@ -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.v2016_10_01.models;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;

/**
* Defines values for Reason.
*/
public enum Reason {
/** Enum value AccountNameInvalid. */
ACCOUNT_NAME_INVALID("AccountNameInvalid"),

/** Enum value AlreadyExists. */
ALREADY_EXISTS("AlreadyExists");

/** The actual serialized value for a Reason instance. */
private String value;

Reason(String value) {
this.value = value;
}

/**
* Parses a serialized value to a Reason instance.
*
* @param value the serialized value to parse.
* @return the parsed Reason object, or null if unable to parse.
*/
@JsonCreator
public static Reason fromString(String value) {
Reason[] items = Reason.values();
for (Reason item : items) {
if (item.toString().equalsIgnoreCase(value)) {
return item;
}
}
return null;
}

@JsonValue
@Override
public String toString() {
return this.value;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/**
* 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.v2016_10_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<SecretPermissions> {
/** 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<SecretPermissions> values() {
return values(SecretPermissions.class);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/**
* 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.v2016_10_01.models;

import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* One property of operation, include log specifications.
*/
public class ServiceSpecification {
/**
* Log specifications of operation.
*/
@JsonProperty(value = "logSpecifications")
private List<LogSpecification> logSpecifications;

/**
* Get log specifications of operation.
*
* @return the logSpecifications value
*/
public List<LogSpecification> logSpecifications() {
return this.logSpecifications;
}

/**
* Set log specifications of operation.
*
* @param logSpecifications the logSpecifications value to set
* @return the ServiceSpecification object itself.
*/
public ServiceSpecification withLogSpecifications(List<LogSpecification> logSpecifications) {
this.logSpecifications = logSpecifications;
return this;
}

}
Original file line number Diff line number Diff line change
@@ -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.v2016_10_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;
}

}
Original file line number Diff line number Diff line change
@@ -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.v2016_10_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;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
/**
* 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.v2016_10_01.models;

import java.util.Collection;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.microsoft.rest.ExpandableStringEnum;

/**
* Defines values for StoragePermissions.
*/
public final class StoragePermissions extends ExpandableStringEnum<StoragePermissions> {
/** Static value get for StoragePermissions. */
public static final StoragePermissions GET = fromString("get");

/** Static value list for StoragePermissions. */
public static final StoragePermissions LIST = fromString("list");

/** Static value delete for StoragePermissions. */
public static final StoragePermissions DELETE = fromString("delete");

/** Static value set for StoragePermissions. */
public static final StoragePermissions SET = fromString("set");

/** Static value update for StoragePermissions. */
public static final StoragePermissions UPDATE = fromString("update");

/** Static value regeneratekey for StoragePermissions. */
public static final StoragePermissions REGENERATEKEY = fromString("regeneratekey");

/** Static value recover for StoragePermissions. */
public static final StoragePermissions RECOVER = fromString("recover");

/** Static value purge for StoragePermissions. */
public static final StoragePermissions PURGE = fromString("purge");

/** Static value backup for StoragePermissions. */
public static final StoragePermissions BACKUP = fromString("backup");

/** Static value restore for StoragePermissions. */
public static final StoragePermissions RESTORE = fromString("restore");

/** Static value setsas for StoragePermissions. */
public static final StoragePermissions SETSAS = fromString("setsas");

/** Static value listsas for StoragePermissions. */
public static final StoragePermissions LISTSAS = fromString("listsas");

/** Static value getsas for StoragePermissions. */
public static final StoragePermissions GETSAS = fromString("getsas");

/** Static value deletesas for StoragePermissions. */
public static final StoragePermissions DELETESAS = fromString("deletesas");

/**
* Creates or finds a StoragePermissions from its string representation.
* @param name a name to look for
* @return the corresponding StoragePermissions
*/
@JsonCreator
public static StoragePermissions fromString(String name) {
return fromString(name, StoragePermissions.class);
}

/**
* @return known StoragePermissions values
*/
public static Collection<StoragePermissions> values() {
return values(StoragePermissions.class);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/**
* 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.v2016_10_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;

/**
* 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;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/**
* 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.v2016_10_01.models;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.microsoft.azure.ProxyResource;

/**
* Parameters for updating the access policy in a vault.
*/
public class VaultAccessPolicyParameters extends ProxyResource {
/**
* The resource type of the access policy.
*/
@JsonProperty(value = "location", access = JsonProperty.Access.WRITE_ONLY)
private String location;

/**
* Properties of the access policy.
*/
@JsonProperty(value = "properties", required = true)
private VaultAccessPolicyProperties properties;

/**
* Get the resource type of the access policy.
*
* @return the location value
*/
public String location() {
return this.location;
}

/**
* Get properties of the access policy.
*
* @return the properties value
*/
public VaultAccessPolicyProperties properties() {
return this.properties;
}

/**
* Set properties of the access policy.
*
* @param properties the properties value to set
* @return the VaultAccessPolicyParameters object itself.
*/
public VaultAccessPolicyParameters withProperties(VaultAccessPolicyProperties properties) {
this.properties = properties;
return this;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/**
* 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.v2016_10_01.models;

import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* Properties of the vault access policy.
*/
public class VaultAccessPolicyProperties {
/**
* 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<AccessPolicyEntry> accessPolicies;

/**
* 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<AccessPolicyEntry> 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 VaultAccessPolicyProperties object itself.
*/
public VaultAccessPolicyProperties withAccessPolicies(List<AccessPolicyEntry> accessPolicies) {
this.accessPolicies = accessPolicies;
return this;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
/**
* 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.v2016_10_01.models;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* The parameters used to check the availability of the vault name.
*/
public class VaultCheckNameAvailabilityParameters {
/**
* The vault name.
*/
@JsonProperty(value = "name", required = true)
private String name;

/**
* The type of resource, Microsoft.KeyVault/vaults.
*/
@JsonProperty(value = "type", required = true)
private String type;

/**
* Creates an instance of VaultCheckNameAvailabilityParameters class.
* @param name the vault name.
*/
public VaultCheckNameAvailabilityParameters() {
type = "Microsoft.KeyVault/vaults";
}

/**
* Get the vault name.
*
* @return the name value
*/
public String name() {
return this.name;
}

/**
* Set the vault name.
*
* @param name the name value to set
* @return the VaultCheckNameAvailabilityParameters object itself.
*/
public VaultCheckNameAvailabilityParameters withName(String name) {
this.name = name;
return this;
}

/**
* Get the type of resource, Microsoft.KeyVault/vaults.
*
* @return the type value
*/
public String type() {
return this.type;
}

/**
* Set the type of resource, Microsoft.KeyVault/vaults.
*
* @param type the type value to set
* @return the VaultCheckNameAvailabilityParameters object itself.
*/
public VaultCheckNameAvailabilityParameters withType(String type) {
this.type = type;
return this;
}

}
Original file line number Diff line number Diff line change
@@ -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.v2016_10_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<String, String> 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<String, String> 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<String, String> 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;
}

}
Original file line number Diff line number Diff line change
@@ -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.v2016_10_01.models;

import java.util.Map;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* Parameters for creating or updating a vault.
*/
public class VaultPatchParameters {
/**
* The tags that will be assigned to the key vault.
*/
@JsonProperty(value = "tags")
private Map<String, String> tags;

/**
* Properties of the vault.
*/
@JsonProperty(value = "properties")
private VaultPatchProperties properties;

/**
* Get the tags that will be assigned to the key vault.
*
* @return the tags value
*/
public Map<String, String> tags() {
return this.tags;
}

/**
* Set the tags that will be assigned to the key vault.
*
* @param tags the tags value to set
* @return the VaultPatchParameters object itself.
*/
public VaultPatchParameters withTags(Map<String, String> tags) {
this.tags = tags;
return this;
}

/**
* Get properties of the vault.
*
* @return the properties value
*/
public VaultPatchProperties properties() {
return this.properties;
}

/**
* Set properties of the vault.
*
* @param properties the properties value to set
* @return the VaultPatchParameters object itself.
*/
public VaultPatchParameters withProperties(VaultPatchProperties properties) {
this.properties = properties;
return this;
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,263 @@
/**
* 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.v2016_10_01.models;

import java.util.UUID;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
* Properties of the vault.
*/
public class VaultPatchProperties {
/**
* The Azure Active Directory tenant ID that should be used for
* authenticating requests to the key vault.
*/
@JsonProperty(value = "tenantId")
private UUID tenantId;

/**
* SKU details.
*/
@JsonProperty(value = "sku")
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")
private List<AccessPolicyEntry> 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 specifying whether recoverable deletion ('soft' delete) is
* enabled for this key vault. The property may not be set to false.
*/
@JsonProperty(value = "enableSoftDelete")
private Boolean enableSoftDelete;

/**
* The vault's create mode to indicate whether the vault need to be
* recovered or not. Possible values include: 'recover', 'default'.
*/
@JsonProperty(value = "createMode")
private CreateMode createMode;

/**
* Property specifying whether protection against purge is enabled for this
* vault; it is only effective if soft delete is also enabled. Once
* activated, the property may no longer be reset to false.
*/
@JsonProperty(value = "enablePurgeProtection")
private Boolean enablePurgeProtection;

/**
* 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 VaultPatchProperties object itself.
*/
public VaultPatchProperties 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 VaultPatchProperties object itself.
*/
public VaultPatchProperties 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<AccessPolicyEntry> 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 VaultPatchProperties object itself.
*/
public VaultPatchProperties withAccessPolicies(List<AccessPolicyEntry> 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 VaultPatchProperties object itself.
*/
public VaultPatchProperties 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 VaultPatchProperties object itself.
*/
public VaultPatchProperties 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 VaultPatchProperties object itself.
*/
public VaultPatchProperties withEnabledForTemplateDeployment(Boolean enabledForTemplateDeployment) {
this.enabledForTemplateDeployment = enabledForTemplateDeployment;
return this;
}

/**
* Get property specifying whether recoverable deletion ('soft' delete) is enabled for this key vault. The property may not be set to false.
*
* @return the enableSoftDelete value
*/
public Boolean enableSoftDelete() {
return this.enableSoftDelete;
}

/**
* Set property specifying whether recoverable deletion ('soft' delete) is enabled for this key vault. The property may not be set to false.
*
* @param enableSoftDelete the enableSoftDelete value to set
* @return the VaultPatchProperties object itself.
*/
public VaultPatchProperties withEnableSoftDelete(Boolean enableSoftDelete) {
this.enableSoftDelete = enableSoftDelete;
return this;
}

/**
* Get the vault's create mode to indicate whether the vault need to be recovered or not. Possible values include: 'recover', 'default'.
*
* @return the createMode value
*/
public CreateMode createMode() {
return this.createMode;
}

/**
* Set the vault's create mode to indicate whether the vault need to be recovered or not. Possible values include: 'recover', 'default'.
*
* @param createMode the createMode value to set
* @return the VaultPatchProperties object itself.
*/
public VaultPatchProperties withCreateMode(CreateMode createMode) {
this.createMode = createMode;
return this;
}

/**
* Get property specifying whether protection against purge is enabled for this vault; it is only effective if soft delete is also enabled. Once activated, the property may no longer be reset to false.
*
* @return the enablePurgeProtection value
*/
public Boolean enablePurgeProtection() {
return this.enablePurgeProtection;
}

/**
* Set property specifying whether protection against purge is enabled for this vault; it is only effective if soft delete is also enabled. Once activated, the property may no longer be reset to false.
*
* @param enablePurgeProtection the enablePurgeProtection value to set
* @return the VaultPatchProperties object itself.
*/
public VaultPatchProperties withEnablePurgeProtection(Boolean enablePurgeProtection) {
this.enablePurgeProtection = enablePurgeProtection;
return this;
}

}
Loading

0 comments on commit 96de7e3

Please sign in to comment.