Skip to content

Commit

Permalink
CodeGen from PR 15874 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge d2a42d8f79beba941b23d8af1721775633b09dea into ff1530a77c9c21e515930f7f20166fa6609dba49
  • Loading branch information
SDKAuto committed Aug 31, 2021
1 parent 3277d65 commit 954acb9
Show file tree
Hide file tree
Showing 39 changed files with 423 additions and 748 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Release History

## 1.0.0-beta.2 (Unreleased)
## 1.0.0-beta.1 (2021-08-31)

- Azure Resource Manager AzureArcData client library for Java. This package contains Microsoft Azure SDK for AzureArcData Management SDK. The AzureArcData management API provides a RESTful set of web APIs to manage Azure Data Services on Azure Arc Resources. Package tag package-2021-08-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

## 1.0.0-beta.1 (2021-07-21)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Various documentation is available to help you get started
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-azurearcdata</artifactId>
<version>1.0.0-beta.1</version>
<version>1.0.0-beta.2</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down Expand Up @@ -74,7 +74,6 @@ See [API design][design] for general introduction on design and key concepts on

## Examples

[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/azurearcdata/azure-resourcemanager-azurearcdata/SAMPLE.md)


## Troubleshooting
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,34 @@ DataControllerResourceInner putDataController(
DataControllerResourceInner dataControllerResource,
Context context);

/**
* Deletes a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
* @param dataControllerName The dataControllerName parameter.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String dataControllerName);

/**
* Deletes a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
* @param dataControllerName The dataControllerName parameter.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
SyncPoller<PollResult<Void>, Void> beginDelete(
String resourceGroupName, String dataControllerName, Context context);

/**
* Deletes a dataController resource.
*
Expand All @@ -152,10 +180,9 @@ DataControllerResourceInner putDataController(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the response.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<Void> deleteWithResponse(String resourceGroupName, String dataControllerName, Context context);
void delete(String resourceGroupName, String dataControllerName, Context context);

/**
* Retrieves a dataController resource.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,34 @@ SqlManagedInstanceInner create(
SqlManagedInstanceInner sqlManagedInstance,
Context context);

/**
* Deletes a SQL Managed Instance resource.
*
* @param resourceGroupName The name of the Azure resource group.
* @param sqlManagedInstanceName The name of Sql Managed Instances.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String sqlManagedInstanceName);

/**
* Deletes a SQL Managed Instance resource.
*
* @param resourceGroupName The name of the Azure resource group.
* @param sqlManagedInstanceName The name of Sql Managed Instances.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
SyncPoller<PollResult<Void>, Void> beginDelete(
String resourceGroupName, String sqlManagedInstanceName, Context context);

/**
* Deletes a SQL Managed Instance resource.
*
Expand All @@ -180,10 +208,9 @@ SqlManagedInstanceInner create(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the response.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<Void> deleteWithResponse(String resourceGroupName, String sqlManagedInstanceName, Context context);
void delete(String resourceGroupName, String sqlManagedInstanceName, Context context);

/**
* Updates a SQL Managed Instance resource.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,34 @@ SqlServerInstanceInner create(
SqlServerInstanceInner sqlServerInstance,
Context context);

/**
* Deletes a SQL Server Instance resource.
*
* @param resourceGroupName The name of the Azure resource group.
* @param sqlServerInstanceName The name of SQL Server Instance.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String sqlServerInstanceName);

/**
* Deletes a SQL Server Instance resource.
*
* @param resourceGroupName The name of the Azure resource group.
* @param sqlServerInstanceName The name of SQL Server Instance.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
SyncPoller<PollResult<Void>, Void> beginDelete(
String resourceGroupName, String sqlServerInstanceName, Context context);

/**
* Deletes a SQL Server Instance resource.
*
Expand All @@ -180,10 +208,9 @@ SqlServerInstanceInner create(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the response.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<Void> deleteWithResponse(String resourceGroupName, String sqlServerInstanceName, Context context);
void delete(String resourceGroupName, String sqlServerInstanceName, Context context);

/**
* Updates a SQL Server Instance resource.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import com.azure.resourcemanager.azurearcdata.models.OperationDisplay;
import com.azure.resourcemanager.azurearcdata.models.OperationOrigin;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;

Expand Down Expand Up @@ -46,6 +47,7 @@ public final class OperationInner {
* Additional descriptions for the operation.
*/
@JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY)
@JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
private Map<String, Object> properties;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ Mono<Response<Flux<ByteBuffer>>> putDataController(
@Delete(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureArcData"
+ "/dataControllers/{dataControllerName}")
@ExpectedResponses({200, 204})
@ExpectedResponses({200, 202, 204})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono<Response<Void>> delete(
Mono<Response<Flux<ByteBuffer>>> delete(
@HostParam("$host") String endpoint,
@PathParam("subscriptionId") String subscriptionId,
@PathParam("resourceGroupName") String resourceGroupName,
Expand Down Expand Up @@ -789,7 +789,8 @@ public DataControllerResourceInner putDataController(
* @return the completion.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Response<Void>> deleteWithResponseAsync(String resourceGroupName, String dataControllerName) {
private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(
String resourceGroupName, String dataControllerName) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
Expand Down Expand Up @@ -838,7 +839,7 @@ private Mono<Response<Void>> deleteWithResponseAsync(String resourceGroupName, S
* @return the completion.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Response<Void>> deleteWithResponseAsync(
private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(
String resourceGroupName, String dataControllerName, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
Expand Down Expand Up @@ -873,6 +874,77 @@ private Mono<Response<Void>> deleteWithResponseAsync(
context);
}

/**
* Deletes a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
* @param dataControllerName The dataControllerName parameter.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String dataControllerName) {
Mono<Response<Flux<ByteBuffer>>> mono = deleteWithResponseAsync(resourceGroupName, dataControllerName);
return this
.client
.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE);
}

/**
* Deletes a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
* @param dataControllerName The dataControllerName parameter.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private PollerFlux<PollResult<Void>, Void> beginDeleteAsync(
String resourceGroupName, String dataControllerName, Context context) {
context = this.client.mergeContext(context);
Mono<Response<Flux<ByteBuffer>>> mono = deleteWithResponseAsync(resourceGroupName, dataControllerName, context);
return this
.client
.<Void, Void>getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
}

/**
* Deletes a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
* @param dataControllerName The dataControllerName parameter.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String dataControllerName) {
return beginDeleteAsync(resourceGroupName, dataControllerName).getSyncPoller();
}

/**
* Deletes a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
* @param dataControllerName The dataControllerName parameter.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public SyncPoller<PollResult<Void>, Void> beginDelete(
String resourceGroupName, String dataControllerName, Context context) {
return beginDeleteAsync(resourceGroupName, dataControllerName, context).getSyncPoller();
}

/**
* Deletes a dataController resource.
*
Expand All @@ -885,8 +957,27 @@ private Mono<Response<Void>> deleteWithResponseAsync(
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Void> deleteAsync(String resourceGroupName, String dataControllerName) {
return deleteWithResponseAsync(resourceGroupName, dataControllerName)
.flatMap((Response<Void> res) -> Mono.empty());
return beginDeleteAsync(resourceGroupName, dataControllerName)
.last()
.flatMap(this.client::getLroFinalResultOrError);
}

/**
* Deletes a dataController resource.
*
* @param resourceGroupName The name of the Azure resource group.
* @param dataControllerName The dataControllerName parameter.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the completion.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Void> deleteAsync(String resourceGroupName, String dataControllerName, Context context) {
return beginDeleteAsync(resourceGroupName, dataControllerName, context)
.last()
.flatMap(this.client::getLroFinalResultOrError);
}

/**
Expand All @@ -912,11 +1003,10 @@ public void delete(String resourceGroupName, String dataControllerName) {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the response.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<Void> deleteWithResponse(String resourceGroupName, String dataControllerName, Context context) {
return deleteWithResponseAsync(resourceGroupName, dataControllerName, context).block();
public void delete(String resourceGroupName, String dataControllerName, Context context) {
deleteAsync(resourceGroupName, dataControllerName, context).block();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ public void deleteByResourceGroup(String resourceGroupName, String dataControlle
this.serviceClient().delete(resourceGroupName, dataControllerName);
}

public Response<Void> deleteWithResponse(String resourceGroupName, String dataControllerName, Context context) {
return this.serviceClient().deleteWithResponse(resourceGroupName, dataControllerName, context);
public void delete(String resourceGroupName, String dataControllerName, Context context) {
this.serviceClient().delete(resourceGroupName, dataControllerName, context);
}

public DataControllerResource getByResourceGroup(String resourceGroupName, String dataControllerName) {
Expand Down Expand Up @@ -139,10 +139,10 @@ public void deleteById(String id) {
String
.format("The resource ID '%s' is not valid. Missing path segment 'dataControllers'.", id)));
}
this.deleteWithResponse(resourceGroupName, dataControllerName, Context.NONE).getValue();
this.delete(resourceGroupName, dataControllerName, Context.NONE);
}

public Response<Void> deleteByIdWithResponse(String id, Context context) {
public void deleteByIdWithResponse(String id, Context context) {
String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw logger
Expand All @@ -159,7 +159,7 @@ public Response<Void> deleteByIdWithResponse(String id, Context context) {
String
.format("The resource ID '%s' is not valid. Missing path segment 'dataControllers'.", id)));
}
return this.deleteWithResponse(resourceGroupName, dataControllerName, context);
this.delete(resourceGroupName, dataControllerName, context);
}

private DataControllersClient serviceClient() {
Expand Down
Loading

0 comments on commit 954acb9

Please sign in to comment.